Skip to content
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

sync: failed to fetch block hash for height ####: block not found #978

Open
JoeGruffins opened this issue Feb 25, 2025 · 3 comments · May be fixed by #979
Open

sync: failed to fetch block hash for height ####: block not found #978

JoeGruffins opened this issue Feb 25, 2025 · 3 comments · May be fixed by #979

Comments

@JoeGruffins
Copy link
Contributor

JoeGruffins commented Feb 25, 2025

This seems to be a random sync error. Its been around forever but I don't see an issue for it. The particular block seems to differ, but sync will get stuck with this error and never fix itself, even restarting:

[ERR] BTCW: Unable to synchronize wallet to chain, trying again in 5s: unable to perform wallet recovery: failed to store sync information 000000000000000000007101d8cb8f46c7c17c7c12f873eb0f717d8751628c08: failed to fetch block hash for height 858852: block not found

The block exists but is reported as block 858,853 here, so I guess its not finding the parent block hash? https://www.blockchain.com/explorer/blocks/btc/000000000000000000007101d8cb8f46c7c17c7c12f873eb0f717d8751628c08

@JoeGruffins

This comment has been minimized.

@JoeGruffins JoeGruffins linked a pull request Feb 25, 2025 that will close this issue
@JoeGruffins
Copy link
Contributor Author

JoeGruffins commented Feb 25, 2025

By checking the birthday I got past the birthday block, but it got stuck again at a later block, so may be something else.

2025-02-25 17:16:30.094 [INF] BTCW: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250
2025-02-25 17:16:30.101 [INF] BTCW: Seed birthday surpassed, starting recovery of wallet from height=870853 hash=00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc with recovery-window=250
2025-02-25 17:16:30.107 [ERR] BTCW: Unable to synchronize wallet to chain, trying again in 5s: unable to perform wallet recovery: failed to store sync information 00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc: failed to fetch block hash for height 870852: block not found
2025-02-25 17:16:36.108 [INF] BTCW: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250
2025-02-25 17:16:36.115 [INF] BTCW: Seed birthday surpassed, starting recovery of wallet from height=870853 hash=00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc with recovery-window=250
2025-02-25 17:16:36.122 [ERR] BTCW: Unable to synchronize wallet to chain, trying again in 5s: unable to perform wallet recovery: failed to store sync information 00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc: failed to fetch block hash for height 870852: block not found

There's a suspicious error before this second spat starts. did not get response before timeout:

2025-02-25 17:14:12.820 [DBG] NTRNO: Received feefilter from 174.29.113.87:8333 (outbound)
2025-02-25 17:14:15.801 [WRN] CHAIN: Query(46) from peer 77.174.133.117:8333 failed, rescheduling: did not get response before timeout
2025-02-25 17:14:15.801 [WRN] CHAIN: Query(46) failed with error: did not get response before timeout. Timing out.
2025-02-25 17:14:15.801 [WRN] CHAIN: Batch 46 timed out
2025-02-25 17:14:15.801 [WRN] CHAIN: Query(46) result from peer 85.145.25.166:8333 discarded with retries 4, because batch already canceled: job canceled
2025-02-25 17:14:15.801 [ERR] BTCW: Unable to synchronize wallet to chain, trying again in 5s: unable to perform wallet recovery: did not get response before timeout
2025-02-25 17:14:16.215 [DBG] NTRNO: Received block (hash 000000000000000000027a92dbc32287327219206342ed389276985acbea337e, ver 848683008, 2162 tx, 2024-11-06 18:35:07 +0900 JST) from 77.174.133.117:8333 (outbound)
2025-02-25 17:14:21.802 [INF] BTCW: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250
2025-02-25 17:14:21.810 [INF] BTCW: Seed birthday surpassed, starting recovery of wallet from height=870853 hash=00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc with recovery-window=250
2025-02-25 17:14:21.817 [ERR] BTCW: Unable to synchronize wallet to chain, trying again in 5s: unable to perform wallet recovery: failed to store sync information 00000000000000000000b9e6cc0b5be06c02f56506fee5c7897edf6cafc4e7cc: failed to fetch block hash for height 870852: block not found

@JoeGruffins
Copy link
Contributor Author

I think recovery needs a rollback like here

rollbackStamp := w.Manager.SyncedTo()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant