-
Notifications
You must be signed in to change notification settings - Fork 8
Remove headers from chain state #292
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
base: remove-chain-storage
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fb75d92 to
12c9304
Compare
12c9304 to
bc544a5
Compare
Removed the headers field from ChainState. Also modified a StorageManager trait method return type removing a the possibility of error (bcs it cannot fail once the StorageManager is built) and added a little bit of noise to this PR, more than expected.
All tests pass and I was able to execute example simple_sync reaching height 2_391_372 in 15 min (more or less).
There is only one thing, one piece of logic that I didn't replace.
In
dash-spv/src/types.rsline 303, inside methodChainState::new_for_networkwe can find this:I just dropped the push of the genesis_block without adding it to the storage expecting a future issue during sync or while executing the tests but that never happened. I guess we are sync the genesis block from the network instead of having it hardcoded there but I am not sure and make me wonder. Since it works and theorically this is somethign we can ask the network for I am not wasting time here unless someone knows something that I don't. I want to continue updating ChainState