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

Execution of phases triggering too often #461

Open
ebma opened this issue Feb 7, 2025 · 1 comment
Open

Execution of phases triggering too often #461

ebma opened this issue Feb 7, 2025 · 1 comment
Labels
type:bug Something isn't working

Comments

@ebma
Copy link
Member

ebma commented Feb 7, 2025

Context

During the offramp process, Vortex currently often encounters recoverable errors because the same extrinsic is submitted multiple times. This happens on the frontend as well as the backend. This is not super problematic as Vortex is able to automatically recover and proceed with the page reload.

Backend logs:

2025-02-07 10:16:00        RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1014: Priority is too low: (1459 vs 1459): The transaction has too low priority to replace another transaction already in the pool.
Error during funding: RpcError: 1014: Priority is too low: (1459 vs 1459): The transaction has too low priority to replace another transaction already in the pool.
    at checkError (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:23:15)
    at RpcCoder.decodeResponse (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:39:9)
    at WsProvider.__internal__onSocketMessageResult (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:413:51)
    at WebSocket.__internal__onSocketMessage (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:402:20)
    at callListener (/app/signer-service/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onMessage (/app/signer-service/node_modules/ws/lib/event-target.js:209:9)
    at WebSocket.emit (node:events:518:28)
    at Receiver.receiverOnMessage (/app/signer-service/node_modules/ws/lib/websocket.js:1220:20)
    at Receiver.emit (node:events:518:28)
    at Receiver.dataMessage (/app/signer-service/node_modules/ws/lib/receiver.js:596:14)

and

Subsidize pre swap 6g9tUnT6emQnKxyS8EDqeggRrbBVZZJwt9fiN77Wic1AK22V 15752 USDC.axl
2025-02-07 10:18:07        REGISTRY: Unknown signed extensions CheckBuyout found, treating them as no-effect
2025-02-07 10:18:07        API/INIT: RPC methods not decorated: farming_getFarmingRewards, farming_getGaugeRewards, issue_getIssueRequests, issue_getVaultIssueRequests, oracle_currencyToUsd, oracle_getExchangeRate, oracle_usdToCurrency, redeem_getRedeemRequests, redeem_getVaultRedeemRequests, replace_getNewVaultReplaceRequests, replace_getOldVaultReplaceRequests, staking_getStakingRates, staking_getUnclaimedStakingRewards, vaultRegistry_getCollateralizationFromVault, vaultRegistry_getCollateralizationFromVaultAndCollateral, vaultRegistry_getIssueableTokensFromVault, vaultRegistry_getPremiumRedeemVaults, vaultRegistry_getRequiredCollateralForVault, vaultRegistry_getRequiredCollateralForWrapped, vaultRegistry_getVaultCollateral, vaultRegistry_getVaultTotalCollateral, vaultRegistry_getVaultsByAccountId, vaultRegistry_getVaultsWithIssuableTokens, vaultRegistry_getVaultsWithRedeemableTokens, zenlinkProtocol_calculateRemoveLiquidity, zenlinkProtocol_getAmountInPrice, zenlinkProtocol_getAmountOutPrice, zenlinkProtocol_getBalance, zenlinkProtocol_getEstimateLptoken, zenlinkProtocol_getPairByAssetId
2025-02-07 10:18:08        RPC-CORE: submitExtrinsic(extrinsic: Extrinsic): Hash:: 1014: Priority is too low: (841 vs 841): The transaction has too low priority to replace another transaction already in the pool.
Error in subsidizePreSwap:: RpcError: 1014: Priority is too low: (841 vs 841): The transaction has too low priority to replace another transaction already in the pool.
    at checkError (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:23:15)
    at RpcCoder.decodeResponse (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:39:9)
    at WsProvider.__internal__onSocketMessageResult (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:413:51)
    at WebSocket.__internal__onSocketMessage (/app/signer-service/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:402:20)
    at callListener (/app/signer-service/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onMessage (/app/signer-service/node_modules/ws/lib/event-target.js:209:9)
    at WebSocket.emit (node:events:518:28)
    at Receiver.receiverOnMessage (/app/signer-service/node_modules/ws/lib/websocket.js:1220:20)
    at Receiver.emit (node:events:518:28)
    at Receiver.dataMessage (/app/signer-service/node_modules/ws/lib/receiver.js:596:14)

Frontend logs

Image

and

Image

and

Image

The last one in the frontend is related to the error in the backend.

TODO

Make sure that each execution is only triggered once.

@ebma ebma added the type:bug Something isn't working label Feb 7, 2025
@gianfra-t gianfra-t self-assigned this Feb 7, 2025
@gianfra-t
Copy link
Contributor

After doing a few more tests, we cannot replicate this bug. The logs for this particular offramp show clearly that at least 2 processes were running in parallel, starting from the funding of the ephemeral in pendulum, since two logs Advance offramping state in phase pendulumFundEphemeral were seen with seconds of difference.

We will icebox this issue for now since the offramp can continue without failure, even if this happens. The reason for this race condition is not known and is counter intuitive given this guard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants