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

add example for comparing subscriptions from different providers #148

Merged
merged 8 commits into from
Oct 9, 2024

Conversation

0xlosh
Copy link
Contributor

@0xlosh 0xlosh commented Oct 4, 2024

Closes: #146

added new_heads to compare, simply run cargo run --example new_heads -- -r reth:ws://localhost:8546 -r alchemy:xxx -r other_provider:other_url -r ... to start

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

tysm, this looks pretty good, only have some nits

examples/comparison/examples/new_heads.rs Outdated Show resolved Hide resolved
examples/comparison/examples/new_heads.rs Outdated Show resolved Hide resolved
@mattsse mattsse marked this pull request as ready for review October 4, 2024 15:33
@0xlosh
Copy link
Contributor Author

0xlosh commented Oct 5, 2024

tysm, this looks pretty good, only have some nits

will edit tmw and add pending_txs too, im not sure what gakonst meant when he mentioned to test eth_getBlock against other providers too, what exactly is there to compare?

@0xlosh
Copy link
Contributor Author

0xlosh commented Oct 5, 2024

cargo run --example new_heads -- -r reth:ws://localhost:8546 -r alchemy:wss://eth-mainnet.g.alchemy.com/v2/<api_key>
Screenshot 2024-10-05 at 20 01 05

cargo run --example pending_txs -- -r reth:ws://localhost:8546 -r alchemy:wss://eth-mainnet.g.alchemy.com/v2/<api_key>
Screenshot 2024-10-05 at 20 01 23

unfortunately i dont have a local geth node running along to test that too, feel free to edit the code

@0xlosh
Copy link
Contributor Author

0xlosh commented Oct 5, 2024

@mattsse thanks got it, but im running my own reth node actually

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks @0xlosh! LGTM

@zerosnacks zerosnacks merged commit 0018187 into alloy-rs:main Oct 9, 2024
3 of 4 checks passed
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.

Add example for comparing subscriptions from different providers
3 participants