-
Notifications
You must be signed in to change notification settings - Fork 691
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
ethereum: rm truffle #4070
ethereum: rm truffle #4070
Conversation
a4ed7d0
to
0a50809
Compare
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.
I didn't look at the forge tests or scripts.
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.
I reviewed the ethereum
directory. The tests in this PR are meant to replicate the existing javascript tests. However, these tests need a lot of work and there should be a follow up PR that fixes these tests (and adds a more comprehensive test suite). Here is a short list of enhancements we could add to improve the test suite:
- Splitting out tests into positive and negative tests. Currently a lot of the revert statements are triggered in the same test that evaluate happy path logic.
- Changing the test names (and add a comment for each test describing what the test does). Some of the test names are insanely long and are difficult to read.
- Adding helper functions for payload generation. For example, the
Bridge
tests could use a method that generates a token transfer payload given some common inputs. - Write helper functions to set up certain testing scenarios rather than calling other tests internally.
- Use the wormhole interfaces in the tests instead of duplicating events, and constants.
- Fuzz testing
I'm late to this, but given that truffle has been removed, could we now merge the relayer back into the Ethereum folder? (see original PR why it was moved out) |
This PR fixes #4069, removing the remaining CI dependencies on truffle and porting the remaining tests from jest to forge (borrowed from #3395).
This also offers some modest speed improvements such as faster
npm ci
and anethereum-upgrade
test runtime of 4m 22s instead of 7m 20s. 😀Note: This change explicitly does not remove the
remappings
line for'truffle/=node_modules/truffle/',
as that, irritatingly, resulted in a hash change in the byte code. Actually had to add it back into the relayer one. Just like #4049, this can be verified by building locally (ensure you are onforge 0.2.0 (55bf415 2024-08-04T00:22:40.167411524Z)
) or by exec'ing intoeth-devnet-0:tests
and diffing the following, where only test files should have changed: