feat: produce proposer slashings from observed equivocations - #9787
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Performance Report鉁旓笍 no performance regression detected Full benchmark results
|
| this.emitter.emit(routes.events.EventType.proposerSlashing, proposerSlashing); | ||
| this.emitter.emit(ChainEvent.publishProposerSlashing, proposerSlashing); | ||
| this.metrics?.opPool.proposerSlashingsProduced.inc(); | ||
| this.logger.info("Produced proposer slashing from observed equivocation", {slot: blockSlot, proposerIndex}); |
There was a problem hiding this comment.
could consider using verbose here, but this is a really rare event anyways
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
) Follow-up to #9787 that adds a debug log when proposer slashing production is skipped because a slashing for the proposer is already known Without this the skip is silent and it is not possible to tell from logs whether a node observed an equivocation and lost the production race to another node or never detected it at all
| return; | ||
| } | ||
|
|
||
| this.producingProposerSlashing.add(proposerIndex); |
There was a problem hiding this comment.
would be great to log header roots here
There was a problem hiding this comment.
| // Only produce a slashing while importing the block. A block that is verified before it is published | ||
| // must not be treated as equivocation evidence since it may never be seen by the network | ||
| if (opts.verifyOnly !== true && this.seenBlockProposers.isEquivocating(slot, proposerIndex)) { | ||
| this.processProposerEquivocation(slot, proposerIndex); |
There was a problem hiding this comment.
wrap in callInNextEventLoop()?
this feels like a follow up task, not the main thing of this verifyBlock flow
There was a problem hiding this comment.
yeah this might be good, I don't think it's a lot of work to create the slashing but it doesn't need to be produced timely at all, ideally the next proposer receives it in-time but that should be the case most of the time, wrapped inside of callInNextEventLoop() in #9795
Follow-up to #9757 and #9787 based on @twoeths' comments - remove `skipVerifyBlockSignatures` and always verify block signatures - reuse the block input root when recording observed proposals - defer proposer slashing production to the next event loop - log both conflicting block header roots - clarify the equivocation root-count constant name
|
馃帀 This PR is included in v1.46.0 馃帀 |
Follow-up to #9757 that produces proposer slashings from observed proposer equivocations
Verified on glamsterdam-devnet-7, a slashing was produced and broadcast 137ms after an adversarial equivocation was published and the validator got slashed