Skip to content

Commit b6865d0

Browse files
authored
Merge pull request #1559 from carver/add-constantinople-fork
Add Constantinople mainnet fork block number
2 parents 082885a + ae7f0ae commit b6865d0

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

eth/chains/mainnet/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from .constants import (
1414
MAINNET_CHAIN_ID,
1515
BYZANTIUM_MAINNET_BLOCK,
16+
CONSTANTINOPLE_MAINNET_BLOCK,
1617
TANGERINE_WHISTLE_MAINNET_BLOCK,
1718
HOMESTEAD_MAINNET_BLOCK,
1819
SPURIOUS_DRAGON_MAINNET_BLOCK,
@@ -27,11 +28,12 @@
2728
from eth.rlp.headers import BlockHeader
2829
from eth.vm.base import BaseVM # noqa: F401
2930
from eth.vm.forks import (
30-
TangerineWhistleVM,
31+
ByzantiumVM,
32+
ConstantinopleVM,
3133
FrontierVM,
3234
HomesteadVM,
3335
SpuriousDragonVM,
34-
ByzantiumVM,
36+
TangerineWhistleVM,
3537
)
3638

3739

@@ -78,13 +80,15 @@ class MainnetHomesteadVM(MainnetDAOValidatorVM):
7880
TANGERINE_WHISTLE_MAINNET_BLOCK,
7981
SPURIOUS_DRAGON_MAINNET_BLOCK,
8082
BYZANTIUM_MAINNET_BLOCK,
83+
CONSTANTINOPLE_MAINNET_BLOCK,
8184
)
8285
MAINNET_VMS = (
8386
FrontierVM,
8487
MainnetHomesteadVM,
8588
TangerineWhistleVM,
8689
SpuriousDragonVM,
8790
ByzantiumVM,
91+
ConstantinopleVM,
8892
)
8993

9094
MAINNET_VM_CONFIGURATION = tuple(zip(MAINNET_FORK_BLOCKS, MAINNET_VMS))

eth/chains/mainnet/constants.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@
3737
# Byzantium Block
3838
#
3939
BYZANTIUM_MAINNET_BLOCK = BlockNumber(4370000)
40+
41+
#
42+
# Constantinople Block
43+
#
44+
CONSTANTINOPLE_MAINNET_BLOCK = BlockNumber(7080000)

tests/core/tester/test_generate_vm_configuration.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010

1111
class Forks(enum.Enum):
12+
Custom = -1
1213
Frontier = 0
1314
Homestead = 1
1415
TangerineWhistle = 2
1516
SpuriousDragon = 3
1617
Byzantium = 4
17-
Custom = 5
18+
Constantinople = 5
1819

1920

2021
class CustomFrontierVM(FrontierVM):
@@ -27,7 +28,7 @@ class CustomFrontierVM(FrontierVM):
2728
(
2829
tuple(),
2930
{},
30-
((0, Forks.Byzantium),),
31+
((0, Forks.Constantinople),),
3132
),
3233
(
3334
((0, 'tangerine-whistle'), (1, 'spurious-dragon')),
@@ -139,6 +140,8 @@ def test_generate_vm_configuration(args, kwargs, expected):
139140
assert 'SpuriousDragon' in left_vm.__name__
140141
elif right_vm == Forks.Byzantium:
141142
assert 'Byzantium' in left_vm.__name__
143+
elif right_vm == Forks.Constantinople:
144+
assert 'Constantinople' in left_vm.__name__
142145
elif right_vm == Forks.Custom:
143146
assert 'CustomFrontier' in left_vm.__name__
144147
else:

trinity/assets/eip1085/mainnet.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)