2.8 KiB
2.8 KiB
title | code_owner | round | category | repositories |
---|---|---|---|---|
State transition logic | (tersec) | Audit round 2 | ETH2 Specification Core Audit | nim-beacon-chain |
Annotated spec from Vitalik: https://github.com/ethereum/annotated-spec/blob/master/phase0/beacon-chain.md Annotated spec from Ben (from Consensys): https://benjaminion.xyz/eth2-annotated-spec/phase0/beacon-chain
Visual depiction: https://github.com/protolambda/eth2-docs#phase-0-beaconstate-transition
Implementation:
- block: https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/spec/state_transition_block.nim
- epoch: https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/spec/state_transition_epoch.nim
- High-level API: https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/spec/state_transition.nim and https://github.com/status-im/nim-beacon-chain/blob/master/beacon_chain/spec/state_transition_helpers.nim Implementation follows the spec closely with an additional caching mechanism that avoids recomputing epoch invariants.
Tests:
- Ethereum Foundation vectors are loaded here: https://github.com/status-im/nim-beacon-chain/tree/master/tests/official
- Self-tests were added for attestations, deposits and justification/finalization
Fuzzing via https://github.com/sigp/beacon-fuzz covers:
- attestation
- attester_slashing
- state transition for block
- deposit
- proposer slashing
- shuffling
- voluntary exit