chore: Accumulated backports to v4-next#23236
Merged
Merged
Conversation
While the current sqlite backend for kv-store works fine in vanilla browser environments, browser policies can be stricter for extensions. For example, Chromium's MV3 doesn't accept extensions using `eval` or freely instantiating `Function`'s. This PR deals with said issues so that eventual wallet implementers don't have to. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Cuts the round-trip cost of `aztec_prv_getNextAppTagAsSender` by firing the logs query and the receipts query for already-known pending tx hashes in parallel. A second-pass receipt query still runs when the logs query surfaces previously-unseen pending tx hashes, but only for those. ## Changes - `sync_sender_tagging_indexes.ts`: pre-fetch known-pending tx hashes from the store, then `Promise.all([loadAndStoreNewTaggingIndexes, getStatusChangeOfPending(known)])`. Diff against the post-load store snapshot to find newly-discovered pending and fetch their receipts in a conditional follow-up call. - `get_status_change_of_pending.ts`: exports `StatusChange`, `EMPTY_STATUS_CHANGE`, `mergeStatusChanges` for use by the sync loop. - Tests: four new cases covering pre-existing-pending finalization, the no-pending no-logs RPC-skip path, mixed known/newly-discovered pending in one window, and idempotent rediscovery.
…nk public dispatch (#23161) ## Summary Work towards resolving AztecProtocol/aztec-nr#35 - Mark `emit_event_in_public` `#[inline_never]` (and `unconstrained`, required by the attribute) so it stops being copied into every public call site. - Propagate `unconstrained` to `ContractSelfPublic::emit` so it can still call the helper. - Mirrors the existing precedent on `assert_is_initialized_public` (`aztec-nr/aztec/src/macros/functions/initialization_utils.nr:100`) from #22869 ## Bytecode impact Measured via `nargo compile --inliner-aggressiveness 0` + `bb aztec_process`, reading `public_dispatch` packed bytecode size on `public_fns_with_emit_repro_contract`: | State | AVM bytes | Δ | |-------------------|-----------|----------------| | Baseline | 5,576 | — | | `#[inline_never]` | 4,601 | -975 (-17.5%) | Roughly 65 bytes saved per emit call site across the 15 functions. Real contracts with many public functions emitting the same event shape should see the same per-site savings. ## Additional Context - `--inliner-aggressiveness` cannot achieve this on its own: for `public_dispatch` the noirc driver pins aggressiveness to 0 (`noir/noir-repo/compiler/noirc_driver/src/lib.rs:743-744`) - `ContractSelfPublic::emit` becoming `unconstrained` is a small surface change. All `#[external(\"public\")]` bodies are already unconstrained, so contract code calling `self.emit(...)` directly is unaffected
Adds some structure to typical decryption errors, and a couple of convenience helpers for orchestrating encrypted store management from embedded wallet, so that the most basic usage is straightforward and downstream projects don't need to rewrite the same lines over and over. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
feat: package sqlite kv-store backend for stricter browser envs (#23089)
fix(pxe): sync target contract before cross-contract utility call (#23225)
fix(ci): swap slack_notify args in CLI acceptance test (#23241)
feat: optimize get next app tag as sender (#23239)
fix(noir): noirfmt nested_utility_contract main.nr (#23246)
chore(aztec-nr): mark emit_event_in_public as #[inline_never] to shrink public dispatch (#23161)
END_COMMIT_OVERRIDE