-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add Blob column to website #576
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #576 +/- ##
==========================================
- Coverage 36.49% 36.22% -0.27%
==========================================
Files 24 24
Lines 5237 5267 +30
==========================================
- Hits 1911 1908 -3
- Misses 3073 3112 +39
+ Partials 253 247 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
V cool! Please rebase. Wonder if we should slim down the column title from "Num blobs" to only "Blobs". I think yes. |
de1c5e7
to
5590172
Compare
replace website etherscan url with svg
@@ -326,25 +326,93 @@ func (b *BidTraceV2WithTimestampJSON) ToCSVRecord() []string { | |||
} | |||
} | |||
|
|||
type BidTraceV2WithBlobFields struct { | |||
builderApiV1.BidTrace |
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.
could extend V2
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.
This would expose the blob data to the data api as it uses the same json structs
ExcessBlobGas uint64 `json:"excess_blob_gas,string"` | ||
} | ||
|
||
func (b BidTraceV2WithBlobFields) MarshalJSON() ([]byte, error) { |
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.
why does it need custom marshal and unmarshal functions?
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 bid trace is an embedded struct and json.Marshal does not marshal properly for embedded structs.
type BlockSubmissionInfo struct { | ||
BidTrace *builderApiV1.BidTrace | ||
Slot uint64 |
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.
why remove this and other info fields?
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.
oh i see, because it's already inside BidTrace
ExecutionPayloadBlockHash phase0.Hash32 | ||
ExecutionPayloadParentHash phase0.Hash32 | ||
Builder phase0.BLSPubKey | ||
Proposer phase0.BLSPubKey | ||
ProposerFeeRecipient bellatrix.ExecutionAddress | ||
GasUsed uint64 |
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.
GasUsed and GasLimnit is also part of BidTrace
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 fields are using the gas used and gas limit from the execution payload
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 work! left a few questions, overall lgtm!
📝 Summary
Adds a blob column to the website to show the number of blobs in the block. On hover will also indicate the amount of blob gas used. Also some refactoring of the block validation json marshalling.
Deployed on goerli.
⛱ Motivation and Context
Allows easy monitoring of blobs in blocks.
📚 References
See also flashbots/relay-specs#31 for exposing the same data on the data API. These changes will allow the same information easily exposed to the data API.
✅ I have run these commands
make lint
make test-race
go mod tidy
CONTRIBUTING.md