-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update default vm rules #153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there dead code related to forks that can/should be removed.
eth-tester/eth_tester/backends/pyevm/main.py
Lines 263 to 293 in 722a3d3
FORK_NAME_MAPPING = { | |
FORK_HOMESTEAD: 'homestead', | |
FORK_TANGERINE_WHISTLE: 'tangerine-whistle', | |
FORK_SPURIOUS_DRAGON: 'spurious-dragon', | |
FORK_BYZANTIUM: 'byzantium', | |
} | |
def _mk_fork_configuration_params(fork_config): | |
all_block_numbers = tuple(fork_config.values()) | |
if len(all_block_numbers) != len(set(all_block_numbers)): | |
duplicates = tuple(sorted( | |
blk_num for blk_num, freq | |
in frequencies(all_block_numbers).items() | |
if freq > 1 | |
)) | |
raise ValueError("Duplicate block numbers: {0}".format(duplicates)) | |
args = { | |
(block_number, FORK_NAME_MAPPING[fork_name]) | |
for fork_name, block_number | |
in fork_config.items() | |
if (block_number is not None and fork_name != FORK_DAO) | |
} | |
if FORK_DAO in fork_config: | |
kwargs = {'dao_start_block': fork_config[FORK_DAO]} | |
else: | |
kwargs = {} | |
return args, kwargs |
Lines 64 to 67 in 1d13750
@to_dict | |
def get_default_fork_blocks(supported_forks): | |
for fork_name in supported_forks: | |
yield (fork_name, None) |
eth-tester/eth_tester/backends/pyevm/main.py
Lines 91 to 97 in 1d13750
SUPPORTED_FORKS = { | |
FORK_HOMESTEAD, | |
FORK_DAO, | |
FORK_SPURIOUS_DRAGON, | |
FORK_TANGERINE_WHISTLE, | |
FORK_BYZANTIUM, | |
} |
1d13750
to
bd329d0
Compare
bd329d0
to
5f3cfce
Compare
What was wrong?
eth-tester was pinned to use the Byzantium vm rules, which are not compatible with newer versions of solidity. Updated to use the Constantinople vm rules by default.
See this issue
Cute Animal Picture