-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example_bitcoind_rpc_polling
sync command ends with stack overflow
#1634
Comments
New information: the database file is ~7.9M. Interestingly I also get a stack overflow when calling the Running `target/debug/example_bitcoind_rpc_polling balance`
confirmed:
total 69500 sats
spendable 69500 sats
immature 0 sats
unconfirmed:
total 0 sats
trusted 0 sats
untrusted 0 sats
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
zsh: abort cargo run --bin example_bitcoind_rpc_polling -- balance I commented out the line here in bdk/example-crates/example_cli/src/lib.rs Lines 810 to 815 in 139d971
Running `target/debug/example_bitcoind_rpc_polling balance`
confirmed:
total 0 sats
spendable 0 sats
immature 0 sats
unconfirmed:
total 0 sats
trusted 0 sats
untrusted 0 sats |
Interesting, I also had this problem a while ago. Will try to reproduce it again and report back. |
Seems to be isolated to the #[test]
fn apply_massive_changeset() {
let (mut chain, _) = LocalChain::from_genesis_hash(genesis_block(Network::Bitcoin).block_hash());
let blocks = (1u32..850_000)
.into_iter()
.map(|height| {
let hash = bitcoin::hashes::Hash::hash(height.to_string().as_bytes());
(height, Some(hash))
})
.collect();
chain.apply_changeset(&ChangeSet { blocks }).unwrap();
} |
I'm having some trouble reproducing this. Can you provide the command sequence you ran @ValuedMammal ? btw, the crate's README needs some updating |
@luisschwab I usually add my descriptors as environment variables and then just follow the help text of the CLI. I'm interested to see if someone can reproduce it, otherwise it could be something specific to my architecture. You're right the README is outdated # setup environment
export DESCRIPTOR="tr([7d94197e/86'/1'/0']tpubDCyQVJj8KzjiQsFjmb3KwECVXPvMwvAxxZGCP9XmWSopmjW3bCV3wD7TgxrUhiGSueDS1MU5X1Vb1YjYcp8jitXc5fXfdC1z68hDDEyKRNr/0/*)"
export CHANGE_DESCRIPTOR="tr([7d94197e/86'/1'/0']tpubDCyQVJj8KzjiQsFjmb3KwECVXPvMwvAxxZGCP9XmWSopmjW3bCV3wD7TgxrUhiGSueDS1MU5X1Vb1YjYcp8jitXc5fXfdC1z68hDDEyKRNr/1/*)"
# specific for example_bitcoind_rpc_polling
# assumes a full node setup locally on signet
export RPC_URL="127.0.0.1:38332"
export RPC_COOKIE=<path-to-your-cookie-file> # e.g. /home/satoshi/.bitcoin/signet/.cookie
export FALLBACK_HEIGHT=1
# initialize database
cargo run --bin example_bitcoind_rpc_polling -- init
# sync
cargo run --bin example_bitcoind_rpc_polling -- sync |
Reproduced in
My DB is similarly large at 8MB.
|
Describe the bug
I ran a sync from genesis using a local signet node. It took around 25 minutes to reach the new tip but ended abruptly before finishing.
To Reproduce
Expected behavior
Build environment
Additional context
The text was updated successfully, but these errors were encountered: