-
Notifications
You must be signed in to change notification settings - Fork 107
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
Put block header and block body together in one object #593
Comments
We won't be fetching block headers and block bodies exactly synchronised. In some cases we only want the header in memory without even fetching the body. Perhaps also in storage. So there will necessarily be block headers that don't have bodies, and operations need to reflect that. Why is the current setup annoying? Provided you can look up the body given a header, wouldn't you just do all operations with I'm not sure what the GraphQL service reports exactly, but if it's to let the client query whatever data we have, perhaps it needs to report block headers that we have without bodies. |
The definitions of I think that is the underlying cause of annoyance, and having to keep track of both things as a pair all the time is a symptom from that cause. Same thing affects other areas, especially the sync and storage processes. Real data structures are needed in other areas too in Just keep in mind, some |
this issue posing no problem anymore. |
nimbus-eth1/nimbus/p2p/chain.nim
Line 128 in e76e014
One of the most annoying method appears in both nimbus-eth1 and nim-eth is
persistBlocks
. It require block header and block body separated in two object.The reason why it need to be in one object:
--import
command line options required by hive also provide block header and body in one RLP blob.Currently what we have is:
The new object will be like this:
Although the
eth/xx
network protocol might not request or send a block in one message, we can assembly the pieces when they arrived. why assemble it into headers and bodies while we can assemble them into blocks.The text was updated successfully, but these errors were encountered: