Move functionality into blockchainsource, merge indexer services, unlock widespread mock based testing.#1361
Move functionality into blockchainsource, merge indexer services, unlock widespread mock based testing.#1361idky137 wants to merge 14 commits into
Conversation
…o_blockchainsource # Conflicts: # live-tests/e2e/tests/devtool.rs # live-tests/e2e/tests/test_vectors.rs # packages/zaino-state/src/backends.rs # packages/zaino-state/src/backends/state.rs # packages/zaino-state/src/chain_index.rs # packages/zaino-state/src/chain_index/source/validator_connector.rs # packages/zaino-state/src/indexer/node_backed_indexer.rs
|
The failing "Integration tests / Build zallet" checks are not caused by this PR. The zallet compile itself succeeds; the jobs die in a later workflow step, "Stage vendored db_dump", which looks for the The same step fails identically on unrelated zaino PRs (for example #1381, forty minutes earlier), and every |
|
A second CI-relevant finding, and this one is introduced by the PR (deterministic — reproduced twice in omnibus runs and once in isolation): Cause. The test runs the shared suite with Recommendation. Unify on the local computation — it matches the old StateService and zcashd, and the suite's "don't delegate component extraction to a remote actor" rationale does not apply to a local derivation. Concretely:
|
Moves all chain fetch in
zaino-statebehind theValidatorConnectortrait, making the whole crate mock testable.Zcash RPCvsReadStateService) currently held inzaino-state::backends::{state, fetch}intoBlockChainSource / ValidatorConnector.StateServiceandFetchServiceinto unifiedNodeBackedIndexerService.Remaining work (not in this PR):
MockChainSourceuses - currently the mock data held is insufficient to full test zaino state, the test data should be updated to a 1500 block chain containing transparent, sapling, orchard and ironwood transactions. (test vector builder code held inlive-tests/e2e/tests/test_vectors.rs).NOTE: This PR bcame much larger than I had anticipated, if it is too large to review / merge in its current form I am happy to divide it into several smaller PRS:
9923aaa
2.n move StateService/FetchService functionality into ValidatorConnector:
abbeb86
c7671b8
2a4df3f
4b2c231
91c3772
68cb4fb
68cb4fb
179feab
60a8dc2
511fe58
9c697ee
6d838c0