chore: Accumulated backports to v4-next#22205
Merged
Merged
Conversation
v4-next's Noir compiler requires #[abi(tag)] attributes to be on structs inside contract bodies. Moving InvalidEvent to a separate file triggers '#[abi(tag)] attributes can only be used in contracts'.
) [v4-next backport] (#22182) ## Summary Backport of #22168 to v4-next. The `#[event]` macro previously enforced MAX_EVENT_SERIALIZED_LEN at declaration time, blocking valid use cases like large public-only events. The size constraint only applies to private emission (due to encryption overhead), so the check now lives in `encode_private_event_message` instead. Adds a test contract and e2e test proving large events work when emitted publicly. ## Conflict Resolution The `invalid_event` comp-failure contract had a conflict because on v4-next the `InvalidEvent` struct is defined inline (with a custom `Serialize` impl) rather than in a separate module. Resolution kept the inline definition while updating the function body to use the new `self.emit().deliver_to()` pattern instead of `get_event_type_id()`. ## Changes - Removed event size static assertion from `#[event]` macro's `get_event_type_id()` - Added size check to `encode_private_event_message` (only enforced for private emission) - Updated `invalid_event` comp-failure contract to emit privately instead of calling `get_event_type_id()` - Added `large_public_event_contract` test contract - Added e2e test for large public events ClaudeBox log: https://claudebox.work/s/e313e5935f72366d?run=1
…-only (#22196) ## Summary When running any CLI wallet command with `--estimate-gas-only` and a saved fee juice claim (`--payment method=fee_juice,claim=true`), the wallet would pop the claim off the stack, consuming it. This meant the claim was no longer available for the actual transaction. This PR adds a `peekBridgedFeeJuice` method to `WalletDB` that reads the top of the claim stack without removing it, and uses it when `estimateOnly` is true. ## Changes - Added `peekBridgedFeeJuice()` to `WalletDB` — reads top-of-stack without decrementing the pointer - Threaded `estimateOnly` flag through to `parsePaymentMethod()` to select peek vs pop ## Test plan - Run `deploy-account --estimate-gas-only --payment method=fee_juice,claim=true` — claim should still be available after - Run `deploy-account --payment method=fee_juice,claim=true` — claim should be consumed as before ClaudeBox log: https://claudebox.work/s/16b824b54402040d?run=1
…values (#22197) ## Summary Fixes incorrect parsing of `--payment` claim parameters in the CLI wallet when using the explicit long form: ``` --payment method=fee_juice,claimAmount=123,claimSecret=0xabc,messageLeafIndex=42 ``` **Bug**: `Fr.fromHexString()` was used to parse `claimAmount`, which interprets bare numeric strings as hex. When a user copy-pastes the output of `bridge-fee-juice` (which prints `claimAmount` as a decimal bigint like `1000000000000000000`), it would be silently misinterpreted as a hex value, resulting in a completely wrong claim amount. **Fix**: Switch to `Fr.fromString()` which correctly auto-detects decimal vs hex (0x-prefixed) input. Also adds a type guard for `claimSecret` to handle both the DB path (which returns a string) and the direct CLI path uniformly. ## Changes - `Fr.fromHexString(claimAmount)` → `Fr.fromString(claimAmount)` — handles decimal amounts correctly - `Fr.fromHexString(claimSecret)` → `Fr.fromString(claimSecret)` with type guard — consistent handling for both DB and CLI paths ## Test plan - Verify `deploy-account --payment method=fee_juice,claimAmount=1000000000000000000,claimSecret=0xabc...,messageLeafIndex=42` correctly parses the decimal amount - Verify `deploy-account --payment method=fee_juice,claim` (DB-backed short form) still works unchanged - Verify hex-prefixed values like `claimAmount=0x1234` still work correctly ClaudeBox log: https://claudebox.work/s/7737b856f8012542?run=2
…22202) ## Summary Changes the HTTP-level retry mechanism for prover node and agent communication with the prover broker from limited retries to indefinite backoff: - **Prover node → broker** (`start_node.ts`): Changed from finite retry array `[1, 2, 3, 3, ...]` (~30s) to indefinite backoff `[1, 1, 1, 2, 4, 4, 4, ...]` - **Prover agent → broker** (`start_prover_agent.ts`): Same change - **Default broker RPC clients** (`rpc.ts`): Updated defaults to use the new `proverBrokerBackoff` generator - **`makeTracedFetch`** (`fetch.ts`): Now accepts either a `number[]` for finite backoff or a `() => Generator<number>` factory for indefinite backoff The rationale is that the epoch proving has its own timeout — when it expires, the chain reorgs and jobs can be safely cancelled. There's no reason for the HTTP communication layer to give up before that happens. ## Test plan - [x] All 98 proving broker tests pass - [x] Build succeeds - [ ] Verify in spartan that prover node and agent reconnect to broker after transient failures"
3 tasks
…ues (with conflicts)
…t exist on v4-next
Remove versioned docs files (version-v4.2.0-aztecnr-rc.2) that don't exist on v4-next. Only the docs-developers/ source files and docs/examples/ts/ changes apply.
The versioned docs directory version-v4.2.0-aztecnr-rc.2 does not exist on v4-next. Accept the deletion — only the docs-developers/ source files are relevant on this branch.
Docs-only change — no compilation or build fixes required for v4-next.
…to v4-next) (#22225) ## Summary Backport of #22195 to v4-next. Fixes several issues in the Private Token Contract tutorial: - Add missing `@aztec/wallets` package to the `yarn add` command - Use `aztec new` instead of `aztec init` - Fix `Nargo.toml` path references - Clarify `balance_set` dependency instruction - Improve `tsx` tip ## Conflict resolution The versioned docs file (`docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/.../token_contract.md`) was deleted on v4-next but modified by the PR. Resolution: accepted the deletion since the versioned docs don't exist on this branch. The main docs file (`docs/docs-developers/.../token_contract.md`) applied cleanly. ClaudeBox log: https://claudebox.work/s/e987e6392893261f?run=1
…22192) (#22226) ## Summary Backport of #22192 to v4-next. - Fix code examples across aztec-js how-to guides to use correct API patterns - Replace hardcoded inline code blocks with `#include_code` macros pointing to TypeScript example files - Fix inaccurate field names in `GasSettings` and correct transaction status enum values ## Conflict Resolution The cherry-pick had modify/delete conflicts on 5 files in `docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/` which don't exist on v4-next. These were removed. The remaining 8 files (`docs-developers/` source docs and `docs/examples/ts/` TypeScript examples) applied cleanly. ## Commits 1. Cherry-pick with conflicts recorded 2. Conflict resolution — remove versioned docs not present on v4-next ClaudeBox log: https://claudebox.work/s/9d87ae50e4432456?run=1
…22166) (#22227) ## Summary Backport of #22166 to v4-next. Fixes 52 documentation issues across aztec-nr doc pages (deprecated import paths, missing API parameters, incorrect method names, wrong dependency URLs, etc.). ## Conflict resolution All 20 conflicts were modify/delete in `docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/` — this versioned docs directory does not exist on v4-next, so the deletions were accepted. The 18 `docs-developers/` source files merged cleanly. ## Commits 1. Cherry-pick with conflicts (original attempt) 2. Conflict resolution (remove versioned docs that don't exist on v4-next) 3. No build fixes needed (docs-only change) ClaudeBox log: https://claudebox.work/s/78234c172376f4ce?run=1
Collaborator
Author
|
🤖 Auto-merge enabled after 8 hours of inactivity. This PR will be merged automatically once all checks pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
cherry-pick: feat: move event size check from declaration to private emission (#22168)
fix: prevent oracle failure on tag computation for invalid recipient (#22163)
feat: move event size check from declaration to private emission (#22168) [v4-next backport] (#22182)
fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only (#22196)
fix: use Fr.fromString for CLI wallet claim params to handle decimal values (#22197)
fix: indefinite retry for prover node and agent broker communication (#22202)
END_COMMIT_OVERRIDE