-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Cache and retransmit bls changes if submitted early #5031
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
@@ -33,6 +33,7 @@ export enum Bucket { | |||
phase0_proposerSlashing = 14, // ValidatorIndex -> ProposerSlashing | |||
phase0_attesterSlashing = 15, // Root -> AttesterSlashing | |||
capella_blsToExecutionChange = 16, // ValidatorIndex -> SignedBLSToExecutionChange | |||
capella_blsToExecutionChangeCache = 17, // ValidatorIndex -> SignedBLSToExecutionChange |
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.
You should be able to recycle the existing in-memory + DB pool. Why is this extra bucket required?
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.
umm i guess the current db pool before capella can be used as to recycle, i was going for caching any generic publishing errors but i guess its over kill
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 problem could be, once capella is hit, it would become unclear which ones are received from gossip and which ones have been submitted, as there is always a possibility of restarts while the gossip job is not complete, so would like to retain this as a separate repo
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 can clean it post capella
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 does not matter where an object is received. You persist to db changes that are still valid to be included in a block
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 problem could be, once capella is hit, it would become unclear which ones are received from gossip and which ones have been submitted
That's a fair point. However, it's not a consensus issue to re-broadcast other validator messages. After thinking about it I'm not opposed to mark those objects in some way as "submitted pre-capella"
if (chain.clock.currentEpoch >= chain.config.CAPELLA_FORK_EPOCH) { | ||
await network.gossip.publishBlsToExecutionChange(blsToExecutionChange); | ||
} else { | ||
await chain.cacheBlsToExecutionChanges(blsToExecutionChange); |
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 is it necessary to explicitly call this? chain.opPool.insertBlsToExecutionChange
should eventually write to DB on shutdown
this.cachedBlsChangesPromise = this.gossipCachedBlsChanges().then(() => { | ||
this.cachedBlsChangesPromise = null; | ||
}); | ||
} |
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.
Just move this code above under the // On fork transition
comment, with some retry in case there are no peers
closing in favor of #5049 |
A user (most likely ) is expected to start submitting bls to execution changes earlier than capella hf . This would result in gossip error as the topic is not yet been subscribed by peers.
This PR would cache the bls changes and e re-gossip if there is any gossip publishing error.