Skip to content

fix(pxe): correct contract class log DA gas metering from +2 to +1#21102

Merged
nventuro merged 1 commit intomerge-train/fairiesfrom
palla/f-377-fix-contract-class-log-da-gas-metering
Mar 4, 2026
Merged

fix(pxe): correct contract class log DA gas metering from +2 to +1#21102
nventuro merged 1 commit intomerge-train/fairiesfrom
palla/f-377-fix-contract-class-log-da-gas-metering

Conversation

@spalladino
Copy link
Contributor

Summary

  • Fixes contract class log DA gas metering in the PXE contract function simulator
  • Changed + 2 to + 1 for the additional fields per contract class log, matching the circuits (gas_meter.nr, tx_blob_data.nr, sponge_blob.nr) and the TS blob encoder which all use + 1
  • Contract class logs only emit the contract address as an extra field (unlike private logs which also emit a length field), so the old + 2 was overcharging by 1 DA field (32 DA gas) per log

Fixes F-377

Test plan

  • Existing tests pass — this is a gas metering correction, not a logic change
  • Contract class log blob encoding is unchanged; only the gas estimation in the PXE was wrong

🤖 Generated with Claude Code

Contract class logs only emit the contract address as an additional field
in the blob encoding, not both length and contract address. The circuits
(gas_meter.nr, tx_blob_data.nr, sponge_blob.nr) and the TS blob encoder
all consistently use +1. This was causing private-only txs with contract
class logs to be overcharged by 1 DA field (32 DA gas) per log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spalladino spalladino requested a review from nventuro March 4, 2026 12:44
@nventuro nventuro merged commit a4ef926 into merge-train/fairies Mar 4, 2026
10 checks passed
@nventuro nventuro deleted the palla/f-377-fix-contract-class-log-da-gas-metering branch March 4, 2026 19:06
github-merge-queue bot pushed a commit that referenced this pull request Mar 5, 2026
BEGIN_COMMIT_OVERRIDE
chore: remove prefund env var in non local networks (#21095)
feat: aztec new supporting multiple contract crates (#21007)
feat!: Expose offchain effects when simulating/sending txs (#20563)
chore: exclude auto-generated dirs from VS Code search (#20881)
feat: improve oracle name prefixes (#21101)
fix(pxe): correct contract class log DA gas metering from +2 to +1
(#21102)
chore: remove stale aes comments (#21133)
chore: add warning on invalid recipients (#21134)
feat: mask ciphertext fields with Poseidon2-derived values (#21009)
END_COMMIT_OVERRIDE
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.

2 participants