wormhole-foundation / wormhole-connect

Wormhole Connect brings all the functionality and utility of Wormhole right into your application and removes all of the complexity.
https://connect-in-style.wormhole.com/
Other
79 stars 59 forks source link

[QA][Mainnet/Testnet] Sui SUI -> BSC wSUI fails with RPC 429 #537

Closed AigaD closed 1 year ago

AigaD commented 1 year ago

Preconditions:

  1. Sui Wallet connected at Sending From section
  2. Metamask wallet connected at sending To section
  3. Console is opened

Environment: MacBook Pro, macOS Ventura 13.0.1, Chrome Version 108.0.5359.98

Steps:

  1. Prepare to send 0.01 Sui From Sui to BSC
  2. Observe warning message
  3. Change the amount to 0.2 Sui
  4. Click between pay with two transactions and pay with one transaction a couple of times
  5. Click Approve and proceed with transaction

Actual result: Error: "Transaction failed with the following error. Dry run failed, could not automatically determine a budget:" is shown in the console and transaction fails

Expected result: Transaction completes.

Attachment:

Screenshot 2023-05-03 at 09 56 49

https://user-images.githubusercontent.com/91047061/235850424-caec5b51-4969-4005-be88-7699ef088706.mov

tonyjin commented 1 year ago

Sui -> BSC w/ automatic relay

Screencast shows 429 rate limiting errors from hitting the RPC endpoint attempting to estimate gas - this doesn't block the user from submitting a transaction, but they are shown a warning from the wallet suggesting that this transaction might fail, and it does after submitting it with the console error:

Transaction failed with the following error. Dry run failed, could not automatically determine a budget: MoveAbort(MoveLocation { module: ModuleId { address: XXX, name: Identifier("transfer") }, function: 0, instruction: 91, function_name: Some("transfer_tokens_with_relay") }, 2) in command 3

anondev2323 commented 1 year ago

I think we need to set the gas limit when executing the transaction

AigaD commented 1 year ago

Error message: "Dry run failed" is no longer reproduced, but during transaction a lot of errors are thrown, that were also visible in the main ticket "Cannot estimate gas value" Tested from: https://wormhole-connect.netlify.app/

Please advise if ticket can be closed and should a new ticket including this error should be created.

Attachment: https://drive.google.com/file/d/1AyrHyHphfEjV_jIOugB57ATq2LpO0O0o/view?usp=share_link

Screenshot 2023-05-03 at 19 58 57
tonyjin commented 1 year ago

Can close the ticket and ignore the error if you aren't actually blocked from doing the transaction.

AigaD commented 1 year ago

Closing the ticket as per comment above. Transaction still has some errors shown in the console, but transaction is completed.

tsadovska commented 1 year ago

Reopened the ticket, because it can be reproduced with the similar scenario:

Transactions do not proceed when user clicks on "Approve and proceed with transaction" button.

Checked on https://wormhole-connect.netlify.app/

Error in Console:

Error: Transaction failed with the following error. Dry run failed, could not automatically determine a budget: MoveAbort(MoveLocation { module: ModuleId { address: 683696ce7d22989c880452c93fc608e4decd1dcbe1e9e1960a142be0544c3ff1, name: Identifier("transfer") }, function: 0, instruction: 91, function_name: Some("transfer_tokens_with_relay") }, 2) in command 3
    at dapp-interface.js:2:238302
    at dapp-interface.js:2:236451
    at a._next (dapp-interface.js:2:235759)
    at e.next (dapp-interface.js:2:233824)
    at dapp-interface.js:2:238218
    at a._next (dapp-interface.js:2:235759)
    at e.next (dapp-interface.js:2:233824)
    at dapp-interface.js:2:236444
    at a._next (dapp-interface.js:2:235759)
    at e.next (dapp-interface.js:2:233824)

Attachments: Screenshot 2023-05-05 at 18 47 18 Screenshot 2023-05-05 at 18 39 26

tonyjin commented 1 year ago

Seems to be caused by too many SUI RPC calls on both testnet and mainnet.

Mainnet: mainnet mainnet2

When I do: connect Sui wallet, select Sui network, select SUI asset, enter amount, connect destination EVM wallet, choose destination network, Connect makes 163 requests to rpc.mainnet.sui.io, 140 of which are POST calls

tonyjin commented 1 year ago

Seems to be caused by too many SUI RPC calls on both testnet and mainnet.

Mainnet: mainnet mainnet2

When I do: connect Sui wallet, select Sui network, select SUI asset, enter amount, connect destination EVM wallet, choose destination network, Connect makes 163 requests to rpc.mainnet.sui.io, 140 of which are POST calls

If you wait a while for the rate limiting to stop, then you can successfully initiate a transaction.

In my latest test, the UI hung because of a separate 429 from the CoinGecko API. Is there a way to make that not block the UI?

