Skip to content
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

Upgrade ganache in docker images to the latest version #127

Closed
wwestgarth opened this issue Mar 20, 2024 · 1 comment
Closed

Upgrade ganache in docker images to the latest version #127

wwestgarth opened this issue Mar 20, 2024 · 1 comment
Assignees
Labels

Comments

@wwestgarth
Copy link
Contributor

This ticket:
vegaprotocol/vega#10954

requires us to make calls into Ethereum to determine the last finalized block on the chain. This is not supported in the version of ganache we currently use in our system tests. We need to upgrade to the latest version.

It looks like this work has been started:
#99

@gordsport gordsport moved this to In Progress in Core Kanban Mar 21, 2024
@wwestgarth wwestgarth self-assigned this Mar 26, 2024
@wwestgarth
Copy link
Contributor Author

wwestgarth commented Mar 28, 2024

This has turned out to be a real pain.

The version that contains support for eth_blockByNumber("finalized") is v.7.7.0.

Any newer build causes segfaults on arm64: trufflesuite/ganache#4300

BUT v.7.7.0 has a bug in it which causes it to crash out during out system test runs:

eth_estimateGas
TypeError: Cannot read properties of undefined (reading 'gasEstimate')
    at /app/node_modules/ganache/dist/node/1.js:2:43466
    at /app/node_modules/ganache/dist/node/1.js:2:148181
    at exactimate (/app/node_modules/ganache/dist/node/1.js:2:147250)

This was fixed in ganache v7.7.2: trufflesuite/ganache#4056

BUT then that version causes the above segfault on macs!

So the conclusion is that given the way we currently build out ganache-docker image there is no version that will work with the system test that does not seg-fault on arm64.

The solution in trufflesuite/ganache#4300 (comment) suggests basing our image off their published image. Their image with the latest ganache does work on arm64, but using it would involve reworking how we build our image with the pre-deployed smart-contracts in them.

Its a tangle.

@github-project-automation github-project-automation bot moved this from In Progress to Merged in Core Kanban Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants