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

Node/Hack: Add tool to test go-ethereum subscriptions #4214

Conversation

bruce-riley
Copy link
Contributor

@bruce-riley bruce-riley commented Jan 10, 2025

This PR creates a tool to test that go-ethereum subscriptions work for a given endpoint. This can be used to verify a new chain before adding guardian support.

This PR was originally created to facilitate testing of any changes made to address this SeiEVM issue. It uses the go-ethereum library to subscribe for log events from the wormhole core contract and just logs them out.

To run the app for SeiEVM:

$ git clone -b node/hack_seievm_test_app https://github.com/wormholelabs-xyz/wormhole
$ cd wormhole/node/hack/evm_test
$ go run wstest.go --rpc wss://evm-ws-testnet.sei-apis.com --contract 0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd

To generate an event from the core contract:

$ cast send --rpc-url https://evm-rpc-testnet.sei-apis.com/ --private-key $YOUR_WALLET_KEY 0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd "publishMessage(uint32,bytes,uint8)" 43 0xdeadbeef 202

Using the current testnet public RPC, this does not see events. If you use the evm proxy instead, it does see events.

Ideally, this should see new events generated using the testnet public RPC. (Note that it should not see historical events.)

@bruce-riley bruce-riley force-pushed the node/hack_seievm_test_app branch from 31d16c0 to e64d85d Compare January 27, 2025 16:06
@bruce-riley bruce-riley changed the title Node/Hack: SeiEVM watcher test app Node/Hack: Add tool to test go-ethereum subscriptions Jan 27, 2025
@bruce-riley bruce-riley marked this pull request as ready for review January 27, 2025 16:10
Copy link
Contributor

@evan-gray evan-gray left a comment

Choose a reason for hiding this comment

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

looks helpful and hack folder appropriate

@bruce-riley bruce-riley merged commit 7d008ed into wormhole-foundation:main Jan 27, 2025
29 checks passed
@bruce-riley bruce-riley deleted the node/hack_seievm_test_app branch January 27, 2025 19:03
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.

3 participants