Skip to content

feat: gas estimations on send#21646

Merged
Thunkar merged 14 commits intomerge-train/fairiesfrom
gj/gas_estimations_on_send
Mar 18, 2026
Merged

feat: gas estimations on send#21646
Thunkar merged 14 commits intomerge-train/fairiesfrom
gj/gas_estimations_on_send

Conversation

@Thunkar
Copy link
Contributor

@Thunkar Thunkar commented Mar 17, 2026

EmbeddedWallet now simulates before sending in order to estimate gas and capture autwitness data.

This PR also adds validation to captured authwitnesses from offchaineffects (ensuring the inner hash matches the emitted preimage) and fee payer handling to kernelless simulations

Closes: https://linear.app/aztec-labs/issue/F-402/estimate-gas-limits-for-a-tx-if-not-provided-by-the-caller
Closes: https://linear.app/aztec-labs/issue/F-403/compute-gas-limits-for-private-only-txs

@Thunkar Thunkar requested a review from benesjan March 17, 2026 06:25
@Thunkar Thunkar self-assigned this Mar 17, 2026
@Thunkar Thunkar added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Mar 17, 2026
);
const { from, feeOptions, scopes, skipTxValidation, skipFeeEnforcement } = opts;
const skipKernels = this.simulationMode !== 'full';
const useOverride = this.simulationMode === 'kernelless-override' && !from.equals(AztecAddress.ZERO);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this maybe be an error, or should we instead take an enum or something? It feels weird to specify override but then not get overrides.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is going away with NO_FROM

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
@Thunkar Thunkar merged commit 3f5e590 into merge-train/fairies Mar 18, 2026
11 checks passed
@Thunkar Thunkar deleted the gj/gas_estimations_on_send branch March 18, 2026 06:04
AztecBot pushed a commit that referenced this pull request Mar 18, 2026
EmbeddedWallet now simulates before sending in order to estimate gas and
capture autwitness data.

This PR also adds validation to captured authwitnesses from
offchaineffects (ensuring the inner hash matches the emitted preimage)
and fee payer handling to kernelless simulations

Closes:
https://linear.app/aztec-labs/issue/F-402/estimate-gas-limits-for-a-tx-if-not-provided-by-the-caller
Closes:
https://linear.app/aztec-labs/issue/F-403/compute-gas-limits-for-private-only-txs

---------

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
@AztecBot
Copy link
Collaborator

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

github-merge-queue bot pushed a commit that referenced this pull request Mar 18, 2026
BEGIN_COMMIT_OVERRIDE
feat!: split compute note hash and nullifier to reduce hashing (#21639)
feat: gas estimations on send (#21646)
END_COMMIT_OVERRIDE
Thunkar added a commit that referenced this pull request Mar 19, 2026
## Summary
Backports #21716 to
v4-next via `backport-to-v4-next-staging`.

Based on latest `backport-to-v4-next-staging` which has #21646 (gas
estimations on send), so this PR contains only #21716's actual changes
(NO_FROM pattern).

Cherry-pick conflicts resolved:
- `bot/src/factory.ts` — `AztecAddress.ZERO` → `NO_FROM`
- `e2e_fees/account_init.test.ts` — `AztecAddress.ZERO` → `NO_FROM`
- `docs/examples/ts/recursive_verification/index.ts` — imports + data
loading updated
- `docs/examples/ts/aztecjs_connection/index.ts` — `AztecAddress.ZERO` →
`NO_FROM` in existing fee juice section, discarded duplicate sections
from cherry-pick
- `spartan/block_capacity.test.ts` — deleted (already removed on
v4-next)

## Key changes
- Introduces `NO_FROM` pattern replacing `AztecAddress.ZERO` sentinel
for bypassing account contract entrypoint
- Removes `SignerlessAccountContract`
- Uses `DefaultEntrypoint` directly when `from: NO_FROM`
- Deshrines `MulticallEntrypoint` from wallet internals

---------

Co-authored-by: Gregorio Juliana <gregojquiros@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v4-next ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants