Skip to content

Move functionality to BlockChainSource: t-address rpcs#1065

Merged
AloeareV merged 11 commits intodevfrom
move_functionality_to_block_chain_source_unit_test_prerequisite_t_address_rpcs
Apr 28, 2026
Merged

Move functionality to BlockChainSource: t-address rpcs#1065
AloeareV merged 11 commits intodevfrom
move_functionality_to_block_chain_source_unit_test_prerequisite_t_address_rpcs

Conversation

@idky137
Copy link
Copy Markdown
Contributor

@idky137 idky137 commented Apr 27, 2026

Sub-tasks / status:

  • 1: Move source.rs code into sub-modules for ease of future development and review.
  • 2: Add new methods to BlockChainSource trait.
  • 3: Implement new methods in ValidatorConnector.
  • 4: Implement new methods in MockChainSource.
  • 5: Add new methods to ChainIndex / ValidatorBackedChainIndex.
  • 6: Add new MockChainSource tests.
  • 7: Update get_raw_transaction implementation in backends::{fetch::FetchService, state::StateService} (required as this is used by the transparent address history methods, functionality already present in ChainIndex, just not wired in).
  • 8: Update implementations in backends::{fetch::FetchService, state::StateService}.
  • 9: Add CHANGELOG entry.

NOTE: 58ca906 does not contain any code changes, it only moves current code in source.rs into sub-modules. To view the true code diff exclude this commit from the diff view. This artificially inflates the size (line changes) of this PR.

@idky137 idky137 changed the title Move functionality to block chain source unit test prerequisite t address rpcs Move functionality to BlockChainSource: t-address rpcs Apr 27, 2026
Comment thread packages/zaino-state/src/chain_index/source/mockchain_source.rs Outdated
@idky137 idky137 marked this pull request as ready for review April 28, 2026 11:52
@idky137
Copy link
Copy Markdown
Contributor Author

idky137 commented Apr 28, 2026

NOTE: This is ready for review but I have not managed to test this end-to-end locally as the integration tests are not passing on my machine. This behaviour is present on dev so not related to this PR, but a separate change made over the last few weeks (unknown). (#1073)

@idky137 idky137 requested review from AloeareV and pacu April 28, 2026 11:56
@AloeareV AloeareV self-assigned this Apr 28, 2026
AloeareV
AloeareV previously approved these changes Apr 28, 2026
Copy link
Copy Markdown
Contributor

@AloeareV AloeareV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Copy link
Copy Markdown
Contributor

@AloeareV AloeareV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapproving after some clippy fixes

@AloeareV AloeareV merged commit fb0d20a into dev Apr 28, 2026
4 checks passed
zancas added a commit that referenced this pull request Apr 30, 2026
… split merge

                                                     · esc to interrupt
  The merge from `dev` (#1065) split `chain_index/source.rs` into a `source/`
  directory without reconciling this branch's #1037 / mempool_skew work, which
  had been written against the old layout. Restore the dropped pieces on
  `source/mockchain_source.rs`:

    * `mine_blocks_silent` and `active_block_hash` inherent methods, lifted
      from a5ff985 / 934ce01.
    * `change_broadcast` field + init in both ctors, `mine_blocks` send on
      actual advance, and the `change_subscribe` override — the broadcast
      plumbing 901afc1 added on the old `source.rs`. Without it,
      `mine_blocks` and `mine_blocks_silent` were behaviourally identical
      and consumers fell through to the trait default's `None`.

  Fix `tests/mockchain_tests.rs`: import `BlockchainSource` (t-address RPCs
  became trait methods in #1065) and `GetAddressDeltasParams` / `Response`.

  Add a regression test adjacent to the methods (`mod mine_blocks`) pinning
  the broadcast contract directly, so future drift surfaces at the source
  instead of as flake in the skew tests.

  Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Move transparent address RPCs to BlockChainSource

3 participants