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_all_participants OK
|
||||||
+ [Invalid] invalid_signature_infinite_signature_with_single_participant OK
|
+ [Invalid] invalid_signature_infinite_signature_with_single_participant OK
|
||||||
+ [Invalid] invalid_signature_missing_participant OK
|
+ [Invalid] invalid_signature_missing_participant OK
|
||||||
|
+ [Invalid] invalid_signature_no_participants OK
|
||||||
+ [Invalid] invalid_signature_past_block OK
|
+ [Invalid] invalid_signature_past_block OK
|
||||||
+ [Invalid] invalid_slot_block_header OK
|
+ [Invalid] invalid_slot_block_header OK
|
||||||
+ [Invalid] mismatched_target_and_slot OK
|
+ [Invalid] mismatched_target_and_slot OK
|
||||||
@ -278,7 +279,7 @@ FixtureAll-mainnet
|
|||||||
+ fork_random_low_balances OK
|
+ fork_random_low_balances OK
|
||||||
+ fork_random_misc_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]
|
## Official - Altair - Epoch Processing - Effective balance updates [Preset: mainnet]
|
||||||
```diff
|
```diff
|
||||||
+ Effective balance updates - effective_balance_hysteresis [Preset: mainnet] OK
|
+ 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
|
OK: 27/27 Fail: 0/27 Skip: 0/27
|
||||||
|
|
||||||
---TOTAL---
|
---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),
|
attestations: List[Attestation, Limit MAX_ATTESTATIONS](attestations),
|
||||||
deposits: List[Deposit, Limit MAX_DEPOSITS](deposits),
|
deposits: List[Deposit, Limit MAX_DEPOSITS](deposits),
|
||||||
voluntary_exits:
|
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
|
# TODO sync committees
|
||||||
|
|
||||||
|
@ -425,6 +425,12 @@ proc process_sync_aggregate*(
|
|||||||
if aggregate.sync_committee_bits[i]:
|
if aggregate.sync_committee_bits[i]:
|
||||||
participant_pubkeys.add committee_pubkeys[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
|
# Empty participants allowed
|
||||||
if participant_pubkeys.len > 0 and not blsFastAggregateVerify(
|
if participant_pubkeys.len > 0 and not blsFastAggregateVerify(
|
||||||
participant_pubkeys, signing_root.data, aggregate.sync_committee_signature):
|
participant_pubkeys, signing_root.data, aggregate.sync_committee_signature):
|
||||||
|
@ -61,14 +61,11 @@ proc runTest(dir, identifier: string) =
|
|||||||
reportDiff(preState, postState)
|
reportDiff(preState, postState)
|
||||||
else:
|
else:
|
||||||
let done = process_sync_aggregate(preState[], syncAggregate, cache).isOk
|
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`()
|
`testImpl_sync_committee _ identifier`()
|
||||||
|
|
||||||
suite "Official - Altair - Operations - Sync Aggregate" & preset():
|
suite "Official - Altair - Operations - Sync Aggregate" & preset():
|
||||||
for kind, path in walkDir(
|
for kind, path in walkDir(
|
||||||
OpSyncAggregateDir, relative = true, checkDir = true):
|
OpSyncAggregateDir, relative = true, checkDir = true):
|
||||||
# TODO remove when it works
|
|
||||||
if path == "invalid_signature_no_participants":
|
|
||||||
continue
|
|
||||||
runTest(OpSyncAggregateDir, path)
|
runTest(OpSyncAggregateDir, path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user