Skip to content

Add Blob column to website#576

Merged
avalonche merged 6 commits into
mainfrom
deneb-website-blobs
Feb 1, 2024
Merged

Add Blob column to website#576
avalonche merged 6 commits into
mainfrom
deneb-website-blobs

Conversation

@avalonche
Copy link
Copy Markdown
Collaborator

📝 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.

Screenshot 2024-01-30 at 4 13 07 pm

⛱ 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
  • I have seen and agree to CONTRIBUTING.md

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 30, 2024

Codecov Report

❌ Patch coverage is 47.33728% with 89 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.22%. Comparing base (72fab1a) to head (52e5094).
⚠️ Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
common/types.go 0.00% 42 Missing ⚠️
common/types_spec.go 0.00% 20 Missing ⚠️
database/database.go 65.38% 9 Missing ⚠️
common/utils.go 61.53% 4 Missing and 1 partial ⚠️
services/api/service.go 90.24% 2 Missing and 2 partials ⚠️
database/mockdb.go 0.00% 3 Missing ⚠️
datastore/redis.go 88.23% 2 Missing ⚠️
services/api/utils.go 0.00% 0 Missing and 2 partials ⚠️
common/test_utils.go 0.00% 1 Missing ⚠️
services/api/blocksim_ratelimiter.go 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 36.22% <47.33%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from deneb to main January 30, 2024 18:14
@metachris
Copy link
Copy Markdown
Collaborator

V cool! Please rebase.

Wonder if we should slim down the column title from "Num blobs" to only "Blobs". I think yes.

@avalonche avalonche force-pushed the deneb-website-blobs branch from de1c5e7 to 5590172 Compare January 30, 2024 21:13
replace website etherscan url with svg
Comment thread common/types.go
}

type BidTraceV2WithBlobFields struct {
builderApiV1.BidTrace
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could extend V2

Copy link
Copy Markdown
Collaborator Author

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

Comment thread common/types.go
ExcessBlobGas uint64 `json:"excess_blob_gas,string"`
}

func (b BidTraceV2WithBlobFields) MarshalJSON() ([]byte, error) {
Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Collaborator Author

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.

Comment thread common/types.go

type BlockSubmissionInfo struct {
BidTrace *builderApiV1.BidTrace
Slot uint64
Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Collaborator

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

Comment thread common/types.go
Builder phase0.BLSPubKey
Proposer phase0.BLSPubKey
ProposerFeeRecipient bellatrix.ExecutionAddress
GasUsed uint64
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Collaborator

@metachris metachris left a 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!

@avalonche avalonche merged commit d8a0d7b into main Feb 1, 2024
@avalonche avalonche deleted the deneb-website-blobs branch February 1, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants