-
Notifications
You must be signed in to change notification settings - Fork 74
chore: Add changes needed for optional execution proofs #515
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
Draft
kevaundray
wants to merge
2
commits into
ethpandaops:master
Choose a base branch
from
kevaundray:kw/optional-proofs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package rpc | ||
|
|
||
| // ExecutionProof represents a cryptographic proof of execution that | ||
| // an execution payload is valid. | ||
| type ExecutionProof struct { | ||
| // Which proof type (zkVM+EL combination) this proof belongs to | ||
| ProofId uint8 `json:"proof_id"` | ||
|
|
||
| // The slot of the beacon block this proof validates | ||
| Slot string `json:"slot"` | ||
|
|
||
| // The block hash of the execution payload this proof validates | ||
| BlockHash string `json:"block_hash"` | ||
|
|
||
| // The beacon block root corresponding to the beacon block | ||
| BlockRoot string `json:"block_root"` | ||
|
|
||
| // The actual proof data (byte array) | ||
| ProofData []byte `json:"proof_data"` | ||
| } | ||
|
|
||
| // ExecutionProofsResponse represents the API response for execution proofs | ||
| type ExecutionProofsResponse struct { | ||
| Data []ExecutionProof `json:"data"` | ||
| ExecutionOptimistic bool `json:"execution_optimistic"` | ||
| Finalized bool `json:"finalized"` | ||
| } |
This file contains hidden or 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 file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| {{ define "block_proofs" }} | ||
| {{ if gt (len .Block.ExecutionProofs) 0 }} | ||
| {{ range $i, $proof := .Block.ExecutionProofs }} | ||
| <div class="card my-2"> | ||
| <div class="card-body px-0 py-1"> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-12 text-center"><b>Execution Proof {{ $proof.ProofId }}</b></div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Proof Type ID">Proof ID:</span></div> | ||
| <div class="col-md-10"> | ||
| {{ $proof.ProofId }} | ||
| <span class="text-muted ms-2"> | ||
| {{ if eq $proof.ProofId 0 }}(SP1+Reth) | ||
| {{ else if eq $proof.ProofId 1 }}(Risc0+Geth) | ||
| {{ else if eq $proof.ProofId 2 }}(SP1+Geth) | ||
| {{ else }}(zkVM+EL #{{ $proof.ProofId }}) | ||
| {{ end }} | ||
| </span> | ||
| </div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Slot Number">Slot:</span></div> | ||
| <div class="col-md-10"> | ||
| {{ $proof.Slot }} | ||
| </div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Execution Block Hash">Block Hash:</span></div> | ||
| <div class="col-md-10 text-monospace"> | ||
| 0x{{ printf "%x" $proof.BlockHash }} | ||
| <i class="fa fa-copy text-muted p-1" role="button" data-bs-toggle="tooltip" title="Copy to clipboard" data-clipboard-text="0x{{ printf "%x" $proof.BlockHash }}"></i> | ||
| </div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Beacon Block Root">Block Root:</span></div> | ||
| <div class="col-md-10 text-monospace"> | ||
| 0x{{ printf "%x" $proof.BlockRoot }} | ||
| <i class="fa fa-copy text-muted p-1" role="button" data-bs-toggle="tooltip" title="Copy to clipboard" data-clipboard-text="0x{{ printf "%x" $proof.BlockRoot }}"></i> | ||
| </div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Proof Data Size">Proof Size:</span></div> | ||
| <div class="col-md-10"> | ||
| {{ len $proof.ProofData }} bytes | ||
| {{ if gt (len $proof.ProofData) 1024 }} | ||
| ({{ printf "%.2f" (div (len $proof.ProofData) 1024.0) }} KB) | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-2"><span data-bs-toggle="tooltip" data-bs-placement="top" title="Proof Data (truncated)">Proof Data:</span></div> | ||
| <div class="col-md-10 text-monospace" style="word-break: break-all;"> | ||
| {{ if gt (len $proof.ProofData) 128 }} | ||
| 0x{{ printf "%x" (slice $proof.ProofData 0 128) }}... | ||
| {{ else }} | ||
| 0x{{ printf "%x" $proof.ProofData }} | ||
| {{ end }} | ||
| <i class="fa fa-copy text-muted p-1" role="button" data-bs-toggle="tooltip" title="Copy to clipboard" data-clipboard-text="0x{{ printf "%x" $proof.ProofData }}"></i> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| {{ else }} | ||
| <div class="card my-2"> | ||
| <div class="card-body px-0 py-1"> | ||
| <div class="row border-bottom p-1 mx-0"> | ||
| <div class="col-md-12 text-center"> | ||
| <p class="text-muted my-3">No execution proofs available for this block.</p> | ||
| <p class="text-muted small">Execution proofs are cryptographic proofs that validate the execution payload was computed correctly by a specific zkVM+EL combination.</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| {{ end }} | ||
This file contains hidden or 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 file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,7 @@ type Config struct { | |
| Endpoint string `yaml:"endpoint" envconfig:"BEACONAPI_ENDPOINT"` | ||
| Endpoints []EndpointConfig `yaml:"endpoints"` | ||
| EndpointsURL string `yaml:"endpointsUrl" envconfig:"BEACONAPI_ENDPOINTS_URL"` | ||
| ClientIndex int `yaml:"clientIndex" envconfig:"BEACONAPI_CLIENT_INDEX"` | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hack that we use to fix the node we want to always connect to. Note: The alternative here would be to not put Dora in the kurtosis config and just running it separately connecting to the specific node we care about. |
||
|
|
||
| LocalCacheSize int `yaml:"localCacheSize" envconfig:"BEACONAPI_LOCAL_CACHE_SIZE"` | ||
| SkipFinalAssignments bool `yaml:"skipFinalAssignments" envconfig:"BEACONAPI_SKIP_FINAL_ASSIGNMENTS"` | ||
|
|
||
This file contains hidden or 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 file contains hidden or 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
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.
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.
These labels are hardcoded, but will be changed