eth-tester icon indicating copy to clipboard operation
eth-tester copied to clipboard

py-evm backend ignores fork setup

Open carver opened this issue 7 years ago • 5 comments

What was wrong?

As of alpha 26, there is no clean way to define the VM configuration at runtime. MainnetTesterChain.configure_forks is broken: it sets the configuration on the vm instance, and then get_vm_class_for_block_number ignores vm_configuration on the instance, using the class's vm_configuration instead.

How can it be fixed?

No one noticed that fork choice stuff isn't working. Maybe just neuter the API to officially make it do nothing, and we can re-add the functionality when it's requested.

Also, probably remove MainnetTesterChain.configure_forks from py-evm since it's described as "footgun" and isn't working anyway.

carver avatar Jun 12 '18 00:06 carver

footgun-01

pipermerriam avatar Jun 12 '18 15:06 pipermerriam

I was going to leave a feature request to be able to configure the VM class (not suggesting to allow multiple, just define at genesis), but it sounds like based on your original comment that this was not intended to work? I think it would be a nice feature to have for working with applications deployed with legacy VM rules e.g. ETC or just any dapp deployed before a major fork that has continuous testing.

fubuloubu avatar Oct 23 '19 15:10 fubuloubu

I think the most straightforward thing to do (and the ultimate plan) would be to support configuration via genesis json. That option wasn't available before, and now all it needs is for the utility to move from trinity to py-evm

carver avatar Oct 23 '19 18:10 carver

That sounds perfect. I think any use case that needs to use multiple VM versions can just run their test suite under different genesis configurations

fubuloubu avatar Oct 23 '19 19:10 fubuloubu

To give an example, Vyper may end up supporting 1-3 EVM versions at some point, so our test suite would need to be run under different configurations, but we still wouldn't test upgrades because that would be too complex.

fubuloubu avatar Oct 23 '19 19:10 fubuloubu