Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
Add support for Muir Glacier fork
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Dec 19, 2019
1 parent 872c4d8 commit b5440f6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions newsfragments/1409.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade Py-EVM and add support for Muir Glacier fork
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
from setuptools import setup, find_packages

PYEVM_DEPENDENCY = "py-evm==0.3.0a11"
PYEVM_DEPENDENCY = "py-evm==0.3.0a12"


deps = {
Expand Down
2 changes: 2 additions & 0 deletions trinity/_utils/eip1085.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
ConstantinopleVM,
PetersburgVM,
IstanbulVM,
MuirGlacierVM,
)


Expand Down Expand Up @@ -178,6 +179,7 @@ def _filter_vm_config(vm_config: VMConfiguration) -> Iterable[VMFork]:
ConstantinopleVM,
PetersburgVM,
IstanbulVM,
MuirGlacierVM,
)


Expand Down
8 changes: 4 additions & 4 deletions trinity/components/builtin/tx_pool/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from async_service import run_asyncio_service
from eth_utils import ValidationError
from eth.chains.mainnet import PETERSBURG_MAINNET_BLOCK
from eth.chains.ropsten import PETERSBURG_ROPSTEN_BLOCK
from eth.chains.mainnet import ISTANBUL_MAINNET_BLOCK
from eth.chains.ropsten import ISTANBUL_ROPSTEN_BLOCK
from lahja import EndpointAPI

from trinity.boot_info import BootInfo
Expand Down Expand Up @@ -80,9 +80,9 @@ async def do_run(cls, boot_info: BootInfo, event_bus: EndpointAPI) -> None:
chain = chain_config.full_chain_class(db)

if boot_info.trinity_config.network_id == MAINNET_NETWORK_ID:
validator = DefaultTransactionValidator(chain, PETERSBURG_MAINNET_BLOCK)
validator = DefaultTransactionValidator(chain, ISTANBUL_MAINNET_BLOCK)
elif boot_info.trinity_config.network_id == ROPSTEN_NETWORK_ID:
validator = DefaultTransactionValidator(chain, PETERSBURG_ROPSTEN_BLOCK)
validator = DefaultTransactionValidator(chain, ISTANBUL_ROPSTEN_BLOCK)
else:
raise Exception("This code path should not be reachable")

Expand Down
4 changes: 2 additions & 2 deletions trinity/tools/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
)
from eth.constants import GENESIS_BLOCK_NUMBER
from eth.vm.forks.byzantium import ByzantiumVM
from eth.vm.forks.istanbul import IstanbulVM
from eth.vm.forks.muir_glacier import MuirGlacierVM

from trinity.chains.coro import AsyncChainMixin
from trinity.chains.full import FullChain
Expand All @@ -27,7 +27,7 @@ class LatestTestChain(FullChain):
A test chain that uses the most recent mainnet VM from block 0.
That means the VM will explicitly change when a new network upgrade is locked in.
"""
vm_configuration = ((GENESIS_BLOCK_NUMBER, IstanbulVM),)
vm_configuration = ((GENESIS_BLOCK_NUMBER, MuirGlacierVM),)
network_id = 999


Expand Down

0 comments on commit b5440f6

Please sign in to comment.