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

Support replacing pending transaction #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yoshidan
Copy link
Contributor

@yoshidan yoshidan commented Dec 25, 2023

Show minimum nonce pending transaction.

  1. Gets minimum nonce transaction (by txpool_contentFrom).
  2. Prints json string
yrly ethereum pending show ibc0
{"type":"0x2","chainId":"0x270f","nonce":"0x1b","to":"0x702e40245797c5a2108a566b3ce2bf14bc6af841","gas":"0x6161e8","gasPrice":null,"maxPriorityFeePerGas":"0x28fa6ae00","maxFeePerGas":"0x28fa6ae00","value":"0x0","input": ....}

Replace pending transaction

  1. Gets minimum nonce transaction (by txpool_contentFrom).
  2. Checks to see if the transaction remains pending for the number of seconds specified in pendingDurationToReplace.
  3. Adds fee according to the transaction type and execute sendTransaction.
  4. Verify transaction receipt
yrly ethereum pending replace ibc0

ChainConfig sample

  • fees are hex string
"chain": {
    "@type": "/relayer.chains.ethereum.config.ChainConfig",
    ...
    "replaceConfig": {
      "pendingDurationToReplace" : 10,
      "checkInterval" : 3,
      "gasPriceInc": "1000000000",
      "maxGasPrice": "100000000000",
      "gasTipCapInc": "1000000000",
      "maxGasTipCap": "100000000000",
      "gasFeeCapInc": "1000000000",
      "maxGasFeeCap": "100000000000"
    }
  },

Others

  • The directory structure has been changed to prevent cycle imports according to tendermint manners.
    (ethereum/module.go -> ethereum/module/module.go)

Signed-off-by: yoshidan <[email protected]>
Signed-off-by: yoshidan <[email protected]>
Signed-off-by: yoshidan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant