alto icon indicating copy to clipboard operation
alto copied to clipboard

Refilling wallet throws an error and causes process to exit

Open lyfsn opened this issue 2 years ago • 1 comments

Describe the bug

The process exits when refilling the wallet due to a "replacement transaction underpriced" error.

Expected behavior

Regardless of any transaction failures, the bundler shouldn't shut down.

Screenshots

{"level":30,"time":1697786179976,"pid":1061950,"hostname":"PublicSale","module":"executor","tx":"0xd5f39c3dd30e7275bc1e811df91070db9b2baaab4d03bb3ab2a4daffa1bb6499","executor":"0x072a207D1Ec56D4A60FdBaD6e72B605c6CAD60C2","missingBalance":"0x670aeafb69165bb40","msg":"refilled wallet"}
/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/errors/getTransactionError.js:11
    return new transaction_js_1.TransactionExecutionError(cause, {
           ^

TransactionExecutionError: Missing or invalid parameters.
Double check you have provided the correct parameters.

URL: http://**********:3334/
Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}
 
Request Arguments:
  from:                  0xA949e80F95F27f64C7b7cE33711A43304c6aAAc4
  to:                    0xF1B4a63EAedcE2283e33f2a6ed52005eA385ea15
  value:                 118.800084076140614464 ETH
  maxFeePerGas:          0.001000008 gwei
  maxPriorityFeePerGas:  0.001000008 gwei

Details: replacement transaction underpriced
Version: [email protected]
    at getTransactionError (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/errors/getTransactionError.js:11:12)
    at sendTransaction (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/actions/wallet/sendTransaction.js:77:64)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SenderManager.validateAndRefillWallets (/home/testnet/endurance/aa/alto-priv/packages/executor/lib/senderManager.js:108:32)
    at async Timeout._onTimeout (/home/testnet/endurance/aa/alto-priv/packages/cli/lib/handler.js:227:9) {
  details: 'replacement transaction underpriced',
  docsPath: undefined,
  metaMessages: [
    'URL: http://**********:3334/',
    'Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}',
    ' ',
    'Request Arguments:',
    '  from:                  0xA949e80F95F27f64C7b7cE33711A43304c6aAAc4\n' +
      '  to:                    0xF1B4a63EAedcE2283e33f2a6ed52005eA385ea15\n' +
      '  value:                 118.800084076140614464 ETH\n' +
      '  maxFeePerGas:          0.001000008 gwei\n' +
      '  maxPriorityFeePerGas:  0.001000008 gwei'
  ],
  shortMessage: 'Missing or invalid parameters.\n' +
    'Double check you have provided the correct parameters.',
  version: '[email protected]',
  cause: InvalidInputRpcError: Missing or invalid parameters.
  Double check you have provided the correct parameters.
  
  URL: http://**********:3334/
  Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}
  
  Details: replacement transaction underpriced
  Version: [email protected]
      at delay.count.count (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/buildRequest.js:46:27)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async attemptRetry (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/promise/withRetry.js:15:30) {
    details: 'replacement transaction underpriced',
    docsPath: undefined,
    metaMessages: [
      'URL: http://**********:3334/',
      'Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}'
    ],
    shortMessage: 'Missing or invalid parameters.\n' +
      'Double check you have provided the correct parameters.',
    version: '[email protected]',
    cause: RpcRequestError: RPC Request failed.
    
    URL: http://**********:3334/
    Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}
    
    Details: replacement transaction underpriced
    Version: [email protected]
        at request (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/clients/transports/http.js:40:27)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async delay.count.count (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/buildRequest.js:30:20)
        at async attemptRetry (/home/testnet/endurance/aa/alto-priv/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/promise/withRetry.js:15:30) {
      details: 'replacement transaction underpriced',
      docsPath: undefined,
      metaMessages: [
        'URL: http://**********:3334/',
        'Request body: {"method":"eth_sendRawTransaction","params":["0x02f8788501823cf7e88202cd830f4248830f424882520894f1b4a63eaedce2283e33f2a6ed52005ea385ea15890670aeaf0994e6d34080c080a0bba113532b5b3c16796a8d329c8d708e2624d6596725d6a718ca721d83942266a05cd6b3f72fb70144e961b5a7936f4f6627f23edc66243fe1ec43ad0b2fa08a37"]}'
      ],
      shortMessage: 'RPC Request failed.',
      version: '[email protected]',
      cause: { code: -32000, message: 'replacement transaction underpriced' },
      code: -32000
    },
    code: -32000
  }
}

Node.js v20.1.0
 ELIFECYCLE  Command failed with exit code 1.

Desktop (please complete the following information):

  • Versio: latest

lyfsn avatar Oct 20 '23 07:10 lyfsn

The same problem occurs when bundling an op to the contract:

e8f8fa4f000000000000100006536356498d5ffc8ac7b734f42a8b2c530cd885d66a7ac020000000000000000000000000000000000000000000000000000000000000041b7fc1d078e0f9c3b26cd790e1dd75dbcab92d371e824c01cb37bfe87675f12b52d2c5fc5681626d80b2b747afc6e2c403a958b3b103f3d2baf487a9fb60297e81c68cbe0e6740e7dd7b6d0f5d0d4d75748b54268cd7459654dec9dedbc03228774b9023760bb098f5a5121a9be4c4beba9d6c86cfe440a7ae34cb407d214a3fd0113770a4f2ee89cddb41c039b2ef68a98b688d6b51b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001000000000000000000000000008444c262d5a6282dca44b89f29539ce0135602d600000000000000000000000000000000000000000000000000000000000000000a1470700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0f7bd88c0443a0cc578053b7745262d239f2e3c74a201c719c5d3660109024a"}],"entryPoint":"0xec6797b98549E448031aaA0340A7842FC0154032","gasLimit":"0x3b5d0d","opsToBundle":["0x2c4e312e67d2a2b4f37ecebb4f65fc38d2d931c45042ac5276eca9389ae254b5"],"msg":"got gas limit"}
/Users/smallyu/work/fsn/aa/alto/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/errors/getTransactionError.js:11
    return new transaction_js_1.TransactionExecutionError(cause, {
           ^

TransactionExecutionError: Nonce provided for the transaction (1049) is lower than the current nonce of the account.
Try increasing the nonce or find the latest nonce with `getTransactionCount`.

Request Arguments:
  from:                  0xA949e80F95F27f64C7b7cE33711A43304c6aAAc4
  to:                    0xec6797b98549E448031aaA0340A7842FC0154032
  data:                  0x1fad948c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a949e80f95f27f64c7b7ce33711a43304c6aaac400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bd54ce245a4b87ee8c3e89aa0ed665d2f2d4cf2c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000003fcef00000000000000000000000000000000000000000000000000000000003085ae0000000000000000000000000000000000000000000000000000000000e48b5f0000000000000000000000000000000000000000000000000000000000113e200000000000000000000000000000000000000000000000000000000000113e1000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000005600000000000000000000000000000000000000000000000000000000000000138b7f6f5b1e5a75a058f5fabf755a4da6271b3c7b9296601cd000000000000000000000000b4e72af9616cef87599038e9876f0f111e468ed7000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d1f57894000000000000000000000000f29f0defbc3f6156afca607b1cbd07ea05738acb00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000014cf7bb327848b588ac9c07773b2872777b315e3f100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a4519454470000000000000000000000008444c262d5a6282dca44b89f29539ce0135602d600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e40a14707000000000000000000000000068cbe0e6740e7dd7b6d0f5d0d4d75748b54268cd0000000000000000000000000000000000000000000000000000018b5bbbfba400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041e6bc0167bb96795154c71c1f0174ca8cc251eae17f90f5889d41c4a8ca9d19e46c2141a473d2044c017e3cd6aedf0cb743d2ec141589a3902edb198ff93856d41b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009598d5ffc8ac7b734f42a8b2c530cd885d66a7ac0200000000000000000000000000000000000000000000000000000000653635640000000000000000000000000000000000000000000000000000000065363438dd060438a1befd94c1c6b15561437abe1e31df0063f519859cbf453f1c0518f334898f1a1391bf31536ffd54c98e7437c3219b76d2726de2769684bc9b900e0d1b000000000000000000000000000000000000000000000000000000000000000000000000000000000002a2000000020000653634380000000000019dcc9e885558e649e38ae59dcaf4330e515a118bb5b2d6ab4af3fb1c008d1933f8d0e3049e2d78be000000000000000000000000000000000000000000000000000000000000005468cbe0e6740e7dd7b6d0f5d0d4d75748b54268cdf94c7786fd00fe5b1dc70c610acff4857911b8e29e2ccef4db7eeebe8f8fa4f000000000000100006536356498d5ffc8ac7b734f42a8b2c530cd885d66a7ac020000000000000000000000000000000000000000000000000000000000000041b7fc1d078e0f9c3b26cd790e1dd75dbcab92d371e824c01cb37bfe87675f12b52d2c5fc5681626d80b2b747afc6e2c403a958b3b103f3d2baf487a9fb60297e81c68cbe0e6740e7dd7b6d0f5d0d4d75748b54268cd7459654dec9dedbc03228774b9023760bb098f5a5121a9be4c4beba9d6c86cfe440a7ae34cb407d214a3fd0113770a4f2ee89cddb41c039b2ef68a98b688d6b51b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001000000000000000000000000008444c262d5a6282dca44b89f29539ce0135602d600000000000000000000000000000000000000000000000000000000000000000a1470700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0f7bd88c0443a0cc578053b7745262d239f2e3c74a201c719c5d3660109024a000000000000000000000000000000000000000000000000000000000000
  gas:                   3890445
  maxFeePerGas:          99 gwei
  maxPriorityFeePerGas:  0.0000001 gwei
  nonce:                 1049

Details: nonce too low: next nonce 1050, tx nonce 1049
Version: [email protected]
    at getTransactionError (/Users/smallyu/work/fsn/aa/alto/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/utils/errors/getTransactionError.js:11:12)
    at sendTransaction (/Users/smallyu/work/fsn/aa/alto/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/viem/dist/cjs/actions/wallet/sendTransaction.js:77:64)
    ... 6 lines matching cause stack trace ...
    at async Timeout._onTimeout (/Users/smallyu/work/fsn/aa/alto/packages/executor/lib/executorManager.js:32:13) {
  details: 'nonce too low: next nonce 1050, tx nonce 1049',
  docsPath: undefined,
  metaMessages: [
    'Request Arguments:',
    '  from:                  0xA949e80F95F27f64C7b7cE33711A43304c6aAAc4\n' +
      '  to:                    0xec6797b98549E448031aaA0340A7842FC0154032\n' +
      '  data:                  0x1fad948c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000a949e80f95f27f64c7b7ce33711a43304c6aaac400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bd54ce245a4b87ee8c3e89aa0ed665d2f2d4cf2c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000003fcef00000000000000000000000000000000000000000000000000000000003085ae0000000000000000000000000000000000000000000000000000000000e48b5f0000000000000000000000000000000000000000000000000000000000113e200000000000000000000000000000000000000000000000000000000000113e1000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000005600000000000000000000000000000000000000000000000000000000000000138b7f6f5b1e5a75a058f5fabf755a4da6271b3c7b9296601cd000000000000000000000000b4e72af9616cef87599038e9876f0f111e468ed7000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d1f57894000000000000000000000000f29f0defbc3f6156afca607b1cbd07ea05738acb00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000014cf7bb327848b588ac9c07773b2872777b315e3f100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a4519454470000000000000000000000008444c262d5a6282dca44b89f29539ce0135602d600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e40a14707000000000000000000000000068cbe0e6740e7dd7b6d0f5d0d4d75748b54268cd0000000000000000000000000000000000000000000000000000018b5bbbfba400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000041e6bc0167bb96795154c71c1f0174ca8cc251eae17f90f5889d41c4a8ca9d19e46c2141a473d2044c017e3cd6aedf0cb743d2ec141589a3902edb198ff93856d41b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009598d5ffc8ac7b734f42a8b2c530cd885d66a7ac0200000000000000000000000000000000000000000000000000000000653635640000000000000000000000000000000000000000000000000000000065363438dd060438a1befd94c1c6b15561437abe1e31df0063f519859cbf453f1c0518f334898f1a1391bf31536ffd54c98e7437c3219b76d2726de2769684bc9b900e0d1b000000000000000000000000000000000000000000000000000000000000000000000000000000000002a2000000020000653634380000000000019dcc9e885558e649e38ae59dcaf4330e515a118bb5b2d6ab4af3fb1c008d1933f8d0e3049e2d78be000000000000000000000000000000000000000000000000000000000000005468cbe0e6740e7dd7b6d0f5d0d4d75748b54268cdf94c7786fd00fe5b1dc70c610acff4857911b8e29e2ccef4db7eeebe8f8fa4f000000000000100006536356498d5ffc8ac7b734f42a8b2c530cd885d66a7ac020000000000000000000000000000000000000000000000000000000000000041b7fc1d078e0f9c3b26cd790e1dd75dbcab92d371e824c01cb37bfe87675f12b52d2c5fc5681626d80b2b747afc6e2c403a958b3b103f3d2baf487a9fb60297e81c68cbe0e6740e7dd7b6d0f5d0d4d75748b54268cd7459654dec9dedbc03228774b9023760bb098f5a5121a9be4c4beba9d6c86cfe440a7ae34cb407d214a3fd0113770a4f2ee89cddb41c039b2ef68a98b688d6b51b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001000000000000000000000000008444c262d5a6282dca44b89f29539ce0135602d600000000000000000000000000000000000000000000000000000000000000000a1470700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0f7bd88c0443a0cc578053b7745262d239f2e3c74a201c719c5d3660109024a000000000000000000000000000000000000000000000000000000000000\n' +
      '  gas:                   3890445\n' +
      '  maxFeePerGas:          99 gwei\n' +
      '  maxPriorityFeePerGas:  0.0000001 gwei\n' +
      '  nonce:                 1049'
  ],
  shortMessage: 'Nonce provided for the transaction (1049) is lower than the current nonce of the account.\n' +
    'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',
  version: '[email protected]',
  cause: NonceTooLowError: Nonce provided for the transaction (1049) is lower than the current nonce of the account.
  Try increasing the nonce or find the latest nonce with `getTransactionCount`.
  

lyfsn avatar Oct 23 '23 08:10 lyfsn

Closing this issue as retryLogic was implemented in #320

mouseless0x avatar Oct 30 '24 17:10 mouseless0x