-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
test: remove defaultGanacheOptions
#30728
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [6fc55bf]
Page Load Metrics (1880 ± 85 ms)
Bundle size diffs
|
accounts: [ | ||
{ | ||
secretKey: PRIVATE_KEY, | ||
balance: convertETHToHexGwei(DEFAULT_GANACHE_ETH_BALANCE_DEC), |
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.
this is '25ETH' to the account corresponding to the default SRP (both ganache and anvil), so it can be removed, as it's in the node class level, and adding this to a spec has no effect
accounts: [ | ||
{ | ||
secretKey: defaultGanacheOptions.accounts[0].secretKey, | ||
balance: initialBalanceInHex, |
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.
no reason at all to start with a random balance, as this is not checked in the test, which we just check metric related topics, so we can remove it safely
LGTM ! |
const defaultGanacheOptionsForType2Transactions = { | ||
...defaultGanacheOptions, | ||
// EVM version that supports type 2 transactions (EIP1559) | ||
hardfork: 'london', |
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.
Nit: You might be able to remove this one as well right now. The default hardfork in ganache already supports type2 transactions.
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.
good observation !! So at the time the Ganache class was defined, it was set as hardfork: 'muirGlacier',
as default, so the majority of specs are using that, unless specifically passing the london flag. In Anvil I also set the same hardfork as default, as several of specs were breaking otherwise, as were relying to type 1 (gas checks and conf screen). We could change that and use london as default in the class, as I guess most of the cases should use type 2 now, so it makes more sense.
I'll take a note on that, if that make sense I can update it in a separate PR, as this change might need some other spec tweaks? I'll wait on your feedback, thank you in advance 🙏
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.
ℹ️ Added a task here for me to address this next: https://github.com/MetaMask/MetaMask-planning/issues/4368
Builds ready [a0e8022]
Page Load Metrics (1745 ± 73 ms)
Bundle size diffs
|
Description
In this PR we remove the
defaultGanacheOptions
variable from all specs. 2 reasons:Note: skip-e2e-quality-gate is added because we modify several spec files, which can take long to run, reaching timeout as they'll all be rerun + 5 times extra, but there should be no functional change, so e2e should continue to work as before
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4348
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist