aboutsummaryrefslogtreecommitdiffstats
path: root/src/units.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-09 22:36:06 +0000
committertv <tv@krebsco.de>2026-11-12 00:52:20 +0100
commit10d73d81bb919d9d9d938f763c83b7c6761c69fa (patch)
tree8ecd418de23ddbae3cb3f41008508a71d69652de /src/units.rs
parent61cb117a9b230371d7be36a15a055972ec7de56e (diff)
signatures: check a bounded number of invalid received signatures
A sync message carries up to 65536 signatures (MAX_PER_MESSAGE), and the receiver checks, under the document's write lock, each one of a held change that would vouch for more of its actor's changes than the one before: about 30 µs each. A member sending that many signatures that don't verify cost the receiver about two seconds of writes per message. Signatures::offer and vouch_batch now stop checking after 64 found invalid (MAX_INVALID) and drop the rest unchecked, with a warning. A node forwards only signatures it verified, so an honest peer sends none. offer counts those a message brings apart from those that waited for their changes, which came from any peer. Signatures::vouch says which it found (Vouched): more vouched for, nothing more, or invalid.
Diffstat (limited to 'src/units.rs')
0 files changed, 0 insertions, 0 deletions