-
Notifications
You must be signed in to change notification settings - Fork 20k
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
all: stateless witness builder and (self-)cross validator #29719
all: stateless witness builder and (self-)cross validator #29719
Conversation
fce0ff4
to
3bef048
Compare
This adds a new test suite |
Converted back to draft while I address remaining TODOs (parts of the code are confusing rn). |
443f25b
to
be10f33
Compare
a8f4324
to
148d0a1
Compare
@karalabe this still fails 2 tests:
I need to fix those and double-check and clean up the diff (parts are still a bit messy). Overall, I think it's getting close though. |
0e08fd1
to
a7372f5
Compare
272b42c
to
886ef37
Compare
ac5d08e
to
06d5e01
Compare
3e305e6
to
3354f74
Compare
3eb9519
to
fb3450a
Compare
fc0165c
to
a36aed7
Compare
a36aed7
to
93c8ff2
Compare
@jwasinger @rjl493456442 @fjl @holiman PTAL, the PR is ready for review/merge. |
FWIW, I'd appreciate a merge commit vs. squash merge to retain ownership of my massive cleanup commit. |
One thing I want to change. Replace the pre-root hash with the parent header. In the current shape of the code the pre-root is trusted, which allows the block being verified to be malicious (i.e. unverified pre-root == unverified starting state == arbitrary post state). By adding the parent header we are proving the link between the validated block and the pre-root state (via the parent header). |
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.
SGTM, just a few nits
d286e8f
to
e1dd112
Compare
There are some wonkyness left in, but I have a followup PR which does the live integration and that does further cleanups. Better to have the witness stuff in here and then have the mushing into our live codebase separately. Also a lot of stuff gets deleted that will not be needed any more with a live hook. |
This PR does the witness construction during block execution, after which a custom self-stateless-cross-validation step is added (if the entire thing is enabled via a CLI). No external validator is defined yet, the purpose of the current integration is to run consensus tests with witnesses and run live benchmarkers with witnesses to sanity check any possible faults. Metrics and benchmarks will probably need a followup PR to focus on that.