From fdb6f158676585d5b10944b62f8eb8bc4daa7784 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sat, 13 Jun 2020 15:59:04 -0500 Subject: [PATCH] unhandled exceptions do not modify forkchoice store --- specs/phase0/fork-choice.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specs/phase0/fork-choice.md b/specs/phase0/fork-choice.md index 95142f80c..ecbabc6f6 100644 --- a/specs/phase0/fork-choice.md +++ b/specs/phase0/fork-choice.md @@ -44,9 +44,11 @@ This document is the beacon chain fork choice spec, part of Ethereum 2.0 Phase 0 The head block root associated with a `store` is defined as `get_head(store)`. At genesis, let `store = get_forkchoice_store(genesis_state)` and update `store` by running: -- `on_tick(time)` whenever `time > store.time` where `time` is the current Unix time -- `on_block(block)` whenever a block `block: SignedBeaconBlock` is received -- `on_attestation(attestation)` whenever an attestation `attestation` is received +- `on_tick(store, time)` whenever `time > store.time` where `time` is the current Unix time +- `on_block(store, block)` whenever a block `block: SignedBeaconBlock` is received +- `on_attestation(store, attestation)` whenever an attestation `attestation` is received + +Any of the above handlers that trigger an unhandled exception (e.g. a failed assert or an out-of-range list access) are considered invalid. Invalid calls to handlers must not modify `store`. *Notes*: