forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Validation endpoint prototype #5
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 12531b6.
This was referenced Sep 25, 2023
Replaced by: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a very rough prototype that should implement at least some of the validation logic we are looking for.
On a high level I:
Added a new rpc endpoint / method
validation_validateBuilderSubmissionV1
that acceps an execution payload as its only parameter, passes it into this validation method and returns the result.Hoops I had to jump through to implement this:
ExecutionPayloadValidation
struct and add a conversion method to the built inengine::payload::ExecutionPayload
struct, because of differences in formatting. (camel vs snake case and hex vs. decimal numbers)Testing:
I was able to verify that the block hash is correctly verified as well as some aspects of the withdrawals array.
However I have not yet been able to fully test the happy case. The closest I have come was when sending one of the example payloads to the synced node in which case it fails when checking the withdrawal index
To run the node with the new rpc endpoint do:
RUST_LOG=info reth node --full --metrics 127.0.0.1:9001 --http --http.api eth,validation,web3
Afterwards you should be able to test the rpc endpoint with:
curl --location '0.0.0.0:8545/' --header 'Content-Type: application/json' --data @rpc_message.json
With the rpc_message.json payload looking something like:
Open Questions / Issues:
full_validation
method here with the reference implementation here).