In tests we observed that the Moonbeam executor step (where our Moonbeam executor account submits a transaction to send the funds to Pendulum via XCM) can time out.
The reason is that the request waits for the transaction to be included on chain.
Instead I propose to: 1) don't wait for the transaction inclusion within the same HTTP request but in the frontend and 2) allow for higher gas price limits to make prompt inclusion likely.
Details
the /moonbeam/execute-xcm endpoint waits for transaction inclusion via waitForTransactionReceipt
instead the backend should just return the hash of the transaction and then the frontend waits for inclusion after the endpoint returns
before submitting the transaction first determine gas fee estimates that make prompt inclusion likely via
then use the maxFeePerGas and maxPriorityFeePerGas as parameters for the transaction
Open Questions
What should happen when the users reloads or closes the browser window (and opens again at a later point in time) while the frontend is waiting for transaction inclusion?
the frontend will still be in the phase executeXCM and will start by calling the endpoint /moonbeam/execute-xcm
this endpoint will now fail as the transaction will cannot be executed (or the frontend will get a transaction receipt that shows that the transaction could not be submitted
I suggest that we just ignore this error case (and assume that the transaction has already been submitted) and just wait for the funds to arrive on Pendulum.
In tests we observed that the Moonbeam executor step (where our Moonbeam executor account submits a transaction to send the funds to Pendulum via XCM) can time out.
The reason is that the request waits for the transaction to be included on chain.
Instead I propose to: 1) don't wait for the transaction inclusion within the same HTTP request but in the frontend and 2) allow for higher gas price limits to make prompt inclusion likely.
Details
/moonbeam/execute-xcm
endpoint waits for transaction inclusion viawaitForTransactionReceipt
then use the
maxFeePerGas
andmaxPriorityFeePerGas
as parameters for the transactionOpen Questions
What should happen when the users reloads or closes the browser window (and opens again at a later point in time) while the frontend is waiting for transaction inclusion?
executeXCM
and will start by calling the endpoint/moonbeam/execute-xcm
I suggest that we just ignore this error case (and assume that the transaction has already been submitted) and just wait for the funds to arrive on Pendulum.