-
Notifications
You must be signed in to change notification settings - Fork 62
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
Does Infura support the Web3.js 1.0 API? #29
Comments
Hi @lukehedger we're working on web3.js 1.0 support i.e. scalable websocket support now. It's in early alpha support stage on our side. If you're interested in helping us test it out shoot me your contact info and I'll get you access. |
Hey @egalano - sounds cool! Would definitely like to help test. Email is: [email protected]. |
Hi @egalano, I'd also like to test out the new version. Email is [email protected]. |
Hi @egalano, I'd like to try the Web3.js 1.0 support. [email protected]. Thanks |
Would love to get beta access to web3js 1.0 support with web sockets. [email protected] |
Has anyone gotten an email from them regarding this issue? I have not received anything. |
Sorry for the delay, I just sent the email with the connection details. Please give it a try and let us know if you encounter any issues. |
Thanks. Got the email. Will report back with any probs. Cheers |
@egalano Thanks! |
Any estimation when this functionality will be available? |
@egalano i'm interested in trying out and testing infura websocket support [email protected] |
Hi @egalano, happy to test out the alpha version. Email: ravshanoff at protonmail |
Hi @egalano , I'd also love to test out the alpha version. Email: [email protected] |
@egalano Hey I have built infra to listen live events from Ethereum: https://matic.network/dagger |
Really cool library @jdkanani |
Nice @jdkanani . Is that library compatible with any Ethereum node or specifically Geth's pub-sub API. |
@egalano Unfortunately no. Problem was that - if you have multiple Geth nodes - you have to deploy filters on every node. Plus, separating filters from Geth will give you more control over filter types. There are some cons too. But overall this will make development very easy for DApps. |
hey @egalano. I'm trying to listen to an event (with Web3.js) from a contract deployed in Ropsten but I'm getting Thanks in advance! |
Hi @icaroharry yes our API does not allow stateful requests at the moment. Our JSONRPC API endpoint currently load balances requests between many backend Ethereum nodes to be able to handle our large request volume. This is why we don't allow event subscriptions which use eth_newFilter and eth_getFilterLogs. Typically people are using eth_getLogs method and polling to be able to simulate the behavior of an event subscription. Or you can try out our websocket endpoint which we have been working on which should finally deliver this desired feature to users. |
@icaroharry How did you solve this problem then? Just curious. |
@egalano hi can I try out websocket beta also? I am working on a DApp requiring real time event updates. Thanks! [email protected] |
@icaroharry Great. And, @egalano what did you change at Infura to solve problem of "installing same filters on all nodes"? |
Hi @egalano, could you please add me to WS beta at: [email protected]. Thank you :) |
Hey @egalano could I get beta acces to websocket support? [email protected] |
Hi @egalano do you have an ETA for this? Thank you. |
Hey @egalano .. Please send me details also i would love to be alpha tester for this. Thanks. [email protected] |
i would also love to get some of that sweet websocket access. please add meeee!!!! :D [email protected] Thanks! |
@egalano, However, when subscribing for events, I get Connection dropped by remote peer. disconnects every few minutes. My question is:
Many thanks in advance.
And the console output:
etc, then the disconnect:
|
debugging a bit more it seems the disconnect happens after exactly 5 mins of inactivity. I.e. no events for 5 mins -> Connection dropped by remote peer so what's the best way to deal with this when watching a not very active contract? |
@ncocchiaro , Thank you. I solved problem by using getTransactionReceipt. 👍 👍 👍 |
Hi @StarNeit, My solution (although incomplete) is to subscribe to blocks like in @egalano's example above: this keeps communication with the peer up, however it is not bulletproof (i.e. if there's no blocks for 5+ mins, it will still disconnect) and also doesn't address a more general question of handling any disconnects/resubscribing. Hope this helps, let me know if you have any follow up questions/need more detail |
Hi guys now that our websocket support is live I’m going to close this ticket so it doesn’t become a monolithic bug tracker for subscriptions. Please keep filing issues if you encounter them and we’ll take care of deduplicating tasks for our devs. Let’s start with creating a separate ticket for the issue where people are encountering websocket timeouts as that requires implementation of ping and pong messages in the websocket client and server per the Websocket RFC. https://tools.ietf.org/html/rfc6455 |
Question - should we add our own tokens to the URL? I know it doesn't work right now, but what can we expect about that? |
We will eventually provide a separate method for authenticating your account with web sockets, but haven't fully decided on the implementation yet, in the mean time no, you do not need to include your token on the URL. |
We are building an app @ ETHLend.io that would require Log Event listening. I saw that people have submitted their email ids to test WebSocket beta. Here is my email [email protected] if some info you think I should know. I see most of the information is already shared here. If something is not shared, please do shoot me email. |
Hi, do you all solve your problems?
It works fine for |
I'm having the exact same issue as @jamboj does anyone have a solution here? |
@Plinpod @jamboj we had that problem too. We ended up adding retry logic in our software - here the PR https://github.com/livepeer/go-livepeer/pull/320/files |
@habdelra I did switch to the _ws endpoint and it seems more stable for me, however I do still get the same issues after it runs for awhile. @ericxtang So with web3, I would basically just re-initialize the events everytime they error out? |
In general, you should code your websocket connection with the expectation that you will lose connectivity at some point and need to re-establish your subscriptions. Whether using our shared endpoint or your own node, there will be times when maintenance or network connectivity issues occur and the connection needs to be terminated, so your code needs to handle re-connecting when that happens, and should re-subscribe to events it cares about. I don't believe Geth's rpc/client module does not do this for you, so you need to add your own logic to resubscribe on top of it. |
Looking forward for progress on this |
I'm working on a WebSocket provider for MetaMask's Web3 1.0 provider (MetaMask/web3-provider-engine#227) Running against However, on It was recommended that we point to |
@ryan-rowland Can you open a separate issue instead of commenting on this closed one? Please include some logs of RPC traffic that show the issue, specifically any traffic sent before the disconnects and the full JSONRPC payload for the |
Hi folks, as mentioned above, we now support Web3js-1.0 subscriptions via websockets. If you are having any issues with our websocket feature please file a separate issue so we can better track and get it resolved. Locking this thread to keep things organized. Thanks! |
Using
[email protected]
I have attempted to deploy a contract to Rinkeby with a single argument:The contract deploys OK but when calling a method to return the constructor argument,
0
is returned, which suggests the argument was not processed.The contract is here for ref:
The text was updated successfully, but these errors were encountered: