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

ci: switch from ganache to anvil #3869

Merged
merged 1 commit into from
Apr 12, 2024
Merged

ci: switch from ganache to anvil #3869

merged 1 commit into from
Apr 12, 2024

Conversation

evan-gray
Copy link
Contributor

@evan-gray evan-gray commented Apr 4, 2024

This PR switches the devnet / ci EVM node from ganache to anvil. Notably, this had a couple impacts:

  • anvil is set to automine at 1s with block-time=1 so mine.js is no longer needed
  • anvil simulates 2 epoch finality (including safe and finalized tags), so waiting for finalized blocks is now required as needed. This is done with await ethProvider.send("anvil_mine", ["0x40"]);
    • Essentially this required mining 64 blocks before attempting to fetch and finalized "Eth" or "BSC" VAA
      image

While touching the CI tests for sdk/js, sdk/js-query, and accountant, I also took the opportunity to

  • switch to JsonRpcProvider to avoid worrying about calling .destroy()
  • suppress secp256k1 and bigint log messages
  • unify the testTimeout in the jest config instead of using jest.setTimeout everywhere
  • use the standard jest.config.json filename
  • clean up some frivolous logging
  • suppress guardian warning rollback detected in timestamp cache in unsafeDevMode as it gets triggered thousands of times when anvil_mine is used
  • remove --guardiand_loglevel=info from the workflow as it's no longer needed for debugging the noted issue

Bonus: All that cleanup means the Tilt CI logs are now ~8300 lines instead of > 10,000

@evan-gray evan-gray force-pushed the eth_anvil branch 5 times, most recently from d378f2f to 81164db Compare April 4, 2024 19:08
Base automatically changed from eth_move_relayer to main April 11, 2024 12:46
@evan-gray evan-gray force-pushed the eth_anvil branch 10 times, most recently from 0165f22 to 57557bb Compare April 11, 2024 20:19
@evan-gray evan-gray marked this pull request as ready for review April 11, 2024 21:20
Copy link
Contributor

@panoel panoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only inspected the files I am code owner on.

Copy link
Contributor

@kcsongor kcsongor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice 👍

@evan-gray evan-gray merged commit 77b4ddc into main Apr 12, 2024
24 checks passed
@evan-gray evan-gray deleted the eth_anvil branch April 12, 2024 14:13
@evan-gray evan-gray mentioned this pull request Apr 18, 2024
@evan-gray evan-gray mentioned this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants