Repository navigation
Conversation
`SigSpacing` allow us to track sigExpiresAt per `key ~ PoolId`. A signature is refused if it's `sigExpiresAt` is too close to any other already accepted signature. That is for all `s` in the mempool we check that: ∀(s: sigPoolId s = sigPoolId candidate) |sigExpiresAt s - sigExpiresAt candidate| >= minSigDelay If a peer has a burst of signatures that are well-spaced, the other side will accept them (unless there was a conflicting signature in its mempool). Ill-spaced signatures are not accepted by the mempool with `SigTooFrequent` validation error. Connection is still preserved, since the upstream might not be at fault - this will be the case when a malicious peer is distributing conflicting signatures to different peers to weaken the connectivity. The spacing check runs now after crypto checks now, so the connection is still closed if any crypt checks didn't pass.
Use explicit pattern matches, rather than a catch all pattern. If we introduce another validation error, we're forced to think whether the node should drop the connection or not.
We might receive a signature produced with a smaller OCert counter if it was delayed on that path. The upstream peer might not be at fault here, so don't punish it for that by closing the connection. However, we now need to do the crypto checks before we check the OCert number, so if crypto is wrong the connection is shut down.
Writers sample UTC before entering STM and can commit out of order. Store the latest pruning time with the spacing history so an older sample cannot admit a signature that conflicts with a pruned expiry.
coot
force-pushed
the
coot/stacked-signatures
branch
from
November 27, 2026 09:09
c86eef4 to
6279001
Compare
Legacy nodes check signature spacing by receipt time and can disconnect
when catching up on signatures from one pool. On NodeToNodeV_{1,2}
connections, wait minSigDelay after the peer acknowledges a signature ID
before announcing the next ID from that pool.
Introduced NodeToNodeV_3 for unpaced announcements over SigSubmissionV2.
Upgraded nodes apply the same signature validation rules on all
versions.
A mainnet Mithril signer publishes roughly once every ten minutes, and
its DMQ messages expire after 30 minutes. With the default 60-second
delay and prompt acknowledgements, a peer can receive announcements
for three signatures from one pool in about two minutes.
coot
force-pushed
the
coot/stacked-signatures
branch
from
November 27, 2026 14:09
2f670b1 to
5d7900c
Compare
coot
force-pushed
the
coot/stacked-signatures
branch
from
November 27, 2026 19:16
5d7900c to
2e3b807
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
List of changes
Fixes #82
Checklist