Skip to content

Comments

fix(chain_query_interface): flakes#610

Draft
dorianvp wants to merge 6 commits intodevfrom
repro-flake-chainquery
Draft

fix(chain_query_interface): flakes#610
dorianvp wants to merge 6 commits intodevfrom
repro-flake-chainquery

Conversation

@dorianvp
Copy link
Member

@dorianvp dorianvp commented Oct 20, 2025

Motivation

We're using the wrong polling strategies.

Solution

Tests

Specifications & References

https://docs.rs/zebra-rpc/latest/src/zebra_rpc/sync.rs.html

Follow-up Work

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.

@dorianvp
Copy link
Member Author

dorianvp commented Oct 20, 2025

Down to 1 failing test. Now sync_large_chain_zebrad is the only one that is failing from chain_query_interface, with the following error:

2025-10-20T17:09:24.634398597Z  INFO zaino_state::local_cache::non_finalised_state: Block at height [157] with hash [654d67eb886573c462d42f80e78add9b8a713ce747a1004247c326aadf00110f] successfully committed to non-finalised state.
2025-10-20T17:09:25.280204377Z  WARN zebra_state::response: non-finalized state receiver closed, ending task error=RecvError(())
test chain_query_interface::sync_large_chain_zebrad has been running for over 60 seconds
2025-10-20T17:14:24.385664179Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database SST files to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
2025-10-20T17:14:24.385713461Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database WAL buffer to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
2025-10-20T17:14:24.38578217Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database SST files to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
2025-10-20T17:14:24.385790145Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database WAL buffer to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
2025-10-20T17:14:24.385796517Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database SST files to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
2025-10-20T17:14:24.385801927Z  INFO zebra_state::service::finalized_state::disk_db: unexpected error flushing database WAL buffer to disk during shutdown error="Error { message: \"Not implemented: Not supported operation in secondary mode.\" }" path="/tmp/.tmpAU3pJ8/state/v27/regtest"
test chain_query_interface::sync_large_chain_zebrad ... FAILED

failures:

failures:
    chain_query_interface::sync_large_chain_zebrad

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 11 filtered out; finished in 320.37s

stderr ───
[zaino-state/src/chain_index/non_finalised_state.rs:266:9] &start_block = None
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 2
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 0
[zaino-state/src/chain_index/non_finalised_state.rs:299:9] &new_blocks.len() = 5
RPC error: RpcError { code: -8, message: "block height not in best chain", data: None }
StateService fallback triggered due to: Custom error: Error retrieving block from ReadStateService
RPC error: RpcError { code: -8, message: "block height not in best chain", data: None }
StateService fallback triggered due to: Custom error: Error retrieving block from ReadStateService
RPC error: RpcError { code: -8, message: "block height not in best chain", data: None }
StateService fallback triggered due to: Custom error: Error retrieving block from ReadStateService
RPC error: RpcError { code: -8, message: "block height not in best chain", data: None }

@dorianvp dorianvp changed the title [DO NOT MERGE]: flake repro fix(chain_query_interface): flakes Oct 20, 2025
@dorianvp dorianvp linked an issue Oct 23, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flakes in chain_query_interface tests

2 participants