Skip to content

Commit

Permalink
Change mainnet TERMINAL_TOTAL_DIFFICULTY placeholder to `2**256-2**…
Browse files Browse the repository at this point in the history
…10` to avoid overflow
  • Loading branch information
hwwhww committed Sep 27, 2021
1 parent 5ab2824 commit ef51e1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ PRESET_BASE: 'mainnet'

# Transition
# ---------------------------------------------------------------
# TBD, 2**256-1 is a placeholder
TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129639935
# TBD, 2**256-2**10 is a placeholder
TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638912


# Genesis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from eth2spec.utils.ssz.ssz_typing import uint256
from eth2spec.test.exceptions import BlockNotFoundException
from eth2spec.test.context import spec_state_test, with_phases, with_presets, MERGE, MINIMAL
from eth2spec.test.context import spec_state_test, with_phases, MERGE
from eth2spec.test.helpers.block import (
build_empty_block_for_next_slot,
)
Expand Down Expand Up @@ -46,7 +46,6 @@ def wrap(flag: AtomicBoolean):


@with_phases([MERGE])
@with_presets([MINIMAL], reason="mainnet `TERMINAL_TOTAL_DIFFICULTY` stub would cause overflow")
@spec_state_test
def test_all_valid(spec, state):
test_steps = []
Expand Down Expand Up @@ -81,7 +80,6 @@ def run_func():


@with_phases([MERGE])
@with_presets([MINIMAL], reason="mainnet `TERMINAL_TOTAL_DIFFICULTY` stub would cause overflow")
@spec_state_test
def test_block_lookup_failed(spec, state):
test_steps = []
Expand Down Expand Up @@ -112,7 +110,6 @@ def run_func():


@with_phases([MERGE])
@with_presets([MINIMAL], reason="mainnet `TERMINAL_TOTAL_DIFFICULTY` stub would cause overflow")
@spec_state_test
def test_too_early_for_merge(spec, state):
test_steps = []
Expand Down Expand Up @@ -145,7 +142,6 @@ def run_func():


@with_phases([MERGE])
@with_presets([MINIMAL], reason="mainnet `TERMINAL_TOTAL_DIFFICULTY` stub would cause overflow")
@spec_state_test
def test_too_late_for_merge(spec, state):
test_steps = []
Expand Down

0 comments on commit ef51e1c

Please sign in to comment.