-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: public inputs refactor #5500
Conversation
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Values are compared against data from master at commit L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every circuit run across all benchmarks.
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method
Transaction processing duration by data writes.
|
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most code here was copied from private-kernel-tail.nr. But only trigger propagate_sorted_public_call_requests
from the new private-tail-to-public.nr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused file. Will delete it.
Was about to break up common.nr into various files, but decided to do it in another PR.
for i in 0..private_call_stack.len() { | ||
let private_call = private_call_stack[i]; | ||
assert( | ||
private_call.is_empty(), "Private call stack must be empty when executing in the public kernel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A valid private tail proof is guaranteed to have an empty private call stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code in this file is copied from private-kernel-tail.
@@ -48,8 +45,6 @@ struct BaseRollupInputs { | |||
sorted_public_data_writes_indexes: [u64; MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], | |||
low_public_data_writes_preimages: [PublicDataTreeLeafPreimage; MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], | |||
low_public_data_writes_witnesses: [PublicDataMembershipWitness; MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], | |||
public_data_reads_preimages: [PublicDataTreeLeafPreimage; MAX_PUBLIC_DATA_READS_PER_TX], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it for now because we are not verifying it here. When we do, it should be checked in the public tail circuit.
validation_requests::{RollupValidationRequests, ValidationRequests} | ||
}; | ||
use crate::mocked::AggregationObject; | ||
|
||
struct PublicKernelCircuitPublicInputs { | ||
aggregation_object: AggregationObject, | ||
validation_requests: ValidationRequests, | ||
rollup_validation_requests: RollupValidationRequests, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollup_validation_requests is part of validation_requests
@@ -382,40 +371,8 @@ export function makeEmptyMembershipWitness<N extends number>(height: N) { | |||
); | |||
} | |||
|
|||
export async function getPublicDataReadsInfo(tx: ProcessedTx, db: MerkleTreeOperations) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to hints_builder.
* Contains the contract address, new note data and commitment for the note, | ||
* resulting from the execution of a transaction in the Aztec network. | ||
*/ | ||
export interface OutputNoteData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used anywhere.
output.publicInputs, | ||
output.proof, | ||
previousVerificationKey, | ||
Number(previousVkMembershipWitness.leafIndex), | ||
assertLength<Fr, typeof VK_TREE_HEIGHT>(previousVkMembershipWitness.siblingPath, VK_TREE_HEIGHT), | ||
); | ||
|
||
const readNoteHashHints = this.hintsBuilder.getNoteHashReadRequestHints( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these from after ordering to before ordering, to make it clearer that they are operated on un-sorted data.
@@ -708,13 +653,13 @@ describe('public_processor', () => { | |||
const txEffect = toTxEffect(processed[0]); | |||
expect(arrayNonEmptyLength(txEffect.publicDataWrites, PublicDataWrite.isEmpty)).toEqual(3); | |||
expect(txEffect.publicDataWrites[0]).toEqual( | |||
new PublicDataWrite(computePublicDataTreeLeafSlot(baseContractAddress, contractSlotA), fr(0x102)), | |||
new PublicDataWrite(computePublicDataTreeLeafSlot(baseContractAddress, contractSlotC), fr(0x201)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order has changed because we now concat data properly in removeRedundantPublicDataWrites in abstract_phase_manager.ts.
return !exists; | ||
}); | ||
|
||
const [prev, curr] = PhaseIsRevertible[phase] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to concat the data as [...revertible, ...non_revertible] no matter what. Now we adjust the order based on the current phase.
This needs to be done in the circuit eventually.
): Promise<PublicKernelCircuitPublicInputs> { | ||
const previousKernel = this.getPreviousKernelData(previousOutput, previousProof); | ||
|
||
if (this.phase === PublicKernelPhase.TAIL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to tail_phase_manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice (and huge) refactor!
for i in 0..MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX { | ||
let call_stack_item = self.public_call_stack.storage[i]; | ||
if call_stack_item.start_side_effect_counter < min_revertible_side_effect_counter { | ||
non_revertible_builder.public_call_stack.push(call_stack_item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we assert after this loop that we have exactly two public call stack items? since the code relies on that for needs_setup and needs_teardown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be able to handle the case where there is >=1 public call stack item:
It should be that the public enqueued call that is last should be for teardown, and all other should be setup.
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.33.0</summary> ## [0.33.0](aztec-package-v0.32.1...aztec-package-v0.33.0) (2024-04-09) ### Features * Jest fast transpile. no more ts-jest. ([#5530](#5530)) ([1912802](1912802)) * **SimulateTx:** Simulate constrained transaction execution with return values ([#5432](#5432)) ([0249737](0249737)) </details> <details><summary>barretenberg.js: 0.33.0</summary> ## [0.33.0](barretenberg.js-v0.32.1...barretenberg.js-v0.33.0) (2024-04-09) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-cli: 0.33.0</summary> ## [0.33.0](aztec-cli-v0.32.1...aztec-cli-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * contract_abi-exports ([#5386](#5386)) ### Features * **avm:** Integrate AVM with initializers ([#5469](#5469)) ([59799f2](59799f2)) * Contract_abi-exports ([#5386](#5386)) ([745d522](745d522)) * Jest fast transpile. no more ts-jest. ([#5530](#5530)) ([1912802](1912802)) ### Bug Fixes * Update CLI & terraforms with new contract addresses ([#5553](#5553)) ([eb73d20](eb73d20)) </details> <details><summary>aztec-packages: 0.33.0</summary> ## [0.33.0](aztec-packages-v0.32.1...aztec-packages-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * **acir:** Add predicate to call opcode ([#5616](#5616)) * contract_abi-exports ([#5386](#5386)) * **avm:** rollback FunctionAbi isTranspiled changes ([#5561](#5561)) ### Features * /foundry is canoncial build of foundry. e2e tests can start own anvil. ([#5522](#5522)) ([510daa0](510daa0)) * `add` and `sub` methods of `EasyPrivateUint` throw when called in public ([#5581](#5581)) ([29f337d](29f337d)) * **acir:** Add predicate to call opcode ([#5616](#5616)) ([e8cec0a](e8cec0a)) * **acvm_js:** Execute program (noir-lang/noir#4694) ([8b30b95](8b30b95)) * Add return values to aztec fns ([#5389](#5389)) ([7b88bac](7b88bac)) * Allow slices to brillig entry points (noir-lang/noir#4713) ([8b30b95](8b30b95)) * Avm logup ([#5577](#5577)) ([7e4e9b9](7e4e9b9)) * **avm:** Add index to pedersen opcode ([#5486](#5486)) ([e1d7d11](e1d7d11)) * **avm:** Contract instance opcode ([#5487](#5487)) ([ceacba6](ceacba6)) * **avm:** Gas usage for nested calls ([#5495](#5495)) ([11699c8](11699c8)) * **avm:** Indirect memory for set opcode ([#5546](#5546)) ([e0e7200](e0e7200)), closes [#5542](#5542) * **avm:** Integrate AVM with initializers ([#5469](#5469)) ([59799f2](59799f2)) * **avm:** Set gas allowance in public calls ([#5567](#5567)) ([ee23415](ee23415)) * **avm:** Track gas from memory accesses explicitly ([#5563](#5563)) ([18c9128](18c9128)), closes [#5514](#5514) * Contract_abi-exports ([#5386](#5386)) ([745d522](745d522)) * DataBus notion with calldata/return data ([#5504](#5504)) ([95a1d8a](95a1d8a)) * DebugLog(...) in noir-protocol-circuits ([#5568](#5568)) ([a07bb92](a07bb92)) * **docs:** Documenting noir codegen (noir-lang/noir#4454) ([8b30b95](8b30b95)) * Improve nargo check cli with --override flag and feedback for existing files (noir-lang/noir#4575) ([8b30b95](8b30b95)) * Improve optimisations on range constraints (noir-lang/noir#4690) ([8b30b95](8b30b95)) * Improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691) ([8b30b95](8b30b95)) * Improve the proving orchestration lifecycle ([#5535](#5535)) ([4e4f843](4e4f843)) * Jest fast transpile. no more ts-jest. ([#5530](#5530)) ([1912802](1912802)) * Logging deployed contract address to help debug e2e account test ([#5571](#5571)) ([1907473](1907473)) * Only export values from accumulated data ([#5604](#5604)) ([a974ec8](a974ec8)) * Optimise relations ([#5552](#5552)) ([a581e80](a581e80)) * Optimize auxiliary relations slightly ([#5517](#5517)) ([30be431](30be431)) * Public inputs refactor ([#5500](#5500)) ([6b9a538](6b9a538)) * Restore hashing args via slice for performance ([#5539](#5539)) ([eb3acdf](eb3acdf)) * **SimulateTx:** Simulate constrained transaction execution with return values ([#5432](#5432)) ([0249737](0249737)) ### Bug Fixes * **acvm:** Mark outputs of Opcode::Call solvable (noir-lang/noir#4708) ([8b30b95](8b30b95)) * **avm:** Nullifier handling ([#5488](#5488)) ([bc8211d](bc8211d)) * **ci:** Cache submodules in GA ([#5531](#5531)) ([75f2cc6](75f2cc6)) * **ci:** Install fixed foundry version in CI ([#5582](#5582)) ([46fdb37](46fdb37)) * Dependabot update ([#5547](#5547)) ([f7e6cc8](f7e6cc8)) * E2e earthly status ([#5564](#5564)) ([a5076ca](a5076ca)) * Field comparisons (noir-lang/noir#4704) ([8b30b95](8b30b95)) * Invalid fork terraform ([#5585](#5585)) ([826353b](826353b)) * Last use analysis & make it an SSA pass (noir-lang/noir#4686) ([8b30b95](8b30b95)) * Mainnet fork redeploys ([#5573](#5573)) ([88e8b6d](88e8b6d)) * Remove EFS lifecycle rule ([#5587](#5587)) ([eb66fc6](eb66fc6)) * **ssa:** Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700) ([8b30b95](8b30b95)) * Taint fork file storage ([#5560](#5560)) ([f144f3b](f144f3b)) * Unknown slice lengths coming from as_slice (noir-lang/noir#4725) ([8b30b95](8b30b95)) * Update CLI & terraforms with new contract addresses ([#5553](#5553)) ([eb73d20](eb73d20)) ### Miscellaneous * **avm:** Rollback FunctionAbi isTranspiled changes ([#5561](#5561)) ([150932a](150932a)) * Check for references to private functions during path resolution (noir-lang/noir#4622) ([8b30b95](8b30b95)) * **docs:** Add file to prove ownership for google search console ([#5554](#5554)) ([dfa3998](dfa3998)) * **docs:** Fix indexed-merkle-tree docs images ([#4674](#4674)) ([8fc29d5](8fc29d5)) * **docs:** Random updates ([#5281](#5281)) ([b8c9273](b8c9273)) * ECCVM flavor depends on builder ([#5323](#5323)) ([a594683](a594683)) * Fix clippy errors (noir-lang/noir#4684) ([8b30b95](8b30b95)) * Get rid of ECCVM composer ([#5562](#5562)) ([43ed901](43ed901)) * Move e2e-avm-initializer test to e2e-avm-simulator ([#5570](#5570)) ([d827705](d827705)) * Nuking accounts from e2e setup ([#5574](#5574)) ([be6f843](be6f843)), closes [#5307](#5307) * Nuking L2BlockContext ([#5569](#5569)) ([1299190](1299190)) * Pad when needed and not sooner ([#5482](#5482)) ([e928c33](e928c33)), closes [#5357](#5357) * Remove conditional compilation around `acvm_js` package (noir-lang/noir#4702) ([8b30b95](8b30b95)) * Remove debug log from watch.sh ([a9a349d](a9a349d)) * Remove last traces of nix (noir-lang/noir#4679) ([8b30b95](8b30b95)) * Remove unused boolean return values from stores ([#5470](#5470)) ([07794ee](07794ee)) * Remove unused env vars from `Cross.toml` (noir-lang/noir#4717) ([8b30b95](8b30b95)) * Replace relative paths to noir-protocol-circuits ([51a1983](51a1983)) * Replace relative paths to noir-protocol-circuits ([a716270](a716270)) * Replace relative paths to noir-protocol-circuits ([6827014](6827014)) * Replace relative paths to noir-protocol-circuits ([356caf7](356caf7)) * Simplify how `acvm_backend.wasm` is embedded (noir-lang/noir#4703) ([8b30b95](8b30b95)) * Simplify how blns is loaded into tests (noir-lang/noir#4705) ([8b30b95](8b30b95)) * Update snapshot ([#5626](#5626)) ([fb66426](fb66426)) * Use is_entry_point helper on RuntimeType (noir-lang/noir#4678) ([8b30b95](8b30b95)) ### Documentation * Minor fixes in keys ([#5550](#5550)) ([ea48ad3](ea48ad3)) * **spec:** Hashing and keys ([#5478](#5478)) ([820ac8c](820ac8c)) * Update quickstart.md to use Docker daemon ([#5576](#5576)) ([42b9827](42b9827)) </details> <details><summary>barretenberg: 0.33.0</summary> ## [0.33.0](barretenberg-v0.32.1...barretenberg-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * **acir:** Add predicate to call opcode ([#5616](#5616)) ### Features * **acir:** Add predicate to call opcode ([#5616](#5616)) ([e8cec0a](e8cec0a)) * Avm logup ([#5577](#5577)) ([7e4e9b9](7e4e9b9)) * **avm:** Contract instance opcode ([#5487](#5487)) ([ceacba6](ceacba6)) * **avm:** Indirect memory for set opcode ([#5546](#5546)) ([e0e7200](e0e7200)), closes [#5542](#5542) * DataBus notion with calldata/return data ([#5504](#5504)) ([95a1d8a](95a1d8a)) * Optimise relations ([#5552](#5552)) ([a581e80](a581e80)) * Optimize auxiliary relations slightly ([#5517](#5517)) ([30be431](30be431)) ### Miscellaneous * ECCVM flavor depends on builder ([#5323](#5323)) ([a594683](a594683)) * Get rid of ECCVM composer ([#5562](#5562)) ([43ed901](43ed901)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.33.0</summary> ## [0.33.0](AztecProtocol/aztec-packages@aztec-package-v0.32.1...aztec-package-v0.33.0) (2024-04-09) ### Features * Jest fast transpile. no more ts-jest. ([#5530](AztecProtocol/aztec-packages#5530)) ([1912802](AztecProtocol/aztec-packages@1912802)) * **SimulateTx:** Simulate constrained transaction execution with return values ([#5432](AztecProtocol/aztec-packages#5432)) ([0249737](AztecProtocol/aztec-packages@0249737)) </details> <details><summary>barretenberg.js: 0.33.0</summary> ## [0.33.0](AztecProtocol/aztec-packages@barretenberg.js-v0.32.1...barretenberg.js-v0.33.0) (2024-04-09) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-cli: 0.33.0</summary> ## [0.33.0](AztecProtocol/aztec-packages@aztec-cli-v0.32.1...aztec-cli-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * contract_abi-exports ([#5386](AztecProtocol/aztec-packages#5386)) ### Features * **avm:** Integrate AVM with initializers ([#5469](AztecProtocol/aztec-packages#5469)) ([59799f2](AztecProtocol/aztec-packages@59799f2)) * Contract_abi-exports ([#5386](AztecProtocol/aztec-packages#5386)) ([745d522](AztecProtocol/aztec-packages@745d522)) * Jest fast transpile. no more ts-jest. ([#5530](AztecProtocol/aztec-packages#5530)) ([1912802](AztecProtocol/aztec-packages@1912802)) ### Bug Fixes * Update CLI & terraforms with new contract addresses ([#5553](AztecProtocol/aztec-packages#5553)) ([eb73d20](AztecProtocol/aztec-packages@eb73d20)) </details> <details><summary>aztec-packages: 0.33.0</summary> ## [0.33.0](AztecProtocol/aztec-packages@aztec-packages-v0.32.1...aztec-packages-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * **acir:** Add predicate to call opcode ([#5616](AztecProtocol/aztec-packages#5616)) * contract_abi-exports ([#5386](AztecProtocol/aztec-packages#5386)) * **avm:** rollback FunctionAbi isTranspiled changes ([#5561](AztecProtocol/aztec-packages#5561)) ### Features * /foundry is canoncial build of foundry. e2e tests can start own anvil. ([#5522](AztecProtocol/aztec-packages#5522)) ([510daa0](AztecProtocol/aztec-packages@510daa0)) * `add` and `sub` methods of `EasyPrivateUint` throw when called in public ([#5581](AztecProtocol/aztec-packages#5581)) ([29f337d](AztecProtocol/aztec-packages@29f337d)) * **acir:** Add predicate to call opcode ([#5616](AztecProtocol/aztec-packages#5616)) ([e8cec0a](AztecProtocol/aztec-packages@e8cec0a)) * **acvm_js:** Execute program (noir-lang/noir#4694) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Add return values to aztec fns ([#5389](AztecProtocol/aztec-packages#5389)) ([7b88bac](AztecProtocol/aztec-packages@7b88bac)) * Allow slices to brillig entry points (noir-lang/noir#4713) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Avm logup ([#5577](AztecProtocol/aztec-packages#5577)) ([7e4e9b9](AztecProtocol/aztec-packages@7e4e9b9)) * **avm:** Add index to pedersen opcode ([#5486](AztecProtocol/aztec-packages#5486)) ([e1d7d11](AztecProtocol/aztec-packages@e1d7d11)) * **avm:** Contract instance opcode ([#5487](AztecProtocol/aztec-packages#5487)) ([ceacba6](AztecProtocol/aztec-packages@ceacba6)) * **avm:** Gas usage for nested calls ([#5495](AztecProtocol/aztec-packages#5495)) ([11699c8](AztecProtocol/aztec-packages@11699c8)) * **avm:** Indirect memory for set opcode ([#5546](AztecProtocol/aztec-packages#5546)) ([e0e7200](AztecProtocol/aztec-packages@e0e7200)), closes [#5542](AztecProtocol/aztec-packages#5542) * **avm:** Integrate AVM with initializers ([#5469](AztecProtocol/aztec-packages#5469)) ([59799f2](AztecProtocol/aztec-packages@59799f2)) * **avm:** Set gas allowance in public calls ([#5567](AztecProtocol/aztec-packages#5567)) ([ee23415](AztecProtocol/aztec-packages@ee23415)) * **avm:** Track gas from memory accesses explicitly ([#5563](AztecProtocol/aztec-packages#5563)) ([18c9128](AztecProtocol/aztec-packages@18c9128)), closes [#5514](AztecProtocol/aztec-packages#5514) * Contract_abi-exports ([#5386](AztecProtocol/aztec-packages#5386)) ([745d522](AztecProtocol/aztec-packages@745d522)) * DataBus notion with calldata/return data ([#5504](AztecProtocol/aztec-packages#5504)) ([95a1d8a](AztecProtocol/aztec-packages@95a1d8a)) * DebugLog(...) in noir-protocol-circuits ([#5568](AztecProtocol/aztec-packages#5568)) ([a07bb92](AztecProtocol/aztec-packages@a07bb92)) * **docs:** Documenting noir codegen (noir-lang/noir#4454) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Improve nargo check cli with --override flag and feedback for existing files (noir-lang/noir#4575) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Improve optimisations on range constraints (noir-lang/noir#4690) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Improve the proving orchestration lifecycle ([#5535](AztecProtocol/aztec-packages#5535)) ([4e4f843](AztecProtocol/aztec-packages@4e4f843)) * Jest fast transpile. no more ts-jest. ([#5530](AztecProtocol/aztec-packages#5530)) ([1912802](AztecProtocol/aztec-packages@1912802)) * Logging deployed contract address to help debug e2e account test ([#5571](AztecProtocol/aztec-packages#5571)) ([1907473](AztecProtocol/aztec-packages@1907473)) * Only export values from accumulated data ([#5604](AztecProtocol/aztec-packages#5604)) ([a974ec8](AztecProtocol/aztec-packages@a974ec8)) * Optimise relations ([#5552](AztecProtocol/aztec-packages#5552)) ([a581e80](AztecProtocol/aztec-packages@a581e80)) * Optimize auxiliary relations slightly ([#5517](AztecProtocol/aztec-packages#5517)) ([30be431](AztecProtocol/aztec-packages@30be431)) * Public inputs refactor ([#5500](AztecProtocol/aztec-packages#5500)) ([6b9a538](AztecProtocol/aztec-packages@6b9a538)) * Restore hashing args via slice for performance ([#5539](AztecProtocol/aztec-packages#5539)) ([eb3acdf](AztecProtocol/aztec-packages@eb3acdf)) * **SimulateTx:** Simulate constrained transaction execution with return values ([#5432](AztecProtocol/aztec-packages#5432)) ([0249737](AztecProtocol/aztec-packages@0249737)) ### Bug Fixes * **acvm:** Mark outputs of Opcode::Call solvable (noir-lang/noir#4708) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * **avm:** Nullifier handling ([#5488](AztecProtocol/aztec-packages#5488)) ([bc8211d](AztecProtocol/aztec-packages@bc8211d)) * **ci:** Cache submodules in GA ([#5531](AztecProtocol/aztec-packages#5531)) ([75f2cc6](AztecProtocol/aztec-packages@75f2cc6)) * **ci:** Install fixed foundry version in CI ([#5582](AztecProtocol/aztec-packages#5582)) ([46fdb37](AztecProtocol/aztec-packages@46fdb37)) * Dependabot update ([#5547](AztecProtocol/aztec-packages#5547)) ([f7e6cc8](AztecProtocol/aztec-packages@f7e6cc8)) * E2e earthly status ([#5564](AztecProtocol/aztec-packages#5564)) ([a5076ca](AztecProtocol/aztec-packages@a5076ca)) * Field comparisons (noir-lang/noir#4704) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Invalid fork terraform ([#5585](AztecProtocol/aztec-packages#5585)) ([826353b](AztecProtocol/aztec-packages@826353b)) * Last use analysis & make it an SSA pass (noir-lang/noir#4686) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Mainnet fork redeploys ([#5573](AztecProtocol/aztec-packages#5573)) ([88e8b6d](AztecProtocol/aztec-packages@88e8b6d)) * Remove EFS lifecycle rule ([#5587](AztecProtocol/aztec-packages#5587)) ([eb66fc6](AztecProtocol/aztec-packages@eb66fc6)) * **ssa:** Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Taint fork file storage ([#5560](AztecProtocol/aztec-packages#5560)) ([f144f3b](AztecProtocol/aztec-packages@f144f3b)) * Unknown slice lengths coming from as_slice (noir-lang/noir#4725) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Update CLI & terraforms with new contract addresses ([#5553](AztecProtocol/aztec-packages#5553)) ([eb73d20](AztecProtocol/aztec-packages@eb73d20)) ### Miscellaneous * **avm:** Rollback FunctionAbi isTranspiled changes ([#5561](AztecProtocol/aztec-packages#5561)) ([150932a](AztecProtocol/aztec-packages@150932a)) * Check for references to private functions during path resolution (noir-lang/noir#4622) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * **docs:** Add file to prove ownership for google search console ([#5554](AztecProtocol/aztec-packages#5554)) ([dfa3998](AztecProtocol/aztec-packages@dfa3998)) * **docs:** Fix indexed-merkle-tree docs images ([#4674](AztecProtocol/aztec-packages#4674)) ([8fc29d5](AztecProtocol/aztec-packages@8fc29d5)) * **docs:** Random updates ([#5281](AztecProtocol/aztec-packages#5281)) ([b8c9273](AztecProtocol/aztec-packages@b8c9273)) * ECCVM flavor depends on builder ([#5323](AztecProtocol/aztec-packages#5323)) ([a594683](AztecProtocol/aztec-packages@a594683)) * Fix clippy errors (noir-lang/noir#4684) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Get rid of ECCVM composer ([#5562](AztecProtocol/aztec-packages#5562)) ([43ed901](AztecProtocol/aztec-packages@43ed901)) * Move e2e-avm-initializer test to e2e-avm-simulator ([#5570](AztecProtocol/aztec-packages#5570)) ([d827705](AztecProtocol/aztec-packages@d827705)) * Nuking accounts from e2e setup ([#5574](AztecProtocol/aztec-packages#5574)) ([be6f843](AztecProtocol/aztec-packages@be6f843)), closes [#5307](AztecProtocol/aztec-packages#5307) * Nuking L2BlockContext ([#5569](AztecProtocol/aztec-packages#5569)) ([1299190](AztecProtocol/aztec-packages@1299190)) * Pad when needed and not sooner ([#5482](AztecProtocol/aztec-packages#5482)) ([e928c33](AztecProtocol/aztec-packages@e928c33)), closes [#5357](AztecProtocol/aztec-packages#5357) * Remove conditional compilation around `acvm_js` package (noir-lang/noir#4702) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Remove debug log from watch.sh ([a9a349d](AztecProtocol/aztec-packages@a9a349d)) * Remove last traces of nix (noir-lang/noir#4679) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Remove unused boolean return values from stores ([#5470](AztecProtocol/aztec-packages#5470)) ([07794ee](AztecProtocol/aztec-packages@07794ee)) * Remove unused env vars from `Cross.toml` (noir-lang/noir#4717) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Replace relative paths to noir-protocol-circuits ([51a1983](AztecProtocol/aztec-packages@51a1983)) * Replace relative paths to noir-protocol-circuits ([a716270](AztecProtocol/aztec-packages@a716270)) * Replace relative paths to noir-protocol-circuits ([6827014](AztecProtocol/aztec-packages@6827014)) * Replace relative paths to noir-protocol-circuits ([356caf7](AztecProtocol/aztec-packages@356caf7)) * Simplify how `acvm_backend.wasm` is embedded (noir-lang/noir#4703) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Simplify how blns is loaded into tests (noir-lang/noir#4705) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) * Update snapshot ([#5626](AztecProtocol/aztec-packages#5626)) ([fb66426](AztecProtocol/aztec-packages@fb66426)) * Use is_entry_point helper on RuntimeType (noir-lang/noir#4678) ([8b30b95](AztecProtocol/aztec-packages@8b30b95)) ### Documentation * Minor fixes in keys ([#5550](AztecProtocol/aztec-packages#5550)) ([ea48ad3](AztecProtocol/aztec-packages@ea48ad3)) * **spec:** Hashing and keys ([#5478](AztecProtocol/aztec-packages#5478)) ([820ac8c](AztecProtocol/aztec-packages@820ac8c)) * Update quickstart.md to use Docker daemon ([#5576](AztecProtocol/aztec-packages#5576)) ([42b9827](AztecProtocol/aztec-packages@42b9827)) </details> <details><summary>barretenberg: 0.33.0</summary> ## [0.33.0](AztecProtocol/aztec-packages@barretenberg-v0.32.1...barretenberg-v0.33.0) (2024-04-09) ### ⚠ BREAKING CHANGES * **acir:** Add predicate to call opcode ([#5616](AztecProtocol/aztec-packages#5616)) ### Features * **acir:** Add predicate to call opcode ([#5616](AztecProtocol/aztec-packages#5616)) ([e8cec0a](AztecProtocol/aztec-packages@e8cec0a)) * Avm logup ([#5577](AztecProtocol/aztec-packages#5577)) ([7e4e9b9](AztecProtocol/aztec-packages@7e4e9b9)) * **avm:** Contract instance opcode ([#5487](AztecProtocol/aztec-packages#5487)) ([ceacba6](AztecProtocol/aztec-packages@ceacba6)) * **avm:** Indirect memory for set opcode ([#5546](AztecProtocol/aztec-packages#5546)) ([e0e7200](AztecProtocol/aztec-packages@e0e7200)), closes [#5542](AztecProtocol/aztec-packages#5542) * DataBus notion with calldata/return data ([#5504](AztecProtocol/aztec-packages#5504)) ([95a1d8a](AztecProtocol/aztec-packages@95a1d8a)) * Optimise relations ([#5552](AztecProtocol/aztec-packages#5552)) ([a581e80](AztecProtocol/aztec-packages@a581e80)) * Optimize auxiliary relations slightly ([#5517](AztecProtocol/aztec-packages#5517)) ([30be431](AztecProtocol/aztec-packages@30be431)) ### Miscellaneous * ECCVM flavor depends on builder ([#5323](AztecProtocol/aztec-packages#5323)) ([a594683](AztecProtocol/aztec-packages@a594683)) * Get rid of ECCVM composer ([#5562](AztecProtocol/aztec-packages#5562)) ([43ed901](AztecProtocol/aztec-packages@43ed901)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This should fix the failures introduced by #5490. These were a bit of an unforntunate coincidence, #5500 changed the underlying kernel data structures, and #5432 changed what `simulate` does: both would've caused issues, but because `simulate`'s return type is `any` this went unnoticed until execution. I also added the new job to the earthly setup, still looking into why the old PR was merged despite failing. --------- Co-authored-by: Charlie Lye <karl.lye@gmail.com>
Changes to
PublicInputs
✅ New Flow
If the tx contains public calls:
A new circuit
PrivateTailToPublic
is introduced, which is similar toPrivateTail
, but it also processes data relevant to the public kernel, such as public call requests, and outputsPublicCircuitPublicInputs
.⛔ Previous Flow
Previously, public inputs had to be converted in typescript before feeding to the
PublicSetup
andBaseRollup
circuits. And the circuits not only had to convert the public inputs back to the correct format according to the type of the previous proof, they also had to conditionally check the data. For example, if the previous proof isPrivateTail
,BaseRollup
had to assert that all public update requests in the givenRollupKernelCircuitPublicInputs
are empty.If the tx contains public calls:
Changes to
AccumulatedData
✅ New Format
PrivateAccumulatedData
PublicAccumulatedData
PublicAccumulatedData
AccumulatedData
⛔ Previous Format
CombinedAccumulatedData
PrivateAccumulatedRevertibleData
PrivateAccumulatedNonRevertibleData
PublicAccumulatedRevertibleData
PublicAccumulatedNonRevertibleData
CombinedAccumulatedData