Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

evm_revert regression #4093

Closed
Closed
@brendene

Description

@brendene

On the latest stable release: ganache v7.7.2 (@ganache/cli: 0.8.1, @ganache/core: 0.8.1)
The last version that doesn't have the issue is 7.6.0. 7.7.0 and 7.7.2 exhibit the issue detailed below.

I am having a hard time creating a self contained repro but the issue is reliably reproduced.

ganache is launched with: ganache-cli --chain.vmErrorsOnRPCResponse true --fork.url <LOCAL INSTANCE> --fork.blockNumber 16257210 --miner.blockTime 3600 --chain.chainId 1 -v --miner.timestampIncrement 12 --wallet.deterministic --logging.debug

The miner.blockTime is set very high so that I can manually mine using evm_mine

The gist of the application flow is:

send transactions
evm_mine
send transactions
evm_mine
evm_snapshot # SNAPSHOT1
send transactions
evm_mine
evm_snapshot # SNAPSHOT2
send transactions
evm_mine
evm_revert back to #SNAPSHOT2 (this succeeds)
send transactions
evm_mine
evm_revert back to #SNAPSHOT1 (this fails)

There are no logs in from ganache, only 'Reverting to snapshot #1'
But the json response from ganache is:

{'id': 101, 'jsonrpc': '2.0', 'error': {'message': '.for is not iterable', 'stack': 'TypeError: .for is not iterable\n at ForkTrie.revertMetaData (/usr/local/lib/node_modules/ganache/dist/node/1.js:2:143320)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Blockchain.<anonymous> (/usr/local/lib/node_modules/ganache/dist/node/1.js:2:63016)\n at async Blockchain.revert (/usr/local/lib/node_modules/ganache/dist/node/1.js:2:70613)', 'code': -32700}}

And after querying for the current block, as expected the evm did not revert.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions