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

Is it possible to set a start point for historical blocks? #157

Open
blakebyrnes opened this issue May 15, 2024 · 1 comment
Open

Is it possible to set a start point for historical blocks? #157

blakebyrnes opened this issue May 15, 2024 · 1 comment

Comments

@blakebyrnes
Copy link

If I only want to monitor the blocks from a starting point, is there a way I can tell nakamoto not to go sync headers all the way to genesis on boot up? I don't need history, and I would trust a checkpoint or multiple peers telling me the same block 100 confirmations back is valid.

If it's not already built, where would you recommend I look in the code to try to add this feature?

@vincenzopalazzo
Copy link
Collaborator

looking at the BIP https://en.bitcoin.it/wiki/BIP_0157 looks like there is no problem it say "I start monitoring from block X" where block X is somehow one of the recent one.

If it's not already built, where would you recommend I look in the code to try to add this feature?

I think that needs to be built, and we should pass a --stat-height in the https://github.com/cloudhead/nakamoto/blob/master/node/src/main.rs#L11 and state modifying it you will go down to the core and see where the node is starting to fetch headers from the block 0 (I think you need to search by block hash not for block height)

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

No branches or pull requests

2 participants