Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix output of proposer slashing test fixture #1780

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions FixtureAll-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,22 @@ OK: 6/6 Fail: 0/6 Skip: 0/6
OK: 11/11 Fail: 0/11 Skip: 0/11
## Official - Operations - Proposer slashing [Preset: mainnet]
```diff
+ [Invalid] identifier OK
+ [Valid] identifier OK
+ [Invalid] epochs_are_different OK
+ [Invalid] headers_are_same_sigs_are_different OK
+ [Invalid] headers_are_same_sigs_are_same OK
+ [Invalid] invalid_different_proposer_indices OK
+ [Invalid] invalid_proposer_index OK
+ [Invalid] invalid_sig_1 OK
+ [Invalid] invalid_sig_1_and_2 OK
+ [Invalid] invalid_sig_1_and_2_swap OK
+ [Invalid] invalid_sig_2 OK
+ [Invalid] proposer_is_not_activated OK
+ [Invalid] proposer_is_slashed OK
+ [Invalid] proposer_is_withdrawn OK
+ [Valid] success OK
+ [Valid] success_slashed_and_proposer_index_the_same OK
```
OK: 2/2 Fail: 0/2 Skip: 0/2
OK: 14/14 Fail: 0/14 Skip: 0/14
## Official - Operations - Voluntary exit [Preset: mainnet]
```diff
+ [Invalid] invalid_signature OK
Expand Down Expand Up @@ -242,4 +254,4 @@ OK: 32/32 Fail: 0/32 Skip: 0/32
OK: 5/5 Fail: 0/5 Skip: 0/5

---TOTAL---
OK: 184/184 Fail: 0/184 Skip: 0/184
OK: 196/196 Fail: 0/196 Skip: 0/196
2 changes: 1 addition & 1 deletion beacon_chain/block_pools/chain_dag.nim
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func isAncestorOf*(a, b: BlockRef): bool =
b = b.parent

func get_ancestor*(blck: BlockRef, slot: Slot): BlockRef =
## https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/fork-choice.md#get_ancestor
## https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/specs/phase0/fork-choice.md#get_ancestor
## Return the most recent block as of the time at `slot` that not more recent
## than `blck` itself
doAssert not blck.isNil
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/ssz/merkleization.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# This module contains the parts necessary to create a merkle hash from the core
# SSZ types outlined in the spec:
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/ssz/simple-serialize.md#merkleization
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/ssz/simple-serialize.md#merkleization

{.push raises: [Defect].}

Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/ssz/ssz_serialization.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# {.push raises: [Defect].}
{.pragma: raisesssz, raises: [Defect, MalformedSszError, SszSizeMismatchError].}

## SSZ serialiazation for core SSZ types, as specified in:
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/ssz/simple-serialize.md#serialization
## SSZ serialization for core SSZ types, as specified in:
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/ssz/simple-serialize.md#serialization

import
typetraits, options,
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/time.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type
## which blocks are valid - in particular, blocks are not valid if they
## come from the future as seen from the local clock.
##
## https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/fork-choice.md#fork-choice
## https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/specs/phase0/fork-choice.md#fork-choice
##
# TODO replace time in chronos with a proper unit type, then this code can
# follow:
Expand Down
2 changes: 1 addition & 1 deletion docs/the_nimbus_book/src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Nimbus beacon chain is a research implementation of the Beacon Chain – the

- Open sourced at [github.com/status-im/nim-beacon-chain](https://github.com/status-im/nim-beacon-chain/tree/master)

- Specification described at [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs/tree/v0.12.2#phase-0)
- Specification described at [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs/tree/v0.12.3#phase-0)


### Helpful resources
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_ssz_fuzzing_test.nims
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import testutils/fuzzing_engines

const
gitRoot = thisDir() / ".."
fixturesDir = gitRoot / "vendor" / "nim-eth2-scenarios" / "tests-v0.12.2" / "mainnet" / "phase0" / "ssz_static"
fixturesDir = gitRoot / "vendor" / "nim-eth2-scenarios" / "tests-v0.12.3" / "mainnet" / "phase0" / "ssz_static"

fuzzingTestsDir = gitRoot / "tests" / "fuzzing"
fuzzingCorpusesDir = fuzzingTestsDir / "corpus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ proc runTest(identifier: string) =
else:
prefix = "[Invalid] "

timedTest prefix & astToStr(identifier):
timedTest prefix & identifier:
let proposerSlashing = parseTest(testDir/"proposer_slashing.ssz", SSZ, ProposerSlashing)
var preState = newClone(parseTest(testDir/"pre.ssz", SSZ, BeaconState))

Expand Down
2 changes: 1 addition & 1 deletion tests/official/test_fixture_rewards.nim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const
RewardsDirLeak = RewardsDirBase/"leak"/"pyspec_tests"
RewardsDirRandom = RewardsDirBase/"random"/"pyspec_tests"

# https://github.com/ethereum/eth2.0-specs/tree/v0.12.2/tests/formats/rewards#rewards-tests
# https://github.com/ethereum/eth2.0-specs/tree/v0.12.3/tests/formats/rewards#rewards-tests
type Deltas = object
rewards: List[uint64, Limit VALIDATOR_REGISTRY_LIMIT]
penalties: List[uint64, Limit VALIDATOR_REGISTRY_LIMIT]
Expand Down