Skip to content

Test: code simplifications - #2481

Open
juan518munoz wants to merge 3 commits into
nextfrom
jmunoz-testClient-simplifications
Open

Test: code simplifications#2481
juan518munoz wants to merge 3 commits into
nextfrom
jmunoz-testClient-simplifications

Conversation

@juan518munoz

Copy link
Copy Markdown
Collaborator

Closes #2477

  • Simplifies the integration tests setup by taking leverage of the TestClient struct added on test: run integration test with fees #2455.
  • Moved loose utility/setup functions for testing into the new type.
  • Also fixes testing setup for fee-less chains, were the function that loads funder accounts from a file would fail when passing an empty file path.

@juan518munoz
juan518munoz force-pushed the jmunoz-testClient-simplifications branch from 6631565 to 0b09cdf Compare September 2, 2026 15:46
@juan518munoz
juan518munoz marked this pull request as ready for review September 2, 2026 15:47
Comment on lines +247 to +253
/// Builds a faucet without the [`BasicWallet`] ride-along, so the account exposes only the
/// faucet interface.
#[must_use]
pub fn bare(mut self) -> Self {
self.bare = true;
self
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think we could use a more descriptive name for this setter, like without_basic_wallet_component (we could also rename the corresponding bare field to with_basic_wallet_component and set it to false here), but feel free to disregard.

Comment thread CHANGELOG.md
* [BREAKING][rust] `Client::remove_address` and `Store::remove_address` return `bool` instead of `()`, reporting whether the address was tracked. When it wasn't, `Client::remove_address` now leaves the derived note tag in place instead of running its cleanup.
* [BREAKING][type][rust] Added the `TransactionRequestError::ForeignProcedureInputsTooLong` variant ([#2187](https://github.com/0xMiden/rust-sdk/pull/2187)).
* [BREAKING][behavior][store] The `output_notes` table gained a nullable `script_root` column referencing `notes_scripts`, and note scripts are fully normalized: an output note's state blob no longer embeds the script, which is stored once in `notes_scripts` and joined back in on read. All tables are now `STRICT`, and the `tags` table stores its rows keyed by a `(tag, source)` primary key (`WITHOUT ROWID`) instead of carrying a separate unique index. This changes the schema fingerprint, so opening a database created before this change fails with `SchemaHashMismatch` and existing stores must be recreated.
* [BREAKING][removal][test] Loose helper functions in `miden_client::testing::common` are now methods on `TestClient`. `TestClient::keystore()` exposes the client's keystore, so `ClientConfig::into_client` and `into_unsynced_client` return just the `TestClient` instead of a client/keystore pair ([#2477](https://github.com/0xMiden/rust-sdk/issues/2477)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should include the PR link here

Comment thread CHANGELOG.md
### Fixes

* [FIX][test] The integration tests now run against a fee-charging chain. The testing node's genesis charges a fee by default (`MIDEN_VERIFICATION_BASE_FEE`, default `500`), generates the native fee faucet itself so the accounts it deploys can be seeded with that asset, and pre-funds a pool of basic wallets the suite draws from via a new `--funders` argument (`MIDEN_FUNDER_ACCOUNTS_DIR`). Accounts created by the `miden_client::testing::common` helpers are funded and deployed automatically, and `miden_client::testing::fee::deploy_account` does the same for accounts a test builds itself. The AggLayer accounts are consequently always part of genesis (the `AGGLAYER_GENESIS` env var and the `start-node-agglayer` target are gone) and the AggLayer tests load them from `AGGLAYER_ACCOUNTS_DIR` ([#2446](https://github.com/0xMiden/rust-sdk/issues/2446)).
* [FIX][test] The integration tests now run against a fee-charging chain. The testing node's genesis charges a fee by default (`MIDEN_VERIFICATION_BASE_FEE`, default `500`), generates the native fee faucet itself so the accounts it deploys can be seeded with that asset, and pre-funds a pool of basic wallets the suite draws from via a new `--funders` argument (`MIDEN_FUNDER_ACCOUNTS_DIR`). A path naming no `.mac` file leaves the run without funders, which is all a fee-free genesis needs, since it declares no wallets for the path to hold. Accounts created by the `miden_client::testing::common` helpers are funded and deployed automatically, and `miden_client::testing::fee::deploy_account` does the same for accounts a test builds itself. The AggLayer accounts are consequently always part of genesis (the `AGGLAYER_GENESIS` env var and the `start-node-agglayer` target are gone) and the AggLayer tests load them from `AGGLAYER_ACCOUNTS_DIR` ([#2446](https://github.com/0xMiden/rust-sdk/issues/2446)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: should this change be included in a separate entry instead of modifying the existing one?

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.

tests: integration test cleanup with TestClient

2 participants