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

Question: is SubscribeBlockTracker safe to use? #69

Closed
sterlu opened this issue Nov 25, 2020 · 2 comments
Closed

Question: is SubscribeBlockTracker safe to use? #69

sterlu opened this issue Nov 25, 2020 · 2 comments

Comments

@sterlu
Copy link

sterlu commented Nov 25, 2020

I noticed the SubscribeBlockTracker while digging around packages trying to lower the number of eth_getBlockByNumber requests in web3-provider-engine. Is it safe to use? Seems to be working. However it's not exported, nor mentioned anywhere in the docs.

Tagging @jamespic as he seems to have implemented it 2 years ago - hope you don't mind the ping.

@jamespic
Copy link
Contributor

jamespic commented Dec 4, 2020

Well, it was safe to use when I wrote it two years ago 😉.

If I remember rightly, at the time I was interested in interesting with API endpoints that support push subscriptions, like websockets and TCP IPC. But the project I was using it for ended up going a different way (I'm not using it now), and a lot has changed in this space in those two years. So if it were me, I'd test it before using it on a real project.

@mcmire
Copy link
Contributor

mcmire commented Apr 27, 2022

There are tests for this, so in that sense, we know it works, but we still don't use it for anything at MetaMask. I'd echo @jamespic's advice with the expectation that it may go away at some point in the future. If people still need it after that point, then we can accommodate another solution.

@mcmire mcmire closed this as completed Apr 27, 2022
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

No branches or pull requests

4 participants
@mcmire @jamespic @sterlu and others