bosonprotocol / boson-dcl

Boson Protocol - Metaverse Toolkit - Decentraland SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random RPC errors when attempting MetaTransactions

mischat opened this issue · comments

commented

Random RPC error occasionally prevents the metatransaction from occurring on commit

image1

Happens 1 approximately 8 times with any type of purchase

Occurs when metamask is set to Polygon, Ethereum or Polygon Mumbai (have not checked by changing scene config as suggested by James in this morning's meeting)

I added some debug and this seems to be coming from inside @bosonprotocol/core-sdk
I can trace the issue to boson-dcl-v2/library/src/core-sdk.ts:189:

image

As you say, it seems intermittent, we can add some retry code around the call to coreSDK/erc20BalanceOf to address the issue if need be but might be cleaner to fix in @bosonprotocol/core-sdk.

How would you like to progress this?

Thanks!

commented

@frankie13, i was looking at the repo, and it looks like we are using the public matic virgil RPC endpoints in the test scene, and I am guessing that these RPC endpoints are flaky, I was trying to Bridge on the polygon testnet, and their bridge was being flaky. Could you try passing your own, non-public, RPC endpoint in to see if this is still an issue, you can get a free RPC endpoint from INFURA for example ?

commented

I am not sure that the right thing is to change the CORE sdk, having talked about it briefly with @levalleux-ludo. I guess i wouldn't mind @albertfolch-redeemeum's opinion too. But we feel like the core sdk shouldn' have such retry logic in it.

Thanks @mischat, yes I see what you mean. I will have a look at this today.

commented

Am guessing you probably aren't hitting the their public rate limits, you would see 429's if so https://support.blockvigil.com/support/solutions/articles/67000346291-what-is-the-rate-limit-for-matic-rpc-

commented

i was looking for a status page for matic virgil but i couldn't find one

@mischat I've just successfully put through 20 transactions in a row using my free polygon-mumbai alchemy endpoint.
Looks like you're right about the flaky virgil RPC endpoints.