Access to fetch at 'https://api.coingecko.com/api/v3/simple/price?ids=sui&vs_currencies=usd' from origin 'https://mainnet--wormhole-connect.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
main.9c6ec236.js:37                  Uncaught (in promise) TypeError: Failed to fetch
    at er (main.9c6ec236.js:37:9261121)
    at main.9c6ec236.js:110:119792
    at main.9c6ec236.js:110:119811
    at oc (main.9c6ec236.js:37:7900355)
    at _d (main.9c6ec236.js:37:7920477)
    at main.9c6ec236.js:37:7919219
    at xd (main.9c6ec236.js:37:7919284)
    at dd (main.9c6ec236.js:37:7913040)
    at qo (main.9c6ec236.js:37:7853768)
    at main.9c6ec236.js:37:7910445
tsadovska commented 1 year ago

Issue is reproducible on https://wormhole-connect.netlify.app/ [Testnet] with the following scenarios:

Error is displayed in Console:

Error: Transaction failed with the following error. Dry run failed, could not automatically determine a budget: MoveAbort(MoveLocation { module: ModuleId { address: 12eb7e64389d8f0e052d8bda10f46aab1dcb6efeec59decf1897708450171050, name: Identifier("transfer") }, function: 0, instruction: 9, function_name: Some("transfer_tokens_with_relay") }, 3) in command 3
    at dapp-interface.js:2:231848
    at dapp-interface.js:2:229997
    at a._next (dapp-interface.js:2:229305)
    at t.next (dapp-interface.js:2:227370)
    at dapp-interface.js:2:231764
    at a._next (dapp-interface.js:2:229305)
    at t.next (dapp-interface.js:2:227370)
    at dapp-interface.js:2:229990
    at a._next (dapp-interface.js:2:229305)
    at t.next (dapp-interface.js:2:227370)

Attachment: image

AigaD commented 1 year ago

Issue reproduced from https://base-relayer--wormhole-connect.netlify.app/# For transaction WMATIC Sui -> Base Goerli error is shown in the console Error: Transaction failed with the following error. Dry run failed, could not automatically determine a budget: Attachment:

Screenshot 2023-08-10 at 14 52 09
tsadovska commented 1 year ago

Issue is reproducible when sending WBNB from Sui (Sui wallet) to Mumbai (Metamask).

Builds - Tested NOK: https://base-relayer--wormhole-connect.netlify.app/ [Testnet] https://wormhole-connect.netlify.app/ [Testnet]

Build - Tested OK: https://mainnet--wormhole-connect.netlify.app/ [Mainnet]

Steps:

  1. Select Sui network in 'From' section
  2. Select Mumbai network in 'To' section
  3. Connect Sui wallet in 'From' section
  4. Connect Metamask wallet in 'To' section
  5. Preprare to send 0.001 WBNB
  6. Select "Pay with SUI & WBNB(one transaction)" (actual result: current estimates are not calculated)
  7. Click "Approve and proceed with transaction" button

Actual result: Transaction fails and error is displayed in Console:

Error: Transaction failed with the following error. Dry run failed, could not automatically determine a budget: MoveAbort(MoveLocation { module: ModuleId { address: 12eb7e64389d8f0e052d8bda10f46aab1dcb6efeec59decf1897708450171050, name: Identifier("transfer") }, function: 0, instruction: 9, function_name: Some("transfer_tokens_with_relay") }, 3) in command 3
    at dapp-interface.js:1:69314
    at dapp-interface.js:1:67463
    at a._next (dapp-interface.js:1:66771)
    at t.next (dapp-interface.js:1:64836)
    at dapp-interface.js:1:69230
    at a._next (dapp-interface.js:1:66771)
    at t.next (dapp-interface.js:1:64836)
    at dapp-interface.js:1:67456
    at a._next (dapp-interface.js:1:66771)
    at t.next (dapp-interface.js:1:64836)

Expected result: User can successfully send and receive tokens.

Note: Issue is not reproducible when option "Pay with SUI & MATIC(two transactions)" is selected.

Attachment: image

AigaD commented 1 year ago

Transaction Sui -> Aptos fails at Claim. Reason: Access to XMLHttpRequest at 'https://rpc.ankr.com/premium-http/aptos_testnet/de829957773bb0fa9e0aaeab57d988707e60eb06ae36be0658b778072d94979d/v1/accounts/0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f/resource/0x576410486a2da45eee6c949c995670112ddf2fbeedab20350d506328eefc9d4f::state::State' from origin 'https://wormhole-connect.netlify.app' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. Tested from: https://wormhole-connect.netlify.app/# Attachment:

Screenshot 2023-09-29 at 11 31 38
AigaD commented 1 year ago

Closing, Tested OK Tested from: https://wormhole-connect.netlify.app/# Scenarios:

Tested NOK: Transaction SUI from Sui to Aptos. Issue reported: https://github.com/wormhole-foundation/wormhole-connect/issues/1000#issue-1900343822

Attachment:

Screenshot 2023-10-03 at 14 59 46 Screenshot 2023-10-03 at 14 51 09 Screenshot 2023-10-03 at 15 08 48