nautechsystems/nautilus_trader · error

RPC tick {tick_value} topology mismatch: expected gross={} n

Error message

RPC tick {tick_value} topology mismatch: expected gross={} net={}, received gross={} net={} initialized={}

What it means

Per-tick comparison in validate_rpc_snapshot_topology: an expected tick's liquidity_gross, liquidity_net, or initialized flag disagrees with the RPC snapshot, meaning the RPC node's tick state diverges from the HyperSync-derived expectation.

Source

Thrown at crates/adapters/blockchain/src/data/core.rs:2152

                expected_tick_values.len(),
                actual_ticks.len()
            );
        }

        for tick_value in expected_tick_values {
            let expected_tick = profiler
                .get_tick(tick_value)
                .with_context(|| format!("missing replay tick {tick_value}"))?;
            let actual_tick = actual_ticks
                .get(&tick_value)
                .with_context(|| format!("RPC snapshot omitted tick {tick_value}"))?;

            if !actual_tick.initialized
                || actual_tick.liquidity_gross == 0
                || actual_tick.liquidity_gross != expected_tick.liquidity_gross
                || actual_tick.liquidity_net != expected_tick.liquidity_net
            {
                anyhow::bail!(
                    "RPC tick {tick_value} topology mismatch: expected gross={} net={}, received gross={} net={} initialized={}",
                    expected_tick.liquidity_gross,
                    expected_tick.liquidity_net,
                    actual_tick.liquidity_gross,
                    actual_tick.liquidity_net,
                    actual_tick.initialized
                );
            }
        }

        let mut derived_ticks: AHashMap<i32, (u128, i128)> = AHashMap::new();
        let mut active_liquidity = 0_u128;

        for position in &snapshot.positions {
            if position.tick_lower >= position.tick_upper
                || position.tick_lower < PoolTick::MIN_TICK
                || position.tick_upper > PoolTick::MAX_TICK
                || position.tick_lower % tick_spacing != 0

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Re-fetch the snapshot from a healthy RPC node
  2. Re-run HyperSync ingestion to refresh the expected tick state
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/blockchain/src/data/core.rs:2152 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/d7258ce443d6be16. Report an issue: GitHub.