Commit 1937162
test: add test vector for block production with merging aggregates (leanEthereum#897)
* test(consensus): cover in-block recursive merge of overlapping pool proofs
The block builder's collapse-by-data branch in build_block merges
multiple single-message aggregates for the same AttestationData via
SingleMessageAggregate.aggregate(children=..., raw_xmss=[]). This is
the only proposal-time path that constructs a recursive single-message
aggregate, and no existing fork-choice vector reached it because the
local aggregator absorbs same-data proofs before block build time.
Gossiping two aggregated proofs with overlapping participant sets at
slot 2 interval 3 (past the aggregate phase) bypasses the local
aggregator, so both proofs migrate side by side into the known pool at
slot 2 interval 4. The greedy picker takes both because the second
still adds one uncovered validator on top of the first, exercising
the merge branch on overlapping children rather than the unrealistic
fully disjoint shape.
* address comments
* fix lint
* test(consensus): tighten head assertion and docstring for recursive-fold vector
Assert head identity (head_root_label) alongside head_slot so the Then
"head is block_2" claim is verified by root, not just slot.
Docstring: split the phase-glossing parenthetical and the two-fact head
bullet into one-fact-per-line bullets, and drop the Given gossip bullet
that duplicated the Timing section, per the consensus test-vector
documentation standard.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Thomas Coratger <60488569+tcoratger@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e751986 commit 1937162
1 file changed
Lines changed: 90 additions & 3 deletions
Lines changed: 90 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 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 | + | |
86 | 173 | | |
87 | 174 | | |
88 | 175 | | |
| |||
0 commit comments