Conversation
We correctly .gitignore prebuilt sqlite artifacts since we fetch and verify them on build, however, this is inconvenient for users of our packages, since it leaves the burden of re-vendoring up to them. This PR introduces an .npmignore file to the sqlite npm package, which by convention overshadows the .gitignore file when npm produces the package tarball. It also includes a verification script to make sure there's no loose ends in the process
`sendMessagesAs` was not added to Zod schemas, which caused the param to be dropped when serialized to cross process boundaries (needed for extension wallet work)
…verrides (#23054) flesh out account stubs so that syncing actually works for them, and then remove their exclusion
## Summary
Splits `DeployMethod` into an abstract umbrella type plus three concrete
flavors that encode the deployer-lock state at the type level instead of
branching on a nullable field.
- `DeployMethod<T>` — abstract base, the type consumers use generically
(`let d: DeployMethod<MyContract> = ...`).
- `BoundDeployMethod` — locked to a concrete `deployer`.
- `UniversalDeployMethod` — locked to `AztecAddress.ZERO` (any sender).
- `PendingDeployMethod` — promotes into a `Bound`/`Universal` sibling on
the first `send` / `simulate` / `profile` call.
The three flavor-specific decisions (`getDeployerAddress`,
`lockOrAssertDeployer`, `cloneInstantiation`) are now abstract methods
rather than `if (this.deployer === undefined / equals(ZERO) / else)`
branches in the base.
## Compile-time guarantees
Each subclass takes a narrowed instantiation type:
- `BoundInstantiationOptions` — `deployer` required, `universalDeploy:
never`.
- `UniversalInstantiationOptions` — `universalDeploy: true` required,
`deployer: never`.
- `PendingInstantiationOptions` — both `never`.
`new BoundDeployMethod(..., { universalDeploy: true })` is now a
TypeScript error. The runtime mutual-exclusion checks in subclass
constructors are gone; the only runtime guard left is
`BoundDeployMethod` rejecting `AztecAddress.ZERO` (a value-level
invariant the type system can't model).
## Constructor shape
Subclass constructors take named bundles instead of 9 positionals:
```ts
new BoundDeployMethod(wallet, contract, instantiation, payload?)
// ^ ^ ^
// { artifact, postDeployCtor, args, constructorNameOrArtifact }
// { salt, publicKeys, deployer }
// { authWitnesses, capsules, extraHashedArgs }
```
`DeployMethod.create` follows the same shape. `Contract.deploy(wallet,
artifact, args, constructorName, instantiation)` and
`MyContract.deploy(wallet, ...args, instantiation?)` (codegen) are
**unchanged** — the bundle reshape stops at the `create` boundary.
## Other changes
- `DeployAccountMethod` now extends `UniversalDeployMethod` (account
contracts are always universal).
…ates (#22905) Adds `fastForwardContractUpdate` to aztec.js — a high-level cheatcode that returns a `SimulationOverrides` blob simulating a deployed instance as if it had already been upgraded to a new contract class. The blob covers both pieces required for a coherent upgrade simulation: - `overrides.publicStorage` rewrites the `ContractInstanceRegistry`'s delayed-public-mutable storage so the AVM's `UpdateCheck` resolves to the new class id. - `overrides.contracts` swaps the deployed instance for one whose `currentContractClassId` is bumped to the new class. Drives both AVM-side public dispatch and PXE-side ACIR private dispatch. Both pieces are required: a storage-only override would not redirect the AVM's class dispatch (which reads `currentContractClassId` from the contract DB); an instance-only override would cause the witgen `UpdateCheck` to throw on inconsistency. The new class must already be registered on chain. ```typescript import { fastForwardContractUpdate } from '@aztec/aztec.js'; const overrides = await fastForwardContractUpdate({ instanceAddress, newClassId, node }); const result = await contract.methods.upgraded_method().simulate({ overrides }); ``` ## Test plan - Unit tests in `fastforward_contract_update.test.ts` cover validation and override shape. - E2E coverage in `e2e_contract_updates` for both public and private dispatch under override (private dispatch needs `wallet.registerContractClass` from upstack and the sync-skip narrowing from upstack). - `migration_notes.md` and `how_to_test.md` updated.
## Summary Addresses comment #22957 (comment) The same artifact-lookup loop was duplicated three times. Puts two helper fns in `stdlib/abi`: - `findFunctionArtifactBySelector(artifact, selector)` — searches `artifact.functions`, returns `FunctionArtifact | undefined`. - `findFunctionAbiBySelector(artifact, selector)` — searches `artifact.functions ∪ nonDispatchPublicFunctions` via `getAllFunctionAbis`, returns `FunctionAbi | undefined`. Both `ContractStore` and `ProxiedContractStoreFactory` now call the same stdlib primitive. The existing throwing `getFunctionArtifact` helper also reuses `findFunctionArtifactBySelector`. ## Test plan - [x] `yarn workspace @aztec/pxe test src/storage/contract_store/contract_store.test.ts` - [x] `yarn workspace @aztec/stdlib test src/abi/abi.test.ts` - [x] `yarn lint pxe`, `yarn lint stdlib`
…rgo expand (#23061) Resolves [F-607](https://linear.app/aztec-labs/issue/F-607/adopt-cargo-insta-for-noir-contract-snapshot-testing) Don't be scared by the diff size, the majority of the diff is new snapshots. - Deleted `noir-projects/noir-contracts-comp-failures/` crate. We now have `noir-projects/contract-snapshots/` - `nargo expand` tests cover Token, AMM, StorageProofTest, AvmTest, AvmGadgetsTest to match the CI benchmarks - `compile_failure` snapshots are now full stderr (not just `error: ` headlines) Asserting the full stderr and `expand` output provide us a strong test invariant on the current compiler behavior. Some of the expanded snapshots are quite large, and that is why I ultimately chose to only have snapshots for the benchmark contracts. For compilation failures, I felt it would be better to have the full snapshot in all cases. We then assert against the actual compiler behavior rather than some stripped version of the stderr. A great example of how these snapshots are useful can be seen in the child PR #23062.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Deprecates mocha as a test runner for kv-store (we currently half part in mocha part in vitest). The seemingly off-topic change in stdlib stems from L2TipsStore tests being generated from there but consumed from kv-store. It's a bit of a strange pattern that maybe we should reconsider. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Fix CI failure on `merge-train/fairies` (run [25572561023](https://github.com/AztecProtocol/aztec-packages/actions/runs/25572561023), log [1778264338812903](http://ci.aztec-labs.com/1778264338812903)). The merge of `next` into `merge-train/fairies` (78632af) brought in barretenberg changes — `feat!: optimized Poseidon2 (#22652)` and `feat: n1 apps (#22974)` via `feat: merge-train/barretenberg (#23025)` — which grew bb.js by enough to push the playground main entrypoint 0.02 KB over the 1750 KB hard limit: ``` ❌ assets/index-BEz4wQVA.js: 1750.02 KB exceeds limit of 1750 KB (Main entrypoint, hard limit) ``` Bumping the limit to 1800 KB (matching the prior +50 KB increment from the bump log) restores headroom. ## Test plan - [ ] CI green on this PR (chunk size check passes) ClaudeBox log: https://claudebox.work/s/22af49d0486fc035?run=1
Adds a bench for the contract shape from AztecProtocol/aztec-nr#35 (15 public fns each emitting an event). No existing bench target covers this flow. I want to see the benefits from follow-up improvements.
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
) ## Summary - Skip the `aztecNode.getBlock` RPC in `getBlockHeader` when the requested block number matches the anchor — the anchor's header is already in memory. - Most utility executions query state at the anchor block, so this avoids a redundant round-trip on the hot path. Co-authored-by: Nico Chamo <nico.chamo@gmail.com>
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
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
fix: include sqlite binary in its npm package (#23039)
fix: add sendMessagesAs to wallet api schemas (#23041)
refactor(pxe): deduplicate tx hash lookups in MessageContextService (#23075)
refactor(pxe): batch tagged private log queries across all secrets (#23048)
refactor(pxe): batch log RPC calls in LogService.fetchLogsByTag (#23088)
feat(pxe,nr): flesh out account stubs and don't exclude syncing for overrides (#23054)
feat: deploy method refactor 2 (#23033)
feat: fastForwardContractUpdate cheatcode for simulating contract updates (#22905)
refactor(stdlib): consolidate find-function-by-selector helpers (#23008)
feat(ci): Snapshots for aztec-nr contract compilation failures and nargo expand (#23061)
chore: kv store test fully on vitest (#23096)
refactor(pxe): skip redundant getBlock RPC when querying at anchor block (#23100)
chore(playground): bump main chunk size limit 1750 → 1800 KB (#23107)
feat(txe): allow authorizing cross-contract utility calls in nr tests (#23064)
chore: bench public fns with emit repro (#23105)
refactor(pxe): short-circuit block header lookup at anchor block (#23128)
END_COMMIT_OVERRIDE