-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat: implement EIP-7691 increase blob throughput #7309
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devnet-5 #7309 +/- ##
============================================
- Coverage 48.61% 48.60% -0.02%
============================================
Files 603 603
Lines 40457 40513 +56
Branches 2065 2065
============================================
+ Hits 19667 19690 +23
- Misses 20752 20785 +33
Partials 38 38 |
Please ignore E2E Tests and spec tests as they will be addressed in the next PR. |
this.sendReqRespRequest( | ||
peerId, | ||
ReqRespMethod.BlobSidecarsByRoot, | ||
[isForkPostElectra(fork) ? Version.V2 : Version.V1], |
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.
whats different in 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.
Max size of the param in V1 is MAX_REQUEST_BLOB_SIDECARS
(768) , V2 is MAX_REQUEST_BLOB_SIDECARS_ELECTRA
(1152)
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.
there is some discussion around this on discord, we might get rid of v2 again in a future spec release
@@ -207,7 +207,8 @@ export class ReqRespBeaconNode extends ReqResp { | |||
versions: number[], | |||
request: Req | |||
): AsyncIterable<ResponseIncoming> { | |||
const requestType = requestSszTypeByMethod(this.config)[method]; | |||
const fork = ForkName[ForkSeq[this.currentRegisteredFork] as keyof typeof ForkName]; | |||
const requestType = requestSszTypeByMethod(this.config, fork)[method]; |
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.
we need this for v1/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.
Yes, request type for BlobSidecarsByRootV2 has changed. But ReqRespMethod
does not communicate version info, so we can only pass in fork info to determine the correct type.
@@ -38,7 +39,8 @@ export function getReqRespHandlers({db, chain}: {db: IBeaconDb; chain: IBeaconCh | |||
return onBeaconBlocksByRoot(body, chain, db); | |||
}, | |||
[ReqRespMethod.BlobSidecarsByRoot]: (req) => { | |||
const body = BlobSidecarsByRootRequestType(chain.config).deserialize(req.data); | |||
const fork = req.version === Version.V2 ? ForkName.electra : ForkName.deneb; | |||
const body = BlobSidecarsByRootRequestType(fork, chain.config).deserialize(req.data); |
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.
wouldn't type be the same just that v2 will have context bytes/fork type?
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.
V2 accepts higher number of blob requests so the ssz container is different.
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.
LGTM - we might have to remove req/resp v2 methods again in the future but as it's part of the spec for devnet-5 we should probably keep it for now as other clients might rely on it
MAX_BLOB_COMMITMENTS_PER_BLOCK: 16, | ||
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 9, | ||
MAX_BLOB_COMMITMENTS_PER_BLOCK: 32, | ||
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: 10, |
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.
It looks like there is a consensus issue with Lighthouse in our sim tests due to this, need to use a image with the updated minimal preset values. Should not be a blocker to merge this but should figure out a solution (ie. updating LH image) before we merge the devnet-5 branch to unstable
Looks like removing v2 might be happening in devnet 5. Decision will be made in ACD this week. Will make another PR to remove them if included in devnet 5 |
Implement EIP-7691.
Outstanding items that is not covered in this PR:
requestSszTypeByMethod
to provide fork infoInboundRateLimitQuota
fork-aware sobyPeer
limit can be correctly set forBlobSidecarsByRange
andBlobSidecarsByRoot
.ReqRespRateLimiter
to re-set the rate limit on fork activation