Skip to content

@odatano/nightgate 0.25.2

Choose a tag to compare

@maxalexweber1 maxalexweber1 released this 23 Sep 09:35
· 57 commits to main since this release
825356f

@odatano/nightgate 0.25.2

One RPC call fewer per block. No schema change, no migration.

The crawler asked the node for the runtime version of every block it fetched,
state_getRuntimeVersion(hash), eight of them in each batch frame. A
Substrate node keeps two runtime instances compiled; for a block under any
other runtime it loads that block's :code from historical state and
compiles the WASM again, every call, and drops it straight after. Against the
public preprod RPC that was 2 to 8 seconds per call for every block behind the
runtime upgrade at height 1,568,000, so a frame took 17 to 38 seconds against
a 30 second timeout. The catch-up fell from 20 to 0.5 blocks per second at
that height, and stayed there, while every timeout read as transient and every
retry went through.

The frame now reads System.LastRuntimeUpgrade instead, a storage read like
the timestamp and the events, milliseconds at any height. It carries the
runtime's spec version, so an upgrade still applies from its first block; the
node is asked for the version once per distinct value, and stays the
authority; an answer that disagrees with the value (the block carrying an
upgrade still reports the previous one) is used for that block only, never
cached. A block without that storage (a pruned or racing node) is asked per
block, as before, and refused when that fails too.

A batch-frame timeout now names the frame, in a batch frame of N calls. The
old message named the first call in it, chain_getBlock, for a frame that was
waiting on something else.

Full Changelog: v0.25.1...v0.25.2