Skip to content

fix: displaying debug logs from public function simulations#20551

Merged
benesjan merged 3 commits intomerge-train/fairiesfrom
02-16-fix_displaying_debug_logs_from_public_function_simulations
Feb 18, 2026
Merged

fix: displaying debug logs from public function simulations#20551
benesjan merged 3 commits intomerge-train/fairiesfrom
02-16-fix_displaying_debug_logs_from_public_function_simulations

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Feb 16, 2026

We have not displayed debug logs emitted in public functions. In this PR I achieve this by:

  1. Introducing plumbing that makes the logs available on PublicSimulationOutput,
  2. with this ^ the logs get returned from node to PXE (or directly to wallet in case of direct node simulations),
  3. there I print out the logs.

Since now these logs are printed out from 3 places (UtilityExecutionOracle, pxe.ts and wallet) I moved the print utils to pxe/src/contract_logging.ts.

This is what the output looks like:
image

Followup work

There are 2 more tasks to do related to contract logging:

  1. Ensuring the contract log levels are correctly set when running aztec test such that devs see their contract logs correctly displayed by default (PR here),
  2. making public function logs be displayed even when a tx is sent - this is quite involved as discussed on slack.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@benesjan benesjan force-pushed the 02-16-fix_displaying_debug_logs_from_public_function_simulations branch from 479aaac to 1c974f5 Compare February 17, 2026 08:27
@benesjan benesjan marked this pull request as ready for review February 17, 2026 09:16
@benesjan benesjan requested a review from Thunkar February 17, 2026 10:29
@benesjan benesjan force-pushed the 02-16-fix_displaying_debug_logs_from_public_function_simulations branch from 1c974f5 to 090fc24 Compare February 17, 2026 13:48
Copy link
Contributor

@fcarreiro fcarreiro left a comment

Choose a reason for hiding this comment

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

LGTM for AVM (well, for public_processor.ts ;))

Copy link
Contributor

@mverzilli mverzilli left a comment

Choose a reason for hiding this comment

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

🚢

@benesjan benesjan merged commit cd38849 into merge-train/fairies Feb 18, 2026
10 checks passed
@benesjan benesjan deleted the 02-16-fix_displaying_debug_logs_from_public_function_simulations branch February 18, 2026 11:39
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2026
BEGIN_COMMIT_OVERRIDE
refactor: authwit not consumable when reject all is set (#20533)
fix: displaying debug logs from public function simulations (#20551)
fix: allow compiling mixed (contract + noir script) aztec project
(#20428)
refactor: split ContractSelf into context-specific structs (#20624)
feat: add optional additional scopes to wallet transaction API (#20487)
feat(aztec.js): add additionalScopes to ContractFunctionPattern in
capabilities (#20660)
END_COMMIT_OVERRIDE
@AztecBot
Copy link
Collaborator

❌ Failed to cherry-pick to v4 due to conflicts. Please backport manually.

benesjan added a commit that referenced this pull request Feb 26, 2026
BEGIN_COMMIT_OVERRIDE
fix!: Bump l2 gas per note hash (#20862)
fix: allow compiling mixed (contract + noir script) aztec project
(#20428)
feat: add `aztec profile` command with gate count profiling (#20695)
chore: backporting "displaying debug logs from public function
simulations (#20551)" (#20882)
refactor: split ContractSelf into context-specific structs (#20624)
fix(txe): committing after txs (#20714)
feat: printing out public contract function debug logs in a tx (#20749)
refactor: bundling app into type with directional app tagging secret
(#20796)
refactor: cleaning up construction of SiloedTag (#20797)
docs: document RevertCodeEnum phases and add 120-char line width rule
(#20751)
fix: track last seen nonce in case of stale fallback L1 RPC node
(#20855)
feat: add aztec profile flamegraph command (#20741)
END_COMMIT_OVERRIDE

---------

Co-authored-by: sirasistant <sirasistant@users.noreply.github.com>
Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: nchamo <nchamo@users.noreply.github.com>
Co-authored-by: benesjan <benesjan@users.noreply.github.com>
Co-authored-by: Jan Beneš <janbenes1234@gmail.com>
Co-authored-by: spypsy <spypsy@users.noreply.github.com>
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.

4 participants