-
Notifications
You must be signed in to change notification settings - Fork 87
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
JIT EBBs in the ThreadNet tests require ExtLedgerState in block production #2048
JIT EBBs in the ThreadNet tests require ExtLedgerState in block production #2048
Conversation
f2acddc
to
ad6a8a1
Compare
9290c8d
to
f39085d
Compare
@edsko and I reviewed on a call. Thanks! Plan: re-expanding the |
Once PR #2176 is merged, this PR will change dramatically; it will merely simplify the JIT EBB generator, under the assumption that (at least in the test suite for now) nodes now never forge invalid blocks! |
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.
Just marking this as changes required. The changes are already described by @nfrisby himself, just want to avoid an accidental merge.
f39085d
to
72575e6
Compare
72575e6
to
7f8dee7
Compare
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.
Nice, glad that that worked out!
bors merge |
Fixes #2047.
PR #1942 changed blockProduction to take a LedgerState instead of
ExtLedgerState, which suffices for all forging. However, the ThreadNet tests'
current approach to EBBs requires anticipating during block production whether
the produced block will be invalid in anyway. (The node does not emit the EBB
unless the EBB unless it is also emitting a valid block.) And that anticipatory
validation must include protocol-level errors, which requires the full
ExtLedgerState.
It may be possible to instead change the tests to allow for EBBs without
successors, but I'm don't see how, so I currently propose leaving that for future work if we
prioritize it.
Edit: PR 2176 essentially fixed this failure mode en passant. This PR now just simplifies the JIT EBB logic accordingly.