Skip to content

feat: add basic gas settings to testenv#23289

Merged
nchamo merged 3 commits into
merge-train/fairiesfrom
nico/f-618-feature-configure-gas-settings-in-txe
May 14, 2026
Merged

feat: add basic gas settings to testenv#23289
nchamo merged 3 commits into
merge-train/fairiesfrom
nico/f-618-feature-configure-gas-settings-in-txe

Conversation

@nventuro

Copy link
Copy Markdown
Contributor

Closes #22290.

This are the most basic settings we can provide at the moment, for env.private_context, env.private_call and env.public_call. public_context is notably missing, but we don't even have TXE oracles for AVM gas at the moment, so more work is needed there to do this. Hopefully that's not as urgent as this.

@nventuro nventuro requested review from Thunkar and nchamo May 14, 2026 17:49
@nventuro nventuro changed the base branch from next to merge-train/fairies May 14, 2026 17:51

@nchamo nchamo left a comment

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.

Good work!
Left some comments

Comment on lines +110 to +113
gas_limits: Option::none(),
teardown_gas_limits: Option::none(),
max_fees_per_gas: Option::none(),
max_priority_fees_per_gas: Option::none(),

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'm curious about why you went with separate config, instead of one GasSettings one and just having one setter (with_gas_settings)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both options are available. In some cases you may only care about one field.

Comment thread noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr Outdated
call: PrivateCall<M, N, T>,
opts: CallOptions,

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.

You know I prefer to leave options at the end, but you already added options before the call in another PR. We should try to be consistent

/// Configuration values for [`TestEnvironment::call_private_opts`] and [`TestEnvironment::call_public_opts`]. Meant
/// to be used by calling `new` and then chaining methods setting each value, e.g.:
/// ```noir
/// env.call_private_opts(CallOptions::new().with_max_fees_per_gas(GasFees::new(1, 1)), caller,

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 don't think the order of the params is correct here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

wdym?

Comment thread yarn-project/txe/src/oracle/txe_oracle_top_level_context.ts
}

#[test]
unconstrained fn call_public_opts_propagates_da_gas_limit() {

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 are missing the equivalent to opts_with_gas_settings_sets_all_fields here

@nchamo nchamo self-requested a review May 14, 2026 19:11
Comment thread noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr Outdated
@nchamo nchamo enabled auto-merge (squash) May 14, 2026 19:25
@nchamo nchamo merged commit f8942c1 into merge-train/fairies May 14, 2026
14 checks passed
@nchamo nchamo deleted the nico/f-618-feature-configure-gas-settings-in-txe branch May 14, 2026 19:50
AztecBot pushed a commit that referenced this pull request May 14, 2026
@AztecBot

Copy link
Copy Markdown
Collaborator

✅ Successfully backported to backport-to-v4-next-staging #23291.

nchamo added a commit that referenced this pull request May 14, 2026
BEGIN_COMMIT_OVERRIDE
feat(txe): add oracle versioning for test environment (#23285)
feat: add basic gas settings to testenv (#23289)
END_COMMIT_OVERRIDE
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request May 16, 2026
BEGIN_COMMIT_OVERRIDE
feat(txe): add oracle versioning for test environment (AztecProtocol#23285)
feat: add basic gas settings to testenv (AztecProtocol#23289)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Configure gas settings in TXE

3 participants