pendulum-chain / pendulum-chain/vortex

Execution of phases triggering too often

Open
#461 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
TypeScript
Stars
6
Forks
5
Avg merge
1d 7h
Merged PRs (30d)
33

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing execution during the offramp process across the frontend and backend, using the funding and subsidizePreSwap errors as entry points. Identify why the same extrinsic or phase is submitted more than once, then verify that each execution triggers only once and the duplicate-submission errors no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.