AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
134 stars 80 forks source link

Head of the chain is erroneous when pointed at an indexer #725

Closed Tbaut closed 6 months ago

Tbaut commented 6 months ago

Follow up of https://github.com/AcalaNetwork/chopsticks/pull/719#issuecomment-2034111586

my config: https://github.com/ChainSafe/Multix/blob/tbaut-bump-subsquid/chopsticks-config.yml

Running with the following

LOG_LEVEL=trace yarn start --runtime-log-level 5 --config ./kusama.yml
[11:11:00.108] INFO: Kusama RPC listening on port 8000
    app: "chopsticks"

Although both indexer and chopsticks are running starting from block 22568290, somehow chopsticks end up telling the indexer that we're at block 22578439 although we didn't produce any block, see last line.

17:16:31 INFO  sqd:processor processing blocks from 22568290
17:16:31 INFO  sqd:processor using chain RPC data source
17:16:31 INFO  sqd:processor prometheus metrics are served at port 37201
17:16:38 INFO  sqd:processor 22578439 / 22578439, rate: 1543 blocks/sec, mapping: 67 blocks/sec, 67 items/sec, eta: 0s

here is the trace:

[18:25:30.825] DEBUG (plugin): Registered plugin CLI: decode-key
    app: "chopsticks"
[18:25:30.913] DEBUG (plugin): Registered plugin CLI: dry-run
    app: "chopsticks"
[18:25:30.934] DEBUG (plugin): Registered plugin CLI: follow-chain
    app: "chopsticks"
[18:25:30.966] DEBUG (plugin): Registered plugin CLI: run-block
    app: "chopsticks"
[18:25:31.008] DEBUG (plugin): Registered plugin CLI: trace-transaction
    app: "chopsticks"
[18:25:31.016] DEBUG (plugin): Registered plugin CLI: try-runtime
    app: "chopsticks"
[18:25:31.063] DEBUG: Setup options
    app: "chopsticks"
    endpoint: "wss://kusama.rpc.amforc.com"
    block: 22568290
    buildBlockMode: "Batch"
    db: {
      "datasource": {}
    }
    mockSignatureHost: true
    runtimeLogLevel: 5
[18:25:31.285] DEBUG: Args
    app: "chopsticks"
    endpoint: "wss://kusama.rpc.amforc.com"
    block: 22568290
    buildBlockMode: "Batch"
    db: {
      "datasource": {}
    }
    mockSignatureHost: true
    runtimeLogLevel: 5
    blockHash: "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
[18:25:31.326] TRACE (layer): RemoteStorageLayer get
    app: "chopsticks"
    at: "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
    key: "0x3a636f6465"
[18:25:33.355] TRACE (executor): taskRun
    app: "chopsticks"
    wasm: "0x52bc537646db8e0528b52ffd0058dcd1…325c0330e3953432296edfe533187f03"
    calls: [
      [
        "Metadata_metadata",
        []
      ]
    ]
    mockSignatureHost: true
    allowUnresolvedImports: false
    runtimeLogLevel: 5
[18:25:34.415] TRACE (executor): taskResponse
    app: "chopsticks"
    result: "0xb20113006d6574610e350e000c1c7370…696f6e5061796d656e742d0e8d01310e"
    storageDiff: []
    offchainStorageDiff: []
    runtimeLogs: []
[18:25:35.016] TRACE: OverrideStorage
    app: "chopsticks"
    blockHash: "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
    storage: {
      "System": {
        "Account": [
          [
            [
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            {
              "providers": 1,
              "data": {
                "free": "10000000000000000000"
              }
            }
          ],
          [
            [
              "JEqfw2FPda5eycsqqXN2Ay67eEh5R85aSHcArs3XdUYjj5H"
            ],
            {
              "providers": 1,
              "data": {
                "free": "10000000000000000000"
              }
            }
          ],
          [
            [
              "JF3RaX21TrQuPrRbEV7i1iT5QXNQZBN6qvKx3iZN8CEN9bB"
            ],
            {
              "providers": 1,
              "data": {
                "free": "10000000000000000000"
              }
            }
          ],
          [
            [
              "HxehWqUZGorCrahv3PiWWqdcFNBG9oQhZ2ft5VXueWaSBEs"
            ],
            {
              "providers": 1,
              "data": {
                "free": "10000000000000000000"
              }
            }
          ]
        ]
      },
      "FellowshipCollective": {
        "$removePrefix": [
          "IdToIndex",
          "IndexToId",
          "MemberCount",
          "Members"
        ],
        "IdToIndex": [
          [
            [
              0,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              1,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              2,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              3,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              4,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              5,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              6,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ],
          [
            [
              7,
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            0
          ]
        ],
        "IndexToId": [
          [
            [
              0,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              1,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              2,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              3,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              4,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              5,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              6,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ],
          [
            [
              7,
              0
            ],
            "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
          ]
        ],
        "MemberCount": [
          [
            [
              0
            ],
            1
          ],
          [
            [
              1
            ],
            1
          ],
          [
            [
              2
            ],
            1
          ],
          [
            [
              3
            ],
            1
          ],
          [
            [
              4
            ],
            1
          ],
          [
            [
              5
            ],
            1
          ],
          [
            [
              6
            ],
            1
          ],
          [
            [
              7
            ],
            1
          ]
        ],
        "Members": [
          [
            [
              "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
            ],
            {
              "rank": 7
            }
          ]
        ],
        "Voting": []
      },
      "ParasDisputes": null
    }
[18:25:35.017] DEBUG (ws): Try starting on port 8000
    app: "chopsticks"
[18:25:35.045] INFO: Kusama RPC listening on port 8000
    app: "chopsticks"
[18:26:25.010] DEBUG (ws): New connection
    app: "chopsticks"
[18:26:25.016] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 1,
      "jsonrpc": "2.0",
      "method": "chain_getFinalizedHead",
      "params": []
    }
[18:26:25.016] TRACE (ws): Received message
    app: "chopsticks"
    id: 1
    method: "chain_getFinalizedHead"
[18:26:25.016] TRACE (rpc): Handling chain_getFinalizedHead
    app: "chopsticks"
[18:26:25.016] TRACE (ws): Response for request
    app: "chopsticks"
    id: 1
    method: "chain_getFinalizedHead"
    result: "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
[18:26:25.021] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 2,
      "jsonrpc": "2.0",
      "method": "chain_getHeader",
      "params": [
        "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
      ]
    }
[18:26:25.021] TRACE (ws): Received message
    app: "chopsticks"
    id: 2
    method: "chain_getHeader"
[18:26:25.021] TRACE (rpc): Handling chain_getHeader
    app: "chopsticks"
[18:26:25.052] TRACE (ws): Response for request
    app: "chopsticks"
    id: 2
    method: "chain_getHeader"
    result: {
      "parentHash": "0x88479bb55ea490a0debc42f8220ada66d7724dc9addf76536420daea3e697d7b",
      "number": "0x01585d62",
      "stateRoot": "0xdb73e32e4442a4b1515cb1a76b7c5ec3cdd063a5baa80d2d54e98c1daa757246",
      "extrinsicsRoot": "0xfe59f4a6cc065974bbfd0a7c315b828abce857a19f15cc47357b324b14b2da65",
      "digest": {
        "logs": [
          "0x0642414245b501013600000011160211…8c99a217ca7fbfe9e3f390675c4ca803",
          "0x04424545468403828dbe644a821f6bec…bcc81c351c80c4e5a87b81ab92e2fbad",
          "0x054241424501018c0daaf1ea7ba60c9e…12fa776379d224fc3bfe9e22c3932383"
        ]
      }
    }
[18:26:25.062] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 3,
      "jsonrpc": "2.0",
      "method": "chain_getFinalizedHead",
      "params": []
    }
[18:26:25.062] TRACE (ws): Received message
    app: "chopsticks"
    id: 3
    method: "chain_getFinalizedHead"
[18:26:25.062] TRACE (rpc): Handling chain_getFinalizedHead
    app: "chopsticks"
[18:26:25.062] TRACE (ws): Response for request
    app: "chopsticks"
    id: 3
    method: "chain_getFinalizedHead"
    result: "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
[18:26:25.063] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 4,
      "jsonrpc": "2.0",
      "method": "chain_getHeader",
      "params": [
        "0xd1a4a66b79225bfde5c6065fa8932834de607ac040f9a9842e85794129840d5b"
      ]
    }
[18:26:25.063] TRACE (ws): Received message
    app: "chopsticks"
    id: 4
    method: "chain_getHeader"
[18:26:25.063] TRACE (rpc): Handling chain_getHeader
    app: "chopsticks"
[18:26:25.063] TRACE (ws): Response for request
    app: "chopsticks"
    id: 4
    method: "chain_getHeader"
    result: {
      "parentHash": "0x88479bb55ea490a0debc42f8220ada66d7724dc9addf76536420daea3e697d7b",
      "number": "0x01585d62",
      "stateRoot": "0xdb73e32e4442a4b1515cb1a76b7c5ec3cdd063a5baa80d2d54e98c1daa757246",
      "extrinsicsRoot": "0xfe59f4a6cc065974bbfd0a7c315b828abce857a19f15cc47357b324b14b2da65",
      "digest": {
        "logs": [
          "0x0642414245b501013600000011160211…8c99a217ca7fbfe9e3f390675c4ca803",
          "0x04424545468403828dbe644a821f6bec…bcc81c351c80c4e5a87b81ab92e2fbad",
          "0x054241424501018c0daaf1ea7ba60c9e…12fa776379d224fc3bfe9e22c3932383"
        ]
      }
    }
[18:26:25.066] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 5,
      "jsonrpc": "2.0",
      "method": "chain_getBlockHash",
      "params": [
        "0x1585d62"
      ]
    }
[18:26:25.066] TRACE (ws): Received message
    app: "chopsticks"
    id: 5
    method: "chain_getBlockHash"
[18:26:25.066] TRACE (rpc): Handling chain_getBlockHash
    app: "chopsticks"
[18:26:25.093] TRACE (ws): Response for request
    app: "chopsticks"
    id: 5
    method: "chain_getBlockHash"
    result: "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
[18:26:25.095] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 6,
      "jsonrpc": "2.0",
      "method": "chain_getBlock",
      "params": [
        "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
      ]
    }
[18:26:25.095] TRACE (ws): Received message
    app: "chopsticks"
    id: 6
    method: "chain_getBlock"
[18:26:25.095] TRACE (rpc): Handling chain_getBlock
    app: "chopsticks"
[18:26:25.096] TRACE (layer): RemoteStorageLayer get
    app: "chopsticks"
    at: "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
    key: "0x3a636f6465"
[18:26:26.905] TRACE (executor): taskRun
    app: "chopsticks"
    wasm: "0x52bc537646db8e0528b52ffd0058dcd1…325c0330e3953432296edfe533187f03"
    calls: [
      [
        "Metadata_metadata",
        []
      ]
    ]
    mockSignatureHost: true
    allowUnresolvedImports: false
    runtimeLogLevel: 5
[18:26:27.157] TRACE (executor): taskResponse
    app: "chopsticks"
    result: "0xb20113006d6574610e350e000c1c7370…696f6e5061796d656e742d0e8d01310e"
    storageDiff: []
    offchainStorageDiff: []
    runtimeLogs: []
[18:26:27.341] TRACE (ws): Response for request
    app: "chopsticks"
    id: 6
    method: "chain_getBlock"
    result: {
      "block": {
        "header": {
          "parentHash": "0xe513183cf68aae1877c1f0a9a9f42bcc43a34fc402000cb16abbcaef82f93314",
          "number": "0x015887c0",
          "stateRoot": "0xc23885760b45c941568f98f940df2b0e8406c8a7534dcf054eec9214090e6eed",
          "extrinsicsRoot": "0xee3a1c6a3524b6fffbfc2462cbd727208e8fd45f14dce081b5ddb19864fe3e5e",
          "digest": {
            "logs": [
              "0x0642414245b501016201000088400211…1bc6e453a931092e9547788f5013c200",
              "0x04424545468403da208f6e4c6f14f2df…db70894ad05fb8e4804e18d28cd66d65",
              "0x05424142450101e8449ad56a21b44710…35c1afe29a49e9cffabcd9d770d61c8b"
            ]
          }
        },
        "extrinsics": [
          "0x280402000b8073c8a48e01",
          "0xa2900200043600b10491015d40944300…149649433855b269a9994b642d863f8b"
        ]
      },
      "justifications": null
    }
[18:26:27.344] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 7,
      "jsonrpc": "2.0",
      "method": "state_getStorageAt",
      "params": [
        "0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7",
        "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
      ]
    }
[18:26:27.344] TRACE (ws): Received message
    app: "chopsticks"
    id: 7
    method: "state_getStorageAt"
[18:26:27.344] TRACE (rpc): Handling state_getStorageAt
    app: "chopsticks"
[18:26:27.345] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 8,
      "jsonrpc": "2.0",
      "method": "state_getRuntimeVersion",
      "params": [
        "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
      ]
    }
[18:26:27.345] TRACE (ws): Received message
    app: "chopsticks"
    id: 8
    method: "state_getRuntimeVersion"
[18:26:27.345] TRACE (rpc): Handling state_getRuntimeVersion
    app: "chopsticks"
[18:26:27.346] TRACE (ws): Response for request
    app: "chopsticks"
    id: 8
    method: "state_getRuntimeVersion"
    result: {
      "specName": "kusama",
      "implName": "parity-kusama",
      "authoringVersion": 2,
      "specVersion": 1001003,
      "implVersion": 0,
      "apis": [
        [
          "0xdf6acb689907609b",
          4
        ],
        [
          "0x37e397fc7c91f5e4",
          2
        ],
        [
          "0x40fe3ad401f8959a",
          6
        ],
        [
          "0xd2bc9897eed08f15",
          3
        ],
        [
          "0xf78b278be53f454c",
          2
        ],
        [
          "0xaf2c0297a23e6d3d",
          7
        ],
        [
          "0x49eaaf1b548a0cb0",
          3
        ],
        [
          "0x91d5df18b0d2cf58",
          2
        ],
        [
          "0x2a5e924655399e60",
          1
        ],
        [
          "0xed99c5acb25eedf5",
          3
        ],
        [
          "0xcbca25e39f142387",
          2
        ],
        [
          "0x687ad44ad37f03c2",
          1
        ],
        [
          "0xab3c0572291feb8b",
          1
        ],
        [
          "0xbc9d89904f5b923f",
          1
        ],
        [
          "0x37c8bb1350a9a2a8",
          4
        ],
        [
          "0xf3ff14d5ab527059",
          3
        ],
        [
          "0x17a6bc0d0062aeb3",
          1
        ],
        [
          "0x18ef58a3b67ba770",
          1
        ],
        [
          "0xfbc577b9d747efd6",
          1
        ]
      ],
      "transactionVersion": 25,
      "stateVersion": 1
    }
[18:26:27.347] TRACE (layer): RemoteStorageLayer get
    app: "chopsticks"
    at: "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
    key: "0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"
[18:26:27.408] TRACE (ws): Response for request
    app: "chopsticks"
    id: 7
    method: "state_getStorageAt"
    result: "0x9c0000000000000042b1204355170200…000000076bf34995da768b0200020000"
[18:26:27.412] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 9,
      "jsonrpc": "2.0",
      "method": "chain_getHeader",
      "params": [
        "0xe513183cf68aae1877c1f0a9a9f42bcc43a34fc402000cb16abbcaef82f93314"
      ]
    }
[18:26:27.412] TRACE (ws): Received message
    app: "chopsticks"
    id: 9
    method: "chain_getHeader"
[18:26:27.412] TRACE (rpc): Handling chain_getHeader
    app: "chopsticks"
[18:26:27.449] TRACE (layer): RemoteStorageLayer get
    app: "chopsticks"
    at: "0xe513183cf68aae1877c1f0a9a9f42bcc43a34fc402000cb16abbcaef82f93314"
    key: "0x3a636f6465"
[18:26:28.970] TRACE (executor): taskRun
    app: "chopsticks"
    wasm: "0x52bc537646db8e0528b52ffd0058dcd1…325c0330e3953432296edfe533187f03"
    calls: [
      [
        "Metadata_metadata",
        []
      ]
    ]
    mockSignatureHost: true
    allowUnresolvedImports: false
    runtimeLogLevel: 5
[18:26:29.195] TRACE (executor): taskResponse
    app: "chopsticks"
    result: "0xb20113006d6574610e350e000c1c7370…696f6e5061796d656e742d0e8d01310e"
    storageDiff: []
    offchainStorageDiff: []
    runtimeLogs: []
[18:26:29.262] TRACE (ws): Response for request
    app: "chopsticks"
    id: 9
    method: "chain_getHeader"
    result: {
      "parentHash": "0x83c4413f1b0cd0d57fa33dcdd4a49c35c79a697d649bd4f5b9f3a5d13df2e8e9",
      "number": "0x015887bf",
      "stateRoot": "0xdafbf462f5c5badb567b62a17105fe9c6d4dd7b86bd3144bc78b8ea7cf81ae8b",
      "extrinsicsRoot": "0x0da7cd400c32be2983e95ed5584870ef7f8da389d0ac32ff3d701a0492b63ca1",
      "digest": {
        "logs": [
          "0x0642414245b50103c000000087400211…86e129208a1ed784411495e42ba2ce0c",
          "0x04424545468403ade2d73d654499d878…c955cb567d5e0720132c1539dc8ff857",
          "0x05424142450101e4ec1b36906a3230e0…149649433855b269a9994b642d863f8b"
        ]
      }
    }
[18:26:29.265] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 10,
      "jsonrpc": "2.0",
      "method": "state_getRuntimeVersion",
      "params": [
        "0x83c4413f1b0cd0d57fa33dcdd4a49c35c79a697d649bd4f5b9f3a5d13df2e8e9"
      ]
    }
[18:26:29.265] TRACE (ws): Received message
    app: "chopsticks"
    id: 10
    method: "state_getRuntimeVersion"
[18:26:29.265] TRACE (rpc): Handling state_getRuntimeVersion
    app: "chopsticks"
[18:26:29.266] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 11,
      "jsonrpc": "2.0",
      "method": "state_getMetadata",
      "params": [
        "0x83c4413f1b0cd0d57fa33dcdd4a49c35c79a697d649bd4f5b9f3a5d13df2e8e9"
      ]
    }
[18:26:29.266] TRACE (ws): Received message
    app: "chopsticks"
    id: 11
    method: "state_getMetadata"
[18:26:29.266] TRACE (rpc): Handling state_getMetadata
    app: "chopsticks"
[18:26:29.296] TRACE (layer): RemoteStorageLayer get
    app: "chopsticks"
    at: "0x83c4413f1b0cd0d57fa33dcdd4a49c35c79a697d649bd4f5b9f3a5d13df2e8e9"
    key: "0x3a636f6465"
[18:26:31.011] TRACE (executor): taskRun
    app: "chopsticks"
    wasm: "0x52bc537646db8e0528b52ffd0058dcd1…325c0330e3953432296edfe533187f03"
    calls: [
      [
        "Metadata_metadata",
        []
      ]
    ]
    mockSignatureHost: true
    allowUnresolvedImports: false
    runtimeLogLevel: 5
[18:26:31.013] TRACE (ws): Response for request
    app: "chopsticks"
    id: 10
    method: "state_getRuntimeVersion"
    result: {
      "specName": "kusama",
      "implName": "parity-kusama",
      "authoringVersion": 2,
      "specVersion": 1001003,
      "implVersion": 0,
      "apis": [
        [
          "0xdf6acb689907609b",
          4
        ],
        [
          "0x37e397fc7c91f5e4",
          2
        ],
        [
          "0x40fe3ad401f8959a",
          6
        ],
        [
          "0xd2bc9897eed08f15",
          3
        ],
        [
          "0xf78b278be53f454c",
          2
        ],
        [
          "0xaf2c0297a23e6d3d",
          7
        ],
        [
          "0x49eaaf1b548a0cb0",
          3
        ],
        [
          "0x91d5df18b0d2cf58",
          2
        ],
        [
          "0x2a5e924655399e60",
          1
        ],
        [
          "0xed99c5acb25eedf5",
          3
        ],
        [
          "0xcbca25e39f142387",
          2
        ],
        [
          "0x687ad44ad37f03c2",
          1
        ],
        [
          "0xab3c0572291feb8b",
          1
        ],
        [
          "0xbc9d89904f5b923f",
          1
        ],
        [
          "0x37c8bb1350a9a2a8",
          4
        ],
        [
          "0xf3ff14d5ab527059",
          3
        ],
        [
          "0x17a6bc0d0062aeb3",
          1
        ],
        [
          "0x18ef58a3b67ba770",
          1
        ],
        [
          "0xfbc577b9d747efd6",
          1
        ]
      ],
      "transactionVersion": 25,
      "stateVersion": 1
    }
[18:26:31.282] TRACE (executor): taskResponse
    app: "chopsticks"
    result: "0xb20113006d6574610e350e000c1c7370…696f6e5061796d656e742d0e8d01310e"
    storageDiff: []
    offchainStorageDiff: []
    runtimeLogs: []
[18:26:31.312] TRACE (ws): Response for request
    app: "chopsticks"
    id: 11
    method: "state_getMetadata"
    result: "0x6d6574610e350e000c1c73705f636f72…696f6e5061796d656e742d0e8d01310e"
[18:26:31.423] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 12,
      "jsonrpc": "2.0",
      "method": "chain_subscribeFinalizedHeads",
      "params": []
    }
[18:26:31.424] TRACE (ws): Received message
    app: "chopsticks"
    id: 12
    method: "chain_subscribeFinalizedHeads"
[18:26:31.424] TRACE (rpc): Handling chain_subscribeFinalizedHeads
    app: "chopsticks"
[18:26:31.424] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 13,
      "jsonrpc": "2.0",
      "method": "chain_subscribeNewHeads",
      "params": []
    }
[18:26:31.424] TRACE (ws): Received message
    app: "chopsticks"
    id: 13
    method: "chain_subscribeNewHeads"
[18:26:31.424] TRACE (rpc): Handling chain_subscribeNewHeads
    app: "chopsticks"
[18:26:31.424] TRACE (ws): Response for request
    app: "chopsticks"
    id: 12
    method: "chain_subscribeFinalizedHeads"
    result: "08yc68p9ou0l"
[18:26:31.425] TRACE (ws): Response for request
    app: "chopsticks"
    id: 13
    method: "chain_subscribeNewHeads"
    result: "1rkr8f2vgqp"
[18:26:31.475] TRACE (ws): Subscription notification
    app: "chopsticks"
    method: "chain_finalizedHead"
    subid: "08yc68p9ou0l"
    data: {
      "parentHash": "0x88479bb55ea490a0debc42f8220ada66d7724dc9addf76536420daea3e697d7b",
      "number": "0x01585d62",
      "stateRoot": "0xdb73e32e4442a4b1515cb1a76b7c5ec3cdd063a5baa80d2d54e98c1daa757246",
      "extrinsicsRoot": "0xfe59f4a6cc065974bbfd0a7c315b828abce857a19f15cc47357b324b14b2da65",
      "digest": {
        "logs": [
          "0x0642414245b501013600000011160211…8c99a217ca7fbfe9e3f390675c4ca803",
          "0x04424545468403828dbe644a821f6bec…bcc81c351c80c4e5a87b81ab92e2fbad",
          "0x054241424501018c0daaf1ea7ba60c9e…12fa776379d224fc3bfe9e22c3932383"
        ]
      }
    }
[18:26:31.476] TRACE (ws): Subscription notification
    app: "chopsticks"
    method: "chain_newHead"
    subid: "1rkr8f2vgqp"
    data: {
      "parentHash": "0x88479bb55ea490a0debc42f8220ada66d7724dc9addf76536420daea3e697d7b",
      "number": "0x01585d62",
      "stateRoot": "0xdb73e32e4442a4b1515cb1a76b7c5ec3cdd063a5baa80d2d54e98c1daa757246",
      "extrinsicsRoot": "0xfe59f4a6cc065974bbfd0a7c315b828abce857a19f15cc47357b324b14b2da65",
      "digest": {
        "logs": [
          "0x0642414245b501013600000011160211…8c99a217ca7fbfe9e3f390675c4ca803",
          "0x04424545468403828dbe644a821f6bec…bcc81c351c80c4e5a87b81ab92e2fbad",
          "0x054241424501018c0daaf1ea7ba60c9e…12fa776379d224fc3bfe9e22c3932383"
        ]
      }
    }
[18:26:31.477] TRACE (ws): Received single request
    app: "chopsticks"
    req: {
      "id": 14,
      "jsonrpc": "2.0",
      "method": "chain_getBlockHash",
      "params": [
        "0x1585d62"
      ]
    }
[18:26:31.477] TRACE (ws): Received message
    app: "chopsticks"
    id: 14
    method: "chain_getBlockHash"
[18:26:31.477] TRACE (rpc): Handling chain_getBlockHash
    app: "chopsticks"
[18:26:31.477] TRACE (ws): Response for request
    app: "chopsticks"
    id: 14
    method: "chain_getBlockHash"
    result: "0x96160ad1ceb9375d406c5c40bdc31ed4acd4f719824d0add570850498249e558"
ermalkaleci commented 6 months ago

@Tbaut are those logs from latest master?

ermalkaleci commented 6 months ago

return value for 0x1585d62 should be 0x9a5396ee2bee9f3c7d30c4ca19bff52992db72418cd5e31e44456bbb86af8c90 while you have different hash

Screenshot 2024-04-03 at 5 51 45 PM Screenshot 2024-04-03 at 5 51 53 PM
ermalkaleci commented 6 months ago

also make sure to delete ./db.sqlite to make sure you're not loading any wrong block

Tbaut commented 6 months ago

yes, it should have been latest master rebased on top of https://github.com/AcalaNetwork/chopsticks/pull/719 I just triple checked, and yup I removed db.sqlite* checked that your code from master was correct. I updated the first post with the output again, but it answers something different for 0x1585d62 still.

My config again:

endpoint: wss://kusama.rpc.amforc.com
mock-signature-host: true
block: 22568290
db: ./db.sqlite
# wasm-override: staging_kusama_runtime.wasm
runtime-log-level: 5

import-storage:
  System:
    Account:
      - - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
        - providers: 1
          data:
            free: '10000000000000000000'
      - - - JEqfw2FPda5eycsqqXN2Ay67eEh5R85aSHcArs3XdUYjj5H
        - providers: 1
          data:
            free: '10000000000000000000'
      - - - JF3RaX21TrQuPrRbEV7i1iT5QXNQZBN6qvKx3iZN8CEN9bB
        - providers: 1
          data:
            free: '10000000000000000000'
      - - - HxehWqUZGorCrahv3PiWWqdcFNBG9oQhZ2ft5VXueWaSBEs
        - providers: 1
          data:
            free: '10000000000000000000'
  FellowshipCollective:
    $removePrefix:
      - IdToIndex
      - IndexToId
      - MemberCount
      - Members
    IdToIndex:
      - [[0, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[1, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[2, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[3, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[4, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[5, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[6, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
      - [[7, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], 0]
    IndexToId:
      - [[0, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[1, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[2, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[3, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[4, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[5, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[6, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
      - [[7, 0], 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY]
    MemberCount:
      - [[0], 1]
      - [[1], 1]
      - [[2], 1]
      - [[3], 1]
      - [[4], 1]
      - [[5], 1]
      - [[6], 1]
      - [[7], 1]
    Members:
      - [[5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], rank: 7]
    Voting: []
  ParasDisputes:
    # $removePrefix: ['disputes'] # those can makes block building super slow
ermalkaleci commented 6 months ago

@Tbaut #722 wasn't handling incorrect bit length #727 should fix it

Tbaut commented 6 months ago

Thanks @ermalkaleci the latest master looks good indeed. Any chance you can publish a beta of it?

ermalkaleci commented 6 months ago

Yes

ermalkaleci commented 6 months ago

@Tbaut https://github.com/AcalaNetwork/chopsticks/actions/runs/8554936233/job/23441278696