Cache and retransmit bls changes if submitted early#5031
Cache and retransmit bls changes if submitted early#5031
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
| 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.
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.
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.
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.
we can clean it post capella
There was a problem hiding this comment.
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.
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.
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.
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.