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

Fix nonce issue in test pipeline of network browser #73

Open
dmytrotkk opened this issue Jan 30, 2024 · 0 comments
Open

Fix nonce issue in test pipeline of network browser #73

dmytrotkk opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dmytrotkk
Copy link
Contributor

Describe the bug
In the current version network-browser tests are designed to be executed in parallel to make the workflow faster. All transactions are executed simultaneously with pre-calculated nonces.

This sometimes causes an error where the same nonce is being reused.
The issue affects only test pipeline.

To Reproduce
Steps to reproduce the behavior:

  1. Go to network-browser module
  2. Run test pipeline

Logs:

initializing provider and contracts
  granting ROLE: VALIDATOR_MANAGER_ROLE
  granting ROLE: SCHAIN_TYPE_MANAGER_ROLE
  granting ROLE: SCHAIN_CREATOR_ROLE
  all roles granted
  going to register validator
  number of active validators: 1
  going to enable validator
  [11](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:12)9 |         case "NUMERIC_FAULT":
  [12](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:13)0 |         case "BUFFER_OVERRUN":
  121 |             error = new RangeError(message);
  122 |             break;
  123 |         default:
  124 |             error = new Error(message);
                            ^
  error: nonce has already been used (transaction="0x02f891827a695a843b9aca00843b9aca0e8301e18a944466c43ecfce7e973df4041b026a6bae18e4d00c80a4790ac49b0000000000000000000000000000000000000000000000000000000000000001c080a0feb0a2d5193b294695c11b9bb9f8b958145cd3e7699340184141787ff8681722a04f674bcd8f2edac26d6891d5[13](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:14)ca040512e0465aae2cbd8f5dd67ad47badb588", info={ "error": { "code": -3[20](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:21)00, "data": { "message": "Nonce too low. Expected nonce to be 91 but got 90." }, "message": "Nonce too low. Expected nonce to be 91 but got 90." } }, code=NONCE_EXPIRED, version=6.8.1)
   info: {
    "error": {
      "code": -32000,
      "message": "Nonce too low. Expected nonce to be 91 but got 90.",
      "data": {
        "message": "Nonce too low. Expected nonce to be 91 but got 90."
      }
    }
  }
   code: "NONCE_EXPIRED"
  
        at makeError (/home/runner/work/ima-agent/ima-agent/network-browser/node_modules/ethers/lib.esm/utils/errors.js:124:[21](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:22))
        at /home/runner/work/ima-agent/ima-agent/network-browser/node_modules/ethers/lib.esm/providers/provider-jsonrpc.js:[26](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:27)4:40
        at /home/runner/work/ima-agent/ima-agent/network-browser/tests/browser.test.ts:[33](https://github.com/skalenetwork/ima-agent/actions/runs/7630203789/job/20785351519#step:7:34):1
  (fail) browser module test > browse
@dmytrotkk dmytrotkk self-assigned this Jan 30, 2024
@dmytrotkk dmytrotkk added the bug Something isn't working label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant