argotorg / argotorg/sourcify

Invalid Nonce Validation

Open
#2,180 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

monitor 🪲 bug
Dominant language
TypeScript
Stars
952
Forks
542
Avg merge
2d 19h
Merged PRs (30d)
18

Description

Currently, nonce validation in Sourcify Monitoring appears to restrict values ​​that are within the allowed uint64 range. The value 12894333551438793358 (which is within the uint64 limit) is incorrectly rejected. This prevents contracts in a given block from being analyzed.

To replicate error on docker enviroment:

  • Image: ghcr.io/ethereum/sourcify/monitor:latest
  • monitorChains.json
[
    {
        "chainId": 100009,
        "name": "VeChain Mainnet",
        "rpc": ["https://rpc-mainnet.vechain.energy"]
    }
]
  • config.json
{
  "decentralizedStorages": {
    "ipfs": {
      "enabled": true,
      "gateways": [
        "https://ipfs.io/ipfs/"
      ],
      "timeout": 30000,
      "interval": 5000,
      "retries": 5,
      "headers": {}
    }
  },
  "sourcifyServerURLs": [
    "https://verify-api.vechainstats.com/"
  ],
  "sourcifyRequestOptions": {
    "maxRetries": 3,
    "retryDelay": 30000
  },
  "defaultChainConfig": {
    "startBlock": 21380962,
    "blockInterval": 10000,
    "blockIntervalFactor": 1.1,
    "blockIntervalUpperLimit": 300000,
    "blockIntervalLowerLimit": 100,
    "bytecodeInterval": 5000,
    "bytecodeNumberOfTries": 5
  }
}

  • Error Log:
{
    "blockNumber": 21380962,
    "chainId": 100009,
    "error": "invalid value for value.nonce (invalid numeric string: overflow (argument=\"value\", value=12894333551438793358, code=INVALID_ARGUMENT, version=6.14.0) (argument=\"value\", value=\"0xb2f1e00c44e90a8e\", code=INVALID_ARGUMENT, version=6.14.0)) (value={ \"accessList\": [  ], \"blockHash\": \"0x01463f62f82d604e21f476644405db47dcd18b5479c15051778bc5c17e3954da\", \"blockNumber\": \"0x1463f62\", \"chainId\": \"0x186a9\", \"from\": \"0xbfe2122a82c0aea091514f57c7713c3118101eda\", \"gas\": \"0x318c1\", \"gasPrice\": \"0x0\", \"hash\": \"0xc0f97ec1c9ad6daea8106077ab4a8ac87a7f0188ef5f4277cff0302fcdcc08ab\", \"input\": \"0x8d69446d00000000000000000000000010c5c4dafa700b733a1ede963f2a1dff3c98fbda00000000000000000000000000000000000000000000000004ec52ee64bdd008000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005696d61676500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004c68747470733a2f2f626c75727265642d6d756773686f74732e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f313734343333383731393538305f696d6167652e706e6700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000006636172626f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006656e657267790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000674696d62657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007706c6173746963000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002500000000000000000000000000000000000000000000000000000000000001070000000000000000000000000000000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000915468697320697320612070686f746f206f662061207265757361626c65206375702c20726561642061626f757420746865207374756479206f6e20696d706163747320686572653a2068747470733a2f2f6b6565706375702d73747564792e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f4b6565704375702b4c43412b5265706f72742e706466000000000000000000000000000000\", \"maxFeePerGas\": \"0x0\", \"maxPriorityFeePerGas\": \"0x0\", \"nonce\": \"0xb2f1e00c44e90a8e\", \"r\": \"0x0\", \"s\": \"0x0\", \"to\": \"0xb6f43457600b1f3b7b98fc4394a9f1134ffc721d\", \"transactionIndex\": \"0x0\", \"type\": \"0x0\", \"v\": \"0x0\", \"value\": \"0x0\", \"yParity\": \"0x0\" }, code=BAD_DATA, version=6.14.0)",
    "level": "warn",
    "message": "Failed to fetch the block",
    "providerUrl": "https://rpc-mainnet.vechain.energy",
    "service": "LibSourcify",
    "timestamp": "2025-05-27T13:50:46.578Z"
}
  • Technicall details:
    The nonce: 0xb2f1e00c44e90a8e -> 0<12894333551438793358 < 18446744073709551615 [Uint64]

  • The impact of this issue is significant, as the monitoring process remains blocked until the nonce validation is correctly performed. This disrupts the normal execution flow and may affect critical systems that rely on a continuous sequence of transactions.

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 with the monitor service and its block-fetch path, using the Docker reproduction with monitorChains.json and config.json for VeChain Mainnet. Reproduce the failure at block 21380962 and trace how the logged nonce is parsed. Done means the block fetch succeeds and contracts in that block can be analyzed without rejecting the valid uint64 nonce.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.