Repository navigation
Conversation
`IndexNodeResolver::block_ptr_for_number` answered `Ok(None)` without a word when the network was not in the node's `BlockchainMap`, and the caller turns that into a `null` that reads the same as "no such block". A query node is the common case: `from_config_inner` gives it `Networks::noop()`, so it has no chains at all, and nothing at startup said so either. The resolver now logs the network and block number before answering, which matches the warning `resolve_cached_ethereum_calls` already emits for the same situation. `from_config_inner` logs that the node came up query-only, with its node id. The GraphQL answer is unchanged: still `null`, still `Ok(None)`. Only the silence is gone. Signed-off-by: Liang Xu <24490353+lx3133584@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IndexNodeResolver::block_ptr_for_numberansweredOk(None)without a word when the network was not in the node'sBlockchainMap. The caller turns that into anull, and from outside it reads the same as "no such block". The same function already logs a warning when a chain exists but the fetch fails, so this was the one silent path.The common case is a query node:
from_config_innergives a node whose id matches[general] queryaNetworks::noop(), so it has no chains at all, and nothing at startup said so either. An indexer-agent pointed at such a node reportsIE070 no data returned, and the search goes to the RPC and the EBO subgraph instead of to the node's role.Fix
Two log lines, no behaviour change:
resolver.rs: a warning naming the network and block number before theOk(None). It matches the oneresolve_cached_ethereum_callsalready emits for the same situation.network_setup.rs: an info at startup when the node comes up query-only, with its node id.The GraphQL answer is unchanged: still
null, stillOk(None).Testing
This is log-only, and
resolver.rshas no test harness:IndexNodeResolverneeds aBlockchainMap, aStoreand anamp::Client, so a test that captured theslogoutput would be mostly scaffolding around two lines. I verified the placement by reading the one path that reaches it instead — the warning sits after bothtry_resolve_for_chain!attempts miss and immediately before theOk(None)that ends the function, so no other route reaches that point.cargo check -p graph-node -p graph-server-index-node— cleancargo test -p graph-server-index-node— 9 passedcargo test -p graph-node --lib— 51 passedcargo test --workspace --exclude graph-tests— the commandjust test-unitruns, so the whole workspace and every target. 296 passed;gnd'sgnd_testfails 6 of 7, all atpgtemp'srun_db.rswithFailed to start initdb. Is it installed and on your path?— the test harness starts a throwaway PostgreSQL and this machine has the client library but not the server binaries. It fails before reaching any code.cargo fmt --all— no changecargo clippy --all-targets— no warnings, the same commandjust lintrunscargo check --release— clean, every crate in the workspace, the same commandjust check --releaserunsNot run: the integration tests, which need PostgreSQL on 5432, IPFS on 5001 and Anvil on 3021.
Fixes #6721