-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: implemented BlockHeader (BFT-357) #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I only have a few minor nits.
/// Currently it is stored in the BlockHeader (TODO: consider whether it should be present in every | ||
/// consensus message). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of letting it as a TODO, let's think about it now. What are the arguments in favor? (I assume the only argument against is bigger messages)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument in favor is that if we have a new version which changes the semantics of the consensus message it may happen that the validator running old binary will sign a message that will be incorrectly interpreted by a validator running a new binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do it then.
/// Currently it is stored in the BlockHeader (TODO: consider whether it should be present in every | ||
/// consensus message). | ||
/// Currently it also determines the format and semantics of the block payload | ||
/// (TODO: consider whether the payload should be versioned separately). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this on the last team meeting and were in agreement that we should keep just one version for both consensus and execution layers. I said that I was going to try to find some reason to have separate versions, but I couldn't find any.
Do you still feel that we need to think this through more or are you happy committing to one protocol version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some afterthoughts after that discussion in the context of the above: if we keep the version (only) in the block, then some messages don't include the version at all. And if we (hypothetically) added version to both header and the messages, then forcing them to be the same wouldn't bring any benefit and might be constraining. Not a strong opinion, just writing down my thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if we include the version in every message, then we don't need to include it in the block header. The block header is never sent by itself over the wire, either it is sent in a leader prepare or in a final block (which would contain the version in the commit QC). It would even make some sense since the protocol version isn't technically a property of the block, but of the nodes.
Co-authored-by: Bruno França <[email protected]>
Co-authored-by: Bruno França <[email protected]>
Implemented https://www.notion.so/matterlabs/5d238e08fbed476b8550f697d9c39df6?v=51a4bffaba05499e8ca11bd625fff54a&p=16c93154366c4a3994457b44043dea71&pm=s with some differences. Summary of changes:
Minor fixes: