Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Ganache and BuilderEVM use different gas #786

Closed
vporton opened this issue Sep 10, 2020 · 1 comment
Closed

Ganache and BuilderEVM use different gas #786

vporton opened this issue Sep 10, 2020 · 1 comment

Comments

@vporton
Copy link

vporton commented Sep 10, 2020

Ganache CLI v6.10.2 (ganache-core: 2.11.3) and Buidler EVM (1.4.4) produce different gasUsed for a contract call running under a controlled test environment where not if...else branch should behave differently.

It uses vporton/ubi-russia@d303600 for testing.

npx ganache-cli -d
$ npx buidler run scripts/estimate-gas.js --network ganache
All contracts have already been compiled, skipping compilation.
144378
78703
max gas for single account: 144378
227988
111638
max gas for 2 accounts: 227988
ethereum,0$ npx buidler run scripts/estimate-gas.js 
All contracts have already been compiled, skipping compilation.
144378
78703
max gas for single account: 144378
227976
111626
max gas for 2 accounts: 227976
@vporton
Copy link
Author

vporton commented Sep 10, 2020

Rinkeby produced the same results as Ganache. So, it is apparently is a Buidler bug.

@vporton vporton closed this as completed Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant