Skip to content

Missing and delayed blocks on parachains #2158

@josepot

Description

@josepot

This issue is a followup of this discussion.

On parachains smoldot reports new blocks with a considerable delay, and it never seems to report blocks that are not part of the current best-block chain.

I have created a small script to dig deeper into this.

What the script does is to subscribe to the new blocks received by both the smoldot and a centralized RPC for some blocks, and at the end it compares the blocks that smoldot did not report.

I'm attaching the logs of a particular run:

And this is the output of said run:

Blocks that smoldot did not report:
{
  hash: "0xed87ee644095072d48c1b9eb0b023284dc4e4fceb68fadd75e17b771ca5edaa5",
  height: 9484930,
}
{
  hash: "0x816fcd370dc0479bc5c7cccd9b4b7e7288c67e764e32bc62861da7f20fe34a18",
  height: 9484931,
}
{
  hash: "0xfe46486dc4016f090fa6bd1059d7ed85bcd52ca929314f4bc16d138bcbaadcee",
  height: 9484932,
}
{
  hash: "0xaa2ed7ad331db94cb8db95588fd1566da99d2994afe27f5bbc5ef56ca959b9ca",
  height: 9484932,
}
{
  hash: "0x25f11905d5459bc9d6b98719f12837feabe60160edd12edb7d20e3798c1de666",
  height: 9484934,
}
{
  hash: "0xf62e41976f7749f21966451d7454732e608956607f49c22fedb86db92fce2f5f",
  height: 9484936,
}
{
  hash: "0xea1cd36afacd2aeddc97f75c6f49fe5335c2c42cb9fbbf88f3660c71de6334e6",
  height: 9484936,
}
{
  hash: "0xb9cda13896522a63977509978e147abdfa316ff5c11d70425a4d709a8d51d27c",
  height: 9484937,
}
{
  hash: "0xfd3d304075efbe874f66c7a5b756d811303432dca283ecb682ba224acc046a0c",
  height: 9484949,
}
{
  hash: "0xef578e60ab5ba3ecf603a371b2539e8e4b8df3cf361c51fc0258c83ace3da829",
  height: 9484953,
}
{
  hash: "0x07c0a6de0dec62ed232049b7939cb939f3264e521d503becf3b2ee131be98935",
  height: 9484957,
}
{
  hash: "0x8ebe28fd4fb82eb05f03fed86ee897de5f47b0d990643fe17f45afb320bc8dd6",
  height: 9484958,
}

In the smoldot logs, we can see that smoldot actually received all those blocks that it didn't report. For instance:

2025-08-14T13:23:06.662Z (4)-network
block-announce-received; chain=asset-hub-polkadot, peer_id=12D3KooWLHqbcQtoBygf7GJgVjVa3TaeLuf7VbicNdooaCmQM2JZ, block_hash=0xed87…daa5, is_best=false

...

2025-08-14T13:23:06.711Z (4)-network
block-announce-received; chain=asset-hub-polkadot, peer_id=12D3KooWL8CyLww3m3pRySQGGYGNJhWDMqko3j5xi67ckP7hDUvo, block_hash=0xed87…daa5, is_best=false

In fact, it received them practically at the same time as the Websocket RPC reported them:

1-2025-08-14T13:23:06.668Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"GeazAC1aFkxQQIgq","result":{"event":"newBlock","blockHash":"0xed87ee644095072d48c1b9eb0b023284dc4e4fceb68fadd75e17b771ca5edaa5","parentBlockHash":"0x98b95086cf2f4e8a8811d8f59eaf64cdf55f2440e5dbae9904a5fb4cd1ec975f","newRuntime":null}}}

Also, looking at the logs of the Smoldot JSON-RPC logs we can appreciate 2 things that seem to indicate that there is an issue:

  1. The prunedBlockHashes on the finalized event is always an empty array.
  2. For the blocks that smoldot actually reported via the newBlock event, all those blocks are always reported at least 12secs after smoldot actually received them. For instance:
  • Block 0xf9114a1759a98cf34ce6a4669c651895a648afa9a8f29306f4e2e3f88b9b24db, 12 secs delay:
2025-08-14T13:28:30.680Z (4)-network
block-announce-received; chain=asset-hub-polkadot, peer_id=12D3KooWKKwTrkSUckCcXg5Bm65TdbU4BLwwsSufZFA4GXayxp4N, block_hash=0xf911…24db, is_best=false
1-2025-08-14T13:28:42.411Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"CvsnHxNCYRW8LBBiiUfok4x3nGkjc6R54XR8SSN532qo","result":{"event":"newBlock","blockHash":"0xf9114a1759a98cf34ce6a4669c651895a648afa9a8f29306f4e2e3f88b9b24db","parentBlockHash":"0xbe1969cb6d5d723a371ff63fa6297568246b7eebe2e69c161af0d5d0d8ad8d6f","newRuntime":null}}}
  • Block 0xbe1969cb6d5d723a371ff63fa6297568246b7eebe2e69c161af0d5d0d8ad8d6f, 12 secs delay:
2025-08-14T13:28:18.708Z (4)-network
block-announce-received; chain=asset-hub-polkadot, peer_id=12D3KooWEyGg3oUwYfaLWM5AJ2pvXCUxBuXNapX1tQXLsbDmMV6z, block_hash=0xbe19…8d6f, is_best=true
1-2025-08-14T13:28:30.430Z-<<-{"jsonrpc":"2.0","method":"chainHead_v1_followEvent","params":{"subscription":"CvsnHxNCYRW8LBBiiUfok4x3nGkjc6R54XR8SSN532qo","result":{"event":"newBlock","blockHash":"0xbe1969cb6d5d723a371ff63fa6297568246b7eebe2e69c161af0d5d0d8ad8d6f","parentBlockHash":"0xe5b841be04f87403f4cfca40dbe76730d62a091bdf8190d8ff74cebef9625069","newRuntime":null}}}

This seems to suggest that they are being reported one block behind of the actual tip of the chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions