Spun out of a review discussion on #649 (thanks @Cosmos-Harry).
Problem: The rustdoc on IndexerSection::read_state_service (zallet-core/src/config.rs) says:
The JSON-RPC settings above are still required: they are used for mempool access, transaction submission, and any non-best-chain block reads.
For the zebra backend this is wrong: backends/zebra/src/chain/reader.rs serves ReadRequest::AnyChainBlock and ReadRequest::AnyChainTransaction (including AnyTx::Side) locally via ReadStateService, with no JSON-RPC fallback — zebrad's local non-finalized state tracks side chains, so non-best-chain reads stay local. So the zebra backend uses JSON-RPC only for the mempool and transaction submission.
The comment appears to describe the zaino backend's behavior instead (whose non-best-chain read path was not verified here). Since this field applies to both backends, the rustdoc should be corrected to be backend-accurate.
Impact: This rustdoc flows into the generated zallet example-config output and the book's configuration reference, so the fix needs the trycmd fixture regenerated (TRYCMD=overwrite … --features zcashd-import). The book's setup guide has already been corrected for the zebra case in #649.
To do:
- Verify the
zaino backend's non-best-chain read path (does it use JSON-RPC, even with read_state_service configured?).
- Rewrite the field rustdoc to state each backend's actual JSON-RPC usage.
- Regenerate the example-config fixture.
Filed with AI assistance (Claude); zebra path verified against reader.rs.
Spun out of a review discussion on #649 (thanks @Cosmos-Harry).
Problem: The rustdoc on
IndexerSection::read_state_service(zallet-core/src/config.rs) says:For the
zebrabackend this is wrong:backends/zebra/src/chain/reader.rsservesReadRequest::AnyChainBlockandReadRequest::AnyChainTransaction(includingAnyTx::Side) locally viaReadStateService, with no JSON-RPC fallback —zebrad's local non-finalized state tracks side chains, so non-best-chain reads stay local. So the zebra backend uses JSON-RPC only for the mempool and transaction submission.The comment appears to describe the
zainobackend's behavior instead (whose non-best-chain read path was not verified here). Since this field applies to both backends, the rustdoc should be corrected to be backend-accurate.Impact: This rustdoc flows into the generated
zallet example-configoutput and the book's configuration reference, so the fix needs the trycmd fixture regenerated (TRYCMD=overwrite … --features zcashd-import). The book's setup guide has already been corrected for the zebra case in #649.To do:
zainobackend's non-best-chain read path (does it use JSON-RPC, even withread_state_serviceconfigured?).Filed with AI assistance (Claude); zebra path verified against
reader.rs.