mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
fix invalid_signature_no_participants test case (#2741)
This commit is contained in:
parent
4ba69bf54d
commit
5f3225c6e5
@ -135,6 +135,7 @@ FixtureAll-mainnet
|
||||
+ [Invalid] invalid_signature_infinite_signature_with_all_participants OK
|
||||
+ [Invalid] invalid_signature_infinite_signature_with_single_participant OK
|
||||
+ [Invalid] invalid_signature_missing_participant OK
|
||||
+ [Invalid] invalid_signature_no_participants OK
|
||||
+ [Invalid] invalid_signature_past_block OK
|
||||
+ [Invalid] invalid_slot_block_header OK
|
||||
+ [Invalid] mismatched_target_and_slot OK
|
||||
@ -278,7 +279,7 @@ FixtureAll-mainnet
|
||||
+ fork_random_low_balances OK
|
||||
+ fork_random_misc_balances OK
|
||||
```
|
||||
OK: 275/275 Fail: 0/275 Skip: 0/275
|
||||
OK: 276/276 Fail: 0/276 Skip: 0/276
|
||||
## Official - Altair - Epoch Processing - Effective balance updates [Preset: mainnet]
|
||||
```diff
|
||||
+ Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK
|
||||
@ -511,4 +512,4 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
|
||||
OK: 27/27 Fail: 0/27 Skip: 0/27
|
||||
|
||||
---TOTAL---
|
||||
OK: 421/421 Fail: 0/421 Skip: 0/421
|
||||
OK: 422/422 Fail: 0/422 Skip: 0/422
|
||||
|
@ -427,7 +427,9 @@ proc makeBeaconBlock*(
|
||||
attestations: List[Attestation, Limit MAX_ATTESTATIONS](attestations),
|
||||
deposits: List[Deposit, Limit MAX_DEPOSITS](deposits),
|
||||
voluntary_exits:
|
||||
List[SignedVoluntaryExit, Limit MAX_VOLUNTARY_EXITS](voluntaryExits)))
|
||||
List[SignedVoluntaryExit, Limit MAX_VOLUNTARY_EXITS](voluntaryExits),
|
||||
sync_aggregate: SyncAggregate(sync_committee_signature:
|
||||
default(CookedSig).toValidatorSig)))
|
||||
|
||||
# TODO sync committees
|
||||
|
||||
|
@ -425,6 +425,12 @@ proc process_sync_aggregate*(
|
||||
if aggregate.sync_committee_bits[i]:
|
||||
participant_pubkeys.add committee_pubkeys[i]
|
||||
|
||||
# p2p-interface message validators check for empty sync committees, so it
|
||||
# shouldn't run except as part of test suite.
|
||||
if participant_pubkeys.len == 0 and
|
||||
aggregate.sync_committee_signature != default(CookedSig).toValidatorSig():
|
||||
return err("process_sync_aggregate: empty sync aggregates need signature of point at infinity")
|
||||
|
||||
# Empty participants allowed
|
||||
if participant_pubkeys.len > 0 and not blsFastAggregateVerify(
|
||||
participant_pubkeys, signing_root.data, aggregate.sync_committee_signature):
|
||||
|
@ -61,14 +61,11 @@ proc runTest(dir, identifier: string) =
|
||||
reportDiff(preState, postState)
|
||||
else:
|
||||
let done = process_sync_aggregate(preState[], syncAggregate, cache).isOk
|
||||
doAssert done == false, "We didn't expect this invalid proposer slashing to be processed."
|
||||
doAssert done == false, "We didn't expect this invalid sync aggregate to be processed."
|
||||
|
||||
`testImpl_sync_committee _ identifier`()
|
||||
|
||||
suite "Official - Altair - Operations - Sync Aggregate" & preset():
|
||||
for kind, path in walkDir(
|
||||
OpSyncAggregateDir, relative = true, checkDir = true):
|
||||
# TODO remove when it works
|
||||
if path == "invalid_signature_no_participants":
|
||||
continue
|
||||
runTest(OpSyncAggregateDir, path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user