Commit ebf803e
committed
lstar: skip trivial 1-raw-sig + 0-children case in aggregate()
Extend the early-skip predicate in `aggregate()` so an `AttestationData`
with exactly one raw gossip sig and no child proofs is not aggregated.
Why:
- A 1-validator "aggregate" carries no information the raw gossip sig
doesn't already carry. The sig is on the per-subnet
`attestation_signatures` gossip topic at sign time, so any peer
aggregator can fold it in as a raw entry next round.
- The recursive STARK prover (`xmss/aggregation.py:aggregate`) is
roughly constant-cost in input size — building a 1-validator proof
costs the same as building a 32-validator one. On the multi-client
devnet this caused two zeam aggregators to spend ~10.8 s of FFI per
worker run on a single-validator proof, dropping ~50% of slot
triggers as `in_flight`. See blockblaz/zeam#907.
The unconsumed gossip sig is preserved in `store.attestation_signatures`
by the existing bookkeeping (only sigs whose `att_data` produced an
aggregate are pruned), so a future round folds it in once another sig
or a child shows up.
Test changes:
- Add `test_aggregate_skips_single_gossip_sig_with_no_children` covering
the new skip case and asserting the sig survives in the store.
- Update `test_multiple_attestation_data_grouped_separately` to seed
two raw sigs per `att_data`. The original test put one sig per
data, which is now (correctly) the trivial case that does not
produce a proof; the test's intent — that two distinct
`AttestationData` produce two distinct proofs — is preserved by
upgrading both groups to non-trivial inputs.
Closes #7471 parent 825bec6 commit ebf803e
3 files changed
Lines changed: 82 additions & 8 deletions
File tree
- src/lean_spec/forks/lstar
- tests/lean_spec/forks/lstar
- forkchoice
- state
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1676 | 1676 | | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | | - | |
1680 | | - | |
| 1679 | + | |
1681 | 1680 | | |
1682 | | - | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1683 | 1701 | | |
1684 | 1702 | | |
1685 | 1703 | | |
| |||
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
598 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
599 | 602 | | |
600 | | - | |
601 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
602 | 623 | | |
603 | 624 | | |
604 | 625 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
144 | 179 | | |
145 | 180 | | |
146 | 181 | | |
| |||
0 commit comments