diff --git a/.github/ci3_labels_to_env.sh b/.github/ci3_labels_to_env.sh index 980c91bc538b..04a0724de0de 100755 --- a/.github/ci3_labels_to_env.sh +++ b/.github/ci3_labels_to_env.sh @@ -166,11 +166,15 @@ function main { echo "SKIP_COMPAT_E2E=1" >> $GITHUB_ENV fi +<<<<<<< HEAD # Benching modes run their benches on a dedicated, fixed-hardware box (stable numbers) # and publish the result; ci-fast never benches. For grind runs (merge-queue-heavy fires # ~10 instances) only the first instance keeps BENCH_UPLOAD=1 — multi_job_run forces the # rest to 0 so they bench inline as a breakage check without racing the upload. The # destination (bench/next vs bench/prs) is BENCH_BRANCH below. +======= + # Determine if benchmarks should be uploaded (merge-queue, full, or full-no-test-cache modes) +>>>>>>> origin/v5-next if [[ "$ci_mode" == "merge-queue" || "$ci_mode" == "merge-queue-heavy" || "$ci_mode" == "full" || "$ci_mode" == "full-no-test-cache" ]]; then echo "BENCH_UPLOAD=1" >> $GITHUB_ENV fi diff --git a/.github/workflows/aztec-cli-acceptance-test.yml b/.github/workflows/aztec-cli-acceptance-test.yml index c0ba4ce91dd0..89b9b2d2d65c 100644 --- a/.github/workflows/aztec-cli-acceptance-test.yml +++ b/.github/workflows/aztec-cli-acceptance-test.yml @@ -30,8 +30,12 @@ jobs: github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' +<<<<<<< HEAD && !contains(github.event.workflow_run.head_branch, '-commit.') && github.repository != 'AztecProtocol/aztec-packages-private') +======= + && !contains(github.event.workflow_run.head_branch, '-commit.')) +>>>>>>> origin/v5-next env: VERSION: ${{ github.event.inputs.version || github.event.workflow_run.head_branch }} steps: diff --git a/.github/workflows/ci3.yml b/.github/workflows/ci3.yml index 443e254bf4c0..c7c7c0e32d97 100644 --- a/.github/workflows/ci3.yml +++ b/.github/workflows/ci3.yml @@ -216,7 +216,11 @@ jobs: fail-fast: false matrix: test_set: ["1", "2"] +<<<<<<< HEAD # We run on the current next (v6) public nightly tag, or when the ci-network-scenario label is present in a PR. +======= + # We run on the current v5-next nightly tag (private repo only), or when the ci-network-scenario label is present in a PR. +>>>>>>> origin/v5-next needs: [ci, validate-nightly-tag] if: | always() @@ -226,8 +230,13 @@ jobs: && ( ( needs.validate-nightly-tag.outputs.is_current == 'true' +<<<<<<< HEAD && github.repository == 'AztecProtocol/aztec-packages' && startsWith(github.ref_name, 'v6.') +======= + && github.repository == 'AztecProtocol/aztec-packages-private' + && startsWith(github.ref_name, 'v5.') +>>>>>>> origin/v5-next ) || contains(github.event.pull_request.labels.*.name, 'ci-network-scenario') ) diff --git a/.github/workflows/merge-train-create-pr.yml b/.github/workflows/merge-train-create-pr.yml index 18f04f492ab2..7204355938ef 100644 --- a/.github/workflows/merge-train-create-pr.yml +++ b/.github/workflows/merge-train-create-pr.yml @@ -24,8 +24,13 @@ jobs: branch="${{ github.ref_name }}" # Determine base branch. Most trains target next; trains suffixed +<<<<<<< HEAD # with -v (e.g. spartan-v5, fairies-v5) target the matching # release line (v5-next) instead. +======= + # with -v (e.g. spartan-v5, fairies-v5, spartan-v6) target the + # matching release line (v5-next, v6-next) instead. +>>>>>>> origin/v5-next base_branch="next" if [[ "$branch" =~ -v([0-9]+)$ ]]; then base_branch="v${BASH_REMATCH[1]}-next" @@ -55,10 +60,14 @@ jobs: # Create PR with ci-no-squash label labels="ci-no-squash" - if [[ "$branch" == "merge-train/spartan" || "$branch" == "merge-train/spartan-v5" || "$branch" == "merge-train/ci" ]]; then + if [[ "$branch" == "merge-train/spartan" || "$branch" == "merge-train/spartan-v5" || "$branch" == "merge-train/spartan-v6" || "$branch" == "merge-train/ci" ]]; then labels="$labels,ci-full-no-test-cache" fi +<<<<<<< HEAD # Trains targeting a v-next release line (v5-next) are +======= + # Trains targeting a v-next release line (v5-next, v6-next) are +>>>>>>> origin/v5-next # forward-ported into their base via the private-port-next driver. if [[ "$base_branch" =~ ^v[0-9]+-next$ ]]; then labels="$labels,private-port-next" diff --git a/.github/workflows/merge-train-next-to-branches.yml b/.github/workflows/merge-train-next-to-branches.yml index 74c2425fba29..cabe64200574 100644 --- a/.github/workflows/merge-train-next-to-branches.yml +++ b/.github/workflows/merge-train-next-to-branches.yml @@ -5,6 +5,7 @@ on: branches: - next - v5-next + - v6-next jobs: merge-to-trains: @@ -27,13 +28,26 @@ jobs: GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} COMMIT_SHA: ${{ github.sha }} run: | +<<<<<<< HEAD # The -v trains track the matching release line (v5-next); every # other train tracks next. Sync only the trains fed by the branch # that was just pushed. +======= + # The -v trains track the matching release line (v5-next, v6-next); + # every other train tracks next. Sync only the trains fed by the + # branch that was just pushed. +>>>>>>> origin/v5-next if [[ "${{ github.ref_name }}" == "v5-next" ]]; then for branch in merge-train/spartan-v5 merge-train/fairies-v5; do ./scripts/merge-train/merge-next.sh "$branch" v5-next || true done +<<<<<<< HEAD +======= + elif [[ "${{ github.ref_name }}" == "v6-next" ]]; then + for branch in merge-train/spartan-v6; do + ./scripts/merge-train/merge-next.sh "$branch" v6-next || true + done +>>>>>>> origin/v5-next else for branch in merge-train/avm merge-train/barretenberg merge-train/ci merge-train/docs merge-train/fairies merge-train/spartan; do ./scripts/merge-train/merge-next.sh "$branch" || true diff --git a/.github/workflows/merge-train-stale-check.yml b/.github/workflows/merge-train-stale-check.yml index 6474cf137dd7..a1c477249723 100644 --- a/.github/workflows/merge-train-stale-check.yml +++ b/.github/workflows/merge-train-stale-check.yml @@ -38,6 +38,24 @@ jobs: BASE_BRANCH: v5-next run: ./ci3/merge_train_stale_check merge-train/spartan-v5 '#team-alpha' +<<<<<<< HEAD +======= + spartan-v6: + name: Check merge-train/spartan-v6 + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Run stale check + env: + GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + BASE_BRANCH: v6-next + run: ./ci3/merge_train_stale_check merge-train/spartan-v6 '#team-alpha' + +>>>>>>> origin/v5-next fairies-v5: name: Check merge-train/fairies-v5 runs-on: ubuntu-latest diff --git a/.github/workflows/nightly-release-tag-v5-next.yml b/.github/workflows/nightly-release-tag-v5-next.yml new file mode 100644 index 000000000000..117ebb366258 --- /dev/null +++ b/.github/workflows/nightly-release-tag-v5-next.yml @@ -0,0 +1,32 @@ +name: Nightly Release Tag (v5-next) +on: + schedule: + # Run the workflow every night at 5:00 AM UTC. + - cron: "0 5 * * *" + workflow_dispatch: {} + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-v5-next + +jobs: + nightly-release-tag-v5-next: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + ref: v5-next + token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} + + - name: Create v5-next Nightly Tag + run: | + git config --global user.email "tech@aztecprotocol.com" + git config --global user.name "AztecBot" + current_version=$(jq -r '."."' .release-please-manifest.json) + echo "Current version: $current_version" + nightly_tag="v${current_version}-nightly.$(date -u +%Y%m%d)" + echo "v5-next nightly tag: $nightly_tag" + git tag -a "$nightly_tag" -m "$nightly_tag" + git push origin "$nightly_tag" diff --git a/.github/workflows/nightly-spartan-bench.yml b/.github/workflows/nightly-spartan-bench.yml index 7f01f90f1b39..52132cb84449 100644 --- a/.github/workflows/nightly-spartan-bench.yml +++ b/.github/workflows/nightly-spartan-bench.yml @@ -212,11 +212,21 @@ jobs: with: ref: ${{ needs.select-image.outputs.source_ref }} +<<<<<<< HEAD - name: Configure AWS credentials (OIDC) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }} aws-region: us-east-2 +======= + - name: Cleanup network resources + uses: ./.github/actions/network-teardown + with: + env_file: tps-scenario + namespace: nightly-bench + gcp_sa_key: ${{ secrets.GCP_SA_KEY }} + gcp_project_id: ${{ secrets.GCP_PROJECT_ID }} +>>>>>>> origin/v5-next - name: Cleanup network resources uses: ./.github/actions/network-teardown @@ -390,11 +400,21 @@ jobs: with: ref: ${{ needs.select-image.outputs.source_ref }} +<<<<<<< HEAD - name: Configure AWS credentials (OIDC) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }} aws-region: us-east-2 +======= + - name: Cleanup network resources + uses: ./.github/actions/network-teardown + with: + env_file: prove-n-tps-fake + namespace: prove-n-tps-fake + gcp_sa_key: ${{ secrets.GCP_SA_KEY }} + gcp_project_id: ${{ secrets.GCP_PROJECT_ID }} +>>>>>>> origin/v5-next - name: Cleanup network resources uses: ./.github/actions/network-teardown @@ -568,11 +588,21 @@ jobs: with: ref: ${{ needs.select-image.outputs.source_ref }} +<<<<<<< HEAD - name: Configure AWS credentials (OIDC) uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }} aws-region: us-east-2 +======= + - name: Cleanup network resources + uses: ./.github/actions/network-teardown + with: + env_file: block-capacity + namespace: nightly-block-capacity + gcp_sa_key: ${{ secrets.GCP_SA_KEY }} + gcp_project_id: ${{ secrets.GCP_PROJECT_ID }} +>>>>>>> origin/v5-next - name: Cleanup network resources uses: ./.github/actions/network-teardown diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a3a12f494832..affd1ab3d151 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "6.0.0" + ".": "5.1.0" } diff --git a/.test_patterns.yml b/.test_patterns.yml index fdbff0409b31..95f924d30117 100644 --- a/.test_patterns.yml +++ b/.test_patterns.yml @@ -422,11 +422,6 @@ tests: owners: - *martin - - regex: "yarn-project/scripts/run_test.sh bb-prover/src/avm_proving_tests/avm_" - error_regex: "timeout: sending signal" - owners: - - *charlie - - regex: "run_test.sh simple tx_stats_bench" error_regex: "✕ verifies transactions at 10 TPS" owners: diff --git a/CLAUDE.md b/CLAUDE.md index 3b0d9aad622d..37a5025149a0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,6 +59,10 @@ When staging files, prefer `git add -u` or name specific files rather than `git Never bulk-update lockfiles (`Cargo.lock`, `yarn.lock`). Use targeted updates only: `cargo update --precise --package ` for Rust, and `yarn up @` in the relevant workspace for TypeScript. Bulk updates drag in unrelated transitive changes that make review impossible and frequently break reproducibility. + +Never run `noir-projects/noir-contracts/bootstrap.sh pin-standard-build` on your own initiative. The pin exists so ordinary source or bytecode changes do NOT move the standard contracts' canonical addresses, and CI does not fail when the bytecode drifts. A re-pin is a deliberate redeploy decision for a human to make: if a change seems to need one, leave the pin, rebuild against it, and ask. See the comment on `pin-standard-build` for why re-pinning is breaking. + + diff --git a/Makefile b/Makefile index 5b3e4bc61f7a..83a615948232 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,15 @@ endef # Fast bootstrap. fast: release-image barretenberg boxes playground docs aztec-up \ +<<<<<<< HEAD +<<<<<<< HEAD + bb-tests l1-contracts-tests yarn-project-tests boxes-tests playground-tests aztec-up-tests docs-tests noir-protocol-circuits-tests contract-snapshots-tests release-image-tests spartan claude-tests ipc-codegen-tests +======= + bb-tests l1-contracts-tests yarn-project-tests boxes-tests playground-tests aztec-up-tests docs-tests noir-protocol-circuits-tests contract-snapshots-tests release-image-tests spartan claude-tests +>>>>>>> origin/v5-next +======= bb-tests l1-contracts-tests yarn-project-tests boxes-tests playground-tests aztec-up-tests docs-tests noir-protocol-circuits-tests contract-snapshots-tests release-image-tests spartan claude-tests ipc-codegen-tests constants-codegen-tests +>>>>>>> origin/next # Full bootstrap. full: fast bb-full-tests bb-cpp-full yarn-project-benches diff --git a/barretenberg/cpp/scripts/chonk-inputs.hash b/barretenberg/cpp/scripts/chonk-inputs.hash index 3f538f2b146a..f922bbd21bbd 100644 --- a/barretenberg/cpp/scripts/chonk-inputs.hash +++ b/barretenberg/cpp/scripts/chonk-inputs.hash @@ -1 +1,9 @@ +<<<<<<< HEAD +<<<<<<< HEAD 42ffe8bc8b4f60d8 +======= +30325f8d3e30771a +>>>>>>> origin/v5-next +======= +f19b76f7fa0ff0cd +>>>>>>> origin/v5-next diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp index 0415f245592e..e232a77ab7b8 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp @@ -8,6 +8,7 @@ #include "barretenberg/common/utils.hpp" #include "barretenberg/serialize/test_helper.hpp" #include "msgpack/v3/sbuffer_decl.hpp" +#include #include using namespace bb; @@ -28,7 +29,8 @@ using Commands = ::testing::Types; + bbapi::ChonkBatchVerify, + bbapi::SetMsmLegacy>; // Typed test suites template class BBApiMsgpack : public ::testing::Test {}; @@ -48,6 +50,28 @@ TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip) std::cout << msgpack_schema_to_string(command) << " " << msgpack_schema_to_string(response) << std::endl; } +TEST(BBApiConfig, SetMsmLegacyTogglesFacade) +{ + bbapi::BBApiRequest request{}; + + // Legacy MSM is the default: with no API override and neither env var set, the facade + // routes to the legacy path. + scalar_multiplication::clear_legacy_msm_override(); + if (std::getenv("BB_MSM_LEGACY") == nullptr && std::getenv("BB_MSM_NEW") == nullptr) { + EXPECT_TRUE(scalar_multiplication::use_legacy_msm()); + } + + auto enabled = bbapi::SetMsmLegacy{ .enabled = true }.execute(request); + EXPECT_TRUE(enabled.enabled); + EXPECT_TRUE(scalar_multiplication::use_legacy_msm()); + + auto disabled = bbapi::SetMsmLegacy{ .enabled = false }.execute(request); + EXPECT_FALSE(disabled.enabled); + EXPECT_FALSE(scalar_multiplication::use_legacy_msm()); + + scalar_multiplication::clear_legacy_msm_override(); +} + // Regression tests for input validation at API boundaries. // These ensure non-canonical field encodings and trailing bytes are rejected. diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp index 1fecf8860695..9e0e730fb914 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp @@ -78,6 +78,7 @@ using Command = NamedUnion; using CommandResponse = NamedUnion; /** diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp index dc7a2a8b0619..b0563e27f937 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp @@ -25,6 +25,7 @@ #include #include +<<<<<<< HEAD // The FIFO-streaming Chonk batch verifier service relies on POSIX named pipes and signals // (open/lstat/SIGPIPE), which are unavailable on wasm and on Windows (MinGW). Those platforms // compile throwing stubs instead. This macro guards the service across bbapi_shared.hpp, @@ -32,6 +33,12 @@ #if !defined(__wasm__) && !defined(_WIN32) #define BB_HAS_BATCH_VERIFIER_SERVICE #endif +======= +namespace bb::scalar_multiplication { +[[nodiscard]] bool use_legacy_msm() noexcept; +void set_legacy_msm_override(bool enabled) noexcept; +} // namespace bb::scalar_multiplication +>>>>>>> origin/v5-next namespace bb::bbapi { @@ -234,6 +241,26 @@ struct Shutdown { bool operator==(const Shutdown&) const = default; }; +struct SetMsmLegacy { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "SetMsmLegacy"; + bool enabled = false; + + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "SetMsmLegacyResponse"; + bool enabled = false; + SERIALIZATION_FIELDS(enabled); + bool operator==(const Response&) const = default; + }; + + SERIALIZATION_FIELDS(enabled); + Response execute(const BBApiRequest&) const + { + scalar_multiplication::set_legacy_msm_override(enabled); + return { .enabled = scalar_multiplication::use_legacy_msm() }; + } + bool operator==(const SetMsmLegacy&) const = default; +}; + /** * @brief Concatenate public inputs and proof into a complete proof for verification * @details Joins the separated public_inputs and proof portions back together. diff --git a/barretenberg/cpp/src/barretenberg/chonk/proof_compression.hpp b/barretenberg/cpp/src/barretenberg/chonk/proof_compression.hpp index 69911975105d..dfc1890e4166 100644 --- a/barretenberg/cpp/src/barretenberg/chonk/proof_compression.hpp +++ b/barretenberg/cpp/src/barretenberg/chonk/proof_compression.hpp @@ -370,6 +370,322 @@ class ProofCompressor { return { Fr(v & LOWER_MASK), Fr(v >> FQ_SPLIT_BITS) }; } +<<<<<<< HEAD +======= + // ========================================================================= + // Walk functions — define proof layouts once for compress/decompress + // ========================================================================= + + /** + * @brief Walk a MegaZK Oink-only proof (BN254). + * @details In the batched protocol, the MegaZK proof contains only the Oink phase: + * public inputs followed by witness commitments. Sumcheck and PCS are in the joint proof. + */ + template + static void walk_mega_zk_oink_proof(ScalarFn&& process_scalar, + CommitmentFn&& process_commitment, + size_t num_public_inputs) + { + // Public inputs + for (size_t i = 0; i < num_public_inputs; i++) { + process_scalar(); + } + // Witness commitments (NUM_WITNESS_ENTITIES) + for (size_t i = 0; i < MegaZKFlavor::NUM_WITNESS_ENTITIES; i++) { + process_commitment(); + } + } + + /** + * @brief Walk a Merge proof (41 Fr, all BN254). + * @details Layout from MergeProver::construct_proof. + */ + template + static void walk_merge_proof(ScalarFn&& process_scalar, CommitmentFn&& process_commitment) + { + // 4 merged table commitments + for (size_t i = 0; i < 4; i++) { + process_commitment(); + } + // Reversed batched left tables commitment + process_commitment(); + // 4 left + 4 right + 4 merged table evaluations + 1 reversed eval = 13 scalars + for (size_t i = 0; i < 13; i++) { + process_scalar(); + } + // Shplonk Q + KZG W + process_commitment(); + process_commitment(); + } + + /** + * @brief Walk an ECCVM proof (all Grumpkin). + * @details Layout from ECCVMFlavor::PROOF_LENGTH formula and ECCVM prover code. + * Grumpkin RoundUnivariateHandler commits to each round univariate and sends + * 2 evaluations (at 0 and 1), interleaved per round. + */ + template + static void walk_eccvm_proof(ScalarFn&& process_scalar, CommitmentFn&& process_commitment) + { + constexpr size_t log_n = CONST_ECCVM_LOG_N; + constexpr size_t num_witness = ECCVMFlavor::NUM_WITNESS_ENTITIES + ECCVMFlavor::NUM_MASKING_POLYNOMIALS; + + // Witness commitments (wires + derived + masking poly) + for (size_t i = 0; i < num_witness; i++) { + process_commitment(); + } + // Libra concatenation commitment + process_commitment(); + // Libra sum + process_scalar(); + // Sumcheck round univariates: per round, Grumpkin commits then sends 2 evaluations + for (size_t i = 0; i < log_n; i++) { + process_commitment(); // univariate commitment for round i + process_scalar(); // eval at 0 for round i + process_scalar(); // eval at 1 for round i + } + // Sumcheck evaluations + for (size_t i = 0; i < ECCVMFlavor::NUM_ALL_ENTITIES; i++) { + process_scalar(); + } + // Libra claimed evaluation + process_scalar(); + // Libra grand sum + quotient commitments + process_commitment(); + process_commitment(); + // Gemini fold commitments + for (size_t i = 0; i < log_n - 1; i++) { + process_commitment(); + } + // Gemini fold evaluations + for (size_t i = 0; i < log_n; i++) { + process_scalar(); + } + // Small IPA evaluations (for sumcheck libra) + for (size_t i = 0; i < NUM_SMALL_IPA_TRANSCRIPT_EVALS; i++) { + process_scalar(); + } + // Shplonk Q + process_commitment(); + + // --- Translation section --- + // Translator concatenated masking commitment + process_commitment(); + // 5 translation evaluations (op, Px, Py, z1, z2) + for (size_t i = 0; i < NUM_TRANSLATION_EVALUATIONS; i++) { + process_scalar(); + } + // Translation masking term evaluation + process_scalar(); + // Translation grand sum + quotient commitments + process_commitment(); + process_commitment(); + // Translation SmallSubgroupIPA evaluations + for (size_t i = 0; i < NUM_SMALL_IPA_TRANSCRIPT_EVALS; i++) { + process_scalar(); + } + // Translation Shplonk Q + process_commitment(); + } + + /** + * @brief Walk an IPA proof (64 Fr, all Grumpkin). + * @details IPA_PROOF_LENGTH = 4 * CONST_ECCVM_LOG_N + 4 + */ + template + static void walk_ipa_proof(ScalarFn&& process_scalar, CommitmentFn&& process_commitment) + { + // L and R commitments per round + for (size_t i = 0; i < CONST_ECCVM_LOG_N; i++) { + process_commitment(); // L_i + process_commitment(); // R_i + } + // G_0 commitment + process_commitment(); + // a_0 scalar + process_scalar(); + } + + /** + * @brief Walk the joint proof (translator oink + joint sumcheck + joint PCS, all BN254). + * @details Produced by BatchedHonkTranslatorProver::prove(). Contains the translator's + * pre-sumcheck commitments, a joint 17-round sumcheck over MegaZK + translator, and a + * joint Shplemini/KZG PCS reduction. + */ + template + static void walk_joint_proof(ScalarFn&& process_scalar, CommitmentFn&& process_commitment) + { + constexpr size_t JOINT_LOG_N = TranslatorFlavor::CONST_TRANSLATOR_LOG_N; // 17 + // --- Translator Oink --- + // Gemini masking poly commitment + process_commitment(); + // Wire commitments: concatenated + ordered range constraints + for (size_t i = 0; i < TranslatorFlavor::NUM_COMMITMENTS_IN_PROOF; i++) { + process_commitment(); + } + // Z_PERM commitment + process_commitment(); + + // --- Joint Sumcheck (Libra header) --- + // Libra concatenation commitment + process_commitment(); + // Libra sum + process_scalar(); + + // Committed sumcheck rounds 0..JOINT_LOG_N-1 (commitment + 2 evals per round) + for (size_t round = 0; round < JOINT_LOG_N; round++) { + // Minicircuit evaluations sent at round LOG_MINI_CIRCUIT_SIZE - 1 + if (round == TranslatorFlavor::LOG_MINI_CIRCUIT_SIZE) { + for (size_t j = 0; j < TranslatorFlavor::NUM_MINICIRCUIT_EVALUATIONS; j++) { + process_scalar(); + } + } + process_commitment(); // round univariate commitment + process_scalar(); // eval at 0 + process_scalar(); // eval at 1 + } + + // MegaZK evaluations (sent after all sumcheck rounds) + for (size_t i = 0; i < MegaZKFlavor::NUM_ALL_ENTITIES; i++) { + process_scalar(); + } + + // Translator evaluations (sent after all rounds) + for (size_t i = 0; i < TranslatorFlavor::NUM_FULL_CIRCUIT_EVALUATIONS; i++) { + process_scalar(); + } + + // --- Joint Sumcheck (Libra footer) --- + // Libra claimed evaluation + process_scalar(); + // Libra grand sum + quotient commitments + process_commitment(); + process_commitment(); + + // --- Joint PCS --- + // Gemini fold commitments + for (size_t i = 0; i < JOINT_LOG_N - 1; i++) { + process_commitment(); + } + // Gemini fold evaluations + for (size_t i = 0; i < JOINT_LOG_N; i++) { + process_scalar(); + } + // Small IPA evaluations + for (size_t i = 0; i < NUM_SMALL_IPA_TRANSCRIPT_EVALS; i++) { + process_scalar(); + } + // Shplonk Q + KZG W + process_commitment(); + process_commitment(); + } + + /** + * @brief Walk a full Chonk proof (5 sub-proofs across two curves). + * @details Layout: hiding_oink (BN254) | merge (BN254) | eccvm (Grumpkin) | ipa (Grumpkin) | joint (BN254) + */ + template + static void walk_chonk_proof(BN254ScalarFn&& bn254_scalar, + BN254CommFn&& bn254_comm, + GrumpkinScalarFn&& grumpkin_scalar, + GrumpkinCommFn&& grumpkin_comm, + size_t mega_num_public_inputs) + { + walk_mega_zk_oink_proof(bn254_scalar, bn254_comm, mega_num_public_inputs); + walk_merge_proof(bn254_scalar, bn254_comm); + walk_eccvm_proof(grumpkin_scalar, grumpkin_comm); + walk_ipa_proof(grumpkin_scalar, grumpkin_comm); + walk_joint_proof(bn254_scalar, bn254_comm); + } + + // ========================================================================= + // Walk count validation — ensure the constants used in walks match PROOF_LENGTH. + // These mirror the walk logic using the same constants; if a PROOF_LENGTH formula + // changes, the static_assert fires, prompting an update to the corresponding walk. + // ========================================================================= + + // Fr-elements per element type for each curve + static constexpr size_t BN254_FRS_PER_SCALAR = 1; + static constexpr size_t BN254_FRS_PER_COMM = 4; // Fq x,y each as (lo,hi) Fr pair + static constexpr size_t GRUMPKIN_FRS_PER_SCALAR = 2; // Fq stored as (lo,hi) Fr pair + static constexpr size_t GRUMPKIN_FRS_PER_COMM = 2; // Fr x,y coordinates + + // clang-format off + // Hiding Oink (without public inputs) — mirrors walk_mega_zk_oink_proof with num_public_inputs=0 + static constexpr size_t EXPECTED_HIDING_OINK_FRS = + MegaZKFlavor::NUM_WITNESS_ENTITIES * BN254_FRS_PER_COMM; // witness comms + static_assert(EXPECTED_HIDING_OINK_FRS == ProofLength::Oink::LENGTH_WITHOUT_PUB_INPUTS); + + // Merge — mirrors walk_merge_proof + static constexpr size_t EXPECTED_MERGE_FRS = + 5 * BN254_FRS_PER_COMM + // 4 merged tables + 1 reversed batched left + 13 * BN254_FRS_PER_SCALAR + // evaluations + 2 * BN254_FRS_PER_COMM; // shplonk Q + KZG W + static_assert(EXPECTED_MERGE_FRS == MERGE_PROOF_SIZE); + + // ECCVM — mirrors walk_eccvm_proof + static constexpr size_t EXPECTED_ECCVM_FRS = + (ECCVMFlavor::NUM_WITNESS_ENTITIES + ECCVMFlavor::NUM_MASKING_POLYNOMIALS) * GRUMPKIN_FRS_PER_COMM + // witnesses + 1 * GRUMPKIN_FRS_PER_COMM + // libra concat + 1 * GRUMPKIN_FRS_PER_SCALAR + // libra sum + CONST_ECCVM_LOG_N * GRUMPKIN_FRS_PER_COMM + // sumcheck univariate comms + 2 * CONST_ECCVM_LOG_N * GRUMPKIN_FRS_PER_SCALAR + // sumcheck univariate evals (2 per round) + ECCVMFlavor::NUM_ALL_ENTITIES * GRUMPKIN_FRS_PER_SCALAR + // sumcheck evals + 1 * GRUMPKIN_FRS_PER_SCALAR + // libra claimed eval + 2 * GRUMPKIN_FRS_PER_COMM + // libra grand sum + quotient + (CONST_ECCVM_LOG_N - 1) * GRUMPKIN_FRS_PER_COMM + // gemini folds + CONST_ECCVM_LOG_N * GRUMPKIN_FRS_PER_SCALAR + // gemini evals + NUM_SMALL_IPA_TRANSCRIPT_EVALS * GRUMPKIN_FRS_PER_SCALAR + // small IPA evals + 1 * GRUMPKIN_FRS_PER_COMM + // shplonk Q + 1 * GRUMPKIN_FRS_PER_COMM + // translator masking comm + NUM_TRANSLATION_EVALUATIONS * GRUMPKIN_FRS_PER_SCALAR + // translation evals + 1 * GRUMPKIN_FRS_PER_SCALAR + // masking term eval + 2 * GRUMPKIN_FRS_PER_COMM + // translation grand sum + quotient + NUM_SMALL_IPA_TRANSCRIPT_EVALS * GRUMPKIN_FRS_PER_SCALAR + // translation small IPA evals + 1 * GRUMPKIN_FRS_PER_COMM; // translation shplonk Q + static_assert(EXPECTED_ECCVM_FRS == ECCVMFlavor::PROOF_LENGTH); + + // IPA — mirrors walk_ipa_proof + static constexpr size_t EXPECTED_IPA_FRS = + 2 * CONST_ECCVM_LOG_N * GRUMPKIN_FRS_PER_COMM + // L and R per round + 1 * GRUMPKIN_FRS_PER_COMM + // G_0 + 1 * GRUMPKIN_FRS_PER_SCALAR; // a_0 + static_assert(EXPECTED_IPA_FRS == IPA_PROOF_LENGTH); + + // Joint proof — mirrors walk_joint_proof (translator oink + joint sumcheck + joint PCS) + static constexpr size_t JOINT_LOG_N = TranslatorFlavor::CONST_TRANSLATOR_LOG_N; + static constexpr size_t EXPECTED_JOINT_FRS = + // Translator oink + 1 * BN254_FRS_PER_COMM + // gemini masking poly + TranslatorFlavor::NUM_COMMITMENTS_IN_PROOF * BN254_FRS_PER_COMM + // wire comms + 1 * BN254_FRS_PER_COMM + // z_perm + // Joint sumcheck (libra header) + 1 * BN254_FRS_PER_COMM + // libra concat + 1 * BN254_FRS_PER_SCALAR + // libra sum + // Committed sumcheck rounds (commitment + 2 evals per round) + JOINT_LOG_N * BN254_FRS_PER_COMM + // round univariate comms + 2 * JOINT_LOG_N * BN254_FRS_PER_SCALAR + // round univariate evals + // Minicircuit evaluations (sent once at round LOG_MINI_CIRCUIT_SIZE - 1) + TranslatorFlavor::NUM_MINICIRCUIT_EVALUATIONS * BN254_FRS_PER_SCALAR + // minicircuit evals + // MegaZK evaluations (sent after all sumcheck rounds) + MegaZKFlavor::NUM_ALL_ENTITIES * BN254_FRS_PER_SCALAR + // mega_zk evals + // Translator evaluations (sent after all rounds) + TranslatorFlavor::NUM_FULL_CIRCUIT_EVALUATIONS * BN254_FRS_PER_SCALAR + // translator evals + // Joint sumcheck (libra footer) + 1 * BN254_FRS_PER_SCALAR + // libra claimed eval + 2 * BN254_FRS_PER_COMM + // libra grand sum + quotient + // Joint PCS + (JOINT_LOG_N - 1) * BN254_FRS_PER_COMM + // gemini folds + JOINT_LOG_N * BN254_FRS_PER_SCALAR + // gemini evals + NUM_SMALL_IPA_TRANSCRIPT_EVALS * BN254_FRS_PER_SCALAR + // small IPA evals + 2 * BN254_FRS_PER_COMM; // shplonk Q + KZG W + // Cross-check: walk-based count must match ChonkProof's structural constants + static_assert(EXPECTED_HIDING_OINK_FRS + EXPECTED_MERGE_FRS + EXPECTED_ECCVM_FRS + EXPECTED_IPA_FRS + + EXPECTED_JOINT_FRS == + ChonkProof::PROOF_LENGTH_WITHOUT_PUB_INPUTS); + // clang-format on + +>>>>>>> origin/v5-next public: static constexpr size_t BYTES_PER_COMPRESSED_ELEMENT = 32; static constexpr size_t BN254_SCALAR_FIELD_ELEMENTS = proof_compression_detail::BN254_FRS_PER_SCALAR; diff --git a/barretenberg/cpp/src/barretenberg/circuit_checker/ultra_circuit_builder_lookup.test.cpp b/barretenberg/cpp/src/barretenberg/circuit_checker/ultra_circuit_builder_lookup.test.cpp index e3c9fbf4d02d..d8ff67432bb5 100644 --- a/barretenberg/cpp/src/barretenberg/circuit_checker/ultra_circuit_builder_lookup.test.cpp +++ b/barretenberg/cpp/src/barretenberg/circuit_checker/ultra_circuit_builder_lookup.test.cpp @@ -4,6 +4,7 @@ #include #include +#include using namespace bb; @@ -121,6 +122,47 @@ TEST_F(UltraCircuitBuilderLookup, DifferentTablesGetUniqueIndices) EXPECT_EQ(builder.get_num_lookup_tables(), 3UL); } +// Every basic table reachable through any MultiTable must receive a unique, positive circuit-local +// table_index. The LogDeriv lookup relation identifies a table solely by table_index (not BasicTableId), +// so a generator that stores anything other than the builder-assigned index silently collapses distinct tables to one +// identity. This sweeps the whole table space so any such generator is caught. +TEST_F(UltraCircuitBuilderLookup, AllMultiTableBasicTablesGetUniquePositiveIndices) +{ + Builder builder; + for (size_t mt = 0; mt < static_cast(plookup::MultiTableId::NUM_MULTI_TABLES); ++mt) { + const auto& multitable = plookup::get_multitable(static_cast(mt)); + for (const auto id : multitable.basic_table_ids) { + builder.get_table(id); + } + } + + std::unordered_set seen; + for (const auto& table : builder.get_lookup_tables()) { + EXPECT_GT(table.table_index, 0UL) << "non-positive index for basic table id " << static_cast(table.id); + EXPECT_TRUE(seen.insert(table.table_index).second) + << "duplicate table_index " << table.table_index << " for basic table id " << static_cast(table.id); + } + EXPECT_NO_THROW(builder.finalize_circuit()); +} + +TEST_F(UltraCircuitBuilderLookup, FinalizationRejectsDuplicateTableIndices) +{ + Builder builder; + builder.get_table(plookup::BasicTableId::UINT_XOR_SLICE_6_ROTATE_0); + builder.get_table(plookup::BasicTableId::UINT_AND_SLICE_6_ROTATE_0); + builder.get_lookup_tables()[1].table_index = builder.get_lookup_tables()[0].table_index; + + EXPECT_THROW_OR_ABORT(builder.finalize_circuit(), "Lookup table indices must be unique within a circuit"); +} + +TEST_F(UltraCircuitBuilderLookup, FinalizationRejectsZeroTableIndex) +{ + Builder builder; + builder.get_table(plookup::BasicTableId::UINT_XOR_SLICE_6_ROTATE_0).table_index = 0; + + EXPECT_THROW_OR_ABORT(builder.finalize_circuit(), "Lookup table indices must be positive"); +} + // Verifies correct behavior when key_b_index is not provided (2-to-1 lookup without second index) TEST_F(UltraCircuitBuilderLookup, NoKeyBIndex) { diff --git a/barretenberg/cpp/src/barretenberg/constants.hpp b/barretenberg/cpp/src/barretenberg/constants.hpp index 4ef796618e20..9868617e6167 100644 --- a/barretenberg/cpp/src/barretenberg/constants.hpp +++ b/barretenberg/cpp/src/barretenberg/constants.hpp @@ -91,7 +91,11 @@ static constexpr size_t BATCH_MERGE_PROOF_SIZE = /*evals*/ (4 * (CHONK_MAX_NUM_CIRCUITS + 2) + 1) + /*shplonk and kzg*/ 8; +<<<<<<< HEAD // Number of ultra ops the hiding kernel appends. The final merge verifier hard-codes its shift size from this, // and the merge prover asserts the hiding subtable matches it, so it must equal the hiding kernel's ultra-op count. static constexpr size_t HIDING_KERNEL_ULTRA_OPS = 363; +======= +static constexpr size_t HIDING_KERNEL_ULTRA_OPS = 331; +>>>>>>> origin/v5-next } // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/gate_count_constants.hpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/gate_count_constants.hpp index 7f9592629c34..cf8971499953 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/gate_count_constants.hpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/gate_count_constants.hpp @@ -119,7 +119,11 @@ constexpr std::tuple HONK_RECURSION_CONSTANTS( // ======================================== // Gate count for Chonk recursive verification (Ultra with RollupIO) +<<<<<<< HEAD inline constexpr size_t CHONK_RECURSION_GATES = 1375725; +======= +inline constexpr size_t CHONK_RECURSION_GATES = 1368123; +>>>>>>> origin/v5-next // ======================================== // Hypernova Recursion Constants @@ -152,19 +156,35 @@ inline constexpr size_t RESET_TAIL_KERNEL_GATE_COUNT = 15281; inline constexpr size_t RESET_TAIL_KERNEL_ECC_ROWS = 784; inline constexpr size_t RESET_TAIL_KERNEL_ULTRA_OPS = 81; +<<<<<<< HEAD // Hiding kernel: verifies the tail kernel (HN_FINAL), then a batch-merge recursive verifier sized for // CHONK_MAX_NUM_CIRCUITS plus a decider. inline constexpr size_t HIDING_KERNEL_GATE_COUNT = 36584; inline constexpr size_t HIDING_KERNEL_ECC_ROWS = 5330; // The hiding kernel's ultra-op count is defined canonically as bb::HIDING_KERNEL_ULTRA_OPS (constants.hpp), since // the merge prover/verifier pin to it; reference it directly to avoid an ambiguous re-export in this namespace. +======= +// Tail kernel gate counts (verifies HN_TAIL proof) +inline constexpr size_t TAIL_KERNEL_GATE_COUNT = 17421; +inline constexpr size_t TAIL_KERNEL_ECC_ROWS = 689 + MSM_ROWS_OFFSET; +inline constexpr size_t TAIL_KERNEL_ULTRA_OPS = 77; + +// Hiding kernel gate counts (verifies HN_FINAL proof) +inline constexpr size_t HIDING_KERNEL_GATE_COUNT = 38940; +inline constexpr size_t HIDING_KERNEL_ECC_ROWS = 4773 + MSM_ROWS_OFFSET; +inline constexpr size_t HIDING_KERNEL_ULTRA_OPS = bb::HIDING_KERNEL_ULTRA_OPS; +>>>>>>> origin/v5-next // ======================================== // ECCVM Recursive Verifier Constants // ======================================== // Gate count for ECCVM recursive verifier (Ultra-arithmetized) +<<<<<<< HEAD inline constexpr size_t ECCVM_RECURSIVE_VERIFIER_GATE_COUNT = 237497; +======= +inline constexpr size_t ECCVM_RECURSIVE_VERIFIER_GATE_COUNT = 234059; +>>>>>>> origin/v5-next // ======================================== // Goblin AVM Recursive Verifier Constants diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/hypernova_recursion_constraint.test.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/hypernova_recursion_constraint.test.cpp index c89420528a9e..ca9fe4d0a845 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/hypernova_recursion_constraint.test.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/hypernova_recursion_constraint.test.cpp @@ -625,11 +625,38 @@ TEST_F(HypernovaRecursionConstraintTest, ResetTailKernelGateCount) TEST_F(HypernovaRecursionConstraintTest, HidingKernelGateCount) { BB_DISABLE_ASSERTS(); +<<<<<<< HEAD auto counts = mock_kernel_gate_counts({ PROOF_TYPE::HN_FINAL }); EXPECT_EQ(counts.num_opcodes, 1U); EXPECT_EQ(counts.gate_count, HIDING_KERNEL_GATE_COUNT); EXPECT_EQ(counts.ecc_rows, HIDING_KERNEL_ECC_ROWS + MSM_ROWS_OFFSET); EXPECT_EQ(counts.ultra_ops, bb::HIDING_KERNEL_ULTRA_OPS); +======= + auto ivc = std::make_shared(/*num_circuits=*/5); + + // Mock the state where we need to verify a hiding kernel proof + acir_format::mock_chonk_accumulation(ivc, Chonk::QUEUE_TYPE::HN_FINAL, /*is_kernel=*/true); + + // Construct kernel program with gate counting enabled + AcirProgram program = construct_mock_kernel_program(ivc->verification_queue); + ProgramMetadata metadata{ .ivc = ivc, .collect_gates_per_opcode = true }; + + auto kernel = acir_format::create_circuit(program, metadata); + + // Verify the gate count was recorded + EXPECT_EQ(program.constraints.gates_per_opcode.size(), 1); + + // Assert gate count + EXPECT_EQ(program.constraints.gates_per_opcode[0], HIDING_KERNEL_GATE_COUNT); + + // Assert ECC row count + size_t actual_ecc_rows = kernel.op_queue->get_num_rows(); + EXPECT_EQ(actual_ecc_rows, HIDING_KERNEL_ECC_ROWS); + + // Assert ultra ops count + size_t actual_ultra_ops = kernel.op_queue->get_current_subtable_size(); + EXPECT_EQ(actual_ultra_ops, acir_format::HIDING_KERNEL_ULTRA_OPS); +>>>>>>> origin/v5-next } // ===================================================================================== diff --git a/barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.test.cpp b/barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.test.cpp index 0253a777f145..19a052256277 100644 --- a/barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.test.cpp +++ b/barretenberg/cpp/src/barretenberg/dsl/acir_format/mock_verifier_inputs.test.cpp @@ -42,7 +42,11 @@ static_assert( ProofLength::Honk::expected_proof_size>( UltraFlavor::VIRTUAL_LOG_N) == 410, "RECURSIVE_PROOF_LENGTH changed - update constants.nr"); +<<<<<<< HEAD static_assert(ChonkProof::PROOF_LENGTH == 1221, "CHONK_PROOF_LENGTH changed - update constants.nr"); +======= +static_assert(ChonkProof::PROOF_LENGTH == 1270, "CHONK_PROOF_LENGTH changed - update constants.nr"); +>>>>>>> origin/v5-next static_assert(ChonkProof::HIDING_OINK_LENGTH == 48, "ChonkProof::HIDING_OINK_LENGTH changed - update CHONK_HIDING_OINK_LENGTH in constants.nr " "and run `yarn remake-constants`"); diff --git a/barretenberg/cpp/src/barretenberg/ecc/groups/affine_element.test.cpp b/barretenberg/cpp/src/barretenberg/ecc/groups/affine_element.test.cpp index 1df7e1fe717c..07237f336bac 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/groups/affine_element.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ecc/groups/affine_element.test.cpp @@ -549,6 +549,7 @@ template class TestAffineElement : public testing::Test { } } +<<<<<<< HEAD // === coverage for batch_two_round_fold (fused IPA SRS fold) === // Build a random 127-bit scalar, as produced by the IPA transcript for round challenges. @@ -639,6 +640,8 @@ template class TestAffineElement : public testing::Test { } } +======= +>>>>>>> origin/v5-next static void test_frc_codec_round_trip() { using FrField = FrCodec::DataType; @@ -892,6 +895,7 @@ TYPED_TEST(TestAffineElement, BatchMulNumPointsNotMultipleOfThreads) } } +<<<<<<< HEAD // Fused two-round IPA SRS fold: out[i] = (u1·u2)·P[i] + u1·P[i+t] + u2·P[i+2t] + P[i+3t]. TYPED_TEST(TestAffineElement, TwoRoundFoldRandomChallenges) { @@ -920,6 +924,8 @@ TYPED_TEST(TestAffineElement, TwoRoundFoldMatchesSequentialFolds) } } +======= +>>>>>>> origin/v5-next TYPED_TEST(TestAffineElement, BatchMulScalarUnder127Bits) { if constexpr (!TypeParam::USE_ENDOMORPHISM) { diff --git a/barretenberg/cpp/src/barretenberg/ecc/groups/element_impl.hpp b/barretenberg/cpp/src/barretenberg/ecc/groups/element_impl.hpp index 7031c66f0688..02caada7d8a4 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/groups/element_impl.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/groups/element_impl.hpp @@ -662,6 +662,7 @@ inline constexpr size_t BOOTH_ENDO_NUM_LIMBS_U64 = 2; inline constexpr size_t BOOTH_ENDO_K2_LOW_WINDOW_BITS = 2; static_assert(BOOTH_ENDO_K2_LOW_WINDOW_BITS + 1 <= 32); inline constexpr size_t BOOTH_ENDO_K2_NUM_WINDOWS = BOOTH_ENDO_NUM_WINDOWS + 1; // 33 +<<<<<<< HEAD // batch_two_round_fold evaluates the four scalar-multiplication terms below on one shared doubling // chain, interleaving their Booth digit windows on offset grids (term j on grid offset j) so each @@ -686,6 +687,8 @@ struct FoldOp { uint32_t digit; bool safe; }; +======= +>>>>>>> origin/v5-next } // namespace detail @@ -1370,6 +1373,7 @@ std::vector> element::batch_mul_with_endomo // {2, 6, ..., 126}. The union of K1/K2 bit positions is {0, 2, 4, ..., 126}, // so the main loop visits each position once with 2 doublings between // adjacent positions — every (2·dbl + add) pair fuses with combined_chunked. +<<<<<<< HEAD // // A scalar already below 2^127 (e.g. an unreduced 127-bit transcript challenge, as in the // IPA SRS fold) takes (k1, k2) = (scalar, 0) directly. An all-zero K2 digit sequence makes the @@ -1382,6 +1386,9 @@ std::vector> element::batch_mul_with_endomo const detail::EndoScalars endo_scalars = is_short_scalar ? detail::EndoScalars{ { converted_scalar.data[0], converted_scalar.data[1] }, { 0ULL, 0ULL } } : Fr::split_into_endomorphism_scalars(converted_scalar); +======= + const detail::EndoScalars endo_scalars = Fr::split_into_endomorphism_scalars(converted_scalar); +>>>>>>> origin/v5-next const uint64_t* k1 = endo_scalars.first.data(); const uint64_t* k2 = endo_scalars.second.data(); BB_ASSERT((k2[1] >> 63) == 0, "GLV K2 split must fit below 2^127 for the offset Booth window schedule"); @@ -1399,7 +1406,11 @@ std::vector> element::batch_mul_with_endomo // Precompute, for every chunked-combined/add call below, whether // batch_affine_combined_double_add_impl's edge conditions could fire. // Both edges (x(2·accum) == x(to_add), and 2·accum + to_add == O) are a function +<<<<<<< HEAD // only of the (k1, k2) Booth digit sequence and the (P, φP) basis, so we simulate the +======= + // only of the (k1, k2) Booth digit stream and the (P, φP) basis, so we simulate the +>>>>>>> origin/v5-next // accumulator's coefficients in that basis as int64s and set one mask bit per call site. // // Layout: diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_arena_layout.hpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_arena_layout.hpp index 72482e9a46cf..36a7da0c80ce 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_arena_layout.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_arena_layout.hpp @@ -21,7 +21,10 @@ #pragma once +<<<<<<< HEAD #include "barretenberg/ecc/fields/vector_field.hpp" +======= +>>>>>>> origin/v5-next #include "barretenberg/numeric/bitop/get_msb.hpp" #include @@ -179,12 +182,15 @@ template struct PerWorkerArenaLayout { static constexpr size_t PHASE_A_CHUNK_CAP = DEDUP_MAX_CHUNK_MEMBERS; static constexpr size_t WORKER_SLAB_ALIGN = alignof(AffineElement); +<<<<<<< HEAD // The packed batch-affine drain holds 8 VectorField runs in the fixed ThreadScratch region: // lhs.x, lhs.y, rhs.x, rhs.y (the two input point sets) plus dx, dy, xsum, inv (the add's working // buffers; out shares lhs's backing). The sizer walk below and the allocator in // scalar_multiplication_fast.cpp must agree on this count, so it is centralised here. static constexpr size_t PACKED_DRAIN_VECTORFIELD_RUNS = 8; +======= +>>>>>>> origin/v5-next // Computed byte sizes (filled by constructor's layout walk). size_t ts_fixed_layout = 0; // ThreadScratch wpb-independent fields, with align slop size_t pa_layout = 0; // PhaseAScratch fields, with align slop @@ -206,6 +212,7 @@ template struct PerWorkerArenaLayout { auto align_up = [](size_t off, size_t align) -> size_t { return (off + align - 1) & ~(align - 1); }; auto layout_add = [&](size_t& off, size_t bytes, size_t align) { off = align_up(off, align) + bytes; }; +<<<<<<< HEAD // ThreadScratch fixed (curr_pts / curr_buckets / 8 packed batch-affine VectorField runs / // pair_dest / overflow_slots / overflow_pts). layout_add(ts_fixed_layout, sizeof(AffineElement) * chunk_capacity, alignof(AffineElement)); @@ -217,6 +224,14 @@ template struct PerWorkerArenaLayout { for (size_t k = 0; k < PACKED_DRAIN_VECTORFIELD_RUNS; ++k) { layout_add(ts_fixed_layout, sizeof(VecField) * pack_cap, alignof(VecField)); } +======= + // ThreadScratch fixed (curr_pts / curr_buckets / points_to_add / + // inversion_scratch / pair_dest / overflow_slots / overflow_pts). + layout_add(ts_fixed_layout, sizeof(AffineElement) * chunk_capacity, alignof(AffineElement)); + layout_add(ts_fixed_layout, sizeof(uint32_t) * chunk_capacity, alignof(uint32_t)); + layout_add(ts_fixed_layout, sizeof(AffineElement) * 2 * BATCH_CAPACITY, alignof(AffineElement)); + layout_add(ts_fixed_layout, sizeof(BaseField) * BATCH_CAPACITY, alignof(BaseField)); +>>>>>>> origin/v5-next layout_add(ts_fixed_layout, sizeof(uint32_t) * BATCH_CAPACITY, alignof(uint32_t)); layout_add(ts_fixed_layout, sizeof(uint32_t) * global_max_overflow_per_window, alignof(uint32_t)); layout_add(ts_fixed_layout, sizeof(AffineElement) * global_max_overflow_per_window, alignof(AffineElement)); @@ -243,11 +258,15 @@ template struct PerWorkerArenaLayout { if (windows_per_batch != 0) { const size_t dense_total = windows_per_batch * dense_stride_est; const size_t dense_pair_max = dense_total / 2; +<<<<<<< HEAD // dense_buckets is a column (SoA) view: two BaseField coordinate arrays, not one // AffineElement array. Same total bytes (AffineElement == 2 * BaseField), but the live // allocator bumps them as two separate spans, so the sizer must too. layout_add(per_worker_per_wpb_layout, sizeof(BaseField) * dense_total, alignof(BaseField)); layout_add(per_worker_per_wpb_layout, sizeof(BaseField) * dense_total, alignof(BaseField)); +======= + layout_add(per_worker_per_wpb_layout, sizeof(AffineElement) * dense_total, alignof(AffineElement)); +>>>>>>> origin/v5-next layout_add(per_worker_per_wpb_layout, sizeof(uint8_t) * dense_total, alignof(uint8_t)); layout_add(per_worker_per_wpb_layout, sizeof(std::pair) * dense_pair_max, diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_batched.hpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_batched.hpp index 062fb6462499..43df199359b9 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_batched.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_batched.hpp @@ -175,6 +175,7 @@ void pippenger_round_parallel_batched(std::span= MSM_MIN_PTS_PER_THREAD * pool_width (large enough to clear the // per-worker floor even when split across all workers) run sequentially, each internally // multithreaded; smaller members run concurrently, one per worker, single-threaded. Keyed on @@ -195,6 +196,17 @@ void pippenger_round_parallel_batched(std::span::max() : MSM_MIN_PTS_PER_THREAD * pool_width; #endif +======= + // Split members by size. Small MSMs (≤ SMALL_MSM_BATCH_THRESHOLD points) dispatch + // one-per-pool-worker with a single-threaded (max_threads=1) pipeline: at a few + // thousand points per member, the sequential path's per-stage parallel_for barriers + // and understuffed per-thread chunks cost more than the parallelism returns (the + // ECCVM wires batch — ~86 MSMs of 1k-7k points spanning the transcript/precompute/ + // msm trace tables — ran at ~47% parallel efficiency). Large members keep the + // sequential internally-parallel dispatch: for them, interleaving would K-multiply + // the per-thread working set (see the header comment). + const size_t pool_width = bb::get_num_cpus(); +>>>>>>> origin/v5-next std::vector small_members; std::vector large_members; small_members.reserve(K); @@ -203,7 +215,11 @@ void pippenger_round_parallel_batched(std::span 1 && n_input[m] < mt_threshold) { +======= + if (pool_width > 1 && n_input[m] <= SMALL_MSM_BATCH_THRESHOLD) { +>>>>>>> origin/v5-next small_members.push_back(m); } else { large_members.push_back(m); @@ -227,6 +243,7 @@ void pippenger_round_parallel_batched(std::span>>>>>> origin/v5-next // Shared dynamically-sized arena for the sequential (large-member) calls. Sized to // the max requirement across those members so each MSM_fast finds enough space; a // single allocation across the batch (vs one per MSM_fast if we passed {} down). // dedup_active varies per MSM_fast (gated by per-MSM_fast hint), so the budget query must // mirror the predicate used inside pippenger_round_parallel. size_t shared_arena_bytes = 0; +<<<<<<< HEAD std::unique_ptr shared_arena_owner; // NOLINT(cppcoreguidelines-avoid-c-arrays) std::span shared_arena; if (!large_members_concurrent) { @@ -276,6 +296,22 @@ void pippenger_round_parallel_batched(std::span(shared_arena_owner.get(), shared_arena_bytes); } +======= + for (size_t m : large_members) { + const bool ext_glv = !external_glv_for(m, n_input[m]).empty(); + // The internal short-circuits to trivial_msm_threaded for tiny MSMs, so the hint + // alone is the right arena-sizing predicate (over-sizing for a path that bails + // is harmless — under-sizing would crash). + const size_t bytes = compute_arena_bytes_for_msm(n_input[m], ext_glv, info_for(m)); + shared_arena_bytes = std::max(shared_arena_bytes, bytes); + } + std::unique_ptr shared_arena_owner; // NOLINT(cppcoreguidelines-avoid-c-arrays) + std::span shared_arena; + if (shared_arena_bytes > 0) { + shared_arena_owner = + std::make_unique_for_overwrite(shared_arena_bytes); // NOLINT(cppcoreguidelines-avoid-c-arrays) + shared_arena = std::span(shared_arena_owner.get(), shared_arena_bytes); +>>>>>>> origin/v5-next } // Concurrent small-member dispatch: workers pull members off an atomic cursor and run // each with a thread-capped pipeline (max_threads=1, so the member never re-enters the @@ -322,6 +358,7 @@ void pippenger_round_parallel_batched(std::span(sp, point_arrays[m], info_for(m), external_glv_for(m, n), shared_arena); } +======= + // Sequential large-member dispatch. Each call runs the full single-MSM_fast pipeline (its + // own from-Mont and to-Mont, schedule, Stage 1-6b) at full pool width. The only batched + // amortisation we share is the doubled SRS prefix above; the rest of the hot path runs + // at single-MSM_fast cost. + for (size_t m : large_members) { + const size_t n = n_input[m]; + PolynomialSpan sp(0, std::span(scalar_arrays[m].data(), n)); + out_results[m] = + pippenger_round_parallel(sp, point_arrays[m], info_for(m), external_glv_for(m, n), shared_arena); +>>>>>>> origin/v5-next } } } // namespace diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_constantine.hpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_constantine.hpp index 9df6ed48682c..984c421e1113 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_constantine.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/pippenger_constantine.hpp @@ -211,15 +211,25 @@ struct ConstantineSliceParamsU32 { } // Store a `SimdU32x4` to a 4-lane uint32 destination as a single 128-bit op. +<<<<<<< HEAD // Precondition: `dst` is 16-byte aligned. // On WASM the explicit intrinsic guarantees a `v128.store`; on native the typed // vector store lets the compiler use aligned SIMD stores (e.g. x86 movaps/movdqa). +======= +// On WASM the explicit `wasm_v128_store` is used because earlier codegen for +// the equivalent struct-wrapper assignment was observed to round-trip the +// vector through 4 scalar memory slots; the intrinsic guarantees the +// `i32x4.store` opcode. On native we go through `__builtin_memcpy`: `dst` is a +// plain `uint32_t*` (4-byte aligned), and a `*reinterpret_cast` store +// would assert 16-byte alignment and emit `vmovdqa`, which faults on a +// non-16-aligned destination. memcpy lowers to an unaligned `movdqu` / NEON `st1`. +>>>>>>> origin/v5-next [[gnu::always_inline]] inline void simd_u32x4_store(uint32_t* dst, SimdU32x4 v) noexcept { #ifdef __wasm_simd128__ wasm_v128_store(dst, reinterpret_cast(v)); #else - *reinterpret_cast(dst) = v; + __builtin_memcpy(dst, &v, sizeof(v)); #endif } diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.cpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.cpp index 1d38610184df..813b5e787315 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.cpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.cpp @@ -19,6 +19,8 @@ #include "barretenberg/common/mem.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" +#include +#include namespace bb::scalar_multiplication::legacy { @@ -646,6 +648,7 @@ template class bb::scalar_multiplication::legacy::MSM; // =================================================================================== // Public MSM facade implementation (see scalar_multiplication.hpp). Routes to the +<<<<<<< HEAD // `_fast` rewrite by default, or `legacy::` when BB_MSM_LEGACY is set. // =================================================================================== namespace bb::scalar_multiplication { @@ -654,6 +657,40 @@ bool use_legacy_msm() noexcept { static const bool legacy_selected = std::getenv("BB_MSM_LEGACY") != nullptr; return legacy_selected; +======= +// `legacy::` MSM by default; the round-parallel `_fast` path is opt-in (BB_MSM_NEW env, +// the API override, or TS `legacyMsm: false`). +// =================================================================================== +namespace bb::scalar_multiplication { + +namespace { +// -1 means "no API override"; fall back to the env-var default. +std::atomic legacy_msm_override{ -1 }; +} // namespace + +bool use_legacy_msm() noexcept +{ + const int selected_override = legacy_msm_override.load(std::memory_order_relaxed); + if (selected_override != -1) { + return selected_override != 0; + } + // Legacy MSM is the default; the round-parallel path is opt-in via BB_MSM_NEW (or the API + // override / TS `legacyMsm: false`). BB_MSM_LEGACY forces legacy explicitly and wins if both + // env vars are set. + static const bool legacy_forced = std::getenv("BB_MSM_LEGACY") != nullptr; + static const bool new_selected = std::getenv("BB_MSM_NEW") != nullptr; + return legacy_forced || !new_selected; +} + +void set_legacy_msm_override(bool enabled) noexcept +{ + legacy_msm_override.store(enabled ? 1 : 0, std::memory_order_relaxed); +} + +void clear_legacy_msm_override() noexcept +{ + legacy_msm_override.store(-1, std::memory_order_relaxed); +>>>>>>> origin/v5-next } template diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp index 8c49331143ec..a527697f29dc 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.hpp @@ -10,8 +10,14 @@ // byte-identical to merge-train (only wrapped in the `legacy` sub-namespace). // * the round-parallel rewrite in scalar_multiplication_fast.hpp (`*_fast`, `MSM_fast`). // The public facade (`pippenger`, `pippenger_unsafe`, `MSM`) at the bottom dispatches to +<<<<<<< HEAD // the rewrite by default, or to `legacy::` when `use_legacy_msm()` (env BB_MSM_LEGACY). // Remove the legacy half + the facade dispatch once the rewrite has soaked. +======= +// `legacy::` by default; the round-parallel path is opt-in via `use_legacy_msm()` (env BB_MSM_NEW, +// the API override, or TS `legacyMsm: false`). +// TODO: make the round-parallel path the default, then remove the legacy half. +>>>>>>> origin/v5-next #include "./scalar_multiplication_fast.hpp" #include "barretenberg/ecc/groups/precomputed_generators_bn254_impl.hpp" #include "barretenberg/ecc/groups/precomputed_generators_grumpkin_impl.hpp" @@ -405,14 +411,25 @@ extern template class MSM; } // namespace bb::scalar_multiplication::legacy // =================================================================================== +<<<<<<< HEAD // Public MSM facade — the surface every caller uses. Dispatches to the `_fast` rewrite // by default, or `legacy::` when use_legacy_msm() (env BB_MSM_LEGACY, read once). +======= +// Public MSM facade — the surface every caller uses. Dispatches to `legacy::` by default; +// the `_fast` path is opt-in via use_legacy_msm() (env BB_MSM_NEW, the API override, or +// TS `legacyMsm: false`). +>>>>>>> origin/v5-next // Signatures match the rewrite; the legacy branch adapts (legacy has no dedup pre-pass, // and its batch entry takes per-MSM point spans). // =================================================================================== namespace bb::scalar_multiplication { [[nodiscard]] bool use_legacy_msm() noexcept; +<<<<<<< HEAD +======= +void set_legacy_msm_override(bool enabled) noexcept; +void clear_legacy_msm_override() noexcept; +>>>>>>> origin/v5-next // `dedup_info` (and the per-poly entries of `dedup_infos`) encode the MSM dedup pre-pass hint: // 0 = off (no dedup); diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.test.cpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.test.cpp index f682e8d6f22c..477e85ed714a 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.test.cpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication.test.cpp @@ -521,10 +521,18 @@ template class ScalarMultiplicationTest : public ::testing::Test { /** * @brief Pin the concurrent small-member dispatch in the batch driver. * +<<<<<<< HEAD * Mixed-size batch: many small MSMs (run one-per-worker with a thread-capped * pipeline out of per-worker arenas, the dedup-hinted members exercising Phase A at * num_threads=1) mixed with boundary-size and large members that stay on the * sequential shared-arena path. +======= + * ECCVM-shaped batch: many MSMs at or below SMALL_MSM_BATCH_THRESHOLD (run + * one-per-worker with a thread-capped pipeline out of per-worker arenas, the + * dedup-hinted members exercising Phase A at num_threads=1) mixed with + * boundary-size and large members that stay on the sequential shared-arena + * path. +>>>>>>> origin/v5-next */ void test_batch_multi_scalar_mul_small_member_dispatch() { @@ -532,6 +540,7 @@ template class ScalarMultiplicationTest : public ::testing::Test { for (size_t k = 0; k < 24; ++k) { sizes.push_back(600 + (257 * k)); } +<<<<<<< HEAD // Add members straddling the driver's small/large boundary (MSM_MIN_PTS_PER_THREAD * pool_width) // to exercise both dispatch paths. On wasm MSM_MIN_PTS_PER_THREAD is SIZE_MAX and a single-core // pool has no concurrent path — neither has a finite boundary, so there the cluster above is the @@ -543,6 +552,11 @@ template class ScalarMultiplicationTest : public ::testing::Test { sizes.push_back(boundary); sizes.push_back(boundary * 2); } +======= + sizes.push_back(scalar_multiplication::SMALL_MSM_BATCH_THRESHOLD); + sizes.push_back(scalar_multiplication::SMALL_MSM_BATCH_THRESHOLD + 1); + sizes.push_back(16384); +>>>>>>> origin/v5-next const size_t num_msms = sizes.size(); const uint256_t high_bit(0, 0, 0, uint64_t{ 1 } << (200 - 192)); @@ -1802,6 +1816,7 @@ TEST(ScalarMultiplicationArenaTest, ArenaLayoutFitsAcrossDispatchSpace) bb::set_parallel_for_concurrency(saved_threads); } +<<<<<<< HEAD // Non-GLV mid-band (GLV_SMALL_N_THRESHOLD < n < 2^17) arena-sizing coverage. The live allocator // shrinks the window-bit budget to the observed scalar msb, which can pick a heavier schedule than // the full-bit pre-sizer; `compute_arena_bytes_for_msm` must upper-bound the arena across every @@ -1832,6 +1847,8 @@ TEST(ScalarMultiplicationArenaTest, MidBandArenaSizerCoversAllEffectiveNumBits) EXPECT_FALSE(found_undersize) << "arena sizer under-counts in the non-GLV mid-band"; } +======= +>>>>>>> origin/v5-next // ======================= Test Wrappers ======================= TYPED_TEST(ScalarMultiplicationTest, PippengerLowMemory) @@ -2006,9 +2023,12 @@ TYPED_TEST(ScalarMultiplicationTest, ExternalGlvDoubledDirect) } TYPED_TEST(ScalarMultiplicationTest, GlvExtremeMagnitudeScalars) { +<<<<<<< HEAD #ifdef __wasm__ GTEST_SKIP() << "GLV extreme-magnitude sweep is native-only; the ~50-probe naive comparison times out on wasm."; #endif +======= +>>>>>>> origin/v5-next this->test_glv_extreme_magnitude_scalars(); } TYPED_TEST(ScalarMultiplicationTest, EffectiveNumBitsBandSmallScalars) @@ -2037,7 +2057,11 @@ TYPED_TEST(ScalarMultiplicationTest, BatchDriverSharedPathRagged) // Variable-c (split-c) Pippenger dispatch — synthetic distributions per spec §"Validation". // These force SPLIT to fire (cliff / decaying / half-zero / all-large) or to fall through // (uniform-random / all-zero) and validate the result against `naive_msm`. +<<<<<<< HEAD template class VariableWindowSplitDispatchTest : public ::testing::Test { +======= +template class WindowSplitDispatchTest : public ::testing::Test { +>>>>>>> origin/v5-next public: using Group = typename Curve::Group; using Element = typename Curve::Element; @@ -2208,6 +2232,7 @@ template class VariableWindowSplitDispatchTest : public ::testing: }; #ifndef __wasm__ +<<<<<<< HEAD using VariableWindowCurveTypes = ::testing::Types; TYPED_TEST_SUITE(VariableWindowSplitDispatchTest, VariableWindowCurveTypes); @@ -2244,6 +2269,44 @@ TYPED_TEST(VariableWindowSplitDispatchTest, Below192) this->test_below_192(); } TYPED_TEST(VariableWindowSplitDispatchTest, ForceSplitBitwiseIdentity) +======= +using WindowSplitCurveTypes = ::testing::Types; +TYPED_TEST_SUITE(WindowSplitDispatchTest, WindowSplitCurveTypes); + +TYPED_TEST(WindowSplitDispatchTest, Cliff) +{ + this->test_cliff(); +} +TYPED_TEST(WindowSplitDispatchTest, Decaying) +{ + this->test_decaying(); +} +TYPED_TEST(WindowSplitDispatchTest, UniformRandom) +{ + this->test_uniform_random(); +} +TYPED_TEST(WindowSplitDispatchTest, AllZero) +{ + this->test_all_zero(); +} +TYPED_TEST(WindowSplitDispatchTest, HalfZero) +{ + this->test_half_zero(); +} +TYPED_TEST(WindowSplitDispatchTest, AllLarge) +{ + this->test_all_large(); +} +TYPED_TEST(WindowSplitDispatchTest, MidDistribution) +{ + this->test_mid_distribution(); +} +TYPED_TEST(WindowSplitDispatchTest, Below192) +{ + this->test_below_192(); +} +TYPED_TEST(WindowSplitDispatchTest, ForceSplitBitwiseIdentity) +>>>>>>> origin/v5-next { this->test_force_split_bitwise_identity(); } diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.cpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.cpp index d6bea1a265e6..5861a4493303 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.cpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.cpp @@ -7,7 +7,10 @@ #include "barretenberg/common/thread.hpp" #include "barretenberg/ecc/curves/bn254/bn254.hpp" #include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp" +<<<<<<< HEAD #include "barretenberg/ecc/groups/affine_add_packed.hpp" +======= +>>>>>>> origin/v5-next #include "barretenberg/ecc/groups/element_impl.hpp" #include "barretenberg/numeric/bitop/get_msb.hpp" #include @@ -61,7 +64,13 @@ template { static_assert(sizeof(AffineElement) == 64, "copy_affine64 requires 64-byte affine point"); static_assert(std::is_trivially_copyable_v, +<<<<<<< HEAD "AffineElement must be trivially copyable for memcpy / SIMD bulk copy"); +======= + "AffineElement must be trivially copyable for memcpy / SIMD bulk copy " + "(also required by the bulk std::memcpy of reduce_chunk output into " + "ThreadScratch::window_pts in recursive_affine_bucket_reduce_strided's caller)"); +>>>>>>> origin/v5-next #ifdef __wasm_simd128__ const auto* s = reinterpret_cast(&src); auto* d = reinterpret_cast(&dst); @@ -142,6 +151,12 @@ inline void record_msb(int msb, uint8_t& dst, std::array& th_hist ++th_hist[static_cast(msb) + 1]; } +<<<<<<< HEAD +======= +/** + * @brief Build a uniform window schedule. + */ +>>>>>>> origin/v5-next // `AffineBucketChunkInfo` is defined in `pippenger_arena_layout.hpp` (included above). /** @@ -156,11 +171,15 @@ template struct ThreadScratch { using AffineElement = typename Curve::AffineElement; using Element = typename Curve::Element; using BaseField = typename Curve::BaseField; +<<<<<<< HEAD using BaseParams = typename BaseField::Params; +======= +>>>>>>> origin/v5-next // reduce_chunk's tree-reduce buffer. Per level the inner loop walks with a read cursor // `i` and a write cursor `next_len ≤ i`, compacting in-place; the next level re-enters // the same buffer without a swap. +<<<<<<< HEAD // curr_pts is kept in AoS (not SIMD-packed): tree_reduce_in_place walks it alongside curr_buckets, // pairing entries conditionally when their digits match — which a packed layout can't index cheaply. std::span curr_pts; @@ -175,6 +194,14 @@ template struct ThreadScratch { bb::VectorAffineElementPushSpan rhs; bb::VectorAffineElementPushSpan out; bb::group_elements::BatchAffineAddScratch add_scratch; +======= + std::span curr_pts; + std::span curr_buckets; + + // reduce_chunk's batch-affine scratch. + std::span points_to_add; + std::span inversion_scratch; +>>>>>>> origin/v5-next std::span pair_dest; size_t result_len = 0; @@ -188,15 +215,24 @@ template struct ThreadScratch { size_t overflow_len = 0; // Recursive affine bucket reduction scratch (cross-window batched, sparse-aware). +<<<<<<< HEAD // `dense_buckets` holds W chunks worth of dense bucket points back-to-back, in column (SoA) form // so the Stage 6b reduction gathers/scatters coordinates with VectorField::gather/scatter. // Layout: dense_buckets.{x,y}[w * affine_bucket_stride + i] for window w and 0-indexed slot i. +======= + // `dense_buckets` holds W chunks worth of dense AffineElement arrays back-to-back. + // Layout: dense_buckets[w * affine_bucket_stride + i] for window w and 0-indexed slot i. +>>>>>>> origin/v5-next // `is_present` is a parallel uint8_t array marking non-identity slots (0 = empty, 1 = present). // `affine_bucket_pairs` is the scratch buffer for the real-pairs list (single pass: filtered // inline as candidates are generated, no intermediate candidate buffer). // `affine_bucket_indices` is the scratch index buffer for the doubling kernel. // `affine_bucket_inversion_scratch` is reused for the indexed batch-affine kernels. +<<<<<<< HEAD bb::AffineColumnSpan dense_buckets; +======= + std::span dense_buckets; +>>>>>>> origin/v5-next std::span is_present; std::span> affine_bucket_pairs; std::span affine_bucket_indices; @@ -251,6 +287,7 @@ template inline void drain_batch(ThreadScratch& s, size_ if (pair_count == 0) { return; } +<<<<<<< HEAD constexpr size_t W = bb::VectorField::SIZE; // Add every queued pair at once: out[k] = lhs[k] + rhs[k], in place (out shares lhs's backing). @@ -277,6 +314,17 @@ template inline void drain_batch(ThreadScratch& s, size_ s.lhs.reset(); s.rhs.reset(); +======= + bb::group_elements::batch_affine_add_interleaved( + s.points_to_add.data(), 2 * pair_count, s.inversion_scratch.data()); + // In-place compaction: each `pair_dest[i]` is the `next_len` value at the moment the + // pair was queued, which is < the read cursor `i_outer` and < the current `next_len` + // — so writing back into curr_pts at `pair_dest[i]` lands on a slot that is already + // past the read cursor. See reduce_chunk for the full invariant. + for (size_t i = 0; i < pair_count; ++i) { + s.curr_pts[s.pair_dest[i]] = s.points_to_add[pair_count + i]; + } +>>>>>>> origin/v5-next } /** @@ -298,12 +346,15 @@ template void tree_reduce_in_place(ThreadScratch& s, siz { size_t curr_len = initial_len; +<<<<<<< HEAD // The drain spans (lhs/rhs) are scratch shared with the Stage-6b reduction, which leaves a non-zero // cursor behind. The drain trigger below tracks a local pair_count, not the span cursor, so without // this reset a prior 6b fill would make push() accumulate past capacity (and batch-add stale points). s.lhs.reset(); s.rhs.reset(); +======= +>>>>>>> origin/v5-next while (true) { size_t i = 0; size_t next_len = 0; @@ -312,8 +363,14 @@ template void tree_reduce_in_place(ThreadScratch& s, siz while (i < curr_len) { if (i + 1 < curr_len && s.curr_buckets[i] == s.curr_buckets[i + 1]) { +<<<<<<< HEAD s.lhs.push_point(s.curr_pts[i].x, s.curr_pts[i].y); s.rhs.push_point(s.curr_pts[i + 1].x, s.curr_pts[i + 1].y); +======= + const size_t slot = 2 * pair_count; + s.points_to_add[slot] = s.curr_pts[i]; + s.points_to_add[slot + 1] = s.curr_pts[i + 1]; +>>>>>>> origin/v5-next s.curr_buckets[next_len] = s.curr_buckets[i]; s.pair_dest[pair_count] = static_cast(next_len); ++next_len; @@ -393,9 +450,14 @@ void merge_overflow(ThreadScratch& s, typename Curve::AffineElement* dst_ } /** +<<<<<<< HEAD * @brief Tree-reduce one thread's bucket-aligned slice of the bucket-partitioned schedule into the * deduplicated (point, digit) list in `curr_pts / curr_buckets`, which the caller scatters into * its per-thread dense bucket buffer. +======= + * @brief Tree-reduce one thread's bucket-aligned slice of the bucket-partitioned schedule, + * emitting directly into `curr_pts / curr_buckets` for the caller's running-sum pass. +>>>>>>> origin/v5-next */ template void reduce_chunk(ThreadScratch& s, @@ -453,8 +515,16 @@ void reduce_chunk(ThreadScratch& s, const uint32_t raw_idx = e & SCHEDULE_INDEX_MASK; const bool neg = (e & SCHEDULE_SIGN_BIT) != 0; s.curr_buckets[valid_len] = bucket_u32; +<<<<<<< HEAD // Gather via copy_affine64. The conditional negation runs after the copy because // Fq::operator-() is a modular subtract, not a bit flip, so it can't fold into the load. +======= + // SIMD-widened gather: 4 × v128.load on WASM (2× faster than the + // default 8 × i64.load struct copy on V8 TurboFan); 4 × movdqu on + // native (already optimal). The conditional negation runs after the + // copy because Fq::operator-() is a modular subtract, not a bit flip, + // so it can't be folded into the SIMD load lanes. +>>>>>>> origin/v5-next auto& dst_pt = s.curr_pts[valid_len]; // Dedup redirect: if the redirect bit is set, fetch from the dedup // extra-points buffer (combined point for a cluster of duplicate scalars) @@ -492,8 +562,16 @@ void reduce_chunk(ThreadScratch& s, /** * @brief Inline filter for one (dst, src) candidate pair, called from each phase's +<<<<<<< HEAD * candidate-emission loop. Each candidate is handled as it is generated — no candidate * buffer is materialised, so this is one memory pass per phase iter. +======= + * candidate-emission loop. Replaces the previous two-pass `filter_and_batch_add` + * function (which gathered all candidates into a buffer and then filtered into a + * real-pairs buffer): the inline version handles each candidate as it's generated, + * so we never materialise the candidate buffer at all. Single memory pass per phase + * iter, half the buffer scratch. +>>>>>>> origin/v5-next * * Identity / coincidence cases per candidate (handled inline, no batch dispatch): * - src is identity: skip entirely (dst unchanged). @@ -503,12 +581,20 @@ void reduce_chunk(ThreadScratch& s, * - dst and src are inverses (same x, opposite y): result is identity; clear dst. * Otherwise emits a "real pair" to `real_pairs[*real_count]` for later batch-affine dispatch. * +<<<<<<< HEAD * Caller is responsible for invoking `batch_affine_add_indexed_scalar` / `_packed` once on the * accumulated `real_pairs` array after the candidate-emission loop completes. */ template [[gnu::always_inline]] inline void try_filter_pair(typename Curve::BaseField* dense_x, typename Curve::BaseField* dense_y, +======= + * Caller is responsible for invoking `batch_affine_add_indexed_impl` once on the accumulated + * `real_pairs` array after the candidate-emission loop completes. + */ +template +[[gnu::always_inline]] inline void try_filter_pair(typename Curve::AffineElement* buckets, +>>>>>>> origin/v5-next uint8_t* is_present, uint32_t dst_idx, uint32_t src_idx, @@ -522,13 +608,18 @@ template return; // src is identity → no-op } if (is_present[dst_idx] == 0) { +<<<<<<< HEAD dense_x[dst_idx] = dense_x[src_idx]; // dst was identity → just copy dense_y[dst_idx] = dense_y[src_idx]; +======= + buckets[dst_idx] = buckets[src_idx]; // dst was identity → just copy +>>>>>>> origin/v5-next is_present[dst_idx] = 1; return; } // Edge case: dst.x == src.x. Since both points are on-curve, this means either // dst == src (doubling case) or dst == -src (inverse case, result is identity). +<<<<<<< HEAD // The batch add would invert zero here, so handle out-of-band. if (dense_x[dst_idx] == dense_x[src_idx]) { if (dense_y[dst_idx] == dense_y[src_idx]) { @@ -541,6 +632,18 @@ template } else { // dst == -src → result is identity. is_present[dst]=0 makes the slot skipped; an absent // slot's coordinates are never read, so they need not be cleared. +======= + // batch_affine_add_indexed_impl would invert zero here, so handle out-of-band. + if (buckets[dst_idx].x == buckets[src_idx].x) { + if (buckets[dst_idx].y == buckets[src_idx].y) { + // dst == src → result is 2 * dst. + Element doubled = Element(buckets[dst_idx]); + doubled.self_dbl(); + buckets[dst_idx] = AffineElement{ doubled }; + } else { + // dst == -src → result is identity. + buckets[dst_idx].self_set_infinity(); +>>>>>>> origin/v5-next is_present[dst_idx] = 0; } return; @@ -551,7 +654,11 @@ template /** * @brief Inline filter for one doubling candidate. If the slot is populated, append its * index to `real_indices`; otherwise skip silently. The caller invokes +<<<<<<< HEAD * `batch_affine_double_indexed_scalar` / `_packed` on the accumulated `real_indices` array. +======= + * `batch_affine_double_indexed_impl` on the accumulated `real_indices` array. +>>>>>>> origin/v5-next */ [[gnu::always_inline]] inline void try_filter_idx(const uint8_t* is_present, uint32_t idx, @@ -596,20 +703,33 @@ template * written in place. * * @note Caller must have densified buckets at `s.dense_buckets[w*stride + i]`, set +<<<<<<< HEAD * is_present[w*stride + i] for populated slots, and set `s.affine_bucket_stride` to the * layout width used for densification (a power of two ≥ max_w(buckets_padded_w)). +======= + * is_present[w*stride + i] for populated slots, and called + * s.ensure_affine_bucket_capacity(windows_in_batch, stride) with + * stride = max_w(buckets_padded_w). +>>>>>>> origin/v5-next */ template void recursive_affine_bucket_reduce_strided(ThreadScratch& s, const AffineBucketChunkInfo* chunk_infos, size_t windows_in_batch, ChunkOutput* outputs_base, +<<<<<<< HEAD size_t output_stride, bool single_threaded) noexcept { using AffineElement = typename Curve::AffineElement; using Element = typename Curve::Element; using BaseField = typename Curve::BaseField; +======= + size_t output_stride) noexcept +{ + using AffineElement = typename Curve::AffineElement; + using Element = typename Curve::Element; +>>>>>>> origin/v5-next auto out_at = [outputs_base, output_stride](size_t w) -> ChunkOutput& { return outputs_base[w * output_stride]; @@ -619,8 +739,13 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, return; } +<<<<<<< HEAD // Stride is the caller's pre-sized layout width (`s.affine_bucket_stride`, set by // pippenger_round_parallel when carving the arena). The densification step in the caller scattered buckets at +======= + // Stride is the caller's pre-sized layout width (`s.affine_bucket_stride`, set via + // `ensure_affine_bucket_capacity`). The densification step in the caller scattered buckets at +>>>>>>> origin/v5-next // `w * s.affine_bucket_stride + i`, so we MUST use the same value for our own indexing — any // re-derivation that disagrees with the layout would index neighbouring windows. The // pre-size already enforces `stride ≥ max_w(buckets_padded_w)` AND `stride ≥ 2` AND @@ -643,8 +768,12 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, return; } +<<<<<<< HEAD BaseField* const dense_x = s.dense_buckets.x.data(); BaseField* const dense_y = s.dense_buckets.y.data(); +======= + AffineElement* const buckets = s.dense_buckets.data(); +>>>>>>> origin/v5-next uint8_t* const is_present = s.is_present.data(); // Pick L0 (the leaf-partition size). c0 = floor(log2(stride) / 2) @@ -670,11 +799,18 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, if (is_present[base + i] == 0) { continue; } +<<<<<<< HEAD const Element pt = Element(AffineElement(dense_x[base + i], dense_y[base + i])); R += pt; L += pt; // weight 1 if (i == 1) { L += pt; // weight 2 for i=1 +======= + R += Element(buckets[base + i]); + L += Element(buckets[base + i]); // weight 1 + if (i == 1) { + L += Element(buckets[base + i]); // weight 2 for i=1 +>>>>>>> origin/v5-next } } out_at(w).R = R; @@ -699,6 +835,7 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, auto* const reals = s.affine_bucket_pairs.data(); auto* const dbl_reals = s.affine_bucket_indices.data(); +<<<<<<< HEAD [[maybe_unused]] auto* const inv_scratch = s.affine_bucket_inversion_scratch.data(); // SIMD dispatch for the batched affine kernels. On a WASM-SIMD build the Phase A/B/D adds and @@ -739,6 +876,9 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, } bb::group_elements::batch_affine_double_indexed_scalar(s.dense_buckets, dbl_reals, count, inv_scratch); }; +======= + auto* const inv_scratch = s.affine_bucket_inversion_scratch.data(); +>>>>>>> origin/v5-next // Phase A: per-sub-partition running-sum (suffix sums). // For each window w and each sub-partition d, walk slots from L0-1 down to 1 within the @@ -762,18 +902,32 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, } const uint32_t src = static_cast(base + l); const uint32_t dst = static_cast(base + l - 1); +<<<<<<< HEAD try_filter_pair(dense_x, dense_y, is_present, dst, src, reals, real_count); +======= + try_filter_pair(buckets, is_present, dst, src, reals, real_count); +>>>>>>> origin/v5-next } else { const size_t my_D = my_M_w >> c0; // ≥ 1 for (size_t d = 0; d < my_D; ++d) { const uint32_t src = static_cast(base + (d * L0) + l); const uint32_t dst = static_cast(base + (d * L0) + l - 1); +<<<<<<< HEAD try_filter_pair(dense_x, dense_y, is_present, dst, src, reals, real_count); +======= + try_filter_pair(buckets, is_present, dst, src, reals, real_count); +>>>>>>> origin/v5-next } } } if (real_count > 0) { +<<<<<<< HEAD batched_add(real_count); +======= + bb::group_elements::batch_affine_add_indexed_impl( + buckets, reals, real_count, inv_scratch); +>>>>>>> origin/v5-next } } } @@ -802,11 +956,21 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, for (size_t d = 0; d < num_pairs_w; ++d) { const uint32_t dst = static_cast(base + ((2 * d) * L1)); const uint32_t src = static_cast(base + (((2 * d) + 1) * L1)); +<<<<<<< HEAD try_filter_pair(dense_x, dense_y, is_present, dst, src, reals, real_count); } } if (real_count > 0) { batched_add(real_count); +======= + try_filter_pair(buckets, is_present, dst, src, reals, real_count); + } + } + if (real_count > 0) { + bb::group_elements::batch_affine_add_indexed_impl( + buckets, reals, real_count, inv_scratch); +>>>>>>> origin/v5-next } L1 *= 2; } @@ -819,10 +983,18 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, out_at(w).R = Curve::Group::point_at_infinity; continue; } +<<<<<<< HEAD if (is_present[w * stride] == 0) { out_at(w).R = Curve::Group::point_at_infinity; } else { out_at(w).R = Element(AffineElement(dense_x[w * stride], dense_y[w * stride])); +======= + const AffineElement& slot0 = buckets[w * stride]; + if (is_present[w * stride] == 0) { + out_at(w).R = Curve::Group::point_at_infinity; + } else { + out_at(w).R = Element(slot0); +>>>>>>> origin/v5-next } } @@ -848,7 +1020,13 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, // c0 chained doublings on the same real list. if (real_count > 0) { for (size_t j = 0; j < c0; ++j) { +<<<<<<< HEAD batched_double(real_count); +======= + bb::group_elements::batch_affine_double_indexed_impl( + buckets, dbl_reals, real_count, inv_scratch); +>>>>>>> origin/v5-next } } } @@ -873,7 +1051,13 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, } } if (real_count > 0) { +<<<<<<< HEAD batched_double(real_count); +======= + bb::group_elements::batch_affine_double_indexed_impl( + buckets, dbl_reals, real_count, inv_scratch); +>>>>>>> origin/v5-next } L1 *= 2; } @@ -905,8 +1089,12 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, } const size_t base = w * stride; for (size_t pos = 0; pos + m < my_M; pos += step) { +<<<<<<< HEAD try_filter_pair(dense_x, dense_y, +======= + try_filter_pair(buckets, +>>>>>>> origin/v5-next is_present, static_cast(base + pos), static_cast(base + pos + m), @@ -915,7 +1103,12 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, } } if (real_count > 0) { +<<<<<<< HEAD batched_add(real_count); +======= + bb::group_elements::batch_affine_add_indexed_impl( + buckets, reals, real_count, inv_scratch); +>>>>>>> origin/v5-next } m *= 2; } @@ -939,7 +1132,11 @@ void recursive_affine_bucket_reduce_strided(ThreadScratch& s, const size_t live_step = m; // distance between live slots after the affine phase for (size_t pos = 0; pos < my_M; pos += live_step) { if (is_present[base + pos] != 0) { +<<<<<<< HEAD L += Element(AffineElement(dense_x[base + pos], dense_y[base + pos])); +======= + L += Element(buckets[base + pos]); +>>>>>>> origin/v5-next } } out_at(w).L = L; @@ -1070,9 +1267,22 @@ template const uint32_t last_round_bits = static_cast(NUM_BITS - (static_cast(num_rounds - 1) * window_bits)); +<<<<<<< HEAD // Cap the worker count so each gets at least MSM_MIN_PTS_PER_THREAD points. const size_t MIN_PTS_PER_THREAD = (min_pts_per_thread_override == 0) ? MSM_MIN_PTS_PER_THREAD : min_pts_per_thread_override; +======= + // Each thread owns a num_buckets-sized scratch slice and runs num_rounds passes; below + // ~256 points per thread the parallel_for wakeup + per-call bucket reset dominate. + // wasm is forced single-threaded — its barrier cost is much higher than native. +#ifdef __wasm__ + constexpr size_t MIN_PTS_PER_THREAD_DEFAULT = SIZE_MAX; +#else + constexpr size_t MIN_PTS_PER_THREAD_DEFAULT = 256; +#endif + const size_t MIN_PTS_PER_THREAD = + (min_pts_per_thread_override == 0) ? MIN_PTS_PER_THREAD_DEFAULT : min_pts_per_thread_override; +>>>>>>> origin/v5-next const size_t hw_threads = max_threads == 0 ? get_num_cpus() : std::min(max_threads, get_num_cpus()); size_t num_threads = std::min(std::max(1, n / MIN_PTS_PER_THREAD), hw_threads); if (num_threads == 0) { @@ -1286,8 +1496,14 @@ size_t compute_arena_bytes_for_msm(size_t n_input, // wpb fallback when fixed_overhead has eaten the BATCH_MEM_BUDGET headroom: the inline // `solve_wpb` in `pippenger_round_parallel` returns `W_R` (the whole region) — running +<<<<<<< HEAD // every window in a single batch — when `available_budget == 0`. This keeps the sizer correct // for large num_threads, where fixed_overhead alone can exceed the budget. +======= + // every window in a single batch — when `available_budget == 0`. Previously the sizer + // returned `wpb = 1` and relied on a `worst_case_arena = BATCH_MEM_BUDGET + 32K` floor; + // that floor failed for large num_threads where fixed_overhead alone exceeds the budget. +>>>>>>> origin/v5-next const size_t available_budget_outer = (BATCH_MEM_BUDGET > fixed_overhead) ? (BATCH_MEM_BUDGET - fixed_overhead) : size_t{ 0 }; const size_t windows_per_batch = @@ -1615,7 +1831,12 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next // Until then, both spans are empty. // Lifetimes: // redirect_lookup — written by Phase A; read by Stage 4b's dedup_patch_schedule per batch @@ -1624,8 +1845,14 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan dedup_state; +<<<<<<< HEAD // The schedule is uniform: one region over all non-zero scalars. (The variable-window split // codepath remains as scaffolding but is not split here.) +======= + // Variable-window split was removed from the production path after Chonk traces showed + // it regressing this rewrite. Keep the schedule uniform and run one region over all + // non-zero scalars. +>>>>>>> origin/v5-next const auto sched = round_parallel_detail::build_window_schedule(effective_num_bits, window_bits); BB_ASSERT_LTE(sched.num_windows, round_parallel_detail::MAX_SCHEDULE_WINDOWS, @@ -1849,6 +2076,7 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan(chunk_capacity); s.curr_buckets = ts_fixed_alloc.template operator()(chunk_capacity); +<<<<<<< HEAD // Packed batch-affine drain backing, each run sized for BATCH_CAPACITY elements. The run count // is sourced from PerWorkerArenaLayout so these allocations and the sizer's layout walk cannot // drift. Index map below; `out` shares `lhs`'s backing (the add runs in place). @@ -1869,6 +2097,10 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan{ packed[5] }, bb::VectorFieldPushSpan{ packed[6] }, bb::VectorFieldPushSpan{ packed[7] } }; +======= + s.points_to_add = ts_fixed_alloc.template operator()(2 * BATCH_CAPACITY); + s.inversion_scratch = ts_fixed_alloc.template operator()(BATCH_CAPACITY); +>>>>>>> origin/v5-next s.pair_dest = ts_fixed_alloc.template operator()(BATCH_CAPACITY); s.overflow_slots = ts_fixed_alloc.template operator()(global_max_overflow_per_window); s.overflow_pts = ts_fixed_alloc.template operator()(global_max_overflow_per_window); @@ -1901,9 +2133,13 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan(dense_total); auto dense_y = ts_tail_alloc.template operator()(dense_total); s.dense_buckets = bb::AffineColumnSpan{ dense_x, dense_y }; +======= + s.dense_buckets = ts_tail_alloc.template operator()(dense_total); +>>>>>>> origin/v5-next s.is_present = ts_tail_alloc.template operator()(dense_total); s.affine_bucket_pairs = ts_tail_alloc.template operator()>(dense_pair_max); s.affine_bucket_indices = ts_tail_alloc.template operator()(dense_pair_max); @@ -1925,16 +2161,29 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next // // Phase 4: `digit_cursors` is dual-role within epoch H. After Stage 1 it holds // per-(w, t) counts of digit d; Stage 2 walks each (w, d) column from t = 0..T-1 // reading the count from slot k and writing back the exclusive prefix-sum offset // (the count is consumed into `running` BEFORE the slot is overwritten, so the +<<<<<<< HEAD // in-place transform is correct). Stage 4 then advances each (w, t) slice as a per-thread cursor. +======= + // in-place transform is mathematically identical to the previous out-of-place + // version). Stage 4 then advances each (w, t) slice as a per-thread cursor. +>>>>>>> origin/v5-next // Strict aliasing: every access goes through a std::span obtained by // reinterpret_cast(hist_slot.data() + offset) // which is well-defined because std::byte is allowed by [basic.lval] to alias any @@ -2661,6 +2910,10 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next size_t max_chunk_len = 0; for (size_t t = 0; t < num_threads; ++t) { for (size_t w = 0; w < windows_in_batch; ++w) { @@ -2673,8 +2926,13 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next // partials into `bucket_partials_dense` (a separate buffer packed via // `bucket_partials_offsets`, no power-of-two stride); Stage 6b copies them into // `s.dense_buckets` keyed by Stage 6b's uniform bucket-index slice of width @@ -2894,21 +3152,31 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next s.is_present[dst_slot] = 1; } else { // Boundary digit shared between two consecutive originals // — projective add then re-normalise to affine. Under the // contiguous-by-schedule-index partition there are at most // W boundary points per task. +<<<<<<< HEAD Element acc = Element(AffineElement(s.dense_buckets.x[dst_slot], s.dense_buckets.y[dst_slot])); acc += Element(src_dense[src_slot]); const AffineElement merged(acc); s.dense_buckets.x[dst_slot] = merged.x; s.dense_buckets.y[dst_slot] = merged.y; +======= + Element acc = Element(s.dense_buckets[dst_slot]); + acc += Element(src_dense[src_slot]); + s.dense_buckets[dst_slot] = AffineElement(acc); +>>>>>>> origin/v5-next } has_data = true; } @@ -2938,6 +3206,7 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan(s, s.chunk_infos.data(), windows_in_batch, @@ -2945,6 +3214,10 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan( + s, s.chunk_infos.data(), windows_in_batch, chunk_outputs.data() + tprime, num_threads); +>>>>>>> origin/v5-next for (size_t w = 0; w < windows_in_batch; ++w) { auto& out = chunk_outputs[(w * num_threads) + tprime]; @@ -2984,6 +3257,10 @@ typename Curve::Element pippenger_round_parallel(PolynomialSpan>>>>>> origin/v5-next { const size_t B_R = (size_t{ 1 } << (window_bits - 1)) + 1; for (size_t batch_start = 0; batch_start < sched.num_windows; batch_start += windows_per_batch) { diff --git a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.hpp b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.hpp index c7944d998ddb..dfdadcba8b43 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/scalar_multiplication/scalar_multiplication_fast.hpp @@ -181,6 +181,7 @@ extern template class MSM_fast; // and bench targets can pin behaviour at the boundary. inline constexpr size_t MIN_PTS_PER_THREAD_FOR_PIPPENGER = 24; +<<<<<<< HEAD // Points-per-worker floor below which intra-MSM multithreading loses to its parallel_for barrier // overhead. Drives both the worker-count pick in pippenger_round_parallel and the batch driver's // concurrent/sequential split. SIZE_MAX forces single-threaded on wasm. @@ -196,6 +197,12 @@ inline constexpr size_t MSM_MIN_PTS_PER_THREAD = 256; // through the concurrent pool, whose per-worker arena is sized to the largest member and caps the // worker count by memory budget. This finite bound keeps large members on the sequential shared-arena // path so the concurrent pool retains full worker width. Members at or below it dispatch one-per-worker. +======= +// Batch members at or below this point count dispatch one-per-worker with a +// single-threaded pipeline (max_threads=1) instead of sequentially with +// full-width parallel_for stages; below ~2^13 the per-stage barrier cost and +// understuffed per-thread chunks outweigh intra-MSM parallelism. +>>>>>>> origin/v5-next inline constexpr size_t SMALL_MSM_BATCH_THRESHOLD = size_t{ 1 } << 13; // Per-MSM_fast arena sizer. Returns 0 for shapes that fall back to the Jacobian-fast path diff --git a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_flavor.hpp b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_flavor.hpp index c84723d78625..f84c2ec8c91d 100644 --- a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_flavor.hpp @@ -787,6 +787,8 @@ class ECCVMFlavor { } // lookup_inverses is a derived witness — mask it so the commitment hides its values lookup_inverses.add_masking(); + // msm_round_minus_31_inv is a derived witness — mask it so the commitment hides its values + msm_round_minus_31_inv.add_masking(); // Lagrange polys shifted by the disabled head region lagrange_first.at(trace_offset) = 1; diff --git a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_prover.cpp b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_prover.cpp index 1d38bc03f5ef..77331cfc6fca 100644 --- a/barretenberg/cpp/src/barretenberg/eccvm/eccvm_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/eccvm/eccvm_prover.cpp @@ -75,10 +75,13 @@ void ECCVMProver::execute_wire_commitments_round() auto batch = key->commitment_key.start_batch(); for (const auto& [wire, label] : zip_view(key->polynomials.get_wires(), commitment_labels.get_wires())) { batch.add_to_batch(wire, label, Flavor::CommitmentLabels::wire_has_high_duplicate_density(label)); +<<<<<<< HEAD } auto wire_commitments = batch.commit_and_send_to_verifier(transcript); for (auto [commitment, computed_commitment] : zip_view(commitments.get_wires(), wire_commitments)) { commitment = computed_commitment; +======= +>>>>>>> origin/v5-next } } @@ -134,8 +137,13 @@ void ECCVMProver::execute_grand_product_computation_round() compute_grand_products(key->polynomials, relation_parameters); auto& zp = key->polynomials.z_perm; // set has_duplicates_hint for Z_PERM (empty row = duplicate Z value) +<<<<<<< HEAD commitments.z_perm = key->commitment_key.commit(zp, /*has_duplicates_hint=*/true); transcript->send_to_verifier(commitment_labels.z_perm, commitments.z_perm); +======= + transcript->send_to_verifier(commitment_labels.z_perm, + key->commitment_key.commit(zp, /*has_duplicates_hint=*/true)); +>>>>>>> origin/v5-next } /** diff --git a/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state.cpp b/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state.cpp new file mode 100644 index 000000000000..65ffb710d2f1 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state.cpp @@ -0,0 +1,1015 @@ +#include "barretenberg/world_state/world_state.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "barretenberg/crypto/merkle_tree/hash_path.hpp" +#include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp" +#include "barretenberg/crypto/merkle_tree/response.hpp" +#include "barretenberg/crypto/merkle_tree/types.hpp" +#include "barretenberg/ecc/curves/bn254/fr.hpp" +#include "barretenberg/messaging/header.hpp" +#include "barretenberg/nodejs_module/util/async_op.hpp" +#include "barretenberg/nodejs_module/world_state/world_state.hpp" +#include "barretenberg/nodejs_module/world_state/world_state_message.hpp" +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/world_state/fork.hpp" +#include "barretenberg/world_state/types.hpp" +#include "napi.h" + +using namespace bb::nodejs; +using namespace bb::world_state; +using namespace bb::crypto::merkle_tree; +using namespace bb::messaging; + +const uint64_t DEFAULT_MAP_SIZE = 1024UL * 1024; + +WorldStateWrapper::WorldStateWrapper(const Napi::CallbackInfo& info) + : ObjectWrap(info) +{ + uint64_t thread_pool_size = 16; + std::string data_dir; + std::unordered_map map_size{ + { MerkleTreeId::ARCHIVE, DEFAULT_MAP_SIZE }, + { MerkleTreeId::NULLIFIER_TREE, DEFAULT_MAP_SIZE }, + { MerkleTreeId::NOTE_HASH_TREE, DEFAULT_MAP_SIZE }, + { MerkleTreeId::PUBLIC_DATA_TREE, DEFAULT_MAP_SIZE }, + { MerkleTreeId::L1_TO_L2_MESSAGE_TREE, DEFAULT_MAP_SIZE }, + }; + std::unordered_map tree_height; + std::unordered_map tree_prefill; + std::vector prefilled_public_data; + std::vector prefilled_nullifiers; + std::vector tree_ids{ + MerkleTreeId::NULLIFIER_TREE, MerkleTreeId::NOTE_HASH_TREE, MerkleTreeId::PUBLIC_DATA_TREE, + MerkleTreeId::L1_TO_L2_MESSAGE_TREE, MerkleTreeId::ARCHIVE, + }; + uint32_t initial_header_generator_point = 0; + + Napi::Env env = info.Env(); + + size_t data_dir_index = 0; + if (info.Length() > data_dir_index && info[data_dir_index].IsString()) { + data_dir = info[data_dir_index].As(); + } else { + throw Napi::TypeError::New(env, "Directory needs to be a string"); + } + + size_t tree_height_index = 1; + if (info.Length() > tree_height_index && info[tree_height_index].IsObject()) { + Napi::Object obj = info[tree_height_index].As(); + + for (auto tree_id : tree_ids) { + if (obj.Has(tree_id)) { + tree_height[tree_id] = obj.Get(tree_id).As().Uint32Value(); + } + } + } else { + throw Napi::TypeError::New(env, "Tree heights must be a map"); + } + + size_t tree_prefill_index = 2; + if (info.Length() > tree_prefill_index && info[tree_prefill_index].IsObject()) { + Napi::Object obj = info[tree_prefill_index].As(); + + for (auto tree_id : tree_ids) { + if (obj.Has(tree_id)) { + tree_prefill[tree_id] = obj.Get(tree_id).As().Uint32Value(); + } + } + } else { + throw Napi::TypeError::New(env, "Tree prefill must be a map"); + } + + size_t prefilled_public_data_index = 3; + if (info.Length() > prefilled_public_data_index && info[prefilled_public_data_index].IsArray()) { + Napi::Array arr = info[prefilled_public_data_index].As(); + for (uint32_t i = 0; i < arr.Length(); ++i) { + Napi::Array deserialized = arr.Get(i).As(); + if (deserialized.Length() != 2 || !deserialized.Get(uint32_t(0)).IsBuffer() || + !deserialized.Get(uint32_t(1)).IsBuffer()) { + throw Napi::TypeError::New(env, "Prefilled public data value must be a buffer array of size 2"); + } + Napi::Buffer slot_buf = deserialized.Get(uint32_t(0)).As>(); + Napi::Buffer value_buf = deserialized.Get(uint32_t(1)).As>(); + uint256_t slot = 0; + uint256_t value = 0; + for (size_t j = 0; j < 32; ++j) { + slot = (slot << 8) | slot_buf[j]; + value = (value << 8) | value_buf[j]; + } + prefilled_public_data.push_back(PublicDataLeafValue(slot, value)); + } + } else { + throw Napi::TypeError::New(env, "Prefilled public data must be an array"); + } + + size_t prefilled_nullifiers_index = 4; + if (info.Length() > prefilled_nullifiers_index && info[prefilled_nullifiers_index].IsArray()) { + Napi::Array arr = info[prefilled_nullifiers_index].As(); + for (uint32_t i = 0; i < arr.Length(); ++i) { + if (!arr.Get(i).IsBuffer()) { + throw Napi::TypeError::New(env, "Prefilled nullifier value must be a buffer"); + } + Napi::Buffer nullifier_buf = arr.Get(i).As>(); + if (nullifier_buf.Length() != 32) { + throw Napi::TypeError::New(env, "Prefilled nullifier value must be a 32-byte buffer"); + } + uint256_t nullifier = 0; + for (size_t j = 0; j < 32; ++j) { + nullifier = (nullifier << 8) | nullifier_buf[j]; + } + prefilled_nullifiers.emplace_back(nullifier); + } + } else { + throw Napi::TypeError::New(env, "Prefilled nullifiers must be an array"); + } + + size_t initial_header_generator_point_index = 5; + if (info.Length() > initial_header_generator_point_index && info[initial_header_generator_point_index].IsNumber()) { + initial_header_generator_point = info[initial_header_generator_point_index].As().Uint32Value(); + } else { + throw Napi::TypeError::New(env, "Header generator point needs to be a number"); + } + + uint64_t genesis_timestamp = 0; + size_t genesis_timestamp_index = 6; + if (info.Length() > genesis_timestamp_index) { + if (info[genesis_timestamp_index].IsNumber()) { + genesis_timestamp = static_cast(info[genesis_timestamp_index].As().Int64Value()); + } else { + throw Napi::TypeError::New(env, "Genesis timestamp needs to be a number"); + } + } + + // optional parameters + size_t map_size_index = 7; + if (info.Length() > map_size_index) { + if (info[map_size_index].IsObject()) { + Napi::Object obj = info[map_size_index].As(); + + for (auto tree_id : tree_ids) { + if (obj.Has(tree_id)) { + // Int64Value is the widest integer accessor in N-API (no Uint64Value exists) + int64_t val = obj.Get(tree_id).As().Int64Value(); + if (val <= 0) { + throw Napi::TypeError::New(env, "Map size must be a positive number"); + } + map_size[tree_id] = static_cast(val); + } + } + } else if (info[map_size_index].IsNumber()) { + // Int64Value is the widest integer accessor in N-API (no Uint64Value exists) + int64_t val = info[map_size_index].As().Int64Value(); + if (val <= 0) { + throw Napi::TypeError::New(env, "Map size must be a positive number"); + } + uint64_t size = static_cast(val); + for (auto tree_id : tree_ids) { + map_size[tree_id] = size; + } + } else { + throw Napi::TypeError::New(env, "Map size must be a number or an object"); + } + } + + size_t thread_pool_size_index = 8; + if (info.Length() > thread_pool_size_index) { + if (!info[thread_pool_size_index].IsNumber()) { + throw Napi::TypeError::New(env, "Thread pool size must be a number"); + } + + thread_pool_size = info[thread_pool_size_index].As().Uint32Value(); + } + + // `ephemeral` opens each underlying LMDB env with `MDB_NOSYNC | MDB_NOMETASYNC` — + // commits never block on fsync, files stay sparse, and a crash mid-write yields an + // unrecoverable env. Intended for throwaway scratch state (TXE test sessions). + bool ephemeral = false; + size_t ephemeral_index = 9; + if (info.Length() > ephemeral_index) { + if (!info[ephemeral_index].IsBoolean()) { + throw Napi::TypeError::New(env, "Ephemeral flag must be a boolean"); + } + ephemeral = info[ephemeral_index].As().Value(); + } + + _ws = std::make_unique(thread_pool_size, + data_dir, + map_size, + tree_height, + tree_prefill, + prefilled_public_data, + prefilled_nullifiers, + initial_header_generator_point, + genesis_timestamp, + ephemeral); + + _dispatcher.register_target( + WorldStateMessageType::GET_TREE_INFO, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_tree_info(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_STATE_REFERENCE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_state_reference(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_INITIAL_STATE_REFERENCE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_initial_state_reference(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_LEAF_VALUE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_leaf_value(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_LEAF_PREIMAGE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_leaf_preimage(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_SIBLING_PATH, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_sibling_path(obj, buffer); }); + + _dispatcher.register_target(WorldStateMessageType::GET_BLOCK_NUMBERS_FOR_LEAF_INDICES, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { + return get_block_numbers_for_leaf_indices(obj, buffer); + }); + + _dispatcher.register_target( + WorldStateMessageType::FIND_LEAF_INDICES, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return find_leaf_indices(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::FIND_SIBLING_PATHS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return find_sibling_paths(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::FIND_LOW_LEAF, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return find_low_leaf(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::APPEND_LEAVES, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return append_leaves(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::BATCH_INSERT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return batch_insert(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::SEQUENTIAL_INSERT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return sequential_insert(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::UPDATE_ARCHIVE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return update_archive(obj, buffer); }); + + _dispatcher.register_target(WorldStateMessageType::COMMIT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return commit(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::ROLLBACK, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return rollback(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::SYNC_BLOCK, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return sync_block(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::CREATE_FORK, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return create_fork(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::DELETE_FORK, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return delete_fork(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::FINALIZE_BLOCKS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return set_finalized(obj, buffer); }); + + _dispatcher.register_target(WorldStateMessageType::UNWIND_BLOCKS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return unwind(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::REMOVE_HISTORICAL_BLOCKS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return remove_historical(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::GET_STATUS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return get_status(obj, buffer); }); + + _dispatcher.register_target(WorldStateMessageType::CLOSE, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return close(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::CREATE_CHECKPOINT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return checkpoint(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::COMMIT_CHECKPOINT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return commit_checkpoint(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::REVERT_CHECKPOINT, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return revert_checkpoint(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::COMMIT_ALL_CHECKPOINTS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return commit_all_checkpoints_to(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::REVERT_ALL_CHECKPOINTS, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return revert_all_checkpoints_to(obj, buffer); }); + + _dispatcher.register_target( + WorldStateMessageType::COPY_STORES, + [this](msgpack::object& obj, msgpack::sbuffer& buffer) { return copy_stores(obj, buffer); }); +} + +Napi::Value WorldStateWrapper::call(const Napi::CallbackInfo& info) +{ + Napi::Env env = info.Env(); + // keep this in a shared pointer so that AsyncOperation can resolve/reject the promise once the execution is + // complete on an separate thread + auto deferred = std::make_shared(env); + + if (info.Length() < 1) { + deferred->Reject(Napi::TypeError::New(env, "Wrong number of arguments").Value()); + } else if (!info[0].IsBuffer()) { + deferred->Reject(Napi::TypeError::New(env, "Argument must be a buffer").Value()); + } else if (!_ws) { + deferred->Reject(Napi::TypeError::New(env, "World state has been closed").Value()); + } else { + auto buffer = info[0].As>(); + size_t length = buffer.Length(); + // we mustn't access the Napi::Env outside of this top-level function + // so copy the data to a variable we own + // and make it a shared pointer so that it doesn't get destroyed as soon as we exit this code block + auto data = std::make_shared>(length); + std::copy_n(buffer.Data(), length, data->data()); + + auto* op = new AsyncOperation(env, deferred, [=, this](msgpack::sbuffer& buf) { + msgpack::object_handle obj_handle = msgpack::unpack(data->data(), length); + msgpack::object obj = obj_handle.get(); + _dispatcher.on_new_data(obj, buf); + }); + + // Napi is now responsible for destroying this object + op->Queue(); + } + + return deferred->Promise(); +} + +Napi::Value WorldStateWrapper::getHandle(const Napi::CallbackInfo& info) +{ + Napi::Env env = info.Env(); + + if (!_ws) { + throw Napi::Error::New(env, "World state has been closed"); + } + + // Return a NAPI External that wraps the raw WorldState pointer + // This allows other NAPI functions to access the WorldState instance + return Napi::External::New(env, _ws.get()); +} + +bool WorldStateWrapper::get_tree_info(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + auto info = _ws->get_tree_info(request.value.revision, request.value.treeId); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::GET_TREE_INFO, + header, + { request.value.treeId, info.meta.root, info.meta.size, info.meta.depth }); + + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::get_state_reference(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + auto state = _ws->get_state_reference(request.value.revision); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::GET_STATE_REFERENCE, header, { state }); + + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::get_initial_state_reference(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + HeaderOnlyMessage request; + obj.convert(request); + auto state = _ws->get_initial_state_reference(); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::GET_INITIAL_STATE_REFERENCE, header, { state }); + + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::get_leaf_value(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + switch (request.value.treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto leaf = _ws->get_leaf(request.value.revision, request.value.treeId, request.value.leafIndex); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg(WorldStateMessageType::GET_LEAF_VALUE, header, leaf); + msgpack::pack(buffer, resp_msg); + break; + } + + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = _ws->get_leaf( + request.value.revision, request.value.treeId, request.value.leafIndex); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::GET_LEAF_VALUE, header, leaf); + msgpack::pack(buffer, resp_msg); + break; + } + + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = _ws->get_leaf( + request.value.revision, request.value.treeId, request.value.leafIndex); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::GET_LEAF_VALUE, header, leaf); + msgpack::pack(buffer, resp_msg); + break; + } + + default: + throw std::runtime_error("Unsupported tree type"); + } + + return true; +} + +bool WorldStateWrapper::get_leaf_preimage(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + MsgHeader header(request.header.messageId); + + switch (request.value.treeId) { + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = _ws->get_indexed_leaf( + request.value.revision, request.value.treeId, request.value.leafIndex); + messaging::TypedMessage>> resp_msg( + WorldStateMessageType::GET_LEAF_PREIMAGE, header, leaf); + msgpack::pack(buffer, resp_msg); + break; + } + + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = _ws->get_indexed_leaf( + request.value.revision, request.value.treeId, request.value.leafIndex); + + messaging::TypedMessage>> resp_msg( + WorldStateMessageType::GET_LEAF_PREIMAGE, header, leaf); + msgpack::pack(buffer, resp_msg); + break; + } + + default: + throw std::runtime_error("Unsupported tree type"); + } + + return true; +} + +bool WorldStateWrapper::get_sibling_path(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + fr_sibling_path path = _ws->get_sibling_path(request.value.revision, request.value.treeId, request.value.leafIndex); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::GET_SIBLING_PATH, header, path); + + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::get_block_numbers_for_leaf_indices(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + GetBlockNumbersForLeafIndicesResponse response; + _ws->get_block_numbers_for_leaf_indices( + request.value.revision, request.value.treeId, request.value.leafIndices, response.blockNumbers); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::GET_BLOCK_NUMBERS_FOR_LEAF_INDICES, header, response); + + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::find_leaf_indices(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + FindLeafIndicesResponse response; + + switch (request.value.treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + TypedMessage> r1; + obj.convert(r1); + _ws->find_leaf_indices( + request.value.revision, request.value.treeId, r1.value.leaves, response.indices, r1.value.startIndex); + break; + } + + case MerkleTreeId::PUBLIC_DATA_TREE: { + TypedMessage> r2; + obj.convert(r2); + _ws->find_leaf_indices( + request.value.revision, request.value.treeId, r2.value.leaves, response.indices, r2.value.startIndex); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + TypedMessage> r3; + obj.convert(r3); + _ws->find_leaf_indices( + request.value.revision, request.value.treeId, r3.value.leaves, response.indices, r3.value.startIndex); + break; + } + default: + throw std::runtime_error("Unsupported tree type"); + } + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::FIND_LEAF_INDICES, header, response); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::find_sibling_paths(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + FindLeafPathsResponse response; + + switch (request.value.treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + TypedMessage> r1; + obj.convert(r1); + _ws->find_sibling_paths(request.value.revision, request.value.treeId, r1.value.leaves, response.paths); + break; + } + + case MerkleTreeId::PUBLIC_DATA_TREE: { + TypedMessage> r2; + obj.convert(r2); + _ws->find_sibling_paths( + request.value.revision, request.value.treeId, r2.value.leaves, response.paths); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + TypedMessage> r3; + obj.convert(r3); + _ws->find_sibling_paths( + request.value.revision, request.value.treeId, r3.value.leaves, response.paths); + break; + } + default: + throw std::runtime_error("Unsupported tree type"); + } + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::FIND_SIBLING_PATHS, header, response); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::find_low_leaf(msgpack::object& obj, msgpack::sbuffer& buffer) const +{ + TypedMessage request; + obj.convert(request); + + GetLowIndexedLeafResponse low_leaf_info = + _ws->find_low_leaf_index(request.value.revision, request.value.treeId, request.value.key); + + MsgHeader header(request.header.messageId); + TypedMessage response( + WorldStateMessageType::FIND_LOW_LEAF, header, { low_leaf_info.is_already_present, low_leaf_info.index }); + msgpack::pack(buffer, response); + + return true; +} + +bool WorldStateWrapper::append_leaves(msgpack::object& obj, msgpack::sbuffer& buf) +{ + TypedMessage request; + obj.convert(request); + + switch (request.value.treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + TypedMessage> r1; + obj.convert(r1); + _ws->append_leaves(r1.value.treeId, r1.value.leaves, r1.value.forkId); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + TypedMessage> r2; + obj.convert(r2); + _ws->append_leaves(r2.value.treeId, r2.value.leaves, r2.value.forkId); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + TypedMessage> r3; + obj.convert(r3); + _ws->append_leaves(r3.value.treeId, r3.value.leaves, r3.value.forkId); + break; + } + default: + throw std::runtime_error("Unsupported tree type"); + } + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::APPEND_LEAVES, header, {}); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::batch_insert(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + switch (request.value.treeId) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + TypedMessage> r1; + obj.convert(r1); + auto result = _ws->batch_insert_indexed_leaves( + request.value.treeId, r1.value.leaves, r1.value.subtreeDepth, r1.value.forkId); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::BATCH_INSERT, header, result); + msgpack::pack(buffer, resp_msg); + + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + TypedMessage> r2; + obj.convert(r2); + auto result = _ws->batch_insert_indexed_leaves( + request.value.treeId, r2.value.leaves, r2.value.subtreeDepth, r2.value.forkId); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::BATCH_INSERT, header, result); + msgpack::pack(buffer, resp_msg); + break; + } + default: + throw std::runtime_error("Unsupported tree type"); + } + + return true; +} + +bool WorldStateWrapper::sequential_insert(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + switch (request.value.treeId) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + TypedMessage> r1; + obj.convert(r1); + auto result = _ws->insert_indexed_leaves( + request.value.treeId, r1.value.leaves, r1.value.forkId); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::SEQUENTIAL_INSERT, header, result); + msgpack::pack(buffer, resp_msg); + + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + TypedMessage> r2; + obj.convert(r2); + auto result = _ws->insert_indexed_leaves( + request.value.treeId, r2.value.leaves, r2.value.forkId); + MsgHeader header(request.header.messageId); + messaging::TypedMessage> resp_msg( + WorldStateMessageType::SEQUENTIAL_INSERT, header, result); + msgpack::pack(buffer, resp_msg); + break; + } + default: + throw std::runtime_error("Unsupported tree type"); + } + + return true; +} + +bool WorldStateWrapper::update_archive(msgpack::object& obj, msgpack::sbuffer& buf) +{ + TypedMessage request; + obj.convert(request); + + _ws->update_archive(request.value.blockStateRef, request.value.blockHeaderHash, request.value.forkId); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::UPDATE_ARCHIVE, header, {}); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::commit(msgpack::object& obj, msgpack::sbuffer& buf) +{ + HeaderOnlyMessage request; + obj.convert(request); + + WorldStateStatusFull status; + _ws->commit(status); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::COMMIT, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::rollback(msgpack::object& obj, msgpack::sbuffer& buf) +{ + HeaderOnlyMessage request; + obj.convert(request); + + _ws->rollback(); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::ROLLBACK, header, {}); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::sync_block(msgpack::object& obj, msgpack::sbuffer& buf) +{ + TypedMessage request; + obj.convert(request); + + WorldStateStatusFull status = _ws->sync_block(request.value.blockStateRef, + request.value.blockHeaderHash, + request.value.paddedNoteHashes, + request.value.paddedL1ToL2Messages, + request.value.paddedNullifiers, + request.value.publicDataWrites, + request.value.expectedArchiveRoot, + request.value.expectedPreviousArchiveRoot); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::SYNC_BLOCK, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::create_fork(msgpack::object& obj, msgpack::sbuffer& buf) +{ + TypedMessage request; + obj.convert(request); + + std::optional blockNumber = + request.value.latest ? std::nullopt : std::optional(request.value.blockNumber); + + uint64_t forkId = _ws->create_fork(blockNumber); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::CREATE_FORK, header, { forkId }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::delete_fork(msgpack::object& obj, msgpack::sbuffer& buf) +{ + TypedMessage request; + obj.convert(request); + + _ws->delete_fork(request.value.forkId); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::DELETE_FORK, header, {}); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::close(msgpack::object& obj, msgpack::sbuffer& buf) +{ + HeaderOnlyMessage request; + obj.convert(request); + + // The only reason this API exists is for testing purposes in TS (e.g. close db, open new db instance to test + // persistence) + _ws.reset(nullptr); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::CLOSE, header, {}); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::set_finalized(msgpack::object& obj, msgpack::sbuffer& buf) const +{ + TypedMessage request; + obj.convert(request); + WorldStateStatusSummary status = _ws->set_finalized_blocks(request.value.toBlockNumber); + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::FINALIZE_BLOCKS, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::unwind(msgpack::object& obj, msgpack::sbuffer& buf) const +{ + TypedMessage request; + obj.convert(request); + + WorldStateStatusFull status = _ws->unwind_blocks(request.value.toBlockNumber); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::UNWIND_BLOCKS, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::remove_historical(msgpack::object& obj, msgpack::sbuffer& buf) const +{ + TypedMessage request; + obj.convert(request); + WorldStateStatusFull status = _ws->remove_historical_blocks(request.value.toBlockNumber); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg( + WorldStateMessageType::REMOVE_HISTORICAL_BLOCKS, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::checkpoint(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + uint32_t depth = _ws->checkpoint(request.value.forkId); + + MsgHeader header(request.header.messageId); + CheckpointDepthResponse resp_value{ depth }; + messaging::TypedMessage resp_msg( + WorldStateMessageType::CREATE_CHECKPOINT, header, resp_value); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::commit_checkpoint(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + _ws->commit_checkpoint(request.value.forkId); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::COMMIT_CHECKPOINT, header, {}); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::revert_checkpoint(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + _ws->revert_checkpoint(request.value.forkId); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::REVERT_CHECKPOINT, header, {}); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::commit_all_checkpoints_to(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + _ws->commit_all_checkpoints_to(request.value.forkId, request.value.depth); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::COMMIT_ALL_CHECKPOINTS, header, {}); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::revert_all_checkpoints_to(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + _ws->revert_all_checkpoints_to(request.value.forkId, request.value.depth); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::REVERT_ALL_CHECKPOINTS, header, {}); + msgpack::pack(buffer, resp_msg); + + return true; +} + +bool WorldStateWrapper::get_status(msgpack::object& obj, msgpack::sbuffer& buf) const +{ + HeaderOnlyMessage request; + obj.convert(request); + + WorldStateStatusSummary status; + _ws->get_status_summary(status); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::GET_STATUS, header, { status }); + msgpack::pack(buf, resp_msg); + + return true; +} + +bool WorldStateWrapper::copy_stores(msgpack::object& obj, msgpack::sbuffer& buffer) +{ + TypedMessage request; + obj.convert(request); + + _ws->copy_stores(request.value.dstPath, request.value.compact.value_or(false)); + + MsgHeader header(request.header.messageId); + messaging::TypedMessage resp_msg(WorldStateMessageType::COPY_STORES, header, {}); + msgpack::pack(buffer, resp_msg); + + return true; +} + +Napi::Function WorldStateWrapper::get_class(Napi::Env env) +{ + return DefineClass(env, + "WorldState", + { + WorldStateWrapper::InstanceMethod("call", &WorldStateWrapper::call), + WorldStateWrapper::InstanceMethod("getHandle", &WorldStateWrapper::getHandle), + }); +} diff --git a/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state_message.hpp b/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state_message.hpp new file mode 100644 index 000000000000..176e7192ce91 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/nodejs_module/world_state/world_state_message.hpp @@ -0,0 +1,276 @@ +#pragma once +#include "barretenberg/crypto/merkle_tree/hash_path.hpp" +#include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp" +#include "barretenberg/crypto/merkle_tree/response.hpp" +#include "barretenberg/crypto/merkle_tree/types.hpp" +#include "barretenberg/ecc/curves/bn254/fr.hpp" +#include "barretenberg/messaging/header.hpp" +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/world_state/fork.hpp" +#include "barretenberg/world_state/types.hpp" +#include +#include +#include + +namespace bb::nodejs { + +using namespace bb::messaging; +using namespace bb::world_state; + +enum WorldStateMessageType { + GET_TREE_INFO = FIRST_APP_MSG_TYPE, + GET_STATE_REFERENCE, + GET_INITIAL_STATE_REFERENCE, + + GET_LEAF_VALUE, + GET_LEAF_PREIMAGE, + GET_SIBLING_PATH, + GET_BLOCK_NUMBERS_FOR_LEAF_INDICES, + + FIND_LEAF_INDICES, + FIND_LOW_LEAF, + FIND_SIBLING_PATHS, + + APPEND_LEAVES, + BATCH_INSERT, + SEQUENTIAL_INSERT, + + UPDATE_ARCHIVE, + + COMMIT, + ROLLBACK, + + SYNC_BLOCK, + + CREATE_FORK, + DELETE_FORK, + + FINALIZE_BLOCKS, + UNWIND_BLOCKS, + REMOVE_HISTORICAL_BLOCKS, + + GET_STATUS, + + CREATE_CHECKPOINT, + COMMIT_CHECKPOINT, + REVERT_CHECKPOINT, + COMMIT_ALL_CHECKPOINTS, + REVERT_ALL_CHECKPOINTS, + + COPY_STORES, + + CLOSE = 999, +}; + +struct TreeIdOnlyRequest { + MerkleTreeId treeId; + SERIALIZATION_FIELDS(treeId); +}; + +struct CreateForkRequest { + bool latest; + block_number_t blockNumber; + SERIALIZATION_FIELDS(latest, blockNumber); +}; + +struct CreateForkResponse { + uint64_t forkId; + SERIALIZATION_FIELDS(forkId); +}; + +struct DeleteForkRequest { + uint64_t forkId; + SERIALIZATION_FIELDS(forkId); +}; + +struct ForkIdOnlyRequest { + uint64_t forkId; + SERIALIZATION_FIELDS(forkId); +}; + +struct ForkIdWithDepthRequest { + uint64_t forkId; + uint32_t depth; + SERIALIZATION_FIELDS(forkId, depth); +}; + +struct CheckpointDepthResponse { + uint32_t depth; + SERIALIZATION_FIELDS(depth); +}; + +struct TreeIdAndRevisionRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + SERIALIZATION_FIELDS(treeId, revision); +}; + +struct EmptyResponse { + bool ok{ true }; + SERIALIZATION_FIELDS(ok); +}; + +struct GetTreeInfoRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + SERIALIZATION_FIELDS(treeId, revision); +}; + +struct GetTreeInfoResponse { + MerkleTreeId treeId; + fr root; + index_t size; + uint32_t depth; + SERIALIZATION_FIELDS(treeId, root, size, depth); +}; + +struct GetStateReferenceRequest { + WorldStateRevision revision; + SERIALIZATION_FIELDS(revision); +}; + +struct GetStateReferenceResponse { + StateReference state; + SERIALIZATION_FIELDS(state); +}; + +struct GetInitialStateReferenceResponse { + StateReference state; + SERIALIZATION_FIELDS(state); +}; + +struct GetLeafValueRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); +}; + +struct GetLeafPreimageRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); +}; + +struct GetSiblingPathRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); +}; + +struct GetBlockNumbersForLeafIndicesRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + std::vector leafIndices; + SERIALIZATION_FIELDS(treeId, revision, leafIndices); +}; + +struct GetBlockNumbersForLeafIndicesResponse { + std::vector> blockNumbers; + SERIALIZATION_FIELDS(blockNumbers); +}; + +template struct FindLeafIndicesRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + std::vector leaves; + index_t startIndex; + SERIALIZATION_FIELDS(treeId, revision, leaves, startIndex); +}; + +struct FindLeafIndicesResponse { + std::vector> indices; + SERIALIZATION_FIELDS(indices); +}; + +template struct FindLeafPathsRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + std::vector leaves; + SERIALIZATION_FIELDS(treeId, revision, leaves); +}; + +struct FindLeafPathsResponse { + std::vector> paths; + SERIALIZATION_FIELDS(paths); +}; + +struct FindLowLeafRequest { + MerkleTreeId treeId; + WorldStateRevision revision; + fr key; + SERIALIZATION_FIELDS(treeId, revision, key); +}; + +struct FindLowLeafResponse { + bool alreadyPresent; + index_t index; + SERIALIZATION_FIELDS(alreadyPresent, index); +}; + +struct BlockShiftRequest { + block_number_t toBlockNumber; + SERIALIZATION_FIELDS(toBlockNumber); +}; + +template struct AppendLeavesRequest { + MerkleTreeId treeId; + std::vector leaves; + Fork::Id forkId{ CANONICAL_FORK_ID }; + SERIALIZATION_FIELDS(treeId, leaves, forkId); +}; + +template struct BatchInsertRequest { + MerkleTreeId treeId; + std::vector leaves; + uint32_t subtreeDepth; + Fork::Id forkId{ CANONICAL_FORK_ID }; + SERIALIZATION_FIELDS(treeId, leaves, subtreeDepth, forkId); +}; + +template struct InsertRequest { + MerkleTreeId treeId; + std::vector leaves; + Fork::Id forkId{ CANONICAL_FORK_ID }; + SERIALIZATION_FIELDS(treeId, leaves, forkId); +}; + +struct UpdateArchiveRequest { + StateReference blockStateRef; + bb::fr blockHeaderHash; + Fork::Id forkId{ CANONICAL_FORK_ID }; + SERIALIZATION_FIELDS(blockStateRef, blockHeaderHash, forkId); +}; + +struct SyncBlockRequest { + block_number_t blockNumber; + StateReference blockStateRef; + bb::fr blockHeaderHash; + bb::fr expectedArchiveRoot; + bb::fr expectedPreviousArchiveRoot; + std::vector paddedNoteHashes, paddedL1ToL2Messages; + std::vector paddedNullifiers; + std::vector publicDataWrites; + + SERIALIZATION_FIELDS(blockNumber, + blockStateRef, + blockHeaderHash, + expectedArchiveRoot, + expectedPreviousArchiveRoot, + paddedNoteHashes, + paddedL1ToL2Messages, + paddedNullifiers, + publicDataWrites); +}; + +struct CopyStoresRequest { + std::string dstPath; + std::optional compact; + SERIALIZATION_FIELDS(dstPath, compact); +}; + +} // namespace bb::nodejs + +MSGPACK_ADD_ENUM(bb::nodejs::WorldStateMessageType) diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/plookup_tables.cpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/plookup_tables.cpp index e1aa37a4f99d..937972d6263f 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/plookup_tables.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/plookup_tables.cpp @@ -285,22 +285,22 @@ BasicTable create_basic_table(const BasicTableId id, const size_t index) if (id_var >= static_cast(SECP256R1_FIXED_BASE_XLO_0) && id_var < static_cast(SECP256R1_FIXED_BASE_XHI_0)) { return secp256r1_fixed_base::table::generate_basic_table_runtime( - id, id_var - static_cast(SECP256R1_FIXED_BASE_XLO_0)); + id, id_var - static_cast(SECP256R1_FIXED_BASE_XLO_0), index); } if (id_var >= static_cast(SECP256R1_FIXED_BASE_XHI_0) && id_var < static_cast(SECP256R1_FIXED_BASE_YLO_0)) { return secp256r1_fixed_base::table::generate_basic_table_runtime( - id, id_var - static_cast(SECP256R1_FIXED_BASE_XHI_0)); + id, id_var - static_cast(SECP256R1_FIXED_BASE_XHI_0), index); } if (id_var >= static_cast(SECP256R1_FIXED_BASE_YLO_0) && id_var < static_cast(SECP256R1_FIXED_BASE_YHI_0)) { return secp256r1_fixed_base::table::generate_basic_table_runtime( - id, id_var - static_cast(SECP256R1_FIXED_BASE_YLO_0)); + id, id_var - static_cast(SECP256R1_FIXED_BASE_YLO_0), index); } if (id_var >= static_cast(SECP256R1_FIXED_BASE_YHI_0) && id_var < static_cast(SECP256R1_FIXED_BASE_END)) { return secp256r1_fixed_base::table::generate_basic_table_runtime( - id, id_var - static_cast(SECP256R1_FIXED_BASE_YHI_0)); + id, id_var - static_cast(SECP256R1_FIXED_BASE_YHI_0), index); } switch (id) { case AES_SPARSE_MAP: { diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.cpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.cpp index e75f816a3f23..1819e4eaa941 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.cpp @@ -143,17 +143,18 @@ template generate_fn_ptr generate_fn_for_window(size_t w } } // namespace -template BasicTable table::generate_basic_table_runtime(BasicTableId id, size_t window_idx) +template +BasicTable table::generate_basic_table_runtime(BasicTableId id, size_t window_idx, size_t table_index) { BB_ASSERT_LT(window_idx, NUM_WINDOWS); - return generate_fn_for_window(window_idx)(id, window_idx); + return generate_fn_for_window(window_idx)(id, table_index); } // Explicit instantiations for the four axes. -template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t); -template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t); -template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t); -template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t); +template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t, size_t); +template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t, size_t); +template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t, size_t); +template BasicTable table::generate_basic_table_runtime(BasicTableId, size_t, size_t); namespace { // Returns `&table::get_values` for a runtime (axis, window_idx). The per-axis 32-entry diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.hpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.hpp index 9631739650f9..c1b329bbc4b8 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/plookup_tables/secp256r1_fixed_base.hpp @@ -116,10 +116,11 @@ class table : public Secp256r1FixedBaseParams { static BasicTable generate_basic_table(BasicTableId id, size_t table_index); /** - * @brief Runtime dispatch helper used by plookup_tables.cpp::create_basic_table. Given an axis and a - * runtime window_idx ∈ [0, NUM_WINDOWS), instantiate the corresponding generator. + * @brief Runtime dispatch helper used by plookup_tables.cpp::create_basic_table. Selects table contents using + * window_idx and assigns the independently supplied circuit-local table_index. */ - template static BasicTable generate_basic_table_runtime(BasicTableId id, size_t table_index); + template + static BasicTable generate_basic_table_runtime(BasicTableId id, size_t window_idx, size_t table_index); /** * @brief Construct one of the 10 MultiTables described in the file-header docstring. diff --git a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_circuit_builder.cpp b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_circuit_builder.cpp index 07a89eb4e699..5a9ca0c023df 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_circuit_builder.cpp +++ b/barretenberg/cpp/src/barretenberg/stdlib_circuit_builders/ultra_circuit_builder.cpp @@ -51,6 +51,13 @@ template void UltraCircuitBuilder_::fi * our circuit is finalized, and we must not to execute these functions again. */ if (!this->circuit_finalized) { + std::unordered_set table_indices; + for (const auto& table : lookup_tables) { + BB_ASSERT_GT(table.table_index, 0U, "Lookup table indices must be positive"); + BB_ASSERT(table_indices.insert(table.table_index).second, + "Lookup table indices must be unique within a circuit"); + } + process_non_native_field_multiplications(); #ifndef ULTRA_FUZZ this->rom_ram_logic.process_ROM_arrays(this); diff --git a/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp b/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp index 5fd10c19efda..bf71ed0610ab 100644 --- a/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp +++ b/barretenberg/cpp/src/barretenberg/translator_vm/translator_flavor.hpp @@ -29,9 +29,13 @@ #include "barretenberg/relations/translator_vm/translator_non_native_field_relation.hpp" #include "barretenberg/relations/translator_vm/translator_non_native_field_short_relation.hpp" #include "barretenberg/relations/translator_vm/translator_permutation_relation.hpp" +<<<<<<< HEAD #include "barretenberg/relations/translator_vm/translator_permutation_short_relation.hpp" #include "barretenberg/relations/translator_vm/translator_shiftable_first_coeff_zero_relation.hpp" #include "barretenberg/relations/translator_vm/translator_shiftable_first_coeff_zero_short_relation.hpp" +======= +#include "barretenberg/relations/translator_vm/translator_shiftable_first_coeff_zero_relation.hpp" +>>>>>>> origin/v5-next #include "barretenberg/translator_vm/translator_circuit_builder.hpp" #include "barretenberg/translator_vm/translator_fixed_vk.hpp" #include "barretenberg/translator_vm/translator_selectors.hpp" diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.cpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.cpp index b3aa384f5f9c..e7121c8e2374 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.cpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.cpp @@ -1,6 +1,10 @@ #include "barretenberg/vm2/tracegen/trace_container.hpp" #include +<<<<<<< HEAD +======= +#include +>>>>>>> origin/v5-next #include "barretenberg/common/assert.hpp" #include "barretenberg/common/compiler_hints.hpp" @@ -98,7 +102,11 @@ void TraceContainer::set(Column col, uint32_t row, const FF& value, bool use_ato if (BB_UNLIKELY(use_atomic_limbs)) { store_per_limb(shard->rows[offset], zero); } else { +<<<<<<< HEAD shard->rows[offset] = zero; +======= + shard->rows[offset] = FF::zero(); +>>>>>>> origin/v5-next } } } @@ -113,13 +121,20 @@ void TraceContainer::set(uint32_t row, std::span> va void TraceContainer::reserve_column(Column col, size_t size) { +<<<<<<< HEAD BB_ASSERT_LTE(size, MAX_AVM_TRACE_SIZE, "size exceeds the maximum trace size"); +======= +>>>>>>> origin/v5-next if (size == 0) { return; } auto& column_data = (*trace)[static_cast(col)]; +<<<<<<< HEAD const size_t num_shards = (size + INTERVAL_SIZE - 1) / INTERVAL_SIZE; +======= + const size_t num_shards = std::min((size + INTERVAL_SIZE - 1) / INTERVAL_SIZE, NUM_SHARDS); +>>>>>>> origin/v5-next // Each shard's dense row array is full size on creation, so reserving just materializes the shards up // front (e.g. for precomputed columns). Lock-free: get_or_create_shard installs each via CAS. for (size_t k = 0; k < num_shards; ++k) { diff --git a/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.hpp b/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.hpp index 8132ab3de8c1..debc6e7b9aad 100644 --- a/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.hpp +++ b/barretenberg/cpp/src/barretenberg/vm2/tracegen/trace_container.hpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "barretenberg/common/tuple.hpp" #include "barretenberg/vm2/common/constants.hpp" @@ -54,7 +55,11 @@ class TraceContainer { // it) so that concurrent chunks touch disjoint shards. Smaller => less memory wasted in // sparsely-filled regions, at the cost of a larger shard table (more atomic slots) and more shard // allocations per column. +<<<<<<< HEAD static constexpr uint32_t INTERVAL_SIZE = 1U << 11; +======= + static constexpr uint32_t INTERVAL_SIZE = 1u << 11; +>>>>>>> origin/v5-next // Number of shards in a column's (fixed-size) shard table. The trace never exceeds the circuit size, // so this bounds the shard index. INTERVAL_SIZE divides MAX_AVM_TRACE_SIZE evenly. static constexpr size_t NUM_SHARDS = MAX_AVM_TRACE_SIZE / INTERVAL_SIZE; diff --git a/barretenberg/cpp/src/barretenberg/world_state/world_state.cpp b/barretenberg/cpp/src/barretenberg/world_state/world_state.cpp index e2076c3144c5..e95a73a41413 100644 --- a/barretenberg/cpp/src/barretenberg/world_state/world_state.cpp +++ b/barretenberg/cpp/src/barretenberg/world_state/world_state.cpp @@ -39,6 +39,7 @@ WorldState::WorldState(uint64_t thread_pool_size, const std::unordered_map& tree_heights, const std::unordered_map& tree_prefill, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint32_t initial_header_generator_point, uint64_t genesis_timestamp, bool ephemeral) @@ -51,7 +52,7 @@ WorldState::WorldState(uint64_t thread_pool_size, { // We set the max readers to be high, at least the number of given threads or the default if higher uint64_t maxReaders = std::max(thread_pool_size, DEFAULT_MIN_NUMBER_OF_READERS); - create_canonical_fork(data_dir, map_size, prefilled_public_data, maxReaders, ephemeral); + create_canonical_fork(data_dir, map_size, prefilled_public_data, prefilled_nullifiers, maxReaders, ephemeral); try { attempt_tree_resync(); } catch (std::exception& e) { @@ -73,6 +74,7 @@ WorldState::WorldState(uint64_t thread_pool_size, tree_heights, tree_prefill, std::vector(), + std::vector(), initial_header_generator_point, genesis_timestamp, ephemeral) @@ -84,6 +86,7 @@ WorldState::WorldState(uint64_t thread_pool_size, const std::unordered_map& tree_heights, const std::unordered_map& tree_prefill, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint32_t initial_header_generator_point, uint64_t genesis_timestamp, bool ephemeral) @@ -99,6 +102,7 @@ WorldState::WorldState(uint64_t thread_pool_size, tree_heights, tree_prefill, prefilled_public_data, + prefilled_nullifiers, initial_header_generator_point, genesis_timestamp, ephemeral) @@ -118,6 +122,7 @@ WorldState::WorldState(uint64_t thread_pool_size, tree_heights, tree_prefill, std::vector(), + std::vector(), initial_header_generator_point, genesis_timestamp, ephemeral) @@ -126,6 +131,7 @@ WorldState::WorldState(uint64_t thread_pool_size, void WorldState::create_canonical_fork(const std::string& dataDir, const std::unordered_map& dbSize, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint64_t maxReaders, bool ephemeral) { @@ -148,9 +154,15 @@ void WorldState::create_canonical_fork(const std::string& dataDir, { uint32_t levels = _tree_heights.at(MerkleTreeId::NULLIFIER_TREE); index_t initial_size = _initial_tree_size.at(MerkleTreeId::NULLIFIER_TREE); + std::vector prefilled_nullifier_leaves; + prefilled_nullifier_leaves.reserve(prefilled_nullifiers.size()); + for (const auto& nullifier : prefilled_nullifiers) { + prefilled_nullifier_leaves.emplace_back(nullifier); + } auto store = std::make_unique( getMerkleTreeName(MerkleTreeId::NULLIFIER_TREE), levels, _persistentStores->nullifierStore); - auto tree = std::make_unique(std::move(store), _workers, initial_size); + auto tree = + std::make_unique(std::move(store), _workers, initial_size, prefilled_nullifier_leaves); fork->_trees.insert({ MerkleTreeId::NULLIFIER_TREE, TreeWithStore(std::move(tree)) }); } { diff --git a/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp b/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp index c145138bc4e2..1a07e4e4d94b 100644 --- a/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp +++ b/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp @@ -82,11 +82,15 @@ class WorldState { const std::unordered_map& tree_heights, const std::unordered_map& tree_prefill, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint32_t initial_header_generator_point, uint64_t genesis_timestamp = 0, bool ephemeral = false); /** + * @param prefilled_nullifiers Nullifier leaves to pre-insert into the genesis nullifier tree (e.g. the protocol + * contract registration nullifiers). Must be unique and strictly increasing in field value, and + * distinct from the padding leaves implied by the nullifier tree prefill size. * @param ephemeral When true, every underlying LMDB env opens with `MDB_NOSYNC | * MDB_NOMETASYNC`. Commits return without waiting for fsync; the kernel * flushes lazily, files stay sparse. Intended for throwaway scratch @@ -99,6 +103,7 @@ class WorldState { const std::unordered_map& tree_heights, const std::unordered_map& tree_prefill, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint32_t initial_header_generator_point, uint64_t genesis_timestamp = 0, bool ephemeral = false); @@ -326,6 +331,7 @@ class WorldState { void create_canonical_fork(const std::string& dataDir, const std::unordered_map& dbSize, const std::vector& prefilled_public_data, + const std::vector& prefilled_nullifiers, uint64_t maxReaders, bool ephemeral); diff --git a/barretenberg/cpp/src/barretenberg/world_state/world_state.test.cpp b/barretenberg/cpp/src/barretenberg/world_state/world_state.test.cpp index 4b6181fc9c98..6cdd0d264521 100644 --- a/barretenberg/cpp/src/barretenberg/world_state/world_state.test.cpp +++ b/barretenberg/cpp/src/barretenberg/world_state/world_state.test.cpp @@ -211,6 +211,57 @@ TEST_F(WorldStateTest, GetInitialTreeInfoForAllTrees) } } +TEST_F(WorldStateTest, GetInitialTreeInfoWithPrefilledNullifiers) +{ + // Prefilled nullifier leaves must be unique and strictly increasing, and larger than the padding leaves that fill + // the initial 128-leaf prefill region (whose keys are the low integers 0..127), so we use full-size field values. + std::vector prefilled_nullifiers = { + bb::fr("0x073b5e41abe9d7f8466bca9c81c9572b558f953bbd70081317f6a80ac65f3dd5"), + bb::fr("0x0d99507b7ecac720c73bf197a0e7366a5ed80c1c1b0afe8ff8c6ecc7b5a7aefe"), + bb::fr("0x1c0bf82e0c51834780e61ef091b17e3a1d39ae891db7a70bfdb5221f134996ac"), + }; + + std::string data_dir_prefilled = random_temp_directory(); + std::filesystem::create_directories(data_dir_prefilled); + + WorldState ws_prefilled(thread_pool_size, + data_dir_prefilled, + map_size, + tree_heights, + tree_prefill, + std::vector(), + prefilled_nullifiers, + initial_header_generator_point); + + // Baseline world state with no prefilled nullifiers (the canonical empty genesis). + WorldState ws(thread_pool_size, data_dir, map_size, tree_heights, tree_prefill, initial_header_generator_point); + + auto prefilled = ws_prefilled.get_tree_info(WorldStateRevision::committed(), MerkleTreeId::NULLIFIER_TREE); + auto info = ws.get_tree_info(WorldStateRevision::committed(), MerkleTreeId::NULLIFIER_TREE); + + // The prefilled nullifiers occupy the last slots of the 128-leaf initial prefill region (they replace padding + // leaves rather than being appended), so the tree size stays 128 for both. + EXPECT_EQ(prefilled.meta.size, 128); + EXPECT_EQ(info.meta.size, 128); + + // Seeding the nullifiers changes the nullifier-tree root away from the empty-genesis baseline. + EXPECT_NE(prefilled.meta.root, info.meta.root); + // The empty-genesis baseline root is unchanged from the canonical value, confirming that a default (empty) + // prefilled-nullifiers list leaves the genesis nullifier-tree root bit-identical to today. + EXPECT_EQ(info.meta.root, bb::fr("0x18935581a8ed73d08ffd00386fba55ba6c89f3ab848a76b8fedfa9034cee0454")); + + // The seeded nullifiers are present in the tree. + for (const auto& nullifier : prefilled_nullifiers) { + assert_leaf_exists(ws_prefilled, + WorldStateRevision::committed(), + MerkleTreeId::NULLIFIER_TREE, + NullifierLeafValue(nullifier), + true); + } + + std::filesystem::remove_all(data_dir_prefilled); +} + TEST_F(WorldStateTest, GetInitialTreeInfoWithPrefilledPublicData) { std::string data_dir_prefilled = random_temp_directory(); @@ -225,6 +276,7 @@ TEST_F(WorldStateTest, GetInitialTreeInfoWithPrefilledPublicData) tree_heights, tree_prefill, prefilled_values, + std::vector(), initial_header_generator_point); WorldState ws(thread_pool_size, data_dir, map_size, tree_heights, tree_prefill, initial_header_generator_point); diff --git a/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp b/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp index 2cf90fb38bcb..e75ef571a64c 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp @@ -65,6 +65,11 @@ int parse_and_run_wsdb(int argc, char* argv[]) msgpack_run_command->add_option( "--prefilled-public-data", prefilled_public_data_json, "Prefilled public data as JSON array"); + // Prefilled nullifiers as JSON array of nullifier_hex strings + std::string prefilled_nullifiers_json; + msgpack_run_command->add_option( + "--prefilled-nullifiers", prefilled_nullifiers_json, "Prefilled genesis nullifiers as JSON array"); + uint64_t genesis_timestamp = 0; msgpack_run_command->add_option("--genesis-timestamp", genesis_timestamp, "Genesis block timestamp (default: 0)"); @@ -98,6 +103,7 @@ int parse_and_run_wsdb(int argc, char* argv[]) threads, initial_header_generator_point, prefilled_public_data_json, + prefilled_nullifiers_json, genesis_timestamp, request_ring_size, response_ring_size); diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp new file mode 100644 index 000000000000..3a9610bf1c3d --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp @@ -0,0 +1,540 @@ +#pragma once +/** + * @file wsdb_commands.hpp + * @brief NamedUnion command structs for the aztec-wsdb world state database API. + * + * Each command follows the bbapi pattern: + * - static constexpr MSGPACK_SCHEMA_NAME for NamedUnion dispatch + * - Nested Response struct with its own MSGPACK_SCHEMA_NAME + * - Request fields with SERIALIZATION_FIELDS + * - execute(WsdbRequest&) && method (implemented in wsdb_execute.cpp) + */ + +#include "barretenberg/crypto/merkle_tree/hash_path.hpp" +#include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp" +#include "barretenberg/crypto/merkle_tree/response.hpp" +#include "barretenberg/crypto/merkle_tree/types.hpp" +#include "barretenberg/ecc/curves/bn254/fr.hpp" +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/world_state/fork.hpp" +#include "barretenberg/world_state/types.hpp" +#include +#include +#include +#include + +namespace bb::wsdb { + +using namespace bb::world_state; +using namespace bb::crypto::merkle_tree; + +// Forward declaration +struct WsdbRequest; + +// --------------------------------------------------------------------------- +// Tree info / state queries +// --------------------------------------------------------------------------- + +struct WsdbGetTreeInfo { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetTreeInfo"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetTreeInfoResponse"; + MerkleTreeId treeId; + fr root; + index_t size; + uint32_t depth; + SERIALIZATION_FIELDS(treeId, root, size, depth); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision); + bool operator==(const WsdbGetTreeInfo&) const = default; +}; + +struct WsdbGetStateReference { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetStateReference"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetStateReferenceResponse"; + StateReference state; + SERIALIZATION_FIELDS(state); + bool operator==(const Response&) const = default; + }; + WorldStateRevision revision; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(revision); + bool operator==(const WsdbGetStateReference&) const = default; +}; + +struct WsdbGetInitialStateReference { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetInitialStateReference"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetInitialStateReferenceResponse"; + StateReference state; + SERIALIZATION_FIELDS(state); + bool operator==(const Response&) const = default; + }; + Response execute(WsdbRequest& request) &&; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const WsdbGetInitialStateReference&) const = default; +}; + +// --------------------------------------------------------------------------- +// Leaf queries +// --------------------------------------------------------------------------- + +struct WsdbGetLeafValue { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetLeafValue"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetLeafValueResponse"; + // Polymorphic: Fr, NullifierLeafValue, or PublicDataLeafValue serialized as bytes + std::optional> value; + SERIALIZATION_FIELDS(value); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); + bool operator==(const WsdbGetLeafValue&) const = default; +}; + +struct WsdbGetLeafPreimage { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetLeafPreimage"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetLeafPreimageResponse"; + // Serialized indexed leaf (NullifierLeafValue or PublicDataLeafValue) + std::optional> preimage; + SERIALIZATION_FIELDS(preimage); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); + bool operator==(const WsdbGetLeafPreimage&) const = default; +}; + +struct WsdbGetSiblingPath { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetSiblingPath"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetSiblingPathResponse"; + fr_sibling_path path; + SERIALIZATION_FIELDS(path); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + index_t leafIndex; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leafIndex); + bool operator==(const WsdbGetSiblingPath&) const = default; +}; + +struct WsdbGetBlockNumbersForLeafIndices { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetBlockNumbersForLeafIndices"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetBlockNumbersForLeafIndicesResponse"; + std::vector> blockNumbers; + SERIALIZATION_FIELDS(blockNumbers); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + std::vector leafIndices; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leafIndices); + bool operator==(const WsdbGetBlockNumbersForLeafIndices&) const = default; +}; + +// --------------------------------------------------------------------------- +// Leaf search operations +// --------------------------------------------------------------------------- + +struct WsdbFindLeafIndices { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindLeafIndices"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindLeafIndicesResponse"; + std::vector> indices; + SERIALIZATION_FIELDS(indices); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + // Polymorphic leaves: each leaf is serialized as bytes + std::vector> leaves; + index_t startIndex; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leaves, startIndex); + bool operator==(const WsdbFindLeafIndices&) const = default; +}; + +struct WsdbFindLowLeaf { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindLowLeaf"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindLowLeafResponse"; + bool alreadyPresent; + index_t index; + SERIALIZATION_FIELDS(alreadyPresent, index); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + fr key; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, key); + bool operator==(const WsdbFindLowLeaf&) const = default; +}; + +struct WsdbFindSiblingPaths { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindSiblingPaths"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFindSiblingPathsResponse"; + std::vector> paths; + SERIALIZATION_FIELDS(paths); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + WorldStateRevision revision; + // Polymorphic leaves + std::vector> leaves; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, revision, leaves); + bool operator==(const WsdbFindSiblingPaths&) const = default; +}; + +// --------------------------------------------------------------------------- +// Tree mutation operations +// --------------------------------------------------------------------------- + +struct WsdbAppendLeaves { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbAppendLeaves"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbAppendLeavesResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + // Polymorphic leaves + std::vector> leaves; + Fork::Id forkId{ CANONICAL_FORK_ID }; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, leaves, forkId); + bool operator==(const WsdbAppendLeaves&) const = default; +}; + +struct WsdbBatchInsert { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbBatchInsert"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbBatchInsertResponse"; + // Serialized BatchInsertionResult + std::vector result; + SERIALIZATION_FIELDS(result); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + std::vector> leaves; + uint32_t subtreeDepth; + Fork::Id forkId{ CANONICAL_FORK_ID }; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, leaves, subtreeDepth, forkId); + bool operator==(const WsdbBatchInsert&) const = default; +}; + +struct WsdbSequentialInsert { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbSequentialInsert"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbSequentialInsertResponse"; + // Serialized SequentialInsertionResult + std::vector result; + SERIALIZATION_FIELDS(result); + bool operator==(const Response&) const = default; + }; + MerkleTreeId treeId; + std::vector> leaves; + Fork::Id forkId{ CANONICAL_FORK_ID }; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(treeId, leaves, forkId); + bool operator==(const WsdbSequentialInsert&) const = default; +}; + +struct WsdbUpdateArchive { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbUpdateArchive"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbUpdateArchiveResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + StateReference blockStateRef; + bb::fr blockHeaderHash; + Fork::Id forkId{ CANONICAL_FORK_ID }; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(blockStateRef, blockHeaderHash, forkId); + bool operator==(const WsdbUpdateArchive&) const = default; +}; + +// --------------------------------------------------------------------------- +// Transaction operations +// --------------------------------------------------------------------------- + +struct WsdbCommit { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommit"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommitResponse"; + WorldStateStatusFull status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + Response execute(WsdbRequest& request) &&; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const WsdbCommit&) const = default; +}; + +struct WsdbRollback { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRollback"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRollbackResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + Response execute(WsdbRequest& request) &&; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const WsdbRollback&) const = default; +}; + +// --------------------------------------------------------------------------- +// Block synchronization +// --------------------------------------------------------------------------- + +struct WsdbSyncBlock { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbSyncBlock"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbSyncBlockResponse"; + WorldStateStatusFull status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + block_number_t blockNumber; + StateReference blockStateRef; + bb::fr blockHeaderHash; + bb::fr expectedArchiveRoot; + bb::fr expectedPreviousArchiveRoot; + std::vector paddedNoteHashes; + std::vector paddedL1ToL2Messages; + std::vector paddedNullifiers; + std::vector publicDataWrites; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(blockNumber, + blockStateRef, + blockHeaderHash, + expectedArchiveRoot, + expectedPreviousArchiveRoot, + paddedNoteHashes, + paddedL1ToL2Messages, + paddedNullifiers, + publicDataWrites); + bool operator==(const WsdbSyncBlock&) const = default; +}; + +// --------------------------------------------------------------------------- +// Fork management +// --------------------------------------------------------------------------- + +struct WsdbCreateFork { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCreateFork"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCreateForkResponse"; + uint64_t forkId; + SERIALIZATION_FIELDS(forkId); + bool operator==(const Response&) const = default; + }; + bool latest; + block_number_t blockNumber; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(latest, blockNumber); + bool operator==(const WsdbCreateFork&) const = default; +}; + +struct WsdbDeleteFork { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbDeleteFork"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbDeleteForkResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbDeleteFork&) const = default; +}; + +// --------------------------------------------------------------------------- +// Block management +// --------------------------------------------------------------------------- + +struct WsdbFinalizeBlocks { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFinalizeBlocks"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbFinalizeBlocksResponse"; + WorldStateStatusSummary status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + block_number_t toBlockNumber; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(toBlockNumber); + bool operator==(const WsdbFinalizeBlocks&) const = default; +}; + +struct WsdbUnwindBlocks { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbUnwindBlocks"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbUnwindBlocksResponse"; + WorldStateStatusFull status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + block_number_t toBlockNumber; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(toBlockNumber); + bool operator==(const WsdbUnwindBlocks&) const = default; +}; + +struct WsdbRemoveHistoricalBlocks { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRemoveHistoricalBlocks"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRemoveHistoricalBlocksResponse"; + WorldStateStatusFull status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + block_number_t toBlockNumber; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(toBlockNumber); + bool operator==(const WsdbRemoveHistoricalBlocks&) const = default; +}; + +// --------------------------------------------------------------------------- +// Status +// --------------------------------------------------------------------------- + +struct WsdbGetStatus { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetStatus"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbGetStatusResponse"; + WorldStateStatusSummary status; + SERIALIZATION_FIELDS(status); + bool operator==(const Response&) const = default; + }; + Response execute(WsdbRequest& request) &&; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const WsdbGetStatus&) const = default; +}; + +// --------------------------------------------------------------------------- +// Checkpoint operations +// --------------------------------------------------------------------------- + +struct WsdbCreateCheckpoint { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCreateCheckpoint"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCreateCheckpointResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbCreateCheckpoint&) const = default; +}; + +struct WsdbCommitCheckpoint { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommitCheckpoint"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommitCheckpointResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbCommitCheckpoint&) const = default; +}; + +struct WsdbRevertCheckpoint { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRevertCheckpoint"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRevertCheckpointResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbRevertCheckpoint&) const = default; +}; + +struct WsdbCommitAllCheckpoints { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommitAllCheckpoints"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCommitAllCheckpointsResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbCommitAllCheckpoints&) const = default; +}; + +struct WsdbRevertAllCheckpoints { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRevertAllCheckpoints"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbRevertAllCheckpointsResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + uint64_t forkId; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(forkId); + bool operator==(const WsdbRevertAllCheckpoints&) const = default; +}; + +// --------------------------------------------------------------------------- +// Database operations +// --------------------------------------------------------------------------- + +struct WsdbCopyStores { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCopyStores"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbCopyStoresResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + std::string dstPath; + std::optional compact; + Response execute(WsdbRequest& request) &&; + SERIALIZATION_FIELDS(dstPath, compact); + bool operator==(const WsdbCopyStores&) const = default; +}; + +// --------------------------------------------------------------------------- +// Lifecycle +// --------------------------------------------------------------------------- + +struct WsdbShutdown { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbShutdown"; + struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbShutdownResponse"; + void msgpack(auto&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + }; + void msgpack(auto&& pack_fn) { pack_fn(); } + Response execute(WsdbRequest& request) &&; + bool operator==(const WsdbShutdown&) const = default; +}; + +} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp new file mode 100644 index 000000000000..41d231157929 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp @@ -0,0 +1,420 @@ +#include "barretenberg/wsdb/wsdb_execute.hpp" +#include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp" +#include "barretenberg/crypto/merkle_tree/response.hpp" +#include "barretenberg/world_state/world_state.hpp" +#include +#include + +namespace bb::wsdb { + +using namespace bb::world_state; +using namespace bb::crypto::merkle_tree; + +// --------------------------------------------------------------------------- +// Helper: serialize a value to msgpack bytes +// --------------------------------------------------------------------------- + +template static std::vector serialize_to_msgpack(const T& value) +{ + msgpack::sbuffer buf; + msgpack::pack(buf, value); + return std::vector(buf.data(), buf.data() + buf.size()); +} + +// --------------------------------------------------------------------------- +// Helper: deserialize leaves from raw bytes based on tree type +// --------------------------------------------------------------------------- + +template +static std::vector deserialize_leaves(const std::vector>& raw_leaves) +{ + std::vector leaves; + leaves.reserve(raw_leaves.size()); + for (const auto& raw : raw_leaves) { + auto unpacked = msgpack::unpack(reinterpret_cast(raw.data()), raw.size()); + LeafType leaf; + unpacked.get().convert(leaf); + leaves.push_back(std::move(leaf)); + } + return leaves; +} + +// --------------------------------------------------------------------------- +// Top-level dispatch +// --------------------------------------------------------------------------- + +WsdbCommandResponse wsdb(WsdbRequest& request, WsdbCommand&& command) +{ + return execute(request, std::move(command)); +} + +// --------------------------------------------------------------------------- +// Tree info / state queries +// --------------------------------------------------------------------------- + +WsdbGetTreeInfo::Response WsdbGetTreeInfo::execute(WsdbRequest& request) && +{ + auto info = request.world_state.get_tree_info(revision, treeId); + return Response{ .treeId = treeId, .root = info.meta.root, .size = info.meta.size, .depth = info.meta.depth }; +} + +WsdbGetStateReference::Response WsdbGetStateReference::execute(WsdbRequest& request) && +{ + auto state = request.world_state.get_state_reference(revision); + return Response{ .state = state }; +} + +WsdbGetInitialStateReference::Response WsdbGetInitialStateReference::execute(WsdbRequest& request) && +{ + auto state = request.world_state.get_initial_state_reference(); + return Response{ .state = state }; +} + +// --------------------------------------------------------------------------- +// Leaf queries +// --------------------------------------------------------------------------- + +WsdbGetLeafValue::Response WsdbGetLeafValue::execute(WsdbRequest& request) && +{ + switch (treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto leaf = request.world_state.get_leaf(revision, treeId, leafIndex); + if (!leaf.has_value()) { + return Response{ .value = std::nullopt }; + } + return Response{ .value = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = request.world_state.get_leaf(revision, treeId, leafIndex); + if (!leaf.has_value()) { + return Response{ .value = std::nullopt }; + } + return Response{ .value = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = request.world_state.get_leaf(revision, treeId, leafIndex); + if (!leaf.has_value()) { + return Response{ .value = std::nullopt }; + } + return Response{ .value = serialize_to_msgpack(leaf.value()) }; + } + default: + throw std::runtime_error("Unsupported tree type for get_leaf_value"); + } +} + +WsdbGetLeafPreimage::Response WsdbGetLeafPreimage::execute(WsdbRequest& request) && +{ + switch (treeId) { + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = request.world_state.get_indexed_leaf(revision, treeId, leafIndex); + if (!leaf.has_value()) { + return Response{ .preimage = std::nullopt }; + } + return Response{ .preimage = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = request.world_state.get_indexed_leaf(revision, treeId, leafIndex); + if (!leaf.has_value()) { + return Response{ .preimage = std::nullopt }; + } + return Response{ .preimage = serialize_to_msgpack(leaf.value()) }; + } + default: + throw std::runtime_error("Unsupported tree type for get_leaf_preimage"); + } +} + +WsdbGetSiblingPath::Response WsdbGetSiblingPath::execute(WsdbRequest& request) && +{ + fr_sibling_path path = request.world_state.get_sibling_path(revision, treeId, leafIndex); + return Response{ .path = path }; +} + +WsdbGetBlockNumbersForLeafIndices::Response WsdbGetBlockNumbersForLeafIndices::execute(WsdbRequest& request) && +{ + Response response; + request.world_state.get_block_numbers_for_leaf_indices(revision, treeId, leafIndices, response.blockNumbers); + return response; +} + +// --------------------------------------------------------------------------- +// Leaf search operations +// --------------------------------------------------------------------------- + +WsdbFindLeafIndices::Response WsdbFindLeafIndices::execute(WsdbRequest& request) && +{ + Response response; + switch (treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_leaf_indices(revision, treeId, typed_leaves, response.indices, startIndex); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_leaf_indices( + revision, treeId, typed_leaves, response.indices, startIndex); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_leaf_indices( + revision, treeId, typed_leaves, response.indices, startIndex); + break; + } + default: + throw std::runtime_error("Unsupported tree type for find_leaf_indices"); + } + return response; +} + +WsdbFindLowLeaf::Response WsdbFindLowLeaf::execute(WsdbRequest& request) && +{ + auto low_leaf_info = request.world_state.find_low_leaf_index(revision, treeId, key); + return Response{ .alreadyPresent = low_leaf_info.is_already_present, .index = low_leaf_info.index }; +} + +WsdbFindSiblingPaths::Response WsdbFindSiblingPaths::execute(WsdbRequest& request) && +{ + Response response; + switch (treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_sibling_paths(revision, treeId, typed_leaves, response.paths); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_sibling_paths(revision, treeId, typed_leaves, response.paths); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.find_sibling_paths(revision, treeId, typed_leaves, response.paths); + break; + } + default: + throw std::runtime_error("Unsupported tree type for find_sibling_paths"); + } + return response; +} + +// --------------------------------------------------------------------------- +// Tree mutation operations +// --------------------------------------------------------------------------- + +WsdbAppendLeaves::Response WsdbAppendLeaves::execute(WsdbRequest& request) && +{ + switch (treeId) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.append_leaves(treeId, typed_leaves, forkId); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.append_leaves(treeId, typed_leaves, forkId); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + request.world_state.append_leaves(treeId, typed_leaves, forkId); + break; + } + default: + throw std::runtime_error("Unsupported tree type for append_leaves"); + } + return Response{}; +} + +WsdbBatchInsert::Response WsdbBatchInsert::execute(WsdbRequest& request) && +{ + switch (treeId) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + auto result = request.world_state.batch_insert_indexed_leaves( + treeId, typed_leaves, subtreeDepth, forkId); + return Response{ .result = serialize_to_msgpack(result) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + auto result = request.world_state.batch_insert_indexed_leaves( + treeId, typed_leaves, subtreeDepth, forkId); + return Response{ .result = serialize_to_msgpack(result) }; + } + default: + throw std::runtime_error("Unsupported tree type for batch_insert"); + } +} + +WsdbSequentialInsert::Response WsdbSequentialInsert::execute(WsdbRequest& request) && +{ + switch (treeId) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + auto result = request.world_state.insert_indexed_leaves(treeId, typed_leaves, forkId); + return Response{ .result = serialize_to_msgpack(result) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(leaves); + auto result = request.world_state.insert_indexed_leaves(treeId, typed_leaves, forkId); + return Response{ .result = serialize_to_msgpack(result) }; + } + default: + throw std::runtime_error("Unsupported tree type for sequential_insert"); + } +} + +WsdbUpdateArchive::Response WsdbUpdateArchive::execute(WsdbRequest& request) && +{ + request.world_state.update_archive(blockStateRef, blockHeaderHash, forkId); + return Response{}; +} + +// --------------------------------------------------------------------------- +// Transaction operations +// --------------------------------------------------------------------------- + +WsdbCommit::Response WsdbCommit::execute(WsdbRequest& request) && +{ + WorldStateStatusFull status; + request.world_state.commit(status); + return Response{ .status = status }; +} + +WsdbRollback::Response WsdbRollback::execute(WsdbRequest& request) && +{ + request.world_state.rollback(); + return Response{}; +} + +// --------------------------------------------------------------------------- +// Block synchronization +// --------------------------------------------------------------------------- + +WsdbSyncBlock::Response WsdbSyncBlock::execute(WsdbRequest& request) && +{ + WorldStateStatusFull status = request.world_state.sync_block(blockStateRef, + blockHeaderHash, + paddedNoteHashes, + paddedL1ToL2Messages, + paddedNullifiers, + publicDataWrites, + expectedArchiveRoot, + expectedPreviousArchiveRoot); + return Response{ .status = status }; +} + +// --------------------------------------------------------------------------- +// Fork management +// --------------------------------------------------------------------------- + +WsdbCreateFork::Response WsdbCreateFork::execute(WsdbRequest& request) && +{ + std::optional block = latest ? std::nullopt : std::optional(blockNumber); + uint64_t id = request.world_state.create_fork(block); + return Response{ .forkId = id }; +} + +WsdbDeleteFork::Response WsdbDeleteFork::execute(WsdbRequest& request) && +{ + request.world_state.delete_fork(forkId); + return Response{}; +} + +// --------------------------------------------------------------------------- +// Block management +// --------------------------------------------------------------------------- + +WsdbFinalizeBlocks::Response WsdbFinalizeBlocks::execute(WsdbRequest& request) && +{ + WorldStateStatusSummary status = request.world_state.set_finalized_blocks(toBlockNumber); + return Response{ .status = status }; +} + +WsdbUnwindBlocks::Response WsdbUnwindBlocks::execute(WsdbRequest& request) && +{ + WorldStateStatusFull status = request.world_state.unwind_blocks(toBlockNumber); + return Response{ .status = status }; +} + +WsdbRemoveHistoricalBlocks::Response WsdbRemoveHistoricalBlocks::execute(WsdbRequest& request) && +{ + WorldStateStatusFull status = request.world_state.remove_historical_blocks(toBlockNumber); + return Response{ .status = status }; +} + +// --------------------------------------------------------------------------- +// Status +// --------------------------------------------------------------------------- + +WsdbGetStatus::Response WsdbGetStatus::execute(WsdbRequest& request) && +{ + WorldStateStatusSummary status; + request.world_state.get_status_summary(status); + return Response{ .status = status }; +} + +// --------------------------------------------------------------------------- +// Checkpoint operations +// --------------------------------------------------------------------------- + +WsdbCreateCheckpoint::Response WsdbCreateCheckpoint::execute(WsdbRequest& request) && +{ + request.world_state.checkpoint(forkId); + return Response{}; +} + +WsdbCommitCheckpoint::Response WsdbCommitCheckpoint::execute(WsdbRequest& request) && +{ + request.world_state.commit_checkpoint(forkId); + return Response{}; +} + +WsdbRevertCheckpoint::Response WsdbRevertCheckpoint::execute(WsdbRequest& request) && +{ + request.world_state.revert_checkpoint(forkId); + return Response{}; +} + +WsdbCommitAllCheckpoints::Response WsdbCommitAllCheckpoints::execute(WsdbRequest& request) && +{ + request.world_state.commit_all_checkpoints_to(forkId, 0); + return Response{}; +} + +WsdbRevertAllCheckpoints::Response WsdbRevertAllCheckpoints::execute(WsdbRequest& request) && +{ + request.world_state.revert_all_checkpoints_to(forkId, 0); + return Response{}; +} + +// --------------------------------------------------------------------------- +// Database operations +// --------------------------------------------------------------------------- + +WsdbCopyStores::Response WsdbCopyStores::execute(WsdbRequest& request) && +{ + request.world_state.copy_stores(dstPath, compact.value_or(false)); + return Response{}; +} + +// --------------------------------------------------------------------------- +// Lifecycle +// --------------------------------------------------------------------------- + +WsdbShutdown::Response WsdbShutdown::execute(WsdbRequest& /* request */) && +{ + return Response{}; +} + +} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp index ca98eb60e12e..c4d1c9e01737 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp @@ -130,6 +130,34 @@ static std::vector parse_prefilled_public_data(const std::s return result; } +// --------------------------------------------------------------------------- +// Parse prefilled nullifiers from JSON: ["nullifier_hex",...] +// Each hex string is a 64-char (32-byte) hex-encoded field element. +// --------------------------------------------------------------------------- + +static std::vector parse_prefilled_nullifiers(const std::string& json) +{ + std::vector result; + if (json.empty() || json == "[]") { + return result; + } + + std::string current; + bool in_string = false; + + for (char c : json) { + if (c == '"') { + in_string = !in_string; + } else if (in_string) { + current += c; + } else if ((c == ',' || c == ']') && !current.empty()) { + result.push_back(hex_to_fr(current)); + current.clear(); + } + } + return result; +} + // --------------------------------------------------------------------------- // IPC server execution // --------------------------------------------------------------------------- @@ -142,6 +170,7 @@ int execute_wsdb_server(const std::string& input_path, uint32_t threads, uint32_t initial_header_generator_point, const std::string& prefilled_public_data_json, + const std::string& prefilled_nullifiers_json, uint64_t genesis_timestamp, size_t request_ring_size, size_t response_ring_size) @@ -173,6 +202,14 @@ int execute_wsdb_server(const std::string& input_path, std::cerr << "Parsed " << prefilled_public_data.size() << " prefilled public data entries" << '\n'; } + // Parse prefilled nullifiers: JSON array of "nullifier_hex" strings. The caller (TS world-state) passes the same + // canonical genesis nullifiers it seeds via the napi path, so the IPC genesis nullifier-tree root matches. + std::vector prefilled_nullifiers; + if (!prefilled_nullifiers_json.empty()) { + prefilled_nullifiers = parse_prefilled_nullifiers(prefilled_nullifiers_json); + std::cerr << "Parsed " << prefilled_nullifiers.size() << " prefilled nullifiers" << '\n'; + } + // Create WorldState std::cerr << "Creating WorldState at " << data_dir << " with " << threads << " threads" << '\n'; auto ws = std::make_unique(threads, @@ -181,6 +218,7 @@ int execute_wsdb_server(const std::string& input_path, tree_height, tree_prefill, prefilled_public_data, + prefilled_nullifiers, initial_header_generator_point, genesis_timestamp); diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp index afb03cba3512..d1004802ab3b 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp @@ -20,6 +20,7 @@ int execute_wsdb_server(const std::string& input_path, uint32_t threads, uint32_t initial_header_generator_point, const std::string& prefilled_public_data_json, + const std::string& prefilled_nullifiers_json, uint64_t genesis_timestamp, size_t request_ring_size, size_t response_ring_size); diff --git a/barretenberg/ts/bb.js/src/barretenberg/index.ts b/barretenberg/ts/bb.js/src/barretenberg/index.ts index 90ad65642a27..2797c8b3ab41 100644 --- a/barretenberg/ts/bb.js/src/barretenberg/index.ts +++ b/barretenberg/ts/bb.js/src/barretenberg/index.ts @@ -53,7 +53,11 @@ export class Barretenberg extends AsyncApi { if (options.backend) { // Explicit backend required - no fallback const backend = await createAsyncBackend(options.backend, options, logger); - if (!options.skipSrsInit && (options.backend === BackendType.Wasm || options.backend === BackendType.WasmWorker)) { + await configureMsmBackend(backend, options); + if ( + !options.skipSrsInit && + (options.backend === BackendType.Wasm || options.backend === BackendType.WasmWorker) + ) { await backend.initSRSChonk(options.srsSize); } return backend; @@ -61,10 +65,13 @@ export class Barretenberg extends AsyncApi { if (typeof window === 'undefined') { try { - return await createAsyncBackend(BackendType.NativeUnixSocket, options, logger); + const backend = await createAsyncBackend(BackendType.NativeUnixSocket, options, logger); + await configureMsmBackend(backend, options); + return backend; } catch (err: any) { logger(`Unix socket unavailable (${err.message}), falling back to WASM`); const backend = await createAsyncBackend(BackendType.Wasm, options, logger); + await configureMsmBackend(backend, options); if (!options.skipSrsInit) { await backend.initSRSChonk(options.srsSize); } @@ -73,6 +80,7 @@ export class Barretenberg extends AsyncApi { } else { logger(`In browser, using WASM over worker backend.`); const backend = await createAsyncBackend(BackendType.WasmWorker, options, logger); + await configureMsmBackend(backend, options); if (!options.skipSrsInit) { await backend.initSRSChonk(options.srsSize); } @@ -103,7 +111,11 @@ export class Barretenberg extends AsyncApi { // iOS browser is very aggressive with memory. Check if running in browser and on iOS. // We expect the mobile iOS browser to kill us >=1GB, so no real use in using a larger SRS. // Use `self` instead of `window` so this check also works inside Web Workers. - if (typeof self !== 'undefined' && typeof self.navigator !== 'undefined' && /iPad|iPhone/.test(self.navigator.userAgent)) { + if ( + typeof self !== 'undefined' && + typeof self.navigator !== 'undefined' && + /iPad|iPhone/.test(self.navigator.userAgent) + ) { return IOS_BB_CRS_SIZE; } return DEFAULT_BB_CRS_SIZE; @@ -196,17 +208,23 @@ export class BarretenbergSync extends SyncApi { const logger = options.logger ?? (() => {}); if (options.backend) { - return await createSyncBackend(options.backend, options, logger); + const backend = await createSyncBackend(options.backend, options, logger); + configureSyncMsmBackend(backend, options); + return backend; } // Try native, fallback to WASM. try { - return await createSyncBackend(BackendType.NativeSharedMemory, options, logger); + const backend = await createSyncBackend(BackendType.NativeSharedMemory, options, logger); + configureSyncMsmBackend(backend, options); + return backend; } catch (err: any) { logger(`Shared memory unavailable (${err.message}), falling back to WASM`); } - return await createSyncBackend(BackendType.Wasm, options, logger); + const backend = await createSyncBackend(BackendType.Wasm, options, logger); + configureSyncMsmBackend(backend, options); + return backend; } /** @@ -237,3 +255,15 @@ export class BarretenbergSync extends SyncApi { return barretenbergSyncSingleton; } } + +async function configureMsmBackend(backend: Barretenberg, options: BackendOptions) { + if (options.legacyMsm !== undefined) { + await backend.setMsmLegacy({ enabled: options.legacyMsm }); + } +} + +function configureSyncMsmBackend(backend: BarretenbergSync, options: BackendOptions) { + if (options.legacyMsm !== undefined) { + backend.setMsmLegacy({ enabled: options.legacyMsm }); + } +} diff --git a/barretenberg/ts/bb.js/src/bb_backends/index.ts b/barretenberg/ts/bb.js/src/bb_backends/index.ts index 760f51fe9da0..d0861a5155ab 100644 --- a/barretenberg/ts/bb.js/src/bb_backends/index.ts +++ b/barretenberg/ts/bb.js/src/bb_backends/index.ts @@ -70,4 +70,12 @@ export type BackendOptions = { * don't need proving/verification capabilities. */ skipSrsInit?: boolean; + + /** + * @description Selects the Pippenger/MSM implementation. The legacy MSM is the default, so leave + * this unset for it. Set `false` to opt into the round-parallel implementation (equivalent to + * BB_MSM_NEW for native bb); set `true` to force legacy explicitly. Honoured by both native and + * WASM backends. + */ + legacyMsm?: boolean; }; diff --git a/bootstrap.sh b/bootstrap.sh index ba62a9aa5166..15f8778fdb91 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -604,11 +604,22 @@ function release_dryrun { function private_release { # Release flow for the private repo, run on a (nightly) ci-private-release PR. We publish only to our # internal GCP Artifact Registry: the docker image (release-image -> INTERNAL_DOCKER_REGISTRY that +<<<<<<< HEAD +<<<<<<< HEAD + # GKE/staging pulls from) and the npm packages (barretenberg/ts, noir, wsdb, yarn-project -> the +======= + # GKE/staging pulls from) and the npm packages (barretenberg/ts, noir, yarn-project -> the +>>>>>>> origin/v5-next + # INTERNAL_NPM_REGISTRY npm repo). We run the release step for real on exactly those components and do + # not invoke the others — the remaining release sources publish public artifacts (github releases, + # crates.io, the aztec-up/playground S3 installers) and are not interrelated with these. +======= # GKE/staging pulls from) and the npm packages (barretenberg/ts, noir, ipc-runtime, wsdb, # protocol/constants-codegen, yarn-project -> the INTERNAL_NPM_REGISTRY npm repo). We run the release # step for real on exactly those components and do not invoke the others — the remaining release # sources publish public artifacts (github releases, crates.io, the aztec-up/playground S3 installers) # and are not interrelated with these. +>>>>>>> origin/next echo_header "private release" # Default to the private staging Artifact Registry; override via the INTERNAL_*_REGISTRY env vars. @@ -659,6 +670,7 @@ function private_release { done fi +<<<<<<< HEAD # Publish @aztec/l1-artifacts to the internal registry. 13 yarn-project packages depend on it at the # release version, so it must exist before yarn-project's release smoke-test installs them. We call # only the npm publish, not l1-contracts' full `release` — that also git-mirrors tags to the public @@ -673,7 +685,17 @@ function private_release { # them. @aztec/world-state has a runtime dependency on @aztec/wsdb, and the ipc-codegen-generated # @aztec/wsdb in turn has a runtime dependency on @aztec/ipc-runtime, so ipc-runtime must precede wsdb. # npm packages are platform-independent, so only the docker image is published on arm64. +<<<<<<< HEAD + local publish=(barretenberg/ts noir ipc-runtime wsdb yarn-project release-image) +======= + # Publish for real, in dependency order: bb.js and the noir packages must be on the registry before + # yarn-project's release smoke-tests installing the @aztec packages that depend on them. npm packages + # are platform-independent, so only the docker image is published on arm64. + local publish=(barretenberg/ts noir yarn-project release-image) +>>>>>>> origin/v5-next +======= local publish=(barretenberg/ts noir ipc-runtime wsdb protocol/constants-codegen yarn-project release-image) +>>>>>>> origin/next if [ $(arch) == arm64 ]; then publish=(release-image) fi diff --git a/ci.sh b/ci.sh index 5a1936abfcf7..3d97f313c68c 100755 --- a/ci.sh +++ b/ci.sh @@ -44,7 +44,11 @@ function print_usage { echo_cmd "shell-host" "Shell into a running build host. Same instance selection as shell-container." echo_cmd "log" "Display the log of the given log ID." echo_cmd "test-timings" "Download per-test timing JSONL for a job: test-timings ." +<<<<<<< HEAD echo_cmd "kill" "Terminate running build instances matching the filter tokens (default: current branch)." +======= + echo_cmd "kill" "Terminate running EC2 instance with instance_name." +>>>>>>> origin/v5-next echo_cmd "draft" "Mark the current PR as draft (no automatic CI runs when pushing)." echo_cmd "ready" "Mark the current PR as ready (enable automatic CI runs when pushing)." echo_cmd "pr-url" "Print the URL of the current PR associated with the branch." @@ -55,10 +59,19 @@ function print_usage { [ -n "$cmd" ] && shift +<<<<<<< HEAD # Connecting to a running build instance: discover by the Group=build-instance tag # and match filter tokens against the Name (which aws_instance_name builds as # __[_]), rather than reconstructing the exact name (which # varies by arch/job/count). This is what lets `shell-container pr-123 bench` etc. work. +======= +# Keep this in sync with bootstrap_ec2's instance_name scheme (repo-scoped) so the +# shell/kill/get-ip helpers find instances launched by a CI run for this repo. +repo=${GITHUB_REPOSITORY:-aztec-packages} +repo=${repo##*/} +instance_name=${INSTANCE_NAME:-${repo}_$(echo -n "$BRANCH" | tr -c 'a-zA-Z0-9-' '_')_${arch}} +[ -n "${INSTANCE_POSTFIX:-}" ] && instance_name+="_$INSTANCE_POSTFIX" +>>>>>>> origin/v5-next # Echo running build instances as: \t\t\t function list_build_instances { diff --git a/ci3/aws_request_instance_type b/ci3/aws_request_instance_type index a8e6d5631d44..91ad528caaf7 100755 --- a/ci3/aws_request_instance_type +++ b/ci3/aws_request_instance_type @@ -150,6 +150,7 @@ if [ "${NO_SPOT:-0}" -ne 1 ]; then done fi +<<<<<<< HEAD # On-demand fallback (cheapest pool) only if spot couldn't be had. Some pinned pools (e.g. # m6a.metal for benchmarks) can hit InsufficientInstanceCapacity even on-demand, so retry # the whole request until a time budget expires rather than giving up on the first miss. @@ -178,6 +179,20 @@ if [ -z "$iid" ]; then echo "On-demand capacity unavailable$(echo "$resp" | jq -r '.Errors[0].ErrorCode // "" | if . == "" then "" else " (" + . + ")" end' 2>/dev/null); retrying in ${ondemand_poll}s (elapsed ${SECONDS}s)..." sleep "$ondemand_poll" done +======= +# On-demand fallback (cheapest pool) only if spot couldn't be had. +if [ -z "$iid" ]; then + echo "Requesting on-demand fleet $info..." + resp=$(aws ec2 create-fleet \ + --type instant \ + --target-capacity-specification "TotalTargetCapacity=1,DefaultTargetCapacityType=on-demand" \ + --on-demand-options "AllocationStrategy=lowest-price" \ + --launch-template-configs "$ltc" \ + --output json 2>"$state_dir/fleet_err") || true + iid=$(echo "$resp" | jq -r '.Instances[0].InstanceIds[0] // empty' 2>/dev/null || true) + instance_type=$(echo "$resp" | jq -r '.Instances[0].InstanceType // empty') + lifecycle=ondemand +>>>>>>> origin/v5-next fi if [ -z "$iid" ]; then diff --git a/ci3/bootstrap_ec2 b/ci3/bootstrap_ec2 index 7cb4ca1b8132..3a649931b973 100755 --- a/ci3/bootstrap_ec2 +++ b/ci3/bootstrap_ec2 @@ -65,6 +65,7 @@ if [[ "$(git fetch origin --negotiate-only --negotiation-tip="$current_commit")" exit 1 fi +<<<<<<< HEAD # Our instance_name acts as a uniqueness key for the instance: an existing instance # with the same name is terminated first, reaping orphans left when a GA run is # cancelled (e.g. by a new push) on the same ref. It's repo-scoped so @@ -79,6 +80,21 @@ instance_name=$(aws_instance_name "$REF_NAME" "$arch" "${INSTANCE_POSTFIX:-}") # substring, so the sha-free base from aws_instance_name still resolves these. if [[ "$REF_NAME" == merge-train/* ]]; then instance_name="${instance_name}_${current_commit:0:9}" +======= +# Our instance_name acts as a uniqueness key for the instance. +# Instances are terminated if they exist with the same name; this reaps orphans +# left when a GA run is cancelled (e.g. by a new push) on the same ref. +# Scope the key to the repo: aztec-packages and aztec-packages-private can build +# the same tag/ref concurrently under the same role, and must not reap each +# other's instances. The key stays stable across re-runs within a repo, so the +# orphan cleanup still works. +repo=${GITHUB_REPOSITORY:-aztec-packages} +repo=${repo##*/} +if [[ "$REF_NAME" =~ ^gh-readonly-queue/.*(pr-[0-9]+) ]]; then + instance_name="${repo}_${BASH_REMATCH[1]}_$arch" +else + instance_name="${repo}_$(echo -n "$REF_NAME" | head -c 50 | tr -c 'a-zA-Z0-9-' '_')_$arch" +>>>>>>> origin/v5-next fi state_dir=$(mktemp -d /tmp/aws_request_instance.XXXXXX) diff --git a/docker-compose.yml b/docker-compose.yml index 6eb3b0d77981..df0a586f6321 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,7 +72,7 @@ services: environment: AZTEC_NODE_URL: http://node:8080 NODE_NO_WARNINGS: 1 - SECRET_KEY: + SIGNING_KEY: ETHEREUM_HOSTS: profiles: - cli diff --git a/docs/docs-developers/docs/aztec-js/how_to_create_account.md b/docs/docs-developers/docs/aztec-js/how_to_create_account.md index 5f9fcfe0a43e..318f4dacaa8c 100644 --- a/docs/docs-developers/docs/aztec-js/how_to_create_account.md +++ b/docs/docs-developers/docs/aztec-js/how_to_create_account.md @@ -20,19 +20,39 @@ yarn add @aztec/aztec.js@#include_version_without_prefix @aztec/wallets@#include ## Create a new account -Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secret and salt: +Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secret, salt, and signing key: #include_code create_account /docs/examples/ts/aztecjs_connection/index.ts typescript -The secret is used to derive the account's encryption keys, and the salt ensures address uniqueness. The signing key is automatically derived from the secret. +The secret derives the account's encryption keys, the signing key authenticates its transactions, and the salt ensures address uniqueness. The signing key is provided independently and is not derived from the secret: it is an ownership key, so keep it separate from the encryption secret that your PXE holds. -:::warning Store your secret and salt -Save the `secret` and `salt` values securely. You need both to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds. +:::warning Store your secret, salt, and signing key +Save the `secret`, `salt`, and `signingKey` values securely. You need all three to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds. ::: +## Create an initializerless account + +Alternatively, create an [initializerless account](../foundational-topics/accounts/deployment.md), which needs no deployment transaction at all: + +```typescript +const secret = Fr.random(); +const salt = Fr.random(); +const account = await wallet.createSchnorrInitializerlessAccount(secret, salt); +console.log("Account address:", account.address.toString()); +``` + +An initializerless account commits its signing public key into the address itself (through the instance's `immutables_hash`), so there is no onchain state to initialize. Creating the account registers it locally in the PXE, and it is ready to use immediately: skip the deployment section below entirely. Fees are only needed for the account's first real transaction, paid with any of the usual [payment methods](./how_to_pay_fees.md). + +Two things to keep in mind: + +- The signing key cannot be changed later. A new key means a new address. +- Calling `getDeployMethod()` on an initializerless account throws, since there is nothing to deploy. + +See [account deployment](../foundational-topics/accounts/deployment.md) for how this works and how to choose between the two account types. + ## Deploy the account -New accounts must be deployed before they can send transactions. Deployment requires paying fees. +Accounts created with `createSchnorrAccount` must be deployed before they can send transactions (initializerless accounts skip this step). Deployment requires paying fees. ### Using the Sponsored FPC @@ -70,5 +90,5 @@ Confirm the account was deployed successfully. Substitute the account variable f - [Deploy contracts](./how_to_deploy_contract.md) with your new account - [Send transactions](./how_to_send_transaction.md) from an account -- Learn about [account abstraction](../foundational-topics/accounts/index.md) +- Learn about [account abstraction](../foundational-topics/accounts/index.md) and [account deployment](../foundational-topics/accounts/deployment.md) - Implement [authentication witnesses](./how_to_use_authwit.md) diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_prove_history.md b/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_prove_history.md index 2eb7ed4f23bd..cb33b3013000 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_prove_history.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/advanced/how_to_prove_history.md @@ -56,16 +56,18 @@ Prove a note exists in the note hash tree: To prove a note was valid (existed AND wasn't nullified) at a historical block: ```rust -use aztec::history::note::assert_note_was_valid_by; +use aztec::history::note::assert_local_note_was_valid_by; let header = self.context.get_anchor_block_header(); -assert_note_was_valid_by(header, hinted_note, &mut self.context); +assert_local_note_was_valid_by(header, hinted_note, &mut self.context); ``` This verifies both: 1. The note was included in the note hash tree 2. The note's nullifier was not in the nullifier tree +The `assert_local_note_was_*` helpers only work for the executing contract's own notes: this is because it is not possible for a contract to retrieve the app-siloed nullifier hiding secret key that corresponds to another contract. To prove facts about another contract's notes, use `assert_note_existed_by`, which supports notes of any contract (see [Prove note inclusion](#prove-note-inclusion)). + ## Prove at a specific historical block To prove against state at a specific past block (not just the anchor block): @@ -83,13 +85,13 @@ Using `get_block_header_at` adds ~3k constraints to prove Archive tree membershi ## Prove a note was nullified -To prove a note has been spent/nullified: +To prove a note has been nullified: ```rust -use aztec::history::note::assert_note_was_nullified_by; +use aztec::history::note::assert_local_note_was_nullified_by; let header = self.context.get_anchor_block_header(); -assert_note_was_nullified_by(header, confirmed_note, &mut self.context); +assert_local_note_was_nullified_by(header, confirmed_note, &mut self.context); ``` ## Prove contract bytecode was published @@ -137,10 +139,17 @@ The `aztec::history` module provides these functions: | Function | Module | Purpose | |----------|--------|---------| +<<<<<<< HEAD | `assert_note_existed_by` | `history::note` | Prove note exists in note hash tree | | `assert_note_was_valid_by` | `history::note` | Prove note exists and is not nullified | | `assert_note_was_nullified_by` | `history::note` | Prove note's nullifier is in nullifier tree | | `assert_note_was_not_nullified_by` | `history::note` | Prove note's nullifier is not in nullifier tree | +======= +| `assert_note_existed_by` | `history::note` | Prove note exists in note hash tree (any contract) | +| `assert_local_note_was_valid_by` | `history::note` | Prove own note exists and is not nullified | +| `assert_local_note_was_nullified_by` | `history::note` | Prove own note's nullifier is in nullifier tree | +| `assert_local_note_was_not_nullified_by` | `history::note` | Prove own note's nullifier is not in nullifier tree | +>>>>>>> origin/v5-next | `assert_nullifier_existed_by` | `history::nullifier` | Prove a siloed nullifier exists | | `assert_nullifier_did_not_exist_by` | `history::nullifier` | Prove a siloed nullifier does not exist | | `assert_contract_bytecode_was_published_by` | `history::deployment` | Prove a contract's bytecode was published | diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/immutables.md b/docs/docs-developers/docs/aztec-nr/framework-description/immutables.md index 0e93cfda9fbe..629d66a9c3c0 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/immutables.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/immutables.md @@ -31,3 +31,5 @@ Initialization cost is completely eliminated (no constructor transaction). The p ## Getting started For installation instructions, usage examples, and a reference implementation of an initializerless Schnorr account contract, see the [aztec-immutables-macro README](https://github.com/defi-wonderland/aztec-immutables-macro/tree/dev). + +The protocol ships a built-in account contract using the same pattern: see [account deployment](../../foundational-topics/accounts/deployment.md) for how initializerless accounts work and [creating accounts](../../aztec-js/how_to_create_account.md#create-an-initializerless-account) for using them from Aztec.js. diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/offchain_message_delivery.md b/docs/docs-developers/docs/aztec-nr/framework-description/offchain_message_delivery.md index 005ba3824d43..91fe4e0edaaa 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/offchain_message_delivery.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/offchain_message_delivery.md @@ -29,7 +29,11 @@ Choose offchain delivery by passing `MessageDelivery::offchain()` to `.deliver() Nothing else changes in the contract: the same notes and events are created, only their delivery mechanism differs. +<<<<<<< HEAD Under the hood, `MessageDelivery::offchain()` encrypts the message without constraints and emits it via the [`deliver_offchain_message`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/offchain_messages/fn.deliver_offchain_message) function. See the [`MessageDelivery`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/struct.MessageDelivery) API reference for details on guarantees, costs, and privacy. +======= +Under the hood, `MessageDelivery::offchain()` encrypts the message without constraints and emits it via the [`deliver_offchain_message`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/offchain_messages/fn.deliver_offchain_message) function. See the [`MessageDelivery`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/struct.MessageDelivery) API reference for details on guarantees, costs, and privacy. +>>>>>>> origin/v5-next ## Extracting messages on the sender side @@ -115,4 +119,8 @@ The TXE test environment buffers offchain messages emitted during calls and expo - Compare delivery modes and their guarantees in [Note delivery](./note_delivery.md) - Learn how onchain-delivered notes are found in [Note discovery](../../foundational-topics/advanced/storage/note_discovery.md) +<<<<<<< HEAD - Browse the [`MessageDelivery`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/struct.MessageDelivery) API reference +======= +- Browse the [`MessageDelivery`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/struct.MessageDelivery) API reference +>>>>>>> origin/v5-next diff --git a/docs/docs-developers/docs/aztec-nr/framework-description/state_variables.md b/docs/docs-developers/docs/aztec-nr/framework-description/state_variables.md index aa045c3ef16e..7eb61b6cd827 100644 --- a/docs/docs-developers/docs/aztec-nr/framework-description/state_variables.md +++ b/docs/docs-developers/docs/aztec-nr/framework-description/state_variables.md @@ -273,9 +273,15 @@ When working with private state variables, many operations return a `NoteMessage #### Delivery Methods Private notes need to be communicated to their recipients so they know the note exists and can use it. The [`NoteMessage`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/note/struct.NoteMessage) wrapper forces you to make an explicit choice about how this happens: +<<<<<<< HEAD - [`MessageDelivery::onchain_constrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/struct.MessageDelivery): Verified in the circuit (most secure, but highest cost) - Use when the sender cannot be trusted to deliver correctly (e.g., protocol fees, multisig config updates). - [`MessageDelivery::onchain_unconstrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/struct.MessageDelivery): Message stored onchain but no guarantees on content - Use when the sender is incentivized to deliver correctly but may not have an offchain channel to the recipient. - [`MessageDelivery::offchain()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/struct.MessageDelivery): Lowest cost, no onchain data - Use when the sender and recipient can communicate and the sender is incentivized to deliver correctly. +======= + - [`MessageDelivery::onchain_constrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/global.MessageDelivery): Verified in the circuit (most secure, but highest cost) - Use when the sender cannot be trusted to deliver correctly (e.g., protocol fees, multisig config updates). + - [`MessageDelivery::onchain_unconstrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/global.MessageDelivery): Message stored onchain but no guarantees on content - Use when the sender is incentivized to deliver correctly but may not have an offchain channel to the recipient. + - [`MessageDelivery::offchain()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/delivery/global.MessageDelivery): Lowest cost, no onchain data - Use when the sender and recipient can communicate and the sender is incentivized to deliver correctly. +>>>>>>> origin/v5-next #include_code note_delivery /noir-projects/noir-contracts/contracts/app/private_token_contract/src/main.nr rust diff --git a/docs/docs-developers/docs/cli/aztec_cli_reference.md b/docs/docs-developers/docs/cli/aztec_cli_reference.md index 17252aeea77f..2fedc44e269b 100644 --- a/docs/docs-developers/docs/cli/aztec_cli_reference.md +++ b/docs/docs-developers/docs/cli/aztec_cli_reference.md @@ -937,6 +937,7 @@ aztec setup-protocol-contracts [options] ### aztec start +<<<<<<< HEAD **MISC** - `--network ` @@ -1943,6 +1944,48 @@ aztec setup-protocol-contracts [options] *Environment: `$TRANSACTIONS_DISABLED`* - `--p2p.txPoolDeleteTxsAfterReorg ` +======= +Starts Aztec infrastructure components. Module flags can be combined to run several components in a single process (e.g. `--node --sequencer`). + +**Usage:** + +```bash +aztec start [options] +``` + +**Examples:** + +```bash +# Start a complete local development network +aztec start --local-network + +# Start a full node +aztec start --node + +# Start a sequencer node +aztec start --node --sequencer +``` + +**Common options:** + +- `--network ` - Network to run Aztec on (env: NETWORK) +- `--port ` - Port to run the Aztec Services on (default: 8080, env: AZTEC_PORT) +- `--admin-port ` - Port to run admin APIs of Aztec Services on (default: 8880, env: AZTEC_ADMIN_PORT) + +**Module flags:** + +- `--local-network` - Starts the Aztec Local Network: a local Ethereum dev node (Anvil) with the full Aztec protocol deployed on top +- `--node` - Starts an Aztec Node +- `--sequencer` - Starts an Aztec Sequencer +- `--prover-node` - Starts an Aztec Prover Node +- `--prover-broker` - Starts an Aztec proving job broker +- `--prover-agent` - Starts an Aztec Prover Agent +- `--p2p-bootstrap` - Starts an Aztec P2P bootstrap node +- `--bot` - Starts an Aztec transaction bot +- `--txe` - Starts an Aztec TXE (test execution environment) + +Each module accepts further namespaced options (e.g. `--sequencer.coinbase`, `--local-network.testAccounts`). For the full per-module option list, see the [node operator CLI reference](/operate/operators/reference/cli-reference). +>>>>>>> origin/v5-next ### aztec test diff --git a/docs/docs-developers/docs/cli/aztec_wallet_cli_reference.md b/docs/docs-developers/docs/cli/aztec_wallet_cli_reference.md index 66fe6f7ea839..4b2e9fba2268 100644 --- a/docs/docs-developers/docs/cli/aztec_wallet_cli_reference.md +++ b/docs/docs-developers/docs/cli/aztec_wallet_cli_reference.md @@ -67,9 +67,13 @@ aztec-wallet [options] [command] **Options:** - `-V --version` - output the version number +<<<<<<< HEAD - `-d --data-dir ` - Storage directory for wallet data (default: "/home/aztec-dev/.aztec/wallet") +======= +- `-d --data-dir ` - Storage directory for wallet data (default: "~/.aztec/wallet") +>>>>>>> origin/v5-next - `-p --prover ` - The type of prover the wallet uses (choices: "wasm", "native", "none", default: "native", env: PXE_PROVER) -- `-n --node-url ` - URL of the Aztec node to connect to (default: "http://host.docker.internal:8080", env: AZTEC_NODE_URL) +- `-n --node-url ` - URL of the Aztec node to connect to (default: "http://localhost:8080", env: AZTEC_NODE_URL) - `-h --help` - display help for command ### Subcommands diff --git a/docs/docs-developers/docs/foundational-topics/accounts/deployment.md b/docs/docs-developers/docs/foundational-topics/accounts/deployment.md new file mode 100644 index 000000000000..d189520dfa81 --- /dev/null +++ b/docs/docs-developers/docs/foundational-topics/accounts/deployment.md @@ -0,0 +1,61 @@ +--- +title: Account Deployment +tags: [accounts] +description: How Aztec accounts come into existence, from the standard initializer plus deployment flow to initializerless accounts that need no onchain transaction at all. +references: + [ + "noir-projects/noir-contracts/contracts/account/schnorr_initializerless_account_contract/src/main.nr", + "noir-projects/noir-contracts/contracts/account/schnorr_account_contract/src/main.nr", + ] +--- + +## How accounts come into existence + +Every account in Aztec is a [contract instance](../contract_creation.md), and its address is computed deterministically from its instantiation parameters. There are two ways to make an account usable: + +1. **The standard flow**: create the account locally, then send a deployment transaction that runs its initializer. +2. **The initializerless flow**: create the account locally, and that is it. No deployment transaction is ever sent. + +This page explains both flows and when to choose each. + +## The standard flow: initialize and deploy + +A regular account contract (for example the default Schnorr account) stores its signing public key in private state. Writing that state requires running the contract's constructor, a [private initializer function](../../aztec-nr/framework-description/functions/attributes.md#initializer-functions-initializer), which in turn requires sending a transaction to the network and paying [fees](../fees.md) for it. + +The address commits to that pending initialization: the constructor call's selector and arguments are hashed into the instance's `initialization_hash`, which is folded into the address derivation. This is why the address can be computed, shared, and even receive funds before the deployment transaction is sent, and why the account only becomes able to send transactions after it. + +## Initializerless accounts + +An initializerless account removes the deployment transaction entirely. Instead of storing the signing key in private state through an initializer, the key is committed directly into the address: the instance's `immutables_hash` field is set to the hash of the signing public key, and `immutables_hash` participates in address derivation just like `initialization_hash` does. + +Since the address itself is the commitment to the signing key, there is no onchain state to create: + +- The account contract has no initializer. Its `constructor` is an unconstrained utility function that runs only in the PXE: it checks that the provided public key hashes to the instance's `immutables_hash` and stores the key in the PXE's local store. +- When the account later authorizes a transaction, its entrypoint loads the key from the local store and proves in the private kernel that the key's hash matches the `immutables_hash` committed in the address. Tampering with the local key is not possible without changing the address. + +Creating an initializerless account is therefore a purely local operation: the wallet computes the address, registers the contract instance in the PXE, and runs the utility constructor through a simulation. No transaction is sent, no fee is paid, and the account can start transacting as soon as it has a way to pay for its first real transaction (for example a [Sponsored FPC](../fees.md#payment-methods) or a Fee Juice balance at its address). + +The genesis-funded test accounts in the local network are initializerless Schnorr accounts: their addresses receive Fee Juice at genesis, and wallets materialize them locally without any deployment. + +## Trade-offs + +Initializerless accounts are a good default when the account's authorization logic only depends on parameters that never change: + +- **No deployment cost or delay.** The account is usable the moment it is created, which makes onboarding flows and receive-only addresses cheap. +- **The signing key is fixed forever.** The key is baked into the address, so there is no way to rotate it. A new key means a new address. The default Schnorr account offers no key rotation either, but account contracts that keep keys in state can be designed to support it. +- **Local setup is still required per PXE.** A fresh PXE does not know about the account until the wallet registers the instance and runs the utility constructor again. This is a purely offline step with no fee, but it must happen in every new environment before the account can be used. +- **There is no deployment method.** Calling `getDeployMethod()` on an initializerless account throws, since there is nothing to deploy. + +Use the standard flow when the account contract needs an initializer: for example when it takes arbitrary constructor arguments or stores its authorization material in private notes. + +## Using initializerless accounts + +- In Aztec.js, call `createSchnorrInitializerlessAccount(secret, salt)` on your wallet. See [creating accounts](../../aztec-js/how_to_create_account.md#create-an-initializerless-account). +- In the CLI, pass the account type: `aztec-wallet create-account -t schnorr_initializerless`. The command registers the account locally and returns immediately, with no deployment transaction. +- In Aztec.nr, the same address-immutables pattern can be applied to your own contracts. See [immutables](../../aztec-nr/framework-description/immutables.md). + +## Next steps + +- [Create an account in Aztec.js](../../aztec-js/how_to_create_account.md) +- [Understand fees and payment methods](../fees.md) +- [Contract creation and address derivation](../contract_creation.md) diff --git a/docs/docs-developers/docs/foundational-topics/contract_creation.md b/docs/docs-developers/docs/foundational-topics/contract_creation.md index 899ece79d9cd..a8bfa6801bdf 100644 --- a/docs/docs-developers/docs/foundational-topics/contract_creation.md +++ b/docs/docs-developers/docs/foundational-topics/contract_creation.md @@ -55,7 +55,7 @@ A contract instance includes: - `deployer`: Optional address of the contract deployer. Zero for universal deployment - `original_contract_class_id`: Identifier of the contract class the instance was deployed with. Updating the instance to a new class via the ContractInstanceRegistry does not change this value, since it is part of the address preimage - `initialization_hash`: Hash of the selector and arguments to the constructor -- `immutables_hash`: Hash of the contract's compile-time immutable state +- `immutables_hash`: Hash of the contract's compile-time immutable state. [Initializerless accounts](./accounts/deployment.md) use it to commit the signing key into the address - `public_keys`: Public keys participating in address derivation (nullifier, incoming viewing, outgoing viewing, tagging, message-signing, and fallback keys). Only the incoming viewing key is held as an elliptic curve point; the other five are held as their `hash_public_key` digests. ### Instance Address diff --git a/docs/docs-developers/docs/foundational-topics/fees.md b/docs/docs-developers/docs/foundational-topics/fees.md index 8ff84586cdbc..adfbcaf88c81 100644 --- a/docs/docs-developers/docs/foundational-topics/fees.md +++ b/docs/docs-developers/docs/foundational-topics/fees.md @@ -103,7 +103,7 @@ In `aztec.js`, the `L1FeeJuicePortalManager` class handles the L1 side (token ap ### Payment methods -An account with Fee Juice can pay for its transactions directly. A new account can even pay for its own deployment transaction, provided Fee Juice was bridged to its address before deployment. +An account with Fee Juice can pay for its transactions directly. A new account can even pay for its own deployment transaction, provided Fee Juice was bridged to its address before deployment. [Initializerless accounts](./accounts/deployment.md) skip the deployment transaction entirely, so they only need fees once they send their first real transaction. Alternatively, accounts can use [fee-paying contracts (FPCs)](../aztec-js/how_to_pay_fees.md#use-fee-payment-contracts) to pay for transactions. An FPC holds its own Fee Juice balance to pay the protocol, and can accept other tokens from users in exchange. diff --git a/docs/docs-developers/docs/foundational-topics/pxe/execution_hooks.md b/docs/docs-developers/docs/foundational-topics/pxe/execution_hooks.md index 7d9fbfa86d59..2636a072f9ab 100644 --- a/docs/docs-developers/docs/foundational-topics/pxe/execution_hooks.md +++ b/docs/docs-developers/docs/foundational-topics/pxe/execution_hooks.md @@ -82,6 +82,7 @@ For an unconstrained self-send (the recipient is one of the wallet's own account ### In Noir tests +<<<<<<< HEAD When testing in Noir, leaving the strategy unset makes `TestEnvironment` fall back to the bare PXE default. Set a strategy when creating the environment to exercise a specific one; it affects message delivery in private executions: ```rust @@ -90,6 +91,25 @@ let env = TestEnvironment::new_opts( ); ``` +======= +When testing in Noir, leaving the strategy unset makes `TestEnvironment` fall back to the bare PXE default. Set a strategy +when creating the environment to exercise a specific one; it affects message delivery in private executions that use the +default wallet strategy hook. Use `with_default_tag_secret_strategy` to configure the strategy for a specific delivery +mode: + +```rust +let env = TestEnvironment::new_opts( + TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_unconstrained(), + TaggingSecretStrategy::non_interactive_handshake(), + ), +); +``` + +Use `with_default_tag_secret_strategy_all_modes` only when the same strategy should apply to both constrained and +unconstrained delivery. Contract-fixed delivery derivations bypass this default strategy. + +>>>>>>> origin/v5-next ### In production Pass a `resolveTaggingSecretStrategy` hook when [creating the PXE](#configuring-hooks). It receives a `TaggingSecretStrategyRequest` with the executing contract's address and the message's sender, recipient, and delivery mode (`'constrained'` or `'unconstrained'`), so a wallet can apply per-application or per-recipient policies, or surface the decision to the user, instead of returning a fixed value. diff --git a/docs/docs-developers/docs/foundational-topics/wallets.md b/docs/docs-developers/docs/foundational-topics/wallets.md index 895570670b5c..c299f7405c2b 100644 --- a/docs/docs-developers/docs/foundational-topics/wallets.md +++ b/docs/docs-developers/docs/foundational-topics/wallets.md @@ -21,6 +21,8 @@ A wallet must support at least one specific account contract implementation, whi Note that users must be able to receive funds in Aztec before deploying their account. A wallet should let a user generate a [deterministic complete address](./accounts/keys.md#address-derivation) without having to interact with the network, so they can share it with others to receive funds. This requires that the wallet pins a specific contract implementation, its initialization arguments, a deployment salt, and the user's keys. These values yield a deterministic address, so when the account contract is actually deployed, it is available at the precalculated address. Once the account contract is deployed, the user can start sending transactions using it as the transaction origin. +Some account contracts avoid deployment altogether: [initializerless accounts](./accounts/deployment.md) commit their signing key into the address itself, so the wallet only needs to register them locally before they can start transacting. + ## Transaction lifecycle Every transaction in Aztec is broadcast to the network as a zero-knowledge proof of correct execution, in order to preserve privacy. This means that transaction proofs are generated on the wallet and not on a remote node. This is one of the biggest differences with regard to EVM chain wallets. diff --git a/docs/docs-developers/docs/resources/migration_notes.md b/docs/docs-developers/docs/resources/migration_notes.md index dbb29701e344..5be1398a8b58 100644 --- a/docs/docs-developers/docs/resources/migration_notes.md +++ b/docs/docs-developers/docs/resources/migration_notes.md @@ -9,7 +9,28 @@ Aztec is in active development. Each version may introduce breaking changes that ## TBD +<<<<<<< HEAD +<<<<<<< HEAD ## 5.0.1 +======= +======= +### [Aztec.nr] Canonical HandshakeRegistry re-pinned at a new address + +The canonical `HandshakeRegistry` has been re-pinned so that it includes the owner's address in its `PrivateMutable` initialization nullifiers, keeping the handshake state of accounts that share keys independent. The registry moves to a new address. Handshakes established with the previous registry instance are not visible to the new one and must be re-established. The other standard contracts keep their addresses. + +>>>>>>> origin/v5-next +### [Aztec.nr] Note property selectors are typed and use packed-layout indices + +The selectors in the generated `properties()` used the field's position in the note struct declaration, which pointed at the wrong packed field for any note with an earlier field packing to more than one `Field` (a `Point`, an array, a nested struct). Selector indices are now the field's offset in the note's packed representation, so `select`/`sort` criteria constrain the field they name. + +Breaking changes: + +- `PropertySelector` carries the selected property's type. Hand-constructed literals need a type annotation, e.g. `let selector: PropertySelector = PropertySelector { index: 0, offset: 0, length: 32 };`. +- `select`/`sort` reject properties that pack to more than one `Field` at compile time. +- `select` takes its value typed as the property's type. Cast the value if a mixed-type comparison was intentional. +- `properties()` cannot be used with a custom `Packable` layout. Define property selectors manually for such notes. +- Every note field type must implement `Packable`, even when the note's own `Packable` is hand-written. +>>>>>>> origin/v5-next ### [Aztec.nr] History note nullification helpers renamed and restricted to own-contract notes @@ -46,6 +67,7 @@ await deleteStore(names[0]); This change also removes `createStore` from `@aztec/kv-store/sqlite-opfs` and `@aztec/kv-store/deprecated/indexeddb`: stores are now opened by name with `AztecSQLiteOPFSStore.open` / `AztecIndexedDBStore.open`. +<<<<<<< HEAD ## 5.0.0 ### [PXE] Local PXE database is reset on upgrade @@ -54,6 +76,8 @@ The persisted tagging stores now key every entry by the self-describing `: **Impact**: On upgrade your local PXE state is reset. You must re-register accounts and re-sync from genesis. Wallets should surface a "your local state was reset, please re-register accounts and re-sync" path. +======= +>>>>>>> origin/v5-next ### [Aztec.nr] `TestEnvironmentOptions::with_tagging_secret_strategy` replaced `TestEnvironmentOptions::with_tagging_secret_strategy` is now `with_default_tag_secret_strategy_all_modes` for tests @@ -170,8 +194,11 @@ Registering classes and instances are now separate, unvalidated operations. `reg The new class is used automatically once the upgrade takes effect on chain; no further PXE action is needed. Registering it beforehand is harmless: until the update activates, the node still resolves the contract's current class to the previous one, so it keeps running its old code. - `pxe.getContractInstance(address)` and `wallet.getContractMetadata(address).instance` now return the contract's **address preimage**, which no longer includes `currentContractClassId`. +<<<<<<< HEAD +======= +>>>>>>> origin/v5-next ### [Aztec.js] `AccountWithSecretKey` removed, read account keys from the `AccountManager` or PXE `AccountWithSecretKey` was a thin wrapper that bundled an account's transaction signer with its master secret key, used mainly to print or export the secret. It has been removed, and `AccountManager.getAccount()` now returns the plain `Account` signer. The wrapper's extra methods are no longer available on that value: @@ -1481,6 +1508,22 @@ The empire slashing model has been removed. Only the tally-based slashing model `slashMinPenaltyPercentage` and `slashMaxPenaltyPercentage` removed from `SlasherConfig`. +### [Aztec Node] `getTxByHash`, `getTxsByHash` and `getPendingTxs` no longer return tx proofs by default + +`AztecNode.getTxByHash`, `AztecNode.getTxsByHash` and `AztecNode.getPendingTxs` (also exposed on the P2P API) now take an optional `GetTxByHashOptions` argument with an `includeProof` flag. The proof is stripped from returned txs unless `includeProof: true` is passed, cutting roughly 35-52KB per tx over the wire. + +**Migration:** + +```diff +- const tx = await node.getTxByHash(txHash); ++ const tx = await node.getTxByHash(txHash, { includeProof: true }); + +- const txs = await node.getPendingTxs(limit, after); ++ const txs = await node.getPendingTxs(limit, after, { includeProof: true }); +``` + +**Impact**: Callers that read the proof off returned txs (eg to re-broadcast or validate them) must now pass `{ includeProof: true }` explicitly; by default the returned txs carry an empty proof. + ### [Aztec Node] `getTxByHash`, `getTxsByHash` and `getPendingTxs` no longer return tx proofs by default `AztecNode.getTxByHash`, `AztecNode.getTxsByHash` and `AztecNode.getPendingTxs` (also exposed on the P2P API) now take an optional `GetTxByHashOptions` argument with an `includeProof` flag. The proof is stripped from returned txs unless `includeProof: true` is passed, cutting roughly 35-52KB per tx over the wire. diff --git a/docs/docs-developers/docs/tutorials/js_tutorials/wallet-extension/04-accounts.md b/docs/docs-developers/docs/tutorials/js_tutorials/wallet-extension/04-accounts.md index 9bf49abb8755..07000a5f7448 100644 --- a/docs/docs-developers/docs/tutorials/js_tutorials/wallet-extension/04-accounts.md +++ b/docs/docs-developers/docs/tutorials/js_tutorials/wallet-extension/04-accounts.md @@ -24,28 +24,31 @@ An Aztec account has: ## Key Derivation -The wallet uses the standard derivation from `@aztec/stdlib/keys`: +The wallet generates a random signing key as the account's root and derives the privacy secret from it: ```typescript -import { deriveSigningKey } from '@aztec/stdlib/keys'; +import { GrumpkinScalar } from '@aztec/aztec.js/fields'; +import { deriveSecretKeyFromSigningKey } from '@aztec/accounts/utils'; -// Generate a random secret -const secret = Fr.random(); - -// Derive the signing key -const signingKey = deriveSigningKey(secret); +// The signing key is the account's root; the privacy secret is derived from it +const signingKey = GrumpkinScalar.random(); +const secret = await deriveSecretKeyFromSigningKey(signingKey); ``` -The derivation uses SHA-512 with domain separators to derive different keys: +The nullifier, viewing, and tagging keys are then derived from that secret with SHA-512 and domain separators, while the signing key is supplied to the account contract directly: ```typescript // From stdlib/src/keys/derivation.ts -export function deriveSigningKey(secretKey: Fr): GrumpkinScalar { - return sha512ToGrumpkinScalar([secretKey, GeneratorIndex.IVSK_M]); +export function deriveMasterIncomingViewingSecretKey(secretKey: Fr): GrumpkinScalar { + return sha512ToGrumpkinScalar([secretKey, DomainSeparator.IVSK_M]); } export function deriveMasterNullifierHidingSecretKey(secretKey: Fr): GrumpkinScalar { +<<<<<<< HEAD return sha512ToGrumpkinScalar([secretKey, GeneratorIndex.NHK_M]); +======= + return sha512ToGrumpkinScalar([secretKey, DomainSeparator.NHK_M]); +>>>>>>> origin/v5-next } ``` diff --git a/docs/docs-developers/getting_started_on_testnet.md b/docs/docs-developers/getting_started_on_testnet.md index 42ad97002b25..95c0380919cb 100644 --- a/docs/docs-developers/getting_started_on_testnet.md +++ b/docs/docs-developers/getting_started_on_testnet.md @@ -52,7 +52,11 @@ Set the required environment variables: ```bash export NODE_URL=https://v5.testnet.rpc.aztec-labs.com +<<<<<<< HEAD export SPONSORED_FPC_ADDRESS=0x1441491b59934ec64f8c98f17c91f23c01ca2a45dbb35caf123146ec76f9970c +======= +export SPONSORED_FPC_ADDRESS=0x261366b3c0a9b4c30864629556cf282be409e6822b1f3a065fcb7e34f36d7880 +>>>>>>> origin/v5-next ``` ### Step 2: Register the Sponsored FPC diff --git a/docs/docs-operate/operators/reference/cli-reference.md b/docs/docs-operate/operators/reference/cli-reference.md index 8960d65dbd0e..5f048e361e42 100644 --- a/docs/docs-operate/operators/reference/cli-reference.md +++ b/docs/docs-operate/operators/reference/cli-reference.md @@ -35,7 +35,11 @@ tags: --network ($NETWORK) Network to run Aztec on +<<<<<<< HEAD --enable-auto-shutdown ($ENABLE_AUTO_SHUTDOWN) +======= + --enable-auto-shutdown (default: false) ($ENABLE_AUTO_SHUTDOWN) +>>>>>>> origin/v5-next Soft-shutdown the node when the canonical rollup is no longer compatible (protocol constants diverge), keeping the health server up so K8s probes keep passing. Only applies to nodes following the canonical rollup. --sync-mode (default: snapshot) ($SYNC_MODE) diff --git a/docs/docs-operate/operators/reference/node-api-reference.md b/docs/docs-operate/operators/reference/node-api-reference.md index 084abb36b32b..38a81d1693d0 100644 --- a/docs/docs-operate/operators/reference/node-api-reference.md +++ b/docs/docs-operate/operators/reference/node-api-reference.md @@ -796,7 +796,11 @@ Defaults to 'latest'. ```bash curl -X POST http://localhost:8080 \ -H 'Content-Type: application/json' \ +<<<<<<< HEAD -d '{"jsonrpc":"2.0","method":"aztec_getContract","params":["0x1234...","latest"],"id":1}' +======= + -d '{"jsonrpc":"2.0","method":"aztec_getContract","params":["0x1234..."],"id":1}' +>>>>>>> origin/v5-next ``` ## Fee queries @@ -1020,6 +1024,8 @@ Returns stats for a single validator if enabled. curl -X POST http://localhost:8080 \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"aztec_getValidatorStats","params":["0x1234...","100","100"],"id":1}' +<<<<<<< HEAD +======= ``` ## P2P queries @@ -1076,6 +1082,72 @@ Only available when P2P is enabled. **Example**: +```bash +curl -X POST http://localhost:8080 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","method":"aztec_getProposalsForSlot","params":["100"],"id":1}' +>>>>>>> origin/v5-next +``` + +## P2P queries + +<<<<<<< HEAD +### aztec_getPeers +======= +### aztec_registerContractFunctionSignatures +>>>>>>> origin/v5-next + +Returns info for all connected, dialing, and cached peers. Only available when P2P is enabled. + +**Parameters**: + +1. `includePending` - `boolean | undefined` - If true, also include peers in the pending state. + +**Returns**: `PeerInfo[]` + +**Example**: + +```bash +curl -X POST http://localhost:8080 \ + -H 'Content-Type: application/json' \ +<<<<<<< HEAD + -d '{"jsonrpc":"2.0","method":"aztec_getPeers","params":[true],"id":1}' +``` + +### aztec_getCheckpointAttestationsForSlot + +Queries the attestation pool for checkpoint attestations for the given slot. + +**Parameters**: + +1. `slot` - `SlotNumber` - The slot to query. +2. `proposalPayloadHash` - `string | undefined` - Hex-encoded keccak256 of the target proposal's signed payload hash. +When provided, only attestations whose payload hash matches are returned. +When omitted, all attestations for the slot are returned. + +**Returns**: `CheckpointAttestation[]` + +**Example**: + +```bash +curl -X POST http://localhost:8080 \ + -H 'Content-Type: application/json' \ + -d '{"jsonrpc":"2.0","method":"aztec_getCheckpointAttestationsForSlot","params":["100","0x1234..."],"id":1}' +``` + +### aztec_getProposalsForSlot + +Returns block and checkpoint proposals retained in the attestation pool for the given slot. +Only available when P2P is enabled. + +**Parameters**: + +1. `slot` - `SlotNumber` + +**Returns**: `ProposalsForSlot` + +**Example**: + ```bash curl -X POST http://localhost:8080 \ -H 'Content-Type: application/json' \ @@ -1084,6 +1156,11 @@ curl -X POST http://localhost:8080 \ ## Debug operations +======= + -d '{"jsonrpc":"2.0","method":"aztec_registerContractFunctionSignatures","params":[["0x1234..."]],"id":1}' +``` + +>>>>>>> origin/v5-next ### aztec_getAllowedPublicSetup Returns the list of allowed public setup elements configured for this node. diff --git a/docs/docs-operate/operators/sequencer-management/slashing-configuration.md b/docs/docs-operate/operators/sequencer-management/slashing-configuration.md index b7b3f2deea3b..908ec56d2ae5 100644 --- a/docs/docs-operate/operators/sequencer-management/slashing-configuration.md +++ b/docs/docs-operate/operators/sequencer-management/slashing-configuration.md @@ -44,15 +44,28 @@ Round N: Proposers vote on offenses from Round N-2 **Key parameters**: - **Round Size**: 128 L2 slots (approximately 2.6 hours at 72 seconds per slot) - **Slashing Offset**: 2 rounds (proposers in round N vote on offenses from round N-2) +<<<<<<< HEAD - **Execution Delay**: 28 rounds (~3 days) - **Grace Period**: First 8,400 slots after the rollup becomes canonical (~7 days; configurable per node via `SLASH_GRACE_PERIOD_L2_SLOTS`) +======= +- **Execution Delay**: 2 rounds on the v5 testnet (~5 hours; mainnet uses 28 rounds, ~3 days) +<<<<<<< HEAD +- **Grace Period**: First 64 slots after the rollup becomes canonical on the v5 testnet (~1.3 hours; mainnet uses 1,200 slots, ~1 day); configurable per node via `SLASH_GRACE_PERIOD_L2_SLOTS` +>>>>>>> origin/v5-next +======= +- **Grace Period**: First 64 slots after the rollup becomes canonical on the v5 testnet (~1.3 hours; mainnet uses 8,400 slots, ~7 days); configurable per node via `SLASH_GRACE_PERIOD_L2_SLOTS` +>>>>>>> origin/v5-next ### Slashing Amounts The L1 contract defines three fixed slashing tiers that can be configured for different offenses. These amounts are set on L1 deployment and can only be changed via governance. :::info Network Configuration +<<<<<<< HEAD On mainnet, **offenses are currently configured to slash 2,000 tokens for small offenses and 5,000 tokens for medium and large offenses (1% and 2.5% of the Activation Threshold - the minimum stake required to join the validator set)**. A validator is ejected when a slash would drop its stake below the rollup's local ejection threshold (190,000 tokens on mainnet, 95% of the Activation Threshold). A validator that joined at exactly the 200,000 token Activation Threshold is therefore ejected by the first slash that would push its total slashed amount above 10,000 tokens (5% of its stake). See [Ejection from the validator set](#ejection-from-the-validator-set) for details. +======= +On the v5 testnet, slashing uses the AZIP-16 full-stake preset: **100,000 tokens for small offenses and 250,000 tokens for medium and large offenses**, against a 200,000 token Activation Threshold (the minimum stake required to join the validator set). The medium and large amount exceeds the stake, so those offenses slash the validator's entire stake. A validator is ejected when a slash would drop its stake below the rollup's local ejection threshold (199,000 tokens on testnet). Because even the smallest slash (100,000 tokens) drops a validator that joined at the Activation Threshold below that line, a single offense of any tier ejects the validator. (Mainnet uses smaller amounts, 2,000 and 5,000 tokens, with a 190,000 token local ejection threshold.) See [Ejection from the validator set](#ejection-from-the-validator-set) for details. +>>>>>>> origin/v5-next ::: ## Slashable offenses @@ -248,7 +261,11 @@ When slashing rounds become executable (after the execution delay): The slashing vetoer is an independent security group that can pause slashing to protect validators from unfair slashing due to software bugs. +<<<<<<< HEAD **Execution Delay**: All slashing proposals have a ~3 day execution delay (28 rounds on mainnet) during which the vetoer can review and potentially block execution. +======= +**Execution Delay**: All slashing proposals have an execution delay during which the vetoer can review and potentially block execution: ~5 hours on the v5 testnet (2 rounds), and ~3 days on mainnet (28 rounds). +>>>>>>> origin/v5-next **Temporary Disable**: The vetoer can disable all slashing for up to 3 days if needed, with the ability to extend this period. @@ -258,9 +275,15 @@ The slashing vetoer is an independent security group that can pause slashing to If a slash would drop a validator's stake below the rollup's **local ejection threshold**, the validator's entire remaining stake is withdrawn instead of just the slashed amount: the slash is burned and the remainder is sent to their registered withdrawer address after the exit delay. +<<<<<<< HEAD **Local Ejection Threshold**: 190,000 tokens on mainnet (95% of the 200,000 token Activation Threshold). This is a per-rollup parameter, and other networks use different values (199,000 tokens on testnet). With mainnet's current slash amounts (2,000 tokens for small offenses, 5,000 for medium and large), a validator that joined at exactly the Activation Threshold is ejected by the first slash that would push its total slashed amount above 10,000 tokens (5% of its stake). A separate protocol-level ejection threshold (100,000 tokens, 50% of the Activation Threshold) applies to all stake withdrawals at the GSE level, but with current parameters the local ejection threshold is the one that triggers ejection from slashing. +======= +**Local Ejection Threshold**: 199,000 tokens on the v5 testnet, just below the 200,000 token Activation Threshold. This is a per-rollup parameter; mainnet uses 190,000 tokens (95% of the Activation Threshold). + +With the testnet's full-stake slash amounts (100,000 tokens for small offenses, 250,000 for medium and large), a validator that joined at the Activation Threshold is ejected by its first offense of any tier, since even a 100,000 token slash drops its stake below the 199,000 token local ejection threshold. A separate protocol-level ejection threshold (100,000 tokens, 50% of the Activation Threshold) applies to all stake withdrawals at the GSE level, but with these parameters the local ejection threshold is the one that triggers ejection from slashing. +>>>>>>> origin/v5-next ## Monitoring Slashing Activity @@ -338,7 +361,7 @@ cast call [SLASHING_PROPOSER_ADDRESS] \ **Symptom**: Your configured penalties don't result in slashing on L1. **Solutions**: -1. For the current network, all penalties should be set to `2000000000000000000000` (2000 tokens, 1%) +1. On the v5 testnet, penalties use the AZIP-16 full-stake preset: `100000000000000000000000` (100,000 tokens) for small offenses and `250000000000000000000000` (250,000 tokens) for medium and large 2. Verify your penalty configuration matches the default values shown in the Environment Variables section ## Best Practices diff --git a/docs/docs-operate/operators/setup/sequencer-setup.md b/docs/docs-operate/operators/setup/sequencer-setup.md index dacb136fb428..d54fe774169e 100644 --- a/docs/docs-operate/operators/setup/sequencer-setup.md +++ b/docs/docs-operate/operators/setup/sequencer-setup.md @@ -429,7 +429,7 @@ If you need to access admin endpoints, use `docker exec`: ```bash docker exec -it aztec-sequencer curl -X POST http://localhost:8880 \ -H 'Content-Type: application/json' \ - -d '{"jsonrpc":"2.0","method":"nodeAdmin_getConfig","params":[],"id":1}' + -d '{"jsonrpc":"2.0","method":"aztecAdmin_getConfig","params":[],"id":1}' ``` ::: @@ -453,7 +453,11 @@ Check the current sync status (this may take a few minutes): ```bash curl -s -X POST -H 'Content-Type: application/json' \ +<<<<<<< HEAD -d '{"jsonrpc":"2.0","method":"node_getL2Tips","params":[],"id":67}' \ +======= +-d '{"jsonrpc":"2.0","method":"aztec_getChainTips","params":[],"id":67}' \ +>>>>>>> origin/v5-next http://localhost:8080 | jq -r ".result.proven.number" ``` diff --git a/docs/docs-words.txt b/docs/docs-words.txt index 3b5e2950e4eb..3dbaef6c2e36 100644 --- a/docs/docs-words.txt +++ b/docs/docs-words.txt @@ -69,7 +69,12 @@ codealong Codex COEP Colour +<<<<<<< HEAD colour +======= +CapsuleStore +initializerless +>>>>>>> origin/v5-next immutables colums Commiting @@ -444,6 +449,7 @@ WETH whoooaa Windsurf Wonderland +<<<<<<< HEAD woooh xdeadbeefn XPOST @@ -473,3 +479,12 @@ slashveto unstaked watchlist watchlists +======= +indistinguishability +unlinkable +nightlies +Ciara +Nightingale +Mayopg +VRZVO +>>>>>>> origin/v5-next diff --git a/docs/docs/networks.md b/docs/docs/networks.md index 198a48d8c2e3..a04650f515da 100644 --- a/docs/docs/networks.md +++ b/docs/docs/networks.md @@ -15,9 +15,15 @@ Not sure which network or version to pin against? Jump to the [Network selection | Parameter | Alpha (Mainnet) | Testnet | | ------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +<<<<<<< HEAD | **Version** | `5.0.1` | `5.0.1` | | **L1 Chain ID** | `1` (Mainnet) | `11155111` (Sepolia) | | **Rollup Version** | `4248422647` | `1821665230` | +======= +| **Version** | `4.3.1` | `5.0.0-rc.1` | +| **L1 Chain ID** | `1` (Mainnet) | `11155111` (Sepolia) | +| **Rollup Version** | `2934756905` | `4239416255` | +>>>>>>> origin/v5-next | **RPC Endpoint** | `https://aztec-mainnet.drpc.org` | `https://v5.testnet.rpc.aztec-labs.com` | | **Bootnodes** | [http://static.aztec.network/mainnet/bootnodes.json](http://static.aztec.network/mainnet/bootnodes.json) | [http://static.aztec.network/testnet/bootnodes.json](http://static.aztec.network/testnet/bootnodes.json) | | **Block Explorer** | [Aztecscan](https://aztecscan.xyz), [Aztecexplorer](https://aztecexplorer.xyz/?network=mainnet) | [Aztecscan](https://testnet.aztecscan.xyz), [Aztecexplorer](https://aztecexplorer.xyz/?network=testnet) | @@ -37,9 +43,15 @@ Aztec publishes three kinds of builds, each with a different stability promise. | Channel | Example | What it is | Recommended audience | | -------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +<<<<<<< HEAD | **Stable** | `5.0.0`, `5.0.1` | The validated, final version for a release cycle. | Builders shipping to users. Operators running Alpha or Testnet. | | **Release candidate (RC)** | `5.0.0-rc.1`, `5.0.0-rc.2` | Pre-release of an upcoming stable, used for internal validation and Testnet rehearsals. Additional RCs ship if issues are found. | Operators participating in pre-release rehearsals. Builders verifying compatibility ahead of a stable cut. | | **Nightly** | `5.0.0-nightly.` | Latest in-progress work from the development branch. Experimental, less tested. | Builders previewing upcoming features. Not recommended for production. | +======= +| **Stable** | `4.2.0`, `4.3.0` | The validated, final version for a release cycle. | Builders shipping to users. Operators running Alpha or Testnet. | +| **Release candidate (RC)** | `4.3.0-rc.1`, `4.3.0-rc.2` | Pre-release of an upcoming stable, used for internal validation and Testnet rehearsals. Additional RCs ship if issues are found. | Operators participating in pre-release rehearsals. Builders verifying compatibility ahead of a stable cut. | +| **Nightly** | `4.3.0-nightly.` | Latest in-progress work from the development branch. Experimental, less tested. | Builders previewing upcoming features. Not recommended for production. | +>>>>>>> origin/v5-next An RC is not newer than its matching stable: `5.0.0-rc.1` is a checkpoint on the way to `5.0.0`, and `5.0.0` supersedes every `5.0.0-rc.*`. @@ -56,6 +68,7 @@ Stable releases target roughly one per month, typically mid-month. Dates are not | Contract Name | Alpha (Mainnet) | Testnet | | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | **Registry** | [`0x35b22e09ee0390539439e24f06da43d83f90e298`](https://etherscan.io/address/0x35b22e09ee0390539439e24f06da43d83f90e298) | [`0xa0bfb1b494fb49041e5c6e8c2c1be09cd171c6ba`](https://sepolia.etherscan.io/address/0xa0bfb1b494fb49041e5c6e8c2c1be09cd171c6ba) | +<<<<<<< HEAD | **Rollup** | [`0x91fF8bbD8Ebb07893010D50A48A1609e5EBd8E34`](https://etherscan.io/address/0x91fF8bbD8Ebb07893010D50A48A1609e5EBd8E34) | [`0xd73a91bdcf6891c7642f3e460036e1ef2cc23178`](https://sepolia.etherscan.io/address/0xd73a91bdcf6891c7642f3e460036e1ef2cc23178) | | **L1 → L2 Inbox** | [`0x7d4Ef0676c2032bbCC09227501D34d86641ab8cA`](https://etherscan.io/address/0x7d4Ef0676c2032bbCC09227501D34d86641ab8cA) | [`0x3047dbf2b7dd9f58ac41113525480f94745a4f7c`](https://sepolia.etherscan.io/address/0x3047dbf2b7dd9f58ac41113525480f94745a4f7c) | | **L2 → L1 Outbox** | [`0x5B062aB5fD3A66BC7e73b04CeD38587673b6A2D7`](https://etherscan.io/address/0x5B062aB5fD3A66BC7e73b04CeD38587673b6A2D7) | [`0x905f80009bbef9d9426675b45009922971ed42ff`](https://sepolia.etherscan.io/address/0x905f80009bbef9d9426675b45009922971ed42ff) | @@ -66,22 +79,44 @@ Stable releases target roughly one per month, typically mid-month. Dates are not | **Coin Issuer** | [`0x02fadf157d551aa6d761b2a2237d03af68e41ca6`](https://etherscan.io/address/0x02fadf157d551aa6d761b2a2237d03af68e41ca6) | [`0xe05d0a62045b4237556c1ec423e59eea9a24eaee`](https://sepolia.etherscan.io/address/0xe05d0a62045b4237556c1ec423e59eea9a24eaee) | | **Reward Distributor** | [`0x555bAAc4757A89f1CE0c84fA35afE9dD7aa8E1d3`](https://etherscan.io/address/0x555bAAc4757A89f1CE0c84fA35afE9dD7aa8E1d3) | [`0x83b2a93ef343cab7be9d8bba7317f314975e5cb0`](https://sepolia.etherscan.io/address/0x83b2a93ef343cab7be9d8bba7317f314975e5cb0) | | **Reward Booster** | [`0x4490cAb7Ce3499353E1b0090b9e530c1AD03B551`](https://etherscan.io/address/0x4490cAb7Ce3499353E1b0090b9e530c1AD03B551) | [`0xdFA442Dd70e654455C3D83d3fE1034751e15385e`](https://sepolia.etherscan.io/address/0xdFA442Dd70e654455C3D83d3fE1034751e15385e) | +======= +| **Rollup** | [`0xae2001f7e21d5ecabf6234e9fdd1e76f50f74962`](https://etherscan.io/address/0xae2001f7e21d5ecabf6234e9fdd1e76f50f74962) | [`0xe4394f118b115de2bdad88ee1abd599cf5d25c70`](https://sepolia.etherscan.io/address/0xe4394f118b115de2bdad88ee1abd599cf5d25c70) | +| **L1 → L2 Inbox** | [`0x8dbf0b6ed495baab6062f5d5365af3c1b2ed4578`](https://etherscan.io/address/0x8dbf0b6ed495baab6062f5d5365af3c1b2ed4578) | [`0x599e8d0a0a6b904471bd2e5bac983744c6e5a5c3`](https://sepolia.etherscan.io/address/0x599e8d0a0a6b904471bd2e5bac983744c6e5a5c3) | +| **L2 → L1 Outbox** | [`0xc9698b7adef9ee63f3bf5cff38086e4e836579f0`](https://etherscan.io/address/0xc9698b7adef9ee63f3bf5cff38086e4e836579f0) | [`0xaaca160272361f29aff130d0e8dfd041910c97e0`](https://sepolia.etherscan.io/address/0xaaca160272361f29aff130d0e8dfd041910c97e0) | +| **Fee Juice** | [`0xa27ec0006e59f245217ff08cd52a7e8b169e62d2`](https://etherscan.io/address/0xa27ec0006e59f245217ff08cd52a7e8b169e62d2) | [`0x762c132040fda6183066fa3b14d985ee55aa3c18`](https://sepolia.etherscan.io/address/0x762c132040fda6183066fa3b14d985ee55aa3c18) | +| **Staking Asset** | [`0xa27ec0006e59f245217ff08cd52a7e8b169e62d2`](https://etherscan.io/address/0xa27ec0006e59f245217ff08cd52a7e8b169e62d2) | [`0x5595cb9ed193cac2c0bc5393313bc6115817954b`](https://sepolia.etherscan.io/address/0x5595cb9ed193cac2c0bc5393313bc6115817954b) | +| **Fee Juice Portal** | [`0x2891f8b941067f8b5a3f34545a30cf71e3e23617`](https://etherscan.io/address/0x2891f8b941067f8b5a3f34545a30cf71e3e23617) | [`0x7c4176bff969c9417e42f9cb921100145911cc84`](https://sepolia.etherscan.io/address/0x7c4176bff969c9417e42f9cb921100145911cc84) | +| **Fee Asset Handler** | N/A | [`0x5602c39a6e9c5ace589f64f754927bcda4f4bfc9`](https://sepolia.etherscan.io/address/0x5602c39a6e9c5ace589f64f754927bcda4f4bfc9) | +| **Coin Issuer** | [`0x02fadf157d551aa6d761b2a2237d03af68e41ca6`](https://etherscan.io/address/0x02fadf157d551aa6d761b2a2237d03af68e41ca6) | [`0xe05d0a62045b4237556c1ec423e59eea9a24eaee`](https://sepolia.etherscan.io/address/0xe05d0a62045b4237556c1ec423e59eea9a24eaee) | +| **Reward Distributor** | [`0x3d6a1b00c830c5f278fc5dfb3f6ff0b74db6dfe0`](https://etherscan.io/address/0x3d6a1b00c830c5f278fc5dfb3f6ff0b74db6dfe0) | [`0x83b2a93ef343cab7be9d8bba7317f314975e5cb0`](https://sepolia.etherscan.io/address/0x83b2a93ef343cab7be9d8bba7317f314975e5cb0) | +| **Reward Booster** | [`0x1cbb707bd7b4fd2bced6d96d84372fb428e93d80`](https://etherscan.io/address/0x1cbb707bd7b4fd2bced6d96d84372fb428e93d80) | [`0xb461C15939EAd10ee916d2897955f2B6b7B78C43`](https://sepolia.etherscan.io/address/0xb461C15939EAd10ee916d2897955f2B6b7B78C43) | +>>>>>>> origin/v5-next | **Governance Proposer** | [`0x06ef1dcf87e419c48b94a331b252819fadbd63ef`](https://etherscan.io/address/0x06ef1dcf87e419c48b94a331b252819fadbd63ef) | [`0x01c7d4ca153748d2377968fef22894cb162e9480`](https://sepolia.etherscan.io/address/0x01c7d4ca153748d2377968fef22894cb162e9480) | | **Governance** | [`0x1102471eb3378fee427121c9efcea452e4b6b75e`](https://etherscan.io/address/0x1102471eb3378fee427121c9efcea452e4b6b75e) | [`0xcaf7447721447b22cd0076ac7c63877c3afd329f`](https://sepolia.etherscan.io/address/0xcaf7447721447b22cd0076ac7c63877c3afd329f) | | **Governance Staking Escrow** | [`0xa92ecfd0e70c9cd5e5cd76c50af0f7da93567a4f`](https://etherscan.io/address/0xa92ecfd0e70c9cd5e5cd76c50af0f7da93567a4f) | [`0xb6a38a51a6c1de9012f9d8ea9745ef957212eaac`](https://sepolia.etherscan.io/address/0xb6a38a51a6c1de9012f9d8ea9745ef957212eaac) | | **Staking Registry** | [`0x042dF8f42790d6943F41C25C2132400fd727f452`](https://etherscan.io/address/0x042dF8f42790d6943F41C25C2132400fd727f452) | [`0xC6EcC1832c8BF6a41c927BEb4E9ec610FBeDd1C2`](https://sepolia.etherscan.io/address/0xC6EcC1832c8BF6a41c927BEb4E9ec610FBeDd1C2) | +<<<<<<< HEAD | **Slash Factory** | N/A | N/A | | **Slasher** | [`0xCD6855470A01aBcd989126A1183Fb50673952548`](https://etherscan.io/address/0xCD6855470A01aBcd989126A1183Fb50673952548) | [`0xBFa3625CfC7cdDAbF29961e12C4399c5bd8D8763`](https://sepolia.etherscan.io/address/0xBFa3625CfC7cdDAbF29961e12C4399c5bd8D8763) | | **Tally Slashing Proposer** | [`0x8A36b8F2Ca71D8d8Bd98e03Ebf8B4D0939Daf0bA`](https://etherscan.io/address/0x8A36b8F2Ca71D8d8Bd98e03Ebf8B4D0939Daf0bA) | [`0x504331248Eb1359C247a0e6895fFfeA70ecdb9a8`](https://sepolia.etherscan.io/address/0x504331248Eb1359C247a0e6895fFfeA70ecdb9a8) | | **Honk Verifier** | [`0x098f47c00F4df22a8030746Eb11378236C24b4bC`](https://etherscan.io/address/0x098f47c00F4df22a8030746Eb11378236C24b4bC) | [`0x31F98dfC544E52e4170c0Dc64098049651db48C1`](https://sepolia.etherscan.io/address/0x31F98dfC544E52e4170c0Dc64098049651db48C1) | | **Register New Rollup Version Payload** | N/A | N/A | | **Slash Payload Cloneable** | [`0x57576AbA1932df7Cc30F971ACC9d4Fc6E86B6e87`](https://etherscan.io/address/0x57576AbA1932df7Cc30F971ACC9d4Fc6E86B6e87) | [`0x0f7aC5F5087bD7CA05957321c75CdF9bD70D9b2E`](https://sepolia.etherscan.io/address/0x0f7aC5F5087bD7CA05957321c75CdF9bD70D9b2E) | +======= +| **Slash Factory** | N/A | [`0x9CF4a0094c8696d5110dd0f0cF3FA5deA174BB17`](https://sepolia.etherscan.io/address/0x9CF4a0094c8696d5110dd0f0cF3FA5deA174BB17) | +| **Slasher** | [`0x64E6e9Bb9f1E33D319578B9f8a9C719Ca6D46eBb`](https://etherscan.io/address/0x64E6e9Bb9f1E33D319578B9f8a9C719Ca6D46eBb) | [`0xd9f41c7dDcf571Cb212670BD54E78D6ef8bf2497`](https://sepolia.etherscan.io/address/0xd9f41c7dDcf571Cb212670BD54E78D6ef8bf2497) | +| **Tally Slashing Proposer** | [`0xa4a38fD0108C00983E75616b638Ff3321FD26958`](https://etherscan.io/address/0xa4a38fD0108C00983E75616b638Ff3321FD26958) | [`0xaB9B3B436a98fF323C13A66D38eB9673e5Ab51EE`](https://sepolia.etherscan.io/address/0xaB9B3B436a98fF323C13A66D38eB9673e5Ab51EE) | +| **Honk Verifier** | [`0x70aedda427f26480d240bc0f4308cedec8d31348`](https://etherscan.io/address/0x70aedda427f26480d240bc0f4308cedec8d31348) | [`0xD2A6AD93f5d3C32D1f1f22c9B54E52c39D49D534`](https://sepolia.etherscan.io/address/0xD2A6AD93f5d3C32D1f1f22c9B54E52c39D49D534) | +| **Register New Rollup Version Payload** | N/A | N/A | +| **Slash Payload Cloneable** | [`0xAA43220b7eb7c8Ffe75bc9C483f3C07b0a55B445`](https://etherscan.io/address/0xAA43220b7eb7c8Ffe75bc9C483f3C07b0a55B445) | [`0x10895F7a1418AA268E04767C6F37665727d07354`](https://sepolia.etherscan.io/address/0x10895F7a1418AA268E04767C6F37665727d07354) | +>>>>>>> origin/v5-next ### L2 contract addresses | Contract Name | Alpha (Mainnet) | Testnet | | ------------------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | **Instance Registry** | `0x0000000000000000000000000000000000000000000000000000000000000002` | `0x0000000000000000000000000000000000000000000000000000000000000002` | +<<<<<<< HEAD | **Class Registry** | `0x0000000000000000000000000000000000000000000000000000000000000001` | `0x0000000000000000000000000000000000000000000000000000000000000001` | | **MultiCall Entrypoint** | `0x246d60af8b79a5dceece7d2388921203401c0df02ce674c5781c6c2162922986` | `0x246d60af8b79a5dceece7d2388921203401c0df02ce674c5781c6c2162922986` | | **Fee Juice** | `0x0000000000000000000000000000000000000000000000000000000000000003` | `0x0000000000000000000000000000000000000000000000000000000000000003` | @@ -96,6 +131,22 @@ Stable releases target roughly one per month, typically mid-month. Dates are not | **Voting Duration** | 7 days | 24 hours | | **Execution Delay** | 2 days | 12 hours | | **Slashing Quorum** | 65/128 | 65/128 | +======= +| **Class Registry** | `0x0000000000000000000000000000000000000000000000000000000000000003` | `0x0000000000000000000000000000000000000000000000000000000000000001` | +| **MultiCall Entrypoint** | `0x0000000000000000000000000000000000000000000000000000000000000004` | `0x27d70a9a022dcd1195a8d2a4a3a8c89b5af1d7831a68891d052af0125a1f1341` | +| **Fee Juice** | `0x0000000000000000000000000000000000000000000000000000000000000005` | `0x0000000000000000000000000000000000000000000000000000000000000003` | +| **SponsoredFPC** | Not deployed | `0x261366b3c0a9b4c30864629556cf282be409e6822b1f3a065fcb7e34f36d7880` | + +## Governance parameters + +| Parameter | Alpha (Mainnet) | Testnet | +| ----------------------- | -------------------- | -------------------- | +| **Proposer Quorum** | 600/1000 | 60/100 | +| **Voting Delay** | 3 days | 12 hours | +| **Voting Duration** | 7 days | 24 hours | +| **Execution Delay** | 30 days | 12 hours | +| **Slashing Quorum** | 65% | 33% | +>>>>>>> origin/v5-next | **Slashing Round Size** | 4 epochs (128 slots) | 4 epochs (128 slots) | --- diff --git a/docs/examples/contracts/aave_bridge/src/main.nr b/docs/examples/contracts/aave_bridge/src/main.nr index 4e9890468d1b..44ac497b2073 100644 --- a/docs/examples/contracts/aave_bridge/src/main.nr +++ b/docs/examples/contracts/aave_bridge/src/main.nr @@ -50,7 +50,7 @@ pub contract AaveBridge { // Consume message and emit nullifier self.context.consume_l1_to_l2_message( content_hash, - secret, + [secret], config.portal, message_leaf_index, ); @@ -76,7 +76,7 @@ pub contract AaveBridge { let content_hash = get_mint_to_private_content_hash(amount); self.context.consume_l1_to_l2_message( content_hash, - secret_for_L1_to_L2_message_consumption, + [secret_for_L1_to_L2_message_consumption], config.portal, message_leaf_index, ); diff --git a/docs/examples/contracts/nft_bridge/src/main.nr b/docs/examples/contracts/nft_bridge/src/main.nr index 8f81f0fa3387..b2ae53de4ca8 100644 --- a/docs/examples/contracts/nft_bridge/src/main.nr +++ b/docs/examples/contracts/nft_bridge/src/main.nr @@ -38,7 +38,7 @@ pub contract NFTBridge { // Consume the L1 -> L2 message self.context.consume_l1_to_l2_message( content_hash, - secret, + [secret], self.storage.portal.read(), message_leaf_index, ); diff --git a/docs/examples/ts/aztecjs_connection/index.ts b/docs/examples/ts/aztecjs_connection/index.ts index 46f37945f601..059b19a24e2f 100644 --- a/docs/examples/ts/aztecjs_connection/index.ts +++ b/docs/examples/ts/aztecjs_connection/index.ts @@ -45,11 +45,12 @@ console.log(`Alice's fee juice balance: ${aliceBalance}`); // docs:end:check_fee_juice // docs:start:create_account -import { Fr } from "@aztec/aztec.js/fields"; +import { Fr, GrumpkinScalar } from "@aztec/aztec.js/fields"; const secret = Fr.random(); const salt = Fr.random(); -const newAccount = await wallet.createSchnorrAccount(secret, salt); +const signingKey = GrumpkinScalar.random(); +const newAccount = await wallet.createSchnorrAccount(secret, salt, signingKey); console.log("New account address:", newAccount.address.toString()); // docs:end:create_account @@ -87,9 +88,11 @@ await deployMethod.send({ // can coexist in one example; in your own code, pick whichever name fits. const feeJuiceSecret = Fr.random(); const feeJuiceSalt = Fr.random(); +const feeJuiceSigningKey = GrumpkinScalar.random(); const feeJuiceAccount = await wallet.createSchnorrAccount( feeJuiceSecret, feeJuiceSalt, + feeJuiceSigningKey, ); // docs:end:create_fee_juice_account diff --git a/docs/examples/ts/aztecjs_getting_started/index.ts b/docs/examples/ts/aztecjs_getting_started/index.ts index db238d59d1e3..5535db580c53 100644 --- a/docs/examples/ts/aztecjs_getting_started/index.ts +++ b/docs/examples/ts/aztecjs_getting_started/index.ts @@ -6,8 +6,21 @@ const nodeUrl = process.env.AZTEC_NODE_URL ?? "http://localhost:8080"; const wallet = await EmbeddedWallet.create(nodeUrl, { ephemeral: true }); const [alice, bob] = await getInitialTestAccountsData(); +<<<<<<< HEAD await wallet.createSchnorrInitializerlessAccount(alice.secret, alice.salt); await wallet.createSchnorrInitializerlessAccount(bob.secret, bob.salt); +======= +await wallet.createSchnorrInitializerlessAccount( + alice.secret, + alice.salt, + alice.signingKey, +); +await wallet.createSchnorrInitializerlessAccount( + bob.secret, + bob.salt, + bob.signingKey, +); +>>>>>>> origin/v5-next // docs:end:setup // docs:start:deploy diff --git a/docs/examples/ts/aztecjs_runner/run.sh b/docs/examples/ts/aztecjs_runner/run.sh index 23507f79b785..6d87fdb5cbcc 100755 --- a/docs/examples/ts/aztecjs_runner/run.sh +++ b/docs/examples/ts/aztecjs_runner/run.sh @@ -115,10 +115,20 @@ setup_project() { [ ${#NPM_DEPS[@]} -gt 0 ] && yarn_add_with_retry "${NPM_DEPS[@]}" fi +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> origin/v5-next # Pin typescript to the 5.x line used across the monorepo. An unpinned # `yarn add typescript` now resolves to the 7.x native port, whose package # layout has no lib/_tsc.js, so yarn 4's builtin compat patch fails to apply. yarn_add_with_retry -D "typescript@^5.3.3" tsx +<<<<<<< HEAD +======= + yarn_add_with_retry -D typescript@^5.3.3 tsx +>>>>>>> origin/v5-next +======= +>>>>>>> origin/v5-next # Copy tsconfig cp "$EXAMPLES_DIR/tsconfig.template.json" tsconfig.json diff --git a/docs/examples/ts/bob_token_contract/index.ts b/docs/examples/ts/bob_token_contract/index.ts index 7f929e090d71..51c99d6b767c 100644 --- a/docs/examples/ts/bob_token_contract/index.ts +++ b/docs/examples/ts/bob_token_contract/index.ts @@ -61,15 +61,21 @@ async function main() { const giggleAccountManager = await wallet.createSchnorrInitializerlessAccount( giggleWalletData.secret, giggleWalletData.salt, + giggleWalletData.signingKey, ); const aliceAccountManager = await wallet.createSchnorrInitializerlessAccount( aliceWalletData.secret, aliceWalletData.salt, + aliceWalletData.signingKey, ); const bobClinicAccountManager = await wallet.createSchnorrInitializerlessAccount( bobClinicWalletData.secret, bobClinicWalletData.salt, +<<<<<<< HEAD +======= + bobClinicWalletData.signingKey, +>>>>>>> origin/v5-next ); const giggleAddress = giggleAccountManager.address; diff --git a/docs/examples/ts/recursive_verification/index.ts b/docs/examples/ts/recursive_verification/index.ts index b8ce5d30bb36..80170f392567 100644 --- a/docs/examples/ts/recursive_verification/index.ts +++ b/docs/examples/ts/recursive_verification/index.ts @@ -6,7 +6,7 @@ import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC"; import { ValueNotEqualContract } from "./artifacts/ValueNotEqual.js"; import { EmbeddedWallet } from "@aztec/wallets/embedded"; import { NO_FROM } from "@aztec/aztec.js/account"; -import { Fr } from "@aztec/aztec.js/fields"; +import { Fr, GrumpkinScalar } from "@aztec/aztec.js/fields"; import assert from "node:assert"; import fs from "node:fs"; @@ -47,7 +47,11 @@ async function main() { // Step 1: Setup wallet and create account // Accounts in Aztec are smart contracts (account abstraction) const wallet = await setupWallet(); - const manager = await wallet.createSchnorrAccount(Fr.random(), Fr.random()); + const manager = await wallet.createSchnorrAccount( + Fr.random(), + Fr.random(), + GrumpkinScalar.random(), + ); // Deploy the account contract const deployMethod = await manager.getDeployMethod(); diff --git a/docs/examples/ts/token_bridge/index.ts b/docs/examples/ts/token_bridge/index.ts index 993a39498569..18f3508ac046 100644 --- a/docs/examples/ts/token_bridge/index.ts +++ b/docs/examples/ts/token_bridge/index.ts @@ -31,6 +31,7 @@ const [accData] = await getInitialTestAccountsData(); const account = await aztecWallet.createSchnorrInitializerlessAccount( accData.secret, accData.salt, + accData.signingKey, ); console.log(`Account: ${account.address.toString()}\n`); diff --git a/docs/examples/webapp-tutorial/scripts/deploy-and-interact.ts b/docs/examples/webapp-tutorial/scripts/deploy-and-interact.ts index cd3aac7eaa2e..cef9c56dd8b2 100644 --- a/docs/examples/webapp-tutorial/scripts/deploy-and-interact.ts +++ b/docs/examples/webapp-tutorial/scripts/deploy-and-interact.ts @@ -8,15 +8,21 @@ const nodeUrl = process.env.AZTEC_NODE_URL ?? "http://localhost:8080"; const wallet = await EmbeddedWallet.create(nodeUrl, { ephemeral: true }); const [alice, bob] = await getInitialTestAccountsData(); -await wallet.createSchnorrAccount(alice.secret, alice.salt); -await wallet.createSchnorrAccount(bob.secret, bob.salt); -console.log("Accounts ready:", alice.address.toString(), bob.address.toString()); +await wallet.createSchnorrAccount(alice.secret, alice.salt, alice.signingKey); +await wallet.createSchnorrAccount(bob.secret, bob.salt, bob.signingKey); +console.log( + "Accounts ready:", + alice.address.toString(), + bob.address.toString(), +); // docs:end:script-setup // docs:start:script-deploy -const { contract } = await PodRacingContract.deploy(wallet, alice.address).send({ - from: alice.address, -}); +const { contract } = await PodRacingContract.deploy(wallet, alice.address).send( + { + from: alice.address, + }, +); console.log("Contract deployed at:", contract.address.toString()); // docs:end:script-deploy diff --git a/docs/examples/webapp-tutorial/src/config.ts b/docs/examples/webapp-tutorial/src/config.ts index 3c0e12978963..22bd1a9c94dd 100644 --- a/docs/examples/webapp-tutorial/src/config.ts +++ b/docs/examples/webapp-tutorial/src/config.ts @@ -1,17 +1,16 @@ // docs:start:config -import { createAztecNodeClient } from '@aztec/aztec.js/node'; -import { getPXEConfig } from '@aztec/pxe/config'; -import { createPXE } from '@aztec/pxe/client/lazy'; +import { createAztecNodeClient } from "@aztec/aztec.js/node"; +import { getPXEConfig } from "@aztec/pxe/config"; +import { createPXE } from "@aztec/pxe/client/lazy"; - -export type NetworkType = 'local' | 'remote'; +export type NetworkType = "local" | "remote"; export function getNodeUrl(network: NetworkType): string { - if (network === 'local') { - return process.env.AZTEC_NODE_URL || 'http://localhost:8080'; + if (network === "local") { + return process.env.AZTEC_NODE_URL || "http://localhost:8080"; } // For remote networks, the wallet extension manages the node connection - return process.env.AZTEC_NODE_URL || 'http://localhost:8080'; + return process.env.AZTEC_NODE_URL || "http://localhost:8080"; } /** @@ -22,11 +21,16 @@ export function getNodeUrl(network: NetworkType): string { export async function createLocalPXE(nodeUrl: string) { const aztecNode = createAztecNodeClient(nodeUrl); const config = getPXEConfig(); +<<<<<<< HEAD config.rollupAddress = (await aztecNode.getL1ContractAddresses()).rollupAddress; const isLocal = nodeUrl.includes('localhost') || nodeUrl.includes('127.0.0.1'); +======= + const isLocal = + nodeUrl.includes("localhost") || nodeUrl.includes("127.0.0.1"); +>>>>>>> origin/v5-next config.proverEnabled = !isLocal; const pxe = await createPXE(aztecNode, config, {}); - console.log('PXE connected to node at:', nodeUrl); + console.log("PXE connected to node at:", nodeUrl); return { pxe, aztecNode }; } diff --git a/docs/examples/webapp-tutorial/src/embedded-wallet.ts b/docs/examples/webapp-tutorial/src/embedded-wallet.ts index d864baafdb16..5e1009293705 100644 --- a/docs/examples/webapp-tutorial/src/embedded-wallet.ts +++ b/docs/examples/webapp-tutorial/src/embedded-wallet.ts @@ -1,4 +1,5 @@ // docs:start:embedded-wallet-imports +<<<<<<< HEAD import { type NoFrom, NO_FROM } from '@aztec/aztec.js/account'; import { AztecAddress } from '@aztec/aztec.js/addresses'; import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts'; @@ -10,6 +11,22 @@ import { getInitialTestAccountsData } from '@aztec/accounts/testing/lazy'; import type { ContractArtifact } from '@aztec/stdlib/abi'; import { type CompleteFeeOptionsConfig, type FeeOptions } from '@aztec/wallet-sdk/base-wallet'; import { EmbeddedWallet as BaseEmbeddedWallet } from '@aztec/wallets/embedded'; +======= +import { NO_FROM } from "@aztec/aztec.js/account"; +import { AztecAddress } from "@aztec/aztec.js/addresses"; +import { getContractInstanceFromInstantiationParams } from "@aztec/aztec.js/contracts"; +import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee"; +import { Fr } from "@aztec/aztec.js/fields"; +import { SPONSORED_FPC_SALT } from "@aztec/constants"; +import { AccountFeePaymentMethodOptions } from "@aztec/entrypoints/account"; +import { getInitialTestAccountsData } from "@aztec/accounts/testing/lazy"; +import type { ContractArtifact } from "@aztec/stdlib/abi"; +import { + type CompleteFeeOptionsConfig, + type FeeOptions, +} from "@aztec/wallet-sdk/base-wallet"; +import { EmbeddedWallet as BaseEmbeddedWallet } from "@aztec/wallets/embedded"; +>>>>>>> origin/v5-next // docs:end:embedded-wallet-imports // docs:start:embedded-wallet-class @@ -32,6 +49,7 @@ export class EmbeddedWallet extends BaseEmbeddedWallet { * Uses SponsoredFPC for fee payment by default, so users * don't need to hold fee tokens. */ +<<<<<<< HEAD override async completeFeeOptions(config: CompleteFeeOptionsConfig): Promise { const base = await super.completeFeeOptions(config); @@ -46,6 +64,27 @@ export class EmbeddedWallet extends BaseEmbeddedWallet { walletFeePaymentMethod: new SponsoredFeePaymentMethod(fpc.instance.address), accountFeePaymentMethodOptions: config.from !== NO_FROM ? AccountFeePaymentMethodOptions.EXTERNAL : base.accountFeePaymentMethodOptions, +======= + override async completeFeeOptions( + config: CompleteFeeOptionsConfig, + ): Promise { + const feeOptions = await super.completeFeeOptions(config); + + if (config.feePayer) { + return feeOptions; + } + + const fpc = await EmbeddedWallet.#getSponsoredFPCContract(); + return { + ...feeOptions, + walletFeePaymentMethod: new SponsoredFeePaymentMethod( + fpc.instance.address, + ), + accountFeePaymentMethodOptions: + config.from !== NO_FROM + ? AccountFeePaymentMethodOptions.EXTERNAL + : feeOptions.accountFeePaymentMethodOptions, +>>>>>>> origin/v5-next }; } // docs:end:fee-options @@ -57,8 +96,13 @@ export class EmbeddedWallet extends BaseEmbeddedWallet { */ static async initialize(nodeUrl: string): Promise { const isLocal = +<<<<<<< HEAD nodeUrl.includes('localhost') || nodeUrl.includes('127.0.0.1'); const wallet = await EmbeddedWallet.create(nodeUrl, { +======= + nodeUrl.includes("localhost") || nodeUrl.includes("127.0.0.1"); + const wallet = await EmbeddedWallet.create(nodeUrl, { +>>>>>>> origin/v5-next ephemeral: true, pxeConfig: { proverEnabled: !isLocal }, }); @@ -73,7 +117,7 @@ export class EmbeddedWallet extends BaseEmbeddedWallet { static async #getSponsoredFPCContract() { const { SponsoredFPCContractArtifact } = await import( - '@aztec/noir-contracts.js/SponsoredFPC' + "@aztec/noir-contracts.js/SponsoredFPC" ); const instance = await getContractInstanceFromInstantiationParams( SponsoredFPCContractArtifact, diff --git a/docs/examples/webapp-tutorial/test-extension/src/account-utils.ts b/docs/examples/webapp-tutorial/test-extension/src/account-utils.ts index 5aaf733f8bb6..489dbe482a79 100644 --- a/docs/examples/webapp-tutorial/test-extension/src/account-utils.ts +++ b/docs/examples/webapp-tutorial/test-extension/src/account-utils.ts @@ -5,7 +5,7 @@ * account creation, deployment, and registration. */ -import { getAztecCore } from './aztec-imports'; +import { getAztecCore } from "./aztec-imports"; /** * Derives keys and instantiates a Schnorr account contract from a secret and salt. @@ -21,17 +21,18 @@ import { getAztecCore } from './aztec-imports'; export async function instantiateAccount(secret: string, salt: string) { const { Fr, + GrumpkinScalar, deriveKeys, - deriveSigningKey, + deriveSecretKeyFromSigningKey, SchnorrAccountContract, getContractInstanceFromInstantiationParams, } = await getAztecCore(); - const secretFr = Fr.fromString(secret); + const signingKey = GrumpkinScalar.fromString(secret); const saltFr = Fr.fromString(salt); + const secretFr = await deriveSecretKeyFromSigningKey(signingKey); const { publicKeys } = await deriveKeys(secretFr); - const signingKey = deriveSigningKey(secretFr); const accountContract = new SchnorrAccountContract(signingKey); const initInfo = await accountContract.getInitializationFunctionAndArgs(); diff --git a/docs/examples/webapp-tutorial/test-extension/src/aztec-imports.ts b/docs/examples/webapp-tutorial/test-extension/src/aztec-imports.ts index 99c8795c1029..510b5c25919f 100644 --- a/docs/examples/webapp-tutorial/test-extension/src/aztec-imports.ts +++ b/docs/examples/webapp-tutorial/test-extension/src/aztec-imports.ts @@ -14,29 +14,30 @@ /** Core imports needed for account operations (key derivation, contract setup) */ export interface AztecCoreImports { - Fr: typeof import('@aztec/aztec.js/fields').Fr; - AztecAddress: typeof import('@aztec/aztec.js/addresses').AztecAddress; - deriveKeys: typeof import('@aztec/stdlib/keys').deriveKeys; - deriveSigningKey: typeof import('@aztec/stdlib/keys').deriveSigningKey; - SchnorrAccountContract: typeof import('@aztec/accounts/schnorr/lazy').SchnorrAccountContract; - getContractInstanceFromInstantiationParams: typeof import('@aztec/aztec.js/contracts').getContractInstanceFromInstantiationParams; - AccountManager: typeof import('@aztec/aztec.js/wallet').AccountManager; + Fr: typeof import("@aztec/aztec.js/fields").Fr; + GrumpkinScalar: typeof import("@aztec/aztec.js/fields").GrumpkinScalar; + AztecAddress: typeof import("@aztec/aztec.js/addresses").AztecAddress; + deriveKeys: typeof import("@aztec/stdlib/keys").deriveKeys; + deriveSecretKeyFromSigningKey: typeof import("@aztec/accounts/utils").deriveSecretKeyFromSigningKey; + SchnorrAccountContract: typeof import("@aztec/accounts/schnorr/lazy").SchnorrAccountContract; + getContractInstanceFromInstantiationParams: typeof import("@aztec/aztec.js/contracts").getContractInstanceFromInstantiationParams; + AccountManager: typeof import("@aztec/aztec.js/wallet").AccountManager; } /** Additional imports for the wallet runtime (BaseWallet, serialization) */ export interface AztecWalletImports extends AztecCoreImports { - BaseWallet: typeof import('@aztec/wallet-sdk/base-wallet').BaseWallet; - SignerlessAccount: typeof import('@aztec/aztec.js/account').SignerlessAccount; - WalletSchema: typeof import('@aztec/aztec.js/wallet').WalletSchema; - jsonStringify: typeof import('@aztec/foundation/json-rpc').jsonStringify; - schemaHasMethod: typeof import('@aztec/foundation/schemas').schemaHasMethod; + BaseWallet: typeof import("@aztec/wallet-sdk/base-wallet").BaseWallet; + SignerlessAccount: typeof import("@aztec/aztec.js/account").SignerlessAccount; + WalletSchema: typeof import("@aztec/aztec.js/wallet").WalletSchema; + jsonStringify: typeof import("@aztec/foundation/json-rpc").jsonStringify; + schemaHasMethod: typeof import("@aztec/foundation/schemas").schemaHasMethod; } /** Deploy-specific imports (fee payment, SponsoredFPC) */ export interface AztecDeployImports extends AztecCoreImports { - SponsoredFeePaymentMethod: typeof import('@aztec/aztec.js/fee').SponsoredFeePaymentMethod; - SponsoredFPCContract: typeof import('@aztec/noir-contracts.js/SponsoredFPC').SponsoredFPCContract; - SPONSORED_FPC_SALT: typeof import('@aztec/constants').SPONSORED_FPC_SALT; + SponsoredFeePaymentMethod: typeof import("@aztec/aztec.js/fee").SponsoredFeePaymentMethod; + SponsoredFPCContract: typeof import("@aztec/noir-contracts.js/SponsoredFPC").SponsoredFPCContract; + SPONSORED_FPC_SALT: typeof import("@aztec/constants").SPONSORED_FPC_SALT; } let coreCache: AztecCoreImports | null = null; @@ -50,22 +51,26 @@ let deployCache: AztecDeployImports | null = null; export async function getAztecCore(): Promise { if (coreCache) return coreCache; - const [fields, addresses, keys, schnorr, contracts, wallet] = await Promise.all([ - import('@aztec/aztec.js/fields'), - import('@aztec/aztec.js/addresses'), - import('@aztec/stdlib/keys'), - import('@aztec/accounts/schnorr/lazy'), - import('@aztec/aztec.js/contracts'), - import('@aztec/aztec.js/wallet'), - ]); + const [fields, addresses, keys, accountUtils, schnorr, contracts, wallet] = + await Promise.all([ + import("@aztec/aztec.js/fields"), + import("@aztec/aztec.js/addresses"), + import("@aztec/stdlib/keys"), + import("@aztec/accounts/utils"), + import("@aztec/accounts/schnorr/lazy"), + import("@aztec/aztec.js/contracts"), + import("@aztec/aztec.js/wallet"), + ]); coreCache = { Fr: fields.Fr, + GrumpkinScalar: fields.GrumpkinScalar, AztecAddress: addresses.AztecAddress, deriveKeys: keys.deriveKeys, - deriveSigningKey: keys.deriveSigningKey, + deriveSecretKeyFromSigningKey: accountUtils.deriveSecretKeyFromSigningKey, SchnorrAccountContract: schnorr.SchnorrAccountContract, - getContractInstanceFromInstantiationParams: contracts.getContractInstanceFromInstantiationParams, + getContractInstanceFromInstantiationParams: + contracts.getContractInstanceFromInstantiationParams, AccountManager: wallet.AccountManager, }; @@ -81,11 +86,11 @@ export async function getAztecWallet(): Promise { const [core, bw, account, walletMod, jsonRpc, schemas] = await Promise.all([ getAztecCore(), - import('@aztec/wallet-sdk/base-wallet'), - import('@aztec/aztec.js/account'), - import('@aztec/aztec.js/wallet'), - import('@aztec/foundation/json-rpc'), - import('@aztec/foundation/schemas'), + import("@aztec/wallet-sdk/base-wallet"), + import("@aztec/aztec.js/account"), + import("@aztec/aztec.js/wallet"), + import("@aztec/foundation/json-rpc"), + import("@aztec/foundation/schemas"), ]); walletCache = { @@ -109,9 +114,9 @@ export async function getAztecDeploy(): Promise { const [core, fee, sponsoredFpc, constants] = await Promise.all([ getAztecCore(), - import('@aztec/aztec.js/fee'), - import('@aztec/noir-contracts.js/SponsoredFPC'), - import('@aztec/constants'), + import("@aztec/aztec.js/fee"), + import("@aztec/noir-contracts.js/SponsoredFPC"), + import("@aztec/constants"), ]); deployCache = { diff --git a/docs/examples/webapp-tutorial/test-extension/src/wallet/wallet-impl.ts b/docs/examples/webapp-tutorial/test-extension/src/wallet/wallet-impl.ts index 2d1bd3637d16..0f288e5b80ff 100644 --- a/docs/examples/webapp-tutorial/test-extension/src/wallet/wallet-impl.ts +++ b/docs/examples/webapp-tutorial/test-extension/src/wallet/wallet-impl.ts @@ -4,17 +4,17 @@ * With the crossOriginIsolated monkey-patch, Barretenberg WASM works in Chrome * extension offscreen documents. This allows full cryptographic operations: * - Fr.random() for secure random field elements - * - deriveKeys() and deriveSigningKey() for key derivation + * - deriveKeys() and deriveSecretKeyFromSigningKey() for key derivation * - Address computation with SchnorrAccountContract * * All encryption uses a non-extractable CryptoKey — the raw password * is never stored or passed around after initial derivation. (#2) */ -import { Fr } from '@aztec/aztec.js/fields'; +import { Fr, GrumpkinScalar } from "@aztec/aztec.js/fields"; -import { instantiateAccount } from '../account-utils'; -import type { PublicAccountInfo } from '../shared-types'; +import { instantiateAccount } from "../account-utils"; +import type { PublicAccountInfo } from "../shared-types"; import { type StoredAccount, getStoredAccounts, @@ -25,16 +25,17 @@ import { markAccountDeployed, getActiveAccount, setActiveAccount, -} from './storage'; -import { log } from '../config'; +} from "./storage"; +import { log } from "../config"; /** * Generates a new secret and salt for account creation using real Aztec primitives. * Uses Fr.random() which is cryptographically secure via Barretenberg. */ export function generateSecret(): { secret: string; salt: string } { - log.debug('[wallet-manager] Generating new secret and salt with Fr.random()...'); - const secret = Fr.random().toString(); + log.debug("[wallet-manager] Generating new signing key and salt..."); + // The account's root is its signing key; the privacy secret is derived from it in instantiateAccount. + const secret = GrumpkinScalar.random().toString(); const salt = Fr.random().toString(); return { secret, salt }; } @@ -43,10 +44,13 @@ export function generateSecret(): { secret: string; salt: string } { * Computes the account address from a secret and salt. * Runs in the extension offscreen document where Barretenberg works. */ -export async function computeAddress(secretHex: string, saltHex: string): Promise { - log.debug('[wallet-manager] Computing address...'); +export async function computeAddress( + secretHex: string, + saltHex: string, +): Promise { + log.debug("[wallet-manager] Computing address..."); const { instance } = await instantiateAccount(secretHex, saltHex); - log.debug('[wallet-manager] Computed address:', instance.address.toString()); + log.debug("[wallet-manager] Computed address:", instance.address.toString()); return instance.address.toString(); } @@ -57,9 +61,9 @@ export async function computeAddress(secretHex: string, saltHex: string): Promis // docs:start:create-new-account export async function createAccount( masterKey: CryptoKey, - alias: string = '' + alias: string = "", ): Promise<{ address: string; secret: string; salt: string }> { - log.debug('[wallet-manager] Creating account...'); + log.debug("[wallet-manager] Creating account..."); const { secret, salt } = generateSecret(); const address = await computeAddress(secret, salt); @@ -69,10 +73,10 @@ export async function createAccount( const currentActive = await getActiveAccount(); if (!currentActive) { await setActiveAccount(address); - log.debug('[wallet-manager] Set as active account (first account)'); + log.debug("[wallet-manager] Set as active account (first account)"); } - log.debug('[wallet-manager] Account created:', address); + log.debug("[wallet-manager] Account created:", address); return { address, secret, salt }; } // docs:end:create-new-account @@ -86,9 +90,9 @@ export async function storeAccount( secret: string, salt: string, masterKey: CryptoKey, - alias: string = '' + alias: string = "", ): Promise { - log.debug('[wallet-manager] Storing account:', address); + log.debug("[wallet-manager] Storing account:", address); const { encrypted, iv } = await encryptWithKey(secret, masterKey); @@ -102,7 +106,7 @@ export async function storeAccount( }; await saveAccount(storedAccount); - log.debug('[wallet-manager] Account stored successfully'); + log.debug("[wallet-manager] Account stored successfully"); } /** @@ -111,7 +115,7 @@ export async function storeAccount( */ export async function getAccountSecret( address: string, - masterKey: CryptoKey + masterKey: CryptoKey, ): Promise<{ secret: string; salt: string } | null> { const stored = await getStoredAccount(address); if (!stored) { @@ -121,7 +125,7 @@ export async function getAccountSecret( const secret = await decryptWithKey( stored.encryptedSecret, stored.iv, - masterKey + masterKey, ); return { @@ -135,7 +139,7 @@ export async function getAccountSecret( */ export async function getAccounts(): Promise { const accounts = await getStoredAccounts(); - return accounts.map(acc => ({ + return accounts.map((acc) => ({ address: acc.address, alias: acc.alias, isDeployed: acc.isDeployed, diff --git a/docs/netlify.toml b/docs/netlify.toml index 14590b8d0697..918c2f71558d 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -980,3 +980,11 @@ # Aztec-nr: contract errors from = "/errors/14" to = "/developers/docs/aztec-nr/debugging#contract-errors" +<<<<<<< HEAD +======= + +[[redirects]] + # Aztec-nr: auto-generated note properties require the derived Packable layout + from = "/errors/15" + to = "/aztec-nr-api/mainnet/noir_aztec/note/note_interface/trait.NoteProperties.html" +>>>>>>> origin/v5-next diff --git a/l1-contracts/.rebuild_patterns b/l1-contracts/.rebuild_patterns index 8a4b842e53b7..c0a57a261c65 100644 --- a/l1-contracts/.rebuild_patterns +++ b/l1-contracts/.rebuild_patterns @@ -1,7 +1,11 @@ ^l1-contracts/src/.*\.sol$ ^l1-contracts/test/.*\.sol$ ^l1-contracts/script/.*\.sol$ +<<<<<<< HEAD ^l1-contracts/lib/.* +======= +^l1-contracts/scripts/forge_broadcast\.js$ +>>>>>>> origin/v5-next ^l1-contracts/bootstrap.sh ^l1-contracts/foundry.toml ^l1-contracts/foundry.lock diff --git a/l1-contracts/foundry.toml b/l1-contracts/foundry.toml index 66413819bfa5..3c64f1d16eb7 100644 --- a/l1-contracts/foundry.toml +++ b/l1-contracts/foundry.toml @@ -73,6 +73,7 @@ variable_override_spacing = false wrap_comments = true number_underscore = "thousands" override_spacing = false +ignore = ["script/deploy/HonkVerifier.sol"] [lint] ignore = ["./lib/**"] diff --git a/l1-contracts/script/deploy/DeployRollupForUpgradeV5.s.sol b/l1-contracts/script/deploy/DeployRollupForUpgradeV5.s.sol new file mode 100644 index 000000000000..c9d1b2f8e1aa --- /dev/null +++ b/l1-contracts/script/deploy/DeployRollupForUpgradeV5.s.sol @@ -0,0 +1,881 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024 Aztec Labs. +// solhint-disable comprehensive-interface +pragma solidity >=0.8.27; + +import {Script} from "forge-std/Script.sol"; +import {StdAssertions} from "forge-std/StdAssertions.sol"; +import {StdStorage, stdStorage} from "forge-std/StdStorage.sol"; +import {console} from "forge-std/console.sol"; + +import {Ownable} from "@oz/access/Ownable.sol"; +import {IERC20} from "@oz/token/ERC20/IERC20.sol"; + +import {EscapeHatch} from "@aztec/core/EscapeHatch.sol"; +import {IEscapeHatch} from "@aztec/core/interfaces/IEscapeHatch.sol"; +import {IInstance} from "@aztec/core/interfaces/IInstance.sol"; +import {IRollup} from "@aztec/core/interfaces/IRollup.sol"; +import {IStaking} from "@aztec/core/interfaces/IStaking.sol"; +import {IValidatorSelectionCore} from "@aztec/core/interfaces/IValidatorSelection.sol"; +import {IVerifier} from "@aztec/core/interfaces/IVerifier.sol"; +import {Rollup} from "@aztec/core/Rollup.sol"; +import { + CompressedStakingQueueConfig, + StakingQueueConfig, + StakingQueueConfigLib +} from "@aztec/core/libraries/compressed-data/StakingQueueConfig.sol"; +import {EthPerFeeAssetE12, EthValue} from "@aztec/core/libraries/rollup/FeeLib.sol"; +import {Bps, RewardConfig} from "@aztec/core/libraries/rollup/RewardLib.sol"; +import {Inbox} from "@aztec/core/messagebridge/Inbox.sol"; +import {Outbox} from "@aztec/core/messagebridge/Outbox.sol"; +import {IBooster, RewardBooster, RewardBoostConfig} from "@aztec/core/reward-boost/RewardBooster.sol"; +import {Slasher} from "@aztec/core/slashing/Slasher.sol"; +import {SlashingProposer} from "@aztec/core/slashing/SlashingProposer.sol"; + +import {Governance} from "@aztec/governance/Governance.sol"; +import {GSE, IGSE, IGSECore} from "@aztec/governance/GSE.sol"; +import {GSEPayload} from "@aztec/governance/GSEPayload.sol"; +import {Proposal, ProposalState} from "@aztec/governance/interfaces/IGovernance.sol"; +import {IPayload} from "@aztec/governance/interfaces/IPayload.sol"; +import {IRegistry} from "@aztec/governance/interfaces/IRegistry.sol"; +import {Registry} from "@aztec/governance/Registry.sol"; +import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol"; +import {RewardDistributor} from "@aztec/governance/RewardDistributor.sol"; + +import {FlushRewarder} from "@aztec/periphery/FlushRewarder.sol"; +import {V5UpgradePayload} from "@aztec/periphery/V5UpgradePayload.sol"; + +import {Epoch, Timestamp} from "@aztec/shared/libraries/TimeMath.sol"; + +import {MockVerifier} from "@aztec/mock/MockVerifier.sol"; + +import {HonkVerifier} from "./HonkVerifier.sol"; +import {DeployRollupLib, RollupAddressOutput} from "./DeployRollupLib.sol"; +import {IRollupConfiguration, RollupConfiguration} from "./RollupConfiguration.sol"; + +/// @title DeployRollupForUpgradeV5 +/// @author Aztec Labs +/// @notice Deploys the v5 rollup, v5 reward distributor, the v5 escape hatch, and the +/// V5UpgradePayload that governance must execute to make the deployment canonical. +/// +/// Runs only on mainnet or Sepolia: the existing L1 infrastructure (registry, governance, GSE, +/// assets, distributor, flush rewarder) is a hardcoded per-chain table cross-checked against +/// live chain state before anything is deployed (`REGISTRY_ADDRESS`, when set, is asserted +/// against the table). The v5 reward distributor is deployed first so it can be wired into the +/// v5 rollup constructor; both the v4 (current) distributor's address and the new one are +/// captured by the payload at its construction. +/// +/// The rollup configuration needs no environment: every env var RollupConfiguration reads is +/// pinned in-script from the per-chain `ExpectedConfig` table before the config is loaded. +/// See V5UpgradePayload.sol for the actions executed when governance accepts the payload. +/// +/// `run()` finishes by calling `validate(payload)`, which asserts the payload's immutables +/// against live chain state, the exact action encodings, the escape-hatch configuration, +/// every rollup-config knob against the hardcoded per-chain expectations (so env drift fails +/// loudly), the staking-queue config, the slasher stack, and then simulates the full +/// governance lifecycle (GSEPayload wrap → propose → vote → execute) against a state snapshot +/// that is reverted afterwards. Re-run the validation against an already-deployed payload with +/// `--sig 'validate(address)' `. +contract DeployRollupForUpgradeV5 is Script, StdAssertions { + using stdStorage for StdStorage; + + error DeployRollupForUpgradeV5__SnapshotRevertFailed(uint256 snapshotId); + error DeployRollupForUpgradeV5__UnsupportedChain(uint256 chainId); + error DeployRollupForUpgradeV5__MainnetDeploymentBlocked(); + + uint256 internal constant MAINNET_CHAIN_ID = 1; + uint256 internal constant SEPOLIA_CHAIN_ID = 11_155_111; + + /// @notice Pre-upgrade L1 infrastructure for a chain, asserted against live state before + /// anything is deployed. + struct ExpectedAddresses { + address registry; + address governance; + address gse; + address canonicalRollup; + address feeAsset; + address stakingAsset; + address rewardDistributor; + address oldFlushRewarder; + } + + /// @notice Every rollup-configuration knob of the v5 deploy. + struct ExpectedConfig { + uint256 slotDuration; + uint256 epochDuration; + uint256 targetCommitteeSize; + uint256 lagInEpochsForValidatorSet; + uint256 lagInEpochsForRandao; + uint256 inboxLag; + uint256 proofSubmissionEpochs; + uint256 activationThreshold; + uint256 ejectionThreshold; + uint256 localEjectionThreshold; + uint256 exitDelaySeconds; + uint256 manaTarget; + uint256 provingCostPerMana; + uint256 initialEthPerFeeAsset; + uint256 slashingRoundSizeInEpochs; + uint256 slashingQuorum; + uint256 slashingLifetimeInRounds; + uint256 slashingExecutionDelayInRounds; + uint256 slashingOffsetInRounds; + address slashingVetoer; + uint256 slashingDisableDuration; + uint256 slashAmountSmall; + uint256 slashAmountMedium; + uint256 slashAmountLarge; + StakingQueueConfig stakingQueueConfig; + uint16 sequencerBps; + uint96 checkpointReward; + RewardBoostConfig rewardBoostConfig; + } + + uint96 internal constant ESCAPE_HATCH_BOND_SIZE = 332_000_000e18; + uint96 internal constant ESCAPE_HATCH_WITHDRAWAL_TAX = 1_660_000e18; + uint96 internal constant ESCAPE_HATCH_FAILED_HATCH_PUNISHMENT = 9_600_000e18; + uint256 internal constant ESCAPE_HATCH_FREQUENCY = 112; + uint256 internal constant ESCAPE_HATCH_ACTIVE_DURATION = 2; + uint256 internal constant ESCAPE_HATCH_LAG_IN_HATCHES = 1; + uint256 internal constant ESCAPE_HATCH_PROPOSING_EXIT_DELAY = 30 days; + uint256 internal constant ESCAPE_HATCH_LAG_IN_EPOCHS_FOR_SET_SIZE = 2; + uint256 internal constant ESCAPE_HATCH_LAG_IN_EPOCHS_FOR_RANDAO = 1; + + bytes32 internal constant STAKING_SLOT = keccak256("aztec.core.staking.storage"); + uint256 internal constant STAKING_QUEUE_CONFIG_SLOT_OFFSET = 5; + + // Constants taken from aztec-packages-private/v5-next@e56e4904ba75f38e041de3a5ed663b815c8f48f8 + bytes32 internal constant EXPECTED_VK_TREE_ROOT = 0x2b3b6ea4412b9c8f6457a37f91a2870306f8641e07e16a49b68bda6f8bc02892; + bytes32 internal constant EXPECTED_PROTOCOL_CONTRACTS_HASH = + 0x2c075866eafc88a1f6f9addc7e337c6e64e45d1cb7fd7c0d612ebcec72aab2ca; + bytes32 internal constant EXPECTED_GENESIS_ARCHIVE_ROOT = + 0x177a4955b31ecaafad999753938a44e526b54c5ba5d536688227f85f15cfbdf5; + + uint256 internal constant ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE = 500; + uint256 internal constant ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE = 4; + uint256 internal constant ENTRY_QUEUE_FLUSH_SIZE_MIN = 1; + uint256 internal constant ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT = 400; + uint256 internal constant ENTRY_QUEUE_MAX_FLUSH_SIZE = 4; + + struct SimulationSnapshot { + address oldCanonicalRollup; + uint256 versions; + uint256 totalSupply; + uint256 bonusSupply; + uint256 oldRdBalance; + uint256 newRdBalance; + uint256 flushFundsToMove; + uint256 oldFlushBalance; + uint256 newFlushBalance; + } + + RollupAddressOutput internal _rollupOutput; + RewardDistributor internal _newRewardDistributor; + IEscapeHatch internal _escapeHatch; + V5UpgradePayload internal _payload; + + function rollupOutput() external view returns (RollupAddressOutput memory) { + return _rollupOutput; + } + + function newRewardDistributor() external view returns (RewardDistributor) { + return _newRewardDistributor; + } + + function escapeHatch() external view returns (IEscapeHatch) { + return _escapeHatch; + } + + function payload() external view returns (V5UpgradePayload) { + return _payload; + } + + function _expectedAddresses() internal view returns (ExpectedAddresses memory) { + if (block.chainid == MAINNET_CHAIN_ID) { + return ExpectedAddresses({ + registry: 0x35b22e09Ee0390539439E24f06Da43D83f90e298, + governance: 0x1102471Eb3378FEE427121c9EfcEa452E4B6B75e, + gse: 0xa92ecFD0E70c9cd5E5cd76c50Af0F7Da93567a4f, + canonicalRollup: 0xAe2001f7e21d5EcABf6234E9FDd1E76F50F74962, + feeAsset: 0xA27EC0006e59f245217Ff08CD52A7E8b169E62D2, + stakingAsset: 0xA27EC0006e59f245217Ff08CD52A7E8b169E62D2, + rewardDistributor: 0x3D6A1B00C830C5f278FC5dFb3f6Ff0b74Db6dfe0, + oldFlushRewarder: 0xf1AcfB0C6ADd7104e700b8FAd3Ea025dbB041F34 + }); + } + if (block.chainid == SEPOLIA_CHAIN_ID) { + return ExpectedAddresses({ + registry: 0xA0BFb1B494FB49041e5c6e8c2C1BE09cD171c6Ba, + governance: 0xCAf7447721447B22Cd0076aC7C63877c3AFD329F, + gse: 0xb6A38A51a6C1de9012f9d8EA9745ef957212eAaC, + canonicalRollup: 0xf6D0D42aCE06829bECB78C74F49879528fC632c1, + feeAsset: 0x762C132040fdA6183066Fa3B14d985ee55aA3C18, + stakingAsset: 0x5595cb9ED193cAc2C0Bc5393313bc6115817954B, + rewardDistributor: 0x030d2780E70F085c31D490268D3900d4CEa16606, + oldFlushRewarder: address(0) + }); + } + revert DeployRollupForUpgradeV5__UnsupportedChain(block.chainid); + } + + /// @notice The rollup config to deploy. Mainnet values are the baseline; Sepolia overrides + /// only the fields that diverge, per the `testnet` preset in + /// `spartan/environments/network-defaults.yml`. + function _expectedConfig() internal view returns (ExpectedConfig memory c) { + c = ExpectedConfig({ + slotDuration: 72, + epochDuration: 32, + targetCommitteeSize: 48, + lagInEpochsForValidatorSet: 2, + lagInEpochsForRandao: 1, + // inbox lag updated in AZIP-6 Pipelined block building + inboxLag: 2, + proofSubmissionEpochs: 1, + activationThreshold: 200_000e18, + ejectionThreshold: 100_000e18, + localEjectionThreshold: 190_000e18, + exitDelaySeconds: 345_600, + manaTarget: 75_000_000, + // provingCostPerMana updated in AZIP-16 Activate Equivocation Slashing and Update Economic Parameters + provingCostPerMana: 12_500_000, + // Taken on 2026-06-11 when 1 eth = $1640, 1 AZTEC = $0.0156. E12 representation. + initialEthPerFeeAsset: 9_512_195, + slashingRoundSizeInEpochs: 4, + slashingQuorum: 65, + slashingLifetimeInRounds: 34, + slashingExecutionDelayInRounds: 28, + slashingOffsetInRounds: 2, + slashingVetoer: 0xBbB4aF368d02827945748b28CD4b2D42e4A37480, + slashingDisableDuration: 259_200, + // Slash amounts updated in AZIP-16 Activate Equivocation Slashing and Update Economic Parameters + slashAmountSmall: 2000e18, + slashAmountMedium: 5000e18, + slashAmountLarge: 5000e18, + stakingQueueConfig: _stakingQueueConfig(), + sequencerBps: 7000, + checkpointReward: 500e18, + // Updated in AZIP-5 Optimise prover rewards for consistency + rewardBoostConfig: RewardBoostConfig({ + increment: 101_400, maxScore: 367_500, a: 250_000, minimum: 10_000, k: 1_000_000 + }) + }); + + if (block.chainid == MAINNET_CHAIN_ID) { + return c; + } + if (block.chainid == SEPOLIA_CHAIN_ID) { + c.localEjectionThreshold = 199_000e18; + c.exitDelaySeconds = 172_800; + c.slashingLifetimeInRounds = 5; + c.slashingExecutionDelayInRounds = 2; + c.slashingVetoer = 0xdfe19Da6a717b7088621d8bBB66be59F2d78e924; + c.slashingDisableDuration = 432_000; + // testnet preset (AZIP-16): slashes the full stake, harsher than mainnet. + c.slashAmountSmall = 100_000e18; + c.slashAmountMedium = 250_000e18; + c.slashAmountLarge = 250_000e18; + return c; + } + revert DeployRollupForUpgradeV5__UnsupportedChain(block.chainid); + } + + function _stakingQueueConfig() internal pure returns (StakingQueueConfig memory) { + return StakingQueueConfig({ + bootstrapValidatorSetSize: ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE, + bootstrapFlushSize: ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE, + normalFlushSizeMin: ENTRY_QUEUE_FLUSH_SIZE_MIN, + normalFlushSizeQuotient: ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT, + maxQueueFlushSize: ENTRY_QUEUE_MAX_FLUSH_SIZE + }); + } + + /// @dev RollupConfiguration reads its inputs from env vars. Pin every one of them to the + /// per-chain expected table (and the genesis pins) so the bare `forge script` invocation + /// needs no config environment and the deploy cannot drift from what validate() asserts. + function _pinConfigEnv() internal { + ExpectedConfig memory ec = _expectedConfig(); + + vm.setEnv("REAL_VERIFIER", "true"); + vm.setEnv("VK_TREE_ROOT", vm.toString(EXPECTED_VK_TREE_ROOT)); + vm.setEnv("PROTOCOL_CONTRACTS_HASH", vm.toString(EXPECTED_PROTOCOL_CONTRACTS_HASH)); + vm.setEnv("GENESIS_ARCHIVE_ROOT", vm.toString(EXPECTED_GENESIS_ARCHIVE_ROOT)); + + vm.setEnv("AZTEC_SLOT_DURATION", vm.toString(ec.slotDuration)); + vm.setEnv("AZTEC_EPOCH_DURATION", vm.toString(ec.epochDuration)); + vm.setEnv("AZTEC_TARGET_COMMITTEE_SIZE", vm.toString(ec.targetCommitteeSize)); + vm.setEnv("AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET", vm.toString(ec.lagInEpochsForValidatorSet)); + vm.setEnv("AZTEC_LAG_IN_EPOCHS_FOR_RANDAO", vm.toString(ec.lagInEpochsForRandao)); + vm.setEnv("AZTEC_INBOX_LAG", vm.toString(ec.inboxLag)); + vm.setEnv("AZTEC_PROOF_SUBMISSION_EPOCHS", vm.toString(ec.proofSubmissionEpochs)); + vm.setEnv("AZTEC_LOCAL_EJECTION_THRESHOLD", vm.toString(ec.localEjectionThreshold)); + vm.setEnv("AZTEC_EXIT_DELAY_SECONDS", vm.toString(ec.exitDelaySeconds)); + vm.setEnv("AZTEC_MANA_TARGET", vm.toString(ec.manaTarget)); + vm.setEnv("AZTEC_PROVING_COST_PER_MANA", vm.toString(ec.provingCostPerMana)); + vm.setEnv("AZTEC_INITIAL_ETH_PER_FEE_ASSET", vm.toString(ec.initialEthPerFeeAsset)); + + vm.setEnv("AZTEC_SLASHER_ENABLED", "true"); + vm.setEnv("AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS", vm.toString(ec.slashingRoundSizeInEpochs)); + vm.setEnv("AZTEC_SLASHING_QUORUM", vm.toString(ec.slashingQuorum)); + vm.setEnv("AZTEC_SLASHING_LIFETIME_IN_ROUNDS", vm.toString(ec.slashingLifetimeInRounds)); + vm.setEnv("AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS", vm.toString(ec.slashingExecutionDelayInRounds)); + vm.setEnv("AZTEC_SLASHING_OFFSET_IN_ROUNDS", vm.toString(ec.slashingOffsetInRounds)); + vm.setEnv("AZTEC_SLASHING_VETOER", vm.toString(ec.slashingVetoer)); + vm.setEnv("AZTEC_SLASHING_DISABLE_DURATION", vm.toString(ec.slashingDisableDuration)); + vm.setEnv("AZTEC_SLASH_AMOUNT_SMALL", vm.toString(ec.slashAmountSmall)); + vm.setEnv("AZTEC_SLASH_AMOUNT_MEDIUM", vm.toString(ec.slashAmountMedium)); + vm.setEnv("AZTEC_SLASH_AMOUNT_LARGE", vm.toString(ec.slashAmountLarge)); + + vm.setEnv("AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE", vm.toString(ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE)); + vm.setEnv("AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE", vm.toString(ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE)); + vm.setEnv("AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN", vm.toString(ENTRY_QUEUE_FLUSH_SIZE_MIN)); + vm.setEnv("AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT", vm.toString(ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT)); + vm.setEnv("AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE", vm.toString(ENTRY_QUEUE_MAX_FLUSH_SIZE)); + } + + /// @notice Cross-checks the hardcoded per-chain address book against live chain state. + function _assertExpectedAddresses() internal view returns (ExpectedAddresses memory expected) { + console.log("[assert] expected addresses start"); + expected = _expectedAddresses(); + IRegistry registry = IRegistry(expected.registry); + IStaking canonicalRollup = IStaking(expected.canonicalRollup); + + address envRegistry = vm.envOr("REGISTRY_ADDRESS", address(0)); + if (envRegistry != address(0)) { + assertEq(envRegistry, expected.registry, "REGISTRY_ADDRESS env mismatch"); + } + + assertEq(registry.getGovernance(), expected.governance, "governance mismatch"); + assertEq(address(registry.getCanonicalRollup()), expected.canonicalRollup, "canonical rollup mismatch"); + assertEq(address(registry.getRewardDistributor()), expected.rewardDistributor, "reward distributor mismatch"); + assertEq(address(canonicalRollup.getGSE()), expected.gse, "gse mismatch"); + assertEq(address(IRollup(expected.canonicalRollup).getFeeAsset()), expected.feeAsset, "fee asset mismatch"); + assertEq(address(canonicalRollup.getStakingAsset()), expected.stakingAsset, "staking asset mismatch"); + if (expected.oldFlushRewarder != address(0)) { + FlushRewarder oldFlush = FlushRewarder(expected.oldFlushRewarder); + assertEq(Ownable(address(oldFlush)).owner(), expected.governance, "old flush rewarder owner mismatch"); + assertEq(address(oldFlush.ROLLUP()), expected.canonicalRollup, "old flush rewarder rollup mismatch"); + } + console.log(unicode"[assert] expected addresses ✓"); + } + + function run() public { + ExpectedAddresses memory expected = _assertExpectedAddresses(); + Registry registry = Registry(expected.registry); + address deployer = vm.envOr("DEPLOYER_ADDRESS", msg.sender); + + _pinConfigEnv(); + + IRollupConfiguration rollupConfig = new RollupConfiguration(); + rollupConfig.loadConfig(); + + IStaking v4Rollup = IStaking(address(registry.getCanonicalRollup())); + GSE gse = v4Rollup.getGSE(); + IERC20 feeAsset = IRollup(address(v4Rollup)).getFeeAsset(); + IERC20 stakingAsset = v4Rollup.getStakingAsset(); + Governance governance = Governance(registry.getGovernance()); + + vm.startBroadcast(deployer); + + // 1. Deploy the v5 reward distributor. It reads canonical from the same registry, so once + // the V5UpgradePayload makes v5 the canonical rollup, this distributor's implicit pool + // becomes claimable by v5. + _newRewardDistributor = new RewardDistributor(feeAsset, registry); + + // 2. Deploy the v5 rollup, binding it to the new distributor at construction. The rollup + // is deployed directly (not via DeployRollupLib) so that governance is the constructor + // governance arg: that address becomes the slasher's immutable GOVERNANCE, which a + // post-deploy Ownable transfer cannot fix. None of the lib's deployer-owned setup + // (registry/GSE registration, initial validators) applies to an upgrade. + _rollupOutput.verifier = + rollupConfig.useRealVerifier() ? IVerifier(address(new HonkVerifier())) : IVerifier(address(new MockVerifier())); + _rollupOutput.rollup = new Rollup( + feeAsset, + stakingAsset, + gse, + _rollupOutput.verifier, + address(governance), + rollupConfig.getGenesisState(), + rollupConfig.getRollupConfiguration(IRewardDistributor(address(_newRewardDistributor))) + ); + + // 3. Deploy the escape hatch for the v5 rollup. It stays inert until the payload's + // `setEscapeHatch` action activates it on the rollup. + _escapeHatch = IEscapeHatch( + address( + new EscapeHatch( + address(_rollupOutput.rollup), + address(stakingAsset), + ESCAPE_HATCH_BOND_SIZE, + ESCAPE_HATCH_WITHDRAWAL_TAX, + ESCAPE_HATCH_FAILED_HATCH_PUNISHMENT, + ESCAPE_HATCH_FREQUENCY, + ESCAPE_HATCH_ACTIVE_DURATION, + ESCAPE_HATCH_LAG_IN_HATCHES, + ESCAPE_HATCH_PROPOSING_EXIT_DELAY + ) + ) + ); + + // 4. Deploy the upgrade payload. Captures the current registry distributor as OLD, and — + // on chains with a flush rewarder — deploys the v5 flush rewarder in its constructor + // and appends the flush-rewarder migration action. + FlushRewarder oldFlushRewarder = FlushRewarder(expected.oldFlushRewarder); + _payload = new V5UpgradePayload( + registry, + IInstance(address(_rollupOutput.rollup)), + IRewardDistributor(address(_newRewardDistributor)), + feeAsset, + _escapeHatch, + oldFlushRewarder + ); + + vm.stopBroadcast(); + + validate(_payload); + _writeDeploymentOutput(); + } + + /// @notice Asserts the payload's wiring against live chain state and the hardcoded per-chain + /// expectations, then simulates governance executing it. Re-runnable post-deploy: + /// `--sig 'validate(address)' `. + function validate(V5UpgradePayload _payloadToValidate) public { + assertNotEq(address(_payloadToValidate), address(0), "payload is zero"); + _assertExpectedAddresses(); + _validatePayloadImmutables(_payloadToValidate); + _validatePayloadActions(_payloadToValidate); + _validateEscapeHatchConfig(_payloadToValidate); + _validateGenesisState(_payloadToValidate); + _validateRollupGetterConfig(_payloadToValidate); + _validateStakingQueueConfig(_payloadToValidate); + _validateSlasherStack(_payloadToValidate); + _simulateExecution(_payloadToValidate); + } + + function _validateGenesisState(V5UpgradePayload _p) internal view { + console.log("[assert] genesis state start"); + IRollup rollupCore = IRollup(address(_p.NEW_ROLLUP())); + assertEq(rollupCore.getVkTreeRoot(), EXPECTED_VK_TREE_ROOT, "vk tree root mismatch"); + assertEq( + rollupCore.getProtocolContractsHash(), EXPECTED_PROTOCOL_CONTRACTS_HASH, "protocol contracts hash mismatch" + ); + assertEq(rollupCore.archiveAt(0), EXPECTED_GENESIS_ARCHIVE_ROOT, "genesis archive root mismatch"); + console.log(unicode"[assert] genesis state ✓"); + } + + function _validatePayloadImmutables(V5UpgradePayload _p) internal view { + console.log("[assert] payload immutables start"); + ExpectedAddresses memory expected = _expectedAddresses(); + IRegistry registry = _p.REGISTRY(); + address governance = registry.getGovernance(); + IInstance newRollup = _p.NEW_ROLLUP(); + address oldCanonicalRollup = address(registry.getCanonicalRollup()); + + assertEq(address(registry), expected.registry, "payload registry mismatch"); + assertEq(address(_p.OLD_FLUSH_REWARDER()), expected.oldFlushRewarder, "payload flush rewarder mismatch"); + assertEq(_p.OLD_REWARD_DISTRIBUTOR(), address(registry.getRewardDistributor()), "old distributor drifted"); + assertNotEq(address(newRollup), oldCanonicalRollup, "new rollup already canonical"); + assertEq(Ownable(address(newRollup)).owner(), governance, "new rollup not owned by governance"); + assertNotEq(address(_p.NEW_REWARD_DISTRIBUTOR()), _p.OLD_REWARD_DISTRIBUTOR(), "distributor alias"); + assertEq(address(_p.ASSET()), address(IRollup(address(newRollup)).getFeeAsset()), "asset is not the fee asset"); + assertGt(bytes(_p.getURI()).length, 0, "payload uri empty"); + + // The v5 rollup binds its distributor immutably, so the distributor's own immutables must + // match the chain it serves: a wrong ASSET strands the drained pool (claim transfers ASSET, + // not whatever was deposited), a wrong REGISTRY breaks canonical resolution. + RewardDistributor newRd = RewardDistributor(address(_p.NEW_REWARD_DISTRIBUTOR())); + assertEq(address(newRd.ASSET()), expected.feeAsset, "new distributor asset mismatch"); + assertEq(address(newRd.REGISTRY()), expected.registry, "new distributor registry mismatch"); + + assertNotEq(address(_p.ESCAPE_HATCH()), address(0), "escape hatch missing"); + assertEq(_p.ESCAPE_HATCH().getRollup(), address(newRollup), "escape hatch rollup mismatch"); + assertEq(address(newRollup.getEscapeHatch()), address(0), "new rollup hatch slot not empty"); + assertEq( + address(newRollup.getEscapeHatchForEpoch(newRollup.getCurrentEpoch())), address(0), "epoch hatch not empty" + ); + + FlushRewarder oldFlush = _p.OLD_FLUSH_REWARDER(); + FlushRewarder newFlush = _p.NEW_FLUSH_REWARDER(); + if (address(oldFlush) == address(0)) { + assertEq(address(newFlush), address(0), "unexpected new flush rewarder"); + } else { + assertEq(Ownable(address(oldFlush)).owner(), governance, "old flush rewarder owner mismatch"); + assertEq(address(oldFlush.ROLLUP()), oldCanonicalRollup, "old flush rewarder rollup mismatch"); + assertNotEq(address(newFlush), address(oldFlush), "flush rewarder alias"); + assertEq(Ownable(address(newFlush)).owner(), governance, "new flush rewarder owner mismatch"); + assertEq(address(newFlush.ROLLUP()), address(newRollup), "new flush rewarder rollup mismatch"); + assertEq(address(newFlush.REWARD_ASSET()), address(oldFlush.REWARD_ASSET()), "flush reward asset mismatch"); + assertEq(newFlush.rewardPerInsertion(), oldFlush.rewardPerInsertion(), "flush reward rate mismatch"); + assertEq(oldFlush.REWARD_ASSET().balanceOf(address(newFlush)), 0, "new flush rewarder unexpectedly funded"); + } + console.log(unicode"[assert] payload immutables ✓"); + } + + function _validatePayloadActions(V5UpgradePayload _p) internal view { + console.log("[assert] payload actions start"); + IPayload.Action[] memory actions = _p.getActions(); + bool migratesFlush = address(_p.OLD_FLUSH_REWARDER()) != address(0); + assertEq(actions.length, migratesFlush ? 6 : 5, "action count mismatch"); + + bytes memory expectedDrain = abi.encodeWithSelector( + _p.LEGACY_RECOVER_SELECTOR(), + address(_p.ASSET()), + address(_p.NEW_REWARD_DISTRIBUTOR()), + _p.ASSET().balanceOf(_p.OLD_REWARD_DISTRIBUTOR()) + ); + assertEq(actions[0].target, _p.OLD_REWARD_DISTRIBUTOR(), "action0 target mismatch"); + assertEq(keccak256(actions[0].data), keccak256(expectedDrain), "action0 data mismatch"); + + bytes memory expectedAddRollup = abi.encodeWithSelector(IRegistry.addRollup.selector, address(_p.NEW_ROLLUP())); + assertEq(actions[1].target, address(_p.REGISTRY()), "action1 target mismatch"); + assertEq(keccak256(actions[1].data), keccak256(expectedAddRollup), "action1 data mismatch"); + + bytes memory expectedUpdateRd = + abi.encodeWithSelector(IRegistry.updateRewardDistributor.selector, address(_p.NEW_REWARD_DISTRIBUTOR())); + assertEq(actions[2].target, address(_p.REGISTRY()), "action2 target mismatch"); + assertEq(keccak256(actions[2].data), keccak256(expectedUpdateRd), "action2 data mismatch"); + + bytes memory expectedAddGse = abi.encodeWithSelector(IGSECore.addRollup.selector, address(_p.NEW_ROLLUP())); + assertEq(actions[3].target, address(_p.NEW_ROLLUP().getGSE()), "action3 target mismatch"); + assertEq(keccak256(actions[3].data), keccak256(expectedAddGse), "action3 data mismatch"); + + bytes memory expectedSetHatch = + abi.encodeWithSelector(IValidatorSelectionCore.setEscapeHatch.selector, address(_p.ESCAPE_HATCH())); + assertEq(actions[4].target, address(_p.NEW_ROLLUP()), "action4 target mismatch"); + assertEq(keccak256(actions[4].data), keccak256(expectedSetHatch), "action4 data mismatch"); + + if (migratesFlush) { + bytes memory expectedFlushRecover = abi.encodeWithSelector( + FlushRewarder.recover.selector, + address(_p.NEW_FLUSH_REWARDER().REWARD_ASSET()), + address(_p.NEW_FLUSH_REWARDER()), + _p.OLD_FLUSH_REWARDER().rewardsAvailable() + ); + assertEq(actions[5].target, address(_p.OLD_FLUSH_REWARDER()), "action5 target mismatch"); + assertEq(keccak256(actions[5].data), keccak256(expectedFlushRecover), "action5 data mismatch"); + } + console.log(unicode"[assert] payload actions ✓"); + } + + function _validateEscapeHatchConfig(V5UpgradePayload _p) internal view { + console.log("[assert] escape hatch config start"); + EscapeHatch hatch = EscapeHatch(address(_p.ESCAPE_HATCH())); + address stakingAsset = address(IStaking(address(_p.NEW_ROLLUP())).getStakingAsset()); + + assertEq(hatch.getRollup(), address(_p.NEW_ROLLUP()), "hatch rollup mismatch"); + assertEq(hatch.getBondToken(), stakingAsset, "hatch bond token mismatch"); + assertEq(hatch.getBondSize(), ESCAPE_HATCH_BOND_SIZE, "hatch bond size mismatch"); + assertEq(hatch.getWithdrawalTax(), ESCAPE_HATCH_WITHDRAWAL_TAX, "hatch withdrawal tax mismatch"); + assertEq(hatch.getFailedHatchPunishment(), ESCAPE_HATCH_FAILED_HATCH_PUNISHMENT, "hatch punishment mismatch"); + assertEq(hatch.getFrequency(), ESCAPE_HATCH_FREQUENCY, "hatch frequency mismatch"); + assertEq(hatch.getActiveDuration(), ESCAPE_HATCH_ACTIVE_DURATION, "hatch active duration mismatch"); + assertEq(hatch.getLagInHatches(), ESCAPE_HATCH_LAG_IN_HATCHES, "hatch lag mismatch"); + assertEq(hatch.getProposingExitDelay(), ESCAPE_HATCH_PROPOSING_EXIT_DELAY, "hatch exit delay mismatch"); + assertEq(hatch.LAG_IN_EPOCHS_FOR_SET_SIZE(), ESCAPE_HATCH_LAG_IN_EPOCHS_FOR_SET_SIZE, "hatch set lag mismatch"); + assertEq(hatch.LAG_IN_EPOCHS_FOR_RANDAO(), ESCAPE_HATCH_LAG_IN_EPOCHS_FOR_RANDAO, "hatch randao lag mismatch"); + assertEq(hatch.getCandidateCount(), 0, "hatch candidate count mismatch"); + console.log(unicode"[assert] escape hatch config ✓"); + } + + function _validateRollupGetterConfig(V5UpgradePayload _p) internal view { + console.log("[assert] rollup getter config start"); + ExpectedAddresses memory ea = _expectedAddresses(); + ExpectedConfig memory ec = _expectedConfig(); + IInstance rollup = _p.NEW_ROLLUP(); + IRollup rollupCore = IRollup(address(rollup)); + + assertEq(Ownable(address(rollup)).owner(), ea.governance, "rollup owner mismatch"); + assertEq(address(rollupCore.getFeeAsset()), ea.feeAsset, "rollup fee asset mismatch"); + assertEq(address(rollup.getStakingAsset()), ea.stakingAsset, "rollup staking asset mismatch"); + assertEq(address(rollup.getGSE()), ea.gse, "rollup gse mismatch"); + assertEq( + address(rollupCore.getRewardDistributor()), address(_p.NEW_REWARD_DISTRIBUTOR()), "rollup distributor mismatch" + ); + + // The verifier is the one immutable that must never be a MockVerifier in production. Compare + // the deployed code's hash against the mock's compile-time runtime code so a mock is caught on + // both the run() path and the re-runnable validate(address) path (where _rollupOutput is unset). + IVerifier verifier = rollupCore.getEpochProofVerifier(); + assertNotEq(address(verifier), address(0), "verifier missing"); + assertTrue(address(verifier).codehash != keccak256(type(MockVerifier).runtimeCode), "verifier is a MockVerifier"); + if (address(_rollupOutput.verifier) != address(0)) { + assertEq(address(verifier), address(_rollupOutput.verifier), "verifier mismatch"); + } + + assertEq(rollup.getSlotDuration(), ec.slotDuration, "slot duration mismatch"); + assertEq(rollup.getEpochDuration(), ec.epochDuration, "epoch duration mismatch"); + assertEq(rollup.getTargetCommitteeSize(), ec.targetCommitteeSize, "committee size mismatch"); + assertEq(rollup.getLagInEpochsForValidatorSet(), ec.lagInEpochsForValidatorSet, "validator lag mismatch"); + assertEq(rollup.getLagInEpochsForRandao(), ec.lagInEpochsForRandao, "randao lag mismatch"); + assertEq(rollupCore.getProofSubmissionEpochs(), ec.proofSubmissionEpochs, "proof epochs mismatch"); + assertEq(rollup.getActivationThreshold(), ec.activationThreshold, "activation threshold mismatch"); + assertEq(rollup.getEjectionThreshold(), ec.ejectionThreshold, "ejection threshold mismatch"); + assertEq(rollup.getLocalEjectionThreshold(), ec.localEjectionThreshold, "local ejection threshold mismatch"); + assertEq(Timestamp.unwrap(rollup.getExitDelay()), ec.exitDelaySeconds, "exit delay mismatch"); + assertEq(rollupCore.getManaTarget(), ec.manaTarget, "mana target mismatch"); + assertEq(EthValue.unwrap(rollupCore.getProvingCostPerManaInEth()), ec.provingCostPerMana, "proving cost mismatch"); + assertEq( + EthPerFeeAssetE12.unwrap(rollupCore.getEthPerFeeAsset()), ec.initialEthPerFeeAsset, "eth per fee asset mismatch" + ); + + RewardConfig memory rewardConfig = rollupCore.getRewardConfig(); + assertEq( + address(rewardConfig.rewardDistributor), address(_p.NEW_REWARD_DISTRIBUTOR()), "reward distributor mismatch" + ); + assertEq(Bps.unwrap(rewardConfig.sequencerBps), ec.sequencerBps, "sequencer bps mismatch"); + assertEq(rewardConfig.checkpointReward, ec.checkpointReward, "checkpoint reward mismatch"); + assertNotEq(address(rewardConfig.booster), address(0), "booster missing"); + assertEq(address(RewardBooster(address(rewardConfig.booster)).ROLLUP()), address(rollup), "booster rollup mismatch"); + RewardBoostConfig memory boostConfig = IBooster(address(rewardConfig.booster)).getConfig(); + assertEq(boostConfig.increment, ec.rewardBoostConfig.increment, "boost increment mismatch"); + assertEq(boostConfig.maxScore, ec.rewardBoostConfig.maxScore, "boost max score mismatch"); + assertEq(boostConfig.a, ec.rewardBoostConfig.a, "boost a mismatch"); + assertEq(boostConfig.minimum, ec.rewardBoostConfig.minimum, "boost minimum mismatch"); + assertEq(boostConfig.k, ec.rewardBoostConfig.k, "boost k mismatch"); + + Inbox inbox = Inbox(address(rollupCore.getInbox())); + assertEq(inbox.ROLLUP(), address(rollup), "inbox rollup mismatch"); + assertEq(inbox.VERSION(), rollupCore.getVersion(), "inbox version mismatch"); + assertEq(inbox.LAG(), ec.inboxLag, "inbox lag mismatch"); + assertEq(inbox.FEE_ASSET_PORTAL(), address(rollupCore.getFeeAssetPortal()), "portal mismatch"); + Outbox outbox = Outbox(address(rollupCore.getOutbox())); + assertEq(address(outbox.ROLLUP()), address(rollup), "outbox rollup mismatch"); + assertEq(outbox.VERSION(), rollupCore.getVersion(), "outbox version mismatch"); + console.log(unicode"[assert] rollup getter config ✓"); + } + + function _validateStakingQueueConfig(V5UpgradePayload _p) internal view { + console.log("[assert] staking queue config start"); + StakingQueueConfig memory expected = _expectedConfig().stakingQueueConfig; + uint256 packed = + uint256(vm.load(address(_p.NEW_ROLLUP()), bytes32(uint256(STAKING_SLOT) + STAKING_QUEUE_CONFIG_SLOT_OFFSET))); + StakingQueueConfig memory actual = StakingQueueConfigLib.decompress(CompressedStakingQueueConfig.wrap(packed)); + + assertEq(actual.bootstrapValidatorSetSize, expected.bootstrapValidatorSetSize, "queue bootstrap set mismatch"); + assertEq(actual.bootstrapFlushSize, expected.bootstrapFlushSize, "queue bootstrap flush mismatch"); + assertEq(actual.normalFlushSizeMin, expected.normalFlushSizeMin, "queue flush min mismatch"); + assertEq(actual.normalFlushSizeQuotient, expected.normalFlushSizeQuotient, "queue flush quotient mismatch"); + assertEq(actual.maxQueueFlushSize, expected.maxQueueFlushSize, "queue max flush mismatch"); + console.log(unicode"[assert] staking queue config ✓"); + } + + function _validateSlasherStack(V5UpgradePayload _p) internal view { + console.log("[assert] slasher stack start"); + ExpectedAddresses memory ea = _expectedAddresses(); + ExpectedConfig memory ec = _expectedConfig(); + address slasherAddress = IStaking(address(_p.NEW_ROLLUP())).getSlasher(); + Slasher slasher = Slasher(slasherAddress); + SlashingProposer proposer = SlashingProposer(slasher.PROPOSER()); + + assertNotEq(slasherAddress, address(0), "slasher missing"); + assertEq(slasher.GOVERNANCE(), ea.governance, "slasher governance mismatch"); + assertEq(slasher.VETOER(), ec.slashingVetoer, "slasher vetoer mismatch"); + assertEq(slasher.SLASHING_DISABLE_DURATION(), ec.slashingDisableDuration, "slasher disable duration mismatch"); + assertNotEq(address(proposer), address(0), "slashing proposer missing"); + assertEq(proposer.INSTANCE(), address(_p.NEW_ROLLUP()), "proposer instance mismatch"); + assertEq(address(proposer.SLASHER()), slasherAddress, "proposer slasher mismatch"); + assertEq(proposer.QUORUM(), ec.slashingQuorum, "proposer quorum mismatch"); + assertEq(proposer.ROUND_SIZE(), ec.slashingRoundSizeInEpochs * ec.epochDuration, "proposer round size mismatch"); + assertEq(proposer.ROUND_SIZE_IN_EPOCHS(), ec.slashingRoundSizeInEpochs, "proposer epoch round mismatch"); + assertEq(proposer.LIFETIME_IN_ROUNDS(), ec.slashingLifetimeInRounds, "proposer lifetime mismatch"); + assertEq( + proposer.EXECUTION_DELAY_IN_ROUNDS(), ec.slashingExecutionDelayInRounds, "proposer execution delay mismatch" + ); + assertEq(proposer.SLASH_OFFSET_IN_ROUNDS(), ec.slashingOffsetInRounds, "proposer slash offset mismatch"); + assertEq(proposer.SLASH_AMOUNT_SMALL(), ec.slashAmountSmall, "proposer slash small mismatch"); + assertEq(proposer.SLASH_AMOUNT_MEDIUM(), ec.slashAmountMedium, "proposer slash medium mismatch"); + assertEq(proposer.SLASH_AMOUNT_LARGE(), ec.slashAmountLarge, "proposer slash large mismatch"); + assertEq(proposer.COMMITTEE_SIZE(), ec.targetCommitteeSize, "proposer committee size mismatch"); + assertNotEq(proposer.SLASH_PAYLOAD_IMPLEMENTATION(), address(0), "slash payload implementation missing"); + + // A freshly deployed rollup must carry no slasher-migration state: a non-zero legacy or + // pending slasher would mean the deploy inherited stale state and could slash unexpectedly. + (address legacySlasher,) = IStaking(address(_p.NEW_ROLLUP())).getLegacySlasher(); + assertEq(legacySlasher, address(0), "unexpected legacy slasher on fresh rollup"); + (address pendingSlasher,) = IStaking(address(_p.NEW_ROLLUP())).getPendingSlasher(); + assertEq(pendingSlasher, address(0), "unexpected pending slasher on fresh rollup"); + console.log(unicode"[assert] slasher stack ✓"); + } + + /// @dev Wraps the payload in a GSEPayload (as GovernanceProposer does), walks the proposal + /// through the full governance lifecycle, executes it, asserts the post-state, and + /// reverts to a snapshot so the validation leaves no trace. + function _simulateExecution(V5UpgradePayload _p) internal { + console.log("[assert] simulate execution start"); + IRegistry registry = _p.REGISTRY(); + Governance governance = Governance(registry.getGovernance()); + IGSE gse = IGSE(address(_p.NEW_ROLLUP().getGSE())); + + SimulationSnapshot memory before = _captureSnapshot(_p, registry, gse); + + uint256 snapshotId = vm.snapshotState(); + + _executeThroughGovernance(_p, governance, gse, before.oldCanonicalRollup); + _assertPostState(_p, registry, gse, before); + + if (!vm.revertToState(snapshotId)) { + revert DeployRollupForUpgradeV5__SnapshotRevertFailed(snapshotId); + } + console.log(unicode"[assert] simulate execution ✓"); + } + + function _captureSnapshot(V5UpgradePayload _p, IRegistry _registry, IGSE _gse) + internal + view + returns (SimulationSnapshot memory snap) + { + snap.oldCanonicalRollup = address(_registry.getCanonicalRollup()); + snap.versions = _registry.numberOfVersions(); + snap.totalSupply = _gse.totalSupply(); + snap.bonusSupply = _gse.supplyOf(_gse.getBonusInstanceAddress()); + snap.oldRdBalance = _p.ASSET().balanceOf(_p.OLD_REWARD_DISTRIBUTOR()); + snap.newRdBalance = _p.ASSET().balanceOf(address(_p.NEW_REWARD_DISTRIBUTOR())); + if (address(_p.OLD_FLUSH_REWARDER()) != address(0)) { + IERC20 flushAsset = _p.OLD_FLUSH_REWARDER().REWARD_ASSET(); + snap.flushFundsToMove = _p.OLD_FLUSH_REWARDER().rewardsAvailable(); + snap.oldFlushBalance = flushAsset.balanceOf(address(_p.OLD_FLUSH_REWARDER())); + snap.newFlushBalance = flushAsset.balanceOf(address(_p.NEW_FLUSH_REWARDER())); + } + } + + function _executeThroughGovernance(V5UpgradePayload _p, Governance _governance, IGSE _gse, address _oldCanonical) + internal + { + GSEPayload gsePayload = new GSEPayload(IPayload(address(_p)), _gse, _p.REGISTRY()); + _validateGsePayloadWrapper(_p, gsePayload); + + // A simulation-only depositor with a majority of governance power guarantees the proposal + // passes regardless of how power is distributed (on Sepolia the GSE holds ~2% of it; the + // rest sits with direct depositors this simulation cannot speak for). The deposit happens + // inside the snapshot that _simulateExecution reverts. + address simVoter = address(uint160(uint256(keccak256("DeployRollupForUpgradeV5.simVoter")))); + uint256 simPower = _governance.totalPowerAt(Timestamp.wrap(block.timestamp - 1)) * 2; + IERC20 govAsset = _governance.ASSET(); + stdstore.target(address(govAsset)).sig(IERC20.balanceOf.selector).with_key(simVoter).checked_write(simPower); + vm.startPrank(simVoter); + govAsset.approve(address(_governance), simPower); + _governance.deposit(simVoter, simPower); + vm.stopPrank(); + + vm.prank(_governance.governanceProposer()); + uint256 proposalId = _governance.propose(IPayload(address(gsePayload))); + + Proposal memory proposal = _governance.getProposal(proposalId); + Timestamp pendingThrough = + Timestamp.wrap(Timestamp.unwrap(proposal.creation) + Timestamp.unwrap(proposal.config.votingDelay)); + Timestamp activeThrough = + Timestamp.wrap(Timestamp.unwrap(pendingThrough) + Timestamp.unwrap(proposal.config.votingDuration)); + Timestamp queuedThrough = + Timestamp.wrap(Timestamp.unwrap(activeThrough) + Timestamp.unwrap(proposal.config.executionDelay)); + + vm.warp(Timestamp.unwrap(pendingThrough) + 1); + assertEq(uint256(_governance.getProposalState(proposalId)), uint256(ProposalState.Active), "proposal not active"); + + uint256 oldRollupVoteAmount = _gse.getVotingPowerAt(_oldCanonical, pendingThrough); + if (oldRollupVoteAmount > 0) { + vm.prank(_oldCanonical); + _gse.vote(proposalId, oldRollupVoteAmount, true); + } + uint256 bonusVoteAmount = _gse.getVotingPowerAt(_gse.getBonusInstanceAddress(), pendingThrough); + if (bonusVoteAmount > 0) { + vm.prank(_oldCanonical); + _gse.voteWithBonus(proposalId, bonusVoteAmount, true); + } + vm.prank(simVoter); + _governance.vote(proposalId, simPower, true); + + vm.warp(Timestamp.unwrap(queuedThrough) + 1); + assertEq( + uint256(_governance.getProposalState(proposalId)), uint256(ProposalState.Executable), "proposal not executable" + ); + + _governance.execute(proposalId); + assertEq( + uint256(_governance.getProposalState(proposalId)), uint256(ProposalState.Executed), "proposal not executed" + ); + } + + function _validateGsePayloadWrapper(V5UpgradePayload _p, GSEPayload _gsePayload) internal view { + IPayload.Action[] memory payloadActions = _p.getActions(); + IPayload.Action[] memory wrappedActions = _gsePayload.getActions(); + assertEq(wrappedActions.length, payloadActions.length + 1, "wrapped action count mismatch"); + + for (uint256 i = 0; i < payloadActions.length; i++) { + assertEq(wrappedActions[i].target, payloadActions[i].target, "wrapped target mismatch"); + assertEq(keccak256(wrappedActions[i].data), keccak256(payloadActions[i].data), "wrapped data mismatch"); + } + + uint256 terminalIndex = wrappedActions.length - 1; + assertEq(wrappedActions[terminalIndex].target, address(_gsePayload), "wrapped terminal target mismatch"); + assertEq( + keccak256(wrappedActions[terminalIndex].data), + keccak256(abi.encodeWithSelector(GSEPayload.amIValid.selector)), + "wrapped terminal data mismatch" + ); + } + + function _assertPostState(V5UpgradePayload _p, IRegistry _registry, IGSE _gse, SimulationSnapshot memory _before) + internal + view + { + console.log("[assert] post execution state start"); + IInstance newRollup = _p.NEW_ROLLUP(); + + assertEq(address(_registry.getCanonicalRollup()), address(newRollup), "canonical mismatch"); + assertEq(_registry.numberOfVersions(), _before.versions + 1, "version count mismatch"); + assertEq( + address(_registry.getRewardDistributor()), address(_p.NEW_REWARD_DISTRIBUTOR()), "distributor pointer mismatch" + ); + assertTrue(_gse.isRollupRegistered(address(newRollup)), "new rollup missing from gse"); + assertEq(_gse.getLatestRollup(), address(newRollup), "gse latest mismatch"); + + assertEq(_p.ASSET().balanceOf(_p.OLD_REWARD_DISTRIBUTOR()), 0, "old distributor not drained"); + assertEq( + _p.ASSET().balanceOf(address(_p.NEW_REWARD_DISTRIBUTOR())), + _before.newRdBalance + _before.oldRdBalance, + "new distributor balance mismatch" + ); + + // The hatch checkpoint is keyed to the next epoch: live immediately via the latest-checkpoint + // getter, but not active for the execution epoch itself. + assertEq(address(newRollup.getEscapeHatch()), address(_p.ESCAPE_HATCH()), "hatch not activated"); + Epoch executionEpoch = newRollup.getCurrentEpoch(); + assertEq(address(newRollup.getEscapeHatchForEpoch(executionEpoch)), address(0), "hatch active too early"); + assertEq( + address(newRollup.getEscapeHatchForEpoch(Epoch.wrap(Epoch.unwrap(executionEpoch) + 1))), + address(_p.ESCAPE_HATCH()), + "hatch not active next epoch" + ); + + if (address(_p.OLD_FLUSH_REWARDER()) != address(0)) { + IERC20 flushAsset = _p.OLD_FLUSH_REWARDER().REWARD_ASSET(); + assertEq(_p.OLD_FLUSH_REWARDER().rewardsAvailable(), 0, "old flush rewarder rewards not migrated"); + assertEq( + flushAsset.balanceOf(address(_p.OLD_FLUSH_REWARDER())), + _before.oldFlushBalance - _before.flushFundsToMove, + "old flush rewarder balance mismatch" + ); + assertEq( + flushAsset.balanceOf(address(_p.NEW_FLUSH_REWARDER())), + _before.newFlushBalance + _before.flushFundsToMove, + "new flush rewarder balance mismatch" + ); + } + + // The GSEPayload wrapper's amIValid already enforced the follower invariant during + // execution; re-derive it here so a regression in the wrapper is also caught. + uint256 newEffectiveSupply = _gse.supplyOf(address(newRollup)) + _gse.supplyOf(_gse.getBonusInstanceAddress()); + assertGt(newEffectiveSupply, _gse.totalSupply() * 2 / 3, "new rollup effective supply <= 2/3"); + console.log(unicode"[assert] post execution state ✓"); + } + + function _writeDeploymentOutput() internal { + DeployRollupLib.writeRollupAddressesToJson(vm, "v5", _rollupOutput); + vm.serializeAddress("v5", "newRewardDistributorAddress", address(_newRewardDistributor)); + vm.serializeAddress("v5", "oldRewardDistributorAddress", _payload.OLD_REWARD_DISTRIBUTOR()); + vm.serializeAddress("v5", "escapeHatchAddress", address(_escapeHatch)); + vm.serializeAddress("v5", "oldFlushRewarderAddress", address(_payload.OLD_FLUSH_REWARDER())); + vm.serializeAddress("v5", "newFlushRewarderAddress", address(_payload.NEW_FLUSH_REWARDER())); + string memory finalJson = vm.serializeAddress("v5", "payloadAddress", address(_payload)); + console.log("JSON DEPLOY RESULT:", finalJson); + } +} diff --git a/l1-contracts/script/deploy/HonkVerifier.sol b/l1-contracts/script/deploy/HonkVerifier.sol new file mode 100644 index 000000000000..c8868ca7a89a --- /dev/null +++ b/l1-contracts/script/deploy/HonkVerifier.sol @@ -0,0 +1,5671 @@ + +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2022 Aztec +pragma solidity ^0.8.27; + +// Note: copied from aztec-packages-private/v5-next@e56e4904ba75f38e041de3a5ed663b815c8f48f8 + +interface IVerifier { + function verify(bytes calldata _proof, bytes32[] calldata _publicInputs) external view returns (bool); +} + + + +uint256 constant NUMBER_OF_SUBRELATIONS = 29; +uint256 constant BATCHED_RELATION_PARTIAL_LENGTH = 8; +uint256 constant ZK_BATCHED_RELATION_PARTIAL_LENGTH = 9; +uint256 constant NUMBER_OF_ENTITIES = 41; +uint256 constant NUMBER_UNSHIFTED = 36; +uint256 constant NUMBER_TO_BE_SHIFTED = 5; +uint256 constant PAIRING_POINTS_SIZE = 8; + +uint256 constant VK_HASH = 0x2f0ca3e610369fc41f7fb8a69995a96428fbf69d7dffd2b576e63ba4d9511ee1; +uint256 constant CIRCUIT_SIZE = 16777216; +uint256 constant LOG_N = 24; +uint256 constant NUMBER_PUBLIC_INPUTS = 119; +uint256 constant REAL_NUMBER_PUBLIC_INPUTS = 111; +uint256 constant PUBLIC_INPUTS_OFFSET = 5; // NUM_DISABLED_ROWS_IN_SUMCHECK + NUM_ZERO_ROWS = 4 + 1 + +contract HonkVerifier is IVerifier { + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SLAB ALLOCATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + /** + * We manually manage memory within this optimised implementation. + * Memory is loaded into a large slab with the following layout: + * + * HIGH MEMORY (persistent, non-overlapping regions from 0x1000 upward): + * + * VK Data (circuit size, num PIs, offset, 28 G1 commitment points) + * Proof: Pairing point limbs (8 field elements) + * Proof: Witness commitments (W_L..Z_PERM, 8 G1 points) + * Proof: Sumcheck univariates (LOG_N rounds x 8 coefficients) + * Proof: Sumcheck evaluations (41 entity evaluations) + * Proof: Gemini fold commitments (LOG_N-1 G1 points) + * Proof: Gemini A evaluations (LOG_N field elements) + * Proof: Shplonk Q + KZG quotient (2 G1 points) + * Challenges (eta..sum_u, alpha[0..26], gate + sum_u challenges) + * Subrelation evaluations (28 slots, used during sumcheck) + * Subrelation intermediates (7 slots: round target, pow, AUX) + * Powers of evaluation challenge (LOG_N slots) + * Batch scalars (69 slots, for MSM) + * Gemini R inverse (1 slot) + * Inverted Gemini denominators (LOG_N+1 = 16 slots) + * Batch evaluation accumulator inversions (LOG_N slots) + * Batched eval, constant term accumulator, pos/neg inv denom + * Inverted challenge^pow - u (LOG_N slots) + * Pos inverted denominators (LOG_N slots) + * Neg inverted denominators (LOG_N slots) + * Fold pos evaluations (LOG_N slots) + * LATER_SCRATCH_SPACE (batch inversion products marker) + * Temporary space (45 slots, ephemeral computation) + * + * LOW MEMORY / SCRATCH SPACE (barycentric evaluation during sumcheck): + * Barycentric Lagrange denominators (8 domain points) + * Barycentric denominator inverses (LOG_N x 8 slots) + * [Slots at 0x1000-0x10E0 overlap VK data; VK is re-loaded later] + * + * Scratch aliases (0x00-0x40): CHALL_POW/SUMCHECK_U/GEMINI_A during sumcheck; + * SS_POS_INV_DENOM/SS_NEG_INV_DENOM/SS_GEMINI_EVALS during shplemini. + * MSM stage reuses 0x00-0xA0 for ACCUMULATOR, G1_LOCATION, SCALAR. + */ + + // {{ SECTION_START MEMORY_LAYOUT }} + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* VK INDICIES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant VK_CIRCUIT_SIZE_LOC = 0x1000; +uint256 internal constant VK_NUM_PUBLIC_INPUTS_LOC = 0x1020; +uint256 internal constant VK_PUB_INPUTS_OFFSET_LOC = 0x1040; +uint256 internal constant Q_M_X_LOC = 0x1060; +uint256 internal constant Q_M_Y_LOC = 0x1080; +uint256 internal constant Q_L_X_LOC = 0x10a0; +uint256 internal constant Q_L_Y_LOC = 0x10c0; +uint256 internal constant Q_R_X_LOC = 0x10e0; +uint256 internal constant Q_R_Y_LOC = 0x1100; +uint256 internal constant Q_O_X_LOC = 0x1120; +uint256 internal constant Q_O_Y_LOC = 0x1140; +uint256 internal constant Q_4_X_LOC = 0x1160; +uint256 internal constant Q_4_Y_LOC = 0x1180; +uint256 internal constant Q_C_X_LOC = 0x11a0; +uint256 internal constant Q_C_Y_LOC = 0x11c0; +uint256 internal constant Q_ARITH_X_LOC = 0x11e0; +uint256 internal constant Q_ARITH_Y_LOC = 0x1200; +uint256 internal constant SIGMA_1_X_LOC = 0x1220; +uint256 internal constant SIGMA_1_Y_LOC = 0x1240; +uint256 internal constant SIGMA_2_X_LOC = 0x1260; +uint256 internal constant SIGMA_2_Y_LOC = 0x1280; +uint256 internal constant SIGMA_3_X_LOC = 0x12a0; +uint256 internal constant SIGMA_3_Y_LOC = 0x12c0; +uint256 internal constant SIGMA_4_X_LOC = 0x12e0; +uint256 internal constant SIGMA_4_Y_LOC = 0x1300; +uint256 internal constant ID_1_X_LOC = 0x1320; +uint256 internal constant ID_1_Y_LOC = 0x1340; +uint256 internal constant ID_2_X_LOC = 0x1360; +uint256 internal constant ID_2_Y_LOC = 0x1380; +uint256 internal constant ID_3_X_LOC = 0x13a0; +uint256 internal constant ID_3_Y_LOC = 0x13c0; +uint256 internal constant ID_4_X_LOC = 0x13e0; +uint256 internal constant ID_4_Y_LOC = 0x1400; +uint256 internal constant LAGRANGE_FIRST_X_LOC = 0x1420; +uint256 internal constant LAGRANGE_FIRST_Y_LOC = 0x1440; +uint256 internal constant LAGRANGE_LAST_X_LOC = 0x1460; +uint256 internal constant LAGRANGE_LAST_Y_LOC = 0x1480; +uint256 internal constant Q_LOOKUP_X_LOC = 0x14a0; +uint256 internal constant Q_LOOKUP_Y_LOC = 0x14c0; +uint256 internal constant TABLE_1_X_LOC = 0x14e0; +uint256 internal constant TABLE_1_Y_LOC = 0x1500; +uint256 internal constant TABLE_2_X_LOC = 0x1520; +uint256 internal constant TABLE_2_Y_LOC = 0x1540; +uint256 internal constant TABLE_3_X_LOC = 0x1560; +uint256 internal constant TABLE_3_Y_LOC = 0x1580; +uint256 internal constant TABLE_4_X_LOC = 0x15a0; +uint256 internal constant TABLE_4_Y_LOC = 0x15c0; +uint256 internal constant Q_DELTA_RANGE_X_LOC = 0x15e0; +uint256 internal constant Q_DELTA_RANGE_Y_LOC = 0x1600; +uint256 internal constant Q_ELLIPTIC_X_LOC = 0x1620; +uint256 internal constant Q_ELLIPTIC_Y_LOC = 0x1640; +uint256 internal constant Q_MEMORY_X_LOC = 0x1660; +uint256 internal constant Q_MEMORY_Y_LOC = 0x1680; +uint256 internal constant Q_NNF_X_LOC = 0x16a0; +uint256 internal constant Q_NNF_Y_LOC = 0x16c0; +uint256 internal constant Q_POSEIDON_2_EXTERNAL_X_LOC = 0x16e0; +uint256 internal constant Q_POSEIDON_2_EXTERNAL_Y_LOC = 0x1700; +uint256 internal constant Q_POSEIDON_2_INTERNAL_X_LOC = 0x1720; +uint256 internal constant Q_POSEIDON_2_INTERNAL_Y_LOC = 0x1740; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant PAIRING_POINT_0_X_0_LOC = 0x1760; +uint256 internal constant PAIRING_POINT_0_X_1_LOC = 0x1780; +uint256 internal constant PAIRING_POINT_0_Y_0_LOC = 0x17a0; +uint256 internal constant PAIRING_POINT_0_Y_1_LOC = 0x17c0; +uint256 internal constant PAIRING_POINT_1_X_0_LOC = 0x17e0; +uint256 internal constant PAIRING_POINT_1_X_1_LOC = 0x1800; +uint256 internal constant PAIRING_POINT_1_Y_0_LOC = 0x1820; +uint256 internal constant PAIRING_POINT_1_Y_1_LOC = 0x1840; +uint256 internal constant W_L_X_LOC = 0x1860; +uint256 internal constant W_L_Y_LOC = 0x1880; +uint256 internal constant W_R_X_LOC = 0x18a0; +uint256 internal constant W_R_Y_LOC = 0x18c0; +uint256 internal constant W_O_X_LOC = 0x18e0; +uint256 internal constant W_O_Y_LOC = 0x1900; +uint256 internal constant LOOKUP_READ_COUNTS_X_LOC = 0x1920; +uint256 internal constant LOOKUP_READ_COUNTS_Y_LOC = 0x1940; +uint256 internal constant LOOKUP_READ_TAGS_X_LOC = 0x1960; +uint256 internal constant LOOKUP_READ_TAGS_Y_LOC = 0x1980; +uint256 internal constant W_4_X_LOC = 0x19a0; +uint256 internal constant W_4_Y_LOC = 0x19c0; +uint256 internal constant LOOKUP_INVERSES_X_LOC = 0x19e0; +uint256 internal constant LOOKUP_INVERSES_Y_LOC = 0x1a00; +uint256 internal constant Z_PERM_X_LOC = 0x1a20; +uint256 internal constant Z_PERM_Y_LOC = 0x1a40; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES - SUMCHECK UNIVARIATES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant SUMCHECK_UNIVARIATE_0_0_LOC = 0x1a60; +uint256 internal constant SUMCHECK_UNIVARIATE_0_1_LOC = 0x1a80; +uint256 internal constant SUMCHECK_UNIVARIATE_0_2_LOC = 0x1aa0; +uint256 internal constant SUMCHECK_UNIVARIATE_0_3_LOC = 0x1ac0; +uint256 internal constant SUMCHECK_UNIVARIATE_0_4_LOC = 0x1ae0; +uint256 internal constant SUMCHECK_UNIVARIATE_0_5_LOC = 0x1b00; +uint256 internal constant SUMCHECK_UNIVARIATE_0_6_LOC = 0x1b20; +uint256 internal constant SUMCHECK_UNIVARIATE_0_7_LOC = 0x1b40; +uint256 internal constant SUMCHECK_UNIVARIATE_1_0_LOC = 0x1b60; +uint256 internal constant SUMCHECK_UNIVARIATE_1_1_LOC = 0x1b80; +uint256 internal constant SUMCHECK_UNIVARIATE_1_2_LOC = 0x1ba0; +uint256 internal constant SUMCHECK_UNIVARIATE_1_3_LOC = 0x1bc0; +uint256 internal constant SUMCHECK_UNIVARIATE_1_4_LOC = 0x1be0; +uint256 internal constant SUMCHECK_UNIVARIATE_1_5_LOC = 0x1c00; +uint256 internal constant SUMCHECK_UNIVARIATE_1_6_LOC = 0x1c20; +uint256 internal constant SUMCHECK_UNIVARIATE_1_7_LOC = 0x1c40; +uint256 internal constant SUMCHECK_UNIVARIATE_2_0_LOC = 0x1c60; +uint256 internal constant SUMCHECK_UNIVARIATE_2_1_LOC = 0x1c80; +uint256 internal constant SUMCHECK_UNIVARIATE_2_2_LOC = 0x1ca0; +uint256 internal constant SUMCHECK_UNIVARIATE_2_3_LOC = 0x1cc0; +uint256 internal constant SUMCHECK_UNIVARIATE_2_4_LOC = 0x1ce0; +uint256 internal constant SUMCHECK_UNIVARIATE_2_5_LOC = 0x1d00; +uint256 internal constant SUMCHECK_UNIVARIATE_2_6_LOC = 0x1d20; +uint256 internal constant SUMCHECK_UNIVARIATE_2_7_LOC = 0x1d40; +uint256 internal constant SUMCHECK_UNIVARIATE_3_0_LOC = 0x1d60; +uint256 internal constant SUMCHECK_UNIVARIATE_3_1_LOC = 0x1d80; +uint256 internal constant SUMCHECK_UNIVARIATE_3_2_LOC = 0x1da0; +uint256 internal constant SUMCHECK_UNIVARIATE_3_3_LOC = 0x1dc0; +uint256 internal constant SUMCHECK_UNIVARIATE_3_4_LOC = 0x1de0; +uint256 internal constant SUMCHECK_UNIVARIATE_3_5_LOC = 0x1e00; +uint256 internal constant SUMCHECK_UNIVARIATE_3_6_LOC = 0x1e20; +uint256 internal constant SUMCHECK_UNIVARIATE_3_7_LOC = 0x1e40; +uint256 internal constant SUMCHECK_UNIVARIATE_4_0_LOC = 0x1e60; +uint256 internal constant SUMCHECK_UNIVARIATE_4_1_LOC = 0x1e80; +uint256 internal constant SUMCHECK_UNIVARIATE_4_2_LOC = 0x1ea0; +uint256 internal constant SUMCHECK_UNIVARIATE_4_3_LOC = 0x1ec0; +uint256 internal constant SUMCHECK_UNIVARIATE_4_4_LOC = 0x1ee0; +uint256 internal constant SUMCHECK_UNIVARIATE_4_5_LOC = 0x1f00; +uint256 internal constant SUMCHECK_UNIVARIATE_4_6_LOC = 0x1f20; +uint256 internal constant SUMCHECK_UNIVARIATE_4_7_LOC = 0x1f40; +uint256 internal constant SUMCHECK_UNIVARIATE_5_0_LOC = 0x1f60; +uint256 internal constant SUMCHECK_UNIVARIATE_5_1_LOC = 0x1f80; +uint256 internal constant SUMCHECK_UNIVARIATE_5_2_LOC = 0x1fa0; +uint256 internal constant SUMCHECK_UNIVARIATE_5_3_LOC = 0x1fc0; +uint256 internal constant SUMCHECK_UNIVARIATE_5_4_LOC = 0x1fe0; +uint256 internal constant SUMCHECK_UNIVARIATE_5_5_LOC = 0x2000; +uint256 internal constant SUMCHECK_UNIVARIATE_5_6_LOC = 0x2020; +uint256 internal constant SUMCHECK_UNIVARIATE_5_7_LOC = 0x2040; +uint256 internal constant SUMCHECK_UNIVARIATE_6_0_LOC = 0x2060; +uint256 internal constant SUMCHECK_UNIVARIATE_6_1_LOC = 0x2080; +uint256 internal constant SUMCHECK_UNIVARIATE_6_2_LOC = 0x20a0; +uint256 internal constant SUMCHECK_UNIVARIATE_6_3_LOC = 0x20c0; +uint256 internal constant SUMCHECK_UNIVARIATE_6_4_LOC = 0x20e0; +uint256 internal constant SUMCHECK_UNIVARIATE_6_5_LOC = 0x2100; +uint256 internal constant SUMCHECK_UNIVARIATE_6_6_LOC = 0x2120; +uint256 internal constant SUMCHECK_UNIVARIATE_6_7_LOC = 0x2140; +uint256 internal constant SUMCHECK_UNIVARIATE_7_0_LOC = 0x2160; +uint256 internal constant SUMCHECK_UNIVARIATE_7_1_LOC = 0x2180; +uint256 internal constant SUMCHECK_UNIVARIATE_7_2_LOC = 0x21a0; +uint256 internal constant SUMCHECK_UNIVARIATE_7_3_LOC = 0x21c0; +uint256 internal constant SUMCHECK_UNIVARIATE_7_4_LOC = 0x21e0; +uint256 internal constant SUMCHECK_UNIVARIATE_7_5_LOC = 0x2200; +uint256 internal constant SUMCHECK_UNIVARIATE_7_6_LOC = 0x2220; +uint256 internal constant SUMCHECK_UNIVARIATE_7_7_LOC = 0x2240; +uint256 internal constant SUMCHECK_UNIVARIATE_8_0_LOC = 0x2260; +uint256 internal constant SUMCHECK_UNIVARIATE_8_1_LOC = 0x2280; +uint256 internal constant SUMCHECK_UNIVARIATE_8_2_LOC = 0x22a0; +uint256 internal constant SUMCHECK_UNIVARIATE_8_3_LOC = 0x22c0; +uint256 internal constant SUMCHECK_UNIVARIATE_8_4_LOC = 0x22e0; +uint256 internal constant SUMCHECK_UNIVARIATE_8_5_LOC = 0x2300; +uint256 internal constant SUMCHECK_UNIVARIATE_8_6_LOC = 0x2320; +uint256 internal constant SUMCHECK_UNIVARIATE_8_7_LOC = 0x2340; +uint256 internal constant SUMCHECK_UNIVARIATE_9_0_LOC = 0x2360; +uint256 internal constant SUMCHECK_UNIVARIATE_9_1_LOC = 0x2380; +uint256 internal constant SUMCHECK_UNIVARIATE_9_2_LOC = 0x23a0; +uint256 internal constant SUMCHECK_UNIVARIATE_9_3_LOC = 0x23c0; +uint256 internal constant SUMCHECK_UNIVARIATE_9_4_LOC = 0x23e0; +uint256 internal constant SUMCHECK_UNIVARIATE_9_5_LOC = 0x2400; +uint256 internal constant SUMCHECK_UNIVARIATE_9_6_LOC = 0x2420; +uint256 internal constant SUMCHECK_UNIVARIATE_9_7_LOC = 0x2440; +uint256 internal constant SUMCHECK_UNIVARIATE_10_0_LOC = 0x2460; +uint256 internal constant SUMCHECK_UNIVARIATE_10_1_LOC = 0x2480; +uint256 internal constant SUMCHECK_UNIVARIATE_10_2_LOC = 0x24a0; +uint256 internal constant SUMCHECK_UNIVARIATE_10_3_LOC = 0x24c0; +uint256 internal constant SUMCHECK_UNIVARIATE_10_4_LOC = 0x24e0; +uint256 internal constant SUMCHECK_UNIVARIATE_10_5_LOC = 0x2500; +uint256 internal constant SUMCHECK_UNIVARIATE_10_6_LOC = 0x2520; +uint256 internal constant SUMCHECK_UNIVARIATE_10_7_LOC = 0x2540; +uint256 internal constant SUMCHECK_UNIVARIATE_11_0_LOC = 0x2560; +uint256 internal constant SUMCHECK_UNIVARIATE_11_1_LOC = 0x2580; +uint256 internal constant SUMCHECK_UNIVARIATE_11_2_LOC = 0x25a0; +uint256 internal constant SUMCHECK_UNIVARIATE_11_3_LOC = 0x25c0; +uint256 internal constant SUMCHECK_UNIVARIATE_11_4_LOC = 0x25e0; +uint256 internal constant SUMCHECK_UNIVARIATE_11_5_LOC = 0x2600; +uint256 internal constant SUMCHECK_UNIVARIATE_11_6_LOC = 0x2620; +uint256 internal constant SUMCHECK_UNIVARIATE_11_7_LOC = 0x2640; +uint256 internal constant SUMCHECK_UNIVARIATE_12_0_LOC = 0x2660; +uint256 internal constant SUMCHECK_UNIVARIATE_12_1_LOC = 0x2680; +uint256 internal constant SUMCHECK_UNIVARIATE_12_2_LOC = 0x26a0; +uint256 internal constant SUMCHECK_UNIVARIATE_12_3_LOC = 0x26c0; +uint256 internal constant SUMCHECK_UNIVARIATE_12_4_LOC = 0x26e0; +uint256 internal constant SUMCHECK_UNIVARIATE_12_5_LOC = 0x2700; +uint256 internal constant SUMCHECK_UNIVARIATE_12_6_LOC = 0x2720; +uint256 internal constant SUMCHECK_UNIVARIATE_12_7_LOC = 0x2740; +uint256 internal constant SUMCHECK_UNIVARIATE_13_0_LOC = 0x2760; +uint256 internal constant SUMCHECK_UNIVARIATE_13_1_LOC = 0x2780; +uint256 internal constant SUMCHECK_UNIVARIATE_13_2_LOC = 0x27a0; +uint256 internal constant SUMCHECK_UNIVARIATE_13_3_LOC = 0x27c0; +uint256 internal constant SUMCHECK_UNIVARIATE_13_4_LOC = 0x27e0; +uint256 internal constant SUMCHECK_UNIVARIATE_13_5_LOC = 0x2800; +uint256 internal constant SUMCHECK_UNIVARIATE_13_6_LOC = 0x2820; +uint256 internal constant SUMCHECK_UNIVARIATE_13_7_LOC = 0x2840; +uint256 internal constant SUMCHECK_UNIVARIATE_14_0_LOC = 0x2860; +uint256 internal constant SUMCHECK_UNIVARIATE_14_1_LOC = 0x2880; +uint256 internal constant SUMCHECK_UNIVARIATE_14_2_LOC = 0x28a0; +uint256 internal constant SUMCHECK_UNIVARIATE_14_3_LOC = 0x28c0; +uint256 internal constant SUMCHECK_UNIVARIATE_14_4_LOC = 0x28e0; +uint256 internal constant SUMCHECK_UNIVARIATE_14_5_LOC = 0x2900; +uint256 internal constant SUMCHECK_UNIVARIATE_14_6_LOC = 0x2920; +uint256 internal constant SUMCHECK_UNIVARIATE_14_7_LOC = 0x2940; +uint256 internal constant SUMCHECK_UNIVARIATE_15_0_LOC = 0x2960; +uint256 internal constant SUMCHECK_UNIVARIATE_15_1_LOC = 0x2980; +uint256 internal constant SUMCHECK_UNIVARIATE_15_2_LOC = 0x29a0; +uint256 internal constant SUMCHECK_UNIVARIATE_15_3_LOC = 0x29c0; +uint256 internal constant SUMCHECK_UNIVARIATE_15_4_LOC = 0x29e0; +uint256 internal constant SUMCHECK_UNIVARIATE_15_5_LOC = 0x2a00; +uint256 internal constant SUMCHECK_UNIVARIATE_15_6_LOC = 0x2a20; +uint256 internal constant SUMCHECK_UNIVARIATE_15_7_LOC = 0x2a40; +uint256 internal constant SUMCHECK_UNIVARIATE_16_0_LOC = 0x2a60; +uint256 internal constant SUMCHECK_UNIVARIATE_16_1_LOC = 0x2a80; +uint256 internal constant SUMCHECK_UNIVARIATE_16_2_LOC = 0x2aa0; +uint256 internal constant SUMCHECK_UNIVARIATE_16_3_LOC = 0x2ac0; +uint256 internal constant SUMCHECK_UNIVARIATE_16_4_LOC = 0x2ae0; +uint256 internal constant SUMCHECK_UNIVARIATE_16_5_LOC = 0x2b00; +uint256 internal constant SUMCHECK_UNIVARIATE_16_6_LOC = 0x2b20; +uint256 internal constant SUMCHECK_UNIVARIATE_16_7_LOC = 0x2b40; +uint256 internal constant SUMCHECK_UNIVARIATE_17_0_LOC = 0x2b60; +uint256 internal constant SUMCHECK_UNIVARIATE_17_1_LOC = 0x2b80; +uint256 internal constant SUMCHECK_UNIVARIATE_17_2_LOC = 0x2ba0; +uint256 internal constant SUMCHECK_UNIVARIATE_17_3_LOC = 0x2bc0; +uint256 internal constant SUMCHECK_UNIVARIATE_17_4_LOC = 0x2be0; +uint256 internal constant SUMCHECK_UNIVARIATE_17_5_LOC = 0x2c00; +uint256 internal constant SUMCHECK_UNIVARIATE_17_6_LOC = 0x2c20; +uint256 internal constant SUMCHECK_UNIVARIATE_17_7_LOC = 0x2c40; +uint256 internal constant SUMCHECK_UNIVARIATE_18_0_LOC = 0x2c60; +uint256 internal constant SUMCHECK_UNIVARIATE_18_1_LOC = 0x2c80; +uint256 internal constant SUMCHECK_UNIVARIATE_18_2_LOC = 0x2ca0; +uint256 internal constant SUMCHECK_UNIVARIATE_18_3_LOC = 0x2cc0; +uint256 internal constant SUMCHECK_UNIVARIATE_18_4_LOC = 0x2ce0; +uint256 internal constant SUMCHECK_UNIVARIATE_18_5_LOC = 0x2d00; +uint256 internal constant SUMCHECK_UNIVARIATE_18_6_LOC = 0x2d20; +uint256 internal constant SUMCHECK_UNIVARIATE_18_7_LOC = 0x2d40; +uint256 internal constant SUMCHECK_UNIVARIATE_19_0_LOC = 0x2d60; +uint256 internal constant SUMCHECK_UNIVARIATE_19_1_LOC = 0x2d80; +uint256 internal constant SUMCHECK_UNIVARIATE_19_2_LOC = 0x2da0; +uint256 internal constant SUMCHECK_UNIVARIATE_19_3_LOC = 0x2dc0; +uint256 internal constant SUMCHECK_UNIVARIATE_19_4_LOC = 0x2de0; +uint256 internal constant SUMCHECK_UNIVARIATE_19_5_LOC = 0x2e00; +uint256 internal constant SUMCHECK_UNIVARIATE_19_6_LOC = 0x2e20; +uint256 internal constant SUMCHECK_UNIVARIATE_19_7_LOC = 0x2e40; +uint256 internal constant SUMCHECK_UNIVARIATE_20_0_LOC = 0x2e60; +uint256 internal constant SUMCHECK_UNIVARIATE_20_1_LOC = 0x2e80; +uint256 internal constant SUMCHECK_UNIVARIATE_20_2_LOC = 0x2ea0; +uint256 internal constant SUMCHECK_UNIVARIATE_20_3_LOC = 0x2ec0; +uint256 internal constant SUMCHECK_UNIVARIATE_20_4_LOC = 0x2ee0; +uint256 internal constant SUMCHECK_UNIVARIATE_20_5_LOC = 0x2f00; +uint256 internal constant SUMCHECK_UNIVARIATE_20_6_LOC = 0x2f20; +uint256 internal constant SUMCHECK_UNIVARIATE_20_7_LOC = 0x2f40; +uint256 internal constant SUMCHECK_UNIVARIATE_21_0_LOC = 0x2f60; +uint256 internal constant SUMCHECK_UNIVARIATE_21_1_LOC = 0x2f80; +uint256 internal constant SUMCHECK_UNIVARIATE_21_2_LOC = 0x2fa0; +uint256 internal constant SUMCHECK_UNIVARIATE_21_3_LOC = 0x2fc0; +uint256 internal constant SUMCHECK_UNIVARIATE_21_4_LOC = 0x2fe0; +uint256 internal constant SUMCHECK_UNIVARIATE_21_5_LOC = 0x3000; +uint256 internal constant SUMCHECK_UNIVARIATE_21_6_LOC = 0x3020; +uint256 internal constant SUMCHECK_UNIVARIATE_21_7_LOC = 0x3040; +uint256 internal constant SUMCHECK_UNIVARIATE_22_0_LOC = 0x3060; +uint256 internal constant SUMCHECK_UNIVARIATE_22_1_LOC = 0x3080; +uint256 internal constant SUMCHECK_UNIVARIATE_22_2_LOC = 0x30a0; +uint256 internal constant SUMCHECK_UNIVARIATE_22_3_LOC = 0x30c0; +uint256 internal constant SUMCHECK_UNIVARIATE_22_4_LOC = 0x30e0; +uint256 internal constant SUMCHECK_UNIVARIATE_22_5_LOC = 0x3100; +uint256 internal constant SUMCHECK_UNIVARIATE_22_6_LOC = 0x3120; +uint256 internal constant SUMCHECK_UNIVARIATE_22_7_LOC = 0x3140; +uint256 internal constant SUMCHECK_UNIVARIATE_23_0_LOC = 0x3160; +uint256 internal constant SUMCHECK_UNIVARIATE_23_1_LOC = 0x3180; +uint256 internal constant SUMCHECK_UNIVARIATE_23_2_LOC = 0x31a0; +uint256 internal constant SUMCHECK_UNIVARIATE_23_3_LOC = 0x31c0; +uint256 internal constant SUMCHECK_UNIVARIATE_23_4_LOC = 0x31e0; +uint256 internal constant SUMCHECK_UNIVARIATE_23_5_LOC = 0x3200; +uint256 internal constant SUMCHECK_UNIVARIATE_23_6_LOC = 0x3220; +uint256 internal constant SUMCHECK_UNIVARIATE_23_7_LOC = 0x3240; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES - SUMCHECK EVALUATIONS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant SIGMA1_EVAL_LOC = 0x3260; +uint256 internal constant SIGMA2_EVAL_LOC = 0x3280; +uint256 internal constant SIGMA3_EVAL_LOC = 0x32a0; +uint256 internal constant SIGMA4_EVAL_LOC = 0x32c0; +uint256 internal constant ID1_EVAL_LOC = 0x32e0; +uint256 internal constant ID2_EVAL_LOC = 0x3300; +uint256 internal constant ID3_EVAL_LOC = 0x3320; +uint256 internal constant ID4_EVAL_LOC = 0x3340; +uint256 internal constant LAGRANGE_FIRST_EVAL_LOC = 0x3360; +uint256 internal constant LAGRANGE_LAST_EVAL_LOC = 0x3380; +uint256 internal constant QLOOKUP_EVAL_LOC = 0x33a0; +uint256 internal constant TABLE1_EVAL_LOC = 0x33c0; +uint256 internal constant TABLE2_EVAL_LOC = 0x33e0; +uint256 internal constant TABLE3_EVAL_LOC = 0x3400; +uint256 internal constant TABLE4_EVAL_LOC = 0x3420; +uint256 internal constant QM_EVAL_LOC = 0x3440; +uint256 internal constant QR_EVAL_LOC = 0x3460; +uint256 internal constant QO_EVAL_LOC = 0x3480; +uint256 internal constant QC_EVAL_LOC = 0x34a0; +uint256 internal constant QL_EVAL_LOC = 0x34c0; +uint256 internal constant Q4_EVAL_LOC = 0x34e0; +uint256 internal constant QARITH_EVAL_LOC = 0x3500; +uint256 internal constant QRANGE_EVAL_LOC = 0x3520; +uint256 internal constant QELLIPTIC_EVAL_LOC = 0x3540; +uint256 internal constant QMEMORY_EVAL_LOC = 0x3560; +uint256 internal constant QNNF_EVAL_LOC = 0x3580; +uint256 internal constant QPOSEIDON2_EXTERNAL_EVAL_LOC = 0x35a0; +uint256 internal constant QPOSEIDON2_INTERNAL_EVAL_LOC = 0x35c0; +uint256 internal constant W1_EVAL_LOC = 0x35e0; +uint256 internal constant W2_EVAL_LOC = 0x3600; +uint256 internal constant W3_EVAL_LOC = 0x3620; +uint256 internal constant W4_EVAL_LOC = 0x3640; +uint256 internal constant Z_PERM_EVAL_LOC = 0x3660; +uint256 internal constant LOOKUP_INVERSES_EVAL_LOC = 0x3680; +uint256 internal constant LOOKUP_READ_COUNTS_EVAL_LOC = 0x36a0; +uint256 internal constant LOOKUP_READ_TAGS_EVAL_LOC = 0x36c0; +uint256 internal constant W1_SHIFT_EVAL_LOC = 0x36e0; +uint256 internal constant W2_SHIFT_EVAL_LOC = 0x3700; +uint256 internal constant W3_SHIFT_EVAL_LOC = 0x3720; +uint256 internal constant W4_SHIFT_EVAL_LOC = 0x3740; +uint256 internal constant Z_PERM_SHIFT_EVAL_LOC = 0x3760; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES - GEMINI FOLDING COMMS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant GEMINI_FOLD_UNIVARIATE_0_X_LOC = 0x3780; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_0_Y_LOC = 0x37a0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_1_X_LOC = 0x37c0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_1_Y_LOC = 0x37e0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_2_X_LOC = 0x3800; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_2_Y_LOC = 0x3820; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_3_X_LOC = 0x3840; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_3_Y_LOC = 0x3860; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_4_X_LOC = 0x3880; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_4_Y_LOC = 0x38a0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_5_X_LOC = 0x38c0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_5_Y_LOC = 0x38e0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_6_X_LOC = 0x3900; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_6_Y_LOC = 0x3920; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_7_X_LOC = 0x3940; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_7_Y_LOC = 0x3960; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_8_X_LOC = 0x3980; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_8_Y_LOC = 0x39a0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_9_X_LOC = 0x39c0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_9_Y_LOC = 0x39e0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_10_X_LOC = 0x3a00; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_10_Y_LOC = 0x3a20; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_11_X_LOC = 0x3a40; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_11_Y_LOC = 0x3a60; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_12_X_LOC = 0x3a80; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_12_Y_LOC = 0x3aa0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_13_X_LOC = 0x3ac0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_13_Y_LOC = 0x3ae0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_14_X_LOC = 0x3b00; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_14_Y_LOC = 0x3b20; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_15_X_LOC = 0x3b40; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_15_Y_LOC = 0x3b60; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_16_X_LOC = 0x3b80; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_16_Y_LOC = 0x3ba0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_17_X_LOC = 0x3bc0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_17_Y_LOC = 0x3be0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_18_X_LOC = 0x3c00; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_18_Y_LOC = 0x3c20; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_19_X_LOC = 0x3c40; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_19_Y_LOC = 0x3c60; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_20_X_LOC = 0x3c80; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_20_Y_LOC = 0x3ca0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_21_X_LOC = 0x3cc0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_21_Y_LOC = 0x3ce0; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_22_X_LOC = 0x3d00; +uint256 internal constant GEMINI_FOLD_UNIVARIATE_22_Y_LOC = 0x3d20; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES - GEMINI FOLDING EVALUATIONS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant GEMINI_A_EVAL_0 = 0x3d40; +uint256 internal constant GEMINI_A_EVAL_1 = 0x3d60; +uint256 internal constant GEMINI_A_EVAL_2 = 0x3d80; +uint256 internal constant GEMINI_A_EVAL_3 = 0x3da0; +uint256 internal constant GEMINI_A_EVAL_4 = 0x3dc0; +uint256 internal constant GEMINI_A_EVAL_5 = 0x3de0; +uint256 internal constant GEMINI_A_EVAL_6 = 0x3e00; +uint256 internal constant GEMINI_A_EVAL_7 = 0x3e20; +uint256 internal constant GEMINI_A_EVAL_8 = 0x3e40; +uint256 internal constant GEMINI_A_EVAL_9 = 0x3e60; +uint256 internal constant GEMINI_A_EVAL_10 = 0x3e80; +uint256 internal constant GEMINI_A_EVAL_11 = 0x3ea0; +uint256 internal constant GEMINI_A_EVAL_12 = 0x3ec0; +uint256 internal constant GEMINI_A_EVAL_13 = 0x3ee0; +uint256 internal constant GEMINI_A_EVAL_14 = 0x3f00; +uint256 internal constant GEMINI_A_EVAL_15 = 0x3f20; +uint256 internal constant GEMINI_A_EVAL_16 = 0x3f40; +uint256 internal constant GEMINI_A_EVAL_17 = 0x3f60; +uint256 internal constant GEMINI_A_EVAL_18 = 0x3f80; +uint256 internal constant GEMINI_A_EVAL_19 = 0x3fa0; +uint256 internal constant GEMINI_A_EVAL_20 = 0x3fc0; +uint256 internal constant GEMINI_A_EVAL_21 = 0x3fe0; +uint256 internal constant GEMINI_A_EVAL_22 = 0x4000; +uint256 internal constant GEMINI_A_EVAL_23 = 0x4020; +uint256 internal constant SHPLONK_Q_X_LOC = 0x4040; +uint256 internal constant SHPLONK_Q_Y_LOC = 0x4060; +uint256 internal constant KZG_QUOTIENT_X_LOC = 0x4080; +uint256 internal constant KZG_QUOTIENT_Y_LOC = 0x40a0; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* PROOF INDICIES - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* CHALLENGES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant ETA_CHALLENGE = 0x40c0; +uint256 internal constant ETA_TWO_CHALLENGE = 0x40e0; +uint256 internal constant ETA_THREE_CHALLENGE = 0x4100; +uint256 internal constant BETA_CHALLENGE = 0x4120; +uint256 internal constant GAMMA_CHALLENGE = 0x4140; +uint256 internal constant RHO_CHALLENGE = 0x4160; +uint256 internal constant GEMINI_R_CHALLENGE = 0x4180; +uint256 internal constant SHPLONK_NU_CHALLENGE = 0x41a0; +uint256 internal constant SHPLONK_Z_CHALLENGE = 0x41c0; +uint256 internal constant PUBLIC_INPUTS_DELTA_NUMERATOR_CHALLENGE = 0x41e0; +uint256 internal constant PUBLIC_INPUTS_DELTA_DENOMINATOR_CHALLENGE = 0x4200; +uint256 internal constant ALPHA_CHALLENGE_0 = 0x4220; +uint256 internal constant ALPHA_CHALLENGE_1 = 0x4240; +uint256 internal constant ALPHA_CHALLENGE_2 = 0x4260; +uint256 internal constant ALPHA_CHALLENGE_3 = 0x4280; +uint256 internal constant ALPHA_CHALLENGE_4 = 0x42a0; +uint256 internal constant ALPHA_CHALLENGE_5 = 0x42c0; +uint256 internal constant ALPHA_CHALLENGE_6 = 0x42e0; +uint256 internal constant ALPHA_CHALLENGE_7 = 0x4300; +uint256 internal constant ALPHA_CHALLENGE_8 = 0x4320; +uint256 internal constant ALPHA_CHALLENGE_9 = 0x4340; +uint256 internal constant ALPHA_CHALLENGE_10 = 0x4360; +uint256 internal constant ALPHA_CHALLENGE_11 = 0x4380; +uint256 internal constant ALPHA_CHALLENGE_12 = 0x43a0; +uint256 internal constant ALPHA_CHALLENGE_13 = 0x43c0; +uint256 internal constant ALPHA_CHALLENGE_14 = 0x43e0; +uint256 internal constant ALPHA_CHALLENGE_15 = 0x4400; +uint256 internal constant ALPHA_CHALLENGE_16 = 0x4420; +uint256 internal constant ALPHA_CHALLENGE_17 = 0x4440; +uint256 internal constant ALPHA_CHALLENGE_18 = 0x4460; +uint256 internal constant ALPHA_CHALLENGE_19 = 0x4480; +uint256 internal constant ALPHA_CHALLENGE_20 = 0x44a0; +uint256 internal constant ALPHA_CHALLENGE_21 = 0x44c0; +uint256 internal constant ALPHA_CHALLENGE_22 = 0x44e0; +uint256 internal constant ALPHA_CHALLENGE_23 = 0x4500; +uint256 internal constant ALPHA_CHALLENGE_24 = 0x4520; +uint256 internal constant ALPHA_CHALLENGE_25 = 0x4540; +uint256 internal constant ALPHA_CHALLENGE_26 = 0x4560; +uint256 internal constant ALPHA_CHALLENGE_27 = 0x4580; +uint256 internal constant GATE_CHALLENGE_0 = 0x45a0; +uint256 internal constant GATE_CHALLENGE_1 = 0x45c0; +uint256 internal constant GATE_CHALLENGE_2 = 0x45e0; +uint256 internal constant GATE_CHALLENGE_3 = 0x4600; +uint256 internal constant GATE_CHALLENGE_4 = 0x4620; +uint256 internal constant GATE_CHALLENGE_5 = 0x4640; +uint256 internal constant GATE_CHALLENGE_6 = 0x4660; +uint256 internal constant GATE_CHALLENGE_7 = 0x4680; +uint256 internal constant GATE_CHALLENGE_8 = 0x46a0; +uint256 internal constant GATE_CHALLENGE_9 = 0x46c0; +uint256 internal constant GATE_CHALLENGE_10 = 0x46e0; +uint256 internal constant GATE_CHALLENGE_11 = 0x4700; +uint256 internal constant GATE_CHALLENGE_12 = 0x4720; +uint256 internal constant GATE_CHALLENGE_13 = 0x4740; +uint256 internal constant GATE_CHALLENGE_14 = 0x4760; +uint256 internal constant GATE_CHALLENGE_15 = 0x4780; +uint256 internal constant GATE_CHALLENGE_16 = 0x47a0; +uint256 internal constant GATE_CHALLENGE_17 = 0x47c0; +uint256 internal constant GATE_CHALLENGE_18 = 0x47e0; +uint256 internal constant GATE_CHALLENGE_19 = 0x4800; +uint256 internal constant GATE_CHALLENGE_20 = 0x4820; +uint256 internal constant GATE_CHALLENGE_21 = 0x4840; +uint256 internal constant GATE_CHALLENGE_22 = 0x4860; +uint256 internal constant GATE_CHALLENGE_23 = 0x4880; +uint256 internal constant SUM_U_CHALLENGE_0 = 0x48a0; +uint256 internal constant SUM_U_CHALLENGE_1 = 0x48c0; +uint256 internal constant SUM_U_CHALLENGE_2 = 0x48e0; +uint256 internal constant SUM_U_CHALLENGE_3 = 0x4900; +uint256 internal constant SUM_U_CHALLENGE_4 = 0x4920; +uint256 internal constant SUM_U_CHALLENGE_5 = 0x4940; +uint256 internal constant SUM_U_CHALLENGE_6 = 0x4960; +uint256 internal constant SUM_U_CHALLENGE_7 = 0x4980; +uint256 internal constant SUM_U_CHALLENGE_8 = 0x49a0; +uint256 internal constant SUM_U_CHALLENGE_9 = 0x49c0; +uint256 internal constant SUM_U_CHALLENGE_10 = 0x49e0; +uint256 internal constant SUM_U_CHALLENGE_11 = 0x4a00; +uint256 internal constant SUM_U_CHALLENGE_12 = 0x4a20; +uint256 internal constant SUM_U_CHALLENGE_13 = 0x4a40; +uint256 internal constant SUM_U_CHALLENGE_14 = 0x4a60; +uint256 internal constant SUM_U_CHALLENGE_15 = 0x4a80; +uint256 internal constant SUM_U_CHALLENGE_16 = 0x4aa0; +uint256 internal constant SUM_U_CHALLENGE_17 = 0x4ac0; +uint256 internal constant SUM_U_CHALLENGE_18 = 0x4ae0; +uint256 internal constant SUM_U_CHALLENGE_19 = 0x4b00; +uint256 internal constant SUM_U_CHALLENGE_20 = 0x4b20; +uint256 internal constant SUM_U_CHALLENGE_21 = 0x4b40; +uint256 internal constant SUM_U_CHALLENGE_22 = 0x4b60; +uint256 internal constant SUM_U_CHALLENGE_23 = 0x4b80; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* CHALLENGES - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - BARYCENTRIC */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_0_LOC = 0x4ba0; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_1_LOC = 0x4bc0; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_2_LOC = 0x4be0; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_3_LOC = 0x4c00; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_4_LOC = 0x4c20; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_5_LOC = 0x4c40; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_6_LOC = 0x4c60; +uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_7_LOC = 0x4c80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_0_LOC = 0x4ca0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_1_LOC = 0x4cc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_2_LOC = 0x4ce0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_3_LOC = 0x4d00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_4_LOC = 0x4d20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_5_LOC = 0x4d40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_6_LOC = 0x4d60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_0_7_LOC = 0x4d80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_0_LOC = 0x4da0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_1_LOC = 0x4dc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_2_LOC = 0x4de0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_3_LOC = 0x4e00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_4_LOC = 0x4e20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_5_LOC = 0x4e40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_6_LOC = 0x4e60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_1_7_LOC = 0x4e80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_0_LOC = 0x4ea0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_1_LOC = 0x4ec0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_2_LOC = 0x4ee0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_3_LOC = 0x4f00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_4_LOC = 0x4f20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_5_LOC = 0x4f40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_6_LOC = 0x4f60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_2_7_LOC = 0x4f80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_0_LOC = 0x4fa0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_1_LOC = 0x4fc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_2_LOC = 0x4fe0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_3_LOC = 0x5000; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_4_LOC = 0x5020; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_5_LOC = 0x5040; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_6_LOC = 0x5060; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_3_7_LOC = 0x5080; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_0_LOC = 0x50a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_1_LOC = 0x50c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_2_LOC = 0x50e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_3_LOC = 0x5100; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_4_LOC = 0x5120; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_5_LOC = 0x5140; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_6_LOC = 0x5160; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_4_7_LOC = 0x5180; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_0_LOC = 0x51a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_1_LOC = 0x51c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_2_LOC = 0x51e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_3_LOC = 0x5200; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_4_LOC = 0x5220; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_5_LOC = 0x5240; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_6_LOC = 0x5260; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_5_7_LOC = 0x5280; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_0_LOC = 0x52a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_1_LOC = 0x52c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_2_LOC = 0x52e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_3_LOC = 0x5300; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_4_LOC = 0x5320; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_5_LOC = 0x5340; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_6_LOC = 0x5360; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_6_7_LOC = 0x5380; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_0_LOC = 0x53a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_1_LOC = 0x53c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_2_LOC = 0x53e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_3_LOC = 0x5400; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_4_LOC = 0x5420; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_5_LOC = 0x5440; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_6_LOC = 0x5460; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_7_7_LOC = 0x5480; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_0_LOC = 0x54a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_1_LOC = 0x54c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_2_LOC = 0x54e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_3_LOC = 0x5500; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_4_LOC = 0x5520; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_5_LOC = 0x5540; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_6_LOC = 0x5560; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_8_7_LOC = 0x5580; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_0_LOC = 0x55a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_1_LOC = 0x55c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_2_LOC = 0x55e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_3_LOC = 0x5600; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_4_LOC = 0x5620; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_5_LOC = 0x5640; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_6_LOC = 0x5660; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_9_7_LOC = 0x5680; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_0_LOC = 0x56a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_1_LOC = 0x56c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_2_LOC = 0x56e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_3_LOC = 0x5700; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_4_LOC = 0x5720; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_5_LOC = 0x5740; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_6_LOC = 0x5760; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_10_7_LOC = 0x5780; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_0_LOC = 0x57a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_1_LOC = 0x57c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_2_LOC = 0x57e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_3_LOC = 0x5800; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_4_LOC = 0x5820; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_5_LOC = 0x5840; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_6_LOC = 0x5860; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_11_7_LOC = 0x5880; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_0_LOC = 0x58a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_1_LOC = 0x58c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_2_LOC = 0x58e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_3_LOC = 0x5900; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_4_LOC = 0x5920; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_5_LOC = 0x5940; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_6_LOC = 0x5960; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_12_7_LOC = 0x5980; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_0_LOC = 0x59a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_1_LOC = 0x59c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_2_LOC = 0x59e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_3_LOC = 0x5a00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_4_LOC = 0x5a20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_5_LOC = 0x5a40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_6_LOC = 0x5a60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_13_7_LOC = 0x5a80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_0_LOC = 0x5aa0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_1_LOC = 0x5ac0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_2_LOC = 0x5ae0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_3_LOC = 0x5b00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_4_LOC = 0x5b20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_5_LOC = 0x5b40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_6_LOC = 0x5b60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_14_7_LOC = 0x5b80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_0_LOC = 0x5ba0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_1_LOC = 0x5bc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_2_LOC = 0x5be0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_3_LOC = 0x5c00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_4_LOC = 0x5c20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_5_LOC = 0x5c40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_6_LOC = 0x5c60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_15_7_LOC = 0x5c80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_0_LOC = 0x5ca0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_1_LOC = 0x5cc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_2_LOC = 0x5ce0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_3_LOC = 0x5d00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_4_LOC = 0x5d20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_5_LOC = 0x5d40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_6_LOC = 0x5d60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_16_7_LOC = 0x5d80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_0_LOC = 0x5da0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_1_LOC = 0x5dc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_2_LOC = 0x5de0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_3_LOC = 0x5e00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_4_LOC = 0x5e20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_5_LOC = 0x5e40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_6_LOC = 0x5e60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_17_7_LOC = 0x5e80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_0_LOC = 0x5ea0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_1_LOC = 0x5ec0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_2_LOC = 0x5ee0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_3_LOC = 0x5f00; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_4_LOC = 0x5f20; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_5_LOC = 0x5f40; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_6_LOC = 0x5f60; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_18_7_LOC = 0x5f80; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_0_LOC = 0x5fa0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_1_LOC = 0x5fc0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_2_LOC = 0x5fe0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_3_LOC = 0x6000; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_4_LOC = 0x6020; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_5_LOC = 0x6040; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_6_LOC = 0x6060; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_19_7_LOC = 0x6080; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_0_LOC = 0x60a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_1_LOC = 0x60c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_2_LOC = 0x60e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_3_LOC = 0x6100; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_4_LOC = 0x6120; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_5_LOC = 0x6140; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_6_LOC = 0x6160; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_20_7_LOC = 0x6180; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_0_LOC = 0x61a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_1_LOC = 0x61c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_2_LOC = 0x61e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_3_LOC = 0x6200; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_4_LOC = 0x6220; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_5_LOC = 0x6240; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_6_LOC = 0x6260; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_21_7_LOC = 0x6280; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_0_LOC = 0x62a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_1_LOC = 0x62c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_2_LOC = 0x62e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_3_LOC = 0x6300; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_4_LOC = 0x6320; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_5_LOC = 0x6340; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_6_LOC = 0x6360; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_22_7_LOC = 0x6380; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_0_LOC = 0x63a0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_1_LOC = 0x63c0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_2_LOC = 0x63e0; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_3_LOC = 0x6400; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_4_LOC = 0x6420; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_5_LOC = 0x6440; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_6_LOC = 0x6460; +uint256 internal constant BARYCENTRIC_DENOMINATOR_INVERSES_23_7_LOC = 0x6480; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - BARYCENTRIC COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - SUBRELATION EVALUATIONS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant SUBRELATION_EVAL_0_LOC = 0x64a0; +uint256 internal constant SUBRELATION_EVAL_1_LOC = 0x64c0; +uint256 internal constant SUBRELATION_EVAL_2_LOC = 0x64e0; +uint256 internal constant SUBRELATION_EVAL_3_LOC = 0x6500; +uint256 internal constant SUBRELATION_EVAL_4_LOC = 0x6520; +uint256 internal constant SUBRELATION_EVAL_5_LOC = 0x6540; +uint256 internal constant SUBRELATION_EVAL_6_LOC = 0x6560; +uint256 internal constant SUBRELATION_EVAL_7_LOC = 0x6580; +uint256 internal constant SUBRELATION_EVAL_8_LOC = 0x65a0; +uint256 internal constant SUBRELATION_EVAL_9_LOC = 0x65c0; +uint256 internal constant SUBRELATION_EVAL_10_LOC = 0x65e0; +uint256 internal constant SUBRELATION_EVAL_11_LOC = 0x6600; +uint256 internal constant SUBRELATION_EVAL_12_LOC = 0x6620; +uint256 internal constant SUBRELATION_EVAL_13_LOC = 0x6640; +uint256 internal constant SUBRELATION_EVAL_14_LOC = 0x6660; +uint256 internal constant SUBRELATION_EVAL_15_LOC = 0x6680; +uint256 internal constant SUBRELATION_EVAL_16_LOC = 0x66a0; +uint256 internal constant SUBRELATION_EVAL_17_LOC = 0x66c0; +uint256 internal constant SUBRELATION_EVAL_18_LOC = 0x66e0; +uint256 internal constant SUBRELATION_EVAL_19_LOC = 0x6700; +uint256 internal constant SUBRELATION_EVAL_20_LOC = 0x6720; +uint256 internal constant SUBRELATION_EVAL_21_LOC = 0x6740; +uint256 internal constant SUBRELATION_EVAL_22_LOC = 0x6760; +uint256 internal constant SUBRELATION_EVAL_23_LOC = 0x6780; +uint256 internal constant SUBRELATION_EVAL_24_LOC = 0x67a0; +uint256 internal constant SUBRELATION_EVAL_25_LOC = 0x67c0; +uint256 internal constant SUBRELATION_EVAL_26_LOC = 0x67e0; +uint256 internal constant SUBRELATION_EVAL_27_LOC = 0x6800; +uint256 internal constant SUBRELATION_EVAL_28_LOC = 0x6820; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - SUBRELATION EVALUATIONS COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - SUBRELATION INTERMEDIATES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant FINAL_ROUND_TARGET_LOC = 0x6840; +uint256 internal constant POW_PARTIAL_EVALUATION_LOC = 0x6860; +uint256 internal constant AUX_NON_NATIVE_FIELD_IDENTITY = 0x6880; +uint256 internal constant AUX_LIMB_ACCUMULATOR_IDENTITY = 0x68a0; +uint256 internal constant AUX_RAM_CONSISTENCY_CHECK_IDENTITY = 0x68c0; +uint256 internal constant AUX_ROM_CONSISTENCY_CHECK_IDENTITY = 0x68e0; +uint256 internal constant AUX_MEMORY_CHECK_IDENTITY = 0x6900; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - RUNTIME MEMORY - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - RUNTIME MEMORY */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - POWERS OF EVALUATION CHALLENGE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +/// {{ UNROLL_SECTION_START POWERS_OF_EVALUATION_CHALLENGE }} +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_0_LOC = 0x6920; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_1_LOC = 0x6940; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_2_LOC = 0x6960; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_3_LOC = 0x6980; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_4_LOC = 0x69a0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_5_LOC = 0x69c0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_6_LOC = 0x69e0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_7_LOC = 0x6a00; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_8_LOC = 0x6a20; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_9_LOC = 0x6a40; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_10_LOC = 0x6a60; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_11_LOC = 0x6a80; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_12_LOC = 0x6aa0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_13_LOC = 0x6ac0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_14_LOC = 0x6ae0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_15_LOC = 0x6b00; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_16_LOC = 0x6b20; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_17_LOC = 0x6b40; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_18_LOC = 0x6b60; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_19_LOC = 0x6b80; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_20_LOC = 0x6ba0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_21_LOC = 0x6bc0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_22_LOC = 0x6be0; +uint256 internal constant POWERS_OF_EVALUATION_CHALLENGE_23_LOC = 0x6c00; +/// {{ UNROLL_SECTION_END POWERS_OF_EVALUATION_CHALLENGE }} + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - POWERS OF EVALUATION CHALLENGE COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - RUNTIME MEMORY - BATCH SCALARS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant BATCH_SCALAR_1_LOC = 0x6c20; +uint256 internal constant BATCH_SCALAR_2_LOC = 0x6c40; +uint256 internal constant BATCH_SCALAR_3_LOC = 0x6c60; +uint256 internal constant BATCH_SCALAR_4_LOC = 0x6c80; +uint256 internal constant BATCH_SCALAR_5_LOC = 0x6ca0; +uint256 internal constant BATCH_SCALAR_6_LOC = 0x6cc0; +uint256 internal constant BATCH_SCALAR_7_LOC = 0x6ce0; +uint256 internal constant BATCH_SCALAR_8_LOC = 0x6d00; +uint256 internal constant BATCH_SCALAR_9_LOC = 0x6d20; +uint256 internal constant BATCH_SCALAR_10_LOC = 0x6d40; +uint256 internal constant BATCH_SCALAR_11_LOC = 0x6d60; +uint256 internal constant BATCH_SCALAR_12_LOC = 0x6d80; +uint256 internal constant BATCH_SCALAR_13_LOC = 0x6da0; +uint256 internal constant BATCH_SCALAR_14_LOC = 0x6dc0; +uint256 internal constant BATCH_SCALAR_15_LOC = 0x6de0; +uint256 internal constant BATCH_SCALAR_16_LOC = 0x6e00; +uint256 internal constant BATCH_SCALAR_17_LOC = 0x6e20; +uint256 internal constant BATCH_SCALAR_18_LOC = 0x6e40; +uint256 internal constant BATCH_SCALAR_19_LOC = 0x6e60; +uint256 internal constant BATCH_SCALAR_20_LOC = 0x6e80; +uint256 internal constant BATCH_SCALAR_21_LOC = 0x6ea0; +uint256 internal constant BATCH_SCALAR_22_LOC = 0x6ec0; +uint256 internal constant BATCH_SCALAR_23_LOC = 0x6ee0; +uint256 internal constant BATCH_SCALAR_24_LOC = 0x6f00; +uint256 internal constant BATCH_SCALAR_25_LOC = 0x6f20; +uint256 internal constant BATCH_SCALAR_26_LOC = 0x6f40; +uint256 internal constant BATCH_SCALAR_27_LOC = 0x6f60; +uint256 internal constant BATCH_SCALAR_28_LOC = 0x6f80; +uint256 internal constant BATCH_SCALAR_29_LOC = 0x6fa0; +uint256 internal constant BATCH_SCALAR_30_LOC = 0x6fc0; +uint256 internal constant BATCH_SCALAR_31_LOC = 0x6fe0; +uint256 internal constant BATCH_SCALAR_32_LOC = 0x7000; +uint256 internal constant BATCH_SCALAR_33_LOC = 0x7020; +uint256 internal constant BATCH_SCALAR_34_LOC = 0x7040; +uint256 internal constant BATCH_SCALAR_35_LOC = 0x7060; +uint256 internal constant BATCH_SCALAR_36_LOC = 0x7080; +uint256 internal constant BATCH_SCALAR_37_LOC = 0x70a0; +uint256 internal constant BATCH_SCALAR_38_LOC = 0x70c0; +uint256 internal constant BATCH_SCALAR_39_LOC = 0x70e0; +uint256 internal constant BATCH_SCALAR_40_LOC = 0x7100; +uint256 internal constant BATCH_SCALAR_41_LOC = 0x7120; +uint256 internal constant BATCH_SCALAR_42_LOC = 0x7140; +uint256 internal constant BATCH_SCALAR_43_LOC = 0x7160; +uint256 internal constant BATCH_SCALAR_44_LOC = 0x7180; +uint256 internal constant BATCH_SCALAR_45_LOC = 0x71a0; +uint256 internal constant BATCH_SCALAR_46_LOC = 0x71c0; +uint256 internal constant BATCH_SCALAR_47_LOC = 0x71e0; +uint256 internal constant BATCH_SCALAR_48_LOC = 0x7200; +uint256 internal constant BATCH_SCALAR_49_LOC = 0x7220; +uint256 internal constant BATCH_SCALAR_50_LOC = 0x7240; +uint256 internal constant BATCH_SCALAR_51_LOC = 0x7260; +uint256 internal constant BATCH_SCALAR_52_LOC = 0x7280; +uint256 internal constant BATCH_SCALAR_53_LOC = 0x72a0; +uint256 internal constant BATCH_SCALAR_54_LOC = 0x72c0; +uint256 internal constant BATCH_SCALAR_55_LOC = 0x72e0; +uint256 internal constant BATCH_SCALAR_56_LOC = 0x7300; +uint256 internal constant BATCH_SCALAR_57_LOC = 0x7320; +uint256 internal constant BATCH_SCALAR_58_LOC = 0x7340; +uint256 internal constant BATCH_SCALAR_59_LOC = 0x7360; +uint256 internal constant BATCH_SCALAR_60_LOC = 0x7380; +uint256 internal constant BATCH_SCALAR_61_LOC = 0x73a0; +uint256 internal constant BATCH_SCALAR_62_LOC = 0x73c0; +uint256 internal constant BATCH_SCALAR_63_LOC = 0x73e0; +uint256 internal constant BATCH_SCALAR_64_LOC = 0x7400; +uint256 internal constant BATCH_SCALAR_65_LOC = 0x7420; +uint256 internal constant BATCH_SCALAR_66_LOC = 0x7440; +uint256 internal constant BATCH_SCALAR_67_LOC = 0x7460; +uint256 internal constant BATCH_SCALAR_68_LOC = 0x7480; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - RUNTIME MEMORY - BATCH SCALARS COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI - RUNTIME MEMORY - INVERSIONS */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant GEMINI_R_INV_LOC = 0x74a0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_0_LOC = 0x74c0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_1_LOC = 0x74e0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_2_LOC = 0x7500; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_3_LOC = 0x7520; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_4_LOC = 0x7540; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_5_LOC = 0x7560; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_6_LOC = 0x7580; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_7_LOC = 0x75a0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_8_LOC = 0x75c0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_9_LOC = 0x75e0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_10_LOC = 0x7600; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_11_LOC = 0x7620; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_12_LOC = 0x7640; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_13_LOC = 0x7660; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_14_LOC = 0x7680; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_15_LOC = 0x76a0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_16_LOC = 0x76c0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_17_LOC = 0x76e0; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_18_LOC = 0x7700; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_19_LOC = 0x7720; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_20_LOC = 0x7740; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_21_LOC = 0x7760; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_22_LOC = 0x7780; +uint256 internal constant BATCH_EVALUATION_ACCUMULATOR_INVERSION_23_LOC = 0x77a0; + +uint256 internal constant CONSTANT_TERM_ACCUMULATOR_LOC = 0x77c0; + +uint256 internal constant POS_INVERTED_DENOMINATOR = 0x77e0; +uint256 internal constant NEG_INVERTED_DENOMINATOR = 0x7800; + +// LOG_N challenge pow minus u +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_0_LOC = 0x7820; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_1_LOC = 0x7840; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_2_LOC = 0x7860; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_3_LOC = 0x7880; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_4_LOC = 0x78a0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_5_LOC = 0x78c0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_6_LOC = 0x78e0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_7_LOC = 0x7900; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_8_LOC = 0x7920; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_9_LOC = 0x7940; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_10_LOC = 0x7960; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_11_LOC = 0x7980; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_12_LOC = 0x79a0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_13_LOC = 0x79c0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_14_LOC = 0x79e0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_15_LOC = 0x7a00; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_16_LOC = 0x7a20; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_17_LOC = 0x7a40; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_18_LOC = 0x7a60; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_19_LOC = 0x7a80; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_20_LOC = 0x7aa0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_21_LOC = 0x7ac0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_22_LOC = 0x7ae0; +uint256 internal constant INVERTED_CHALLENGE_POW_MINUS_U_23_LOC = 0x7b00; + +// LOG_N pos_inverted_off +uint256 internal constant POS_INVERTED_DENOM_0_LOC = 0x7b20; +uint256 internal constant POS_INVERTED_DENOM_1_LOC = 0x7b40; +uint256 internal constant POS_INVERTED_DENOM_2_LOC = 0x7b60; +uint256 internal constant POS_INVERTED_DENOM_3_LOC = 0x7b80; +uint256 internal constant POS_INVERTED_DENOM_4_LOC = 0x7ba0; +uint256 internal constant POS_INVERTED_DENOM_5_LOC = 0x7bc0; +uint256 internal constant POS_INVERTED_DENOM_6_LOC = 0x7be0; +uint256 internal constant POS_INVERTED_DENOM_7_LOC = 0x7c00; +uint256 internal constant POS_INVERTED_DENOM_8_LOC = 0x7c20; +uint256 internal constant POS_INVERTED_DENOM_9_LOC = 0x7c40; +uint256 internal constant POS_INVERTED_DENOM_10_LOC = 0x7c60; +uint256 internal constant POS_INVERTED_DENOM_11_LOC = 0x7c80; +uint256 internal constant POS_INVERTED_DENOM_12_LOC = 0x7ca0; +uint256 internal constant POS_INVERTED_DENOM_13_LOC = 0x7cc0; +uint256 internal constant POS_INVERTED_DENOM_14_LOC = 0x7ce0; +uint256 internal constant POS_INVERTED_DENOM_15_LOC = 0x7d00; +uint256 internal constant POS_INVERTED_DENOM_16_LOC = 0x7d20; +uint256 internal constant POS_INVERTED_DENOM_17_LOC = 0x7d40; +uint256 internal constant POS_INVERTED_DENOM_18_LOC = 0x7d60; +uint256 internal constant POS_INVERTED_DENOM_19_LOC = 0x7d80; +uint256 internal constant POS_INVERTED_DENOM_20_LOC = 0x7da0; +uint256 internal constant POS_INVERTED_DENOM_21_LOC = 0x7dc0; +uint256 internal constant POS_INVERTED_DENOM_22_LOC = 0x7de0; +uint256 internal constant POS_INVERTED_DENOM_23_LOC = 0x7e00; + +// LOG_N neg_inverted_off +uint256 internal constant NEG_INVERTED_DENOM_0_LOC = 0x7e20; +uint256 internal constant NEG_INVERTED_DENOM_1_LOC = 0x7e40; +uint256 internal constant NEG_INVERTED_DENOM_2_LOC = 0x7e60; +uint256 internal constant NEG_INVERTED_DENOM_3_LOC = 0x7e80; +uint256 internal constant NEG_INVERTED_DENOM_4_LOC = 0x7ea0; +uint256 internal constant NEG_INVERTED_DENOM_5_LOC = 0x7ec0; +uint256 internal constant NEG_INVERTED_DENOM_6_LOC = 0x7ee0; +uint256 internal constant NEG_INVERTED_DENOM_7_LOC = 0x7f00; +uint256 internal constant NEG_INVERTED_DENOM_8_LOC = 0x7f20; +uint256 internal constant NEG_INVERTED_DENOM_9_LOC = 0x7f40; +uint256 internal constant NEG_INVERTED_DENOM_10_LOC = 0x7f60; +uint256 internal constant NEG_INVERTED_DENOM_11_LOC = 0x7f80; +uint256 internal constant NEG_INVERTED_DENOM_12_LOC = 0x7fa0; +uint256 internal constant NEG_INVERTED_DENOM_13_LOC = 0x7fc0; +uint256 internal constant NEG_INVERTED_DENOM_14_LOC = 0x7fe0; +uint256 internal constant NEG_INVERTED_DENOM_15_LOC = 0x8000; +uint256 internal constant NEG_INVERTED_DENOM_16_LOC = 0x8020; +uint256 internal constant NEG_INVERTED_DENOM_17_LOC = 0x8040; +uint256 internal constant NEG_INVERTED_DENOM_18_LOC = 0x8060; +uint256 internal constant NEG_INVERTED_DENOM_19_LOC = 0x8080; +uint256 internal constant NEG_INVERTED_DENOM_20_LOC = 0x80a0; +uint256 internal constant NEG_INVERTED_DENOM_21_LOC = 0x80c0; +uint256 internal constant NEG_INVERTED_DENOM_22_LOC = 0x80e0; +uint256 internal constant NEG_INVERTED_DENOM_23_LOC = 0x8100; + +uint256 internal constant FOLD_POS_EVALUATIONS_0_LOC = 0x8120; +uint256 internal constant FOLD_POS_EVALUATIONS_1_LOC = 0x8140; +uint256 internal constant FOLD_POS_EVALUATIONS_2_LOC = 0x8160; +uint256 internal constant FOLD_POS_EVALUATIONS_3_LOC = 0x8180; +uint256 internal constant FOLD_POS_EVALUATIONS_4_LOC = 0x81a0; +uint256 internal constant FOLD_POS_EVALUATIONS_5_LOC = 0x81c0; +uint256 internal constant FOLD_POS_EVALUATIONS_6_LOC = 0x81e0; +uint256 internal constant FOLD_POS_EVALUATIONS_7_LOC = 0x8200; +uint256 internal constant FOLD_POS_EVALUATIONS_8_LOC = 0x8220; +uint256 internal constant FOLD_POS_EVALUATIONS_9_LOC = 0x8240; +uint256 internal constant FOLD_POS_EVALUATIONS_10_LOC = 0x8260; +uint256 internal constant FOLD_POS_EVALUATIONS_11_LOC = 0x8280; +uint256 internal constant FOLD_POS_EVALUATIONS_12_LOC = 0x82a0; +uint256 internal constant FOLD_POS_EVALUATIONS_13_LOC = 0x82c0; +uint256 internal constant FOLD_POS_EVALUATIONS_14_LOC = 0x82e0; +uint256 internal constant FOLD_POS_EVALUATIONS_15_LOC = 0x8300; +uint256 internal constant FOLD_POS_EVALUATIONS_16_LOC = 0x8320; +uint256 internal constant FOLD_POS_EVALUATIONS_17_LOC = 0x8340; +uint256 internal constant FOLD_POS_EVALUATIONS_18_LOC = 0x8360; +uint256 internal constant FOLD_POS_EVALUATIONS_19_LOC = 0x8380; +uint256 internal constant FOLD_POS_EVALUATIONS_20_LOC = 0x83a0; +uint256 internal constant FOLD_POS_EVALUATIONS_21_LOC = 0x83c0; +uint256 internal constant FOLD_POS_EVALUATIONS_22_LOC = 0x83e0; +uint256 internal constant FOLD_POS_EVALUATIONS_23_LOC = 0x8400; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI RUNTIME MEMORY - INVERSIONS - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SHPLEMINI RUNTIME MEMORY - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +uint256 internal constant BARYCENTRIC_TEMP_0_LOC = 0x8420; +uint256 internal constant BARYCENTRIC_TEMP_1_LOC = 0x8440; +uint256 internal constant BARYCENTRIC_TEMP_2_LOC = 0x8460; +uint256 internal constant BARYCENTRIC_TEMP_3_LOC = 0x8480; +uint256 internal constant BARYCENTRIC_TEMP_4_LOC = 0x84a0; +uint256 internal constant BARYCENTRIC_TEMP_5_LOC = 0x84c0; +uint256 internal constant BARYCENTRIC_TEMP_6_LOC = 0x84e0; +uint256 internal constant BARYCENTRIC_TEMP_7_LOC = 0x8500; +uint256 internal constant BARYCENTRIC_TEMP_8_LOC = 0x8520; +uint256 internal constant BARYCENTRIC_TEMP_9_LOC = 0x8540; +uint256 internal constant BARYCENTRIC_TEMP_10_LOC = 0x8560; +uint256 internal constant BARYCENTRIC_TEMP_11_LOC = 0x8580; +uint256 internal constant BARYCENTRIC_TEMP_12_LOC = 0x85a0; +uint256 internal constant BARYCENTRIC_TEMP_13_LOC = 0x85c0; +uint256 internal constant BARYCENTRIC_TEMP_14_LOC = 0x85e0; +uint256 internal constant BARYCENTRIC_TEMP_15_LOC = 0x8600; +uint256 internal constant BARYCENTRIC_TEMP_16_LOC = 0x8620; +uint256 internal constant BARYCENTRIC_TEMP_17_LOC = 0x8640; +uint256 internal constant BARYCENTRIC_TEMP_18_LOC = 0x8660; +uint256 internal constant BARYCENTRIC_TEMP_19_LOC = 0x8680; +uint256 internal constant BARYCENTRIC_TEMP_20_LOC = 0x86a0; +uint256 internal constant BARYCENTRIC_TEMP_21_LOC = 0x86c0; +uint256 internal constant BARYCENTRIC_TEMP_22_LOC = 0x86e0; +uint256 internal constant BARYCENTRIC_TEMP_23_LOC = 0x8700; +uint256 internal constant BARYCENTRIC_TEMP_24_LOC = 0x8720; +uint256 internal constant BARYCENTRIC_TEMP_25_LOC = 0x8740; +uint256 internal constant BARYCENTRIC_TEMP_26_LOC = 0x8760; +uint256 internal constant BARYCENTRIC_TEMP_27_LOC = 0x8780; +uint256 internal constant BARYCENTRIC_TEMP_28_LOC = 0x87a0; +uint256 internal constant BARYCENTRIC_TEMP_29_LOC = 0x87c0; +uint256 internal constant BARYCENTRIC_TEMP_30_LOC = 0x87e0; +uint256 internal constant BARYCENTRIC_TEMP_31_LOC = 0x8800; +uint256 internal constant BARYCENTRIC_TEMP_32_LOC = 0x8820; +uint256 internal constant BARYCENTRIC_TEMP_33_LOC = 0x8840; +uint256 internal constant BARYCENTRIC_TEMP_34_LOC = 0x8860; +uint256 internal constant BARYCENTRIC_TEMP_35_LOC = 0x8880; +uint256 internal constant BARYCENTRIC_TEMP_36_LOC = 0x88a0; +uint256 internal constant BARYCENTRIC_TEMP_37_LOC = 0x88c0; +uint256 internal constant BARYCENTRIC_TEMP_38_LOC = 0x88e0; +uint256 internal constant BARYCENTRIC_TEMP_39_LOC = 0x8900; +uint256 internal constant BARYCENTRIC_TEMP_40_LOC = 0x8920; +uint256 internal constant BARYCENTRIC_TEMP_41_LOC = 0x8940; +uint256 internal constant BARYCENTRIC_TEMP_42_LOC = 0x8960; +uint256 internal constant BARYCENTRIC_TEMP_43_LOC = 0x8980; +uint256 internal constant BARYCENTRIC_TEMP_44_LOC = 0x89a0; +uint256 internal constant BARYCENTRIC_TEMP_45_LOC = 0x89c0; +uint256 internal constant BARYCENTRIC_TEMP_46_LOC = 0x89e0; +uint256 internal constant BARYCENTRIC_TEMP_47_LOC = 0x8a00; +uint256 internal constant BARYCENTRIC_TEMP_48_LOC = 0x8a20; +uint256 internal constant BARYCENTRIC_TEMP_49_LOC = 0x8a40; +uint256 internal constant BARYCENTRIC_TEMP_50_LOC = 0x8a60; +uint256 internal constant BARYCENTRIC_TEMP_51_LOC = 0x8a80; +uint256 internal constant BARYCENTRIC_TEMP_52_LOC = 0x8aa0; +uint256 internal constant BARYCENTRIC_TEMP_53_LOC = 0x8ac0; +uint256 internal constant BARYCENTRIC_TEMP_54_LOC = 0x8ae0; +uint256 internal constant BARYCENTRIC_TEMP_55_LOC = 0x8b00; +uint256 internal constant BARYCENTRIC_TEMP_56_LOC = 0x8b20; +uint256 internal constant BARYCENTRIC_TEMP_57_LOC = 0x8b40; +uint256 internal constant BARYCENTRIC_TEMP_58_LOC = 0x8b60; +uint256 internal constant BARYCENTRIC_TEMP_59_LOC = 0x8b80; +uint256 internal constant BARYCENTRIC_TEMP_60_LOC = 0x8ba0; +uint256 internal constant BARYCENTRIC_TEMP_61_LOC = 0x8bc0; +uint256 internal constant BARYCENTRIC_TEMP_62_LOC = 0x8be0; +uint256 internal constant BARYCENTRIC_TEMP_63_LOC = 0x8c00; +uint256 internal constant BARYCENTRIC_TEMP_64_LOC = 0x8c20; +uint256 internal constant BARYCENTRIC_TEMP_65_LOC = 0x8c40; +uint256 internal constant BARYCENTRIC_TEMP_66_LOC = 0x8c60; +uint256 internal constant BARYCENTRIC_TEMP_67_LOC = 0x8c80; +uint256 internal constant BARYCENTRIC_TEMP_68_LOC = 0x8ca0; +uint256 internal constant BARYCENTRIC_TEMP_69_LOC = 0x8cc0; +uint256 internal constant BARYCENTRIC_TEMP_70_LOC = 0x8ce0; +uint256 internal constant BARYCENTRIC_TEMP_71_LOC = 0x8d00; +uint256 internal constant BARYCENTRIC_TEMP_72_LOC = 0x8d20; +uint256 internal constant BARYCENTRIC_TEMP_73_LOC = 0x8d40; +uint256 internal constant BARYCENTRIC_TEMP_74_LOC = 0x8d60; +uint256 internal constant BARYCENTRIC_TEMP_75_LOC = 0x8d80; +uint256 internal constant BARYCENTRIC_TEMP_76_LOC = 0x8da0; +uint256 internal constant BARYCENTRIC_TEMP_77_LOC = 0x8dc0; +uint256 internal constant BARYCENTRIC_TEMP_78_LOC = 0x8de0; +uint256 internal constant BARYCENTRIC_TEMP_79_LOC = 0x8e00; +uint256 internal constant BARYCENTRIC_TEMP_80_LOC = 0x8e20; +uint256 internal constant BARYCENTRIC_TEMP_81_LOC = 0x8e40; +uint256 internal constant BARYCENTRIC_TEMP_82_LOC = 0x8e60; +uint256 internal constant BARYCENTRIC_TEMP_83_LOC = 0x8e80; +uint256 internal constant BARYCENTRIC_TEMP_84_LOC = 0x8ea0; +uint256 internal constant BARYCENTRIC_TEMP_85_LOC = 0x8ec0; +uint256 internal constant BARYCENTRIC_TEMP_86_LOC = 0x8ee0; +uint256 internal constant BARYCENTRIC_TEMP_87_LOC = 0x8f00; +uint256 internal constant BARYCENTRIC_TEMP_88_LOC = 0x8f20; +uint256 internal constant BARYCENTRIC_TEMP_89_LOC = 0x8f40; +uint256 internal constant BARYCENTRIC_TEMP_90_LOC = 0x8f60; +uint256 internal constant BARYCENTRIC_TEMP_91_LOC = 0x8f80; +uint256 internal constant BARYCENTRIC_TEMP_92_LOC = 0x8fa0; +uint256 internal constant BARYCENTRIC_TEMP_93_LOC = 0x8fc0; +uint256 internal constant BARYCENTRIC_TEMP_94_LOC = 0x8fe0; +uint256 internal constant BARYCENTRIC_TEMP_95_LOC = 0x9000; +uint256 internal constant BARYCENTRIC_TEMP_96_LOC = 0x9020; +uint256 internal constant BARYCENTRIC_TEMP_97_LOC = 0x9040; +uint256 internal constant BARYCENTRIC_TEMP_98_LOC = 0x9060; +uint256 internal constant BARYCENTRIC_TEMP_99_LOC = 0x9080; +uint256 internal constant BARYCENTRIC_TEMP_100_LOC = 0x90a0; +uint256 internal constant BARYCENTRIC_TEMP_101_LOC = 0x90c0; +uint256 internal constant BARYCENTRIC_TEMP_102_LOC = 0x90e0; +uint256 internal constant BARYCENTRIC_TEMP_103_LOC = 0x9100; +uint256 internal constant BARYCENTRIC_TEMP_104_LOC = 0x9120; +uint256 internal constant BARYCENTRIC_TEMP_105_LOC = 0x9140; +uint256 internal constant BARYCENTRIC_TEMP_106_LOC = 0x9160; +uint256 internal constant BARYCENTRIC_TEMP_107_LOC = 0x9180; +uint256 internal constant BARYCENTRIC_TEMP_108_LOC = 0x91a0; +uint256 internal constant BARYCENTRIC_TEMP_109_LOC = 0x91c0; +uint256 internal constant BARYCENTRIC_TEMP_110_LOC = 0x91e0; +uint256 internal constant BARYCENTRIC_TEMP_111_LOC = 0x9200; +uint256 internal constant BARYCENTRIC_TEMP_112_LOC = 0x9220; +uint256 internal constant BARYCENTRIC_TEMP_113_LOC = 0x9240; +uint256 internal constant BARYCENTRIC_TEMP_114_LOC = 0x9260; +uint256 internal constant BARYCENTRIC_TEMP_115_LOC = 0x9280; +uint256 internal constant BARYCENTRIC_TEMP_116_LOC = 0x92a0; +uint256 internal constant BARYCENTRIC_TEMP_117_LOC = 0x92c0; +uint256 internal constant BARYCENTRIC_TEMP_118_LOC = 0x92e0; +uint256 internal constant BARYCENTRIC_TEMP_119_LOC = 0x9300; +uint256 internal constant BARYCENTRIC_TEMP_120_LOC = 0x9320; +uint256 internal constant BARYCENTRIC_TEMP_121_LOC = 0x9340; +uint256 internal constant BARYCENTRIC_TEMP_122_LOC = 0x9360; +uint256 internal constant BARYCENTRIC_TEMP_123_LOC = 0x9380; +uint256 internal constant BARYCENTRIC_TEMP_124_LOC = 0x93a0; +uint256 internal constant BARYCENTRIC_TEMP_125_LOC = 0x93c0; +uint256 internal constant BARYCENTRIC_TEMP_126_LOC = 0x93e0; +uint256 internal constant BARYCENTRIC_TEMP_127_LOC = 0x9400; +uint256 internal constant BARYCENTRIC_TEMP_128_LOC = 0x9420; +uint256 internal constant BARYCENTRIC_TEMP_129_LOC = 0x9440; +uint256 internal constant BARYCENTRIC_TEMP_130_LOC = 0x9460; +uint256 internal constant BARYCENTRIC_TEMP_131_LOC = 0x9480; +uint256 internal constant BARYCENTRIC_TEMP_132_LOC = 0x94a0; +uint256 internal constant BARYCENTRIC_TEMP_133_LOC = 0x94c0; +uint256 internal constant BARYCENTRIC_TEMP_134_LOC = 0x94e0; +uint256 internal constant BARYCENTRIC_TEMP_135_LOC = 0x9500; +uint256 internal constant BARYCENTRIC_TEMP_136_LOC = 0x9520; +uint256 internal constant BARYCENTRIC_TEMP_137_LOC = 0x9540; +uint256 internal constant BARYCENTRIC_TEMP_138_LOC = 0x9560; +uint256 internal constant BARYCENTRIC_TEMP_139_LOC = 0x9580; +uint256 internal constant BARYCENTRIC_TEMP_140_LOC = 0x95a0; +uint256 internal constant BARYCENTRIC_TEMP_141_LOC = 0x95c0; +uint256 internal constant BARYCENTRIC_TEMP_142_LOC = 0x95e0; +uint256 internal constant BARYCENTRIC_TEMP_143_LOC = 0x9600; +uint256 internal constant BARYCENTRIC_TEMP_144_LOC = 0x9620; +uint256 internal constant BARYCENTRIC_TEMP_145_LOC = 0x9640; +uint256 internal constant BARYCENTRIC_TEMP_146_LOC = 0x9660; +uint256 internal constant BARYCENTRIC_TEMP_147_LOC = 0x9680; +uint256 internal constant BARYCENTRIC_TEMP_148_LOC = 0x96a0; +uint256 internal constant BARYCENTRIC_TEMP_149_LOC = 0x96c0; +uint256 internal constant BARYCENTRIC_TEMP_150_LOC = 0x96e0; +uint256 internal constant BARYCENTRIC_TEMP_151_LOC = 0x9700; +uint256 internal constant BARYCENTRIC_TEMP_152_LOC = 0x9720; +uint256 internal constant BARYCENTRIC_TEMP_153_LOC = 0x9740; +uint256 internal constant BARYCENTRIC_TEMP_154_LOC = 0x9760; +uint256 internal constant BARYCENTRIC_TEMP_155_LOC = 0x9780; +uint256 internal constant BARYCENTRIC_TEMP_156_LOC = 0x97a0; +uint256 internal constant BARYCENTRIC_TEMP_157_LOC = 0x97c0; +uint256 internal constant BARYCENTRIC_TEMP_158_LOC = 0x97e0; +uint256 internal constant BARYCENTRIC_TEMP_159_LOC = 0x9800; +uint256 internal constant BARYCENTRIC_TEMP_160_LOC = 0x9820; +uint256 internal constant BARYCENTRIC_TEMP_161_LOC = 0x9840; +uint256 internal constant BARYCENTRIC_TEMP_162_LOC = 0x9860; +uint256 internal constant BARYCENTRIC_TEMP_163_LOC = 0x9880; +uint256 internal constant BARYCENTRIC_TEMP_164_LOC = 0x98a0; +uint256 internal constant BARYCENTRIC_TEMP_165_LOC = 0x98c0; +uint256 internal constant BARYCENTRIC_TEMP_166_LOC = 0x98e0; +uint256 internal constant BARYCENTRIC_TEMP_167_LOC = 0x9900; +uint256 internal constant BARYCENTRIC_TEMP_168_LOC = 0x9920; +uint256 internal constant BARYCENTRIC_TEMP_169_LOC = 0x9940; +uint256 internal constant BARYCENTRIC_TEMP_170_LOC = 0x9960; +uint256 internal constant BARYCENTRIC_TEMP_171_LOC = 0x9980; +uint256 internal constant BARYCENTRIC_TEMP_172_LOC = 0x99a0; +uint256 internal constant BARYCENTRIC_TEMP_173_LOC = 0x99c0; +uint256 internal constant BARYCENTRIC_TEMP_174_LOC = 0x99e0; +uint256 internal constant BARYCENTRIC_TEMP_175_LOC = 0x9a00; +uint256 internal constant BARYCENTRIC_TEMP_176_LOC = 0x9a20; +uint256 internal constant BARYCENTRIC_TEMP_177_LOC = 0x9a40; +uint256 internal constant BARYCENTRIC_TEMP_178_LOC = 0x9a60; +uint256 internal constant BARYCENTRIC_TEMP_179_LOC = 0x9a80; +uint256 internal constant BARYCENTRIC_TEMP_180_LOC = 0x9aa0; +uint256 internal constant BARYCENTRIC_TEMP_181_LOC = 0x9ac0; +uint256 internal constant BARYCENTRIC_TEMP_182_LOC = 0x9ae0; +uint256 internal constant BARYCENTRIC_TEMP_183_LOC = 0x9b00; +uint256 internal constant BARYCENTRIC_TEMP_184_LOC = 0x9b20; +uint256 internal constant BARYCENTRIC_TEMP_185_LOC = 0x9b40; +uint256 internal constant BARYCENTRIC_TEMP_186_LOC = 0x9b60; +uint256 internal constant BARYCENTRIC_TEMP_187_LOC = 0x9b80; +uint256 internal constant BARYCENTRIC_TEMP_188_LOC = 0x9ba0; +uint256 internal constant BARYCENTRIC_TEMP_189_LOC = 0x9bc0; +uint256 internal constant BARYCENTRIC_TEMP_190_LOC = 0x9be0; +uint256 internal constant BARYCENTRIC_TEMP_191_LOC = 0x9c00; +uint256 internal constant PUBLIC_INPUTS_DENOM_TEMP_LOC = 0x9c20; +uint256 internal constant GEMINI_R_INV_TEMP_LOC = 0x9c40; +uint256 internal constant BATCH_PRODUCT_TEMP_LOC = 0x9c60; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* Temporary space */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +uint256 internal constant TEMP_0_LOC = 0x9c80; +uint256 internal constant TEMP_1_LOC = 0x9ca0; +uint256 internal constant TEMP_2_LOC = 0x9cc0; +uint256 internal constant TEMP_3_LOC = 0x9ce0; +uint256 internal constant TEMP_4_LOC = 0x9d00; +uint256 internal constant TEMP_5_LOC = 0x9d20; +uint256 internal constant TEMP_6_LOC = 0x9d40; +uint256 internal constant TEMP_7_LOC = 0x9d60; +uint256 internal constant TEMP_8_LOC = 0x9d80; +uint256 internal constant TEMP_9_LOC = 0x9da0; +uint256 internal constant TEMP_10_LOC = 0x9dc0; +uint256 internal constant TEMP_11_LOC = 0x9de0; +uint256 internal constant TEMP_12_LOC = 0x9e00; +uint256 internal constant TEMP_13_LOC = 0x9e20; +uint256 internal constant TEMP_14_LOC = 0x9e40; +uint256 internal constant TEMP_15_LOC = 0x9e60; +uint256 internal constant TEMP_16_LOC = 0x9e80; +uint256 internal constant TEMP_17_LOC = 0x9ea0; +uint256 internal constant TEMP_18_LOC = 0x9ec0; +uint256 internal constant TEMP_19_LOC = 0x9ee0; +uint256 internal constant TEMP_20_LOC = 0x9f00; +uint256 internal constant TEMP_21_LOC = 0x9f20; +uint256 internal constant TEMP_22_LOC = 0x9f40; +uint256 internal constant TEMP_23_LOC = 0x9f60; +uint256 internal constant TEMP_24_LOC = 0x9f80; +uint256 internal constant TEMP_25_LOC = 0x9fa0; +uint256 internal constant TEMP_26_LOC = 0x9fc0; +uint256 internal constant TEMP_27_LOC = 0x9fe0; +uint256 internal constant TEMP_28_LOC = 0xa000; +uint256 internal constant TEMP_29_LOC = 0xa020; +uint256 internal constant TEMP_30_LOC = 0xa040; +uint256 internal constant TEMP_31_LOC = 0xa060; +uint256 internal constant TEMP_32_LOC = 0xa080; +uint256 internal constant TEMP_33_LOC = 0xa0a0; +uint256 internal constant TEMP_34_LOC = 0xa0c0; +uint256 internal constant TEMP_35_LOC = 0xa0e0; +uint256 internal constant TEMP_36_LOC = 0xa100; +uint256 internal constant TEMP_37_LOC = 0xa120; +uint256 internal constant TEMP_38_LOC = 0xa140; +uint256 internal constant TEMP_39_LOC = 0xa160; +uint256 internal constant TEMP_40_LOC = 0xa180; +uint256 internal constant TEMP_41_LOC = 0xa1a0; +uint256 internal constant TEMP_42_LOC = 0xa1c0; +uint256 internal constant TEMP_43_LOC = 0xa1e0; +uint256 internal constant TEMP_44_LOC = 0xa200; +uint256 internal constant TEMP_45_LOC = 0xa220; +uint256 internal constant TEMP_46_LOC = 0xa240; +uint256 internal constant TEMP_47_LOC = 0xa260; +uint256 internal constant TEMP_48_LOC = 0xa280; +uint256 internal constant TEMP_49_LOC = 0xa2a0; +uint256 internal constant TEMP_50_LOC = 0xa2c0; +uint256 internal constant TEMP_51_LOC = 0xa2e0; +uint256 internal constant TEMP_52_LOC = 0xa300; +uint256 internal constant TEMP_53_LOC = 0xa320; +uint256 internal constant TEMP_54_LOC = 0xa340; +uint256 internal constant TEMP_55_LOC = 0xa360; +uint256 internal constant TEMP_56_LOC = 0xa380; +uint256 internal constant TEMP_57_LOC = 0xa3a0; +uint256 internal constant TEMP_58_LOC = 0xa3c0; +uint256 internal constant TEMP_59_LOC = 0xa3e0; +uint256 internal constant TEMP_60_LOC = 0xa400; +uint256 internal constant TEMP_61_LOC = 0xa420; +uint256 internal constant TEMP_62_LOC = 0xa440; +uint256 internal constant TEMP_63_LOC = 0xa460; +uint256 internal constant TEMP_64_LOC = 0xa480; +uint256 internal constant TEMP_65_LOC = 0xa4a0; +uint256 internal constant TEMP_66_LOC = 0xa4c0; +uint256 internal constant TEMP_67_LOC = 0xa4e0; +uint256 internal constant TEMP_68_LOC = 0xa500; +uint256 internal constant TEMP_69_LOC = 0xa520; +uint256 internal constant TEMP_70_LOC = 0xa540; +uint256 internal constant TEMP_71_LOC = 0xa560; +uint256 internal constant LATER_SCRATCH_SPACE = 0xa580; + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* Temporary space - COMPLETE */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + +// Aliases for scratch space +// Scratch space aliases at 0x00-0x40 +// Phase 1 (sumcheck rounds): CHALL_POW_LOC, SUMCHECK_U_LOC, GEMINI_A_LOC +// Phase 2 (shplemini batch scalars): SS_POS_INV_DENOM_LOC, SS_NEG_INV_DENOM_LOC, SS_GEMINI_EVALS_LOC +// These phases do not overlap in execution time. +uint256 internal constant CHALL_POW_LOC = 0; +uint256 internal constant SUMCHECK_U_LOC = 0x20; +uint256 internal constant GEMINI_A_LOC = 0x40; + +uint256 internal constant SS_POS_INV_DENOM_LOC = 0; +uint256 internal constant SS_NEG_INV_DENOM_LOC = 0x20; +uint256 internal constant SS_GEMINI_EVALS_LOC = 0x40; + + + +/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ +/* SUMCHECK - MEMORY ALIASES */ +/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ +// {{ SECTION_END MEMORY_LAYOUT }} + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SUMCHECK - MEMORY ALIASES */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + uint256 internal constant EC_X_1 = W2_EVAL_LOC; + uint256 internal constant EC_Y_1 = W3_EVAL_LOC; + uint256 internal constant EC_X_2 = W1_SHIFT_EVAL_LOC; + uint256 internal constant EC_Y_2 = W4_SHIFT_EVAL_LOC; + uint256 internal constant EC_Y_3 = W3_SHIFT_EVAL_LOC; + uint256 internal constant EC_X_3 = W2_SHIFT_EVAL_LOC; + + // Aliases for selectors (Elliptic curve gadget) + uint256 internal constant EC_Q_SIGN = QL_EVAL_LOC; + uint256 internal constant EC_Q_IS_DOUBLE = QM_EVAL_LOC; + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* CONSTANTS */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + uint256 internal constant GRUMPKIN_CURVE_B_PARAMETER_NEGATED = 17; // -(-17) + + // Auxiliary relation constants + // In the Non Native Field Arithmetic Relation, large field elements are broken up into 4 LIMBs of 68 `LIMB_SIZE` bits each. + uint256 internal constant LIMB_SIZE = 0x100000000000000000; // 1<<68 + + // In the Delta Range Check Relation, there is a range checking relation that can validate 14-bit range checks with only 1 + // extra relation in the execution trace. + // For large range checks, we decompose them into a collection of 14-bit range checks. + uint256 internal constant SUBLIMB_SHIFT = 0x4000; // 1<<14 + + // Poseidon2 internal constants + // https://github.com/HorizenLabs/poseidon2/blob/main/poseidon2_rust_params.sage - derivation code + uint256 internal constant POS_INTERNAL_MATRIX_D_0 = + 0x10dc6e9c006ea38b04b1e03b4bd9490c0d03f98929ca1d7fb56821fd19d3b6e7; + uint256 internal constant POS_INTERNAL_MATRIX_D_1 = + 0x0c28145b6a44df3e0149b3d0a30b3bb599df9756d4dd9b84a86b38cfb45a740b; + uint256 internal constant POS_INTERNAL_MATRIX_D_2 = + 0x00544b8338791518b2c7645a50392798b21f75bb60e3596170067d00141cac15; + uint256 internal constant POS_INTERNAL_MATRIX_D_3 = + 0x222c01175718386f2e2e82eb122789e352e105a3b8fa852613bc534433ee428b; + + // Constants inspecting proof components + uint256 internal constant NUMBER_OF_UNSHIFTED_ENTITIES = 36; + // Shifted columns are columns that are duplicates of existing columns but right-shifted by 1 + uint256 internal constant NUMBER_OF_SHIFTED_ENTITIES = 5; + uint256 internal constant TOTAL_NUMBER_OF_ENTITIES = 41; + + // Constants for performing batch multiplication + uint256 internal constant ACCUMULATOR = 0x00; + uint256 internal constant ACCUMULATOR_2 = 0x40; + uint256 internal constant G1_LOCATION = 0x60; + uint256 internal constant G1_Y_LOCATION = 0x80; + uint256 internal constant SCALAR_LOCATION = 0xa0; + + uint256 internal constant LOWER_127_MASK = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; + + // Group order + uint256 internal constant Q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; // EC group order + + // Field order constants + // -1/2 mod p + uint256 internal constant NEG_HALF_MODULO_P = 0x183227397098d014dc2822db40c0ac2e9419f4243cdcb848a1f0fac9f8000000; + uint256 internal constant P = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + uint256 internal constant P_SUB_1 = 21888242871839275222246405745257275088548364400416034343698204186575808495616; + uint256 internal constant P_SUB_2 = 21888242871839275222246405745257275088548364400416034343698204186575808495615; + uint256 internal constant P_SUB_3 = 21888242871839275222246405745257275088548364400416034343698204186575808495614; + + // Barycentric evaluation constants + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_0 = + 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffec51; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_1 = + 0x00000000000000000000000000000000000000000000000000000000000002d0; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_2 = + 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffff11; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_3 = + 0x0000000000000000000000000000000000000000000000000000000000000090; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_4 = + 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffff71; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_5 = + 0x00000000000000000000000000000000000000000000000000000000000000f0; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_6 = + 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593effffd31; + uint256 internal constant BARYCENTRIC_LAGRANGE_DENOMINATOR_7 = + 0x00000000000000000000000000000000000000000000000000000000000013b0; + + // Constants for computing public input delta + uint256 internal constant PERMUTATION_ARGUMENT_VALUE_SEPARATOR = 1 << 28; + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* ERRORS */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // The errors match Errors.sol + + bytes4 internal constant VALUE_GE_LIMB_MAX_SELECTOR = 0xeb73e0bd; + bytes4 internal constant VALUE_GE_GROUP_ORDER_SELECTOR = 0x607be13e; + bytes4 internal constant VALUE_GE_FIELD_ORDER_SELECTOR = 0x20a33589; + bytes4 internal constant SUMCHECK_FAILED_SELECTOR = 0x9fc3a218; + bytes4 internal constant SHPLEMINI_FAILED_SELECTOR = 0xa5d82e8a; + + bytes4 internal constant PROOF_LENGTH_WRONG_WITH_LOG_N_SELECTOR = 0x59895a53; + bytes4 internal constant PUBLIC_INPUTS_LENGTH_WRONG_SELECTOR = 0xfa066593; + + bytes4 internal constant MODEXP_FAILED_SELECTOR = 0xf442f163; + + constructor() {} + + function verify( + bytes calldata, + /*proof*/ + bytes32[] calldata /*public_inputs*/ + ) + public + view + override + returns (bool) + { + // Load the proof from calldata in one large chunk + assembly { + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* LOAD VERIFCATION KEY */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Write the verification key into memory + // + // Although defined at the top of the file, it is used towards the end of the algorithm when batching in the commitment scheme. + function loadVk() { + mstore(Q_L_X_LOC, 0x017a8a0cf3a397ce7756b794ce207dfc776a84b4840c200af82743eed57509bd) + mstore(Q_L_Y_LOC, 0x000b1d68189c34958a2e13a63481f8d87bf370138c46a761aaca8a173b03a9d3) + mstore(Q_R_X_LOC, 0x1198ceb6897eb5bf185382fd9db5f67c2f42beacab00de0dd999afe5c34ec7db) + mstore(Q_R_Y_LOC, 0x1bc9c3e7c7b553aa0249bb5d30a789fdd8adb9f851b27a22a5ee184a7a254692) + mstore(Q_O_X_LOC, 0x0557105248ea360bb0f11dbd5caad011fa37dd5ecb7df2f8b18513e3c5098a07) + mstore(Q_O_Y_LOC, 0x096c3a3df86035e547d418dc08af89b5a97f4458eecc857f65bb0963b50f9970) + mstore(Q_4_X_LOC, 0x0cb7f4d0baab55a4cc5569f75f4bd17576c9c763df44fffff4e1a0ef48295f19) + mstore(Q_4_Y_LOC, 0x12b85145d1912e2993f1ce6553b9950eb3cf84e90cf3dcab20f007f4f191589d) + mstore(Q_M_X_LOC, 0x2d8a0a581ac18e6939e7e7af80a7d540d1f620e7177df74fe24f558c7b104557) + mstore(Q_M_Y_LOC, 0x1fe4782c8244ea17f5f19997f0725e650ac023119d3aecfbee4db3f93ea1ba1c) + mstore(Q_C_X_LOC, 0x1c8a93c71eba79121c4d0272d5a4140a36c40be7bf7c7640eb5b6aede0c4e82e) + mstore(Q_C_Y_LOC, 0x1cf91310860fabc4e9198abdaa7b3ed64b4b9fb67cc63b5adc6ca2bcbd3253c1) + mstore(Q_LOOKUP_X_LOC, 0x240c61ca01a9d4825953d57fb86faac15533fc645dae5893626b1720bef4c8f6) + mstore(Q_LOOKUP_Y_LOC, 0x2a4c84ccc7881879778269b15736cf76a4068b1d3bb0e280ebe63a7842508c49) + mstore(Q_ARITH_X_LOC, 0x1d6762984350fdc556daef887e843d0c48ad9b6abba6bb7a32daadfafba9e3d7) + mstore(Q_ARITH_Y_LOC, 0x0bea8022cae52ea805ea2453efbf696a9b8a346fc98b496c8dc245fe9ac62591) + mstore(Q_DELTA_RANGE_X_LOC, 0x1cf67109fd502f661c92fdb1f4f73b6a1068bf5f0bab6ce2d606fbccbfff1d22) + mstore(Q_DELTA_RANGE_Y_LOC, 0x05311ac817e970a0d2b9f8300bb5928a7bfdf95ed29b2f1da5ba08185fc3da86) + mstore(Q_ELLIPTIC_X_LOC, 0x0ec16681196c2d137b00078695601906af1c60a47f04f75c26224256e9e0963e) + mstore(Q_ELLIPTIC_Y_LOC, 0x1a2a0528b7d4c19adfcc974fa0531311a7e7934d65798705582eb5fcd42dded1) + mstore(Q_MEMORY_X_LOC, 0x20588c1fa5935f23278d006804a78fb7830b4609665b901291dae8588ed8891f) + mstore(Q_MEMORY_Y_LOC, 0x24f783d3b24e1d26712bf598f580deae90ef70ec78b097e10612e1b162f2bff9) + mstore(Q_NNF_X_LOC, 0x149d8ac87dc66f73f91d298c338332cc2015b4b79bc7a960fa9176c463da2704) + mstore(Q_NNF_Y_LOC, 0x07bd36e609f9c695ae51065a0ac0dc2d601c1fcb771f7767b012b0fce84646b5) + mstore(Q_POSEIDON_2_EXTERNAL_X_LOC, 0x1a91ab71218d3010556e443c181471fcf83e00a3cc81f944259037777b212a9f) + mstore(Q_POSEIDON_2_EXTERNAL_Y_LOC, 0x2af8ae980d3fd0fde23ffef59b1a4d991375b850c5a9463867453a7cd3850ee0) + mstore(Q_POSEIDON_2_INTERNAL_X_LOC, 0x02cc26c0ce63be81d3f53b06aaa90cfac5b1cfc925b25a835af9369dca819ae0) + mstore(Q_POSEIDON_2_INTERNAL_Y_LOC, 0x02d94c7a87d26c97a92d67ab0f6bb320a11a65a9129431d5dce11e3aa37ad700) + mstore(SIGMA_1_X_LOC, 0x1d48dccf1c179d23528264773bfc39ee28b9f91ac57eb242a2fad7d721b21393) + mstore(SIGMA_1_Y_LOC, 0x0e77686b0597e42ca7293b93a15d654e57c75053abe0bec01789cf633f26ebb5) + mstore(SIGMA_2_X_LOC, 0x0f9b447eeb4285e715dbdc8d42f2f856165f666cd9720b7c772291d2d3563803) + mstore(SIGMA_2_Y_LOC, 0x157423173855e0b30e65b033bfd06fe6e660ac6123f6f7b4d38eae12a7175241) + mstore(SIGMA_3_X_LOC, 0x28919740422e36ab96f10f2559851daf51c9a7cb0e77a49cfc4fd9af501d7789) + mstore(SIGMA_3_Y_LOC, 0x21f2abf738927e842de9363f1b9b4718f9ea8de517a1241bcad3681a4acde43f) + mstore(SIGMA_4_X_LOC, 0x0d29ed188cf2ba817d1d0f41533b08c1f92aecca31052637c6220774d83c760e) + mstore(SIGMA_4_Y_LOC, 0x0b8ed0ab98b1236524380a8fce7b75a9bb84ea8e7d3f27bdb61903a40ea41337) + mstore(TABLE_1_X_LOC, 0x290fb60f4114fa50e92897a66d9a86b7e1c60e6f84a4df2dc1d020da1537bab8) + mstore(TABLE_1_Y_LOC, 0x087bcd143b8021cae339bd062d6d837a34a3a502e6eaf2326a765d0703d31c01) + mstore(TABLE_2_X_LOC, 0x22e84aa48f8510653f8f7b7c9c8fa3ab838de294018587a7587990e0b1f92e8d) + mstore(TABLE_2_Y_LOC, 0x0ed854b35b0c13c96ef3b3071676b3524a1aa3fb28791d3d908840a5d1765872) + mstore(TABLE_3_X_LOC, 0x2be3b503e1119c1b4d7545a1ac3b10b9f82ed04da805bd4242f30aac7a03b8f8) + mstore(TABLE_3_Y_LOC, 0x0f45d075a4f5045b58c0084bf7abac45fd1def643fb0dc0479d534c0afa1a371) + mstore(TABLE_4_X_LOC, 0x2b4d0112219c6226700ca100a7d27041173ba6ae9f0dcd977df77401d7024afe) + mstore(TABLE_4_Y_LOC, 0x2da309999fbd4c76c28ddde2da2b34231b220013cbab34646c4ea3009fc10ac9) + mstore(ID_1_X_LOC, 0x29f14e4c60fd58035b68f2be26a5dcea1c3ad5fc3868d993adeddcac9498050b) + mstore(ID_1_Y_LOC, 0x19a254472a10d0e40e4fead233818b6de94b4fcab014024a76ce3264002edefa) + mstore(ID_2_X_LOC, 0x1ade6820202a78e54d0cb4efa6d2bd5f4adcdeb540846a592e36fc63c70cff1b) + mstore(ID_2_Y_LOC, 0x05ab5d398f3133326f329ae0f879278a66e69e81b196e237783c473c9d1303c5) + mstore(ID_3_X_LOC, 0x00b123a85cfe234991ef02f69b53f3c9883b6ac538882dcbbbb5a0f12b6e92c3) + mstore(ID_3_Y_LOC, 0x2ae7702684c2041e013b0ac1c8262ed40a191492f9faee8603bfe9ed903a426e) + mstore(ID_4_X_LOC, 0x01a83b27ff04eace4c79d9e60dc762b5781968d615a57436286379c83e4260fa) + mstore(ID_4_Y_LOC, 0x2771df16d8b5458b2820a44053f1f7f994ca87a927ed7282a71730c80e759ed9) + mstore(LAGRANGE_FIRST_X_LOC, 0x2a56ce41f6b0be13b9c26747621b821eee81b23a887f299049b14c11e98460d6) + mstore(LAGRANGE_FIRST_Y_LOC, 0x1aa98f2de3ddda547d8f6de4e725ded5827d6338c78656c0d12ca1aea6ef2c7c) + mstore(LAGRANGE_LAST_X_LOC, 0x1786179d723e6f94e6b65beec4a94e2cb1f36946e74d70b4e186ca051e8c2b16) + mstore(LAGRANGE_LAST_Y_LOC, 0x132ed90a46a33fbf9d0748162a877c8e6a0428d714bae03ce03d8847ab10b844) + } + + // Prime field order - placing on the stack + let p := P + + { + let proof_ptr := add(calldataload(0x04), 0x24) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* VALIDATE INPUT LENGTHS */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Validate proof byte length matches expected size for this circuit's LOG_N. + // Expected = (8*2 + LOG_N*BATCHED_RELATION_PARTIAL_LENGTH + NUMBER_OF_ENTITIES + // + (LOG_N-1)*2 + LOG_N + 2*2 + PAIRING_POINTS_SIZE) * 32 + { + let expected_proof_size := mul( + add( + add( + add(16, mul(LOG_N, BATCHED_RELATION_PARTIAL_LENGTH)), + add(NUMBER_OF_ENTITIES, mul(sub(LOG_N, 1), 2)) + ), + add(add(LOG_N, 4), PAIRING_POINTS_SIZE) + ), + 32 + ) + let proof_length := calldataload(add(calldataload(0x04), 0x04)) + if iszero(eq(proof_length, expected_proof_size)) { + mstore(0x00, PROOF_LENGTH_WRONG_WITH_LOG_N_SELECTOR) + mstore(0x04, LOG_N) + mstore(0x24, proof_length) + mstore(0x44, expected_proof_size) + revert(0x00, 0x64) + } + } + // Validate public inputs array length matches expected count. + { + let pi_count := calldataload(add(calldataload(0x24), 0x04)) + if iszero(eq(pi_count, REAL_NUMBER_PUBLIC_INPUTS)) { + mstore(0x00, PUBLIC_INPUTS_LENGTH_WRONG_SELECTOR) + revert(0x00, 0x04) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* GENERATE CHALLENGES */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + /* + * Proof points (affine coordinates) in the proof are in the following format, where offset is + * the offset in the entire proof until the first bit of the x coordinate + * offset + 0x00: x + * offset + 0x20: y + */ + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* GENERATE ETA CHALLENGE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + /* Eta challenge participants + * - circuit size + * - number of public inputs + * - public inputs offset + * - w1 + * - w2 + * - w3 + * + * Where circuit size, number of public inputs and public inputs offset are all 32 byte values + * and w1,w2,w3 are all proof points values + */ + + mstore(0x00, VK_HASH) + + let public_inputs_start := add(calldataload(0x24), 0x24) + let public_inputs_size := mul(REAL_NUMBER_PUBLIC_INPUTS, 0x20) + + // Copy the public inputs into the eta buffer + calldatacopy(0x20, public_inputs_start, public_inputs_size) + + // Copy Pairing points into eta buffer + let public_inputs_end := add(0x20, public_inputs_size) + + calldatacopy(public_inputs_end, proof_ptr, 0x100) + + // 0x20 * 8 = 0x100 (8 pairing point limbs) + // End of public inputs + pairing points + calldatacopy(add(0x120, public_inputs_size), add(proof_ptr, 0x100), 0x100) + + // 0x1e0 = 1 * 32 bytes + 3 * 64 bytes for (w1,w2,w3) + 0x100 for pairing points + let eta_input_length := add(0x1e0, public_inputs_size) + + // Get single eta challenge and compute powers (eta, eta², eta³) + let prev_challenge := mod(keccak256(0x00, eta_input_length), p) + mstore(0x00, prev_challenge) + + let eta := and(prev_challenge, LOWER_127_MASK) + let eta_two := mulmod(eta, eta, p) + let eta_three := mulmod(eta_two, eta, p) + + mstore(ETA_CHALLENGE, eta) + mstore(ETA_TWO_CHALLENGE, eta_two) + mstore(ETA_THREE_CHALLENGE, eta_three) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* LOAD PROOF INTO MEMORY */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // As all of our proof points are written in contiguous parts of memory, we call use a single + // calldatacopy to place all of our proof into the correct memory regions + // We copy the entire proof into memory as we must hash each proof section for challenge + // evaluation + // The last item in the proof, and the first item in the proof (pairing point 0) + let proof_size := sub(ETA_CHALLENGE, PAIRING_POINT_0_X_0_LOC) + + calldatacopy(PAIRING_POINT_0_X_0_LOC, proof_ptr, proof_size) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* VALIDATE PROOF INPUTS */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Validate all proof elements are within their expected ranges. + // Pairing limbs: lo < 2^136, hi < 2^120. G1 coordinates < Q. Fr elements < P. + { + let valid := true + let lo_limb_max := shl(136, 1) + let hi_limb_max := shl(120, 1) + let q_mod := Q + + // 1. Pairing limbs: lo < 2^136, hi < 2^120 (4 pairs, stride 0x40) + let ptr := PAIRING_POINT_0_X_0_LOC + for {} lt(ptr, W_L_X_LOC) { ptr := add(ptr, 0x40) } { + valid := and(valid, lt(mload(ptr), lo_limb_max)) + valid := and(valid, lt(mload(add(ptr, 0x20)), hi_limb_max)) + } + if iszero(valid) { + mstore(0x00, VALUE_GE_LIMB_MAX_SELECTOR) + revert(0x00, 0x04) + } + + // 2. G1 coordinates: each < Q + // - Witness commitments: W_L through Z_PERM (16 slots) + for { ptr := W_L_X_LOC } lt(ptr, SUMCHECK_UNIVARIATE_0_0_LOC) { ptr := add(ptr, 0x20) } { + valid := and(valid, lt(mload(ptr), q_mod)) + } + // - Gemini fold commitments (28 slots) + for { ptr := GEMINI_FOLD_UNIVARIATE_0_X_LOC } lt(ptr, GEMINI_A_EVAL_0) { ptr := add(ptr, 0x20) } { + valid := and(valid, lt(mload(ptr), q_mod)) + } + // - Shplonk Q + KZG quotient (4 slots) + for { ptr := SHPLONK_Q_X_LOC } lt(ptr, ETA_CHALLENGE) { ptr := add(ptr, 0x20) } { + valid := and(valid, lt(mload(ptr), q_mod)) + } + if iszero(valid) { + mstore(0x00, VALUE_GE_GROUP_ORDER_SELECTOR) + revert(0x00, 0x04) + } + + // 2b. G1 points: identity (0,0) is accepted. + // Polynomial commitments to identically-zero polynomials are + // legitimately the identity, and the ecAdd/ecMul precompiles + // treat (0,0) as the additive identity per EIP-196. Soundness + // against (0,0) substitution for a non-zero commitment is upheld + // by sumcheck/Shplemini downstream. + + // 3. Fr elements: each < P + // - Sumcheck univariates + evaluations (161 slots) + for { ptr := SUMCHECK_UNIVARIATE_0_0_LOC } lt(ptr, GEMINI_FOLD_UNIVARIATE_0_X_LOC) { + ptr := add(ptr, 0x20) + } { + valid := and(valid, lt(mload(ptr), p)) + } + // - Gemini evaluations (15 slots) + for { ptr := GEMINI_A_EVAL_0 } lt(ptr, SHPLONK_Q_X_LOC) { ptr := add(ptr, 0x20) } { + valid := and(valid, lt(mload(ptr), p)) + } + if iszero(valid) { + mstore(0x00, VALUE_GE_FIELD_ORDER_SELECTOR) + revert(0x00, 0x04) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* GENERATE BETA and GAMMA CHALLENGE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + // Generate Beta and Gamma Challenges + // - prevChallenge + // - LOOKUP_READ_COUNTS + // - LOOKUP_READ_TAGS + // - W4 + mcopy(0x20, LOOKUP_READ_COUNTS_X_LOC, 0xc0) + + prev_challenge := mod(keccak256(0x00, 0xe0), p) + mstore(0x00, prev_challenge) + let beta := and(prev_challenge, LOWER_127_MASK) + let gamma := shr(127, prev_challenge) + + mstore(BETA_CHALLENGE, beta) + mstore(GAMMA_CHALLENGE, gamma) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* ALPHA CHALLENGES */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Generate Alpha challenges - non-linearise the gate contributions + // + // There are 28 total subrelations in this honk relation, we do not need to non linearise the first sub relation. + // There are 27 total gate contributions, a gate contribution is analogous to + // a custom gate, it is an expression which must evaluate to zero for each + // row in the constraint matrix + // + // If we do not non-linearise sub relations, then sub relations which rely + // on the same wire will interact with each other's sums. + + mcopy(0x20, LOOKUP_INVERSES_X_LOC, 0x80) + + prev_challenge := mod(keccak256(0x00, 0xa0), p) + mstore(0x00, prev_challenge) + let alpha := and(prev_challenge, LOWER_127_MASK) + mstore(ALPHA_CHALLENGE_0, alpha) + + // Compute powers of alpha: alpha^2, alpha^3, ..., alpha^26 + let alpha_off_set := ALPHA_CHALLENGE_1 + for {} lt(alpha_off_set, add(ALPHA_CHALLENGE_27, 0x20)) {} { + let prev_alpha := mload(sub(alpha_off_set, 0x20)) + mstore(alpha_off_set, mulmod(prev_alpha, alpha, p)) + alpha_off_set := add(alpha_off_set, 0x20) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* GATE CHALLENGES */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + // Store the first gate challenge + prev_challenge := mod(keccak256(0x00, 0x20), p) + mstore(0x00, prev_challenge) + let gate_challenge := and(prev_challenge, LOWER_127_MASK) + mstore(GATE_CHALLENGE_0, gate_challenge) + + let gate_off := GATE_CHALLENGE_1 + for {} lt(gate_off, SUM_U_CHALLENGE_0) {} { + let prev := mload(sub(gate_off, 0x20)) + + mstore(gate_off, mulmod(prev, prev, p)) + gate_off := add(gate_off, 0x20) + } + + // Sumcheck Univariate challenges + // The algebraic relations of the Honk protocol are max degree-7. + // To prove satifiability, we multiply the relation by a random (POW) polynomial. We do this as we want all of our relations + // to be zero on every row - not for the sum of the relations to be zero. (Which is all sumcheck can do without this modification) + // + // As a result, in every round of sumcheck, the prover sends an degree-8 univariate polynomial. + // The sumcheck univariate challenge produces a challenge for each round of sumcheck, hashing the prev_challenge with + // a hash of the degree 8 univariate polynomial provided by the prover. + // + // 8 points are sent as it is enough to uniquely identify the polynomial + let read_off := SUMCHECK_UNIVARIATE_0_0_LOC + let write_off := SUM_U_CHALLENGE_0 + for {} lt(read_off, SIGMA1_EVAL_LOC) {} { + // Increase by 20 * batched relation length (8) + // 0x20 * 0x8 = 0x100 + mcopy(0x20, read_off, 0x100) + + // Hash 0x100 + 0x20 (prev hash) = 0x120 + prev_challenge := mod(keccak256(0x00, 0x120), p) + mstore(0x00, prev_challenge) + + let sumcheck_u_challenge := and(prev_challenge, LOWER_127_MASK) + mstore(write_off, sumcheck_u_challenge) + + // Progress read / write pointers + read_off := add(read_off, 0x100) + write_off := add(write_off, 0x20) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* RHO CHALLENGES */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // The RHO challenge is the hash of the evaluations of all of the wire values + // As per usual, it includes the previous challenge + // Evaluations of the following wires and their shifts (for relevant wires): + // - QM + // - QC + // - Q1 (QL) + // - Q2 (QR) + // - Q3 (QO) + // - Q4 + // - QLOOKUP + // - QARITH + // - QRANGE + // - QELLIPTIC + // - QMEMORY + // - QNNF (NNF = Non Native Field) + // - QPOSEIDON2_EXTERNAL + // - QPOSEIDON2_INTERNAL + // - SIGMA1 + // - SIGMA2 + // - SIGMA3 + // - SIGMA4 + // - ID1 + // - ID2 + // - ID3 + // - ID4 + // - TABLE1 + // - TABLE2 + // - TABLE3 + // - TABLE4 + // - W1 (WL) + // - W2 (WR) + // - W3 (WO) + // - W4 + // - Z_PERM + // - LOOKUP_INVERSES + // - LOOKUP_READ_COUNTS + // - LOOKUP_READ_TAGS + // - W1_SHIFT + // - W2_SHIFT + // - W3_SHIFT + // - W4_SHIFT + // - Z_PERM_SHIFT + // + // Hash of all of the above evaluations + // Number of bytes to copy = 0x20 * NUMBER_OF_ENTITIES (41) = 0x520 + mcopy(0x20, SIGMA1_EVAL_LOC, 0x520) + prev_challenge := mod(keccak256(0x00, 0x540), p) + mstore(0x00, prev_challenge) + + let rho := and(prev_challenge, LOWER_127_MASK) + + mstore(RHO_CHALLENGE, rho) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* GEMINI R CHALLENGE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // The Gemini R challenge contains a of all of commitments to all of the univariates + // evaluated in the Gemini Protocol + // So for multivariate polynomials in l variables, we will hash l - 1 commitments. + // For this implementation, we have logN number of of rounds and thus logN - 1 committments + // The format of these commitments are proof points, which are explained above + // 0x40 * (logN - 1) + + mcopy(0x20, GEMINI_FOLD_UNIVARIATE_0_X_LOC, 0x5c0) + + prev_challenge := mod(keccak256(0x00, 0x5e0), p) + mstore(0x00, prev_challenge) + + let geminiR := and(prev_challenge, LOWER_127_MASK) + + mstore(GEMINI_R_CHALLENGE, geminiR) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SHPLONK NU CHALLENGE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // The shplonk nu challenge hashes the evaluations of the above gemini univariates + // 0x20 * logN = 0x20 * 15 = 0x1e0 + + mcopy(0x20, GEMINI_A_EVAL_0, 0x300) + prev_challenge := mod(keccak256(0x00, 0x320), p) + mstore(0x00, prev_challenge) + + let shplonkNu := and(prev_challenge, LOWER_127_MASK) + mstore(SHPLONK_NU_CHALLENGE, shplonkNu) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SHPLONK Z CHALLENGE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Generate Shplonk Z + // Hash of the single shplonk Q commitment + mcopy(0x20, SHPLONK_Q_X_LOC, 0x40) + prev_challenge := mod(keccak256(0x00, 0x60), p) + + let shplonkZ := and(prev_challenge, LOWER_127_MASK) + mstore(SHPLONK_Z_CHALLENGE, shplonkZ) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* CHALLENGES COMPLETE */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PUBLIC INPUT DELTA */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + /** + * Generate public inputs delta + * + * The public inputs delta leverages plonk's copy constraints in order to + * evaluate public inputs. + * + * For each row of the execution trace, the prover will calculate the following value + * There are 4 witness wires, 4 id wires and 4 sigma wires in this instantiation of the proof system + * So there will be 4 groups of wires (w_i, id_i and sigma_i) + * + * (w_0 + β(id_0) + γ) * ∏(w_1 + β(id_1) + γ) * ∏(w_2 + β(id_2) + γ) * ∏(w_3 + β(id_3) + γ) + * ∏------------------------------------------------------------------------------------------ * public_inputs_delta + * (w_0 + β(σ_0) + γ) * ∏(w_1 + β(σ_1) + γ) * ∏(w_2 + β(σ_2) + γ) * ∏(w_3 + β(σ_3) + γ) + * + * The above product is accumulated for all rows in the trace. + * + * The above equation enforces that for each cell in the trace, if the id and sigma pair are equal, then the + * witness value in that cell is equal. + * + * We extra terms to add to this product that correspond to public input values. + * + * The values of id_i and σ_i polynomials are related to a generalized PLONK permutation argument, in the original paper, there + * were no id_i polynomials. + * + * These are required under the multilinear setting as we cannot use cosets of the roots of unity to represent unique sets, rather + * we just use polynomials that include unique values. In implementation, id_0 can be {0 .. n} and id_1 can be {n .. 2n} and so forth. + * + */ + { + let beta := mload(BETA_CHALLENGE) + let gamma := mload(GAMMA_CHALLENGE) + let pub_off := PUBLIC_INPUTS_OFFSET + + let numerator_value := 1 + let denominator_value := 1 + + let p_clone := p // move p to the front of the stack + + // Assume offset is less than p + // numerator_acc = gamma + (beta * (PERMUTATION_ARGUMENT_VALUE_SEPARATOR + offset)) + let numerator_acc := + addmod(gamma, mulmod(beta, add(PERMUTATION_ARGUMENT_VALUE_SEPARATOR, pub_off), p_clone), p_clone) + // denominator_acc = gamma - (beta * (offset + 1)) + let beta_x_off := mulmod(beta, add(pub_off, 1), p_clone) + let denominator_acc := addmod(gamma, sub(p_clone, beta_x_off), p_clone) + + let valid_inputs := true + // Load the starting point of the public inputs (jump over the selector and the length of public inputs [0x24]) + let public_inputs_ptr := add(calldataload(0x24), 0x24) + + // endpoint_ptr = public_inputs_ptr + num_inputs * 0x20. // every public input is 0x20 bytes + let endpoint_ptr := add(public_inputs_ptr, mul(REAL_NUMBER_PUBLIC_INPUTS, 0x20)) + + for {} lt(public_inputs_ptr, endpoint_ptr) { public_inputs_ptr := add(public_inputs_ptr, 0x20) } { + // Get public inputs from calldata + let input := calldataload(public_inputs_ptr) + + valid_inputs := and(valid_inputs, lt(input, p_clone)) + + numerator_value := mulmod(numerator_value, addmod(numerator_acc, input, p_clone), p_clone) + denominator_value := mulmod(denominator_value, addmod(denominator_acc, input, p_clone), p_clone) + + numerator_acc := addmod(numerator_acc, beta, p_clone) + denominator_acc := addmod(denominator_acc, sub(p_clone, beta), p_clone) + } + + // Revert if not all public inputs are field elements (i.e. < p) + if iszero(valid_inputs) { + mstore(0x00, VALUE_GE_FIELD_ORDER_SELECTOR) + revert(0x00, 0x04) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PUBLIC INPUT DELTA - Pairing points accum */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Pairing points contribution to public inputs delta + let pairing_points_ptr := PAIRING_POINT_0_X_0_LOC + for {} lt(pairing_points_ptr, W_L_X_LOC) { pairing_points_ptr := add(pairing_points_ptr, 0x20) } { + let input := mload(pairing_points_ptr) + + numerator_value := mulmod(numerator_value, addmod(numerator_acc, input, p_clone), p_clone) + denominator_value := mulmod(denominator_value, addmod(denominator_acc, input, p_clone), p_clone) + + numerator_acc := addmod(numerator_acc, beta, p_clone) + denominator_acc := addmod(denominator_acc, sub(p_clone, beta), p_clone) + } + + mstore(PUBLIC_INPUTS_DELTA_NUMERATOR_CHALLENGE, numerator_value) + mstore(PUBLIC_INPUTS_DELTA_DENOMINATOR_CHALLENGE, denominator_value) + + // PI delta denominator inversion is deferred to the barycentric + // batch inversion below. + } + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PUBLIC INPUT DELTA - complete */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SUMCHECK */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // + // Sumcheck is used to prove that every relation 0 on each row of the witness. + // + // Given each of the columns of our trace is a multilinear polynomial 𝑃1,…,𝑃𝑁∈𝔽[𝑋0,…,𝑋𝑑−1]. We run sumcheck over the polynomial + // + // 𝐹̃ (𝑋0,…,𝑋𝑑−1)=𝑝𝑜𝑤𝛽(𝑋0,…,𝑋𝑑−1)⋅𝐹(𝑃1(𝑋0,…,𝑋𝑑−1),…,𝑃𝑁(𝑋0,…,𝑋𝑑−1)) + // + // The Pow polynomial is a random polynomial that allows us to ceritify that the relations sum to 0 on each row of the witness, + // rather than the entire sum just targeting 0. + // + // Each polynomial P in our implementation are the polys in the proof and the verification key. (W_1, W_2, W_3, W_4, Z_PERM, etc....) + // + // We start with a LOG_N variate multilinear polynomial, each round fixes a variable to a challenge value. + // Each round the prover sends a round univariate poly, since the degree of our honk relations is 7 + the pow polynomial the prover + // sends a degree-8 univariate on each round. + // This is sent efficiently by sending 8 values, enough to represent a unique polynomial. + // Barycentric evaluation is used to evaluate the polynomial at any point on the domain, given these 8 unique points. + // + // In the sumcheck protocol, the target sum for each round is the sum of the round univariate evaluated on 0 and 1. + // 𝜎𝑖=?𝑆̃ 𝑖(0)+𝑆̃ 𝑖(1) + // This is efficiently checked as S(0) and S(1) are sent by the prover as values of the round univariate. + // + // We compute the next challenge by evaluating the round univariate at a random challenge value. + // 𝜎𝑖+1←𝑆̃ 𝑖(𝑢𝑖) + // This evaluation is performed via barycentric evaluation. + // + // Once we have reduced the multilinear polynomials into single dimensional polys, we check the entire sumcheck relation matches the target sum. + // + // Below this is composed of 8 relations: + // 1. Arithmetic relation - constrains arithmetic + // 2. Permutaiton Relation - efficiently encodes copy constraints + // 3. Log Derivative Lookup Relation - used for lookup operations + // 4. Delta Range Relation - used for efficient range checks + // 5. Memory Relation - used for efficient memory operations + // 6. NNF Relation - used for efficient Non Native Field operations + // 7. Poseidon2 External Relation - used for efficient in-circuit hashing + // 8. Poseidon2 Internal Relation - used for efficient in-circuit hashing + // + // These are batched together and evaluated at the same time using the alpha challenges. + // + { + // We write the barycentric domain values into memory + // These are written once per program execution, and reused across all + // sumcheck rounds + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_0_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_0) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_1_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_1) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_2_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_2) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_3_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_3) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_4_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_4) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_5_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_5) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_6_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_6) + mstore(BARYCENTRIC_LAGRANGE_DENOMINATOR_7_LOC, BARYCENTRIC_LAGRANGE_DENOMINATOR_7) + + // Compute the target sums for each round of sumcheck + { + // This requires the barycentric inverses to be computed for each round + // Write all of the non inverted barycentric denominators into memory + let accumulator := 1 + let temp := FOLD_POS_EVALUATIONS_23_LOC // we use fold pos evaluations as we add 0x20 immediately to get to `BARYCENTRIC_TEMP_0_LOC` + let bary_centric_inverses_off := BARYCENTRIC_DENOMINATOR_INVERSES_0_0_LOC + { + let round_challenge_off := SUM_U_CHALLENGE_0 + for { let round := 0 } lt(round, LOG_N) { round := add(round, 1) } { + let round_challenge := mload(round_challenge_off) + let bary_lagrange_denominator_off := BARYCENTRIC_LAGRANGE_DENOMINATOR_0_LOC + + // Unrolled as this loop as it only has 8 iterations - somehow this saves >10k gas + { + let bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + let pre_inv := + mulmod( + bary_lagrange_denominator, + addmod(round_challenge, p, p), // sub(p, 0) = p + p + ) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 1 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 1), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 2 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 2), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 3 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 3), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 4 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 4), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 5 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 5), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 6 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 6), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + + // barycentric_index = 7 + bary_lagrange_denominator := mload(bary_lagrange_denominator_off) + pre_inv := mulmod(bary_lagrange_denominator, addmod(round_challenge, sub(p, 7), p), p) + mstore(bary_centric_inverses_off, pre_inv) + temp := add(temp, 0x20) + mstore(temp, accumulator) + accumulator := mulmod(accumulator, pre_inv, p) + + // increase offsets + bary_lagrange_denominator_off := add(bary_lagrange_denominator_off, 0x20) + bary_centric_inverses_off := add(bary_centric_inverses_off, 0x20) + } + round_challenge_off := add(round_challenge_off, 0x20) + } + } + + // Append PI delta denominator to the batch inversion + { + let pi_denom := mload(PUBLIC_INPUTS_DELTA_DENOMINATOR_CHALLENGE) + mstore(PUBLIC_INPUTS_DENOM_TEMP_LOC, accumulator) + accumulator := mulmod(accumulator, pi_denom, p) + } + + // --- Phase 2: Shplemini forward pass --- + // Compute shplemini denominators and accumulate into the running product. + // Pre-inversion values stored in shplemini runtime memory + { + // Compute powers of evaluation challenge: gemini_r^{2^i} + let cache := mload(GEMINI_R_CHALLENGE) + mstore(POWERS_OF_EVALUATION_CHALLENGE_0_LOC, cache) + /// {{ UNROLL_SECTION_START POWERS_OF_EVALUATION_COMPUTATION }} + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_1_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_2_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_3_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_4_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_5_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_6_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_7_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_8_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_9_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_10_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_11_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_12_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_13_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_14_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_15_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_16_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_17_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_18_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_19_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_20_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_21_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_22_LOC, cache) + cache := mulmod(cache, cache, p) + mstore(POWERS_OF_EVALUATION_CHALLENGE_23_LOC, cache) +/// {{ UNROLL_SECTION_END POWERS_OF_EVALUATION_COMPUTATION }} + + // Element 0: gemini_r (seed) + { + let val := mload(GEMINI_R_CHALLENGE) + mstore(GEMINI_R_INV_TEMP_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + + // Elements 1..LOG_N: INVERTED_CHALLENGE_POW_MINUS_U + /// {{ UNROLL_SECTION_START ACCUMULATE_INVERSES }} + // INVERTED_CHALLENGE_POW_MINUS_U_0 + { + let u := mload(SUM_U_CHALLENGE_0) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_0_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_0_LOC, val) + mstore(TEMP_0_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_1 + { + let u := mload(SUM_U_CHALLENGE_1) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_1_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_1_LOC, val) + mstore(TEMP_1_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_2 + { + let u := mload(SUM_U_CHALLENGE_2) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_2_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_2_LOC, val) + mstore(TEMP_2_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_3 + { + let u := mload(SUM_U_CHALLENGE_3) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_3_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_3_LOC, val) + mstore(TEMP_3_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_4 + { + let u := mload(SUM_U_CHALLENGE_4) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_4_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_4_LOC, val) + mstore(TEMP_4_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_5 + { + let u := mload(SUM_U_CHALLENGE_5) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_5_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_5_LOC, val) + mstore(TEMP_5_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_6 + { + let u := mload(SUM_U_CHALLENGE_6) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_6_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_6_LOC, val) + mstore(TEMP_6_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_7 + { + let u := mload(SUM_U_CHALLENGE_7) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_7_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_7_LOC, val) + mstore(TEMP_7_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_8 + { + let u := mload(SUM_U_CHALLENGE_8) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_8_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_8_LOC, val) + mstore(TEMP_8_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_9 + { + let u := mload(SUM_U_CHALLENGE_9) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_9_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_9_LOC, val) + mstore(TEMP_9_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_10 + { + let u := mload(SUM_U_CHALLENGE_10) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_10_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_10_LOC, val) + mstore(TEMP_10_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_11 + { + let u := mload(SUM_U_CHALLENGE_11) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_11_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_11_LOC, val) + mstore(TEMP_11_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_12 + { + let u := mload(SUM_U_CHALLENGE_12) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_12_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_12_LOC, val) + mstore(TEMP_12_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_13 + { + let u := mload(SUM_U_CHALLENGE_13) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_13_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_13_LOC, val) + mstore(TEMP_13_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_14 + { + let u := mload(SUM_U_CHALLENGE_14) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_14_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_14_LOC, val) + mstore(TEMP_14_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_15 + { + let u := mload(SUM_U_CHALLENGE_15) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_15_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_15_LOC, val) + mstore(TEMP_15_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_16 + { + let u := mload(SUM_U_CHALLENGE_16) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_16_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_16_LOC, val) + mstore(TEMP_16_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_17 + { + let u := mload(SUM_U_CHALLENGE_17) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_17_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_17_LOC, val) + mstore(TEMP_17_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_18 + { + let u := mload(SUM_U_CHALLENGE_18) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_18_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_18_LOC, val) + mstore(TEMP_18_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_19 + { + let u := mload(SUM_U_CHALLENGE_19) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_19_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_19_LOC, val) + mstore(TEMP_19_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_20 + { + let u := mload(SUM_U_CHALLENGE_20) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_20_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_20_LOC, val) + mstore(TEMP_20_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_21 + { + let u := mload(SUM_U_CHALLENGE_21) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_21_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_21_LOC, val) + mstore(TEMP_21_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_22 + { + let u := mload(SUM_U_CHALLENGE_22) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_22_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_22_LOC, val) + mstore(TEMP_22_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // INVERTED_CHALLENGE_POW_MINUS_U_23 + { + let u := mload(SUM_U_CHALLENGE_23) + let challPow := mload(POWERS_OF_EVALUATION_CHALLENGE_23_LOC) + let val := addmod(mulmod(challPow, addmod(1, sub(p, u), p), p), u, p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_23_LOC, val) + mstore(TEMP_23_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + + // Accumulate pos inverted denom + // Elements LOG_N+1..2*LOG_N: POS_INVERTED_DENOM + let eval_challenge := mload(SHPLONK_Z_CHALLENGE) + // POS_INVERTED_DENOM_0 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_0_LOC)) , p) + mstore(POS_INVERTED_DENOM_0_LOC, val) + mstore(TEMP_24_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_1 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_1_LOC)) , p) + mstore(POS_INVERTED_DENOM_1_LOC, val) + mstore(TEMP_25_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_2 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_2_LOC)) , p) + mstore(POS_INVERTED_DENOM_2_LOC, val) + mstore(TEMP_26_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_3 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_3_LOC)) , p) + mstore(POS_INVERTED_DENOM_3_LOC, val) + mstore(TEMP_27_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_4 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_4_LOC)) , p) + mstore(POS_INVERTED_DENOM_4_LOC, val) + mstore(TEMP_28_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_5 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_5_LOC)) , p) + mstore(POS_INVERTED_DENOM_5_LOC, val) + mstore(TEMP_29_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_6 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_6_LOC)) , p) + mstore(POS_INVERTED_DENOM_6_LOC, val) + mstore(TEMP_30_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_7 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_7_LOC)) , p) + mstore(POS_INVERTED_DENOM_7_LOC, val) + mstore(TEMP_31_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_8 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_8_LOC)) , p) + mstore(POS_INVERTED_DENOM_8_LOC, val) + mstore(TEMP_32_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_9 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_9_LOC)) , p) + mstore(POS_INVERTED_DENOM_9_LOC, val) + mstore(TEMP_33_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_10 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_10_LOC)) , p) + mstore(POS_INVERTED_DENOM_10_LOC, val) + mstore(TEMP_34_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_11 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_11_LOC)) , p) + mstore(POS_INVERTED_DENOM_11_LOC, val) + mstore(TEMP_35_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_12 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_12_LOC)) , p) + mstore(POS_INVERTED_DENOM_12_LOC, val) + mstore(TEMP_36_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_13 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_13_LOC)) , p) + mstore(POS_INVERTED_DENOM_13_LOC, val) + mstore(TEMP_37_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_14 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_14_LOC)) , p) + mstore(POS_INVERTED_DENOM_14_LOC, val) + mstore(TEMP_38_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_15 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_15_LOC)) , p) + mstore(POS_INVERTED_DENOM_15_LOC, val) + mstore(TEMP_39_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_16 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_16_LOC)) , p) + mstore(POS_INVERTED_DENOM_16_LOC, val) + mstore(TEMP_40_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_17 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_17_LOC)) , p) + mstore(POS_INVERTED_DENOM_17_LOC, val) + mstore(TEMP_41_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_18 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_18_LOC)) , p) + mstore(POS_INVERTED_DENOM_18_LOC, val) + mstore(TEMP_42_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_19 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_19_LOC)) , p) + mstore(POS_INVERTED_DENOM_19_LOC, val) + mstore(TEMP_43_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_20 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_20_LOC)) , p) + mstore(POS_INVERTED_DENOM_20_LOC, val) + mstore(TEMP_44_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_21 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_21_LOC)) , p) + mstore(POS_INVERTED_DENOM_21_LOC, val) + mstore(TEMP_45_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_22 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_22_LOC)) , p) + mstore(POS_INVERTED_DENOM_22_LOC, val) + mstore(TEMP_46_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + // POS_INVERTED_DENOM_23 + { + let val := addmod(eval_challenge, sub(p, mload(POWERS_OF_EVALUATION_CHALLENGE_23_LOC)) , p) + mstore(POS_INVERTED_DENOM_23_LOC, val) + mstore(TEMP_47_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + + // Accumulate neg inverted denom + // Elements 2*LOG_N+1..3*LOG_N: NEG_INVERTED_DENOM + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_0_LOC), p) + mstore(NEG_INVERTED_DENOM_0_LOC, val) + mstore(TEMP_48_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_1_LOC), p) + mstore(NEG_INVERTED_DENOM_1_LOC, val) + mstore(TEMP_49_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_2_LOC), p) + mstore(NEG_INVERTED_DENOM_2_LOC, val) + mstore(TEMP_50_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_3_LOC), p) + mstore(NEG_INVERTED_DENOM_3_LOC, val) + mstore(TEMP_51_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_4_LOC), p) + mstore(NEG_INVERTED_DENOM_4_LOC, val) + mstore(TEMP_52_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_5_LOC), p) + mstore(NEG_INVERTED_DENOM_5_LOC, val) + mstore(TEMP_53_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_6_LOC), p) + mstore(NEG_INVERTED_DENOM_6_LOC, val) + mstore(TEMP_54_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_7_LOC), p) + mstore(NEG_INVERTED_DENOM_7_LOC, val) + mstore(TEMP_55_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_8_LOC), p) + mstore(NEG_INVERTED_DENOM_8_LOC, val) + mstore(TEMP_56_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_9_LOC), p) + mstore(NEG_INVERTED_DENOM_9_LOC, val) + mstore(TEMP_57_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_10_LOC), p) + mstore(NEG_INVERTED_DENOM_10_LOC, val) + mstore(TEMP_58_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_11_LOC), p) + mstore(NEG_INVERTED_DENOM_11_LOC, val) + mstore(TEMP_59_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_12_LOC), p) + mstore(NEG_INVERTED_DENOM_12_LOC, val) + mstore(TEMP_60_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_13_LOC), p) + mstore(NEG_INVERTED_DENOM_13_LOC, val) + mstore(TEMP_61_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_14_LOC), p) + mstore(NEG_INVERTED_DENOM_14_LOC, val) + mstore(TEMP_62_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_15_LOC), p) + mstore(NEG_INVERTED_DENOM_15_LOC, val) + mstore(TEMP_63_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_16_LOC), p) + mstore(NEG_INVERTED_DENOM_16_LOC, val) + mstore(TEMP_64_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_17_LOC), p) + mstore(NEG_INVERTED_DENOM_17_LOC, val) + mstore(TEMP_65_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_18_LOC), p) + mstore(NEG_INVERTED_DENOM_18_LOC, val) + mstore(TEMP_66_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_19_LOC), p) + mstore(NEG_INVERTED_DENOM_19_LOC, val) + mstore(TEMP_67_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_20_LOC), p) + mstore(NEG_INVERTED_DENOM_20_LOC, val) + mstore(TEMP_68_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_21_LOC), p) + mstore(NEG_INVERTED_DENOM_21_LOC, val) + mstore(TEMP_69_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_22_LOC), p) + mstore(NEG_INVERTED_DENOM_22_LOC, val) + mstore(TEMP_70_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } + { + let val := addmod(eval_challenge, mload(POWERS_OF_EVALUATION_CHALLENGE_23_LOC), p) + mstore(NEG_INVERTED_DENOM_23_LOC, val) + mstore(TEMP_71_LOC, accumulator) + accumulator := mulmod(accumulator, val, p) + } +/// {{ UNROLL_SECTION_END ACCUMULATE_INVERSES }} + + // Invert all elements (barycentric + PI delta + shplemini) as a single batch + { + { + mstore(0, 0x20) + mstore(0x20, 0x20) + mstore(0x40, 0x20) + mstore(0x60, accumulator) + mstore(0x80, P_SUB_2) + mstore(0xa0, p) + if iszero(staticcall(gas(), 0x05, 0x00, 0xc0, 0x00, 0x20)) { + mstore(0x00, MODEXP_FAILED_SELECTOR) + revert(0x00, 0x04) + } + + accumulator := mload(0x00) + if iszero(accumulator) { + mstore(0x00, MODEXP_FAILED_SELECTOR) + revert(0x00, 0x04) + } + } + + // --- Shplemini backward pass --- + // Extract shplemini inverses in strict reverse order. + /// {{ UNROLL_SECTION_START COLLECT_INVERSES }} + // i = 24 + // NEG_INVERTED_DENOM (LOG_N elements, reverse) -- last group appended + { + let tmp := mulmod(accumulator, mload(TEMP_71_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_23_LOC), p) + mstore(NEG_INVERTED_DENOM_23_LOC, tmp) + } + // i = 23 + { + let tmp := mulmod(accumulator, mload(TEMP_70_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_22_LOC), p) + mstore(NEG_INVERTED_DENOM_22_LOC, tmp) + } + // i = 22 + { + let tmp := mulmod(accumulator, mload(TEMP_69_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_21_LOC), p) + mstore(NEG_INVERTED_DENOM_21_LOC, tmp) + } + // i = 21 + { + let tmp := mulmod(accumulator, mload(TEMP_68_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_20_LOC), p) + mstore(NEG_INVERTED_DENOM_20_LOC, tmp) + } + // i = 20 + { + let tmp := mulmod(accumulator, mload(TEMP_67_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_19_LOC), p) + mstore(NEG_INVERTED_DENOM_19_LOC, tmp) + } + // i = 19 + { + let tmp := mulmod(accumulator, mload(TEMP_66_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_18_LOC), p) + mstore(NEG_INVERTED_DENOM_18_LOC, tmp) + } + // i = 18 + { + let tmp := mulmod(accumulator, mload(TEMP_65_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_17_LOC), p) + mstore(NEG_INVERTED_DENOM_17_LOC, tmp) + } + // i = 17 + { + let tmp := mulmod(accumulator, mload(TEMP_64_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_16_LOC), p) + mstore(NEG_INVERTED_DENOM_16_LOC, tmp) + } + // i = 16 + { + let tmp := mulmod(accumulator, mload(TEMP_63_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_15_LOC), p) + mstore(NEG_INVERTED_DENOM_15_LOC, tmp) + } + // i = 15 + { + let tmp := mulmod(accumulator, mload(TEMP_62_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_14_LOC), p) + mstore(NEG_INVERTED_DENOM_14_LOC, tmp) + } + // i = 14 + { + let tmp := mulmod(accumulator, mload(TEMP_61_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_13_LOC), p) + mstore(NEG_INVERTED_DENOM_13_LOC, tmp) + } + // i = 13 + { + let tmp := mulmod(accumulator, mload(TEMP_60_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_12_LOC), p) + mstore(NEG_INVERTED_DENOM_12_LOC, tmp) + } + // i = 12 + { + let tmp := mulmod(accumulator, mload(TEMP_59_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_11_LOC), p) + mstore(NEG_INVERTED_DENOM_11_LOC, tmp) + } + // i = 11 + { + let tmp := mulmod(accumulator, mload(TEMP_58_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_10_LOC), p) + mstore(NEG_INVERTED_DENOM_10_LOC, tmp) + } + // i = 10 + { + let tmp := mulmod(accumulator, mload(TEMP_57_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_9_LOC), p) + mstore(NEG_INVERTED_DENOM_9_LOC, tmp) + } + // i = 9 + { + let tmp := mulmod(accumulator, mload(TEMP_56_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_8_LOC), p) + mstore(NEG_INVERTED_DENOM_8_LOC, tmp) + } + // i = 8 + { + let tmp := mulmod(accumulator, mload(TEMP_55_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_7_LOC), p) + mstore(NEG_INVERTED_DENOM_7_LOC, tmp) + } + // i = 7 + { + let tmp := mulmod(accumulator, mload(TEMP_54_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_6_LOC), p) + mstore(NEG_INVERTED_DENOM_6_LOC, tmp) + } + // i = 6 + { + let tmp := mulmod(accumulator, mload(TEMP_53_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_5_LOC), p) + mstore(NEG_INVERTED_DENOM_5_LOC, tmp) + } + // i = 5 + { + let tmp := mulmod(accumulator, mload(TEMP_52_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_4_LOC), p) + mstore(NEG_INVERTED_DENOM_4_LOC, tmp) + } + // i = 4 + { + let tmp := mulmod(accumulator, mload(TEMP_51_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_3_LOC), p) + mstore(NEG_INVERTED_DENOM_3_LOC, tmp) + } + // i = 3 + { + let tmp := mulmod(accumulator, mload(TEMP_50_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_2_LOC), p) + mstore(NEG_INVERTED_DENOM_2_LOC, tmp) + } + // i = 2 + { + let tmp := mulmod(accumulator, mload(TEMP_49_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_1_LOC), p) + mstore(NEG_INVERTED_DENOM_1_LOC, tmp) + } + // i = 1 + { + let tmp := mulmod(accumulator, mload(TEMP_48_LOC), p) + accumulator := mulmod(accumulator, mload(NEG_INVERTED_DENOM_0_LOC), p) + mstore(NEG_INVERTED_DENOM_0_LOC, tmp) + } + + // Unrolled for LOG_N = 24 + // i = 24 + { + let tmp := mulmod(accumulator, mload(TEMP_47_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_23_LOC), p) + mstore(POS_INVERTED_DENOM_23_LOC, tmp) + } + // i = 23 + { + let tmp := mulmod(accumulator, mload(TEMP_46_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_22_LOC), p) + mstore(POS_INVERTED_DENOM_22_LOC, tmp) + } + // i = 22 + { + let tmp := mulmod(accumulator, mload(TEMP_45_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_21_LOC), p) + mstore(POS_INVERTED_DENOM_21_LOC, tmp) + } + // i = 21 + { + let tmp := mulmod(accumulator, mload(TEMP_44_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_20_LOC), p) + mstore(POS_INVERTED_DENOM_20_LOC, tmp) + } + // i = 20 + { + let tmp := mulmod(accumulator, mload(TEMP_43_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_19_LOC), p) + mstore(POS_INVERTED_DENOM_19_LOC, tmp) + } + // i = 19 + { + let tmp := mulmod(accumulator, mload(TEMP_42_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_18_LOC), p) + mstore(POS_INVERTED_DENOM_18_LOC, tmp) + } + // i = 18 + { + let tmp := mulmod(accumulator, mload(TEMP_41_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_17_LOC), p) + mstore(POS_INVERTED_DENOM_17_LOC, tmp) + } + // i = 17 + { + let tmp := mulmod(accumulator, mload(TEMP_40_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_16_LOC), p) + mstore(POS_INVERTED_DENOM_16_LOC, tmp) + } + // i = 16 + { + let tmp := mulmod(accumulator, mload(TEMP_39_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_15_LOC), p) + mstore(POS_INVERTED_DENOM_15_LOC, tmp) + } + // i = 15 + { + let tmp := mulmod(accumulator, mload(TEMP_38_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_14_LOC), p) + mstore(POS_INVERTED_DENOM_14_LOC, tmp) + } + // i = 14 + { + let tmp := mulmod(accumulator, mload(TEMP_37_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_13_LOC), p) + mstore(POS_INVERTED_DENOM_13_LOC, tmp) + } + // i = 13 + { + let tmp := mulmod(accumulator, mload(TEMP_36_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_12_LOC), p) + mstore(POS_INVERTED_DENOM_12_LOC, tmp) + } + // i = 12 + { + let tmp := mulmod(accumulator, mload(TEMP_35_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_11_LOC), p) + mstore(POS_INVERTED_DENOM_11_LOC, tmp) + } + // i = 11 + { + let tmp := mulmod(accumulator, mload(TEMP_34_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_10_LOC), p) + mstore(POS_INVERTED_DENOM_10_LOC, tmp) + } + // i = 10 + { + let tmp := mulmod(accumulator, mload(TEMP_33_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_9_LOC), p) + mstore(POS_INVERTED_DENOM_9_LOC, tmp) + } + // i = 9 + { + let tmp := mulmod(accumulator, mload(TEMP_32_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_8_LOC), p) + mstore(POS_INVERTED_DENOM_8_LOC, tmp) + } + // i = 8 + { + let tmp := mulmod(accumulator, mload(TEMP_31_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_7_LOC), p) + mstore(POS_INVERTED_DENOM_7_LOC, tmp) + } + // i = 7 + { + let tmp := mulmod(accumulator, mload(TEMP_30_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_6_LOC), p) + mstore(POS_INVERTED_DENOM_6_LOC, tmp) + } + // i = 6 + { + let tmp := mulmod(accumulator, mload(TEMP_29_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_5_LOC), p) + mstore(POS_INVERTED_DENOM_5_LOC, tmp) + } + // i = 5 + { + let tmp := mulmod(accumulator, mload(TEMP_28_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_4_LOC), p) + mstore(POS_INVERTED_DENOM_4_LOC, tmp) + } + // i = 4 + { + let tmp := mulmod(accumulator, mload(TEMP_27_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_3_LOC), p) + mstore(POS_INVERTED_DENOM_3_LOC, tmp) + } + // i = 3 + { + let tmp := mulmod(accumulator, mload(TEMP_26_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_2_LOC), p) + mstore(POS_INVERTED_DENOM_2_LOC, tmp) + } + // i = 2 + { + let tmp := mulmod(accumulator, mload(TEMP_25_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_1_LOC), p) + mstore(POS_INVERTED_DENOM_1_LOC, tmp) + } + // i = 1 + { + let tmp := mulmod(accumulator, mload(TEMP_24_LOC), p) + accumulator := mulmod(accumulator, mload(POS_INVERTED_DENOM_0_LOC), p) + mstore(POS_INVERTED_DENOM_0_LOC, tmp) + } + + // i = 24 + { + let tmp := mulmod(accumulator, mload(TEMP_23_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_23_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_23_LOC, tmp) + } + // i = 23 + { + let tmp := mulmod(accumulator, mload(TEMP_22_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_22_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_22_LOC, tmp) + } + // i = 22 + { + let tmp := mulmod(accumulator, mload(TEMP_21_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_21_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_21_LOC, tmp) + } + // i = 21 + { + let tmp := mulmod(accumulator, mload(TEMP_20_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_20_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_20_LOC, tmp) + } + // i = 20 + { + let tmp := mulmod(accumulator, mload(TEMP_19_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_19_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_19_LOC, tmp) + } + // i = 19 + { + let tmp := mulmod(accumulator, mload(TEMP_18_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_18_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_18_LOC, tmp) + } + // i = 18 + { + let tmp := mulmod(accumulator, mload(TEMP_17_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_17_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_17_LOC, tmp) + } + // i = 17 + { + let tmp := mulmod(accumulator, mload(TEMP_16_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_16_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_16_LOC, tmp) + } + // i = 16 + { + let tmp := mulmod(accumulator, mload(TEMP_15_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_15_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_15_LOC, tmp) + } + // i = 15 + { + let tmp := mulmod(accumulator, mload(TEMP_14_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_14_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_14_LOC, tmp) + } + // i = 14 + { + let tmp := mulmod(accumulator, mload(TEMP_13_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_13_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_13_LOC, tmp) + } + // i = 13 + { + let tmp := mulmod(accumulator, mload(TEMP_12_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_12_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_12_LOC, tmp) + } + // i = 12 + { + let tmp := mulmod(accumulator, mload(TEMP_11_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_11_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_11_LOC, tmp) + } + // i = 11 + { + let tmp := mulmod(accumulator, mload(TEMP_10_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_10_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_10_LOC, tmp) + } + // i = 10 + { + let tmp := mulmod(accumulator, mload(TEMP_9_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_9_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_9_LOC, tmp) + } + // i = 9 + { + let tmp := mulmod(accumulator, mload(TEMP_8_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_8_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_8_LOC, tmp) + } + // i = 8 + { + let tmp := mulmod(accumulator, mload(TEMP_7_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_7_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_7_LOC, tmp) + } + // i = 7 + { + let tmp := mulmod(accumulator, mload(TEMP_6_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_6_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_6_LOC, tmp) + } + // i = 6 + { + let tmp := mulmod(accumulator, mload(TEMP_5_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_5_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_5_LOC, tmp) + } + // i = 5 + { + let tmp := mulmod(accumulator, mload(TEMP_4_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_4_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_4_LOC, tmp) + } + // i = 4 + { + let tmp := mulmod(accumulator, mload(TEMP_3_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_3_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_3_LOC, tmp) + } + // i = 3 + { + let tmp := mulmod(accumulator, mload(TEMP_2_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_2_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_2_LOC, tmp) + } + // i = 2 + { + let tmp := mulmod(accumulator, mload(TEMP_1_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_1_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_1_LOC, tmp) + } + // i = 1 + { + let tmp := mulmod(accumulator, mload(TEMP_0_LOC), p) + accumulator := mulmod(accumulator, mload(INVERTED_CHALLENGE_POW_MINUS_U_0_LOC), p) + mstore(INVERTED_CHALLENGE_POW_MINUS_U_0_LOC, tmp) + } +/// {{ UNROLL_SECTION_END COLLECT_INVERSES }} + + // gemini_r inverse (staging[0]) + { + let tmp := mulmod(accumulator, mload(GEMINI_R_INV_TEMP_LOC), p) + accumulator := mulmod(accumulator, mload(GEMINI_R_CHALLENGE), p) + mstore(GEMINI_R_INV_LOC, tmp) // 1/gemini_r at staging[0] + } + } + + // Extract PI delta denominator inverse from the batch + { + let pi_delta_inv := mulmod(accumulator, mload(PUBLIC_INPUTS_DENOM_TEMP_LOC), p) + accumulator := mulmod(accumulator, mload(PUBLIC_INPUTS_DELTA_DENOMINATOR_CHALLENGE), p) + + // Finalize: public_inputs_delta = numerator * (1/denominator) + mstore( + PUBLIC_INPUTS_DELTA_NUMERATOR_CHALLENGE, + mulmod(mload(PUBLIC_INPUTS_DELTA_NUMERATOR_CHALLENGE), pi_delta_inv, p) + ) + } + + // Normalise as last loop will have incremented the offset + bary_centric_inverses_off := sub(bary_centric_inverses_off, 0x20) + for {} gt(bary_centric_inverses_off, BARYCENTRIC_LAGRANGE_DENOMINATOR_7_LOC) { + bary_centric_inverses_off := sub(bary_centric_inverses_off, 0x20) + } { + let tmp := mulmod(accumulator, mload(temp), p) + accumulator := mulmod(accumulator, mload(bary_centric_inverses_off), p) + mstore(bary_centric_inverses_off, tmp) + + temp := sub(temp, 0x20) + } + } + } + + let valid := true + let round_target := 0 + let pow_partial_evaluation := 1 + let gate_challenge_off := GATE_CHALLENGE_0 + let round_univariates_off := SUMCHECK_UNIVARIATE_0_0_LOC + + let challenge_off := SUM_U_CHALLENGE_0 + let bary_inverses_off := BARYCENTRIC_DENOMINATOR_INVERSES_0_0_LOC + + for { let round := 0 } lt(round, LOG_N) { round := add(round, 1) } { + let round_challenge := mload(challenge_off) + + // Total sum = u[0] + u[1] + let total_sum := addmod(mload(round_univariates_off), mload(add(round_univariates_off, 0x20)), p) + valid := and(valid, eq(total_sum, round_target)) + + // Compute next target sum + let numerator_value := round_challenge + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 1), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 2), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 3), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 4), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 5), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 6), p), p) + numerator_value := mulmod(numerator_value, addmod(round_challenge, sub(p, 7), p), p) + + // // Compute the next round target + round_target := 0 + for { let i := 0 } lt(i, BATCHED_RELATION_PARTIAL_LENGTH) { i := add(i, 1) } { + let term := mload(round_univariates_off) + let inverse := mload(bary_inverses_off) + + term := mulmod(term, inverse, p) + round_target := addmod(round_target, term, p) + round_univariates_off := add(round_univariates_off, 0x20) + bary_inverses_off := add(bary_inverses_off, 0x20) + } + + round_target := mulmod(round_target, numerator_value, p) + + // Partially evaluate POW + let gate_challenge := mload(gate_challenge_off) + let gate_challenge_minus_one := addmod(gate_challenge, sub(p, 1), p) + + let univariate_evaluation := addmod(1, mulmod(round_challenge, gate_challenge_minus_one, p), p) + + pow_partial_evaluation := mulmod(pow_partial_evaluation, univariate_evaluation, p) + + gate_challenge_off := add(gate_challenge_off, 0x20) + challenge_off := add(challenge_off, 0x20) + } + + if iszero(valid) { + mstore(0x00, SUMCHECK_FAILED_SELECTOR) + revert(0x00, 0x04) + } + + // The final sumcheck round; accumulating evaluations + // Uses pow partial evaluation as the gate scaling factor + + mstore(POW_PARTIAL_EVALUATION_LOC, pow_partial_evaluation) + mstore(FINAL_ROUND_TARGET_LOC, round_target) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* ARITHMETIC RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + /** + * The basic arithmetic gate identity in standard plonk is as follows. + * (w_1 . w_2 . q_m) + (w_1 . q_1) + (w_2 . q_2) + (w_3 . q_3) + (w_4 . q_4) + q_c = 0 + * However, for Ultraplonk, we extend this to support "passing" wires between rows (shown without alpha scaling below): + * q_arith * ( ( (-1/2) * (q_arith - 3) * q_m * w_1 * w_2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c ) + + * (q_arith - 1)*( α * (q_arith - 2) * (w_1 + w_4 - w_1_omega + q_m) + w_4_omega) ) = 0 + * + * This formula results in several cases depending on q_arith: + * 1. q_arith == 0: Arithmetic gate is completely disabled + * + * 2. q_arith == 1: Everything in the minigate on the right is disabled. The equation is just a standard plonk equation + * with extra wires: q_m * w_1 * w_2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c = 0 + * + * 3. q_arith == 2: The (w_1 + w_4 - ...) term is disabled. THe equation is: + * (1/2) * q_m * w_1 * w_2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c + w_4_omega = 0 + * It allows defining w_4 at next index (w_4_omega) in terms of current wire values + * + * 4. q_arith == 3: The product of w_1 and w_2 is disabled, but a mini addition gate is enabled. α allows us to split + * the equation into two: + * + * q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c + 2 * w_4_omega = 0 + * and + * w_1 + w_4 - w_1_omega + q_m = 0 (we are reusing q_m here) + * + * 5. q_arith > 3: The product of w_1 and w_2 is scaled by (q_arith - 3), while the w_4_omega term is scaled by (q_arith - 1). + * The equation can be split into two: + * + * (q_arith - 3)* q_m * w_1 * w_ 2 + q_1 * w_1 + q_2 * w_2 + q_3 * w_3 + q_4 * w_4 + q_c + (q_arith - 1) * w_4_omega = 0 + * and + * w_1 + w_4 - w_1_omega + q_m = 0 + * + * The problem that q_m is used both in both equations can be dealt with by appropriately changing selector values at + * the next gate. Then we can treat (q_arith - 1) as a simulated q_6 selector and scale q_m to handle (q_arith - 3) at + * product. + */ + let w1q1 := mulmod(mload(W1_EVAL_LOC), mload(QL_EVAL_LOC), p) + let w2q2 := mulmod(mload(W2_EVAL_LOC), mload(QR_EVAL_LOC), p) + let w3q3 := mulmod(mload(W3_EVAL_LOC), mload(QO_EVAL_LOC), p) + let w4q3 := mulmod(mload(W4_EVAL_LOC), mload(Q4_EVAL_LOC), p) + + let q_arith := mload(QARITH_EVAL_LOC) + // w1w2qm := (w_1 . w_2 . q_m . (QARITH_EVAL_LOC - 3)) / 2 + let w1w2qm := + mulmod( + mulmod( + mulmod(mulmod(mload(W1_EVAL_LOC), mload(W2_EVAL_LOC), p), mload(QM_EVAL_LOC), p), + addmod(q_arith, sub(p, 3), p), + p + ), + NEG_HALF_MODULO_P, + p + ) + + // (w_1 . w_2 . q_m . (q_arith - 3)) / -2) + (w_1 . q_1) + (w_2 . q_2) + (w_3 . q_3) + (w_4 . q_4) + q_c + let identity := + addmod( + mload(QC_EVAL_LOC), + addmod(w4q3, addmod(w3q3, addmod(w2q2, addmod(w1q1, w1w2qm, p), p), p), p), + p + ) + + // if q_arith == 3 we evaluate an additional mini addition gate (on top of the regular one), where: + // w_1 + w_4 - w_1_omega + q_m = 0 + // we use this gate to save an addition gate when adding or subtracting non-native field elements + // α * (q_arith - 2) * (w_1 + w_4 - w_1_omega + q_m) + let extra_small_addition_gate_identity := + mulmod( + addmod(q_arith, sub(p, 2), p), + addmod( + mload(QM_EVAL_LOC), + addmod( + sub(p, mload(W1_SHIFT_EVAL_LOC)), + addmod(mload(W1_EVAL_LOC), mload(W4_EVAL_LOC), p), + p + ), + p + ), + p + ) + + // Split up the two relations + let contribution_0 := + addmod(identity, mulmod(addmod(q_arith, sub(p, 1), p), mload(W4_SHIFT_EVAL_LOC), p), p) + contribution_0 := mulmod(mulmod(contribution_0, q_arith, p), mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_6_LOC, contribution_0) + + let contribution_1 := mulmod(extra_small_addition_gate_identity, addmod(q_arith, sub(p, 1), p), p) + contribution_1 := mulmod(contribution_1, q_arith, p) + contribution_1 := mulmod(contribution_1, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_7_LOC, contribution_1) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PERMUTATION RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + let beta := mload(BETA_CHALLENGE) + let gamma := mload(GAMMA_CHALLENGE) + + /** + * t1 = (W1 + gamma + beta * ID1) * (W2 + gamma + beta * ID2) + * t2 = (W3 + gamma + beta * ID3) * (W4 + gamma + beta * ID4) + * gp_numerator = t1 * t2 + * t1 = (W1 + gamma + beta * sigma_1_eval) * (W2 + gamma + beta * sigma_2_eval) + * t2 = (W3 + gamma + beta * sigma_3_eval) * (W4 + gamma + beta * sigma_4_eval) + * gp_denominator = t1 * t2 + */ + let t1 := + mulmod( + add(add(mload(W1_EVAL_LOC), gamma), mulmod(beta, mload(ID1_EVAL_LOC), p)), + add(add(mload(W2_EVAL_LOC), gamma), mulmod(beta, mload(ID2_EVAL_LOC), p)), + p + ) + let t2 := + mulmod( + add(add(mload(W3_EVAL_LOC), gamma), mulmod(beta, mload(ID3_EVAL_LOC), p)), + add(add(mload(W4_EVAL_LOC), gamma), mulmod(beta, mload(ID4_EVAL_LOC), p)), + p + ) + let numerator := mulmod(t1, t2, p) + t1 := mulmod( + add(add(mload(W1_EVAL_LOC), gamma), mulmod(beta, mload(SIGMA1_EVAL_LOC), p)), + add(add(mload(W2_EVAL_LOC), gamma), mulmod(beta, mload(SIGMA2_EVAL_LOC), p)), + p + ) + t2 := mulmod( + add(add(mload(W3_EVAL_LOC), gamma), mulmod(beta, mload(SIGMA3_EVAL_LOC), p)), + add(add(mload(W4_EVAL_LOC), gamma), mulmod(beta, mload(SIGMA4_EVAL_LOC), p)), + p + ) + let denominator := mulmod(t1, t2, p) + + { + let acc := + mulmod(addmod(mload(Z_PERM_EVAL_LOC), mload(LAGRANGE_FIRST_EVAL_LOC), p), numerator, p) + + acc := addmod( + acc, + sub( + p, + mulmod( + addmod( + mload(Z_PERM_SHIFT_EVAL_LOC), + mulmod( + mload(LAGRANGE_LAST_EVAL_LOC), + mload(PUBLIC_INPUTS_DELTA_NUMERATOR_CHALLENGE), + p + ), + p + ), + denominator, + p + ) + ), + p + ) + + acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_0_LOC, acc) + + acc := mulmod( + mulmod(mload(LAGRANGE_LAST_EVAL_LOC), mload(Z_PERM_SHIFT_EVAL_LOC), p), + mload(POW_PARTIAL_EVALUATION_LOC), + p + ) + mstore(SUBRELATION_EVAL_1_LOC, acc) + } + + // Contribution 4: z_perm initialization (lagrange_first * z_perm = 0) + { + let acc := mulmod( + mulmod(mload(LAGRANGE_FIRST_EVAL_LOC), mload(Z_PERM_EVAL_LOC), p), + mload(POW_PARTIAL_EVALUATION_LOC), + p + ) + mstore(SUBRELATION_EVAL_2_LOC, acc) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* LOGUP WIDGET EVALUATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Note: Using beta powers for column batching and gamma for offset ensures soundness + // beta and gamma must be independent challenges (they come from splitting the same hash) + { + let gamma := mload(GAMMA_CHALLENGE) + let beta := mload(BETA_CHALLENGE) + // Compute beta powers inline (β², β³) for lookup column batching + let beta_sqr := mulmod(beta, beta, p) + let beta_cube := mulmod(beta_sqr, beta, p) + + // table_term = table_1 + γ + table_2 * β + table_3 * β² + table_4 * β³ + let t0 := + addmod(addmod(mload(TABLE1_EVAL_LOC), gamma, p), mulmod(mload(TABLE2_EVAL_LOC), beta, p), p) + let t1 := + addmod( + mulmod(mload(TABLE3_EVAL_LOC), beta_sqr, p), + mulmod(mload(TABLE4_EVAL_LOC), beta_cube, p), + p + ) + let table_term := addmod(t0, t1, p) + + // lookup_term = derived_entry_1 + γ + derived_entry_2 * β + derived_entry_3 * β² + q_index * β³ + t0 := addmod( + addmod(mload(W1_EVAL_LOC), gamma, p), + mulmod(mload(QR_EVAL_LOC), mload(W1_SHIFT_EVAL_LOC), p), + p + ) + t1 := addmod(mload(W2_EVAL_LOC), mulmod(mload(QM_EVAL_LOC), mload(W2_SHIFT_EVAL_LOC), p), p) + let t2 := addmod(mload(W3_EVAL_LOC), mulmod(mload(QC_EVAL_LOC), mload(W3_SHIFT_EVAL_LOC), p), p) + + let lookup_term := addmod(t0, mulmod(t1, beta, p), p) + lookup_term := addmod(lookup_term, mulmod(t2, beta_sqr, p), p) + lookup_term := addmod(lookup_term, mulmod(mload(QO_EVAL_LOC), beta_cube, p), p) + + let lookup_inverse := mulmod(mload(LOOKUP_INVERSES_EVAL_LOC), table_term, p) + let table_inverse := mulmod(mload(LOOKUP_INVERSES_EVAL_LOC), lookup_term, p) + + let inverse_exists_xor := addmod(mload(LOOKUP_READ_TAGS_EVAL_LOC), mload(QLOOKUP_EVAL_LOC), p) + inverse_exists_xor := addmod( + inverse_exists_xor, + sub(p, mulmod(mload(LOOKUP_READ_TAGS_EVAL_LOC), mload(QLOOKUP_EVAL_LOC), p)), + p + ) + + let accumulator_none := mulmod(mulmod(lookup_term, table_term, p), mload(LOOKUP_INVERSES_EVAL_LOC), p) + accumulator_none := addmod(accumulator_none, sub(p, inverse_exists_xor), p) + accumulator_none := mulmod(accumulator_none, mload(POW_PARTIAL_EVALUATION_LOC), p) + + let accumulator_one := mulmod(mload(QLOOKUP_EVAL_LOC), lookup_inverse, p) + accumulator_one := addmod( + accumulator_one, + sub(p, mulmod(mload(LOOKUP_READ_COUNTS_EVAL_LOC), table_inverse, p)), + p + ) + + let read_tag := mload(LOOKUP_READ_TAGS_EVAL_LOC) + let read_tag_boolean_relation := mulmod(read_tag, addmod(read_tag, sub(p, 1), p), p) + read_tag_boolean_relation := mulmod(read_tag_boolean_relation, mload(POW_PARTIAL_EVALUATION_LOC), p) + + mstore(SUBRELATION_EVAL_3_LOC, accumulator_none) + mstore(SUBRELATION_EVAL_4_LOC, accumulator_one) + mstore(SUBRELATION_EVAL_5_LOC, read_tag_boolean_relation) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* DELTA RANGE RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + let minus_one := P_SUB_1 + let minus_two := P_SUB_2 + let minus_three := P_SUB_3 + + let delta_1 := addmod(mload(W2_EVAL_LOC), sub(p, mload(W1_EVAL_LOC)), p) + let delta_2 := addmod(mload(W3_EVAL_LOC), sub(p, mload(W2_EVAL_LOC)), p) + let delta_3 := addmod(mload(W4_EVAL_LOC), sub(p, mload(W3_EVAL_LOC)), p) + let delta_4 := addmod(mload(W1_SHIFT_EVAL_LOC), sub(p, mload(W4_EVAL_LOC)), p) + + { + let acc := delta_1 + acc := mulmod(acc, addmod(delta_1, minus_one, p), p) + acc := mulmod(acc, addmod(delta_1, minus_two, p), p) + acc := mulmod(acc, addmod(delta_1, minus_three, p), p) + acc := mulmod(acc, mload(QRANGE_EVAL_LOC), p) + acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_8_LOC, acc) + } + + { + let acc := delta_2 + acc := mulmod(acc, addmod(delta_2, minus_one, p), p) + acc := mulmod(acc, addmod(delta_2, minus_two, p), p) + acc := mulmod(acc, addmod(delta_2, minus_three, p), p) + acc := mulmod(acc, mload(QRANGE_EVAL_LOC), p) + acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_9_LOC, acc) + } + + { + let acc := delta_3 + acc := mulmod(acc, addmod(delta_3, minus_one, p), p) + acc := mulmod(acc, addmod(delta_3, minus_two, p), p) + acc := mulmod(acc, addmod(delta_3, minus_three, p), p) + acc := mulmod(acc, mload(QRANGE_EVAL_LOC), p) + acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_10_LOC, acc) + } + + { + let acc := delta_4 + acc := mulmod(acc, addmod(delta_4, minus_one, p), p) + acc := mulmod(acc, addmod(delta_4, minus_two, p), p) + acc := mulmod(acc, addmod(delta_4, minus_three, p), p) + acc := mulmod(acc, mload(QRANGE_EVAL_LOC), p) + acc := mulmod(acc, mload(POW_PARTIAL_EVALUATION_LOC), p) + mstore(SUBRELATION_EVAL_11_LOC, acc) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* ELLIPTIC CURVE RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + // Contribution 10 point addition, x-coordinate check + // q_elliptic * (x3 + x2 + x1)(x2 - x1)(x2 - x1) - y2^2 - y1^2 + 2(y2y1)*q_sign = 0 + let x_diff := addmod(mload(EC_X_2), sub(p, mload(EC_X_1)), p) + let y1_sqr := mulmod(mload(EC_Y_1), mload(EC_Y_1), p) + { + let y2_sqr := mulmod(mload(EC_Y_2), mload(EC_Y_2), p) + let y1y2 := mulmod(mulmod(mload(EC_Y_1), mload(EC_Y_2), p), mload(EC_Q_SIGN), p) + let x_add_identity := addmod(mload(EC_X_3), addmod(mload(EC_X_2), mload(EC_X_1), p), p) + x_add_identity := mulmod(mulmod(x_add_identity, x_diff, p), x_diff, p) + x_add_identity := addmod(x_add_identity, sub(p, y2_sqr), p) + x_add_identity := addmod(x_add_identity, sub(p, y1_sqr), p) + x_add_identity := addmod(x_add_identity, y1y2, p) + x_add_identity := addmod(x_add_identity, y1y2, p) + + let eval := mulmod(x_add_identity, mload(POW_PARTIAL_EVALUATION_LOC), p) + eval := mulmod(eval, mload(QELLIPTIC_EVAL_LOC), p) + eval := mulmod(eval, addmod(1, sub(p, mload(EC_Q_IS_DOUBLE)), p), p) + mstore(SUBRELATION_EVAL_12_LOC, eval) + } + + { + let y1_plus_y3 := addmod(mload(EC_Y_1), mload(EC_Y_3), p) + let y_diff := mulmod(mload(EC_Y_2), mload(EC_Q_SIGN), p) + y_diff := addmod(y_diff, sub(p, mload(EC_Y_1)), p) + let y_add_identity := mulmod(y1_plus_y3, x_diff, p) + y_add_identity := addmod( + y_add_identity, + mulmod(addmod(mload(EC_X_3), sub(p, mload(EC_X_1)), p), y_diff, p), + p + ) + + let eval := mulmod(y_add_identity, mload(POW_PARTIAL_EVALUATION_LOC), p) + eval := mulmod(eval, mload(QELLIPTIC_EVAL_LOC), p) + eval := mulmod(eval, addmod(1, sub(p, mload(EC_Q_IS_DOUBLE)), p), p) + mstore(SUBRELATION_EVAL_13_LOC, eval) + } + + { + let x_pow_4 := mulmod(addmod(y1_sqr, GRUMPKIN_CURVE_B_PARAMETER_NEGATED, p), mload(EC_X_1), p) + let y1_sqr_mul_4 := addmod(y1_sqr, y1_sqr, p) + y1_sqr_mul_4 := addmod(y1_sqr_mul_4, y1_sqr_mul_4, p) + + let x1_pow_4_mul_9 := mulmod(x_pow_4, 9, p) + + let ep_x_double_identity := addmod(mload(EC_X_3), addmod(mload(EC_X_1), mload(EC_X_1), p), p) + ep_x_double_identity := mulmod(ep_x_double_identity, y1_sqr_mul_4, p) + ep_x_double_identity := addmod(ep_x_double_identity, sub(p, x1_pow_4_mul_9), p) + + let acc := mulmod(ep_x_double_identity, mload(POW_PARTIAL_EVALUATION_LOC), p) + acc := mulmod(mulmod(acc, mload(QELLIPTIC_EVAL_LOC), p), mload(EC_Q_IS_DOUBLE), p) + acc := addmod(acc, mload(SUBRELATION_EVAL_12_LOC), p) + + // Add to existing contribution - and double check that numbers here + mstore(SUBRELATION_EVAL_12_LOC, acc) + } + + { + let x1_sqr_mul_3 := + mulmod(addmod(addmod(mload(EC_X_1), mload(EC_X_1), p), mload(EC_X_1), p), mload(EC_X_1), p) + let y_double_identity := + mulmod(x1_sqr_mul_3, addmod(mload(EC_X_1), sub(p, mload(EC_X_3)), p), p) + y_double_identity := addmod( + y_double_identity, + sub( + p, + mulmod( + addmod(mload(EC_Y_1), mload(EC_Y_1), p), + addmod(mload(EC_Y_1), mload(EC_Y_3), p), + p + ) + ), + p + ) + + let acc := mulmod(y_double_identity, mload(POW_PARTIAL_EVALUATION_LOC), p) + acc := mulmod(mulmod(acc, mload(QELLIPTIC_EVAL_LOC), p), mload(EC_Q_IS_DOUBLE), p) + acc := addmod(acc, mload(SUBRELATION_EVAL_13_LOC), p) + + // Add to existing contribution - and double check that numbers here + mstore(SUBRELATION_EVAL_13_LOC, acc) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* MEMORY RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + { + /** + * MEMORY + * + * A RAM memory record contains a tuple of the following fields: + * * i: `index` of memory cell being accessed + * * t: `timestamp` of memory cell being accessed (used for RAM, set to 0 for ROM) + * * v: `value` of memory cell being accessed + * * a: `access` type of record. read: 0 = read, 1 = write + * * r: `record` of memory cell. record = access + index * eta + timestamp * eta_two + value * eta_three + * + * A ROM memory record contains a tuple of the following fields: + * * i: `index` of memory cell being accessed + * * v: `value1` of memory cell being accessed (ROM tables can store up to 2 values per index) + * * v2:`value2` of memory cell being accessed (ROM tables can store up to 2 values per index) + * * r: `record` of memory cell. record = index * eta + value2 * eta_two + value1 * eta_three + * + * When performing a read/write access, the values of i, t, v, v2, a, r are stored in the following wires + + * selectors, depending on whether the gate is a RAM read/write or a ROM read + * + * | gate type | i | v2/t | v | a | r | + * | --------- | -- | ----- | -- | -- | -- | + * | ROM | w1 | w2 | w3 | -- | w4 | + * | RAM | w1 | w2 | w3 | qc | w4 | + * + * (for accesses where `index` is a circuit constant, it is assumed the circuit will apply a copy constraint on + * `w2` to fix its value) + * + * + */ + + /** + * Memory Record Check + * Partial degree: 1 + * Total degree: 4 + * + * A ROM/ROM access gate can be evaluated with the identity: + * + * qc + w1 \eta + w2 \eta_two + w3 \eta_three - w4 = 0 + * + * For ROM gates, qc = 0 + */ + /** + * memory_record_check = w_3 * eta_three; + * memory_record_check += w_2 * eta_two; + * memory_record_check += w_1 * eta; + * memory_record_check += q_c; + * + * partial_record_check = memory_record_check; + * + * memory_record_check -= w_4; + */ + let memory_record_check := mulmod(mload(W3_EVAL_LOC), mload(ETA_THREE_CHALLENGE), p) + memory_record_check := addmod( + memory_record_check, + mulmod(mload(W2_EVAL_LOC), mload(ETA_TWO_CHALLENGE), p), + p + ) + memory_record_check := addmod( + memory_record_check, + mulmod(mload(W1_EVAL_LOC), mload(ETA_CHALLENGE), p), + p + ) + memory_record_check := addmod(memory_record_check, mload(QC_EVAL_LOC), p) + + let partial_record_check := memory_record_check + memory_record_check := addmod(memory_record_check, sub(p, mload(W4_EVAL_LOC)), p) + + mstore(AUX_MEMORY_CHECK_IDENTITY, memory_record_check) + + /** + * ROM Consistency Check + * Partial degree: 1 + * Total degree: 4 + * + * For every ROM read, a set equivalence check is applied between the record witnesses, and a second set of + * records that are sorted. + * + * We apply the following checks for the sorted records: + * + * 1. w1, w2, w3 correctly map to 'index', 'v1, 'v2' for a given record value at w4 + * 2. index values for adjacent records are monotonically increasing + * 3. if, at gate i, index_i == index_{i + 1}, then value1_i == value1_{i + 1} and value2_i == value2_{i + 1} + * + */ + // index_delta = w_1_omega - w_1 + let index_delta := addmod(mload(W1_SHIFT_EVAL_LOC), sub(p, mload(W1_EVAL_LOC)), p) + + // record_delta = w_4_omega - w_4 + let record_delta := addmod(mload(W4_SHIFT_EVAL_LOC), sub(p, mload(W4_EVAL_LOC)), p) + + // index_is_monotonically_increasing = index_delta * (index_delta - 1) + let index_is_monotonically_increasing := mulmod(index_delta, addmod(index_delta, P_SUB_1, p), p) + + // adjacent_values_match_if_adjacent_indices_match = record_delta * (1 - index_delta) + let adjacent_values_match_if_adjacent_indices_match := + mulmod(record_delta, addmod(1, sub(p, index_delta), p), p) + + mstore( + SUBRELATION_EVAL_15_LOC, + mulmod( + adjacent_values_match_if_adjacent_indices_match, + mulmod( + mload(QL_EVAL_LOC), + mulmod( + mload(QR_EVAL_LOC), + mulmod(mload(QMEMORY_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p), + p + ), + p + ), + p + ) + ) + + // ROM_CONSISTENCY_CHECK_2 + mstore( + SUBRELATION_EVAL_16_LOC, + mulmod( + index_is_monotonically_increasing, + mulmod( + mload(QL_EVAL_LOC), + mulmod( + mload(QR_EVAL_LOC), + mulmod(mload(QMEMORY_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p), + p + ), + p + ), + p + ) + ) + + mstore( + AUX_ROM_CONSISTENCY_CHECK_IDENTITY, + mulmod(memory_record_check, mulmod(mload(QL_EVAL_LOC), mload(QR_EVAL_LOC), p), p) + ) + + { + /** + * RAM Consistency Check + * + * The 'access' type of the record is extracted with the expression `w_4 - ap.partial_record_check` + * (i.e. for an honest Prover `w1 * eta + w2 * eta^2 + w3 * eta^3 - w4 = access`. + * This is validated by requiring `access` to be boolean + * + * For two adjacent entries in the sorted list if _both_ + * A) index values match + * B) adjacent access value is 0 (i.e. next gate is a READ) + * then + * C) both values must match. + * The gate boolean check is + * (A && B) => C === !(A && B) || C === !A || !B || C + * + * N.B. it is the responsibility of the circuit writer to ensure that every RAM cell is initialized + * with a WRITE operation. + */ + /** + * next_gate_access_type = w_3_shift * eta_three; + * next_gate_access_type += (w_2_shift * eta_two); + * next_gate_access_type += (w_1_shift * eta); + * next_gate_access_type += w_4_shift; + * next_gate_access_type *= eta; + * next_gate_access_type = w_4_omega - next_gate_access_type; + */ + let next_gate_access_type := mulmod(mload(W3_SHIFT_EVAL_LOC), mload(ETA_THREE_CHALLENGE), p) + next_gate_access_type := addmod( + next_gate_access_type, + mulmod(mload(W2_SHIFT_EVAL_LOC), mload(ETA_TWO_CHALLENGE), p), + p + ) + next_gate_access_type := addmod( + next_gate_access_type, + mulmod(mload(W1_SHIFT_EVAL_LOC), mload(ETA_CHALLENGE), p), + p + ) + next_gate_access_type := addmod(mload(W4_SHIFT_EVAL_LOC), sub(p, next_gate_access_type), p) + + // value_delta = w_3_omega - w_3 + let value_delta := addmod(mload(W3_SHIFT_EVAL_LOC), sub(p, mload(W3_EVAL_LOC)), p) + // adjacent_values_match_if_adjacent_indices_match_and_next_access_is_a_read_operation = (1 - index_delta) * value_delta * (1 - next_gate_access_type); + + let adjacent_values_match_if_adjacent_indices_match_and_next_access_is_a_read_operation := + mulmod( + addmod(1, sub(p, index_delta), p), + mulmod(value_delta, addmod(1, sub(p, next_gate_access_type), p), p), + p + ) + + // We can't apply the RAM consistency check identity on the final entry in the sorted list (the wires in the + // next gate would make the identity fail). We need to validate that its 'access type' bool is correct. Can't + // do with an arithmetic gate because of the `eta` factors. We need to check that the *next* gate's access + // type is correct, to cover this edge case + // deg 2 or 4 + /** + * access_type = w_4 - partial_record_check + * access_check = access_type^2 - access_type + * next_gate_access_type_is_boolean = next_gate_access_type^2 - next_gate_access_type + */ + let access_type := addmod(mload(W4_EVAL_LOC), sub(p, partial_record_check), p) + let access_check := mulmod(access_type, addmod(access_type, P_SUB_1, p), p) + let next_gate_access_type_is_boolean := + mulmod(next_gate_access_type, addmod(next_gate_access_type, P_SUB_1, p), p) + + // scaled_activation_selector = q_arith * q_aux * alpha + let scaled_activation_selector := + mulmod( + mload(QO_EVAL_LOC), + mulmod(mload(QMEMORY_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p), + p + ) + + mstore( + SUBRELATION_EVAL_17_LOC, + mulmod( + adjacent_values_match_if_adjacent_indices_match_and_next_access_is_a_read_operation, + scaled_activation_selector, + p + ) + ) + + mstore( + SUBRELATION_EVAL_18_LOC, + mulmod(index_is_monotonically_increasing, scaled_activation_selector, p) + ) + + mstore( + SUBRELATION_EVAL_19_LOC, + mulmod(next_gate_access_type_is_boolean, scaled_activation_selector, p) + ) + + mstore(AUX_RAM_CONSISTENCY_CHECK_IDENTITY, mulmod(access_check, mload(QO_EVAL_LOC), p)) + } + + { + // timestamp_delta = w_2_omega - w_2 + let timestamp_delta := addmod(mload(W2_SHIFT_EVAL_LOC), sub(p, mload(W2_EVAL_LOC)), p) + + // RAM_timestamp_check_identity = (1 - index_delta) * timestamp_delta - w_3 + let RAM_TIMESTAMP_CHECK_IDENTITY := + addmod( + mulmod(timestamp_delta, addmod(1, sub(p, index_delta), p), p), + sub(p, mload(W3_EVAL_LOC)), + p + ) + + /** + * memory_identity = ROM_consistency_check_identity; + * memory_identity += RAM_timestamp_check_identity * q_4; + * memory_identity += memory_record_check * q_m; + * memory_identity *= q_1; + * memory_identity += (RAM_consistency_check_identity * q_arith); + * + * auxiliary_identity = memory_identity + non_native_field_identity + limb_accumulator_identity; + * auxiliary_identity *= q_aux; + * auxiliary_identity *= alpha_base; + */ + let memory_identity := mload(AUX_ROM_CONSISTENCY_CHECK_IDENTITY) + memory_identity := addmod( + memory_identity, + mulmod( + RAM_TIMESTAMP_CHECK_IDENTITY, + mulmod(mload(Q4_EVAL_LOC), mload(QL_EVAL_LOC), p), + p + ), + p + ) + + memory_identity := addmod( + memory_identity, + mulmod( + mload(AUX_MEMORY_CHECK_IDENTITY), + mulmod(mload(QM_EVAL_LOC), mload(QL_EVAL_LOC), p), + p + ), + p + ) + memory_identity := addmod(memory_identity, mload(AUX_RAM_CONSISTENCY_CHECK_IDENTITY), p) + + memory_identity := mulmod( + memory_identity, + mulmod(mload(QMEMORY_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p), + p + ) + mstore(SUBRELATION_EVAL_14_LOC, memory_identity) + } + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* NON NATIVE FIELD RELATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + /** + * Non native field arithmetic gate 2 + * _ _ + * / _ _ _ 14 \ + * q_2 . q_4 | (w_1 . w_2) + (w_1 . w_2) + (w_1 . w_4 + w_2 . w_3 - w_3) . 2 - w_3 - w_4 | + * \_ _/ + * + * limb_subproduct = w_1 . w_2_shift + w_1_shift . w_2 + * non_native_field_gate_2 = w_1 * w_4 + w_2 * w_3 - w_3_shift + * non_native_field_gate_2 = non_native_field_gate_2 * limb_size + * non_native_field_gate_2 -= w_4_shift + * non_native_field_gate_2 += limb_subproduct + * non_native_field_gate_2 *= q_4 + * limb_subproduct *= limb_size + * limb_subproduct += w_1_shift * w_2 + * non_native_field_gate_1 = (limb_subproduct + w_3 + w_4) * q_3 + * non_native_field_gate_3 = (limb_subproduct + w_4 - (w_3_shift + w_4_shift)) * q_m + * non_native_field_identity = (non_native_field_gate_1 + non_native_field_gate_2 + non_native_field_gate_3) * q_2 + */ + let limb_subproduct := + addmod( + mulmod(mload(W1_EVAL_LOC), mload(W2_SHIFT_EVAL_LOC), p), + mulmod(mload(W1_SHIFT_EVAL_LOC), mload(W2_EVAL_LOC), p), + p + ) + + let non_native_field_gate_2 := + addmod( + addmod( + mulmod(mload(W1_EVAL_LOC), mload(W4_EVAL_LOC), p), + mulmod(mload(W2_EVAL_LOC), mload(W3_EVAL_LOC), p), + p + ), + sub(p, mload(W3_SHIFT_EVAL_LOC)), + p + ) + non_native_field_gate_2 := mulmod(non_native_field_gate_2, LIMB_SIZE, p) + non_native_field_gate_2 := addmod(non_native_field_gate_2, sub(p, mload(W4_SHIFT_EVAL_LOC)), p) + non_native_field_gate_2 := addmod(non_native_field_gate_2, limb_subproduct, p) + non_native_field_gate_2 := mulmod(non_native_field_gate_2, mload(Q4_EVAL_LOC), p) + + limb_subproduct := mulmod(limb_subproduct, LIMB_SIZE, p) + limb_subproduct := addmod( + limb_subproduct, + mulmod(mload(W1_SHIFT_EVAL_LOC), mload(W2_SHIFT_EVAL_LOC), p), + p + ) + + let non_native_field_gate_1 := + mulmod( + addmod(limb_subproduct, sub(p, addmod(mload(W3_EVAL_LOC), mload(W4_EVAL_LOC), p)), p), + mload(QO_EVAL_LOC), + p + ) + + let non_native_field_gate_3 := + mulmod( + addmod( + addmod(limb_subproduct, mload(W4_EVAL_LOC), p), + sub(p, addmod(mload(W3_SHIFT_EVAL_LOC), mload(W4_SHIFT_EVAL_LOC), p)), + p + ), + mload(QM_EVAL_LOC), + p + ) + let non_native_field_identity := + mulmod( + addmod( + addmod(non_native_field_gate_1, non_native_field_gate_2, p), + non_native_field_gate_3, + p + ), + mload(QR_EVAL_LOC), + p + ) + + mstore(AUX_NON_NATIVE_FIELD_IDENTITY, non_native_field_identity) + } + + { + /** + * limb_accumulator_1 = w_2_omega; + * limb_accumulator_1 *= SUBLIMB_SHIFT; + * limb_accumulator_1 += w_1_omega; + * limb_accumulator_1 *= SUBLIMB_SHIFT; + * limb_accumulator_1 += w_3; + * limb_accumulator_1 *= SUBLIMB_SHIFT; + * limb_accumulator_1 += w_2; + * limb_accumulator_1 *= SUBLIMB_SHIFT; + * limb_accumulator_1 += w_1; + * limb_accumulator_1 -= w_4; + * limb_accumulator_1 *= q_4; + */ + let limb_accumulator_1 := mulmod(mload(W2_SHIFT_EVAL_LOC), SUBLIMB_SHIFT, p) + limb_accumulator_1 := addmod(limb_accumulator_1, mload(W1_SHIFT_EVAL_LOC), p) + limb_accumulator_1 := mulmod(limb_accumulator_1, SUBLIMB_SHIFT, p) + limb_accumulator_1 := addmod(limb_accumulator_1, mload(W3_EVAL_LOC), p) + limb_accumulator_1 := mulmod(limb_accumulator_1, SUBLIMB_SHIFT, p) + limb_accumulator_1 := addmod(limb_accumulator_1, mload(W2_EVAL_LOC), p) + limb_accumulator_1 := mulmod(limb_accumulator_1, SUBLIMB_SHIFT, p) + limb_accumulator_1 := addmod(limb_accumulator_1, mload(W1_EVAL_LOC), p) + limb_accumulator_1 := addmod(limb_accumulator_1, sub(p, mload(W4_EVAL_LOC)), p) + limb_accumulator_1 := mulmod(limb_accumulator_1, mload(Q4_EVAL_LOC), p) + + /** + * limb_accumulator_2 = w_3_omega; + * limb_accumulator_2 *= SUBLIMB_SHIFT; + * limb_accumulator_2 += w_2_omega; + * limb_accumulator_2 *= SUBLIMB_SHIFT; + * limb_accumulator_2 += w_1_omega; + * limb_accumulator_2 *= SUBLIMB_SHIFT; + * limb_accumulator_2 += w_4; + * limb_accumulator_2 *= SUBLIMB_SHIFT; + * limb_accumulator_2 += w_3; + * limb_accumulator_2 -= w_4_omega; + * limb_accumulator_2 *= q_m; + */ + let limb_accumulator_2 := mulmod(mload(W3_SHIFT_EVAL_LOC), SUBLIMB_SHIFT, p) + limb_accumulator_2 := addmod(limb_accumulator_2, mload(W2_SHIFT_EVAL_LOC), p) + limb_accumulator_2 := mulmod(limb_accumulator_2, SUBLIMB_SHIFT, p) + limb_accumulator_2 := addmod(limb_accumulator_2, mload(W1_SHIFT_EVAL_LOC), p) + limb_accumulator_2 := mulmod(limb_accumulator_2, SUBLIMB_SHIFT, p) + limb_accumulator_2 := addmod(limb_accumulator_2, mload(W4_EVAL_LOC), p) + limb_accumulator_2 := mulmod(limb_accumulator_2, SUBLIMB_SHIFT, p) + limb_accumulator_2 := addmod(limb_accumulator_2, mload(W3_EVAL_LOC), p) + limb_accumulator_2 := addmod(limb_accumulator_2, sub(p, mload(W4_SHIFT_EVAL_LOC)), p) + limb_accumulator_2 := mulmod(limb_accumulator_2, mload(QM_EVAL_LOC), p) + + let limb_accumulator_identity := addmod(limb_accumulator_1, limb_accumulator_2, p) + limb_accumulator_identity := mulmod(limb_accumulator_identity, mload(QO_EVAL_LOC), p) + + let nnf_identity := addmod(mload(AUX_NON_NATIVE_FIELD_IDENTITY), limb_accumulator_identity, p) + nnf_identity := mulmod( + nnf_identity, + mulmod(mload(QNNF_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p), + p + ) + + mstore(SUBRELATION_EVAL_20_LOC, nnf_identity) + } + + /* + * Poseidon External Relation + */ + { + let s1 := addmod(mload(W1_EVAL_LOC), mload(QL_EVAL_LOC), p) + let s2 := addmod(mload(W2_EVAL_LOC), mload(QR_EVAL_LOC), p) + let s3 := addmod(mload(W3_EVAL_LOC), mload(QO_EVAL_LOC), p) + let s4 := addmod(mload(W4_EVAL_LOC), mload(Q4_EVAL_LOC), p) + + // u1 := s1 * s1 * s1 * s1 * s1; + let t0 := mulmod(s1, s1, p) + let u1 := mulmod(t0, mulmod(t0, s1, p), p) + + // u2 := s2 * s2 * s2 * s2 * s2; + t0 := mulmod(s2, s2, p) + let u2 := mulmod(t0, mulmod(t0, s2, p), p) + + // u3 := s3 * s3 * s3 * s3 * s3; + t0 := mulmod(s3, s3, p) + let u3 := mulmod(t0, mulmod(t0, s3, p), p) + + // u4 := s4 * s4 * s4 * s4 * s4; + t0 := mulmod(s4, s4, p) + let u4 := mulmod(t0, mulmod(t0, s4, p), p) + + // matrix mul v = M_E * u with 14 additions + t0 := addmod(u1, u2, p) + let t1 := addmod(u3, u4, p) + + let t2 := addmod(u2, u2, p) + t2 := addmod(t2, t1, p) + + let t3 := addmod(u4, u4, p) + t3 := addmod(t3, t0, p) + + let v4 := addmod(t1, t1, p) + v4 := addmod(v4, v4, p) + v4 := addmod(v4, t3, p) + + let v2 := addmod(t0, t0, p) + v2 := addmod(v2, v2, p) + v2 := addmod(v2, t2, p) + + let v1 := addmod(t3, v2, p) + let v3 := addmod(t2, v4, p) + + let q_pos_by_scaling := + mulmod(mload(QPOSEIDON2_EXTERNAL_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p) + + mstore( + SUBRELATION_EVAL_21_LOC, + mulmod(q_pos_by_scaling, addmod(v1, sub(p, mload(W1_SHIFT_EVAL_LOC)), p), p) + ) + + mstore( + SUBRELATION_EVAL_22_LOC, + mulmod(q_pos_by_scaling, addmod(v2, sub(p, mload(W2_SHIFT_EVAL_LOC)), p), p) + ) + + mstore( + SUBRELATION_EVAL_23_LOC, + mulmod(q_pos_by_scaling, addmod(v3, sub(p, mload(W3_SHIFT_EVAL_LOC)), p), p) + ) + + mstore( + SUBRELATION_EVAL_24_LOC, + mulmod(q_pos_by_scaling, addmod(v4, sub(p, mload(W4_SHIFT_EVAL_LOC)), p), p) + ) + } + + /* + * Poseidon Internal Relation + */ + { + let s1 := addmod(mload(W1_EVAL_LOC), mload(QL_EVAL_LOC), p) + + // apply s-box round + let t0 := mulmod(s1, s1, p) + let u1 := mulmod(t0, mulmod(t0, s1, p), p) + let u2 := mload(W2_EVAL_LOC) + let u3 := mload(W3_EVAL_LOC) + let u4 := mload(W4_EVAL_LOC) + + // matrix mul v = M_I * u 4 muls and 7 additions + let u_sum := addmod(u1, u2, p) + u_sum := addmod(u_sum, addmod(u3, u4, p), p) + + let q_pos_by_scaling := + mulmod(mload(QPOSEIDON2_INTERNAL_EVAL_LOC), mload(POW_PARTIAL_EVALUATION_LOC), p) + + let v1 := addmod(mulmod(u1, POS_INTERNAL_MATRIX_D_0, p), u_sum, p) + + mstore( + SUBRELATION_EVAL_25_LOC, + mulmod(q_pos_by_scaling, addmod(v1, sub(p, mload(W1_SHIFT_EVAL_LOC)), p), p) + ) + let v2 := addmod(mulmod(u2, POS_INTERNAL_MATRIX_D_1, p), u_sum, p) + + mstore( + SUBRELATION_EVAL_26_LOC, + mulmod(q_pos_by_scaling, addmod(v2, sub(p, mload(W2_SHIFT_EVAL_LOC)), p), p) + ) + let v3 := addmod(mulmod(u3, POS_INTERNAL_MATRIX_D_2, p), u_sum, p) + + mstore( + SUBRELATION_EVAL_27_LOC, + mulmod(q_pos_by_scaling, addmod(v3, sub(p, mload(W3_SHIFT_EVAL_LOC)), p), p) + ) + + let v4 := addmod(mulmod(u4, POS_INTERNAL_MATRIX_D_3, p), u_sum, p) + mstore( + SUBRELATION_EVAL_28_LOC, + mulmod(q_pos_by_scaling, addmod(v4, sub(p, mload(W4_SHIFT_EVAL_LOC)), p), p) + ) + } + + // Scale and batch subrelations by subrelation challenges + // linear combination of subrelations + let accumulator := mload(SUBRELATION_EVAL_0_LOC) + + // Below is an unrolled variant of the following loop + // for (uint256 i = 1; i < NUMBER_OF_SUBRELATIONS; ++i) { + // accumulator = accumulator + evaluations[i] * subrelationChallenges[i - 1]; + // } + + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_1_LOC), mload(ALPHA_CHALLENGE_0), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_2_LOC), mload(ALPHA_CHALLENGE_1), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_3_LOC), mload(ALPHA_CHALLENGE_2), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_4_LOC), mload(ALPHA_CHALLENGE_3), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_5_LOC), mload(ALPHA_CHALLENGE_4), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_6_LOC), mload(ALPHA_CHALLENGE_5), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_7_LOC), mload(ALPHA_CHALLENGE_6), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_8_LOC), mload(ALPHA_CHALLENGE_7), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_9_LOC), mload(ALPHA_CHALLENGE_8), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_10_LOC), mload(ALPHA_CHALLENGE_9), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_11_LOC), mload(ALPHA_CHALLENGE_10), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_12_LOC), mload(ALPHA_CHALLENGE_11), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_13_LOC), mload(ALPHA_CHALLENGE_12), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_14_LOC), mload(ALPHA_CHALLENGE_13), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_15_LOC), mload(ALPHA_CHALLENGE_14), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_16_LOC), mload(ALPHA_CHALLENGE_15), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_17_LOC), mload(ALPHA_CHALLENGE_16), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_18_LOC), mload(ALPHA_CHALLENGE_17), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_19_LOC), mload(ALPHA_CHALLENGE_18), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_20_LOC), mload(ALPHA_CHALLENGE_19), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_21_LOC), mload(ALPHA_CHALLENGE_20), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_22_LOC), mload(ALPHA_CHALLENGE_21), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_23_LOC), mload(ALPHA_CHALLENGE_22), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_24_LOC), mload(ALPHA_CHALLENGE_23), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_25_LOC), mload(ALPHA_CHALLENGE_24), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_26_LOC), mload(ALPHA_CHALLENGE_25), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_27_LOC), mload(ALPHA_CHALLENGE_26), p), + p + ) + accumulator := addmod( + accumulator, + mulmod(mload(SUBRELATION_EVAL_28_LOC), mload(ALPHA_CHALLENGE_27), p), + p + ) + + let sumcheck_valid := eq(accumulator, mload(FINAL_ROUND_TARGET_LOC)) + + if iszero(sumcheck_valid) { + mstore(0x00, SUMCHECK_FAILED_SELECTOR) + revert(0x00, 0x04) + } + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SUMCHECK -- Complete */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SHPLEMINI */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + // ============= SHPLEMINI INVERSES ============== + // Inverses were computed in the unified batch inversion above. + let unshifted_scalar := 0 + let shifted_scalar := 0 + { + // staging[0] = 1/gemini_r -- needed for shifted_scalar computation + let gemini_r_inv := mload(GEMINI_R_INV_LOC) + + // staging[1..3*LOG_N] maps contiguously to: + // INVERTED_CHALLENGE_POW_MINUS_U_0..14 + // POS_INVERTED_DENOM_0..14 + // NEG_INVERTED_DENOM_0..14 + // Total: 3*LOG_N + + // Compute unshifted_scalar and shifted_scalar using the copied inverses + let pos_inverted_denominator := mload(POS_INVERTED_DENOM_0_LOC) + let neg_inverted_denominator := mload(NEG_INVERTED_DENOM_0_LOC) + let shplonk_nu := mload(SHPLONK_NU_CHALLENGE) + + unshifted_scalar := addmod(pos_inverted_denominator, mulmod(shplonk_nu, neg_inverted_denominator, p), p) + + shifted_scalar := mulmod( + gemini_r_inv, // (1 / gemini_r_challenge) from staging[0] + // (inverse_vanishing_evals[0]) - (shplonk_nu * inverse_vanishing_evals[1]) + addmod( + pos_inverted_denominator, + // - (shplonk_nu * inverse_vanishing_evals[1]) + sub(p, mulmod(shplonk_nu, neg_inverted_denominator, p)), + p + ), + p + ) + } + + // Commitment Accumulation (MSM via sequential ecAdd/ecMul): + // For each commitment C_i with batch scalar s_i, we compute: + // accumulator += s_i * C_i + // The commitments include: shplonk_Q, VK points, wire commitments, + // lookup commitments, Z_PERM, gemini fold univariates. + // The KZG quotient is handled separately. + // The final accumulator is the LHS of the pairing equation. + + // Accumulators + let batching_challenge := 1 + let batched_evaluation := 0 + + let neg_unshifted_scalar := sub(p, unshifted_scalar) + let neg_shifted_scalar := sub(p, shifted_scalar) + + let rho := mload(RHO_CHALLENGE) + + // Unrolled for the loop below - where NUMBER_UNSHIFTED = 36 + // for (uint256 i = 1; i <= NUMBER_UNSHIFTED; ++i) { + // scalars[i] = mem.unshiftedScalar.neg() * mem.batchingChallenge; + // mem.batchedEvaluation = mem.batchedEvaluation + (proof.sumcheckEvaluations[i - 1] * mem.batchingChallenge); + // mem.batchingChallenge = mem.batchingChallenge * tp.rho; + // } + + // Iteration order matches UltraFlavor_Generated::EntityId. Scalar slot N = entity index N + 1 + // pairs with vk[N] in the batchMul block below. + + // 0: SIGMA1_EVAL_LOC + mstore(BATCH_SCALAR_1_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA1_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 1: SIGMA2_EVAL_LOC + mstore(BATCH_SCALAR_2_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA2_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 2: SIGMA3_EVAL_LOC + mstore(BATCH_SCALAR_3_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA3_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 3: SIGMA4_EVAL_LOC + mstore(BATCH_SCALAR_4_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(SIGMA4_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 4: ID1_EVAL_LOC + mstore(BATCH_SCALAR_5_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID1_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 5: ID2_EVAL_LOC + mstore(BATCH_SCALAR_6_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID2_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 6: ID3_EVAL_LOC + mstore(BATCH_SCALAR_7_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID3_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 7: ID4_EVAL_LOC + mstore(BATCH_SCALAR_8_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(ID4_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 8: LAGRANGE_FIRST_EVAL_LOC + mstore(BATCH_SCALAR_9_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(LAGRANGE_FIRST_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 9: LAGRANGE_LAST_EVAL_LOC + mstore(BATCH_SCALAR_10_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(LAGRANGE_LAST_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 10: QLOOKUP_EVAL_LOC + mstore(BATCH_SCALAR_11_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QLOOKUP_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 11: TABLE1_EVAL_LOC + mstore(BATCH_SCALAR_12_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE1_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 12: TABLE2_EVAL_LOC + mstore(BATCH_SCALAR_13_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE2_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 13: TABLE3_EVAL_LOC + mstore(BATCH_SCALAR_14_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE3_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 14: TABLE4_EVAL_LOC + mstore(BATCH_SCALAR_15_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(TABLE4_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 15: QM_EVAL_LOC + mstore(BATCH_SCALAR_16_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QM_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 16: QR_EVAL_LOC + mstore(BATCH_SCALAR_17_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QR_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 17: QO_EVAL_LOC + mstore(BATCH_SCALAR_18_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QO_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 18: QC_EVAL_LOC + mstore(BATCH_SCALAR_19_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QC_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 19: QL_EVAL_LOC + mstore(BATCH_SCALAR_20_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QL_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 20: Q4_EVAL_LOC + mstore(BATCH_SCALAR_21_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(Q4_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 21: QARITH_EVAL_LOC + mstore(BATCH_SCALAR_22_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QARITH_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 22: QRANGE_EVAL_LOC + mstore(BATCH_SCALAR_23_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QRANGE_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 23: QELLIPTIC_EVAL_LOC + mstore(BATCH_SCALAR_24_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QELLIPTIC_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 24: QMEMORY_EVAL_LOC + mstore(BATCH_SCALAR_25_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QMEMORY_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 25: QNNF_EVAL_LOC + mstore(BATCH_SCALAR_26_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QNNF_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 26: QPOSEIDON2_EXTERNAL_EVAL_LOC + mstore(BATCH_SCALAR_27_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QPOSEIDON2_EXTERNAL_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 27: QPOSEIDON2_INTERNAL_EVAL_LOC + mstore(BATCH_SCALAR_28_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(QPOSEIDON2_INTERNAL_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 28: W1_EVAL_LOC + mstore(BATCH_SCALAR_29_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W1_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 29: W2_EVAL_LOC + mstore(BATCH_SCALAR_30_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W2_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 30: W3_EVAL_LOC + mstore(BATCH_SCALAR_31_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W3_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 31: W4_EVAL_LOC + mstore(BATCH_SCALAR_32_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W4_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 32: Z_PERM_EVAL_LOC + mstore(BATCH_SCALAR_33_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(Z_PERM_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 33: LOOKUP_INVERSES_EVAL_LOC + mstore(BATCH_SCALAR_34_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_INVERSES_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 34: LOOKUP_READ_COUNTS_EVAL_LOC + mstore(BATCH_SCALAR_35_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_READ_COUNTS_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 35: LOOKUP_READ_TAGS_EVAL_LOC + mstore(BATCH_SCALAR_36_LOC, mulmod(neg_unshifted_scalar, batching_challenge, p)) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(LOOKUP_READ_TAGS_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // Unrolled for NUMBER_OF_SHIFTED_ENTITIES = 5 + // for (uint256 i = NUMBER_UNSHIFTED + 1; i <= NUMBER_OF_ENTITIES; ++i) { + // scalars[i] = mem.shiftedScalar.neg() * mem.batchingChallenge; + // mem.batchedEvaluation = mem.batchedEvaluation + (proof.sumcheckEvaluations[i - 1] * mem.batchingChallenge); + // mem.batchingChallenge = mem.batchingChallenge * tp.rho; + // } + + // 28: W1_EVAL_LOC + mstore( + BATCH_SCALAR_29_LOC, + addmod(mload(BATCH_SCALAR_29_LOC), mulmod(neg_shifted_scalar, batching_challenge, p), p) + ) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W1_SHIFT_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 29: W2_EVAL_LOC + mstore( + BATCH_SCALAR_30_LOC, + addmod(mload(BATCH_SCALAR_30_LOC), mulmod(neg_shifted_scalar, batching_challenge, p), p) + ) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W2_SHIFT_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 30: W3_EVAL_LOC + mstore( + BATCH_SCALAR_31_LOC, + addmod(mload(BATCH_SCALAR_31_LOC), mulmod(neg_shifted_scalar, batching_challenge, p), p) + ) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W3_SHIFT_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 31: W4_EVAL_LOC + mstore( + BATCH_SCALAR_32_LOC, + addmod(mload(BATCH_SCALAR_32_LOC), mulmod(neg_shifted_scalar, batching_challenge, p), p) + ) + batched_evaluation := addmod(batched_evaluation, mulmod(mload(W4_SHIFT_EVAL_LOC), batching_challenge, p), p) + batching_challenge := mulmod(batching_challenge, rho, p) + + // 32: Z_PERM_EVAL_LOC + mstore( + BATCH_SCALAR_33_LOC, + addmod(mload(BATCH_SCALAR_33_LOC), mulmod(neg_shifted_scalar, batching_challenge, p), p) + ) + batched_evaluation := addmod( + batched_evaluation, + mulmod(mload(Z_PERM_SHIFT_EVAL_LOC), batching_challenge, p), + p + ) + batching_challenge := mulmod(batching_challenge, rho, p) + + // Compute fold pos evaluations + { + mstore(CHALL_POW_LOC, POWERS_OF_EVALUATION_CHALLENGE_23_LOC) + mstore(SUMCHECK_U_LOC, SUM_U_CHALLENGE_23) + mstore(GEMINI_A_LOC, GEMINI_A_EVAL_23) + // Inversion of this value was included in batch inversion above + let inverted_chall_pow_minus_u_loc := INVERTED_CHALLENGE_POW_MINUS_U_23_LOC + let fold_pos_off := FOLD_POS_EVALUATIONS_23_LOC + + let batchedEvalAcc := batched_evaluation + for { let i := LOG_N } gt(i, 0) { i := sub(i, 1) } { + let chall_pow := mload(mload(CHALL_POW_LOC)) + let sum_check_u := mload(mload(SUMCHECK_U_LOC)) + + // challengePower * batchedEvalAccumulator * 2 + let batchedEvalRoundAcc := mulmod(chall_pow, mulmod(batchedEvalAcc, 2, p), p) + // (challengePower * (ONE - u) - u) + let chall_pow_times_1_minus_u := mulmod(chall_pow, addmod(1, sub(p, sum_check_u), p), p) + + batchedEvalRoundAcc := addmod( + batchedEvalRoundAcc, + sub( + p, + mulmod( + mload(mload(GEMINI_A_LOC)), + addmod(chall_pow_times_1_minus_u, sub(p, sum_check_u), p), + p + ) + ), + p + ) + + batchedEvalRoundAcc := mulmod(batchedEvalRoundAcc, mload(inverted_chall_pow_minus_u_loc), p) + + batchedEvalAcc := batchedEvalRoundAcc + mstore(fold_pos_off, batchedEvalRoundAcc) + + mstore(CHALL_POW_LOC, sub(mload(CHALL_POW_LOC), 0x20)) + mstore(SUMCHECK_U_LOC, sub(mload(SUMCHECK_U_LOC), 0x20)) + mstore(GEMINI_A_LOC, sub(mload(GEMINI_A_LOC), 0x20)) + inverted_chall_pow_minus_u_loc := sub(inverted_chall_pow_minus_u_loc, 0x20) + fold_pos_off := sub(fold_pos_off, 0x20) + } + } + + let constant_term_acc := mulmod(mload(FOLD_POS_EVALUATIONS_0_LOC), mload(POS_INVERTED_DENOM_0_LOC), p) + { + let shplonk_nu := mload(SHPLONK_NU_CHALLENGE) + + constant_term_acc := addmod( + constant_term_acc, + mulmod(mload(GEMINI_A_EVAL_0), mulmod(shplonk_nu, mload(NEG_INVERTED_DENOM_0_LOC), p), p), + p + ) + + let shplonk_nu_sqr := mulmod(shplonk_nu, shplonk_nu, p) + batching_challenge := shplonk_nu_sqr + + mstore(SS_POS_INV_DENOM_LOC, POS_INVERTED_DENOM_1_LOC) + mstore(SS_NEG_INV_DENOM_LOC, NEG_INVERTED_DENOM_1_LOC) + + mstore(SS_GEMINI_EVALS_LOC, GEMINI_A_EVAL_1) + let fold_pos_evals_loc := FOLD_POS_EVALUATIONS_1_LOC + + let scalars_loc := BATCH_SCALAR_37_LOC + + for { let i := 0 } lt(i, sub(LOG_N, 1)) { i := add(i, 1) } { + let scaling_factor_pos := mulmod(batching_challenge, mload(mload(SS_POS_INV_DENOM_LOC)), p) + let scaling_factor_neg := + mulmod(batching_challenge, mulmod(shplonk_nu, mload(mload(SS_NEG_INV_DENOM_LOC)), p), p) + + mstore(scalars_loc, addmod(sub(p, scaling_factor_neg), sub(p, scaling_factor_pos), p)) + + let accum_contribution := mulmod(scaling_factor_neg, mload(mload(SS_GEMINI_EVALS_LOC)), p) + accum_contribution := addmod( + accum_contribution, + mulmod(scaling_factor_pos, mload(fold_pos_evals_loc), p), + p + ) + + constant_term_acc := addmod(constant_term_acc, accum_contribution, p) + + batching_challenge := mulmod(batching_challenge, shplonk_nu_sqr, p) + + mstore(SS_POS_INV_DENOM_LOC, add(mload(SS_POS_INV_DENOM_LOC), 0x20)) + mstore(SS_NEG_INV_DENOM_LOC, add(mload(SS_NEG_INV_DENOM_LOC), 0x20)) + mstore(SS_GEMINI_EVALS_LOC, add(mload(SS_GEMINI_EVALS_LOC), 0x20)) + fold_pos_evals_loc := add(fold_pos_evals_loc, 0x20) + scalars_loc := add(scalars_loc, 0x20) + } + } + + let precomp_success_flag := 1 + let q := Q // EC group order + { + // The initial accumulator = 1 * shplonk_q + mcopy(ACCUMULATOR, SHPLONK_Q_X_LOC, 0x40) + } + + // Accumulate vk points + loadVk() + { + // VK batchMul order matches UltraFlavor_Generated::EntityId precomputed layout. + // Accumulator = accumulator + scalar[1] * vk[0] (sigma_1) + mcopy(G1_LOCATION, SIGMA_1_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_1_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[2] * vk[1] (sigma_2) + mcopy(G1_LOCATION, SIGMA_2_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_2_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[3] * vk[2] (sigma_3) + mcopy(G1_LOCATION, SIGMA_3_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_3_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[4] * vk[3] (sigma_4) + mcopy(G1_LOCATION, SIGMA_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_4_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[5] * vk[4] (id_1) + mcopy(G1_LOCATION, ID_1_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_5_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[6] * vk[5] (id_2) + mcopy(G1_LOCATION, ID_2_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_6_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[7] * vk[6] (id_3) + mcopy(G1_LOCATION, ID_3_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_7_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[8] * vk[7] (id_4) + mcopy(G1_LOCATION, ID_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_8_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[9] * vk[8] (lagrange_first) + mcopy(G1_LOCATION, LAGRANGE_FIRST_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_9_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[10] * vk[9] (lagrange_last) + mcopy(G1_LOCATION, LAGRANGE_LAST_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_10_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[11] * vk[10] (q_lookup) + mcopy(G1_LOCATION, Q_LOOKUP_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_11_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[12] * vk[11] (table_1) + mcopy(G1_LOCATION, TABLE_1_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_12_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[13] * vk[12] (table_2) + mcopy(G1_LOCATION, TABLE_2_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_13_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[14] * vk[13] (table_3) + mcopy(G1_LOCATION, TABLE_3_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_14_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[15] * vk[14] (table_4) + mcopy(G1_LOCATION, TABLE_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_15_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[16] * vk[15] (q_m) + mcopy(G1_LOCATION, Q_M_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_16_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[17] * vk[16] (q_r) + mcopy(G1_LOCATION, Q_R_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_17_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[18] * vk[17] (q_o) + mcopy(G1_LOCATION, Q_O_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_18_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[19] * vk[18] (q_c) + mcopy(G1_LOCATION, Q_C_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_19_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[20] * vk[19] (q_l) + mcopy(G1_LOCATION, Q_L_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_20_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[21] * vk[20] (q_4) + mcopy(G1_LOCATION, Q_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_21_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[22] * vk[21] (q_arith) + mcopy(G1_LOCATION, Q_ARITH_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_22_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[23] * vk[22] (q_delta_range) + mcopy(G1_LOCATION, Q_DELTA_RANGE_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_23_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[24] * vk[23] (q_elliptic) + mcopy(G1_LOCATION, Q_ELLIPTIC_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_24_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[25] * vk[24] (q_memory) + mcopy(G1_LOCATION, Q_MEMORY_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_25_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[26] * vk[25] (q_nnf) + mcopy(G1_LOCATION, Q_NNF_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_26_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[27] * vk[26] (q_poseidon2_external) + mcopy(G1_LOCATION, Q_POSEIDON_2_EXTERNAL_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_27_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[28] * vk[27] (q_poseidon2_internal) + mcopy(G1_LOCATION, Q_POSEIDON_2_INTERNAL_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_28_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + constant_term_acc * G (generator) + mstore(G1_LOCATION, 0x01) // G1 generator x + mstore(add(G1_LOCATION, 0x20), 0x02) // G1 generator y + mstore(SCALAR_LOCATION, constant_term_acc) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulate proof points + // Accumulator = accumulator + scalar[29] * w_l + mcopy(G1_LOCATION, W_L_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_29_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[30] * w_r + mcopy(G1_LOCATION, W_R_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_30_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[31] * w_o + mcopy(G1_LOCATION, W_O_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_31_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[32] * w_4 + mcopy(G1_LOCATION, W_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_32_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[33] * z_perm + mcopy(G1_LOCATION, Z_PERM_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_33_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[34] * lookup_inverses + mcopy(G1_LOCATION, LOOKUP_INVERSES_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_34_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[35] * lookup_read_counts + mcopy(G1_LOCATION, LOOKUP_READ_COUNTS_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_35_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulator = accumulator + scalar[36] * lookup_read_tags + mcopy(G1_LOCATION, LOOKUP_READ_TAGS_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_36_LOC)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + + // Accumulate these LOG_N scalars with the gemini fold univariates + { + { + /// {{ UNROLL_SECTION_START ACCUMULATE_GEMINI_FOLD_UNIVARIATE }} + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_0_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_37_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_1_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_38_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_2_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_39_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_3_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_40_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_4_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_41_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_5_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_42_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_6_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_43_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_7_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_44_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_8_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_45_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_9_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_46_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_10_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_47_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_11_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_48_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_12_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_49_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_13_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_50_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_14_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_51_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_15_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_52_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_16_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_53_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_17_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_54_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_18_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_55_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_19_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_56_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_20_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_57_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_21_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_58_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) + + mcopy(G1_LOCATION, GEMINI_FOLD_UNIVARIATE_22_X_LOC, 0x40) + mstore(SCALAR_LOCATION, mload(BATCH_SCALAR_59_LOC)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40)) + precomp_success_flag := + and(precomp_success_flag, staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40)) +/// {{ UNROLL_SECTION_END ACCUMULATE_GEMINI_FOLD_UNIVARIATE }} + } + } + + { + // Accumulate final quotient commitment into shplonk check + // Accumulator = accumulator + shplonkZ * quotient commitment + mcopy(G1_LOCATION, KZG_QUOTIENT_X_LOC, 0x40) + + mstore(SCALAR_LOCATION, mload(SHPLONK_Z_CHALLENGE)) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 7, G1_LOCATION, 0x60, ACCUMULATOR_2, 0x40) + ) + precomp_success_flag := and( + precomp_success_flag, + staticcall(gas(), 6, ACCUMULATOR, 0x80, ACCUMULATOR, 0x40) + ) + } + + // All G1 points were validated on-curve during input validation. + // precomp_success_flag now only tracks ecAdd/ecMul precompile success. + if iszero(precomp_success_flag) { + mstore(0x00, SHPLEMINI_FAILED_SELECTOR) + revert(0x00, 0x04) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* SHPLEMINI - complete */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PAIRING CHECK */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + { + // P_1 + mstore(0xc0, mload(KZG_QUOTIENT_X_LOC)) + mstore(0xe0, sub(q, mload(KZG_QUOTIENT_Y_LOC))) + + // p_0_agg + // 0x80 - p_0_agg x + // 0xa0 - p_0_agg y + mcopy(0x80, ACCUMULATOR, 0x40) + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PAIRING AGGREGATION */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + // Read the pairing encoded in the first 8 field elements of the proof (2 limbs per coordinate) + let p0_other_x := mload(PAIRING_POINT_0_X_0_LOC) + p0_other_x := or(shl(136, mload(PAIRING_POINT_0_X_1_LOC)), p0_other_x) + + let p0_other_y := mload(PAIRING_POINT_0_Y_0_LOC) + p0_other_y := or(shl(136, mload(PAIRING_POINT_0_Y_1_LOC)), p0_other_y) + + let p1_other_x := mload(PAIRING_POINT_1_X_0_LOC) + p1_other_x := or(shl(136, mload(PAIRING_POINT_1_X_1_LOC)), p1_other_x) + + let p1_other_y := mload(PAIRING_POINT_1_Y_0_LOC) + p1_other_y := or(shl(136, mload(PAIRING_POINT_1_Y_1_LOC)), p1_other_y) + + // Check if pairing points are default (all zero = infinity = no recursive verification) + let pairing_points_are_default := iszero(or(or(p0_other_x, p0_other_y), or(p1_other_x, p1_other_y))) + + let success := 1 + // Only aggregate if pairing points are non-default + if iszero(pairing_points_are_default) { + // Reconstructed coordinates must be < Q to prevent malleability + if iszero(and( + and(lt(p0_other_x, q), lt(p0_other_y, q)), + and(lt(p1_other_x, q), lt(p1_other_y, q)) + )) { + mstore(0x00, VALUE_GE_GROUP_ORDER_SELECTOR) + revert(0x00, 0x04) + } + + // Validate p_0_other not point of infinity + success := iszero(iszero(or(p0_other_x, p0_other_y))) + // Validate p_1_other not point of infinity + success := and(success, iszero(iszero(or(p1_other_x, p1_other_y)))) + + // p_0 + mstore(0x00, p0_other_x) + mstore(0x20, p0_other_y) + + // p_1 + mstore(0x40, p1_other_x) + mstore(0x60, p1_other_y) + + // p_1_agg is already in the correct location + + let recursion_separator := keccak256(0x00, 0x100) + + // Write separator back to scratch space + mstore(0x00, p0_other_x) + + mstore(0x40, recursion_separator) + // recursion_separator * p_0_other + success := and(success, staticcall(gas(), 0x07, 0x00, 0x60, 0x00, 0x40)) + + // (recursion_separator * p_0_other) + p_0_agg + mcopy(0x40, 0x80, 0x40) + // p_0 = (recursion_separator * p_0_other) + p_0_agg + success := and(success, staticcall(gas(), 6, 0x00, 0x80, 0x00, 0x40)) + + mstore(0x40, p1_other_x) + mstore(0x60, p1_other_y) + mstore(0x80, recursion_separator) + + success := and(success, staticcall(gas(), 7, 0x40, 0x60, 0x40, 0x40)) + + // Write p_1_agg back to scratch space + mcopy(0x80, 0xc0, 0x40) + + // 0xc0 - (recursion_separator * p_1_other) + p_1_agg + success := and(success, staticcall(gas(), 6, 0x40, 0x80, 0xc0, 0x40)) + } + // If default pairing points, use p_0_agg and p_1_agg directly (already at 0x80, 0xc0) + if pairing_points_are_default { + // Copy p_0_agg to 0x00 for pairing input + mcopy(0x00, 0x80, 0x40) + // p_1_agg stays at 0xc0 + } + + // G2 [1] + mstore(0x40, 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2) + mstore(0x60, 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed) + mstore(0x80, 0x090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b) + mstore(0xa0, 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa) + + // G2 [x] + mstore(0x100, 0x260e01b251f6f1c7e7ff4e580791dee8ea51d87a358e038b4efe30fac09383c1) + mstore(0x120, 0x0118c4d5b837bcc2bc89b5b398b5974e9f5944073b32078b7e231fec938883b0) + mstore(0x140, 0x04fc6369f7110fe3d25156c1bb9a72859cf2a04641f99ba4ee413c80da6a5fe4) + mstore(0x160, 0x22febda3c0c0632a56475b4214e5615e11e6dd3f96e6cea2854a87d4dacc5e55) + + let pairing_success := and(success, staticcall(gas(), 8, 0x00, 0x180, 0x00, 0x20)) + if iszero(and(pairing_success, mload(0x00))) { + mstore(0x00, SHPLEMINI_FAILED_SELECTOR) + revert(0x00, 0x04) + } + + /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ + /* PAIRING CHECK - Complete */ + /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ + } + { + mstore(0x00, 0x01) + return(0x00, 0x20) // Proof succeeded! + } + } + } + } +} diff --git a/l1-contracts/script/deploy/V5_UPGRADE_RUNBOOK.md b/l1-contracts/script/deploy/V5_UPGRADE_RUNBOOK.md new file mode 100644 index 000000000000..42d3bee40859 --- /dev/null +++ b/l1-contracts/script/deploy/V5_UPGRADE_RUNBOOK.md @@ -0,0 +1,35 @@ +# V5 Upgrade Runbook + +`script/deploy/DeployRollupForUpgradeV5.s.sol` deploys the v5 `RewardDistributor`, `Rollup`, +and `EscapeHatch`, plus the `V5UpgradePayload` governance executes to: drain the v4 +distributor, `Registry.addRollup(v5)` + `updateRewardDistributor(new)`, `GSE.addRollup(v5)`, +`Rollup.setEscapeHatch(hatch)` (one-shot; emits `EscapeHatchSet`, not v4's `EscapeHatchUpdated` +— update indexers), and on mainnet migrate `FlushRewarder` funds to a v5-bound rewarder. + +## Profile + +```bash +forge clean && FOUNDRY_PROFILE=production forge build +``` + +## Deploy + +```bash +export PRIVATE_KEY=0x... RPC_URL=https://... ETHERSCAN_API_KEY=... +export FOUNDRY_PROFILE=production # mainnet only + +forge script script/deploy/DeployRollupForUpgradeV5.s.sol \ + --sig 'run()' --rpc-url "$RPC_URL" --private-key "$PRIVATE_KEY" \ + --broadcast --verify --batch-size 8 # drop these flags to simulate +``` + +Output: one `JSON DEPLOY RESULT: {...}` line with every address. + +## Tests + +```bash +SEPOLIA_RPC_URL= MAINNET_RPC_URL= \ + forge test --match-path 'test/periphery/V5UpgradePayload*' -vv +``` + +Fork tests run every action against live state; unit tests cover the same against stubs. diff --git a/l1-contracts/scripts/forge_broadcast.js b/l1-contracts/scripts/forge_broadcast.js index fb7b809e4a5a..8a8eee00dc26 100755 --- a/l1-contracts/scripts/forge_broadcast.js +++ b/l1-contracts/scripts/forge_broadcast.js @@ -59,11 +59,19 @@ const timeoutMs = (isAnvil ? 120_000 : 1_200_000); const proc = spawn( +<<<<<<< HEAD "forge", ["script", ...args, "--broadcast", "--batch-size", batchSize], { stdio: ["ignore", "pipe", "inherit"], }, +======= + process.env.FORGE_BIN || "forge", + ["script", ...args, "--broadcast", "--batch-size", batchSize], + { + stdio: ["ignore", "pipe", "inherit"], + } +>>>>>>> origin/v5-next ); const stdout = []; @@ -85,14 +93,22 @@ const exitCode = await new Promise((resolve) => { }); proc.on("close", (code) => { clearTimeout(timeout); +<<<<<<< HEAD resolve(timedOut ? 1 : (code ?? 1)); +======= + resolve(timedOut ? 1 : code ?? 1); +>>>>>>> origin/v5-next }); }); log( exitCode === 0 ? "Broadcast succeeded." +<<<<<<< HEAD : `Broadcast failed (exit ${exitCode}).`, +======= + : `Broadcast failed (exit ${exitCode}).` +>>>>>>> origin/v5-next ); const data = Buffer.concat(stdout); if (data.length > 0) writeSync(1, data); diff --git a/l1-contracts/src/core/libraries/rollup/EpochProofLib.sol b/l1-contracts/src/core/libraries/rollup/EpochProofLib.sol index 85284b38fa97..c29ae43f39b7 100644 --- a/l1-contracts/src/core/libraries/rollup/EpochProofLib.sol +++ b/l1-contracts/src/core/libraries/rollup/EpochProofLib.sol @@ -163,6 +163,8 @@ library EpochProofLib { ProposedHeader[] calldata _headers, bytes calldata _blobPublicInputs ) internal view returns (bytes32[] memory) { + verifyHeaders(_start, _end, _headers); + RollupStore storage rollupStore = STFLib.getStorage(); { diff --git a/l1-contracts/src/periphery/V5UpgradePayload.sol b/l1-contracts/src/periphery/V5UpgradePayload.sol new file mode 100644 index 000000000000..41fd2a45de1c --- /dev/null +++ b/l1-contracts/src/periphery/V5UpgradePayload.sol @@ -0,0 +1,191 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024 Aztec Labs. +pragma solidity >=0.8.27; + +import {IEscapeHatch} from "@aztec/core/interfaces/IEscapeHatch.sol"; +import {IInstance} from "@aztec/core/interfaces/IInstance.sol"; +import {IValidatorSelectionCore} from "@aztec/core/interfaces/IValidatorSelection.sol"; +import {IGSECore} from "@aztec/governance/GSE.sol"; +import {IPayload} from "@aztec/governance/interfaces/IPayload.sol"; +import {IRegistry} from "@aztec/governance/interfaces/IRegistry.sol"; +import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol"; +import {FlushRewarder} from "@aztec/periphery/FlushRewarder.sol"; +import {IERC20} from "@oz/token/ERC20/IERC20.sol"; + +/** + * @title V5UpgradePayload + * @author Aztec Labs + * @notice Single governance payload that swaps the canonical rollup to v5, the reward + * distributor to its v5 replacement, and activates the v5 escape hatch. + * + * The v5 rollup contract binds its reward distributor address immutably at construction + * (see AZIP-2), so changing the distributor requires deploying a new rollup whose + * constructor was given the new distributor. This payload completes the swap by: + * + * 1. `oldDistributor.recover(asset, newDistributor, balance)` — moves the v4 distributor's + * entire asset balance into the new distributor. + * 2. `Registry.addRollup(NEW_ROLLUP)` — makes the v5 rollup canonical. + * 3. `Registry.updateRewardDistributor` — points the registry at the new distributor so + * downstream readers (operator scripts, future + * rollups, indexers) discover it. + * 4. `GSE.addRollup(NEW_ROLLUP)` — registers the v5 rollup with the GSE so attesters + * can follow it without redepositing. + * 5. `NEW_ROLLUP.setEscapeHatch(hatch)` — activates the escape hatch on the v5 rollup, so + * escape-hatch block production only becomes possible + * once governance executes this payload. The call is + * one-shot: it reverts if the rollup's hatch is + * already set, and the hatch can never be replaced. + * 6. `oldFlushRewarder.recover(...)` — only on chains with a flush rewarder wired to the + * old rollup: moves its available (unowed) rewards + * into a freshly deployed flush rewarder bound to the + * v5 rollup, keeping the entry-queue flush incentive + * alive across the upgrade. + * + * The in-service v4 reward distributor exposes the owner-gated, unconstrained + * `recover(address asset, address to, uint256 amount)`: it transfers exactly `amount` with no + * drain ceiling, gated on the registry owner (governance). The drain therefore moves the + * distributor's full balance. The selector is encoded explicitly here because this branch no + * longer carries an interface for the v4 distributor. + */ +contract V5UpgradePayload is IPayload { + /// @notice Selector for `recover(address,address,uint256)` on the in-service v4 RewardDistributor. + /// @dev Hard-coded because the v4 interface is no longer in this repo. The selector is the + /// first 4 bytes of `keccak256("recover(address,address,uint256)")`. + bytes4 public constant LEGACY_RECOVER_SELECTOR = bytes4(keccak256("recover(address,address,uint256)")); + + /// @notice Registry whose canonical pointer and reward-distributor pointer are being updated. + IRegistry public immutable REGISTRY; + + /// @notice The newly deployed v5 rollup. Already wired to NEW_REWARD_DISTRIBUTOR in its constructor. + IInstance public immutable NEW_ROLLUP; + + /// @notice The freshly deployed v5 reward distributor; the recipient of the v4 distributor's funds. + IRewardDistributor public immutable NEW_REWARD_DISTRIBUTOR; + + /// @notice The v4 reward distributor in service before this proposal executes. + /// @dev Captured at construction by calling `REGISTRY.getRewardDistributor()`, so the address + /// tracks whatever the registry currently points to. If the registry pointer changes + /// after this payload is deployed and before it is executed, redeploy the payload. + address public immutable OLD_REWARD_DISTRIBUTOR; + + /// @notice The ERC20 distributed by both the old and new reward distributors. + IERC20 public immutable ASSET; + + /// @notice The escape hatch this payload activates on NEW_ROLLUP. + IEscapeHatch public immutable ESCAPE_HATCH; + + /// @notice The flush rewarder serving the old rollup; zero on chains that never wired one. + FlushRewarder public immutable OLD_FLUSH_REWARDER; + + /// @notice Flush rewarder for the v5 rollup, deployed by this constructor when + /// OLD_FLUSH_REWARDER is non-zero; mirrors its reward asset and reward-per-insertion. + FlushRewarder public immutable NEW_FLUSH_REWARDER; + + error EscapeHatchNotForNewRollup(address expectedRollup, address actualRollup); + error EscapeHatchAlreadySetOnNewRollup(address existingHatch); + + /** + * @notice Wire up the payload against a specific v5 rollup, v5 distributor, escape hatch, and + * the currently canonical v4 distributor. + * @dev `Rollup.setEscapeHatch` is one-shot: if governance executes this payload against a + * rollup whose hatch slot is already populated, the action reverts and there is no retry. + * Both escape-hatch preconditions are therefore checked here, at deploy time, when a + * misconfiguration can still be fixed by redeploying. + * @param _registry The registry whose pointers will be moved. + * @param _newRollup The v5 rollup instance. + * @param _newRewardDistributor The v5 reward distributor that v5 was constructed with. + * @param _asset The ERC20 to drain out of the old distributor. + * @param _escapeHatch The escape hatch to activate on the v5 rollup; must point back + * at `_newRollup`. + * @param _oldFlushRewarder The flush rewarder serving the old rollup, or zero on chains + * without one. + */ + constructor( + IRegistry _registry, + IInstance _newRollup, + IRewardDistributor _newRewardDistributor, + IERC20 _asset, + IEscapeHatch _escapeHatch, + FlushRewarder _oldFlushRewarder + ) { + address hatchRollup = _escapeHatch.getRollup(); + require(hatchRollup == address(_newRollup), EscapeHatchNotForNewRollup(address(_newRollup), hatchRollup)); + + address existingHatch = address(_newRollup.getEscapeHatch()); + require(existingHatch == address(0), EscapeHatchAlreadySetOnNewRollup(existingHatch)); + + REGISTRY = _registry; + NEW_ROLLUP = _newRollup; + NEW_REWARD_DISTRIBUTOR = _newRewardDistributor; + ASSET = _asset; + ESCAPE_HATCH = _escapeHatch; + OLD_REWARD_DISTRIBUTOR = address(_registry.getRewardDistributor()); + + OLD_FLUSH_REWARDER = _oldFlushRewarder; + NEW_FLUSH_REWARDER = address(_oldFlushRewarder) == address(0) + ? FlushRewarder(address(0)) + : new FlushRewarder( + _registry.getGovernance(), _newRollup, _oldFlushRewarder.REWARD_ASSET(), _oldFlushRewarder.rewardPerInsertion() + ); + } + + /** + * @notice The actions executed atomically when governance executes this payload: five on + * chains without a flush rewarder, six with the flush-rewarder migration appended. + * @dev The drain moves the v4 distributor's entire asset balance: its `recover` transfers the + * requested amount unconditionally. The balance is read at execution time, so the drain + * tracks whatever the v4 distributor holds when governance executes — not whatever it had + * at proposal time. The flush-rewarder migration likewise reads `rewardsAvailable()` at + * execution time, so rewards already owed to flushers are left claimable. + */ + function getActions() external view override(IPayload) returns (IPayload.Action[] memory) { + bool migrateFlushRewarder = address(OLD_FLUSH_REWARDER) != address(0); + IPayload.Action[] memory res = new IPayload.Action[](migrateFlushRewarder ? 6 : 5); + + uint256 drainAmount = ASSET.balanceOf(OLD_REWARD_DISTRIBUTOR); + + res[0] = Action({ + target: OLD_REWARD_DISTRIBUTOR, + data: abi.encodeWithSelector( + LEGACY_RECOVER_SELECTOR, address(ASSET), address(NEW_REWARD_DISTRIBUTOR), drainAmount + ) + }); + + res[1] = Action({ + target: address(REGISTRY), data: abi.encodeWithSelector(IRegistry.addRollup.selector, address(NEW_ROLLUP)) + }); + + res[2] = Action({ + target: address(REGISTRY), + data: abi.encodeWithSelector(IRegistry.updateRewardDistributor.selector, address(NEW_REWARD_DISTRIBUTOR)) + }); + + res[3] = Action({ + target: address(NEW_ROLLUP.getGSE()), + data: abi.encodeWithSelector(IGSECore.addRollup.selector, address(NEW_ROLLUP)) + }); + + res[4] = Action({ + target: address(NEW_ROLLUP), + data: abi.encodeWithSelector(IValidatorSelectionCore.setEscapeHatch.selector, address(ESCAPE_HATCH)) + }); + + if (migrateFlushRewarder) { + res[5] = Action({ + target: address(OLD_FLUSH_REWARDER), + data: abi.encodeWithSelector( + FlushRewarder.recover.selector, + address(NEW_FLUSH_REWARDER.REWARD_ASSET()), + address(NEW_FLUSH_REWARDER), + OLD_FLUSH_REWARDER.rewardsAvailable() + ) + }); + } + + return res; + } + + function getURI() external pure override(IPayload) returns (string memory) { + return "https://github.com/AztecProtocol/aztec-packages/pull/23752"; + } +} diff --git a/l1-contracts/test/Rollup.t.sol b/l1-contracts/test/Rollup.t.sol index dafbe7b9a5d3..9f578e8cefd7 100644 --- a/l1-contracts/test/Rollup.t.sol +++ b/l1-contracts/test/Rollup.t.sol @@ -12,7 +12,7 @@ import {Registry} from "@aztec/governance/Registry.sol"; import {Inbox} from "@aztec/core/messagebridge/Inbox.sol"; import {Outbox} from "@aztec/core/messagebridge/Outbox.sol"; import {Errors} from "@aztec/core/libraries/Errors.sol"; -import {ProposedHeader} from "@aztec/core/libraries/rollup/ProposedHeaderLib.sol"; +import {ProposedHeader, ProposedHeaderLib} from "@aztec/core/libraries/rollup/ProposedHeaderLib.sol"; import { IRollupCore, @@ -874,6 +874,47 @@ contract RollupTest is RollupBase { assertEq(outbox.getRootData(Epoch.wrap(0), 2), outHash2, "Root at K=2 should be outHash2"); } + // getEpochProofPublicInputs is the view that the prover-publisher calls off-chain to validate its inputs before + // submitting. Because the fee recipient/value public inputs are taken from the supplied headers, the header check + // must run here too - not only on the submit path - so a mismatch is caught before publishing rather than reverting + // on-chain. + function testGetEpochProofPublicInputsVerifiesHeaders() public setUpFor("empty_checkpoint_1") { + _proposeCheckpoint("empty_checkpoint_1", 1); + + DecoderBase.Data memory data = load("empty_checkpoint_1").checkpoint; + CheckpointLog memory checkpoint = rollup.getCheckpoint(0); + + PublicInputArgs memory args = PublicInputArgs({ + previousArchive: checkpoint.archive, endArchive: data.archive, outHash: data.header.outHash, proverId: address(0) + }); + + ProposedHeader[] memory headers = new ProposedHeader[](1); + headers[0] = proposedHeaders[1]; + + // With the canonical header, the getter assembles the public inputs, sourcing the fee recipient/value from the + // header. + bytes32[] memory publicInputs = rollup.getEpochProofPublicInputs(1, 1, args, headers, data.batchedBlobInputs); + assertEq(publicInputs.length, Constants.ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH, "Unexpected public inputs length"); + + uint256 feesOffset = 3 + Constants.MAX_CHECKPOINTS_PER_EPOCH; + assertEq( + publicInputs[feesOffset], bytes32(uint256(uint160(headers[0].coinbase))), "Coinbase not sourced from header" + ); + assertEq( + publicInputs[feesOffset + 1], bytes32(headers[0].accumulatedFees), "Accumulated fees not sourced from header" + ); + + // Tamper a fee field so the header no longer hashes to the stored value; the getter must reject it. + bytes32 expectedHeaderHash = ProposedHeaderLib.hash(headers[0]); + headers[0].accumulatedFees += 1; + bytes32 providedHeaderHash = ProposedHeaderLib.hash(headers[0]); + + vm.expectRevert( + abi.encodeWithSelector(Errors.Rollup__InvalidCheckpointHeader.selector, expectedHeaderHash, providedHeaderHash) + ); + rollup.getEpochProofPublicInputs(1, 1, args, headers, data.batchedBlobInputs); + } + function _submitEpochProof( uint256 _start, uint256 _end, diff --git a/l1-contracts/test/periphery/V5UpgradePayload.t.sol b/l1-contracts/test/periphery/V5UpgradePayload.t.sol new file mode 100644 index 000000000000..9635d0494ab1 --- /dev/null +++ b/l1-contracts/test/periphery/V5UpgradePayload.t.sol @@ -0,0 +1,302 @@ +// SPDX-License-Identifier: UNLICENSED +// solhint-disable comprehensive-interface +pragma solidity >=0.8.27; + +import {Test} from "forge-std/Test.sol"; + +import {IERC20} from "@oz/token/ERC20/IERC20.sol"; +import {Ownable} from "@oz/access/Ownable.sol"; +import {SafeERC20} from "@oz/token/ERC20/utils/SafeERC20.sol"; + +import {EscapeHatch} from "@aztec/core/EscapeHatch.sol"; +import {IEscapeHatch} from "@aztec/core/interfaces/IEscapeHatch.sol"; +import {IInstance} from "@aztec/core/interfaces/IInstance.sol"; +import {IValidatorSelectionCore} from "@aztec/core/interfaces/IValidatorSelection.sol"; +import {GSE, IGSECore} from "@aztec/governance/GSE.sol"; +import {IRegistry, IHaveVersion} from "@aztec/governance/interfaces/IRegistry.sol"; +import {IPayload} from "@aztec/governance/interfaces/IPayload.sol"; +import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol"; +import {Registry} from "@aztec/governance/Registry.sol"; +import {RewardDistributor} from "@aztec/governance/RewardDistributor.sol"; +import {TestERC20} from "@aztec/mock/TestERC20.sol"; +import {FlushRewarder} from "@aztec/periphery/FlushRewarder.sol"; + +import {V5UpgradePayload} from "@aztec/periphery/V5UpgradePayload.sol"; + +/// @notice Stand-in for the v4 RewardDistributor deployed on the live networks. +/// @dev Mirrors the exact surface the deployed v4 distributor exposes: an owner-gated 3-arg +/// `recover(asset, to, amount)` that transfers `amount` unconditionally (no drain ceiling), +/// plus `canonicalRollup`. The deployed distributor predates AZIP-2, so it has no +/// `aggregateDebt`/`availableTo` — and the payload must not depend on them. +contract LegacyRewardDistributorMock { + using SafeERC20 for IERC20; + + IERC20 public immutable ASSET; + IRegistry public immutable REGISTRY; + + constructor(IERC20 _asset, IRegistry _registry) { + ASSET = _asset; + REGISTRY = _registry; + } + + /// @notice The deployed v4 3-arg `recover(asset, to, amount)`: owner-gated on the registry + /// owner, transfers `amount` with no ceiling. + function recover(address _asset, address _to, uint256 _amount) external { + address owner = Ownable(address(REGISTRY)).owner(); + require(msg.sender == owner, "not gov"); + IERC20(_asset).safeTransfer(_to, _amount); + } + + function canonicalRollup() external view returns (address) { + return address(REGISTRY.getCanonicalRollup()); + } +} + +/// @notice Minimal `IInstance` substitute. The payload consults `getGSE()`, `getEscapeHatch()`, +/// and the version (which the GSE's bookkeeping reads via the `getVersion()` selector); +/// the `EscapeHatch` constructor reads `getProofSubmissionEpochs()`; and executing the +/// payload's final action calls `setEscapeHatch`, mimicked here with the production +/// one-shot semantics. +contract InstanceStub { + GSE internal immutable _gse; + bytes32 internal immutable _versionSalt; + address internal _escapeHatch; + + constructor(GSE __gse, bytes32 __versionSalt) { + _gse = __gse; + _versionSalt = __versionSalt; + } + + function getGSE() external view returns (GSE) { + return _gse; + } + + function getVersion() external view returns (uint256) { + return uint256(keccak256(abi.encodePacked(bytes("aztec_rollup"), block.chainid, _versionSalt, address(this)))); + } + + function getProofSubmissionEpochs() external pure returns (uint256) { + return 1; + } + + function setEscapeHatch(address __escapeHatch) external { + require(_escapeHatch == address(0), "hatch already set"); + _escapeHatch = __escapeHatch; + } + + function getEscapeHatch() external view returns (address) { + return _escapeHatch; + } +} + +/// @notice Stand-in for the v4 instance. Same surface, just kept under a separate type so the test +/// narrative reads cleanly. +contract V4InstanceStub is InstanceStub { + constructor(GSE __gse) InstanceStub(__gse, bytes32("v4")) {} +} + +contract V5InstanceStub is InstanceStub { + constructor(GSE __gse) InstanceStub(__gse, bytes32("v5")) {} +} + +contract V5UpgradePayloadTest is Test { + TestERC20 internal asset; + Registry internal registry; + GSE internal gse; + LegacyRewardDistributorMock internal oldRd; + RewardDistributor internal newRd; + V4InstanceStub internal v4Rollup; + V5InstanceStub internal v5Rollup; + IEscapeHatch internal escapeHatch; + FlushRewarder internal oldFlushRewarder; + V5UpgradePayload internal payload; + + address internal constant GOVERNANCE = address(uint160(uint256(keccak256("V5UpgradePayloadTest.GOVERNANCE")))); + uint256 internal constant LEGACY_BALANCE = 1000 ether; + uint256 internal constant FLUSH_BALANCE = 500 ether; + uint256 internal constant REWARD_PER_INSERTION = 100e18; + + function setUp() external { + asset = new TestERC20("Asset", "AST", address(this)); + + // Stand up a registry whose initial RD will be discarded in favor of a legacy-shaped one. + registry = new Registry(address(this), asset); + + // Stand-alone GSE so the InstanceStubs have something to advertise via getGSE(). + gse = new GSE(address(this), asset, 100e18, 50e18); + + v4Rollup = new V4InstanceStub(gse); + v5Rollup = new V5InstanceStub(gse); + + // Make v4 canonical via the Registry's deployer-owned phase. + registry.addRollup(IHaveVersion(address(v4Rollup))); + gse.addRollup(address(v4Rollup)); + + // Swap the registry's distributor pointer to the legacy mock and fund it. + oldRd = new LegacyRewardDistributorMock(asset, registry); + registry.updateRewardDistributor(address(oldRd)); + asset.mint(address(oldRd), LEGACY_BALANCE); + + // Deploy the v5 reward distributor. + newRd = new RewardDistributor(asset, registry); + + // Deploy the real escape hatch against the v5 stub. + escapeHatch = _deployEscapeHatch(address(v5Rollup)); + + // Deploy + fund the flush rewarder serving the v4 stub. + oldFlushRewarder = new FlushRewarder(GOVERNANCE, IInstance(address(v4Rollup)), asset, REWARD_PER_INSERTION); + asset.mint(address(oldFlushRewarder), FLUSH_BALANCE); + + // Hand the registry over to "governance" so subsequent admin calls require its authority. + registry.transferOwnership(GOVERNANCE); + gse.transferOwnership(GOVERNANCE); + + // Build the payload. Its constructor reads the registry to capture OLD_REWARD_DISTRIBUTOR + // and deploys the v5 flush rewarder. + payload = new V5UpgradePayload( + registry, IInstance(address(v5Rollup)), IRewardDistributor(address(newRd)), asset, escapeHatch, oldFlushRewarder + ); + } + + function _deployEscapeHatch(address _rollup) internal returns (IEscapeHatch) { + return IEscapeHatch( + address( + new EscapeHatch({ + _rollup: _rollup, + _bondToken: address(asset), + _bondSize: 100e18, + _withdrawalTax: 1e18, + _failedHatchPunishment: 5e18, + _frequency: 112, + _activeDuration: 2, + _lagInHatches: 1, + _proposingExitDelay: 30 days + }) + ) + ); + } + + function test_constructor_capturesOldDistributor() external view { + assertEq(payload.OLD_REWARD_DISTRIBUTOR(), address(oldRd)); + assertEq(address(payload.NEW_REWARD_DISTRIBUTOR()), address(newRd)); + assertEq(address(payload.NEW_ROLLUP()), address(v5Rollup)); + assertEq(address(payload.ASSET()), address(asset)); + assertEq(address(payload.REGISTRY()), address(registry)); + assertEq(address(payload.ESCAPE_HATCH()), address(escapeHatch)); + assertEq(address(payload.OLD_FLUSH_REWARDER()), address(oldFlushRewarder)); + } + + function test_constructor_deploysNewFlushRewarderMirroringOld() external view { + FlushRewarder newFlushRewarder = payload.NEW_FLUSH_REWARDER(); + assertTrue(address(newFlushRewarder) != address(0), "new flush rewarder should be deployed"); + assertEq(newFlushRewarder.owner(), GOVERNANCE, "owned by governance"); + assertEq(address(newFlushRewarder.ROLLUP()), address(v5Rollup), "bound to the v5 rollup"); + assertEq(address(newFlushRewarder.REWARD_ASSET()), address(asset), "same reward asset"); + assertEq(newFlushRewarder.rewardPerInsertion(), REWARD_PER_INSERTION, "same reward per insertion"); + } + + function test_constructor_skipsFlushRewarderWhenNoneSupplied() external { + V5InstanceStub freshRollup = new V5InstanceStub(gse); + IEscapeHatch freshHatch = _deployEscapeHatch(address(freshRollup)); + V5UpgradePayload noFlushPayload = new V5UpgradePayload( + registry, + IInstance(address(freshRollup)), + IRewardDistributor(address(newRd)), + asset, + freshHatch, + FlushRewarder(address(0)) + ); + + assertEq(address(noFlushPayload.NEW_FLUSH_REWARDER()), address(0), "no flush rewarder deployed"); + assertEq(noFlushPayload.getActions().length, 5, "no migration action appended"); + } + + function test_constructor_revertsWhenHatchPointsAtAnotherRollup() external { + IEscapeHatch foreignHatch = _deployEscapeHatch(address(v4Rollup)); + vm.expectRevert( + abi.encodeWithSelector(V5UpgradePayload.EscapeHatchNotForNewRollup.selector, address(v5Rollup), address(v4Rollup)) + ); + new V5UpgradePayload( + registry, IInstance(address(v5Rollup)), IRewardDistributor(address(newRd)), asset, foreignHatch, oldFlushRewarder + ); + } + + function test_constructor_revertsWhenHatchAlreadySet() external { + v5Rollup.setEscapeHatch(address(escapeHatch)); + vm.expectRevert( + abi.encodeWithSelector(V5UpgradePayload.EscapeHatchAlreadySetOnNewRollup.selector, address(escapeHatch)) + ); + new V5UpgradePayload( + registry, IInstance(address(v5Rollup)), IRewardDistributor(address(newRd)), asset, escapeHatch, oldFlushRewarder + ); + } + + function test_getActions_dataAndTargets() external view { + IPayload.Action[] memory actions = payload.getActions(); + assertEq(actions.length, 6); + + assertEq(actions[0].target, address(oldRd)); + bytes memory expectedDrain = + abi.encodeWithSelector(payload.LEGACY_RECOVER_SELECTOR(), address(asset), address(newRd), LEGACY_BALANCE); + assertEq(actions[0].data, expectedDrain); + + assertEq(actions[1].target, address(registry)); + assertEq(actions[1].data, abi.encodeWithSelector(IRegistry.addRollup.selector, address(v5Rollup))); + + assertEq(actions[2].target, address(registry)); + assertEq(actions[2].data, abi.encodeWithSelector(IRegistry.updateRewardDistributor.selector, address(newRd))); + + assertEq(actions[3].target, address(gse)); + assertEq(actions[3].data, abi.encodeWithSelector(IGSECore.addRollup.selector, address(v5Rollup))); + + assertEq(actions[4].target, address(v5Rollup)); + assertEq( + actions[4].data, abi.encodeWithSelector(IValidatorSelectionCore.setEscapeHatch.selector, address(escapeHatch)) + ); + + assertEq(actions[5].target, address(oldFlushRewarder)); + assertEq( + actions[5].data, + abi.encodeWithSelector( + FlushRewarder.recover.selector, address(asset), address(payload.NEW_FLUSH_REWARDER()), FLUSH_BALANCE + ) + ); + } + + function test_execute_drainsOldRdAndPromotesV5() external { + _executeAsGovernance(); + + assertEq(asset.balanceOf(address(oldRd)), 0, "old RD should be fully drained"); + assertEq(asset.balanceOf(address(newRd)), LEGACY_BALANCE, "new RD should hold the full legacy balance"); + assertEq(address(registry.getCanonicalRollup()), address(v5Rollup), "v5 should be canonical"); + assertEq(address(registry.getRewardDistributor()), address(newRd), "registry should point to new RD"); + assertEq(v5Rollup.getEscapeHatch(), address(escapeHatch), "v5 escape hatch should be activated"); + assertEq(oldFlushRewarder.rewardsAvailable(), 0, "old flush rewarder should have no rewards left"); + assertEq( + asset.balanceOf(address(payload.NEW_FLUSH_REWARDER())), + FLUSH_BALANCE, + "new flush rewarder should hold the migrated rewards" + ); + } + + function test_execute_revertsIfNotGovernance() external { + // Caller is this test contract, not governance, so the owner-gated legacy drain must fail. + IPayload.Action[] memory actions = payload.getActions(); + (bool success,) = actions[0].target.call(actions[0].data); + assertFalse(success, "drain should fail when caller is not governance"); + } + + function _executeAsGovernance() internal { + IPayload.Action[] memory actions = payload.getActions(); + vm.startPrank(GOVERNANCE); + for (uint256 i = 0; i < actions.length; i++) { + (bool success, bytes memory ret) = actions[i].target.call(actions[i].data); + require(success, _decodeError(i, ret)); + } + vm.stopPrank(); + } + + function _decodeError(uint256 _index, bytes memory _ret) internal pure returns (string memory) { + return string(abi.encodePacked("action ", vm.toString(_index), " failed: ", _ret)); + } +} diff --git a/l1-contracts/test/periphery/V5UpgradePayloadFork.t.sol b/l1-contracts/test/periphery/V5UpgradePayloadFork.t.sol new file mode 100644 index 000000000000..c9a28a05767b --- /dev/null +++ b/l1-contracts/test/periphery/V5UpgradePayloadFork.t.sol @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: UNLICENSED +// solhint-disable comprehensive-interface +// solhint-disable no-console +pragma solidity >=0.8.27; + +import {Test, console} from "forge-std/Test.sol"; +import {Vm} from "forge-std/Vm.sol"; + +import {IERC20} from "@oz/token/ERC20/IERC20.sol"; + +import {EscapeHatch} from "@aztec/core/EscapeHatch.sol"; +import {IEscapeHatch} from "@aztec/core/interfaces/IEscapeHatch.sol"; +import {IInstance} from "@aztec/core/interfaces/IInstance.sol"; +import {IRollup} from "@aztec/core/interfaces/IRollup.sol"; +import {IStaking} from "@aztec/core/interfaces/IStaking.sol"; +import {GSE} from "@aztec/governance/GSE.sol"; +import {IPayload} from "@aztec/governance/interfaces/IPayload.sol"; +import {IRegistry} from "@aztec/governance/interfaces/IRegistry.sol"; +import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol"; +import {RewardDistributor} from "@aztec/governance/RewardDistributor.sol"; + +import {FlushRewarder} from "@aztec/periphery/FlushRewarder.sol"; +import {V5UpgradePayload} from "@aztec/periphery/V5UpgradePayload.sol"; + +/// @notice Minimal stand-in for the v5 rollup. The live Registry reads only `getVersion()` from a +/// rollup it adds, the live GSE reads nothing from it, and the payload reads `getGSE()` +/// and the escape-hatch surface — so a stub is behaviourally equivalent to a production +/// rollup for the five governance actions, without dragging in the full rollup deployment +/// + its env config. `setEscapeHatch` mimics the production one-shot semantics. +contract RollupStub { + GSE internal immutable GSE_; + address internal escapeHatch; + + constructor(GSE _gse) { + GSE_ = _gse; + } + + function getGSE() external view returns (GSE) { + return GSE_; + } + + /// @dev Unique per deployment so `Registry.addRollup` never collides with a registered version. + function getVersion() external view returns (uint256) { + return uint256(keccak256(abi.encodePacked("V5UpgradePayloadFork", address(this)))); + } + + /// @dev Read by the `EscapeHatch` constructor to validate its active duration. + function getProofSubmissionEpochs() external pure returns (uint256) { + return 1; + } + + function setEscapeHatch(address _escapeHatch) external { + require(escapeHatch == address(0), "hatch already set"); + escapeHatch = _escapeHatch; + } + + function getEscapeHatch() external view returns (address) { + return escapeHatch; + } +} + +/// @notice Forks a live network and runs the full V5 upgrade proposal against its real registry, +/// GSE, governance, and v4 RewardDistributor — exactly the actions +/// `Governance.execute()` would run — then asserts the resulting on-chain state. +/// +/// Every address other than the registry is discovered from the registry on-chain, so a subclass +/// only supplies its network's registry, RPC env var, and a flush rewarder to migrate — either the +/// live one or, on a network that never wired one, a freshly deployed and funded rewarder so the +/// migration branch is still exercised. Tests self-skip when the RPC env var is unset, keeping the +/// suite green offline. +/// +/// Set `PAYLOAD=0x...` to simulate an already-deployed payload (from DeployRollupForUpgradeV5) +/// instead of an ephemeral one; the assertions are identical. +abstract contract V5UpgradePayloadForkBase is Test { + IRegistry internal registry; + address internal oldRd; + address internal governance; + GSE internal gse; + IERC20 internal feeAsset; + + /// @notice The flush rewarder serving the v4 rollup that this upgrade migrates, or zero on a + /// network with none. Resolved once in `setUp`: a network that wired its own returns + /// that live address; a network that never did deploys and funds one so the migration + /// branch is still exercised. + address internal oldFlushRewarder; + + bool internal forked; + + /// @return The env var holding this network's archive RPC URL. + function _rpcEnvVar() internal pure virtual returns (string memory); + + /// @return This network's live v4 Registry. + function _registry() internal pure virtual returns (address); + + /// @notice Resolves the flush rewarder serving this network's v4 rollup. Called once from + /// `setUp`, after the registry-derived addresses (`governance`, `feeAsset`, the v4 + /// rollup) are populated, so an implementation may deploy and fund a rewarder against + /// live state. + /// @return The old flush rewarder to migrate, or zero if this network has none. + function _setUpOldFlushRewarder() internal virtual returns (address); + + /// @return The fork block, or 0 to fork at the chain head. + function _forkBlock() internal pure virtual returns (uint256); + + function setUp() external { + string memory rpc = vm.envOr(_rpcEnvVar(), string("")); + if (bytes(rpc).length == 0) { + return; + } + uint256 forkBlock = _forkBlock(); + if (forkBlock == 0) { + vm.createSelectFork(rpc); + } else { + vm.createSelectFork(rpc, forkBlock); + } + forked = true; + + registry = IRegistry(_registry()); + oldRd = address(registry.getRewardDistributor()); + governance = registry.getGovernance(); + IStaking v4 = IStaking(address(registry.getCanonicalRollup())); + gse = v4.getGSE(); + feeAsset = IRollup(address(v4)).getFeeAsset(); + + oldFlushRewarder = _setUpOldFlushRewarder(); + } + + /// @notice Documents the interface mismatch that makes the deployed v4 distributor the binding + /// constraint: it predates AZIP-2, exposing the unconstrained 3-arg `recover` but + /// neither `aggregateDebt()` nor `availableTo()`. + function test_liveV4Distributor_isPreAZIP2() external { + if (!forked) { + vm.skip(true); + return; + } + + (bool okAsset, bytes memory assetRet) = oldRd.staticcall(abi.encodeWithSignature("ASSET()")); + assertTrue(okAsset, "v4 distributor exposes ASSET()"); + assertEq(abi.decode(assetRet, (address)), address(feeAsset), "v4 distributor asset is the fee asset"); + + (bool okCanon,) = oldRd.staticcall(abi.encodeWithSignature("canonicalRollup()")); + assertTrue(okCanon, "v4 distributor exposes canonicalRollup()"); + + (bool okDebt,) = oldRd.staticcall(abi.encodeWithSignature("aggregateDebt()")); + assertFalse(okDebt, "v4 distributor must NOT expose aggregateDebt() -- the payload cannot rely on it"); + + (bool okAvail,) = oldRd.staticcall(abi.encodeWithSignature("availableTo(address)", oldRd)); + assertFalse(okAvail, "v4 distributor must NOT expose availableTo() -- no drain ceiling exists"); + } + + /// @notice Builds the proposal and executes every action as governance against live state, + /// then asserts the canonical rollup, reward distributor, GSE registration, the + /// drained balances, the activated escape hatch, and the flush-rewarder migration. + function test_fullyExecutePayload() external { + if (!forked) { + vm.skip(true); + return; + } + + (V5UpgradePayload payload, address newRollup, address newRd) = _resolvePayload(); + assertEq(payload.OLD_REWARD_DISTRIBUTOR(), oldRd, "payload captured the live v4 distributor"); + assertEq(payload.ESCAPE_HATCH().getRollup(), newRollup, "hatch points at the new rollup"); + assertEq(address(payload.OLD_FLUSH_REWARDER()), oldFlushRewarder, "payload wired to the live flush rewarder"); + + // Pre-state. + uint256 oldBalancePre = feeAsset.balanceOf(oldRd); + uint256 newBalancePre = feeAsset.balanceOf(newRd); + uint256 flushAvailablePre = 0; + if (oldFlushRewarder != address(0)) { + flushAvailablePre = FlushRewarder(oldFlushRewarder).rewardsAvailable(); + } + assertFalse(gse.isRollupRegistered(newRollup), "new rollup not yet in GSE"); + assertTrue(address(registry.getCanonicalRollup()) != newRollup, "new rollup not yet canonical"); + + console.log("network registry: ", address(registry)); + console.log("v4 distributor: ", oldRd); + console.log("drain amount: ", oldBalancePre); + + // Execute every action exactly as Governance.execute() would. + IPayload.Action[] memory actions = payload.getActions(); + assertEq(actions.length, oldFlushRewarder == address(0) ? 5 : 6, "action count"); + for (uint256 i = 0; i < actions.length; i++) { + vm.startStateDiffRecording(); + vm.prank(governance); + (bool ok, bytes memory ret) = actions[i].target.call(actions[i].data); + if (!ok) { + console.log("action reverted:", i, actions[i].target); + console.logBytes(ret); + revert("action call failed"); + } + _logWrites(i, vm.stopAndReturnStateDiff()); + } + + // Post-conditions. + assertEq(address(registry.getCanonicalRollup()), newRollup, "v5 rollup is canonical"); + assertEq(address(registry.getRewardDistributor()), newRd, "registry points at the v5 distributor"); + assertTrue(gse.isRollupRegistered(newRollup), "v5 rollup registered with GSE"); + assertEq(feeAsset.balanceOf(oldRd), 0, "v4 distributor fully drained"); + assertEq(feeAsset.balanceOf(newRd) - newBalancePre, oldBalancePre, "v5 distributor received the full drain"); + assertEq( + RollupStub(newRollup).getEscapeHatch(), address(payload.ESCAPE_HATCH()), "escape hatch activated on v5 rollup" + ); + if (oldFlushRewarder != address(0)) { + FlushRewarder newFlushRewarder = payload.NEW_FLUSH_REWARDER(); + assertEq(FlushRewarder(oldFlushRewarder).rewardsAvailable(), 0, "old flush rewarder has no rewards left"); + assertEq( + newFlushRewarder.REWARD_ASSET().balanceOf(address(newFlushRewarder)), + flushAvailablePre, + "new flush rewarder received the available rewards" + ); + assertEq(address(newFlushRewarder.ROLLUP()), newRollup, "new flush rewarder bound to the v5 rollup"); + assertEq(newFlushRewarder.owner(), governance, "new flush rewarder owned by governance"); + console.log("flush rewards migrated: ", flushAvailablePre); + } + + console.log("v5 distributor balance after drain:", feeAsset.balanceOf(newRd)); + } + + /// @dev Uses a `PAYLOAD` env override when present, else deploys an ephemeral payload wired to a + /// fresh v5 distributor, a rollup stub, and an escape hatch for that stub. + function _resolvePayload() internal returns (V5UpgradePayload payload, address newRollup, address newRd) { + address provided = vm.envOr("PAYLOAD", address(0)); + if (provided != address(0)) { + payload = V5UpgradePayload(provided); + newRollup = address(payload.NEW_ROLLUP()); + newRd = address(payload.NEW_REWARD_DISTRIBUTOR()); + console.log("using deployed payload:", provided); + return (payload, newRollup, newRd); + } + + newRd = address(new RewardDistributor(feeAsset, registry)); + newRollup = address(new RollupStub(gse)); + IEscapeHatch hatch = IEscapeHatch( + address( + new EscapeHatch({ + _rollup: newRollup, + _bondToken: address(feeAsset), + _bondSize: 100e18, + _withdrawalTax: 1e18, + _failedHatchPunishment: 5e18, + _frequency: 112, + _activeDuration: 2, + _lagInHatches: 1, + _proposingExitDelay: 30 days + }) + ) + ); + payload = new V5UpgradePayload( + registry, IInstance(newRollup), IRewardDistributor(newRd), feeAsset, hatch, FlushRewarder(oldFlushRewarder) + ); + console.log("deployed ephemeral payload:", address(payload)); + } + + function _logWrites(uint256 _action, Vm.AccountAccess[] memory _accesses) internal pure { + for (uint256 i = 0; i < _accesses.length; i++) { + uint256 writes = 0; + for (uint256 j = 0; j < _accesses[i].storageAccesses.length; j++) { + if (_accesses[i].storageAccesses[j].isWrite && !_accesses[i].storageAccesses[j].reverted) { + writes++; + } + } + if (writes > 0) { + console.log(" action", _action, "wrote to", _accesses[i].account); + } + } + } +} + +/// @notice Sepolia testnet (registry 0xa0bf...c6ba). Run with: +/// SEPOLIA_RPC_URL= forge test --match-contract V5UpgradePayloadSepoliaForkTest -vv +contract V5UpgradePayloadSepoliaForkTest is V5UpgradePayloadForkBase { + /// @dev Funds the deployed flush rewarder, and so the amount the migration moves into the v5 + /// flush rewarder. + uint256 internal constant FLUSH_REWARDER_FUNDING = 1000e18; + uint256 internal constant FLUSH_REWARD_PER_INSERTION = 1e18; + + function _rpcEnvVar() internal pure override returns (string memory) { + return "SEPOLIA_RPC_URL"; + } + + function _registry() internal pure override returns (address) { + return 0xA0BFb1B494FB49041e5c6e8c2C1BE09cD171c6Ba; + } + + /// @dev Sepolia's live rollup adoptions never wired a flush rewarder, so deploy one bound to the + /// v4 rollup and owned by governance (the only caller allowed to `recover`), then fund it + /// with the fee asset. This exercises the payload's flush-rewarder migration branch end to + /// end against live Sepolia state. + function _setUpOldFlushRewarder() internal override returns (address) { + FlushRewarder rewarder = new FlushRewarder( + governance, IInstance(address(registry.getCanonicalRollup())), feeAsset, FLUSH_REWARD_PER_INSERTION + ); + deal(address(feeAsset), address(rewarder), FLUSH_REWARDER_FUNDING); + return address(rewarder); + } + + function _forkBlock() internal pure override returns (uint256) { + return 10_989_654; + } +} + +/// @notice Ethereum mainnet (registry 0x35b2...e298). Run with: +/// MAINNET_RPC_URL= forge test --match-contract V5UpgradePayloadMainnetForkTest -vv +contract V5UpgradePayloadMainnetForkTest is V5UpgradePayloadForkBase { + function _rpcEnvVar() internal pure override returns (string memory) { + return "MAINNET_RPC_URL"; + } + + function _registry() internal pure override returns (address) { + return 0x35b22e09Ee0390539439E24f06Da43D83f90e298; + } + + /// @dev Deployed by the v4 AlphaPayload constructor; holds the entry-queue flush incentive + /// funds (governance proposal 2's `FlushRewarder.recover` action targeted its + /// predecessor and funded this one). + function _setUpOldFlushRewarder() internal pure override returns (address) { + return 0xf1AcfB0C6ADd7104e700b8FAd3Ea025dbB041F34; + } + + function _forkBlock() internal pure override returns (uint256) { + return 25_245_893; + } +} diff --git a/noir-projects/aztec-nr/CLAUDE.md b/noir-projects/aztec-nr/CLAUDE.md index a16864f2677e..975f709899d1 100644 --- a/noir-projects/aztec-nr/CLAUDE.md +++ b/noir-projects/aztec-nr/CLAUDE.md @@ -34,6 +34,36 @@ Follow the Rust stdlib style roughly. See `PublicImmutable` in `state_vars/publi - **Show practical patterns in examples.** Don't just show the API call — show it in context (e.g. inside a `#[external("public")]` function with realistic variable names). - **Document cost for methods.** When relevant, note which AVM opcodes are invoked and how many times (e.g. "`SLOAD` is invoked a number of times equal to `T`'s packed length"). +### Brevity and attitude + +Write for a caller using the API, not for an implementor or an auditor. State what the item does and any restriction a caller must respect, plus the alternative to reach for — then stop. Leave out the internal mechanism and the security rationale behind a restriction: those belong in code comments messages or design docs, not the rustdoc. A reader who hits a restriction needs to know it exists and where to go next, not the argument for why it holds. + +- **State the restriction, not the reason it's sound.** Say "this can only be used for X", not the multi-sentence explanation of what goes wrong otherwise. +- **Don't narrate the mechanism.** Key siloing, tree layouts, hash preimages, and similar internals are implementation detail; mention them only when a caller cannot use the API correctly without knowing (and then put them under `## Implementation Details`). +- **Point to the alternative instead of enumerating trade-offs.** A single "use `[other_fn]` for the other case" beats a paragraph weighing options. + +Example — documenting a helper that only works on the executing contract's own notes: + +```rust +// Too much: explains the key-siloing mechanism and the failure the guard prevents. +/// The note's nullifier is recomputed using the executing contract's app-siloed nullifier key +/// and then siloed with `confirmed_note.contract_address`. These only agree for the executing +/// contract's own notes; otherwise the non-inclusion proof passes unconditionally and wrongly +/// reports a nullified note as not nullified, so this asserts that +/// `confirmed_note.contract_address == context.this_address()`. + +// Right: states the restriction and the alternative, nothing more. +/// ## Local notes only +/// +/// This can only be used for notes of the executing contract. Use [`assert_note_existed_by`] to +/// prove existence of another contract's notes. +``` + +## Testing + +- **No messages on assertions inside tests.** Write `assert_eq(actual, expected)` and `assert(cond)`, not `assert_eq(actual, expected, "values should match")`. The test's name and body already make clear what is being checked, so an assertion message is redundant noise. (Library code is the opposite: an `assert`/`panic` there must carry a message, since it explains a runtime failure to a contract developer.) +- `#[test(should_fail_with = "...")]` is not an assertion message and is encouraged. The string matches a substring of the expected failure, pinning down *which* error the failing case must produce so the test can't pass for the wrong reason. + ## Logging - **Always use the prefixed logging functions** from `crate::logging` (e.g. `logging::aztecnr_debug_log!`, `logging::aztecnr_debug_log_format!`). These automatically prepend `[aztec-nr] ` to all messages at compile time. diff --git a/noir-projects/aztec-nr/aztec/src/context/private_context.nr b/noir-projects/aztec-nr/aztec/src/context/private_context.nr index 90f323b3a71d..4fae5889659f 100644 --- a/noir-projects/aztec-nr/aztec/src/context/private_context.nr +++ b/noir-projects/aztec-nr/aztec/src/context/private_context.nr @@ -538,11 +538,22 @@ impl PrivateContext { /// Only one contract per transaction can declare itself as the fee payer, and it must have sufficient fee-juice /// balance (>= the gas limits specified in the TxContext) by the time we reach the public setup phase of the tx. /// + /// The fee payer must be elected during the setup (non-revertible) phase, i.e. before + /// [`end_setup`](PrivateContext::end_setup) is called - this function asserts so. This is because any compensation + /// collected by the fee payer during the revertible phase can be discarded if a public call later reverts, while + /// the protocol still debits the fee payer's fee-juice balance. Note that `end_setup` does not need to be called + /// by the electing function itself: it can be called later in the transaction (e.g. by the fee-juice contract when + /// claiming fee juice that pays for the very same transaction). pub fn set_as_fee_payer(&mut self) { + assert(!self.in_revertible_phase(), "fee payer must be elected during the setup phase"); aztecnr_trace_log_format!("Setting {0} as fee payer")([self.this_address().to_field()]); self.is_fee_payer = true; } + /// Returns whether execution is currently in the revertible (app) phase of the transaction. + /// + /// A transaction is in the revertible phase if [`end_setup`](PrivateContext::end_setup) has already been called - + /// potentially by a different function of the same transaction. pub fn in_revertible_phase(&mut self) -> bool { let current_counter = self.side_effect_counter; @@ -869,14 +880,20 @@ impl PrivateContext { /// /// # Arguments /// * `content` - The message content that was sent from L1 - /// * `secret` - Secret value used for message privacy (if needed) + /// * `secret` - Secret fields used for message privacy (if needed) /// * `sender` - Ethereum address that sent the message /// * `leaf_index` - Index of the message in the L1-to-L2 message tree /// /// # Advanced /// Validates message existence in the L1-to-L2 message tree and nullifies the message to prevent /// double-consumption. - pub fn consume_l1_to_l2_message(&mut self, content: Field, secret: Field, sender: EthAddress, leaf_index: Field) { + pub fn consume_l1_to_l2_message( + &mut self, + content: Field, + secret: [Field; N], + sender: EthAddress, + leaf_index: Field, + ) { let nullifier = process_l1_to_l2_message( self.anchor_block_header.state.l1_to_l2_message_tree.root, self.this_address(), diff --git a/noir-projects/aztec-nr/aztec/src/context/public_context.nr b/noir-projects/aztec-nr/aztec/src/context/public_context.nr index b189a673e0b9..af92b7aef528 100644 --- a/noir-projects/aztec-nr/aztec/src/context/public_context.nr +++ b/noir-projects/aztec-nr/aztec/src/context/public_context.nr @@ -226,7 +226,7 @@ impl PublicContext { /// /// # Arguments /// * `content` - The message content that was sent from L1 - /// * `secret` - Secret value used for message privacy (if needed) + /// * `secret` - Secret fields used for message privacy (if needed) /// * `sender` - Ethereum address that sent the message /// * `leaf_index` - Index of the message in the L1-to-L2 message tree /// @@ -236,7 +236,13 @@ impl PublicContext { /// * Message hash is computed from all parameters + chain context /// * Will revert if message doesn't exist or was already consumed /// - pub fn consume_l1_to_l2_message(self: Self, content: Field, secret: Field, sender: EthAddress, leaf_index: Field) { + pub fn consume_l1_to_l2_message( + self: Self, + content: Field, + secret: [Field; N], + sender: EthAddress, + leaf_index: Field, + ) { let secret_hash = compute_secret_hash(secret); let message_hash = compute_l1_to_l2_message_hash( sender, diff --git a/noir-projects/aztec-nr/aztec/src/hash.nr b/noir-projects/aztec-nr/aztec/src/hash.nr index b3ccc20e8c72..aee5b25b6e44 100644 --- a/noir-projects/aztec-nr/aztec/src/hash.nr +++ b/noir-projects/aztec-nr/aztec/src/hash.nr @@ -12,8 +12,8 @@ use crate::protocol::{ pub use crate::protocol::hash::compute_siloed_nullifier; -pub fn compute_secret_hash(secret: Field) -> Field { - poseidon2_hash_with_separator([secret], DOM_SEP__SECRET_HASH) +pub fn compute_secret_hash(secret: [Field; N]) -> Field { + poseidon2_hash_with_separator(secret, DOM_SEP__SECRET_HASH) } pub fn compute_l1_to_l2_message_hash( @@ -47,9 +47,9 @@ pub fn compute_l1_to_l2_message_hash( sha256_to_field(hash_bytes) } -// The nullifier of a l1 to l2 message is the hash of the message salted with the secret -pub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: Field) -> Field { - poseidon2_hash_with_separator([message_hash, secret], DOM_SEP__MESSAGE_NULLIFIER) +// The nullifier of an l1 to l2 message is the hash of the message salted with the secret. +pub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: [Field; N]) -> Field { + poseidon2_hash_with_separator([message_hash].concat(secret), DOM_SEP__MESSAGE_NULLIFIER) } // Computes the hash of input arguments or return values for private functions, or for authwit creation. @@ -96,7 +96,7 @@ pub fn compute_public_bytecode_commitment( #[test] unconstrained fn secret_hash_matches_typescript() { let secret = 8; - let hash = compute_secret_hash(secret); + let hash = compute_secret_hash([secret]); // The following value was generated by `yarn-project/stdlib/src/hash/hash.test.ts` let secret_hash_from_ts = 0x1848b066724ab0ffb50ecb0ee3398eb839f162823d262bad959721a9c13d1e96; diff --git a/noir-projects/aztec-nr/aztec/src/history/note.nr b/noir-projects/aztec-nr/aztec/src/history/note.nr index 796f3f31e745..d24c76f1137b 100644 --- a/noir-projects/aztec-nr/aztec/src/history/note.nr +++ b/noir-projects/aztec-nr/aztec/src/history/note.nr @@ -15,6 +15,19 @@ use crate::{ mod test; +/// Asserts that a note existed in the note hash tree by the time a block was mined. +/// +/// Proves note inclusion at `block_header` by checking membership of the note's unique note hash, and returns a +/// [`ConfirmedNote`] describing it. +/// +/// ## Cross-contract notes +/// +/// Unlike the nullification helpers, this works for notes of **any** contract, not just the executing one: note hashes +/// are siloed with the note's own contract address (carried by the [`HintedNote`]) and no secret keys are involved. +/// +/// To reason about whether such a note has been nullified, see [`assert_local_note_was_nullified_by`] and +/// [`assert_local_note_was_not_nullified_by`], which — in contrast — can only be used for the executing contract's own +/// notes. pub fn assert_note_existed_by(block_header: BlockHeader, hinted_note: HintedNote) -> ConfirmedNote where Note: NoteHash, @@ -46,7 +59,17 @@ where ConfirmedNote::new(hinted_note, unique_note_hash) } -pub fn assert_note_was_valid_by( +/// Asserts a note existed and had not yet been nullified by a given block. +/// +/// Combines [`assert_note_existed_by`] and [`assert_local_note_was_not_nullified_by`]: it proves both that the note +/// existed at `block_header` and that it had not been nullified then. A contract typically uses this as a security gate +/// before acting on a note whose validity at some past block matters. +/// +/// ## Local notes only +/// +/// Like [`assert_local_note_was_not_nullified_by`], this can only be used for notes of the executing contract. Use +/// [`assert_note_existed_by`] on its own to prove existence of another contract's notes. +pub fn assert_local_note_was_valid_by( block_header: BlockHeader, hinted_note: HintedNote, context: &mut PrivateContext, @@ -55,10 +78,16 @@ where Note: NoteHash, { let confirmed_note = assert_note_existed_by(block_header, hinted_note); - assert_note_was_not_nullified_by(block_header, confirmed_note, context); + assert_local_note_was_not_nullified_by(block_header, confirmed_note, context); } -pub fn assert_note_was_nullified_by( +/// Asserts a note had been nullified by a given block. +/// +/// ## Local notes only +/// +/// This can only be used for notes of the executing contract. Use [`assert_note_existed_by`] on its own to prove +/// existence of another contract's notes. +pub fn assert_local_note_was_nullified_by( block_header: BlockHeader, confirmed_note: ConfirmedNote, context: &mut PrivateContext, @@ -66,6 +95,11 @@ pub fn assert_note_was_nullified_by( where Note: NoteHash, { + assert( + confirmed_note.contract_address == context.this_address(), + "Note nullification history is only supported for the executing contract's own notes", + ); + let note_hash_for_nullification = compute_confirmed_note_hash_for_nullification(confirmed_note); let inner_nullifier = confirmed_note.note.compute_nullifier(context, confirmed_note.owner, note_hash_for_nullification); @@ -75,7 +109,13 @@ where assert_nullifier_existed_by(block_header, siloed_nullifier); } -pub fn assert_note_was_not_nullified_by( +/// Asserts a note had **not** been nullified by a given block. +/// +/// ## Local notes only +/// +/// This can only be used for notes of the executing contract. Use [`assert_note_existed_by`] on its own to prove +/// existence of another contract's notes. +pub fn assert_local_note_was_not_nullified_by( block_header: BlockHeader, confirmed_note: ConfirmedNote, context: &mut PrivateContext, @@ -83,6 +123,11 @@ pub fn assert_note_was_not_nullified_by( where Note: NoteHash, { + assert( + confirmed_note.contract_address == context.this_address(), + "Note nullification history is only supported for the executing contract's own notes", + ); + let note_hash_for_nullification = compute_confirmed_note_hash_for_nullification(confirmed_note); let inner_nullifier = diff --git a/noir-projects/aztec-nr/aztec/src/history/note/test.nr b/noir-projects/aztec-nr/aztec/src/history/note/test.nr index b41f31f7490e..b11a7508b41b 100644 --- a/noir-projects/aztec-nr/aztec/src/history/note/test.nr +++ b/noir-projects/aztec-nr/aztec/src/history/note/test.nr @@ -1,6 +1,15 @@ -use crate::history::{note::{assert_note_existed_by, assert_note_was_valid_by}, test}; +use crate::history::{ + note::{ + assert_local_note_was_not_nullified_by, assert_local_note_was_nullified_by, assert_local_note_was_valid_by, + assert_note_existed_by, + }, + test, +}; +use crate::note::ConfirmedNote; +use crate::protocol::{address::AztecAddress, traits::{FromField, ToField}}; use crate::test::helpers::test_environment::PrivateContextOptions; +use crate::test::mocks::mock_note::MockNote; #[test] unconstrained fn succeeds_on_blocks_after_note_creation() { @@ -28,7 +37,7 @@ unconstrained fn validity_fails_on_blocks_before_note_creation() { env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_CREATED_AT - 1), |context| { let header = context.anchor_block_header; - assert_note_was_valid_by(header, hinted_note, context); + assert_local_note_was_valid_by(header, hinted_note, context); }); } @@ -38,7 +47,7 @@ unconstrained fn succeeds_on_blocks_after_creation_and_before_nullification() { env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_CREATED_AT), |context| { let header = context.anchor_block_header; - assert_note_was_valid_by(header, hinted_note, context); + assert_local_note_was_valid_by(header, hinted_note, context); }); } @@ -48,6 +57,47 @@ unconstrained fn fails_on_blocks_after_note_nullification() { env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_NULLIFIED_AT), |context| { let header = context.anchor_block_header; - assert_note_was_valid_by(header, hinted_note, context); + assert_local_note_was_valid_by(header, hinted_note, context); + }); +} + +unconstrained fn foreign_hinted_note(executing_contract: AztecAddress) -> crate::note::HintedNote { + let foreign_contract = AztecAddress::from_field(executing_contract.to_field() + 1); + MockNote::new(69).contract_address(foreign_contract).build_hinted_note() +} + +#[test(should_fail_with = "only supported for the executing contract's own notes")] +unconstrained fn validity_fails_for_foreign_contract_note() { + let (env, hinted_note) = test::create_note(); + let executing_contract = AztecAddress::from_field(hinted_note.contract_address.to_field() + 1); + + let opts = PrivateContextOptions::new().at_anchor_block_number(test::NOTE_CREATED_AT).at_contract_address( + executing_contract, + ); + env.private_context_opts(opts, |context| { + let header = context.anchor_block_header; + assert_local_note_was_valid_by(header, hinted_note, context); + }); +} + +#[test(should_fail_with = "only supported for the executing contract's own notes")] +unconstrained fn nullified_fails_for_foreign_contract_note() { + let (env, _) = test::create_note(); + + env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_CREATED_AT), |context| { + let header = context.anchor_block_header; + let foreign_note = ConfirmedNote::new(foreign_hinted_note(context.this_address()), 0); + assert_local_note_was_nullified_by(header, foreign_note, context); + }); +} + +#[test(should_fail_with = "only supported for the executing contract's own notes")] +unconstrained fn not_nullified_fails_for_foreign_contract_note() { + let (env, _) = test::create_note(); + + env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_CREATED_AT), |context| { + let header = context.anchor_block_header; + let foreign_note = ConfirmedNote::new(foreign_hinted_note(context.this_address()), 0); + assert_local_note_was_not_nullified_by(header, foreign_note, context); }); } diff --git a/noir-projects/aztec-nr/aztec/src/history/nullifier/test.nr b/noir-projects/aztec-nr/aztec/src/history/nullifier/test.nr index a83e216854b3..7a61bb34f717 100644 --- a/noir-projects/aztec-nr/aztec/src/history/nullifier/test.nr +++ b/noir-projects/aztec-nr/aztec/src/history/nullifier/test.nr @@ -1,5 +1,5 @@ use crate::history::{ - note::{assert_note_existed_by, assert_note_was_not_nullified_by, assert_note_was_nullified_by}, + note::{assert_local_note_was_not_nullified_by, assert_local_note_was_nullified_by, assert_note_existed_by}, nullifier::{assert_nullifier_did_not_exist_by, assert_nullifier_existed_by}, test, }; @@ -14,7 +14,7 @@ unconstrained fn note_is_nullified_succeeds_on_blocks_after_note_nullification() env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_NULLIFIED_AT), |context| { let header = context.anchor_block_header; let confirmed_note = assert_note_existed_by(header, hinted_note); - assert_note_was_nullified_by(header, confirmed_note, context); + assert_local_note_was_nullified_by(header, confirmed_note, context); }); } @@ -27,7 +27,7 @@ unconstrained fn note_is_nullified_fails_on_blocks_before_note_nullification() { |context| { let header = context.anchor_block_header; let confirmed_note = assert_note_existed_by(header, hinted_note); - assert_note_was_nullified_by(header, confirmed_note, context); + assert_local_note_was_nullified_by(header, confirmed_note, context); }, ); } @@ -74,7 +74,7 @@ unconstrained fn note_not_nullified_succeeds_in_blocks_before_note_nullification |context| { let header = context.anchor_block_header; let confirmed_note = assert_note_existed_by(header, hinted_note); - assert_note_was_not_nullified_by(header, confirmed_note, context); + assert_local_note_was_not_nullified_by(header, confirmed_note, context); }, ); } @@ -86,7 +86,7 @@ unconstrained fn note_not_nullified_fails_in_blocks_after_note_nullification_fai env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(test::NOTE_NULLIFIED_AT), |context| { let header = context.anchor_block_header; let confirmed_note = assert_note_existed_by(header, hinted_note); - assert_note_was_not_nullified_by(header, confirmed_note, context); + assert_local_note_was_not_nullified_by(header, confirmed_note, context); }); } diff --git a/noir-projects/aztec-nr/aztec/src/keys/ephemeral.nr b/noir-projects/aztec-nr/aztec/src/keys/ephemeral.nr index d0947c61d281..3afaced71e51 100644 --- a/noir-projects/aztec-nr/aztec/src/keys/ephemeral.nr +++ b/noir-projects/aztec-nr/aztec/src/keys/ephemeral.nr @@ -37,6 +37,9 @@ pub fn generate_positive_ephemeral_key_pair() -> (Scalar, EmbeddedCurvePoint) { let eph_sk = unsafe { generate_secret_key_for_positive_public_key() }; let eph_pk = fixed_base_scalar_mul(eph_sk); + // The point at infinity has x = 0, which is not a valid x-coordinate on the curve, so the recipient could + // never reconstruct the key from it and the message would be undecryptable. + assert(!eph_pk.is_infinite(), "Ephemeral public key is the point at infinity"); assert(get_sign_of_point(eph_pk), "Got an ephemeral public key with a negative y coordinate"); (eph_sk, eph_pk) @@ -63,6 +66,7 @@ unconstrained fn generate_secret_key_for_positive_public_key() -> EmbeddedCurveS mod test { use crate::utils::point::get_sign_of_point; use super::generate_positive_ephemeral_key_pair; + use std::test::OracleMock; #[test] fn generate_positive_ephemeral_key_pair_produces_positive_keys() { @@ -73,4 +77,11 @@ mod test { assert(get_sign_of_point(pk)); } } + + #[test(should_fail_with = "point at infinity")] + unconstrained fn generate_positive_ephemeral_key_pair_rejects_zero_randomness() { + // Making the randomness oracle return 0 emulates a malicious sender substituting eph_sk = 0. + let _ = OracleMock::mock("aztec_misc_getRandomField").returns(0); + let _ = generate_positive_ephemeral_key_pair(); + } } diff --git a/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr b/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr index 2f8144b3d6a4..aa7cadc90ee5 100644 --- a/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr +++ b/noir-projects/aztec-nr/aztec/src/macros/aztec/compute_note_hash_and_nullifier.nr @@ -44,10 +44,12 @@ pub(crate) comptime fn generate_contract_library_methods_compute_note_hash_and_n comptime fn generate_contract_library_method_compute_note_hash() -> Quoted { if NOTES.len() == 0 { - // Contracts with no notes still implement this function to avoid having special-casing, the implementation - // simply throws immediately. + // Contracts with no notes still implement this function to avoid having special-casing. Since the contract + // declares no note types there is never a note to hash, so we return `Option::none()`. This will cause any + // messages related to (non-existing) notes to be simply skipped, mirroring the unknown-note-type branch of the + // with-notes implementation. quote { - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] @@ -59,7 +61,7 @@ comptime fn generate_contract_library_method_compute_note_hash() -> Quoted { _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field, ) -> Option { - panic(f"This contract does not use private notes") + Option::none() } } } else { @@ -155,10 +157,12 @@ comptime fn generate_contract_library_method_compute_note_hash() -> Quoted { comptime fn generate_contract_library_method_compute_note_nullifier() -> Quoted { if NOTES.len() == 0 { - // Contracts with no notes still implement this function to avoid having special-casing, the implementation - // simply throws immediately. + // Contracts with no notes still implement this function to avoid having special-casing. Since the contract + // declares no note types there is never a note to nullify, so we return `Option::none()`. This will cause any + // messages related to (non-existing) notes to be simply skipped, mirroring the unknown-note-type branch of the + // with-notes implementation. quote { - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] @@ -171,7 +175,7 @@ comptime fn generate_contract_library_method_compute_note_nullifier() -> Quoted _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field, ) -> Option { - panic(f"This contract does not use private notes") + Option::none() } } } else { diff --git a/noir-projects/aztec-nr/aztec/src/macros/notes.nr b/noir-projects/aztec-nr/aztec/src/macros/notes.nr index f50634480dab..6839841f9484 100644 --- a/noir-projects/aztec-nr/aztec/src/macros/notes.nr +++ b/noir-projects/aztec-nr/aztec/src/macros/notes.nr @@ -1,5 +1,4 @@ -use crate::note::note_getter_options::PropertySelector; -use std::{collections::bounded_vec::BoundedVec, meta::type_of}; +use std::collections::bounded_vec::BoundedVec; /// Maximum number of note types within 1 contract. comptime global MAX_NOTE_TYPES: u32 = 128; @@ -113,43 +112,66 @@ comptime fn generate_note_hash_trait_impl(s: TypeDefinition) -> Quoted { /// Generates note properties struct for a given note struct `s`. /// -/// Example: +/// Each selector's `index` is the field's offset in the note's packed representation, assuming the field-by-field +/// layout of `#[derive(Packable)]`. +/// +/// Example, for a note whose first field packs to two fields (`Point` packs to `[x, y]`), placing the fields after +/// it at packed indices 2 and 3: /// ``` -/// struct TokenNoteProperties { -/// amount: aztec::note::note_getter_options::PropertySelector, -/// npk_m_hash: aztec::note::note_getter_options::PropertySelector -/// randomness: aztec::note::note_getter_options::PropertySelector +/// struct OwnedNoteProperties { +/// owner_pubkey: aztec::note::note_getter_options::PropertySelector, +/// value: aztec::note::note_getter_options::PropertySelector, +/// randomness: aztec::note::note_getter_options::PropertySelector /// } /// -/// impl aztec::note::note_interface::NoteProperties for TokenNote { -/// fn properties() -> TokenNoteProperties { -/// Self { -/// amount: aztec::note::note_getter_options::PropertySelector { index: 0, offset: 0, length: 32 }, -/// npk_m_hash: aztec::note::note_getter_options::PropertySelector { index: 1, offset: 0, length: 32 }, -/// randomness: aztec::note::note_getter_options::PropertySelector { index: 2, offset: 0, length: 32 } +/// impl aztec::note::note_interface::NoteProperties for OwnedNote { +/// fn properties() -> OwnedNoteProperties { +/// OwnedNoteProperties { +/// owner_pubkey: aztec::note::note_getter_options::PropertySelector { index: 0, offset: 0, length: 32 }, +/// value: aztec::note::note_getter_options::PropertySelector { index: 2, offset: 0, length: 32 }, +/// randomness: aztec::note::note_getter_options::PropertySelector { index: 3, offset: 0, length: 32 } /// } /// } /// } /// ``` +/// +/// WARNING: a hand-written `Packable` implementation can lay fields out differently, making that assumption wrong. +/// `properties()` statically asserts that the note's packed length equals the sum of its field packed lengths, which +/// rejects most custom layouts. However, a custom layout that packs to the same total length but re-orders the fields +/// is not detectable: its generated selectors point at the wrong packed fields. comptime fn generate_note_properties(s: TypeDefinition) -> Quoted { let name = s.name(); + let typ = s.as_type(); + let note_type_name = f"{name}".as_quoted_str!(); let struct_name = f"{name}Properties".quoted_contents(); - let property_selector_type = type_of(PropertySelector { index: 0, offset: 0, length: 0 }); - let note_fields = s.fields_as_written(); - let properties_types = note_fields.map(|(name, _, _)| quote { pub $name: $property_selector_type }).join(quote {,}); + let properties_types = note_fields + .map(|(name, typ, _)| quote { pub $name: aztec::note::note_getter_options::PropertySelector<$typ> }) + .join(quote {,}); - // TODO #8694: Properly handle non-field types https://github.com/AztecProtocol/aztec-packages/issues/8694 let mut properties_list = @[]; + // The packed offset of the field being processed, i.e. the sum of the packed lengths of all preceding fields. + let mut accumulated_offset = quote { 0 }; for i in 0..note_fields.len() { - let (name, _, _) = note_fields[i]; - let i = i as u8; + let (name, field_type, _) = note_fields[i]; properties_list = properties_list.push_back( - quote { $name: aztec::note::note_getter_options::PropertySelector { index: $i, offset: 0, length: 32 } }, + quote { + $name: aztec::note::note_getter_options::PropertySelector { + index: ($accumulated_offset) as u8, + offset: 0, + length: 32, + } + }, ); + // If a "No matching impl found for `: Packable`" error points here, a note struct has a field whose + // type does not implement Packable. Every note field type must, even when the note's own Packable + // implementation is hand-written, because the note's auto-generated property selectors locate each field by + // its packed offset. Derive or implement Packable on the field's type, or, when the type belongs to another + // crate (implementing Packable for it there is not possible), wrap it in a local struct that implements it. + accumulated_offset = quote { $accumulated_offset + <$field_type as aztec::protocol::traits::Packable>::N }; } let properties = properties_list.join(quote {,}); @@ -161,6 +183,20 @@ comptime fn generate_note_properties(s: TypeDefinition) -> Quoted { impl aztec::note::note_interface::NoteProperties<$struct_name> for $name { fn properties() -> $struct_name { + let note_type_name = $note_type_name; + let fields_packed_len: u32 = $accumulated_offset; + let note_packed_len: u32 = <$typ as aztec::protocol::traits::Packable>::N; + // We only reject custom Packable layouts whose total packed length differs from the derived + // layout's. A hand-written pack() that keeps the same total length but reorders same-width fields + // is deliberately not caught: the selectors are computed from declared field order and would + // silently point at the wrong packed slot. Detecting it would require knowing whether Packable was + // derived or hand-written, which comptime cannot currently tell us. Custom layouts must define their + // PropertySelectors manually. + std::static_assert( + fields_packed_len == note_packed_len, + f"{note_type_name}'s auto-generated note properties assume the #[derive(Packable)] layout ({fields_packed_len} fields), but its hand-written Packable packs to {note_packed_len}. Derive Packable, or define property selectors manually for the custom layout. See https://docs.aztec.network/errors/15", + ); + $struct_name { $properties } diff --git a/noir-projects/aztec-nr/aztec/src/messages/delivery/handshake.nr b/noir-projects/aztec-nr/aztec/src/messages/delivery/handshake.nr index d0e8276e3716..79ecebc5cf6e 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/delivery/handshake.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/delivery/handshake.nr @@ -1,5 +1,9 @@ use crate::protocol::point::EmbeddedCurvePoint; use crate::protocol::traits::{Deserialize, Serialize}; +<<<<<<< HEAD +======= +use std::embedded_curve_ops::{EmbeddedCurveScalar, multi_scalar_mul}; +>>>>>>> origin/v5-next use crate::{ context::PrivateContext, @@ -7,7 +11,15 @@ use crate::{ messages::{delivery::OnchainDeliveryMode, processing::provided_secret::ProvidedSecret}, oracle::{call_utility_function::call_utility_function, shared_secret::get_shared_secrets}, protocol::{ +<<<<<<< HEAD abis::function_selector::FunctionSelector, address::AztecAddress, hash::sha256_to_field, traits::ToField, +======= + abis::function_selector::FunctionSelector, + address::AztecAddress, + constants::DOM_SEP__HANDSHAKE_FORGERY_PROTECTION, + hash::{poseidon2_hash_with_separator, sha256_to_field}, + traits::ToField, +>>>>>>> origin/v5-next }, standard_addresses::STANDARD_HANDSHAKE_REGISTRY_ADDRESS, }; @@ -57,6 +69,59 @@ pub global INTERACTIVE_HANDSHAKE_SELECTOR: FunctionSelector = pub global GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR: FunctionSelector = comptime { FunctionSelector::from_signature("get_non_interactive_handshakes((Field),u32)") }; +<<<<<<< HEAD +======= +/// Protects a handshake's shared secret from recipient forgery. +/// +/// The handshake's ECDH shared secret is symmetric: `S = eph_sk * recipient_pub`, where `(eph_sk, eph_pk)` is +/// the sender's ephemeral key pair, also equals `recipient_priv * eph_pk`. The recipient recomputing `S` this +/// way is normal: it is how they derive the handshake's tags when scanning. The attack is minting a second +/// handshake with the same secret: the ephemeral key is unconstrained, so a malicious recipient can register +/// its own handshake crafted to land on `S` again, with a different sender-only secret, and emit logs under +/// the honest handshake's constrained-delivery tag. That breaks the invariant that a constrained-delivery log +/// sequence is tied to a single sender: by colliding on the tag it blocks the honest sender, who can no longer +/// emit the next note in their sequence. +/// +/// The protection multiplies `S` by the scalar `k = hash(eph_pk, recipient_point)`: a forgery must announce a +/// different `eph_pk`, so the protected secrets diverge. The result is still a point and silos like `S`. +/// +/// The recipient point must be part of `k`: were `k` independent of it, an attacker choosing the fake +/// recipient point as a multiple of the honest protected secret could solve for the multiplier that makes the +/// forged secret land exactly on it. +/// +/// Concretely, on the sender's side: +/// S = eph_sk * recipient_point +/// S' = protect_from_forgery(S, eph_pk, recipient_point) = k * S +/// +/// See [`forgery_protected_eph_pk`] for how that arrives at the same `S'`. +pub fn protect_from_forgery( + secret: EmbeddedCurvePoint, + eph_pk: EmbeddedCurvePoint, + recipient_point: EmbeddedCurvePoint, +) -> EmbeddedCurvePoint { + let scalar = poseidon2_hash_with_separator( + [eph_pk.x, eph_pk.y, recipient_point.x, recipient_point.y], + DOM_SEP__HANDSHAKE_FORGERY_PROTECTION, + ); + multi_scalar_mul([secret], [EmbeddedCurveScalar::from_field(scalar)]) +} + +/// Applies the forgery protection to a discovered ephemeral key. +/// +/// The recipient never holds the raw `S` (its side of the ECDH happens inside PXE), so it cannot call +/// [`protect_from_forgery`] on the secret directly. The protection is a scalar multiplication and therefore +/// commutes through ECDH: protecting the ephemeral key before the shared-secret derivation yields the same +/// protected secret `S'` the sender stored: +/// +/// protected_eph_pk = forgery_protected_eph_pk(eph_pk, recipient_point) = k * eph_pk +/// recipient_priv * protected_eph_pk = recipient_priv * (k * eph_pk) = k * (recipient_priv * eph_pk) = k * S = S' +pub fn forgery_protected_eph_pk(eph_pk: EmbeddedCurvePoint, recipient_point: EmbeddedCurvePoint) -> EmbeddedCurvePoint { + // Passing `eph_pk` twice is deliberate: it is both the point being multiplied and an input to the scalar + // `k`, yielding `k * eph_pk` (see the algebra on [`protect_from_forgery`]). + protect_from_forgery(eph_pk, eph_pk, recipient_point) +} + +>>>>>>> origin/v5-next /// Reads the existing app-siloed handshake secrets for `(sender, recipient)` from the registry. /// /// Returns `None` when no handshake has been registered for the pair yet, in which case the caller decides how to @@ -121,27 +186,50 @@ pub(crate) fn create_interactive_handshake( /// searches for logs tagged with these secrets. pub(crate) unconstrained fn get_handshake_secrets( contract_address: AztecAddress, +<<<<<<< HEAD scope: AztecAddress, ) -> EphemeralArray { let provided_secrets = EphemeralArray::::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT); let eph_pks: EphemeralArray = EphemeralArray::empty_at(HANDSHAKE_EPH_PKS_SLOT); +======= + recipient: AztecAddress, +) -> EphemeralArray { + let provided_secrets = EphemeralArray::::empty_at(PROVIDED_SECRETS_ARRAY_BASE_SLOT); + + // Each ephemeral key gets the forgery protection applied (see [`forgery_protected_eph_pk`]) so the oracle's + // ECDH yields the protected secret the sender stored. + let protected_eph_pks: EphemeralArray = EphemeralArray::empty_at(HANDSHAKE_EPH_PKS_SLOT); + let recipient_point = recipient.to_address_point().expect(f"recipient address is not on the curve").inner; +>>>>>>> origin/v5-next let mut page_offset: u32 = 0; let mut has_more = true; while has_more { +<<<<<<< HEAD let page = fetch_handshake_page(scope, page_offset); for j in 0..page.items.len() { eph_pks.push(page.items.get(j).eph_pk); +======= + let page = fetch_handshake_page(recipient, page_offset); + + for j in 0..page.items.len() { + protected_eph_pks.push(forgery_protected_eph_pk(page.items.get(j).eph_pk, recipient_point)); +>>>>>>> origin/v5-next } page_offset += page.items.len(); has_more = page_offset < page.total_count; } +<<<<<<< HEAD if eph_pks.len() > 0 { let secrets = get_shared_secrets(scope, eph_pks, contract_address); +======= + if protected_eph_pks.len() > 0 { + let secrets = get_shared_secrets(recipient, protected_eph_pks, contract_address); +>>>>>>> origin/v5-next for j in 0..secrets.len() { let secret = secrets.get(j); // Handshakes are mode-agnostic; emit one entry per on-chain tag domain for PXE to scan. @@ -178,7 +266,11 @@ mod test { #[test] unconstrained fn get_handshake_secrets_returns_secrets_from_single_page() { let env = TestEnvironment::new(); +<<<<<<< HEAD let scope = AztecAddress::from_field(1); +======= + let recipient = AztecAddress::from_field(1); +>>>>>>> origin/v5-next let contract_address = AztecAddress { inner: 0xdeadbeef }; env.utility_context_at(contract_address, |_| { @@ -195,7 +287,11 @@ mod test { let secret_b: Field = 222; mock_get_shared_secrets([secret_a, secret_b]); +<<<<<<< HEAD let secrets = get_handshake_secrets(contract_address, scope); +======= + let secrets = get_handshake_secrets(contract_address, recipient); +>>>>>>> origin/v5-next assert_eq(secrets.len(), 4); assert_eq(secrets.get(0).secret, secret_a); @@ -212,7 +308,11 @@ mod test { #[test] unconstrained fn get_handshake_secrets_fetches_multiple_pages() { let env = TestEnvironment::new(); +<<<<<<< HEAD let scope = AztecAddress::from_field(1); +======= + let recipient = AztecAddress::from_field(1); +>>>>>>> origin/v5-next let contract_address = AztecAddress { inner: 0xdeadbeef }; env.utility_context_at(contract_address, |_| { @@ -234,7 +334,11 @@ mod test { mock_get_shared_secrets([111, 222, 333]); +<<<<<<< HEAD let secrets = get_handshake_secrets(contract_address, scope); +======= + let secrets = get_handshake_secrets(contract_address, recipient); +>>>>>>> origin/v5-next assert_eq(secrets.len(), 6); assert_eq(secrets.get(0).secret, 111); assert(secrets.get(0).mode == OnchainDeliveryMode::onchain_unconstrained()); @@ -252,9 +356,15 @@ mod test { } #[test] +<<<<<<< HEAD unconstrained fn get_handshake_secrets_returns_empty_when_scope_keys_not_held() { let env = TestEnvironment::new(); let scope = AztecAddress::from_field(1); +======= + unconstrained fn get_handshake_secrets_returns_empty_when_recipient_keys_not_held() { + let env = TestEnvironment::new(); + let recipient = AztecAddress::from_field(1); +>>>>>>> origin/v5-next let contract_address = AztecAddress { inner: 0xdeadbeef }; env.utility_context_at(contract_address, |_| { @@ -266,7 +376,11 @@ mod test { let empty: [Field; 0] = []; mock_get_shared_secrets(empty); +<<<<<<< HEAD let secrets = get_handshake_secrets(contract_address, scope); +======= + let secrets = get_handshake_secrets(contract_address, recipient); +>>>>>>> origin/v5-next assert_eq(secrets.len(), 0); }); } diff --git a/noir-projects/aztec-nr/aztec/src/messages/delivery/tag.nr b/noir-projects/aztec-nr/aztec/src/messages/delivery/tag.nr index 056e5479782e..9e3b845994cb 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/delivery/tag.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/delivery/tag.nr @@ -180,6 +180,32 @@ mod test { }); } +<<<<<<< HEAD +======= + #[test(should_fail_with = "an unconstrained tagging secret cannot back constrained delivery")] + unconstrained fn constrained_delivery_rejects_a_resolved_unconstrained_secret() { + let env = TestEnvironment::new(); + let secret: Field = 7; + let index: u32 = 0; + + env.private_context(|context| { + mock_existing_handshake_secrets(Option::none()); + let _ = OracleMock::mock("aztec_prv_resolveTaggingStrategy").returns( + ResolvedTaggingStrategy::unconstrained_secret(secret), + ); + let _ = OracleMock::mock("aztec_prv_getNextTaggingIndex").returns(index); + + let _ = derive_log_tag( + context, + OnchainDeliveryMode::onchain_constrained(), + SENDER, + RECIPIENT, + Option::none(), + ); + }); + } + +>>>>>>> origin/v5-next #[test] unconstrained fn constrained_delivery_emits_the_sequence_nullifier_and_constrained_tag() { let env = TestEnvironment::new(); diff --git a/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr b/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr index 8f8de2f43aaa..0e7c2787dfbc 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr @@ -174,6 +174,19 @@ pub unconstrained fn do_sync_state_without_handshake_discovery( ); } +/// A [`CustomSyncHandler`] that skips state synchronization entirely. +/// +/// For contracts that hold no private state and emit no messages, there is nothing to discover: syncing would only +/// perform unnecessary RPC calls. +pub unconstrained fn do_sync_state_no_op( + _contract_address: AztecAddress, + _compute_note_hash: ComputeNoteHash, + _compute_note_nullifier: ComputeNoteNullifier, + _process_custom_message: Option, + _offchain_inbox_sync: Option, + _scope: AztecAddress, +) {} + unconstrained fn sync_state_with_secrets( contract_address: AztecAddress, compute_note_hash: ComputeNoteHash, diff --git a/noir-projects/aztec-nr/aztec/src/messages/processing/log_retrieval_response.nr b/noir-projects/aztec-nr/aztec/src/messages/processing/log_retrieval_response.nr index fda2f8f99684..1ecf16379afa 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/processing/log_retrieval_response.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/processing/log_retrieval_response.nr @@ -1,5 +1,8 @@ use crate::messages::logs::note::MAX_NOTE_PACKED_LEN; -use crate::protocol::{constants::{MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_CIPHERTEXT_LEN}, traits::Deserialize}; +use crate::protocol::{ + constants::{MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_CIPHERTEXT_LEN}, + traits::{Deserialize, Serialize}, +}; pub global MAX_PUBLIC_LOG_LEN_FOR_NOTE_COMPLETION: u32 = MAX_NOTE_PACKED_LEN; @@ -11,7 +14,7 @@ pub(crate) global MAX_LOG_CONTENT_LEN: u32 = std::cmp::max( /// A response to a `LogRetrievalRequest`, containing the payload of a log (i.e. the content minus the tag, called /// plaintext for public logs and ciphertext for private), plus contextual information about the transaction in which /// the log was emitted. This is the data required in order to discover notes that are being delivered in a log. -#[derive(Deserialize, Eq)] +#[derive(Deserialize, Eq, Serialize)] pub struct LogRetrievalResponse { pub log_payload: BoundedVec, pub tx_hash: Field, diff --git a/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr b/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr index 4b4b71564f4e..fb2823eb600d 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/processing/mod.nr @@ -95,6 +95,13 @@ pub unconstrained fn enqueue_note_for_validation( )) } +/// The note validation requests enqueued so far in the current context via [`enqueue_note_for_validation`], before +/// [`validate_and_store_enqueued_notes_and_events`] drains them. Exists so tests can inspect the pending queue; +/// production code should not read requests back once enqueued. +pub(crate) unconstrained fn get_enqueued_note_validation_requests() -> EphemeralArray { + EphemeralArray::at(NOTE_VALIDATION_REQUESTS_ARRAY_BASE_SLOT) +} + /// Enqueues an event for validation and storage by PXE. /// /// This is the primary way for custom message handlers (registered via diff --git a/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/mod.nr b/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/mod.nr index 5bd712009923..299c6f4a3eaf 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/mod.nr @@ -7,7 +7,11 @@ use crate::{ }; mod reception; +<<<<<<< HEAD use reception::OffchainReception; +======= +use reception::{MAX_ANCHOR_FUTURE_SKEW, OffchainReception}; +>>>>>>> origin/v5-next /// Maximum number of offchain messages accepted by `offchain_receive` in a single call. pub global MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL: u32 = 16; @@ -50,6 +54,22 @@ pub unconstrained fn receive( // Offchain reception facts are scoped to the recipient. Note that because offchain messages have no integrity or // authenticity checks it is not possible to verify that this is indeed the intended recipient. In this case we're // assuming a cooperative environment, which is on par with other offchain delivery expectations. +<<<<<<< HEAD +======= + // + // The sender-supplied anchor timestamp is the one field we bound: a message claiming to originate implausibly far + // in our future (see MAX_ANCHOR_FUTURE_SKEW) cannot be genuine, and accepting it would let a malicious anchor evade + // the TTL-based inbox eviction. We reject such a batch by panicking instead of silently dropping the message, so + // the calling wallet can react to it (e.g. surface the error or distrust the sender). + let now = UtilityContext::new().timestamp(); + messages.for_each(|msg| { + assert( + msg.anchor_block_timestamp <= now + MAX_ANCHOR_FUTURE_SKEW, + "offchain message anchor timestamp is implausibly far in the future", + ); + }); + +>>>>>>> origin/v5-next messages.for_each(|msg| OffchainReception::init(contract_address, msg)); // Clear cache for message recipients so the next sync runs. @@ -97,10 +117,19 @@ pub struct OffchainMessage { mod test { use crate::{ +<<<<<<< HEAD oracle::random::random, protocol::address::AztecAddress, test::helpers::test_environment::TestEnvironment, }; use super::{MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OffchainMessage, receive, sync_inbox}; use super::reception::{MAX_MSG_TTL, OffchainReception}; +======= + oracle::random::random, + protocol::{address::AztecAddress, constants::MAX_TX_LIFETIME}, + test::helpers::test_environment::TestEnvironment, + }; + use super::{MAX_OFFCHAIN_MESSAGES_PER_RECEIVE_CALL, OffchainMessage, receive, sync_inbox}; + use super::reception::{MAX_ANCHOR_FUTURE_SKEW, MAX_MSG_TTL, OffchainReception}; +>>>>>>> origin/v5-next unconstrained fn setup() -> (TestEnvironment, AztecAddress) { let mut env = TestEnvironment::new(); @@ -177,6 +206,45 @@ mod test { }); } +<<<<<<< HEAD +======= + #[test] + unconstrained fn accepts_messages_within_the_tolerated_future_skew() { + let (env, scope) = setup(); + let now = advance_by(env, 10); + + // A present-dated anchor and a 24h-future one both fall within the tolerated skew. The latter models a genuine + // message whose sender anchored ahead of our lagging PXE, and must still be accepted. + let present = make_msg(scope, Option::some(random()), now); + let lagged = make_msg(scope, Option::some(random()), now + MAX_TX_LIFETIME); + + env.utility_context(|context| { + let address = context.this_address(); + receive(address, BoundedVec::from_array([present, lagged])); + + assert(OffchainReception::is_active(address, scope, present)); + assert(OffchainReception::is_active(address, scope, lagged)); + assert_eq(OffchainReception::load_all(address, scope).len(), 2); + }); + } + + #[test(should_fail_with = "offchain message anchor timestamp is implausibly far in the future")] + unconstrained fn rejects_batch_with_implausible_future_anchor() { + let (env, scope) = setup(); + let now = advance_by(env, 10); + + // Beyond `now + MAX_ANCHOR_FUTURE_SKEW`: our view would trail the tip by more than a tx lifetime, so this + // cannot be genuine. Reception panics so the wallet can react rather than accept it. + let too_future = make_msg( + scope, + Option::some(random()), + now + MAX_ANCHOR_FUTURE_SKEW + 7200, + ); + + env.utility_context(|context| { receive(context.this_address(), BoundedVec::from_array([too_future])); }); + } + +>>>>>>> origin/v5-next // -- Idempotent re-delivery (first-write-wins fact recording) --------- #[test] diff --git a/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/reception.nr b/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/reception.nr index 36bafe540a1e..ea4835045166 100644 --- a/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/reception.nr +++ b/noir-projects/aztec-nr/aztec/src/messages/processing/offchain/reception.nr @@ -117,6 +117,21 @@ use super::OffchainMessage; /// (7200 == 2 hours) pub(crate) global MAX_MSG_TTL: u64 = MAX_TX_LIFETIME + 7200; +<<<<<<< HEAD +======= +/// Maximum amount by which a received message's `anchor_block_timestamp` may exceed our current timestamp. +/// +/// A message's anchor is the timestamp of the block the sender anchored its originating tx to, so for a genuine +/// message it is at or before our own anchor timestamp. Our PXE may lag the chain tip though, which can make a +/// legitimate anchor appear to be in our future, so we tolerate a forward skew of `MAX_TX_LIFETIME` (the longest a tx +/// can wait to be mined after its anchor) plus a 2h margin. A larger skew would mean our view trails the tip by more +/// than a tx lifetime -- so far behind that we could not even build a tx that wouldn't be immediately expired -- so +/// such a message cannot be genuine and is rejected on reception. Bounding the anchor this way also keeps accepted +/// values near the present, which prevents the `anchor_block_timestamp + MAX_MSG_TTL` eviction check from overflowing. +/// (7200 == 2 hours) +pub(crate) global MAX_ANCHOR_FUTURE_SKEW: u64 = MAX_TX_LIFETIME + 7200; + +>>>>>>> origin/v5-next /// Fact type id of the fact that stores the offchain message body inside a reception collection. global OFFCHAIN_MESSAGE_RECEIVED: Field = sha256_to_field("AZTEC_NR::OFFCHAIN_MESSAGE_RECEIVED".as_bytes()); diff --git a/noir-projects/aztec-nr/aztec/src/messaging.nr b/noir-projects/aztec-nr/aztec/src/messaging.nr index 881c644f3091..0921c6ca4ef1 100644 --- a/noir-projects/aztec-nr/aztec/src/messaging.nr +++ b/noir-projects/aztec-nr/aztec/src/messaging.nr @@ -1,18 +1,18 @@ use crate::{ hash::{compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash}, - oracle::get_l1_to_l2_membership_witness::get_l1_to_l2_membership_witness, + oracle::get_l1_to_l2_membership_witness::{get_l1_to_l2_membership_witness, UnsiloedNullifier}, }; use crate::protocol::{address::{AztecAddress, EthAddress}, merkle_tree::root::root_from_sibling_path}; -pub fn process_l1_to_l2_message( +pub fn process_l1_to_l2_message( l1_to_l2_root: Field, contract_address: AztecAddress, portal_contract_address: EthAddress, chain_id: Field, version: Field, content: Field, - secret: Field, + secret: [Field; N], leaf_index: Field, ) -> Field { let secret_hash = compute_secret_hash(secret); @@ -26,14 +26,20 @@ pub fn process_l1_to_l2_message( leaf_index, ); + let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret); + // We prove that `message_hash` is in the tree by showing the derivation of the tree root, using a merkle path we // get from an oracle. // Safety: The witness is only used as a "magical value" that makes the merkle proof below pass. Hence it's safe. - let (_leaf_index, sibling_path) = - unsafe { get_l1_to_l2_membership_witness(contract_address, message_hash, secret) }; + let (_leaf_index, sibling_path) = unsafe { + get_l1_to_l2_membership_witness( + message_hash, + Option::some(UnsiloedNullifier { contract_address, nullifier }), + ) + }; let root = root_from_sibling_path(message_hash, leaf_index, sibling_path); assert_eq(root, l1_to_l2_root, "Message not in state"); - compute_l1_to_l2_message_nullifier(message_hash, secret) + nullifier } diff --git a/noir-projects/aztec-nr/aztec/src/note/note_getter.nr b/noir-projects/aztec-nr/aztec/src/note/note_getter.nr index 72d7e642c11c..90f259076f8f 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_getter.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_getter.nr @@ -22,7 +22,10 @@ pub use crate::note::constants::MAX_NOTES_PER_PAGE; mod test; -fn extract_property_value_from_selector(packed_note: [Field; N], selector: PropertySelector) -> Field { +fn extract_property_value_from_selector( + packed_note: [Field; N], + selector: PropertySelector, +) -> Field { // Selectors use PropertySelectors in order to locate note properties inside the packed note. This allows easier // packing and custom (un)packing schemas. A note property is located inside the packed note using the index inside // the array, a byte offset and a length. diff --git a/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr b/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr index a2ca3e046702..e6e524b4a974 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_getter/test.nr @@ -13,10 +13,12 @@ use crate::{ utils::comparison::Comparator, }; +fn field_selector(index: u8) -> PropertySelector { + PropertySelector { index, offset: 0, length: 32 } +} + fn sort_criterion(index: u8, order: u8) -> Option { - Option::some( - Sort::new(PropertySelector { index, offset: 0, length: 32 }, order), - ) + Option::some(Sort::new(field_selector(index), order)) } global storage_slot: Field = 42; @@ -226,11 +228,7 @@ unconstrained fn confirm_notes_rejects_mismatched_selector() { let mut opt_notes = [Option::none(); _]; opt_notes[0] = Option::some(note); - let options = NoteGetterOptions::new().set_owner(owner).select( - PropertySelector { index: 0, offset: 0, length: 32 }, - Comparator.EQ, - value + 1, - ); + let options = NoteGetterOptions::new().set_owner(owner).select(field_selector(0), Comparator.EQ, value + 1); let _ = confirm_hinted_notes(context, storage_slot, opt_notes, options); }); @@ -247,9 +245,7 @@ unconstrained fn confirm_notes_rejects_mismatched_desc_sort_order() { opt_notes[0] = Option::some(build_valid_hinted_note(contract_address, 1)); opt_notes[1] = Option::some(build_valid_hinted_note(contract_address, 2)); - let options = NoteGetterOptions::new() - .sort(PropertySelector { index: 0, offset: 0, length: 32 }, SortOrder.DESC) - .set_owner(owner); + let options = NoteGetterOptions::new().sort(field_selector(0), SortOrder.DESC).set_owner(owner); let _ = confirm_hinted_notes(context, storage_slot, opt_notes, options); }); } @@ -265,9 +261,7 @@ unconstrained fn confirm_notes_rejects_mismatched_asc_sort_order() { opt_notes[0] = Option::some(build_valid_hinted_note(contract_address, 2)); opt_notes[1] = Option::some(build_valid_hinted_note(contract_address, 1)); - let options = NoteGetterOptions::new() - .sort(PropertySelector { index: 0, offset: 0, length: 32 }, SortOrder.ASC) - .set_owner(owner); + let options = NoteGetterOptions::new().sort(field_selector(0), SortOrder.ASC).set_owner(owner); let _ = confirm_hinted_notes(context, storage_slot, opt_notes, options); }); } diff --git a/noir-projects/aztec-nr/aztec/src/note/note_getter_options.nr b/noir-projects/aztec-nr/aztec/src/note/note_getter_options.nr index 5afee821e466..27fcf705a5ff 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_getter_options.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_getter_options.nr @@ -1,19 +1,26 @@ use crate::note::{HintedNote, note_interface::NoteType}; -use crate::protocol::{ - address::AztecAddress, - constants::MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, - traits::{Packable, ToField}, -}; +use crate::protocol::{address::AztecAddress, constants::MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, traits::Packable}; use std::option::Option; -pub struct PropertySelector { - pub index: u8, // index of the field in the serialized note array +/// Locates a note property inside the packed note. +/// +/// `T` is the type of the selected property: it is not stored, and is only used to validate the selector when +/// constructing a `Select` or `Sort` criterion. +pub struct PropertySelector { + pub index: u8, // index of the field in the note's packed representation pub offset: u8, // offset in the byte representation of the field (selected with index above) from which to reading pub length: u8, // number of bytes to read after the offset } +impl PropertySelector { + fn type_erased(self) -> PropertySelector { + PropertySelector { index: self.index, offset: self.offset, length: self.length } + } +} + pub struct Select { - pub(crate) property_selector: PropertySelector, + // The property type is validated and erased in `Select::new`. + pub(crate) property_selector: PropertySelector, pub(crate) comparator: u8, pub(crate) value: Field, } @@ -21,8 +28,15 @@ pub struct Select { impl Select { // The selected property will be the left hand side and value the right hand side of the operation, so e.g. the // object created by new(property, Comparator.GT, value) represents 'property > value'. - pub fn new(property_selector: PropertySelector, comparator: u8, value: Field) -> Self { - Select { property_selector, comparator, value } + pub fn new(property_selector: PropertySelector, comparator: u8, value: T) -> Self + where + T: Packable, + { + std::static_assert( + ::N == 1, + "cannot select by a property that packs to more than one field", + ); + Select { property_selector: property_selector.type_erased(), comparator, value: value.pack()[0] } } } @@ -34,13 +48,21 @@ pub struct SortOrderEnum { pub global SortOrder: SortOrderEnum = SortOrderEnum { DESC: 1, ASC: 2 }; pub struct Sort { - pub(crate) property_selector: PropertySelector, + // The property type is validated and erased in `Sort::new`. + pub(crate) property_selector: PropertySelector, pub(crate) order: u8, } impl Sort { - pub fn new(property_selector: PropertySelector, order: u8) -> Self { - Sort { property_selector, order } + pub fn new(property_selector: PropertySelector, order: u8) -> Self + where + T: Packable, + { + std::static_assert( + ::N == 1, + "cannot sort by a property that packs to more than one field", + ); + Sort { property_selector: property_selector.type_erased(), order } } } @@ -86,17 +108,24 @@ impl NoteGetterOptions(&mut self, property_selector: PropertySelector, comparator: u8, value: T) -> Self + // Selectors from auto-generated `properties()` require the note's derived Packable layout. Manually defined + // selectors work with any layout. + pub fn select(&mut self, property_selector: PropertySelector, comparator: u8, value: T) -> Self where - T: ToField, + T: Packable, { - self.selects.push(Option::some(Select::new(property_selector, comparator, value.to_field()))); + self.selects.push(Option::some(Select::new(property_selector, comparator, value))); *self } // This method adds a `Sort` criterion to the options. It takes a field_index indicating which field to sort by and // an order (SortOrder) to determine the sorting direction. - pub fn sort(&mut self, property_selector: PropertySelector, order: u8) -> Self { + // Selectors from auto-generated `properties()` require the note's derived Packable layout. Manually defined + // selectors work with any layout. + pub fn sort(&mut self, property_selector: PropertySelector, order: u8) -> Self + where + T: Packable, + { self.sorts.push(Option::some(Sort::new(property_selector, order))); *self } diff --git a/noir-projects/aztec-nr/aztec/src/note/note_interface.nr b/noir-projects/aztec-nr/aztec/src/note/note_interface.nr index 2a6ec0bb5763..9a3b4523de19 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_interface.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_interface.nr @@ -47,6 +47,16 @@ pub trait NoteHash { ) -> Option; } +/// Exposes a note's fields as property selectors for filtering. +/// +/// Each field becomes a [`PropertySelector`](crate::note::note_getter_options::PropertySelector) usable with +/// `select`/`sort`. +/// +/// The implementation generated by the `#[note]` and `#[custom_note]` macros assumes the note packs with the +/// field-by-field layout of `#[derive(Packable)]`. A note with a hand-written `Packable` implementation cannot use +/// it: `properties()` fails to compile when the layouts differ in total length, and a layout that only re-orders +/// fields is not detectable, so its selectors would point at the wrong packed fields. For such notes, define +/// property selectors manually to match the actual layout, e.g. as functions on the note type. pub trait NoteProperties { fn properties() -> T; } diff --git a/noir-projects/aztec-nr/aztec/src/note/note_viewer_options.nr b/noir-projects/aztec-nr/aztec/src/note/note_viewer_options.nr index d6b9082d0eec..20059ae7f1bb 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_viewer_options.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_viewer_options.nr @@ -1,7 +1,7 @@ use crate::note::constants::MAX_NOTES_PER_PAGE; use crate::note::note_getter_options::{NoteStatus, PropertySelector, Select, Sort}; use crate::note::note_interface::NoteType; -use crate::protocol::{address::AztecAddress, traits::{Packable, ToField}}; +use crate::protocol::{address::AztecAddress, traits::Packable}; use std::option::Option; pub struct NoteViewerOptions { @@ -31,15 +31,22 @@ impl NoteViewerOptions { // This method adds a `Select` criterion to the options. It takes a field_index indicating which field to select, a // value representing the specific value to match in that field, and a comparator (For possible values of // comparators, please see the Comparator enum from note_getter_options) - pub fn select(&mut self, property_selector: PropertySelector, comparator: u8, value: T) -> Self + // Selectors from auto-generated `properties()` require the note's derived Packable layout. Manually defined + // selectors work with any layout. + pub fn select(&mut self, property_selector: PropertySelector, comparator: u8, value: T) -> Self where - T: ToField, + T: Packable, { - self.selects.push(Option::some(Select::new(property_selector, comparator, value.to_field()))); + self.selects.push(Option::some(Select::new(property_selector, comparator, value))); *self } - pub fn sort(&mut self, property_selector: PropertySelector, order: u8) -> Self { + // Selectors from auto-generated `properties()` require the note's derived Packable layout. Manually defined + // selectors work with any layout. + pub fn sort(&mut self, property_selector: PropertySelector, order: u8) -> Self + where + T: Packable, + { self.sorts.push(Option::some(Sort::new(property_selector, order))); *self } diff --git a/noir-projects/aztec-nr/aztec/src/oracle/get_l1_to_l2_membership_witness.nr b/noir-projects/aztec-nr/aztec/src/oracle/get_l1_to_l2_membership_witness.nr index 5e76304350a5..9ed034a4ee5b 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/get_l1_to_l2_membership_witness.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/get_l1_to_l2_membership_witness.nr @@ -1,19 +1,27 @@ use crate::protocol::{address::AztecAddress, constants::L1_TO_L2_MSG_TREE_HEIGHT}; +/// An unsiloed L1 to L2 message nullifier. +pub struct UnsiloedNullifier { + pub contract_address: AztecAddress, + pub nullifier: Field, +} + /// Returns the leaf index and sibling path of an entry in the L1 to L2 messaging tree, which can then be used to prove /// its existence. +/// +/// When `nullifier` is `Some`, the returned witness is guaranteed to be for a message that has not yet been consumed: +/// PXE checks it is not present in the nullifier tree. Pass `None` to retrieve the witness regardless of whether the +/// message has been consumed. pub unconstrained fn get_l1_to_l2_membership_witness( - contract_address: AztecAddress, message_hash: Field, - secret: Field, + nullifier: Option, ) -> (Field, [Field; L1_TO_L2_MSG_TREE_HEIGHT]) { - get_l1_to_l2_membership_witness_oracle(contract_address, message_hash, secret) + get_l1_to_l2_membership_witness_oracle(message_hash, nullifier) } // Obtains membership witness (index and sibling path) for a message in the L1 to L2 message tree. -#[oracle(aztec_utl_getL1ToL2MembershipWitness)] +#[oracle(aztec_utl_getL1ToL2MembershipWitnessV2)] unconstrained fn get_l1_to_l2_membership_witness_oracle( - _contract_address: AztecAddress, _message_hash: Field, - _secret: Field, + _nullifier: Option, ) -> (Field, [Field; L1_TO_L2_MSG_TREE_HEIGHT]) {} diff --git a/noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr b/noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr index 1b77cd7d7885..d81e99a71067 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/get_membership_witness.nr @@ -1,8 +1,11 @@ -use crate::protocol::{ - abis::block_header::BlockHeader, - constants::{ARCHIVE_HEIGHT, NOTE_HASH_TREE_HEIGHT}, - merkle_tree::MembershipWitness, - traits::Hash, +use crate::{ + ephemeral::EphemeralArray, + protocol::{ + abis::block_header::BlockHeader, + constants::{ARCHIVE_HEIGHT, NOTE_HASH_TREE_HEIGHT}, + merkle_tree::MembershipWitness, + traits::Hash, + }, }; #[oracle(aztec_utl_getNoteHashMembershipWitness)] @@ -17,6 +20,12 @@ unconstrained fn get_block_hash_membership_witness_oracle( block_hash: Field, ) -> Option> {} +#[oracle(aztec_utl_areBlockHashesInArchive)] +unconstrained fn are_block_hashes_in_archive_oracle( + anchor_block_hash: Field, + block_hashes: EphemeralArray, +) -> EphemeralArray {} + // Note: get_nullifier_membership_witness function is implemented in get_nullifier_membership_witness.nr /// Returns a membership witness for a `note_hash` in the note hash tree whose root is defined in @@ -53,6 +62,15 @@ pub unconstrained fn get_maybe_block_hash_membership_witness( get_block_hash_membership_witness_oracle(anchor_block_hash, block_hash) } +/// Returns whether each block hash is present in the archive tree whose root is defined in `anchor_block_header`. +pub unconstrained fn are_block_hashes_in_archive( + anchor_block_header: BlockHeader, + block_hashes: EphemeralArray, +) -> EphemeralArray { + let anchor_block_hash = anchor_block_header.hash(); + are_block_hashes_in_archive_oracle(anchor_block_hash, block_hashes) +} + mod test { use crate::history::test::{create_note, NOTE_CREATED_AT}; use crate::note::note_interface::NoteHash; diff --git a/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr b/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr index f6182d59f83d..fc7722521040 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/message_processing.nr @@ -66,3 +66,11 @@ pub unconstrained fn get_tx_effect(tx_hash: Field) -> Option { #[oracle(aztec_utl_getTxEffect)] unconstrained fn get_tx_effect_oracle(tx_hash: Field) -> Option {} + +/// Fetches all effects of settled transactions by hash, preserving request order. +pub unconstrained fn get_tx_effects(tx_hashes: EphemeralArray) -> EphemeralArray> { + get_tx_effects_oracle(tx_hashes) +} + +#[oracle(aztec_utl_getTxEffects)] +unconstrained fn get_tx_effects_oracle(tx_hashes: EphemeralArray) -> EphemeralArray> {} diff --git a/noir-projects/aztec-nr/aztec/src/oracle/mod.nr b/noir-projects/aztec-nr/aztec/src/oracle/mod.nr index 3fe750eb3e10..06a2206d8fae 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/mod.nr @@ -22,6 +22,7 @@ use crate::macros::oracle_testing::{generate_oracle_tests, generate_oracle_tests ], )] pub mod avm; +<<<<<<< HEAD #[generate_oracle_tests_excluding( @[ // TODO: cover once the iv/sym_key BUFFER mapping is expressible as a plain fixed array of bytes, so the @@ -29,6 +30,9 @@ pub mod avm; quote { aes128_decrypt_oracle }, ], )] +======= +#[generate_oracle_tests] +>>>>>>> origin/v5-next pub mod aes128_decrypt; #[generate_oracle_tests] pub mod auth_witness; @@ -99,7 +103,16 @@ pub mod get_nullifier_membership_witness; ], )] pub mod get_public_data_witness; +<<<<<<< HEAD #[generate_oracle_tests] +======= +#[generate_oracle_tests_excluding( + @[ + // TODO: cover once the test resolver can serve EphemeralArray contents. + quote { are_block_hashes_in_archive_oracle }, + ], +)] +>>>>>>> origin/v5-next pub mod get_membership_witness; #[generate_oracle_tests] pub mod keys; diff --git a/noir-projects/aztec-nr/aztec/src/oracle/tx_resolution.nr b/noir-projects/aztec-nr/aztec/src/oracle/tx_resolution.nr index b288f4897e07..dd5c0ae1de58 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/tx_resolution.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/tx_resolution.nr @@ -18,6 +18,7 @@ pub(crate) unconstrained fn get_resolved_txs(requests: EphemeralArray) -> #[oracle(aztec_utl_getResolvedTxs)] unconstrained fn get_resolved_txs_oracle(requests: EphemeralArray) -> EphemeralArray> {} +<<<<<<< HEAD mod test { use crate::oracle::tx_resolution::ResolvedTx; @@ -119,3 +120,5 @@ mod test { assert_eq(deserialized, resolved_tx); } } +======= +>>>>>>> origin/v5-next diff --git a/noir-projects/aztec-nr/aztec/src/oracle/version.nr b/noir-projects/aztec-nr/aztec/src/oracle/version.nr index 5e518976c7fe..b9bb44bb1fc7 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/version.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/version.nr @@ -11,7 +11,11 @@ /// immediately if AZTEC_NR_MINOR > PXE_MINOR because if a contract is updated to use a newer Aztec.nr dependency /// without actually using any of the new oracles then there is no reason to throw. pub global ORACLE_VERSION_MAJOR: Field = 30; +<<<<<<< HEAD pub global ORACLE_VERSION_MINOR: Field = 5; +======= +pub global ORACLE_VERSION_MINOR: Field = 8; +>>>>>>> origin/v5-next /// Asserts that the version of the oracle is compatible with the version expected by the contract. pub fn assert_compatible_oracle_version() { diff --git a/noir-projects/aztec-nr/aztec/src/partial_notes/fsm.nr b/noir-projects/aztec-nr/aztec/src/partial_notes/fsm.nr index f926b1b25fcc..14c79fee73e9 100644 --- a/noir-projects/aztec-nr/aztec/src/partial_notes/fsm.nr +++ b/noir-projects/aztec-nr/aztec/src/partial_notes/fsm.nr @@ -66,9 +66,16 @@ use crate::facts::{ delete_fact_collection, Fact, FactCollection, get_fact_collections_by_type, OriginBlock, record_retractable_fact, RetractableFactOrigin, }; +<<<<<<< HEAD use crate::logging::aztecnr_debug_log_format; use crate::messages::{ discovery::{ComputeNoteHash, ComputeNoteNullifier, nonce_discovery::attempt_note_nonce_discovery}, +======= +use crate::logging::{aztecnr_debug_log_format, aztecnr_warn_log_format}; +use crate::messages::{ + discovery::{ComputeNoteHash, ComputeNoteNullifier, nonce_discovery::attempt_note_nonce_discovery}, + logs::note::MAX_NOTE_PACKED_LEN, +>>>>>>> origin/v5-next processing::{enqueue_note_for_validation, log_retrieval_response::{LogRetrievalResponse, MAX_LOG_CONTENT_LEN}}, }; use crate::protocol::{address::AztecAddress, hash::{poseidon2_hash, sha256_to_field}, traits::{Deserialize, Serialize}}; @@ -213,7 +220,21 @@ impl PartialNoteFsm { let completion_logs = maybe_completion_logs.unwrap(); let num_logs = completion_logs.len(); if num_logs != 0 { +<<<<<<< HEAD assert(num_logs == 1, f"Expected at most 1 completion log per partial note, got {num_logs}"); +======= + // The tag is not unique, so a pending partial note can resolve to more than one completion log (e.g. + // the same partial note completed twice). We complete with the first and ignore the rest rather than + // fail. + if num_logs > 1 { + let tag = self.read_pending_partial_note().note_completion_log_tag; + aztecnr_warn_log_format!( + "Found {0} completion logs for partial note with tag {1}, completing with the first", + )( + [num_logs as Field, tag], + ); + } +>>>>>>> origin/v5-next self.complete_with_log(completion_logs.get(0), compute_note_hash, compute_note_nullifier); } } @@ -232,6 +253,13 @@ impl PartialNoteFsm { /// Combines the delivered private content with the log's public content, discovers the resulting note(s), enqueues /// them for validation, and transitions the FSM to `completed` state conditional to the completion log's block. /// +<<<<<<< HEAD +======= + /// A completion log that cannot yield a note (an empty payload, content too large to pack into a note, or one + /// matching no real note) is skipped without failing and the FSM still advances, so one bad message cannot break + /// sync. + /// +>>>>>>> origin/v5-next /// Because the completion fact is retractable, a reorg of the completion log's block rewinds the FSM back to /// `pending` state (which signals that completion log search should restart). unconstrained fn complete_with_log( @@ -242,6 +270,7 @@ impl PartialNoteFsm { ) { let pending = self.read_pending_partial_note(); +<<<<<<< HEAD // The first field in the completion log payload is the storage slot, followed by the public note content. let storage_slot = log.log_payload.get(0); let public_note_content: BoundedVec = array::subbvec(log.log_payload, 1); @@ -278,10 +307,47 @@ impl PartialNoteFsm { discovered_notes.for_each(|discovered_note| { enqueue_note_for_validation( +======= + // The completion log payload is the storage slot followed by the public note content, so an empty payload + // (e.g. an attacker's tag-only log) has no storage slot and no content. + let payload_len = log.log_payload.len(); + let public_content_len = if payload_len == 0 { 0 } else { payload_len - 1 }; + + let combined_len = pending.packed_private_note_content.len() + public_content_len; + + if payload_len == 0 { + aztecnr_warn_log_format!( + "Partial note with tag {0} has an empty completion log, ignoring", + )( + [pending.note_completion_log_tag], + ); + } else if combined_len > MAX_NOTE_PACKED_LEN { + // A valid note packs into at most MAX_NOTE_PACKED_LEN fields, so this content cannot form one and would + // overflow the append below. + aztecnr_warn_log_format!( + "Partial note with tag {0} has over-length content ({1} > {2} fields), ignoring", + )( + [pending.note_completion_log_tag, combined_len as Field, MAX_NOTE_PACKED_LEN as Field], + ); + } else { + let storage_slot = log.log_payload.get(0); + let public_note_content: BoundedVec = array::subbvec(log.log_payload, 1); + + // Public fields are placed at the end of the packed representation, so we combine the private and public + // packed content to get the complete packed note. + let complete_packed_note = array::append(pending.packed_private_note_content, public_note_content); + + let discovered_notes = attempt_note_nonce_discovery( + log.unique_note_hashes_in_tx, + log.first_nullifier_in_tx, + compute_note_hash, + compute_note_nullifier, +>>>>>>> origin/v5-next self.collection.contract_address, pending.owner, storage_slot, pending.randomness, +<<<<<<< HEAD discovered_note.note_nonce, complete_packed_note, discovered_note.note_hash, @@ -289,6 +355,40 @@ impl PartialNoteFsm { log.tx_hash, ); }); +======= + pending.note_type_id, + complete_packed_note, + ); + + // Content delivered over an unconstrained channel need not correspond to a real note, so discovery can + // come up empty. + if discovered_notes.len() == 0 { + aztecnr_warn_log_format!( + "Partial note with tag {0} completed with no matching note discovered, ignoring", + )( + [pending.note_completion_log_tag], + ); + } else { + aztecnr_debug_log_format!("Discovered {0} notes for partial note with tag {1}")( + [discovered_notes.len() as Field, pending.note_completion_log_tag], + ); + } + + discovered_notes.for_each(|discovered_note| { + enqueue_note_for_validation( + self.collection.contract_address, + pending.owner, + storage_slot, + pending.randomness, + discovered_note.note_nonce, + complete_packed_note, + discovered_note.note_hash, + discovered_note.inner_nullifier, + log.tx_hash, + ); + }); + } +>>>>>>> origin/v5-next self.mark_completed(OriginBlock { block_number: log.block_number, block_hash: log.block_hash }); } @@ -308,9 +408,19 @@ mod test { use crate::ephemeral::EphemeralArray; use crate::facts::OriginBlock; use crate::messages::logs::note::MAX_NOTE_PACKED_LEN; +<<<<<<< HEAD use crate::messages::processing::log_retrieval_response::LogRetrievalResponse; use crate::partial_notes::DeliveredPendingPartialNote; use crate::protocol::address::AztecAddress; +======= + use crate::messages::logs::partial_note::MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN; + use crate::messages::processing::{ + get_enqueued_note_validation_requests, log_retrieval_response::LogRetrievalResponse, + }; + use crate::partial_notes::DeliveredPendingPartialNote; + use crate::protocol::address::AztecAddress; + use crate::protocol::hash::{compute_note_hash_nonce, compute_siloed_note_hash, compute_unique_note_hash}; +>>>>>>> origin/v5-next use crate::test::helpers::test_environment::TestEnvironment; use super::PartialNoteFsm; @@ -432,6 +542,159 @@ mod test { } #[test] +<<<<<<< HEAD +======= + unconstrained fn complete_with_log_advances_a_pending_reception_whose_log_yields_no_notes() { + let (env, scope) = setup(); + env.private_context(|context| { + let address = context.this_address(); + PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block()); + + // A malicious sender can deliver a partial note whose private content does not match the completion log it + // points at: the note hash computes but is absent from the log's transaction, so nonce discovery yields no + // note. + PartialNoteFsm::load_all(address, scope).get(0).complete_with_log( + completion_log_with_unrelated_note_hashes(), + |_, _, _, _, _, _| Option::some(DISCOVERED_NOTE_HASH), + dummy_compute_note_nullifier, + ); + + let all = PartialNoteFsm::load_all(address, scope); + assert_eq(all.len(), 1); + assert(all.get(0).is_completed()); + assert_eq(enqueued_note_count(), 0); + }); + } + + #[test] + unconstrained fn complete_with_log_advances_when_combined_content_exceeds_note_packed_len() { + let (env, scope) = setup(); + env.private_context(|context| { + let address = context.this_address(); + + // A poisoned delivery can carry a private half as long as MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN, which equals + // the packed-note capacity. Combined with any completion log's public content it exceeds that capacity, so + // completing must advance the reception rather than overflow the packed-note append and panic. + let pending = DeliveredPendingPartialNote { + owner: scope, + randomness: 0x11, + note_completion_log_tag: 0x22, + note_type_id: 0x33, + packed_private_note_content: BoundedVec::from_array([0; MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN]), + }; + PartialNoteFsm::init(address, scope, pending, finalized_block()); + + // A completion log carrying one public field (storage slot followed by one value). + let mut log = completion_log_with_unrelated_note_hashes(); + log.log_payload = BoundedVec::from_array([0, 0]); + + PartialNoteFsm::load_all(address, scope).get(0).complete_with_log( + log, + dummy_compute_note_hash, + dummy_compute_note_nullifier, + ); + + let all = PartialNoteFsm::load_all(address, scope); + assert_eq(all.len(), 1); + assert(all.get(0).is_completed()); + assert_eq(enqueued_note_count(), 0); + }); + } + + #[test] + unconstrained fn complete_with_log_advances_when_the_log_payload_is_empty() { + let (env, scope) = setup(); + env.private_context(|context| { + let address = context.this_address(); + PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block()); + + // An attacker can emit a tag-only public log, which arrives with an empty payload (no storage slot). + // Completing must advance the reception rather than read the storage slot out of bounds and panic. + let mut log = completion_log_with_unrelated_note_hashes(); + log.log_payload = BoundedVec::new(); + + PartialNoteFsm::load_all(address, scope).get(0).complete_with_log( + log, + dummy_compute_note_hash, + dummy_compute_note_nullifier, + ); + + let all = PartialNoteFsm::load_all(address, scope); + assert_eq(all.len(), 1); + assert(all.get(0).is_completed()); + assert_eq(enqueued_note_count(), 0); + }); + } + + #[test] + unconstrained fn complete_with_log_discovers_a_note_whose_combined_content_fills_note_packed_len() { + let (env, scope) = setup(); + env.private_context(|context| { + let address = context.this_address(); + + // A private half one field short of the cap plus a single public field combines to exactly + // MAX_NOTE_PACKED_LEN, the largest a valid note can be. The guard rejects only content that *exceeds* the + // cap, so this boundary case must still go through discovery and not be dropped. + let mut packed_private_note_content: BoundedVec = + BoundedVec::new(); + for _ in 0..MAX_PARTIAL_NOTE_PRIVATE_PACKED_LEN - 1 { + packed_private_note_content.push(0); + } + let pending = DeliveredPendingPartialNote { + owner: scope, + randomness: 0x11, + note_completion_log_tag: 0x22, + note_type_id: 0x33, + packed_private_note_content, + }; + PartialNoteFsm::init(address, scope, pending, finalized_block()); + + // A matching completion log carrying one public field (storage slot followed by one value). + let mut log = matching_completion_log(address, COMPLETION_LOG_FIRST_NULLIFIER); + log.log_payload = BoundedVec::from_array([0, 0]); + + PartialNoteFsm::load_all(address, scope).get(0).complete_with_log( + log, + |_, _, _, _, _, _| Option::some(DISCOVERED_NOTE_HASH), + |_, _, _, _, _, _, _| Option::some(DISCOVERED_NOTE_NULLIFIER), + ); + + let all = PartialNoteFsm::load_all(address, scope); + assert_eq(all.len(), 1); + assert(all.get(0).is_completed()); + assert_eq(enqueued_note_count(), 1); + }); + } + + #[test] + unconstrained fn step_completes_once_when_multiple_completion_logs_are_found() { + let (env, scope) = setup(); + env.private_context(|context| { + let address = context.this_address(); + PartialNoteFsm::init(address, scope, make_pending(scope), finalized_block()); + + // A single pending partial note can resolve to more than one completion log (e.g. the same partial note + // completed twice). Both logs here would independently discover a note, but step must complete only once + // (enqueuing exactly one note) rather than panic, so this cannot break sync. + let completion_logs: EphemeralArray = EphemeralArray::empty(); + completion_logs.push(matching_completion_log(address, COMPLETION_LOG_FIRST_NULLIFIER)); + completion_logs.push(matching_completion_log(address, SECOND_COMPLETION_LOG_FIRST_NULLIFIER)); + + PartialNoteFsm::load_all(address, scope).get(0).step( + Option::some(completion_logs), + |_, _, _, _, _, _| Option::some(DISCOVERED_NOTE_HASH), + |_, _, _, _, _, _, _| Option::some(DISCOVERED_NOTE_NULLIFIER), + ); + + let all = PartialNoteFsm::load_all(address, scope); + assert_eq(all.len(), 1); + assert(all.get(0).is_completed()); + assert_eq(enqueued_note_count(), 1); + }); + } + + #[test] +>>>>>>> origin/v5-next unconstrained fn step_terminates_a_completed_reception_once_its_block_is_finalized() { let (env, scope) = setup(); env.private_context(|context| { @@ -474,6 +737,57 @@ mod test { }); } +<<<<<<< HEAD +======= + global COMPLETION_LOG_FIRST_NULLIFIER: Field = 0x47; + global SECOND_COMPLETION_LOG_FIRST_NULLIFIER: Field = 0x48; + global DISCOVERED_NOTE_HASH: Field = 0x99; + global DISCOVERED_NOTE_NULLIFIER: Field = 0x55; + + /// The number of notes `complete_with_log` has enqueued for validation in the current context. + unconstrained fn enqueued_note_count() -> u32 { + get_enqueued_note_validation_requests().len() + } + + /// A completion log whose transaction contains the unique note hash that `DISCOVERED_NOTE_HASH` resolves to for the + /// given `first_nullifier_in_tx`, so nonce discovery finds a note in it. Paired with compute functions that return + /// `DISCOVERED_NOTE_HASH`. + unconstrained fn matching_completion_log( + contract_address: AztecAddress, + first_nullifier_in_tx: Field, + ) -> LogRetrievalResponse { + let note_nonce = compute_note_hash_nonce(first_nullifier_in_tx, 0); + let unique_note_hash = compute_unique_note_hash( + note_nonce, + compute_siloed_note_hash(contract_address, DISCOVERED_NOTE_HASH), + ); + LogRetrievalResponse { + log_payload: BoundedVec::from_array([0]), + tx_hash: 0, + unique_note_hashes_in_tx: BoundedVec::from_array([unique_note_hash]), + first_nullifier_in_tx, + block_number: 1, + block_timestamp: 0, + block_hash: 0, + } + } + + /// A well-formed completion log tied to a block TXE reports as finalized, carrying the note hashes of some + /// unrelated transaction. A note whose hash is not among them discovers to nothing, standing in for the real log a + /// poisoned partial note's tag resolves to. + unconstrained fn completion_log_with_unrelated_note_hashes() -> LogRetrievalResponse { + LogRetrievalResponse { + log_payload: BoundedVec::from_array([0]), + tx_hash: 0, + unique_note_hashes_in_tx: BoundedVec::from_array([0x1234]), + first_nullifier_in_tx: COMPLETION_LOG_FIRST_NULLIFIER, + block_number: 1, + block_timestamp: 0, + block_hash: 0, + } + } + +>>>>>>> origin/v5-next unconstrained fn dummy_compute_note_hash( _packed_note: BoundedVec, _owner: AztecAddress, diff --git a/noir-projects/aztec-nr/aztec/src/standard_addresses.nr b/noir-projects/aztec-nr/aztec/src/standard_addresses.nr index f1c67723e7f5..31a043d091a4 100644 --- a/noir-projects/aztec-nr/aztec/src/standard_addresses.nr +++ b/noir-projects/aztec-nr/aztec/src/standard_addresses.nr @@ -2,6 +2,7 @@ use protocol_types::{address::AztecAddress, traits::FromField}; pub global STANDARD_AUTH_REGISTRY_ADDRESS: AztecAddress = AztecAddress::from_field( +<<<<<<< HEAD 0x04fe1d86b5ae0f926883c34905a3c25cb30924138823a9883e2813d4f8b86ad9, ); @@ -15,4 +16,23 @@ pub global STANDARD_PUBLIC_CHECKS_ADDRESS: AztecAddress = AztecAddress::from_fie pub global STANDARD_HANDSHAKE_REGISTRY_ADDRESS: AztecAddress = AztecAddress::from_field( 0x090d0f9525c99184e3741290b2695c5e3af23f51e96061b74b953111b0d4f59d, +======= + 0x1e8e7e73c592a1b1c9199b4b655ddc7a16fa8a8488df595610b71d3dc1cc666c, +); + +pub global STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS: AztecAddress = AztecAddress::from_field( + 0x246d60af8b79a5dceece7d2388921203401c0df02ce674c5781c6c2162922986, +); + +pub global STANDARD_PUBLIC_CHECKS_ADDRESS: AztecAddress = AztecAddress::from_field( + 0x031b75e2c220f6a6f27da5d61f7b2a12756a127fd25b95fad5da1c5520994b18, +); + +pub global STANDARD_HANDSHAKE_REGISTRY_ADDRESS: AztecAddress = AztecAddress::from_field( +<<<<<<< HEAD + 0x086c3c67589e1141c70ed0ed8ae324c51d3bf7c5637043fd84c424ffb625831d, +>>>>>>> origin/v5-next +======= + 0x06127814dca78709650de6629637194f7381d2e05b35eb9d53a4746636c9aa9d, +>>>>>>> origin/v5-next ); diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr b/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr index 2d797d503f59..cf9d6a63482f 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable.nr @@ -12,8 +12,10 @@ use crate::{ }; use crate::protocol::{ - address::AztecAddress, constants::DOM_SEP__INITIALIZATION_NULLIFIER, hash::poseidon2_hash_with_separator, - traits::Packable, + address::AztecAddress, + constants::DOM_SEP__INITIALIZATION_NULLIFIER, + hash::poseidon2_hash_with_separator, + traits::{Packable, ToField}, }; mod test; @@ -67,7 +69,7 @@ impl PrivateImmutable { /// Computes the initialization nullifier using the provided secret. fn compute_initialization_nullifier(self, secret: Field) -> Field { poseidon2_hash_with_separator( - [self.storage_slot, secret], + [self.storage_slot, self.owner.to_field(), secret], DOM_SEP__INITIALIZATION_NULLIFIER, ) } diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable/test.nr b/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable/test.nr index 60bf3b8decb2..5bdcbb3d2847 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable/test.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/private_immutable/test.nr @@ -1,7 +1,8 @@ use crate::{ context::{PrivateContext, UtilityContext}, + keys::getters::get_public_keys, state_vars::{OwnedStateVariable, private_immutable::PrivateImmutable}, - test::{helpers::test_environment::TestEnvironment, mocks::mock_note::MockNote}, + test::{helpers::test_environment::{CreateAccountOptions, TestEnvironment}, mocks::mock_note::MockNote}, }; use crate::protocol::address::AztecAddress; @@ -197,6 +198,22 @@ unconstrained fn initialize_twice_same_tx() { }); } +#[test] +unconstrained fn shared_keys_distinct_addresses_have_distinct_initialization_nullifiers() { + let mut env = TestEnvironment::new(); + + let owner_a = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + let owner_b = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + + assert(owner_a != owner_b); + env.utility_context(|_| { assert_eq(get_public_keys(owner_a).npk_m_hash, get_public_keys(owner_b).npk_m_hash); }); + + let nullifier_a = env.private_context(|context| in_private(context, owner_a).get_initialization_nullifier()); + let nullifier_b = env.private_context(|context| in_private(context, owner_b).get_initialization_nullifier()); + + assert(nullifier_a != nullifier_b); +} + #[test(should_fail_with = "already present")] unconstrained fn initialize_twice_other_tx() { let mut env = TestEnvironment::new(); diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr b/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr index bcf186e894ea..086f51ee3159 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr @@ -12,8 +12,10 @@ use crate::{ }; use crate::protocol::{ - address::AztecAddress, constants::DOM_SEP__INITIALIZATION_NULLIFIER, hash::poseidon2_hash_with_separator, - traits::Packable, + address::AztecAddress, + constants::DOM_SEP__INITIALIZATION_NULLIFIER, + hash::poseidon2_hash_with_separator, + traits::{Packable, ToField}, }; mod test; @@ -86,7 +88,7 @@ impl PrivateMutable { /// Computes the initialization nullifier using the provided secret. fn compute_initialization_nullifier(self, secret: Field) -> Field { poseidon2_hash_with_separator( - [self.storage_slot, secret], + [self.storage_slot, self.owner.to_field(), secret], DOM_SEP__INITIALIZATION_NULLIFIER, ) } diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable/test.nr b/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable/test.nr index f17a4f8121f1..8ead9e9adf37 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable/test.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/private_mutable/test.nr @@ -1,7 +1,8 @@ use crate::{ context::{PrivateContext, UtilityContext}, + keys::getters::get_public_keys, state_vars::{OwnedStateVariable, private_mutable::PrivateMutable}, - test::{helpers::test_environment::TestEnvironment, mocks::mock_note::MockNote}, + test::{helpers::test_environment::{CreateAccountOptions, TestEnvironment}, mocks::mock_note::MockNote}, }; use crate::protocol::address::AztecAddress; @@ -339,6 +340,22 @@ unconstrained fn initialize_or_replace_initialized_settled() { }); } +#[test] +unconstrained fn shared_keys_distinct_addresses_have_distinct_initialization_nullifiers() { + let mut env = TestEnvironment::new(); + + let owner_a = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + let owner_b = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + + assert(owner_a != owner_b); + env.utility_context(|_| { assert_eq(get_public_keys(owner_a).npk_m_hash, get_public_keys(owner_b).npk_m_hash); }); + + let nullifier_a = env.private_context(|context| in_private(context, owner_a).get_initialization_nullifier()); + let nullifier_b = env.private_context(|context| in_private(context, owner_b).get_initialization_nullifier()); + + assert(nullifier_a != nullifier_b); +} + #[test] unconstrained fn get_replacement_note_has_unique_randomness() { let mut env = TestEnvironment::new(); diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim.nr b/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim.nr index 5da2abb76b9b..6dfaa23d053f 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim.nr @@ -1,5 +1,6 @@ use crate::protocol::{ address::AztecAddress, constants::DOM_SEP__SINGLE_USE_CLAIM_NULLIFIER, hash::poseidon2_hash_with_separator, + traits::ToField, }; use crate::{ @@ -82,7 +83,7 @@ impl SingleUseClaim { /// [`SingleUseClaim::assert_claimed`] and [`SingleUseClaim::has_claimed`] to coherently write and read state. fn compute_nullifier(self, owner_nhk_app: Field) -> Field { poseidon2_hash_with_separator( - [owner_nhk_app, self.storage_slot], + [owner_nhk_app, self.storage_slot, self.owner.to_field()], DOM_SEP__SINGLE_USE_CLAIM_NULLIFIER, ) } diff --git a/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim/test.nr b/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim/test.nr index 6faf2ac8cc04..5c75f06e4656 100644 --- a/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim/test.nr +++ b/noir-projects/aztec-nr/aztec/src/state_vars/single_use_claim/test.nr @@ -1,10 +1,11 @@ use crate::{ context::{PrivateContext, UtilityContext}, + keys::getters::get_public_keys, oracle::random::random, state_vars::{OwnedStateVariable, SingleUseClaim}, }; use crate::protocol::{address::AztecAddress, traits::FromField}; -use crate::test::helpers::test_environment::TestEnvironment; +use crate::test::helpers::test_environment::{CreateAccountOptions, TestEnvironment}; global STORAGE_SLOT: Field = 17; @@ -134,6 +135,24 @@ unconstrained fn claim_two_claim_ids_different_state_vars() { }); } +#[test] +unconstrained fn claim_by_owner_does_not_claim_for_shared_key_distinct_address_owner() { + let mut env = TestEnvironment::new(); + + let owner_a = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + let owner_b = env.create_light_account_opts(CreateAccountOptions::new().with_secret(42)); + + assert(owner_a != owner_b); + env.utility_context(|_| { assert_eq(get_public_keys(owner_a).npk_m_hash, get_public_keys(owner_b).npk_m_hash); }); + + env.private_context(|context| { in_private(context, owner_a).claim(); }); + + env.utility_context(|context| { + assert(in_utility(context, STORAGE_SLOT, owner_a).has_claimed()); + assert(!in_utility(context, STORAGE_SLOT, owner_b).has_claimed()); + }); +} + #[test(should_fail_with = "Public keys not registered for account")] unconstrained fn claim_owner_unknown_public_keys() { let env = TestEnvironment::new(); diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/mod.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/mod.nr index 6cd7f18ac34f..a71daa29023b 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/mod.nr @@ -13,7 +13,11 @@ pub mod test_environment; quote { private_call_new_flow_oracle }, // TODO: implement once we support more complex types quote { public_call_new_flow_oracle }, // TODO: implement once we support more complex types quote { set_private_txe_context_oracle }, // TODO: implement once we support more complex types +<<<<<<< HEAD quote { set_tagging_secret_strategy }, // TODO: implement once we support more complex types +======= + quote { set_tagging_secret_strategies }, // TODO: implement once we support more complex types +>>>>>>> origin/v5-next ], )] pub mod txe_oracles; diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/tagging_secret_strategy.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/tagging_secret_strategy.nr index 93f4baa0b0c8..d41ecde29fab 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/tagging_secret_strategy.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/tagging_secret_strategy.nr @@ -1,4 +1,15 @@ +<<<<<<< HEAD use crate::protocol::{point::EmbeddedCurvePoint, traits::{Deserialize, Serialize}, utils::reader::Reader}; +======= +use crate::keys::ecdh_shared_secret::compute_app_siloed_shared_secret; +use crate::protocol::{ + address::AztecAddress, + hash::poseidon2_hash, + point::EmbeddedCurvePoint, + traits::{Deserialize, Serialize, ToField}, + utils::reader::Reader, +}; +>>>>>>> origin/v5-next global NON_INTERACTIVE_HANDSHAKE: u8 = 1; global ARBITRARY_SECRET: u8 = 2; @@ -7,7 +18,11 @@ global INTERACTIVE_HANDSHAKE: u8 = 4; /// How a message's tagging secret is chosen: the wallet's strategy. /// +<<<<<<< HEAD /// This type only exists for tests: a Noir test sets it via `with_tagging_secret_strategy` on +======= +/// This type only exists for tests: a Noir test sets it via `with_default_tag_secret_strategy` on +>>>>>>> origin/v5-next /// [`TestEnvironmentOptions`](crate::test::helpers::test_environment::TestEnvironmentOptions). /// Production wallets express the strategy in PXE; the Noir path only consumes the resolved /// [`ResolvedTaggingStrategy`](crate::messages::delivery::ResolvedTaggingStrategy). @@ -45,18 +60,38 @@ impl TaggingSecretStrategy { /// Validates a raw discriminant, as deserialization must always reject unknown values. fn from_parts(kind: u8, secret: EmbeddedCurvePoint) -> Self { let strategy = Self { kind, secret }; +<<<<<<< HEAD assert( ( ((kind == NON_INTERACTIVE_HANDSHAKE) | (kind == ADDRESS_DERIVED) | (kind == INTERACTIVE_HANDSHAKE)) & secret.is_infinite() ) | (kind == ARBITRARY_SECRET), +======= + let is_no_payload_strategy = + (kind == NON_INTERACTIVE_HANDSHAKE) | (kind == INTERACTIVE_HANDSHAKE) | (kind == ADDRESS_DERIVED); + assert( + (is_no_payload_strategy & secret.is_infinite()) | (kind == ARBITRARY_SECRET), +>>>>>>> origin/v5-next f"unrecognized tagging secret strategy kind: {kind}", ); strategy } } +<<<<<<< HEAD +======= +/// Computes the directional tagging secret PXE derives from an arbitrary shared secret point: the point is app-siloed +/// and the recipient is folded in for direction. Mirrors `AppTaggingSecret.computeDirectional` on the PXE side; tests +/// use it to derive the secret they expect an [`arbitrary_secret`](TaggingSecretStrategy::arbitrary_secret) strategy +/// to produce. +pub fn compute_directional_app_secret(secret: EmbeddedCurvePoint, app: AztecAddress, recipient: AztecAddress) -> Field { + poseidon2_hash( + [compute_app_siloed_shared_secret(secret, app), recipient.to_field()], + ) +} + +>>>>>>> origin/v5-next impl Deserialize for TaggingSecretStrategy { let N: u32 = 3; @@ -81,6 +116,7 @@ mod test { #[test] fn strategy_roundtrips_through_serialization() { let non_interactive = TaggingSecretStrategy::non_interactive_handshake(); +<<<<<<< HEAD let address = TaggingSecretStrategy::address_derived(); let provided = TaggingSecretStrategy::arbitrary_secret(EmbeddedCurvePoint { x: 7, y: 11 }); let interactive = TaggingSecretStrategy::interactive_handshake(); @@ -89,6 +125,16 @@ mod test { assert(TaggingSecretStrategy::deserialize(address.serialize()) == address); assert(TaggingSecretStrategy::deserialize(provided.serialize()) == provided); assert(TaggingSecretStrategy::deserialize(interactive.serialize()) == interactive); +======= + let interactive = TaggingSecretStrategy::interactive_handshake(); + let address = TaggingSecretStrategy::address_derived(); + let provided = TaggingSecretStrategy::arbitrary_secret(EmbeddedCurvePoint { x: 7, y: 11 }); + + assert(TaggingSecretStrategy::deserialize(non_interactive.serialize()) == non_interactive); + assert(TaggingSecretStrategy::deserialize(interactive.serialize()) == interactive); + assert(TaggingSecretStrategy::deserialize(address.serialize()) == address); + assert(TaggingSecretStrategy::deserialize(provided.serialize()) == provided); +>>>>>>> origin/v5-next } #[test(should_fail_with = "unrecognized tagging secret strategy kind")] @@ -98,16 +144,34 @@ mod test { #[test(should_fail_with = "unrecognized tagging secret strategy kind")] fn deserializing_handshake_with_noninfinite_point_fails() { +<<<<<<< HEAD let _ = TaggingSecretStrategy::deserialize([1, 7, 11]); +======= + let _ = TaggingSecretStrategy::deserialize([ + TaggingSecretStrategy::non_interactive_handshake().kind as Field, + 7, + 11, + ]); +>>>>>>> origin/v5-next } #[test(should_fail_with = "unrecognized tagging secret strategy kind")] fn deserializing_address_derived_with_noninfinite_point_fails() { +<<<<<<< HEAD let _ = TaggingSecretStrategy::deserialize([3, 7, 11]); +======= + let _ = TaggingSecretStrategy::deserialize( + [TaggingSecretStrategy::address_derived().kind as Field, 7, 11], + ); +>>>>>>> origin/v5-next } #[test(should_fail_with = "unrecognized tagging secret strategy kind")] fn deserializing_interactive_handshake_with_noninfinite_point_fails() { +<<<<<<< HEAD let _ = TaggingSecretStrategy::deserialize([4, 7, 11]); +======= + let _ = TaggingSecretStrategy::deserialize([TaggingSecretStrategy::interactive_handshake().kind as Field, 7, 11]); +>>>>>>> origin/v5-next } } diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr index c494af854882..806af9e3253a 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr @@ -13,6 +13,7 @@ use crate::{ event::{event_interface::EventInterface, EventMessage}, hash::{compute_secret_hash, hash_args}, messages::{ + delivery::OnchainDeliveryMode, discovery::{ ComputeNoteHash, ComputeNoteNullifier, CustomMessageHandler, process_message::process_message_plaintext, }, @@ -79,6 +80,9 @@ pub struct TestEnvironment { // results in TXE being able to maximize cache usage and not have to recompute account addresses and contract // artifacts, which are relatively expensive operations. light_account_secret: Counter, + // The partial address used for light account creation. Kept separate from the secret (which derives the keys) so + // that light accounts with the same keys but different addresses can be created via `create_light_account_opts`. + light_account_partial_address: Counter, contract_account_secret: Counter, contract_deployment_secret: Counter, contract_deployment_salt: Counter, @@ -88,16 +92,30 @@ pub struct TestEnvironment { /// methods setting each value, e.g.: /// ```noir /// let env = TestEnvironment::new_opts( +<<<<<<< HEAD /// TestEnvironmentOptions::new().with_tagging_secret_strategy(TaggingSecretStrategy::non_interactive_handshake()), /// ); /// ``` pub struct TestEnvironmentOptions { tagging_secret_strategy: Option, +======= +/// TestEnvironmentOptions::new().with_default_tag_secret_strategy( +/// MessageDelivery::onchain_unconstrained(), +/// TaggingSecretStrategy::non_interactive_handshake(), +/// ), +/// ); +/// ``` +pub struct TestEnvironmentOptions { + default_unconstrained_tagging_secret_strategy: Option, + default_constrained_tagging_secret_strategy: Option, + authorize_all_utility_call_targets: bool, +>>>>>>> origin/v5-next } impl TestEnvironmentOptions { /// Creates a new `TestEnvironmentOptions` with default values. pub fn new() -> Self { +<<<<<<< HEAD Self { tagging_secret_strategy: Option::none() } } @@ -108,6 +126,52 @@ impl TestEnvironmentOptions { /// If not set, the wallet hook is left unconfigured and the private execution environment applies its own default. pub fn with_tagging_secret_strategy(&mut self, strategy: TaggingSecretStrategy) -> Self { self.tagging_secret_strategy = Option::some(strategy); +======= + Self { + default_unconstrained_tagging_secret_strategy: Option::none(), + default_constrained_tagging_secret_strategy: Option::none(), + authorize_all_utility_call_targets: false, + } + } + + /// Sets the default [`TaggingSecretStrategy`] the wallet reports for `mode` through the + /// [`resolve_tagging_strategy`](crate::oracle::resolve_tagging_strategy) oracle, affecting message delivery in + /// private executions that do not fix their own delivery derivation. + /// + /// If no strategy is set for either mode, the wallet hook is left unconfigured and the private execution + /// environment applies its own default. A mode left unset while the other is configured falls back to the default + /// [`TaggingSecretStrategy::non_interactive_handshake`], the strategy a PXE `resolveTaggingSecretStrategy` hook + /// typically hardcodes for modes it does not customize. + pub fn with_default_tag_secret_strategy(&mut self, mode: M, strategy: TaggingSecretStrategy) -> Self + where + M: Into, + { + if mode.into() == OnchainDeliveryMode::onchain_unconstrained() { + self.default_unconstrained_tagging_secret_strategy = Option::some(strategy); + } else { + self.default_constrained_tagging_secret_strategy = Option::some(strategy); + } + *self + } + + /// Sets `strategy` for both delivery modes: the equivalent of a PXE `resolveTaggingSecretStrategy` hook that + /// ignores the request's mode. See + /// [`with_default_tag_secret_strategy`](Self::with_default_tag_secret_strategy) to configure a single mode. + pub fn with_default_tag_secret_strategy_all_modes(&mut self, strategy: TaggingSecretStrategy) -> Self { + let _ = self.with_default_tag_secret_strategy(OnchainDeliveryMode::onchain_unconstrained(), strategy); + self.with_default_tag_secret_strategy(OnchainDeliveryMode::onchain_constrained(), strategy) + } + + /// Authorizes all cross-contract utility call targets for the entire test. + /// + /// Removes the need to list targets on each call via + /// [`CallPrivateOptions::with_authorized_utility_call_targets`] and its siblings. + /// + /// By default, cross-contract utility calls are denied, mirroring a wallet that authorizes no such call. Use + /// this in tests that do not care about utility call authorization. + pub fn with_all_utility_call_targets_authorized(&mut self) -> Self { + self.authorize_all_utility_call_targets = true; +>>>>>>> origin/v5-next *self } } @@ -482,6 +546,44 @@ impl DeployOptions { } } +/// Configuration values for [`TestEnvironment::create_light_account_opts`]. Meant to be used by calling `new` and then +/// chaining methods setting each value, e.g.: +/// ```noir +/// env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1)); +/// ``` +/// +/// The account address is derived from both the public keys (which come from the secret) and the partial address. +/// Setting the same secret with different partial addresses produces accounts that share master keys but have distinct +/// addresses. +pub struct CreateAccountOptions { + secret: Option, + partial_address: Option, +} + +impl CreateAccountOptions { + /// Creates a new `CreateAccountOptions` with default values, i.e. the same as if using the `create_light_account` + /// method instead of `create_light_account_opts`. Use the `with_secret` and `with_partial_address` methods to set + /// the desired configuration values. + pub fn new() -> Self { + Self { secret: Option::none(), partial_address: Option::none() } + } + + /// Sets the secret used for key derivation. The secret affects the account's public keys and therefore its address: + /// accounts created with different secrets will have different keys and addresses. + pub fn with_secret(&mut self, secret: Field) -> Self { + self.secret = Option::some(secret); + *self + } + + /// Sets the partial address used for address derivation. The partial address affects the resulting account address + /// but not its keys: accounts created with the same secret but different partial addresses share master keys while + /// having different addresses. + pub fn with_partial_address(&mut self, partial_address: Field) -> Self { + self.partial_address = Option::some(partial_address); + *self + } +} + /// Configuration values for [`TestEnvironment::call_public_opts`]. Meant to be used by calling `new` and then chaining /// methods setting each value, e.g.: /// ```noir @@ -607,18 +709,33 @@ impl TestEnvironment { /// /// ### Sample usage /// ```noir +<<<<<<< HEAD /// let env = TestEnvironment::new_opts( /// TestEnvironmentOptions::new().with_tagging_secret_strategy( /// TaggingSecretStrategy::non_interactive_handshake(), /// ), +======= + /// let strategy = TaggingSecretStrategy::non_interactive_handshake(); + /// let env = TestEnvironment::new_opts( + /// TestEnvironmentOptions::new().with_default_tag_secret_strategy_all_modes(strategy), +>>>>>>> origin/v5-next /// ); /// ``` pub unconstrained fn new_opts(options: TestEnvironmentOptions) -> Self { assert_compatible_oracle_version(); txe_oracles::assert_compatible_txe_oracle_version(); +<<<<<<< HEAD // Forward the configured strategy to the wallet. txe_oracles::set_tagging_secret_strategy(options.tagging_secret_strategy); +======= + txe_oracles::set_tagging_secret_strategies( + options.default_unconstrained_tagging_secret_strategy, + options.default_constrained_tagging_secret_strategy, + ); + + txe_oracles::set_authorize_all_utility_call_targets(options.authorize_all_utility_call_targets); +>>>>>>> origin/v5-next Self { // Use an offset to avoid secret collision with account secrets. Without this, when @@ -626,6 +743,10 @@ impl TestEnvironment { // secrets (e.g., Token1 with deployment secret=1 and liquidity_provider with account // secret=1), causing key collisions since keys are derived from the secret alone. light_account_secret: Counter::new(), + // The partial address counter does not need an offset for the same reason the salt counter doesn't: keys + // are derived from the secret alone, so a collision between a partial address and a secret value has no + // effect on key derivation. + light_account_partial_address: Counter::new(), contract_account_secret: Counter::new_with_offset(1_000), contract_deployment_secret: Counter::new_with_offset(2_000), // The salt counter does not need an offset because keys (derived from secret) and salt are unrelated: a @@ -887,7 +1008,11 @@ impl TestEnvironment { sender: EthAddress, recipient: AztecAddress, ) -> Field { +<<<<<<< HEAD self.send_l1_to_l2_message_from_secret_hash(content, compute_secret_hash(secret), sender, recipient) +======= + self.send_l1_to_l2_message_from_secret_hash(content, compute_secret_hash([secret]), sender, recipient) +>>>>>>> origin/v5-next } /// Variant of [`send_l1_to_l2_message`](TestEnvironment::send_l1_to_l2_message) that takes the secret hash @@ -945,8 +1070,24 @@ impl TestEnvironment { /// Each call to `create_light_account` will return a different address, and so it can be called repeatedly to /// generate multiple addresses. These addresses are also different from the ones that `create_contract_account` /// returns, and so these two functions can be mixed and match to create a set of unique accounts. + /// + /// See [`create_light_account_opts`](TestEnvironment::create_light_account_opts) for a variant that allows + /// controlling the account's secret and partial address, e.g. to create accounts that share keys but have + /// different addresses. pub unconstrained fn create_light_account(&mut self) -> AztecAddress { - let test_account = txe_oracles::create_account(self.light_account_secret.next()); + self.create_light_account_opts(CreateAccountOptions::new()) + } + + /// Variant of `create_light_account` which allows specifying configuration values via `CreateAccountOptions`, such + /// as a custom secret or partial address. If not specified, the secret and partial address default to values from + /// internal counters. + /// + /// Setting the same secret with different partial addresses produces accounts that share master keys but have + /// distinct addresses. + pub unconstrained fn create_light_account_opts(&mut self, opts: CreateAccountOptions) -> AztecAddress { + let secret = opts.secret.unwrap_or_else(|| self.light_account_secret.next()); + let partial_address = opts.partial_address.unwrap_or_else(|| self.light_account_partial_address.next()); + let test_account = txe_oracles::create_account(secret, partial_address); test_account.address } diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/accounts.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/accounts.nr index be474ae76289..72fe24a29319 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/accounts.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/accounts.nr @@ -2,7 +2,7 @@ use crate::{ authwit::auth::{compute_authwit_message_hash, IS_VALID_SELECTOR}, context::calls::PrivateStaticCall, keys::getters::get_public_keys, - test::helpers::{test_environment::TestEnvironment, txe_oracles}, + test::helpers::{test_environment::{CreateAccountOptions, TestEnvironment}, txe_oracles}, }; use crate::protocol::abis::function_selector::FunctionSelector; @@ -16,6 +16,45 @@ unconstrained fn create_light_account_does_not_repeat_accounts() { assert(first_account != second_account); } +#[test] +unconstrained fn create_light_account_opts_same_secret_and_partial_address_repeats_address() { + let mut env = TestEnvironment::new(); + + let first_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1)); + let second_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1)); + + assert_eq(first_account, second_account); +} + +#[test] +unconstrained fn create_light_account_opts_shared_secret_distinct_partial_address_shares_keys_not_address() { + let mut env = TestEnvironment::new(); + + let first_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1)); + let second_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(2)); + + assert(first_account != second_account); + env.utility_context(|_| { + assert_eq(get_public_keys(first_account).npk_m_hash, get_public_keys(second_account).npk_m_hash); + }); +} + +#[test] +unconstrained fn create_light_account_opts_distinct_secret_shared_partial_address_differ() { + let mut env = TestEnvironment::new(); + + let first_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1)); + let second_account = + env.create_light_account_opts(CreateAccountOptions::new().with_secret(43).with_partial_address(1)); + + assert(first_account != second_account); +} + #[test] unconstrained fn create_contract_account_does_not_repeat_accounts() { let mut env = TestEnvironment::new(); diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/l1_to_l2_messages.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/l1_to_l2_messages.nr index 41e0ae8dd4ba..47603eeeff21 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/l1_to_l2_messages.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/l1_to_l2_messages.nr @@ -15,7 +15,11 @@ unconstrained fn consume_seeded_message_from_secret() { let leaf_index = env.send_l1_to_l2_message(CONTENT, SECRET, sender, recipient); env.private_context_at(recipient, |context| { +<<<<<<< HEAD context.consume_l1_to_l2_message(CONTENT, SECRET, sender, leaf_index); +======= + context.consume_l1_to_l2_message(CONTENT, [SECRET], sender, leaf_index); +>>>>>>> origin/v5-next }); } @@ -26,10 +30,17 @@ unconstrained fn consume_seeded_message_from_secret_hash() { let recipient = AztecAddress::from_field(17); let leaf_index = +<<<<<<< HEAD env.send_l1_to_l2_message_from_secret_hash(CONTENT, compute_secret_hash(SECRET), sender, recipient); env.private_context_at(recipient, |context| { context.consume_l1_to_l2_message(CONTENT, SECRET, sender, leaf_index); +======= + env.send_l1_to_l2_message_from_secret_hash(CONTENT, compute_secret_hash([SECRET]), sender, recipient); + + env.private_context_at(recipient, |context| { + context.consume_l1_to_l2_message(CONTENT, [SECRET], sender, leaf_index); +>>>>>>> origin/v5-next }); } diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/resolve_tagging_strategy.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/resolve_tagging_strategy.nr index b02994d2e6ca..408780bec8a4 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/resolve_tagging_strategy.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/test_environment/test/resolve_tagging_strategy.nr @@ -1,15 +1,69 @@ use crate::{ +<<<<<<< HEAD keys::ecdh_shared_secret::compute_app_siloed_shared_secret, messages::delivery::{OnchainDeliveryMode, ResolvedTaggingStrategy}, oracle::resolve_tagging_strategy::resolve_tagging_strategy, protocol::{address::AztecAddress, hash::poseidon2_hash, point::EmbeddedCurvePoint, traits::{FromField, ToField}}, test::helpers::{ tagging_secret_strategy::TaggingSecretStrategy, +======= + messages::delivery::{MessageDelivery, OnchainDeliveryMode, ResolvedTaggingStrategy}, + oracle::resolve_tagging_strategy::resolve_tagging_strategy, + protocol::{address::AztecAddress, point::EmbeddedCurvePoint, traits::FromField}, + test::helpers::{ + tagging_secret_strategy::{compute_directional_app_secret, TaggingSecretStrategy}, +>>>>>>> origin/v5-next test_environment::{TestEnvironment, TestEnvironmentOptions}, }, }; #[test] +<<<<<<< HEAD +======= +unconstrained fn an_unset_constrained_mode_falls_back_to_the_default_strategy() { + // Only the unconstrained mode is configured: the constrained mode falls back to the default non-interactive + // handshake strategy. + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_unconstrained(), + TaggingSecretStrategy::arbitrary_secret(EmbeddedCurvePoint { x: 7, y: 11 }), + )); + let app = env.create_contract_account(); + let recipient = env.create_light_account(); + + env.private_context_at(app, |_| { + let resolved = resolve_tagging_strategy( + AztecAddress::from_field(1), + recipient, + OnchainDeliveryMode::onchain_constrained(), + ); + assert_eq(resolved, ResolvedTaggingStrategy::non_interactive_handshake()); + }); +} + +#[test] +unconstrained fn an_unset_unconstrained_mode_falls_back_to_the_default_strategy() { + // Only the constrained mode is configured: the unconstrained mode falls back to the default non-interactive + // handshake strategy for an external recipient. + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_constrained(), + TaggingSecretStrategy::interactive_handshake(), + )); + let app = env.create_contract_account(); + let sender = env.create_light_account(); + let recipient = AztecAddress::from_field(8); + + env.private_context_at(app, |_| { + let resolved = resolve_tagging_strategy( + sender, + recipient, + OnchainDeliveryMode::onchain_unconstrained(), + ); + assert_eq(resolved, ResolvedTaggingStrategy::non_interactive_handshake()); + }); +} + +#[test] +>>>>>>> origin/v5-next unconstrained fn defaults_an_unconstrained_self_send_to_the_address_derived_shared_secret() { let mut env = TestEnvironment::new(); let app = env.create_contract_account(); @@ -69,10 +123,16 @@ unconstrained fn defaults_constrained_delivery_to_a_non_interactive_handshake() #[test] unconstrained fn constrained_delivery_succeeds_with_a_configured_strategy() { +<<<<<<< HEAD let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_tagging_secret_strategy( TaggingSecretStrategy::non_interactive_handshake(), )); // The hook path looks up the executing contract's class ID, so run in a deployed contract's context. +======= + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy_all_modes( + TaggingSecretStrategy::non_interactive_handshake(), + )); +>>>>>>> origin/v5-next let app = env.create_contract_account(); let recipient = env.create_light_account(); @@ -88,12 +148,21 @@ unconstrained fn constrained_delivery_succeeds_with_a_configured_strategy() { #[test] unconstrained fn applies_a_configured_interactive_handshake_strategy() { +<<<<<<< HEAD let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_tagging_secret_strategy( TaggingSecretStrategy::interactive_handshake(), )); // The hook path looks up the executing contract's class ID, so run in a deployed contract's context. let app = env.create_contract_account(); let recipient = AztecAddress::from_field(8); +======= + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_constrained(), + TaggingSecretStrategy::interactive_handshake(), + )); + let app = env.create_contract_account(); + let recipient = env.create_light_account(); +>>>>>>> origin/v5-next env.private_context_at(app, |_| { let resolved = resolve_tagging_strategy( @@ -107,10 +176,17 @@ unconstrained fn applies_a_configured_interactive_handshake_strategy() { #[test] unconstrained fn applies_the_strategy_set_in_the_options() { +<<<<<<< HEAD let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_tagging_secret_strategy( TaggingSecretStrategy::arbitrary_secret(EmbeddedCurvePoint { x: 7, y: 11 }), )); // The hook path looks up the executing contract's class ID, so run in a deployed contract's context. +======= + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_unconstrained(), + TaggingSecretStrategy::arbitrary_secret(EmbeddedCurvePoint { x: 7, y: 11 }), + )); +>>>>>>> origin/v5-next let app = env.create_contract_account(); let recipient = AztecAddress::from_field(8); @@ -126,33 +202,65 @@ unconstrained fn applies_the_strategy_set_in_the_options() { #[test] unconstrained fn app_silos_an_arbitrary_secret_point() { +<<<<<<< HEAD let point = EmbeddedCurvePoint { x: 7, y: 11 }; let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_tagging_secret_strategy( TaggingSecretStrategy::arbitrary_secret(point), )); // The hook path looks up the executing contract's class ID, so run in a deployed contract's context. +======= + // Both delivery modes resolve the configured arbitrary secret to the same app-siloed point. Mode-blindness + // is deliberate: PXE's tagging-strategy hook resolves whatever the wallet configured regardless of mode, and + // the TXE oracle must match that behavior. Constrained delivery rejects unsound secrets later, not here. + let point = EmbeddedCurvePoint { x: 7, y: 11 }; + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy_all_modes( + TaggingSecretStrategy::arbitrary_secret(point), + )); +>>>>>>> origin/v5-next let app = env.create_contract_account(); let recipient = AztecAddress::from_field(8); env.private_context_at(app, |_| { +<<<<<<< HEAD let resolved = resolve_tagging_strategy( +======= + let expected_secret = compute_directional_app_secret(point, app, recipient); + + let resolved_unconstrained = resolve_tagging_strategy( +>>>>>>> origin/v5-next AztecAddress::from_field(1), recipient, OnchainDeliveryMode::onchain_unconstrained(), ); +<<<<<<< HEAD // PXE app-silos the raw point before handing it over, then folds in the recipient for direction. This mirrors // `AppTaggingSecret.computeDirectional` on the PXE side. let app_secret = compute_app_siloed_shared_secret(point, app); let expected_secret = poseidon2_hash([app_secret, recipient.to_field()]); assert_eq(resolved, ResolvedTaggingStrategy::unconstrained_secret(expected_secret)); +======= + assert_eq(resolved_unconstrained, ResolvedTaggingStrategy::unconstrained_secret(expected_secret)); + + let resolved_constrained = resolve_tagging_strategy( + AztecAddress::from_field(1), + recipient, + OnchainDeliveryMode::onchain_constrained(), + ); + assert_eq(resolved_constrained, ResolvedTaggingStrategy::unconstrained_secret(expected_secret)); +>>>>>>> origin/v5-next }); } #[test] unconstrained fn overrides_a_configured_arbitrary_secret_for_an_unconstrained_self_send() { let point = EmbeddedCurvePoint { x: 7, y: 11 }; +<<<<<<< HEAD let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_tagging_secret_strategy( +======= + let mut env = TestEnvironment::new_opts(TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_unconstrained(), +>>>>>>> origin/v5-next TaggingSecretStrategy::arbitrary_secret(point), )); let app = env.create_contract_account(); @@ -168,8 +276,12 @@ unconstrained fn overrides_a_configured_arbitrary_secret_for_an_unconstrained_se // A self-send forces an address-derived secret even with an arbitrary secret configured. The resolved // secret is unconstrained, but not the app-siloed arbitrary point the configured secret would have produced. +<<<<<<< HEAD let app_secret = compute_app_siloed_shared_secret(point, app); let arbitrary_secret = poseidon2_hash([app_secret, recipient.to_field()]); +======= + let arbitrary_secret = compute_directional_app_secret(point, app, recipient); +>>>>>>> origin/v5-next assert(resolved.is_unconstrained_secret()); assert(resolved != ResolvedTaggingStrategy::unconstrained_secret(arbitrary_secret)); }); diff --git a/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr b/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr index ad6a98ffcaae..c7d1dab60f56 100644 --- a/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr +++ b/noir-projects/aztec-nr/aztec/src/test/helpers/txe_oracles.nr @@ -21,8 +21,18 @@ use crate::protocol::{ /// [`oracle::version`](crate::oracle::version), which covers oracles used during contract execution by PXE. /// /// The TypeScript counterparts are in `yarn-project/txe/src/txe_oracle_version.ts`. +<<<<<<< HEAD +<<<<<<< HEAD pub global TXE_ORACLE_VERSION_MAJOR: Field = 2; pub global TXE_ORACLE_VERSION_MINOR: Field = 3; +======= +pub global TXE_ORACLE_VERSION_MAJOR: Field = 3; +pub global TXE_ORACLE_VERSION_MINOR: Field = 1; +>>>>>>> origin/v5-next +======= +pub global TXE_ORACLE_VERSION_MAJOR: Field = 4; +pub global TXE_ORACLE_VERSION_MINOR: Field = 0; +>>>>>>> origin/v5-next /// Asserts that the TXE oracle interface version is compatible. pub unconstrained fn assert_compatible_txe_oracle_version() { @@ -249,7 +259,7 @@ pub unconstrained fn deploy_oracle( ) -> [Field; CONTRACT_INSTANCE_LENGTH] {} #[oracle(aztec_txe_createAccount)] -pub unconstrained fn create_account(secret: Field) -> TestAccount {} +pub unconstrained fn create_account(secret: Field, partial_address: Field) -> TestAccount {} #[oracle(aztec_txe_addAccount)] pub unconstrained fn add_account(secret: Field) -> TestAccount {} @@ -265,8 +275,19 @@ pub unconstrained fn send_l1_to_l2_message( recipient: AztecAddress, ) -> Field {} +<<<<<<< HEAD #[oracle(aztec_txe_setTaggingSecretStrategy)] pub unconstrained fn set_tagging_secret_strategy(strategy: Option) {} +======= +#[oracle(aztec_txe_setTaggingSecretStrategies)] +pub unconstrained fn set_tagging_secret_strategies( + unconstrained_strategy: Option, + constrained_strategy: Option, +) {} + +#[oracle(aztec_txe_setAuthorizeAllUtilityCallTargets)] +pub unconstrained fn set_authorize_all_utility_call_targets(authorize_all: bool) {} +>>>>>>> origin/v5-next #[oracle(aztec_txe_privateCallNewFlow)] unconstrained fn private_call_new_flow_oracle( diff --git a/noir-projects/aztec-nr/uint-note/src/uint_note.nr b/noir-projects/aztec-nr/uint-note/src/uint_note.nr index 6aa68f42f73b..ac66bffc6e47 100644 --- a/noir-projects/aztec-nr/uint-note/src/uint_note.nr +++ b/noir-projects/aztec-nr/uint-note/src/uint_note.nr @@ -172,6 +172,19 @@ pub struct PartialUintNote { impl PartialUintNote { /// Completes the partial note, creating a new note that can be used like any other UintNote. + /// + /// The validity commitment only proves that this contract created this exact partial note designating `completer` + /// (see [`compute_validity_commitment`](Self::compute_validity_commitment)). The `storage_slot` and `value` + /// arguments are not bound by it, so the caller is trusted to provide correct values for them. Nothing checks + /// that the completer is the entity performing the call. Contracts must authenticate the caller themselves, + /// typically by passing `msg_sender()` as `completer`. + /// + /// WARNING: completion is not single-use. Nothing prevents the completer from completing the same partial note + /// multiple times, inserting a new note hash each time. Every completion must therefore be independently paid for + /// or authorized in the completing function itself (e.g. by debiting the completer's balance on each call), never + /// granting value at creation to be redeemed at completion. Completing more than once is otherwise harmless to + /// the contract, but wasteful for the completer. The recipient only discovers the first completion, so anything + /// carried by further ones is lost. pub fn complete(self, context: PublicContext, completer: AztecAddress, storage_slot: Field, value: u128) { // A note with a value of zero is valid, but we cannot currently complete a partial note with such a value // because this will result in the completion log having its last field set to 0. Public logs currently do not @@ -179,8 +192,7 @@ impl PartialUintNote { // last field (the value), and note discovery failing. TODO(#11636): remove this assert(value != 0, "Cannot complete a PartialUintNote with a value of 0"); - // We verify that the partial note we're completing is valid (i.e. completer is correct, it uses the correct - // state variable's storage slot, and it is internally consistent). + // We verify that `completer` matches the completer designated when this contract created this partial note. let validity_commitment = self.compute_validity_commitment(completer); // Safety: we're using the existence of the nullifier as proof of the contract having validated the partial // note's preimage, which is safe. @@ -209,8 +221,7 @@ impl PartialUintNote { storage_slot: Field, value: u128, ) { - // We verify that the partial note we're completing is valid (i.e. completer is correct, it uses the correct - // state variable's storage slot, and it is internally consistent). + // We verify that `completer` matches the completer designated when this contract created this partial note. let validity_commitment = self.compute_validity_commitment(completer); let siloed_validity_commitment = compute_siloed_nullifier(context.this_address(), validity_commitment); @@ -230,11 +241,11 @@ impl PartialUintNote { context.push_note_hash(self.compute_complete_note_hash(storage_slot, value)); } - /// Computes a validity commitment for this partial note. The commitment cryptographically binds the note's private - /// data with the designated completer address. When the note is later completed in public execution, we can load - /// this commitment from the nullifier tree and verify that both the partial note (e.g. that the storage slot - /// corresponds to the correct owner, and that we're using the correct state variable) and completer are - /// legitimate. + /// Computes a validity commitment for this partial note. + /// + /// The commitment cryptographically binds the note's private content with the designated completer address. When + /// the note is later completed, the commitment is looked up in the nullifier tree to verify that this contract + /// created this exact partial note designating that completer. pub fn compute_validity_commitment(self, completer: AztecAddress) -> Field { poseidon2_hash_with_separator( [self.commitment, completer.to_field()], diff --git a/noir-projects/contract-snapshots/tests/snapshots/expand/avm_gadgets_test_contract/snapshots__expanded.snap b/noir-projects/contract-snapshots/tests/snapshots/expand/avm_gadgets_test_contract/snapshots__expanded.snap index 64e7f25150e8..2d444b2cb24b 100644 --- a/noir-projects/contract-snapshots/tests/snapshots/expand/avm_gadgets_test_contract/snapshots__expanded.snap +++ b/noir-projects/contract-snapshots/tests/snapshots/expand/avm_gadgets_test_contract/snapshots__expanded.snap @@ -2,7 +2,6 @@ source: tests/snapshots.rs expression: stdout --- - use aztec::macros::aztec; use aztec::macros::aztec; @@ -119,20 +118,20 @@ contract AvmGadgetsTest { }) } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_hash(_packed_note: BoundedVec, _owner: aztec::protocol::address::AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_nullifier(_unique_note_hash: Field, _packed_note: BoundedVec, _owner: aztec::protocol::address::AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } /// Receives offchain messages into this contract's offchain inbox for subsequent processing. diff --git a/noir-projects/contract-snapshots/tests/snapshots/expand/avm_test_contract/snapshots__expanded.snap b/noir-projects/contract-snapshots/tests/snapshots/expand/avm_test_contract/snapshots__expanded.snap index 65d8706684a0..2dbf1a424c0a 100644 --- a/noir-projects/contract-snapshots/tests/snapshots/expand/avm_test_contract/snapshots__expanded.snap +++ b/noir-projects/contract-snapshots/tests/snapshots/expand/avm_test_contract/snapshots__expanded.snap @@ -2,7 +2,6 @@ source: tests/snapshots.rs expression: stdout --- - use aztec::macros::aztec; use aztec::macros::aztec; @@ -261,6 +260,13 @@ pub contract AvmTest { #[deprecated(deny, "Direct invocation of public functions is not supported. You attempted to call variable_base_msm. See https://docs.aztec.network/errors/6")] #[contract_library_method] fn variable_base_msm(scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> EmbeddedCurvePoint; +<<<<<<< HEAD +======= + + #[deprecated(deny, "Direct invocation of public functions is not supported. You attempted to call variable_base_msm_with_point. See https://docs.aztec.network/errors/6")] + #[contract_library_method] + fn variable_base_msm_with_point(px: Field, py: Field, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> EmbeddedCurvePoint; +>>>>>>> origin/v5-next #[deprecated(deny, "Direct invocation of public functions is not supported. You attempted to call pedersen_commit. See https://docs.aztec.network/errors/6")] #[contract_library_method] @@ -709,20 +715,20 @@ pub contract AvmTest { }) } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_hash(_packed_note: BoundedVec, _owner: AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_nullifier(_unique_note_hash: Field, _packed_note: BoundedVec, _owner: AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } /// Receives offchain messages into this contract's offchain inbox for subsequent processing. @@ -816,10 +822,47 @@ pub contract AvmTest { aztec::context::calls::PublicCall::<13, 1, ()>::new(self.target_contract, selector, "new_note_hash", serialized_params) } - pub fn nullifier_collision(self, nullifier: Field) -> aztec::context::calls::PublicCall<19, 1, ()> { - let serialized_params: [Field; 1] = nullifier.serialize(); - let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); - aztec::context::calls::PublicCall::<19, 1, ()>::new(self.target_contract, selector, "nullifier_collision", serialized_params) + pub fn variable_base_msm_with_point(self, px: Field, py: Field, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> aztec::context::calls::PublicCall<28, 6, EmbeddedCurvePoint> { + let mut serialized_params: [Field; 6] = [0_Field; 6]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = px.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = py.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(301342598_Field); + aztec::context::calls::PublicCall::<28, 6, EmbeddedCurvePoint>::new(self.target_contract, selector, "variable_base_msm_with_point", serialized_params) } pub fn get_l2_gas_left(self) -> aztec::context::calls::PublicCall<15, 0, u32> { @@ -828,6 +871,7 @@ pub contract AvmTest { aztec::context::calls::PublicCall::<15, 0, u32>::new(self.target_contract, selector, "get_l2_gas_left", serialized_params) } +<<<<<<< HEAD pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) -> aztec::context::calls::PublicCall<19, 2, bool> { let mut serialized_params: [Field; 2] = [0_Field; 2]; let mut offset: u32 = 0_u32; @@ -845,6 +889,12 @@ pub contract AvmTest { offset = offset + serialized_member_len; let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); aztec::context::calls::PublicCall::<19, 2, bool>::new(self.target_contract, selector, "l1_to_l2_msg_exists", serialized_params) +======= + pub fn nullifier_collision(self, nullifier: Field) -> aztec::context::calls::PublicCall<19, 1, ()> { + let serialized_params: [Field; 1] = nullifier.serialize(); + let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); + aztec::context::calls::PublicCall::<19, 1, ()>::new(self.target_contract, selector, "nullifier_collision", serialized_params) +>>>>>>> origin/v5-next } pub fn add_storage_map(self, to: AztecAddress, amount: u32) -> aztec::context::calls::PublicCall<15, 2, Field> { @@ -866,6 +916,7 @@ pub contract AvmTest { aztec::context::calls::PublicCall::<15, 2, Field>::new(self.target_contract, selector, "add_storage_map", serialized_params) } +<<<<<<< HEAD pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) -> aztec::context::calls::PublicCall<12, 33, ()> { let mut serialized_params: [Field; 33] = [0_Field; 33]; let mut offset: u32 = 0_u32; @@ -915,16 +966,30 @@ pub contract AvmTest { let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; +======= + pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) -> aztec::context::calls::PublicCall<19, 2, bool> { + let mut serialized_params: [Field; 2] = [0_Field; 2]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = msg_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; +>>>>>>> origin/v5-next }; offset = offset + serialized_member_len; - let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); - let serialized_member_len: u32 = ::N; + let serialized_member: [Field; 1] = msg_leaf_index.serialize(); + let serialized_member_len: u32 = ::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; }; offset = offset + serialized_member_len; +<<<<<<< HEAD let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); aztec::context::calls::PublicCall::<12, 33, ()>::new(self.target_contract, selector, "bulk_testing", serialized_params) +======= + let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); + aztec::context::calls::PublicCall::<19, 2, bool>::new(self.target_contract, selector, "l1_to_l2_msg_exists", serialized_params) +>>>>>>> origin/v5-next } pub fn variable_base_msm(self, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> aztec::context::calls::PublicCall<17, 4, EmbeddedCurvePoint> { @@ -1132,6 +1197,67 @@ pub contract AvmTest { aztec::context::calls::PublicCall::<25, 2, Field>::new(self.target_contract, selector, "nested_static_call_to_add", serialized_params) } + pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) -> aztec::context::calls::PublicCall<12, 33, ()> { + let mut serialized_params: [Field; 33] = [0_Field; 33]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 10 * 1] = args_field.serialize(); + let serialized_member_len: u32 = <[Field; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 10 * 1] = args_u8.serialize(); + let serialized_member_len: u32 = <[u8; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = get_instance_for_address.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_deployer.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_class_id.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_initialization_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_immutables_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 7 * 1] = schnorr_inputs.serialize(); + let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); + aztec::context::calls::PublicCall::<12, 33, ()>::new(self.target_contract, selector, "bulk_testing", serialized_params) + } + pub fn to_le_bits(self, input: Field) -> aztec::context::calls::PublicCall<10, 1, [bool; 16]> { let serialized_params: [Field; 1] = input.serialize(); let selector: FunctionSelector = FunctionSelector::from_field(2961959597_Field); @@ -1718,7 +1844,15 @@ pub contract AvmTest { unconstrained fn sync_state(scope: AztecAddress) { let address: AztecAddress = aztec::context::UtilityContext::new().this_address(); +<<<<<<< HEAD +<<<<<<< HEAD + aztec::messages::discovery::do_sync_state(address, _compute_note_hash, _compute_note_nullifier, Option::, aztec::oracle::tx_resolution::ResolvedTx, AztecAddress)>::none(), Option:: aztec::unconstrained_array::UnconstrainedArray>::some(aztec::messages::processing::offchain::sync_inbox), scope); +======= + aztec::messages::discovery::do_sync_state(address, _compute_note_hash, _compute_note_nullifier, Option::, aztec::messages::processing::MessageContext, AztecAddress)>::none(), Option:: aztec::unconstrained_array::UnconstrainedArray>::some(aztec::messages::processing::offchain::sync_inbox), scope); +>>>>>>> origin/v5-next +======= aztec::messages::discovery::do_sync_state(address, _compute_note_hash, _compute_note_nullifier, Option::, aztec::oracle::tx_resolution::ResolvedTx, AztecAddress)>::none(), Option:: aztec::unconstrained_array::UnconstrainedArray>::some(aztec::messages::processing::offchain::sync_inbox), scope); +>>>>>>> origin/v5-next } pub struct offchain_receive_parameters { @@ -1816,12 +1950,49 @@ pub contract AvmTest { } } - pub fn nullifier_collision(self, nullifier: Field) { - let serialized_params: [Field; 1] = nullifier.serialize(); - let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); + pub fn variable_base_msm_with_point(self, px: Field, py: Field, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> EmbeddedCurvePoint { + let mut serialized_params: [Field; 6] = [0_Field; 6]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = px.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = py.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(301342598_Field); // Safety: comment added by `nargo expand` unsafe { - aztec::context::calls::PublicCall::<19, 1, ()>::new(self.address, selector, "nullifier_collision", serialized_params).call(self.context) + aztec::context::calls::PublicCall::<28, 6, EmbeddedCurvePoint>::new(self.address, selector, "variable_base_msm_with_point", serialized_params).call(self.context) } } @@ -1834,6 +2005,7 @@ pub contract AvmTest { } } +<<<<<<< HEAD pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) -> bool { let mut serialized_params: [Field; 2] = [0_Field; 2]; let mut offset: u32 = 0_u32; @@ -1850,9 +2022,14 @@ pub contract AvmTest { }; offset = offset + serialized_member_len; let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); +======= + pub fn nullifier_collision(self, nullifier: Field) { + let serialized_params: [Field; 1] = nullifier.serialize(); + let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); +>>>>>>> origin/v5-next // Safety: comment added by `nargo expand` unsafe { - aztec::context::calls::PublicCall::<19, 2, bool>::new(self.address, selector, "l1_to_l2_msg_exists", serialized_params).call(self.context) + aztec::context::calls::PublicCall::<19, 1, ()>::new(self.address, selector, "nullifier_collision", serialized_params).call(self.context) } } @@ -1878,6 +2055,7 @@ pub contract AvmTest { } } +<<<<<<< HEAD pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) { let mut serialized_params: [Field; 33] = [0_Field; 33]; let mut offset: u32 = 0_u32; @@ -1927,18 +2105,34 @@ pub contract AvmTest { let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; +======= + pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) -> bool { + let mut serialized_params: [Field; 2] = [0_Field; 2]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = msg_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; +>>>>>>> origin/v5-next }; offset = offset + serialized_member_len; - let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); - let serialized_member_len: u32 = ::N; + let serialized_member: [Field; 1] = msg_leaf_index.serialize(); + let serialized_member_len: u32 = ::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; }; offset = offset + serialized_member_len; +<<<<<<< HEAD let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); // Safety: comment added by `nargo expand` unsafe { aztec::context::calls::PublicCall::<12, 33, ()>::new(self.address, selector, "bulk_testing", serialized_params).call(self.context) +======= + let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); + // Safety: comment added by `nargo expand` + unsafe { + aztec::context::calls::PublicCall::<19, 2, bool>::new(self.address, selector, "l1_to_l2_msg_exists", serialized_params).call(self.context) +>>>>>>> origin/v5-next } } @@ -2189,6 +2383,70 @@ pub contract AvmTest { } } + pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) { + let mut serialized_params: [Field; 33] = [0_Field; 33]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 10 * 1] = args_field.serialize(); + let serialized_member_len: u32 = <[Field; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 10 * 1] = args_u8.serialize(); + let serialized_member_len: u32 = <[u8; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = get_instance_for_address.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_deployer.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_class_id.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_initialization_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_immutables_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 7 * 1] = schnorr_inputs.serialize(); + let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); + // Safety: comment added by `nargo expand` + unsafe { + aztec::context::calls::PublicCall::<12, 33, ()>::new(self.address, selector, "bulk_testing", serialized_params).call(self.context) + } + } + pub fn to_le_bits(self, input: Field) -> [bool; 16] { let serialized_params: [Field; 1] = input.serialize(); let selector: FunctionSelector = FunctionSelector::from_field(2961959597_Field); @@ -3021,10 +3279,47 @@ pub contract AvmTest { self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); } - pub fn nullifier_collision(self, nullifier: Field) { - let serialized_params: [Field; 1] = nullifier.serialize(); - let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); - let calldata: [Field; 1 + 1] = [selector.to_field()].concat(serialized_params); + pub fn variable_base_msm_with_point(self, px: Field, py: Field, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) { + let mut serialized_params: [Field; 6] = [0_Field; 6]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = px.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = py.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_lo.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = scalar2_hi.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(301342598_Field); + let calldata: [Field; 1 + 6] = [selector.to_field()].concat(serialized_params); let calldata_hash: Field = aztec::hash::hash_calldata_array(calldata); aztec::oracle::execution_cache::store(calldata, calldata_hash); self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); @@ -3039,6 +3334,7 @@ pub contract AvmTest { self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); } +<<<<<<< HEAD pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) { let mut serialized_params: [Field; 2] = [0_Field; 2]; let mut offset: u32 = 0_u32; @@ -3056,6 +3352,12 @@ pub contract AvmTest { offset = offset + serialized_member_len; let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); let calldata: [Field; 1 + 2] = [selector.to_field()].concat(serialized_params); +======= + pub fn nullifier_collision(self, nullifier: Field) { + let serialized_params: [Field; 1] = nullifier.serialize(); + let selector: FunctionSelector = FunctionSelector::from_field(2417179850_Field); + let calldata: [Field; 1 + 1] = [selector.to_field()].concat(serialized_params); +>>>>>>> origin/v5-next let calldata_hash: Field = aztec::hash::hash_calldata_array(calldata); aztec::oracle::execution_cache::store(calldata, calldata_hash); self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); @@ -3083,6 +3385,7 @@ pub contract AvmTest { self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); } +<<<<<<< HEAD pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) { let mut serialized_params: [Field; 33] = [0_Field; 33]; let mut offset: u32 = 0_u32; @@ -3132,16 +3435,30 @@ pub contract AvmTest { let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; +======= + pub fn l1_to_l2_msg_exists(self, msg_hash: Field, msg_leaf_index: Field) { + let mut serialized_params: [Field; 2] = [0_Field; 2]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 1] = msg_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; +>>>>>>> origin/v5-next }; offset = offset + serialized_member_len; - let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); - let serialized_member_len: u32 = ::N; + let serialized_member: [Field; 1] = msg_leaf_index.serialize(); + let serialized_member_len: u32 = ::N; for i in 0_u32..serialized_member_len { serialized_params[i + offset] = serialized_member[i]; }; offset = offset + serialized_member_len; +<<<<<<< HEAD let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); let calldata: [Field; 1 + 33] = [selector.to_field()].concat(serialized_params); +======= + let selector: FunctionSelector = FunctionSelector::from_field(3972971575_Field); + let calldata: [Field; 1 + 2] = [selector.to_field()].concat(serialized_params); +>>>>>>> origin/v5-next let calldata_hash: Field = aztec::hash::hash_calldata_array(calldata); aztec::oracle::execution_cache::store(calldata, calldata_hash); self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); @@ -3394,6 +3711,70 @@ pub contract AvmTest { self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); } + pub fn bulk_testing(self, args_field: [Field; 10], args_u8: [u8; 10], get_instance_for_address: AztecAddress, expected_deployer: AztecAddress, expected_class_id: ContractClassId, expected_initialization_hash: Field, expected_immutables_hash: Field, schnorr_inputs: [Field; 7], skip_strictly_limited_side_effects: bool) { + let mut serialized_params: [Field; 33] = [0_Field; 33]; + let mut offset: u32 = 0_u32; + let serialized_member: [Field; 10 * 1] = args_field.serialize(); + let serialized_member_len: u32 = <[Field; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 10 * 1] = args_u8.serialize(); + let serialized_member_len: u32 = <[u8; 10] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = get_instance_for_address.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_deployer.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_class_id.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_initialization_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = expected_immutables_hash.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 7 * 1] = schnorr_inputs.serialize(); + let serialized_member_len: u32 = <[Field; 7] as Serialize>::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let serialized_member: [Field; 1] = skip_strictly_limited_side_effects.serialize(); + let serialized_member_len: u32 = ::N; + for i in 0_u32..serialized_member_len { + serialized_params[i + offset] = serialized_member[i]; + }; + offset = offset + serialized_member_len; + let selector: FunctionSelector = FunctionSelector::from_field(585772300_Field); + let calldata: [Field; 1 + 33] = [selector.to_field()].concat(serialized_params); + let calldata_hash: Field = aztec::hash::hash_calldata_array(calldata); + aztec::oracle::execution_cache::store(calldata, calldata_hash); + self.context.call_public_function_with_calldata_hash(self.address, calldata_hash, false, false); + } + pub fn to_le_bits(self, input: Field) { let serialized_params: [Field; 1] = input.serialize(); let selector: FunctionSelector = FunctionSelector::from_field(2961959597_Field); @@ -4257,6 +4638,21 @@ pub contract AvmTest { let arg2: Field = ::stream_deserialize(&mut reader); let arg3: Field = ::stream_deserialize(&mut reader); let return_value: [Field; 2] = __aztec_nr_internals__variable_base_msm(arg0, arg1, arg2, arg3).serialize(); +<<<<<<< HEAD +======= + aztec::oracle::avm::avm_return(return_value.as_vector()); + }; + if selector == 301342598_Field { + let input_calldata: [Field; 6] = aztec::oracle::avm::calldata_copy(1_u32, ((((::N + ::N) + ::N) + ::N) + ::N) + ::N); + let mut reader: aztec::protocol::utils::reader::Reader<6> = aztec::protocol::utils::reader::Reader::<6>::new(input_calldata); + let arg0: Field = ::stream_deserialize(&mut reader); + let arg1: Field = ::stream_deserialize(&mut reader); + let arg2: Field = ::stream_deserialize(&mut reader); + let arg3: Field = ::stream_deserialize(&mut reader); + let arg4: Field = ::stream_deserialize(&mut reader); + let arg5: Field = ::stream_deserialize(&mut reader); + let return_value: [Field; 2] = __aztec_nr_internals__variable_base_msm_with_point(arg0, arg1, arg2, arg3, arg4, arg5).serialize(); +>>>>>>> origin/v5-next aztec::oracle::avm::avm_return(return_value.as_vector()); }; if selector == 2484465428_Field { @@ -4983,6 +5379,15 @@ pub contract AvmTest { pub scalar2_hi: Field, } + pub struct variable_base_msm_with_point_parameters { + pub px: Field, + pub py: Field, + pub scalar_lo: Field, + pub scalar_hi: Field, + pub scalar2_lo: Field, + pub scalar2_hi: Field, + } + #[abi(functions)] pub struct add_args_return_abi { parameters: add_args_return_parameters, @@ -5460,6 +5865,15 @@ pub contract AvmTest { pub struct variable_base_msm_abi { parameters: variable_base_msm_parameters, return_type: EmbeddedCurvePoint, +<<<<<<< HEAD +======= + } + + #[abi(functions)] + pub struct variable_base_msm_with_point_abi { + parameters: variable_base_msm_with_point_parameters, + return_type: EmbeddedCurvePoint, +>>>>>>> origin/v5-next } fn __aztec_nr_internals__enqueue_public_from_private(inputs: aztec::context::inputs::PrivateContextInputs) -> return_data aztec::protocol::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs { @@ -6252,6 +6666,17 @@ pub contract AvmTest { { let g: EmbeddedCurvePoint = EmbeddedCurvePoint { x: GRUMPKIN_ONE_X, y: GRUMPKIN_ONE_Y}; multi_scalar_mul([g, g], [Scalar { lo: scalar_lo, hi: scalar_hi}, Scalar { lo: scalar2_lo, hi: scalar2_hi}]) +<<<<<<< HEAD +======= + } + } + + unconstrained fn __aztec_nr_internals__variable_base_msm_with_point(px: Field, py: Field, scalar_lo: Field, scalar_hi: Field, scalar2_lo: Field, scalar2_hi: Field) -> pub EmbeddedCurvePoint { + let mut self: aztec::contract_self::contract_self_public::ContractSelfPublic, CallSelf, CallSelfStatic, CallInternal> = __aztec_nr_internals__create_public_self::<6>(); + { + let p: EmbeddedCurvePoint = EmbeddedCurvePoint { x: px, y: py}; + multi_scalar_mul([p, p], [Scalar { lo: scalar_lo, hi: scalar_hi}, Scalar { lo: scalar2_lo, hi: scalar2_hi}]) +>>>>>>> origin/v5-next } } diff --git a/noir-projects/contract-snapshots/tests/snapshots/expand/public_fns_with_emit_repro_contract/snapshots__expanded.snap b/noir-projects/contract-snapshots/tests/snapshots/expand/public_fns_with_emit_repro_contract/snapshots__expanded.snap index 8506d594f7bd..8f9343f7611b 100644 --- a/noir-projects/contract-snapshots/tests/snapshots/expand/public_fns_with_emit_repro_contract/snapshots__expanded.snap +++ b/noir-projects/contract-snapshots/tests/snapshots/expand/public_fns_with_emit_repro_contract/snapshots__expanded.snap @@ -2,7 +2,6 @@ source: tests/snapshots.rs expression: stdout --- - use aztec::macros::aztec; use aztec::macros::aztec; @@ -140,20 +139,20 @@ pub contract PublicFnsWithEmitRepro { }) } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_hash(_packed_note: BoundedVec, _owner: aztec::protocol::address::AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_nullifier(_unique_note_hash: Field, _packed_note: BoundedVec, _owner: aztec::protocol::address::AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: aztec::protocol::address::AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } /// Receives offchain messages into this contract's offchain inbox for subsequent processing. diff --git a/noir-projects/contract-snapshots/tests/snapshots/expand/storage_proof_test_contract/snapshots__expanded.snap b/noir-projects/contract-snapshots/tests/snapshots/expand/storage_proof_test_contract/snapshots__expanded.snap index 0e3aad62bf15..ae8cbd5ec475 100644 --- a/noir-projects/contract-snapshots/tests/snapshots/expand/storage_proof_test_contract/snapshots__expanded.snap +++ b/noir-projects/contract-snapshots/tests/snapshots/expand/storage_proof_test_contract/snapshots__expanded.snap @@ -2,7 +2,6 @@ source: tests/snapshots.rs expression: stdout --- - use aztec::macros::aztec; use aztec::macros::aztec; @@ -86,20 +85,20 @@ contract StorageProofTest { }) } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_hash(_packed_note: BoundedVec, _owner: AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } - /// This contract does not use private notes, so this function should never be called as it will unconditionally fail. + /// This contract does not use private notes, so this function always returns `Option::none()`. /// /// This function is automatically injected by the `#[aztec]` macro. #[contract_library_method] unconstrained fn _compute_note_nullifier(_unique_note_hash: Field, _packed_note: BoundedVec, _owner: AztecAddress, _storage_slot: Field, _note_type_id: Field, _contract_address: AztecAddress, _randomness: Field) -> Option { - panic(f"This contract does not use private notes") + Option::::none() } /// Receives offchain messages into this contract's offchain inbox for subsequent processing. diff --git a/noir-projects/contract-snapshots/tests/snapshots/expand/token_contract/snapshots__expanded.snap b/noir-projects/contract-snapshots/tests/snapshots/expand/token_contract/snapshots__expanded.snap index 5e277ac07d61..192214bb04d0 100644 --- a/noir-projects/contract-snapshots/tests/snapshots/expand/token_contract/snapshots__expanded.snap +++ b/noir-projects/contract-snapshots/tests/snapshots/expand/token_contract/snapshots__expanded.snap @@ -4048,6 +4048,21 @@ mod test { utils::check_private_balance(env, token_contract_address, recipient, amount); } +<<<<<<< HEAD +======= + /// A partial note can be completed more than once (`complete` only existence-checks its validity commitment, which is + /// never consumed), so both finalizes emit a completion log under the same tag. Discovery tolerates the two logs + /// rather than failing: it completes with the first (recovering that note) and ignores the rest. + #[test] + unconstrained fn discovery_tolerates_a_partial_note_completed_twice() { + let (env, token_contract_address, owner, recipient, _): (aztec::test::helpers::test_environment::TestEnvironment, aztec::protocol::address::AztecAddress, aztec::protocol::address::AztecAddress, aztec::protocol::address::AztecAddress, u128) = utils::setup_and_mint_to_public(false); + let partial_uint_note: PartialUintNote = env.call_private(owner, Token::at(token_contract_address).prepare_private_balance_increase(recipient)); + env.call_public(owner, Token::at(token_contract_address).finalize_transfer_to_private(1_u128, partial_uint_note)); + env.call_public(owner, Token::at(token_contract_address).finalize_transfer_to_private(1_u128, partial_uint_note)); + utils::check_private_balance(env, token_contract_address, recipient, 1_u128); + } + +>>>>>>> origin/v5-next #[test(should_fail_with = "Invalid partial note or completer")] unconstrained fn transfer_to_private_transfer_not_prepared() { let (env, token_contract_address, owner, _, amount): (aztec::test::helpers::test_environment::TestEnvironment, aztec::protocol::address::AztecAddress, aztec::protocol::address::AztecAddress, aztec::protocol::address::AztecAddress, u128) = utils::setup_and_mint_to_public(false); diff --git a/noir-projects/noir-contracts/Nargo.toml b/noir-projects/noir-contracts/Nargo.toml index 2fa302c83073..de30c4509af1 100644 --- a/noir-projects/noir-contracts/Nargo.toml +++ b/noir-projects/noir-contracts/Nargo.toml @@ -60,6 +60,7 @@ members = [ "contracts/test/nested_utility_contract", "contracts/test/no_constructor_contract", "contracts/test/note_hash_and_nullifier/note_hash_and_nullifier_contract", + "contracts/test/no_notes_contract", "contracts/test/note_getter_contract", "contracts/test/offchain_effect_contract", "contracts/test/offchain_payment_contract", diff --git a/noir-projects/noir-contracts/bootstrap.sh b/noir-projects/noir-contracts/bootstrap.sh index 1bca89aa74d0..e387bad38025 100755 --- a/noir-projects/noir-contracts/bootstrap.sh +++ b/noir-projects/noir-contracts/bootstrap.sh @@ -287,8 +287,13 @@ function bench_cmds { } # Force-builds standard contracts and tar-balls their artifacts into pinned-standard-contracts.tar.gz. -# Run this to (re)pin the standard-contract artifacts, then commit the resulting tarball. Re-run and -# re-commit whenever the canonical standard-contract artifacts are intended to change. +# +# WARNING: re-pinning (running this, then committing the new tarball) moves the standard contracts' +# canonical deterministic addresses and class ids. Rebuilding changes the artifact hash and bytecode +# commitment, which changes the class id and the address derived from it. Those addresses are baked +# into every already-deployed network and published package, so a re-pin breaks compatibility with all +# of them and means the standard contracts must be redeployed at their new addresses on any network +# meant to run the new artifacts. It is only correct as part of a deliberate, coordinated redeploy. # Mirrors the v4 `pin-build` mechanism that pins protocol contracts. function pin-standard-build { rm -f pinned-standard-contracts.tar.gz diff --git a/noir-projects/noir-contracts/contracts/account/schnorr_initializerless_account_contract/src/main.nr b/noir-projects/noir-contracts/contracts/account/schnorr_initializerless_account_contract/src/main.nr index 49db1a6ec3d3..aef1eeb82a23 100644 --- a/noir-projects/noir-contracts/contracts/account/schnorr_initializerless_account_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/account/schnorr_initializerless_account_contract/src/main.nr @@ -1,24 +1,6 @@ -use aztec::{ - macros::{aztec, AztecConfig}, - messages::{ - discovery::{ComputeNoteHash, ComputeNoteNullifier, CustomMessageHandler}, - processing::offchain::OffchainInboxSync, - }, - protocol::address::AztecAddress, -}; - -/// Empty override to opt-out of state syncing. This contract does not hold private state, -/// so runnning the sync process just results in unnecessary RPC calls -unconstrained fn no_sync( - _contract_address: AztecAddress, - _compute_note_hash: ComputeNoteHash, - _compute_note_nullifier: ComputeNoteNullifier, - _process_custom_message: Option, - _offchain_inbox_sync: Option, - _scope: AztecAddress, -) {} - -#[aztec(AztecConfig::new().custom_sync_state(crate::no_sync))] +use aztec::{macros::{aztec, AztecConfig}, messages::discovery::do_sync_state_no_op}; + +#[aztec(AztecConfig::new().custom_sync_state(do_sync_state_no_op))] pub contract SchnorrInitializerlessAccount { use aztec::{ authwit::{ diff --git a/noir-projects/noir-contracts/contracts/app/nft_contract/src/types/nft_note.nr b/noir-projects/noir-contracts/contracts/app/nft_contract/src/types/nft_note.nr index fbd2cc235eb4..bc41fd35b4c9 100644 --- a/noir-projects/noir-contracts/contracts/app/nft_contract/src/types/nft_note.nr +++ b/noir-projects/noir-contracts/contracts/app/nft_contract/src/types/nft_note.nr @@ -166,6 +166,19 @@ pub struct PartialNFTNote { impl PartialNFTNote { /// Completes the partial note, creating a new note that can be used like any other NFTNote. + /// + /// The validity commitment only proves that this contract created this exact partial note designating `completer` + /// (see [`compute_validity_commitment`](Self::compute_validity_commitment)). The `storage_slot` and `token_id` + /// arguments are not bound by it, so the caller is trusted to provide correct values for them. Nothing checks + /// that the completer is the entity performing the call. Contracts must authenticate the caller themselves, + /// typically by passing `msg_sender()` as `completer`. + /// + /// WARNING: completion is not single-use. Nothing prevents the completer from completing the same partial note + /// multiple times, inserting a new note hash each time. Every completion must therefore be independently paid for + /// or authorized in the completing function itself (e.g. by asserting that the completer publicly owns the NFT and + /// clearing its ownership on each call), never granting value at creation to be redeemed at completion. Completing + /// more than once is otherwise harmless to the contract, but wasteful for the completer. The recipient only + /// discovers the first completion, so anything carried by further ones is lost. pub fn complete(self, context: PublicContext, completer: AztecAddress, storage_slot: Field, token_id: Field) { // A note with a value of zero is valid, but we cannot currently complete a partial note with such a value // because this will result in the completion log having its last field set to 0. Public logs currently do not @@ -174,8 +187,7 @@ impl PartialNFTNote { // TODO(#11636): remove this assert(token_id != 0, "Cannot complete a PartialNFTNote with a value of 0"); - // We verify that the partial note we're completing is valid (i.e. completer is correct, it uses the correct - // state variable's storage slot, and it is internally consistent). + // We verify that `completer` matches the completer designated when this contract created this partial note. let validity_commitment = self.compute_validity_commitment(completer); // Safety: we're using the existence of the nullifier as proof of the contract having validated the partial // note's preimage, which is safe. @@ -195,11 +207,11 @@ impl PartialNFTNote { context.push_note_hash(self.compute_complete_note_hash(storage_slot, token_id)); } - /// Computes a validity commitment for this partial note. The commitment cryptographically binds the note's private - /// data with the designated completer address. When the note is later completed in public execution, we can load - /// this commitment from the nullifier tree and verify that both the partial note (e.g. that the storage slot - /// corresponds to the correct owner, and that we're using the correct state variable) and completer are - /// legitimate. + /// Computes a validity commitment for this partial note. + /// + /// The commitment cryptographically binds the note's private content with the designated completer address. When + /// the note is later completed, the commitment is looked up in the nullifier tree to verify that this contract + /// created this exact partial note designating that completer. pub fn compute_validity_commitment(self, completer: AztecAddress) -> Field { poseidon2_hash_with_separator( [self.commitment, completer.to_field()], diff --git a/noir-projects/noir-contracts/contracts/app/token_blacklist_contract/src/main.nr b/noir-projects/noir-contracts/contracts/app/token_blacklist_contract/src/main.nr index a3b26bb64264..86fc686d9daf 100644 --- a/noir-projects/noir-contracts/contracts/app/token_blacklist_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/app/token_blacklist_contract/src/main.nr @@ -181,7 +181,7 @@ pub contract TokenBlacklist { let to_roles = self.storage.roles.at(to).get_current_value(); assert(!to_roles.is_blacklisted, "Blacklisted: Recipient"); - let secret_hash = compute_secret_hash(secret); + let secret_hash = compute_secret_hash([secret]); // Pop 1 note (set_limit(1)) which has an amount stored in a field with index 0 (select(0, amount)) and // a secret_hash stored in a field with index 1 (select(1, secret_hash)). diff --git a/noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr b/noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr index 63b1911ce41e..48fa31b8375b 100644 --- a/noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/app/token_bridge_contract/src/main.nr @@ -55,7 +55,7 @@ pub contract TokenBridge { let config = self.storage.config.read(); // Consume message and emit nullifier - self.context.consume_l1_to_l2_message(content_hash, secret, config.portal, message_leaf_index); + self.context.consume_l1_to_l2_message(content_hash, [secret], config.portal, message_leaf_index); // Mint tokens self.call(Token::at(config.token).mint_to_public(to, amount)); @@ -101,7 +101,7 @@ pub contract TokenBridge { let content_hash = get_mint_to_private_content_hash(amount); self.context.consume_l1_to_l2_message( content_hash, - secret_for_L1_to_L2_message_consumption, + [secret_for_L1_to_L2_message_consumption], config.portal, message_leaf_index, ); diff --git a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr index 386f0b68e785..634cf8f2c950 100644 --- a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr +++ b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr @@ -82,6 +82,26 @@ unconstrained fn transfer_to_private_external_orchestration_multiple_notes() { utils::check_private_balance(env, token_contract_address, recipient, amount); } +<<<<<<< HEAD +======= +/// A partial note can be completed more than once (`complete` only existence-checks its validity commitment, which is +/// never consumed), so both finalizes emit a completion log under the same tag. Discovery tolerates the two logs +/// rather than failing: it completes with the first (recovering that note) and ignores the rest. +#[test] +unconstrained fn discovery_tolerates_a_partial_note_completed_twice() { + let (env, token_contract_address, owner, recipient, _) = + utils::setup_and_mint_to_public(/* with_account_contracts */ false); + + let partial_uint_note = + env.call_private(owner, Token::at(token_contract_address).prepare_private_balance_increase(recipient)); + + env.call_public(owner, Token::at(token_contract_address).finalize_transfer_to_private(1, partial_uint_note)); + env.call_public(owner, Token::at(token_contract_address).finalize_transfer_to_private(1, partial_uint_note)); + + utils::check_private_balance(env, token_contract_address, recipient, 1); +} + +>>>>>>> origin/v5-next #[test(should_fail_with = "Invalid partial note or completer")] unconstrained fn transfer_to_private_transfer_not_prepared() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough diff --git a/noir-projects/noir-contracts/contracts/standard/auth_registry_contract/src/main.nr b/noir-projects/noir-contracts/contracts/standard/auth_registry_contract/src/main.nr index 9b7e9f7ffad8..c63202ba385c 100644 --- a/noir-projects/noir-contracts/contracts/standard/auth_registry_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/standard/auth_registry_contract/src/main.nr @@ -1,4 +1,4 @@ -use aztec::macros::aztec; +use aztec::{macros::{aztec, AztecConfig}, messages::discovery::do_sync_state_no_op}; /// A contract that manages public authentication witnesses (authwits) on the Aztec network. /// @@ -14,7 +14,7 @@ use aztec::macros::aztec; /// Note that there is no expiration time enforced on the approved actions in this contract as this can be achieved by /// including an expiration timestamp in the `message` (`message_hash` preimage) and having the consumer contract /// constrain that value. -#[aztec] +#[aztec(AztecConfig::new().custom_sync_state(do_sync_state_no_op))] pub contract AuthRegistry { use aztec::{ authwit::auth::{assert_current_call_valid_authwit, compute_authwit_message_hash, IS_VALID_SELECTOR}, diff --git a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/handshake_note.nr b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/handshake_note.nr index 580b783cc77f..70848e85a85f 100644 --- a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/handshake_note.nr +++ b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/handshake_note.nr @@ -13,14 +13,22 @@ use aztec::{ /// A record of a handshake established by the note's owner (the sender). /// -/// Stored in [`crate::HandshakeRegistry`]'s `handshakes` state. Holds the raw ECDH shared-secret point `S`. App -/// contracts never see `S` directly: they call the registry's private surface, which -/// silos `S` against the calling contract's address and hands back the app-siloed `Field`. +/// Stored in [`crate::HandshakeRegistry`]'s `handshakes` state. Holds the forgery-protected shared-secret point `S'` +/// (the raw ECDH secret `S` made specific to this handshake). App contracts never see `S'` directly: they call the +/// registry's private surface, which silos `S'` against the calling contract's address and hands back the app-siloed +/// `Field`. #[derive(Deserialize, Eq, Packable, Serialize)] #[note] pub struct HandshakeNote { +<<<<<<< HEAD /// The raw ECDH shared-secret point `S = eph_sk * recipient_address_point`. Only this module can read it for /// siloing, and it is never returned by an external function. +======= + /// The shared-secret point, with the forgery protection applied so it is specific to this handshake and a + /// recipient cannot forge a colliding secret (see + /// [`protect_from_forgery`](aztec::messages::delivery::handshake::protect_from_forgery)). Only this + /// module reads it, for siloing, and it is never returned by an external function. +>>>>>>> origin/v5-next secret: EmbeddedCurvePoint, /// A sender-only random secret, generated by the sender when the handshake is created. Folded into /// constrained-delivery nullifiers so only the sender can advance a sequence; the recipient never sees it, as it diff --git a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/main.nr b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/main.nr index 87259c082726..24e671cf23bc 100644 --- a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/main.nr @@ -33,7 +33,14 @@ pub contract HandshakeRegistry { keys::{ecdh_shared_secret::derive_ecdh_shared_secret, ephemeral::generate_positive_ephemeral_key_pair}, macros::{functions::{external, internal}, storage::storage}, messages::{ +<<<<<<< HEAD delivery::{handshake::{AppSiloedHandshakeSecrets, HandshakePage, MAX_HANDSHAKES_PER_PAGE}, MessageDelivery}, +======= + delivery::{ + handshake::{AppSiloedHandshakeSecrets, HandshakePage, MAX_HANDSHAKES_PER_PAGE, protect_from_forgery}, + MessageDelivery, + }, +>>>>>>> origin/v5-next encryption::{aes128::AES128, message_encryption::MessageEncryption}, }, oracle::{random::random, resolve_custom_request::resolve_custom_request}, @@ -77,11 +84,20 @@ pub contract HandshakeRegistry { /// If `recipient` is not a valid curve point. #[external("private")] fn non_interactive_handshake(sender: AztecAddress, recipient: AztecAddress) -> AppSiloedHandshakeSecrets { +<<<<<<< HEAD let (eph_pk, s_raw) = self.internal._generate_shared_secret(recipient); let secrets = self.internal._store(sender, recipient, s_raw); // Announce the handshake: an encrypted private log under the recipient-keyed tag carrying `[eph_pk.x]`, so // the recipient can discover the handshake by scanning their tag and recover `S` via their own ECDH. +======= + let (eph_pk, s_protected) = self.internal._generate_shared_secret(recipient); + let secrets = self.internal._store(sender, recipient, s_protected); + + // Announce the handshake: an encrypted private log under the recipient-keyed tag carrying `[eph_pk.x]`, so + // the recipient can discover the handshake by scanning their tag and recover the forgery-protected secret + // `S'` by protecting `eph_pk` before its own ECDH (see aztec-nr's `forgery_protected_eph_pk`). +>>>>>>> origin/v5-next let log_tag = compute_log_tag( recipient.to_field(), DOM_SEP__NON_INTERACTIVE_HANDSHAKE_LOG_TAG, @@ -108,9 +124,15 @@ pub contract HandshakeRegistry { /// if the signature does not verify. #[external("private")] fn interactive_handshake(sender: AztecAddress, recipient: AztecAddress) -> AppSiloedHandshakeSecrets { +<<<<<<< HEAD let (eph_pk, s_raw) = self.internal._generate_shared_secret(recipient); self.internal._request_and_verify_signature(recipient, eph_pk); self.internal._store(sender, recipient, s_raw) +======= + let (eph_pk, s_protected) = self.internal._generate_shared_secret(recipient); + self.internal._request_and_verify_signature(recipient, eph_pk); + self.internal._store(sender, recipient, s_protected) +>>>>>>> origin/v5-next } /// Asserts that `secrets` match the stored handshake from `sender` to `recipient`, for the caller (`msg_sender()`). @@ -186,8 +208,14 @@ pub contract HandshakeRegistry { /// Generates the ephemeral key and shared secret for `recipient`. /// +<<<<<<< HEAD /// Returns `(eph_pk, s_raw)`: the ephemeral public key announced to the recipient, and the ECDH shared secret /// `S = eph_sk * recipient_point`. +======= + /// Returns `(eph_pk, s_protected)`: the ephemeral public key announced to the recipient, and the ECDH shared secret + /// `S = eph_sk * recipient_point` with the forgery protection applied, so a recipient cannot forge a colliding + /// handshake from the symmetric raw secret (see [`protect_from_forgery`]). +>>>>>>> origin/v5-next /// /// # Panics /// If `recipient` is not a valid curve point. @@ -196,19 +224,40 @@ pub contract HandshakeRegistry { let recipient_point = recipient.to_address_point().expect(f"recipient address is not on the curve"); let (eph_sk, eph_pk) = generate_positive_ephemeral_key_pair(); +<<<<<<< HEAD let s_raw = derive_ecdh_shared_secret(eph_sk, recipient_point.inner); (eph_pk, s_raw) +======= + let s_protected = protect_from_forgery( + derive_ecdh_shared_secret(eph_sk, recipient_point.inner), + eph_pk, + recipient_point.inner, + ); + (eph_pk, s_protected) +>>>>>>> origin/v5-next } /// Inserts or replaces the current [`HandshakeNote`] owned by `sender` for `recipient` and returns the /// app-siloed secrets for the caller (`msg_sender()`). #[internal("private")] +<<<<<<< HEAD fn _store(sender: AztecAddress, recipient: AztecAddress, s_raw: EmbeddedCurvePoint) -> AppSiloedHandshakeSecrets { +======= + fn _store( + sender: AztecAddress, + recipient: AztecAddress, + s_protected: EmbeddedCurvePoint, + ) -> AppSiloedHandshakeSecrets { +>>>>>>> origin/v5-next // Safety: an uncooperative sender could pick a non-random value, but the sender-only secret only protects // the sender's own ability to advance their sequence, so a bad value only harms themselves. It is a fresh // random secret known only to the sender, which will be folded into constrained-delivery nullifiers. let sender_secret = unsafe { random() }; +<<<<<<< HEAD let note = HandshakeNote::new(s_raw, sender_secret); +======= + let note = HandshakeNote::new(s_protected, sender_secret); +>>>>>>> origin/v5-next // We deliver onchain unconstrained rather than offchain so the note is discoverable via normal PXE sync. This // is a self-send (the note is owned by and delivered to `sender`), so the wallet would resolve to an diff --git a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/test.nr b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/test.nr index 72e8280e1749..1a0680533f98 100644 --- a/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/test.nr +++ b/noir-projects/noir-contracts/contracts/standard/handshake_registry_contract/src/test.nr @@ -6,8 +6,14 @@ use aztec::{ messages::delivery::{ constrained_delivery::VALIDATE_HANDSHAKE_SELECTOR, handshake::{ +<<<<<<< HEAD AppSiloedHandshakeSecrets, GET_APP_SILOED_SECRETS_SELECTOR, GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR, INTERACTIVE_HANDSHAKE_SELECTOR, MAX_HANDSHAKES_PER_PAGE, NON_INTERACTIVE_HANDSHAKE_SELECTOR, +======= + AppSiloedHandshakeSecrets, forgery_protected_eph_pk, GET_APP_SILOED_SECRETS_SELECTOR, + GET_NON_INTERACTIVE_HANDSHAKES_SELECTOR, INTERACTIVE_HANDSHAKE_SELECTOR, MAX_HANDSHAKES_PER_PAGE, + NON_INTERACTIVE_HANDSHAKE_SELECTOR, +>>>>>>> origin/v5-next }, }, oracle::shared_secret::get_shared_secret, @@ -466,9 +472,23 @@ unconstrained fn non_interactive_handshake_is_discovered_by_recipient() { assert_eq(discovered.items.len(), 1); assert_eq(discovered.total_count, 1); +<<<<<<< HEAD // The recipient derives the same app-siloed secret from the discovered eph_pk via ECDH. let handshake = discovered.items.get(0); let recipient_secret = env.utility_context_at(sender, |_| get_shared_secret(recipient, handshake.eph_pk, sender)); +======= + // The recipient derives the same app-siloed secret from the discovered eph_pk via ECDH, applying the forgery + // protection to the ephemeral key before the shared-secret oracle the same way the discovery path does. + let handshake = discovered.items.get(0); + let recipient_point = recipient.to_address_point().unwrap().inner; + let recipient_secret = env.utility_context_at(sender, |_| { + get_shared_secret( + recipient, + forgery_protected_eph_pk(handshake.eph_pk, recipient_point), + sender, + ) + }); +>>>>>>> origin/v5-next assert_eq(recipient_secret.unwrap(), returned_secrets.shared); // The custom sync hook falls through to `do_sync_state`, so default note discovery still works. diff --git a/noir-projects/noir-contracts/contracts/standard/multi_call_entrypoint_contract/src/main.nr b/noir-projects/noir-contracts/contracts/standard/multi_call_entrypoint_contract/src/main.nr index 2e1ed6f69ac2..09a49cde7c46 100644 --- a/noir-projects/noir-contracts/contracts/standard/multi_call_entrypoint_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/standard/multi_call_entrypoint_contract/src/main.nr @@ -8,9 +8,9 @@ // // Note that this contract should not be grouped with protocol contracts as it is not part of the protocol. We keep // it here for now as it allows us to use hardcoded address. -use aztec::macros::aztec; +use aztec::{macros::{aztec, AztecConfig}, messages::discovery::do_sync_state_no_op}; -#[aztec] +#[aztec(AztecConfig::new().custom_sync_state(do_sync_state_no_op))] pub contract MultiCallEntrypoint { use aztec::{authwit::entrypoint::app::AppPayload, macros::functions::{allow_phase_change, external}}; diff --git a/noir-projects/noir-contracts/contracts/standard/public_checks_contract/src/main.nr b/noir-projects/noir-contracts/contracts/standard/public_checks_contract/src/main.nr index 8f36be88e936..c33657f07691 100644 --- a/noir-projects/noir-contracts/contracts/standard/public_checks_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/standard/public_checks_contract/src/main.nr @@ -1,13 +1,13 @@ mod test; -use aztec::macros::aztec; +use aztec::{macros::{aztec, AztecConfig}, messages::discovery::do_sync_state_no_op}; /// The purpose of this contract is to perform a check in public without revealing what contract enqueued the public /// call. This can be achieved by enqueueing an `incognito` public call. /// /// Note that this contract should not be grouped with protocol contracts as it is not part of the protocol. We keep /// it here for now as it allows us to use hardcoded address. -#[aztec] +#[aztec(AztecConfig::new().custom_sync_state(do_sync_state_no_op))] pub contract PublicChecks { use aztec::{macros::functions::{external, view}, utils::comparison::compare}; diff --git a/noir-projects/noir-contracts/contracts/test/nested_utility_contract/src/test.nr b/noir-projects/noir-contracts/contracts/test/nested_utility_contract/src/test.nr index 954984055473..c6dba9bea45f 100644 --- a/noir-projects/noir-contracts/contracts/test/nested_utility_contract/src/test.nr +++ b/noir-projects/noir-contracts/contracts/test/nested_utility_contract/src/test.nr @@ -1,11 +1,23 @@ use crate::NestedUtility; use aztec::{ protocol::{address::AztecAddress, traits::FromField}, +<<<<<<< HEAD test::helpers::test_environment::{CallPrivateOptions, ExecuteUtilityOptions, TestEnvironment, ViewPrivateOptions}, +======= + test::helpers::test_environment::{ + CallPrivateOptions, ExecuteUtilityOptions, TestEnvironment, TestEnvironmentOptions, ViewPrivateOptions, + }, +>>>>>>> origin/v5-next }; unconstrained fn setup() -> (TestEnvironment, AztecAddress, AztecAddress, AztecAddress) { - let mut env = TestEnvironment::new(); + setup_with_opts(TestEnvironmentOptions::new()) +} + +unconstrained fn setup_with_opts( + options: TestEnvironmentOptions, +) -> (TestEnvironment, AztecAddress, AztecAddress, AztecAddress) { + let mut env = TestEnvironment::new_opts(options); let account = env.create_light_account(); let addr_a = env.deploy("NestedUtility").without_initializer(); let addr_b = env.deploy("NestedUtility").without_initializer(); @@ -89,6 +101,24 @@ unconstrained fn cross_contract_utility_call_from_private_view_succeeds_with_aut } #[test] +<<<<<<< HEAD +======= +unconstrained fn all_call_types_succeed_with_all_utility_call_targets_authorized() { + let (env, account, addr_a, addr_b) = setup_with_opts(TestEnvironmentOptions::new() + .with_all_utility_call_targets_authorized()); + + let utility_result = env.execute_utility(NestedUtility::at(addr_a).delegate_pow_utility(addr_b, 2, 3)); + assert_eq(utility_result, 8); + + let private_result = env.call_private(account, NestedUtility::at(addr_a).delegate_pow_private(addr_b, 2, 3)); + assert_eq(private_result, 8); + + let view_result = env.view_private(account, NestedUtility::at(addr_a).delegate_pow_view(addr_b, 2, 3)); + assert_eq(view_result, 8); +} + +#[test] +>>>>>>> origin/v5-next unconstrained fn top_level_utility_observes_no_caller_by_default() { let (env, _, addr_a, _) = setup(); diff --git a/noir-projects/noir-contracts/contracts/test/no_notes_contract/Nargo.toml b/noir-projects/noir-contracts/contracts/test/no_notes_contract/Nargo.toml new file mode 100644 index 000000000000..c583dca3b050 --- /dev/null +++ b/noir-projects/noir-contracts/contracts/test/no_notes_contract/Nargo.toml @@ -0,0 +1,8 @@ +[package] +name = "no_notes_contract" +authors = [""] +compiler_version = ">=0.25.0" +type = "contract" + +[dependencies] +aztec = { path = "../../../../aztec-nr/aztec" } diff --git a/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/main.nr new file mode 100644 index 000000000000..36fbb82ad5a3 --- /dev/null +++ b/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/main.nr @@ -0,0 +1,74 @@ +mod test; + +use aztec::macros::aztec; + +/// A minimal contract that declares no note types, used to test the macro-generated no-notes +/// `_compute_note_hash`, `_compute_note_nullifier` and (deprecated) `_compute_note_hash_and_nullifier` functions. +#[aztec] +pub contract NoNotes { + use aztec::{ + messages::{discovery::NoteHashAndNullifier as NoteHashAndNullifierResult, logs::note::MAX_NOTE_PACKED_LEN}, + protocol::address::AztecAddress, + }; + + #[contract_library_method] + pub unconstrained fn test_compute_note_hash( + packed_note: BoundedVec, + owner: AztecAddress, + storage_slot: Field, + note_type_id: Field, + contract_address: AztecAddress, + randomness: Field, + ) -> Option { + _compute_note_hash( + packed_note, + owner, + storage_slot, + note_type_id, + contract_address, + randomness, + ) + } + + #[contract_library_method] + pub unconstrained fn test_compute_note_nullifier( + unique_note_hash: Field, + packed_note: BoundedVec, + owner: AztecAddress, + storage_slot: Field, + note_type_id: Field, + contract_address: AztecAddress, + randomness: Field, + ) -> Option { + _compute_note_nullifier( + unique_note_hash, + packed_note, + owner, + storage_slot, + note_type_id, + contract_address, + randomness, + ) + } + + #[contract_library_method] + pub unconstrained fn test_compute_note_hash_and_nullifier( + packed_note: BoundedVec, + owner: AztecAddress, + storage_slot: Field, + note_type_id: Field, + contract_address: AztecAddress, + randomness: Field, + note_nonce: Field, + ) -> Option { + _compute_note_hash_and_nullifier( + packed_note, + owner, + storage_slot, + note_type_id, + contract_address, + randomness, + note_nonce, + ) + } +} diff --git a/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/test.nr b/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/test.nr new file mode 100644 index 000000000000..ed883d0551c9 --- /dev/null +++ b/noir-projects/noir-contracts/contracts/test/no_notes_contract/src/test.nr @@ -0,0 +1,50 @@ +use crate::NoNotes; +use aztec::protocol::address::AztecAddress; + +// The contract declares no note types, so there is never a note to hash or nullify: every input must be skipped +// (return `Option::none()`) regardless of its contents, so that malicious messages about non-existent notes are +// ignored. + +#[test] +unconstrained fn compute_note_hash_skips() { + let result = NoNotes::test_compute_note_hash( + BoundedVec::from_array([42]), + AztecAddress::zero(), + 0, + 0xdeadbeef, + AztecAddress::zero(), + 0, + ); + + assert(result.is_none()); +} + +#[test] +unconstrained fn compute_note_nullifier_skips() { + let result = NoNotes::test_compute_note_nullifier( + 0, + BoundedVec::from_array([42]), + AztecAddress::zero(), + 0, + 0xdeadbeef, + AztecAddress::zero(), + 0, + ); + + assert(result.is_none()); +} + +#[test] +unconstrained fn compute_note_hash_and_nullifier_skips() { + let result = NoNotes::test_compute_note_hash_and_nullifier( + BoundedVec::from_array([42]), + AztecAddress::zero(), + 0, + 0xdeadbeef, + AztecAddress::zero(), + 0, + 0, + ); + + assert(result.is_none()); +} diff --git a/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/main.nr index 193a21837008..19494d65f246 100644 --- a/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/main.nr @@ -1,4 +1,5 @@ use aztec::macros::aztec; +mod multi_slot_note; mod packed_note; /// Used to test note getter in e2e_note_getter.test.ts @@ -57,7 +58,7 @@ pub contract NoteGetter { unconstrained fn select_packed_notes_by_high( owner: AztecAddress, comparator: u8, - value: Field, + value: u8, ) -> BoundedVec<[u8; 2], 10> { let selector = PackedNote::high_selector(); let notes = @@ -69,7 +70,7 @@ pub contract NoteGetter { unconstrained fn select_packed_notes_by_low( owner: AztecAddress, comparator: u8, - value: Field, + value: u8, ) -> BoundedVec<[u8; 2], 10> { let selector = PackedNote::low_selector(); let notes = diff --git a/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/multi_slot_note.nr b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/multi_slot_note.nr new file mode 100644 index 000000000000..e5e2d34b9215 --- /dev/null +++ b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/multi_slot_note.nr @@ -0,0 +1,67 @@ +use aztec::{macros::notes::note, protocol::traits::{Deserialize, Packable, Serialize}}; + +#[derive(Deserialize, Eq, Packable, Serialize)] +pub struct FieldPair { + a: Field, + b: Field, +} + +/// A note whose first two fields occupy more than one slot each in the packed representation: `pair` packs to two +/// fields and `values` to three, so `tag` lives at packed index 5. +#[derive(Deserialize, Eq, Packable, Serialize)] +#[note] +pub struct MultiSlotNote { + pair: FieldPair, + values: [Field; 3], + tag: Field, +} + +mod test { + use super::{FieldPair, MultiSlotNote}; + use aztec::{ + note::{note_getter_options::{NoteGetterOptions, SortOrder}, note_interface::NoteProperties}, + protocol::traits::Packable, + utils::comparison::Comparator, + }; + + #[test] + fn selector_indices_match_packed_layout() { + let props = MultiSlotNote::properties(); + assert_eq(props.pair.index, 0); + assert_eq(props.values.index, 2); + assert_eq(props.tag.index, 5); + } + + #[test] + fn tag_selector_points_at_tag_slot() { + let note = MultiSlotNote { pair: FieldPair { a: 11, b: 22 }, values: [33, 44, 55], tag: 66 }; + let packed = note.pack(); + assert_eq(packed[MultiSlotNote::properties().tag.index as u32], note.tag); + } + + #[test] + fn can_select_and_sort_by_single_slot_property() { + let mut options: NoteGetterOptions::N, Field, Field> = + NoteGetterOptions::new(); + let options = options.select(MultiSlotNote::properties().tag, Comparator.EQ, 7).sort( + MultiSlotNote::properties().tag, + SortOrder.ASC, + ); + assert_eq(options.selects.len(), 1); + assert_eq(options.sorts.len(), 1); + } + + #[test(should_fail_with = "cannot select by a property that packs to more than one field")] + fn cannot_select_by_multi_slot_property() { + let mut options: NoteGetterOptions::N, Field, Field> = + NoteGetterOptions::new(); + let _ = options.select(MultiSlotNote::properties().pair, Comparator.EQ, FieldPair { a: 0, b: 0 }); + } + + #[test(should_fail_with = "cannot sort by a property that packs to more than one field")] + fn cannot_sort_by_multi_slot_property() { + let mut options: NoteGetterOptions::N, Field, Field> = + NoteGetterOptions::new(); + let _ = options.sort(MultiSlotNote::properties().pair, SortOrder.ASC); + } +} diff --git a/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/packed_note.nr b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/packed_note.nr index 635f97b50870..ca262c9349f3 100644 --- a/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/packed_note.nr +++ b/noir-projects/noir-contracts/contracts/test/note_getter_contract/src/packed_note.nr @@ -31,17 +31,38 @@ impl Packable for PackedNote { } impl PackedNote { - pub fn high_selector() -> PropertySelector { + pub fn high_selector() -> PropertySelector { PropertySelector { index: 0, offset: 1, length: 1 } } - pub fn low_selector() -> PropertySelector { + pub fn low_selector() -> PropertySelector { PropertySelector { index: 0, offset: 0, length: 1 } } } mod test { use super::{Packable, PackedNote}; + use aztec::{ + note::{note_getter_options::{NoteGetterOptions, SortOrder}, note_interface::NoteProperties}, + utils::comparison::Comparator, + }; + + #[test(should_fail_with = "PackedNote's auto-generated note properties assume the #[derive(Packable)] layout (2 fields), but its hand-written Packable packs to 1. Derive Packable, or define property selectors manually for the custom layout. See https://docs.aztec.network/errors/15")] + fn generated_properties_rejected_for_custom_packing() { + let _ = PackedNote::properties(); + } + + #[test] + fn manual_selectors_work_with_custom_packing() { + let mut options: NoteGetterOptions::N, Field, Field> = + NoteGetterOptions::new(); + let options = options.select(PackedNote::high_selector(), Comparator.EQ, 7).sort( + PackedNote::low_selector(), + SortOrder.ASC, + ); + assert_eq(options.selects.len(), 1); + assert_eq(options.sorts.len(), 1); + } #[test] fn test_pack_unpack() { diff --git a/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/main.nr index 1fa646cdc699..bd3ec9d9c87a 100644 --- a/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/main.nr @@ -1,4 +1,8 @@ +<<<<<<< HEAD //! Thin wrappers around onchain message delivery for tests. +======= +//! Thin wrappers around onchain message delivery for TXE tests. +>>>>>>> origin/v5-next use aztec::macros::aztec; mod test; @@ -7,7 +11,11 @@ mod test; pub contract OnchainDeliveryTest { use aztec::{ macros::{events::event, functions::external, storage::storage}, +<<<<<<< HEAD messages::delivery::MessageDelivery, +======= + messages::delivery::{MessageDelivery, OnchainDeliveryMode}, +>>>>>>> origin/v5-next note::note_viewer_options::NoteViewerOptions, oracle::notes::get_next_tagging_index, protocol::{ @@ -34,10 +42,17 @@ pub contract OnchainDeliveryTest { } #[external("private")] +<<<<<<< HEAD fn next_index_for_secret(secret: Field) -> u32 { // Safety: test-only observation of the index the PXE hands out next for this secret. unsafe { get_next_tagging_index(secret, MessageDelivery::onchain_constrained()) +======= + fn next_index_for_secret(secret: Field, mode: OnchainDeliveryMode) -> u32 { + // Safety: test-only observation of the index the PXE hands out next for this secret. + unsafe { + get_next_tagging_index(secret, mode) +>>>>>>> origin/v5-next } } diff --git a/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/test.nr b/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/test.nr index 32b62ead583d..5354e08cc2ef 100644 --- a/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/test.nr +++ b/noir-projects/noir-contracts/contracts/test/onchain_delivery_test_contract/src/test.nr @@ -1,3 +1,4 @@ +<<<<<<< HEAD //! Tests for constrained delivery through the public message-delivery API. //! //! These tests exercise the sender-side helper flow indirectly via constrained note/event delivery: resolve or @@ -10,11 +11,42 @@ use aztec::{ protocol::address::AztecAddress, standard_addresses::STANDARD_HANDSHAKE_REGISTRY_ADDRESS, test::helpers::test_environment::{CallPrivateOptions, DeployOptions, ExecuteUtilityOptions, TestEnvironment}, +======= +//! Tests for onchain message delivery through the public message-delivery API. +//! +//! The constrained tests exercise the sender-side helper flow indirectly via note/event delivery: resolve or +//! bootstrap the app-siloed handshake secret, reserve the next per-secret index, constrain that index, emit the +//! sequence nullifier, then emit the tagged private log. The malformed-log test lands a constrained tag without its +//! sequence nullifier so the next real delivery must reject the broken sequence. The unconstrained tests cover +//! delivery in the mode without sequence nullifiers, alongside and independent of the constrained flow. +use crate::OnchainDeliveryTest; + +use aztec::{ + messages::delivery::MessageDelivery, + protocol::{address::AztecAddress, point::EmbeddedCurvePoint, traits::FromField}, + standard_addresses::STANDARD_HANDSHAKE_REGISTRY_ADDRESS, + test::helpers::{ + tagging_secret_strategy::{compute_directional_app_secret, TaggingSecretStrategy}, + test_environment::{ + CallPrivateOptions, DeployOptions, ExecuteUtilityOptions, TestEnvironment, TestEnvironmentOptions, + }, + }, +>>>>>>> origin/v5-next }; use handshake_registry_contract::HandshakeRegistry; unconstrained fn setup() -> (TestEnvironment, AztecAddress, AztecAddress, AztecAddress, AztecAddress) { +<<<<<<< HEAD let mut env = TestEnvironment::new(); +======= + setup_opts(TestEnvironmentOptions::new()) +} + +unconstrained fn setup_opts( + options: TestEnvironmentOptions, +) -> (TestEnvironment, AztecAddress, AztecAddress, AztecAddress, AztecAddress) { + let mut env = TestEnvironment::new_opts(options); +>>>>>>> origin/v5-next let sender = env.create_light_account(); let recipient = env.create_light_account(); @@ -35,6 +67,65 @@ unconstrained fn authorizing(registry_address: AztecAddress) -> CallPrivateOptio CallPrivateOptions::new().with_authorized_utility_call_targets([registry_address]) } +<<<<<<< HEAD +======= +unconstrained fn external_recipient() -> AztecAddress { + AztecAddress::from_field(8) +} + +#[test] +unconstrained fn unconstrained_delivery_works_alongside_constrained_delivery() { + let point = EmbeddedCurvePoint { + x: 0x15d55a5b3b2caa6a6207f313f05c5113deba5da9927d6421bcaa164822b911bc, + y: 0x0974c3d0825031ae933243d653ebb1a0b08b90ee7f228f94c5c74739ea3c871e, + }; + // Only the unconstrained mode is configured: the constrained mode falls back to the default non-interactive + // handshake strategy, so the constrained delivery below still bootstraps a registry handshake. + let options = TestEnvironmentOptions::new().with_default_tag_secret_strategy( + MessageDelivery::onchain_unconstrained(), + TaggingSecretStrategy::arbitrary_secret(point), + ); + let (env, registry_address, test_address, sender, _) = setup_opts(options); + let recipient = external_recipient(); + let test_contract = OnchainDeliveryTest::at(test_address); + let registry = HandshakeRegistry::at(registry_address); + + env.call_private(sender, test_contract.emit_event_unconstrained(recipient, 1)); + + let expected_unconstrained_secret = compute_directional_app_secret(point, test_address, recipient); + let next_unconstrained_index = env.call_private( + sender, + test_contract.next_index_for_secret( + expected_unconstrained_secret, + MessageDelivery::onchain_unconstrained().into(), + ), + ); + assert_eq(next_unconstrained_index, 1); + + let maybe_handshake = env.execute_utility_opts( + ExecuteUtilityOptions::new().with_from(test_address), + registry.get_app_siloed_secrets(sender, recipient), + ); + assert(maybe_handshake.is_none()); + + env.call_private_opts(sender, authorizing(registry_address), test_contract.emit_event(recipient, 1)); + + let handshake = env + .execute_utility_opts( + ExecuteUtilityOptions::new().with_from(test_address), + registry.get_app_siloed_secrets(sender, recipient), + ) + .expect(f"constrained delivery should have stored a handshake"); + assert(handshake.shared != expected_unconstrained_secret); + + let next_constrained_index = env.call_private( + sender, + test_contract.next_index_for_secret(handshake.shared, MessageDelivery::onchain_constrained().into()), + ); + assert_eq(next_constrained_index, 1); +} + +>>>>>>> origin/v5-next #[test] unconstrained fn rehandshake_replaces_registry_secret_for_future_delivery() { let (env, registry_address, test_address, sender, recipient) = setup(); @@ -62,7 +153,14 @@ unconstrained fn rehandshake_replaces_registry_secret_for_future_delivery() { env.call_private_opts(sender, authorizing(registry_address), test_contract.emit_event(recipient, 1)); +<<<<<<< HEAD let next_index = env.call_private(sender, test_contract.next_index_for_secret(second_secret)); +======= + let next_index = env.call_private( + sender, + test_contract.next_index_for_secret(second_secret, MessageDelivery::onchain_constrained().into()), + ); +>>>>>>> origin/v5-next assert_eq(next_index, 1); } @@ -104,7 +202,14 @@ unconstrained fn interactive_handshake_reuses_an_existing_registry_handshake() { test_contract.emit_event_via_interactive_handshake(recipient, 1), ); +<<<<<<< HEAD let next_index = env.call_private(sender, test_contract.next_index_for_secret(secret)); +======= + let next_index = env.call_private( + sender, + test_contract.next_index_for_secret(secret, MessageDelivery::onchain_constrained().into()), + ); +>>>>>>> origin/v5-next assert_eq(next_index, 1); } diff --git a/noir-projects/noir-contracts/contracts/test/test_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test/test_contract/src/main.nr index 1a1c742dc932..716d19d80d2d 100644 --- a/noir-projects/noir-contracts/contracts/test/test_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test/test_contract/src/main.nr @@ -345,7 +345,7 @@ pub contract Test { let content_hash = get_mint_to_private_content_hash(amount); self.context.consume_l1_to_l2_message( content_hash, - secret_for_L1_to_L2_message_consumption, + [secret_for_L1_to_L2_message_consumption], portal_address, message_leaf_index, ); @@ -359,7 +359,7 @@ pub contract Test { message_leaf_index: Field, ) { // Consume message and emit nullifier - self.context.consume_l1_to_l2_message(content, secret, sender, message_leaf_index); + self.context.consume_l1_to_l2_message(content, [secret], sender, message_leaf_index); } #[external("private")] @@ -370,7 +370,7 @@ pub contract Test { message_leaf_index: Field, ) { // Consume message and emit nullifier - self.context.consume_l1_to_l2_message(content, secret, sender, message_leaf_index); + self.context.consume_l1_to_l2_message(content, [secret], sender, message_leaf_index); } #[external("private")] diff --git a/noir-projects/noir-protocol-circuits/bootstrap.sh b/noir-projects/noir-protocol-circuits/bootstrap.sh index 0935d9655913..f75bd5e1bb70 100755 --- a/noir-projects/noir-protocol-circuits/bootstrap.sh +++ b/noir-projects/noir-protocol-circuits/bootstrap.sh @@ -188,9 +188,17 @@ function build { # If pinned-build.tar.gz exists, use it instead of compiling. if [ -f pinned-build.tar.gz ]; then echo_stderr "Using pinned-build.tar.gz instead of compiling." + # The archive holds project-root-relative paths (target/ plus the reset-circuit variant + # manifest, which generate_variants would normally produce but is skipped here), so it + # unpacks straight into place: target/ and private_kernel_reset_dimensions.json land where + # downstream codegen (noir-protocol-circuits-types) expects them. rm -rf target +<<<<<<< HEAD mkdir -p target tar xzf pinned-build.tar.gz -C target +======= + tar xzf pinned-build.tar.gz +>>>>>>> origin/v5-next mkdir -p $key_dir # The pin freezes bytecode AND VKs, but VKs depend on the current bb: a proof-system change can # alter the VK for unchanged bytecode, and a stale pinned VK makes proofs fail self-verification @@ -318,7 +326,14 @@ function pin-build { rm -f pinned-build.tar.gz build echo_stderr "Creating pinned-build.tar.gz from target..." - tar czf pinned-build.tar.gz -C target . + # Archive project-root-relative paths so the build can unpack straight into place. We bundle + # the reset-circuit variant manifest alongside target/ because generate_variants (which + # produces it) is skipped when a pinned build is consumed, yet downstream codegen + # (noir-protocol-circuits-types) requires it. The manifest only exists for the real circuits, + # so it is included conditionally (mock-protocol-circuits has none). + pin_paths=(target) + [ -f private_kernel_reset_dimensions.json ] && pin_paths+=(private_kernel_reset_dimensions.json) + tar czf pinned-build.tar.gz "${pin_paths[@]}" echo_stderr "Done. pinned-build.tar.gz created. Commit it to pin these artifacts." } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-init-2/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-2/Prover.toml index 861f223bcefe..f756a8c52652 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-init-2/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-2/Prover.toml @@ -1,8 +1,13 @@ +<<<<<<< HEAD vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" +======= +vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" +>>>>>>> origin/v5-next is_private_only = true revertible_counter_hint = "0x0000000000000000000000000000000000000000000000000000000000000004" [tx_request] +<<<<<<< HEAD args_hash = "0x0ad74135500a7d3bfe36d98883384a57bb5977c0cbbc3eca922215e1cac4d75a" salt = "0x12951286257a10c2833326a63e7777bcb8246098551b41bfdaf6672878aef9f9" @@ -12,6 +17,17 @@ salt = "0x12951286257a10c2833326a63e7777bcb8246098551b41bfdaf6672878aef9f9" [tx_request.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= +args_hash = "0x0bb7df885b2cb899c746612205baf99c43819dfa5759939c515d880536c3a023" +salt = "0x1e9128a18fc35bea7debe31b2441e502db9b69ac8eb0be5ad47ed7315f3eb381" + + [tx_request.origin] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [tx_request.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -23,7 +39,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [tx_request.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -33,9 +53,10 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 is_private = true [tx_request.function_data.selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [[protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[protocol_contracts.derived_addresses]] @@ -43,6 +64,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -70,9 +100,10 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call_0.vk] key = [ - "0x000000000000000000000000000000000000000000000000000000000000000e", + "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x000000000000000000000000000000c2fcfc0d8489c45fc44e99de27f075d98d", "0x00000000000000000000000000000000000250a1c52ce6e643e1f935e5d5e63c", "0x0000000000000000000000000000000ceab0983ed2f72557b986a107c6a2f1b4", @@ -105,14 +136,55 @@ key = [ "0x000000000000000000000000000000000013a6e471a0721fc7d40b4d1ad88cc2", "0x0000000000000000000000000000007564eb5cdd740a081bcb6aa7e2209870bf", "0x0000000000000000000000000000000000205d06fde1c2018363c71f3641a26b", +======= + "0x000000000000000000000000000000c5c370e236365534a554f3abeca6b94894", + "0x000000000000000000000000000000000015d7aa60ea2a941b91e6b336e75026", + "0x0000000000000000000000000000006357ba60787a91d1fc5c51168ee3c81c6c", + "0x00000000000000000000000000000000000a22dc88f2f798b712b2cf2396ac3e", + "0x000000000000000000000000000000def2c79e4c22627bc001efad7524053579", + "0x000000000000000000000000000000000027e9bd3e9e0f562bfe071c08908505", + "0x000000000000000000000000000000850c88b574efa3ca07103c8b26ff5ec9eb", + "0x00000000000000000000000000000000000d31eeb0b5a8e4f4455f861e371240", + "0x000000000000000000000000000000b58ee7ae04d363646f2297e9c35c52c4c5", + "0x0000000000000000000000000000000000184a3efcf4a9b94b0ac2352d3422c6", + "0x0000000000000000000000000000007b1f0c7faf2a01359a1911e8a0145130a5", + "0x00000000000000000000000000000000000de73fab3ee67c88cf8da393cab3fe", + "0x0000000000000000000000000000004b55af367fb73a492cc2948c4baee0cc3b", + "0x00000000000000000000000000000000001f81af423f0b6b2c2e5d62b2d2e44e", + "0x000000000000000000000000000000e94aabeb9989d6955bcd0f1afd240e630e", + "0x00000000000000000000000000000000001a12e867699f4e2d4478df0d277bae", + "0x000000000000000000000000000000bf36791f3925b8b12cd1a183e4cb969415", + "0x000000000000000000000000000000000022f6f478bceccbaa970b4086dfef78", + "0x00000000000000000000000000000024fa3c15ffc73af4ebb513ff0fd796de18", + "0x00000000000000000000000000000000002883a2c1102d93f385ca051601f3e4", + "0x0000000000000000000000000000003eaafc62c72b09a1078cbb16f075b54635", + "0x00000000000000000000000000000000002ddfc92538af4432c8302af7753ad3", + "0x000000000000000000000000000000c284791c7b8c0055eeab548501e5382b76", + "0x00000000000000000000000000000000000b298e4bfbdd77fbf2542aaf6fe6e5", + "0x000000000000000000000000000000eed2011e19eb8e98ea8e6b6dcb33fd46e2", + "0x00000000000000000000000000000000001e3e0d0f6f8d68e44fef7782e560a8", + "0x000000000000000000000000000000360b48ed0bbfbe881a0c594fda1156d1c2", + "0x000000000000000000000000000000000005631fc55abbd5baf708017d206301", + "0x000000000000000000000000000000290b6c5f355c5a1f473643661135c3e9a5", + "0x0000000000000000000000000000000000039f4a3b82a16f4b0ed5403feeefd2", + "0x000000000000000000000000000000680a6ef9a7491770e5cbf634114d63f030", + "0x0000000000000000000000000000000000183b1ae13b8a3dc038a3605aff69ca", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000ab174711db3c7be885fe511400843f884e", "0x00000000000000000000000000000000000c53c8e59ba9b6c45533d6c55badb0", "0x000000000000000000000000000000a093c77246c3444f351431911df91986a2", "0x00000000000000000000000000000000000e10b19abeafc83142e3f031362029", +======= + "0x000000000000000000000000000000fcc67c9c28e1b0d21faef486e5cc546b50", + "0x000000000000000000000000000000000012109386f101bc761a5d807cd03879", + "0x000000000000000000000000000000d72386c426d464eb50ca26d26a07df8347", + "0x000000000000000000000000000000000007353808c7dbab3dbdcc78aad46228", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -133,6 +205,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000239478075be390895badc24ee1ea4fb0fa", "0x000000000000000000000000000000000010b69bebd538f119bae37700d450a0", "0x00000000000000000000000000000058c21b7cd34072cf8ee30a9183c75d0c0e", @@ -177,14 +250,57 @@ key = [ "0x000000000000000000000000000000000007f80b214533c591b4542d40c25779", "0x000000000000000000000000000000a28d891b27b3d3aa7c53c15e4c7c9447c3", "0x00000000000000000000000000000000001904687bba4992246b15eed831609e", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c9f6bc0de94d319c1e05f2b732ffc93bb0", + "0x0000000000000000000000000000000000000122191719bb0cbba1342f9bdfd6", + "0x00000000000000000000000000000086335e70c145ff3843d0a257e0e9903cd3", + "0x000000000000000000000000000000000022c68d32060f03ebda2e56ef6675b0", + "0x000000000000000000000000000000f02cbcdda07a861c77a677e38817b541ec", + "0x000000000000000000000000000000000003a2fe53101210c0fb64256d45c876", + "0x00000000000000000000000000000045c4b0fe0fd56e5c8614746ecda01f4e7b", + "0x00000000000000000000000000000000001afd9f4996424f4eb584dbe55e00bf", + "0x0000000000000000000000000000007e845f27d560e683d2cc166b947f2cce48", + "0x00000000000000000000000000000000001a9738a94a113d8834b60248cbdd3c", + "0x000000000000000000000000000000650e84701c397de65063cde58e6b7b9ed0", + "0x0000000000000000000000000000000000044163ca8264697cdd107d58b9c892", + "0x000000000000000000000000000000f6938d6f572e41a8e562070d1bec42e4be", + "0x00000000000000000000000000000000002dd4d294d14a367f10cf417ff7928d", + "0x000000000000000000000000000000a3795ed37874ea808fc8d330797bac6223", + "0x000000000000000000000000000000000012882e728c00d3887894f6e5f957aa", + "0x00000000000000000000000000000050b8583fefde81e1c5fcada3638af793d3", + "0x00000000000000000000000000000000002933c1b58958f99e45ed733a27ec89", + "0x000000000000000000000000000000a4ec5d24509f652cd9f99aac8ccc1ccc3e", + "0x00000000000000000000000000000000000500776f8c933ca0b32ad705a9b007", + "0x000000000000000000000000000000fe1a7ce572a1e5fc209dfe549e247d85a5", + "0x0000000000000000000000000000000000275a1481c0fb32840e03f13494c02e", + "0x00000000000000000000000000000026839b3d653f1d2665098eaee5dbbcd960", + "0x00000000000000000000000000000000002904f371537ec0f8205d3c4ec013a8", + "0x00000000000000000000000000000022a88a567adeb1c5e54675305843ffb35b", + "0x0000000000000000000000000000000000053cbbf63aaa8877ecd2a59208015d", + "0x000000000000000000000000000000734d3b08070f11c7fa85fbe622de62cea0", + "0x00000000000000000000000000000000000613be27786a1cd4d231aceb53532e", + "0x000000000000000000000000000000a1eaf706fd0e53ea786c70d6e11c89f26a", + "0x0000000000000000000000000000000000269a4ca2804c9da25ddd06a8f3c504", + "0x000000000000000000000000000000ebbd1978e6f59ddd990347ede202bd8626", + "0x00000000000000000000000000000000002a4cc6f100febe55bffe3693689384", + "0x00000000000000000000000000000095beb3db2068925e5ecba273b38c38096c", + "0x0000000000000000000000000000000000092157618c6c13554aad34967062fa", + "0x000000000000000000000000000000440388803d55300efca67c52a8ccca4bf9", + "0x00000000000000000000000000000000001adbcbf52f1d9b02a5987f53467b5a", + "0x000000000000000000000000000000f450c163f378b7dc6a75f87367940bace5", + "0x000000000000000000000000000000000015778d2108d01203f0f6bfee3b62bd", + "0x000000000000000000000000000000a5d9a0b4209e094f6aceecea556901c18c", + "0x00000000000000000000000000000000000b18c594427e87d10db4b3cab8e61a", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000235e9f644d2766e133603c3113361d99e5", "0x000000000000000000000000000000000027620b19702e08713a6ccade568c0b", "0x0000000000000000000000000000006b9cd8d4753c40ec30f4fa341722b2f0b0", @@ -193,10 +309,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003aeb5a2371bf185c6956be6b5a3e2db38c", + "0x00000000000000000000000000000000000ede135cf690d5fc052d6fd4cb510a", + "0x0000000000000000000000000000000c695e2cad81d4d0e729c8500afc01645f", + "0x0000000000000000000000000000000000297022ceb87adab8e3bb33ad347e92", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000635529f96b412a8ca0fe8021781ea65f0f", "0x00000000000000000000000000000000000c63d34d67228c100703083e086bf4", "0x0000000000000000000000000000009af0884e0c2c1e319a8b89b910beb420ed", @@ -226,6 +353,53 @@ hash = "0x05a64a4a0d3e6a3aeee133f01b231618a356c6e35fbf93b89f0870f80a001b9e" [private_call_0.verification_key_hints] contract_class_artifact_hash = "0x0a668e1f2336b9d3ca4eaef7416f416af5cfc9807f9773d2214b202ce54c5e1a" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x0000000000000000000000000000008d25a20b90ea428bcef673aa799f873c55", + "0x000000000000000000000000000000000023c2222305a28bbed84eea95fced10", + "0x000000000000000000000000000000d364591d217ef1b203bde82c8d1ac6ede7", + "0x0000000000000000000000000000000000214ba592c74c0201958003753da86f", + "0x00000000000000000000000000000031482b5ffb86c3e6763c0eb1d6f5d24d19", + "0x00000000000000000000000000000000002dd76361423b89916eef099b598552", + "0x000000000000000000000000000000db88ea3a585df2368bec0c0b2022260a88", + "0x000000000000000000000000000000000025652b3824205b5f3da7c22ea4ab0b", + "0x0000000000000000000000000000005312136b9a30254132abbad74f3e41d360", + "0x00000000000000000000000000000000000b318589c6250bcb0bcd446f4c869f", + "0x000000000000000000000000000000f7ef26d28672d1c9f61782f3012b36366d", + "0x00000000000000000000000000000000002751d92283fdb9c9519eb575e076a2", + "0x0000000000000000000000000000009b3da2601b5c5f7bcd353d77eddd1916ac", + "0x000000000000000000000000000000000028bc78d046b6c4015665b75d89e381", + "0x0000000000000000000000000000008cf9cfaf2d79ded5b157014844632ba1e2", + "0x0000000000000000000000000000000000167f21684840dffa2d41e4832e5c52", + "0x00000000000000000000000000000004811e80c60da3ecf5a37e8a1ceb120f33", + "0x0000000000000000000000000000000000260eaf60c19c9ced7e1390e65cb50d", + "0x000000000000000000000000000000848a3bde0035a771d1dbe7f814b5d7abed", + "0x000000000000000000000000000000000000b1a084b860f932fd89fca801aebc", + "0x000000000000000000000000000000ed9fefd5766df8c7eb872238e230755c81", + "0x000000000000000000000000000000000001c1fc62010c3ab9fed3a238bf4fb4", + "0x00000000000000000000000000000033766c5cea45ee83e47414fdf701e582f8", + "0x00000000000000000000000000000000000747f9bf74c4a66aa58e7522ad1d14" +] +hash = "0x0c6c64f42f07daf64c90ccab3a6092a78e1b4ac47459b683261d919f1885fcd3" + +[private_call_0.verification_key_hints] +contract_class_artifact_hash = "0x01ee4f0be46f758180b1f0b55230bbfe95c7129f218fb2146323730b36089462" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -236,7 +410,11 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_0.verification_key_hints.function_leaf_membership_witness] leaf_index = "0" sibling_path = [ +<<<<<<< HEAD "0x02b8a1c4df6a84a5ca96923f96e5a94c2aadc76662d85e22334a2eda804c4943", +======= + "0x2d4d64eaf823b9285799d92ee0500c0b6c94706ac1413ff9837e7b44f1be88a5", +>>>>>>> origin/v5-next "0x1eeeb8fb2c3d5ed2bdeb4545deda4551d41e22e63ebfe4e47e98d83847870dc9", "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", @@ -246,30 +424,53 @@ updated_class_id_delayed_public_mutable_values = [ ] [private_call_0.verification_key_hints.public_keys] +<<<<<<< HEAD npk_m_hash = "0x02472138e557b85dc3e81e0494f4cca6e7ed1f3cccfe7496598ed82fd069e4ad" ovpk_m_hash = "0x2fde3266d71b95a04c6e2858b6745a79d42cad32b7af10266a8e7919da95c2e8" tpk_m_hash = "0x1fa7f10d06bd20dd7fc2608559b2575bc3d1db858266444c6a3b0b9abfb87205" +======= + npk_m_hash = "0x067273d17ee266bfb83ad548df436b4f30b6b0a77d76196f73143426b3b60c2d" + ovpk_m_hash = "0x2639509bda26d905b50b33c24c3874f86bf108880c1d5bd87b8cf77b1293cf16" + tpk_m_hash = "0x22ecbc8964961ddb7af03d2b0255ef86c83c2f5bd4bc5f2b4b2acbe290bad052" +>>>>>>> origin/v5-next mspk_m_hash = "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356" fbpk_m_hash = "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496" [private_call_0.verification_key_hints.public_keys.ivpk_m.inner] +<<<<<<< HEAD x = "0x2606b39a0b15d0ed8524cf778e95783ee547aaea5ba71ce51d110fa78cd0e93b" y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" [private_call_0.verification_key_hints.salted_initialization_hash] inner = "0x0127ad781a9267a118b108cd9fc83a7f89ea4035b3528c03cd87bd3216a9c8c8" +======= +x = "0x0a025f4bc5b875ab5c5b075193578be7da20f967f5abed330cce25cce88b0464" +y = "0x288c1719cbc5f08023eaf8b92c5f7b4a87c79b52bd9a845b76107f193d016a97" + + [private_call_0.verification_key_hints.salted_initialization_hash] + inner = "0x17677d1b22e00913a96ebc990928c00d2692e0d1f690ef46aee8eb879f0e1bf3" +>>>>>>> origin/v5-next [private_call_0.verification_key_hints.updated_class_id_witness] leaf_index = "125" sibling_path = [ +<<<<<<< HEAD "0x0c58e78b79a995c9177f90f3cda8f09c427092142e3ab374370e7a327c6d5e18", "0x0d92ced82ef7d19f41e51aebc0a1d5da922111ce449eeb1fe7aa19f7b18b058a", +======= + "0x0ad99a67e495a9baba93a17ed22c43b5bf5b1d920043becb6c21a9642b5311db", + "0x00bb29dc7634208c40137583f50a6c1812d22788d796fd9e5b9091f68350291f", +>>>>>>> origin/v5-next "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", "0x0a17511fc198a5964425de50f75ead8401ae6721db865b4d0d13cb7299b276b2", "0x2edd4e68944dac758244213037fbe9d622c7c28d6070f16862b3e8986090bee4", "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", +<<<<<<< HEAD "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1b2a9fedcf26c0626da922db2f6eb177c938c1a4a7cbcf55b7bf0129ba445229", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -305,16 +506,24 @@ y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" ] [private_call_0.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" value = "0x00000000000000000000000000000000000000000000021e0a672e2ad6668580" next_slot = "0x0a75610d692052893cfb76a933a4a32bc9235e77292c988ccc50fa6c07c267cd" next_index = "0x0000000000000000000000000000000000000000000000000000000000000085" +======= + slot = "0x059309e2fac35b4137b0c841dd465568ee91605fdeea93f1b4836758859b8d74" + value = "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000" + next_slot = "0x0d4f56828c410d1f40a61e881483159d51cd014c2d7f4ba65a7ce5bba1509de9" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000081" +>>>>>>> origin/v5-next [private_call_1.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x0000000000000000000000000000007b8a961e9d1cc0efb7eaeab4163561cd16", "0x0000000000000000000000000000000000174aa09c5f02c7f96802edcf5b9f1b", "0x000000000000000000000000000000729e11615515482ca017bc5baed2f49939", @@ -347,14 +556,55 @@ key = [ "0x00000000000000000000000000000000000086e4523b84833bb10ab9029aa6a3", "0x000000000000000000000000000000b873d7d62273050ba45183160867f15067", "0x0000000000000000000000000000000000131976bd81de5f405601adc887519e", +======= + "0x00000000000000000000000000000097f6a9958e603d893c7fc59cd5605ad54b", + "0x00000000000000000000000000000000002f9ca72d1619713560457b078f3cf0", + "0x0000000000000000000000000000002c9a04fda781199eea39c0024bdd63d913", + "0x00000000000000000000000000000000000b2ab7e50d440113c9c8ae5f4a58a5", + "0x0000000000000000000000000000005f5049e6294aa3f3417f5fc8e225ecb96c", + "0x00000000000000000000000000000000001bb678dfaf3ca4c3ffaa585f3af06d", + "0x0000000000000000000000000000009f07851f8d98b747faf537a351939a104b", + "0x000000000000000000000000000000000000ed057219fe6eda1221042e78912d", + "0x0000000000000000000000000000003c77f6c899dcb7073ea5608ef53559d1da", + "0x000000000000000000000000000000000016d42062a7295112db277d9c613fff", + "0x000000000000000000000000000000d68f1262dcea5f9212383d881623de18b3", + "0x000000000000000000000000000000000029662d2df7f5116ec53be602a8c484", + "0x00000000000000000000000000000014c7cefe9342d1e59fef9d945e42821228", + "0x00000000000000000000000000000000001dc8af8b2e07a354420dc76ac0325a", + "0x000000000000000000000000000000af6487f9aaf0af43e9d072de5b44f89334", + "0x00000000000000000000000000000000002eabc405b23bf1ae9e76fb1cd56a3f", + "0x000000000000000000000000000000abdc5bfb3bc88c7254c1334a3071e0cd9a", + "0x00000000000000000000000000000000001433cddca13ce42989f3f29b1a2ecb", + "0x000000000000000000000000000000a5108c8dc5e948601fab3bb2393ca20bd5", + "0x00000000000000000000000000000000001500b71a1057e5aed02d0c50a9305a", + "0x000000000000000000000000000000c5010876763779f11e45012285f38b7df4", + "0x0000000000000000000000000000000000131b676195fe0014c7a121ed1e4428", + "0x000000000000000000000000000000b2fb1f42212074d53abe460cc43fdb708f", + "0x00000000000000000000000000000000001af5cbb6bbe4488c4d6e0fef9db801", + "0x000000000000000000000000000000aea8e84fdc25f41d78f882e4751b53a413", + "0x000000000000000000000000000000000005d56b2384fb448a2a3df6e821df7d", + "0x0000000000000000000000000000007cb475f785f5a85f3273591e7a5a488244", + "0x00000000000000000000000000000000001ae66dca287dd4e7529a8c2ee0fbec", + "0x00000000000000000000000000000008d5ffc224821de72a5a1cec43572ea16a", + "0x0000000000000000000000000000000000166bff2d7f3ae92ae3f6dcd7ab1876", + "0x00000000000000000000000000000086e0bcad3abc005716e8e7bcf4da0e44c1", + "0x00000000000000000000000000000000001b23fe0fef65ab5371600b02d4d5cd", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000006d3f1292fb162a6da08b89c90a6013e22", "0x0000000000000000000000000000000000058cb8788184fb7393da8af62a8daf", "0x0000000000000000000000000000000c7b2e25ae9a124464a00a9ad0b07811b1", "0x00000000000000000000000000000000001e907fb5980c39ae5846442102e114", +======= + "0x00000000000000000000000000000005c79785ed23abef488a9f98738eb5964b", + "0x00000000000000000000000000000000002c3a8978d1081bafa0ae557d7a46cb", + "0x000000000000000000000000000000bb2f911980237993339146ae78f5944cba", + "0x00000000000000000000000000000000000336942848205de1892ef2dd75df15", +>>>>>>> origin/v5-next "0x0000000000000000000000000000007e43c3fefd9cf207d14e08d6e6be11328d", "0x0000000000000000000000000000000000008407f0a257d18541cd931cdb9346", "0x000000000000000000000000000000c39ffd53971478cbbea8a4d31adff6006b", @@ -375,6 +625,7 @@ key = [ "0x00000000000000000000000000000000001eece117120baa2fa4c5345f97877f", "0x00000000000000000000000000000039ca5d1cef923cf7b983d91bd04fef9723", "0x00000000000000000000000000000000000bba8b6f618673483d9b96aab5a186", +<<<<<<< HEAD "0x000000000000000000000000000000ba812427b0b9d602ae0c3964de0ee2bf8a", "0x00000000000000000000000000000000002514f172050b8a152c189ed717f7b4", "0x0000000000000000000000000000008b0dd69e5da8c7787f660ea73d662d8274", @@ -419,14 +670,57 @@ key = [ "0x000000000000000000000000000000000023d215c8d57c958cfe7679bd53439f", "0x000000000000000000000000000000e5d542d22930a62d5f595d667857e683d4", "0x00000000000000000000000000000000000a0caf1e2c896cd3f031b66bd7826b", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c0d344e88b2d0d7aba15b2a67f0330e50f", + "0x00000000000000000000000000000000001120037b36633665a87d5aa3b97017", + "0x00000000000000000000000000000051cafb3f42346437d3acd5c118fa76908a", + "0x00000000000000000000000000000000001282d63996d8b39860963754c270ef", + "0x00000000000000000000000000000019d704d22280560579fc208400eac7438c", + "0x0000000000000000000000000000000000272813dd76f933f2cc8e8211d041c3", + "0x000000000000000000000000000000291a263a99bcc6cdf96a3b58f3aeef6c37", + "0x00000000000000000000000000000000002b81890fb0d66af02f21cafb055461", + "0x00000000000000000000000000000010511d4b913a515c8e5b1a109f2e7e423a", + "0x00000000000000000000000000000000002e23d535797d664fde04721bdd21a7", + "0x000000000000000000000000000000b519b8129f0cad36d9fecfb890f41192e1", + "0x0000000000000000000000000000000000276cb465a02d4a7af5ec258ba0b974", + "0x0000000000000000000000000000007fd3b1c27b2f6f809c22b5e5cabe6e292c", + "0x0000000000000000000000000000000000031a95764c22ed6294039fdbdb90fe", + "0x0000000000000000000000000000006bddf4f005f2eab2e278d8b519db8ff1dd", + "0x00000000000000000000000000000000002ff24ecbc475bef1e718e65b96131b", + "0x000000000000000000000000000000d2644d5dc51641b8afceaade940536094a", + "0x00000000000000000000000000000000000bab2a919a07adae2b54744c518a92", + "0x000000000000000000000000000000cf11b35f75fa3ca1a7053cbf75c9366199", + "0x000000000000000000000000000000000022c4284ff66fca8019a88bfef7f9aa", + "0x000000000000000000000000000000a3f0e9e99c62cc5136323b04a56bd2b1b7", + "0x000000000000000000000000000000000001bc103841677d447402c675fa7368", + "0x000000000000000000000000000000a819b64ec8b616fea770fda80e7d62144e", + "0x00000000000000000000000000000000001e202851c9e12a9a4ed186e37ec815", + "0x000000000000000000000000000000c632a3584fdcf115cad982831fe9a46f5c", + "0x00000000000000000000000000000000002f7b8b0c925b4ff94e58be8ecf2a94", + "0x00000000000000000000000000000063e61fed6b2cc8fc46e8d11b3de4ac929f", + "0x00000000000000000000000000000000000c2ef9d38354c9277cdf680c9c3b8e", + "0x000000000000000000000000000000bc20d88cd31e276701489183b566358ff4", + "0x000000000000000000000000000000000017d35470b6c3f315de4b0204b5f013", + "0x0000000000000000000000000000005682082cf4906ebe25783fac0084e54e3d", + "0x00000000000000000000000000000000002d4457037b9bca8bf590aeb8e2d23e", + "0x0000000000000000000000000000007fd3b80cc8a3d29613acafa7716ba7f070", + "0x0000000000000000000000000000000000088ccc0db37b9c46a11a427780dbe6", + "0x000000000000000000000000000000ec07a9b2942bc21e6c139030ebe7bfa506", + "0x000000000000000000000000000000000005feed3c58f85c1e24d03d3fccf623", + "0x0000000000000000000000000000005d94250135686286d00e8c8998286a0f0e", + "0x00000000000000000000000000000000001ad8604266b3735a8ca3b63e16c822", + "0x0000000000000000000000000000005021a4b77804a5931f9c81a7a6599274b9", + "0x000000000000000000000000000000000019f2241fbbfa362ec1b794b67b02ba", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000064888d44519589b517016b3723197f1dc5", "0x00000000000000000000000000000000000dfb08e5ec9b5e904ca943092f4015", "0x000000000000000000000000000000101f93381801ba7b86a9498c713eb1c262", @@ -435,10 +729,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x000000000000000000000000000000890796e828d61f6de5d77eb5d28abaa93c", + "0x00000000000000000000000000000000001fdfb2958f40c3ae0a1c6caf201969", + "0x000000000000000000000000000000b08cd4273714259369945c72dd05bc39a3", + "0x00000000000000000000000000000000001061c0b91d9facc1c0798dd6871403", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x0000000000000000000000000000008d8d781b8b08e644a0dbfd7820117a3f23", "0x00000000000000000000000000000000002604540f265bc7e1df82ab42e3c309", "0x000000000000000000000000000000926afd7b85c067eaac4ace37600b3438b4", @@ -468,6 +773,53 @@ hash = "0x1e8920e0dcba0171d344624d4e94b2bee6e2f17fae8a949356c2808a837ccbd0" [private_call_1.verification_key_hints] contract_class_artifact_hash = "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x0000000000000000000000000000007a41bbd14a978fa08aa34f19d40a16a21b", + "0x00000000000000000000000000000000000f69db7654f5a649afbd8b3682903b", + "0x00000000000000000000000000000078620c6e67ba9e86b75e6036935d8e7faa", + "0x00000000000000000000000000000000000ba033d64d149bd4c074ab0233c92b", + "0x000000000000000000000000000000296f8734481e9fd733f7480a385b683dfc", + "0x00000000000000000000000000000000001ba2a50023a52301d0d6cc9ef108cf", + "0x0000000000000000000000000000002b129f24e41aa80202f032e3fe5cdedd95", + "0x0000000000000000000000000000000000120d465f97264865a85fa2cf45dda7", + "0x000000000000000000000000000000abfc41d75d2e0e94428943a815786bc554", + "0x00000000000000000000000000000000002a328f9f8620bd406eceaf197d3ed2", + "0x0000000000000000000000000000003494c34420ba492ebc2cc52064f0d86fa5", + "0x0000000000000000000000000000000000107000a7ca9fb487a318bb3fb53929", + "0x000000000000000000000000000000e989d4387165854766f8e8aa0785288d9e", + "0x00000000000000000000000000000000000f5be9f07ea6d4838d1a4ccd6fae52", + "0x000000000000000000000000000000230a6f48a027eeae7ce748c8b89428a07f", + "0x0000000000000000000000000000000000154cdb93544bf0227d26e2a5aaad27", + "0x000000000000000000000000000000d1de79761b91ea6db316e1cbc80f9da74d", + "0x00000000000000000000000000000000002ec4f2e07e87240ddca32bd47271cf", + "0x000000000000000000000000000000706e8549bc4266084fd9ddde064c94dec5", + "0x00000000000000000000000000000000002ad99377c6b64b3758383673721586", + "0x0000000000000000000000000000004903779235fb41e4c497d5ca6d65f884c6", + "0x00000000000000000000000000000000000dfe1e0f08c490544975ea30ade9ac", + "0x0000000000000000000000000000006c6842d50d80fe67cc3cea9280bb0dc4f7", + "0x0000000000000000000000000000000000091376df2323bb75df0af94468a4fb" +] +hash = "0x21fd67c4e1216182929a45891914b3806f6633699d65b028bd6f14f8539a74c0" + +[private_call_1.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -478,8 +830,13 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_1.verification_key_hints.function_leaf_membership_witness] leaf_index = "0" sibling_path = [ +<<<<<<< HEAD "0x09dfc90590cb91e6b06e0ed66903259d8480e626e4609df4f7e4dd5315ef4d05", "0x0b3f28b1a3d3fe728e3cde62b17eece998b7f44dcf49cc9296626604b51c2264", +======= + "0x090454dce68a8a6521b5752a679577e1f8f48960268673ed20671cd66b6d2cd3", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", +>>>>>>> origin/v5-next "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", @@ -499,6 +856,7 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_1.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x0164a9dc0bb5231c23c9d23e8feb4392f4f3984c9bf80114d978ef1392519234" [private_call_1.verification_key_hints.updated_class_id_witness] @@ -512,6 +870,21 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x249f64999247f8a405ad12feee9f77f92ba7bf25b410b4eba22a4217ec975a1b", +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" + + [private_call_1.verification_key_hints.updated_class_id_witness] + leaf_index = "131" + sibling_path = [ + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x1a0b47872448014b66efcd71735e1f89558ffa653369dd57cf5489d89ebcdc5f", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -547,6 +920,7 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_1.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x20647ac29f83e2db48d5f31bf73f283f2192f4d7c798b7740965ed967e62e687" value = "0x0000000000000000000000000000000000000000000000000000000000000001" next_slot = "0x2451101525be60fa836b69d102945aad406c1008608f7a3a92a7b977a0f7d984" @@ -554,6 +928,15 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [app_public_inputs_0] args_hash = "0x0ad74135500a7d3bfe36d98883384a57bb5977c0cbbc3eca922215e1cac4d75a" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" + +[app_public_inputs_0] +args_hash = "0x0bb7df885b2cb899c746612205baf99c43819dfa5759939c515d880536c3a023" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000002" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" @@ -561,8 +944,13 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" is_fee_payer = true +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e7495" tx_request_salt = "0x12951286257a10c2833326a63e7777bcb8246098551b41bfdaf6672878aef9f9" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547c4" +tx_request_salt = "0x1e9128a18fc35bea7debe31b2441e502db9b69ac8eb0be5ad47ed7315f3eb381" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context] is_static_call = false @@ -571,10 +959,14 @@ tx_request_salt = "0x12951286257a10c2833326a63e7777bcb8246098551b41bfdaf6672878a inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [app_public_inputs_0.call_context.contract_address] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context.function_selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [app_public_inputs_0.note_hash_read_requests] length = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1021,13 +1413,13 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.nullifiers] - length = "0x0000000000000000000000000000000000000000000000000000000000000000" + length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[app_public_inputs_0.nullifiers.array]] - counter = "0x0000000000000000000000000000000000000000000000000000000000000000" + counter = "0x0000000000000000000000000000000000000000000000000000000000000009" [app_public_inputs_0.nullifiers.array.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x09cd048444646bbe69fbb053fe5f318e303193eaf348ff8f4af70e0106e647e0" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs_0.nullifiers.array]] @@ -1139,7 +1531,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[app_public_inputs_0.private_call_requests.array]] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" +======= + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +>>>>>>> origin/v5-next returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" @@ -1148,10 +1544,17 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" is_static_call = false [app_public_inputs_0.private_call_requests.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [app_public_inputs_0.private_call_requests.array.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs_0.private_call_requests.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_0.private_call_requests.array.call_context.function_selector] inner = "0x000000000000000000000000000000000000000000000000000000000cca003a" @@ -2232,6 +2635,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x03128fd7b099df1cb363c467a855da911272c4f73ee7232bcfd3d30cc6e730f3" total_fees = "0x00000000000000000000000000000000000000000000000000030e6f24b2fa80" total_mana_used = "0x000000000000000000000000000000000000000000000000000000000008992c" @@ -2265,17 +2669,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_0.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x21b92963a9ece4d786fef5ba52a4828dc839dc1bafa538a637a6b308231e1499" + total_fees = "0x000000000000000000000000000000000000000000000000002720f1624aec00" + total_mana_used = "0x000000000000000000000000000000000000000000000000000000000008d7ac" + + [app_public_inputs_0.anchor_block_header.last_archive] + root = "0x0c2607723b14ee159dbe1916740901d37ab21e03c62b7f3a85e8a54962de4952" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" + +[app_public_inputs_0.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001400" + +[app_public_inputs_0.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[app_public_inputs_0.anchor_block_header.state.partial.nullifier_tree] +root = "0x112ae6ef98b2e5cd89118cfc778ab1b3a7698954eda06a468fbf5d93222da69d" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000001c0" + +[app_public_inputs_0.anchor_block_header.state.partial.public_data_tree] +root = "0x0d9b725e5ad229ca5848d26346177471df6571c8477bec8ee6e8409ff995f3c6" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_0.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000008" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000025" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f644" + + [app_public_inputs_0.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_0.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_0.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_0.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -2287,14 +2734,22 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_0.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" +======= +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +>>>>>>> origin/v5-next returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" @@ -2302,17 +2757,29 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000006" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" is_fee_payer = false +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e7495" tx_request_salt = "0x12951286257a10c2833326a63e7777bcb8246098551b41bfdaf6672878aef9f9" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547c4" +tx_request_salt = "0x1e9128a18fc35bea7debe31b2441e502db9b69ac8eb0be5ad47ed7315f3eb381" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context] is_static_call = false [app_public_inputs_1.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [app_public_inputs_1.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs_1.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context.function_selector] inner = "0x000000000000000000000000000000000000000000000000000000000cca003a" @@ -2698,7 +3165,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[app_public_inputs_1.note_hashes.array]] +<<<<<<< HEAD inner = "0x2bf98defeb86cf1e81fbf103fab693e3bf77ef5c0925a45e39e5b663a768abe6" +======= + inner = "0x0250143681635911118aa9c6784a239fa76a68d57b23b54303b6408b7aa8f20f" +>>>>>>> origin/v5-next counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [[app_public_inputs_1.note_hashes.array]] @@ -3538,6 +4009,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.private_logs.array.inner.log] fields = [ +<<<<<<< HEAD "0x1720c887661e3acdc6fd951243f3fdb42064a6ce0f957c42c81e8770659a994d", "0x096c6ed2cef8ca12679378137a83821a5837dee2f27c82a81108e2b2068c03d5", "0x2f01d7b0fb0c832bff5ce9d09c283d3af35ac737f7f257abd9fe8d0edce9c952", @@ -3554,6 +4026,24 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x274f2ae0766c05e31a7dad41db07706bfb34a5a2f34a19b72cd50008990b6f04", "0x28243c2861d1adc8522f88ae4105ed1b19885e3bb7f4046a5b483ab9b2f7fe4e", "0x29fe0e8868db8730bfc08ed3477fa2921bb4e689ee86b1b3790b3afb18eb0302" +======= + "0x0cb2d5f96e36646f83acf65f6c29e6a77642790770af90db7ce53bf84fca22e2", + "0x173a0f6a089cb3b9d85277d7574e7ccec5b00254bd22b4d6a0760ef84699fadf", + "0x1ee91300f8bd67b9a5b0da4b33554197a4128444cae7506fdb0eec9d326a696a", + "0x2c87dbcb5f3ee052cd050fab8760e3cf943430d9363873c980d83ba381feca8a", + "0x07e12c3b75d7e05d12e4b4fd50c759f412a8bfd20769566c8f9397376542299f", + "0x07838b1da6cc8198869c9299a123ca9d9165e1d1b3dc7377c504caac5686c85c", + "0x27489ed085fe303457aa8c40827d4c32d8019d0cfaf40d320b23f57823b52a83", + "0x139787a7a1393b227475b4223018dab6eaaea247e150065e55c69de39cf6792d", + "0x08d1967cfb4e8ce77dfa9bee9d41ecabee2f31d78465280b283f0fcba2c656fa", + "0x1c88ae52aa27f4fb44fd8fc3cfbf2aa8326decd21cc788a53323090dd364aef5", + "0x0429bf1e28a47601b48e4879a03f657be1b5f524a0917d389b168202e37892f4", + "0x186185cd356b990b26e27d59a7072831abbccf6d05d294153615de94a4714c84", + "0x2b30e189d999dda8757e005fbb0fc550530fdb8170005de2f710b7e9ceb5741e", + "0x1050c553500b593b3b1fa467c771edd2d0bc372a576d168d149a00a4321fa3bf", + "0x18b4c7d2398f726fa360134c8770a2450271d4aa0c040a36cb403210fac12578", + "0x189097223f2159fb8d094562c8da596217e33e1d83fb9823b7ba3c01daf56fc7" +>>>>>>> origin/v5-next ] length = "0x0000000000000000000000000000000000000000000000000000000000000010" @@ -3973,6 +4463,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x03128fd7b099df1cb363c467a855da911272c4f73ee7232bcfd3d30cc6e730f3" total_fees = "0x00000000000000000000000000000000000000000000000000030e6f24b2fa80" total_mana_used = "0x000000000000000000000000000000000000000000000000000000000008992c" @@ -4006,17 +4497,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_1.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x21b92963a9ece4d786fef5ba52a4828dc839dc1bafa538a637a6b308231e1499" + total_fees = "0x000000000000000000000000000000000000000000000000002720f1624aec00" + total_mana_used = "0x000000000000000000000000000000000000000000000000000000000008d7ac" + + [app_public_inputs_1.anchor_block_header.last_archive] + root = "0x0c2607723b14ee159dbe1916740901d37ab21e03c62b7f3a85e8a54962de4952" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" + +[app_public_inputs_1.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001400" + +[app_public_inputs_1.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[app_public_inputs_1.anchor_block_header.state.partial.nullifier_tree] +root = "0x112ae6ef98b2e5cd89118cfc778ab1b3a7698954eda06a468fbf5d93222da69d" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000001c0" + +[app_public_inputs_1.anchor_block_header.state.partial.public_data_tree] +root = "0x0d9b725e5ad229ca5848d26346177471df6571c8477bec8ee6e8409ff995f3c6" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_1.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000008" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000025" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f644" + + [app_public_inputs_1.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_1.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_1.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_1.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -4028,7 +4562,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_1.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-init-3/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-3/Prover.toml index 718fc5a80c32..7173db7faad8 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-init-3/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-init-3/Prover.toml @@ -1,8 +1,13 @@ +<<<<<<< HEAD vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" +======= +vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" +>>>>>>> origin/v5-next is_private_only = true revertible_counter_hint = "0x0000000000000000000000000000000000000000000000000000000000000004" [tx_request] +<<<<<<< HEAD args_hash = "0x2893dab89a1468870cce7265c98e30b17d3931d8323d5b18c53d1fa35065c52d" salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e6353840b" @@ -12,6 +17,17 @@ salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e6353840b" [tx_request.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= +args_hash = "0x2584caa1567a9e427e699db2b05e7bf288b2aa95bfa8757a3851d6e175eb55bd" +salt = "0x00fc1e206b4d0c3317e793077e675320bceaaaaf40ea6583a15af22bce830406" + + [tx_request.origin] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [tx_request.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -23,7 +39,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [tx_request.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -33,9 +53,10 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 is_private = true [tx_request.function_data.selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [[protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[protocol_contracts.derived_addresses]] @@ -43,6 +64,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -70,9 +100,10 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call_0.vk] key = [ - "0x000000000000000000000000000000000000000000000000000000000000000e", + "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x000000000000000000000000000000c2fcfc0d8489c45fc44e99de27f075d98d", "0x00000000000000000000000000000000000250a1c52ce6e643e1f935e5d5e63c", "0x0000000000000000000000000000000ceab0983ed2f72557b986a107c6a2f1b4", @@ -105,14 +136,55 @@ key = [ "0x000000000000000000000000000000000013a6e471a0721fc7d40b4d1ad88cc2", "0x0000000000000000000000000000007564eb5cdd740a081bcb6aa7e2209870bf", "0x0000000000000000000000000000000000205d06fde1c2018363c71f3641a26b", +======= + "0x000000000000000000000000000000c5c370e236365534a554f3abeca6b94894", + "0x000000000000000000000000000000000015d7aa60ea2a941b91e6b336e75026", + "0x0000000000000000000000000000006357ba60787a91d1fc5c51168ee3c81c6c", + "0x00000000000000000000000000000000000a22dc88f2f798b712b2cf2396ac3e", + "0x000000000000000000000000000000def2c79e4c22627bc001efad7524053579", + "0x000000000000000000000000000000000027e9bd3e9e0f562bfe071c08908505", + "0x000000000000000000000000000000850c88b574efa3ca07103c8b26ff5ec9eb", + "0x00000000000000000000000000000000000d31eeb0b5a8e4f4455f861e371240", + "0x000000000000000000000000000000b58ee7ae04d363646f2297e9c35c52c4c5", + "0x0000000000000000000000000000000000184a3efcf4a9b94b0ac2352d3422c6", + "0x0000000000000000000000000000007b1f0c7faf2a01359a1911e8a0145130a5", + "0x00000000000000000000000000000000000de73fab3ee67c88cf8da393cab3fe", + "0x0000000000000000000000000000004b55af367fb73a492cc2948c4baee0cc3b", + "0x00000000000000000000000000000000001f81af423f0b6b2c2e5d62b2d2e44e", + "0x000000000000000000000000000000e94aabeb9989d6955bcd0f1afd240e630e", + "0x00000000000000000000000000000000001a12e867699f4e2d4478df0d277bae", + "0x000000000000000000000000000000bf36791f3925b8b12cd1a183e4cb969415", + "0x000000000000000000000000000000000022f6f478bceccbaa970b4086dfef78", + "0x00000000000000000000000000000024fa3c15ffc73af4ebb513ff0fd796de18", + "0x00000000000000000000000000000000002883a2c1102d93f385ca051601f3e4", + "0x0000000000000000000000000000003eaafc62c72b09a1078cbb16f075b54635", + "0x00000000000000000000000000000000002ddfc92538af4432c8302af7753ad3", + "0x000000000000000000000000000000c284791c7b8c0055eeab548501e5382b76", + "0x00000000000000000000000000000000000b298e4bfbdd77fbf2542aaf6fe6e5", + "0x000000000000000000000000000000eed2011e19eb8e98ea8e6b6dcb33fd46e2", + "0x00000000000000000000000000000000001e3e0d0f6f8d68e44fef7782e560a8", + "0x000000000000000000000000000000360b48ed0bbfbe881a0c594fda1156d1c2", + "0x000000000000000000000000000000000005631fc55abbd5baf708017d206301", + "0x000000000000000000000000000000290b6c5f355c5a1f473643661135c3e9a5", + "0x0000000000000000000000000000000000039f4a3b82a16f4b0ed5403feeefd2", + "0x000000000000000000000000000000680a6ef9a7491770e5cbf634114d63f030", + "0x0000000000000000000000000000000000183b1ae13b8a3dc038a3605aff69ca", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000ab174711db3c7be885fe511400843f884e", "0x00000000000000000000000000000000000c53c8e59ba9b6c45533d6c55badb0", "0x000000000000000000000000000000a093c77246c3444f351431911df91986a2", "0x00000000000000000000000000000000000e10b19abeafc83142e3f031362029", +======= + "0x000000000000000000000000000000fcc67c9c28e1b0d21faef486e5cc546b50", + "0x000000000000000000000000000000000012109386f101bc761a5d807cd03879", + "0x000000000000000000000000000000d72386c426d464eb50ca26d26a07df8347", + "0x000000000000000000000000000000000007353808c7dbab3dbdcc78aad46228", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -133,6 +205,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000239478075be390895badc24ee1ea4fb0fa", "0x000000000000000000000000000000000010b69bebd538f119bae37700d450a0", "0x00000000000000000000000000000058c21b7cd34072cf8ee30a9183c75d0c0e", @@ -177,14 +250,57 @@ key = [ "0x000000000000000000000000000000000007f80b214533c591b4542d40c25779", "0x000000000000000000000000000000a28d891b27b3d3aa7c53c15e4c7c9447c3", "0x00000000000000000000000000000000001904687bba4992246b15eed831609e", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c9f6bc0de94d319c1e05f2b732ffc93bb0", + "0x0000000000000000000000000000000000000122191719bb0cbba1342f9bdfd6", + "0x00000000000000000000000000000086335e70c145ff3843d0a257e0e9903cd3", + "0x000000000000000000000000000000000022c68d32060f03ebda2e56ef6675b0", + "0x000000000000000000000000000000f02cbcdda07a861c77a677e38817b541ec", + "0x000000000000000000000000000000000003a2fe53101210c0fb64256d45c876", + "0x00000000000000000000000000000045c4b0fe0fd56e5c8614746ecda01f4e7b", + "0x00000000000000000000000000000000001afd9f4996424f4eb584dbe55e00bf", + "0x0000000000000000000000000000007e845f27d560e683d2cc166b947f2cce48", + "0x00000000000000000000000000000000001a9738a94a113d8834b60248cbdd3c", + "0x000000000000000000000000000000650e84701c397de65063cde58e6b7b9ed0", + "0x0000000000000000000000000000000000044163ca8264697cdd107d58b9c892", + "0x000000000000000000000000000000f6938d6f572e41a8e562070d1bec42e4be", + "0x00000000000000000000000000000000002dd4d294d14a367f10cf417ff7928d", + "0x000000000000000000000000000000a3795ed37874ea808fc8d330797bac6223", + "0x000000000000000000000000000000000012882e728c00d3887894f6e5f957aa", + "0x00000000000000000000000000000050b8583fefde81e1c5fcada3638af793d3", + "0x00000000000000000000000000000000002933c1b58958f99e45ed733a27ec89", + "0x000000000000000000000000000000a4ec5d24509f652cd9f99aac8ccc1ccc3e", + "0x00000000000000000000000000000000000500776f8c933ca0b32ad705a9b007", + "0x000000000000000000000000000000fe1a7ce572a1e5fc209dfe549e247d85a5", + "0x0000000000000000000000000000000000275a1481c0fb32840e03f13494c02e", + "0x00000000000000000000000000000026839b3d653f1d2665098eaee5dbbcd960", + "0x00000000000000000000000000000000002904f371537ec0f8205d3c4ec013a8", + "0x00000000000000000000000000000022a88a567adeb1c5e54675305843ffb35b", + "0x0000000000000000000000000000000000053cbbf63aaa8877ecd2a59208015d", + "0x000000000000000000000000000000734d3b08070f11c7fa85fbe622de62cea0", + "0x00000000000000000000000000000000000613be27786a1cd4d231aceb53532e", + "0x000000000000000000000000000000a1eaf706fd0e53ea786c70d6e11c89f26a", + "0x0000000000000000000000000000000000269a4ca2804c9da25ddd06a8f3c504", + "0x000000000000000000000000000000ebbd1978e6f59ddd990347ede202bd8626", + "0x00000000000000000000000000000000002a4cc6f100febe55bffe3693689384", + "0x00000000000000000000000000000095beb3db2068925e5ecba273b38c38096c", + "0x0000000000000000000000000000000000092157618c6c13554aad34967062fa", + "0x000000000000000000000000000000440388803d55300efca67c52a8ccca4bf9", + "0x00000000000000000000000000000000001adbcbf52f1d9b02a5987f53467b5a", + "0x000000000000000000000000000000f450c163f378b7dc6a75f87367940bace5", + "0x000000000000000000000000000000000015778d2108d01203f0f6bfee3b62bd", + "0x000000000000000000000000000000a5d9a0b4209e094f6aceecea556901c18c", + "0x00000000000000000000000000000000000b18c594427e87d10db4b3cab8e61a", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000235e9f644d2766e133603c3113361d99e5", "0x000000000000000000000000000000000027620b19702e08713a6ccade568c0b", "0x0000000000000000000000000000006b9cd8d4753c40ec30f4fa341722b2f0b0", @@ -193,10 +309,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003aeb5a2371bf185c6956be6b5a3e2db38c", + "0x00000000000000000000000000000000000ede135cf690d5fc052d6fd4cb510a", + "0x0000000000000000000000000000000c695e2cad81d4d0e729c8500afc01645f", + "0x0000000000000000000000000000000000297022ceb87adab8e3bb33ad347e92", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000635529f96b412a8ca0fe8021781ea65f0f", "0x00000000000000000000000000000000000c63d34d67228c100703083e086bf4", "0x0000000000000000000000000000009af0884e0c2c1e319a8b89b910beb420ed", @@ -226,6 +353,53 @@ hash = "0x05a64a4a0d3e6a3aeee133f01b231618a356c6e35fbf93b89f0870f80a001b9e" [private_call_0.verification_key_hints] contract_class_artifact_hash = "0x0a668e1f2336b9d3ca4eaef7416f416af5cfc9807f9773d2214b202ce54c5e1a" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x0000000000000000000000000000008d25a20b90ea428bcef673aa799f873c55", + "0x000000000000000000000000000000000023c2222305a28bbed84eea95fced10", + "0x000000000000000000000000000000d364591d217ef1b203bde82c8d1ac6ede7", + "0x0000000000000000000000000000000000214ba592c74c0201958003753da86f", + "0x00000000000000000000000000000031482b5ffb86c3e6763c0eb1d6f5d24d19", + "0x00000000000000000000000000000000002dd76361423b89916eef099b598552", + "0x000000000000000000000000000000db88ea3a585df2368bec0c0b2022260a88", + "0x000000000000000000000000000000000025652b3824205b5f3da7c22ea4ab0b", + "0x0000000000000000000000000000005312136b9a30254132abbad74f3e41d360", + "0x00000000000000000000000000000000000b318589c6250bcb0bcd446f4c869f", + "0x000000000000000000000000000000f7ef26d28672d1c9f61782f3012b36366d", + "0x00000000000000000000000000000000002751d92283fdb9c9519eb575e076a2", + "0x0000000000000000000000000000009b3da2601b5c5f7bcd353d77eddd1916ac", + "0x000000000000000000000000000000000028bc78d046b6c4015665b75d89e381", + "0x0000000000000000000000000000008cf9cfaf2d79ded5b157014844632ba1e2", + "0x0000000000000000000000000000000000167f21684840dffa2d41e4832e5c52", + "0x00000000000000000000000000000004811e80c60da3ecf5a37e8a1ceb120f33", + "0x0000000000000000000000000000000000260eaf60c19c9ced7e1390e65cb50d", + "0x000000000000000000000000000000848a3bde0035a771d1dbe7f814b5d7abed", + "0x000000000000000000000000000000000000b1a084b860f932fd89fca801aebc", + "0x000000000000000000000000000000ed9fefd5766df8c7eb872238e230755c81", + "0x000000000000000000000000000000000001c1fc62010c3ab9fed3a238bf4fb4", + "0x00000000000000000000000000000033766c5cea45ee83e47414fdf701e582f8", + "0x00000000000000000000000000000000000747f9bf74c4a66aa58e7522ad1d14" +] +hash = "0x0c6c64f42f07daf64c90ccab3a6092a78e1b4ac47459b683261d919f1885fcd3" + +[private_call_0.verification_key_hints] +contract_class_artifact_hash = "0x01ee4f0be46f758180b1f0b55230bbfe95c7129f218fb2146323730b36089462" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -236,7 +410,11 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_0.verification_key_hints.function_leaf_membership_witness] leaf_index = "0" sibling_path = [ +<<<<<<< HEAD "0x02b8a1c4df6a84a5ca96923f96e5a94c2aadc76662d85e22334a2eda804c4943", +======= + "0x2d4d64eaf823b9285799d92ee0500c0b6c94706ac1413ff9837e7b44f1be88a5", +>>>>>>> origin/v5-next "0x1eeeb8fb2c3d5ed2bdeb4545deda4551d41e22e63ebfe4e47e98d83847870dc9", "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", @@ -246,30 +424,53 @@ updated_class_id_delayed_public_mutable_values = [ ] [private_call_0.verification_key_hints.public_keys] +<<<<<<< HEAD npk_m_hash = "0x02472138e557b85dc3e81e0494f4cca6e7ed1f3cccfe7496598ed82fd069e4ad" ovpk_m_hash = "0x2fde3266d71b95a04c6e2858b6745a79d42cad32b7af10266a8e7919da95c2e8" tpk_m_hash = "0x1fa7f10d06bd20dd7fc2608559b2575bc3d1db858266444c6a3b0b9abfb87205" +======= + npk_m_hash = "0x067273d17ee266bfb83ad548df436b4f30b6b0a77d76196f73143426b3b60c2d" + ovpk_m_hash = "0x2639509bda26d905b50b33c24c3874f86bf108880c1d5bd87b8cf77b1293cf16" + tpk_m_hash = "0x22ecbc8964961ddb7af03d2b0255ef86c83c2f5bd4bc5f2b4b2acbe290bad052" +>>>>>>> origin/v5-next mspk_m_hash = "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356" fbpk_m_hash = "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496" [private_call_0.verification_key_hints.public_keys.ivpk_m.inner] +<<<<<<< HEAD x = "0x2606b39a0b15d0ed8524cf778e95783ee547aaea5ba71ce51d110fa78cd0e93b" y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" [private_call_0.verification_key_hints.salted_initialization_hash] inner = "0x0127ad781a9267a118b108cd9fc83a7f89ea4035b3528c03cd87bd3216a9c8c8" +======= +x = "0x0a025f4bc5b875ab5c5b075193578be7da20f967f5abed330cce25cce88b0464" +y = "0x288c1719cbc5f08023eaf8b92c5f7b4a87c79b52bd9a845b76107f193d016a97" + + [private_call_0.verification_key_hints.salted_initialization_hash] + inner = "0x17677d1b22e00913a96ebc990928c00d2692e0d1f690ef46aee8eb879f0e1bf3" +>>>>>>> origin/v5-next [private_call_0.verification_key_hints.updated_class_id_witness] leaf_index = "125" sibling_path = [ +<<<<<<< HEAD "0x0c58e78b79a995c9177f90f3cda8f09c427092142e3ab374370e7a327c6d5e18", "0x0d92ced82ef7d19f41e51aebc0a1d5da922111ce449eeb1fe7aa19f7b18b058a", +======= + "0x0ad99a67e495a9baba93a17ed22c43b5bf5b1d920043becb6c21a9642b5311db", + "0x1f10852012c467079fa3235781ac84ba489f8ebf597468b2743cf765c9970c5a", +>>>>>>> origin/v5-next "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", "0x0a17511fc198a5964425de50f75ead8401ae6721db865b4d0d13cb7299b276b2", "0x2edd4e68944dac758244213037fbe9d622c7c28d6070f16862b3e8986090bee4", "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", +<<<<<<< HEAD "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1b2a9fedcf26c0626da922db2f6eb177c938c1a4a7cbcf55b7bf0129ba445229", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -305,16 +506,24 @@ y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" ] [private_call_0.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" value = "0x00000000000000000000000000000000000000000000021e0a83cadf53374500" next_slot = "0x0a75610d692052893cfb76a933a4a32bc9235e77292c988ccc50fa6c07c267cd" next_index = "0x0000000000000000000000000000000000000000000000000000000000000085" +======= + slot = "0x059309e2fac35b4137b0c841dd465568ee91605fdeea93f1b4836758859b8d74" + value = "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000" + next_slot = "0x0d4f56828c410d1f40a61e881483159d51cd014c2d7f4ba65a7ce5bba1509de9" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000081" +>>>>>>> origin/v5-next [private_call_1.vk] key = [ "0x0000000000000000000000000000000000000000000000000000000000000012", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x00000000000000000000000000000068666be9daa3a78f6572d9a69f488c0c35", "0x000000000000000000000000000000000020cdf27b04e9c263caa2d224ca42c4", "0x0000000000000000000000000000008db2e3fd2f17952572d7eb6ffcd63a39ff", @@ -347,14 +556,55 @@ key = [ "0x00000000000000000000000000000000002761f337fed39ab96ccdb2a727d801", "0x0000000000000000000000000000005e669e132fec43c1667f70b1740e895a82", "0x0000000000000000000000000000000000095ac0452440ae6f9f43c9ab10dc77", +======= + "0x000000000000000000000000000000709977b1b40c6beb8f6f7c31038bab9134", + "0x00000000000000000000000000000000002f0d0b8fc35bc712c6cd96fd57cb53", + "0x00000000000000000000000000000086a2d24934cbc5e7f352ce41b32003fa38", + "0x0000000000000000000000000000000000279e743c1d9c72071adebef390ffe9", + "0x00000000000000000000000000000042c518491e4f84c0a277d1be7f0399468a", + "0x000000000000000000000000000000000019aadfac3ad00a06f2639263dd17ad", + "0x000000000000000000000000000000afc8b645805b27666f1ee3f7fad00ed469", + "0x0000000000000000000000000000000000092489fce76570ff907bf7086a3967", + "0x000000000000000000000000000000ec980aca950933300802c5488f008afc42", + "0x00000000000000000000000000000000002ce37c3f54f9119da400ae3c0637a6", + "0x0000000000000000000000000000003b57dd1dcc1c806e24ff956ad3444dacec", + "0x00000000000000000000000000000000000cffb35ad700946b0fd9d44c9a7b3e", + "0x00000000000000000000000000000018c3eee9d908d95f1805c378410a89bc21", + "0x000000000000000000000000000000000009c759586e7acf69b2be456c502168", + "0x000000000000000000000000000000932725ff541526bafa021d60b89c13dc96", + "0x0000000000000000000000000000000000011ed0cb753a334902b71d52287258", + "0x000000000000000000000000000000061e85421be392fc384af862d248bcdff9", + "0x00000000000000000000000000000000001801bf31450703b3489a32b6ecaae9", + "0x0000000000000000000000000000004979cb954bef353fb55ed0dfa6ee2cd64f", + "0x00000000000000000000000000000000001a88feb0528be82d40dc5bc8715f02", + "0x000000000000000000000000000000ad35a51aedbbcffa7baca3759eb753f6ac", + "0x000000000000000000000000000000000007e632d485907bbf80625dca3213ad", + "0x0000000000000000000000000000005313799bd3199e571cbe3a864c83f32a83", + "0x0000000000000000000000000000000000130c4d844a410ed12002c4199fa85e", + "0x0000000000000000000000000000007db574ab2873a63e92f8570d82d25dcccd", + "0x0000000000000000000000000000000000250820bba49f5579336e9772a1a1c8", + "0x000000000000000000000000000000faac2f6cc8ae0c2e9381cbad3dcc4aaa5e", + "0x00000000000000000000000000000000002cbbcf4f4ebd30aed269bfb79471a7", + "0x0000000000000000000000000000007988201aaae3b93243ca8ee41c60f25284", + "0x00000000000000000000000000000000002c74cba5a7c5c078b0657f9cd3faec", + "0x000000000000000000000000000000ecd020b3150043d73786f7a053060b6c0b", + "0x000000000000000000000000000000000007e9058d885e5a72c95a41eb46842b", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000b565fa018bd3b158211011c9691f37ac74", "0x0000000000000000000000000000000000142254078021164f7bd699987b0490", "0x00000000000000000000000000000052fb249d089bf71d2970742179c22727fe", "0x0000000000000000000000000000000000224ea2a43e97eb7241d7c920645d88", +======= + "0x000000000000000000000000000000e1ca31dfa123e66b82111dfc29c10babb3", + "0x000000000000000000000000000000000022a9b78bc4b5eb15e3942aa83b1640", + "0x000000000000000000000000000000eefcd060296e6fd9626094d0c86e734d02", + "0x000000000000000000000000000000000018f74935b5f14f18cadf5648f93bb8", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -375,6 +625,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000090854027fc31f8a58ee45fd93c96357e8", "0x00000000000000000000000000000000002608682f757baf644eac0a0fbd1eab", "0x0000000000000000000000000000000b3f4aabd9cdd0e5815f31aa7b86ad26ed", @@ -411,14 +662,55 @@ key = [ "0x000000000000000000000000000000000020857ef43d1165356049acab706ff7", "0x000000000000000000000000000000a6be757fca3091c950b00a14eab6311cbf", "0x00000000000000000000000000000000001aca29469aa2ea9a3c95fd57fbe401", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c7e4cc9c356a81e003d00d490a70bc66c8", + "0x00000000000000000000000000000000001110d7f42f59623d3efccf1ce8105c", + "0x0000000000000000000000000000005eddd5f8f614d42c7eeda2215fcc770b29", + "0x000000000000000000000000000000000028d854df2c3a9465781ff69d313e4d", + "0x000000000000000000000000000000c7651f03cfe12c7fa6578aad125e4fe7cd", + "0x00000000000000000000000000000000000057f65b1a41d8afed587c04bd3a4b", + "0x000000000000000000000000000000b1c466ac2710e3f70c4adf39496e504ae2", + "0x0000000000000000000000000000000000095f8bd3a69c88ca44473e127a6b7b", + "0x0000000000000000000000000000009d0b5a6d2ce85cc299da56298bb5cdee67", + "0x0000000000000000000000000000000000002283f5be9d2687729f55cd5ec32d", + "0x000000000000000000000000000000ea2dc646388d485e87dcc1b38471dc79a6", + "0x0000000000000000000000000000000000066b9bfb46baceb6c5b73569116578", + "0x000000000000000000000000000000fb46ed3cbfa3c551cb57a1e294fadee708", + "0x0000000000000000000000000000000000262ef088962b3531ec238a63b4debf", + "0x0000000000000000000000000000008d6c5b02d71a316bec9ac206443f38514c", + "0x000000000000000000000000000000000017f7da4b4c345aecdb3cd5ca7a16eb", + "0x0000000000000000000000000000006d0bcd29e83c1901a5bfd822a0c84d0cf5", + "0x000000000000000000000000000000000016a89487a9aaad50a73b613cd54a56", + "0x0000000000000000000000000000007931676cc850515bf9d6736bc778608cd7", + "0x0000000000000000000000000000000000029f1af085e5dfc99521a5ed0013fc", + "0x00000000000000000000000000000090786a505fe727804f1ac880fe4da78f8f", + "0x0000000000000000000000000000000000294b6dcbd0c28d9ce84360855c753b", + "0x000000000000000000000000000000f41ffe23d2b51e7e241cfb4fe9d82c599f", + "0x0000000000000000000000000000000000018a89106ba8ea596f66245204a503", + "0x000000000000000000000000000000ce2faa34c9bdccd645970909fa27d1d57e", + "0x000000000000000000000000000000000018bf159c500137254de70f32dbfee8", + "0x000000000000000000000000000000e74d0895a59bedc1ff9e1e901809ce5447", + "0x00000000000000000000000000000000002be8a5961a5319eedf10cf1be454ad", + "0x000000000000000000000000000000aeb87963fead8e446bbcabc673e7ce87bf", + "0x00000000000000000000000000000000000c0a1f9fa8d006e574fd04f9d74670", + "0x0000000000000000000000000000000166e77018d638ea54eed74263d90d611a", + "0x0000000000000000000000000000000000296915f6554cb409ea5e8c52c22ddb", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000067da5db7778d6c75756dca37f5857c5760", "0x0000000000000000000000000000000000093959842fd2c2615bc694c8c34624", "0x000000000000000000000000000000ac9c60cc07e2d18b2d22512b653035cc73", "0x00000000000000000000000000000000002a97530640643e6819092edb988209", +======= + "0x000000000000000000000000000000e803e2404e5ededa16dd3f987f298bdbfd", + "0x00000000000000000000000000000000002346548895c5c2de218e3d825246a4", + "0x000000000000000000000000000000baeb264d3eeb1a1ee618d4a462461f0377", + "0x00000000000000000000000000000000002f65928cd818a670d02f684a3c12e2", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -427,6 +719,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000049327bb5069140965b2adebb663ef1bff", "0x00000000000000000000000000000000002d08b217cbc66bacad49c31030bfcb", "0x000000000000000000000000000000a330f273e444ce364f91f70a551614e943", @@ -435,10 +728,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x000000000000000000000000000000c99df98d5b9aca72613a9fa4b8041b3c6d", + "0x000000000000000000000000000000000004b18e77df06c39e1877fb99580162", + "0x000000000000000000000000000000ed3dafb889b3edb0578a7a4340199df4b1", + "0x00000000000000000000000000000000002513676e55833c613a2ca558acdd30", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000ec0e27671e92b369069349a26d0a5db2ec", "0x00000000000000000000000000000000000015b46b23d4fdc136ab9e3bff9e9b", "0x000000000000000000000000000000861cadeff18a1403a1f00bcf7240fa390c", @@ -465,6 +769,50 @@ key = [ "0x0000000000000000000000000000000000119f165a4b0e2ffa10cd885b9dc5bd" ] hash = "0x0609c8195389d9ff372c9788d314c1387c31a9a4b73dacad95b01f5e03956056" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x000000000000000000000000000000544133eb1793227baa5ae9d527495bff1f", + "0x000000000000000000000000000000000010fb0303bcdbfe92232c7ca055636e", + "0x000000000000000000000000000000f65c687cf5f6d066b9456a9a67d3c6c417", + "0x00000000000000000000000000000000000086b4407e51dbc0497338b83e451f", + "0x000000000000000000000000000000b9052ca40bfcf8c7dfab0ed383f772366f", + "0x0000000000000000000000000000000000138d34ef6a10f6efa8cd50b4fd0fd5", + "0x0000000000000000000000000000003e65e867d34773546f8dc13f7fc34c9c53", + "0x0000000000000000000000000000000000182773e580f9068ffe2ba589715543", + "0x0000000000000000000000000000002dea5a5a3b977eef71d135069feb943a56", + "0x00000000000000000000000000000000002924c47bfbf7e91f4239f8a1e578f2", + "0x00000000000000000000000000000066348f5c70dc8cf2d7518f058a9a6128a7", + "0x000000000000000000000000000000000028cdc41ff8f2f55510570964f5c834", + "0x000000000000000000000000000000a2bc6efe06e17ac2a2338fb1f7bde9b9bd", + "0x00000000000000000000000000000000001baff6f3abb454b8af0d65700947d3", + "0x0000000000000000000000000000007184ce1b9709dd847258760865f6bb90ec", + "0x000000000000000000000000000000000008afb2ceba1f5cefe2a71a4f298ae7", + "0x0000000000000000000000000000006747977c8f198e4be480bb91a68caa5993", + "0x00000000000000000000000000000000002521a78b3af2a0d3456c60007f5aa4", + "0x000000000000000000000000000000576486af88c946ee8b18464339cd8c51e4", + "0x00000000000000000000000000000000001e49b909c83b3ff992159d6a0955c1", + "0x0000000000000000000000000000009168da776a01f2f75376acf680ed0af9e5", + "0x00000000000000000000000000000000000cd8bc06d910a54a90c2b37b269ec6", + "0x0000000000000000000000000000009580430760092bb9a77ccc2adba41cb5a5", + "0x0000000000000000000000000000000000043cdcea8f52af72daf726d84f904a" +] +hash = "0x2f2f2e5957c16e9b7db7909384093a09a121694480467d53b589f622bca37c22" +>>>>>>> origin/v5-next [private_call_1.verification_key_hints] contract_class_artifact_hash = "0x278c06ee2e11a5f14e3d339eba3e37896a8e77064fc640ea4d404ec5c304ad75" @@ -502,8 +850,9 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" inner = "0x147496f29e7de935d997f42d8046f86fd907e38208e142f9cbb5c49462a956b7" [private_call_1.verification_key_hints.updated_class_id_witness] - leaf_index = "127" + leaf_index = "136" sibling_path = [ +<<<<<<< HEAD "0x0e6a2b62754ef3c9d7629bb4d52fa80effaf45c9b329046e6477c06c63610520", "0x1b613315b352ea99c9f6a9dd2a1ebfacc25b7561f16fce6b960fae3946dd318e", "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", @@ -512,6 +861,16 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1bf2d692ed6f7c502c2161eb2894f77d2e9f9c2b5b75ebbc6583b07a5d407a9d", + "0x0783d20e10238ae5bd94db29340650e584623db01479b1b7ffadffd06bda94ec", + "0x03dffce0c5a809664d948bbb4bebbf1d6b0b58a94d7dd1acf426dd2fd6d5cc8c", + "0x0455374d0632aca31c59f0378d355ba8ada44f203745809fa0fcc119b36b790b", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x096e19f858d7edd5fd47a7a46f73e567a43ca68e5f0c3063ff9731378fb9de89", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -547,16 +906,24 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_1.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x275aa0e558512a7d51b6e7c58f0a51d40a995736e914437ebc770924b67a7505" value = "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000" next_slot = "0x2bc11e49bacca81e2592cf8c073a402bd72282661a1ef58a5e10dac1a01bd451" next_index = "0x0000000000000000000000000000000000000000000000000000000000000088" +======= + slot = "0x25bcd85e6bfe0554e15998467c2d04c6b9f4de013108729cd5c04aee71fd786c" + value = "0x0000000000000000000000000000000000000000000000000000000000002710" + next_slot = "0x2c3dd26f6835b0baf7662a2a36f2c7154c19bef5d3cbc4f02724b6c0ae6c0925" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000086" +>>>>>>> origin/v5-next [private_call_2.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x00000000000000000000000000000038d28b857533c3cca14d2f0c11c8e83d60", "0x00000000000000000000000000000000001bc506ee93cf4518fafed28383e7f7", "0x000000000000000000000000000000a5f99d9e7c044d80723532b2469a236c5c", @@ -589,14 +956,55 @@ key = [ "0x0000000000000000000000000000000000047453348f928ab6c8b694e6d3d9d9", "0x00000000000000000000000000000043aac841fa0abeaf65ccca004e55038c91", "0x00000000000000000000000000000000001d362c002a888e9da3bbf66d359a41", +======= + "0x0000000000000000000000000000001b9b334bb21fcf6f76d363942bd5a71bfe", + "0x0000000000000000000000000000000000116d692b12aa9d8c314d300a9bc078", + "0x0000000000000000000000000000000e6ebcca8e1eed3227a7c1265667918307", + "0x000000000000000000000000000000000024c6657f735bf4aaa0c35c06dfbd92", + "0x000000000000000000000000000000a161a13e8bdcc85420296a4aa4b44648b5", + "0x000000000000000000000000000000000004b1bf26421509e7a7264b572c03f6", + "0x0000000000000000000000000000004fa8d5346a2635cecb6eab4ce21fa2604f", + "0x0000000000000000000000000000000000242217b6c9d57bc2a3c9ebf927c68e", + "0x000000000000000000000000000000e5024baca2202927618204b14010cb9f4a", + "0x000000000000000000000000000000000014fd1e17caab7eecb9c0929a796f6c", + "0x0000000000000000000000000000001e52e0af5a136b07c88ba2f95a86e49abd", + "0x00000000000000000000000000000000001a4a7467450470c8a73774082dad92", + "0x000000000000000000000000000000efd4fdc951cd6bbf5fc81b1321727ceeb8", + "0x00000000000000000000000000000000002be1200a85dc605f0a60c87b69fb23", + "0x000000000000000000000000000000f6a4804dd819d82c1995d3e753ae3b6782", + "0x00000000000000000000000000000000000acb17bfa94ac5cd6357bb5999bdb1", + "0x0000000000000000000000000000002c3096677b715ae6d9effa233e060c09ab", + "0x0000000000000000000000000000000000034bac159edeb56e45f9f90791bbaf", + "0x00000000000000000000000000000016b8cf96f3cc5bef19f8f36e7098d9e145", + "0x0000000000000000000000000000000000297992846bde20bb45dc0e71c4709b", + "0x000000000000000000000000000000b5c879ef383022747fa7bb543280a568fe", + "0x00000000000000000000000000000000001c0d01dd11b6c763568f372d05bd0d", + "0x0000000000000000000000000000006ac4578e81cfc3504a3f4953b5e670d73d", + "0x00000000000000000000000000000000001311e873f6d74ee658515eb041d524", + "0x000000000000000000000000000000ef0f3127524a070ed7f5be8415169e1fc5", + "0x0000000000000000000000000000000000186a0b26d437f6ac7bb221d13ca61c", + "0x000000000000000000000000000000f64bcddf089db6ab43faa5eb0d0923d866", + "0x0000000000000000000000000000000000066768d3dd13e060de5fa798a97fb8", + "0x000000000000000000000000000000351d0f53e6de3a8f86840814296b1bcea4", + "0x0000000000000000000000000000000000258e3e23936ce1ef8110c82b42aa16", + "0x000000000000000000000000000000637cfad23a82da2c3a8448a636453fbc24", + "0x0000000000000000000000000000000000261391aa91721a27c8bd221f60341e", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000f944792061c0e67fe6025cdf9b77baf268", "0x000000000000000000000000000000000015e3006675e9a17879990f04991c69", "0x0000000000000000000000000000009fd2cced11f713ff4300036537a7300286", "0x0000000000000000000000000000000000215e4131b3f2e622134ac801763fbc", +======= + "0x0000000000000000000000000000004c0302d41f7df8a9a77ac496a7ee977508", + "0x000000000000000000000000000000000002713b17b72c865daab90bfa5837f4", + "0x00000000000000000000000000000014a1c2f683d7373770ab38144530b02c0d", + "0x00000000000000000000000000000000001168affcbc03058e44bd5698a3d4e9", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -617,6 +1025,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000113b04627ab60af1483022be87a622710a", "0x00000000000000000000000000000000000ecc462624a32a0c336d18d83fdcdf", "0x0000000000000000000000000000009efea537611101843055ed5700d950726c", @@ -661,14 +1070,57 @@ key = [ "0x000000000000000000000000000000000014f505af6959c95c0f44d1da1d4b84", "0x00000000000000000000000000000032fae192987455584f861d418339205fe5", "0x0000000000000000000000000000000000084a38fc578f3e58b87296d8767d7f", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c77b4669545b7495326336ca2e4374ef5c", + "0x000000000000000000000000000000000024f1dc68dd6659ddbd61edca8c424e", + "0x0000000000000000000000000000001faa67af31249d9f18a36c4556fb82b8dc", + "0x0000000000000000000000000000000000220880cdb32bbeeda4c68a08b24421", + "0x0000000000000000000000000000005e27196fa358cd2474b72e7f7d375966bb", + "0x00000000000000000000000000000000001ccea605506a61e5f202b523cc3c94", + "0x0000000000000000000000000000004b6a7344daa3cdb1943251ca80c0ec4e88", + "0x00000000000000000000000000000000001ea67feed4d3a7d41c495c7302a39a", + "0x000000000000000000000000000000d924f8a5fc504729c4b7816411e7eaed90", + "0x00000000000000000000000000000000002924e2e9df96378423f0c80de76f82", + "0x000000000000000000000000000000a87944514f07854c861f20cda281f0bc7a", + "0x000000000000000000000000000000000024a98bf2e05a514049a10ed572378f", + "0x0000000000000000000000000000002d262c1be972073eca26034a7c9aa405ec", + "0x00000000000000000000000000000000001b8f8055e033ba6d84b168a4ee85c9", + "0x0000000000000000000000000000000790c55d497e90f7e07404540daf754c4a", + "0x00000000000000000000000000000000002e19eb5de2694e7232df7c63f913d4", + "0x000000000000000000000000000000693bfa42a93e48e0ec5636141139c09a38", + "0x000000000000000000000000000000000022b28f25d42c122b8672a3f09737db", + "0x000000000000000000000000000000e947bea12bbd40980188b0be4fd63f4d7b", + "0x000000000000000000000000000000000023ddc4dcf206fe2ed0956cbaff0f97", + "0x000000000000000000000000000000c02aa30cea2e44ddb9dc155716c48da43c", + "0x00000000000000000000000000000000000301593c1204cf26cc1ed9100f3a20", + "0x000000000000000000000000000000eb52fdfb1916eed71d01f7613f84c3e86e", + "0x00000000000000000000000000000000000675a5ba597a613b2d9aa60f0a9490", + "0x00000000000000000000000000000013f1775d97b186af936d3e34c2c18b5247", + "0x0000000000000000000000000000000000120cf0d3f4db9bb51fee48deb05fd0", + "0x000000000000000000000000000000960d030d30f5c33b2361454a06f2201f39", + "0x00000000000000000000000000000000000e622e45b0be6c46405020d5023357", + "0x000000000000000000000000000000914e49c9e60ace99f769ddda96f0fba068", + "0x000000000000000000000000000000000015ff91ebcdc2bb6613b1f71ee2f867", + "0x0000000000000000000000000000000ba7024a35c31ce64e0ea6d59c6b0d2d70", + "0x00000000000000000000000000000000001d03918e7155a98dd861041adf77eb", + "0x000000000000000000000000000000cde073c4820c69bd0a973c10e885b18dad", + "0x00000000000000000000000000000000002f31f4d5774173dde47748bfffe453", + "0x0000000000000000000000000000001539194f62e8fb56a13e07a55f2a0afe22", + "0x00000000000000000000000000000000001a525528eee7a2812bc9a5e1384721", + "0x000000000000000000000000000000fbff0b88396c61d99cdcd7f3b5eb7c6cbc", + "0x000000000000000000000000000000000019db3d335b5130bc278014f81c50d4", + "0x000000000000000000000000000000a4111f3c3293c66605356db506e7ee656a", + "0x000000000000000000000000000000000019747828803e4e35c5fd3349d83cb7", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000000629b2d008e5c80f9ff09bb71d0606c99", "0x00000000000000000000000000000000000627e4e535a6d61f7d698ca0752f0e", "0x000000000000000000000000000000489317044fa8a1d992b8f7a26f16bbd1f7", @@ -677,10 +1129,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x00000000000000000000000000000007bb797dba95cd4983a758256f8694df02", + "0x00000000000000000000000000000000002d15bff8abe98647de852922554b9e", + "0x000000000000000000000000000000061dd4b139f3a856c6702cd5c81836d1a7", + "0x00000000000000000000000000000000001b5d764751b57c71a25cfcf4a0593f", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000ab2aeab779a34722025f47624556c4c0bf", "0x000000000000000000000000000000000006307e961c0edfe18060a4b8234df1", "0x000000000000000000000000000000d720fcf8266f040494b6886a12ed2a9c0b", @@ -707,6 +1170,50 @@ key = [ "0x00000000000000000000000000000000002d1290e901348b064558593f970209" ] hash = "0x19172c0acecd517dd8995c2e36178ca2aa16cbe001c3606d8cd848776ab80d23" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x0000000000000000000000000000001ad4244e76b60ae0a309674e6a16b0e4a5", + "0x00000000000000000000000000000000002e538cf881b0b263e1e7237776e990", + "0x000000000000000000000000000000fd1e947b9f9676008e89587f25b3e787b9", + "0x0000000000000000000000000000000000194d1fadfc1d793ce69a5d92fc5d6e", + "0x00000000000000000000000000000010f52d52e02e28dcdd7b2700b8d63c8502", + "0x000000000000000000000000000000000013c65025d87f87ee8bc62092f7cbe9", + "0x000000000000000000000000000000593c20c4cb75ed153a051817f960a9672e", + "0x00000000000000000000000000000000002fb3baebd0aa13162d1546651e5fa5", + "0x0000000000000000000000000000004a5b967a896bae527449d5e28f68a410fe", + "0x000000000000000000000000000000000001b8d5d2614867e4e7a999021a0943", + "0x0000000000000000000000000000006d8dfeababdb32bf439688e48db84515c4", + "0x00000000000000000000000000000000002479ca661c8a48b84f929f84840f72", + "0x0000000000000000000000000000003de5ba71b007abf571b938c3a3fb49ac18", + "0x000000000000000000000000000000000013aa44a6f8214f33052a5226ee9b86", + "0x000000000000000000000000000000b92b172592122d35bf7badfb01fbf797cd", + "0x000000000000000000000000000000000014dce136c63245c346d786ad66b511", + "0x00000000000000000000000000000028427e9764bd7665cd761d358bfea37844", + "0x000000000000000000000000000000000005a2d57a1aa856312a1ef84f270a0a", + "0x0000000000000000000000000000007b48c3372d3b9c79eaf9f35f2a69068e9c", + "0x00000000000000000000000000000000001022c64f35e181a022e72ba97afc05", + "0x000000000000000000000000000000ad3a53110da182ed62ab0c6e912276f1ae", + "0x00000000000000000000000000000000000b7a89e521ce3f660503eba36315f4", + "0x00000000000000000000000000000071c82dc40c4341eb17221a1f779e0265ff", + "0x00000000000000000000000000000000000d20300b4a1e484038ce2bc317811d" +] +hash = "0x028caeef5bee1a5c12da24bf280dd3dcf32c2093e5d0e7e61e4cd28c6061ca70" +>>>>>>> origin/v5-next [private_call_2.verification_key_hints] contract_class_artifact_hash = "0x018dc516bd1563098127e6cc24b1f5c330f07842c05aba56a98d981587059323" @@ -746,14 +1253,23 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_2.verification_key_hints.updated_class_id_witness] leaf_index = "124" sibling_path = [ +<<<<<<< HEAD "0x2675f3d0867e20fdca59dcdf4615258ea07c4223324db0ffccc6db58154e148f", "0x0d92ced82ef7d19f41e51aebc0a1d5da922111ce449eeb1fe7aa19f7b18b058a", +======= + "0x217533a471858d30b3c5a829c2e2ae5d5a1ba322bc9cd24e694d89fa9b77b74b", + "0x1f10852012c467079fa3235781ac84ba489f8ebf597468b2743cf765c9970c5a", +>>>>>>> origin/v5-next "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", "0x0a17511fc198a5964425de50f75ead8401ae6721db865b4d0d13cb7299b276b2", "0x2edd4e68944dac758244213037fbe9d622c7c28d6070f16862b3e8986090bee4", "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", +<<<<<<< HEAD "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1b2a9fedcf26c0626da922db2f6eb177c938c1a4a7cbcf55b7bf0129ba445229", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -791,11 +1307,19 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_2.verification_key_hints.updated_class_id_leaf] slot = "0x000000000000000000000000000000000000000000000000000000000000007c" value = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD next_slot = "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" next_index = "0x000000000000000000000000000000000000000000000000000000000000007d" [app_public_inputs_0] args_hash = "0x2893dab89a1468870cce7265c98e30b17d3931d8323d5b18c53d1fa35065c52d" +======= + next_slot = "0x020aa69d46f9a9dffee2f820adf5905a916e8c5f0a9569ecc63a521ddcb16896" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000080" + +[app_public_inputs_0] +args_hash = "0x2584caa1567a9e427e699db2b05e7bf288b2aa95bfa8757a3851d6e175eb55bd" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000002" end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" @@ -803,8 +1327,13 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" is_fee_payer = true +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e7309" tx_request_salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e6353840b" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a354644" +tx_request_salt = "0x00fc1e206b4d0c3317e793077e675320bceaaaaf40ea6583a15af22bce830406" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context] is_static_call = false @@ -813,10 +1342,14 @@ tx_request_salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e635 inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [app_public_inputs_0.call_context.contract_address] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context.function_selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [app_public_inputs_0.note_hash_read_requests] length = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1263,13 +1796,13 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.nullifiers] - length = "0x0000000000000000000000000000000000000000000000000000000000000000" + length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[app_public_inputs_0.nullifiers.array]] - counter = "0x0000000000000000000000000000000000000000000000000000000000000000" + counter = "0x000000000000000000000000000000000000000000000000000000000000000e" [app_public_inputs_0.nullifiers.array.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x03c6fe68835b61ed8cf80ddff38714af3843e2defdd9302a6dbd9d8dcc9a1b99" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs_0.nullifiers.array]] @@ -1381,7 +1914,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[app_public_inputs_0.private_call_requests.array]] +<<<<<<< HEAD args_hash = "0x18df420267885359a6b22873c548e7863a1050872fa734e4e161692e7b4d017f" +======= + args_hash = "0x26270c6739d4d3c08e560274f6b5838e5861d2ac227e00c36bd73add606dba5f" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" @@ -1390,7 +1927,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" is_static_call = false [app_public_inputs_0.private_call_requests.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_0.private_call_requests.array.call_context.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000001" @@ -1399,7 +1940,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x000000000000000000000000000000000000000000000000000000006934ed0d" [[app_public_inputs_0.private_call_requests.array]] +<<<<<<< HEAD args_hash = "0x2a5067cd5aaf94fbd32a91f58e6853e34c2543cb86394579993a2e7693e054ac" +======= + args_hash = "0x287c8d8abd94ffdae6e483210ed677fdb57edd256ab9b41909aa8d473dc4befa" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" @@ -1408,7 +1953,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" is_static_call = false [app_public_inputs_0.private_call_requests.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_0.private_call_requests.array.call_context.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000002" @@ -2474,6 +3023,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x0b313f5b633f0a3900167237b8b327f56fd8a1b294008e6527004c920d1e0c06" total_fees = "0x000000000000000000000000000000000000000000000000001e63b1d6a4b780" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000a3982" @@ -2507,17 +3057,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_0.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [app_public_inputs_0.anchor_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[app_public_inputs_0.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[app_public_inputs_0.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[app_public_inputs_0.anchor_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[app_public_inputs_0.anchor_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_0.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [app_public_inputs_0.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_0.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [app_public_inputs_0.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [app_public_inputs_0.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -2529,14 +3122,22 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_0.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1] +<<<<<<< HEAD args_hash = "0x18df420267885359a6b22873c548e7863a1050872fa734e4e161692e7b4d017f" +======= +args_hash = "0x26270c6739d4d3c08e560274f6b5838e5861d2ac227e00c36bd73add606dba5f" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" @@ -2544,14 +3145,23 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" is_fee_payer = false +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e7309" tx_request_salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e6353840b" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a354644" +tx_request_salt = "0x00fc1e206b4d0c3317e793077e675320bceaaaaf40ea6583a15af22bce830406" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context] is_static_call = false [app_public_inputs_1.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000001" @@ -3010,7 +3620,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [app_public_inputs_1.nullifiers.array.inner] +<<<<<<< HEAD value = "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d" +======= + value = "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs_1.nullifiers.array]] @@ -4211,6 +4825,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000007" [app_public_inputs_1.contract_class_logs_hashes.array.inner] +<<<<<<< HEAD value = "0x26c5fadd46f22f0332e40a9bab5d3386fbc05a6363b70aad1822680da2a2ae3a" length = "0x0000000000000000000000000000000000000000000000000000000000000067" @@ -4248,17 +4863,64 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_1.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + value = "0x16b2f367024e4bc2195b21dac27a4594449c0bc4c6048b2bcdffe9794b3342ea" + length = "0x0000000000000000000000000000000000000000000000000000000000000067" + + [app_public_inputs_1.anchor_block_header] + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [app_public_inputs_1.anchor_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[app_public_inputs_1.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[app_public_inputs_1.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[app_public_inputs_1.anchor_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[app_public_inputs_1.anchor_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_1.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [app_public_inputs_1.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_1.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [app_public_inputs_1.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [app_public_inputs_1.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -4270,14 +4932,22 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_1.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2] +<<<<<<< HEAD args_hash = "0x2a5067cd5aaf94fbd32a91f58e6853e34c2543cb86394579993a2e7693e054ac" +======= +args_hash = "0x287c8d8abd94ffdae6e483210ed677fdb57edd256ab9b41909aa8d473dc4befa" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" @@ -4285,14 +4955,23 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" is_fee_payer = false +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e7309" tx_request_salt = "0x12730798ddaac201a18fa0ca2e972db66902ebc7ecf8611561ac636e6353840b" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a354644" +tx_request_salt = "0x00fc1e206b4d0c3317e793077e675320bceaaaaf40ea6583a15af22bce830406" +>>>>>>> origin/v5-next [app_public_inputs_2.call_context] is_static_call = false [app_public_inputs_2.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs_2.call_context.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000002" @@ -4436,7 +5115,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs_2.nullifier_read_requests.array]] [app_public_inputs_2.nullifier_read_requests.array.inner] +<<<<<<< HEAD inner = "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d" +======= +inner = "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e" +>>>>>>> origin/v5-next counter = "0x000000000000000000000000000000000000000000000000000000000000000a" [app_public_inputs_2.nullifier_read_requests.array.contract_address] @@ -4751,7 +5434,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x000000000000000000000000000000000000000000000000000000000000000b" [app_public_inputs_2.nullifiers.array.inner] +<<<<<<< HEAD value = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + value = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs_2.nullifiers.array]] @@ -5522,10 +6209,17 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2.private_logs.array.inner.log] fields = [ "0x174c6b3d0fd14728e4fc5e53f7b262ab943546a7e125e2ed5e9fde3cf0b3e22f", +<<<<<<< HEAD "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x1e495537a58fe255952a20bc319ebbf9d5eb2bc2692addbee2f6f97f946eae28", "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d", +======= + "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x24ffcddc6d00c53f277dbe2482d23f64c62bbd6a18ac7952010c0287a8a52b48", + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x14fbaeaeddaa69be81d404c684e78e9f1a786d225faf8de2ce97c92f67d89a26", @@ -5535,7 +6229,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x082c6d164b0ba073c9dd911100248c8ecd80b03f82f38531856a3c16dadcbef0", "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356", "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496", +<<<<<<< HEAD "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93", +======= + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000" ] length = "0x000000000000000000000000000000000000000000000000000000000000000f" @@ -5956,6 +6654,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x0b313f5b633f0a3900167237b8b327f56fd8a1b294008e6527004c920d1e0c06" total_fees = "0x000000000000000000000000000000000000000000000000001e63b1d6a4b780" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000a3982" @@ -5989,17 +6688,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_2.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [app_public_inputs_2.anchor_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[app_public_inputs_2.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[app_public_inputs_2.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[app_public_inputs_2.anchor_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[app_public_inputs_2.anchor_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_2.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [app_public_inputs_2.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_2.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [app_public_inputs_2.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [app_public_inputs_2.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_2.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -6011,7 +6753,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_2.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [app_public_inputs_2.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml index 12af2a7d8993..b80a69419ff0 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-init/Prover.toml @@ -1,3 +1,4 @@ +<<<<<<< HEAD vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" is_private_only = true revertible_counter_hint = "0x0000000000000000000000000000000000000000000000000000000000000004" @@ -12,6 +13,22 @@ salt = "0x215ba1c8b8abcd7a5c2260c0cd683ae347bd3cb32b0618f5c8dd7ce1414e6cba" [tx_request.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= +vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" +is_private_only = false +revertible_counter_hint = "0x0000000000000000000000000000000000000000000000000000000000000004" + +[tx_request] +args_hash = "0x22ce7f17a81fcd8942a837d0ce5cd5a8133ee78d26a7dc3cd723e16d66441f27" +salt = "0x0d1539231f9bc37cf342834b7c6667aaead7d37a2b7c45074e782f0ca5967856" + + [tx_request.origin] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [tx_request.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -23,7 +40,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [tx_request.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [tx_request.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -33,9 +54,10 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 is_private = true [tx_request.function_data.selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [[protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[protocol_contracts.derived_addresses]] @@ -43,6 +65,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -70,9 +101,10 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [private_call.vk] key = [ - "0x000000000000000000000000000000000000000000000000000000000000000e", + "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x000000000000000000000000000000c2fcfc0d8489c45fc44e99de27f075d98d", "0x00000000000000000000000000000000000250a1c52ce6e643e1f935e5d5e63c", "0x0000000000000000000000000000000ceab0983ed2f72557b986a107c6a2f1b4", @@ -105,14 +137,55 @@ key = [ "0x000000000000000000000000000000000013a6e471a0721fc7d40b4d1ad88cc2", "0x0000000000000000000000000000007564eb5cdd740a081bcb6aa7e2209870bf", "0x0000000000000000000000000000000000205d06fde1c2018363c71f3641a26b", +======= + "0x000000000000000000000000000000c5c370e236365534a554f3abeca6b94894", + "0x000000000000000000000000000000000015d7aa60ea2a941b91e6b336e75026", + "0x0000000000000000000000000000006357ba60787a91d1fc5c51168ee3c81c6c", + "0x00000000000000000000000000000000000a22dc88f2f798b712b2cf2396ac3e", + "0x000000000000000000000000000000def2c79e4c22627bc001efad7524053579", + "0x000000000000000000000000000000000027e9bd3e9e0f562bfe071c08908505", + "0x000000000000000000000000000000850c88b574efa3ca07103c8b26ff5ec9eb", + "0x00000000000000000000000000000000000d31eeb0b5a8e4f4455f861e371240", + "0x000000000000000000000000000000b58ee7ae04d363646f2297e9c35c52c4c5", + "0x0000000000000000000000000000000000184a3efcf4a9b94b0ac2352d3422c6", + "0x0000000000000000000000000000007b1f0c7faf2a01359a1911e8a0145130a5", + "0x00000000000000000000000000000000000de73fab3ee67c88cf8da393cab3fe", + "0x0000000000000000000000000000004b55af367fb73a492cc2948c4baee0cc3b", + "0x00000000000000000000000000000000001f81af423f0b6b2c2e5d62b2d2e44e", + "0x000000000000000000000000000000e94aabeb9989d6955bcd0f1afd240e630e", + "0x00000000000000000000000000000000001a12e867699f4e2d4478df0d277bae", + "0x000000000000000000000000000000bf36791f3925b8b12cd1a183e4cb969415", + "0x000000000000000000000000000000000022f6f478bceccbaa970b4086dfef78", + "0x00000000000000000000000000000024fa3c15ffc73af4ebb513ff0fd796de18", + "0x00000000000000000000000000000000002883a2c1102d93f385ca051601f3e4", + "0x0000000000000000000000000000003eaafc62c72b09a1078cbb16f075b54635", + "0x00000000000000000000000000000000002ddfc92538af4432c8302af7753ad3", + "0x000000000000000000000000000000c284791c7b8c0055eeab548501e5382b76", + "0x00000000000000000000000000000000000b298e4bfbdd77fbf2542aaf6fe6e5", + "0x000000000000000000000000000000eed2011e19eb8e98ea8e6b6dcb33fd46e2", + "0x00000000000000000000000000000000001e3e0d0f6f8d68e44fef7782e560a8", + "0x000000000000000000000000000000360b48ed0bbfbe881a0c594fda1156d1c2", + "0x000000000000000000000000000000000005631fc55abbd5baf708017d206301", + "0x000000000000000000000000000000290b6c5f355c5a1f473643661135c3e9a5", + "0x0000000000000000000000000000000000039f4a3b82a16f4b0ed5403feeefd2", + "0x000000000000000000000000000000680a6ef9a7491770e5cbf634114d63f030", + "0x0000000000000000000000000000000000183b1ae13b8a3dc038a3605aff69ca", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000ab174711db3c7be885fe511400843f884e", "0x00000000000000000000000000000000000c53c8e59ba9b6c45533d6c55badb0", "0x000000000000000000000000000000a093c77246c3444f351431911df91986a2", "0x00000000000000000000000000000000000e10b19abeafc83142e3f031362029", +======= + "0x000000000000000000000000000000fcc67c9c28e1b0d21faef486e5cc546b50", + "0x000000000000000000000000000000000012109386f101bc761a5d807cd03879", + "0x000000000000000000000000000000d72386c426d464eb50ca26d26a07df8347", + "0x000000000000000000000000000000000007353808c7dbab3dbdcc78aad46228", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -133,6 +206,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000239478075be390895badc24ee1ea4fb0fa", "0x000000000000000000000000000000000010b69bebd538f119bae37700d450a0", "0x00000000000000000000000000000058c21b7cd34072cf8ee30a9183c75d0c0e", @@ -177,14 +251,57 @@ key = [ "0x000000000000000000000000000000000007f80b214533c591b4542d40c25779", "0x000000000000000000000000000000a28d891b27b3d3aa7c53c15e4c7c9447c3", "0x00000000000000000000000000000000001904687bba4992246b15eed831609e", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000c9f6bc0de94d319c1e05f2b732ffc93bb0", + "0x0000000000000000000000000000000000000122191719bb0cbba1342f9bdfd6", + "0x00000000000000000000000000000086335e70c145ff3843d0a257e0e9903cd3", + "0x000000000000000000000000000000000022c68d32060f03ebda2e56ef6675b0", + "0x000000000000000000000000000000f02cbcdda07a861c77a677e38817b541ec", + "0x000000000000000000000000000000000003a2fe53101210c0fb64256d45c876", + "0x00000000000000000000000000000045c4b0fe0fd56e5c8614746ecda01f4e7b", + "0x00000000000000000000000000000000001afd9f4996424f4eb584dbe55e00bf", + "0x0000000000000000000000000000007e845f27d560e683d2cc166b947f2cce48", + "0x00000000000000000000000000000000001a9738a94a113d8834b60248cbdd3c", + "0x000000000000000000000000000000650e84701c397de65063cde58e6b7b9ed0", + "0x0000000000000000000000000000000000044163ca8264697cdd107d58b9c892", + "0x000000000000000000000000000000f6938d6f572e41a8e562070d1bec42e4be", + "0x00000000000000000000000000000000002dd4d294d14a367f10cf417ff7928d", + "0x000000000000000000000000000000a3795ed37874ea808fc8d330797bac6223", + "0x000000000000000000000000000000000012882e728c00d3887894f6e5f957aa", + "0x00000000000000000000000000000050b8583fefde81e1c5fcada3638af793d3", + "0x00000000000000000000000000000000002933c1b58958f99e45ed733a27ec89", + "0x000000000000000000000000000000a4ec5d24509f652cd9f99aac8ccc1ccc3e", + "0x00000000000000000000000000000000000500776f8c933ca0b32ad705a9b007", + "0x000000000000000000000000000000fe1a7ce572a1e5fc209dfe549e247d85a5", + "0x0000000000000000000000000000000000275a1481c0fb32840e03f13494c02e", + "0x00000000000000000000000000000026839b3d653f1d2665098eaee5dbbcd960", + "0x00000000000000000000000000000000002904f371537ec0f8205d3c4ec013a8", + "0x00000000000000000000000000000022a88a567adeb1c5e54675305843ffb35b", + "0x0000000000000000000000000000000000053cbbf63aaa8877ecd2a59208015d", + "0x000000000000000000000000000000734d3b08070f11c7fa85fbe622de62cea0", + "0x00000000000000000000000000000000000613be27786a1cd4d231aceb53532e", + "0x000000000000000000000000000000a1eaf706fd0e53ea786c70d6e11c89f26a", + "0x0000000000000000000000000000000000269a4ca2804c9da25ddd06a8f3c504", + "0x000000000000000000000000000000ebbd1978e6f59ddd990347ede202bd8626", + "0x00000000000000000000000000000000002a4cc6f100febe55bffe3693689384", + "0x00000000000000000000000000000095beb3db2068925e5ecba273b38c38096c", + "0x0000000000000000000000000000000000092157618c6c13554aad34967062fa", + "0x000000000000000000000000000000440388803d55300efca67c52a8ccca4bf9", + "0x00000000000000000000000000000000001adbcbf52f1d9b02a5987f53467b5a", + "0x000000000000000000000000000000f450c163f378b7dc6a75f87367940bace5", + "0x000000000000000000000000000000000015778d2108d01203f0f6bfee3b62bd", + "0x000000000000000000000000000000a5d9a0b4209e094f6aceecea556901c18c", + "0x00000000000000000000000000000000000b18c594427e87d10db4b3cab8e61a", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000235e9f644d2766e133603c3113361d99e5", "0x000000000000000000000000000000000027620b19702e08713a6ccade568c0b", "0x0000000000000000000000000000006b9cd8d4753c40ec30f4fa341722b2f0b0", @@ -193,10 +310,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003aeb5a2371bf185c6956be6b5a3e2db38c", + "0x00000000000000000000000000000000000ede135cf690d5fc052d6fd4cb510a", + "0x0000000000000000000000000000000c695e2cad81d4d0e729c8500afc01645f", + "0x0000000000000000000000000000000000297022ceb87adab8e3bb33ad347e92", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000635529f96b412a8ca0fe8021781ea65f0f", "0x00000000000000000000000000000000000c63d34d67228c100703083e086bf4", "0x0000000000000000000000000000009af0884e0c2c1e319a8b89b910beb420ed", @@ -226,6 +354,53 @@ hash = "0x05a64a4a0d3e6a3aeee133f01b231618a356c6e35fbf93b89f0870f80a001b9e" [private_call.verification_key_hints] contract_class_artifact_hash = "0x0a668e1f2336b9d3ca4eaef7416f416af5cfc9807f9773d2214b202ce54c5e1a" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x0000000000000000000000000000008d25a20b90ea428bcef673aa799f873c55", + "0x000000000000000000000000000000000023c2222305a28bbed84eea95fced10", + "0x000000000000000000000000000000d364591d217ef1b203bde82c8d1ac6ede7", + "0x0000000000000000000000000000000000214ba592c74c0201958003753da86f", + "0x00000000000000000000000000000031482b5ffb86c3e6763c0eb1d6f5d24d19", + "0x00000000000000000000000000000000002dd76361423b89916eef099b598552", + "0x000000000000000000000000000000db88ea3a585df2368bec0c0b2022260a88", + "0x000000000000000000000000000000000025652b3824205b5f3da7c22ea4ab0b", + "0x0000000000000000000000000000005312136b9a30254132abbad74f3e41d360", + "0x00000000000000000000000000000000000b318589c6250bcb0bcd446f4c869f", + "0x000000000000000000000000000000f7ef26d28672d1c9f61782f3012b36366d", + "0x00000000000000000000000000000000002751d92283fdb9c9519eb575e076a2", + "0x0000000000000000000000000000009b3da2601b5c5f7bcd353d77eddd1916ac", + "0x000000000000000000000000000000000028bc78d046b6c4015665b75d89e381", + "0x0000000000000000000000000000008cf9cfaf2d79ded5b157014844632ba1e2", + "0x0000000000000000000000000000000000167f21684840dffa2d41e4832e5c52", + "0x00000000000000000000000000000004811e80c60da3ecf5a37e8a1ceb120f33", + "0x0000000000000000000000000000000000260eaf60c19c9ced7e1390e65cb50d", + "0x000000000000000000000000000000848a3bde0035a771d1dbe7f814b5d7abed", + "0x000000000000000000000000000000000000b1a084b860f932fd89fca801aebc", + "0x000000000000000000000000000000ed9fefd5766df8c7eb872238e230755c81", + "0x000000000000000000000000000000000001c1fc62010c3ab9fed3a238bf4fb4", + "0x00000000000000000000000000000033766c5cea45ee83e47414fdf701e582f8", + "0x00000000000000000000000000000000000747f9bf74c4a66aa58e7522ad1d14" +] +hash = "0x0c6c64f42f07daf64c90ccab3a6092a78e1b4ac47459b683261d919f1885fcd3" + +[private_call.verification_key_hints] +contract_class_artifact_hash = "0x01ee4f0be46f758180b1f0b55230bbfe95c7129f218fb2146323730b36089462" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -236,7 +411,11 @@ updated_class_id_delayed_public_mutable_values = [ [private_call.verification_key_hints.function_leaf_membership_witness] leaf_index = "0" sibling_path = [ +<<<<<<< HEAD "0x02b8a1c4df6a84a5ca96923f96e5a94c2aadc76662d85e22334a2eda804c4943", +======= + "0x2d4d64eaf823b9285799d92ee0500c0b6c94706ac1413ff9837e7b44f1be88a5", +>>>>>>> origin/v5-next "0x1eeeb8fb2c3d5ed2bdeb4545deda4551d41e22e63ebfe4e47e98d83847870dc9", "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", @@ -246,30 +425,53 @@ updated_class_id_delayed_public_mutable_values = [ ] [private_call.verification_key_hints.public_keys] +<<<<<<< HEAD npk_m_hash = "0x02472138e557b85dc3e81e0494f4cca6e7ed1f3cccfe7496598ed82fd069e4ad" ovpk_m_hash = "0x2fde3266d71b95a04c6e2858b6745a79d42cad32b7af10266a8e7919da95c2e8" tpk_m_hash = "0x1fa7f10d06bd20dd7fc2608559b2575bc3d1db858266444c6a3b0b9abfb87205" +======= + npk_m_hash = "0x067273d17ee266bfb83ad548df436b4f30b6b0a77d76196f73143426b3b60c2d" + ovpk_m_hash = "0x2639509bda26d905b50b33c24c3874f86bf108880c1d5bd87b8cf77b1293cf16" + tpk_m_hash = "0x22ecbc8964961ddb7af03d2b0255ef86c83c2f5bd4bc5f2b4b2acbe290bad052" +>>>>>>> origin/v5-next mspk_m_hash = "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356" fbpk_m_hash = "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496" [private_call.verification_key_hints.public_keys.ivpk_m.inner] +<<<<<<< HEAD x = "0x2606b39a0b15d0ed8524cf778e95783ee547aaea5ba71ce51d110fa78cd0e93b" y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" [private_call.verification_key_hints.salted_initialization_hash] inner = "0x0127ad781a9267a118b108cd9fc83a7f89ea4035b3528c03cd87bd3216a9c8c8" +======= +x = "0x0a025f4bc5b875ab5c5b075193578be7da20f967f5abed330cce25cce88b0464" +y = "0x288c1719cbc5f08023eaf8b92c5f7b4a87c79b52bd9a845b76107f193d016a97" + + [private_call.verification_key_hints.salted_initialization_hash] + inner = "0x17677d1b22e00913a96ebc990928c00d2692e0d1f690ef46aee8eb879f0e1bf3" +>>>>>>> origin/v5-next [private_call.verification_key_hints.updated_class_id_witness] leaf_index = "125" sibling_path = [ +<<<<<<< HEAD "0x0c58e78b79a995c9177f90f3cda8f09c427092142e3ab374370e7a327c6d5e18", "0x0d92ced82ef7d19f41e51aebc0a1d5da922111ce449eeb1fe7aa19f7b18b058a", +======= + "0x0ad99a67e495a9baba93a17ed22c43b5bf5b1d920043becb6c21a9642b5311db", + "0x0e486144de13277b08e0f015438f3079e83ee4860e17adc67edbd038c9034d4a", +>>>>>>> origin/v5-next "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", "0x0a17511fc198a5964425de50f75ead8401ae6721db865b4d0d13cb7299b276b2", "0x2edd4e68944dac758244213037fbe9d622c7c28d6070f16862b3e8986090bee4", "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", +<<<<<<< HEAD "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1b2a9fedcf26c0626da922db2f6eb177c938c1a4a7cbcf55b7bf0129ba445229", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -305,6 +507,7 @@ y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" ] [private_call.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" value = "0x00000000000000000000000000000000000000000000021e0a64a4c1017e0400" next_slot = "0x0a75610d692052893cfb76a933a4a32bc9235e77292c988ccc50fa6c07c267cd" @@ -312,6 +515,15 @@ y = "0x2213b93318d37b0935236cd6bb840caddd35a59518fbafeb66eeeb1db5495e99" [app_public_inputs] args_hash = "0x0ea42f9d61dc613270915e0b1c385f5bfc47aec6b2334696cd64059454c1ca2b" +======= + slot = "0x059309e2fac35b4137b0c841dd465568ee91605fdeea93f1b4836758859b8d74" + value = "0x00000000000000000000000000000000000000000000021e19e0c9bab2400000" + next_slot = "0x0d4f56828c410d1f40a61e881483159d51cd014c2d7f4ba65a7ce5bba1509de9" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000081" + +[app_public_inputs] +args_hash = "0x22ce7f17a81fcd8942a837d0ce5cd5a8133ee78d26a7dc3cd723e16d66441f27" +>>>>>>> origin/v5-next returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000002" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" @@ -319,8 +531,13 @@ expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000 expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" is_fee_payer = true +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x215ba1c8b8abcd7a5c2260c0cd683ae347bd3cb32b0618f5c8dd7ce1414e6cba" +======= +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x0d1539231f9bc37cf342834b7c6667aaead7d37a2b7c45074e782f0ca5967856" +>>>>>>> origin/v5-next [app_public_inputs.call_context] is_static_call = false @@ -329,10 +546,14 @@ tx_request_salt = "0x215ba1c8b8abcd7a5c2260c0cd683ae347bd3cb32b0618f5c8dd7ce1414 inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [app_public_inputs.call_context.contract_address] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [app_public_inputs.call_context.function_selector] - inner = "0x000000000000000000000000000000000000000000000000000000009d57a239" + inner = "0x0000000000000000000000000000000000000000000000000000000037c455b8" [app_public_inputs.note_hash_read_requests] length = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -779,13 +1000,13 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.nullifiers] - length = "0x0000000000000000000000000000000000000000000000000000000000000000" + length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[app_public_inputs.nullifiers.array]] - counter = "0x0000000000000000000000000000000000000000000000000000000000000000" + counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [app_public_inputs.nullifiers.array.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x2fabb6817e726dbf99ee3c578c44edbd9ad27873d4f35723130306e214021d2f" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs.nullifiers.array]] @@ -1044,6 +1265,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [[app_public_inputs.public_call_requests.array]] +<<<<<<< HEAD counter = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.public_call_requests.array.inner] @@ -1055,6 +1277,19 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.public_call_requests.array.inner.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= + counter = "0x0000000000000000000000000000000000000000000000000000000000000005" + + [app_public_inputs.public_call_requests.array.inner] + is_static_call = false + calldata_hash = "0x18f4b3d172e1777e88e160b6877108e8ac1ed0283da06f722328e01c6ea9cb43" + + [app_public_inputs.public_call_requests.array.inner.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs.public_call_requests.array.inner.contract_address] + inner = "0x0df0497790c45b5d6e6e431b8574719cc4113fa266765361666547e6c59fd0ba" +>>>>>>> origin/v5-next [[app_public_inputs.public_call_requests.array]] counter = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1990,6 +2225,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -2023,17 +2259,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -2045,7 +2324,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-2/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-2/Prover.toml index 2d788eb5a06a..fc2e35f4e5e2 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-2/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-2/Prover.toml @@ -1,6 +1,7 @@ [previous_kernel.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000044" sibling_path = [ +<<<<<<< HEAD "0x298f4e6746f87c44edb460aec802101e2ff3342068676e335fa6d53f24733663", "0x1052a8a5e6218f7ea39d3139a8a627827ab06ff2be75fda5f8ebfe33c46d9cd5", "0x14bdb463753cc032802d7a4730d5fa62f6afcd9f1607206dd345c37d85a2b0bd", @@ -8,11 +9,21 @@ sibling_path = [ "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x2e3593797cc16fcb2c05bbe5fafeaf2af9a5e43ec232531ef131d235491ea5f8" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00b4880ea7bd70d039f02ba470880b743dd51130243ede7c6a55dfc15c637a89", + "0x19f7254ca1fbe21a5365d909abcdee8c97128326f9a86cf8396744a2133a019a", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", + "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", + "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", + "0x270777209d6085fa91aff38fc5996d039459d010d31cf5561ac415a7653001fb" +>>>>>>> origin/v5-next ] [previous_kernel.vk_data.vk] key = [ "0x0000000000000000000000000000000000000000000000000000000000000011", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000022", "0x0000000000000000000000000000000000000000000000000000000000000281", "0x000000000000000000000000000000051ee6bba8f65618ef39c327c552ade385", @@ -79,10 +90,47 @@ sibling_path = [ "0x00000000000000000000000000000000001cb8da724069397fe56f2419facf69", "0x000000000000000000000000000000910d29fabc1c0d44cd2b0fdd7986931051", "0x00000000000000000000000000000000001132a409fa46a2a3ecb182baf7f448", +======= + "0x000000000000000000000000000000000000000000000000000000000000001a", + "0x00000000000000000000000000000000000000000000000000000000000001d7", + "0x00000000000000000000000000000073d1b06ca958139d8167bf91fec65717a3", + "0x00000000000000000000000000000000002126797b975ba906ece5576c3c44e5", + "0x000000000000000000000000000000d13dd564f9ca6e1e301fb505ab3904f312", + "0x000000000000000000000000000000000028ef474a3724e2aca9694d9b86913e", + "0x000000000000000000000000000000b0e621733c9b33ca4cd72c587c38865468", + "0x0000000000000000000000000000000000214d086476e52575eb897b52715244", + "0x00000000000000000000000000000098ea296886c59341a423261766a71bfe18", + "0x000000000000000000000000000000000023ecfde1cb1be6573985d344e0d468", + "0x000000000000000000000000000000f6426af45d639e6d4255f2a9a9880feb41", + "0x00000000000000000000000000000000002b922707ac305d546efa8132622e1c", + "0x000000000000000000000000000000b5d28c6921adefc75a20f37b59e6a6029d", + "0x00000000000000000000000000000000002bed8fea956bccb1e9b7a077cd9450", + "0x00000000000000000000000000000095dc4663d5852975f48fabf9adb97087c1", + "0x00000000000000000000000000000000001aea4366012d283c078d0ac031d2ed", + "0x00000000000000000000000000000002d3235d1820960d0e28dd0cee2bca4e19", + "0x00000000000000000000000000000000000f9f77ba19e1877dbfc1d76efef24a", + "0x0000000000000000000000000000005132fa00adb3028f32a801a15fecef441b", + "0x00000000000000000000000000000000001882a6e9f5bdcd35be9b0376c4e8cc", + "0x0000000000000000000000000000005bfca542a5a3bfb4b0c0fba79a84d0cb8b", + "0x00000000000000000000000000000000000e9dbbe628d433c501a0a5e7e43e85", + "0x000000000000000000000000000000cf6beb70b25cbbf6b74d8badca8b8fd597", + "0x00000000000000000000000000000000001327ca88b0ae4b307fd1724ba60846", + "0x000000000000000000000000000000f5b42fbed0e6d14165bd9a831ce6c33c75", + "0x00000000000000000000000000000000002e8a819bbe9959e047afa046cd7dde", + "0x000000000000000000000000000000cab1e6a5839407a39eb2591509ff3f944c", + "0x000000000000000000000000000000000004568d7f758ddcb72a67c3979d0539", + "0x0000000000000000000000000000003902cce6f097ccfb94346d6d62f3c725d3", + "0x00000000000000000000000000000000002e8293f0f67cdf9a664ba023c07540", + "0x0000000000000000000000000000006da09b54ab84dea06f68d9ced194b7e82b", + "0x00000000000000000000000000000000002f9324981442bb3b155a3bdbf8ae33", + "0x0000000000000000000000000000004a8980b979751146a4e5b0301a78c34ae4", + "0x000000000000000000000000000000000024ce9985e1962c86c17373e9ba0450", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000002dae800fe99dac5ebb43bfd9152c77880d", "0x0000000000000000000000000000000000276e41b42fc27ded12cd36ee332d1d", "0x000000000000000000000000000000c2f3da3df3239fe0bb2d2bdd66782ed61d", @@ -107,6 +155,84 @@ sibling_path = [ "0x000000000000000000000000000000000012ff97355958d005e2a26f61b6fa72", "0x000000000000000000000000000000f3fa2487341e950e289ba6257b840b0620", "0x000000000000000000000000000000000006098dd4cb34844bd048f829c76d4f", +======= + "0x000000000000000000000000000000da121444ba2806c6ab4b718917ea093ba2", + "0x00000000000000000000000000000000000976720b7a5546f2043313856dfaa0", + "0x000000000000000000000000000000f5982ebcb8625898d63b92c5662e8ee8d1", + "0x0000000000000000000000000000000000226429ff9b8a9f0e22a88935367f24", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c880cf1be0493c6194d60d935eed1cb818", + "0x0000000000000000000000000000000000027d1a2007f0f0dc183dd028a39be8", + "0x00000000000000000000000000000077d14a4346a1901681a97cf78905f86e9a", + "0x00000000000000000000000000000000001d3fde87f3cd78454200b0c765ddfe", + "0x000000000000000000000000000000ae9df27601210c2d41198c2021c8cede89", + "0x00000000000000000000000000000000001a6697d9258df3ac98fe702233d038", + "0x000000000000000000000000000000b7e17f6f780a9f4964642711b53b87e65b", + "0x0000000000000000000000000000000000207bd6065d1761d0a69d84514754c5", + "0x00000000000000000000000000000051fa0e50ff7bd56d13e91975fecdecccf5", + "0x00000000000000000000000000000000002aa0b85fa6bc1cf1ac78e78b2a0628", + "0x0000000000000000000000000000008edbd5b4aa6b11c72af6dd6d1550751169", + "0x00000000000000000000000000000000000ecdf0c5214ece4539683d98786aaa", + "0x000000000000000000000000000000ba52345a3075f6d4a8dcf81c54da751061", + "0x000000000000000000000000000000000007dfcc3a1157261646dc806e2674aa", + "0x00000000000000000000000000000072ac9c8248791c4191194d7d83b5ae825d", + "0x00000000000000000000000000000000000631c1d2e946b37ebc3d2ed6967053", + "0x00000000000000000000000000000085c17e14518bfaf45b59d7a298425f368e", + "0x0000000000000000000000000000000000149d685821d324336c7b4619d55380", + "0x000000000000000000000000000000b0bc011a0bba87800ed9a87d6805fb4fff", + "0x000000000000000000000000000000000005f349f04c0111881e048987bf674a", + "0x00000000000000000000000000000082e0a9b882c766993cb265ba143bd62a83", + "0x00000000000000000000000000000000002e9c2907939bb2ef9d4118785ddc9a", + "0x000000000000000000000000000000b8ef091d2194ca0cc8bd7eca4b3430506a", + "0x00000000000000000000000000000000002eddc6e1a655625f67a6c9abae658b", + "0x000000000000000000000000000000607dc66dcf4454b4bb5b23a1041ff3528c", + "0x0000000000000000000000000000000000000f06f7f7be209e35bf1e45251eb6", + "0x000000000000000000000000000000485b3552db58113dff3f9353e23f1692c0", + "0x00000000000000000000000000000000000fe06fd48231c5ae76ddc0d31594a7", + "0x000000000000000000000000000000ba483dbd5eeada62315810b0ba7514c8f6", + "0x000000000000000000000000000000000007f37aac70c908572d9022ceb99603", + "0x000000000000000000000000000000d0c2ac15e9bbeb074b1de4c515b178948b", + "0x0000000000000000000000000000000000225f348cdc306475e64baf99130edd", + "0x000000000000000000000000000000349e9c2cabce425d6966a3f7fea4adb0b2", + "0x000000000000000000000000000000000009d744462cce9031b283bc66cd6c6d", + "0x000000000000000000000000000000d711584ba3bbfb921d239848e64a823393", + "0x0000000000000000000000000000000000177f36ab710bffc094e5dacd513533", + "0x000000000000000000000000000000eefcce09cd91de6deb34ba07c107282627", + "0x0000000000000000000000000000000000175186e4891c051356bb735532cd62", + "0x00000000000000000000000000000040970b3a4a09922ea6a291d4429d753e5e", + "0x00000000000000000000000000000000000fee4185b0b9e01bf8f93e2253d858", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c900042c9ed8a48bb6e3c9af6ffa308861", + "0x00000000000000000000000000000000002aa863c11da077ad80f9bcee485879", + "0x000000000000000000000000000000313fe878de14c91d3b2228fca5d2a574f4", + "0x00000000000000000000000000000000002286bd14cd48c9ab24133f2c8946d7", + "0x000000000000000000000000000000b5253f03cdfa905928bd47c6042344a9bd", + "0x000000000000000000000000000000000008c83bdaa8db01eb7a6cfc534eed73", + "0x0000000000000000000000000000005b5c454e71c977a0c19e4e155062788ee1", + "0x00000000000000000000000000000000000fb51341fabba1e9f33b44e6b209e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -127,6 +253,7 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", @@ -139,10 +266,13 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= +>>>>>>> origin/v5-next "0x0000000000000000000000000000001409391ea53890220ff69ed9e3b8a27d0a", "0x000000000000000000000000000000000029371ef1a94251e6da6837742338f1", "0x000000000000000000000000000000bbf418b4a13276af200016de44259b9024", "0x00000000000000000000000000000000002d4e1fd05bdeb8a9f453b552e62451", +<<<<<<< HEAD "0x0000000000000000000000000000003e8adcf9a2f23cee50b070ff410726af23", "0x00000000000000000000000000000000002ec60e67ea9e6ff785a31397d7a4ed", "0x000000000000000000000000000000209368d520fb325079102cc86331737dc1", @@ -210,17 +340,98 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + "0x0000000000000000000000000000008269da88a88363e62cadda42646c79117c", + "0x0000000000000000000000000000000000099f6865b246c83931cb96a0280314", + "0x000000000000000000000000000000f21d50e6f56f0aa0b3c2c683fa3199abd9", + "0x00000000000000000000000000000000000f9bf02cc49b7c152565f32827e713", + "0x0000000000000000000000000000005be998c93b183fae6bc6657a10ce35b5e9", + "0x0000000000000000000000000000000000028c21e3458f36987b075523eecaf1", + "0x00000000000000000000000000000044970c3d35f9dec99ff26b9f5eca572768", + "0x00000000000000000000000000000000001754b7d3785919b0668cb5dc6764b8", + "0x0000000000000000000000000000002341f73b9500775f43bebcccd873ae259c", + "0x00000000000000000000000000000000001ec8799d03b338440f410081d2af93", + "0x0000000000000000000000000000003d65e2f6d2070f06e0874aee4e42982d65", + "0x00000000000000000000000000000000000f8b1959d00f9240a1925a0ba60a30", + "0x000000000000000000000000000000fcb77a6a3d49a608d2feb71070fcbfa383", + "0x00000000000000000000000000000000002b540873492f970574f06ea963c5a7", + "0x000000000000000000000000000000154794f2eb4af57f2d9891f009caa5b1cb", + "0x000000000000000000000000000000000022496898264db1a662d1da9b76853c", + "0x0000000000000000000000000000009781a63b3bf5feea08b5f4a41aad6e7508", + "0x0000000000000000000000000000000000034ed420fe9d303e85e8bb49611198", + "0x00000000000000000000000000000034213a15cc236292e5f3139dfbb49927a1", + "0x00000000000000000000000000000000002fbc95d4c5cfeaa0dd028e9d207cc1", + "0x000000000000000000000000000000f1f33089a3d77064f38b920e6547f39d27", + "0x000000000000000000000000000000000004562cbf7cb2cf1e88dc9bf8334970", + "0x0000000000000000000000000000001f4693d36ba567b35d3c35fbdb35d85206", + "0x00000000000000000000000000000000000f5050319e01538cc44b3963741543" +] + hash = "0x00b2a15ea3c1ba1d6b38d87b2e0a8a01d0dc286fddb088eafc01a34aef0e1a04" + +[previous_kernel_public_inputs] +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547cf" +is_private_only = true +claimed_first_nullifier = "0x00fe1bbbd881e62f676b5632ca9015c0ea7dac7b65eee94eed291aa5c10a59d2" +claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" + + [previous_kernel_public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + + [previous_kernel_public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [previous_kernel_public_inputs.constants.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [previous_kernel_public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -232,13 +443,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] @@ -246,6 +462,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -272,12 +497,17 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.validation_requests.note_hash_read_requests] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array]] [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +======= +inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -2524,14 +2754,18 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] counter = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] +<<<<<<< HEAD value = "0x1fb9ade60107cdde20e23088524c307f733eac7e6ee5e9b9dc8c375d0f549049" +======= + value = "0x01514b7da19c370fd9e14cfeb4fdb733910ab85d571d1b38a92406a837bee109" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] @@ -2539,14 +2773,14 @@ inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x000000000000000000000000000000000000000000000000000000000000000f" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x25db9d0711c3ab915bde6ba80336f51e5e4ab1ccc05d3156cdbe916339858849" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] @@ -5761,19 +5995,51 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[previous_kernel_public_inputs.end.private_call_stack.array]] +<<<<<<< HEAD args_hash = "0x1017465b993efb41b614b15f5ef957aaf1fb03a9c72125063b0499635bf51573" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000011" +======= + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" + end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context] + is_static_call = false + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] + inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" + + [[previous_kernel_public_inputs.end.private_call_stack.array]] + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" + end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context] is_static_call = true [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000034c67784" @@ -6059,13 +6325,18 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [private_call_0.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x000000000000000000000000000000dda111d9709766137ad8516ebc920efe3d", "0x00000000000000000000000000000000001f0674c8c77b924da87740f9f9265b", "0x00000000000000000000000000000031bbd43099787a05c7b41ccdd0f9f5ab9f", @@ -6098,14 +6369,55 @@ key = [ "0x000000000000000000000000000000000001252eb302bcb2c7c9b4219f7c8f88", "0x000000000000000000000000000000bdd2fe7b6118d43c88356f9c363f96765b", "0x0000000000000000000000000000000000000e23710a4a1600d84676efa828f8", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000d38679ab991998b3a4ba95f1e9e31cd5c2", "0x00000000000000000000000000000000002894f765546c3f7c47c1e96181eb91", "0x00000000000000000000000000000068ca6bffa97a89e593b72ca741ca78dd92", "0x000000000000000000000000000000000013b56b3b33cc9d8335ac5488aa0bee", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6126,6 +6438,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000d5b74756172262b5bf30509da5f9fa22b5", "0x00000000000000000000000000000000001b7c634e8373586869234825208315", "0x00000000000000000000000000000048f7c95da813beeae74b7f785f7dd5bd34", @@ -6162,6 +6475,68 @@ key = [ "0x000000000000000000000000000000000006639fa8b6bc1e091e9aa44fa3c188", "0x000000000000000000000000000000b8f906baa52e638719eb3c7f82edb33019", "0x00000000000000000000000000000000002d40d43ea741d007a5c6d88807b5b5", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", + "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", + "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", + "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6174,6 +6549,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6182,10 +6558,13 @@ key = [ "0x00000000000000000000000000000000001a2e86e5d93122b1041a8562b68d02", "0x000000000000000000000000000000aa6d9aec448ce937b33b77fabebc40949a", "0x000000000000000000000000000000000024b629989f2a6a960f9b68f05df737", +======= +>>>>>>> origin/v5-next "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", @@ -6220,6 +6599,38 @@ hash = "0x0969a56a0d508b894aeec78cc7e39c8629d7b725bce47b6870268fb5d70b0d3d" [private_call_0.verification_key_hints] contract_class_artifact_hash = "0x2cdd3a0e958d24974ef50f3c1b6ebc09f13752db0f2c4155533c9e459ce8f6f9" contract_class_public_bytecode_commitment = "0x1eabce75c9faadf82b91eacf44ea48836b308a3fa4cebeed318f588964649f30" +======= + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call_0.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" +>>>>>>> origin/v5-next updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6229,10 +6640,17 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_0.verification_key_hints.function_leaf_membership_witness] leaf_index = "5" sibling_path = [ +<<<<<<< HEAD "0x27ba7959d41a75f96e0fb62d926c489317079d3795945e2722138e9a7b0c67b3", "0x2d9d3b374fb969ca8f4d03e43bb94ef2a527074e8846fe12be65948965684bae", "0x25ff6b15e3dabba636e4a7fb4006e8eea085ca9087721cdd359d7b6e455a03f2", "0x03314a3c6617697b0bb139f5a84b1f9feae75162efc5aae6e6d54c1155122a7a", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", + "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", + "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", +>>>>>>> origin/v5-next "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", "0x1eb5f748aca7413c8875abf2789be0a1aec323884a365d9a59a1859aa2bce94e", "0x2402a100768c2e339831cdb0b63e5c272a6f3318323a37642bea76ab5ea1ed0c" @@ -6250,11 +6668,16 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_0.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x21fcf895b4065f8949a218d5f333d53dab3a4cea8d3cd4ae8110092b88273bd9" +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" +>>>>>>> origin/v5-next [private_call_0.verification_key_hints.updated_class_id_witness] - leaf_index = "136" + leaf_index = "131" sibling_path = [ +<<<<<<< HEAD "0x19d88ea447e12a90a29e72b90faa23c62bc76aa86a41d78fad88ef9f96c51c6e", "0x29003d7433934646bda181e9ec9bfdbf390d561bb527472fb251b3654850dab0", "0x03dffce0c5a809664d948bbb4bebbf1d6b0b58a94d7dd1acf426dd2fd6d5cc8c", @@ -6263,6 +6686,16 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6298,16 +6731,24 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_0.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x2bc11e49bacca81e2592cf8c073a402bd72282661a1ef58a5e10dac1a01bd451" value = "0x0000000000000000000000000000000000000000000000000000000000002328" next_slot = "0x0000000000000000000000000000000000000000000000000000000000000000" next_index = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" +>>>>>>> origin/v5-next [private_call_1.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x0000000000000000000000000000000660931647dae4a1669b24d443e4bb2eed", "0x000000000000000000000000000000000003e3b1c1859329adea4a8c61e3d1ce", "0x0000000000000000000000000000004a6e62d5b9df299da404af2e02bdd68a51", @@ -6340,14 +6781,55 @@ key = [ "0x00000000000000000000000000000000002893ecf1782df939c654fa6558d6a1", "0x00000000000000000000000000000002d658942257aeeaad280f5956413ce014", "0x0000000000000000000000000000000000220252daf47fe9b19503648d7b0fa6", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000006bd0a36c97c3fa27fe7d9a34bf909d82bf", "0x000000000000000000000000000000000025e7649164caa06ea82c08bf01a014", "0x000000000000000000000000000000a1c9ca0b102b27dad0f50e37709c4aaf36", "0x000000000000000000000000000000000018049cd3d6c0a2047f1d437264d368", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6368,6 +6850,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000001f0d299ea061f9a243e22a08588b0048f0", "0x000000000000000000000000000000000008bdd11567007fbb13437edba35108", "0x0000000000000000000000000000005731a903f4fbf60472048fa982d6766880", @@ -6404,14 +6887,55 @@ key = [ "0x0000000000000000000000000000000000232899e8d55c2ff7568f1700bc0696", "0x0000000000000000000000000000001f400f20432c5d3174b3e7fdfdf6ca8cbd", "0x000000000000000000000000000000000000a9fa62ba88dce6eca9412a219c05", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000a950975e45c16a72c56ca620a25ce7a1e7", "0x000000000000000000000000000000000027bd5f21ec613493fbc06535501b5b", "0x0000000000000000000000000000005708a9b36f3be228e77b4befdebc6b4ec1", "0x00000000000000000000000000000000001588c0225d9cb5a900b0346403e7f9", +======= + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6420,6 +6944,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000000490ab468fbf3466981b25dbcfdc2cdfde", "0x0000000000000000000000000000000000136a0a1020909fa1371d625519921e", "0x000000000000000000000000000000dc90627df43c72ba6014f98ca176c04007", @@ -6428,10 +6953,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000c5535e91d1b3a866778208b37a7f7c0dd4", "0x000000000000000000000000000000000012a47f35f6977678ed27bd909854eb", "0x0000000000000000000000000000000313fa6d3e00e3abf8dfbe3f38c9076206", @@ -6461,6 +6997,53 @@ hash = "0x0617b6eaf74504ccd4d9a071a922836b41d798f9720af8cc4c6da25092fc598d" [private_call_1.verification_key_hints] contract_class_artifact_hash = "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call_1.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6471,8 +7054,13 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_1.verification_key_hints.function_leaf_membership_witness] leaf_index = "1" sibling_path = [ +<<<<<<< HEAD "0x09ea38c7f6832c0648d3f4b726480c023860c358796162cb43bdb4b28249057f", "0x0b3f28b1a3d3fe728e3cde62b17eece998b7f44dcf49cc9296626604b51c2264", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", +>>>>>>> origin/v5-next "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", @@ -6492,6 +7080,7 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_1.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x0164a9dc0bb5231c23c9d23e8feb4392f4f3984c9bf80114d978ef1392519234" [private_call_1.verification_key_hints.updated_class_id_witness] @@ -6505,6 +7094,21 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" + + [private_call_1.verification_key_hints.updated_class_id_witness] + leaf_index = "131" + sibling_path = [ + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6540,6 +7144,7 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_1.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x20647ac29f83e2db48d5f31bf73f283f2192f4d7c798b7740965ed967e62e687" value = "0x0000000000000000000000000000000000000000000000000000000000000001" next_slot = "0x2451101525be60fa836b69d102945aad406c1008608f7a3a92a7b977a0f7d984" @@ -6556,15 +7161,40 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x2fc4ed07bfa2f3cd1f24cf7bb01f84419a4cec766f3d0cc81ae190030f305a97" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" + +[app_public_inputs_0] +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" +end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x2a20dc75c821182583a4596584189702af94b1c052114f2ad01c2c79f4b9df8c" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context] is_static_call = true [app_public_inputs_0.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [app_public_inputs_0.call_context.contract_address] inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [app_public_inputs_0.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000034c67784" @@ -6574,8 +7204,13 @@ tx_request_salt = "0x2fc4ed07bfa2f3cd1f24cf7bb01f84419a4cec766f3d0cc81ae190030f3 [[app_public_inputs_0.note_hash_read_requests.array]] [app_public_inputs_0.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +>>>>>>> origin/v5-next [app_public_inputs_0.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -8225,6 +8860,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -8258,17 +8894,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_0.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs_0.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs_0.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs_0.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs_0.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs_0.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_0.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs_0.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_0.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_0.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_0.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -8280,13 +8959,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_0.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" @@ -8297,15 +8981,34 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x2fc4ed07bfa2f3cd1f24cf7bb01f84419a4cec766f3d0cc81ae190030f305a97" +======= +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" +end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x2a20dc75c821182583a4596584189702af94b1c052114f2ad01c2c79f4b9df8c" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context] is_static_call = true [app_public_inputs_1.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [app_public_inputs_1.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs_1.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" @@ -8315,8 +9018,13 @@ tx_request_salt = "0x2fc4ed07bfa2f3cd1f24cf7bb01f84419a4cec766f3d0cc81ae190030f3 [[app_public_inputs_1.note_hash_read_requests.array]] [app_public_inputs_1.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x000000000000000000000000000000000000000000000000000000000000000f" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x000000000000000000000000000000000000000000000000000000000000000d" +>>>>>>> origin/v5-next [app_public_inputs_1.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -9966,6 +10674,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -9999,17 +10708,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_1.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs_1.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs_1.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs_1.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs_1.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs_1.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_1.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs_1.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_1.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_1.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_1.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -10021,7 +10773,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_1.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-3/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-3/Prover.toml index 8259b6655b42..d47198ef16db 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-3/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner-3/Prover.toml @@ -1,6 +1,7 @@ [previous_kernel.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000044" sibling_path = [ +<<<<<<< HEAD "0x298f4e6746f87c44edb460aec802101e2ff3342068676e335fa6d53f24733663", "0x1052a8a5e6218f7ea39d3139a8a627827ab06ff2be75fda5f8ebfe33c46d9cd5", "0x14bdb463753cc032802d7a4730d5fa62f6afcd9f1607206dd345c37d85a2b0bd", @@ -8,11 +9,21 @@ sibling_path = [ "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x2e3593797cc16fcb2c05bbe5fafeaf2af9a5e43ec232531ef131d235491ea5f8" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00b4880ea7bd70d039f02ba470880b743dd51130243ede7c6a55dfc15c637a89", + "0x19f7254ca1fbe21a5365d909abcdee8c97128326f9a86cf8396744a2133a019a", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", + "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", + "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", + "0x270777209d6085fa91aff38fc5996d039459d010d31cf5561ac415a7653001fb" +>>>>>>> origin/v5-next ] [previous_kernel.vk_data.vk] key = [ "0x0000000000000000000000000000000000000000000000000000000000000011", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000022", "0x0000000000000000000000000000000000000000000000000000000000000281", "0x000000000000000000000000000000051ee6bba8f65618ef39c327c552ade385", @@ -79,10 +90,47 @@ sibling_path = [ "0x00000000000000000000000000000000001cb8da724069397fe56f2419facf69", "0x000000000000000000000000000000910d29fabc1c0d44cd2b0fdd7986931051", "0x00000000000000000000000000000000001132a409fa46a2a3ecb182baf7f448", +======= + "0x000000000000000000000000000000000000000000000000000000000000001a", + "0x00000000000000000000000000000000000000000000000000000000000001d7", + "0x00000000000000000000000000000073d1b06ca958139d8167bf91fec65717a3", + "0x00000000000000000000000000000000002126797b975ba906ece5576c3c44e5", + "0x000000000000000000000000000000d13dd564f9ca6e1e301fb505ab3904f312", + "0x000000000000000000000000000000000028ef474a3724e2aca9694d9b86913e", + "0x000000000000000000000000000000b0e621733c9b33ca4cd72c587c38865468", + "0x0000000000000000000000000000000000214d086476e52575eb897b52715244", + "0x00000000000000000000000000000098ea296886c59341a423261766a71bfe18", + "0x000000000000000000000000000000000023ecfde1cb1be6573985d344e0d468", + "0x000000000000000000000000000000f6426af45d639e6d4255f2a9a9880feb41", + "0x00000000000000000000000000000000002b922707ac305d546efa8132622e1c", + "0x000000000000000000000000000000b5d28c6921adefc75a20f37b59e6a6029d", + "0x00000000000000000000000000000000002bed8fea956bccb1e9b7a077cd9450", + "0x00000000000000000000000000000095dc4663d5852975f48fabf9adb97087c1", + "0x00000000000000000000000000000000001aea4366012d283c078d0ac031d2ed", + "0x00000000000000000000000000000002d3235d1820960d0e28dd0cee2bca4e19", + "0x00000000000000000000000000000000000f9f77ba19e1877dbfc1d76efef24a", + "0x0000000000000000000000000000005132fa00adb3028f32a801a15fecef441b", + "0x00000000000000000000000000000000001882a6e9f5bdcd35be9b0376c4e8cc", + "0x0000000000000000000000000000005bfca542a5a3bfb4b0c0fba79a84d0cb8b", + "0x00000000000000000000000000000000000e9dbbe628d433c501a0a5e7e43e85", + "0x000000000000000000000000000000cf6beb70b25cbbf6b74d8badca8b8fd597", + "0x00000000000000000000000000000000001327ca88b0ae4b307fd1724ba60846", + "0x000000000000000000000000000000f5b42fbed0e6d14165bd9a831ce6c33c75", + "0x00000000000000000000000000000000002e8a819bbe9959e047afa046cd7dde", + "0x000000000000000000000000000000cab1e6a5839407a39eb2591509ff3f944c", + "0x000000000000000000000000000000000004568d7f758ddcb72a67c3979d0539", + "0x0000000000000000000000000000003902cce6f097ccfb94346d6d62f3c725d3", + "0x00000000000000000000000000000000002e8293f0f67cdf9a664ba023c07540", + "0x0000000000000000000000000000006da09b54ab84dea06f68d9ced194b7e82b", + "0x00000000000000000000000000000000002f9324981442bb3b155a3bdbf8ae33", + "0x0000000000000000000000000000004a8980b979751146a4e5b0301a78c34ae4", + "0x000000000000000000000000000000000024ce9985e1962c86c17373e9ba0450", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000002dae800fe99dac5ebb43bfd9152c77880d", "0x0000000000000000000000000000000000276e41b42fc27ded12cd36ee332d1d", "0x000000000000000000000000000000c2f3da3df3239fe0bb2d2bdd66782ed61d", @@ -107,6 +155,84 @@ sibling_path = [ "0x000000000000000000000000000000000012ff97355958d005e2a26f61b6fa72", "0x000000000000000000000000000000f3fa2487341e950e289ba6257b840b0620", "0x000000000000000000000000000000000006098dd4cb34844bd048f829c76d4f", +======= + "0x000000000000000000000000000000da121444ba2806c6ab4b718917ea093ba2", + "0x00000000000000000000000000000000000976720b7a5546f2043313856dfaa0", + "0x000000000000000000000000000000f5982ebcb8625898d63b92c5662e8ee8d1", + "0x0000000000000000000000000000000000226429ff9b8a9f0e22a88935367f24", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c880cf1be0493c6194d60d935eed1cb818", + "0x0000000000000000000000000000000000027d1a2007f0f0dc183dd028a39be8", + "0x00000000000000000000000000000077d14a4346a1901681a97cf78905f86e9a", + "0x00000000000000000000000000000000001d3fde87f3cd78454200b0c765ddfe", + "0x000000000000000000000000000000ae9df27601210c2d41198c2021c8cede89", + "0x00000000000000000000000000000000001a6697d9258df3ac98fe702233d038", + "0x000000000000000000000000000000b7e17f6f780a9f4964642711b53b87e65b", + "0x0000000000000000000000000000000000207bd6065d1761d0a69d84514754c5", + "0x00000000000000000000000000000051fa0e50ff7bd56d13e91975fecdecccf5", + "0x00000000000000000000000000000000002aa0b85fa6bc1cf1ac78e78b2a0628", + "0x0000000000000000000000000000008edbd5b4aa6b11c72af6dd6d1550751169", + "0x00000000000000000000000000000000000ecdf0c5214ece4539683d98786aaa", + "0x000000000000000000000000000000ba52345a3075f6d4a8dcf81c54da751061", + "0x000000000000000000000000000000000007dfcc3a1157261646dc806e2674aa", + "0x00000000000000000000000000000072ac9c8248791c4191194d7d83b5ae825d", + "0x00000000000000000000000000000000000631c1d2e946b37ebc3d2ed6967053", + "0x00000000000000000000000000000085c17e14518bfaf45b59d7a298425f368e", + "0x0000000000000000000000000000000000149d685821d324336c7b4619d55380", + "0x000000000000000000000000000000b0bc011a0bba87800ed9a87d6805fb4fff", + "0x000000000000000000000000000000000005f349f04c0111881e048987bf674a", + "0x00000000000000000000000000000082e0a9b882c766993cb265ba143bd62a83", + "0x00000000000000000000000000000000002e9c2907939bb2ef9d4118785ddc9a", + "0x000000000000000000000000000000b8ef091d2194ca0cc8bd7eca4b3430506a", + "0x00000000000000000000000000000000002eddc6e1a655625f67a6c9abae658b", + "0x000000000000000000000000000000607dc66dcf4454b4bb5b23a1041ff3528c", + "0x0000000000000000000000000000000000000f06f7f7be209e35bf1e45251eb6", + "0x000000000000000000000000000000485b3552db58113dff3f9353e23f1692c0", + "0x00000000000000000000000000000000000fe06fd48231c5ae76ddc0d31594a7", + "0x000000000000000000000000000000ba483dbd5eeada62315810b0ba7514c8f6", + "0x000000000000000000000000000000000007f37aac70c908572d9022ceb99603", + "0x000000000000000000000000000000d0c2ac15e9bbeb074b1de4c515b178948b", + "0x0000000000000000000000000000000000225f348cdc306475e64baf99130edd", + "0x000000000000000000000000000000349e9c2cabce425d6966a3f7fea4adb0b2", + "0x000000000000000000000000000000000009d744462cce9031b283bc66cd6c6d", + "0x000000000000000000000000000000d711584ba3bbfb921d239848e64a823393", + "0x0000000000000000000000000000000000177f36ab710bffc094e5dacd513533", + "0x000000000000000000000000000000eefcce09cd91de6deb34ba07c107282627", + "0x0000000000000000000000000000000000175186e4891c051356bb735532cd62", + "0x00000000000000000000000000000040970b3a4a09922ea6a291d4429d753e5e", + "0x00000000000000000000000000000000000fee4185b0b9e01bf8f93e2253d858", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c900042c9ed8a48bb6e3c9af6ffa308861", + "0x00000000000000000000000000000000002aa863c11da077ad80f9bcee485879", + "0x000000000000000000000000000000313fe878de14c91d3b2228fca5d2a574f4", + "0x00000000000000000000000000000000002286bd14cd48c9ab24133f2c8946d7", + "0x000000000000000000000000000000b5253f03cdfa905928bd47c6042344a9bd", + "0x000000000000000000000000000000000008c83bdaa8db01eb7a6cfc534eed73", + "0x0000000000000000000000000000005b5c454e71c977a0c19e4e155062788ee1", + "0x00000000000000000000000000000000000fb51341fabba1e9f33b44e6b209e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -127,6 +253,7 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", @@ -139,10 +266,13 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= +>>>>>>> origin/v5-next "0x0000000000000000000000000000001409391ea53890220ff69ed9e3b8a27d0a", "0x000000000000000000000000000000000029371ef1a94251e6da6837742338f1", "0x000000000000000000000000000000bbf418b4a13276af200016de44259b9024", "0x00000000000000000000000000000000002d4e1fd05bdeb8a9f453b552e62451", +<<<<<<< HEAD "0x0000000000000000000000000000003e8adcf9a2f23cee50b070ff410726af23", "0x00000000000000000000000000000000002ec60e67ea9e6ff785a31397d7a4ed", "0x000000000000000000000000000000209368d520fb325079102cc86331737dc1", @@ -210,17 +340,98 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + "0x0000000000000000000000000000008269da88a88363e62cadda42646c79117c", + "0x0000000000000000000000000000000000099f6865b246c83931cb96a0280314", + "0x000000000000000000000000000000f21d50e6f56f0aa0b3c2c683fa3199abd9", + "0x00000000000000000000000000000000000f9bf02cc49b7c152565f32827e713", + "0x0000000000000000000000000000005be998c93b183fae6bc6657a10ce35b5e9", + "0x0000000000000000000000000000000000028c21e3458f36987b075523eecaf1", + "0x00000000000000000000000000000044970c3d35f9dec99ff26b9f5eca572768", + "0x00000000000000000000000000000000001754b7d3785919b0668cb5dc6764b8", + "0x0000000000000000000000000000002341f73b9500775f43bebcccd873ae259c", + "0x00000000000000000000000000000000001ec8799d03b338440f410081d2af93", + "0x0000000000000000000000000000003d65e2f6d2070f06e0874aee4e42982d65", + "0x00000000000000000000000000000000000f8b1959d00f9240a1925a0ba60a30", + "0x000000000000000000000000000000fcb77a6a3d49a608d2feb71070fcbfa383", + "0x00000000000000000000000000000000002b540873492f970574f06ea963c5a7", + "0x000000000000000000000000000000154794f2eb4af57f2d9891f009caa5b1cb", + "0x000000000000000000000000000000000022496898264db1a662d1da9b76853c", + "0x0000000000000000000000000000009781a63b3bf5feea08b5f4a41aad6e7508", + "0x0000000000000000000000000000000000034ed420fe9d303e85e8bb49611198", + "0x00000000000000000000000000000034213a15cc236292e5f3139dfbb49927a1", + "0x00000000000000000000000000000000002fbc95d4c5cfeaa0dd028e9d207cc1", + "0x000000000000000000000000000000f1f33089a3d77064f38b920e6547f39d27", + "0x000000000000000000000000000000000004562cbf7cb2cf1e88dc9bf8334970", + "0x0000000000000000000000000000001f4693d36ba567b35d3c35fbdb35d85206", + "0x00000000000000000000000000000000000f5050319e01538cc44b3963741543" +] + hash = "0x00b2a15ea3c1ba1d6b38d87b2e0a8a01d0dc286fddb088eafc01a34aef0e1a04" + +[previous_kernel_public_inputs] +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547cf" +is_private_only = true +claimed_first_nullifier = "0x000a9986b17d755b24a8f072a17a387abb218c5c09382331dd20d23abef95b49" +claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" + + [previous_kernel_public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + + [previous_kernel_public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [previous_kernel_public_inputs.constants.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [previous_kernel_public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -232,13 +443,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] @@ -246,6 +462,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -272,12 +497,17 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.validation_requests.note_hash_read_requests] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array]] [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +======= +inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -2524,14 +2754,18 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] counter = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] +<<<<<<< HEAD value = "0x121d7151d2650115a2b0bd9c656dba0fce9e206f24c54ef19563b7cc0714ccad" +======= + value = "0x23f1ebea3a621e15495e8b509706a68f6079b2f210e90cb8d8303d6bf0920942" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] @@ -2539,14 +2773,14 @@ inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x0000000000000000000000000000000000000000000000000000000000000012" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x239babb9b8ef1366e805f629c8fc20e499159b2df5147e76bb51d83eeae0c1ff" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] @@ -5761,37 +5995,83 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.private_call_stack.array]] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000013" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000015" +======= + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000f" + end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000011" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context] is_static_call = false [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" [[previous_kernel_public_inputs.end.private_call_stack.array]] +<<<<<<< HEAD args_hash = "0x1017465b993efb41b614b15f5ef957aaf1fb03a9c72125063b0499635bf51573" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000011" +======= + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" + end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context] + is_static_call = false + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] + inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" + + [[previous_kernel_public_inputs.end.private_call_stack.array]] + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" + end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context] is_static_call = true [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000034c67784" @@ -6059,13 +6339,18 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000002" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [private_call_0.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x000000000000000000000000000000dda111d9709766137ad8516ebc920efe3d", "0x00000000000000000000000000000000001f0674c8c77b924da87740f9f9265b", "0x00000000000000000000000000000031bbd43099787a05c7b41ccdd0f9f5ab9f", @@ -6098,14 +6383,55 @@ key = [ "0x000000000000000000000000000000000001252eb302bcb2c7c9b4219f7c8f88", "0x000000000000000000000000000000bdd2fe7b6118d43c88356f9c363f96765b", "0x0000000000000000000000000000000000000e23710a4a1600d84676efa828f8", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000d38679ab991998b3a4ba95f1e9e31cd5c2", "0x00000000000000000000000000000000002894f765546c3f7c47c1e96181eb91", "0x00000000000000000000000000000068ca6bffa97a89e593b72ca741ca78dd92", "0x000000000000000000000000000000000013b56b3b33cc9d8335ac5488aa0bee", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6126,6 +6452,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000d5b74756172262b5bf30509da5f9fa22b5", "0x00000000000000000000000000000000001b7c634e8373586869234825208315", "0x00000000000000000000000000000048f7c95da813beeae74b7f785f7dd5bd34", @@ -6162,9 +6489,68 @@ key = [ "0x000000000000000000000000000000000006639fa8b6bc1e091e9aa44fa3c188", "0x000000000000000000000000000000b8f906baa52e638719eb3c7f82edb33019", "0x00000000000000000000000000000000002d40d43ea741d007a5c6d88807b5b5", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", + "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", + "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", + "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6177,15 +6563,22 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000004e7bb54ed0db69c13283ff88445e5cfd17", "0x00000000000000000000000000000000001a2e86e5d93122b1041a8562b68d02", "0x000000000000000000000000000000aa6d9aec448ce937b33b77fabebc40949a", "0x000000000000000000000000000000000024b629989f2a6a960f9b68f05df737", +======= +>>>>>>> origin/v5-next "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", @@ -6220,6 +6613,38 @@ hash = "0x0969a56a0d508b894aeec78cc7e39c8629d7b725bce47b6870268fb5d70b0d3d" [private_call_0.verification_key_hints] contract_class_artifact_hash = "0x2cdd3a0e958d24974ef50f3c1b6ebc09f13752db0f2c4155533c9e459ce8f6f9" contract_class_public_bytecode_commitment = "0x1eabce75c9faadf82b91eacf44ea48836b308a3fa4cebeed318f588964649f30" +======= + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call_0.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" +>>>>>>> origin/v5-next updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6229,10 +6654,17 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_0.verification_key_hints.function_leaf_membership_witness] leaf_index = "5" sibling_path = [ +<<<<<<< HEAD "0x27ba7959d41a75f96e0fb62d926c489317079d3795945e2722138e9a7b0c67b3", "0x2d9d3b374fb969ca8f4d03e43bb94ef2a527074e8846fe12be65948965684bae", "0x25ff6b15e3dabba636e4a7fb4006e8eea085ca9087721cdd359d7b6e455a03f2", "0x03314a3c6617697b0bb139f5a84b1f9feae75162efc5aae6e6d54c1155122a7a", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", + "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", + "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", +>>>>>>> origin/v5-next "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", "0x1eb5f748aca7413c8875abf2789be0a1aec323884a365d9a59a1859aa2bce94e", "0x2402a100768c2e339831cdb0b63e5c272a6f3318323a37642bea76ab5ea1ed0c" @@ -6250,11 +6682,16 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_0.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x21fcf895b4065f8949a218d5f333d53dab3a4cea8d3cd4ae8110092b88273bd9" +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" +>>>>>>> origin/v5-next [private_call_0.verification_key_hints.updated_class_id_witness] - leaf_index = "136" + leaf_index = "131" sibling_path = [ +<<<<<<< HEAD "0x19d88ea447e12a90a29e72b90faa23c62bc76aa86a41d78fad88ef9f96c51c6e", "0x29003d7433934646bda181e9ec9bfdbf390d561bb527472fb251b3654850dab0", "0x03dffce0c5a809664d948bbb4bebbf1d6b0b58a94d7dd1acf426dd2fd6d5cc8c", @@ -6263,6 +6700,16 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6298,16 +6745,24 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_0.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x2bc11e49bacca81e2592cf8c073a402bd72282661a1ef58a5e10dac1a01bd451" value = "0x0000000000000000000000000000000000000000000000000000000000002328" next_slot = "0x0000000000000000000000000000000000000000000000000000000000000000" next_index = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" +>>>>>>> origin/v5-next [private_call_1.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x0000000000000000000000000000000660931647dae4a1669b24d443e4bb2eed", "0x000000000000000000000000000000000003e3b1c1859329adea4a8c61e3d1ce", "0x0000000000000000000000000000004a6e62d5b9df299da404af2e02bdd68a51", @@ -6340,14 +6795,55 @@ key = [ "0x00000000000000000000000000000000002893ecf1782df939c654fa6558d6a1", "0x00000000000000000000000000000002d658942257aeeaad280f5956413ce014", "0x0000000000000000000000000000000000220252daf47fe9b19503648d7b0fa6", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000006bd0a36c97c3fa27fe7d9a34bf909d82bf", "0x000000000000000000000000000000000025e7649164caa06ea82c08bf01a014", "0x000000000000000000000000000000a1c9ca0b102b27dad0f50e37709c4aaf36", "0x000000000000000000000000000000000018049cd3d6c0a2047f1d437264d368", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6368,6 +6864,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000001f0d299ea061f9a243e22a08588b0048f0", "0x000000000000000000000000000000000008bdd11567007fbb13437edba35108", "0x0000000000000000000000000000005731a903f4fbf60472048fa982d6766880", @@ -6404,14 +6901,55 @@ key = [ "0x0000000000000000000000000000000000232899e8d55c2ff7568f1700bc0696", "0x0000000000000000000000000000001f400f20432c5d3174b3e7fdfdf6ca8cbd", "0x000000000000000000000000000000000000a9fa62ba88dce6eca9412a219c05", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000a950975e45c16a72c56ca620a25ce7a1e7", "0x000000000000000000000000000000000027bd5f21ec613493fbc06535501b5b", "0x0000000000000000000000000000005708a9b36f3be228e77b4befdebc6b4ec1", "0x00000000000000000000000000000000001588c0225d9cb5a900b0346403e7f9", +======= + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6420,6 +6958,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000000490ab468fbf3466981b25dbcfdc2cdfde", "0x0000000000000000000000000000000000136a0a1020909fa1371d625519921e", "0x000000000000000000000000000000dc90627df43c72ba6014f98ca176c04007", @@ -6428,10 +6967,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000c5535e91d1b3a866778208b37a7f7c0dd4", "0x000000000000000000000000000000000012a47f35f6977678ed27bd909854eb", "0x0000000000000000000000000000000313fa6d3e00e3abf8dfbe3f38c9076206", @@ -6461,6 +7011,53 @@ hash = "0x0617b6eaf74504ccd4d9a071a922836b41d798f9720af8cc4c6da25092fc598d" [private_call_1.verification_key_hints] contract_class_artifact_hash = "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call_1.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6471,8 +7068,13 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_1.verification_key_hints.function_leaf_membership_witness] leaf_index = "1" sibling_path = [ +<<<<<<< HEAD "0x09ea38c7f6832c0648d3f4b726480c023860c358796162cb43bdb4b28249057f", "0x0b3f28b1a3d3fe728e3cde62b17eece998b7f44dcf49cc9296626604b51c2264", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", +>>>>>>> origin/v5-next "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", @@ -6492,6 +7094,7 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_1.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x0164a9dc0bb5231c23c9d23e8feb4392f4f3984c9bf80114d978ef1392519234" [private_call_1.verification_key_hints.updated_class_id_witness] @@ -6505,6 +7108,21 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" + + [private_call_1.verification_key_hints.updated_class_id_witness] + leaf_index = "131" + sibling_path = [ + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6540,16 +7158,24 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_1.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x20647ac29f83e2db48d5f31bf73f283f2192f4d7c798b7740965ed967e62e687" value = "0x0000000000000000000000000000000000000000000000000000000000000001" next_slot = "0x2451101525be60fa836b69d102945aad406c1008608f7a3a92a7b977a0f7d984" next_index = "0x0000000000000000000000000000000000000000000000000000000000000086" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" +>>>>>>> origin/v5-next [private_call_2.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x0000000000000000000000000000000660931647dae4a1669b24d443e4bb2eed", "0x000000000000000000000000000000000003e3b1c1859329adea4a8c61e3d1ce", "0x0000000000000000000000000000004a6e62d5b9df299da404af2e02bdd68a51", @@ -6582,14 +7208,55 @@ key = [ "0x00000000000000000000000000000000002893ecf1782df939c654fa6558d6a1", "0x00000000000000000000000000000002d658942257aeeaad280f5956413ce014", "0x0000000000000000000000000000000000220252daf47fe9b19503648d7b0fa6", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000006bd0a36c97c3fa27fe7d9a34bf909d82bf", "0x000000000000000000000000000000000025e7649164caa06ea82c08bf01a014", "0x000000000000000000000000000000a1c9ca0b102b27dad0f50e37709c4aaf36", "0x000000000000000000000000000000000018049cd3d6c0a2047f1d437264d368", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6610,6 +7277,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000001f0d299ea061f9a243e22a08588b0048f0", "0x000000000000000000000000000000000008bdd11567007fbb13437edba35108", "0x0000000000000000000000000000005731a903f4fbf60472048fa982d6766880", @@ -6646,14 +7314,55 @@ key = [ "0x0000000000000000000000000000000000232899e8d55c2ff7568f1700bc0696", "0x0000000000000000000000000000001f400f20432c5d3174b3e7fdfdf6ca8cbd", "0x000000000000000000000000000000000000a9fa62ba88dce6eca9412a219c05", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000a950975e45c16a72c56ca620a25ce7a1e7", "0x000000000000000000000000000000000027bd5f21ec613493fbc06535501b5b", "0x0000000000000000000000000000005708a9b36f3be228e77b4befdebc6b4ec1", "0x00000000000000000000000000000000001588c0225d9cb5a900b0346403e7f9", +======= + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6662,6 +7371,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000000490ab468fbf3466981b25dbcfdc2cdfde", "0x0000000000000000000000000000000000136a0a1020909fa1371d625519921e", "0x000000000000000000000000000000dc90627df43c72ba6014f98ca176c04007", @@ -6670,10 +7380,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000c5535e91d1b3a866778208b37a7f7c0dd4", "0x000000000000000000000000000000000012a47f35f6977678ed27bd909854eb", "0x0000000000000000000000000000000313fa6d3e00e3abf8dfbe3f38c9076206", @@ -6703,6 +7424,53 @@ hash = "0x0617b6eaf74504ccd4d9a071a922836b41d798f9720af8cc4c6da25092fc598d" [private_call_2.verification_key_hints] contract_class_artifact_hash = "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call_2.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6713,8 +7481,13 @@ updated_class_id_delayed_public_mutable_values = [ [private_call_2.verification_key_hints.function_leaf_membership_witness] leaf_index = "1" sibling_path = [ +<<<<<<< HEAD "0x09ea38c7f6832c0648d3f4b726480c023860c358796162cb43bdb4b28249057f", "0x0b3f28b1a3d3fe728e3cde62b17eece998b7f44dcf49cc9296626604b51c2264", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", +>>>>>>> origin/v5-next "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", @@ -6734,6 +7507,7 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call_2.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x0164a9dc0bb5231c23c9d23e8feb4392f4f3984c9bf80114d978ef1392519234" [private_call_2.verification_key_hints.updated_class_id_witness] @@ -6747,6 +7521,21 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" + + [private_call_2.verification_key_hints.updated_class_id_witness] + leaf_index = "131" + sibling_path = [ + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6782,6 +7571,7 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call_2.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x20647ac29f83e2db48d5f31bf73f283f2192f4d7c798b7740965ed967e62e687" value = "0x0000000000000000000000000000000000000000000000000000000000000001" next_slot = "0x2451101525be60fa836b69d102945aad406c1008608f7a3a92a7b977a0f7d984" @@ -6798,15 +7588,40 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a70870d607" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" + +[app_public_inputs_0] +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" +end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x1fea540fc1b531ddddb4e44785db3f8f746cac2338be77f9d54c3a9475cf5d5b" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context] is_static_call = true [app_public_inputs_0.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [app_public_inputs_0.call_context.contract_address] inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [app_public_inputs_0.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_0.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000034c67784" @@ -6816,8 +7631,13 @@ tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a7087 [[app_public_inputs_0.note_hash_read_requests.array]] [app_public_inputs_0.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x0000000000000000000000000000000000000000000000000000000000000000" counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +>>>>>>> origin/v5-next [app_public_inputs_0.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -8467,6 +9287,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -8500,17 +9321,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_0.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs_0.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs_0.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs_0.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs_0.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs_0.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_0.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs_0.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_0.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_0.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_0.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_0.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -8522,13 +9386,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_0.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_0.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" @@ -8539,15 +9408,34 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a70870d607" +======= +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000c" +end_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000e" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000d" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x1fea540fc1b531ddddb4e44785db3f8f746cac2338be77f9d54c3a9475cf5d5b" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context] is_static_call = true [app_public_inputs_1.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2a7b506af1ae5be02864acf2787803943a95285873a9275d9c21b97864569c70" [app_public_inputs_1.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs_1.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_1.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" @@ -8557,8 +9445,13 @@ tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a7087 [[app_public_inputs_1.note_hash_read_requests.array]] [app_public_inputs_1.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x000000000000000000000000000000000000000000000000000000000000000f" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x000000000000000000000000000000000000000000000000000000000000000d" +>>>>>>> origin/v5-next [app_public_inputs_1.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -10208,6 +11101,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -10241,17 +11135,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_1.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs_1.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs_1.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs_1.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs_1.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs_1.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_1.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs_1.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_1.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_1.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_1.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_1.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -10263,13 +11200,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_1.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_1.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000013" @@ -10280,15 +11222,34 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a70870d607" +======= +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000f" +end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000011" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000010" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x1fea540fc1b531ddddb4e44785db3f8f746cac2338be77f9d54c3a9475cf5d5b" +>>>>>>> origin/v5-next [app_public_inputs_2.call_context] is_static_call = false [app_public_inputs_2.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [app_public_inputs_2.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [app_public_inputs_2.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs_2.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" @@ -10298,8 +11259,13 @@ tx_request_salt = "0x096453db0172f69a595bb79d2d55a7eac733d2d3dd4f8ef95e6035a7087 [[app_public_inputs_2.note_hash_read_requests.array]] [app_public_inputs_2.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x0000000000000000000000000000000000000000000000000000000000000014" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x0000000000000000000000000000000000000000000000000000000000000010" +>>>>>>> origin/v5-next [app_public_inputs_2.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -11949,6 +12915,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -11982,17 +12949,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs_2.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs_2.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs_2.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs_2.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs_2.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs_2.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs_2.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs_2.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs_2.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs_2.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs_2.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs_2.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs_2.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -12004,7 +13014,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs_2.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs_2.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml index b645ac93b411..91df4371ed45 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-inner/Prover.toml @@ -1,6 +1,7 @@ [previous_kernel.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000044" sibling_path = [ +<<<<<<< HEAD "0x298f4e6746f87c44edb460aec802101e2ff3342068676e335fa6d53f24733663", "0x1052a8a5e6218f7ea39d3139a8a627827ab06ff2be75fda5f8ebfe33c46d9cd5", "0x14bdb463753cc032802d7a4730d5fa62f6afcd9f1607206dd345c37d85a2b0bd", @@ -8,11 +9,21 @@ sibling_path = [ "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x2e3593797cc16fcb2c05bbe5fafeaf2af9a5e43ec232531ef131d235491ea5f8" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00b4880ea7bd70d039f02ba470880b743dd51130243ede7c6a55dfc15c637a89", + "0x19f7254ca1fbe21a5365d909abcdee8c97128326f9a86cf8396744a2133a019a", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", + "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", + "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", + "0x270777209d6085fa91aff38fc5996d039459d010d31cf5561ac415a7653001fb" +>>>>>>> origin/v5-next ] [previous_kernel.vk_data.vk] key = [ "0x0000000000000000000000000000000000000000000000000000000000000011", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000022", "0x0000000000000000000000000000000000000000000000000000000000000281", "0x000000000000000000000000000000051ee6bba8f65618ef39c327c552ade385", @@ -79,10 +90,47 @@ sibling_path = [ "0x00000000000000000000000000000000001cb8da724069397fe56f2419facf69", "0x000000000000000000000000000000910d29fabc1c0d44cd2b0fdd7986931051", "0x00000000000000000000000000000000001132a409fa46a2a3ecb182baf7f448", +======= + "0x000000000000000000000000000000000000000000000000000000000000001a", + "0x00000000000000000000000000000000000000000000000000000000000001d7", + "0x00000000000000000000000000000073d1b06ca958139d8167bf91fec65717a3", + "0x00000000000000000000000000000000002126797b975ba906ece5576c3c44e5", + "0x000000000000000000000000000000d13dd564f9ca6e1e301fb505ab3904f312", + "0x000000000000000000000000000000000028ef474a3724e2aca9694d9b86913e", + "0x000000000000000000000000000000b0e621733c9b33ca4cd72c587c38865468", + "0x0000000000000000000000000000000000214d086476e52575eb897b52715244", + "0x00000000000000000000000000000098ea296886c59341a423261766a71bfe18", + "0x000000000000000000000000000000000023ecfde1cb1be6573985d344e0d468", + "0x000000000000000000000000000000f6426af45d639e6d4255f2a9a9880feb41", + "0x00000000000000000000000000000000002b922707ac305d546efa8132622e1c", + "0x000000000000000000000000000000b5d28c6921adefc75a20f37b59e6a6029d", + "0x00000000000000000000000000000000002bed8fea956bccb1e9b7a077cd9450", + "0x00000000000000000000000000000095dc4663d5852975f48fabf9adb97087c1", + "0x00000000000000000000000000000000001aea4366012d283c078d0ac031d2ed", + "0x00000000000000000000000000000002d3235d1820960d0e28dd0cee2bca4e19", + "0x00000000000000000000000000000000000f9f77ba19e1877dbfc1d76efef24a", + "0x0000000000000000000000000000005132fa00adb3028f32a801a15fecef441b", + "0x00000000000000000000000000000000001882a6e9f5bdcd35be9b0376c4e8cc", + "0x0000000000000000000000000000005bfca542a5a3bfb4b0c0fba79a84d0cb8b", + "0x00000000000000000000000000000000000e9dbbe628d433c501a0a5e7e43e85", + "0x000000000000000000000000000000cf6beb70b25cbbf6b74d8badca8b8fd597", + "0x00000000000000000000000000000000001327ca88b0ae4b307fd1724ba60846", + "0x000000000000000000000000000000f5b42fbed0e6d14165bd9a831ce6c33c75", + "0x00000000000000000000000000000000002e8a819bbe9959e047afa046cd7dde", + "0x000000000000000000000000000000cab1e6a5839407a39eb2591509ff3f944c", + "0x000000000000000000000000000000000004568d7f758ddcb72a67c3979d0539", + "0x0000000000000000000000000000003902cce6f097ccfb94346d6d62f3c725d3", + "0x00000000000000000000000000000000002e8293f0f67cdf9a664ba023c07540", + "0x0000000000000000000000000000006da09b54ab84dea06f68d9ced194b7e82b", + "0x00000000000000000000000000000000002f9324981442bb3b155a3bdbf8ae33", + "0x0000000000000000000000000000004a8980b979751146a4e5b0301a78c34ae4", + "0x000000000000000000000000000000000024ce9985e1962c86c17373e9ba0450", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000002dae800fe99dac5ebb43bfd9152c77880d", "0x0000000000000000000000000000000000276e41b42fc27ded12cd36ee332d1d", "0x000000000000000000000000000000c2f3da3df3239fe0bb2d2bdd66782ed61d", @@ -107,6 +155,84 @@ sibling_path = [ "0x000000000000000000000000000000000012ff97355958d005e2a26f61b6fa72", "0x000000000000000000000000000000f3fa2487341e950e289ba6257b840b0620", "0x000000000000000000000000000000000006098dd4cb34844bd048f829c76d4f", +======= + "0x000000000000000000000000000000da121444ba2806c6ab4b718917ea093ba2", + "0x00000000000000000000000000000000000976720b7a5546f2043313856dfaa0", + "0x000000000000000000000000000000f5982ebcb8625898d63b92c5662e8ee8d1", + "0x0000000000000000000000000000000000226429ff9b8a9f0e22a88935367f24", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c880cf1be0493c6194d60d935eed1cb818", + "0x0000000000000000000000000000000000027d1a2007f0f0dc183dd028a39be8", + "0x00000000000000000000000000000077d14a4346a1901681a97cf78905f86e9a", + "0x00000000000000000000000000000000001d3fde87f3cd78454200b0c765ddfe", + "0x000000000000000000000000000000ae9df27601210c2d41198c2021c8cede89", + "0x00000000000000000000000000000000001a6697d9258df3ac98fe702233d038", + "0x000000000000000000000000000000b7e17f6f780a9f4964642711b53b87e65b", + "0x0000000000000000000000000000000000207bd6065d1761d0a69d84514754c5", + "0x00000000000000000000000000000051fa0e50ff7bd56d13e91975fecdecccf5", + "0x00000000000000000000000000000000002aa0b85fa6bc1cf1ac78e78b2a0628", + "0x0000000000000000000000000000008edbd5b4aa6b11c72af6dd6d1550751169", + "0x00000000000000000000000000000000000ecdf0c5214ece4539683d98786aaa", + "0x000000000000000000000000000000ba52345a3075f6d4a8dcf81c54da751061", + "0x000000000000000000000000000000000007dfcc3a1157261646dc806e2674aa", + "0x00000000000000000000000000000072ac9c8248791c4191194d7d83b5ae825d", + "0x00000000000000000000000000000000000631c1d2e946b37ebc3d2ed6967053", + "0x00000000000000000000000000000085c17e14518bfaf45b59d7a298425f368e", + "0x0000000000000000000000000000000000149d685821d324336c7b4619d55380", + "0x000000000000000000000000000000b0bc011a0bba87800ed9a87d6805fb4fff", + "0x000000000000000000000000000000000005f349f04c0111881e048987bf674a", + "0x00000000000000000000000000000082e0a9b882c766993cb265ba143bd62a83", + "0x00000000000000000000000000000000002e9c2907939bb2ef9d4118785ddc9a", + "0x000000000000000000000000000000b8ef091d2194ca0cc8bd7eca4b3430506a", + "0x00000000000000000000000000000000002eddc6e1a655625f67a6c9abae658b", + "0x000000000000000000000000000000607dc66dcf4454b4bb5b23a1041ff3528c", + "0x0000000000000000000000000000000000000f06f7f7be209e35bf1e45251eb6", + "0x000000000000000000000000000000485b3552db58113dff3f9353e23f1692c0", + "0x00000000000000000000000000000000000fe06fd48231c5ae76ddc0d31594a7", + "0x000000000000000000000000000000ba483dbd5eeada62315810b0ba7514c8f6", + "0x000000000000000000000000000000000007f37aac70c908572d9022ceb99603", + "0x000000000000000000000000000000d0c2ac15e9bbeb074b1de4c515b178948b", + "0x0000000000000000000000000000000000225f348cdc306475e64baf99130edd", + "0x000000000000000000000000000000349e9c2cabce425d6966a3f7fea4adb0b2", + "0x000000000000000000000000000000000009d744462cce9031b283bc66cd6c6d", + "0x000000000000000000000000000000d711584ba3bbfb921d239848e64a823393", + "0x0000000000000000000000000000000000177f36ab710bffc094e5dacd513533", + "0x000000000000000000000000000000eefcce09cd91de6deb34ba07c107282627", + "0x0000000000000000000000000000000000175186e4891c051356bb735532cd62", + "0x00000000000000000000000000000040970b3a4a09922ea6a291d4429d753e5e", + "0x00000000000000000000000000000000000fee4185b0b9e01bf8f93e2253d858", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c900042c9ed8a48bb6e3c9af6ffa308861", + "0x00000000000000000000000000000000002aa863c11da077ad80f9bcee485879", + "0x000000000000000000000000000000313fe878de14c91d3b2228fca5d2a574f4", + "0x00000000000000000000000000000000002286bd14cd48c9ab24133f2c8946d7", + "0x000000000000000000000000000000b5253f03cdfa905928bd47c6042344a9bd", + "0x000000000000000000000000000000000008c83bdaa8db01eb7a6cfc534eed73", + "0x0000000000000000000000000000005b5c454e71c977a0c19e4e155062788ee1", + "0x00000000000000000000000000000000000fb51341fabba1e9f33b44e6b209e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -127,6 +253,7 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", @@ -139,10 +266,13 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= +>>>>>>> origin/v5-next "0x0000000000000000000000000000001409391ea53890220ff69ed9e3b8a27d0a", "0x000000000000000000000000000000000029371ef1a94251e6da6837742338f1", "0x000000000000000000000000000000bbf418b4a13276af200016de44259b9024", "0x00000000000000000000000000000000002d4e1fd05bdeb8a9f453b552e62451", +<<<<<<< HEAD "0x0000000000000000000000000000003e8adcf9a2f23cee50b070ff410726af23", "0x00000000000000000000000000000000002ec60e67ea9e6ff785a31397d7a4ed", "0x000000000000000000000000000000209368d520fb325079102cc86331737dc1", @@ -210,17 +340,99 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + "0x0000000000000000000000000000008269da88a88363e62cadda42646c79117c", + "0x0000000000000000000000000000000000099f6865b246c83931cb96a0280314", + "0x000000000000000000000000000000f21d50e6f56f0aa0b3c2c683fa3199abd9", + "0x00000000000000000000000000000000000f9bf02cc49b7c152565f32827e713", + "0x0000000000000000000000000000005be998c93b183fae6bc6657a10ce35b5e9", + "0x0000000000000000000000000000000000028c21e3458f36987b075523eecaf1", + "0x00000000000000000000000000000044970c3d35f9dec99ff26b9f5eca572768", + "0x00000000000000000000000000000000001754b7d3785919b0668cb5dc6764b8", + "0x0000000000000000000000000000002341f73b9500775f43bebcccd873ae259c", + "0x00000000000000000000000000000000001ec8799d03b338440f410081d2af93", + "0x0000000000000000000000000000003d65e2f6d2070f06e0874aee4e42982d65", + "0x00000000000000000000000000000000000f8b1959d00f9240a1925a0ba60a30", + "0x000000000000000000000000000000fcb77a6a3d49a608d2feb71070fcbfa383", + "0x00000000000000000000000000000000002b540873492f970574f06ea963c5a7", + "0x000000000000000000000000000000154794f2eb4af57f2d9891f009caa5b1cb", + "0x000000000000000000000000000000000022496898264db1a662d1da9b76853c", + "0x0000000000000000000000000000009781a63b3bf5feea08b5f4a41aad6e7508", + "0x0000000000000000000000000000000000034ed420fe9d303e85e8bb49611198", + "0x00000000000000000000000000000034213a15cc236292e5f3139dfbb49927a1", + "0x00000000000000000000000000000000002fbc95d4c5cfeaa0dd028e9d207cc1", + "0x000000000000000000000000000000f1f33089a3d77064f38b920e6547f39d27", + "0x000000000000000000000000000000000004562cbf7cb2cf1e88dc9bf8334970", + "0x0000000000000000000000000000001f4693d36ba567b35d3c35fbdb35d85206", + "0x00000000000000000000000000000000000f5050319e01538cc44b3963741543" +] + hash = "0x00b2a15ea3c1ba1d6b38d87b2e0a8a01d0dc286fddb088eafc01a34aef0e1a04" + +[previous_kernel_public_inputs] +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547cf" +is_private_only = true +claimed_first_nullifier = "0x18597ca0c71a7f7b36a69ff04d8096400a51c89f87e3c48da8f07d2e83c3a150" +claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" + + [previous_kernel_public_inputs.constants] + tx_request_salt = "0x2deeb4d4a9cfc5a97e7403c4d21745f34e0c7971e29c38ac4a473bacbd10cac2" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + + [previous_kernel_public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [previous_kernel_public_inputs.constants.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [previous_kernel_public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -232,13 +444,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] @@ -246,6 +463,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -272,12 +498,21 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.validation_requests.note_hash_read_requests] +<<<<<<< HEAD length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array]] [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.inner] inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +======= +length = "0x0000000000000000000000000000000000000000000000000000000000000000" + + [[previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array]] +[previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.inner] +inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.validation_requests.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -2524,14 +2759,18 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] counter = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] +<<<<<<< HEAD value = "0x106aa7ee8e6d338a6d872477804d1333256a714c307d79b53bffeef19c9fab0a" +======= + value = "0x028ea2d049d4ac97a627259561f1ebd5a0b61dee97faa3dd429001a890788637" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] @@ -2539,14 +2778,14 @@ inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x000000000000000000000000000000000000000000000000000000000000000c" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x191aa492362b92a390b2b64677e8ebb469dbaf16d5ac1e6d21eba62e8fbac03f" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] @@ -5761,19 +6000,33 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[previous_kernel_public_inputs.end.private_call_stack.array]] +<<<<<<< HEAD args_hash = "0x0a4fbfe358c3d24cf38c74c9065d90df00800f9fecd4a0e37a8dc090c555f88a" returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" start_side_effect_counter = "0x000000000000000000000000000000000000000000000000000000000000000f" end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000011" +======= + args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" + returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" + start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" + end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context] is_static_call = false [previous_kernel_public_inputs.end.private_call_stack.array.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [previous_kernel_public_inputs.end.private_call_stack.array.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.end.private_call_stack.array.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" @@ -6059,13 +6312,18 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [private_call.vk] key = [ "0x000000000000000000000000000000000000000000000000000000000000000d", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000001", +<<<<<<< HEAD "0x0000000000000000000000000000000660931647dae4a1669b24d443e4bb2eed", "0x000000000000000000000000000000000003e3b1c1859329adea4a8c61e3d1ce", "0x0000000000000000000000000000004a6e62d5b9df299da404af2e02bdd68a51", @@ -6098,14 +6356,55 @@ key = [ "0x00000000000000000000000000000000002893ecf1782df939c654fa6558d6a1", "0x00000000000000000000000000000002d658942257aeeaad280f5956413ce014", "0x0000000000000000000000000000000000220252daf47fe9b19503648d7b0fa6", +======= + "0x000000000000000000000000000000eb391f805be209e531cd2c3d11fa6f5dc1", + "0x00000000000000000000000000000000002d46459928eb2c229bb9687fae937f", + "0x00000000000000000000000000000013d8fba380c3ffa4cac929f2c598afa77a", + "0x0000000000000000000000000000000000191124cb35d60113d432e428633622", + "0x000000000000000000000000000000d4c44ab68d47faaf06e279f4569180eeb8", + "0x00000000000000000000000000000000002748b7b5a41c8a41b590c6a67de1eb", + "0x00000000000000000000000000000041ff3f809254ace6cf3242f4c96c820afe", + "0x000000000000000000000000000000000017bd709fa94a35e402e366cc278290", + "0x00000000000000000000000000000051f2a8ed8472e22a4801a67fe6264b6e87", + "0x0000000000000000000000000000000000116e54dd90666c2d543f910424fe3f", + "0x0000000000000000000000000000001dee37c11f0b6b6014fb1e7c80323d782f", + "0x000000000000000000000000000000000013f86978522a906fa3d94d7b4c0684", + "0x000000000000000000000000000000a5bc2efb101b158e2398fe7510fc4e6235", + "0x000000000000000000000000000000000012035237914cd51b3a6fcdceb04f22", + "0x000000000000000000000000000000e1a34dc3652e32e50dc870cc65bb56e123", + "0x000000000000000000000000000000000017771a97a958511b45263dca743a2b", + "0x0000000000000000000000000000007596b33c7bdaa2fb0069a3d552a712f2e3", + "0x00000000000000000000000000000000002e314ae402c641105dc5646dbd3b4a", + "0x0000000000000000000000000000006f4feb859c7541020ab480701dc8070998", + "0x000000000000000000000000000000000015e0a5c42b22a353b96e10169c2be6", + "0x0000000000000000000000000000002ef204731636c65604c3ac404b3b98fb53", + "0x000000000000000000000000000000000013744e63517f63d67f67647edfffb9", + "0x000000000000000000000000000000dadd366976d5c6e6467e83b7e7fb4506d4", + "0x000000000000000000000000000000000005705398e92ea9840410e9df3c5fff", + "0x000000000000000000000000000000b4a8c88c237160fce0b1f82548a44fe6ea", + "0x00000000000000000000000000000000002f0ed0fff62c92cd5669663aea0aea", + "0x0000000000000000000000000000004f1a61521d70d220775754b7d2fe054efe", + "0x00000000000000000000000000000000002979ef209a8c66ea46aa7ad0e93554", + "0x000000000000000000000000000000103b3b9e13a13c681bb95f10fb0883217d", + "0x0000000000000000000000000000000000133574f6b1fd8d56b704eac518badc", + "0x000000000000000000000000000000bc83df44b7d5ba18b1d29d28f30fce44c4", + "0x00000000000000000000000000000000001d49e5ca52bd238c9c7811810673e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000006bd0a36c97c3fa27fe7d9a34bf909d82bf", "0x000000000000000000000000000000000025e7649164caa06ea82c08bf01a014", "0x000000000000000000000000000000a1c9ca0b102b27dad0f50e37709c4aaf36", "0x000000000000000000000000000000000018049cd3d6c0a2047f1d437264d368", +======= + "0x0000000000000000000000000000004c40e3dc648d12e14613389f15324e3577", + "0x00000000000000000000000000000000000fd8d94842a2d33a9006c699974f53", + "0x000000000000000000000000000000aaa8534b05c26fdab6e2bd793b15c31891", + "0x00000000000000000000000000000000002212c08ab914144691eee939266f3d", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6126,6 +6425,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000001f0d299ea061f9a243e22a08588b0048f0", "0x000000000000000000000000000000000008bdd11567007fbb13437edba35108", "0x0000000000000000000000000000005731a903f4fbf60472048fa982d6766880", @@ -6162,14 +6462,55 @@ key = [ "0x0000000000000000000000000000000000232899e8d55c2ff7568f1700bc0696", "0x0000000000000000000000000000001f400f20432c5d3174b3e7fdfdf6ca8cbd", "0x000000000000000000000000000000000000a9fa62ba88dce6eca9412a219c05", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x000000000000000000000000000000e9ef6ad14d1ff566ff1295ae13dbf3fa87", + "0x0000000000000000000000000000000000081dbb8e99420ca015e010e18d79b5", + "0x000000000000000000000000000000a10aaa5074aac965da18f14e4750bde869", + "0x0000000000000000000000000000000000054a5e046c1781d633a8a575afc69a", + "0x00000000000000000000000000000080e8f738d4ac357a5c5100e3bea7958868", + "0x00000000000000000000000000000000000e84c27562e63730522de067bd099a", + "0x000000000000000000000000000000203dd63b93a69df655c3f7a24b4fd17246", + "0x000000000000000000000000000000000010272cdb20ffba88c0e474bc52b3f7", + "0x000000000000000000000000000000d2c524ee83e6d2fb309de9474a2db31bfc", + "0x0000000000000000000000000000000000253fab01a6ea06de2de4ab4147df82", + "0x000000000000000000000000000000378571830c916b7902b1f45adff48e5afc", + "0x00000000000000000000000000000000000db40661f84bc1550b2a5c3b53ba8d", + "0x000000000000000000000000000000c63d5cac0a0e58796cc7d7939adfeddf99", + "0x00000000000000000000000000000000000228105cc7381a5dd9c4b0475b8421", + "0x0000000000000000000000000000004a1273179c44391f71832b26569b683f76", + "0x00000000000000000000000000000000001c850895805e3ad31db5e328b69b7d", + "0x000000000000000000000000000000efd4d5d526bfcddb6f41d3110acdbf677c", + "0x000000000000000000000000000000000025df8945d17ffb23899d09c32f3502", + "0x000000000000000000000000000000bf403288b2147d155d497af010279c2579", + "0x000000000000000000000000000000000015183621820ac79decd75466ff2cb8", + "0x000000000000000000000000000000fc5e4687747e307944f90ea0df4035dbe4", + "0x00000000000000000000000000000000000e2c8242a8b0946995b6c1f408c1e2", + "0x000000000000000000000000000000042f840083bb9a925ccf7929f18186d22e", + "0x000000000000000000000000000000000022d0898f03eba88a3d55e8e2ce2758", + "0x000000000000000000000000000000001f5f4c7b18e40c6b3aa4636fd41e3e72", + "0x000000000000000000000000000000000015577b46daf097188cf667f6af4f35", + "0x0000000000000000000000000000000e4435ee39304af5d5379c8f6cf667f9ea", + "0x00000000000000000000000000000000002b6cd4cbec20c7369d0713e2ea4fc3", + "0x000000000000000000000000000000c0631c747d164912ac198513c57c3507b8", + "0x000000000000000000000000000000000026adfed956f73d922948c22e4111a8", + "0x000000000000000000000000000000490cb7086647cfe8021d699c8b5893825f", + "0x000000000000000000000000000000000018e71618750a36704cde5b2dad37e5", +>>>>>>> origin/v5-next + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x000000000000000000000000000000a950975e45c16a72c56ca620a25ce7a1e7", "0x000000000000000000000000000000000027bd5f21ec613493fbc06535501b5b", "0x0000000000000000000000000000005708a9b36f3be228e77b4befdebc6b4ec1", "0x00000000000000000000000000000000001588c0225d9cb5a900b0346403e7f9", +======= + "0x0000000000000000000000000000007584165b1d0f2a39f3d1e1c289f4d59fef", + "0x0000000000000000000000000000000000219092ff208320cfa4a0926eeeb318", + "0x000000000000000000000000000000e74ab096a72ffde68ccc54cf032c51f3f9", + "0x00000000000000000000000000000000002d660bc6b11c7751e7658aea833cbd", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6178,6 +6519,7 @@ key = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000000490ab468fbf3466981b25dbcfdc2cdfde", "0x0000000000000000000000000000000000136a0a1020909fa1371d625519921e", "0x000000000000000000000000000000dc90627df43c72ba6014f98ca176c04007", @@ -6186,10 +6528,21 @@ key = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +======= + "0x0000000000000000000000000000003cca5dd71089c225e4633dc65ab389ac55", + "0x0000000000000000000000000000000000285f0bb508fb1348264a3de67111b0", + "0x0000000000000000000000000000003c7d4433bc264b12fa7626c8f713ae8af8", + "0x00000000000000000000000000000000000666b4acc6bafa70c8520f2380afba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000003df7abc610ee47f0eee1bd0d37f6b2e8ef", "0x000000000000000000000000000000000014594f536cc25257cca9462e9379a6", "0x000000000000000000000000000000e3e5e3655139ee66d536b51353bb547a52", "0x0000000000000000000000000000000000269db91ecaaa132f81cf34bb3c27d1", +<<<<<<< HEAD "0x000000000000000000000000000000c5535e91d1b3a866778208b37a7f7c0dd4", "0x000000000000000000000000000000000012a47f35f6977678ed27bd909854eb", "0x0000000000000000000000000000000313fa6d3e00e3abf8dfbe3f38c9076206", @@ -6219,6 +6572,53 @@ hash = "0x0617b6eaf74504ccd4d9a071a922836b41d798f9720af8cc4c6da25092fc598d" [private_call.verification_key_hints] contract_class_artifact_hash = "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000000000053276d3fd724061a740a266dfcb1f30fea", + "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", + "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", + "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", + "0x000000000000000000000000000000ad346cbe9781c7db42fc5b314a7f0862b6", + "0x00000000000000000000000000000000002cc3205e7030d54b8b692f52911d82", + "0x000000000000000000000000000000b64ca26b00a5a903b02ec9d32fe7141188", + "0x000000000000000000000000000000000005c219590387728df6aaf75b3c882d", + "0x000000000000000000000000000000f10823d2d3b5f6584f1e725a1cac6a21e8", + "0x0000000000000000000000000000000000036cfda50469a3632876200a786788", + "0x000000000000000000000000000000be9075551a0151a4b57d0fe0ad7c5743de", + "0x000000000000000000000000000000000018aa4b0fca0d21c4a80e1f90be0a09", + "0x000000000000000000000000000000e337625994bd1f6d022bcd91bc1d14d138", + "0x000000000000000000000000000000000013000a3a8fdc04b6b1dfabc30b7858", + "0x000000000000000000000000000000f7ccde1e09b850c9f4ebd89c72f9e55e03", + "0x000000000000000000000000000000000000d57677de39a8d66597c5c7234e66", + "0x0000000000000000000000000000000a84556555dcee79923342ee29ceb4ee6b", + "0x00000000000000000000000000000000001eb3ece0b968191a4984f10451d30f", + "0x000000000000000000000000000000378d95e3ca892ceb606795f8e98b49845b", + "0x00000000000000000000000000000000000a5f86d5caea200710a4fa601550ef", + "0x0000000000000000000000000000002f9fc073f7c6fefdbf2118c47589da1ad2", + "0x00000000000000000000000000000000000185b883eab65b0b977e9ecdc90c00", + "0x0000000000000000000000000000005704d5568baf9fd46efb008005b2a86924", + "0x00000000000000000000000000000000002dc477350964b8613a25514bc579ad", + "0x000000000000000000000000000000e9b604e4d2da1ed5acb5d39103a0d0daaf", + "0x00000000000000000000000000000000000e8172b66589f94b900c4be2f6d5f4", + "0x00000000000000000000000000000028ca7daa942350b18f4c7fee764a2f56a9", + "0x00000000000000000000000000000000002add5e4c43191e1b103e454355dbe6" +] +hash = "0x002009ab1f47eeb214345290304828d0f5dd8a0c6cb9be11c74552f64dc4d7c1" + +[private_call.verification_key_hints] +contract_class_artifact_hash = "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c" +>>>>>>> origin/v5-next contract_class_public_bytecode_commitment = "0x18f413c13a1304ba98d2f543cbf96486c2cc797af0f8ef939fced9159485eb5a" updated_class_id_delayed_public_mutable_values = [ "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6229,8 +6629,13 @@ updated_class_id_delayed_public_mutable_values = [ [private_call.verification_key_hints.function_leaf_membership_witness] leaf_index = "1" sibling_path = [ +<<<<<<< HEAD "0x09ea38c7f6832c0648d3f4b726480c023860c358796162cb43bdb4b28249057f", "0x0b3f28b1a3d3fe728e3cde62b17eece998b7f44dcf49cc9296626604b51c2264", +======= + "0x1a82c594774f755354472da88067557031a1eab2623dda7a77dd292ec038852e", + "0x04d627ea79f22892e728e307d92c8a2c603e04b33eed3268c9dfeb943e0ff99d", +>>>>>>> origin/v5-next "0x2974d8999d00928aa1378118756d6a4ba1368b1da89b2b1059c17fbb88ad21a8", "0x2e6127fb2bcf542677ed9dfc6cd90a61a075142999aebccf345c816aff3a1d92", "0x267a9c24e849f51869c93086ded207858dfb130344e1879a9d15d35096464824", @@ -6250,6 +6655,7 @@ x = "0x00c044b05b6ca83b9c2dbae79cc1135155956a64e136819136e9947fe5e5866c" y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" [private_call.verification_key_hints.salted_initialization_hash] +<<<<<<< HEAD inner = "0x0164a9dc0bb5231c23c9d23e8feb4392f4f3984c9bf80114d978ef1392519234" [private_call.verification_key_hints.updated_class_id_witness] @@ -6263,6 +6669,21 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", "0x18427b6fa4d79cbe0dd607bda6b0e30b95739ef2b52a48577a3625b7616d3020", +======= + inner = "0x00c61d2a3afc6bf751a878e41f9f61e82e4654935522f4ce82bb76a9744e0958" + + [private_call.verification_key_hints.updated_class_id_witness] + leaf_index = "131" + sibling_path = [ + "0x1d37442a7b92658c41aaf3332ba59cf175eb54cd49b1f6a916d379f41725c039", + "0x2f0ccdc3595bd94d0f9727c3665c7154d6c2e2c6d9a1fe2531da1f9dc60d3e62", + "0x0ba1351892a75efb42a4652393416dd6f8df098d8e0118311379aca9c260041b", + "0x123fdbab3a117805042d853f2e2498ebb8405ecaca499376fdd7e7ae7dbf0c2c", + "0x1d52af9cd9f69c1286e9a96fd498e736789a5bc463fceb1c176a4f9292f7cbe3", + "0x1ff1d5db01572c915915a22173c73d8073df9af4e4c57f6af29df5315da44419", + "0x070dcbac794fa663bc71b42d80775c0cea8c3ed7580207cfd30fd1285813ce07", + "0x22b9d7b45cdcc201eeba0a5c7e8ab4b9805e97f271b2384015f35db3ba41a05c", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -6298,6 +6719,7 @@ y = "0x1c1f0ca244c7cd46b682552bff8ae77dea40b966a71de076ec3b7678f2bdb151" ] [private_call.verification_key_hints.updated_class_id_leaf] +<<<<<<< HEAD slot = "0x20647ac29f83e2db48d5f31bf73f283f2192f4d7c798b7740965ed967e62e687" value = "0x0000000000000000000000000000000000000000000000000000000000000001" next_slot = "0x2451101525be60fa836b69d102945aad406c1008608f7a3a92a7b977a0f7d984" @@ -6314,15 +6736,40 @@ min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000 is_fee_payer = false expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e74a1" tx_request_salt = "0x27e71d7a6e9ab4d76e367fb74b6cd5b9db3f452dc2585717044dbef475e0eb5f" +======= + slot = "0x192304f23c5f59bf6e4a5fe9910d7086f5cb2df3b5120b7a0e48976c0bf0fec7" + value = "0x05208323f49682fc3367ed42a0212854a797b5372b0cc6bc5493b00e96ff256d" + next_slot = "0x21576cb860b05636b40f939d45a6cf797eeff24f0b690190cfe60afbe27a4f81" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" + +[app_public_inputs] +args_hash = "0x0165282491d8c25d7a840b37bf9a9d3f6ae2d0aaddba88691cef3c4a096ce044" +returns_hash = "0x20fd6cca0f81d2e3d2192b45a0208ef249e8032b9785fe9ecfed10beb1d36cb5" +start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000007" +end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000009" +expected_non_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +expected_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +is_fee_payer = false +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547d0" +tx_request_salt = "0x2deeb4d4a9cfc5a97e7403c4d21745f34e0c7971e29c38ac4a473bacbd10cac2" +>>>>>>> origin/v5-next [app_public_inputs.call_context] is_static_call = false [app_public_inputs.call_context.msg_sender] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" [app_public_inputs.call_context.contract_address] inner = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + inner = "0x1926c80ab5873741ede530b55390fa01d75a7fca30d7e8d94e520c6ae8c6a1ee" + + [app_public_inputs.call_context.contract_address] + inner = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next [app_public_inputs.call_context.function_selector] inner = "0x0000000000000000000000000000000000000000000000000000000080d3af36" @@ -6332,8 +6779,13 @@ tx_request_salt = "0x27e71d7a6e9ab4d76e367fb74b6cd5b9db3f452dc2585717044dbef475e [[app_public_inputs.note_hash_read_requests.array]] [app_public_inputs.note_hash_read_requests.array.inner] +<<<<<<< HEAD inner = "0x17a82f8aa16ce04c96f0aeed7298a226c0e6f3ebc49755aba4cbb5ea1df90d4d" counter = "0x0000000000000000000000000000000000000000000000000000000000000010" +======= +inner = "0x14331feae35d37334206a0a64a4df9d536a5d5dd21ff1a007a77d0c8837e59b1" +counter = "0x0000000000000000000000000000000000000000000000000000000000000008" +>>>>>>> origin/v5-next [app_public_inputs.note_hash_read_requests.array.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -7983,6 +8435,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" length = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.anchor_block_header] +<<<<<<< HEAD sponge_blob_hash = "0x10cef564b4d3d14145355eb603cc45714199ae25ee520f8b56e25f6d6a3bf600" total_fees = "0x00000000000000000000000000000000000000000000000000028969d4e88180" total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000722f4" @@ -8016,17 +8469,60 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [app_public_inputs.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [app_public_inputs.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[app_public_inputs.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[app_public_inputs.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[app_public_inputs.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[app_public_inputs.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [app_public_inputs.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [app_public_inputs.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [app_public_inputs.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [app_public_inputs.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [app_public_inputs.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [app_public_inputs.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [app_public_inputs.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -8038,7 +8534,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [app_public_inputs.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [app_public_inputs.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_kernel_circuit_output_composer.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_kernel_circuit_output_composer.nr index 78796de329ad..ad639630dba3 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_kernel_circuit_output_composer.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/private_kernel_circuit_output_composer.nr @@ -81,6 +81,13 @@ impl PrivateKernelCircuitOutputComposer { // non-revertible (counter 1, so it sorts to index 0), and globally unique (`tx_request.hash()` // includes the salt). let scoped_protocol_nullifier = create_protocol_nullifier(inputs.tx_request); +<<<<<<< HEAD +======= + let protocol_nullifier = compute_siloed_nullifier( + scoped_protocol_nullifier.contract_address, + scoped_protocol_nullifier.innermost().value, + ); +>>>>>>> origin/v5-next // Safety: index 0 is empty, so a direct write plus `length = 1` is equivalent to a `push`. end.nullifiers.array[0] = scoped_protocol_nullifier; end.nullifiers.length = 1; @@ -194,6 +201,12 @@ impl PrivateKernelCircuitOutputComposer { fee_payer, expiration_timestamp, is_private_only: inputs.is_private_only, +<<<<<<< HEAD +======= + // The siloed form of the scoped nullifier placed at index 0 above. The reset silos + // `end.nullifiers[0]` to this value, and the tail asserts the two match. + claimed_first_nullifier: protocol_nullifier, +>>>>>>> origin/v5-next claimed_revertible_counter: inputs.revertible_counter_hint, }; diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init_n.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init_n.nr index 4e575a61d22b..1c7f4cd35930 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init_n.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_init_n.nr @@ -49,10 +49,22 @@ pub struct PrivateKernelInitNCircuitPrivateInputs { pub fn execute( inputs: PrivateKernelInitNCircuitPrivateInputs, ) -> PrivateKernelCircuitPublicInputs { +<<<<<<< HEAD PrivateCallDataValidator::new(inputs.private_calls[0]).validate_as_first_call( inputs.tx_request, inputs.protocol_contracts, inputs.revertible_counter_hint, +======= + let mut output = private_kernel_init::execute( + PrivateKernelInitCircuitPrivateInputs { + tx_request: inputs.tx_request, + private_call: inputs.private_calls[0], + vk_tree_root: inputs.vk_tree_root, + protocol_contracts: inputs.protocol_contracts, + is_private_only: inputs.is_private_only, + revertible_counter_hint: inputs.revertible_counter_hint, + }, +>>>>>>> origin/v5-next ); let constants_for_apps = PrivateTxConstantData { diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/mod.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/mod.nr index 27fd3353711d..784504ed403c 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_circuit_output_validator_builder/mod.nr @@ -47,6 +47,16 @@ impl PrivateKernelCircuitOutputValidatorBuilder { let protocol_nullifier = create_protocol_nullifier(self.tx_request); self.output.nullifiers.push(protocol_nullifier); self.previous_kernel.nullifiers.push(protocol_nullifier); +<<<<<<< HEAD +======= + + let siloed_protocol_nullifier = compute_siloed_nullifier( + protocol_nullifier.contract_address, + protocol_nullifier.innermost().value, + ); + self.previous_kernel.claimed_first_nullifier = siloed_protocol_nullifier; + self.output.claimed_first_nullifier = siloed_protocol_nullifier; +>>>>>>> origin/v5-next } pub fn with_previous_kernel_vk_index(&mut self, vk_index: u32) { diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/mod.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/mod.nr index 4d4dce80d265..bac68d56c8ef 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/mod.nr @@ -79,6 +79,13 @@ impl TestBuilder { let mut accumulated_data = private_call.to_private_accumulated_data(); let scoped_protocol_nullifier = create_protocol_nullifier(self.tx_request); +<<<<<<< HEAD +======= + let protocol_nullifier = compute_siloed_nullifier( + scoped_protocol_nullifier.contract_address, + scoped_protocol_nullifier.innermost().value, + ); +>>>>>>> origin/v5-next // The protocol nullifier is always injected at index 0; app nullifiers shift to index 1+. let app_nullifiers = accumulated_data.nullifiers; let mut nullifiers = app_nullifiers; @@ -107,6 +114,11 @@ impl TestBuilder { assert_eq(pi.is_private_only, self.is_private_only); +<<<<<<< HEAD +======= + assert_eq(pi.claimed_first_nullifier, protocol_nullifier); + +>>>>>>> origin/v5-next assert_eq(pi.claimed_revertible_counter, self.revertible_counter_hint); } } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/output_composition_tests.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/output_composition_tests.nr index 5fc89c53a9c8..087c7f105740 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/output_composition_tests.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/private_kernel_init/output_composition_tests.nr @@ -12,6 +12,13 @@ fn with_everything_empty() { builder.private_call.expiration_timestamp = 0; let scoped_protocol_nullifier = create_protocol_nullifier(builder.tx_request); +<<<<<<< HEAD +======= + let protocol_nullifier = compute_siloed_nullifier( + scoped_protocol_nullifier.contract_address, + scoped_protocol_nullifier.innermost().value, + ); +>>>>>>> origin/v5-next let pi = builder.execute(); builder.assert_expected_public_inputs(pi); @@ -20,6 +27,10 @@ fn with_everything_empty() { assert_eq(pi.fee_payer, AztecAddress::empty()); assert_eq(pi.expiration_timestamp, 0); assert_eq(pi.is_private_only, false); +<<<<<<< HEAD +======= + assert_eq(pi.claimed_first_nullifier, protocol_nullifier); +>>>>>>> origin/v5-next assert_eq(pi.claimed_revertible_counter, 0); assert_claimed_length_array_eq(pi.end.note_hashes, []); @@ -44,12 +55,24 @@ fn with_nullifiers_emitted_and_protocol_nullifier_injected() { let mut builder = TestBuilder::new(); let scoped_protocol_nullifier = create_protocol_nullifier(builder.tx_request); +<<<<<<< HEAD +======= + let protocol_nullifier = compute_siloed_nullifier( + scoped_protocol_nullifier.contract_address, + scoped_protocol_nullifier.innermost().value, + ); +>>>>>>> origin/v5-next builder.private_call.append_nullifiers(1); let private_call_nullifiers = builder.private_call.nullifiers.storage(); let pi = builder.execute(); +<<<<<<< HEAD +======= + assert_eq(pi.claimed_first_nullifier, protocol_nullifier); + +>>>>>>> origin/v5-next // The nullifiers array contains the protocol nullifier and the private call's nullifier. assert_claimed_length_array_eq( pi.end.nullifiers, @@ -105,11 +128,22 @@ fn with_everything_non_empty() { builder.assert_expected_public_inputs(pi); let scoped_protocol_nullifier = create_protocol_nullifier(builder.tx_request); +<<<<<<< HEAD +======= + let protocol_nullifier = compute_siloed_nullifier( + scoped_protocol_nullifier.contract_address, + scoped_protocol_nullifier.innermost().value, + ); +>>>>>>> origin/v5-next assert_eq(pi.min_revertible_side_effect_counter, 98765); assert_eq(pi.fee_payer, builder.private_call.contract_address); assert_eq(pi.expiration_timestamp, 7890); assert_eq(pi.is_private_only, true); +<<<<<<< HEAD +======= + assert_eq(pi.claimed_first_nullifier, protocol_nullifier); +>>>>>>> origin/v5-next assert_eq(pi.claimed_revertible_counter, 567); let note_hashes = builder.private_call.note_hashes.storage(); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail-to-public/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail-to-public/Prover.toml index 178e18152804..aeee8276254b 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail-to-public/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail-to-public/Prover.toml @@ -1,8 +1,13 @@ +<<<<<<< HEAD expiration_timestamp_upper_bound = "0x000000000000000000000000000000000000000000000000000000006a4e6691" +======= +expiration_timestamp_upper_bound = "0x000000000000000000000000000000000000000000000000000000006a3539c0" +>>>>>>> origin/v5-next [previous_kernel.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000000" sibling_path = [ +<<<<<<< HEAD "0x20361d4536b87452933ffd4edbbee2bbebc473756f855dbc9c50430dc90e06e1", "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x184b5bd70e7ce9f55c481997dde05a2b5339ed8dda451f0e0ae054b23ace7524", @@ -10,10 +15,20 @@ sibling_path = [ "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x09c339087ee7b7b02e1fff9d41a76ce2dd6e0deb11cf8c5df122c2aac8173d4b", + "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", + "0x13f9a8d08efd2722a8bc792810740ccdf5a9fd9f54163fa7e8dfd50c83089abe", + "0x0caf715321e53b2ad3d2ce035f8912152190fdab2df8b651de5d727ff976b2ce", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [previous_kernel.vk_data.vk] key = [ +<<<<<<< HEAD "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000022", "0x0000000000000000000000000000000000000000000000000000000000000079", @@ -81,10 +96,48 @@ sibling_path = [ "0x000000000000000000000000000000000008970932424dbe3fe5617b47285695", "0x000000000000000000000000000000505e55743221df56e4292330bd578247ab", "0x0000000000000000000000000000000000215afdeadc1b47e9dd2a7ef5e6eadc", +======= + "0x0000000000000000000000000000000000000000000000000000000000000010", + "0x000000000000000000000000000000000000000000000000000000000000001a", + "0x0000000000000000000000000000000000000000000000000000000000000097", + "0x000000000000000000000000000000630499c298b5aac757ec0c58797636e2e4", + "0x00000000000000000000000000000000001b3c006c84636f6e154f8fc8b4f6a9", + "0x0000000000000000000000000000009b607435c7443c0c04ff6b42c9d24338ff", + "0x00000000000000000000000000000000000765c87c6c9902c82541d5619946a7", + "0x000000000000000000000000000000dacb8488d027fb269cb42d120ecdc8cf89", + "0x0000000000000000000000000000000000042284c392d902d685153df0cf2adf", + "0x000000000000000000000000000000cecf5da7507add6e5662857426f1d3924e", + "0x00000000000000000000000000000000000250f36fad283ee705e68a484d0067", + "0x00000000000000000000000000000016be40fb218b2ef86e670c426048f51dbc", + "0x00000000000000000000000000000000001d23e0081eaaa0a09d9249cb85f658", + "0x00000000000000000000000000000051500bddfd6cbd3297b80ffa7b6602ba26", + "0x0000000000000000000000000000000000121a5bce048ff3de328b5050b44e34", + "0x000000000000000000000000000000a48172d6b79840cc34eaab016f5e24d4b4", + "0x000000000000000000000000000000000015c5682f89f5afed4fb8739f1fe87b", + "0x000000000000000000000000000000c4dcffdc6ea6ca246f4fdd36c475ad9b00", + "0x00000000000000000000000000000000000f3a66c9faf8fe71251596d4ced3a1", + "0x000000000000000000000000000000039d4f80deaa2807b04ab5be457ceb1b92", + "0x000000000000000000000000000000000000a6adf65a6c9d9f51750478b0b85f", + "0x00000000000000000000000000000082dae91597e001d2e2e2de11c45668dbfa", + "0x000000000000000000000000000000000009e6a574dc8f587596e7c703e06a2c", + "0x000000000000000000000000000000b025b2e8d6336864e490da7e9a7efa1bfc", + "0x0000000000000000000000000000000000260718fcafc5cb764401ea158559c7", + "0x00000000000000000000000000000056ac41b8209b6f0b11eefd4de42d382ed4", + "0x00000000000000000000000000000000000b14c6a94350e7e2db3562abada454", + "0x000000000000000000000000000000fd3b5cec918a72f23999f17272abafe2ac", + "0x000000000000000000000000000000000019860add2aa71a6b049771a9fe3b06", + "0x000000000000000000000000000000f99cfd172dc62aa1e6b7039208fec23640", + "0x0000000000000000000000000000000000006d68c8e5325a5f4a2f5163a3bccd", + "0x00000000000000000000000000000021a0304c796b6e3f945a8ca60f3882d79a", + "0x00000000000000000000000000000000002c8e749a107ec14f895a3e2c6744c4", + "0x000000000000000000000000000000a2e458da57a4f2cb011d007f4d19221833", + "0x0000000000000000000000000000000000142a93a5f1cece4af06a9ff57c7a2c", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000019a14386d8187b321265453c2a71491aca", "0x000000000000000000000000000000000001f3f693f07c6b73eef980e8abb34e", "0x000000000000000000000000000000cd426b3ab931f4080dd4956e7f22315ea9", @@ -109,6 +162,84 @@ sibling_path = [ "0x0000000000000000000000000000000000276bb7524d64c21da40bffb1f500c5", "0x00000000000000000000000000000042fad59e4ec9d280ab25c0dd496f9c5063", "0x0000000000000000000000000000000000238e47f6f48259940a4c31e3b5beaf", +======= + "0x00000000000000000000000000000034a0357d1d5e96307ea5d7b3cbbe692ce9", + "0x0000000000000000000000000000000000206ebcf842e71f3debc18ae539a687", + "0x0000000000000000000000000000009fd56f4199eb11516c5882c5291e38c28e", + "0x00000000000000000000000000000000002f3424c2b73968845404cf152d7e45", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000005263164ed7e108c8b6b0e2cadad6588c1f", + "0x00000000000000000000000000000000001b24e4b52cac6c83969f5bbffd62c5", + "0x0000000000000000000000000000001246f50136c65f301f92aa5e4546f063f2", + "0x00000000000000000000000000000000001654c2c85cb3002e5f147646bb8ff8", + "0x000000000000000000000000000000e3f54ffcfcd4c58ac3fcc70ab39cdb26af", + "0x00000000000000000000000000000000001e3c016fc1f713f0f644a201a72cde", + "0x000000000000000000000000000000bc12ba6b24c17cefa3758fb875a7917825", + "0x00000000000000000000000000000000000e09866d21287269aea13e2708efa7", + "0x000000000000000000000000000000b3fc0d391473a5c47336b7894d0bb5afe1", + "0x00000000000000000000000000000000002db8c169de4ef18c31e9db2734dae2", + "0x000000000000000000000000000000401a7139ea0a492fb02068b155ab5cd5ed", + "0x0000000000000000000000000000000000269fe41027d1e834d15e659cb725cd", + "0x00000000000000000000000000000023d00fbdf61e4de0d63e284293287c6a1a", + "0x00000000000000000000000000000000001622e447981d87a4a5662d4f3fb7b8", + "0x000000000000000000000000000000635b2fe5dd28e2684b3ec2fee2c8d7d5d6", + "0x00000000000000000000000000000000000460879a2577fde283cc2e05f2de22", + "0x000000000000000000000000000000f96ad4b36100a174ba8d5036ed28bc9026", + "0x000000000000000000000000000000000018f1ca0cf054dfc47cd2bd3c0b6248", + "0x0000000000000000000000000000004326bc5a5224e04d72c22655055d2066da", + "0x00000000000000000000000000000000001f818b859bb68dfeec75fc924b8e65", + "0x00000000000000000000000000000088a359554886fdb9722998f88548581c27", + "0x00000000000000000000000000000000001f4851b169b4b1aa85fa8a1182a322", + "0x000000000000000000000000000000c6225ae48546668486d126fd9dee331947", + "0x000000000000000000000000000000000008adf944bca2baabb0e7f8b2b88721", + "0x00000000000000000000000000000055946f0918449237bddfacbdf5d2c3e1de", + "0x00000000000000000000000000000000002076b2f02d52f63c918c40401e38dd", + "0x0000000000000000000000000000007423232164f93466db96d0c6daacb38499", + "0x00000000000000000000000000000000000f322f04cb94b9da05e437711fdcee", + "0x000000000000000000000000000000667ce8221a0514b78f81dc1e1542e7eaed", + "0x0000000000000000000000000000000000030aaae221707c1b1908d4021fcfdb", + "0x000000000000000000000000000000593c10692882e1d91867a03136ee957a0d", + "0x0000000000000000000000000000000000081e616516f29c37a3f16c572ab365", + "0x00000000000000000000000000000093011657c0982d0811cc8a9ad1d4c6812a", + "0x000000000000000000000000000000000027edce1b59b8ff04719869928a3831", + "0x000000000000000000000000000000bc1b8f5f35aa93d64de62378aa3a0ade5f", + "0x0000000000000000000000000000000000128ea43e13143f3b21b8d3074a0ca5", + "0x00000000000000000000000000000076cf1dcafc997c925ee807024cddd0e45c", + "0x0000000000000000000000000000000000161695f8b6a7f03198d8ee9599d82f", + "0x000000000000000000000000000000a037b0b013e89e4ef68f90b07437236358", + "0x0000000000000000000000000000000000126e9bfca50a64eeb3fe328d2b486d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c621b7bb99e0ec66007ad2062a0f3c42e0", + "0x000000000000000000000000000000000002bb6dfa07cd3029565f9eba7c182a", + "0x00000000000000000000000000000094f457a63f08287ac3e642b2bd69422d68", + "0x0000000000000000000000000000000000165059367f4442d6c3ff6015cbfa98", + "0x000000000000000000000000000000052b21c4e4b1c3048134330ea6e10e8762", + "0x00000000000000000000000000000000002bbf5c4af5ff9953fe94a2fd3b348f", + "0x000000000000000000000000000000c86a369f07f87deadbb6d414c1d5d32af5", + "0x00000000000000000000000000000000002bc114424ce2d70afd13d7f777cc13", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -145,6 +276,7 @@ sibling_path = [ "0x000000000000000000000000000000000029371ef1a94251e6da6837742338f1", "0x000000000000000000000000000000bbf418b4a13276af200016de44259b9024", "0x00000000000000000000000000000000002d4e1fd05bdeb8a9f453b552e62451", +<<<<<<< HEAD "0x00000000000000000000000000000099e15f131999b4f2aae504a533fb2a562b", "0x000000000000000000000000000000000029a3d5b3c86e003de740510d01bab9", "0x00000000000000000000000000000069cccc83a391da05aca2c5ec73bc63c239", @@ -212,17 +344,99 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + "0x0000000000000000000000000000002be2d6ed7927c28b354ca19944d0e2ce1f", + "0x00000000000000000000000000000000001e60dac4b0d3020381d02198857a60", + "0x0000000000000000000000000000003ef96369ef839726bd87d4039f692d4698", + "0x00000000000000000000000000000000002aac9a586bd31a98f21374dbbf8415", + "0x000000000000000000000000000000857d4c1cc2ae017514451fa49ff3624a2a", + "0x0000000000000000000000000000000000221128358179bcd5025dcce9bbecc5", + "0x000000000000000000000000000000641d40873c2e48aebd13f64df60ef2ac9a", + "0x00000000000000000000000000000000000aa2240977a63ca00ee488777b88b6", + "0x000000000000000000000000000000fc2595ff1308e8425bf95d6e465c2b5301", + "0x000000000000000000000000000000000011f077e656f1c2ed0f9f42d3744486", + "0x0000000000000000000000000000006274abf31d4104dc31015bb3053fc1b6bc", + "0x000000000000000000000000000000000018b513f8a6390a3d24660117497d6b", + "0x0000000000000000000000000000007fee752f860901c965bbfa7393df48126c", + "0x000000000000000000000000000000000023089a101f3563a55f95cfcde37fd9", + "0x000000000000000000000000000000b1e2f3e5872b0bf730ee7bb369213e9dd8", + "0x0000000000000000000000000000000000292d7f99f708f8565389d7a44f2436", + "0x000000000000000000000000000000b2a6b31880cd7ab9851623edb27e31babe", + "0x00000000000000000000000000000000002095d708706f6fb9216edd756e9212", + "0x000000000000000000000000000000fe5af5eec694a4b1bfa967fdfd638079f3", + "0x000000000000000000000000000000000024aac8b293a5411e03812933c17199", + "0x000000000000000000000000000000eb5cdd9a364feded40d30d77c297b6692c", + "0x00000000000000000000000000000000001bc81f190832c055b59db2067830f8", + "0x000000000000000000000000000000830e2b1cc73b12e49ca42b066fa1975b1e", + "0x00000000000000000000000000000000000e879ee77098324171b8b5c977cecb" +] + hash = "0x0793a9a6766f6ada68202d908a968849760a8815dc72ef543b8a2359e8bd0bff" + +[previous_kernel_public_inputs] +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3547cf" +is_private_only = false +claimed_first_nullifier = "0x02561e4f8664bc0d3a511f46ff6de210cfb9fabb320bdc418a81e87627ba66fd" +claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" + + [previous_kernel_public_inputs.constants] + tx_request_salt = "0x2deeb4d4a9cfc5a97e7403c4d21745f34e0c7971e29c38ac4a473bacbd10cac2" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + + [previous_kernel_public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1aaeed4c11c3e7fa8a93129d7f3707e7605903311cba3848329dae1c3b0cf3a9" + total_fees = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000076174" + + [previous_kernel_public_inputs.constants.anchor_block_header.last_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x124cd544544b7f37f6d0d47e10405426703025b9748121b7a589d0a5abeec954" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x08998dafcb63bcf7ba50df6cf0a5d63312da2905dfa9299f35647b7da5aec0e4" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1c5e03d4e13dede5c5920834675dcb617ac20e588f18fab52ab46c975ad1178a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000009" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000026" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f650" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [previous_kernel_public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -234,13 +448,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000026beca776" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001e25b7c050" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] @@ -248,6 +467,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -2526,14 +2754,18 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers] -length = "0x0000000000000000000000000000000000000000000000000000000000000001" +length = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] counter = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] +<<<<<<< HEAD value = "0x2da78257e66fc732e71d5ddfd2ab16eb84cfc4220b517d75861a690d5191fe40" +======= + value = "0x0ff9633094c762019bb83264f5a779c688cf082f976e6081dbd79a358cd349e2" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] @@ -2541,14 +2773,14 @@ inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" + value = "0x2fabb6817e726dbf99ee3c578c44edbd9ad27873d4f35723130306e214021d2f" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] @@ -5348,6 +5580,7 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.public_call_requests.array.inner] is_static_call = false +<<<<<<< HEAD calldata_hash = "0x1e004378189a0564352e18e6db807d94779451300dd370aa535cf194958fc226" [previous_kernel_public_inputs.end.public_call_requests.array.inner.msg_sender] @@ -5355,6 +5588,15 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.public_call_requests.array.inner.contract_address] inner = "0x0f399603cd563c9339da6883c141bae61ae4ff0876ffecf0a635bced859c1477" +======= + calldata_hash = "0x18f4b3d172e1777e88e160b6877108e8ac1ed0283da06f722328e01c6ea9cb43" + + [previous_kernel_public_inputs.end.public_call_requests.array.inner.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [previous_kernel_public_inputs.end.public_call_requests.array.inner.contract_address] + inner = "0x0df0497790c45b5d6e6e431b8574719cc4113fa266765361666547e6c59fd0ba" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.end.public_call_requests.array]] counter = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -6061,7 +6303,11 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [padded_side_effects] note_hashes = [ diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail/Prover.toml index 7894bd39595d..d7763997e3ab 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset-tail/Prover.toml @@ -1,8 +1,13 @@ +<<<<<<< HEAD expiration_timestamp_upper_bound = "0x000000000000000000000000000000000000000000000000000000006a4e64f9" +======= +expiration_timestamp_upper_bound = "0x000000000000000000000000000000000000000000000000000000006a353834" +>>>>>>> origin/v5-next [previous_kernel.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000042" sibling_path = [ +<<<<<<< HEAD "0x2991395cdbfa0bb26f6bf65788efaf75820a4858e82714e64935c63ca2d41aa2", "0x1f4bb9de861fdd5bf2a14822208ed533e9cf5599c37128a8eaf42d4941ab38f4", "0x0d6cb1acef9f52409c57d51b6d5bac8411233d2b4a9c2e7f6e429d2ba730da26", @@ -10,11 +15,21 @@ sibling_path = [ "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x2e3593797cc16fcb2c05bbe5fafeaf2af9a5e43ec232531ef131d235491ea5f8" +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00b4880ea7bd70d039f02ba470880b743dd51130243ede7c6a55dfc15c637a89", + "0x19f7254ca1fbe21a5365d909abcdee8c97128326f9a86cf8396744a2133a019a", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", + "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", + "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", + "0x270777209d6085fa91aff38fc5996d039459d010d31cf5561ac415a7653001fb" +>>>>>>> origin/v5-next ] [previous_kernel.vk_data.vk] key = [ "0x0000000000000000000000000000000000000000000000000000000000000011", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000022", "0x0000000000000000000000000000000000000000000000000000000000000185", "0x00000000000000000000000000000074ae54f800396eab46d052cf24077f371d", @@ -81,10 +96,47 @@ sibling_path = [ "0x0000000000000000000000000000000000069a19660958f2bc3138d6ad48fd03", "0x0000000000000000000000000000005cf39862d4f22f267883468ebc0156d6c2", "0x0000000000000000000000000000000000293c0a4429d980b11f833bfd02c724", +======= + "0x000000000000000000000000000000000000000000000000000000000000001a", + "0x00000000000000000000000000000000000000000000000000000000000001d7", + "0x00000000000000000000000000000073d1b06ca958139d8167bf91fec65717a3", + "0x00000000000000000000000000000000002126797b975ba906ece5576c3c44e5", + "0x000000000000000000000000000000d13dd564f9ca6e1e301fb505ab3904f312", + "0x000000000000000000000000000000000028ef474a3724e2aca9694d9b86913e", + "0x000000000000000000000000000000b0e621733c9b33ca4cd72c587c38865468", + "0x0000000000000000000000000000000000214d086476e52575eb897b52715244", + "0x00000000000000000000000000000098ea296886c59341a423261766a71bfe18", + "0x000000000000000000000000000000000023ecfde1cb1be6573985d344e0d468", + "0x000000000000000000000000000000f6426af45d639e6d4255f2a9a9880feb41", + "0x00000000000000000000000000000000002b922707ac305d546efa8132622e1c", + "0x000000000000000000000000000000b5d28c6921adefc75a20f37b59e6a6029d", + "0x00000000000000000000000000000000002bed8fea956bccb1e9b7a077cd9450", + "0x00000000000000000000000000000095dc4663d5852975f48fabf9adb97087c1", + "0x00000000000000000000000000000000001aea4366012d283c078d0ac031d2ed", + "0x00000000000000000000000000000002d3235d1820960d0e28dd0cee2bca4e19", + "0x00000000000000000000000000000000000f9f77ba19e1877dbfc1d76efef24a", + "0x0000000000000000000000000000005132fa00adb3028f32a801a15fecef441b", + "0x00000000000000000000000000000000001882a6e9f5bdcd35be9b0376c4e8cc", + "0x0000000000000000000000000000005bfca542a5a3bfb4b0c0fba79a84d0cb8b", + "0x00000000000000000000000000000000000e9dbbe628d433c501a0a5e7e43e85", + "0x000000000000000000000000000000cf6beb70b25cbbf6b74d8badca8b8fd597", + "0x00000000000000000000000000000000001327ca88b0ae4b307fd1724ba60846", + "0x000000000000000000000000000000f5b42fbed0e6d14165bd9a831ce6c33c75", + "0x00000000000000000000000000000000002e8a819bbe9959e047afa046cd7dde", + "0x000000000000000000000000000000cab1e6a5839407a39eb2591509ff3f944c", + "0x000000000000000000000000000000000004568d7f758ddcb72a67c3979d0539", + "0x0000000000000000000000000000003902cce6f097ccfb94346d6d62f3c725d3", + "0x00000000000000000000000000000000002e8293f0f67cdf9a664ba023c07540", + "0x0000000000000000000000000000006da09b54ab84dea06f68d9ced194b7e82b", + "0x00000000000000000000000000000000002f9324981442bb3b155a3bdbf8ae33", + "0x0000000000000000000000000000004a8980b979751146a4e5b0301a78c34ae4", + "0x000000000000000000000000000000000024ce9985e1962c86c17373e9ba0450", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000044dd148bdde478315082503efd20b382ac", "0x0000000000000000000000000000000000047ce3fcb57e48cab2d0221a211371", "0x0000000000000000000000000000006af02c5ea4768956dfd1168331ec77d57c", @@ -109,6 +161,84 @@ sibling_path = [ "0x00000000000000000000000000000000001f9e61366ea547d5daa00f685d8db7", "0x0000000000000000000000000000003696213ab2138f155c6736265c1f680aa9", "0x00000000000000000000000000000000002e1c7b540fd17e0242e90d77152dfb", +======= + "0x000000000000000000000000000000da121444ba2806c6ab4b718917ea093ba2", + "0x00000000000000000000000000000000000976720b7a5546f2043313856dfaa0", + "0x000000000000000000000000000000f5982ebcb8625898d63b92c5662e8ee8d1", + "0x0000000000000000000000000000000000226429ff9b8a9f0e22a88935367f24", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c880cf1be0493c6194d60d935eed1cb818", + "0x0000000000000000000000000000000000027d1a2007f0f0dc183dd028a39be8", + "0x00000000000000000000000000000077d14a4346a1901681a97cf78905f86e9a", + "0x00000000000000000000000000000000001d3fde87f3cd78454200b0c765ddfe", + "0x000000000000000000000000000000ae9df27601210c2d41198c2021c8cede89", + "0x00000000000000000000000000000000001a6697d9258df3ac98fe702233d038", + "0x000000000000000000000000000000b7e17f6f780a9f4964642711b53b87e65b", + "0x0000000000000000000000000000000000207bd6065d1761d0a69d84514754c5", + "0x00000000000000000000000000000051fa0e50ff7bd56d13e91975fecdecccf5", + "0x00000000000000000000000000000000002aa0b85fa6bc1cf1ac78e78b2a0628", + "0x0000000000000000000000000000008edbd5b4aa6b11c72af6dd6d1550751169", + "0x00000000000000000000000000000000000ecdf0c5214ece4539683d98786aaa", + "0x000000000000000000000000000000ba52345a3075f6d4a8dcf81c54da751061", + "0x000000000000000000000000000000000007dfcc3a1157261646dc806e2674aa", + "0x00000000000000000000000000000072ac9c8248791c4191194d7d83b5ae825d", + "0x00000000000000000000000000000000000631c1d2e946b37ebc3d2ed6967053", + "0x00000000000000000000000000000085c17e14518bfaf45b59d7a298425f368e", + "0x0000000000000000000000000000000000149d685821d324336c7b4619d55380", + "0x000000000000000000000000000000b0bc011a0bba87800ed9a87d6805fb4fff", + "0x000000000000000000000000000000000005f349f04c0111881e048987bf674a", + "0x00000000000000000000000000000082e0a9b882c766993cb265ba143bd62a83", + "0x00000000000000000000000000000000002e9c2907939bb2ef9d4118785ddc9a", + "0x000000000000000000000000000000b8ef091d2194ca0cc8bd7eca4b3430506a", + "0x00000000000000000000000000000000002eddc6e1a655625f67a6c9abae658b", + "0x000000000000000000000000000000607dc66dcf4454b4bb5b23a1041ff3528c", + "0x0000000000000000000000000000000000000f06f7f7be209e35bf1e45251eb6", + "0x000000000000000000000000000000485b3552db58113dff3f9353e23f1692c0", + "0x00000000000000000000000000000000000fe06fd48231c5ae76ddc0d31594a7", + "0x000000000000000000000000000000ba483dbd5eeada62315810b0ba7514c8f6", + "0x000000000000000000000000000000000007f37aac70c908572d9022ceb99603", + "0x000000000000000000000000000000d0c2ac15e9bbeb074b1de4c515b178948b", + "0x0000000000000000000000000000000000225f348cdc306475e64baf99130edd", + "0x000000000000000000000000000000349e9c2cabce425d6966a3f7fea4adb0b2", + "0x000000000000000000000000000000000009d744462cce9031b283bc66cd6c6d", + "0x000000000000000000000000000000d711584ba3bbfb921d239848e64a823393", + "0x0000000000000000000000000000000000177f36ab710bffc094e5dacd513533", + "0x000000000000000000000000000000eefcce09cd91de6deb34ba07c107282627", + "0x0000000000000000000000000000000000175186e4891c051356bb735532cd62", + "0x00000000000000000000000000000040970b3a4a09922ea6a291d4429d753e5e", + "0x00000000000000000000000000000000000fee4185b0b9e01bf8f93e2253d858", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000c900042c9ed8a48bb6e3c9af6ffa308861", + "0x00000000000000000000000000000000002aa863c11da077ad80f9bcee485879", + "0x000000000000000000000000000000313fe878de14c91d3b2228fca5d2a574f4", + "0x00000000000000000000000000000000002286bd14cd48c9ab24133f2c8946d7", + "0x000000000000000000000000000000b5253f03cdfa905928bd47c6042344a9bd", + "0x000000000000000000000000000000000008c83bdaa8db01eb7a6cfc534eed73", + "0x0000000000000000000000000000005b5c454e71c977a0c19e4e155062788ee1", + "0x00000000000000000000000000000000000fb51341fabba1e9f33b44e6b209e0", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -129,6 +259,7 @@ sibling_path = [ "0x000000000000000000000000000000000029a83ea434304b513f8b795bbe773b", "0x000000000000000000000000000000443b827921e4f72867c7ae6d21c81ae2a8", "0x0000000000000000000000000000000000055653b3821a804a0d07f285c30620", +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -141,10 +272,13 @@ sibling_path = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +======= +>>>>>>> origin/v5-next "0x0000000000000000000000000000001409391ea53890220ff69ed9e3b8a27d0a", "0x000000000000000000000000000000000029371ef1a94251e6da6837742338f1", "0x000000000000000000000000000000bbf418b4a13276af200016de44259b9024", "0x00000000000000000000000000000000002d4e1fd05bdeb8a9f453b552e62451", +<<<<<<< HEAD "0x0000000000000000000000000000005943694bebc6d7b1eb718cc952c056cbe9", "0x00000000000000000000000000000000000fcd31539936ee60a4b8e7fd85cefd", "0x0000000000000000000000000000002aeb405405e62b121a560b87677a4a25d2", @@ -212,17 +346,99 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + "0x0000000000000000000000000000008269da88a88363e62cadda42646c79117c", + "0x0000000000000000000000000000000000099f6865b246c83931cb96a0280314", + "0x000000000000000000000000000000f21d50e6f56f0aa0b3c2c683fa3199abd9", + "0x00000000000000000000000000000000000f9bf02cc49b7c152565f32827e713", + "0x0000000000000000000000000000005be998c93b183fae6bc6657a10ce35b5e9", + "0x0000000000000000000000000000000000028c21e3458f36987b075523eecaf1", + "0x00000000000000000000000000000044970c3d35f9dec99ff26b9f5eca572768", + "0x00000000000000000000000000000000001754b7d3785919b0668cb5dc6764b8", + "0x0000000000000000000000000000002341f73b9500775f43bebcccd873ae259c", + "0x00000000000000000000000000000000001ec8799d03b338440f410081d2af93", + "0x0000000000000000000000000000003d65e2f6d2070f06e0874aee4e42982d65", + "0x00000000000000000000000000000000000f8b1959d00f9240a1925a0ba60a30", + "0x000000000000000000000000000000fcb77a6a3d49a608d2feb71070fcbfa383", + "0x00000000000000000000000000000000002b540873492f970574f06ea963c5a7", + "0x000000000000000000000000000000154794f2eb4af57f2d9891f009caa5b1cb", + "0x000000000000000000000000000000000022496898264db1a662d1da9b76853c", + "0x0000000000000000000000000000009781a63b3bf5feea08b5f4a41aad6e7508", + "0x0000000000000000000000000000000000034ed420fe9d303e85e8bb49611198", + "0x00000000000000000000000000000034213a15cc236292e5f3139dfbb49927a1", + "0x00000000000000000000000000000000002fbc95d4c5cfeaa0dd028e9d207cc1", + "0x000000000000000000000000000000f1f33089a3d77064f38b920e6547f39d27", + "0x000000000000000000000000000000000004562cbf7cb2cf1e88dc9bf8334970", + "0x0000000000000000000000000000001f4693d36ba567b35d3c35fbdb35d85206", + "0x00000000000000000000000000000000000f5050319e01538cc44b3963741543" +] + hash = "0x00b2a15ea3c1ba1d6b38d87b2e0a8a01d0dc286fddb088eafc01a34aef0e1a04" + +[previous_kernel_public_inputs] +min_revertible_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" +expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a354643" +is_private_only = true +claimed_first_nullifier = "0x2cf7c5914b1b832c41d256a7bb0eeee95eb11bb95c73c4dfb76187bb96a2de28" +claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000004" + + [previous_kernel_public_inputs.constants] + tx_request_salt = "0x2deeb4d4a9cfc5a97e7403c4d21745f34e0c7971e29c38ac4a473bacbd10cac2" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + + [previous_kernel_public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [previous_kernel_public_inputs.constants.anchor_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[previous_kernel_public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [previous_kernel_public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [previous_kernel_public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -234,13 +450,18 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +<<<<<<< HEAD inner = "0x0b04735687679b0b2f7b59d490a280911b4e89cb023228c0b1317718c8227aa8" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] @@ -248,6 +469,15 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[previous_kernel_public_inputs.constants.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -793,7 +1023,11 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" [[previous_kernel_public_inputs.validation_requests.nullifier_read_requests.array]] [previous_kernel_public_inputs.validation_requests.nullifier_read_requests.array.inner] +<<<<<<< HEAD inner = "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d" +======= +inner = "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e" +>>>>>>> origin/v5-next counter = "0x000000000000000000000000000000000000000000000000000000000000000a" [previous_kernel_public_inputs.validation_requests.nullifier_read_requests.array.contract_address] @@ -2526,14 +2760,18 @@ counter = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers] -length = "0x0000000000000000000000000000000000000000000000000000000000000003" +length = "0x0000000000000000000000000000000000000000000000000000000000000004" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] counter = "0x0000000000000000000000000000000000000000000000000000000000000001" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] +<<<<<<< HEAD value = "0x0a956a8bcf13acaaa042b090b03ddb8bc335829a551a56c18d9aea6cfa40165d" +======= + value = "0x23b9b0a56139db82e79251221a2e2a8004ea2ea1cc03691452e6d7a82470b5ad" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] @@ -2541,36 +2779,47 @@ inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] +<<<<<<< HEAD counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] value = "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d" +======= +counter = "0x000000000000000000000000000000000000000000000000000000000000000e" + + [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] + value = "0x03c6fe68835b61ed8cf80ddff38714af3843e2defdd9302a6dbd9d8dcc9a1b99" note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000001" +inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x000000000000000000000000000000000000000000000000000000000000000b" +counter = "0x0000000000000000000000000000000000000000000000000000000000000006" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" + value = "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000002" +inner = "0x0000000000000000000000000000000000000000000000000000000000000001" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] -counter = "0x0000000000000000000000000000000000000000000000000000000000000000" +counter = "0x000000000000000000000000000000000000000000000000000000000000000b" [previous_kernel_public_inputs.end.nullifiers.array.inner.inner] - value = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD + value = "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b" +======= + value = "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe" +>>>>>>> origin/v5-next note_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.end.nullifiers.array.contract_address] -inner = "0x0000000000000000000000000000000000000000000000000000000000000000" +inner = "0x0000000000000000000000000000000000000000000000000000000000000002" [[previous_kernel_public_inputs.end.nullifiers.array]] [previous_kernel_public_inputs.end.nullifiers.array.inner] @@ -3352,10 +3601,17 @@ counter = "0x000000000000000000000000000000000000000000000000000000000000000c" [previous_kernel_public_inputs.end.private_logs.array.inner.inner.log] fields = [ "0x174c6b3d0fd14728e4fc5e53f7b262ab943546a7e125e2ed5e9fde3cf0b3e22f", +<<<<<<< HEAD "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x1e495537a58fe255952a20bc319ebbf9d5eb2bc2692addbee2f6f97f946eae28", "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d", +======= + "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x24ffcddc6d00c53f277dbe2482d23f64c62bbd6a18ac7952010c0287a8a52b48", + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x14fbaeaeddaa69be81d404c684e78e9f1a786d225faf8de2ce97c92f67d89a26", @@ -3365,7 +3621,11 @@ counter = "0x000000000000000000000000000000000000000000000000000000000000000c" "0x082c6d164b0ba073c9dd911100248c8ecd80b03f82f38531856a3c16dadcbef0", "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356", "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496", +<<<<<<< HEAD "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93", +======= + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000" ] length = "0x000000000000000000000000000000000000000000000000000000000000000f" @@ -5334,7 +5594,11 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000001" counter = "0x0000000000000000000000000000000000000000000000000000000000000007" [previous_kernel_public_inputs.end.contract_class_logs_hashes.array.inner.inner] +<<<<<<< HEAD value = "0x26c5fadd46f22f0332e40a9bab5d3386fbc05a6363b70aad1822680da2a2ae3a" +======= + value = "0x16b2f367024e4bc2195b21dac27a4594449c0bc4c6048b2bcdffe9794b3342ea" +>>>>>>> origin/v5-next length = "0x0000000000000000000000000000000000000000000000000000000000000067" [previous_kernel_public_inputs.end.contract_class_logs_hashes.array.contract_address] @@ -6061,7 +6325,11 @@ length = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [previous_kernel_public_inputs.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [padded_side_effects] note_hashes = [ @@ -11703,7 +11971,7 @@ hint_index = "0x0000000000000000000000000000000000000000000000000000000000000000 [[hints.nullifier_read_request_hints.pending_read_hints]] read_request_index = "0x0000000000000000000000000000000000000000000000000000000000000000" -pending_value_index = "0x0000000000000000000000000000000000000000000000000000000000000001" +pending_value_index = "0x0000000000000000000000000000000000000000000000000000000000000002" [[hints.nullifier_read_request_hints.pending_read_hints]] read_request_index = "0x0000000000000000000000000000000000000000000000000000000000000040" diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset/Prover.toml b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset/Prover.toml index 8164b053bbb5..c734624404f1 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-reset/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-reset/Prover.toml @@ -173,8 +173,13 @@ is_private_only = true claimed_revertible_counter = "0x0000000000000000000000000000000000000000000000000000000000000005" [previous_kernel_public_inputs.constants] +<<<<<<< HEAD tx_request_salt = "0x0b99e25732f2e402efc6ae9612608eb7daf1e0e02f9a5b900ac876ce4f6ad96a" vk_tree_root = "0x2bf5085c122d9f6778f1037b7f72210721ea2d9cbae355e192413db78dd8071a" +======= + tx_request_salt = "0x2deeb4d4a9cfc5a97e7403c4d21745f34e0c7971e29c38ac4a473bacbd10cac2" + vk_tree_root = "0x19e707b1c27292672391666e89b1deeeb36ab5bf508efef4f021df37bc224a21" +>>>>>>> origin/v5-next [previous_kernel_public_inputs.constants.anchor_block_header] sponge_blob_hash = "0x2267591c902f44ddeeba0aca5d82fe15bfd698c09f87cace3596335ef3329b3c" diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first-single-tx/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first-single-tx/Prover.toml index c442ddae4801..5c8777460d14 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first-single-tx/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first-single-tx/Prover.toml @@ -28,10 +28,17 @@ new_l1_to_l2_message_subtree_root_sibling_path = [ "0x0aced6fe68143f4c7acd16345a8c1bb50c51a0692b760eb48728feb923d90757" ] new_archive_sibling_path = [ +<<<<<<< HEAD "0x049956c594a170be3bf34aa7c0365893406beb1ac5ee53f9e26797bc0b6c7a56", "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x14e4b977b2203b70e6ee1c2456eb7114d090fe4b907f631eecd0919fed432e7d", "0x09308d0807f5aed64dd43d2014519a161c32f9a52ea75992cc18bec0bcde410e", +======= + "0x219a9b1fd028b19d4a091750909e499c7f5a55998a0971116e9927b72b6c1af0", + "0x0a6a21304aaa7d05b29b19ffc4ea8c9d3c88659720df8b59b14b5d4c96302b53", + "0x259b5249d4fab01f19c77064c1d207066513197fdd4121f8f402f7b5ef7e0f0d", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", +>>>>>>> origin/v5-next "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", @@ -477,12 +484,17 @@ new_archive_sibling_path = [ [inputs.parity_root.public_inputs] sha_root = "0x00de7b349d2306334734e4f58b1302a6ed5a6c796a706f6597a5641b6d468223" converted_root = "0x0d04c63f36bd168215c9b09a227c7e8d3ad48e2f11b8202fd07c524bd30ee88f" +<<<<<<< HEAD vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" +======= + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" +>>>>>>> origin/v5-next prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" [inputs.parity_root.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000016" sibling_path = [ +<<<<<<< HEAD "0x005a4d59d6486e10a3eefab398cca5d3c8e89e178a566d9885c5d7e478e46338", "0x1fa32700cbe47fec502423d9419340fdfc6b73c146a1b1e42189b4dee5ddb4cc", "0x07250f720369414b8956bab70d3dbfbe4a5912f128405eedb1c920009dcea92c", @@ -490,6 +502,15 @@ new_archive_sibling_path = [ "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x0b6b857bc0072096c5f442c6ee032b6f5eaa4268d840dceed80c9e2dd9f6ba50", + "0x21255305e3d8915b8b5d7cd5d210c112df3715c3617743255c6c23115b78784f", + "0x128f959661b3a397777774398f0c5c902c9e3e57ff8c79bd341822053c32cb37", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.parity_root.vk_data.vk] @@ -1099,6 +1120,7 @@ new_archive_sibling_path = [ [inputs.previous_rollup.public_inputs] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD accumulated_fees = "0x00000000000000000000000000000000000000000000000000198e45581dc500" accumulated_mana_used = "0x000000000000000000000000000000000000000000000000000000000008992c" @@ -1124,12 +1146,40 @@ new_archive_sibling_path = [ [inputs.previous_rollup.public_inputs.constants.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + accumulated_fees = "0x000000000000000000000000000000000000000000000000025798918fcdec00" + accumulated_mana_used = "0x000000000000000000000000000000000000000000000000000000000008d7ac" + + [inputs.previous_rollup.public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollup.public_inputs.constants.last_archive] + root = "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" + + [inputs.previous_rollup.public_inputs.constants.l1_to_l2_tree_snapshot] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001000" + + [inputs.previous_rollup.public_inputs.constants.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000007" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000023" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f62c" + + [inputs.previous_rollup.public_inputs.constants.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.previous_rollup.public_inputs.constants.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollup.public_inputs.constants.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [inputs.previous_rollup.public_inputs.start_tree_snapshots.note_hash_tree] @@ -1155,6 +1205,33 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollup.public_inputs.end_tree_snapshots.public_data_tree] root = "0x2536a3212b711359308d274b8a92fa44465b6ce091dd9369c1331f1ffdeaa8ca" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + +[inputs.previous_rollup.public_inputs.start_tree_snapshots.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[inputs.previous_rollup.public_inputs.start_tree_snapshots.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[inputs.previous_rollup.public_inputs.start_tree_snapshots.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + +[inputs.previous_rollup.public_inputs.end_tree_snapshots.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000100" + +[inputs.previous_rollup.public_inputs.end_tree_snapshots.nullifier_tree] +root = "0x04b89693c560acc37f1128ecfbd9c925ee625ce93bb67552296b841d64a8f6f6" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[inputs.previous_rollup.public_inputs.end_tree_snapshots.public_data_tree] +root = "0x240338b183a6288d293ab1f4bc6b3473ca99c833c34c1c4349a492a6233bcb55" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" +>>>>>>> origin/v5-next [inputs.previous_rollup.public_inputs.start_sponge_blob] num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1175,6 +1252,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 squeeze_mode = false [inputs.previous_rollup.public_inputs.end_sponge_blob] +<<<<<<< HEAD num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000080" [inputs.previous_rollup.public_inputs.end_sponge_blob.sponge] @@ -1190,11 +1268,29 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x1a1440d4df7e4daf64ffa2db4bc1a07844c5992eb81b78c813b4fb385bbf32dc" ] cache_size = "0x0000000000000000000000000000000000000000000000000000000000000002" +======= + num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000081" + + [inputs.previous_rollup.public_inputs.end_sponge_blob.sponge] + cache = [ + "0x0000220902092d0e020900220902093c0e07082a0100010575fef108377c8a4f", + "0x003c0402012600000305072d0003082d0004092300000baa2d0108062d040609", + "0x00000008020800000902090c0008070a2400000a00000b982600000000000000" +] + state = [ + "0x0f07b60b2187f9baa0b540364e52e99afed882c8abc571733054f4400aa4c38d", + "0x03a36c12ba6d57cc18028c6f963b4841b3b84b8f6042b76076b4201e2965e2bb", + "0x1ff6f09837224ce958cf3d1a1d59cf4f4b3650d49077f07b956da1f84fd90e21", + "0x188be5bcafb757e942bb99ed6df850818b9c73027541a9e129f7982db058ad31" +] + cache_size = "0x0000000000000000000000000000000000000000000000000000000000000003" +>>>>>>> origin/v5-next squeeze_mode = false [inputs.previous_rollup.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" sibling_path = [ +<<<<<<< HEAD "0x1fc39d0a428c8536dbca551ea79848acf67d89d090fd8c643c7d90f2e8f32340", "0x12ce5a49a1ceca53ada7bee003f929bbd65abaa74e8072a81f304c2c96c44e31", "0x2dd71474f7775d87b6c2986ace5f654686583f0970d7400b1ccf8096dad131b5", @@ -1202,6 +1298,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x08e1bf5026afea79c199f336a0c22d16d92709e1dddd343a9f91f93f4423bdaa", + "0x0bf5f2bcd9c0361745fce3f1331dadcbb9e733ee2784ce608d6a63f26b90e373", + "0x23106dac33cae101c3ceb015fec7d795f24ed63e984917bdafcc48092586396c", + "0x0caf715321e53b2ad3d2ce035f8912152190fdab2df8b651de5d727ff976b2ce", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollup.vk_data.vk] @@ -1209,6 +1314,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000016", "0x0000000000000000000000000000000000000000000000000000000000000042", "0x0000000000000000000000000000000000000000000000000000000000000005", +<<<<<<< HEAD "0x000000000000000000000000000000165ae78531927a33f65caca2e363cc772e", "0x00000000000000000000000000000000001241b6b86155467b26edfdab7ad6fb", "0x000000000000000000000000000000b2d0f5b63f894b62d0e60089db80e58d27", @@ -1241,14 +1347,55 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x00000000000000000000000000000000002785f7e22fca9657887d9b32a7a423", "0x0000000000000000000000000000005691107b72691b16467cd087d930a639e9", "0x000000000000000000000000000000000026d6131e96f4a016e33fac0ba06f18", +======= + "0x000000000000000000000000000000a5b0bdba7f43a5ba543eccf85ba1ff12ca", + "0x00000000000000000000000000000000001855515fb685e8e418e96a319fe711", + "0x00000000000000000000000000000038944aaa9a48d5e18d5cf37c0b5e233a40", + "0x0000000000000000000000000000000000146ad226ae2c32db68bcfc090f2428", + "0x000000000000000000000000000000b68d680e0f7c271277bcff3e24eba99354", + "0x000000000000000000000000000000000011b59c1c2571432cae5ade01825426", + "0x00000000000000000000000000000023d1b746f7bdc13479ef4410306af3a85e", + "0x0000000000000000000000000000000000082cb3efa60cb06b2b0b7944a4913a", + "0x000000000000000000000000000000d969f4dd95758a8a3153278bef8a3649ee", + "0x000000000000000000000000000000000018044b9796b02a05ad4a78d4da7fed", + "0x000000000000000000000000000000929831e4b5b148fdd67cbce884cfbb2bc1", + "0x00000000000000000000000000000000002867ba39b2f397523784ec5229e4fe", + "0x000000000000000000000000000000fb6abacca3720a430b82e4badd59fad275", + "0x00000000000000000000000000000000002e8c31092bc5816b54fd5673132d90", + "0x000000000000000000000000000000cdac5dc30d61d0f39162a87b8a1ed4afa9", + "0x00000000000000000000000000000000002fce81d821a8d931534592ca04f835", + "0x000000000000000000000000000000257b5d0a4e7c6267192cd7c78d931e903a", + "0x00000000000000000000000000000000002a8454538056e7e89b275f35ebc07d", + "0x00000000000000000000000000000012c67986b9cde33816261a0c7b38341aa2", + "0x000000000000000000000000000000000023a7ff91a87d4e4477152409c5d308", + "0x0000000000000000000000000000009e7ff25a9df411d18faf503f54d964a873", + "0x00000000000000000000000000000000000523024b12bcc02534720170e846e5", + "0x000000000000000000000000000000bbf3edea5788ae8911124d50d357f628b1", + "0x000000000000000000000000000000000000a2223f1ee84187ae2471803ef17f", + "0x0000000000000000000000000000001305b133677f71ba90cd367c582a3c0fde", + "0x0000000000000000000000000000000000213a2dbbb2a6ab7f8eed07e7d06405", + "0x000000000000000000000000000000f2bcdfdc3f40a72970b8ea9e22abe37778", + "0x000000000000000000000000000000000000cd418b3d04c1479003635734e109", + "0x000000000000000000000000000000737110d0b6a1519312fb6fe5aa3c039cab", + "0x000000000000000000000000000000000027c4bc0c335ae48b035a27f825e674", + "0x0000000000000000000000000000006507beb1caaa5279601349587992439dc4", + "0x00000000000000000000000000000000000d4c09bf98d223a6f3c9ac2319ba80", +>>>>>>> origin/v5-next "0x0000000000000000000000000000001eee81b23a887f299049b14c11e98460d6", "0x00000000000000000000000000000000002a56ce41f6b0be13b9c26747621b82", "0x000000000000000000000000000000d5827d6338c78656c0d12ca1aea6ef2c7c", "0x00000000000000000000000000000000001aa98f2de3ddda547d8f6de4e725de", +<<<<<<< HEAD "0x000000000000000000000000000000eb965cf70d77f0e2216d04c748f3ab7f5c", "0x00000000000000000000000000000000001beaa0afc9b05bdf71db514a814532", "0x0000000000000000000000000000006cd09b0a30f4a93136c9860b93dcdb5bcd", "0x00000000000000000000000000000000002dd6a841fe0c0bbe07a71c827501f5", +======= + "0x0000000000000000000000000000006e725e63aa4cd7bd44de6ba3745a0a34ca", + "0x0000000000000000000000000000000000042670040cff3c4a84cc762431a998", + "0x000000000000000000000000000000c727c317d5867662521705a2413766c6f3", + "0x000000000000000000000000000000000016ed70e14b2ce92ab7782744ccc2e2", +>>>>>>> origin/v5-next "0x0000000000000000000000000000006f206a04895661d3bd004222a1f8a7fc73", "0x00000000000000000000000000000000001b12a59a820d3aa543a594a1b9d92f", "0x0000000000000000000000000000002103559842aca1e08af33bb1f714ebc02a", @@ -1269,6 +1416,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x000000000000000000000000000000000021a0543de0bc42d6586454ec8b623b", "0x00000000000000000000000000000016bf0724359c9a09ceffdc9371a2d6e5dc", "0x00000000000000000000000000000000002fd4c13c6f5523a7f44b28ce3d342a", +<<<<<<< HEAD "0x000000000000000000000000000000c3b10f88e5436be1d5a5a4bb53bff9f86f", "0x00000000000000000000000000000000000fb0a6d38afc343e251396adad53cf", "0x00000000000000000000000000000070e87b913346fb9285cbb00737bd57cf7c", @@ -1327,3 +1475,63 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_l1_to_l2] root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001800" +======= + "0x000000000000000000000000000000eed40b18f28cc43fdad059e910295febb1", + "0x000000000000000000000000000000000025fae8634a7aa408b832a7491e4ae7", + "0x00000000000000000000000000000094a306cafa01a9df1184d2a6fb1ac1cae4", + "0x00000000000000000000000000000000001bd4dc13bc19e515a52c0cb88e2a39", + "0x000000000000000000000000000000e83efa97b3f73718d358245467356af28f", + "0x000000000000000000000000000000000028751e4a28532a8879c9d665bd7b9d", + "0x00000000000000000000000000000034d3eef9e765bcfd421d4b9fc1f4a49fb4", + "0x00000000000000000000000000000000002d58beeb0aad7c3f854a6e858efa2b", + "0x0000000000000000000000000000007423800d8804d00fdaa1f9a5834b849f5b", + "0x000000000000000000000000000000000003d35b14ded6ca9e40332a45a74274", + "0x0000000000000000000000000000005b3a54a30f320a9356275157432f4b1984", + "0x000000000000000000000000000000000028f15f7e310f6b8f6921af43e060bb", + "0x00000000000000000000000000000074abfd8942fda479eb60f39dca8567d697", + "0x000000000000000000000000000000000013f610607a8e1fffeb4f236d9935a0", + "0x0000000000000000000000000000006aa3fc139936caf2459a0731ea90345bdc", + "0x00000000000000000000000000000000002c0c6287e3430a1fec40024e21a040", + "0x000000000000000000000000000000e7020579485b321b2930dd9502822b9e01", + "0x0000000000000000000000000000000000145c3a3bb713611874828edb797468", + "0x0000000000000000000000000000000d9b337420f159d21aaf0ec8c88ae61575", + "0x0000000000000000000000000000000000188a8abc3d03113a90f2970df35e78", + "0x0000000000000000000000000000003a86834efe703f68f02af1f5b3e563b2a6", + "0x00000000000000000000000000000000002fd092ed56d8cafa622f3c5c260c25", + "0x0000000000000000000000000000007de7cd59993b88da3e912606347187c30b", + "0x000000000000000000000000000000000017f269b36d035c049b9357033b9b1d", + "0x0000000000000000000000000000008b35d5a96e51ac97fe19fcab76891c7c7f", + "0x0000000000000000000000000000000000285a679d1cbf6a49883ef1048e173e", + "0x000000000000000000000000000000304ac81ab2a88a7e273d9c98e45488937f", + "0x00000000000000000000000000000000002dfd62075742c4b4decb67c0bcb21a", + "0x000000000000000000000000000000b7bafc25f4675efaad4b8ab9cce5c5571e", + "0x00000000000000000000000000000000001b46b6eb2ffd8e41f286a40fb93b65", + "0x000000000000000000000000000000f0c2af4410688d2547142ee32c35979ef8", + "0x00000000000000000000000000000000000b7477d8fe7009ce8cc9a91cd50dc1", + "0x000000000000000000000000000000038c1577415f2295add972a251d3ace1c1", + "0x00000000000000000000000000000000001fe63a672e63f91c5e55a436ef5e42", + "0x000000000000000000000000000000671ba26fa9782509c56179fd56b0a12721", + "0x0000000000000000000000000000000000121c377ba7aff66ad7e8da639d18e0", + "0x000000000000000000000000000000dc4b3070f6806760fb076d70132c9b61c1", + "0x00000000000000000000000000000000000b3cf67951f781c3b396e0ccb1a0d0", + "0x000000000000000000000000000000141f165b5bf220737633e80b92bab93edd", + "0x000000000000000000000000000000000022779e3c6759508a4e4766b681e21a", + "0x000000000000000000000000000000dc762f91226cf224087a47402753fb6d7a", + "0x000000000000000000000000000000000028c44b2517b8ea447f51aa48abb8d1", + "0x0000000000000000000000000000001737d9fdc5ab5b199ea88463bebe37ffab", + "0x00000000000000000000000000000000000e6ebda1634ed494984c5c6587a621", + "0x000000000000000000000000000000952cb2bd17109714e957070c1192bb7314", + "0x000000000000000000000000000000000022efeb385ea6b1e6ea5d9651e14a91", + "0x000000000000000000000000000000ccd289b3adb8dc1ff32239a959592dff44", + "0x00000000000000000000000000000000000acbbdb947bfd41503f3aad3cd2168", + "0x000000000000000000000000000000258d177893c7d5782d05599b9d61c717ed", + "0x00000000000000000000000000000000000aab908022f0e9af592776a243e596", + "0x0000000000000000000000000000004adbd43d022eaf7e6b5e15f46a79e421bd", + "0x00000000000000000000000000000000001ec238d3912bdbfa2f2d11a50a2deb" +] + hash = "0x0b132a0337b7f5d353321aba6b698f936aadacf4e52ad0d636d831b8d4998bd6" + + [inputs.previous_l1_to_l2] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" +>>>>>>> origin/v5-next diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first/Prover.toml index 59d039325c74..62a3619e43b6 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-block-root-first/Prover.toml @@ -28,10 +28,17 @@ new_l1_to_l2_message_subtree_root_sibling_path = [ "0x0aced6fe68143f4c7acd16345a8c1bb50c51a0692b760eb48728feb923d90757" ] new_archive_sibling_path = [ +<<<<<<< HEAD "0x01cbead9c751274331efa8f9a57e37296af41dfda8fde8b9dfad15e6df101932", "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x26a143f9222c4ce37939deed6bf5daaa3020d99712c72f9303b3df89e6ce47fe", "0x09308d0807f5aed64dd43d2014519a161c32f9a52ea75992cc18bec0bcde410e", +======= + "0x0c884574b761a176e90566b1e369f758e3bebc1b3319af35907d34e43bf2879a", + "0x05cfda92d9579deb6989e00ca22c01ea099d88e624d3b17527d338a44f3fae45", + "0x14e4b977b2203b70e6ee1c2456eb7114d090fe4b907f631eecd0919fed432e7d", + "0x190cc93605c7bddd0a2bc0f18b6c86cbd0e7c5ae1841a9ba384479d8da3a4350", +>>>>>>> origin/v5-next "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", @@ -477,12 +484,17 @@ new_archive_sibling_path = [ [inputs.parity_root.public_inputs] sha_root = "0x00de7b349d2306334734e4f58b1302a6ed5a6c796a706f6597a5641b6d468223" converted_root = "0x0d04c63f36bd168215c9b09a227c7e8d3ad48e2f11b8202fd07c524bd30ee88f" +<<<<<<< HEAD vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" +======= + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" +>>>>>>> origin/v5-next prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" [inputs.parity_root.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000016" sibling_path = [ +<<<<<<< HEAD "0x005a4d59d6486e10a3eefab398cca5d3c8e89e178a566d9885c5d7e478e46338", "0x1fa32700cbe47fec502423d9419340fdfc6b73c146a1b1e42189b4dee5ddb4cc", "0x07250f720369414b8956bab70d3dbfbe4a5912f128405eedb1c920009dcea92c", @@ -490,6 +502,15 @@ new_archive_sibling_path = [ "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x0b6b857bc0072096c5f442c6ee032b6f5eaa4268d840dceed80c9e2dd9f6ba50", + "0x21255305e3d8915b8b5d7cd5d210c112df3715c3617743255c6c23115b78784f", + "0x128f959661b3a397777774398f0c5c902c9e3e57ff8c79bd341822053c32cb37", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.parity_root.vk_data.vk] @@ -1099,6 +1120,7 @@ new_archive_sibling_path = [ [inputs.previous_rollups.public_inputs] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000002" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD accumulated_fees = "0x0000000000000000000000000000000000000000000000000000e0c2c3b9a200" accumulated_mana_used = "0x000000000000000000000000000000000000000000000000000000000011752b" @@ -1124,12 +1146,40 @@ new_archive_sibling_path = [ [inputs.previous_rollups.public_inputs.constants.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + accumulated_fees = "0x000000000000000000000000000000000000000000000000000c87f62a206ac0" + accumulated_mana_used = "0x000000000000000000000000000000000000000000000000000000000014c823" + + [inputs.previous_rollups.public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.constants.last_archive] + root = "0x1a85f2cf02cc2d081cae9fa6d0350dabc3e6303336034855a00d11535250b686" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" + + [inputs.previous_rollups.public_inputs.constants.l1_to_l2_tree_snapshot] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002000" + + [inputs.previous_rollups.public_inputs.constants.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x000000000000000000000000000000000000000000000000000000000000000b" + slot_number = "0x000000000000000000000000000000000000000000000000000000000000002a" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f680" + + [inputs.previous_rollups.public_inputs.constants.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.constants.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollups.public_inputs.constants.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000cdfe600" [inputs.previous_rollups.public_inputs.start_tree_snapshots.note_hash_tree] @@ -1154,6 +1204,32 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollups.public_inputs.end_tree_snapshots.public_data_tree] root = "0x26abb36f6187a9d47bcdda82cc551f41e8596cc04bdc23ac11e4f7289147890c" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000009a5d3640" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000001c0" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.nullifier_tree] +root = "0x28dcce21e205acd07284b78e384f47f13789961dfada3de96d65c9d91d81be80" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.public_data_tree] +root = "0x2a3229c1eddabc5c3f0a3bdb75ee46983b9409810ab1abcb58bc9a7b5fbb086e" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.nullifier_tree] +root = "0x1a5fb6bb7e91192ec3413b93e04ca4222a824f841a64cd46b6e8943566dc5cd7" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.public_data_tree] +root = "0x0036fece1a888ace549c08d3a06d3f302f4d713075370e9afeba0c39f1f6997a" +>>>>>>> origin/v5-next next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" [inputs.previous_rollups.public_inputs.start_sponge_blob] @@ -1175,6 +1251,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 squeeze_mode = false [inputs.previous_rollups.public_inputs.end_sponge_blob] +<<<<<<< HEAD num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000045" [inputs.previous_rollups.public_inputs.end_sponge_blob.sponge] @@ -1188,13 +1265,29 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x192e404a9861f10ab23706910d050c568156471a904335368a357fd8582fd8c3", "0x069f5d0c6f8417c0f0bdb02336db790eb741f768f31ca271e680322755ee4789", "0x2b382f16e9441dbead7b83a912778cdc3a9042e6ba6af3d254fa612ed341e7c3" +======= + num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000014" + + [inputs.previous_rollups.public_inputs.end_sponge_blob.sponge] + cache = [ + "0x21fc750a8b31b045081f1fdccf15a3efc50cde236647d27c23a0e355ec8e832d", + "0x00000000000000000000000000000000000000000000021e084b3b62cf82fb00", + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" ] - cache_size = "0x0000000000000000000000000000000000000000000000000000000000000003" + state = [ + "0x01c0562f5f0349ce867b4d7d41d7a140014e6f53fc1bec89f4322d02c4c577ab", + "0x205204a71b2b30cef7cf104864c60eb44a30122a8575be5d9cb55c5a36aaff13", + "0x057b094bbfc4ea78855d1f1b946cb10d96a2b6ea891df0a84089f2b26af9ad71", + "0x304c714cdd19591d280dacb4e858811d1f2e2af1eed0ae94de35ba5ffa84a51f" +>>>>>>> origin/v5-next +] + cache_size = "0x0000000000000000000000000000000000000000000000000000000000000002" squeeze_mode = false [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" sibling_path = [ +<<<<<<< HEAD "0x1e73559df90b9ac652f39d057651493cf969d69cefd6a5ab110845f928273371", "0x0f5051c9544348ed76ea21f6edbd6e24dcb243dba2f146d947505e6e88c20322", "0x0a2818ba5dd5624d91f012822293d4135b8958ec1d8ab6cf952ee3de138bb8c4", @@ -1202,6 +1295,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x058d2ead72d0942e25805e239e37394d55302cd0bf0ae8b7fa6754950a7ceb51", + "0x2a9ef81b082ec4212c08eba71c46e645efc1ae573e9cca5b480785be9dcc4d21", + "0x18b9d1703288fad007e0e97212dedf18305ab172790fe8d5c7aeea5c2634673b", + "0x0ac3d5ba2d696f54d85ea3f4452268a5f7ab85f8eb9d25ee9af45acac10a47e1", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] @@ -1811,6 +1913,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollups.public_inputs] num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001" out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD accumulated_fees = "0x000000000000000000000000000000000000000000000000000083a35fe8cc00" accumulated_mana_used = "0x00000000000000000000000000000000000000000000000000000000000a3982" @@ -1836,12 +1939,40 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollups.public_inputs.constants.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + accumulated_fees = "0x0000000000000000000000000000000000000000000000000004e021a5614300" + accumulated_mana_used = "0x00000000000000000000000000000000000000000000000000000000000815ec" + + [inputs.previous_rollups.public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.constants.last_archive] + root = "0x1a85f2cf02cc2d081cae9fa6d0350dabc3e6303336034855a00d11535250b686" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" + + [inputs.previous_rollups.public_inputs.constants.l1_to_l2_tree_snapshot] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002000" + + [inputs.previous_rollups.public_inputs.constants.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x000000000000000000000000000000000000000000000000000000000000000b" + slot_number = "0x000000000000000000000000000000000000000000000000000000000000002a" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f680" + + [inputs.previous_rollups.public_inputs.constants.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.constants.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollups.public_inputs.constants.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000cdfe600" [inputs.previous_rollups.public_inputs.start_tree_snapshots.note_hash_tree] @@ -1882,15 +2013,58 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x192e404a9861f10ab23706910d050c568156471a904335368a357fd8582fd8c3", "0x069f5d0c6f8417c0f0bdb02336db790eb741f768f31ca271e680322755ee4789", "0x2b382f16e9441dbead7b83a912778cdc3a9042e6ba6af3d254fa612ed341e7c3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000009a5d3640" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.nullifier_tree] +root = "0x1a5fb6bb7e91192ec3413b93e04ca4222a824f841a64cd46b6e8943566dc5cd7" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0" + +[inputs.previous_rollups.public_inputs.start_tree_snapshots.public_data_tree] +root = "0x0036fece1a888ace549c08d3a06d3f302f4d713075370e9afeba0c39f1f6997a" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.note_hash_tree] +root = "0x262f9dd2dfc6fd0ff6ef985baa68f7ab770787ebfd8d1a4cc56f4dc233c85dc2" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000280" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.nullifier_tree] +root = "0x140d622dfe122fa3b2a08458e984ea09d2f49de2a6d68aa31f2d5e18d0ace3ee" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000300" + +[inputs.previous_rollups.public_inputs.end_tree_snapshots.public_data_tree] +root = "0x0f43534fc1ffdb912a757da01ec2d4dbcdb6b961d23a87ad238bf8c3e751cc5f" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" + + [inputs.previous_rollups.public_inputs.start_sponge_blob] + num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000014" + + [inputs.previous_rollups.public_inputs.start_sponge_blob.sponge] + cache = [ + "0x21fc750a8b31b045081f1fdccf15a3efc50cde236647d27c23a0e355ec8e832d", + "0x00000000000000000000000000000000000000000000021e084b3b62cf82fb00", + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +] + state = [ + "0x01c0562f5f0349ce867b4d7d41d7a140014e6f53fc1bec89f4322d02c4c577ab", + "0x205204a71b2b30cef7cf104864c60eb44a30122a8575be5d9cb55c5a36aaff13", + "0x057b094bbfc4ea78855d1f1b946cb10d96a2b6ea891df0a84089f2b26af9ad71", + "0x304c714cdd19591d280dacb4e858811d1f2e2af1eed0ae94de35ba5ffa84a51f" +>>>>>>> origin/v5-next ] - cache_size = "0x0000000000000000000000000000000000000000000000000000000000000003" + cache_size = "0x0000000000000000000000000000000000000000000000000000000000000002" squeeze_mode = false [inputs.previous_rollups.public_inputs.end_sponge_blob] - num_absorbed_fields = "0x000000000000000000000000000000000000000000000000000000000000004f" + num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000052" [inputs.previous_rollups.public_inputs.end_sponge_blob.sponge] cache = [ +<<<<<<< HEAD "0x00000000000000000000000000000000000000000000021e0a6076caaa5a6380", "0x000000000000000000000000000000000000000000000000000000000000076c", "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" @@ -1900,6 +2074,17 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x079fc610149becc66696cd184805c3357dab8e25aee4b276a916312951e81043", "0x2a3910db26c4807e38ad955db3a385f3b73169e69e9426ea98c761a748276808", "0x0a8ca0a5c53ae38174655581762e5a1ac0c71d91aa9d1a18a26f51bd27cf2055" +======= + "0x09370bac3c7fdc0d89f4f05f9532a9135573d0ab1b7483e143e660d3b6e8c0d2", + "0x24765902849aacf20f1ba417f3e36d947bc687a05842f703b92c2b9991f99ec9", + "0x2752ed495a779b32f434484217b0f86d2a45290babccfa5870e32dfc111e66da" +] + state = [ + "0x072c021bdbdd84785002e12002579f8aa68566f8746016b9cf93390c770d407c", + "0x2a3657aa1735d62712d48b2f189ebaafd952f9c7c49343d0fa29c74aa71cd371", + "0x188c2f8f69be57199fdfb2b147f293e651f0e202b9aa719ea644ae556ebdc28c", + "0x03caf4af85faa954c1cb9c34ee6dcca433a7c22639c647d326c1fb0852d87ed4" +>>>>>>> origin/v5-next ] cache_size = "0x0000000000000000000000000000000000000000000000000000000000000001" squeeze_mode = false @@ -1907,6 +2092,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" sibling_path = [ +<<<<<<< HEAD "0x10b6730f1d1e9c6bf8d7c4b42b64b40d2603e3ae6ddbd464c3d8fcfb9e06e6d4", "0x0f5051c9544348ed76ea21f6edbd6e24dcb243dba2f146d947505e6e88c20322", "0x0a2818ba5dd5624d91f012822293d4135b8958ec1d8ab6cf952ee3de138bb8c4", @@ -1914,6 +2100,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x08e1bf5026afea79c199f336a0c22d16d92709e1dddd343a9f91f93f4423bdaa", + "0x0bf5f2bcd9c0361745fce3f1331dadcbb9e733ee2784ce608d6a63f26b90e373", + "0x23106dac33cae101c3ceb015fec7d795f24ed63e984917bdafcc48092586396c", + "0x0caf715321e53b2ad3d2ce035f8912152190fdab2df8b651de5d727ff976b2ce", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] @@ -1921,6 +2116,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000017", "0x0000000000000000000000000000000000000000000000000000000000000042", "0x0000000000000000000000000000000000000000000000000000000000000005", +<<<<<<< HEAD "0x0000000000000000000000000000009328a328a1d7ae2aa50556292f6544ae6b", "0x00000000000000000000000000000000000aa5d4c9f48e6dd058c09a1a7fb58d", "0x000000000000000000000000000000b3eec467daffe4b53b9a863cc25ce83485", @@ -1953,14 +2149,55 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x000000000000000000000000000000000007a1ff2509f698f5c7d4374eb9c392", "0x000000000000000000000000000000fe2bb606f3c248ee28465335c6d32f8fbf", "0x000000000000000000000000000000000019710c99918555be474cf945692274", +======= + "0x000000000000000000000000000000a5b0bdba7f43a5ba543eccf85ba1ff12ca", + "0x00000000000000000000000000000000001855515fb685e8e418e96a319fe711", + "0x00000000000000000000000000000038944aaa9a48d5e18d5cf37c0b5e233a40", + "0x0000000000000000000000000000000000146ad226ae2c32db68bcfc090f2428", + "0x000000000000000000000000000000b68d680e0f7c271277bcff3e24eba99354", + "0x000000000000000000000000000000000011b59c1c2571432cae5ade01825426", + "0x00000000000000000000000000000023d1b746f7bdc13479ef4410306af3a85e", + "0x0000000000000000000000000000000000082cb3efa60cb06b2b0b7944a4913a", + "0x000000000000000000000000000000d969f4dd95758a8a3153278bef8a3649ee", + "0x000000000000000000000000000000000018044b9796b02a05ad4a78d4da7fed", + "0x000000000000000000000000000000929831e4b5b148fdd67cbce884cfbb2bc1", + "0x00000000000000000000000000000000002867ba39b2f397523784ec5229e4fe", + "0x000000000000000000000000000000fb6abacca3720a430b82e4badd59fad275", + "0x00000000000000000000000000000000002e8c31092bc5816b54fd5673132d90", + "0x000000000000000000000000000000cdac5dc30d61d0f39162a87b8a1ed4afa9", + "0x00000000000000000000000000000000002fce81d821a8d931534592ca04f835", + "0x000000000000000000000000000000257b5d0a4e7c6267192cd7c78d931e903a", + "0x00000000000000000000000000000000002a8454538056e7e89b275f35ebc07d", + "0x00000000000000000000000000000012c67986b9cde33816261a0c7b38341aa2", + "0x000000000000000000000000000000000023a7ff91a87d4e4477152409c5d308", + "0x0000000000000000000000000000009e7ff25a9df411d18faf503f54d964a873", + "0x00000000000000000000000000000000000523024b12bcc02534720170e846e5", + "0x000000000000000000000000000000bbf3edea5788ae8911124d50d357f628b1", + "0x000000000000000000000000000000000000a2223f1ee84187ae2471803ef17f", + "0x0000000000000000000000000000001305b133677f71ba90cd367c582a3c0fde", + "0x0000000000000000000000000000000000213a2dbbb2a6ab7f8eed07e7d06405", + "0x000000000000000000000000000000f2bcdfdc3f40a72970b8ea9e22abe37778", + "0x000000000000000000000000000000000000cd418b3d04c1479003635734e109", + "0x000000000000000000000000000000737110d0b6a1519312fb6fe5aa3c039cab", + "0x000000000000000000000000000000000027c4bc0c335ae48b035a27f825e674", + "0x0000000000000000000000000000006507beb1caaa5279601349587992439dc4", + "0x00000000000000000000000000000000000d4c09bf98d223a6f3c9ac2319ba80", +>>>>>>> origin/v5-next "0x0000000000000000000000000000001eee81b23a887f299049b14c11e98460d6", "0x00000000000000000000000000000000002a56ce41f6b0be13b9c26747621b82", "0x000000000000000000000000000000d5827d6338c78656c0d12ca1aea6ef2c7c", "0x00000000000000000000000000000000001aa98f2de3ddda547d8f6de4e725de", +<<<<<<< HEAD "0x000000000000000000000000000000f8f16d93b4d40b6b37b47c60bb2e15968a", "0x00000000000000000000000000000000001c66ae5d710e4f03e905237f56896c", "0x00000000000000000000000000000062e3f05ba19f6d2ee7e046babbd221f7fe", "0x0000000000000000000000000000000000187b562e03dda0dfccd55b54ad3f3e", +======= + "0x0000000000000000000000000000006e725e63aa4cd7bd44de6ba3745a0a34ca", + "0x0000000000000000000000000000000000042670040cff3c4a84cc762431a998", + "0x000000000000000000000000000000c727c317d5867662521705a2413766c6f3", + "0x000000000000000000000000000000000016ed70e14b2ce92ab7782744ccc2e2", +>>>>>>> origin/v5-next "0x0000000000000000000000000000006f206a04895661d3bd004222a1f8a7fc73", "0x00000000000000000000000000000000001b12a59a820d3aa543a594a1b9d92f", "0x0000000000000000000000000000002103559842aca1e08af33bb1f714ebc02a", @@ -1981,6 +2218,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x000000000000000000000000000000000021a0543de0bc42d6586454ec8b623b", "0x00000000000000000000000000000016bf0724359c9a09ceffdc9371a2d6e5dc", "0x00000000000000000000000000000000002fd4c13c6f5523a7f44b28ce3d342a", +<<<<<<< HEAD "0x000000000000000000000000000000900b39279bfc348fe557fb41d1f5d4c8b5", "0x000000000000000000000000000000000029c825eb725af14205dfdb51bae5de", "0x0000000000000000000000000000000f0273d62b0aa2ac98edd943d1f4c8f60b", @@ -2039,3 +2277,63 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_l1_to_l2] root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002800" +======= + "0x000000000000000000000000000000eed40b18f28cc43fdad059e910295febb1", + "0x000000000000000000000000000000000025fae8634a7aa408b832a7491e4ae7", + "0x00000000000000000000000000000094a306cafa01a9df1184d2a6fb1ac1cae4", + "0x00000000000000000000000000000000001bd4dc13bc19e515a52c0cb88e2a39", + "0x000000000000000000000000000000e83efa97b3f73718d358245467356af28f", + "0x000000000000000000000000000000000028751e4a28532a8879c9d665bd7b9d", + "0x00000000000000000000000000000034d3eef9e765bcfd421d4b9fc1f4a49fb4", + "0x00000000000000000000000000000000002d58beeb0aad7c3f854a6e858efa2b", + "0x0000000000000000000000000000007423800d8804d00fdaa1f9a5834b849f5b", + "0x000000000000000000000000000000000003d35b14ded6ca9e40332a45a74274", + "0x0000000000000000000000000000005b3a54a30f320a9356275157432f4b1984", + "0x000000000000000000000000000000000028f15f7e310f6b8f6921af43e060bb", + "0x00000000000000000000000000000074abfd8942fda479eb60f39dca8567d697", + "0x000000000000000000000000000000000013f610607a8e1fffeb4f236d9935a0", + "0x0000000000000000000000000000006aa3fc139936caf2459a0731ea90345bdc", + "0x00000000000000000000000000000000002c0c6287e3430a1fec40024e21a040", + "0x000000000000000000000000000000e7020579485b321b2930dd9502822b9e01", + "0x0000000000000000000000000000000000145c3a3bb713611874828edb797468", + "0x0000000000000000000000000000000d9b337420f159d21aaf0ec8c88ae61575", + "0x0000000000000000000000000000000000188a8abc3d03113a90f2970df35e78", + "0x0000000000000000000000000000003a86834efe703f68f02af1f5b3e563b2a6", + "0x00000000000000000000000000000000002fd092ed56d8cafa622f3c5c260c25", + "0x0000000000000000000000000000007de7cd59993b88da3e912606347187c30b", + "0x000000000000000000000000000000000017f269b36d035c049b9357033b9b1d", + "0x0000000000000000000000000000008b35d5a96e51ac97fe19fcab76891c7c7f", + "0x0000000000000000000000000000000000285a679d1cbf6a49883ef1048e173e", + "0x000000000000000000000000000000304ac81ab2a88a7e273d9c98e45488937f", + "0x00000000000000000000000000000000002dfd62075742c4b4decb67c0bcb21a", + "0x000000000000000000000000000000b7bafc25f4675efaad4b8ab9cce5c5571e", + "0x00000000000000000000000000000000001b46b6eb2ffd8e41f286a40fb93b65", + "0x000000000000000000000000000000f0c2af4410688d2547142ee32c35979ef8", + "0x00000000000000000000000000000000000b7477d8fe7009ce8cc9a91cd50dc1", + "0x000000000000000000000000000000038c1577415f2295add972a251d3ace1c1", + "0x00000000000000000000000000000000001fe63a672e63f91c5e55a436ef5e42", + "0x000000000000000000000000000000671ba26fa9782509c56179fd56b0a12721", + "0x0000000000000000000000000000000000121c377ba7aff66ad7e8da639d18e0", + "0x000000000000000000000000000000dc4b3070f6806760fb076d70132c9b61c1", + "0x00000000000000000000000000000000000b3cf67951f781c3b396e0ccb1a0d0", + "0x000000000000000000000000000000141f165b5bf220737633e80b92bab93edd", + "0x000000000000000000000000000000000022779e3c6759508a4e4766b681e21a", + "0x000000000000000000000000000000dc762f91226cf224087a47402753fb6d7a", + "0x000000000000000000000000000000000028c44b2517b8ea447f51aa48abb8d1", + "0x0000000000000000000000000000001737d9fdc5ab5b199ea88463bebe37ffab", + "0x00000000000000000000000000000000000e6ebda1634ed494984c5c6587a621", + "0x000000000000000000000000000000952cb2bd17109714e957070c1192bb7314", + "0x000000000000000000000000000000000022efeb385ea6b1e6ea5d9651e14a91", + "0x000000000000000000000000000000ccd289b3adb8dc1ff32239a959592dff44", + "0x00000000000000000000000000000000000acbbdb947bfd41503f3aad3cd2168", + "0x000000000000000000000000000000258d177893c7d5782d05599b9d61c717ed", + "0x00000000000000000000000000000000000aab908022f0e9af592776a243e596", + "0x0000000000000000000000000000004adbd43d022eaf7e6b5e15f46a79e421bd", + "0x00000000000000000000000000000000001ec238d3912bdbfa2f2d11a50a2deb" +] + hash = "0x0b132a0337b7f5d353321aba6b698f936aadacf4e52ad0d636d831b8d4998bd6" + + [inputs.previous_l1_to_l2] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001c00" +>>>>>>> origin/v5-next diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-merge/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-merge/Prover.toml index aed9ec3e1772..11c9d12140b0 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-merge/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-merge/Prover.toml @@ -484,7 +484,11 @@ proof = [ [inputs.previous_rollups.public_inputs] checkpoint_header_hashes = [ +<<<<<<< HEAD "0x003f28245501cd83312b059b7469c9efcbd17cdf1b87748a6684380140e8b8f4", +======= + "0x008aebd28052709e579ed4fab663014bc6d26f65fb7463cac29a4595678f77b5", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -520,6 +524,7 @@ proof = [ [inputs.previous_rollups.public_inputs.constants] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" +<<<<<<< HEAD version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" protocol_contracts_hash = "0x080e3881bdd4a4e78d52691e5543b50cf820f51baf52af42d7b58c9e15f96ec7" @@ -532,6 +537,20 @@ proof = [ [inputs.previous_rollups.public_inputs.new_archive] root = "0x1302274e4a6bea5811bcdf1a547430241566bcecab5eb026ced46711d8e78501" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000a" +======= + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.previous_archive] + root = "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" + + [inputs.previous_rollups.public_inputs.new_archive] + root = "0x0c2607723b14ee159dbe1916740901d37ab21e03c62b7f3a85e8a54962de4952" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.previous_out_hash] root = "0x00c95e0ceb41951039e1592745ec2faea9866f6eaf01bf189a4463b4143af093" @@ -542,10 +561,17 @@ proof = [ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000001" [[inputs.previous_rollups.public_inputs.fees]] +<<<<<<< HEAD value = "0x00000000000000000000000000000000000000000000000000198e45581dc500" [inputs.previous_rollups.public_inputs.fees.recipient] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + value = "0x000000000000000000000000000000000000000000000000025798918fcdec00" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [[inputs.previous_rollups.public_inputs.fees]] value = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -772,6 +798,7 @@ proof = [ ] [inputs.previous_rollups.public_inputs.end_blob_accumulator] +<<<<<<< HEAD blob_commitments_hash_acc = "0x00c7d69903605c24450d8cc4111d6b01e31f84cacd7a01402f0cef9f221f27f3" z_acc = "0x1beeba27d94c66514c35883c6684bfdc767455041a16225205c326fd2e2cb7fc" gamma_acc = "0x088bb68a165bc27058fd98272ebe5f98cb66378ebc3d5c2639d6f59a66e134ca" @@ -781,6 +808,17 @@ proof = [ "0x523fafae630b01cb88597856ec2ecc", "0xf3db7c5d601e16ac93c5bbe54e70b7", "0x31dc" +======= + blob_commitments_hash_acc = "0x00a1598e352b11bd6fb1194376097dae4dd42a2efcf99daf80462512e0286644" + z_acc = "0x0ab48effb129e4f635df638dfc6dbf5b181ef9845f60c1ca6df1ed572dbb00bd" + gamma_acc = "0x01b0c6c39365664be1177ac85430ece61691ea2b1f171c03ce8062e6677e29d7" + + [inputs.previous_rollups.public_inputs.end_blob_accumulator.y_acc] + limbs = [ + "0x63ef5562b19e4802f35ea222ff5624", + "0xc2d4855908cfabff4c3f851b492e90", + "0x5e12" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc] @@ -788,22 +826,37 @@ proof = [ [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0xdc0744575b26b4c4b7ee41dc7bee5a", "0xab24ae0f1c266615b22dc3e9ffeecf", "0xb738f18d636a06615561d266fd2d4d", "0x19668e" +======= + "0x5a46b4be73c266bdb792970040bbeb", + "0x125cd9e006d74eda609388cd98755d", + "0x66f0dac76a804c3f682b5d4a81d546", + "0x0d99fa" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0x713d223616e8efe8cd4821efdde4f2", "0x9a9a221be261841a9296b4d1eefd77", "0xdb1af24cb0ccdcba1a7900c4fc1ad5", "0x15b665" +======= + "0x2b3a11988fc52e276276332781b0e4", + "0x0043350b88d1973d7b748de360428d", + "0x6d5698edde301a16d3504569984c86", + "0x0d7a47" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" @@ -817,11 +870,27 @@ proof = [ "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" +======= + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +] + + [inputs.previous_rollups.public_inputs.final_blob_challenges] + z = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + + [inputs.previous_rollups.public_inputs.final_blob_challenges.gamma] + limbs = [ + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000011" sibling_path = [ +<<<<<<< HEAD "0x233055a6920a13764c09bad668c75e48f8165a1894c37152ede5c09640a63b15", "0x2c74d12f23eca40b1748248d689d41cb7ac4771cecfe01c3ae67dab27f821949", "0x035c573a1f2634405482213a2b805e186d6b81073e2b7a5bd3f64c2e4e8bc21e", @@ -829,6 +898,15 @@ proof = [ "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x06385d5233b4072a1c8087a6db31371c18d96b1f4a2732e5a997dfa5f15ff737", + "0x25ed0a3cbcd94596a04dec7bbef06f93972cab546697475e171c380393c2f36f", + "0x16b2badcee9942797f8da1d56bd7962f78a91ab801f141782aa669b2b41261f2", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] @@ -836,6 +914,7 @@ proof = [ "0x0000000000000000000000000000000000000000000000000000000000000017", "0x00000000000000000000000000000000000000000000000000000000000000a3", "0x0000000000000000000000000000000000000000000000000000000000000005", +<<<<<<< HEAD "0x000000000000000000000000000000744c51f21e3dd8540bccf510ecc1d766be", "0x00000000000000000000000000000000001e95a14c474168aaa5c9372f7a0abf", "0x000000000000000000000000000000879082cb89dbf870ad3aa0d5da2ee67125", @@ -868,14 +947,55 @@ proof = [ "0x00000000000000000000000000000000001c56ba82c1f1910eb581559e94ae3c", "0x0000000000000000000000000000006fa0127d67c2462bec9945343f82c18b62", "0x00000000000000000000000000000000001ab9b001ba47aa775c9094ccff2543", +======= + "0x0000000000000000000000000000005bf9d0538e5848248c7cecc24ef378a89a", + "0x00000000000000000000000000000000001c712d45e7d12947fe3ad68302a605", + "0x000000000000000000000000000000c069b219453a5725fec0674f14442a9b38", + "0x000000000000000000000000000000000002d5e03122433291cf33f236e8e686", + "0x0000000000000000000000000000008cfca774b31beaa70e615d02192d01ad22", + "0x000000000000000000000000000000000009ff84807ebc64d4303d936292d755", + "0x000000000000000000000000000000ad09e3a2631702fdfde585b149facb20a8", + "0x0000000000000000000000000000000000047e03f53efa7c24425f8af034a43b", + "0x000000000000000000000000000000bcd152b39554194b391dbd2af3361d8c3e", + "0x000000000000000000000000000000000000ea68761cc12324746ca1b3d9c650", + "0x0000000000000000000000000000003eed4daaa92443385a63998fed0fba0945", + "0x00000000000000000000000000000000002a88b6ba3bbbd3dd5cbfbfbed8f15c", + "0x000000000000000000000000000000bb4d5f7961e9f9d799fbc0d9e29258d60b", + "0x0000000000000000000000000000000000236b38ea5b374b59984a895963903c", + "0x0000000000000000000000000000006fed46f45ab31dda6bad9a3f2b0b13584b", + "0x0000000000000000000000000000000000303aeeab60c9ddf4f793f80712f271", + "0x000000000000000000000000000000bbb8302844ecce1ade584522c04b39419c", + "0x0000000000000000000000000000000000120be8ee393cde7bc7a66ccdbb12db", + "0x000000000000000000000000000000b46038b7c082297dcbdf62d34011338a6a", + "0x00000000000000000000000000000000000542583626ad9d3166c11453a8cced", + "0x00000000000000000000000000000043a2c7a6cc5e9e853cfb37f2a268625495", + "0x00000000000000000000000000000000000a0c306b949ae542e83e2b18336b68", + "0x00000000000000000000000000000022ae720c70b602716054097ead0a3e2106", + "0x000000000000000000000000000000000008ad67c5150d0fedaad402909e5043", + "0x000000000000000000000000000000fdc5b8ce0ab2ae89c256bf2492c77d6788", + "0x000000000000000000000000000000000026aa52a4b3c1407d130bb7d636a896", + "0x000000000000000000000000000000f471db1cbb9b807afe9a095707022b5ba5", + "0x000000000000000000000000000000000026c537154621e8262db51d38737f71", + "0x00000000000000000000000000000083be22902ca4e77af5d780caaefe5fd18c", + "0x000000000000000000000000000000000008cb39450963234c17363b0b6b0444", + "0x000000000000000000000000000000e4bd7cbe7c4c130db414f1a180b5e0e4af", + "0x00000000000000000000000000000000000f949c52877ed286ed316beca117f4", +>>>>>>> origin/v5-next "0x0000000000000000000000000000001eee81b23a887f299049b14c11e98460d6", "0x00000000000000000000000000000000002a56ce41f6b0be13b9c26747621b82", "0x000000000000000000000000000000d5827d6338c78656c0d12ca1aea6ef2c7c", "0x00000000000000000000000000000000001aa98f2de3ddda547d8f6de4e725de", +<<<<<<< HEAD "0x0000000000000000000000000000001aafcb2e2c5b4ee357c3cf460fa8614ed8", "0x00000000000000000000000000000000000d7a76e33e068c44cecba8c22ae8d7", "0x000000000000000000000000000000492fb683c7e0e137bc4e2ea86c37740b5c", "0x0000000000000000000000000000000000206f337fb8b6d365b941ba4a8d8a9c", +======= + "0x00000000000000000000000000000011845d2cad4a1a3a3c44a912771624b325", + "0x000000000000000000000000000000000009a52eab89be6cb4c163803d81db0c", + "0x000000000000000000000000000000b2cb97a3a1a4bb59150d7e5706465038ba", + "0x00000000000000000000000000000000001843f1cfb63b8e3eec6f0f0c8f6e6e", +>>>>>>> origin/v5-next "0x000000000000000000000000000000577c33d5c10b485d8c213d16ac4664dd62", "0x00000000000000000000000000000000001dbb32af825db919015b2f62ac527a", "0x0000000000000000000000000000004089798ec9503f6d851e3f36c8134fffca", @@ -896,6 +1016,7 @@ proof = [ "0x00000000000000000000000000000000002ebb3334e2b6b702d04d94e2c6a5c4", "0x0000000000000000000000000000004be64b431a5a816b719da16e8e02535892", "0x000000000000000000000000000000000001339afc1567176d3527faaf56c0a0", +<<<<<<< HEAD "0x000000000000000000000000000000377b1426e1e1857f300907c39678bab9d2", "0x00000000000000000000000000000000001f460fe6b26626b496ca4a53dc2103", "0x000000000000000000000000000000093cc8cd227239606f069fb8b0d89be197", @@ -950,6 +1071,62 @@ proof = [ "0x00000000000000000000000000000000002c6140875c92938e10d156a43b9a9b" ] hash = "0x04fbc459fb16d984f4019cc33c1eb7d791a57a8307d473858a0d5b44c202e230" +======= + "0x00000000000000000000000000000038c1e3dcb7f8559c8cd5898e9a72c12e3c", + "0x00000000000000000000000000000000002b0114c87d21028102fbc15be6d40d", + "0x000000000000000000000000000000f13e23578302bed1953001e06dfde8e315", + "0x000000000000000000000000000000000012ea7139c72dccdcdd87ef24ac7f95", + "0x0000000000000000000000000000003e77613d523062d7b74a5d05d4b7ce6892", + "0x00000000000000000000000000000000001e302c7bf00d279edf1f0c3b521b50", + "0x0000000000000000000000000000009fe78820732bfbe427f4826caca5b6090c", + "0x0000000000000000000000000000000000218ddb04b934f359ed9114372484c7", + "0x000000000000000000000000000000cfd543a048132be41447d9ddec6fc031ae", + "0x00000000000000000000000000000000001387b60a8beb6c3a0801afc254485b", + "0x000000000000000000000000000000cee50ce32664d1d73abadbb026a91dd130", + "0x00000000000000000000000000000000000f92890bf4b7b102f2bdcc7324cb86", + "0x000000000000000000000000000000d40a87882cd8ecea3cf165cbdf775510c1", + "0x00000000000000000000000000000000001e1acba34a8d45fba95768314c9984", + "0x00000000000000000000000000000015592c7c6a7057d25911db86f03da1a3f5", + "0x0000000000000000000000000000000000053fe4d5f2299967b5f42fb4c9fd08", + "0x0000000000000000000000000000005bdeb9c5dd0f0826ef118f6ec05be7299e", + "0x00000000000000000000000000000000000e186d797a3f1360bf5a1174610606", + "0x000000000000000000000000000000b69f14699e29a8f579bd672f086e943368", + "0x00000000000000000000000000000000001c355da82908279b952b4b816ed987", + "0x000000000000000000000000000000f9f47f3b5eb4c4a66aea7fc3e91b5224e2", + "0x00000000000000000000000000000000001ee5aa2fb4a380d6c5f053d140f580", + "0x00000000000000000000000000000011bd0e113d61855735b7ad18e773371c50", + "0x00000000000000000000000000000000001f184add072f9e38f968355dc1b093", + "0x00000000000000000000000000000019499520b0d663cb596c4b842cbdf4c09f", + "0x00000000000000000000000000000000002764297b331cf8a8726abdb27f3d55", + "0x0000000000000000000000000000009461be833a28c08b60ebdde02c0c471118", + "0x00000000000000000000000000000000000caa18449c0a9149bea0712d8c3223", + "0x000000000000000000000000000000574c65a87444c8f4f71082949838d93924", + "0x00000000000000000000000000000000001700f0c8b4b94e2dbda6d41c80b153", + "0x00000000000000000000000000000027089f3853ad7ccc77be0944c48b213df8", + "0x00000000000000000000000000000000002b64f3887f6f168c7656f546a8ff95", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000fd379bed6f3b82d5ad99c865a5a725892f", + "0x00000000000000000000000000000000000e0187d1f70e624db27b30b18a18ed", + "0x000000000000000000000000000000354ce3ab67bcbfb00b734b781caf3413d1", + "0x00000000000000000000000000000000001d1960d6d60b9d81c892890d0a92b8", + "0x00000000000000000000000000000034f2fecde193c117f21f3076d8685042d0", + "0x0000000000000000000000000000000000248580d49072d571e82025401c06ab", + "0x0000000000000000000000000000003e392b6df003ff510ec0c82772db95f569", + "0x0000000000000000000000000000000000088de76d71532bbfb9b3b1c5ed2d03", + "0x00000000000000000000000000000001b750ba081b505e191a8618c58f693204", + "0x00000000000000000000000000000000001525cb20a6d319a2494850874c05c9", + "0x0000000000000000000000000000002849658574c23089449e59f8aa61d16839", + "0x000000000000000000000000000000000001ed58b70c3dd16344a9c435a28494", + "0x00000000000000000000000000000019f7faa98020d1a1a52eba5e0608206472", + "0x00000000000000000000000000000000000c4fa8e3de49f457271463b9b3f962", + "0x000000000000000000000000000000cd3dc83ceeae4fe61c648c7765c5182bbc", + "0x00000000000000000000000000000000002351286ba8539805518b55441b31a4" +] + hash = "0x0c78d5245c4ea7297b3dde0ddc4ff129be047aaf4e9c7cdd1b5b1d1dce8fabdb" +>>>>>>> origin/v5-next [[inputs.previous_rollups]] proof = [ @@ -1437,7 +1614,11 @@ proof = [ [inputs.previous_rollups.public_inputs] checkpoint_header_hashes = [ +<<<<<<< HEAD "0x004395c583aa5d8b61d95de30020015595c6ff15a98a908376053c285e760047", +======= + "0x00c8eaf3ebc6bfb23e465e84e24c4761e920305468c1638ef5c2f1ecef0f6501", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -1473,6 +1654,7 @@ proof = [ [inputs.previous_rollups.public_inputs.constants] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" +<<<<<<< HEAD version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" protocol_contracts_hash = "0x080e3881bdd4a4e78d52691e5543b50cf820f51baf52af42d7b58c9e15f96ec7" @@ -1485,6 +1667,20 @@ proof = [ [inputs.previous_rollups.public_inputs.new_archive] root = "0x119b91fb8888367eb1a374fd489be3f5b034be672409857b5921f06d85523269" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" +======= + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.previous_archive] + root = "0x0c2607723b14ee159dbe1916740901d37ab21e03c62b7f3a85e8a54962de4952" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" + + [inputs.previous_rollups.public_inputs.new_archive] + root = "0x243c07ceb152d0c8843a9ea35085d8c90f10ed665f855ed001459f920c858044" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000009" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.previous_out_hash] root = "0x00c95e0ceb41951039e1592745ec2faea9866f6eaf01bf189a4463b4143af093" @@ -1495,10 +1691,17 @@ proof = [ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000002" [[inputs.previous_rollups.public_inputs.fees]] +<<<<<<< HEAD value = "0x00000000000000000000000000000000000000000000000000030e6f24b2fa80" [inputs.previous_rollups.public_inputs.fees.recipient] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + value = "0x000000000000000000000000000000000000000000000000002720f1624aec00" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [[inputs.previous_rollups.public_inputs.fees]] value = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1687,6 +1890,7 @@ proof = [ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollups.public_inputs.start_blob_accumulator] +<<<<<<< HEAD blob_commitments_hash_acc = "0x00c7d69903605c24450d8cc4111d6b01e31f84cacd7a01402f0cef9f221f27f3" z_acc = "0x1beeba27d94c66514c35883c6684bfdc767455041a16225205c326fd2e2cb7fc" gamma_acc = "0x088bb68a165bc27058fd98272ebe5f98cb66378ebc3d5c2639d6f59a66e134ca" @@ -1696,6 +1900,17 @@ proof = [ "0x523fafae630b01cb88597856ec2ecc", "0xf3db7c5d601e16ac93c5bbe54e70b7", "0x31dc" +======= + blob_commitments_hash_acc = "0x00a1598e352b11bd6fb1194376097dae4dd42a2efcf99daf80462512e0286644" + z_acc = "0x0ab48effb129e4f635df638dfc6dbf5b181ef9845f60c1ca6df1ed572dbb00bd" + gamma_acc = "0x01b0c6c39365664be1177ac85430ece61691ea2b1f171c03ce8062e6677e29d7" + + [inputs.previous_rollups.public_inputs.start_blob_accumulator.y_acc] + limbs = [ + "0x63ef5562b19e4802f35ea222ff5624", + "0xc2d4855908cfabff4c3f851b492e90", + "0x5e12" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc] @@ -1703,22 +1918,37 @@ proof = [ [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0xdc0744575b26b4c4b7ee41dc7bee5a", "0xab24ae0f1c266615b22dc3e9ffeecf", "0xb738f18d636a06615561d266fd2d4d", "0x19668e" +======= + "0x5a46b4be73c266bdb792970040bbeb", + "0x125cd9e006d74eda609388cd98755d", + "0x66f0dac76a804c3f682b5d4a81d546", + "0x0d99fa" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0x713d223616e8efe8cd4821efdde4f2", "0x9a9a221be261841a9296b4d1eefd77", "0xdb1af24cb0ccdcba1a7900c4fc1ad5", "0x15b665" +======= + "0x2b3a11988fc52e276276332781b0e4", + "0x0043350b88d1973d7b748de360428d", + "0x6d5698edde301a16d3504569984c86", + "0x0d7a47" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" @@ -1734,6 +1964,23 @@ proof = [ "0xdf0081c38d524980410d61db922503", "0x62517b1dfbda85451c0439cc0806e0", "0x4d17" +======= + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +] + + [inputs.previous_rollups.public_inputs.end_blob_accumulator] + blob_commitments_hash_acc = "0x000919a2e2b3e490881ea8151913afcb5a740a703df47d3762d0ea9c447bf7b5" + z_acc = "0x2de401a3dff586ef3c23c54a78ddb10c97dbf44fac24260f3dd8107843c260d8" + gamma_acc = "0x257cd1c8b4e25ca9662bffcbbca5d23d55c579cf76c0e36f6733fde100a349cb" + + [inputs.previous_rollups.public_inputs.end_blob_accumulator.y_acc] + limbs = [ + "0xa6b7fbe9f80f1c221383286db92983", + "0xc35c07ea54aac8c64012bb35e8230e", + "0x31cc" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc] @@ -1741,22 +1988,37 @@ proof = [ [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0x03625c74c2be70b1c311884cc7e585", "0x6f620dfe7adc0c51d6ee59c585191e", "0x0bed8a0ba276719689b549269aef57", "0x18eb5e" +======= + "0xec21469de85e29a26e165a2fdc9cfa", + "0x5bff08718abf6b0614a69f2bb7ba37", + "0x48bf90db0f165f9bc390851e197624", + "0x1508fc" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0x4683126714b4a2600b4aeb2ba09cb1", "0x39d8a2712f7099eac558d4cb10484b", "0xc15888f6212e3918f05f094bae5012", "0x16bebd" +======= + "0x2fc415c468a3ab8c1c30a28379fdcf", + "0x561fa3950357db9fe9828619652c3c", + "0x6097cf7f2bac676c9d31384e6ef690", + "0x0f9410" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0xeb2cbe158831bbbac06ed1f495640a", "0x1557369df375c0edf8fdd550186e8e", "0x5598" @@ -1770,11 +2032,27 @@ proof = [ "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" +======= + "0x5a2d366bdf3e9b186c4a88b29360bd", + "0x963c1b12bcb8993e7aefb5ac9f16e3", + "0x368d" +] + + [inputs.previous_rollups.public_inputs.final_blob_challenges] + z = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + + [inputs.previous_rollups.public_inputs.final_blob_challenges.gamma] + limbs = [ + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000011" sibling_path = [ +<<<<<<< HEAD "0x233055a6920a13764c09bad668c75e48f8165a1894c37152ede5c09640a63b15", "0x2c74d12f23eca40b1748248d689d41cb7ac4771cecfe01c3ae67dab27f821949", "0x035c573a1f2634405482213a2b805e186d6b81073e2b7a5bd3f64c2e4e8bc21e", @@ -1782,6 +2060,15 @@ proof = [ "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x06385d5233b4072a1c8087a6db31371c18d96b1f4a2732e5a997dfa5f15ff737", + "0x25ed0a3cbcd94596a04dec7bbef06f93972cab546697475e171c380393c2f36f", + "0x16b2badcee9942797f8da1d56bd7962f78a91ab801f141782aa669b2b41261f2", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] @@ -1789,6 +2076,7 @@ proof = [ "0x0000000000000000000000000000000000000000000000000000000000000017", "0x00000000000000000000000000000000000000000000000000000000000000a3", "0x0000000000000000000000000000000000000000000000000000000000000005", +<<<<<<< HEAD "0x000000000000000000000000000000744c51f21e3dd8540bccf510ecc1d766be", "0x00000000000000000000000000000000001e95a14c474168aaa5c9372f7a0abf", "0x000000000000000000000000000000879082cb89dbf870ad3aa0d5da2ee67125", @@ -1821,14 +2109,55 @@ proof = [ "0x00000000000000000000000000000000001c56ba82c1f1910eb581559e94ae3c", "0x0000000000000000000000000000006fa0127d67c2462bec9945343f82c18b62", "0x00000000000000000000000000000000001ab9b001ba47aa775c9094ccff2543", +======= + "0x0000000000000000000000000000005bf9d0538e5848248c7cecc24ef378a89a", + "0x00000000000000000000000000000000001c712d45e7d12947fe3ad68302a605", + "0x000000000000000000000000000000c069b219453a5725fec0674f14442a9b38", + "0x000000000000000000000000000000000002d5e03122433291cf33f236e8e686", + "0x0000000000000000000000000000008cfca774b31beaa70e615d02192d01ad22", + "0x000000000000000000000000000000000009ff84807ebc64d4303d936292d755", + "0x000000000000000000000000000000ad09e3a2631702fdfde585b149facb20a8", + "0x0000000000000000000000000000000000047e03f53efa7c24425f8af034a43b", + "0x000000000000000000000000000000bcd152b39554194b391dbd2af3361d8c3e", + "0x000000000000000000000000000000000000ea68761cc12324746ca1b3d9c650", + "0x0000000000000000000000000000003eed4daaa92443385a63998fed0fba0945", + "0x00000000000000000000000000000000002a88b6ba3bbbd3dd5cbfbfbed8f15c", + "0x000000000000000000000000000000bb4d5f7961e9f9d799fbc0d9e29258d60b", + "0x0000000000000000000000000000000000236b38ea5b374b59984a895963903c", + "0x0000000000000000000000000000006fed46f45ab31dda6bad9a3f2b0b13584b", + "0x0000000000000000000000000000000000303aeeab60c9ddf4f793f80712f271", + "0x000000000000000000000000000000bbb8302844ecce1ade584522c04b39419c", + "0x0000000000000000000000000000000000120be8ee393cde7bc7a66ccdbb12db", + "0x000000000000000000000000000000b46038b7c082297dcbdf62d34011338a6a", + "0x00000000000000000000000000000000000542583626ad9d3166c11453a8cced", + "0x00000000000000000000000000000043a2c7a6cc5e9e853cfb37f2a268625495", + "0x00000000000000000000000000000000000a0c306b949ae542e83e2b18336b68", + "0x00000000000000000000000000000022ae720c70b602716054097ead0a3e2106", + "0x000000000000000000000000000000000008ad67c5150d0fedaad402909e5043", + "0x000000000000000000000000000000fdc5b8ce0ab2ae89c256bf2492c77d6788", + "0x000000000000000000000000000000000026aa52a4b3c1407d130bb7d636a896", + "0x000000000000000000000000000000f471db1cbb9b807afe9a095707022b5ba5", + "0x000000000000000000000000000000000026c537154621e8262db51d38737f71", + "0x00000000000000000000000000000083be22902ca4e77af5d780caaefe5fd18c", + "0x000000000000000000000000000000000008cb39450963234c17363b0b6b0444", + "0x000000000000000000000000000000e4bd7cbe7c4c130db414f1a180b5e0e4af", + "0x00000000000000000000000000000000000f949c52877ed286ed316beca117f4", +>>>>>>> origin/v5-next "0x0000000000000000000000000000001eee81b23a887f299049b14c11e98460d6", "0x00000000000000000000000000000000002a56ce41f6b0be13b9c26747621b82", "0x000000000000000000000000000000d5827d6338c78656c0d12ca1aea6ef2c7c", "0x00000000000000000000000000000000001aa98f2de3ddda547d8f6de4e725de", +<<<<<<< HEAD "0x0000000000000000000000000000001aafcb2e2c5b4ee357c3cf460fa8614ed8", "0x00000000000000000000000000000000000d7a76e33e068c44cecba8c22ae8d7", "0x000000000000000000000000000000492fb683c7e0e137bc4e2ea86c37740b5c", "0x0000000000000000000000000000000000206f337fb8b6d365b941ba4a8d8a9c", +======= + "0x00000000000000000000000000000011845d2cad4a1a3a3c44a912771624b325", + "0x000000000000000000000000000000000009a52eab89be6cb4c163803d81db0c", + "0x000000000000000000000000000000b2cb97a3a1a4bb59150d7e5706465038ba", + "0x00000000000000000000000000000000001843f1cfb63b8e3eec6f0f0c8f6e6e", +>>>>>>> origin/v5-next "0x000000000000000000000000000000577c33d5c10b485d8c213d16ac4664dd62", "0x00000000000000000000000000000000001dbb32af825db919015b2f62ac527a", "0x0000000000000000000000000000004089798ec9503f6d851e3f36c8134fffca", @@ -1849,6 +2178,7 @@ proof = [ "0x00000000000000000000000000000000002ebb3334e2b6b702d04d94e2c6a5c4", "0x0000000000000000000000000000004be64b431a5a816b719da16e8e02535892", "0x000000000000000000000000000000000001339afc1567176d3527faaf56c0a0", +<<<<<<< HEAD "0x000000000000000000000000000000377b1426e1e1857f300907c39678bab9d2", "0x00000000000000000000000000000000001f460fe6b26626b496ca4a53dc2103", "0x000000000000000000000000000000093cc8cd227239606f069fb8b0d89be197", @@ -1903,3 +2233,59 @@ proof = [ "0x00000000000000000000000000000000002c6140875c92938e10d156a43b9a9b" ] hash = "0x04fbc459fb16d984f4019cc33c1eb7d791a57a8307d473858a0d5b44c202e230" +======= + "0x00000000000000000000000000000038c1e3dcb7f8559c8cd5898e9a72c12e3c", + "0x00000000000000000000000000000000002b0114c87d21028102fbc15be6d40d", + "0x000000000000000000000000000000f13e23578302bed1953001e06dfde8e315", + "0x000000000000000000000000000000000012ea7139c72dccdcdd87ef24ac7f95", + "0x0000000000000000000000000000003e77613d523062d7b74a5d05d4b7ce6892", + "0x00000000000000000000000000000000001e302c7bf00d279edf1f0c3b521b50", + "0x0000000000000000000000000000009fe78820732bfbe427f4826caca5b6090c", + "0x0000000000000000000000000000000000218ddb04b934f359ed9114372484c7", + "0x000000000000000000000000000000cfd543a048132be41447d9ddec6fc031ae", + "0x00000000000000000000000000000000001387b60a8beb6c3a0801afc254485b", + "0x000000000000000000000000000000cee50ce32664d1d73abadbb026a91dd130", + "0x00000000000000000000000000000000000f92890bf4b7b102f2bdcc7324cb86", + "0x000000000000000000000000000000d40a87882cd8ecea3cf165cbdf775510c1", + "0x00000000000000000000000000000000001e1acba34a8d45fba95768314c9984", + "0x00000000000000000000000000000015592c7c6a7057d25911db86f03da1a3f5", + "0x0000000000000000000000000000000000053fe4d5f2299967b5f42fb4c9fd08", + "0x0000000000000000000000000000005bdeb9c5dd0f0826ef118f6ec05be7299e", + "0x00000000000000000000000000000000000e186d797a3f1360bf5a1174610606", + "0x000000000000000000000000000000b69f14699e29a8f579bd672f086e943368", + "0x00000000000000000000000000000000001c355da82908279b952b4b816ed987", + "0x000000000000000000000000000000f9f47f3b5eb4c4a66aea7fc3e91b5224e2", + "0x00000000000000000000000000000000001ee5aa2fb4a380d6c5f053d140f580", + "0x00000000000000000000000000000011bd0e113d61855735b7ad18e773371c50", + "0x00000000000000000000000000000000001f184add072f9e38f968355dc1b093", + "0x00000000000000000000000000000019499520b0d663cb596c4b842cbdf4c09f", + "0x00000000000000000000000000000000002764297b331cf8a8726abdb27f3d55", + "0x0000000000000000000000000000009461be833a28c08b60ebdde02c0c471118", + "0x00000000000000000000000000000000000caa18449c0a9149bea0712d8c3223", + "0x000000000000000000000000000000574c65a87444c8f4f71082949838d93924", + "0x00000000000000000000000000000000001700f0c8b4b94e2dbda6d41c80b153", + "0x00000000000000000000000000000027089f3853ad7ccc77be0944c48b213df8", + "0x00000000000000000000000000000000002b64f3887f6f168c7656f546a8ff95", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000000000fd379bed6f3b82d5ad99c865a5a725892f", + "0x00000000000000000000000000000000000e0187d1f70e624db27b30b18a18ed", + "0x000000000000000000000000000000354ce3ab67bcbfb00b734b781caf3413d1", + "0x00000000000000000000000000000000001d1960d6d60b9d81c892890d0a92b8", + "0x00000000000000000000000000000034f2fecde193c117f21f3076d8685042d0", + "0x0000000000000000000000000000000000248580d49072d571e82025401c06ab", + "0x0000000000000000000000000000003e392b6df003ff510ec0c82772db95f569", + "0x0000000000000000000000000000000000088de76d71532bbfb9b3b1c5ed2d03", + "0x00000000000000000000000000000001b750ba081b505e191a8618c58f693204", + "0x00000000000000000000000000000000001525cb20a6d319a2494850874c05c9", + "0x0000000000000000000000000000002849658574c23089449e59f8aa61d16839", + "0x000000000000000000000000000000000001ed58b70c3dd16344a9c435a28494", + "0x00000000000000000000000000000019f7faa98020d1a1a52eba5e0608206472", + "0x00000000000000000000000000000000000c4fa8e3de49f457271463b9b3f962", + "0x000000000000000000000000000000cd3dc83ceeae4fe61c648c7765c5182bbc", + "0x00000000000000000000000000000000002351286ba8539805518b55441b31a4" +] + hash = "0x0c78d5245c4ea7297b3dde0ddc4ff129be047aaf4e9c7cdd1b5b1d1dce8fabdb" +>>>>>>> origin/v5-next diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-root-single-block/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-root-single-block/Prover.toml index 72539e72bd18..117badec762f 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-root-single-block/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-checkpoint-root-single-block/Prover.toml @@ -483,6 +483,7 @@ proof = [ ] [inputs.previous_rollup.public_inputs] +<<<<<<< HEAD timestamp = "0x000000000000000000000000000000000000000000000000000000006a4d22fd" block_headers_hash = "0x2efa5fe41af017572583e705fc35f6b2eede2df0257526bbee6536817b583a11" in_hash = "0x00de7b349d2306334734e4f58b1302a6ed5a6c796a706f6597a5641b6d468223" @@ -500,12 +501,32 @@ proof = [ [inputs.previous_rollup.public_inputs.constants.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f62c" + block_headers_hash = "0x2426393fd34ff94e0b2cc16e367042105ab1e01c25e4993d01a564339ccdc707" + in_hash = "0x00de7b349d2306334734e4f58b1302a6ed5a6c796a706f6597a5641b6d468223" + out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" + accumulated_fees = "0x000000000000000000000000000000000000000000000000025798918fcdec00" + accumulated_mana_used = "0x000000000000000000000000000000000000000000000000000000000008d7ac" + + [inputs.previous_rollup.public_inputs.constants] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000023" + + [inputs.previous_rollup.public_inputs.constants.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.previous_rollup.public_inputs.constants.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollup.public_inputs.constants.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [inputs.previous_rollup.public_inputs.previous_archive] @@ -547,6 +568,49 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.previous_rollup.public_inputs.end_state.partial.public_data_tree] root = "0x2536a3212b711359308d274b8a92fa44465b6ce091dd9369c1331f1ffdeaa8ca" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [inputs.previous_rollup.public_inputs.previous_archive] + root = "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" + + [inputs.previous_rollup.public_inputs.new_archive] + root = "0x0c2607723b14ee159dbe1916740901d37ab21e03c62b7f3a85e8a54962de4952" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008" + +[inputs.previous_rollup.public_inputs.start_state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[inputs.previous_rollup.public_inputs.start_state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[inputs.previous_rollup.public_inputs.start_state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[inputs.previous_rollup.public_inputs.start_state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + +[inputs.previous_rollup.public_inputs.end_state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001000" + +[inputs.previous_rollup.public_inputs.end_state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000100" + +[inputs.previous_rollup.public_inputs.end_state.partial.nullifier_tree] +root = "0x04b89693c560acc37f1128ecfbd9c925ee625ce93bb67552296b841d64a8f6f6" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180" + +[inputs.previous_rollup.public_inputs.end_state.partial.public_data_tree] +root = "0x240338b183a6288d293ab1f4bc6b3473ca99c833c34c1c4349a492a6233bcb55" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" +>>>>>>> origin/v5-next [inputs.previous_rollup.public_inputs.start_sponge_blob] num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -567,6 +631,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 squeeze_mode = false [inputs.previous_rollup.public_inputs.end_sponge_blob] +<<<<<<< HEAD num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000087" [inputs.previous_rollup.public_inputs.end_sponge_blob.sponge] @@ -582,11 +647,29 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x22b3946d4e314d5204db5a09eccd5fddfec86678582867a5bbda12432a2dd64f" ] cache_size = "0x0000000000000000000000000000000000000000000000000000000000000003" +======= + num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000088" + + [inputs.previous_rollup.public_inputs.end_sponge_blob.sponge] + cache = [ + "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a", + "0x04b89693c560acc37f1128ecfbd9c925ee625ce93bb67552296b841d64a8f6f6", + "0x240338b183a6288d293ab1f4bc6b3473ca99c833c34c1c4349a492a6233bcb55" +] + state = [ + "0x0f3270dcf29bd89dc9888dacc4b7e889b53fca36c7aad2cdc3475e2fb992b35e", + "0x02ba96982fd062d4354a2fb984939c7f28b215704ccc7ef3f2a34880336b44cf", + "0x054fa8762729ccb753d4911c2e5bbe05f0a454f759321ab73b7985b2801d3f9b", + "0x0dae150c87de07cfc10f3c2604ae7d546218106c50f78cf88b042b0c6b68e47d" +] + cache_size = "0x0000000000000000000000000000000000000000000000000000000000000001" +>>>>>>> origin/v5-next squeeze_mode = false [inputs.previous_rollup.vk_data] leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" sibling_path = [ +<<<<<<< HEAD "0x02904385b9df599026d8b15d1015623ccc1b22881f9cdae1f57b519af5580631", "0x0f63dbbd49436fb3261c320d539cfbec7d375147081e6787c7ae161d25a9581d", "0x0a2818ba5dd5624d91f012822293d4135b8958ec1d8ab6cf952ee3de138bb8c4", @@ -594,6 +677,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x22f4e6497a7b25cb4baa538d7485c88094a612f07795194d171fa482dd7d50cd", + "0x1e2816440bc3692c3cd5405a6b4c0b16b0b944cec0d6fbb1d705e378d4abb7d0", + "0x18b9d1703288fad007e0e97212dedf18305ab172790fe8d5c7aeea5c2634673b", + "0x0ac3d5ba2d696f54d85ea3f4452268a5f7ab85f8eb9d25ee9af45acac10a47e1", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollup.vk_data.vk] @@ -719,9 +811,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.hints] previous_archive_sibling_path = [ "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x14e4b977b2203b70e6ee1c2456eb7114d090fe4b907f631eecd0919fed432e7d", "0x09308d0807f5aed64dd43d2014519a161c32f9a52ea75992cc18bec0bcde410e", +======= + "0x0a6a21304aaa7d05b29b19ffc4ea8c9d3c88659720df8b59b14b5d4c96302b53", + "0x259b5249d4fab01f19c77064c1d207066513197fdd4121f8f402f7b5ef7e0f0d", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", +>>>>>>> origin/v5-next "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", @@ -757,6 +855,7 @@ new_out_hash_sibling_path = [ "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c" ] blobs_fields = [ +<<<<<<< HEAD "0x00000000009c70751800000003000000010001000f0000000000670000000080", "0x1d5eca2c8752fa06d9d1ecd4578d2199986802a4fa302e01dee816659b53c8de", "0x00000000000000000000000000000000000000000000000000198e45581dc500", @@ -771,6 +870,23 @@ blobs_fields = [ "0x0000000000000000000000000000000000000000000000000000000000000002", "0x1e495537a58fe255952a20bc319ebbf9d5eb2bc2692addbee2f6f97f946eae28", "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d", +======= + "0x00000000009c70751800000004000000010001000f0000000000670000000081", + "0x299940aaa43390eddb8dcfbcc1a804ea8e55c4f240dc3e96550f505f6816fbdf", + "0x000000000000000000000000000000000000000000000000025798918fcdec00", + "0x2cf7c5914b1b832c41d256a7bb0eeee95eb11bb95c73c4dfb76187bb96a2de28", + "0x14bd0ac8571506d0c23c806519a65c7b7db034e372701ac6129c2682f2dfab1b", + "0x04a1913c790517c38bc0b626f9bd93fdc0ac87dd4078c1a3856007dcd1d40037", + "0x2a39a8ac8b1b52b8d62f5852f15e31c0c1314395eb5caeec64fbaf0aed92a5aa", + "0x21fc750a8b31b045081f1fdccf15a3efc50cde236647d27c23a0e355ec8e832d", + "0x00000000000000000000000000000000000000000000021e08c354dd9c5fb1c0", + "0x000000000000000000000000000000000000000000000000000000000000000f", + "0x1a7e1badb79abdd38c684b3c8306ffe7ecb33c69e3380d9855730aaaa83a21a8", + "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x24ffcddc6d00c53f277dbe2482d23f64c62bbd6a18ac7952010c0287a8a52b48", + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x14fbaeaeddaa69be81d404c684e78e9f1a786d225faf8de2ce97c92f67d89a26", @@ -780,6 +896,7 @@ blobs_fields = [ "0x082c6d164b0ba073c9dd911100248c8ecd80b03f82f38531856a3c16dadcbef0", "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356", "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496", +<<<<<<< HEAD "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x20f5895a4e837356c2d551743df6bf642756dcd93cd31cbd37c556c90bf7f244", @@ -787,6 +904,15 @@ blobs_fields = [ "0x0000000000000000000000000000000000000000000000000000000000000001", "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27", "0x2501a258c0ca8b1e06c26e9949c9e935d5e3240d83fb04d725d2e9da233c2382", +======= + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x20f5895a4e837356c2d551743df6bf642756dcd93cd31cbd37c556c90bf7f244", + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c", + "0x05ac5778b7eec9fdfdb5e2102deabb7d7016d8f4abe75e578fe82a4233e527b5", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000bb8", "0x0027000204012800000104804527000004452500000041270203040127020404", "0x00001f0a0003000400442d084402250000004b270202044527020304003b0e00", @@ -885,6 +1011,7 @@ blobs_fields = [ "0x0000220902092d0e020900220902093c0e07082a0100010575fef108377c8a4f", "0x003c0402012600000305072d0003082d0004092300000baa2d0108062d040609", "0x00000008020800000902090c0008070a2400000a00000b982600000000000000", +<<<<<<< HEAD "0x0000000000000000000000000000eb8dcdbf000000006a4d22fd000000090001", "0x000000000000000001c00000000006000000000200000000008b00000008992c", "0x1842a814b068f699565f4df77ab9139f1cfab687ef959bf92ba0bb3adf93d8dd", @@ -894,6 +1021,16 @@ blobs_fields = [ "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a", "0x0000000000000000000000000000000000000000000000008c63744300000088", "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x0000000000000000000000000000eb8dcdbf000000006a33f62c000000070001", + "0x000000000000000001000000000004000000000180000000008a00000008d7ac", + "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af", + "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146", + "0x04b89693c560acc37f1128ecfbd9c925ee625ce93bb67552296b841d64a8f6f6", + "0x240338b183a6288d293ab1f4bc6b3473ca99c833c34c1c4349a492a6233bcb55", + "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a", + "0x0000000000000000000000000000000000000000000000008c63744300000089", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -25334,6 +25471,7 @@ blobs_fields = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000" ] +<<<<<<< HEAD blobs_hash = "0x00f09841b6beb6ac35e2d402e872f1408b67f5c5c84e46dc3787b46156d7f84c" [inputs.hints.previous_block_header] @@ -25370,13 +25508,55 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.hints.previous_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= +blobs_hash = "0x0081055820348c1aa99b8365a72d9a7008e4324fd789ff4f85c0bf158822063b" + + [inputs.hints.previous_block_header] + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [inputs.hints.previous_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[inputs.hints.previous_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[inputs.hints.previous_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[inputs.hints.previous_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[inputs.hints.previous_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [inputs.hints.previous_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [inputs.hints.previous_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.hints.previous_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.hints.previous_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" +>>>>>>> origin/v5-next [inputs.hints.previous_out_hash] root = "0x00c95e0ceb41951039e1592745ec2faea9866f6eaf01bf189a4463b4143af093" @@ -25421,6 +25601,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [inputs.hints.final_blob_challenges] +<<<<<<< HEAD z = "0x1fdc12adc29013642cd3e65ed4fe6257a51f0de3dbf9aab308d2eb764d2e2a6c" [inputs.hints.final_blob_challenges.gamma] @@ -25428,6 +25609,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" +======= + z = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + + [inputs.hints.final_blob_challenges.gamma] + limbs = [ + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +>>>>>>> origin/v5-next ] [[inputs.hints.blob_commitments]] @@ -25435,18 +25625,32 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.hints.blob_commitments.x] limbs = [ +<<<<<<< HEAD "0xdc0744575b26b4c4b7ee41dc7bee5a", "0xab24ae0f1c266615b22dc3e9ffeecf", "0xb738f18d636a06615561d266fd2d4d", "0x19668e" +======= + "0x5a46b4be73c266bdb792970040bbeb", + "0x125cd9e006d74eda609388cd98755d", + "0x66f0dac76a804c3f682b5d4a81d546", + "0x0d99fa" +>>>>>>> origin/v5-next ] [inputs.hints.blob_commitments.y] limbs = [ +<<<<<<< HEAD "0x713d223616e8efe8cd4821efdde4f2", "0x9a9a221be261841a9296b4d1eefd77", "0xdb1af24cb0ccdcba1a7900c4fc1ad5", "0x15b665" +======= + "0x2b3a11988fc52e276276332781b0e4", + "0x0043350b88d1973d7b748de360428d", + "0x6d5698edde301a16d3504569984c86", + "0x0d7a47" +>>>>>>> origin/v5-next ] [[inputs.hints.blob_commitments]] diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-root/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-root/Prover.toml index 9f03a7f168e9..529cfdfb5932 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-root/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-root/Prover.toml @@ -484,10 +484,17 @@ proof = [ [inputs.previous_rollups.public_inputs] checkpoint_header_hashes = [ +<<<<<<< HEAD "0x003f28245501cd83312b059b7469c9efcbd17cdf1b87748a6684380140e8b8f4", "0x004395c583aa5d8b61d95de30020015595c6ff15a98a908376053c285e760047", "0x001610d9516c5c3da43228cf8c78b4f8b0fbc41ac4fb52e8c263f5389f0c39c2", "0x00cc4a04e2f982d4a235549d9cea86e657f0f84a2624baed667bc007ac6adbbf", +======= + "0x008aebd28052709e579ed4fab663014bc6d26f65fb7463cac29a4595678f77b5", + "0x00c8eaf3ebc6bfb23e465e84e24c4761e920305468c1638ef5c2f1ecef0f6501", + "0x000e630a9fc7382da4566104e110605a9dc26ed3ba38637f4e93f8f7a0ff90e0", + "0x003e26c028102349f3a47eec4dd860363bd0dee2d978bcbaf03bd958583c67ca", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -520,6 +527,7 @@ proof = [ [inputs.previous_rollups.public_inputs.constants] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" +<<<<<<< HEAD version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" protocol_contracts_hash = "0x080e3881bdd4a4e78d52691e5543b50cf820f51baf52af42d7b58c9e15f96ec7" @@ -532,6 +540,20 @@ proof = [ [inputs.previous_rollups.public_inputs.new_archive] root = "0x02b768bc715afcefe7acc2a4394dc1ec3d36e9051f52662c42c795597ad03956" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000d" +======= + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.previous_archive] + root = "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" + + [inputs.previous_rollups.public_inputs.new_archive] + root = "0x1a85f2cf02cc2d081cae9fa6d0350dabc3e6303336034855a00d11535250b686" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.previous_out_hash] root = "0x00c95e0ceb41951039e1592745ec2faea9866f6eaf01bf189a4463b4143af093" @@ -542,6 +564,7 @@ proof = [ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000004" [[inputs.previous_rollups.public_inputs.fees]] +<<<<<<< HEAD value = "0x00000000000000000000000000000000000000000000000000198e45581dc500" [inputs.previous_rollups.public_inputs.fees.recipient] @@ -564,6 +587,30 @@ proof = [ [inputs.previous_rollups.public_inputs.fees.recipient] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + value = "0x000000000000000000000000000000000000000000000000025798918fcdec00" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" + + [[inputs.previous_rollups.public_inputs.fees]] + value = "0x000000000000000000000000000000000000000000000000002720f1624aec00" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" + + [[inputs.previous_rollups.public_inputs.fees]] + value = "0x0000000000000000000000000000000000000000000000000020a8fe232c3400" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" + + [[inputs.previous_rollups.public_inputs.fees]] + value = "0x0000000000000000000000000000000000000000000000000023c7951d452c00" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [[inputs.previous_rollups.public_inputs.fees]] value = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -772,6 +819,7 @@ proof = [ ] [inputs.previous_rollups.public_inputs.end_blob_accumulator] +<<<<<<< HEAD blob_commitments_hash_acc = "0x003c3d7634e4804fa2d1579984557d5e0f193db092992632750e0f02435c536e" z_acc = "0x2e5590725ce897557051bcd8e235179ca85612f775e25899d41e2e6d429bab8f" gamma_acc = "0x1a92da981183c7c99558cbbf36266f907c24981e57e22325cd913d6c0b511f0c" @@ -781,6 +829,17 @@ proof = [ "0x51460e3323b2335762b279af363d8f", "0xfb02d1de4f7cbf4de93446d5162177", "0x64ca" +======= + blob_commitments_hash_acc = "0x00f4a16c4720f16e408f8af13b5f16b70d31067f8b33974e23e56dc1196012c8" + z_acc = "0x1f34e0353f2c8973a4149f49e2d0661ca0b4477bc43fa08b67bfe85df073850a" + gamma_acc = "0x2082ea3c15ae317e14314053c6fd2de32d1db936a6350fd21d968232581e8aa9" + + [inputs.previous_rollups.public_inputs.end_blob_accumulator.y_acc] + limbs = [ + "0xce4f94c3821081a923cd8a1a027c09", + "0x934eb91fa8461a5b530a706973eb1f", + "0x0ef2" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc] @@ -788,22 +847,37 @@ proof = [ [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0xe30b704d93a13e80d6b61851ffbb42", "0xa6582dfbfe7c7fb2e4cb46ca26a4a9", "0x58d8f47578a73f78ec55404027113b", "0x088313" +======= + "0x4d0df6c7f4c9c898f0bdccf1fe6a8d", + "0xe68e793159211e5ab73b2880fcd930", + "0x5d85fd801d2da251d7f68655f31ac6", + "0x0043fb" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0xac35297801db6e89bc7c01cccf1c2c", "0x5a8cdb9c6da878c061855cde01bada", "0xf8ade47e6b400bf343963bce4206ac", "0x02c72c" +======= + "0x713df49eb3d01c5385c4d54f6c47e3", + "0x4dda66f9ffcb18c152c048286ac3dc", + "0x7c16b49618fb65a5eaf42334ce278e", + "0x00a6eb" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0xf3d1444be1d67a5ae57a7a5347f063", "0xd40b5f08dc03ca05b5c582e87600d8", "0x11f8" @@ -817,18 +891,42 @@ proof = [ "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" +======= + "0x2095de32dd8919045da1b290ed43b7", + "0x2a73ba5addb7cbf3d61f7214088804", + "0x6fb6" +] + + [inputs.previous_rollups.public_inputs.final_blob_challenges] + z = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + + [inputs.previous_rollups.public_inputs.final_blob_challenges.gamma] + limbs = [ + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000013" sibling_path = [ "0x1e7976567fc760772e92450d8ac6f02ef47edb23baa7459dc33c0ceb6c88497d", +<<<<<<< HEAD "0x23545acba1dbc9308d912f371ee6d2f31ab1da4eccf3d019473d8ab7205adf27", "0x035c573a1f2634405482213a2b805e186d6b81073e2b7a5bd3f64c2e4e8bc21e", "0x033c4d295fe10d44c10ab7dd6b98731454b30ab8a3b175477338750c07bc4023", "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x14a4c1688e99c9278a4dd045292a0aaf70403759de230ffdc9f19e4c3542cf40", + "0x16b2badcee9942797f8da1d56bd7962f78a91ab801f141782aa669b2b41261f2", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] @@ -1437,8 +1535,13 @@ proof = [ [inputs.previous_rollups.public_inputs] checkpoint_header_hashes = [ +<<<<<<< HEAD "0x0004d83706262d94ec97b0559d4e179a4f09a706bb9eb8b2058a66c51326acf6", "0x002aac8a431c2893be6234fa1bad8e46feaa3f51f373e8257ae75b10d086b9eb", +======= + "0x00c47fdb6fa463e4cc32d5da157012c73b018da598e1a8de7559cc75230ef270", + "0x007bd9c23addcf1ade40880d99fa082206be070fa7888c3656c6f617624fabeb", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -1473,6 +1576,7 @@ proof = [ [inputs.previous_rollups.public_inputs.constants] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" +<<<<<<< HEAD version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" vk_tree_root = "0x1cd59fb7641f17e0fe2998b3ebc3c3d71e3f4ad4eeb883be55e3bf04749fe247" protocol_contracts_hash = "0x080e3881bdd4a4e78d52691e5543b50cf820f51baf52af42d7b58c9e15f96ec7" @@ -1485,6 +1589,20 @@ proof = [ [inputs.previous_rollups.public_inputs.new_archive] root = "0x253b8ea9561900b964ddb9bbc5e4545faa4fb79db30b2da3643242530c2ab4f7" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000f" +======= + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.previous_rollups.public_inputs.previous_archive] + root = "0x1a85f2cf02cc2d081cae9fa6d0350dabc3e6303336034855a00d11535250b686" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" + + [inputs.previous_rollups.public_inputs.new_archive] + root = "0x00bf82d0879ab6008d2d71b1aaed8644cf5f630d6f8c2f58c00e5754850eed69" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000d" +>>>>>>> origin/v5-next [inputs.previous_rollups.public_inputs.previous_out_hash] root = "0x00c95e0ceb41951039e1592745ec2faea9866f6eaf01bf189a4463b4143af093" @@ -1495,6 +1613,7 @@ proof = [ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" [[inputs.previous_rollups.public_inputs.fees]] +<<<<<<< HEAD value = "0x0000000000000000000000000000000000000000000000000001646623a26e00" [inputs.previous_rollups.public_inputs.fees.recipient] @@ -1505,6 +1624,18 @@ proof = [ [inputs.previous_rollups.public_inputs.fees.recipient] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + value = "0x00000000000000000000000000000000000000000000000000116817cf81adc0" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" + + [[inputs.previous_rollups.public_inputs.fees]] + value = "0x000000000000000000000000000000000000000000000000000672f1177cbec0" + + [inputs.previous_rollups.public_inputs.fees.recipient] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [[inputs.previous_rollups.public_inputs.fees]] value = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -1687,6 +1818,7 @@ proof = [ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.previous_rollups.public_inputs.start_blob_accumulator] +<<<<<<< HEAD blob_commitments_hash_acc = "0x003c3d7634e4804fa2d1579984557d5e0f193db092992632750e0f02435c536e" z_acc = "0x2e5590725ce897557051bcd8e235179ca85612f775e25899d41e2e6d429bab8f" gamma_acc = "0x1a92da981183c7c99558cbbf36266f907c24981e57e22325cd913d6c0b511f0c" @@ -1696,6 +1828,17 @@ proof = [ "0x51460e3323b2335762b279af363d8f", "0xfb02d1de4f7cbf4de93446d5162177", "0x64ca" +======= + blob_commitments_hash_acc = "0x00f4a16c4720f16e408f8af13b5f16b70d31067f8b33974e23e56dc1196012c8" + z_acc = "0x1f34e0353f2c8973a4149f49e2d0661ca0b4477bc43fa08b67bfe85df073850a" + gamma_acc = "0x2082ea3c15ae317e14314053c6fd2de32d1db936a6350fd21d968232581e8aa9" + + [inputs.previous_rollups.public_inputs.start_blob_accumulator.y_acc] + limbs = [ + "0xce4f94c3821081a923cd8a1a027c09", + "0x934eb91fa8461a5b530a706973eb1f", + "0x0ef2" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc] @@ -1703,22 +1846,37 @@ proof = [ [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0xe30b704d93a13e80d6b61851ffbb42", "0xa6582dfbfe7c7fb2e4cb46ca26a4a9", "0x58d8f47578a73f78ec55404027113b", "0x088313" +======= + "0x4d0df6c7f4c9c898f0bdccf1fe6a8d", + "0xe68e793159211e5ab73b2880fcd930", + "0x5d85fd801d2da251d7f68655f31ac6", + "0x0043fb" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0xac35297801db6e89bc7c01cccf1c2c", "0x5a8cdb9c6da878c061855cde01bada", "0xf8ade47e6b400bf343963bce4206ac", "0x02c72c" +======= + "0x713df49eb3d01c5385c4d54f6c47e3", + "0x4dda66f9ffcb18c152c048286ac3dc", + "0x7c16b49618fb65a5eaf42334ce278e", + "0x00a6eb" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.start_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0xf3d1444be1d67a5ae57a7a5347f063", "0xd40b5f08dc03ca05b5c582e87600d8", "0x11f8" @@ -1734,6 +1892,23 @@ proof = [ "0xb60ca1feed35bf28340ef17cd871b9", "0x698569825a1ff49eccccd108c34514", "0x5410" +======= + "0x2095de32dd8919045da1b290ed43b7", + "0x2a73ba5addb7cbf3d61f7214088804", + "0x6fb6" +] + + [inputs.previous_rollups.public_inputs.end_blob_accumulator] + blob_commitments_hash_acc = "0x00e1f280c58fa8eab4124099c460c92f6aba7cfc7e787cd15feff3dd677c3db9" + z_acc = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + gamma_acc = "0x2305de3c74578c2ca243e0d960612ead7ac723056efef8cfdb245c56ca2dd058" + + [inputs.previous_rollups.public_inputs.end_blob_accumulator.y_acc] + limbs = [ + "0x02dd8c2e0bd8a5d392c4dbc4e20fef", + "0x91f64918da5bc9be9c628e73114441", + "0x2bd4" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc] @@ -1741,22 +1916,37 @@ proof = [ [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.x] limbs = [ +<<<<<<< HEAD "0x43aaf3d0c121b4d96780dd687e365d", "0xededee37534fd55f1e3decf2d6631a", "0x788976bdd69c9611dc7639f3de0668", "0x165528" +======= + "0x15be7166844de1c20156dd73673b28", + "0x02c07051605576c6bfe803b89cbaa2", + "0x24251555870acc40fbeeab06aa934e", + "0x146b8f" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.c_acc.y] limbs = [ +<<<<<<< HEAD "0x7132fd22120449831964d6a5a42921", "0xf87224d4a7813465361b659fbc6c27", "0x7fc9439e7e2242a18bdfd802227a55", "0x133ea3" +======= + "0x80994404d63816338794d090d76fcb", + "0x11d0594725bf56a861a22d0aa529d0", + "0xbf6cc7248485b79b357c0c732f1c1d", + "0x07449b" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.public_inputs.end_blob_accumulator.gamma_pow_acc] limbs = [ +<<<<<<< HEAD "0xdc7bf8e5c80213b175acab6de8764d", "0x2602f93c359de53d2a3f3a57561292", "0x4978" @@ -1770,18 +1960,42 @@ proof = [ "0x3091f45075ebc6c0e8bd0d0b55148a", "0xba36f4511ca8e170b8a14a64a7418f", "0x070d" +======= + "0x0eefe1b0885611e7eba4e7fa0afc8a", + "0x07d948591f606d63a94a054fa2135a", + "0x1087" +] + + [inputs.previous_rollups.public_inputs.final_blob_challenges] + z = "0x1c910f9cf6691359f2efc115248ebd2329bb702e2992673aa3af7ea2d88e7051" + + [inputs.previous_rollups.public_inputs.final_blob_challenges.gamma] + limbs = [ + "0x685b578d8164226a0d6459ce361f01", + "0xec461be910154e5d1c63872a7617c5", + "0x2d70" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000013" sibling_path = [ "0x1e7976567fc760772e92450d8ac6f02ef47edb23baa7459dc33c0ceb6c88497d", +<<<<<<< HEAD "0x23545acba1dbc9308d912f371ee6d2f31ab1da4eccf3d019473d8ab7205adf27", "0x035c573a1f2634405482213a2b805e186d6b81073e2b7a5bd3f64c2e4e8bc21e", "0x033c4d295fe10d44c10ab7dd6b98731454b30ab8a3b175477338750c07bc4023", "0x234c347546637311dad66534e5274a6a5db5da51b51baab040dac88807024ce5", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x14a4c1688e99c9278a4dd045292a0aaf70403759de230ffdc9f19e4c3542cf40", + "0x16b2badcee9942797f8da1d56bd7962f78a91ab801f141782aa669b2b41261f2", + "0x0bc02a85a237d73d80a09bc431f88e97f539a924ac9f0c11f1e97f336b813162", + "0x2ff640b5d46230c1d8cfaa441e3aa6d269d87cb7cbbfbef66fe8451ee7570087", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.previous_rollups.vk_data.vk] diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-private/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-private/Prover.toml index 2d7de57f0d0c..d8e26b2c8426 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-private/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-private/Prover.toml @@ -1,9 +1,15 @@ [inputs] anchor_block_archive_sibling_path = [ "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x14e4b977b2203b70e6ee1c2456eb7114d090fe4b907f631eecd0919fed432e7d", "0x09308d0807f5aed64dd43d2014519a161c32f9a52ea75992cc18bec0bcde410e", +======= + "0x0a6a21304aaa7d05b29b19ffc4ea8c9d3c88659720df8b59b14b5d4c96302b53", + "0x259b5249d4fab01f19c77064c1d207066513197fdd4121f8f402f7b5ef7e0f0d", + "0x30105bad22ddcc508b739b7c9ad87a561c569ff5cb0098a853c1c4ac21b7a037", +>>>>>>> origin/v5-next "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", @@ -34,10 +40,17 @@ anchor_block_archive_sibling_path = [ contract_class_log_fields = [ [ "0x20f5895a4e837356c2d551743df6bf642756dcd93cd31cbd37c556c90bf7f244", +<<<<<<< HEAD "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x1a46c5781598e4074ebb3bababaee59adf89f1c84cffe38a4e814818f1c2ad27", "0x2501a258c0ca8b1e06c26e9949c9e935d5e3240d83fb04d725d2e9da233c2382", +======= + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00b1bbe1b0b9d3a044988eb13e09edd3f9199b0a6eec2cf8d981d99e5693606c", + "0x05ac5778b7eec9fdfdb5e2102deabb7d7016d8f4abe75e578fe82a4233e527b5", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000bb8", "0x0027000204012800000104804527000004452500000041270203040127020404", "0x00001f0a0003000400442d084402250000004b270202044527020304003b0e00", @@ -3061,6 +3074,7 @@ contract_class_log_fields = [ [inputs.hiding_kernel_proof_data] proof = [ +<<<<<<< HEAD "0x006015d6568d2478a216b04c0e98133cdb0f9a0d368dd5bbbc8f0453b97f4ddc", "0x00a3a98b9654d263665f12bfaa0979c09ae128bf57359be88cb00d0718c58b4b", "0x0027b1770e9390fbf500ff4c60cf8b0b3cf4471290f7e68b9fd3da14d1ccc36b", @@ -3976,6 +3990,973 @@ contract_class_log_fields = [ "0x00c55327893858f7615b22015697202306f0144aa1e2588dcdb6e3f567d3daf4", "0x00ff87f01ff479492c474f74ad549c993c24e8cafc8c2c3acdbea044d31a4aba", "0x005bbf093a87505c2421fc8001d55147cadf86a7632bfda348f1d96a51fc7d71", +======= + "0x006ba28db601b6ef5f48c3586ace2c5bd7fe3b865dc1595ba096828f690d1976", + "0x0020c3e47966025a25d109a70f4ff8c49e46d9773242b008178c01ef239f98e3", + "0x00bf0d2235161711d607046bac1cb5bee9e706ce4b94199c10565153c4a6ca0d", + "0x001f53982f6769299dc573c710b2edea38b813237eea98e224bd923e6d517018", + "0x002bb077f2529ad5eaea1b1911478468fac9d1740499db5bb785661f9bb634fa", + "0x00ed753b9f40027b219a17af26a2c46c41913275523d91e83d3d71d4cb4d2955", + "0x00052b95e8733ebabec97181fae8d2da7912752b8ecbcb2e56004e081d7ab202", + "0x00f6d8d45eb32f08f5c8573bb8c92802fce852cca5cc2900fafab31864fc9e8c", + "0x00a6728ee814410752bf190e4063e6cfc47d1a59fe52d76821865b9d6f087cff", + "0x00596b43b76ca28cbdae59a5a10164031cc886b1a6586545b030e4561217f486", + "0x00a94dbf319820b8a0d6cfd0eef6deb976365db3b3f56a7c5ca4b7338ef8a97c", + "0x00669c34cdb63e7292602878f2cd16b979a9ddebbe543a9623e98ac1fd4b42d1", + "0x002814b4735cf633cc3963f9997b0b0c501bb3a624de7db3a140a3635c66ca20", + "0x00add4046ec411e7ee9673aa14da85779804274d3a52cff10d342c51e9cf8fbc", + "0x00bd460cab3d75e8146fab36388197623fa0fc7a8475f8509bfeaa3919d39507", + "0x00f67c48a6230bb70cf356856e60f0159a457123fed48d8f3223b01015b8dc68", + "0x00d4b39eaf276820158bd56bd3c349fd9b399112762213ef23451dd8827a319a", + "0x00bd8687e7d787d56287553bbae5c82b814396eb7b3c8f3d4025cf9d405b45d2", + "0x003e0dc1e340e301c96e6f69354d036f825f8ad158e2c0607c828efc8bd02caf", + "0x0084b016755c33b310e98bd3180aa286922d646fd43686e5da021e6eb8fd3d06", + "0x00c40d593c3a6cceaa190056356cd7154090b5f1b9c26a26cafc9c52dcd989cd", + "0x00883cccb11545ddea6fccfb462e13ba13e957838f9c7b401eaf02ead902ea6d", + "0x00f49eae340a203c60c5b759517c067da4c414a303c5bd9be23d8ed07dd85b8f", + "0x007f3af834a99035c72efe422c25c7e6fc1b67a4a8bddcf47de525391c3faca3", + "0x00225af39a35b9a059e7f3cb7a2beb8b97cbad463c18ffc8d8e84b3fdff289e6", + "0x004aa4bbf2ebcbaf15c669c10a44d0965ff67a32af78ac0ff7fbe581a2d72888", + "0x00f1cabae3b3fa16dc996fc8d18491eb276f25dcdb06009241352a6c9b86d742", + "0x0065c321dade0af5b6657f8efd82a1698be16801f87efc0b0eb6da97e31a9155", + "0x00682110cc873e7d3ad96dedffc245cb39c8d83a0850cc2e9dfb12d268ba2b57", + "0x0016ef2729c5aa3197e8673573d74c76125b0055fa61704cb17530dd0c182960", + "0x0003238502ceee0040938627af666b186fc16ffa345844de4df0a89de8a759bf", + "0x00e6db2c318f074adc9e3e1506a7cad998684c67265a7f8860cbac5fc2bb3d61", + "0x007da6a23d659acef593f0a4bb74cbe5c4f4e8d819cb7f53d5ba64f5a8b96e71", + "0x00836ac717b65b974137288589ff43620bb192e1f2cd2d9dcde807d9ccf9e25e", + "0x005500af75443553ce7bfb0e18edca550fc3f0b4383803d3b6dde78a5d0bf8e2", + "0x00ff562c75a304ca8ef41a6a98537d314c52ec4676e0175ca53e927bdd0c5b83", + "0x00f6e7dd7e30c90d9834f73aa9dbb97fcdb2af0af54407cff7b291dd14318cf4", + "0x00f7990b6d2e6d762c893f7a85e336e99abdbfeef218b9334fb11bdd99d3c1b0", + "0x00f818231e5c4548de725a481cfd500f603cfe3f59624d069444f8b082ef888b", + "0x002634e8739409f2b094b55a4217999d00f8c278b9145eb85ec49fa98aab1a95", + "0x003d5ecc610c427859f1a4b4bbbe45849584c73793b2ef1f0344f410ae1f3668", + "0x00c8dcf105db6c292a96d4805e7b23faa293fc97480af72e17af28418c23a571", + "0x001c6b1498637965e0fdc1a8266c992a870216c5a87a456d54c4011836434974", + "0x000ecf5269b1a028807c223fa822a855f78f265751a7ea5d1eb5ef4acde111e3", + "0x008925a589ad34f42c3c6269bf2edcf6b87c2b421b14442792344d3c64f62fbf", + "0x00492c2fffe5b19e5db68d3f8e181065f6873d72b5f7b385d9b44febf59f3c9e", + "0x0022b4cb9076951a3d5cf123c79daac8c55af48253a844f292b53e6ef67e365f", + "0x00e892f2dc27c539998ded152e14575ab6efb16494f6d9611022c733185b2447", + "0x00da559df94d129e96dd5f95af679e7e97c8227155b51136f33a98fd9aefb2c1", + "0x009cac513ec01ed35f3f3e80009c90cf2d1a6a55e6c480b9a5541d95d91038ae", + "0x00d606c58006a0cbe647e664ec3ee13ded9bf8deddf14ca9aee63a4b8e7e8f66", + "0x001f1af04e218e47586553b444e7f0ddf7cbc33d0cb02e427b91617886d13e98", + "0x00f617ae7e123ee0e826ef7d05f1add4cba2f6a1eaa27e93eacea8495a17243e", + "0x00e6691808b20c590db0062a4ad00b958bb38283d9f4662c65b800a1f270c07f", + "0x00e6ad12f06b1c468650de49398feac7223e3c11cb61a2de633d1578b711c823", + "0x00d5793fd03ab29e50ddecabc7d81bc843ecf32d215fea51fb0ae48f15aaa205", + "0x0072fde494a95d9251de7c6ea1679617371ae37955be614f073f678ebda7ac60", + "0x00fd569108e05101375a5e7ee278f71f82ed011cdd8bac3a08371450fc9df8f1", + "0x00684e5689c40c8114dddb11af27e24c47c01fef778bcd7ca8c7f7053c5f613f", + "0x009052a9180a7b5e4c6184aceb47c0fe919f91d598bca36c19a6e500b140960a", + "0x00fd9eb0cbb8876d23428ff6c3dec92534f4b17b199eb32bafe27f3cbbe66012", + "0x004dfa4609a3957b4b0ee5aa4bcc079c2f19b9fada28090f188bbf31ebd545da", + "0x00fb13f0906ed6498284cc4f1ef02e68d94c9a7c6cb778dff1f13063a5509470", + "0x008fcb766266a5a29f387ba827c1eba5d1c2bcc6fe5b8a85184f8d44fd17b9dd", + "0x00bfe0605c18bc3e332c9aad3177c7ca1850f2a7fefb1d03349da562c6214e38", + "0x00448f5cf0dff106d825cbcea41c58137fecc7274b57632bb827b96ac14614cb", + "0x007cf3b8dcdfe9b53eb401a002c404733a531ae5cb7575d0948cb5d6cbb9945c", + "0x0052db6b3e0f8efcb31f87c6004ba9ab9982064c116ee5955e6020f7f367b31a", + "0x00db06d21573774adeafc19514958c5febc65a661fcb0ac498e795a054997364", + "0x00e11eff8ca274c55948aca5b685463c26aa017cbbb063023f388a1e39192d35", + "0x006c863a3699117e9ca8de6e1c4a86d00835b3a697804f39a5be69d3b0da6489", + "0x0074f0c293106f00945cf590d0277be6c4d4eb127876b35e31924c193511d272", + "0x0042b784598939dd91e9e463f7fc5d45b23d48c9cacd2d8ebb750524485ba53b", + "0x008cfc78439843ecebd41f8ed41996c57ca292fff4489bc87f87c04cb37e514a", + "0x004a9d2e97645647e789dde3ffd68787fe51a6487ab2ff3ee613b3b5fb67f365", + "0x00c39d5ea73b68124fedab764e642999372a8aae561d4aebc4736703d6cc0956", + "0x00ca05a9d58b717e2d019b4159849447ac1bb75b2f5043c90164494055182ad9", + "0x006127874de7f2cfd9f6a7baa6065d9b1dcf3bad0311b8cf0aebc7e176111c06", + "0x00c151c2c8d36addd419c06ce59844478748b0529043d5cb99daa2cecf64f996", + "0x00e1d3233e440f9ef16d63a51393400adadfa62c6b7e897d5ad353652906d130", + "0x0047145616d7ff63f4185205a691bad08cc6ae1f737562d346ed844b601d0d40", + "0x00c9b3fd7be254683e97569bed5420af39961107ed064a98d9cfbe0e7617690c", + "0x000a1be8fa74e998c0143b516f2a4bb0ec3d0fe37096dd033646fad6ae022efd", + "0x0025b088aa2af978123d2e32859330cdee81b47e7a69da7bbb901c51f6cd7acc", + "0x0022694ea37eebc35eb9c6521ef9670be4ea237483f51ff420dbf9cd04e7e759", + "0x004f2fced103fa002bfa323e6331f055cae7d4effbe9c17850a70db3aabf9cc2", + "0x002d9e31033cf6f50df417c3f99b0742533288543c72b01662c3559495d55c46", + "0x000eaf760230e3b9e866734c09fb0e3a200b3732ba821aae5c00b83993c6c09e", + "0x00057991012c8c00ee860d36f909d8168f969c86daa23af912ba0b4e750e4fb3", + "0x003df4e87d9e38d7c10f2760f56ffe58aaccef76331f2cbe5d647669bae48a3d", + "0x00a1b838f793f0d410c7f9bf9d25daf2b9dcda042651b9b5b57867fc29850aa9", + "0x0096f2d6210c669fa1630a9ea3f63aa7320916db3759bc97ffb1656adec8ea84", + "0x00cfd2daa937f1d5e6ca3304073a6dd4f4eeab6216edac67b5dc8f52f169149e", + "0x00052c62acee38bd8c244b063ffb9e37ba8b4a7f1df11063208805463e4b8477", + "0x007ecdecbc7b60d88286afc875fb5e4a30bf9cf2245331331d4e48ff1c46ea90", + "0x000a627a6422619fe3c5f2eceb77fca58eb2dd3a8489044c31a0f31b14458b1c", + "0x0033e10984697d16ffdd7fa7bd1833e0e36aad79961b6a83493da191b3bb188e", + "0x003e61b0214d433a563ab2d655d7fcf1c1642b03df1ad909d4a983fe81d45068", + "0x0061eb30290e84a58b39910a73bd8d2e019ee1e3ed5c87c3f1c49a228476f8c7", + "0x00c29ea6ee1598547bf4bb8a288632fa3ce56eab74cb4a6510d2b88f2be35c57", + "0x006a86e5bd218b28b8a9dd216bef565c77db082e6676f127421476752ea8a19c", + "0x0057ea50f9ce85f0e1afd6898ab35fd9e5bd97909d4341da5d727c997d7a9867", + "0x007efbaab9e5980a2044c11d13fe20be07dd5329700f0cc3a0b228e1c172d883", + "0x00e74b430048ac20e9a153c754199be07b07fd876934c8f9f8d5887c954e9ba3", + "0x006faeea7e2e420f2c927ada76b42821492155ffde9aaf309453e544a0c9be57", + "0x000f405a5af472e3ebdfdead664900ba84206d03cfac8a1178321a757d1062c2", + "0x0034588154487622ef4990338ae47af6cde953683fa732cc38352e58825f8099", + "0x00e6a26db257f46081d99d9a871a58203ccc93c6eb82dcdcdc6d17d92bc9e43c", + "0x00d7dafa8dbaa365ddd298a9633f0fd093886706ce1092a85b8394395369170e", + "0x00701d131c862ec313e49f757f5436d01e1422485338f669338957cd8d642a04", + "0x003ee7246118d02eaa0b5643b5de124eac788ba721bc33ac18d1b69f24adc109", + "0x0067dcb627c018be67c2e32d10f21eb22a0e84f1b6ed5794a5ebdc07675597b8", + "0x003194c667bf706e3b3b202c7680235e21f1ca3ca19d9f0068d706dc3d292fc7", + "0x00c73e8c4705102e51e740b65d736d2597c658108dc4c3088bb8185aa5e921a1", + "0x00506c2f91a3eeeed030b0adf50f0b10e4f0a2663d700f916acd41ce399a2018", + "0x007ce997efcddeb3ff27eea9441911d8e0674464113802a47611906005593614", + "0x001296304d92a0c62bbc22cac7e79fcef8482a08926d0ea795ba6a914add1f64", + "0x00c1443b5082860e25c85f0c26add3db231ae9190b927f77e9020d4b20f4ed7a", + "0x007cac6214409b8fe18f721fa3802b95a2dffaca7d72896a5e91999f61a30597", + "0x00a4ba80bdf16cfde6582b09611d08838e1be31b5273ae135875df11c7009b59", + "0x005b72ee12f629afe1c3b3ab3aa0fb9e4d67fafe3c137f6eec9ca27177cb10bd", + "0x00942f1fe48c134deeaa7cc80aa6f8e31f05d3371ed0db8875f9f94b69cbf43c", + "0x006181147e88875e8056d2336483b5ed88941f84a9c3e7efc2ff8083752a6b55", + "0x001e62402fe0d12c7e07d972e9b4d6901d46a49cfbabb9b86cf82d41d2f597da", + "0x005b0cef851a11b5e93d43e376bec186e6d4160d662b82576a115b9423707376", + "0x007c161afc91088bd705270469369fd01be6f559e7326e2336998486f60b2510", + "0x00a1fb559b8fdf99040fc2d839562698e077495582b727e75a1e4d595444c606", + "0x00db2b96e857b8f5b2cc0a1905631776b06bf599908230bc044f073c4091fa28", + "0x00697b05847692a5aaea01979ad0c31ae36016001eeaf671301653cd282d0dbc", + "0x007b04e3d681521b5632f17113e87bc9f8ce042aa1b2fc8743856ee83d7d1c2c", + "0x00ca6add99bdce0a5a4d59a430892b914bbad2b6e409ed26514754faa779240d", + "0x00d1afc5ffc05351eebd6bf220c57763731f669a4c62cc5ee61d3439adc641ab", + "0x0002cf10f2aa4a22e763e10c479e4445b59359614b64ed0cb180ecb4b59e76bb", + "0x00c47232fc82a1dade4c8d02b31750c042ab2c089ff5f3e266a8c2ca9bbe1260", + "0x0053761b7567b5a06a52eb6f6f772c932677cc517bca1001228cbb325622b34f", + "0x00f8af51ba6fc8cf4a0b58e44647bd8af7487c4730cf0e253483c8611a3a1638", + "0x00722e2c38a67e399bb6c375ce03a71c72a1ddd9fc2d30bcbe13a6f82e22b724", + "0x007514547abc2a08f98c27d0d0e1b577c01dfce0d968f691deb8599d2169ffcf", + "0x00fda126c7a78735d69c1e0f0d0bc7caf08afe6ba90935a6a7b8d2bf6f5f6907", + "0x003dff86fc6f8eed7870aaa9008cc75c5b5cecf5bf278320aa3f6420c81e52d3", + "0x002ab3c144d29227c72859a124ff5d29b5c1cdacd2082cb6775a24102bac6302", + "0x00d084e9ccd38474159520a97769a5ea122e6ec48a1636b9cf765591a0c492a0", + "0x007306128dac81de5155ff8192bbcde84396600f7245a177e91b2eddbced71fe", + "0x00dbf05728646472bfe24a423450e208c814cb03cd735f9e708dd7536588278c", + "0x00da7ea3466e1c572dad611dd8182da72e36ed05ef9120c945e3d179f793ec70", + "0x00e0618440f26ad79c66b66d06611a06b37bb1bf1186a652866053d41c088fd5", + "0x0054567d8428d24c1af6de06cdb79bac913f4d797308bfbb84c03b0051f07247", + "0x007e27fb3ae39dc5d502027d79caf4ae7a4763ce3808658a7f9a3d14613daaa0", + "0x002160dbb374216dfce98ff492a4d6a228d509008f8bd3d4dff7951e16ecdecf", + "0x00c3d252f5d4fdb4eda88a23cd8cecfc8f6e8d8f194fae6f8546ffc0be5fee64", + "0x00df2fbfd1240c11f29e475323fd74df2839aac53e787a11a42fe0fca5fc61d0", + "0x007f7c29c2d300038d1182a6337f968ca5b9cf3160d71f56cbf1a2549d5b846a", + "0x00df10f71d308b36b0dc9da91b25183246e86378b819cf34d400d3d6d2cbcb5d", + "0x0029d316e3d6e514df2dfcd3812e63b130a43663bd56ea9b00d77081fca74df4", + "0x00c6f78b4fea87bfa1c1c3084e76c375b7a9b1481b96ec6bbbd664937c51909a", + "0x004af6e72521fd0adeec4c5eebd954693fe6b086865bf05b27d9985db561f6e8", + "0x009162e7efb23aca1f8e9531d17cc5e64336018f8ed4a845b900a7f7e855066b", + "0x005c61d6ad0b663a2285221a4da177a384e9d59c566b5896fc5cadd82944a9c4", + "0x00cb905f76003f068e31812f090a8796f19fc1f6d7c98ed9ee37ec17b8b5d5a2", + "0x0036c66a7d35d5978a4d3dd049cfa983d9c897f83fcb29820a2bc5e35a7ecf6a", + "0x001b196722b7daa2440c051e9cefd1f6bb43746e5aadc3a42503db006d0af861", + "0x006fa2e04eb49222846ec888c6d8efc4756a5fbfa191821944c56c2b20872e9e", + "0x00a7860001b2633687801d406e71dba33b78ab37d7ecfa3c4963c1d113a06d5a", + "0x0024a7b24eecd205110442804675389f3fd68ced7c7e547e4aea1e4a0014d84a", + "0x00c0b6922d001bd7a1a102f3469d24ee4674c39dd04adfd97395bc4d022a85ee", + "0x00acf3b62f4d78bcd7713fb245648b705fecfadb81ae4c8b2286620d2b8200fe", + "0x0011ea954ccd6d89dd8b68b2d0f644ad752010618a22cad5ef55bffa8f5e4c78", + "0x002a44e535b9c7099c7a00cc7ae2d4cbff54a0d7438ecdaa8110f10edac685b3", + "0x003829136238a9e777ecfad016529bd9bba44d4fd0c2f16b82c73f7aefb62ea3", + "0x00d7c5a7c43b696815ce17a0006a27efda09f7d159f1db3076aee78b00f028c5", + "0x004d92a411229bc9164a310b7be700651c3d881dd51c8f5be6d61e9112d287ec", + "0x000bb8a79a7866d37cc7c416468f6ccbc0d19f3c0556f845aca550127c2e0ce2", + "0x00a12e149267297b523f42c0e3448853a7a260f0300ca10dd1f27415d2b2b8f3", + "0x006fae508b300be3bb0ca1b63e97f9a532c7b249832e3b7e117cc83a1bb2dced", + "0x00ddbc0e8e6ddebfb7922fe928ea868d480cca5b96be5f6402c7cb8ab1fbdb50", + "0x00d1909983b82b587ccd1c74e888b06a539d8a714f72b1ff07c9ad9f256c53af", + "0x00734bece28f9d576bca187a2ef45036980031799eaf1fa4431bdfc7030b287a", + "0x0007c1ec7207b12b990918c7d220fa41d76e8346ff370c0f09e9e550c07bd8fc", + "0x00250272ae9ded13528e1b93ccac3cfed15c7ec9fad666871a3e9a9d34ae9f87", + "0x007cc3d9916a41614508fbeea50761ed3dc1bc36f25d8e8776c5bc165fda964b", + "0x00855342a73878b57b1af31001df32c8bf2c92f31e3b3343f4fef2cdf26dfbb3", + "0x0086befa6b8d334ae9b8fc192343ed223471f0c5f8d11a492fc5be7b10b392ec", + "0x00f8bb0de957c10478abbb3c0626fe0a18bb6aa24b74ad25671f24e5a5a4c522", + "0x00d73545dfb9b35d6bf4ec4999729fa41522ad224abdc73dd768ab209394dd87", + "0x00a6b91811e46a066e98a623e3c4c6449145fb022b819a8560f7e7bf0a11e07a", + "0x00680178357675fdfcab6410a3e6b0f1a7cdb44fe2ec6b012adc8a6c5198a607", + "0x00a7636f80359321cfbe6c9b4ff61c0d7da088a099e4047b37abea0ded280405", + "0x006b891998a8d0687e305386812920c40e0460eed203589216ec198c4ebcf4f2", + "0x00a6e2cd75d2e6f7e4875f359cc672b53d81015d27892a9cbab5a050f044a7cb", + "0x006f774176fef455a5b81b81eb3b4876effb3758a128f8cb00a5401dda4c09e7", + "0x00b8c0f04eea478aa88250c805bf5a0673a2468a3724e013fd063217889a6187", + "0x00a5e0dc20a0d1effaeaeb80ca4e49bb9b838091173447c3e1de2c64daf2c439", + "0x0083bc4cf7c32ebd8ce385ffa9f4126bfb5f16de3a438943e2f253c71caccf1f", + "0x00994c98f55226db91dd749f8bb70338759d02c45d0bb508eeb8463eace76b13", + "0x002e125a34a989619f5d634f0a3e9ed3b1a38bdf89f11c5ae4628c354c654727", + "0x0089d8961f6b3c05fb5692f6397d7c66f9396149e9b6e49e50e273fc740365bb", + "0x0007aac048a1201d08e5374ee8195c2eb1bbea45f36972207ab4ccacfc6a7cd4", + "0x00ee6e891fe03b760322ba42c209dd1a68b57ded002dfd0cb1599c10da713ece", + "0x00b3a114f217f2e1ffc05731b9ded7c93f723ca29987457a1fda3289ecd782c2", + "0x0053e57b1d74102d14a2b6b098bcdaa1649150e3c75a01aabb22944f3662881a", + "0x0031e99805f1f9ec76dc69ff685c21315858f6e537554efafc3baffa00adbe3b", + "0x00b0cc3a05bbc71673744bae8ec7418f6f6648a6df9539de2927b58985ff0495", + "0x002a177b6a3a4b67d002876bd92575a21d2d4fc443cccc110dc216fe370d1225", + "0x00b8607b6c63a4c126d4b5a64e8dff6938c2755ff6006fe24d7fb3e478c3406d", + "0x009d04bb3fc5a683d79713897f7afc2cf365f5e47d5db1a2a532df6ad2422f6a", + "0x00e9491b88d1c29d9f63e42101b845447489f68d6b0f556a5b208d792eef52c2", + "0x00d4fab5d1eb7ebcf68c6a65d044882097de90680cdc032ca3f7475e726cff52", + "0x00a693ade97a459bea9fd3bdb5a3a2d9ab131e8b8b66fcdd3513d98df6c96c9f", + "0x003bc724dcf2edb08de0ed3e15642bd4fe599bdcb29afdcb0bba7a377fb4d7d1", + "0x004682c5562833bfd871d593c7a75613c3270d80953ba8263818b96be3dd35ce", + "0x00f043061196729e459610ef2d5133defaa489646efe3cd7c40af9525c34e903", + "0x00bf8c90ae4814318afd26f048358d27a7f715709ea1f90f262df95af44150fe", + "0x003478f6a2420a52c8668eff165b9ff26880df45055da481480d1286501636fd", + "0x009d855699c8a43486eea8255bf4004271394ac022d37c4cbc9f836101a93f4f", + "0x00eb2cc38d2fdd8931b66044805f2ff5b890c0081fd25330f74b40c1d70138d1", + "0x00b772e75f8ca7eea1ec6b2d2c0285585e62d1e441be776585dd6a150e5a98a6", + "0x00bf56f0346dde7e7ec76ac3152768004bc66caad7bc654b5ff230bda723158c", + "0x00b18bba63c975558df8df8e69fbe9521259637a45ac90e6eeeb16c265c44c27", + "0x006a85f5d7e9579474f8f210350efaa0c0a739837491cca30733023eac179eab", + "0x004619fc760c3c61804baf2c96948482c7a4d98a4bb9a7664ed3d3328ef3f776", + "0x00cacf2bc85d40da40ba5a56720aecb1c294018c6fec4782aac03c2c4712e339", + "0x00903da5014648f7b7bc459f0f677bd4ce1d2415f11c31e0644f29425913c1ca", + "0x009fcd0bf0e03dde7812fdae7e0d9c7430103ce6a0f50e79bf5ac2c8989d94ee", + "0x00fbc1268424ace97a0548825c8bb606b6fc5b6b8e12bb3cdf822a0d7d8ed56b", + "0x002d89989b2a1e83fd4e9c83a12de4e7cbbffcde35c0083c24ab120cef7ac518", + "0x00dd11b417f9a5f6b6472c6b66ce80ab5ee9badafb9a8575325daac2fe2fc444", + "0x00451c77c2098a122335e5bf8e781af1791de444325c4eac32f5174e3b9af1bd", + "0x006bcfe6743c478b924439769e2aad2b2e02a9e5b0ca9ac4bbc629b0654a985a", + "0x004055074bf3a635448a675fef81052bba5b4ae8b6317293596d15a8f002f685", + "0x009e3ef61586555063566c62f83343797b192023dc93ecf33d94aea3ef6b0219", + "0x0030210b81a0cfce4bdeb25939b16962194fbf8effe6bf0f0e6cb6f06bdd99ee", + "0x00488da3910125cebc7fa870f7d5f00a6b3322333a5f3048b4bd48589de4d5d7", + "0x00377273dba20e655847bd3bfb1d3e8c595eb6a1c3be5a02cdcddc5cc0600b61", + "0x00cc1d6944638da84a7e5c12290e6b71c41bf99e2a1a33553637462ce95b1b2d", + "0x002ac4aa569277f7c1333392fde05970e1498362e4190f67046e760a1b591f02", + "0x00ee8cebf517404a53b50f43333193cec745c1da903ada27d263ebdd56e9178a", + "0x008b142b36fd9a55f26afb4d25c5f633bed41328b0978622881a3cf1145ecfbb", + "0x0024c3b3aa5335519ef6935da2fdd06acd5ac8ec04ef2aa454002c1948d28c83", + "0x0028974c2fc50997c0e01a37f0ff2a5695e64ae48774fa9087aa20f235b5cc52", + "0x0069793947c974aeaba81ada8a5c591f5e2f9ef7f2169591c999951ac80ca7f3", + "0x009d215e84434273eab70b42f375e9d4c9f767adcd4ac8015eb19588b030cbb2", + "0x007036a96bd33aee639fc17587c1280f1bf8e6784824b32ea96eb4152a56421a", + "0x00870ef46724f561ac83043b4f022376a5bb528131ff5d070e176e0ee24e1309", + "0x00e373f471a5231c66077c9c9a0ac2ae973f47e9754f1f9e6a4c726645f6d985", + "0x00694e9ad6bc30fefb079a4da0b35dfd6194d64eee6aa5249812cfb1280947be", + "0x00d8393dba44a830ac2e91d6b7c58f9ed7791884510ae857eac3130219d144d8", + "0x00e18cda9eb954c99412dd188f2f2d8ac4831d3c1d6c711296934f860177d903", + "0x001cf7fe01b24f76c6342866b326fb24947523b2d8aca4cce4d41d965dd0bada", + "0x008453c77125140a51b5240da41e39e6dfdfed8fa4010f1d95ec526f30ccb88d", + "0x00159f449b29a508bb789d812c38eac71b1ed50fcb6cbbbb16f78cd1a9b7a6b2", + "0x006395bc69a1f0d6d069f13eea3057d517423468ec56bcf029de44c90703b51f", + "0x0080999662dd3546bafbc9a939d6b3db46c10e61ce9ea01ba33f2e96598978d7", + "0x002d1a8671002c6394e195f37fcf15731e005c75d063fd3352dee285fa31d2ee", + "0x006c146123d8d4fe8caf64db6b6633ecf06b36b3f8821bd84bcb6a8f0bc25b91", + "0x0015f28cd23ea3943c6cf4da26a9c7ffe6e6520bc87f9f4da72134959847d7c9", + "0x00f58f4870bcf60f8fa695add06d0c8ed2f369576ccda002d548c539ef2bd0a7", + "0x005415fce7d85ec29327765df42855c45e8f5bea8893561facaec21059470448", + "0x009c7cbfa4dd56c47795cd89ac43c4d2db0d20974afbe8128d7302c9d7b83d77", + "0x00545f7ba6ce888eed0185831310d25c4af2fe3a1a45ab43218dc5da40b0d870", + "0x00102b5e5234b165c6e02711dd6586fc6bee84f820bc5ee024d3e8c06f3881f6", + "0x00d9bd679a2f4c15fd6a7b5c409e829da8a6c297649d7f44f6c3ef19ed8d7d01", + "0x009478bf93ffdfda8f9a8ed549709a18eb0ef3646e78f754ac9389e4907d5b56", + "0x00a4708c87b7a4ce780b69cb8306de4fa7741a1be1c7c9ee7864f13a9f45bfe8", + "0x005cd005419d31f1266fde65e886e86d5d394e3f19a2a5ddf4cac385c0c32d6b", + "0x00cbfb3140ec8089afe846aa5ca460aca85a58051f1f1462a8daf26e01d39039", + "0x0053bda2736293c6562013da2caf34bd9d77fe84f28a9921ba8deca1855f7363", + "0x001b17998b74c351a609c634c8b02f2ee2a8cccaa2b2b6839eb9505644fb9a69", + "0x0097c2759f5e200ac41d182875ddfc11dce582e86c1f9113c998f9073dadd62d", + "0x00324a423a8d00b2f10122dd6cf3a5f53de8a6e4164f349ea6cc13b3ca07516a", + "0x007e83ce87b11de7510dec30541e33ea9f25c2bed877e292e538adde099a80a4", + "0x00dd23129da56e15571397ec06c505eefcf6ec2dd36e4290b9aeb0497ada3499", + "0x00ec6af0908aac6882e629373a0545cb0b11106f48fd47d5cb9cbcbd4feff1d8", + "0x00fd07181f0c3593e13cb89de2fe43484aad71ce1e7aebbec999e3848e405d63", + "0x00cd74b97349824fa62ddd7a254adeea36eb0cf102f78dbf4873d6c4a1c37e03", + "0x0072726e5057379148bb64bdec26b4d76995993a6b26fb491889dbc3d9d78cbc", + "0x004cdeda206711aad75a473bd4daf2281d1830df9c200b168fcdb0bb8fd40654", + "0x00a620f54f149baa8b475e5c1545afbdce032c324456d33ed09803787906d3cd", + "0x001568f3bb93c3ae2b1756bde5f85c25a626edd581f3e99aa2e6ba09e56d7617", + "0x0089fb9814109422a6dc0bf229a440c4915ec3358f95489b7435c91ec8f3f5df", + "0x00e292b6015c6173dfde8258d9696f42499d709b9dda63c430aa1114561c3384", + "0x00b7ab7670ddf4ff1fe3643203989d61b5f628815cfe692816f0f0e3abe823cb", + "0x00dfe5c28c37070644b68c5421b4ee573d48f035e5a2cb2c3dd7b6d5165bd398", + "0x00344b32b77fdc08a3b6b031c08e04ecd32dc520b972b8030dffc90c2ea8856a", + "0x007dcf57041977f7332d35aa886d133767cffc32b4353c52ceb79b3c29d804aa", + "0x0089e62231885bb3a8d6a460f641ecb438c3b920bd1232a03687c83cf11a3c2a", + "0x0065a5d3710707fd4adcbb6cafe9c501b009f8901b6811237027daa4dfb90a8f", + "0x007991b51f70f188c2af95df090029ba453e2ceaa5a615dea1f15902117b3e8f", + "0x00a6b33fedc20358c2fecd621b8be53d6e32b4c6a76816f90f6c43e1243692d7", + "0x009cb8e61aa72f26528636e82cff188fce824ace2f24162ccb41fe43149b945b", + "0x0000c6a418b860a1afc7bae62a6c8df9f11c4481bb47b1e86a9ceed00eb73aea", + "0x003da9bbe99b3b008cc1fb52a3217bb17674609ff4ea7273fe6f35e1cdad94bc", + "0x00d68bf9f59ff65207b3cd774983641101df2d4a2cd75294771dfd46c33e4135", + "0x005f57b3b6f9d969b3a469e49207fcf613ca1640cde84cf5d4f253022c183694", + "0x00f8ed40ec9a2c285fe33cf7d0e052dfab708259ec5528da82fa00dadac15fda", + "0x00c17c2a432391ec09aec610318bd0a57d7880b6b5ad49aa8dbdef7dff519dcc", + "0x00750bbf4ae90258e5c8df8c08b6bbf0f2b07dac923bc2f567599e4a22421c8c", + "0x001f4c27a2c1c48a3e602e7d5da7c1d3d9e9eb96b93ef1ebc2a425c19d4ae732", + "0x0085708d8f4e6d74654f4e0fd5c4ab9acd551e6c17e40619a826fd3171549052", + "0x00fee543ec697802a0d096230aaef5cd3c5dfb385236b152c52149e7418e83bf", + "0x007cc5a6c7a1e8cd45eb70896e3ea567f35cb1238daf72a60323929b162f6a42", + "0x0049559bae6218b6e65a77aa407dc9e8152a6d36e6c8fc24fdacc792b7f45e5b", + "0x006fea315f73d7b5f5086d784514057363eaa2f27963c2a1c4204684ef94c546", + "0x00fd9f06a79e59cf5c5afd836f054441d83bcb51aa2fe41fe35d901160c23274", + "0x00031fdc8b03512e231da66351c041298d99b52151f1484efaa7bb800416c51b", + "0x007d8f5791347fda8d3b4549966c6f97ca443d3c2da9e29631c1a115c76ccb45", + "0x00f2dbb92baf4d379aa5dc21fe8ff94ba057bd4cb336ae39f107cbff27f075a7", + "0x000186eb88950a8203f0b7e3de92ec8d50170bbbd6c444b50f472ae8dcd49551", + "0x009843b43d25fc9e5dad7e8330263fbf76b9cc65b190b9a6a5d2801e8e94975e", + "0x00971bca00c4a5162a0a053e44af9f298847f465fa3132a1c9f16e2c464e1646", + "0x000c739b7ee213ec0e0fefe8fc3296c3208163f271e4b650bdff3cc604c8c564", + "0x00b678ccce7a0aeee15ad0c0eca99d3763396404138b79063ce3d46e41da560e", + "0x0057d6b58214bced5758cd502fd9970950098c11b7790efd3d06b64e5ea4b320", + "0x0024e9da4776201de6e89da476bbef1ff4124ec0795b3edb016e9aa71097256c", + "0x000a8503e9022ac70ad9621f9ed9d85839c231b964f4a476e9b55de485a2b302", + "0x008fe60ef86027254049d1cba5b9102fb6d3ecf9cc1b65fb2baae5d6a14dcbb0", + "0x0004b142b3b4f3307b8fb90aa92703c5606e4b1b95cb36a86ce9b0879da4ec9f", + "0x0014eb58741afcd5ec58c8293d52e9cb4da29d5bce5bb5c6bd4c1aacab721e34", + "0x004d36caf6f21d70a8c39e4e75cb9fa6ac6356638621790a550d4737fffd01c2", + "0x0051c9495cd8b0417d7f1977af52e008834c7a08c6e11dfc6186820cb758c805", + "0x00dd78d08c5ab2379383691e2e06801e88514c181487999e2225e0a0b1e9d157", + "0x00febb9f0222642922a1498589c7ea5c303176ea3ebe49a8fee347c15b2e29ea", + "0x00c88105300f0755d3049a72365ba7b8cbdb52e0c3295e40587bb1de160e55f1", + "0x0097acfa2fb3e0199199b6a6977561ea06322ff9639c3975db9cf38497c5e2e6", + "0x00932797b04c8b856e2cd803830ae07a23eccd4fc6ab646ba39d27e738ebfa43", + "0x00a72b3097a31d3dfd5cc51533986d3d4f43ba2b4b1db9b3e2659283fa7a6a4f", + "0x00b869e32106016c63ee1208c20c5ba440f41342cf1c36c9d12df5ae4b27b56d", + "0x007e766c12436367637a6ec357fac1980033382cac77a0769cab7a0affa0facb", + "0x00213c632029eb29438d2207195df23ee86055b35904d51f426b2610aa5657e8", + "0x0046cd8ccf597df8cbf05cd8a88315541b7b5b2c00c6140f705d4a58c5cfb6f3", + "0x0023218f3728df2fb4e56255a0bc4d0fa7a527d5f6183ee26f5edc8741ecf4fe", + "0x00a9ab06ad9e3deffc3321b3413f012d7bb816db263a2de731b7dce090033a47", + "0x0065e7b571a13e5e1f20a92e49e2b9fbf0e56f4042742a0968740bc27a3e2d68", + "0x00fff52833c18fc203b87c74146643a199bf3b486400c39698a61db3db6665b3", + "0x00597f33a3ccd2a0000585147ae52630420b2ce34709bf976a99dc02593b4c80", + "0x001655ecb5d66bf7450a7e16b3d230216d0a22e0350acf593e57ef619a283fb1", + "0x004069149796dfc223d1ca8ba3bb771c291d01d32e7adcf9930f4a7255a5ac37", + "0x0038f7f2f833073e847811b18666e5317fd90eaa8e299020b4748f727c5ea814", + "0x00656dbe0060618d845526e3f9146b49989a5c4391524d5999ea6b4f09084fb3", + "0x0097714174694a974ab3c613bd4a8908d8d9de48088ea9b80de11224fe84aefe", + "0x005c3a55207be02ae7c29353cff9c7f3384cf12712f2995a4cb3d4c2c7ce6c47", + "0x007bc83418ce17cfae9b0c8f88c6e38c8b55779b674e95968c3bbf3e8688ce79", + "0x00380cf3b3388855d070954c7d9d5847b4470c45018166f87115492d18fb5acb", + "0x00fc97aa9ba260ccc56db25516929cc025c6357bfcd7c3a09bb81c6de4c23568", + "0x00897e81fe9c32684bbdfbc1707e539f9d62105e3923dcbf46cb69195f2cfcf1", + "0x009238d16c0089d9dd0360ff3aca654e4253c4e134302885cd2f6359f404b6c8", + "0x005cd5ffa347f1069aaf413461d1d56730fc42e33e4098b766a88459d32edc05", + "0x00fbecd3e6fab56bf247817b75bc6ac9bed4853463335c0d35c2ca7e78c29128", + "0x0098aabafb62edf6c4e0990b316a90ddbd70a66373a81cb82764073a166c2ea0", + "0x00d099c757f07259ba02c416d806d9be7b544a9db2b38a269a7e04415ce45db9", + "0x001e9ff3aa1b86a3eedfff23d351a5f9f9789773afb5b9b34b3a80ef06408f9b", + "0x0041ecfd484517c4bb33608005cd7d22fe1b94a45bda96b703614928dd8cee55", + "0x00f720e20ed8641e35ed15b5f1aece301d29da187af28bc568ef74579083a341", + "0x00955e4892547e675981a6581d23dd9128fcd8c446172c1d59589da5bc83571f", + "0x0036c484795270df9f94ab5a25132fa6a8d7dc718602589aa63dbca81c55b4e4", + "0x008f33332403ccb809214d6ad511f7daf5a7ea99644584c722f301a5de4715ad", + "0x00dc33f81f4fe74408c31a10365d9705b8ad8f5ef0be54caa82c0fb17736148f", + "0x00de4e86ac97205b7b821dd075047190e2f5ba7449905f48790ff1be8c5478ae", + "0x008ea1be42cdbf486c116ff5958958709eea53243ba488059cfcf4d2b0115774", + "0x007643b39f63c9f073e3907b66a373933f84642a92dcb611b43614b1139253d3", + "0x007df6385d2e3692499bf82a2b95e18b532ffb5280cf93a144c059e36a8a3d52", + "0x008b7da3d3d911f38312b736039b4b67a0356d91d835bf8b483f8960ea716036", + "0x0026b1f69ce94c6c043aa43e79897f38de6627473871883c5653d98da7efb666", + "0x004307a0848fe6d5b1d90c1c47056e45123c7fd68dbdf76272af7b652dbc9345", + "0x006d77cb1ec1c0175f512acff3ef8bdbf9ef308108fae3c05b4cb7e43727d58d", + "0x009bd0953f22f20d316bc1d0225c774314800f9ffbd3068f7c981c23fc27d2c0", + "0x007d6942bab6e2674003ef22508d3a4542b08fac2c397c7ede3ea86b4f33c878", + "0x00ca894a847a980b382f77aa6d7fc61c8b62b178521213526b05a229ba7ae05e", + "0x00f5750be66ac010c766d6fc1eb0726448fd8aa2df5064c262a5bcab7056cb4e", + "0x006892dd0fecaa0b608156b003243b851852c7812caec1dc0442382a78936a7f", + "0x00655016f8914081e9447304f9ca374f1eb738607a87663a520d6244ea8d711b", + "0x00f2cc7978202b89260ca94c409be5ade5fae9dbc3b52d20269d22aa1e374c6b", + "0x0036cea90adf8c410cf3b7a0d13ae5decbfcf0f1916cc962706060125c239ae6", + "0x00cbb2afab5d085f87d3735fb8bf1e7a036464d9ea41a070bdc2777a14793948", + "0x00f6bfaa024f3db8d9f74c88d5a47f7d3b813d06614fa8cdaa525941164ff58c", + "0x00e848453715fd92fbb2b0b0cf0ecf5e3e7d55e31674455d5ebccf00c7a53ee3", + "0x00438270ffb5e8678bc85c915a132a07392f6e0b37f439284bee5a20ab75b467", + "0x000eb7403855c0aea0464842117bb581531a53eac92ec2fa16aa1614c2aa8b41", + "0x0065b056569f3414fc82dc13665c927c02680af6722083b2957d2966e4dac71a", + "0x00ece484be569c4ed873ab99b9bd4f6eae90c38b62c8912230926d7b306ac5cc", + "0x00a3f771969e4736bb77a20cfb874ccf8f4bbc8d6b434d686d5ba7b2097bf49a", + "0x00598d91a0d2c99ee7e0dfb3eda308bcbc3baea73d3ce44f14c60b2bb77a30b1", + "0x00def80a806565137c363b57474b447db1314ac4ee504fa4c8ca318047d8f7f8", + "0x000f404132fc9f9135e66b964209a43e55c1a2c5b45bbb877fdc5aed6aa5fddf", + "0x006e5111edf9e05326928a94eb13cfbb013947206b8945e7c82ad2f7ff030003", + "0x00af4151bfda23079e7d1042e856f228b6c7d81874f20d31bf37bac153730aa1", + "0x004f4497ec7a09a2e233e32bed6c89905c3923fbd1e92576c19f145797c54075", + "0x0004142c0612f361657b9400684db08eb16dd06a20834a148a201295ca4f98cd", + "0x00374e86ed05fdfaeb35a483fcd44de6710a74ff1f8145a94c3816c48901e780", + "0x000266de1c0c6aa5ab18b9d2c979ebeb34662a27cb29af67ee44228c9401d02e", + "0x005725f207281de66a7bc284151aaff1d1dfb37a1c5b2e7124ad5ebd9b50ceb8", + "0x0095d24c07232843964fc9136fa80d31537118f0c87d47439a9bce867074d0c5", + "0x00d0b6fcd81a8f1f8c1b996729ab2fdd6de1596611d3088dc5952f22f9e4bd49", + "0x006a04b6e49303e9a905f365c90d0817baf45db89e9d0e1a788670f04f7d4e17", + "0x00b682dc1482373a6dcea09ba8e248a0bad71e51d0fa7357acff8560de1b4f5f", + "0x00988615ac951c570628323c1f2ef5397f02bd62f576f2065fe17720ae1b2b5b", + "0x0013582810974acae1358d929faea545c84edb9a2263257d9247a95e3d90280e", + "0x00d97ca54f16203b61f98f26f0fb5f1d87fcbd4fecaa04929183c51460f60c4e", + "0x00ec574cfedefb2800234f05973980ae2fae75ce02036ad9616bf0cb26b67d71", + "0x00dbedfca5ec08922abc4bf661d4fcbb9b0a1626a8aa0526384606d2775e7dfe", + "0x007caed5dfc6f5c20bc7a8ac44cebced748b88b4c57cc5db9c1e65e307e4e699", + "0x000c3692cf3f1c7284ba79af13261c8eca68bc27d048b4c1243d5c32d1b277ea", + "0x006f2ed784bdbff0ccc2a58631239c0fb1ae5348ff183e925c40926be72eac24", + "0x00c304eb8f56667de63f58ce37dea34c4878c808cc74315dacbb7155630f66bb", + "0x006b26785cbd766d52f09501d81e516db45244db1fbfe774860e9a8727d91acb", + "0x008771306866f7af934799a791f089c0aaa10a5a53d5c1fdf7c50e9860525b05", + "0x00aa5776b6d8576ecd3b9c6bca12e67e8b0bdc0623a56b92ec5ce9274ad00468", + "0x0029f94fe4ff9c2e8b34fcf24a9dd39af9adb468dcd34642fce3dc727e0dbc08", + "0x00dc5618cff13fdb81774c97d2b4c35717a3e2aef13c664d881180b820e935cd", + "0x0081417541592d95e2c70f40f06ec9584e23f8b2d2d3cab3d00b4f7ca0921306", + "0x006fab6257cd022a54bfbc5f67aca1ac76bb9fbd9a908f479122fa55f3f6f63f", + "0x00892d15f05c5afc5769a77b15feca5e1e16bf4c9c3567feee62c476dbf8a15d", + "0x00e07f5be9ed98bdc1c442bdf3d687749a912ec6b5ac3c1b7eaa39020da6580e", + "0x003986e124b184d7e6274769f7070ebdcbc638511c396c04998b87c3f0fab077", + "0x00793dd4e0ad61bea1956964acd7bd7bbb2a968e5fc408d6328f09798efc71b1", + "0x00e3b24fba9d30bf567a21d4c9bc0befacb90fd76ace69434cc78d32dbba880f", + "0x0051d18d64e15822692454fcde900944c585dd91352fa47851bdadcfca4dfbb3", + "0x008b421d17c37982f2e35d7912695aa1c4306d4ff3ef5dea97b77ec0c2e23ee4", + "0x003de299402144ea0cab8762983349e1ac71b4f43a10894711dac434b73fb870", + "0x00711a504f0ce5fb221b27c97c2e28106f97048687c56750d697ff69a74e91dd", + "0x00e5463dbb54e7321f639af2090240db873122274f0edbe81b315a7ecc986fc3", + "0x009c0fe999876f979ca342ca8212bc6c7a3ebf8a1f469bfa79a6e02ad18a8132", + "0x00e7180a2bea91029db7053d1e5a71df34878b7be1793e6555b6fbcda97028d9", + "0x003637cefb4b7c343ec54c520bee6f782a4a4083d3bad624357b1822ad5dc02c", + "0x00996c0b564f329e0acd53f12e4a0c551ffe72ba13446ffaa6204aa9d5d151d1", + "0x000a1d14b7abfec866ed4d66aeb7715ac25ed608769547b7a5f0b8dfcef68453", + "0x00c07b33becd2db990bdef5963732d0769ca6799c66b37296538239a0faf5d91", + "0x00ac0efe331c1b6180499ddefab742ce48e5e2eddfa1b1bc232b378bcae52d84", + "0x006eb4a26b1a7e8cfbc57e6139077ad738bc9814c7a4f4d3c5c7a0e23a323fd5", + "0x00b397087133aedcaf29e8fc25c3115383a978ddb34f3da9d64b5893617e1c34", + "0x00b21548165a8be7ee49be24a7c98f2cd75dbf3f6f276a9e3d64860764b75838", + "0x001df0d1ed7a7dc8c8d9fff10271b9513d1eddcc49f4da76f70b787fcf011399", + "0x00a6f6d792a508388e0462ae54def33ff0a356b078851380a6ab55d8f9df3977", + "0x0076329f451b25f64b4560b17f921388891ed6058bc1815ef530347f1ac17f1a", + "0x000fe97fd7d541da0983f7c1f709e2c44206f0cfdd20379b7cd1ea48da04e67a", + "0x0056f7a9537317295f48de650960bcb5c1b7df4ae79b63c539962ebc4c4e829a", + "0x00898d92d7afb45a55f3c451caea4448fa8cb9470d6e593037edb9a0d1d4f9b9", + "0x0091e3b95695053a19d3acd93294904dbead98c2dffa4654c363e641271f83b3", + "0x00e80e324f889962272eb27642bb58f35f4cbad2c20d2e980887f3bb7da3a274", + "0x00870687239a065115f4c1027676dcf7aa721617d450ca2e749e814ebe56f603", + "0x00cdef798e3c03246f0a42a7213e7aaa445a228b750b381fc342221ae86d3f63", + "0x0069d5983cb90b8e148f76bc393f044250ad4af634f02e793f14c20b61e47918", + "0x006ecc810f65a7a09b1bb3498cbb6f843e343b1cd9cdf78be4d52d587e312157", + "0x00fd01bb3a87b6b6e4e57f8c0bcca25d1efa9c4cae4d0b3f23c42d3db3d037b7", + "0x00b4cdda3bd9e0478096c7b03973d685cdcaf6c3e743d93d4970ebc63bb7a685", + "0x00296b78bcde65b23e724eeb7f0a6b7289eacdc44ad69c56d995e7e66ac66416", + "0x002c45e6b5c74c1d3001a3cfc3a897a45379a94ca218bd55640879abf09d50c8", + "0x0003d420b472518736954c0a5bc6efd9ec77300ed026d860866129e65ab974a5", + "0x006f030554c19f495055f00fa6e848e4e84a27c36274b159fc0f4c7013cdabc5", + "0x009007396e4e96b54aaf9ca5348d83d276ba0474914d3c817abb0933ddff7517", + "0x008edf323d485be5e0cb2b529830ffde5e134b20923d81533bb03a12f0bbd164", + "0x00bf3d35ef8540b2554ab590d9c4f0cd790ed450078b9d580f2b5b105105318c", + "0x002a181615c70e1814bade12ca7356599b72afbc62aeb26017ecdd834dadfbb8", + "0x00cb512b7dbb18d73e94a6e5dcee0f1853d4df0d4e65fafbb8c1ab35dcdb2080", + "0x0043b44b31d669056a210b856ef985c5557c89d4ab1497f2ad67d1e436e3a78f", + "0x00b3caa3c9257893befeac97a2638fb0f9908f68cd73d4785a8589d7b584bc55", + "0x00a079f462ea5dd4071ac06cae8f9ddd298493f2b8c46b2b3c449da47cfe74d9", + "0x00157a018446d589aaf486667602df2c4c7989af48c8c9882ad11f893ee34a1d", + "0x00151b511f4c57632af9a08ef3dc93d2a8583fcf4028f76f1c248d196f1fccb7", + "0x00f5ccd59981aa53fc1449d8c29c73303eeb1ac57c4a33a9c82218970f726887", + "0x0097e02146a77f9f470cd7c00a015cc20f8752f5af852cbab04d293791983c63", + "0x00b158b0ffb4d48cc3ff6e6efbdd239bf3c3a56ea201d02a7cf875311374974b", + "0x00272cda706fb7118c97d4c4a303a6142c5aedfd0ceea28f1c5c6ee4bb489227", + "0x0054bd4c21c7956ae31b712f643565e61a11dbb18c934880395dc7bfcfcdde20", + "0x00960b7cb13f94b83178c1c86fbe0e951f07cd2a5b3848c5a160a71251dfc974", + "0x00bb59f69aa84d003d7f9fe38f74b6465ec5b595c94645a03a8fc11dbbd6fd71", + "0x005e54a181a41705876c65c2a19795a1743ccf0a2ae962f3c49a0e927254e9a0", + "0x00738b84aa4d877de8b822a76c6e02c132b4e34fcd1ea393d263cd4d56fe046a", + "0x00336893f92727d03dc01ec598640d011cd33399f9564e57126cdc63acc102e5", + "0x0000fd5051111ecbfdf57446d5e18db6eac6bc7f0c82f95079ea61effc06afca", + "0x008bfe6286068b35032c047e248a8e7a41cb6a984a7cc3a4f0c5adee9b3a4a3e", + "0x00b4e849f2968eaab7acea33fe5fedace2ac6d89c7fa2ae6e367d862a8412e5d", + "0x004a7ecb2f4ec48979e05f84f1ba60ad16326f220adb8095e16e1cc399cb886d", + "0x00e4eee68e69da8165e130ee84343948138488c6a90f045c4761e67e596013d2", + "0x00df3dddb7776a5e5f93953f7213100345b4054fc360e0f379de069bd449591e", + "0x00aa138b66903085c6106a98c20cfdb37e0925285f7e4630d2ceec4cca716cb9", + "0x0005df2f1dfc9a75e6e1e2f3a66a037747dda14f660531b6fe1d68227fcbbb5c", + "0x007c710425bde0f18850aed8c77f339157a63c65c8f7e353e3c594b8ab684c44", + "0x007243b836675d4051bdd8f9cd485ba151aa0e7c25c77a40ae860d448d8be83a", + "0x00ebe95d528a4b3c750e5977f5543156cab6ef9893735e5381772f3db9190745", + "0x00596ad06a0a726063f5c1df15219bba95b2ae0f12ce0b6dc2565a0840305041", + "0x006dc3a8401043645cf4f3a491e2d750894fc70cd985d520920945a10e24ef32", + "0x008900aeb84c3140f3b6d02514add96629cde79b4d6537782b76fb8d4467c4fc", + "0x0058aff20ebb750eecbe5281a7bf847f46c3dad1d9826d8cbb3eeaea3e90857b", + "0x00b2b0a020bae2015c4c3447e69d9386ba237cd895feb7633a8376690a9f0869", + "0x00b14c85157d55733b35cd98b28a9630ec51dfaa15aa29edb1924f07d2d3ea2f", + "0x00ade575746a16ecdca9ee710bf6613c7c9a647e0331421a6492625b52d4ab93", + "0x0027eccdc5c920b6181adb92ea0b36fcdaea94d66c5a914bdc57e55965446bf0", + "0x00b72c14a72cbb61e59558fae80fc0274cee889c3c4a71c15cb98291ccaf6059", + "0x000ac84c59251546a4defc9b3b4de593fe20714c3466241e7aeffa0c0fca4c8c", + "0x003b7c63dda47465389506cfcc6332813bd6388865bcf6619971915fae351fbc", + "0x003e6961e9ab0513b5cca4d880b1af2623bd6fdd8e755617f013fba8ef484464", + "0x00b03635e68eee7f0b7a7a8da8c4a8cdf90b966a4c5c99d48f2b30214fe541b5", + "0x0084708fcfdfd7f82e5cf392c479e159107f004c0eb8013c56c4eb1f71764e03", + "0x006a520e045444d7ede61ddc01e43c360feb07364145b2ecf3d811289ad64dc6", + "0x001a05fbbcbe7524cd229cf3a6f600f6e814308475a8888cfdcb06a914a6974b", + "0x00b14f19121b226f31c809fa453e8ecb3dd86b5e4c5593501d29f530beb759ad", + "0x007b1a0a79cc8779b26bdbdce1c58563630070d8ffb8d9cdcdf6a3c3c7ded68d", + "0x00280732788cb164a8dca9f64f8201bb5104d191f031f442dbc3dcdbf0e60bfa", + "0x009c79102b82064520c0f7ab6f64bc420f94d81d73e0affb8a7fceb73c5b3aaa", + "0x00cef82d8ba89aee8d96784b85e8e2f88edf7bcfb976b5bac1102861d76344ed", + "0x008228fc7c94908060a32ee5d284e570a00791a588f26ffe278fbef91e19fb0d", + "0x005fca060603ff10e926217fdc8746534a59d99dac3335ca1d7507e4e476a0d9", + "0x0066eb1cacf4e7354da703d1004986b204bdb11a064e5336645db8e1b49ec7fa", + "0x00a48c796c4ec1aa648c56c4e29f9b931017970a5974273e8601cdc0fd4cc605", + "0x00aa290c65564351cba69bf7ee0f89ecdecf09ea0300900e126726e3172788c8", + "0x00c3bda860c2503c5d032211ca361c3a36af58f59c1b46682fca834e22787d51", + "0x004e135f2bb75e95b273a9f14b73b1ac574496c108be2f53f5d07a14454591f0", + "0x004836c753adc8298010d829367bc1f0688d2e31ab57c89a884a8fd52e88e8eb", + "0x00714ed003da9f4d1f7c5db5c0514594ef9f91b7a2733c7be8e03052ee4a55d1", + "0x00b717014b83cda66fc7f0d7a974ed40f9ab8e162d800180836945f68886cb7c", + "0x008fe30a5fc983cae1cfe41edd32cb8436b8a09bdf7f311aaf0302e3ff0b5064", + "0x00700acabda956cb52b2dca4dd985fc7a905677ea361021c57c540b87c71db2f", + "0x0062162ff354c903ce175446092c81fba262f019eb1bc9b5f7d7082925b450f1", + "0x00d620959ddea6cb5b56d8cffc37acc7738b2cc4a285f808d128f65712926733", + "0x0083772aac594f97ae5105f8a7a3a1d868fae93299362fd2b9bd9132004aa5a3", + "0x00ba43964a8a54bd19e53452dff2dc344510c666796cbed92fc333bc35665cf6", + "0x008a362ffd61712e216225e7e3cc2ae150da327571e9f614c38b80ed67ab2ad3", + "0x008a1b19cf96e3fd978d27dc2c5cc8c75f6b90e9c2084dc15eec12540f1afdeb", + "0x002732f4ccf8ba5279965a9eaca0fff8aa00163fe3b2be0f64390fc19a32dfa8", + "0x00c1b16bf482d086b8ed4838da1c1805de7f3f35947182628323c7d72af7c87e", + "0x003bc1406291a24f3094b1916ab13f70c600bf6cb922273d4a682dd1cdab5a35", + "0x005cd2bd1e0bc79ff2c731dcc1410fe6bd81e99e5efc62ce1d166841d3420431", + "0x00029b6be5ab54ce78cfffa85dcbab3c26c3351a88f7e3f440d95fca27782078", + "0x00e9339df6581185421fbe130525c104d5a2126e8344363dd02bcc36d41013c1", + "0x006f339a7d2bbafc456d67abf6dfbc4c6adae4a3f629f53a187de28a9fc56624", + "0x00cddf6c4e9e60a5640e79d7f302cfec0862025f75c349088984b8cd6bcaad4e", + "0x007100236de41a6c8a8b4b9d62f62f7d2d2f21cc771d1f65d79cf285446789d1", + "0x00d43b9eae73debd7e50064fbae48a59aa65b93e3f848c0fe0a4c57a0bd69e34", + "0x00eaba07ace5608ff7964d5a902f8cdb243685c5e95ac5e59a5d2199363d86ef", + "0x0046b1911c643473d386e932a46ae2b9f1b1d89d54cb4bc25962fac24f05056d", + "0x0074240f205cb4ae9a8cfe9a25206b8b03eec67556703cdec21e06dd9a38cc32", + "0x008a8bf0ddfb9fb94c830ef3a8ffa1a3af6dc6b0a35c6deedaf9aaf46949fa6a", + "0x0034cc687907b8dc73dfd9095ed9902af5b26698d69c6aee7d29b85b85f662d0", + "0x0092739330ee374821f1a1b7b084b08b97d354f92dc01a15ecf6f1979659e5d7", + "0x007ed5f2075ef95ab7cb894cb90c73e64426172bee34b379854d746f0e8ae7ae", + "0x0006359bd3678447c07119d3829e6464eff560c25b8c2454a863f7548ab2b4d8", + "0x00eea8fcad1efcf654a6cb2c600462e1a46be09d51efbe8051def98e71041f1c", + "0x00a2b78aa5829c93ed4178dafc4c1f0a16182bcb408ac3cb3a5d66985043fce5", + "0x007705b9395fe1d37533a0662f74212cf913706045d7e813c3b4fb995b5af5bb", + "0x00811b051636caf80fa9501852c7bef64b19c9d75d4a58bc20b35534dd40b254", + "0x005d0e963d7f6ec0f75380f340ca837d7d2f18db5fe1bd81ff4202afe9ed68e2", + "0x00fd6913c9fd6a4b7af3569faa4845ffc1d4eb9d572af376f88e9ff08376d4fb", + "0x00ff4bd2f7c3e5914dfd9188f4c59265a7c08f1e29b7e83137d020c893e88e98", + "0x00de233fe4416379a345978b2872fd8ced14b2c51037f7f24fcd568c14b137a5", + "0x003ae03de01e830c42a735bcb71f2d8db7f34467a543e9f14d3da0db26be21e3", + "0x00b58d6408febdf5c6aea1334fc588ce909e496aae58ce549091b3f1869d6719", + "0x00c8a0fdade269568e9ded1f2cba02d1b1fe294db121e916fd0b1404e3fd8a45", + "0x0078f77ec46d5e4d711fa263b6c1ec8cf89cbf5a2d79fc44e2d6a7fd1fdaa429", + "0x0059299e6e127007ba890b757d2359af363335e666bf3193f6f158d945fb8759", + "0x009e99f7157cc3a4f878e3d03fa74fb08b27d08b49da8646e85b24be5ef5e809", + "0x005e67a6d970f91cb902659c12a0109a1493b43d1301e6fddd15cf314e6959ee", + "0x00cd328c468a91f8a6d54811a4dfb1d0971f7ee066b565174f99bf54fe97acef", + "0x003d1cfbee9d1faa1bd7dcf883dc8b7bec1a08e1c617f25f1dec05c180d6ce11", + "0x001217c001695927965d67668880776a6d5d8421176ac14eca36ba2c723ba526", + "0x006decf62911e19c64ffd1501e4b2a31ea7bebd5d297ef4516000c01ac949ed1", + "0x0043841462da498f5f1709a6f40628157e8155c4a9157ee156ff999fd92c0778", + "0x00297f765eb9a7c1b9f2d0042eaf7b0fc9573eee28f850181a72bbd9c9ce253a", + "0x002373e40d02c8a471dcf5975a5411891927f411123baed18b3009e0a561e530", + "0x00c6d8d797580d8a89f4d76ea14581abe558cb3e752e1f2c4743091f9aca150a", + "0x004fbdfc0fb91218bfd27a5d2f05ee2bc336bd10c399750f60638e023a829315", + "0x000c0123ab8b412d6cfc26d558c84d558af54043665697c266dd7c4830f5381e", + "0x00110d8cfb8eae5d47b4681c77381ed6de1ee76c662643552c83bd918e06d9c7", + "0x00f83e1138a7efcedbc2976f558bdf71881bbb6660f37a958eb158506ead153b", + "0x00bf072049dff2f634c5e6e194e64870d395119caaf6c3682aa59eb061788c50", + "0x00c504e4f477e59859827b6732c8f05f1c08adf7b15e92a2ae75c457dbff89c5", + "0x00bb199cf55355f9dda9ed45dbaf56f8d81d8560c8d1275ac6d7aa51475f8f5b", + "0x000b21d005104de7b8b891a8d835d2d167a1650e441bd03986949cfc9047320b", + "0x009c1f25e4dafd7264b13d42d321bf6ae10072a7e7a18e46a1a8ad894111e36b", + "0x00b6aa33e05edad9e8c062e3f32ed6b0519e9f6c9055d0f8cc8f4539df0dc1b2", + "0x00e9a0f9bb01391490f728689f07d20d6de5b3c4f7a8f10643a943a72104ca2b", + "0x005866a88201542fa4fa8b6dd9921621c26a2f9241f694b344a7c4d847194bdd", + "0x00d3733fe22c12f7bc0d01b9038552a9aa287cc98636a3fb21e88a071a4e8f47", + "0x00d518a237ec44e8c75707166f694e9d3dffd3fd4b7c394149da8e61681e0bf7", + "0x00f5fc47e09575ec0bc33e5317b932d350a4cb4a8800a04d56b3dd98f6f27d95", + "0x005bf25da128a3b58164aeda3d4ed861d745f1136cb5a9ee6c4270fbb33aa97e", + "0x001ef66636b199bd1e95386c739ea05d242709f7a0f6ab8ea86f1ad2020445e5", + "0x00af4782a6ab6444866948124d2e7971cc54a40837fd642cd0493246c0781975", + "0x0067e71621c78b39f2e790fbb352784d571880cb29779360e392545b91ebf655", + "0x00a35441214d3a5667aea5e0c42801ac39c1292a135a30f42e954b4f96ba12a7", + "0x00fcf9449cf995ecb87e71e55d3bc71e029c64155b8b4639472fed3f9b456beb", + "0x0002d65b5789b8c3723c6f54b64b884055b16b755e7656971d672a7fc43b620d", + "0x00726bbf8069d092edc174ca30857c54391defbeb44a5ac1d735bcfb912e832d", + "0x0099dc5ba49d502a589f7a0fc7b53f568ca1cdf602e3ae853891c78c49b19020", + "0x00c713cd562abdeb05b3d2e23c058797c0b1adb21e55e12d8ae2d63a77d90193", + "0x00eefe0e206275668a7d1a038b5ffccb69d1024c41cb2b02f7a6ab6be13fae2b", + "0x009dd5a569d597f52ebdd3b438f80272b8f8c109e145340530138c0fe31276a2", + "0x00af59b4bdb96248d042dea55e4ad1323466ce49a2b85e1a5776b66b4fe1ed06", + "0x00c86a935d370888f12746a8fcfaa56dce06c13aa923be0d9c871e3c5b351b6b", + "0x000693f3001ac2d37e778a4c3bececaf432d9f07d69220fd70dac5ac8945f652", + "0x007ad80b3d1207207f258e884cad621e0652527c0cc2fe1365e31c1aee02ea83", + "0x00826dfe6e5ff801fedd7236bc077300bfc07edf5e6bc37119a1b7ac7551c58e", + "0x007754daa7b0353f6962a27e20dbe16fce7debc93a689bd398a632e746443250", + "0x00eb10f525bd2467a359f74d7c71885b4af1efefc36bab19aa8b897f1e378d61", + "0x00adb1620d15f18564f9278896dbecc380c1ee6c7fb0a5c30bfccb6799d9a44c", + "0x008d5b67bc8d0fc32f5189d044f8eb739199b21c0089a2c44bc53f9faa5f7ecc", + "0x00ca3f300a3d6c0ff3f0987efdf9ab60cea52856fac31a8f78164a3c05e247fd", + "0x00d46cd63e0c9645014d090c25ce021ff7bab31edfaf238b61e830a8d95a68be", + "0x005af5a099fdf20fa18f7c0c89aff1f29dc1a6408f6ee6ee937c63ce1c615086", + "0x001cddcec897d774ebd79e2f43ef35ab9335694a872d4014a3b51c39d23b6e2b", + "0x00f1548d4edf08040ebdeb725e51af8b5444402f7d13b9a4937f2951ca8c1490", + "0x00c8aa786bc2b4dfdbae13204f56f738c31ae48ff587c76d4cefbc43d316c98d", + "0x0082118938b2f9f93c0a5239a2db4ac132c48ceac02717f5706fb110c555c5a8", + "0x004e3cf752dd6509ee890a8a629f3d4283490feddfe0ffc923fd97d0df363864", + "0x001a6928b52b33d34405fef83b3f2c251df857ac0fc3953cdb111f2ff982e4a8", + "0x0054fe39d8b28cb2af42d436810bdb01aadfcc37db4261a172dd04c10ad5ab8a", + "0x00b7c6b4bd44a6d243a443325905a7603a9d0871715f5d5a69264e0085d83020", + "0x0095ec0c38e1f711b3ce9e2106e2dc180c95ae669b4c15345e80b7557ef7442f", + "0x006a177d364974df7af8d63af97573d8d4c4f39366bd24cd8e419eece9ac2bf3", + "0x0030bcc928b7b9e113498ca9a902bc551144bf5d1623cb12b0ea1c1a6225f166", + "0x00f2fd571a967d46106385164dd6011ca98b03eaebc3825cc7fe7bad2f979aa1", + "0x00a4c9c7ce8a9a52c0cd4250b9c49424968888f9153aecea51a0750bff521fad", + "0x007f8e7a40aa269516a0344a085af8349d948c812d265262c946fab7f18eeeb5", + "0x002906f7481bd548f8d4274bad0c4ab0f47a95499acf16cbcbd0f938cf92dce2", + "0x006ffde6405146d10843109a9e128635146fcaf2c6f3e4b0d0195070c8fbcec7", + "0x009c978556a7333d2c6cbe1681043f2e5633056106cba27c6d4878dfea473177", + "0x00bd3f9ec6752c83e77ba26221486221a9e77b8f2de32bde16384e742c0b9924", + "0x008d3b2a2253446162d7f1f6217a21dbdbe2ed876180a70a7c7f40c8902adacb", + "0x001631797dadabb3191c927d7c0611d4c338feeb91002c03390d36abe7c0ca74", + "0x001f6d765d760b96f2a4557c7e15ac505e21c8296f77c5fc75a4ada399dee248", + "0x00063528697d1435c3d85c85ba4660d940f75eaa34e3e042b6c106bfbcc91408", + "0x0002c20ad715063c1b604f104516c7e65adec47bac6d13f38f336e9ca8bfafbb", + "0x008def198606a1e784b8796cc535801c9205b9a94bcacbfdc3e4c98d14049f14", + "0x002b960921f906da0084df57ba2820e0324e5c53ec4a8f6731057ded17610367", + "0x009d818be9fd4597757641700e6c845646d3f624079b0dd79e99efd1d876ac2a", + "0x0025f54011d30cf42ad8e46b08230a7995919bd972670e219c0b6cd5a5a86a42", + "0x00fb8d38a206eae91e8998425354eb5893a1aafe4dfd540b97c0bd0bd79a91cd", + "0x005773fc19660549575cbe03feef33597ea4508b3f53f1f124be55fa466b9a41", + "0x00b5c81d822967e69e17d213e5c2a7f7582f2afad0875483f699b5006de22793", + "0x0083074d47b16a3e0288ae6dba05e47db1143beefb7f616e4d34e99790367336", + "0x0071a13a3b8c00089094ea1c80ff7bb4ee3a3f1f3bebb56fe7701a7ca8ffbb7e", + "0x001caa183fffbca2084ea8800652cb18b5c1ff9eaa30ddae72d0cc18d49dcf73", + "0x0027e5918e9736b239fa67746f2952cb7f8ed112f3df80ee7f4a18bd1d302beb", + "0x00d2023f873c2d689b61b28381a51b3f13265e313632e5445a2860bc6b883444", + "0x00aa66c462871d99b910cf3ddedaa0905136c23b6e042b877ac2af56d3ae5a32", + "0x005d6bbee67ddd75a9bf7c49853b167135e1d380addb97f164bda4f165921507", + "0x00ea9ab554120787cdb56455f7f576a1e8006bbe6d4039d66b964a49bb86dc18", + "0x00749b4a10791a21b512492451048487abfc58ca35cc8ff51e177ff111756057", + "0x0084908fae7f0bd04ac02fb6a1c091aedb0420677edfe9f03febba24e985fe07", + "0x00f59b2337420baad8e50526c89915fb4110db2d55d43fc83c4321950f476521", + "0x001bee1edce3346d1803e8dd63e03ab21a790ef3d2e172d067492d590308bbfb", + "0x006e97e8ffe07cd6c6e5cddf8d444bdfbe47e8ae92f8cfec9b18433d85a8f316", + "0x00962a762059b9932ff728a953ef06ea8bee331b12acf19b8e6f70a82ea092b9", + "0x00d13174fafbbf6ddba71cd105d6b67c6bc66e842bf208a2746a43ba143d987d", + "0x00bcb9a283180715e8c2d571a2fae2e15ba6ac5f7ea50da75a3b734e278589be", + "0x00d3624209e4dda018336e474a118a69d8cdf6225d68a419c81f519fbf6fec71", + "0x00e7e8b704f497f227f7e8df56e77cdf0bb1baf5a8cf7c20d222f0f11937fe2a", + "0x000cf483273ae2d33ac5d4dd0a11a4388d7c463062de2f9cb097ec7c86f25cc2", + "0x0015ed651200afc98d255a0d521fa84675ea2d5de94ea273b533839e74336d36", + "0x00e5d2715d6c1745e2a004a50c641e6c25caee54785a50301a36501eeef55054", + "0x0072c3f8b94d23c6a2465dffa8b61b3f60cdf65fce362e35b120e4c6c02f1db0", + "0x00a8a861c586c7247e4f86018011fad7a6ee22eaf3930d678605270fac9732bd", + "0x00b74c2e7f0e6fd5c57c6013cc4555396477c7f9c347ac5b085a3e2b60df1c80", + "0x00160c8950df4bcacfb8e93f72c8c813b88bc5e492f8df0f362edd9a59095555", + "0x009f10f62bb5860638e64004c3cb18eb6fe5bdc66586ec4ac73cd4ce994632c5", + "0x0033a2b8de9277a8ab067c1a15691e47b1d7ed7ac7100e9ed368a8cd8d5f53af", + "0x00970e2a421d0bc805ba3650a6c4aa4e8ae3d6a38406e80978c50d502b74c1e8", + "0x00b3724f4c34caaf8337340e891d79e02595373ec5a6e97943eb31df229240f7", + "0x00d8e45d345b3ea990f44a8decdd19ad4d7b627562af987bf1893007b3097a3e", + "0x00d64a7e186635c9c71cf502cdb4b1bd46f514c6936693bbc072b7bf5ce421f9", + "0x004accdbdc765fc4851222dbfedcab3d52bad64ee0e88f85131769cdbdd832b5", + "0x000652a9e00c43f2bfcf7f544247057fb43dd82e80745f52785e4401f3c15cc2", + "0x00f57146dfaf2ff836953f0a4d08e6f5c65834c43da6e4a01d32e6f9fedb6a13", + "0x005804349a6803f3a8abf8deb95d0207982d985e3857fe35ec32e35a71775545", + "0x00fb05650562b850ee4ce03bba3a93e8e8e5ef5cb4184d999d4cb9a1262c9c1b", + "0x003694b9b1da72c1459026e5cf8b73c756356d857977f2e6660c21e64160795b", + "0x00e66593628ab0e8204211a259ab1ebe5dd7a40c36684c04721d4344c15929bc", + "0x0088c3c62f4a9b2b8e190839095c07bf9d4187e09ba21e2e977dd4491ce9d618", + "0x00fa372c82d608a0a3359b8fb0f89cdbb543335764604726a314e42147d0dcf0", + "0x00d9b52b6e38c3afbb62530e344eb09065d28a05e06cc4f2f2ab31ccccd7a1cd", + "0x006b6dec127311ba1d9fe908cc6392280f37b28a4fc17daaa4d73b7981af8dd6", + "0x0033a761d7ae9f9451f0b20ac788064a4960d819ccc8df5e5ebcaface540dc5f", + "0x00973558391ba8cea843de92bdaa5eae6339bcb21ff4f9c473ca343985112516", + "0x006adcb39e4afc37a916c94c57f246bd557352efa313ecbe69d4966eebeaeacc", + "0x00b051843bf46e59290c5c47824db12bf9213766172848cb05aaeabeedd7aa16", + "0x0009356f822d52d9871af4ce138b9caf6ea451ceaf81f449fa124ac2bab0f1f9", + "0x00129a205bcadf3e8ff0c2385b81b29ceeef4db19719bb0993fc0d8f933588fd", + "0x00fed134e56c253bd8ed05991d5c5d99441452b151399d27ae67352ed3bbaf5b", + "0x0051b611f840b91dd5b0d561d166a26e7ecde8339b270f7502b5b56ae7857371", + "0x0095188472c1570ff021aea0dd257edf087a098ec5dc5aea1188ab23782f67ae", + "0x00b05db546409eb5f39ce09ff2363d2dddd1fde39d076cd0a366a017db245a88", + "0x00f0269953eecae2dc19b0877e68e9abec735aa2d5d11565372f6f214e38c1fe", + "0x00d4e1148fac676c6b5c202d63723eb9120b88ee027ed4e9883ceb2bed9b6862", + "0x005b950a657980bf504495b435fca8cb3bd54d8e358f6131c66229283aeff87d", + "0x002ca142a378576a32249991de6ab8435c49e82027a56fa8d57f18486bff3b6c", + "0x00b50ab8d48970c0732531fb5a289e3a2ee15b829671f00034fa0b0adaba19e5", + "0x00fba03d2880d7b23b5c444007b1ea8eca741d6e8519bde1b099c2b9959b590e", + "0x008baa0e7158615ef4622263b2ffc01220b2ecab7b591fee6c1ed90b0350f94e", + "0x00bf52cb56cd18f4891631c65b35a2a0bcc8f76d72209756c12235a286bd7f2f", + "0x00d2b8ca76fd988a956ce667c5fd7a89276cd6ef03182aedbf4e2b5c23382805", + "0x0094fa7aa3b2b0ff34a2242e9dedb4c4662bfab3caa3adcce7811ce8ef0aa72d", + "0x003090301a852b135f7f8935c565bc585f7b25f71d8e13a648983cb20f947bef", + "0x00d76967ef0aab8799007b49953d669ce2a408e8cdc8f566d4a1ba400d550e8c", + "0x00a1ecb23314a7288cb6db4238032aaea9779a197e2931ce1c904a00ae959d95", + "0x00f6654691da0e0a587596bb97d7dff909d1c08b90f5eeb3dc54d0264578d6d1", + "0x007afc617f5c349e3c8326647ec967983d25cb5a71bf3916f54b719c5fe5126b", + "0x006d4308e1a9ed22bcaa16235deb539b2c60772cad251cb81b1a863d95771eca", + "0x009284384950072567eb4d955100016cc6ca609fe0a15ce63bff043f2bfe186e", + "0x009649da33d191354e342a9f2d5e3eff72bfbb068d5bd6d8b64edc6d2f367d0c", + "0x000704b65b12deaf8e79e4098df71ecbba61a28a6fb7abfc5896c9c38f8aa72b", + "0x00578913ec4d966ff03abde093475e41eaec1ad7a030244e48ee655c643eed4c", + "0x001a1fb9c086ecee2898e1ff02a23aef804d6698aacc0158b8527d8ec036e8f3", + "0x009057ec77dacbd9755bf6e090337bea526fc3cbaf7a678c1c9095ef8b127f13", + "0x00f80ac74400423fd949413ef71287f2be8819523bbc21c28e0add30dcc5bc34", + "0x00d645f7bcbe8bae2cf01e7fddd139d5d3d50a98e75132b7fcd966e8692f6219", + "0x00d1ddcfc90e40e4de10c85a97e66b246d584281ea98715c014ffe0cacc35a7e", + "0x00cb9b5fa1cb2191fb56f3c72ca19a1b6b9824c68765dfd269cf392bf16fb1a5", + "0x002612d41e2e0797398bc12830c4e3baa0bdf64132c6472099e54232677bdfb0", + "0x00a3c72d9ada317bf3d45a895793dd2f24c133e5cb2d76ffd58b04e0dbf214c3", + "0x00f4d7c9a6dca5be896e56e7c5e19ee851b6f87db51ff0936ff043feb3505458", + "0x009f956d3905b6bb2344577e84b8509213fe3a92319e583264f5b31c3ae5b136", + "0x0005fb919c7c1312ee1199535d83549c5acf07bd39929a8da887512e34a217b0", + "0x00f46765fb96edcc55958ddd27a2eb68eab1fcb0fe5e8620648a160a8dabca96", + "0x00c0b359c02274d874fd81c69176bd0030e6dd1941890787cc1db75124f0bc4e", + "0x00f4bc8cbf63a7e6a5ac63643a4f1eb51d50cc6f96aed3a0091d2b2522c31a3a", + "0x00ca99a6394017b18d57e0198019919b2f82115a7e08b292f1f492fbc8aa9f22", + "0x0013b9eb481e3982ee0238abe65fa7d4d301b56ee716e43c4a10ac3f805b7168", + "0x002bb5869541652343e04e6308f72f0c8ed733c01408e797db02687bdc638f8d", + "0x0047953f08b7f68cbe70a9b4c1e5c2ba693518e1486244fa041ad8f6170b28fc", + "0x00eeadafc5f7bd3f26d8c37698da924803a89d67a48d3da796df8a3ab7df07f9", + "0x000a98cca01ebaec130053268a4612c56bfed528e4aea5b7dd8286b63c339d70", + "0x007d7791d5e27730600fbd4532f760cbd5fb37e6de308b437baae1a786fd37a3", + "0x0045eccba6fb0f8c55835e295313d673289c719c1437d7347bb8bd226f837971", + "0x009fee32427decb9386e8e0f418c17e5331840d07e6bde92498b912f68f3c630", + "0x005d40c74d8563787d8e1352873c4de1cca843c9824dd8411660a31dfe14054a", + "0x00448446b800ccc90c07c610de37c861a8d45b87816bbc731c77757c3cc338ea", + "0x004bb16c371538fa9312de611213a21885a0631d3b0b34c1038ad3b67b8ce59c", + "0x00025bf95ce150ae82061aac2d13fd4e0fd5f5dcbf6c1d1ed53e4a407ac15df7", + "0x00af9b4d06c9623ec71365c7509cc34a0a96c31683f6e8ede641decdc434cbec", + "0x005d4f2141480704bd757efa77ab84c94addaec65858d44b22d7fbfbc5375f2c", + "0x000ca60ddbb53411d8bd25298043dbab2a70c8945e5ef98a9aadd3aaf2592e59", + "0x0063cb652be8e792a1ed11b86155effd8e6b9b5a45eb75f37321b1914ab7e629", + "0x00bfdcb47e20c3c24f75448a16e325edb578797e3a854f3e9207c1fc2e240872", + "0x00e5a5e8d7cbd64675f70aab1d66841a10256dffe3146ca7405f5a5537e5e8dd", + "0x00591cbc8682f22d0d27d8dc55ce3a91753890858d7544f0d040aa25c7381106", + "0x00637a2c2507521b06fd5fe9276fdcb4ccbe23b4f6005781caabb03323ebccfe", + "0x009fad368d70708e987db18c373eb95e220b50951a393b58478dbbd1f8955d2b", + "0x00e21eff38b3db0fc86317c9c501816f99b8ed6fcdc1f95d663e00ffc1d5578b", + "0x00eaed90422074e50879f719fb68c09a5c669c072fcbd172de687e7bf703548a", + "0x000bff6735280f5c7541cf1000781d26c3f0fa5249388042a6e8478c74a7bae6", + "0x009c9113f3b15ea2b3b42f91ac3e59eb2091c56db70db7afbdfc39b2ee3fcf62", + "0x000f5d4dc9e337b6dbaf678148e73de3625d539e8db5b4b0f75ea184a29b4b8d", + "0x004f6ef0dc140bb761a00d65c076c434f2546ef09d07a921692805dea63e5358", + "0x005f69a5eca01f71d302382e6e25873208b3ae307023fe4e0166a5bcc1a75981", + "0x00fc673a7eaa2b98bd83c4a679a567d20cedce9da0893b28152a48e7eaabda7e", + "0x008114aeac9b48307ca1f908d8128613573ecfcc4e53773a0958836409b4c687", + "0x00d15995cddbbfaa5c5eb7126533b81dd1cf3a03f16dc1461337e66f49cdc38f", + "0x0067ec510e66b173c99512171d385309e792d905d84e703b558fba37be67630b", + "0x00ef376f36122c79faf382418a5175acfb2f6364f012f750d41bda310646117d", + "0x0007298be3c2c6607379c0e40c170714f41212a055c6cc82fadbf156b53a89bb", + "0x001cbfcda6258a9aa3256dbe7d5bd9e0b1f8fcb1c504f1b17a8d0916862d94f2", + "0x00eb95385dd35b3a044c153e5b1f51892c742a6a03f61eaa4dee1cb8c08c3822", + "0x002b62e9549b7d61f5acb124af5889e80cfabb36ff78a75f14021fd3e2f9ea8b", + "0x0058d6a5b8dc4f471a8f7099a4ceb10149e0e430b6c099048ea386b1a09269fd", + "0x00b80b06450adc35f098729226870a1c77bc02bf5e24e9fabb8d781064157f80", + "0x00c1baacf1db335f5805ced27b6c32bdfe8973209865e8316a978bc24453ffe1", + "0x00576ad5ace75adc43128e78709e8770f1976d37ff5c1504181ba453397e6061", + "0x0076ba1a2619219c5f942ae082610a3612f8b06b582fcf5fa5e68266ed84c321", + "0x00b2b312cf720cc71a5151cd16a57ecbcc4d93460f3d19e7d4dacd30eff3d335", + "0x00fa5f885264fcff8fbd6110f9a22596b5f10a3c2fbb3251220cd87056cd8324", + "0x00e96d1c784800f03e940388505826a708e0a74b4fb3bb160c4d14cb5ef66f30", + "0x000356963d43618f2f3c7792b0b16af144b2b8e3c1b17791e08fcfe0be51c466", + "0x008c5181971655ffd2ec74aefc06d0f2725f070e1e1e8a8e0b4139939310239f", + "0x0072b0e06cc74ac3e476b50663195720f8a0f1688650f4cb173e99cf98058300", + "0x001f8c91c5bbf3d734301cdf206ca044c2947461328a4a0758f53fe02ce11f2c", + "0x0030e3da0752ed34e0c0cafa6d7f52ca007564f66b761491adabaccb87c3f337", + "0x006ec48999fd4cc80bea8369307c55040c5dca0d5ee7893dde0a1b4b16519244", + "0x000d8acab562b716daab180f9567cf3b93205d5b304aff716aa1e0a59ba44cfd", + "0x00e0150ab806bffc2be87ce9829b8415adebb67d8ce55e5f360271ecb54647d5", + "0x00e054fea02f02b826dea7658c90255b7558da334dc181743e3b5d895146b16c", + "0x00107918e39707ea0bcb855dffbc98091f52c80af1964636d2e5dd4777a49cad", + "0x0081b83e6bd0dcd9b0c6b4235be521443cc92fb995a30f2869e053227b626e8a", + "0x001a8910bf0ecd3655eeb34f4ac26963425f9482f7a7c237aaf5bbd2a58ac64a", + "0x00c1c2b069f041fde46e06dafe8f415169b2ae778c90a3556987f76534725839", + "0x0083d3c45e3182764714825a166fbe853d1c994e23116bc0bcbeaff43ddb1b1b", + "0x0061a6896ecd3a70894b67b8a24a761c2ea2fe9cd7bba5733c25fac1660b4f82", + "0x00deb6f31fbc3953536a9691de0bf573bf6fdf5cfde99be28b18976d60d6311c", + "0x00379ff86210599882233467759d1badbc67df10f130603880aff20c07888090", + "0x00cf471b6ca6fe0ed979e2409f28fd31c617b15e440f346874f1cae22e993023", + "0x000942a7836a195dbae7e0be84ada4a3e0a904d7a7205a9ebc534a16021e8e9f", + "0x00d0a88017e172c77e85944b673dfe8b0e0a5a2e90697daeaf0ccd25e54fcee4", + "0x000815263af4bf42870aac43cd5050dc868f8531d7989a60ac42c43ff18d430a", + "0x00968805c4f92933c3e104242e89d1a6931eeceaf628e48bb054e65d59b56c66", + "0x00d83e9091ef05445a4d69098fa31ae444e443e7b12a89ff819aec11d12e14fb", + "0x00bbeaa5bcea074792825770900757f04991d75e089c944d319e2cddbaa0c9f6", + "0x001bffc9b57c4ea36899acadbfa93b476cce9b4409d1d4aa4cfb9f2e540ada2a", + "0x0075a77f875f224731afa8e032ee0a5d179ffdb78972af1bbc479f44eebf1375", + "0x0057e90c0d0595cb3c5e309f82d9f17c2c074a9b299a925fa1cf78e4d34ebf13", + "0x00b88c17093eecc19ff6c0ba5cae78967941773d1e1ca8c1ce6f71faaed21700", + "0x00f7947cd7edd2e29949b80f679086a6f535c910fd54a788ed87eead6d5ba7dd", + "0x007d5404d6cf156d163c193e6e7172d74cc6dd2a3be7fd6ad458ced85cb9ead9", + "0x00e9ce74a66ed6c5470613cc753796f60c114d1aaf08ff8f60a5eefe7df09229", + "0x0007de9e3b9a89e4b3d993d65bb537fa05f6cb0eb5ef9b1f7970fc62de658585", + "0x00a34c59ae2b4dcf92749f25c567af4963d7f69f1430c60339db59d198f1a11c", + "0x00d290feed2d209a441551c21a33a675d41cda936af28874749a91f295555a46", + "0x006a236cc3bb11962cb4474df60d0e5eb4dec5a4801726bd51bf5104a811ce1e", + "0x00ac84dc93e6eb9457c43b0a85436b5e12254bc870baf1b22c6cd08c2160d8cb", + "0x0055e01eade5e481d20002f80667572ca75f24f439f574a6020646cc5191c4ac", + "0x009d6026bf7eded8e5a9ffdaf0159b91c7b08b20a73a47e96f183d5ab65be489", + "0x0053d14569adf72b0c24f0bd7fc7965982f499b2c6de729ec1e3886ef622cbad", + "0x008b96da0a78ba0ac10dfc8705a9f0b1863b4aa1b14550d11e8b9bf83ea9a4c8", + "0x00ab2a531f6a8314ae32ecb5c7e1c1fbec0817067e71b918e9451fddfac83ee7", + "0x008facb0d87aa7a702374200ddee783a0d8e7ef569aba015bc85410342164aae", + "0x001ccaed8be162291f95f075ec97dfdfda56e827d57ac6f7c46bb04141172560", + "0x009650c2f1a37f9970d87dcb75eb32983894d6b5143bd1829d94171a5da81116", + "0x00d205f4f65aa704670d6435d316f2e88c4f8e6cce84f835ce6a9448c9cddd53", + "0x006ec0e94f85e9535f342bf6e9a90992a4bd154d0b97f0cebfedf949134c2863", + "0x006179b15324b2a63824bb28c90f922c9ffd4b92a59f8813670b58de0c6ccf3e", + "0x00411562fea3b4822af780d35d590eee24483c9f98e728de470fce360780c6f4", + "0x007c17113f8679a5565d3ccef250018edb5dbed5573e90081252d7bdeadfed9c", + "0x0060d34c2d9f94d9122cdad196085bbf1dfa20b8c047ad7d95a11e2589955043", + "0x0091be90b3ca9cd00d93c8023976a9032b66c4dfd129aa701dab4cdba0c52346", + "0x007ed29761e775a26142844725ea11e6eec77bbd0125a23de9ac016c0df88e3d", + "0x002e999883cde483ec3c1486e17b9780f4252de9f775eea17931260aa6e689f8", + "0x00d1f23486383939dc658dfda8ff75459786f7a47cb2d3c9828b67c974f57d2a", + "0x007c1264285fe0b3faed05a5ac0fc29b370f48311a75820709ab3995bae335d7", + "0x00470e21018cc72a7053959a0a2edfa4689a8586fb44fcf61477dbe84f312686", + "0x008859079ceddc3851d836e57654a2ca6ede7be1675ac05e879dc70c2350a54f", + "0x00f8da44bb5ee8b66c40ba90973a9e3e51e323342d0148369e3f93ee7b321a43", + "0x006e233cf1688d67b6e6a26adeaecae9244f754353f77a479ce0a0a6fa23fe13", + "0x0000457edc96fe678bec6c5879a36221ab4ff8d7b9a57c57deb280d6bf8af9e5", + "0x00ce44fb79d1efd00ec74277a6933a80ee88595b2df8670b21ff52dcc952a673", + "0x00c07de5926eaa19bd11a4b27ae39ac747aef27203bdef519d28eb63820f555f", + "0x002c03f3988a6e22d749cc541fc9e88c4545abbfdbdf6f96eef051190e28ef93", + "0x00d595a7921df67998e9e2a28ba030d8e68c4a7e990188ffc30935799bbfba10", + "0x005ee861937aec6f047a6a0b612c94815dec615541243ac537553fd93fe38aa2", + "0x002ced810e8ddc021c9d59fadbda2b422b3c7097ba0f5568dc9dd3a0473908a2", + "0x00f378b31107697e9a598f29daa44423d652f74824a2c131c1029ee698c8bd00", + "0x002090736053dd2f594cabd6ad1faa00fac1cbd5819c5bff8cb7afda61a097e7", + "0x00030c4c09af8cbc13f07d6b4430039d47727c1fd0abaa74a1f535753e9da4e0", + "0x00e592faca0f3fa998759e0a5a0fbf43f9e528262618ba63e6b40b33e2759a52", + "0x00bebda5ff8e57707917e50a2e02141bee7335c39fa6d618708ce1c2a344b86b", + "0x003ad0b330dadf65ee81288398eb29021cea37140c99f0c9c4c58b2c01c7bafb", + "0x008d5c34f0f9de3ba052f02e1a3cbff7db96319458bf2bb9e8ed2e5f6e12e53e", + "0x0031d3e61bd6c7511ebb6d1a3d98bf5bebd1be689e4f53a1d330f406ce32d229", + "0x003308f5e822e088139326b93ce676659cb329307b4c7a802c0cc6bc294a8e56", + "0x0025fbaea9c4bfddceeeb7993262bf9e5c70140bb21b707f9cb7d718ba09119b", + "0x00264055955bcb09500fde349051af93d3057a404003130af4614ab327d6e038", + "0x00650b1513cb300f19d83703454260f27f4993ac811470d1c698f1205960a33b", + "0x000572b4ad1485786d698357cdd1eb2e336b54ea06eebee55c9a6f3b88ba30de", + "0x00a3db6b7cdd928be5fd96d50fb4db75075bc1f6c81783230f552f21a7b456de", + "0x002bd40b5bc3d8f7fd1f57361f92541cc3e4eba570d4258caff176eef31cabae", + "0x008af988b7031a1fb8423a6d576e4ca5a1276e1c8d9c80d3db9bb9d712de0dc9", + "0x00ae0e24bdd690e862c90af045ad5d9bacffb7ca998b8d53a8a350307543eaed", + "0x00cf02076e4a610d9d75c93b8f2d698caeb051efd2ce6e43eca436c14caf6514", + "0x00226e5c432ed337f109c925d3ac0cf0a25f13fe6f7a52d45acb6abab7c42973", + "0x00d1121d889060dd27b8309dab9fced2d23fb8fa42ae9b69e2a15c55e08d8b14", + "0x00e202340a64d914534cabfafc5a787acea123a021ea8991c8089c8ae549208b", + "0x00cc3ffcc9e5af18ffc5fb470670042fcde0ac0fd4a3a72d63c83b094c9d5982", + "0x004ad479d6522a7690e5b7f313b6fd6c6108121385e91b1bc625c4df1d852196", + "0x006347df809ddc9ea8ab1d7f9f3033e9501ab84ca429e84d3ee621cb37073060", + "0x0003616e559ac6ebd93cdd15ff815f1aab56e124aaed5a2315fa26b104069b89", + "0x006adf3c9bcb9ab042ed0c54c9073ad3ad06bac0915760cd31a2d53440f1a532", + "0x005c30f6f81141367c871dc44cb4e5a88454fdd957d366ef128079d152b06d1f", + "0x00f6742797bf7f0106c82e1b11f3310e076e8ec9dd67eaa7cb664b4b7a07db4e", + "0x00708725491bcb0aa1d2d57d99b1b6b9734b2ccf77fc289adc926204d54eda6f", + "0x00a8d9d05d2ee493d107e3c081d3542caddeeb2e901fb9132813317768e5cd08", + "0x00853c3bddf2af7f307e05ad89a0032fc397622553a70256f7381aae390fddcf", + "0x0054885155400c6d4150b14cd65372a59362ad4ce4d931122f72ec4ab7cdb420", + "0x00df20f74ff0aab9c1d96c822f297c83a220cb777cec6ec9de5923b8dec07402", + "0x007a33a0c6b7af034dc6b0622444d60266f36a2894a0b8f7278adebb22ed075e", + "0x009143ba1291569bb356a41bffb96e838678081eeda9879d901491b4f45cba48", + "0x008f67b28f66ed22ff75a8e239e170cd5ef2b012d011d902bfdc933b13dea2b8", + "0x0010ef509ffce85edcf42bad9d804713a48eefb9751d9a8a784452113d330adf", + "0x00ba089773466bc7e87c24f73746c4f007207b8eb7ca8136f04e8119f4bff7a5", + "0x00900652a2a7ba9551fb572d3a0d9d605e7bc48d12f1d044c3f41284f987b548", + "0x00e4cda4cfef31cc44a2be02167dac0d857ab2a6e29aa2d7917aa1bd18620a56", + "0x001a1532119113b831375f354e592100c7957a47ce2a3b392f14a9be2c9b9486", + "0x00753b3ad491b27f6703b9e5805e0250949880e51ecbbafc0ec24a98dc89116e", + "0x001f3c0760dcba8a6366dcdb134d2bade3637f9ae31c4b728d4c39e0cc00592f", + "0x00787ffd0f0fee179dc6adf8b49b3a4c2639176b8c6de7425b9be03247fee973", + "0x00e2f7722e6bfd327cc5bf0cf5c37dd4d3b55d84b41787ebbd947f3fd3337b45", + "0x0003308732696fdb0e2359ea5fc02962391eb9d48d286f6885210b29c292bf37", + "0x008404a250edec9230853f871876044c878fc3d3d5b15530ac67c3002e74afe4", + "0x00a09ffb429d0e94b1718a119427b3c94417fae3ed97259178e86fd665334db8", + "0x00176122ea436392079e10b15a6ae83229533970d8b3d0b4354ae46af369230a", + "0x0017beca9e65ebb50794c9dea109a3b54c2a0050344acbb3db1b656ca4710a29", + "0x004d362556b03a607fe17afabd51befb2df14f91deb3b9d86c75b80f92d56eec", + "0x0032ab4a0ddcd1823baf1cf4d95cbd0eda9763ff68c02a3e0f1bb10be075fcf8", + "0x0091cde893cb3a875098167d60d690adea3bb877b54781286f6918e38c87aa8a", + "0x00a0135c667d89b8d405c91f5603c825ae25a0b4bff4c58cac1b5bdee94b7d70", + "0x000457d15b3a7f2c6a05a4b4e68283392c218782049d57175d44993fdb949a2a", + "0x00e63fa7f81f1355ba2b4b4e1573f001710169836045d2b792aca5277d306613", + "0x00002801437aa56d5d66d8778968c44a808dbb182f28d83ceb5647e0028865bc", + "0x000a0dea5b453f8228a3cfb6d05331d4339fef12ba05230a4578f9e3417a2664", + "0x00697310a5445277d7d55471b0f3e6727a9fa0ef2364ef7597568d3e4a6378f3", + "0x007ac355b943551f4ca80ead7fc4aa73b93649b3acbab598db64e0e450a27518", + "0x00423567afaa5f4c27177cca47d158dd03e385268121ad08094e8ba8fb63292e", + "0x00098188592b6b8d57a9b163ece06745f236394d38697059881d5c7ba016a3f1", + "0x004fa4719d22e8abcf551edb7714bf445c1ea660a5b17f76f9d2691b846c916e", + "0x001d5a3f0d47705c7a70708bc704697e14d36cc2430bfb3eb43155d6e6fe99b7", + "0x00daf1df7caa145013d10a9d34ca92a49aee2773d7124e27ae9ac1e5f4ad5739", + "0x0096f5314b7e033c82c278fcc245d545e023ddc13e613aad2542e368c4198a15", + "0x00edcf10ae1ef14b825ece900bb04a4e29133a34f14eff015840dc0ffcfbc6e4", + "0x00dc61949ac85cd4aaed340c9372c9cd5a385b30137799b52481c4aa23f0295e", + "0x000af5434f3b276c1fc487d5541be8464d0085198762dd347ca777c86d4a0c52", + "0x00dcd086971eb3a3ccc3906ef3cd89e2774ce86d40e110d40d51504300e719ff", + "0x00ce6f8a932a5801529d443b549bb71b114722bac3dde72489e54be593357357", + "0x000925cabbf3482b06c8389c216cfe7514b8733fc4815817af8e6c1cc41c424e", + "0x00f8e5a1f3a8852b99e3e5fd0757075ce80fb05a6d641dedc56b7a830ef9b04d", + "0x0047b2ff87077bad22b15116677238dc1d228707dca879159a71a2cc32b99cba", + "0x00affed6ec726bfc8ac801518991001398134719477128925e6436c7d58a9e37", + "0x009ff92d2e1e614d4187fbb04b7e72656f648bd81447bde808fff841dab7a4ee", + "0x00710f7bcfb639525742499f1a219f8473a4e5e4da3b28d55bfb111c9f7be108", + "0x00b60cefe06e1ece3f6aafd9858759cde8177f1ddc2ad8454f08a9cf13a2e756", + "0x0074cbc9e767362a6f1f34ba5bd567a629e15683764343a0c5f2e5f202f5054c", + "0x001b45acd842b7d0e69e78fbf95ea5b94ff824aec2638a67a95edd6545531721", + "0x00d888ea27ca7806d67fcb55a358e61eec01259d7f331fecd0193a753c380a0c", + "0x00ec764161b3f3a24c4d736b2db77a7b443b35afe5a7d4098cdb781a92923d39", + "0x00ee2820c175fbc0f373bec0add8c5971c0d3906bcacc2c3d9e72af0714ec6f4", + "0x00a565351cd44be8d447782d88830e5c9489240bf6ee4687e2d90a69d94b5467", + "0x00ca68c0c0319b8abee2c046fc35165c3496c391b11b28e4d154bec8cc62ede1", + "0x0082c788fbbd1ec0080eee17e5ddef2c94ec5882336dbdba2a3f4cd1b2e378aa", + "0x00e6ce5e464ecb032b24478e8caf299e06f29b3f7314cb7bb239d32e03c9aa07", + "0x009c53cc11db0cde4646dd3a01f1deeb10182b163b333d5af317d270175635bd", + "0x00da00dbd4bffe8b0b7b1d331ce5d76a4b0c20726a1d37712b57d2c892956413", + "0x00350fe8778df6e1e4d7a0ae1dffe244f2bb75964eefa0a6f15a590d06947692", + "0x00bbaee2ebd3af96fe3be0d7ea6bfe2da5d05ef4eeb513f1a60c38144098bd90", + "0x002401bb3b99a7a9885df6d93e015de534bc5baf0e94d2ec170ef161d4303d92", + "0x00d4fa8adece52420c57153836cc03b60cd883b028a3ab3fe43a7f4fe995af16", + "0x005d08bcaea9f364c7828422d467376a935730f8047d6233361e7077e94bd7a3", + "0x00d4983eb2faba204a9219e2b483ab7155d1bd97ebbf3d355d7e566008d94af0", + "0x00ca78c6e97fdeb6d5dce0a1241e5a4be2a6f4b088955d9243b23c0513881621", + "0x00afa73507160cb6a67de1ea33c89ddf4dfb862131c2a219aa3e6a4c3c04697a", + "0x009fc0d6cf6ad7612eaf81d2380dc00fd0ca8e32d932d2321ce117eb7844a2a2", + "0x00145dc0757415990985acad2a3a91580861e608d2e3bb4651073cd1b210dbf3", + "0x00a85dd8638c5256d5731e22bb93642556cf003c48936c1886825ebca6fee8fc", + "0x001d84f9faef9ae238ea5cc61503c669c08cfb4bca78f8e09518e42f9ca50767", + "0x00447068b691fb55572ddd3be79d63ec290a92cbf9c8a0f52c6fee8d80d09a62", + "0x006e4d59d54ad6e68d7fc8d79909a39ce3c977075f51d8476d9e7f6372e45f8a", + "0x004e4f0d886193e8dad0889749d2ca5d77ed01b5356b4e3a2612d3efcc82b1d5", + "0x002bfb377a19bc0b1202981fa32e6ea057fe732f01e36a60b71fab64b617bf14", + "0x00fb270801c9652cc41436db6f4d915787bc08fbb763bee996d8eea2260cae71", + "0x00f7860f5a523d71a10ee7d20e5f7861f6b80d454497a7207dcc314ae11bf293", + "0x00a7af8937b22c830172094e2b4f00ac7d71d739bf9247b5dd37ed4d5ac0f5a0", + "0x00a6469fae841263ec804785977197bf5046e0fc6ca50e81ba5ec05ac1ab79e5", + "0x005b6a78c34b6082ffb2c0b963cabc672933b486683d48a507a8cd91247d9b9b", + "0x006aea60fb60134f15342b27c189fc7c08e4b84f94e838de764e56563db9041a", + "0x00f176e70adb5e28fcb22e0ae2486cd34ec16682b07f390d4051d443b5d8c71c", + "0x00eb318f6d7696721bfb920b9d3f54fee571febd40a32a70f1f3aa0db3553185", + "0x0002c765d6081c8c184a288c50d2680e68953cae8a025c61b8ffd6d696abaca0", + "0x00b5412410dd5175673f8139c087cd0e0dc273dbd0463adeb0b58f8b475f5b3f", + "0x00592e917550f03fa1190ac757f6c5bc40e3b057e55e2b57e33cce9ce0c12700", + "0x00a8c7defb76a6b75f751bbcd3751d55258282f29ecf3bd283aee4532a24a8b0", + "0x00085a01c24fc50e68bd878064d8fa22603a8c5d451b0fd6c8945ee38f806beb", + "0x00552bcd784388f22c65f849f56cf6507a4e3fdcda760d0c6c14a9f76d5d7b84", + "0x00c7e68792918ca6c6479e87af1a829f4dc28445d40c89ad00a3b520076b165e", + "0x00851c16f8387535df47d65afd7a2bed5d447d3c9b936bff22f243adee0b9bdc", + "0x008f708d0f5c407b4dad94f375e332efa87f9f6dfe25e542c2020b08a8bbac85", + "0x00bd9b8b91f72f8c9cde6a0d6e2479babcdf90cee70cf8c9e36b5fbd5b27af3f", + "0x00b6b5da26daa1e478738d66d5bd909c634aedd79dc7b6333613417978db0cae", + "0x008080747d758abcd55a281ecc5b4a09d80a51e0eae49957190c2ea5059f4bca", + "0x0074ed7058d8ff764c9972bca7adb409974cbc44c3bf6e5dfc98c561682075a4", + "0x00771670496cc664a02222dd8c0b0d6bacd1fb9258748d8a082613e37d41eae3", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -4281,10 +5262,10 @@ contract_class_log_fields = [ "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000" ] [inputs.hiding_kernel_proof_data.public_inputs] +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e64f9" [inputs.hiding_kernel_proof_data.public_inputs.constants] @@ -4325,17 +5306,67 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a353834" + + [inputs.hiding_kernel_proof_data.public_inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + + [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header] + sponge_blob_hash = "0x1fad41664934f3bbb74d823607f71b32aa4b87058e6a79259f7619e3d86edce7" + total_fees = "0x00000000000000000000000000000000000000000000000002e8904dda6a2900" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000afaf9" + + [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.last_archive] + root = "0x10021e352049a7d41869567216ceb315423b643a2c0f224b52bdbbf9257f3d0c" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" + +[inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000c00" + +[inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000006" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000005" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f4c4" + + [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.hiding_kernel_proof_data.public_inputs.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" [inputs.hiding_kernel_proof_data.public_inputs.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" + + [inputs.hiding_kernel_proof_data.public_inputs.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [inputs.hiding_kernel_proof_data.public_inputs.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -4347,7 +5378,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [inputs.hiding_kernel_proof_data.public_inputs.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000143fb9c3fe" +======= +fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000001cdf848f5de" +>>>>>>> origin/v5-next [inputs.hiding_kernel_proof_data.public_inputs.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -4421,10 +5456,17 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ +<<<<<<< HEAD "0x12d1a8f339ac9b30aa47bf7c00ed478423d06e8a4e568bd827fc8104d901ca05", "0x2e3af71b5fe34cd92094dd31931363f24ff8f759742d09a216d636de4c7e0323", "0x277b1930c96a4771d7d1c33b7d19eff1b3a47fce3a328b55a2a4caadc7fc74bd", "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x2cf7c5914b1b832c41d256a7bb0eeee95eb11bb95c73c4dfb76187bb96a2de28", + "0x14bd0ac8571506d0c23c806519a65c7b7db034e372701ac6129c2682f2dfab1b", + "0x04a1913c790517c38bc0b626f9bd93fdc0ac87dd4078c1a3856007dcd1d40037", + "0x2a39a8ac8b1b52b8d62f5852f15e31c0c1314395eb5caeec64fbaf0aed92a5aa", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -4570,10 +5612,17 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[inputs.hiding_kernel_proof_data.public_inputs.end.private_logs]] fields = [ "0x1a7e1badb79abdd38c684b3c8306ffe7ecb33c69e3380d9855730aaaa83a21a8", +<<<<<<< HEAD "0x25f1be81a0ae9f7adc0506c721cfc092cececc837fd115cb16a60e8247d6312b", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x1e495537a58fe255952a20bc319ebbf9d5eb2bc2692addbee2f6f97f946eae28", "0x1e492f3e5b963534b5812a7e1e704db89c5265ff507aee8ff96a27154525c44d", +======= + "0x0862b093e51b2ed813afc858c75454b61144d8849aff9ab19ce5933d3a9983fe", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x24ffcddc6d00c53f277dbe2482d23f64c62bbd6a18ac7952010c0287a8a52b48", + "0x2a49fd794be38c1b8479c53015be3ac929e7ebdc5dd5bb8de3ad0528f6fba39e", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x14fbaeaeddaa69be81d404c684e78e9f1a786d225faf8de2ce97c92f67d89a26", @@ -4583,7 +5632,11 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x082c6d164b0ba073c9dd911100248c8ecd80b03f82f38531856a3c16dadcbef0", "0x14a5d4bde495b8c3a9ba4aed0d4870526e46fdff22d341a2f689ac5a50d10356", "0x0f124f07811eebfaaa6d31316a2cc5bf255fa118f720e8ff1f2fc0d4aa46d496", +<<<<<<< HEAD "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93", +======= + "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000" ] length = "0x000000000000000000000000000000000000000000000000000000000000000f" @@ -5913,22 +6966,35 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[inputs.hiding_kernel_proof_data.public_inputs.end.contract_class_logs_hashes]] [inputs.hiding_kernel_proof_data.public_inputs.end.contract_class_logs_hashes.inner] +<<<<<<< HEAD value = "0x26c5fadd46f22f0332e40a9bab5d3386fbc05a6363b70aad1822680da2a2ae3a" +======= +value = "0x16b2f367024e4bc2195b21dac27a4594449c0bc4c6048b2bcdffe9794b3342ea" +>>>>>>> origin/v5-next length = "0x0000000000000000000000000000000000000000000000000000000000000067" [inputs.hiding_kernel_proof_data.public_inputs.end.contract_class_logs_hashes.contract_address] inner = "0x0000000000000000000000000000000000000000000000000000000000000001" [inputs.hiding_kernel_proof_data.public_inputs.gas_used] +<<<<<<< HEAD da_gas = "0x0000000000000000000000000000000000000000000000000000000000001000" l2_gas = "0x000000000000000000000000000000000000000000000000000000000008992c" [inputs.hiding_kernel_proof_data.public_inputs.fee_payer] inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + da_gas = "0x0000000000000000000000000000000000000000000000000000000000001020" + l2_gas = "0x000000000000000000000000000000000000000000000000000000000008d7ac" + + [inputs.hiding_kernel_proof_data.public_inputs.fee_payer] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [inputs.hiding_kernel_proof_data.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000004" sibling_path = [ +<<<<<<< HEAD "0x142ad0688d394b548a3c50513cce2a3a87634c8a631a6f90feb36791a2de3fe0", "0x2f0b44396bc4f38c76b5df8ce62419e8997652d964598cc149b3604ddd0ccf4c", "0x2dd71474f7775d87b6c2986ace5f654686583f0970d7400b1ccf8096dad131b5", @@ -5936,6 +7002,15 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000001" "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x05200b2ca6ae476d5166f0c80c41e0bd4420b65e24e2c2f7b9aa48dba8e509e3", + "0x08295f47c275d01d4399b84ab8826637faba8ed95cd5b3836a563118a11ca483", + "0x23106dac33cae101c3ceb015fec7d795f24ed63e984917bdafcc48092586396c", + "0x0caf715321e53b2ad3d2ce035f8912152190fdab2df8b651de5d727ff976b2ce", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.hiding_kernel_proof_data.vk_data.vk] @@ -6063,6 +7138,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000001" hash = "0x11583d32c8e6284b96ff53e31d923316bb64a25aa59c13f6feb72e001834ed70" [inputs.start_tree_snapshots.note_hash_tree] +<<<<<<< HEAD root = "0x034b30004686b0cbe57927eaa548af4a428eabee71f4e3e8a581a43084facde5" next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" @@ -6073,6 +7149,18 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.start_tree_snapshots.public_data_tree] root = "0x073b8408b98dbac4d5f0c84d47161ee954b8d8e7920e620bf14bc44cb50d07d5" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" +======= +root = "0x289c90c4798ab62b3b71353106a1fc3b2a919c381a399533897b191604941146" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000000c0" + +[inputs.start_tree_snapshots.nullifier_tree] +root = "0x2861c22c5d70685972885c38a57b846bd36c8bebb807299006f4e6a4671315f1" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000140" + +[inputs.start_tree_snapshots.public_data_tree] +root = "0x1b0c19e64ef41e3f14cf75a2052d3ee4c0f504e8c01b801b9647aaf884f0ad5d" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" +>>>>>>> origin/v5-next [inputs.start_sponge_blob] num_absorbed_fields = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -6094,9 +7182,13 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.tree_snapshot_diff_hints] note_hash_subtree_root_sibling_path = [ - "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", + "0x0f8649c45b463804ddffc1df9f119c133545149a3dc73278953f8948b8f78a0c", "0x221cf368938c74e4fced9dfb2a8e37cd8a6c57d21385c249f0b5c2412341287f", +<<<<<<< HEAD "0x221da87ffea1794103224b6a6fb6087652fc93f3b68c5ed793c34183e04b1639", +======= + "0x2c5214dfc4d70d2619fce2a7e02ddcf380576dca42b66c9215c7d8d1ec154116", +>>>>>>> origin/v5-next "0x13abc9bba431e6930c169f5daeb60aedbb27d7618c7ff88b3b4ec1c6de1d6bb8", "0x0d04c63f36bd168215c9b09a227c7e8d3ad48e2f11b8202fd07c524bd30ee88f", "0x042c72d0ca208f0631ed947050258333518c26059f0a2ef041e933b1b2a6d8ad", @@ -6132,10 +7224,17 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x08c286d5f8584ac20b64b63f763d4ec37d3fa13244234a3280f34bbc70a32d53" ] sorted_nullifiers = [ +<<<<<<< HEAD "0x2e3af71b5fe34cd92094dd31931363f24ff8f759742d09a216d636de4c7e0323", "0x277b1930c96a4771d7d1c33b7d19eff1b3a47fce3a328b55a2a4caadc7fc74bd", "0x12d1a8f339ac9b30aa47bf7c00ed478423d06e8a4e568bd827fc8104d901ca05", "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x2cf7c5914b1b832c41d256a7bb0eeee95eb11bb95c73c4dfb76187bb96a2de28", + "0x2a39a8ac8b1b52b8d62f5852f15e31c0c1314395eb5caeec64fbaf0aed92a5aa", + "0x14bd0ac8571506d0c23c806519a65c7b7db034e372701ac6129c2682f2dfab1b", + "0x04a1913c790517c38bc0b626f9bd93fdc0ac87dd4078c1a3856007dcd1d40037", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -6198,10 +7297,17 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000000" ] sorted_nullifier_indexes = [ +<<<<<<< HEAD "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000003", +======= + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", @@ -6264,9 +7370,15 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x000000000000000000000000000000000000000000000000000000000000003f" ] nullifier_subtree_root_sibling_path = [ +<<<<<<< HEAD "0x17acf70e0c2c112079976ede03422d2d392f986233d1a69200c21339d06949f3", "0x0bd2857784e8b8ff44c15518f80c02d196abdd5f5d5fc13a3084103961a88fcd", "0x2235fdaaafe78ae697f656ee44916a9b391542c2272662081943bf0df6d4276e", +======= + "0x145cef26d6d735b477ad28e2f5b660695f6e628e635066d6e6dc593534762cce", + "0x07a6e7b9c3db41d506f2e2167f81eaa29bf7e0122df4271803d18a18e70fb695", + "0x15b84912eb367bf5ddc1a5ece5f13c9b0d05bd8f284bf3d176e82864b2c8d5b3", +>>>>>>> origin/v5-next "0x069ffeb74002e1b66ea87b4b892a2342aebf7db6fe97b6bcca6952caad6e21f1", "0x2842a7e5a723d69a6f6c088fcc7b2e289173ca583987359c712c15ee44806960", "0x2bc8d89815dcd02215ab5a89956f9743a205a7fd71e002096d7c250ffc3544bf", @@ -6303,6 +7415,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_preimages]] +<<<<<<< HEAD nullifier = "0x2d70b3edd5ea8e441d9c60642e8f5cf06efc7f5916360c7a381ea1d12bdd5b7d" next_nullifier = "0x2e4346b6f2ce1618358e4068db5abd71fce977d88f45d8f854b8543bc242663e" next_index = "0x0000000000000000000000000000000000000000000000000000000000000080" @@ -6316,11 +7429,26 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 nullifier = "0x0eab5e9b50effaadc7a101bc45a59cba6fec557fe93801c9b696eeb4e8d380f3" next_nullifier = "0x130b3f39c3daac87ff98ce6d3065f1df9408cb42eb2488e92b2dcfe356f44a1e" next_index = "0x0000000000000000000000000000000000000000000000000000000000000141" +======= + nullifier = "0x2b1dd692b11d526c8bfe86f205090eb3ed17d63967ea0f477bc7f7f06ea705d1" + next_nullifier = "0x30045f61270a68eff469724e28ba52424c89a5b253e61818e339be92082c8dfd" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000088" [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_preimages]] - nullifier = "0x0000000000000000000000000000000000000000000000000000000000000000" - next_nullifier = "0x0000000000000000000000000000000000000000000000000000000000000000" - next_index = "0x0000000000000000000000000000000000000000000000000000000000000000" + nullifier = "0x2478eeb8cd16675e549238d43341428730f2eaceb1aa125aa6be1ac9421810db" + next_nullifier = "0x2aad375884d0807ed4cb1fea923601780fe2e8c6140a60266bc0f781aa22f081" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000085" + + [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_preimages]] + nullifier = "0x13c2d2a967c5e99b468838732ee28086e248382ad0a999465537ace027ae2313" + next_nullifier = "0x17af1470ce96f9e8c17d3e17151beab27eb6c6bcab00d01479e9461ded0e9b0b" + next_index = "0x00000000000000000000000000000000000000000000000000000000000000c1" +>>>>>>> origin/v5-next + + [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_preimages]] + nullifier = "0x000000000000000000000000000000000000000000000000000000000000007f" + next_nullifier = "0x062a836568e689c7702eb80681e657b5820ea878a9d6909070dfc8d3edcd9c77" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000084" [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_preimages]] nullifier = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -6623,6 +7751,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 next_index = "0x0000000000000000000000000000000000000000000000000000000000000000" [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_membership_witnesses]] +<<<<<<< HEAD leaf_index = "131" sibling_path = [ "0x18e3d7c49934a196a8196432ae4f604b957befbbf9827a47259b46fc15403c99", @@ -6634,6 +7763,19 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x177e64adc083a52dc53ed12723812daa7202407137fbf2624f95d326b11f46b6", "0x2a7ef7a4f827186772c36a1a3d7d9180e8606aaff613f82ee58d2375e41b32c1", "0x04bae0cb0b7424aa2a28250c718e8d6f9b47b623773803bef9fc3bad0dd1c568", +======= + leaf_index = "257" + sibling_path = [ + "0x05064a27947d00bcd0d8db619ac27e13649b33d84ad7d8112575d1ed1f1458c1", + "0x012a348f070bc2d39dc5c673aa528a65bc7095c0cb270286072d28a329527422", + "0x1fca8e5d48b8e1a70cb333a4f5ca28a3355ec77b582acf926a4a17d42c31f776", + "0x218d6b91b3a210e878d135aab2560fb2801db442dbd439ff2efd1fdfdfeeaad0", + "0x0b926aa38fc854f094d02c0b719a75e50a7d4a0ef11685217c6568095b41fccc", + "0x09c18d449a07bd072b1eb2b042e466fde1f82f740d57ab0ecb3ff368b3868abd", + "0x09166b559c0f096e897bb202971954b6c576adc978e55de25b96e97269f0e461", + "0x07a6e7b9c3db41d506f2e2167f81eaa29bf7e0122df4271803d18a18e70fb695", + "0x19683051dd0282d868c4875f46a8808595357738ecf7d9dc8c493e215c375d30", +>>>>>>> origin/v5-next "0x069ffeb74002e1b66ea87b4b892a2342aebf7db6fe97b6bcca6952caad6e21f1", "0x2842a7e5a723d69a6f6c088fcc7b2e289173ca583987359c712c15ee44806960", "0x2bc8d89815dcd02215ab5a89956f9743a205a7fd71e002096d7c250ffc3544bf", @@ -6670,6 +7812,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_membership_witnesses]] +<<<<<<< HEAD leaf_index = "129" sibling_path = [ "0x27eabcf280dcc1c733384e04702c8b3fa190c0606b82d71e9b5872116a87aaba", @@ -6681,6 +7824,19 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x177e64adc083a52dc53ed12723812daa7202407137fbf2624f95d326b11f46b6", "0x2a7ef7a4f827186772c36a1a3d7d9180e8606aaff613f82ee58d2375e41b32c1", "0x04bae0cb0b7424aa2a28250c718e8d6f9b47b623773803bef9fc3bad0dd1c568", +======= + leaf_index = "130" + sibling_path = [ + "0x16503c6560c9e6d1449be997ecc27f56570105b0a964e5e417834549626c4731", + "0x0641162d598d602f4b6f56145f631ec4653c98a32259f9cd268f375be8453f12", + "0x0b8d2dcf0391df29c692820dad0e8a67644862aebf84cede6171e1c7e20592fc", + "0x0c3e37f720c1a4baebb6dd3a619a4cad6553cb9bca9a4d48c28f5ca3a06d3f10", + "0x0b926aa38fc854f094d02c0b719a75e50a7d4a0ef11685217c6568095b41fccc", + "0x09c18d449a07bd072b1eb2b042e466fde1f82f740d57ab0ecb3ff368b3868abd", + "0x1d03724b23ef60fded0069c482f5ab0e0248ee024d42d2e44a1cc9929b7dc484", + "0x053e15caff688375b13f9f664a33f720689552e9d24554229622cd3f03aec662", + "0x2aaf5373a95fb898c99cc718a56f42a9eecc5bcb6882c1483698eb435110001f", +>>>>>>> origin/v5-next "0x069ffeb74002e1b66ea87b4b892a2342aebf7db6fe97b6bcca6952caad6e21f1", "0x2842a7e5a723d69a6f6c088fcc7b2e289173ca583987359c712c15ee44806960", "0x2bc8d89815dcd02215ab5a89956f9743a205a7fd71e002096d7c250ffc3544bf", @@ -6717,6 +7873,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_membership_witnesses]] +<<<<<<< HEAD leaf_index = "132" sibling_path = [ "0x2ec12fcb7949e1bafebe032ef7bd19cb529389e9590eaf1f8ae08bc96c2c2703", @@ -6728,6 +7885,19 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x177e64adc083a52dc53ed12723812daa7202407137fbf2624f95d326b11f46b6", "0x2a7ef7a4f827186772c36a1a3d7d9180e8606aaff613f82ee58d2375e41b32c1", "0x04bae0cb0b7424aa2a28250c718e8d6f9b47b623773803bef9fc3bad0dd1c568", +======= + leaf_index = "134" + sibling_path = [ + "0x1604f89e720e92df67b8703d1c5668936479ecd669269b7ed7ca02cb0ac71372", + "0x1363b2f791c04804511a182b49b342e3cd3e6c2d2c9c0258092ec85c477e5718", + "0x2d741815dbb8a1fcc1d95efa3f383dfa04688dfb7957b769ea95b4159081a5a2", + "0x0c3e37f720c1a4baebb6dd3a619a4cad6553cb9bca9a4d48c28f5ca3a06d3f10", + "0x0b926aa38fc854f094d02c0b719a75e50a7d4a0ef11685217c6568095b41fccc", + "0x09c18d449a07bd072b1eb2b042e466fde1f82f740d57ab0ecb3ff368b3868abd", + "0x1d03724b23ef60fded0069c482f5ab0e0248ee024d42d2e44a1cc9929b7dc484", + "0x053e15caff688375b13f9f664a33f720689552e9d24554229622cd3f03aec662", + "0x2aaf5373a95fb898c99cc718a56f42a9eecc5bcb6882c1483698eb435110001f", +>>>>>>> origin/v5-next "0x069ffeb74002e1b66ea87b4b892a2342aebf7db6fe97b6bcca6952caad6e21f1", "0x2842a7e5a723d69a6f6c088fcc7b2e289173ca583987359c712c15ee44806960", "0x2bc8d89815dcd02215ab5a89956f9743a205a7fd71e002096d7c250ffc3544bf", @@ -6764,50 +7934,50 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_membership_witnesses]] - leaf_index = "0" + leaf_index = "127" sibling_path = [ - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000000000000000000000000000000000000000000000" + "0x0d2e74b9d21f0f0ca0bb02fe570268b7927737220eb27c2ee03911305b4a39b4", + "0x167db2092ba5d66fdc88952b6c246a24e93d55746e938664b94fa366d09a0742", + "0x0d55ade0fc888ec20d8c4271228a026aed853e7bcd265b67f256639c523bde9d", + "0x1c2c3fe19919dae80f840f062aecc8b8b95eddad7c3e5a5e69d6fd498df5f1da", + "0x01262346a28768aaf1274d7ea9b68507aec9fa2c05d2e4eeb06b7ca109220158", + "0x2386ad8efab291e4b898923d75438868afe80f00f07ff777e5d7494eb5329201", + "0x12c5f568be23c7c730f64ff0df5360f45ebf9e5b6b6a337bdcaf36021e9b6559", + "0x1b00e815e57171e09eec089a8a9dc637750b6827fb5dff3d0c454b745c1ea26b", + "0x2aaf5373a95fb898c99cc718a56f42a9eecc5bcb6882c1483698eb435110001f", + "0x069ffeb74002e1b66ea87b4b892a2342aebf7db6fe97b6bcca6952caad6e21f1", + "0x2842a7e5a723d69a6f6c088fcc7b2e289173ca583987359c712c15ee44806960", + "0x2bc8d89815dcd02215ab5a89956f9743a205a7fd71e002096d7c250ffc3544bf", + "0x01d2012039a4d9492bb83367eead0282083ff9011b9c3884c96022f90dcf7432", + "0x1778f17c8e296c4932de3439ce9789f59b83d5d3b856937f72a288ae1bc374af", + "0x095c78afebf8964a4900d8fd66177a0984fb2edc4f356630aa51f907c85e84a7", + "0x046adaf8a40ea8887051610d6ab46dd6b048b5d9c53059df80986b5bef657f6d", + "0x1e11d1859ad659a0335c8fd61dc426014864e5a55bcaeb257f9d227feae35f6c", + "0x0d5672a31f96065cfd886a178fb8a68f39359e072cc46059f829646a54bd5fea", + "0x002d4f87866c996c7cf08f9f2586b9352c6cb232f63f1f409442e79544ed1fea", + "0x1ae0d30f052aa078af8db1a19c5b29221eede6254d8456d4cfee32c7a1b65478", + "0x1081707dd8a7f5c1a530083104d13fea9af029da4d2e61245362c1f3ecf48196", + "0x15e1c98c82aa0a3259bb22b05652d09fd002a68bf0e1d7653bf43e362fd9ba1f", + "0x27f95c7a4ac6c88c7de9875b118e512b5e2d37a2831fc024f8a19b8bdc93fdf7", + "0x2554df241c43f2f76d7a85046a677f6d9427a26ac0cd46ac0b50c4ed838a674b", + "0x2f195708750d44098049e52b6adfde393658f69efea5a667ffee73f6cc80aa50", + "0x0b7a6d34dcaea7f093ac0b9772051418f48daae9bf84cf17f70a296aef62ecdc", + "0x1b653bd3cc2dfcf3f3b3afb2d217a9b88780027696d7768efd448c49a19f8224", + "0x2df1dcfeb9b7af5dcb96a8b534dd71ef3d552a4137be5614178cc1495f7f75f5", + "0x0f0331f8536e68b278f5de7801c132c4147fdfaf87315d527d151ae390381ece", + "0x2f2d601c41f429882eba885efe4ce645282a3637cbd0ee792e1ac739039330b6", + "0x0d516d0b39971ef19fe22dd4ec75c46671f4565bfb058d2680822b9553744dee", + "0x2f2b3594d5c121e620d1c673958d592972294602c0f3e4fe3492b49fc8ee9b0b", + "0x16d9a5f4522dfbf3ffd8faa23855178b54891fa521cf64dc8b2ce9870443cb08", + "0x248a6f54e4dc5bd76713782a6b65b972110f1892ef8c95cbf20105b6f12f207e", + "0x08b23d0504724cba951bcc67ba6181d9a4fd3a8b214095edaffb0d7c8db16dd9", + "0x12660ba2b4cee62a89cbf769915ebdeded1f9b6e6ebb843944ec836659c9528b", + "0x0eb5f9c7ca6420724b0fc9b01a3662e3fe6f51c54d3978a61171326bf3ee92e3", + "0x0fbea79b7a5d8b5e9d1177db2431cb7882995d5ef59bbf97e0e20b5ae3288c40", + "0x05b719cf2bc233946ac8066663c68c9fe008f7fe6c22711946861ddbd61ab5ac", + "0x05fe8d565aede597081b80f58cac87763f6c9ee43a7ab0a5f2b6baa3a97802d2", + "0x2fca418f250f4226d90e9c46b86a7fde2b88532fd817811a5de8b9c5bcac7298", + "0x06c52a2b4d052ab23fd5106d1e8b198fb13c934bd5a27f7e06bce496e1c6c205" ] [[inputs.tree_snapshot_diff_hints.nullifier_predecessor_membership_witnesses]] @@ -9631,16 +10801,27 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [inputs.tree_snapshot_diff_hints.fee_payer_balance_membership_witness] +<<<<<<< HEAD leaf_index = "125" sibling_path = [ "0x0c58e78b79a995c9177f90f3cda8f09c427092142e3ab374370e7a327c6d5e18", "0x0d92ced82ef7d19f41e51aebc0a1d5da922111ce449eeb1fe7aa19f7b18b058a", +======= + leaf_index = "127" + sibling_path = [ + "0x071304749e755ad377a9872ade81d255d98bf6da3b478a2ba57228167e2ed864", + "0x240d76710145f48b2b7036c49eb1d9ae9ce0b3e0c51a3c419925b1527f5ed7d9", +>>>>>>> origin/v5-next "0x25f9880cb869559661922bb041a2312dc8a1ff03f0054689fee0e075d44ceddc", "0x0a17511fc198a5964425de50f75ead8401ae6721db865b4d0d13cb7299b276b2", "0x2edd4e68944dac758244213037fbe9d622c7c28d6070f16862b3e8986090bee4", "0x1d5ea1a288ff1ff4cabceaaa2f93eda378a5fb0a2a55423f4d4d205969181931", "0x23b80d0ef13d744a52faabf5651164d28f7faf902653e41a35472eea87936e6e", +<<<<<<< HEAD "0x281a050fb16dad309e13e5dc626bbab920bf06ec50bd61936b6fe01a68b1d10f", +======= + "0x1b2a9fedcf26c0626da922db2f6eb177c938c1a4a7cbcf55b7bf0129ba445229", +>>>>>>> origin/v5-next "0x16c8aff52f0422f4bfc502620fe15dd6a4de67637563b7a8175f2d5727d268a4", "0x1c76b6744bc3d6b1cd4b53459a08b4959643c0768fde657299fcc82e2732f744", "0x12a6fac0fdfbd7897d8fe955f454cdb309ce8597d647ebfd0ba614c4eb215581", @@ -9676,6 +10857,7 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 ] [inputs.fee_payer_balance_leaf_preimage] +<<<<<<< HEAD slot = "0x061ad0f0ed7065820b58cc64574e3bf863d19f7b368dc6d3594bc21208d48f6f" value = "0x00000000000000000000000000000000000000000000021e0a83cadf53374500" next_slot = "0x0a75610d692052893cfb76a933a4a32bc9235e77292c988ccc50fa6c07c267cd" @@ -9703,10 +10885,43 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.constants.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + slot = "0x21fc750a8b31b045081f1fdccf15a3efc50cde236647d27c23a0e355ec8e832d" + value = "0x00000000000000000000000000000000000000000000021e0b1aed6f2c2d9dc0" + next_slot = "0x2401fd18b1c227a2545caa335ebd49f36fda00bee628f90df9ace0b3d12a8d10" + next_index = "0x0000000000000000000000000000000000000000000000000000000000000089" + + [inputs.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" + + [inputs.constants.last_archive] + root = "0x1aaf8f2f78d1643592a26e09a27806a991a42789155ff1b950de8652f4ab55af" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000007" + + [inputs.constants.l1_to_l2_tree_snapshot] + root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" + next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001000" + + [inputs.constants.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x0000000000000000000000000000000000000000000000000000000000000007" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000023" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f62c" + + [inputs.constants.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.constants.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.constants.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000002f8e08bc0" +======= + fee_per_l2_gas = "0x00000000000000000000000000000000000000000000000000000043cf04b100" +>>>>>>> origin/v5-next diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-public/Prover.toml b/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-public/Prover.toml index a63d6738e4f6..e4208c21f9ab 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-public/Prover.toml +++ b/noir-projects/noir-protocol-circuits/crates/rollup-tx-base-public/Prover.toml @@ -1,9 +1,15 @@ [inputs] anchor_block_archive_sibling_path = [ "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x19f1a0c09db4cd026f686e9c8fb45501a9fefb4eb1b4c6c328a51343a0094eeb", "0x26a143f9222c4ce37939deed6bf5daaa3020d99712c72f9303b3df89e6ce47fe", "0x09308d0807f5aed64dd43d2014519a161c32f9a52ea75992cc18bec0bcde410e", +======= + "0x05cfda92d9579deb6989e00ca22c01ea099d88e624d3b17527d338a44f3fae45", + "0x14e4b977b2203b70e6ee1c2456eb7114d090fe4b907f631eecd0919fed432e7d", + "0x190cc93605c7bddd0a2bc0f18b6c86cbd0e7c5ae1841a9ba384479d8da3a4350", +>>>>>>> origin/v5-next "0x1e20ad4181460cbfdc74ca773502c59b890f184efe300ebad895956d318422da", "0x1434e6e2d5db1053ab8a3be58704509c799ee17e109c77f441f7bf1755400249", "0x119f56a2e8423a7feaab49b9b5dcbadec0648dfa4096b61b6774ea33ae29dc7f", @@ -3547,6 +3553,7 @@ contract_class_log_fields = [ prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail] +<<<<<<< HEAD expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a4e66a9" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants] @@ -3587,17 +3594,67 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + expiration_timestamp = "0x000000000000000000000000000000000000000000000000000000006a3539d8" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants] + vk_tree_root = "0x1d81bf218cf88e95c51350b4b8de70a16798a155136d1eeb6e4f3ee05815a14d" + protocol_contracts_hash = "0x26cf75487ff6f1579ae2da13774c6783c1c6d33361a3ba49e6708d140c85eadb" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header] + sponge_blob_hash = "0x196783cdab0647b9bfd9b7d1007de03d934fac33ebd6d73a11e372bf123fc193" + total_fees = "0x0000000000000000000000000000000000000000000000000023c7951d452c00" + total_mana_used = "0x00000000000000000000000000000000000000000000000000000000000815ec" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.last_archive] + root = "0x03a6e674e028a4b73abba3bb63b5fc3932c9bd0ff12961b30d10c001f9f78b17" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000a" + +[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.state.l1_to_l2_message_tree] +root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000001c00" + +[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.state.partial.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000001c0" + +[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.state.partial.nullifier_tree] +root = "0x28dcce21e205acd07284b78e384f47f13789961dfada3de96d65c9d91d81be80" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" + +[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.state.partial.public_data_tree] +root = "0x2a3229c1eddabc5c3f0a3bdb75ee46983b9409810ab1abcb58bc9a7b5fbb086e" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.global_variables] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x000000000000000000000000000000000000000000000000000000000000000a" + slot_number = "0x0000000000000000000000000000000000000000000000000000000000000028" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f668" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.anchor_block_header.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000005aff97e0" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.tx_context] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000046cd27100" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.tx_context] + chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" + version = "0x000000000000000000000000000000000000000000000000000000004258a621" +>>>>>>> origin/v5-next [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.tx_context.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -3609,7 +3666,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.tx_context.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000221fd8f40" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001a8ceea600" +>>>>>>> origin/v5-next [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.constants.tx_context.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -3683,7 +3744,11 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ +<<<<<<< HEAD "0x1523ab5b2da90d6aedb2d49ec552cdab226c0185f25b486ea9cb02bf7f8f6e6d", +======= + "0x07679ba390d8ed0062796a06274a7f130290967b4b2aeadc335fb35f597f0ae6", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -5569,7 +5634,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ - "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2494b6b5a233ff6173f13d09427855037b51da7585bf7a70b4c230eb16c1c0fb", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -7069,6 +7134,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests]] is_static_call = false +<<<<<<< HEAD calldata_hash = "0x1ff68011e11d23df4c05c91a8f699ea4cde4d5d3a8b993c1bf80ebe205a32c60" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests.msg_sender] @@ -7076,6 +7142,15 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests.contract_address] inner = "0x0f399603cd563c9339da6883c141bae61ae4ff0876ffecf0a635bced859c1477" +======= + calldata_hash = "0x18f4b3d172e1777e88e160b6877108e8ac1ed0283da06f722328e01c6ea9cb43" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests.contract_address] + inner = "0x0df0497790c45b5d6e6e431b8574719cc4113fa266765361666547e6c59fd0ba" +>>>>>>> origin/v5-next [[inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.revertible_accumulated_data.public_call_requests]] is_static_call = false @@ -7398,15 +7473,20 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.gas_used] - da_gas = "0x0000000000000000000000000000000000000000000000000000000000000080" - l2_gas = "0x00000000000000000000000000000000000000000000000000000000000903d0" + da_gas = "0x00000000000000000000000000000000000000000000000000000000000000a0" + l2_gas = "0x0000000000000000000000000000000000000000000000000000000000097c20" [inputs.public_chonk_verifier_proof_data.public_inputs.private_tail.fee_payer] +<<<<<<< HEAD inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [inputs.public_chonk_verifier_proof_data.vk_data] leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000006" sibling_path = [ +<<<<<<< HEAD "0x080a62f938a5f53f13c6f7f76c406722d810698e6354fed4f4e52ae528e124f5", "0x12ce5a49a1ceca53ada7bee003f929bbd65abaa74e8072a81f304c2c96c44e31", "0x2dd71474f7775d87b6c2986ace5f654686583f0970d7400b1ccf8096dad131b5", @@ -7414,6 +7494,15 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x2a17b9f268be22deec2941ce8de06f485f2d164710a5177d262a4ae86b7c351f", "0x118d25fdd2c4cc96d5af69bd85930dd49d101d463e3f5ee9f2cc9236384b5d41", "0x19dd00df005acafea7173682679ac59d437120260bc4c6179b6dc40d3154cfed" +======= + "0x0b132a0337b7f5d353321aba6b698f936aadacf4e52ad0d636d831b8d4998bd6", + "0x0bf5f2bcd9c0361745fce3f1331dadcbb9e733ee2784ce608d6a63f26b90e373", + "0x23106dac33cae101c3ceb015fec7d795f24ed63e984917bdafcc48092586396c", + "0x0caf715321e53b2ad3d2ce035f8912152190fdab2df8b651de5d727ff976b2ce", + "0x00f7938889a563c0d60cf2f36d1ff511d2e3ffd17df7ba76def077af4b153429", + "0x0c9ebe56b660f71d708c189f5f8c7e19fc6b05d28e0bb343fcfaff008aa8425c", + "0x1504ac3ed470f288b30b63843c02bd11e8eee196e8702712c6dd1fe501e279b5" +>>>>>>> origin/v5-next ] [inputs.public_chonk_verifier_proof_data.vk_data.vk] @@ -7421,6 +7510,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000015", "0x0000000000000000000000000000000000000000000000000000000000000aef", "0x0000000000000000000000000000000000000000000000000000000000000005", +<<<<<<< HEAD "0x0000000000000000000000000000001d9eb51499c8732ca1e6693f20670e3fa9", "0x00000000000000000000000000000000001fa65857f43a56b076703eaf18c307", "0x000000000000000000000000000000cf5368fdef78be4ad835de4e7782877d4e", @@ -7453,14 +7543,55 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x000000000000000000000000000000000025bd0da0d7042ed91e9793e6de06ca", "0x00000000000000000000000000000031531ecf153d9aade19bb4ee6ff1c9e2f8", "0x00000000000000000000000000000000001183be9faa704d04603f4c16bdda43", +======= + "0x00000000000000000000000000000013ce8c92e1ff6a3c5f454a298d87cd85b4", + "0x00000000000000000000000000000000000fb0c41aa5facfff3cbd51b0428c52", + "0x000000000000000000000000000000cf664b3d52b6ceb0a43bbe0e5bba90e970", + "0x0000000000000000000000000000000000232fa6df8a24ebb6ffdb05e5f839a4", + "0x00000000000000000000000000000001cad63387bf8f2d89da4570ef67c383ba", + "0x000000000000000000000000000000000006bf1b43e3d206e615b7fc223f9c29", + "0x0000000000000000000000000000000e324b1407c98b5379967c5bd8dd9c0a0c", + "0x000000000000000000000000000000000007f5e2190fd468f5cadf1469f1b86c", + "0x0000000000000000000000000000004b91c0ba7e7a31a9e34b1a7c6890332175", + "0x000000000000000000000000000000000028d7b37b12cdcbcbb862a67811f49d", + "0x000000000000000000000000000000a63a4c6a369cfb9d3b0fe8dc47e653edb0", + "0x0000000000000000000000000000000000286198c7e5afc65e705bb5f22b3362", + "0x000000000000000000000000000000fa55336bc42057592c24832357fc216b9d", + "0x0000000000000000000000000000000000296a068222ff2f586d14220bda3755", + "0x00000000000000000000000000000068ff5ce11ca45035fe25a4fb05b29e76c9", + "0x00000000000000000000000000000000000dc32e83661224e2e06685d90de8e6", + "0x000000000000000000000000000000f4177d9e49f151cfc7979484a9a40759c6", + "0x00000000000000000000000000000000001df57f25adc49145a0803b6ae6fd22", + "0x00000000000000000000000000000008c66a61a900a06a4ba81b64ab0e7b0bea", + "0x0000000000000000000000000000000000109a18c0fb5a4ba8f70199df1c4910", + "0x000000000000000000000000000000a4839b8ecff9c697d98362475ff81ff83f", + "0x000000000000000000000000000000000003c6f0170bc3bae78345c8b0abe3c8", + "0x00000000000000000000000000000026514c9fbdae33c4d225e32b33c5c90bad", + "0x00000000000000000000000000000000001c90dc469bcebf5fe08daff9e197ee", + "0x00000000000000000000000000000082f12ac5ac899b229ee814893b3816d459", + "0x00000000000000000000000000000000001ec2d0f2d8f1b164e9e902ee8dca9d", + "0x000000000000000000000000000000f10043ad7d43eb7a229127beeaf07bffcc", + "0x00000000000000000000000000000000001b8ee0e9bf3ff1dbdb2e4f2f3f6ef5", + "0x000000000000000000000000000000751fbc34ec42a950e9f6ece64db5fa5912", + "0x000000000000000000000000000000000014593aa2fe1f5ad56cd95ab3a0b09c", + "0x0000000000000000000000000000000cc2627a96c5d201b69b480a9cb4f99de2", + "0x000000000000000000000000000000000006b9a60da856a12797246d15f3487b", +>>>>>>> origin/v5-next "0x0000000000000000000000000000001eee81b23a887f299049b14c11e98460d6", "0x00000000000000000000000000000000002a56ce41f6b0be13b9c26747621b82", "0x000000000000000000000000000000d5827d6338c78656c0d12ca1aea6ef2c7c", "0x00000000000000000000000000000000001aa98f2de3ddda547d8f6de4e725de", +<<<<<<< HEAD "0x00000000000000000000000000000019545a3ab6b0b5b35f859fdfc76f2ae7e5", "0x0000000000000000000000000000000000121f35a96d3b5ea9b82574017659b9", "0x000000000000000000000000000000119fb9e65502faf8b189c0483fb0b1b94b", "0x00000000000000000000000000000000000a9f4c1cb901fcbf8f5fb731b2a7c3", +======= + "0x000000000000000000000000000000cc47eb0f09a36886410c96690c6a08b00a", + "0x000000000000000000000000000000000019fd54c2fa0397e991473e2bc76ecc", + "0x0000000000000000000000000000002ddbd1f4ba5c319bd65395185c47b608be", + "0x0000000000000000000000000000000000033f77e5aba8547b81572bc40f4d07", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -7481,6 +7612,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", +<<<<<<< HEAD "0x00000000000000000000000000000036918bb8bb604edaa5e2bb465487dc8b08", "0x00000000000000000000000000000000000a96ced1af42d80ff5404b1fbf7208", "0x000000000000000000000000000000987ab3db5d8f362eca4ad9bd49397ab2c0", @@ -7535,6 +7667,62 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x000000000000000000000000000000000012bcd5c6635ef12ca2ecbc0e9b7bdb" ] hash = "0x1fc39d0a428c8536dbca551ea79848acf67d89d090fd8c643c7d90f2e8f32340" +======= + "0x0000000000000000000000000000006fa666c1a124e4c0ece3c9a58b55a03be1", + "0x0000000000000000000000000000000000139dee3fb0f953b8f83142453372ed", + "0x0000000000000000000000000000002a97ba5a8e2f9e9c1d653c8020e89880ff", + "0x000000000000000000000000000000000011dd9e064d45f2b691e9886990b78e", + "0x000000000000000000000000000000e71046556287fd9efea559128c630b0b68", + "0x000000000000000000000000000000000029b1a29d20ba55dbf44f1370aa2691", + "0x00000000000000000000000000000026e07571dd47385c41007fde5768d0ca08", + "0x0000000000000000000000000000000000128cdf31227ccbc8b2966630a6d560", + "0x000000000000000000000000000000c2c644cd328192b29212d0bb62a531cf58", + "0x00000000000000000000000000000000001f245bb87778626ae2a9158a606474", + "0x00000000000000000000000000000024ca19b77678965bef200c3b5bfe342690", + "0x00000000000000000000000000000000002520b8b0c180c3e0eefe7fc02ff71e", + "0x0000000000000000000000000000001e38fae226b5f6b942d0980fe0b55c338d", + "0x00000000000000000000000000000000002a452bd38f5c5a7fcb93337ab4c653", + "0x00000000000000000000000000000032383edb0e7d3fb484519472127a16782e", + "0x000000000000000000000000000000000009aa6eb15418419baa48473ed35d05", + "0x00000000000000000000000000000081b7302387ace9284050454794e6a01dd1", + "0x000000000000000000000000000000000002dddb7b773f05492c627c93d73053", + "0x000000000000000000000000000000946d0aa72624e88814c06bd980aa8fd799", + "0x00000000000000000000000000000000001192f1bda23af023b91ae1abfaf1a7", + "0x000000000000000000000000000000bccc51fcac0dc2bd102c0d269b9c9b6286", + "0x00000000000000000000000000000000002ac8bfed28178540eba1e0c6295575", + "0x0000000000000000000000000000003411f0cfd31f1def1376986138847823a2", + "0x0000000000000000000000000000000000212d4b659879157c61f493826fccf0", + "0x0000000000000000000000000000008cb3c6a1e0bd2c93d4cb0c61a316c82db1", + "0x00000000000000000000000000000000002a583f9223729531ea776143e18093", + "0x0000000000000000000000000000002ca7e4398fb32768332ada2335a977d47a", + "0x0000000000000000000000000000000000302a0084f84d2dced4d28076ebd946", + "0x00000000000000000000000000000063c0d27da3740e1afe4e931c439786ede6", + "0x0000000000000000000000000000000000162199b56863d11b218c2ba2dddb83", + "0x0000000000000000000000000000002506afbddc97453193b00b4d0c196d350a", + "0x000000000000000000000000000000000028f67cb66738d05f0c0730e4c81343", + "0x00000000000000000000000000000087309011c52f36a65a231392b425c15944", + "0x000000000000000000000000000000000005ffb05a869ff8ef58a25d534e8ee5", + "0x000000000000000000000000000000a613db8c3535272ab74dbe212a07ac15bf", + "0x000000000000000000000000000000000029f8169535e1f19e8cfc259a3ce5c5", + "0x000000000000000000000000000000cf21ff29d65a6309d9f3f257a1f62cc003", + "0x0000000000000000000000000000000000300e1c5efbab0cb9278980d78c4abd", + "0x000000000000000000000000000000358aba95e7dbe0a59a20aaeb134117f654", + "0x000000000000000000000000000000000015dd23aae926548d24be49907399e8", + "0x000000000000000000000000000000a5476d8e99c4bf1593026bea030c2b7ba1", + "0x00000000000000000000000000000000000260f79ea697030c00bf8a2afe99cb", + "0x000000000000000000000000000000faa19c6a4bde4940281909b3f167bd9cb0", + "0x00000000000000000000000000000000001e602ad8abf4ab33168834d66ee3c2", + "0x000000000000000000000000000000c088b0a0cd92539f32fa2c379eaf1cb2aa", + "0x0000000000000000000000000000000000267eca7c43a7eec7aac3cb269d65f3", + "0x000000000000000000000000000000a7591d82e62eaaf8e339c9fedf1c61b4e0", + "0x00000000000000000000000000000000001312148a51fe4d30176b964512c26e", + "0x00000000000000000000000000000071209785f60a4fc8898cffd4c6d20c5dce", + "0x000000000000000000000000000000000013fbfacb7cd6f3f3b9c3d0c754fc4b", + "0x0000000000000000000000000000005aafaca06f845fc5280d7e64242edc264b", + "0x000000000000000000000000000000000004c05f4f93bb70f27666edee12a901" +] + hash = "0x08e1bf5026afea79c199f336a0c22d16d92709e1dddd343a9f91f93f4423bdaa" +>>>>>>> origin/v5-next [inputs.avm_proof_data] proof = [ @@ -22074,11 +22262,16 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs] prover_id = "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc" +<<<<<<< HEAD transaction_fee = "0x00000000000000000000000000000000000000000000000000007bce011a9a00" +======= + transaction_fee = "0x000000000000000000000000000000000000000000000000000672f1177cbec0" +>>>>>>> origin/v5-next reverted = false [inputs.avm_proof_data.public_inputs.global_variables] chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69" +<<<<<<< HEAD version = "0x000000000000000000000000000000000000000000000000000000005fe47cc3" block_number = "0x000000000000000000000000000000000000000000000000000000000000000d" slot_number = "0x000000000000000000000000000000000000000000000000000000000000004b" @@ -22086,12 +22279,22 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs.global_variables.coinbase] inner = "0x00000000000000000000000096a3970e323d4410d1f969fdea80c679edfca17f" +======= + version = "0x000000000000000000000000000000000000000000000000000000004258a621" + block_number = "0x000000000000000000000000000000000000000000000000000000000000000b" + slot_number = "0x000000000000000000000000000000000000000000000000000000000000002a" + timestamp = "0x000000000000000000000000000000000000000000000000000000006a33f680" + + [inputs.avm_proof_data.public_inputs.global_variables.coinbase] + inner = "0x000000000000000000000000f4764a6b7266f7b07a09642e407b5f1e3a942fe6" +>>>>>>> origin/v5-next [inputs.avm_proof_data.public_inputs.global_variables.fee_recipient] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs.global_variables.gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000cdfe600" [[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] @@ -22102,6 +22305,18 @@ inner = "0x1630c2dabb9176fd0f9be44c70713127a4d6527224d90497ef9285e8513f8181" [[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] inner = "0x19776955ca4aa6213fc91d7364795fed89e608ca0506f41c447036b882d43f24" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000009a5d3640" + +[[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] +inner = "0x2e4fc148a476bb12db49fb08c7f85e3178f714861e54ddd29ba8a6eedfac9d71" + +[[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] +inner = "0x0ef9554408ae084ba1ccdd6b9c79190c246086ad13b773b13ed82a723750afe0" + +[[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] +inner = "0x1da2766f6f7c688d5221043bcf19dd16cd8f4435a8d92a8b6dbc85b72b52de7d" +>>>>>>> origin/v5-next [[inputs.avm_proof_data.public_inputs.protocol_contracts.derived_addresses]] inner = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -22129,6 +22344,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs.start_tree_snapshots.l1_to_l2_message_tree] root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +<<<<<<< HEAD next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002c00" [inputs.avm_proof_data.public_inputs.start_tree_snapshots.note_hash_tree] @@ -22142,10 +22358,25 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.avm_proof_data.public_inputs.start_tree_snapshots.public_data_tree] root = "0x2c9dae5a1ef562cdfa66256c803675f421e47ccd4ffd869a29aaddba9e1626a9" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" +======= +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002000" + +[inputs.avm_proof_data.public_inputs.start_tree_snapshots.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000001c0" + +[inputs.avm_proof_data.public_inputs.start_tree_snapshots.nullifier_tree] +root = "0x28dcce21e205acd07284b78e384f47f13789961dfada3de96d65c9d91d81be80" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240" + +[inputs.avm_proof_data.public_inputs.start_tree_snapshots.public_data_tree] +root = "0x2a3229c1eddabc5c3f0a3bdb75ee46983b9409810ab1abcb58bc9a7b5fbb086e" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008a" +>>>>>>> origin/v5-next [inputs.avm_proof_data.public_inputs.start_gas_used] - da_gas = "0x0000000000000000000000000000000000000000000000000000000000000080" - l2_gas = "0x00000000000000000000000000000000000000000000000000000000000903d0" + da_gas = "0x00000000000000000000000000000000000000000000000000000000000000a0" + l2_gas = "0x0000000000000000000000000000000000000000000000000000000000097c20" [inputs.avm_proof_data.public_inputs.gas_settings.gas_limits] da_gas = "0x0000000000000000000000000000000000000000000000000000000000042360" @@ -22157,7 +22388,11 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000000c795c" [inputs.avm_proof_data.public_inputs.gas_settings.max_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000221fd8f40" +======= +fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000001a8ceea600" +>>>>>>> origin/v5-next [inputs.avm_proof_data.public_inputs.gas_settings.max_priority_fees_per_gas] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -22165,10 +22400,17 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 [inputs.avm_proof_data.public_inputs.effective_gas_fees] fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000" +<<<<<<< HEAD fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000cdfe600" [inputs.avm_proof_data.public_inputs.fee_payer] inner = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" +======= + fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000009a5d3640" + + [inputs.avm_proof_data.public_inputs.fee_payer] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" +>>>>>>> origin/v5-next [inputs.avm_proof_data.public_inputs.public_call_request_array_lengths] setup_calls = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -22497,6 +22739,7 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 [[inputs.avm_proof_data.public_inputs.public_app_logic_call_requests]] is_static_call = false +<<<<<<< HEAD calldata_hash = "0x1ff68011e11d23df4c05c91a8f699ea4cde4d5d3a8b993c1bf80ebe205a32c60" [inputs.avm_proof_data.public_inputs.public_app_logic_call_requests.msg_sender] @@ -22504,6 +22747,15 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 [inputs.avm_proof_data.public_inputs.public_app_logic_call_requests.contract_address] inner = "0x0f399603cd563c9339da6883c141bae61ae4ff0876ffecf0a635bced859c1477" +======= + calldata_hash = "0x18f4b3d172e1777e88e160b6877108e8ac1ed0283da06f722328e01c6ea9cb43" + + [inputs.avm_proof_data.public_inputs.public_app_logic_call_requests.msg_sender] + inner = "0x1e26b1ff0d3484dbfbdf5143e3aa9bd84acf82f4b092468032ccb03e01666675" + + [inputs.avm_proof_data.public_inputs.public_app_logic_call_requests.contract_address] + inner = "0x0df0497790c45b5d6e6e431b8574719cc4113fa266765361666547e6c59fd0ba" +>>>>>>> origin/v5-next [[inputs.avm_proof_data.public_inputs.public_app_logic_call_requests]] is_static_call = false @@ -22832,7 +23084,7 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 [inputs.avm_proof_data.public_inputs.previous_revertible_accumulated_data_array_lengths] note_hashes = "0x0000000000000000000000000000000000000000000000000000000000000000" - nullifiers = "0x0000000000000000000000000000000000000000000000000000000000000000" + nullifiers = "0x0000000000000000000000000000000000000000000000000000000000000001" l2_to_l1_msgs = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs.previous_non_revertible_accumulated_data] @@ -22903,7 +23155,11 @@ fee_per_l2_gas = "0x000000000000000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ +<<<<<<< HEAD "0x1523ab5b2da90d6aedb2d49ec552cdab226c0185f25b486ea9cb02bf7f8f6e6d", +======= + "0x07679ba390d8ed0062796a06274a7f130290967b4b2aeadc335fb35f597f0ae6", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -23117,7 +23373,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ - "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x2494b6b5a233ff6173f13d09427855037b51da7585bf7a70b4c230eb16c1c0fb", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -23265,6 +23521,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [inputs.avm_proof_data.public_inputs.end_tree_snapshots.l1_to_l2_message_tree] root = "0x0fef6d80d31109ddb56d6b3f607cbc9c0af0bff3ea0d43e8f278983c64c11f7a" +<<<<<<< HEAD next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002c00" [inputs.avm_proof_data.public_inputs.end_tree_snapshots.note_hash_tree] @@ -23282,10 +23539,29 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 [inputs.avm_proof_data.public_inputs.end_gas_used] da_gas = "0x00000000000000000000000000000000000000000000000000000000000000c0" l2_gas = "0x0000000000000000000000000000000000000000000000000000000000099dbf" +======= +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000002000" + +[inputs.avm_proof_data.public_inputs.end_tree_snapshots.note_hash_tree] +root = "0x0cfc2b9d027c9e5868eb8b582856cadaf26156f75c500f03b3995a96e49dbd49" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200" + +[inputs.avm_proof_data.public_inputs.end_tree_snapshots.nullifier_tree] +root = "0x1965deb0bddc11bed2c5351509504475c1d548954b6acfa126b0b3dc36a23117" +next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000280" + +[inputs.avm_proof_data.public_inputs.end_tree_snapshots.public_data_tree] +root = "0x28694f20c060f287759899a9a4ec6d15d150251d6be82c5818acb46279f5d620" +next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000008b" + + [inputs.avm_proof_data.public_inputs.end_gas_used] + da_gas = "0x0000000000000000000000000000000000000000000000000000000000000120" + l2_gas = "0x00000000000000000000000000000000000000000000000000000000000ab1f3" +>>>>>>> origin/v5-next [inputs.avm_proof_data.public_inputs.accumulated_data_array_lengths] note_hashes = "0x0000000000000000000000000000000000000000000000000000000000000000" - nullifiers = "0x0000000000000000000000000000000000000000000000000000000000000001" + nullifiers = "0x0000000000000000000000000000000000000000000000000000000000000002" l2_to_l1_msgs = "0x0000000000000000000000000000000000000000000000000000000000000000" public_data_writes = "0x0000000000000000000000000000000000000000000000000000000000000002" @@ -23357,8 +23633,13 @@ next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000 "0x0000000000000000000000000000000000000000000000000000000000000000" ] nullifiers = [ +<<<<<<< HEAD "0x1523ab5b2da90d6aedb2d49ec552cdab226c0185f25b486ea9cb02bf7f8f6e6d", "0x0000000000000000000000000000000000000000000000000000000000000000", +======= + "0x07679ba390d8ed0062796a06274a7f130290967b4b2aeadc335fb35f597f0ae6", + "0x2494b6b5a233ff6173f13d09427855037b51da7585bf7a70b4c230eb16c1c0fb", +>>>>>>> origin/v5-next "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -27605,6 +27886,7 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" ] [[inputs.avm_proof_data.public_inputs.accumulated_data.public_data_writes]] +<<<<<<< HEAD leaf_slot = "0x1b826b25dfdb4c0e22204993fed0bb03ba7206897de22124ec2e6b396d3c9ae9" value = "0x2deebd90399de05cddcd37661b24bdb4acd97dfd9faccc3a82543732d8f33e93" @@ -27615,6 +27897,18 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" [[inputs.avm_proof_data.public_inputs.accumulated_data.public_data_writes]] leaf_slot = "0x0000000000000000000000000000000000000000000000000000000000000000" value = "0x0000000000000000000000000000000000000000000000000000000000000000" +======= + leaf_slot = "0x25bcd85e6bfe0554e15998467c2d04c6b9f4de013108729cd5c04aee71fd786c" + value = "0x0000000000000000000000000000000000000000000000000000000000002328" + + [[inputs.avm_proof_data.public_inputs.accumulated_data.public_data_writes]] + leaf_slot = "0x30479177079c11c07f6178c8b22401700f773c625735093ee9e1ac49d92c405e" + value = "0x00000000000000000000000000000000000000000000000000000000000003e8" + + [[inputs.avm_proof_data.public_inputs.accumulated_data.public_data_writes]] + leaf_slot = "0x21fc750a8b31b045081f1fdccf15a3efc50cde236647d27c23a0e355ec8e832d" + value = "0x00000000000000000000000000000000000000000000021e08515067e226a700" +>>>>>>> origin/v5-next [[inputs.avm_proof_data.public_inputs.accumulated_data.public_data_writes]] leaf_slot = "0x0000000000000000000000000000000000000000000000000000000000000000" @@ -27879,5 +28173,10 @@ inner = "0x0000000000000000000000000000000000000000000000000000000000000000" squeeze_mode = false [inputs.last_archive] +<<<<<<< HEAD root = "0x02b768bc715afcefe7acc2a4394dc1ec3d36e9051f52662c42c795597ad03956" next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000d" +======= + root = "0x1a85f2cf02cc2d081cae9fa6d0350dabc3e6303336034855a00d11535250b686" + next_available_leaf_index = "0x000000000000000000000000000000000000000000000000000000000000000b" +>>>>>>> origin/v5-next diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index 0941147aff79..5215ce209184 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -661,9 +661,14 @@ pub global NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH: u32 = RECURSIVE_ROLLUP_HON // Chonk sub-proof lengths; pinned to bb via static_asserts in mock_verifier_inputs.test.cpp. pub global CHONK_HIDING_OINK_LENGTH: u32 = 48; pub global CHONK_MERGE_PROOF_SIZE: u32 = 41; +<<<<<<< HEAD pub global CHONK_ECCVM_PROOF_LENGTH: u32 = 556; pub global CHONK_TRIPLE_IPA_PROOF_LENGTH: u32 = 70; pub global CHONK_JOINT_PROOF_LENGTH: u32 = 478; +======= +pub global CHONK_ECCVM_PROOF_LENGTH: u32 = 612; +pub global CHONK_JOINT_PROOF_LENGTH: u32 = 477; +>>>>>>> origin/v5-next pub global CHONK_PROOF_LENGTH: u32 = CHONK_HIDING_OINK_LENGTH + HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE + CHONK_MERGE_PROOF_SIZE @@ -762,6 +767,11 @@ pub global DOM_SEP__NON_INTERACTIVE_HANDSHAKE_LOG_TAG: u32 = 4046403018; /// Domain separator for the message a recipient signs to authorize an interactive handshake, hashed via /// [`crate::hash::poseidon2_hash_with_separator`] and verified in-circuit by the handshake registry contract. pub global DOM_SEP__INTERACTIVE_HANDSHAKE_SIGNATURE: u32 = 3098455647; +<<<<<<< HEAD +======= +/// Domain separator for the scalar that protects a handshake's shared secret from recipient forgery. +pub global DOM_SEP__HANDSHAKE_FORGERY_PROTECTION: u32 = 2291983127; +>>>>>>> origin/v5-next /// Domain separator for private log tags. /// /// Used by [`crate::hash::compute_siloed_private_log_first_field`]. diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr index 5bb00174a099..54015b891655 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants_tests.nr @@ -13,8 +13,19 @@ use crate::{ DOM_SEP__CONSTRAINED_MSG_NULLIFIER, DOM_SEP__CONSTRAINED_MSG_SENDER_SECRET, DOM_SEP__CONTRACT_ADDRESS_V2, DOM_SEP__CONTRACT_CLASS_ID, DOM_SEP__ECDH_FIELD_MASK, DOM_SEP__ECDH_SUBKEY, DOM_SEP__EVENT_COMMITMENT, DOM_SEP__EVENT_LOG_TAG, DOM_SEP__FBSK_M, +<<<<<<< HEAD DOM_SEP__FUNCTION_ARGS, DOM_SEP__INITIALIZATION_NULLIFIER, DOM_SEP__INITIALIZER, +<<<<<<< HEAD DOM_SEP__INTERACTIVE_HANDSHAKE_SIGNATURE, DOM_SEP__IVSK_M, DOM_SEP__MERKLE_HASH, +======= + DOM_SEP__HANDSHAKE_FORGERY_PROTECTION, DOM_SEP__INTERACTIVE_HANDSHAKE_SIGNATURE, + DOM_SEP__IVSK_M, DOM_SEP__MERKLE_HASH, +>>>>>>> origin/v5-next +======= + DOM_SEP__FUNCTION_ARGS, DOM_SEP__HANDSHAKE_FORGERY_PROTECTION, + DOM_SEP__INITIALIZATION_NULLIFIER, DOM_SEP__INITIALIZER, + DOM_SEP__INTERACTIVE_HANDSHAKE_SIGNATURE, DOM_SEP__IVSK_M, DOM_SEP__MERKLE_HASH, +>>>>>>> origin/v5-next DOM_SEP__MESSAGE_NULLIFIER, DOM_SEP__MSSK_M, DOM_SEP__NHK_M, DOM_SEP__NON_INTERACTIVE_HANDSHAKE_LOG_TAG, DOM_SEP__NOTE_COMPLETION_LOG_TAG, DOM_SEP__NOTE_HASH, DOM_SEP__NOTE_HASH_NONCE, DOM_SEP__NOTE_NULLIFIER, @@ -145,7 +156,11 @@ impl HashedValueTester::new(); +======= + let mut tester = HashedValueTester::<78, 71>::new(); +>>>>>>> origin/v5-next // ----------------- // Domain separators @@ -198,6 +213,13 @@ fn hashed_values_match_derived() { DOM_SEP__INTERACTIVE_HANDSHAKE_SIGNATURE, "interactive_handshake_signature", ); +<<<<<<< HEAD +======= + tester.assert_dom_sep_matches_derived( + DOM_SEP__HANDSHAKE_FORGERY_PROTECTION, + "handshake_forgery_protection", + ); +>>>>>>> origin/v5-next tester.assert_dom_sep_matches_derived(DOM_SEP__MESSAGE_NULLIFIER, "message_nullifier"); tester.assert_dom_sep_matches_derived(DOM_SEP__PRIVATE_FUNCTION_LEAF, "private_function_leaf"); tester.assert_dom_sep_matches_derived(DOM_SEP__PUBLIC_BYTECODE, "public_bytecode"); diff --git a/noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr b/noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr index 9937b3f3c174..60a75bb8e18c 100644 --- a/noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr +++ b/noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr @@ -29,11 +29,11 @@ pub contract SideEffect { macros::{functions::{external, initializer, noinitcheck}, storage::storage}, messages::delivery::MessageDelivery, note::{ - ConfirmedNote, constants::MAX_NOTES_PER_PAGE, lifecycle::{create_note, destroy_note}, note_getter::{get_notes, view_notes}, - note_getter_options::{NoteGetterOptions, NoteStatus, PropertySelector, SortOrder}, + note_getter_options::{NoteGetterOptions, NoteStatus, SortOrder}, + note_interface::NoteProperties, note_viewer_options::NoteViewerOptions, }, protocol::address::AztecAddress, @@ -88,7 +88,7 @@ pub contract SideEffect { fn call_destroy_note(owner: AztecAddress, storage_slot: Field) { let options: NoteGetterOptions = NoteGetterOptions::new() .set_owner(owner) - .sort(PropertySelector { index: 0, offset: 0, length: 32 }, SortOrder.ASC); + .sort(UintNote::properties().value, SortOrder.ASC); let confirmed_notes = get_notes(self.context, storage_slot, options); destroy_note(self.context, confirmed_notes.get(0)); @@ -103,7 +103,7 @@ pub contract SideEffect { let options: NoteGetterOptions = NoteGetterOptions::new() .set_owner(owner) .set_limit(1) - .sort(PropertySelector { index: 0, offset: 0, length: 32 }, SortOrder.ASC); + .sort(UintNote::properties().value, SortOrder.ASC); let confirmed_notes = get_notes(self.context, storage_slot, options); assert_eq(confirmed_notes.len(), 1); @@ -120,7 +120,11 @@ pub contract SideEffect { offset: u32, ) -> [u128; 2] { let mut options = NoteViewerOptions::new().set_owner(owner).set_offset(offset).sort( +<<<<<<< HEAD PropertySelector { index: 0, offset: 0, length: 32 }, +======= + UintNote::properties().value, +>>>>>>> origin/v5-next SortOrder.ASC, ); if (active_or_nullified) { @@ -152,7 +156,7 @@ pub contract SideEffect { let mut options: NoteGetterOptions = NoteGetterOptions::new() .set_owner(owner) .set_offset(offset) - .sort(PropertySelector { index: 0, offset: 0, length: 32 }, SortOrder.ASC); + .sort(UintNote::properties().value, SortOrder.ASC); if (active_or_nullified) { options = options.set_status(NoteStatus.ACTIVE_OR_NULLIFIED); } diff --git a/playground/src/components/navbar/components/NetworkSelector.tsx b/playground/src/components/navbar/components/NetworkSelector.tsx index 05854ca06611..2a79506fefd6 100644 --- a/playground/src/components/navbar/components/NetworkSelector.tsx +++ b/playground/src/components/navbar/components/NetworkSelector.tsx @@ -7,7 +7,11 @@ import AddIcon from '@mui/icons-material/Add'; import { AddNetworksDialog } from './AddNetworkDialog'; import CircularProgress from '@mui/material/CircularProgress'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; +<<<<<<< HEAD import { createStore } from '@aztec/kv-store/sqlite-opfs'; +======= +import { AztecSQLiteOPFSStore, storePoolDirectory } from '@aztec/kv-store/sqlite-opfs'; +>>>>>>> origin/v5-next import { AztecContext } from '../../../aztecContext'; import { navbarButtonStyle, navbarSelect } from '../../../styles/common'; import { NETWORKS } from '../../../utils/networks'; @@ -50,10 +54,12 @@ export function NetworkSelector() { } setIsContextInitialized(true); WebLogger.create(setLogs, setTotalLogCount); - const store = await createStore('playground_data', { - dataDirectory: 'playground', - dataStoreMapSizeKb: 1e6, - }); + const store = await AztecSQLiteOPFSStore.open( + WebLogger.getInstance().createLogger('playground_data'), + 'playground_data', + false, + storePoolDirectory('playground_data'), + ); const playgroundDB = PlaygroundDB.getInstance(); playgroundDB.init(store, WebLogger.getInstance().createLogger('playground_db').info); setPlaygroundDB(PlaygroundDB.getInstance()); diff --git a/playground/src/components/navbar/components/WalletHub.tsx b/playground/src/components/navbar/components/WalletHub.tsx index b214559e132e..d7d3dbaa9fa9 100644 --- a/playground/src/components/navbar/components/WalletHub.tsx +++ b/playground/src/components/navbar/components/WalletHub.tsx @@ -22,7 +22,6 @@ import { useContext, useEffect, useState, useRef } from 'react'; import { EmbeddedWallet } from '@aztec/wallets/embedded'; import { WebLogger } from '../../../utils/web_logger'; import { getInitialTestAccountsData } from '@aztec/accounts/testing/lazy'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { AztecAddress } from '@aztec/aztec.js/addresses'; import { type DeployOptions, DeployMethod } from '@aztec/aztec.js/contracts'; import { AztecContext } from '../../../aztecContext'; @@ -93,8 +92,7 @@ async function discoverTestAccounts(wallet: EmbeddedWallet) { for (let i = 0; i < testAccountData.length; i++) { const accountData = testAccountData[i]; - const sk = deriveSigningKey(accountData.secret); - await wallet.createSchnorrAccount(accountData.secret, accountData.salt, sk, `test${i}`); + await wallet.createSchnorrAccount(accountData.secret, accountData.salt, accountData.signingKey, `test${i}`); } } diff --git a/playground/src/wallet/components/CreateAccountDialog.tsx b/playground/src/wallet/components/CreateAccountDialog.tsx index 021db24b59c6..b4eca600a3bf 100644 --- a/playground/src/wallet/components/CreateAccountDialog.tsx +++ b/playground/src/wallet/components/CreateAccountDialog.tsx @@ -1,13 +1,13 @@ import { AztecAddress } from '@aztec/aztec.js/addresses'; import { type DeployOptions, DeployMethod } from '@aztec/aztec.js/contracts'; -import { Fr } from '@aztec/aztec.js/fields'; +import { Fr, GrumpkinScalar } from '@aztec/aztec.js/fields'; import type { DeployAccountOptions } from '@aztec/aztec.js/wallet'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogTitle from '@mui/material/DialogTitle'; import TextField from '@mui/material/TextField'; import { useState } from 'react'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; +import { deriveSecretKeyFromSigningKey } from '@aztec/accounts/utils'; import FormControl from '@mui/material/FormControl'; import Select from '@mui/material/Select'; import MenuItem from '@mui/material/MenuItem'; @@ -49,20 +49,20 @@ export function CreateAccountDialog({ try { const salt = Fr.random(); let accountManager; - let signingKey; switch (type) { case 'schnorr': { - signingKey = deriveSigningKey(secretKey); - accountManager = await wallet.createAndStoreAccount(alias, 'schnorr', secretKey, salt, signingKey); + const signingKey = GrumpkinScalar.random(); + const secret = await deriveSecretKeyFromSigningKey(signingKey); + accountManager = await wallet.createAndStoreAccount(alias, 'schnorr', secret, salt, signingKey.toBuffer()); break; } case 'ecdsasecp256r1': { - signingKey = randomBytes(32); + const signingKey = randomBytes(32); accountManager = await wallet.createAndStoreAccount(alias, 'ecdsasecp256r1', secretKey, salt, signingKey); break; } case 'ecdsasecp256k1': { - signingKey = randomBytes(32); + const signingKey = randomBytes(32); accountManager = await wallet.createAndStoreAccount(alias, 'ecdsasecp256k1', secretKey, salt, signingKey); break; } diff --git a/spartan/environments/network-defaults.yml b/spartan/environments/network-defaults.yml index 6b6bb4bf127b..401a03724592 100644 --- a/spartan/environments/network-defaults.yml +++ b/spartan/environments/network-defaults.yml @@ -375,5 +375,9 @@ networks: SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 0 # AZIP-16: deferred to subsequent release SLASH_UNKNOWN_PENALTY: 2000e18 SLASH_INVALID_BLOCK_PENALTY: 2000e18 +<<<<<<< HEAD SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 2000e18 # AZIP-16: activated at SMALL +======= + SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 2000e18 # AZIP-16: activated at SMALL +>>>>>>> origin/v5-next SLASH_GRACE_PERIOD_L2_SLOTS: 8400 # 7 days at a 72s slot diff --git a/spartan/metrics/grafana/alerts/rules.yaml b/spartan/metrics/grafana/alerts/rules.yaml index db4b2b2b50b8..cbb274e8afea 100644 --- a/spartan/metrics/grafana/alerts/rules.yaml +++ b/spartan/metrics/grafana/alerts/rules.yaml @@ -518,6 +518,93 @@ groups: isPaused: false - uid: slashingroundexecuted title: Slashing - round executed +<<<<<<< HEAD +======= + condition: C + data: + - refId: A + relativeTimeRange: + from: 600 + to: 0 + datasourceUid: spartan-metrics-prometheus + model: + editorMode: code + expr: sum by (k8s_namespace_name) (increase(aztec_slasher_round_executed_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m])) + instant: true + intervalMs: 60000 + legendFormat: __auto + maxDataPoints: 43200 + range: false + refId: A + - refId: B + relativeTimeRange: + from: 600 + to: 0 + datasourceUid: __expr__ + model: + conditions: + - evaluator: + params: [] + type: gt + operator: + type: and + query: + params: + - B + reducer: + params: [] + type: last + type: query + datasource: + type: __expr__ + uid: __expr__ + expression: A + intervalMs: 1000 + maxDataPoints: 43200 + reducer: last + refId: B + type: reduce + - refId: C + relativeTimeRange: + from: 600 + to: 0 + datasourceUid: __expr__ + model: + conditions: + - evaluator: + params: + - 0 + type: gt + operator: + type: and + query: + params: + - C + reducer: + params: [] + type: last + type: query + datasource: + type: __expr__ + uid: __expr__ + expression: B + intervalMs: 1000 + maxDataPoints: 43200 + refId: C + type: threshold + dashboardUid: "" + panelId: 0 + noDataState: NoData + execErrState: Error + for: 0s + annotations: + summary: Slashing round executed in {{ $labels.k8s_namespace_name }} + labels: + <<: *common_labels + isPaused: false + - uid: def0g11bn64n4a + title: Chain - reorg +>>>>>>> origin/v5-next condition: C data: - refId: A @@ -1281,7 +1368,11 @@ groups: datasourceUid: spartan-metrics-prometheus model: editorMode: code +<<<<<<< HEAD expr: (sum by (k8s_namespace_name) (max by (k8s_namespace_name, aztec_block_proposer) (increase(aztec_sequencer_slot_filled_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m]))) / sum by (k8s_namespace_name) (max by (k8s_namespace_name, aztec_block_proposer) (increase(aztec_sequencer_slot_total_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m])))) and on (k8s_namespace_name) (sum by (k8s_namespace_name) (max by (k8s_namespace_name, aztec_block_proposer) (increase(aztec_sequencer_slot_total_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m]))) >= 5) +======= + expr: (sum by (k8s_namespace_name) (increase(aztec_sequencer_slot_filled_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m])) / sum by (k8s_namespace_name) (increase(aztec_sequencer_slot_total_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m]))) and on (k8s_namespace_name) (sum by (k8s_namespace_name) (increase(aztec_sequencer_slot_total_count{k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__"}[10m])) >= 5) +>>>>>>> origin/v5-next instant: true intervalMs: 60000 legendFormat: __auto @@ -1786,7 +1877,11 @@ groups: datasourceUid: spartan-metrics-prometheus model: editorMode: code +<<<<<<< HEAD expr: sum by (k8s_namespace_name, aztec_error_type) (increase({__name__=~"aztec_validator_attestation_failed_(bad_proposal|node_issue)_count",k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__",aztec_is_committee_member="true",aztec_error_type!~"block_number_already_exists|parent_block_not_found"}[10m])) +======= + expr: sum by (k8s_namespace_name, aztec_error_type) (increase({__name__=~"aztec_validator_attestation_failed_(bad_proposal|node_issue)_count",k8s_namespace_name=~"__INTERNAL_NETWORK_NAMESPACES_REGEX__",aztec_is_committee_member="true"}[10m])) +>>>>>>> origin/v5-next instant: true intervalMs: 60000 legendFormat: __auto @@ -1860,6 +1955,7 @@ groups: labels: <<: *common_labels isPaused: false +<<<<<<< HEAD - orgId: 1 name: L1 Ethereum Nodes folder: L1 @@ -2290,6 +2386,8 @@ groups: labels: <<: *common_labels isPaused: false +======= +>>>>>>> origin/v5-next - orgId: 1 name: Every minute folder: Metrics diff --git a/spartan/metrics/values.yaml b/spartan/metrics/values.yaml index e2bca5f10058..b9a395777bdc 100644 --- a/spartan/metrics/values.yaml +++ b/spartan/metrics/values.yaml @@ -122,7 +122,11 @@ grafana: server: domain: env: +<<<<<<< HEAD STAGING_REGEX: ".*staging.*" +======= + STAGING_REGEX: "staging-public|staging-internal" +>>>>>>> origin/v5-next NEXT_SCENARIO_REGEX: "v[0-9]+-scenario|next-scenario" NEXT_NET_REGEX: "next-net" TESTNET_NAMESPACES_REGEX: ".*testnet.*" diff --git a/spartan/scripts/bench_10tps/bench_scrape.ts b/spartan/scripts/bench_10tps/bench_scrape.ts index aea87f1f02cf..581a1d6b414c 100755 --- a/spartan/scripts/bench_10tps/bench_scrape.ts +++ b/spartan/scripts/bench_10tps/bench_scrape.ts @@ -979,7 +979,6 @@ const AZTEC_CONFIG_KEYS = [ "SEQ_BLOCK_DURATION_MS", "SEQ_MAX_TX_PER_BLOCK", "SEQ_MAX_TX_PER_CHECKPOINT", - "SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT", "SEQ_BUILD_CHECKPOINT_IF_EMPTY", "AZTEC_MANA_TARGET", "P2P_MAX_PENDING_TX_COUNT", diff --git a/yarn-project/.claude/skills/writing-e2e-tests/SKILL.md b/yarn-project/.claude/skills/writing-e2e-tests/SKILL.md new file mode 100644 index 000000000000..c62e1c156758 --- /dev/null +++ b/yarn-project/.claude/skills/writing-e2e-tests/SKILL.md @@ -0,0 +1,327 @@ +--- +name: writing-e2e-tests +description: How to write end-to-end tests in yarn-project/end-to-end. Use when adding e2e coverage for a feature, creating a new e2e test or suite, or deciding where an e2e test should live. Covers the test categories (automine, single-node, multi-node, p2p, composed), setup reuse, readability conventions, speed techniques, and flakiness prevention. +--- + +# Writing E2E Tests + +E2E tests live in `yarn-project/end-to-end/src`. They spin up a real stack — anvil, an Aztec node +(archiver, world state, sequencer, p2p), a PXE-backed `TestWallet`, and optionally prover and +validator nodes — so they are the most expensive tests in the repo. Every decision below follows +from that: reuse setup, pick the cheapest category that exercises the feature, and make the test +robust against timing jitter because CI machines are slow and noisy. + +For debugging a failing e2e test, use the `debug-e2e` skill; for profiling where suite time goes, +`track-e2e-times`. For unit tests, use `unit-test-implementation` — and prefer a unit test whenever +the feature doesn't genuinely need the full stack. + +## Step 0: do you need a new test at all? + +Work down this ladder and stop at the first step that fits. Each step down costs CI minutes forever. + +1. **A unit test in the owning package.** If the behavior is observable without a live chain, it's + not an e2e test. +2. **A new expectation in an existing test.** If an existing test already drives the code path + (e.g. it sends the tx type you care about), add an `expect` there instead of paying another + setup. Grep for the contract method or subsystem you're touching. +3. **A new `it` in an existing suite.** Suites share one setup in `beforeAll`; a new `it` costs + seconds, a new file costs minutes. +4. **A new file on an existing category context or domain harness** (e.g. `AutomineTestContext`, + `setupWithProver`, `TokenContractTest`, `FeesTest`, `MultiNodeTestContext`). +5. **A brand-new standalone test.** Last resort — justified when the feature needs a setup shape + no existing suite has. + +## Where to place the test + +The top level of `src/` groups tests **by node topology**; the second level names the primary +behavior under test. Each category directory has a `README.md` describing its base class, setup +factories, helper surface, and subfolders — **read the README of the category you pick before +writing**; it is the authoritative, up-to-date reference and this skill only summarizes it. + +### Categories + +Pick the **cheapest category whose machinery your feature actually needs**. Cost and flake risk +increase down the table. + +| Category | Context / entrypoint | Use for | +|---|---|---| +| `automine/` | `AutomineTestContext.setup({ numberOfAccounts })` (`automine_test_context.ts`) | Contract or protocol behavior that doesn't depend on real block-building or consensus: tokens, accounts, authwits, notes/events/effects, deploys, simulation. Deterministic and fast: the `AutomineSequencer` builds one block per submitted tx, publishes synchronously, no committee/prover/validator. | +| `single-node/` | `setupWithProver(opts)` or `setupBlockProducer(opts)` (`single-node/setup.ts`, over `SingleNodeTestContext`) | One production sequencer, no committee: block building, sequencer config/governance signalling, fees, cross-chain messaging, world-state sync, the proving/epoch lifecycle, partial proofs, L1 reorgs, recovery. `setupWithProver` adds a fake in-process prover; `setupBlockProducer` has no prover (and points the PXE at the `proposed` tip). Real Barretenberg proofs live in `single-node/prover/` on `FullProverTest`. | +| `multi-node/` | `MultiNodeTestContext` (extends `SingleNodeTestContext`) + presets in `multi_node_test_context.ts` | N validators on an **in-memory `MockGossipSubNetwork` bus** (no real libp2p): committee block production, attestations, invalid-attestation handling, HA pairs, slashing/offense detection, governance upgrades. Presets: `buildMockGossipValidators(n)`, `MOCK_GOSSIP_MULTI_VALIDATOR_OPTS`, `SLASHER_ENABLED_MULTI_VALIDATOR_OPTS`, `setupHaPairs`. | +| `p2p/` | `P2PNetworkTest` (`p2p/p2p_network.ts`) + `runGossipScenario` (`p2p/shared.ts`) | **Real libp2p only**: peer discovery/rediscovery, gossip mesh formation, req/resp, preferred-peer topologies, peer auth. Slowest and most flake-prone; nodes bind fixed ports, so two p2p files can never run concurrently locally. | +| `composed/` | docker-compose against a running network (`scripts/run_test.sh compose`) | The packaged sandbox/network as users see it: persistence, cheat codes, tutorials, uniswap, HA, web3signer. Also `guides/` for docs examples. | +| `infra/`, `spartan/`, `bench/` | see their READMEs | Deployment/ops smoke tests, k8s network tests, and benchmarks (see the `adding-benchmarks` skill) — not homes for feature coverage. | + +The decision that trips people up most: **multi-node vs p2p**. If the subject — proposals, +attestations, checkpointing, pruning/recovery, offense detection — is faithfully reproduced by the +mock-gossip bus, it belongs in `multi-node/`, which is far cheaper. Only reach for `p2p/` when the +behavior genuinely cannot be reproduced without real networking. + +Also cheaper than jumping categories: `setup()` options can bend a category upward — +`startProverNode: true`, `skipInitialSequencer: true`, and `mockGossipSubNetwork: true` give you +extra nodes without real libp2p. + +### File placement and CI registration + +- Second-level folders name the behavior under test (`token/`, `proving/`, `slashing/`), not the + shared setup. A new folder is created only when it earns its keep: a shared harness, a coherent + domain of several files. Otherwise the file lives flat in the category. +- Each file has a **single top-level `describe` named to match its path** + (`describe('automine/token/transfer', ...)`), and starts with a short header comment describing + the coverage and the setup shape (see `automine/token/transfer.test.ts` for the pattern). +- A co-located `setup.ts` in the subfolder holds shared timing profiles/option wiring (e.g. + `single-node/l1-reorgs/setup.ts`, `multi-node/slashing/setup.ts`); domain harnesses are + co-located `*_test.ts` files (not `.test.ts`, so jest doesn't run them). +- CI picks up new files **automatically**: `end-to-end/bootstrap.sh` `test_cmds` globs each + category. Each file runs as its own isolated job with a default `TIMEOUT=20m`; if your suite + legitimately needs more, add a per-test override in the `case` block there — and keep it in sync + with the file's `jest.setTimeout`. +- `*.parallel.test.ts` marks a file with more than one top-level `it`: CI extracts each `it` title + and runs it as a **separate job** (`jest -t ''`). Every `it` must pass in isolation — no + cross-test state — and titles must be unique and stable (they become job/container names). +- `*.notest.ts` parks a test without running it (prefer fixing or deleting). +- Jest gives each test/hook 300s (`--testTimeout=300000` in `test:e2e`). Set an explicit + `jest.setTimeout(...)` at the top of the `describe` when setup or waits legitimately exceed it — + and only then (see Flakiness below). + +## Setup reuse + +**Search for an existing setup before building one.** The layers, outermost first: + +1. **Category context classes** (table above) own the environment: anvil + L1 deploy, node + spawning, the `ChainMonitor`, waiters, and teardown. Don't call the root `setup()` + (`fixtures/setup.ts`) directly from a new test — go through the category's context/factory, and + pass options through it. +2. **Domain harnesses** extend a context with domain state and opt-in setup phases: + `automine/token/token_contract_test.ts` (`TokenContractTest`: `applyBaseSnapshots()`, + `applyMint()`), `automine/token/blacklist_token_contract_test.ts`, + `single-node/fees/fees_test.ts` (`FeesTest`: `applyBaseSetup()`, `applyFPCSetup()`, + `applyFundAliceWithBananas()`, ...), `single-node/cross-chain/cross_chain_messaging_test.ts`, + `single-node/prover/` (`FullProverTest`), `multi-node/slashing/inactivity_setup.ts`. +3. **Root `setup()` options** (`SetupOptions` in `fixtures/setup.ts`) cover most needs without new + code: genesis-funded accounts (`initialFundedAccounts`, `numberOfInitialFundedAccounts`), + `fundSponsoredFPC`, `startProverNode`, `skipInitialSequencer`, validators + (`initialValidators`), custom genesis (`genesisPublicData`), timing (`aztecSlotDuration`, + `ethereumSlotDuration`, `aztecEpochDuration`), `mockGossipSubNetwork`, and any + `AztecNodeConfig` field. Read the type before adding a new option. + +The standard shape of a suite test file: + +```typescript +describe('automine/token/transfer', () => { + const t = new TokenContractTest('transfer'); + let { asset, adminAddress, wallet, otherAddress, tokenSim } = t; + + beforeAll(async () => { + t.applyBaseSnapshots(); + await t.setup(); + await t.applyMint(); + ({ asset, adminAddress, wallet, otherAddress, tokenSim } = t); + }); + + afterAll(() => t.teardown()); + afterEach(async () => { + await t.tokenSim.check(); // model-based invariant check after every test + }); + + it('transfers between accounts', async () => { /* ... */ }); +}); +``` + +Rules of thumb: + +- **One environment per file, set up in `beforeAll`** — never per test. If tests can't share + state, make them not need to (fresh contract instance per test is fine; fresh network per test + is not), or split the file. +- Only apply the setup phases you need — every `apply*` costs txs (and therefore blocks). +- New shared state for several tests → an `apply*` method on the harness (or a new harness + extending the context), so other files can reuse it. +- `afterAll(() => teardown())`, and if a local `teardown` variable is set inside `beforeAll`, + guard it: `afterAll(() => teardown?.())` — if setup throws, an unguarded call masks the real + error with `TypeError: teardown is not a function`. +- When combining a preset with overrides, **spread the preset first** so your overrides win: + `{ ...MOCK_GOSSIP_MULTI_VALIDATOR_OPTS, aztecEpochDuration: 4 }`. Spreading the preset last + silently reverts your options. + +## Readability + +The test body should read as **intent**: what is executed, what is asserted. Push mechanics into +helpers, preferably shared ones. + +- **Prefer the named waiters over hand-rolled polling.** Node/wallet-level waits live in + `fixtures/wait_helpers.ts` (`waitForBlockNumber`, `waitForProvenBlock`, `waitForNodeCheckpoint`, + `waitForTxs`, `waitForTxStatus`, `waitForPendingTxCount`, `waitForSequencerState`, ...); context + waiters live on `SingleNodeTestContext`/`MultiNodeTestContext` (`waitUntilEpochStarts`, + `waitUntilProvenCheckpointNumber`, `waitForNodeToSync`, `waitForSequencerEvent`, + `waitForAllNodes*`, `findSlotsWithProposers`); L1-side waits on `ChainMonitor` + (`waitUntilCheckpoint`, `waitUntilL2Slot`, `waitUntilL1Timestamp`). A raw + `retryUntil`/`.on`/`sleep` in a test body is a smell — wrap it or find the existing helper. +- **Reuse the shared helpers** before writing inline plumbing: `fixtures/token_utils.ts` + (`deployToken`, `mintTokensToPrivate`, `mintNotes`, `expectTokenBalance`), + `shared/submit-transactions.ts`, `shared/cross_chain_test_harness.ts`, + `fixtures/l1_to_l2_messaging.ts`, `expectMapping` from `fixtures/setup.ts`. Suite-local + assertion helpers go in a co-located file (e.g. `automine/token/token_test_helpers.ts`) — never + duplicated across test bodies. +- **Simulators for stateful suites**: `TokenSimulator` (`src/simulators/`) mirrors expected + balances in memory; an `afterEach` calls `tokenSim.check()` so every test gets full-state + verification without per-test assertion boilerplate. Follow this pattern for new stateful + suites. +- **Expected errors are shared constants**, not inline strings: `U128_UNDERFLOW_ERROR`, + `DUPLICATE_NULLIFIER_ERROR`, `NO_L1_TO_L2_MSG_ERROR`, etc. in `fixtures/fixtures.ts`. Add new + protocol-level error patterns there. +- Destructure the harness once in `beforeAll` so test bodies use plain names (see the example + above). +- Log with the context logger (`t.logger.info('...')`) at phase boundaries of long tests — it is + what makes CI logs debuggable — but don't narrate every line. +- A comment in a test explains a non-obvious *why* (e.g. "proxy makes msg_sender differ from the + note owner to trigger authwit validation"), never *what* the next line does. + +## Speed + +We favor robustness over speed, but e2e minutes are the bottleneck of every CI run. Techniques +that have actually paid off in the ongoing e2e speedup effort: + +1. **Don't create setup you don't need.** The single biggest cost is network + account setup. + Joining an existing suite costs ~0; every avoided account deploy saves a proof + a block. Use + genesis-funded accounts over deploys, the hardcoded schnorr account + (`fixtures/schnorr_hardcoded_account_contract.ts`) when the test doesn't care about identity, + `AutomineTestContext.registerContract(...)` / `TestContract` for contracts usable without an + on-chain deploy, and only the `apply*` phases you need. +2. **Seed state at genesis instead of executing setup txs.** `setup()` options like + `initialFundedAccounts`, `fundSponsoredFPC: true`, and `genesisPublicData` bake state into the + genesis trees for free. Prefer these over bridging/minting/deploying in `beforeAll`. (The + current speedup round extends this: standard-contract registration and FPC funding seeded via + prefilled genesis nullifiers/public data — check `SetupOptions` for `prefilled*`/preload + options and reuse them when available.) +3. **Batch same-sender setup txs into one `BatchCall`** — one proof and one block instead of N. + See `mintNotes` in `fixtures/token_utils.ts`. Note limits apply (e.g. only one contract-class + log per tx, so two contract deploys can't batch). +4. **Overlap independent setup txs with `Promise.all`** — but know the ceiling: the PXE + serializes simulation/proving on one queue, so concurrent sends often land in consecutive + blocks anyway. Batching (one tx) beats overlapping (N txs) when the sender is the same. +5. **Warp over dead waits.** When the test waits for a timestamp/epoch boundary and *nothing + needs to be produced* during the wait, jump: `cheatCodes.warpL2TimeAtLeastTo/By` (L1+L2 + together), `cheatCodes.eth.warp(ts, { resetBlockInterval: true })` (L1 only, for big jumps), + `markProvenAndWarp` on `AutomineTestContext` (marks checkpoints proven first so a long warp + doesn't trip the pruning window), `warpWithSequencersPaused` on `SingleNodeTestContext` (pauses + sequencers across the warp so in-flight jobs don't cascade). **An honest wait beats a flaky + warp**: if sequencers/provers must actually do something during the window (attest, prove, + slash), warping skips the behavior under test — don't convert those. +6. **Don't tighten slot durations ad hoc.** Slot/epoch durations interact with the sequencer + timetable; too-tight cadences are the top historical flake source (see Flakiness). Use the + named timing profiles (category presets, the co-located `setup.ts` profiles) instead of + inventing per-test numbers, and leave slack — CI event loops stall for hundreds of ms + routinely. +7. **Measure before optimizing.** Setup and wait helpers are span-instrumented via `testSpan` + (`fixtures/timing.ts`, enabled by `TEST_TIMING_FILE`); use the `track-e2e-times` skill to get a + ranked breakdown of where the time goes. Wrap new expensive shared helpers in `testSpan` so + they show up. Cite before/after span numbers when proposing a speed change. + +## Flakiness + +A test that fails 1-in-50 runs costs more than it's worth. These are the recurring root causes +from six months of deflake PRs — write the test right the first time. + +### The golden rules + +1. **Never `sleep()` to wait for a state change.** Poll the condition with the named waiters + (Readability above), or `retryUntil(fn, name, timeoutSec, intervalSec)` from + `@aztec/foundation/retry` when no named helper fits. A raw sleep is only acceptable to yield + the event loop, never to "give X time to finish". +2. **Assert against the tx receipt, not the chain tip.** Use `receipt.blockNumber`; never + `getBlock('latest')` right after sending — an empty block/checkpoint may have landed in + between. For `contract.methods.foo().send()`, destructure `{ receipt }`. +3. **Mined ≠ checkpointed ≠ proven.** A tx wait proves a node saw the tx mined — not that the + archiver indexed it, that it survived a reorg, or that it was proven. + - Asserting on archiver/world-state after a tx: wait on the subsystem's own durable marker, + e.g. `waitForNodeCheckpoint(node, target)` or `waitForBlockNumber(node, n, { tag: + 'checkpointed' })`. + - If the test can experience pruning/reorgs (proving, recovery, multi-node — anything stopping + nodes), anchor the PXE to the durable tip: `syncChainTip: 'checkpointed'` in pxe opts, and + use `send({ wait: { waitForStatus: TxStatus.CHECKPOINTED } })` for setup txs that later + assertions depend on. (`setupBlockProducer` deliberately uses `'proposed'` so tests can + assert on fresh blocks — know which one your suite needs.) Classic flake signature: + `Block not found in the node. This might indicate a reorg has occurred`, or a receipt + wait hanging forever. + - **Proven/finalized never advances by itself in most setups**: the `AnvilTestWatcher`'s + auto-prove is dormant once anvil is in interval mining. If the test needs the proven tip to + move, use `markProvenAndWarp` / `cheatCodes.rollup.markAsProven()` or run a prover + (`setupWithProver`, `startProverNode: true`). Otherwise a `while (proven < n)` loop hangs to + wall clock. +4. **Leave timing margin.** Under proposer pipelining the sequencer builds slot N during slot + N-1, so effects land a slot later than naive math suggests, and config injected via + `node.setConfig()` is snapshotted when a job is *constructed* — one slot early. Anchor slot + arithmetic to a fresh boundary (`monitor.waitUntilNextL2Slot()`) before reading `currentSlot`; + target slots with `+3/+4` margin rather than `+2`; when targeting a specific proposer, use + `findSlotsWithProposers` rather than hard-coded slot pairs (the prior pipelined slot must not + share the proposer); after a mid-test `setConfig` of block-gating options, wait for the + sequencer to pick it up before sending dependent txs. Historical top-flake: timetable too + tight — the presets' slot durations exist because validators must simulate, attest, and + publish within them on a loaded CI machine; don't undercut them in a new test. +5. **Don't force `minTxsPerBlock >= 1` under a wall-clock sequencer** unless tx-gated block + production is the behavior under test. It stalls scheduled empty checkpoints and drops txs. +6. **Assert the invariant, not an incidental exact value.** Exact block numbers, exact slots, + exact committee members, and `toBeGreaterThan` off-by-ones are the most common deflake diffs. + If the exact value matters, *derive* it from the receipt/committed header/actual committee; + if the system decides it (which slot a fault lands on, when a prune executes), **discover it + by polling, then assert on the discovered value** — don't hardcode the assumption. For + ramp-up/settle phases, assert a tolerance budget, not zero. When filtering sequencer events, + exclude known-benign failures explicitly (see the existing filters in `watchSequencerEvents` + call sites) rather than asserting no events at all. +7. **Serialize against shared resources.** + - L1 accounts: never reuse mnemonic index 0 (the sequencer's publisher) for a test actor; + take a dedicated unused index via `getPrivateKeyFromIndex(i)` (see + `L1_DIRECT_WRITE_ACCOUNT_INDEX` in `fixtures/fixtures.ts`). Nonce races present as + `nonce too low` / stuck publishers. + - Await the receipt of a prerequisite L1 tx before sending a dependent one. + - Parallel local runs need distinct `ANVIL_PORT`s (the fixture honors the env var); p2p tests + bind fixed UDP/TCP ports, so never run two p2p files at the same time. + - Data directories: use the context's management (`P2PNetworkTest.dataDirFor(label)`), don't + `mkdtemp`/`rmSync` in test files. +8. **Attach listeners before causing the event**, and freeze time across restarts. Listeners + registered after initial sync miss events that fire during sync — if the test stops/recreates + nodes while an L1 deadline approaches, pause anvil mining across the gap and resume + deterministically (set next timestamp + mine) so the transition happens while someone is + listening. Add a fail-fast assertion that the deadline hasn't passed yet. +9. **P2P: connectivity ≠ gossip readiness.** Wait for the gossip mesh + (`waitForP2PMeshConnectivity`; raise `minMeshPeerCount` when a proposal must reach the whole + committee within a slot) before sending txs, or they publish to zero peers and silently + expire. Prefer the `runGossipScenario` skeleton over hand-rolling the bootstrap→nodes→mesh + sequence. Don't over-specify topology (requiring a full clique flakes on one missing edge); + assert the property the test needs. Gossip is not a durable record — late attestations get + rejected by acceptance windows before downstream consumers see them. +10. **Fees evolve between snapshot and inclusion.** Use `getPaddedMaxFeesPerGas` / + `walletMinFeePadding` rather than exact predicted fees, and derive expected committed fees + from the block header, not from a later `getCurrentBaseFees()` call. +11. **Keep the test deterministic.** Mock `Math.random` when the code under test makes random + choices; never mix fake clocks with real sleeps — drive all timing through the fake clock. +12. **Timeouts express expected duration, not hope.** Raise `jest.setTimeout` only when the flow + legitimately takes that long (proving, multiple epochs) and say why; a bumped timeout that + hides a hang just moves the failure to the 20m CI kill. Keep the bootstrap.sh `TIMEOUT` and + `jest.setTimeout` in sync. + +### Before you ship it + +- Run the test repeatedly: `scripts/deflaker.sh yarn workspace @aztec/end-to-end test:e2e ` + (100 runs, stops at first failure). At minimum run it 3-5 times locally, including once under + load. +- Run with verbose logs once and read them: `LOG_LEVEL='info; debug:sequencer,archiver,publisher' + yarn workspace @aztec/end-to-end test:e2e src//.test.ts -t 'test name'`. +- If a known-unfixable external flake remains, the last resort is an entry in `.test_patterns.yml` + (repo root) with a **tightly-scoped `error_regex`** and an owner — it alerts instead of failing + CI. This is for tracked product fragility, not a substitute for fixing the test. + +## Checklist + +- [ ] Couldn't be a unit test, an added expectation, or a new `it` in an existing suite +- [ ] Cheapest category that exercises the feature (automine → single-node → multi-node → p2p); + category README read +- [ ] One environment per file in `beforeAll`, via the category context/factory; preset spread + first; guarded teardown +- [ ] Single top-level `describe` named to match the path; header comment; `.parallel` suffix iff + multiple independent top-level `it`s +- [ ] Test body reads as intent; named waiters and shared helpers; shared error constants +- [ ] No sleeps; receipt-anchored assertions; correct tip tag (`proposed` vs `checkpointed`) +- [ ] No exact-value assertions on system-decided values; timing margin per rule 4 +- [ ] `jest.setTimeout` justified and in sync with bootstrap.sh `TIMEOUT` if overridden +- [ ] Deflaker/local repeat runs pass; verbose-log run reviewed diff --git a/yarn-project/.gitignore b/yarn-project/.gitignore index df4f3a3b8951..47c36c608f01 100644 --- a/yarn-project/.gitignore +++ b/yarn-project/.gitignore @@ -61,7 +61,11 @@ cli-wallet/test/data cli/src/config/generated ethereum/src/generated slasher/src/generated +<<<<<<< HEAD simulator/src/public/cdb/generated +======= +tmp/ +>>>>>>> origin/v5-next .claude/settings.local.json .yarn/* diff --git a/yarn-project/accounts/src/schnorr/initializerless/index.ts b/yarn-project/accounts/src/schnorr/initializerless/index.ts index 2c1df1e3e24d..e0ac50712630 100644 --- a/yarn-project/accounts/src/schnorr/initializerless/index.ts +++ b/yarn-project/accounts/src/schnorr/initializerless/index.ts @@ -11,10 +11,17 @@ import { Fr } from '@aztec/foundation/curves/bn254'; import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { ContractArtifact } from '@aztec/stdlib/abi'; import { loadContractArtifact } from '@aztec/stdlib/abi'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; import type { NoirCompiledContract } from '@aztec/stdlib/noir'; import SchnorrInitializerlessAccountContractJson from '../../../artifacts/SchnorrInitializerlessAccount.json' with { type: 'json' }; +======= +import type { NoirCompiledContract } from '@aztec/stdlib/noir'; + +import SchnorrInitializerlessAccountContractJson from '../../../artifacts/SchnorrInitializerlessAccount.json' with { type: 'json' }; +import { deriveSecretKeyFromSigningKey } from '../../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { SchnorrBaseAccountContract } from '../account_contract.js'; export const SchnorrInitializerlessAccountContractArtifact = loadContractArtifact( @@ -47,6 +54,7 @@ export class SchnorrInitializerlessAccountContract extends SchnorrBaseAccountCon /** * Compute the address of a schnorr account contract. +<<<<<<< HEAD * @param secret - A seed for deriving the signing key and public keys. * @param salt - The contract address salt. * @param signingPrivateKey - A specific signing private key that's not derived from the secret. @@ -59,4 +67,18 @@ export async function getSchnorrInitializerlessAccountContractAddress( const signingKey = signingPrivateKey ?? deriveSigningKey(secret); const accountContract = new SchnorrInitializerlessAccountContract(signingKey); return await getAccountContractAddress(accountContract, secret, salt); +======= + * @param signingPrivateKey - The account's signing private key. + * @param salt - The contract address salt. + * @param secretKey - Seed for the account's privacy keys. Derived from the signing key when omitted. + */ +export async function getSchnorrInitializerlessAccountContractAddress( + signingPrivateKey: GrumpkinScalar, + salt: Fr, + secretKey?: Fr, +): Promise { + const resolvedSecretKey = secretKey ?? (await deriveSecretKeyFromSigningKey(signingPrivateKey)); + const accountContract = new SchnorrInitializerlessAccountContract(signingPrivateKey); + return await getAccountContractAddress(accountContract, resolvedSecretKey, salt); +>>>>>>> origin/v5-next } diff --git a/yarn-project/accounts/src/schnorr/initializerless/lazy.ts b/yarn-project/accounts/src/schnorr/initializerless/lazy.ts index f8c8cbdfba91..f9a4ec41f0f1 100644 --- a/yarn-project/accounts/src/schnorr/initializerless/lazy.ts +++ b/yarn-project/accounts/src/schnorr/initializerless/lazy.ts @@ -11,8 +11,13 @@ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { ContractArtifact } from '@aztec/stdlib/abi'; import { loadContractArtifact } from '@aztec/stdlib/abi'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; +======= + +import { deriveSecretKeyFromSigningKey } from '../../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { SchnorrBaseAccountContract } from '../account_contract.js'; /** @@ -55,6 +60,7 @@ export class SchnorrInitializerlessAccountContract extends SchnorrBaseAccountCon /** * Compute the address of a schnorr account contract. +<<<<<<< HEAD * @param secret - A seed for deriving the signing key and public keys. * @param salt - The contract address salt. * @param signingPrivateKey - A specific signing private key that's not derived from the secret. @@ -67,4 +73,18 @@ export async function getSchnorrInitializerlessAccountContractAddress( const signingKey = signingPrivateKey ?? deriveSigningKey(secret); const accountContract = new SchnorrInitializerlessAccountContract(signingKey); return await getAccountContractAddress(accountContract, secret, salt); +======= + * @param signingPrivateKey - The account's signing private key. + * @param salt - The contract address salt. + * @param secretKey - Seed for the account's privacy keys. Derived from the signing key when omitted. + */ +export async function getSchnorrInitializerlessAccountContractAddress( + signingPrivateKey: GrumpkinScalar, + salt: Fr, + secretKey?: Fr, +): Promise { + const resolvedSecretKey = secretKey ?? (await deriveSecretKeyFromSigningKey(signingPrivateKey)); + const accountContract = new SchnorrInitializerlessAccountContract(signingPrivateKey); + return await getAccountContractAddress(accountContract, resolvedSecretKey, salt); +>>>>>>> origin/v5-next } diff --git a/yarn-project/accounts/src/schnorr/private_immutable/index.ts b/yarn-project/accounts/src/schnorr/private_immutable/index.ts index 63d57997d5a9..2769b42d3a29 100644 --- a/yarn-project/accounts/src/schnorr/private_immutable/index.ts +++ b/yarn-project/accounts/src/schnorr/private_immutable/index.ts @@ -10,10 +10,17 @@ import { Fr } from '@aztec/foundation/curves/bn254'; import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { ContractArtifact } from '@aztec/stdlib/abi'; import { loadContractArtifact } from '@aztec/stdlib/abi'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; import type { NoirCompiledContract } from '@aztec/stdlib/noir'; import SchnorrAccountContractJson from '../../../artifacts/SchnorrAccount.json' with { type: 'json' }; +======= +import type { NoirCompiledContract } from '@aztec/stdlib/noir'; + +import SchnorrAccountContractJson from '../../../artifacts/SchnorrAccount.json' with { type: 'json' }; +import { deriveSecretKeyFromSigningKey } from '../../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { SchnorrBaseAccountContract } from '../account_contract.js'; export const SchnorrAccountContractArtifact = loadContractArtifact(SchnorrAccountContractJson as NoirCompiledContract); @@ -35,6 +42,7 @@ export class SchnorrAccountContract extends SchnorrBaseAccountContract { /** * Compute the address of a schnorr account contract. +<<<<<<< HEAD * @param secret - A seed for deriving the signing key and public keys. * @param salt - The contract address salt. * @param signingPrivateKey - A specific signing private key that's not derived from the secret. @@ -47,4 +55,18 @@ export async function getSchnorrAccountContractAddress( const signingKey = signingPrivateKey ?? deriveSigningKey(secret); const accountContract = new SchnorrAccountContract(signingKey); return await getAccountContractAddress(accountContract, secret, salt); +======= + * @param signingPrivateKey - The account's signing private key. + * @param salt - The contract address salt. + * @param secretKey - Seed for the account's privacy keys. Derived from the signing key when omitted. + */ +export async function getSchnorrAccountContractAddress( + signingPrivateKey: GrumpkinScalar, + salt: Fr, + secretKey?: Fr, +): Promise { + const resolvedSecretKey = secretKey ?? (await deriveSecretKeyFromSigningKey(signingPrivateKey)); + const accountContract = new SchnorrAccountContract(signingPrivateKey); + return await getAccountContractAddress(accountContract, resolvedSecretKey, salt); +>>>>>>> origin/v5-next } diff --git a/yarn-project/accounts/src/schnorr/private_immutable/lazy.ts b/yarn-project/accounts/src/schnorr/private_immutable/lazy.ts index 468354a29d8d..8fc2a5d46401 100644 --- a/yarn-project/accounts/src/schnorr/private_immutable/lazy.ts +++ b/yarn-project/accounts/src/schnorr/private_immutable/lazy.ts @@ -10,8 +10,13 @@ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { ContractArtifact } from '@aztec/stdlib/abi'; import { loadContractArtifact } from '@aztec/stdlib/abi'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; +======= + +import { deriveSecretKeyFromSigningKey } from '../../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { SchnorrBaseAccountContract } from '../account_contract.js'; /** @@ -45,6 +50,7 @@ export class SchnorrAccountContract extends SchnorrBaseAccountContract { /** * Compute the address of a schnorr account contract. +<<<<<<< HEAD * @param secret - A seed for deriving the signing key and public keys. * @param salt - The contract address salt. * @param signingPrivateKey - A specific signing private key that's not derived from the secret. @@ -57,4 +63,18 @@ export async function getSchnorrAccountContractAddress( const signingKey = signingPrivateKey ?? deriveSigningKey(secret); const accountContract = new SchnorrAccountContract(signingKey); return await getAccountContractAddress(accountContract, secret, salt); +======= + * @param signingPrivateKey - The account's signing private key. + * @param salt - The contract address salt. + * @param secretKey - Seed for the account's privacy keys. Derived from the signing key when omitted. + */ +export async function getSchnorrAccountContractAddress( + signingPrivateKey: GrumpkinScalar, + salt: Fr, + secretKey?: Fr, +): Promise { + const resolvedSecretKey = secretKey ?? (await deriveSecretKeyFromSigningKey(signingPrivateKey)); + const accountContract = new SchnorrAccountContract(signingPrivateKey); + return await getAccountContractAddress(accountContract, resolvedSecretKey, salt); +>>>>>>> origin/v5-next } diff --git a/yarn-project/accounts/src/testing/configuration.ts b/yarn-project/accounts/src/testing/configuration.ts index 0255e9861b4e..021afa360d46 100644 --- a/yarn-project/accounts/src/testing/configuration.ts +++ b/yarn-project/accounts/src/testing/configuration.ts @@ -12,8 +12,12 @@ export const INITIAL_TEST_SECRET_KEYS = [ export const INITIAL_TEST_ENCRYPTION_KEYS = INITIAL_TEST_SECRET_KEYS.map(secretKey => deriveMasterIncomingViewingSecretKey(secretKey), ); -// TODO(#5837): come up with a standard signing key derivation scheme instead of using ivsk_m as signing keys here -export const INITIAL_TEST_SIGNING_KEYS = INITIAL_TEST_ENCRYPTION_KEYS; + +export const INITIAL_TEST_SIGNING_KEYS = [ + GrumpkinScalar.fromHexString('0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'), + GrumpkinScalar.fromHexString('202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e'), + GrumpkinScalar.fromHexString('404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e'), +]; export const INITIAL_TEST_ACCOUNT_SALTS = [Fr.ZERO, Fr.ZERO, Fr.ZERO]; diff --git a/yarn-project/accounts/src/testing/index.ts b/yarn-project/accounts/src/testing/index.ts index d74871b74869..e8078284b617 100644 --- a/yarn-project/accounts/src/testing/index.ts +++ b/yarn-project/accounts/src/testing/index.ts @@ -4,14 +4,21 @@ * @packageDocumentation */ import { Fr } from '@aztec/aztec.js/fields'; +<<<<<<< HEAD import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { deriveSigningKey } from '@aztec/stdlib/keys'; import { getSchnorrInitializerlessAccountContractAddress } from '../schnorr/initializerless/index.js'; import { getSchnorrAccountContractAddress } from '../schnorr/private_immutable/index.js'; +======= +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; + +import { getSchnorrInitializerlessAccountContractAddress } from '../schnorr/initializerless/index.js'; +import { getSchnorrAccountContractAddress } from '../schnorr/private_immutable/index.js'; +import { deriveSecretKeyFromSigningKey } from '../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { INITIAL_TEST_ACCOUNT_SALTS, - INITIAL_TEST_ENCRYPTION_KEYS, INITIAL_TEST_SECRET_KEYS, INITIAL_TEST_SIGNING_KEYS, type InitialAccountData, @@ -28,10 +35,17 @@ export { } from './configuration.js'; /** Derives the account contract address for the given type */ +<<<<<<< HEAD function getTestAccountAddress(type: InitialAccountType, secret: Fr, salt: Fr, signingKey?: GrumpkinScalar) { return type === 'schnorr' ? getSchnorrAccountContractAddress(secret, salt, signingKey) : getSchnorrInitializerlessAccountContractAddress(secret, salt, signingKey); +======= +function getTestAccountAddress(type: InitialAccountType, signingKey: GrumpkinScalar, salt: Fr, secret?: Fr) { + return type === 'schnorr' + ? getSchnorrAccountContractAddress(signingKey, salt, secret) + : getSchnorrInitializerlessAccountContractAddress(signingKey, salt, secret); +>>>>>>> origin/v5-next } /** @@ -41,13 +55,18 @@ export function getInitialTestAccountsData(): Promise { return Promise.all( INITIAL_TEST_SECRET_KEYS.map(async (secret, i) => ({ secret, - signingKey: INITIAL_TEST_ENCRYPTION_KEYS[i], + signingKey: INITIAL_TEST_SIGNING_KEYS[i], salt: INITIAL_TEST_ACCOUNT_SALTS[i], type: 'schnorr_initializerless' as const, address: await getSchnorrInitializerlessAccountContractAddress( +<<<<<<< HEAD secret, INITIAL_TEST_ACCOUNT_SALTS[i], +======= +>>>>>>> origin/v5-next INITIAL_TEST_SIGNING_KEYS[i], + INITIAL_TEST_ACCOUNT_SALTS[i], + secret, ), })), ); @@ -60,16 +79,25 @@ export async function generateSchnorrAccounts( numberOfAccounts: number, type: InitialAccountType = 'schnorr_initializerless', ): Promise { +<<<<<<< HEAD const secrets = Array.from({ length: numberOfAccounts }, () => Fr.random()); +======= + const signingKeys = Array.from({ length: numberOfAccounts }, () => GrumpkinScalar.random()); +>>>>>>> origin/v5-next return await Promise.all( - secrets.map(async secret => { + signingKeys.map(async signingKey => { const salt = Fr.random(); + const secret = await deriveSecretKeyFromSigningKey(signingKey); return { secret, - signingKey: deriveSigningKey(secret), + signingKey, salt, type, +<<<<<<< HEAD address: await getTestAccountAddress(type, secret, salt), +======= + address: await getTestAccountAddress(type, signingKey, salt, secret), +>>>>>>> origin/v5-next }; }), ); diff --git a/yarn-project/accounts/src/testing/lazy.ts b/yarn-project/accounts/src/testing/lazy.ts index 6884ac5c736b..a3fad7bf6b47 100644 --- a/yarn-project/accounts/src/testing/lazy.ts +++ b/yarn-project/accounts/src/testing/lazy.ts @@ -4,14 +4,21 @@ * @packageDocumentation */ import { Fr } from '@aztec/aztec.js/fields'; +<<<<<<< HEAD import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { deriveSigningKey } from '@aztec/stdlib/keys'; import { getSchnorrInitializerlessAccountContractAddress } from '../schnorr/initializerless/lazy.js'; import { getSchnorrAccountContractAddress } from '../schnorr/private_immutable/lazy.js'; +======= +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; + +import { getSchnorrInitializerlessAccountContractAddress } from '../schnorr/initializerless/lazy.js'; +import { getSchnorrAccountContractAddress } from '../schnorr/private_immutable/lazy.js'; +import { deriveSecretKeyFromSigningKey } from '../utils/key_derivation.js'; +>>>>>>> origin/v5-next import { INITIAL_TEST_ACCOUNT_SALTS, - INITIAL_TEST_ENCRYPTION_KEYS, INITIAL_TEST_SECRET_KEYS, INITIAL_TEST_SIGNING_KEYS, type InitialAccountData, @@ -21,10 +28,17 @@ import { export { INITIAL_TEST_ACCOUNT_SALTS, INITIAL_TEST_SECRET_KEYS } from './configuration.js'; /** Derives the account contract address for the given type */ +<<<<<<< HEAD function getTestAccountAddress(type: InitialAccountType, secret: Fr, salt: Fr, signingKey?: GrumpkinScalar) { return type === 'schnorr' ? getSchnorrAccountContractAddress(secret, salt, signingKey) : getSchnorrInitializerlessAccountContractAddress(secret, salt, signingKey); +======= +function getTestAccountAddress(type: InitialAccountType, signingKey: GrumpkinScalar, salt: Fr, secret?: Fr) { + return type === 'schnorr' + ? getSchnorrAccountContractAddress(signingKey, salt, secret) + : getSchnorrInitializerlessAccountContractAddress(signingKey, salt, secret); +>>>>>>> origin/v5-next } /** @@ -34,13 +48,18 @@ export function getInitialTestAccountsData(): Promise { return Promise.all( INITIAL_TEST_SECRET_KEYS.map(async (secret, i) => ({ secret, - signingKey: INITIAL_TEST_ENCRYPTION_KEYS[i], + signingKey: INITIAL_TEST_SIGNING_KEYS[i], salt: INITIAL_TEST_ACCOUNT_SALTS[i], type: 'schnorr_initializerless' as const, address: await getSchnorrInitializerlessAccountContractAddress( +<<<<<<< HEAD secret, INITIAL_TEST_ACCOUNT_SALTS[i], +======= +>>>>>>> origin/v5-next INITIAL_TEST_SIGNING_KEYS[i], + INITIAL_TEST_ACCOUNT_SALTS[i], + secret, ), })), ); @@ -53,16 +72,25 @@ export async function generateSchnorrAccounts( numberOfAccounts: number, type: InitialAccountType = 'schnorr_initializerless', ): Promise { +<<<<<<< HEAD const secrets = Array.from({ length: numberOfAccounts }, () => Fr.random()); +======= + const signingKeys = Array.from({ length: numberOfAccounts }, () => GrumpkinScalar.random()); +>>>>>>> origin/v5-next return await Promise.all( - secrets.map(async secret => { + signingKeys.map(async signingKey => { const salt = Fr.random(); + const secret = await deriveSecretKeyFromSigningKey(signingKey); return { secret, - signingKey: deriveSigningKey(secret), + signingKey, salt, type, +<<<<<<< HEAD address: await getTestAccountAddress(type, secret, salt), +======= + address: await getTestAccountAddress(type, signingKey, salt, secret), +>>>>>>> origin/v5-next }; }), ); diff --git a/yarn-project/accounts/src/utils/index.ts b/yarn-project/accounts/src/utils/index.ts index ba7c543a0645..56824f63ea66 100644 --- a/yarn-project/accounts/src/utils/index.ts +++ b/yarn-project/accounts/src/utils/index.ts @@ -1 +1,2 @@ +export * from './key_derivation.js'; export * from './ssh_agent.js'; diff --git a/yarn-project/accounts/src/utils/key_derivation.test.ts b/yarn-project/accounts/src/utils/key_derivation.test.ts new file mode 100644 index 000000000000..3cbd046626fa --- /dev/null +++ b/yarn-project/accounts/src/utils/key_derivation.test.ts @@ -0,0 +1,18 @@ +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; + +import { deriveSecretKeyFromSigningKey } from './key_derivation.js'; + +describe('deriveSecretKeyFromSigningKey', () => { + it('derives a deterministic, signing-key-specific secret key', async () => { + const signingKey = GrumpkinScalar.fromHexString('0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'); + const secretKey = await deriveSecretKeyFromSigningKey(signingKey); + // The value feeds the account address, so it is locked here to catch any silent change to the derivation. + expect(secretKey.toString()).toEqual('0x21a8894e479037a29ac0dfd569f9adab7fa4a2a215f7f1884b30df383e54b55b'); + + expect((await deriveSecretKeyFromSigningKey(signingKey)).toString()).toEqual(secretKey.toString()); + const otherSigningKey = GrumpkinScalar.fromHexString( + '202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e', + ); + expect((await deriveSecretKeyFromSigningKey(otherSigningKey)).toString()).not.toEqual(secretKey.toString()); + }); +}); diff --git a/yarn-project/accounts/src/utils/key_derivation.ts b/yarn-project/accounts/src/utils/key_derivation.ts new file mode 100644 index 000000000000..5446a9bec272 --- /dev/null +++ b/yarn-project/accounts/src/utils/key_derivation.ts @@ -0,0 +1,15 @@ +import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon'; +import { sha256ToField } from '@aztec/foundation/crypto/sha256'; +import type { Fr } from '@aztec/foundation/curves/bn254'; +import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; + +const SIGNING_KEY_TO_SECRET_KEY_SEPARATOR = sha256ToField([Buffer.from('@aztec/accounts/signing_key_to_secret_key')]); + +/** + * Derives the privacy secret key (the seed for the viewing/nullifier keyset that PXE holds) from the account's signing + * key. The signing key is the ownership root the user controls; the privacy keyset hangs off it through this one-way + * hash, so a value handled by PXE can never be used to recover the signing key. + */ +export function deriveSecretKeyFromSigningKey(signingKey: GrumpkinScalar): Promise { + return poseidon2Hash([SIGNING_KEY_TO_SECRET_KEY_SEPARATOR, signingKey.hi, signingKey.lo]); +} diff --git a/yarn-project/archiver/README.md b/yarn-project/archiver/README.md index 959f16f819dc..751bbdd40d22 100644 --- a/yarn-project/archiver/README.md +++ b/yarn-project/archiver/README.md @@ -103,7 +103,7 @@ Blocks added via `addBlock()` are considered "provisional" until they appear in - **Slot expiration**: An L2 slot ends without any checkpoint being mined on L1 - **Orphan proposed block**: Under proposer pipelining, a proposer can broadcast a block-only proposal but never the matching `CheckpointProposal` (e.g. it crashes before assembling the checkpoint). The provisional block then has no proposed checkpoint backing it. -When `handleCheckpoints()` processes incoming checkpoints, it compares archive roots of local blocks against the checkpoint's blocks. If they differ, local blocks are pruned and replaced with the checkpoint's blocks. After checkpoint sync, `pruneUncheckpointedBlocks()` removes any remaining provisional blocks from slots that have ended. Independently, `pruneOrphanProposedBlocks()` runs on wall-clock time (so it fires during quiet L1 periods) and removes a block-only tip once its build slot ended without a matching proposed checkpoint, plus a grace window configured via `orphanProposedBlockPruneGraceSeconds`. All three cases emit `L2PruneUncheckpointed`. +When `handleCheckpoints()` processes incoming checkpoints, it compares archive roots of local blocks against the checkpoint's blocks. If they differ, local blocks are pruned and replaced with the checkpoint's blocks. After checkpoint sync, `pruneUncheckpointedBlocks()` removes any remaining provisional blocks from slots that have ended. Independently, `pruneOrphanProposedBlocks()` runs on wall-clock time (so it fires during quiet L1 periods) and removes a block-only tip after the applicable materialization deadline: receive deadline plus local tolerance when no checkpoint proposal was seen, or checkpoint-proposal synced deadline when a proposal was seen but never entered proposed archiver state. All three cases emit `L2PruneUncheckpointed`. ### Querying Block Data @@ -175,5 +175,3 @@ The archiver exposes `pendingChainValidationStatus` for the sequencer to know if 2. Checkpoint 11 purged, new invalid checkpoint 11 posted → status updates to new checkpoint 11 3. Checkpoint 12 with invalid attestations posted → no change (status still points to 11) 4. Checkpoint 11 purged and reposted with valid attestations → archiver syncs checkpoint 11, status becomes valid - - diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 57d099e5eed7..621c76bbb333 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -75,6 +75,7 @@ "@aztec/l1-artifacts": "portal:../../l1-contracts/l1-artifacts", "@aztec/noir-protocol-circuits-types": "workspace:^", "@aztec/protocol-contracts": "workspace:^", + "@aztec/standard-contracts": "workspace:^", "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:^", "lodash.groupby": "^4.6.0", diff --git a/yarn-project/archiver/src/config.ts b/yarn-project/archiver/src/config.ts index 6c0e996c9d44..7bc2d7bdda34 100644 --- a/yarn-project/archiver/src/config.ts +++ b/yarn-project/archiver/src/config.ts @@ -89,6 +89,17 @@ export const archiverConfigMappings: ConfigMappingsType = { env: 'ARCHIVER_SKIP_ORPHAN_PROPOSED_BLOCK_PRUNING', description: 'Skip pruning orphan proposed blocks that have no matching proposed checkpoint.', ...booleanConfigHelper(false), +<<<<<<< HEAD +======= + }, + testPreloadStandardContracts: { + env: 'TEST_PRELOAD_STANDARD_CONTRACTS', + description: + 'Preload the standard contracts (AuthRegistry, PublicChecks, HandshakeRegistry) into the contract store at ' + + 'block 0. For test environments only, and only safe when genesis seeds the matching registration/deployment ' + + 'nullifiers; otherwise a later on-chain publish would collide with the block-0 preload.', + ...booleanConfigHelper(false), +>>>>>>> origin/v5-next }, ...chainConfigMappings, ...l1ReaderConfigMappings, diff --git a/yarn-project/archiver/src/factory.ts b/yarn-project/archiver/src/factory.ts index 2521ba1e0a88..fbdbaf4aca84 100644 --- a/yarn-project/archiver/src/factory.ts +++ b/yarn-project/archiver/src/factory.ts @@ -12,6 +12,7 @@ import { DateProvider } from '@aztec/foundation/timer'; import { createStore } from '@aztec/kv-store/lmdb-v2'; import { protocolContractNames } from '@aztec/protocol-contracts'; import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle'; +import { getPublishableStandardContracts } from '@aztec/standard-contracts'; import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi'; import type { ArchiverEmitter, BlockHash } from '@aztec/stdlib/block'; import { DEFAULT_BLOCK_DURATION_MS } from '@aztec/stdlib/config'; @@ -68,6 +69,9 @@ export async function createArchiver( ): Promise { const archiverStore = await createArchiverStore(config, initialBlockHash); await registerProtocolContracts(archiverStore); + if (config.testPreloadStandardContracts) { + await registerStandardContracts(archiverStore); + } // Create Ethereum clients const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId); @@ -227,3 +231,33 @@ export async function registerProtocolContracts(stores: ArchiverDataStores) { await stores.contractInstances.addContractInstances([contract.instance], BlockNumber(blockNumber)); } } + +/** + * Preloads the standard contracts (AuthRegistry, PublicChecks, HandshakeRegistry) into the archiver store at block 0, + * mirroring {@link registerProtocolContracts}. Only invoked for test environments (via `testPreloadStandardContracts`), + * which also seed the matching registration/deployment nullifiers into the genesis nullifier tree so the store and tree + * stay consistent. Idempotent — skips contracts that already exist (e.g. on node restart). + */ +export async function registerStandardContracts(stores: ArchiverDataStores) { + const blockNumber = 0; + for (const contract of await getPublishableStandardContracts()) { + // Skip if already registered (happens on node restart with a persisted store). + if (await stores.contractClasses.getContractClass(contract.contractClass.id)) { + continue; + } + + const publicBytecodeCommitment = await computePublicBytecodeCommitment(contract.contractClass.packedBytecode); + const contractClassPublic: ContractClassPublicWithCommitment = { + ...contract.contractClass, + publicBytecodeCommitment, + }; + + const publicFunctionSignatures = contract.artifact.functions + .filter(fn => fn.functionType === FunctionType.PUBLIC) + .map(fn => decodeFunctionSignature(fn.name, fn.parameters)); + + await stores.functionNames.register(publicFunctionSignatures); + await stores.contractClasses.addContractClasses([contractClassPublic], BlockNumber(blockNumber)); + await stores.contractInstances.addContractInstances([contract.instance], BlockNumber(blockNumber)); + } +} diff --git a/yarn-project/archiver/src/modules/data_store_updater.test.ts b/yarn-project/archiver/src/modules/data_store_updater.test.ts index ff086c1c6a27..4d3b5e4c1740 100644 --- a/yarn-project/archiver/src/modules/data_store_updater.test.ts +++ b/yarn-project/archiver/src/modules/data_store_updater.test.ts @@ -6,6 +6,10 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import { ContractClassPublishedEvent } from '@aztec/protocol-contracts/class-registry'; import { ContractInstancePublishedEvent } from '@aztec/protocol-contracts/instance-registry'; import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/providers/bundle'; +<<<<<<< HEAD +======= +import { getPublishableStandardContracts } from '@aztec/standard-contracts'; +>>>>>>> origin/v5-next import { bufferAsFields } from '@aztec/stdlib/abi'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { GENESIS_BLOCK_HEADER_HASH, L2Block } from '@aztec/stdlib/block'; @@ -19,7 +23,11 @@ import { readFileSync } from 'fs'; import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; +<<<<<<< HEAD import { registerProtocolContracts } from '../factory.js'; +======= +import { registerProtocolContracts, registerStandardContracts } from '../factory.js'; +>>>>>>> origin/v5-next import { type ArchiverDataStores, createArchiverDataStores } from '../store/data_stores.js'; import { L2TipsCache } from '../store/l2_tips_cache.js'; import { makeCheckpoint, makePublishedCheckpoint } from '../test/mock_structs.js'; @@ -149,6 +157,35 @@ describe('ArchiverDataStoreUpdater', () => { expect(await store.contractClasses.getContractClass(protocolClassId)).toBeDefined(); }); +<<<<<<< HEAD +======= + it('preloads standard contract classes and instances via registerStandardContracts', async () => { + const standardContracts = await getPublishableStandardContracts(); + expect(standardContracts.length).toBeGreaterThan(0); + + // Not present before the preload. + for (const { contractClass } of standardContracts) { + expect(await store.contractClasses.getContractClass(contractClass.id)).toBeUndefined(); + } + + await registerStandardContracts(store); + + // Both the class and the instance are queryable from the block-0 preload. + for (const { contractClass, address } of standardContracts) { + const retrievedClass = await store.contractClasses.getContractClass(contractClass.id); + expect(retrievedClass?.id.equals(contractClass.id)).toBe(true); + const retrievedInstance = await store.contractInstances.getContractInstance(address, 1n); + expect(retrievedInstance?.address.equals(address)).toBe(true); + } + + // Calling again (e.g. on node restart with a persisted store) is idempotent and must not throw. + await expect(registerStandardContracts(store)).resolves.not.toThrow(); + for (const { contractClass } of standardContracts) { + expect(await store.contractClasses.getContractClass(contractClass.id)).toBeDefined(); + } + }); + +>>>>>>> origin/v5-next it('removes contract class and instance data when blocks are pruned via setCheckpointData', async () => { // First, add a local provisional block with contract data const localBlock = await L2Block.random(BlockNumber(1), { diff --git a/yarn-project/archiver/src/modules/data_store_updater.ts b/yarn-project/archiver/src/modules/data_store_updater.ts index 1cfd194b9494..8ab9997c91d6 100644 --- a/yarn-project/archiver/src/modules/data_store_updater.ts +++ b/yarn-project/archiver/src/modules/data_store_updater.ts @@ -18,6 +18,7 @@ import { computeContractAddressFromInstance, computeContractClassId, } from '@aztec/stdlib/contract'; +import { MAX_CAPACITY_BLOCKS_PER_CHECKPOINT } from '@aztec/stdlib/deserialization'; import type { ContractClassLog, PrivateLog, PublicLog } from '@aztec/stdlib/logs'; import type { UInt64 } from '@aztec/stdlib/types'; @@ -103,11 +104,19 @@ export class ArchiverDataStoreUpdater { }, evictProposedFrom?: CheckpointNumber, ): Promise { + // Checkpoints here are already accepted by L1, so tolerate up to the physical blob-capacity + // ceiling rather than the conservative attestable limit used when building/attesting. for (const checkpoint of checkpoints) { - validateCheckpoint(checkpoint.checkpoint, { rollupManaLimit: this.opts?.rollupManaLimit }); + validateCheckpoint(checkpoint.checkpoint, { + rollupManaLimit: this.opts?.rollupManaLimit, + maxBlocksPerCheckpoint: MAX_CAPACITY_BLOCKS_PER_CHECKPOINT, + }); } if (promoteProposed) { - validateCheckpoint(promoteProposed.checkpoint.checkpoint, { rollupManaLimit: this.opts?.rollupManaLimit }); + validateCheckpoint(promoteProposed.checkpoint.checkpoint, { + rollupManaLimit: this.opts?.rollupManaLimit, + maxBlocksPerCheckpoint: MAX_CAPACITY_BLOCKS_PER_CHECKPOINT, + }); } const result = await this.stores.db.transactionAsync(async () => { diff --git a/yarn-project/archiver/tsconfig.json b/yarn-project/archiver/tsconfig.json index 655dea45d14d..6ee6c14c7b3e 100644 --- a/yarn-project/archiver/tsconfig.json +++ b/yarn-project/archiver/tsconfig.json @@ -33,6 +33,9 @@ { "path": "../protocol-contracts" }, + { + "path": "../standard-contracts" + }, { "path": "../stdlib" }, diff --git a/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.test.ts b/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.test.ts index 7fbfa0bbdcb3..e25d74d3dfb3 100644 --- a/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.test.ts +++ b/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.test.ts @@ -11,7 +11,11 @@ import { import { Fr } from '@aztec/foundation/curves/bn254'; import { EthAddress } from '@aztec/foundation/eth-address'; import { unfreeze } from '@aztec/foundation/types'; +<<<<<<< HEAD import { type AvmSimulator, PublicProcessor, PublicProcessorFactory } from '@aztec/simulator/server'; +======= +import { PublicProcessor, PublicProcessorFactory } from '@aztec/simulator/server'; +>>>>>>> origin/v5-next import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { type BlockData, @@ -56,7 +60,10 @@ describe('NodePublicCallsSimulator', () => { let rollupContract: MockProxy; let epochCache: MockProxy; let merkleTreeFork: MockProxy; +<<<<<<< HEAD let avmSimulator: MockProxy; +======= +>>>>>>> origin/v5-next let simulator: NodePublicCallsSimulator; @@ -133,7 +140,10 @@ describe('NodePublicCallsSimulator', () => { rollupContract = mock(); epochCache = mock(); merkleTreeFork = mock(); +<<<<<<< HEAD avmSimulator = mock(); +======= +>>>>>>> origin/v5-next worldStateSynchronizer.syncImmediate.mockResolvedValue(BlockNumber.ZERO); // The fork is an AsyncDisposable; provide the hook so `await using` does not throw. @@ -173,7 +183,10 @@ describe('NodePublicCallsSimulator', () => { globalVariableBuilder, rollupContract, epochCache, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next signatureContext: { chainId: CHAIN_ID.toNumber(), rollupAddress: ROLLUP_ADDRESS }, config: { rpcSimulatePublicMaxGasLimit: 1e11, rpcSimulatePublicMaxDebugLogMemoryReads: 100 }, }); @@ -412,7 +425,10 @@ describe('NodePublicCallsSimulator', () => { contractDataSource, globalVariableBuilder, epochCache, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next signatureContext: { chainId: CHAIN_ID.toNumber(), rollupAddress: ROLLUP_ADDRESS }, config: { rpcSimulatePublicMaxGasLimit: 1e11, rpcSimulatePublicMaxDebugLogMemoryReads: 100 }, }); diff --git a/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.ts b/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.ts index a563ac5432c1..9dccf18fc349 100644 --- a/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.ts +++ b/yarn-project/aztec-node/src/aztec-node/node_public_calls_simulator.ts @@ -14,7 +14,11 @@ import { BadRequestError } from '@aztec/foundation/json-rpc'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { DateProvider } from '@aztec/foundation/timer'; import { isErrorClass } from '@aztec/foundation/types'; +<<<<<<< HEAD import { type AvmSimulator, PublicContractsDB, PublicProcessorFactory } from '@aztec/simulator/server'; +======= +import { PublicContractsDB, PublicProcessorFactory } from '@aztec/simulator/server'; +>>>>>>> origin/v5-next import { CollectionLimitsConfig, PublicSimulatorConfig } from '@aztec/stdlib/avm'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import type { L2BlockSource, L2Tips } from '@aztec/stdlib/block'; @@ -59,11 +63,14 @@ export interface NodePublicCallsSimulatorDeps { epochCache: EpochCacheInterface; signatureContext: CoordinationSignatureContext; config: NodePublicCallsSimulatorConfig; +<<<<<<< HEAD /** * AVM execution backend the public processor drives to run public calls. Optional because unit/TXE nodes * that never call {@link simulate} are constructed without one; asserted at the simulation call site. */ avmSimulator?: AvmSimulator; +======= +>>>>>>> origin/v5-next telemetry?: TelemetryClient; log?: Logger; } @@ -94,7 +101,10 @@ export class NodePublicCallsSimulator { private readonly epochCache: EpochCacheInterface; private readonly signatureContext: CoordinationSignatureContext; private readonly config: NodePublicCallsSimulatorConfig; +<<<<<<< HEAD private readonly avmSimulator?: AvmSimulator; +======= +>>>>>>> origin/v5-next private readonly telemetry: TelemetryClient; private readonly log: Logger; @@ -108,7 +118,10 @@ export class NodePublicCallsSimulator { this.epochCache = deps.epochCache; this.signatureContext = deps.signatureContext; this.config = deps.config; +<<<<<<< HEAD this.avmSimulator = deps.avmSimulator; +======= +>>>>>>> origin/v5-next this.telemetry = deps.telemetry ?? getTelemetryClient(); this.log = deps.log ?? createLogger('node:public-calls-simulator'); } @@ -163,12 +176,17 @@ export class NodePublicCallsSimulator { ? await this.buildGlobalVariablesForNewCheckpoint(l2Tips, proposedCheckpointData, blockNumber) : { globalVariables: await this.copyGlobalVariablesFromLatestProposedBlock(latestBlockNumber, blockNumber) }; +<<<<<<< HEAD if (!this.avmSimulator) { throw new Error('NodePublicCallsSimulator.simulate requires an AVM simulator, but none was configured'); } const publicProcessorFactory = new PublicProcessorFactory( this.contractDataSource, this.avmSimulator, +======= + const publicProcessorFactory = new PublicProcessorFactory( + this.contractDataSource, +>>>>>>> origin/v5-next new DateProvider(), this.telemetry, this.log.getBindings(), diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index 526557ca861c..926cc740d0e2 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -29,7 +29,10 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import type { ProverNode } from '@aztec/prover-node'; import { SequencerClient } from '@aztec/sequencer-client'; import { AutomineSequencer } from '@aztec/sequencer-client/automine'; +<<<<<<< HEAD import type { AvmSimulator } from '@aztec/simulator/server'; +======= +>>>>>>> origin/v5-next import type { SlasherClientInterface } from '@aztec/slasher'; import { STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS } from '@aztec/standard-contracts/multi-call-entrypoint'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; @@ -150,10 +153,13 @@ export interface AztecNodeServiceDeps { keyStoreManager?: KeystoreManager; debugLogStore?: DebugLogStore; automineSequencer?: AutomineSequencer; +<<<<<<< HEAD // AVM execution backend for public simulation. Wired in production (factory.ts); absent in unit/TXE nodes // that don't drive public execution, hence optional and asserted at the simulation call site. Owned by the // node (disposed on stop), so it must be disposable — a spawned process pool + CDB IPC server. avmSimulator?: AvmSimulator & AsyncDisposable; +======= +>>>>>>> origin/v5-next } /** @@ -200,7 +206,10 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb private keyStoreManager?: KeystoreManager; private debugLogStore: DebugLogStore; private readonly automineSequencer?: AutomineSequencer; +<<<<<<< HEAD private readonly avmSimulator?: AvmSimulator & AsyncDisposable; +======= +>>>>>>> origin/v5-next constructor(deps: AztecNodeServiceDeps) { this.config = deps.config; @@ -231,7 +240,10 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb this.keyStoreManager = deps.keyStoreManager; this.debugLogStore = deps.debugLogStore ?? new NullDebugLogStore(); this.automineSequencer = deps.automineSequencer; +<<<<<<< HEAD this.avmSimulator = deps.avmSimulator; +======= +>>>>>>> origin/v5-next this.metrics = new NodeMetrics(this.telemetry, 'AztecNodeService'); this.tracer = this.telemetry.getTracer('AztecNodeService'); @@ -248,7 +260,10 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb epochCache: this.epochCache, signatureContext: { chainId: this.l1ChainId, rollupAddress: this.config.rollupAddress }, config: this.config, +<<<<<<< HEAD avmSimulator: this.avmSimulator, +======= +>>>>>>> origin/v5-next telemetry: this.telemetry, log: this.log.createChild('public-calls-simulator'), }); diff --git a/yarn-project/aztec-node/src/factory.ts b/yarn-project/aztec-node/src/factory.ts index 0921f00e0f2f..690978d697d4 100644 --- a/yarn-project/aztec-node/src/factory.ts +++ b/yarn-project/aztec-node/src/factory.ts @@ -25,7 +25,10 @@ import { type SequencerPublisher, } from '@aztec/sequencer-client'; import { type AutomineSequencer, createAutomineSequencer } from '@aztec/sequencer-client/automine'; +<<<<<<< HEAD import { AvmSimulatorPool } from '@aztec/simulator/server'; +======= +>>>>>>> origin/v5-next import { AttestationsBlockWatcher, AttestedInvalidProposalWatcher, @@ -196,6 +199,7 @@ export async function createAztecNodeService( const nativeWs = await createWorldState(config, options.genesis); const initialHeader = nativeWs.getInitialHeader(); const initialBlockHash = await initialHeader.hash(); +<<<<<<< HEAD // AVM execution backend for public simulation: a pool of bb-avm-sim processes reaching the world state // over its IPC socket. Owned here and threaded into the public-processor consumers (node, checkpoint @@ -206,6 +210,8 @@ export async function createAztecNodeService( logger: (msg: string) => log.debug(msg), }); started.push({ stop: () => avmSimulator[Symbol.asyncDispose]() }); +======= +>>>>>>> origin/v5-next const archiver = await createArchiver( config, { blobClient, epochCache, telemetry, dateProvider }, @@ -306,7 +312,10 @@ export async function createAztecNodeService( worldStateSynchronizer, archiver, dateProvider, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next telemetry, ); @@ -522,7 +531,10 @@ export async function createAztecNodeService( worldStateSynchronizer, archiver, dateProvider, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next telemetry, debugLogStore, ); @@ -607,7 +619,10 @@ export async function createAztecNodeService( epochCache, blobClient, keyStoreManager, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next }); if (!options.dontStartProverNode) { @@ -648,7 +663,10 @@ export async function createAztecNodeService( keyStoreManager, debugLogStore, automineSequencer, +<<<<<<< HEAD avmSimulator, +======= +>>>>>>> origin/v5-next }); return node; diff --git a/yarn-project/aztec.js/src/api/abi.ts b/yarn-project/aztec.js/src/api/abi.ts index 56ff6448708a..847b1708f7eb 100644 --- a/yarn-project/aztec.js/src/api/abi.ts +++ b/yarn-project/aztec.js/src/api/abi.ts @@ -17,6 +17,7 @@ export { isWrappedFieldStruct, isFunctionSelectorStruct, loadContractArtifact, + loadContractArtifactWithValidation, loadContractArtifactForPublic, getAllFunctionAbis, contractArtifactToBuffer, diff --git a/yarn-project/aztec.js/src/ethereum/portal_manager.ts b/yarn-project/aztec.js/src/ethereum/portal_manager.ts index 5b913a6d2b4e..5f2113902cf0 100644 --- a/yarn-project/aztec.js/src/ethereum/portal_manager.ts +++ b/yarn-project/aztec.js/src/ethereum/portal_manager.ts @@ -1,3 +1,9 @@ +import { + type L1TxConfig, + type L1TxUtils, + createL1TxUtils, + getL1TxUtilsConfigEnvVars, +} from '@aztec/ethereum/l1-tx-utils'; import type { ExtendedViemWalletClient, ViemContract } from '@aztec/ethereum/types'; import { extractEvent } from '@aztec/ethereum/utils'; import type { EpochNumber } from '@aztec/foundation/branded-types'; @@ -16,7 +22,7 @@ import { computeL2ToL1MessageHash, computeSecretHash } from '@aztec/stdlib/hash' import type { AztecNode } from '@aztec/stdlib/interfaces/client'; import { getL2ToL1MessageLeafId } from '@aztec/stdlib/messaging'; -import { type Hex, getContract, toFunctionSelector } from 'viem'; +import { type Hex, encodeFunctionData, getContract, toFunctionSelector } from 'viem'; /** L1 to L2 message info to claim it on L2. */ export type L2Claim = { @@ -51,10 +57,26 @@ export async function generateClaimSecret(logger?: Logger): Promise<[Fr, Fr]> { return [secret, secretHash]; } +// `Inbox.sendL2Message` (reached by every `depositToAztec*` call) inserts into a height-10 +// (`L1_TO_L2_MSG_SUBTREE_HEIGHT`) incremental frontier tree. The per-insert cost swings by up to ~10 hash levels +// (which translates to ~40k gas) depending on where the global message index lands when the tx is mined: inserts that +// complete a subtree cascade through cold SLOADs + an SSTORE vs cheap inserts that touch one slot. A point-in-time +// `eth_estimateGas` taken at a cheap index therefore under-sizes a deposit that mines at a subtree boundary. That ~40k +// swing exceeds the default 20% buffer on a ~100k deposit. That is why we raise the gas-limit buffer to 2x here. +// Note: a larger operator override via L1_GAS_LIMIT_BUFFER_PERCENTAGE still wins. +const INBOX_DEPOSIT_GAS_LIMIT_BUFFER_PERCENTAGE = 100; + +/** Per-call gas config for `depositToAztec*`: the Inbox-deposit buffer floor, or a larger operator override. */ +function inboxDepositGasConfig(): L1TxConfig { + const configuredBuffer = getL1TxUtilsConfigEnvVars().gasLimitBufferPercentage ?? 0; + return { gasLimitBufferPercentage: Math.max(configuredBuffer, INBOX_DEPOSIT_GAS_LIMIT_BUFFER_PERCENTAGE) }; +} + /** Helper for managing an ERC20 on L1. */ export class L1TokenManager { private contract: ViemContract; private handler: ViemContract | undefined; + private readonly l1TxUtils: L1TxUtils; public constructor( /** Address of the ERC20 contract. */ @@ -76,6 +98,7 @@ export class L1TokenManager { client: this.extendedClient, }); } + this.l1TxUtils = createL1TxUtils(this.extendedClient, { logger }, getL1TxUtilsConfigEnvVars()); } /** Returns the amount of tokens available to mint via the handler. @@ -108,8 +131,10 @@ export class L1TokenManager { const mintAmount = await this.getMintAmount(); this.logger.info(`Minting ${mintAmount} tokens for ${stringifyEthAddress(address, addressName)}`); // NOTE: the handler mints a fixed amount. - await this.extendedClient.waitForTransactionReceipt({ - hash: await this.handler.write.mint([address]), + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.handler.address, + abi: FeeAssetHandlerAbi, + data: encodeFunctionData({ abi: FeeAssetHandlerAbi, functionName: 'mint', args: [address] }), }); } @@ -121,8 +146,10 @@ export class L1TokenManager { */ public async approve(amount: bigint, address: Hex, addressName = '') { this.logger.info(`Approving ${amount} tokens for ${stringifyEthAddress(address, addressName)}`); - await this.extendedClient.waitForTransactionReceipt({ - hash: await this.contract.write.approve([address, amount]), + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.contract.address, + abi: TestERC20Abi, + data: encodeFunctionData({ abi: TestERC20Abi, functionName: 'approve', args: [address, amount] }), }); } } @@ -131,6 +158,7 @@ export class L1TokenManager { export class L1FeeJuicePortalManager { private readonly tokenManager: L1TokenManager; private readonly contract: ViemContract; + private readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -145,6 +173,7 @@ export class L1FeeJuicePortalManager { abi: FeeJuicePortalAbi, client: extendedClient, }); + this.l1TxUtils = createL1TxUtils(extendedClient, { logger }, getL1TxUtilsConfigEnvVars()); } /** Returns the associated token manager for the L1 ERC20. */ @@ -176,9 +205,14 @@ export class L1FeeJuicePortalManager { await this.contract.simulate.depositToAztecPublic(args); - const txReceipt = await this.extendedClient.waitForTransactionReceipt({ - hash: await this.contract.write.depositToAztecPublic(args), - }); + const { receipt: txReceipt } = await this.l1TxUtils.sendAndMonitorTransaction( + { + to: this.contract.address, + abi: FeeJuicePortalAbi, + data: encodeFunctionData({ abi: FeeJuicePortalAbi, functionName: 'depositToAztecPublic', args }), + }, + inboxDepositGasConfig(), + ); this.logger.info('Deposited to Aztec public successfully', { txReceipt }); @@ -249,6 +283,7 @@ export class L1FeeJuicePortalManager { export class L1ToL2TokenPortalManager { protected readonly portal: ViemContract; protected readonly tokenManager: L1TokenManager; + protected readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -263,6 +298,7 @@ export class L1ToL2TokenPortalManager { abi: TokenPortalAbi, client: extendedClient, }); + this.l1TxUtils = createL1TxUtils(extendedClient, { logger }, getL1TxUtilsConfigEnvVars()); } /** Returns the token manager for the underlying L1 token. */ @@ -280,15 +316,17 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed publicly'); - const { request } = await this.portal.simulate.depositToAztecPublic([ - to.toString(), - amount, - claimSecretHash.toString(), - ]); - - const txReceipt = await this.extendedClient.waitForTransactionReceipt({ - hash: await this.extendedClient.writeContract(request), - }); + const args = [to.toString(), amount, claimSecretHash.toString()] as const; + await this.portal.simulate.depositToAztecPublic(args); + + const { receipt: txReceipt } = await this.l1TxUtils.sendAndMonitorTransaction( + { + to: this.portal.address, + abi: TokenPortalAbi, + data: encodeFunctionData({ abi: TokenPortalAbi, functionName: 'depositToAztecPublic', args }), + }, + inboxDepositGasConfig(), + ); const log = extractEvent( txReceipt.logs, @@ -334,11 +372,17 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed privately'); - const { request } = await this.portal.simulate.depositToAztecPrivate([amount, claimSecretHash.toString()]); - - const txReceipt = await this.extendedClient.waitForTransactionReceipt({ - hash: await this.extendedClient.writeContract(request), - }); + const args = [amount, claimSecretHash.toString()] as const; + await this.portal.simulate.depositToAztecPrivate(args); + + const { receipt: txReceipt } = await this.l1TxUtils.sendAndMonitorTransaction( + { + to: this.portal.address, + abi: TokenPortalAbi, + data: encodeFunctionData({ abi: TokenPortalAbi, functionName: 'depositToAztecPrivate', args }), + }, + inboxDepositGasConfig(), + ); const log = extractEvent( txReceipt.logs, @@ -437,7 +481,7 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager { } // Call function on L1 contract to consume the message - const { request: withdrawRequest } = await this.portal.simulate.withdraw([ + const withdrawArgs = [ recipient.toString(), amount, false, @@ -445,10 +489,13 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager { BigInt(numCheckpointsInEpoch), messageIndex, siblingPath.toBufferArray().map((buf: Buffer): Hex => `0x${buf.toString('hex')}`), - ]); + ] as const; + await this.portal.simulate.withdraw(withdrawArgs); - await this.extendedClient.waitForTransactionReceipt({ - hash: await this.extendedClient.writeContract(withdrawRequest), + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.portal.address, + abi: TokenPortalAbi, + data: encodeFunctionData({ abi: TokenPortalAbi, functionName: 'withdraw', args: withdrawArgs }), }); const isConsumedAfter = await this.outbox.read.hasMessageBeenConsumedAtEpoch([BigInt(epochNumber), messageLeafId]); diff --git a/yarn-project/aztec.js/src/utils/node.test.ts b/yarn-project/aztec.js/src/utils/node.test.ts index 18ea35d88e06..deec8998aba5 100644 --- a/yarn-project/aztec.js/src/utils/node.test.ts +++ b/yarn-project/aztec.js/src/utils/node.test.ts @@ -1,4 +1,5 @@ import { BlockNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types'; +import { TimeoutError } from '@aztec/foundation/error'; import { BlockHash } from '@aztec/stdlib/block'; import type { AztecNode } from '@aztec/stdlib/interfaces/client'; import { @@ -14,7 +15,7 @@ import { import { type MockProxy, mock } from 'jest-mock-extended'; -import { waitForTx } from './node.js'; +import { waitForNode, waitForTx } from './node.js'; describe('waitForTx', () => { let node: MockProxy; @@ -137,3 +138,24 @@ describe('waitForTx', () => { }); }); }); + +describe('waitForNode', () => { + let node: MockProxy; + + beforeEach(() => { + node = mock(); + }); + + it('resolves once the node becomes reachable', async () => { + node.getNodeInfo.mockRejectedValueOnce(new Error('not up yet')).mockResolvedValueOnce({} as any); + + await expect(waitForNode(node, undefined, { timeout: 5, interval: 0.01 })).resolves.toBeUndefined(); + expect(node.getNodeInfo).toHaveBeenCalledTimes(2); + }); + + it('rejects with a TimeoutError when the node stays unreachable', async () => { + node.getNodeInfo.mockRejectedValue(new Error('unreachable')); + + await expect(waitForNode(node, undefined, { timeout: 0.05, interval: 0.01 })).rejects.toThrow(TimeoutError); + }); +}); diff --git a/yarn-project/aztec.js/src/utils/node.ts b/yarn-project/aztec.js/src/utils/node.ts index ee88b68a7159..7f92a1a77948 100644 --- a/yarn-project/aztec.js/src/utils/node.ts +++ b/yarn-project/aztec.js/src/utils/node.ts @@ -6,18 +6,31 @@ import { SortedTxStatuses, TxStatus } from '@aztec/stdlib/tx'; import { DefaultWaitOpts, type WaitOpts } from '../contract/wait_opts.js'; -export const waitForNode = async (node: AztecNode, logger?: Logger) => { - await retryUntil(async () => { - try { - logger?.verbose('Attempting to contact Aztec node...'); - await node.getNodeInfo(); - logger?.verbose('Contacted Aztec node'); - return true; - } catch { - logger?.verbose('Failed to contact Aztec Node'); - } - return undefined; - }, 'RPC Get Node Info'); +/** + * Waits for an Aztec node to become reachable, polling {@link AztecNode.getNodeInfo} until it succeeds. + * @param node - The Aztec node to contact. + * @param logger - Optional logger for polling progress. + * @param opts - Optional timeout and interval (in seconds). `timeout` defaults to {@link DefaultWaitOpts.timeout}; + * pass `timeout: 0` to wait indefinitely. + * @throws TimeoutError if the node stays unreachable past the timeout. + */ +export const waitForNode = async (node: AztecNode, logger?: Logger, opts?: Pick) => { + await retryUntil( + async () => { + try { + logger?.verbose('Attempting to contact Aztec node...'); + await node.getNodeInfo(); + logger?.verbose('Contacted Aztec node'); + return true; + } catch { + logger?.verbose('Failed to contact Aztec Node'); + } + return undefined; + }, + 'RPC Get Node Info', + opts?.timeout ?? DefaultWaitOpts.timeout, + opts?.interval ?? DefaultWaitOpts.interval, + ); }; /** Returns true if the receipt status is at least the desired status level. */ diff --git a/yarn-project/aztec/bootstrap.sh b/yarn-project/aztec/bootstrap.sh index c27fba277781..fadce4199f06 100755 --- a/yarn-project/aztec/bootstrap.sh +++ b/yarn-project/aztec/bootstrap.sh @@ -12,6 +12,8 @@ function test_cmds { # All CLI tests share test/mixed-workspace/target so they must run sequentially # in a single jest invocation (--runInBand is set by run_test.sh). echo "$hash:ISOLATE=1:NAME=aztec/cli NARGO=$NARGO BB=$BB PROFILER_PATH=$PROFILER_PATH yarn-project/scripts/run_test.sh aztec/src/cli" + # setupLocalNetwork smoke test: spins up anvil + an in-process node (network usage ⇒ ISOLATE). + echo "$hash:ISOLATE=1:NAME=aztec/testing yarn-project/scripts/run_test.sh aztec/src/testing/local-network.test.ts" } case "$cmd" in diff --git a/yarn-project/aztec/src/examples/token.ts b/yarn-project/aztec/src/examples/token.ts index fddb6704492f..79bd035a4780 100644 --- a/yarn-project/aztec/src/examples/token.ts +++ b/yarn-project/aztec/src/examples/token.ts @@ -23,8 +23,21 @@ async function main() { // During local network setup we create a few initializerless accounts. Below we add them to our wallet. const [aliceInitialAccountData, bobInitialAccountData] = await getInitialTestAccountsData(); +<<<<<<< HEAD await wallet.createSchnorrInitializerlessAccount(aliceInitialAccountData.secret, aliceInitialAccountData.salt); await wallet.createSchnorrInitializerlessAccount(bobInitialAccountData.secret, bobInitialAccountData.salt); +======= + await wallet.createSchnorrInitializerlessAccount( + aliceInitialAccountData.secret, + aliceInitialAccountData.salt, + aliceInitialAccountData.signingKey, + ); + await wallet.createSchnorrInitializerlessAccount( + bobInitialAccountData.secret, + bobInitialAccountData.salt, + bobInitialAccountData.signingKey, + ); +>>>>>>> origin/v5-next const alice = aliceInitialAccountData.address; const bob = bobInitialAccountData.address; diff --git a/yarn-project/aztec/src/local-network/local-network.ts b/yarn-project/aztec/src/local-network/local-network.ts index eefbd37ed8df..9c0fb10eec23 100644 --- a/yarn-project/aztec/src/local-network/local-network.ts +++ b/yarn-project/aztec/src/local-network/local-network.ts @@ -88,6 +88,8 @@ export type LocalNetworkConfig = AztecNodeConfig & { l1Mnemonic: string; /** Whether to deploy test accounts on local network start.*/ testAccounts: boolean; + /** Override the default per-address fee juice granted at genesis to funded addresses. */ + initialAccountFeeJuice?: Fr; }; /** @@ -176,7 +178,10 @@ export async function createLocalNetwork(config: Partial = { ...(initialAccounts.length ? [bananaFPC, sponsoredFPC] : []), ...prefundAddresses, ]; - const { genesisArchiveRoot, genesis, fundingNeeded } = await getGenesisValues(fundedAddresses); + const { genesisArchiveRoot, genesis, fundingNeeded } = await getGenesisValues( + fundedAddresses, + config.initialAccountFeeJuice, + ); const dateProvider = new TestDateProvider(); diff --git a/yarn-project/aztec/src/mainnet_compatibility.test.ts b/yarn-project/aztec/src/mainnet_compatibility.test.ts index db0c4a781dd5..50e543c6f732 100644 --- a/yarn-project/aztec/src/mainnet_compatibility.test.ts +++ b/yarn-project/aztec/src/mainnet_compatibility.test.ts @@ -7,7 +7,10 @@ import { getGenesisValues } from '@aztec/world-state/testing'; * This test suit makes sure that the code in the monorepo is still compatible with the latest version of mainnet * Only update these values after a governance update that changes the protocol is enacted */ -describe('Mainnet compatibility', () => { +// TODO: temporarily skipped on v5-next, which carries unreleased protocol circuit changes that +// shift the VK tree root, protocol contracts hash and genesis roots away from the live mainnet +// values. Re-enable (and refresh the expected values) once we cut the first RC. +describe.skip('Mainnet compatibility', () => { it('has expected VK tree root', () => { const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')]; expect(expectedRoots).toContainEqual(getVKTreeRoot()); diff --git a/yarn-project/aztec/src/testing/index.ts b/yarn-project/aztec/src/testing/index.ts index 0155a48144fd..6459e351146b 100644 --- a/yarn-project/aztec/src/testing/index.ts +++ b/yarn-project/aztec/src/testing/index.ts @@ -1,4 +1,5 @@ export { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test'; export { CheatCodes } from './cheat_codes.js'; export { EpochTestSettler } from './epoch_test_settler.js'; +export { setupLocalNetwork, TEST_FEE_PADDING, type LocalNetwork, type LocalNetworkOptions } from './local-network.js'; export { getTokenAllowedSetupFunctions } from './token_allowed_setup.js'; diff --git a/yarn-project/aztec/src/testing/local-network.test.ts b/yarn-project/aztec/src/testing/local-network.test.ts new file mode 100644 index 000000000000..648a748f2b51 --- /dev/null +++ b/yarn-project/aztec/src/testing/local-network.test.ts @@ -0,0 +1,52 @@ +import { getInitialTestAccountsData } from '@aztec/accounts/testing'; +import { TokenContract } from '@aztec/noir-contracts.js/Token'; +import { EmbeddedWallet } from '@aztec/wallets/embedded'; + +import { TEST_FEE_PADDING, setupLocalNetwork } from './local-network.js'; + +describe('setupLocalNetwork', () => { + it('serves a live node on a random L1 port and tears down cleanly', async () => { + await using net = await setupLocalNetwork(); + const info = await net.node.getNodeInfo(); + expect(info.l1ContractAddresses.rollupAddress).toBeDefined(); + expect(await net.node.getBlockNumber()).toBeGreaterThanOrEqual(0); + expect(net.l1ChainId).toBe(31337); + // OS-assigned ephemeral port, never the fixed default 8545. + expect(net.l1RpcUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/); + expect(net.l1RpcUrl).not.toContain(':8545'); + }, 300_000); + + it('runs two networks in parallel on distinct ports', async () => { + const [a, b] = await Promise.all([setupLocalNetwork(), setupLocalNetwork()]); + try { + expect(a.l1RpcUrl).not.toEqual(b.l1RpcUrl); + expect(await a.node.getBlockNumber()).toBeGreaterThanOrEqual(0); + expect(await b.node.getBlockNumber()).toBeGreaterThanOrEqual(0); + } finally { + await Promise.all([a.stop(), b.stop()]); + } + }, 300_000); + + it('pre-funds addresses at genesis so they can pay for their own txs', async () => { + const [alice] = await getInitialTestAccountsData(); + const net = await setupLocalNetwork({ fundedAddresses: [alice.address] }); + try { + const wallet = await EmbeddedWallet.create(net.node, { + ephemeral: true, + pxeConfig: { proverEnabled: false }, + }); + await wallet.createSchnorrInitializerlessAccount(alice.secret, alice.salt, alice.signingKey); + wallet.setMinFeePadding(TEST_FEE_PADDING); + + const { contract } = await TokenContract.deploy(wallet, alice.address, 'TokenName', 'TKN', 18).send({ + from: alice.address, + }); + expect(contract.address).toBeDefined(); + expect(await net.node.getBlockNumber()).toBeGreaterThan(0); + + await wallet.stop(); + } finally { + await net.stop(); + } + }, 300_000); +}); diff --git a/yarn-project/aztec/src/testing/local-network.ts b/yarn-project/aztec/src/testing/local-network.ts new file mode 100644 index 000000000000..39c3a97e0167 --- /dev/null +++ b/yarn-project/aztec/src/testing/local-network.ts @@ -0,0 +1,97 @@ +import type { AztecNodeService } from '@aztec/aztec-node'; +import type { AztecNodeConfig } from '@aztec/aztec-node/config'; +import type { Fr } from '@aztec/aztec.js/fields'; +import { startAnvil } from '@aztec/ethereum/test'; +import type { AztecAddress } from '@aztec/stdlib/aztec-address'; + +import { foundry } from 'viem/chains'; + +import { createLocalNetwork } from '../local-network/local-network.js'; + +/** A running in-process local network: an inline Aztec node backed by its own anvil L1. */ +export interface LocalNetwork extends AsyncDisposable { + /** Fully-synced Aztec node, ready to serve client requests. */ + node: AztecNodeService; + /** RPC URL of the spawned anvil instance. */ + l1RpcUrl: string; + /** Chain id used on L1 (foundry's default 31337). */ + l1ChainId: number; + /** Stops every process started by the fixture: node and anvil. Also invoked by `await using`. */ + stop: () => Promise; +} + +/** Options for {@link setupLocalNetwork}. */ +export interface LocalNetworkOptions { + /** + * Addresses that should hold fee juice at genesis. Saves each of these the round-trip of bridging + * + claiming fee juice before they can pay for gas. + */ + fundedAddresses?: AztecAddress[]; + /** Override the default per-address genesis fee juice granted to {@link fundedAddresses}. */ + initialAccountFeeJuice?: Fr; + /** Node config overrides, e.g. `realProofs`, `aztecEpochDuration`, `p2pEnabled`. */ + config?: Partial; +} + +/** + * Spin up an in-process local network with the given addresses pre-funded. + * + * Each call spawns its own anvil on an OS-assigned random port and runs the Aztec node inline via + * the same {@link createLocalNetwork} codepath that backs `aztec start --local-network` (with the + * sandbox account/FPC/token setup skipped). Distinct ports let independent suites run in parallel. + * The caller must `await result.stop()` in its teardown (or hold the result with `await using`). + * + * Requires a Foundry toolchain (`anvil`/`forge`), installed via `aztec-up` or `foundryup`. Binaries + * are located in the standard install directories or on `PATH`; set `$ANVIL_BIN` / `$FORGE_BIN` to + * pin specific ones. + */ +export async function setupLocalNetwork(opts: LocalNetworkOptions = {}): Promise { + // `--port 0` → anvil binds an ephemeral port that `startAnvil` reads back, so parallel suites + // never collide on a fixed port. + const { rpcUrl, stop: stopAnvil } = await startAnvil({ port: 0 }); + + try { + const { node, stop: stopNode } = await createLocalNetwork( + { + ...opts.config, + l1RpcUrls: [rpcUrl], + testAccounts: false, + prefundAddresses: (opts.fundedAddresses ?? []).map(a => a.toString()), + initialAccountFeeJuice: opts.initialAccountFeeJuice, + }, + () => {}, + ); + + // Stop the node before anvil (its teardown still talks to L1); the finally guarantees anvil is + // reaped even if node shutdown throws. + const stop = async () => { + try { + await stopNode(); + } finally { + await stopAnvil(); + } + }; + + return { + node, + l1RpcUrl: rpcUrl, + l1ChainId: foundry.id, + stop, + [Symbol.asyncDispose]: stop, + }; + } catch (err) { + await stopAnvil(); + throw err; + } +} + +/** + * Min-fee padding multiplier for test wallets whose txs may mine well after their fee estimate. + * The automine sequencer builds one block per tx and advances L1 time in big jumps, and proposer + * pipelining evolves the fee-asset price across the build/publish gap (~20x observed in CI), so the + * network's congestion base fee can swing sharply between the wallet's fee estimate and the block + * the tx actually lands in. The default wallet padding isn't enough and trips + * `maxFeesPerGas.feePerL2Gas must be >= gasFees.feePerL2Gas`. Apply via + * `wallet.setMinFeePadding(TEST_FEE_PADDING)` on every test wallet that sends txs. + */ +export const TEST_FEE_PADDING = 30; diff --git a/yarn-project/aztec/src/testnet_compatibility.test.ts b/yarn-project/aztec/src/testnet_compatibility.test.ts index f47b758f2fa6..ced4bb3bc703 100644 --- a/yarn-project/aztec/src/testnet_compatibility.test.ts +++ b/yarn-project/aztec/src/testnet_compatibility.test.ts @@ -9,7 +9,10 @@ import { getGenesisValues } from '@aztec/world-state/testing'; * This test suit makes sure that the code in the monorepo is still compatible with the latest version of testnet * Only update these values after a governance update that changes the protocol is enacted */ -describe('Testnet compatibility', () => { +// TODO: temporarily skipped on v5-next, which carries unreleased protocol circuit changes that +// shift the VK tree root, protocol contracts hash and genesis roots away from the live testnet +// values. Re-enable (and refresh the expected values) once we cut the first RC. +describe.skip('Testnet compatibility', () => { it('has expected VK tree root', () => { const expectedRoots = [Fr.fromHexString('0x18e358ea5367f6069a4c1c08a2e0628fbb1b25c00b0b98160072d4ad397bae7c')]; expect(expectedRoots).toContainEqual(getVKTreeRoot()); diff --git a/yarn-project/bb-prover/src/avm_proving_tests/avm_completeness_bitwise_sha256_collision.test.ts b/yarn-project/bb-prover/src/avm_proving_tests/avm_completeness_bitwise_sha256_collision.test.ts new file mode 100644 index 000000000000..6f4cbb9b5623 --- /dev/null +++ b/yarn-project/bb-prover/src/avm_proving_tests/avm_completeness_bitwise_sha256_collision.test.ts @@ -0,0 +1,47 @@ +import { createLogger } from '@aztec/foundation/log'; +import { defaultGlobals, deployBitwiseSha256ErrorRowCollisionContracts } from '@aztec/simulator/public/fixtures'; +import { AvmCircuitInputs } from '@aztec/stdlib/avm'; +import { AztecAddress } from '@aztec/stdlib/aztec-address'; +import { NativeWorldStateService } from '@aztec/world-state'; + +import { AvmProvingTester } from './avm_proving_tester.js'; + +describe('AVM completeness — bitwise/sha256 error row collision (regression guard)', () => { + let tester: AvmProvingTester; + let worldStateService: NativeWorldStateService; + const logger = createLogger('avm-completeness-bitwise-sha256'); + + beforeEach(async () => { + worldStateService = await NativeWorldStateService.tmp(); + tester = await AvmProvingTester.new(worldStateService, /*checkCircuitOnly=*/ true, /*globals=*/ defaultGlobals()); + }); + + afterEach(async () => { + await worldStateService.close(); + }); + + // Guards against regression of the completeness bug where an honest tx whose inner call + // emits a bitwise error row (XOR with tag mismatch) and whose outer call runs + // SHA256COMPRESSION with sigma0(w[1]=0) → XOR(U32(0), U32(0)) could not be proven: the + // sha256 bitwise lookup collided with the inner's error row on the 5-tuple + // (0, 0, 0, XOR, U32), violating BITW_NO_EXTERNAL_START_ON_ERROR. The fix adds a second + // input tag to the bitwise lookup from keccakf1600.pil/sha256.pil so the caller passes + // (u32_tag, u32_tag) while error rows have (tag_a, tag_b) with tag_a != tag_b, making + // the collision impossible. + it('proves honest tx with sha256 XOR(U32(0), U32(0)) after inner bitwise error', async () => { + const { innerContract, outerContract } = await deployBitwiseSha256ErrorRowCollisionContracts(tester); + const sender = AztecAddress.fromNumberUnsafe(42); + + // Inner call reverts (tag mismatch), outer runs SHA256, outer RETURNs OK. + const simRes = await tester.simulateTx( + sender, + /*setupCalls=*/ [], + /*appCalls=*/ [{ address: outerContract.address, args: [innerContract.address.toField()] }], + ); + expect(simRes.revertCode.isOK()).toBe(true); + + const avmCircuitInputs = new AvmCircuitInputs(simRes.hints!, simRes.publicInputs!); + logger.info('Checking AVM circuit for bitwise/sha256 collision regression'); + await tester.prove(avmCircuitInputs, 'bitwise-sha256-collision'); + }, 180_000); +}); diff --git a/yarn-project/bb-prover/src/avm_proving_tests/avm_msm_zero_scalar_invalid_point.test.ts b/yarn-project/bb-prover/src/avm_proving_tests/avm_msm_zero_scalar_invalid_point.test.ts index 88f8b02133d5..aa15924ebcae 100644 --- a/yarn-project/bb-prover/src/avm_proving_tests/avm_msm_zero_scalar_invalid_point.test.ts +++ b/yarn-project/bb-prover/src/avm_proving_tests/avm_msm_zero_scalar_invalid_point.test.ts @@ -39,7 +39,10 @@ describe('AVM MSM zero-scalar invalid-point regression', () => { }); afterEach(async () => { +<<<<<<< HEAD await tester.close(); +======= +>>>>>>> origin/v5-next await worldStateService.close(); }); diff --git a/yarn-project/bootstrap.sh b/yarn-project/bootstrap.sh index 06d2bf41358f..21dd299f5d5d 100755 --- a/yarn-project/bootstrap.sh +++ b/yarn-project/bootstrap.sh @@ -294,10 +294,14 @@ case "$cmd" in git clean -fdx ;; "clean-lite") +<<<<<<< HEAD # Preserve gitignored fixture dirs that are populated by sibling builds and # consumed concurrently by parallel test commands. Wiping them mid-test # yanks files out from under readers (see chonk_inputs.sh download path). files=$(git ls-files --ignored --others --exclude-standard | grep -vE '(node_modules/|^\.yarn/|^tmp/|^end-to-end/example-app-ivc-inputs-out/|^end-to-end/ultrahonk-bench-inputs/|^end-to-end/dumped-avm-circuit-inputs/)' || true) +======= + files=$(git ls-files --ignored --others --exclude-standard | grep -vE '(node_modules/|^\.yarn/|^tmp/)' || true) +>>>>>>> origin/v5-next if [ -n "$files" ]; then echo "$files" | xargs rm -rf fi diff --git a/yarn-project/bot/src/factory.test.ts b/yarn-project/bot/src/factory.test.ts new file mode 100644 index 000000000000..936cfc6ed233 --- /dev/null +++ b/yarn-project/bot/src/factory.test.ts @@ -0,0 +1,87 @@ +import { promiseWithResolvers } from '@aztec/foundation/promise'; +import type { AztecNode, AztecNodeAdmin, AztecNodeAdminConfig } from '@aztec/stdlib/interfaces/client'; +import type { EmbeddedWallet } from '@aztec/wallets/embedded'; + +import { mock } from 'jest-mock-extended'; + +import { type BotConfig, getBotDefaultConfig } from './config.js'; +import { BotFactory } from './factory.js'; +import type { BotStore } from './store/index.js'; + +class TestBotFactory extends BotFactory { + public override withNoMinTxsPerBlock(fn: () => Promise): Promise { + return super.withNoMinTxsPerBlock(fn); + } +} + +describe('BotFactory.withNoMinTxsPerBlock', () => { + let minTxsPerBlock: number | undefined; + let setConfigCalls: (number | undefined)[]; + let factory: TestBotFactory; + + beforeEach(() => { + minTxsPerBlock = 3; + setConfigCalls = []; + + const aztecNodeAdmin = mock(); + aztecNodeAdmin.getConfig.mockImplementation(() => Promise.resolve({ minTxsPerBlock } as AztecNodeAdminConfig)); + aztecNodeAdmin.setConfig.mockImplementation(config => { + setConfigCalls.push(config.minTxsPerBlock); + minTxsPerBlock = config.minTxsPerBlock; + return Promise.resolve(); + }); + + const config: BotConfig = { ...getBotDefaultConfig(), flushSetupTransactions: true }; + const wallet = mock(); + factory = new TestBotFactory(config, wallet, mock(), mock(), aztecNodeAdmin); + }); + + it('zeroes minTxsPerBlock around a call and restores it after', async () => { + await factory.withNoMinTxsPerBlock(() => { + expect(minTxsPerBlock).toBe(0); + return Promise.resolve(); + }); + + expect(setConfigCalls).toEqual([0, 3]); + expect(minTxsPerBlock).toBe(3); + }); + + it('zeroes once and restores once across overlapping calls', async () => { + const gates = [promiseWithResolvers(), promiseWithResolvers(), promiseWithResolvers()]; + const calls = gates.map(gate => factory.withNoMinTxsPerBlock(() => gate.promise)); + + gates[0].resolve(); + await calls[0]; + expect(minTxsPerBlock).toBe(0); + + gates[1].resolve(); + await calls[1]; + expect(minTxsPerBlock).toBe(0); + + gates[2].resolve(); + await calls[2]; + expect(setConfigCalls).toEqual([0, 3]); + expect(minTxsPerBlock).toBe(3); + }); + + it('restores minTxsPerBlock when the wrapped call fails', async () => { + await expect(factory.withNoMinTxsPerBlock(() => Promise.reject(new Error('boom')))).rejects.toThrow('boom'); + + expect(setConfigCalls).toEqual([0, 3]); + expect(minTxsPerBlock).toBe(3); + }); + + it('restores minTxsPerBlock when one of several overlapping calls fails', async () => { + const gate = promiseWithResolvers(); + const failing = factory.withNoMinTxsPerBlock(() => Promise.reject(new Error('boom'))); + const succeeding = factory.withNoMinTxsPerBlock(() => gate.promise); + + await expect(failing).rejects.toThrow('boom'); + expect(minTxsPerBlock).toBe(0); + + gate.resolve(); + await succeeding; + expect(setConfigCalls).toEqual([0, 3]); + expect(minTxsPerBlock).toBe(3); + }); +}); diff --git a/yarn-project/bot/src/factory.ts b/yarn-project/bot/src/factory.ts index d720ccdb83a2..f2f07f98fd52 100644 --- a/yarn-project/bot/src/factory.ts +++ b/yarn-project/bot/src/factory.ts @@ -1,4 +1,8 @@ import { getInitialTestAccountsData } from '@aztec/accounts/testing'; +<<<<<<< HEAD +======= +import { deriveSecretKeyFromSigningKey } from '@aztec/accounts/utils'; +>>>>>>> origin/v5-next import { AztecAddress } from '@aztec/aztec.js/addresses'; import { BatchCall, @@ -21,6 +25,7 @@ import { createExtendedL1Client } from '@aztec/ethereum/client'; import { RollupContract } from '@aztec/ethereum/contracts'; import type { ExtendedViemWalletClient } from '@aztec/ethereum/types'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { EthAddress } from '@aztec/foundation/eth-address'; import { AMMContract } from '@aztec/noir-contracts.js/AMM'; import { PrivateTokenContract } from '@aztec/noir-contracts.js/PrivateToken'; @@ -29,7 +34,6 @@ import { TestContract } from '@aztec/noir-test-contracts.js/Test'; import type { BlockTag } from '@aztec/stdlib/block'; import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract'; import type { AztecNode, AztecNodeAdmin } from '@aztec/stdlib/interfaces/client'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { EmbeddedWallet } from '@aztec/wallets/embedded'; import { type BotConfig, SupportedTokenContracts } from './config.js'; @@ -44,6 +48,11 @@ const FEE_JUICE_TOP_UP_THRESHOLD = 100n * 10n ** 18n; export class BotFactory { private log = createLogger('bot'); + /** Number of in-flight withNoMinTxsPerBlock calls; see that method for why they are counted. */ + private noMinTxsPerBlockDepth = 0; + /** Set by the first withNoMinTxsPerBlock entrant; resolves to the minTxsPerBlock value to restore. */ + private savedMinTxsPerBlock?: Promise<{ minTxsPerBlock?: number }>; + constructor( private readonly config: BotConfig, private readonly wallet: EmbeddedWallet, @@ -69,7 +78,12 @@ export class BotFactory { recipient: AztecAddress; }> { const defaultAccountAddress = await this.setupAccount(); +<<<<<<< HEAD const recipient = (await this.wallet.createSchnorrAccount(Fr.random(), Fr.random())).address; +======= + const recipient = (await this.wallet.createSchnorrAccount(Fr.random(), Fr.random(), GrumpkinScalar.random())) + .address; +>>>>>>> origin/v5-next await this.ensureFeeJuiceBalance(defaultAccountAddress); const token = await this.setupToken(defaultAccountAddress); await this.mintTokens(token, defaultAccountAddress); @@ -86,6 +100,7 @@ export class BotFactory { }> { const defaultAccountAddress = await this.setupAccount(); await this.ensureFeeJuiceBalance(defaultAccountAddress); +<<<<<<< HEAD const token0 = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotToken0', 'BOT0'); const token1 = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotToken1', 'BOT1'); const liquidityToken = await this.setupTokenContract( @@ -101,8 +116,37 @@ export class BotFactory { token1, liquidityToken, ); +======= +>>>>>>> origin/v5-next + + const salt = this.config.tokenSalt; + + // token0, token1 and the LP token are independent contracts with no shared state, so deploy them + // concurrently rather than one slot at a time. + const [token0, token1, liquidityToken] = await Promise.all([ + this.setupTokenContract(defaultAccountAddress, salt, 'BotToken0', 'BOT0'), + this.setupTokenContract(defaultAccountAddress, salt, 'BotToken1', 'BOT1'), + this.setupTokenContract(defaultAccountAddress, salt, 'BotLPToken', 'BOTLP'), + ]); + + const ammDeploy = AMMContract.deploy(this.wallet, token0.address, token1.address, liquidityToken.address, { + salt, + universalDeploy: true, + }); + const ammAddress = (await ammDeploy.getInstance()).address; + + // The AMM constructor only stores the (already-derived) token addresses, and set_minter only records + // the AMM address on the LP token: neither reads the other's on-chain state, so the AMM deploy, the + // LP-minter grant, and the token0/token1 mints are mutually independent and run concurrently. + const [amm] = await Promise.all([ + this.deployAmmContract(defaultAccountAddress, ammDeploy), + this.grantLpTokenMinter(defaultAccountAddress, liquidityToken, ammAddress), + this.mintAmmLiquidity(defaultAccountAddress, token0, token1), + ]); - await this.fundAmm(defaultAccountAddress, defaultAccountAddress, amm, token0, token1, liquidityToken); + // add_liquidity spends the minted token0/token1 balances and mints LP tokens, so it must follow both + // the mints and the minter grant, and target the deployed AMM. + await this.addAmmLiquidity(defaultAccountAddress, defaultAccountAddress, amm, token0, token1, liquidityToken); this.log.info(`AMM initialized and funded`); return { wallet: this.wallet, defaultAccountAddress, amm, token0, token1, node: this.aztecNode }; @@ -140,25 +184,37 @@ export class BotFactory { const rollupContract = new RollupContract(l1Client, l1ContractAddresses.rollupAddress.toString()); const rollupVersion = await rollupContract.getVersion(); +<<<<<<< HEAD // Deploy TestContract (pays from the standing balance funded above). const contract = await this.setupTestContract(defaultAccountAddress); +======= + // Derive the TestContract address up front (deterministic from the salt). Seeding L1→L2 messages only + // needs the L2 recipient address — the messages are queued on L1 and don't require the L2 contract to + // exist yet (they're consumed later, after setup completes) — so the deploy (an L2 tx paying from the + // standing balance funded above) and the L1 seeding run concurrently. + const testContractDeploy = TestContract.deploy(this.wallet, { + salt: this.config.tokenSalt, + universalDeploy: true, + }); + const contractAddress = (await testContractDeploy.getInstance()).address; +>>>>>>> origin/v5-next // Recover any pending messages from store (clean up stale ones first) await this.store.cleanupOldPendingMessages(); const pendingMessages = await this.store.getUnconsumedL1ToL2Messages(); - // Seed initial L1→L2 messages if pipeline is empty + // Seed initial L1→L2 messages if pipeline is empty. The seeds are sent one at a time: they share the + // bot's L1 account, so concurrent sends would race on the L1 nonce. const seedCount = Math.max(0, this.config.l1ToL2SeedCount - pendingMessages.length); - for (let i = 0; i < seedCount; i++) { - await seedL1ToL2Message( - l1Client, - EthAddress.fromString(l1ContractAddresses.inboxAddress.toString()), - contract.address, - rollupVersion, - this.store, - this.log, - ); - } + const inboxAddress = EthAddress.fromString(l1ContractAddresses.inboxAddress.toString()); + const [contract] = await Promise.all([ + this.deployTestContract(defaultAccountAddress, testContractDeploy), + (async () => { + for (let i = 0; i < seedCount; i++) { + await seedL1ToL2Message(l1Client, inboxAddress, contractAddress, rollupVersion, this.store, this.log); + } + })(), + ]); // Block until at least one message is ready const allMessages = await this.store.getUnconsumedL1ToL2Messages(); @@ -182,10 +238,8 @@ export class BotFactory { }; } - private async setupTestContract(deployer: AztecAddress): Promise { - const deployOpts: DeployOptions = { from: deployer }; - const deploy = TestContract.deploy(this.wallet, { salt: this.config.tokenSalt, universalDeploy: true }); - const instance = await this.registerOrDeployContract('TestContract', deploy, deployOpts); + private async deployTestContract(deployer: AztecAddress, deploy: DeployMethod): Promise { + const instance = await this.registerOrDeployContract('TestContract', deploy, { from: deployer }); return TestContract.at(instance.address, this.wallet); } @@ -221,9 +275,16 @@ export class BotFactory { return accountManager.address; } +<<<<<<< HEAD private async setupAccountWithPrivateKey(secret: Fr) { const salt = this.config.senderSalt ?? Fr.ONE; const signingKey = deriveSigningKey(secret); +======= + private async setupAccountWithPrivateKey(privateKey: Fr) { + const salt = this.config.senderSalt ?? Fr.ONE; + const signingKey = GrumpkinScalar.fromBuffer(privateKey.toBuffer()); + const secret = await deriveSecretKeyFromSigningKey(signingKey); +>>>>>>> origin/v5-next const accountManager = await this.wallet.createSchnorrInitializerlessAccount(secret, salt, signingKey); return accountManager.address; } @@ -289,34 +350,37 @@ export class BotFactory { return TokenContract.at(instance.address, this.wallet); } - private async setupAmmContract( - deployer: AztecAddress, - salt: Fr, - token0: TokenContract, - token1: TokenContract, - lpToken: TokenContract, - ): Promise { - const deployOpts: DeployOptions = { from: deployer }; - const deploy = AMMContract.deploy(this.wallet, token0.address, token1.address, lpToken.address, { - salt, - universalDeploy: true, - }); - const instance = await this.registerOrDeployContract('AMM', deploy, deployOpts); + private async deployAmmContract(deployer: AztecAddress, deploy: DeployMethod): Promise { + const instance = await this.registerOrDeployContract('AMM', deploy, { from: deployer }); const amm = AMMContract.at(instance.address, this.wallet); - this.log.info(`AMM deployed at ${amm.address}`); - const setMinterInteraction = lpToken.methods.set_minter(amm.address, true); - const { receipt: minterReceipt } = await setMinterInteraction.send({ + return amm; + } + + /** Grants the AMM minting rights over the LP token. set_minter only records the address, so it does not + * require the AMM contract to be deployed first. */ + private async grantLpTokenMinter(deployer: AztecAddress, lpToken: TokenContract, amm: AztecAddress): Promise { + const { receipt } = await lpToken.methods.set_minter(amm, true).send({ from: deployer, wait: { timeout: this.config.txMinedWaitSeconds }, }); - this.log.info(`Set LP token minter to AMM txHash=${minterReceipt.txHash.toString()}`); - this.log.info(`Liquidity token initialized`); + this.log.info(`Set LP token minter to AMM txHash=${receipt.txHash.toString()}`); + } - return amm; + private async mintAmmLiquidity(minter: AztecAddress, token0: TokenContract, token1: TokenContract): Promise { + this.log.info(`Minting ${MINT_BALANCE} tokens of each BotToken0 and BotToken1 for ${minter}`); + const mintBatch = new BatchCall(this.wallet, [ + token0.methods.mint_to_private(minter, MINT_BALANCE), + token1.methods.mint_to_private(minter, MINT_BALANCE), + ]); + const { receipt } = await mintBatch.send({ + from: minter, + wait: { timeout: this.config.txMinedWaitSeconds }, + }); + this.log.info(`Sent mint tx: ${receipt.txHash.toString()}`); } - private async fundAmm( + private async addAmmLiquidity( defaultAccountAddress: AztecAddress, liquidityProvider: AztecAddress, amm: AMMContract, @@ -324,22 +388,6 @@ export class BotFactory { token1: TokenContract, lpToken: TokenContract, ): Promise { - const getPrivateBalances = () => - Promise.all([ - token0.methods - .balance_of_private(liquidityProvider) - .simulate({ from: liquidityProvider }) - .then(r => r.result), - token1.methods - .balance_of_private(liquidityProvider) - .simulate({ from: liquidityProvider }) - .then(r => r.result), - lpToken.methods - .balance_of_private(liquidityProvider) - .simulate({ from: liquidityProvider }) - .then(r => r.result), - ]); - const authwitNonce = Fr.random(); // keep some tokens for swapping @@ -348,12 +396,6 @@ export class BotFactory { const amount1Max = MINT_BALANCE / 2; const amount1Min = MINT_BALANCE / 4; - const [t0Bal, t1Bal, lpBal] = await getPrivateBalances(); - - this.log.info( - `Minting ${MINT_BALANCE} tokens of each BotToken0 and BotToken1. Current private balances of ${liquidityProvider}: token0=${t0Bal}, token1=${t1Bal}, lp=${lpBal}`, - ); - // Add authwitnesses for the transfers in AMM::add_liquidity function const token0Authwit = await this.wallet.createAuthWit(defaultAccountAddress, { caller: amm.address, @@ -378,36 +420,33 @@ export class BotFactory { .getFunctionCall(), }); - const mintBatch = new BatchCall(this.wallet, [ - token0.methods.mint_to_private(liquidityProvider, MINT_BALANCE), - token1.methods.mint_to_private(liquidityProvider, MINT_BALANCE), - ]); - const { receipt: mintReceipt } = await mintBatch.send({ - from: liquidityProvider, - wait: { timeout: this.config.txMinedWaitSeconds }, - }); - - this.log.info(`Sent mint tx: ${mintReceipt.txHash.toString()}`); - - const addLiquidityInteraction = amm.methods.add_liquidity( - amount0Max, - amount1Max, - amount0Min, - amount1Min, - authwitNonce, - ); - const { receipt: addLiquidityReceipt } = await addLiquidityInteraction.send({ - from: liquidityProvider, - authWitnesses: [token0Authwit, token1Authwit], - wait: { timeout: this.config.txMinedWaitSeconds }, - }); + const { receipt } = await amm.methods + .add_liquidity(amount0Max, amount1Max, amount0Min, amount1Min, authwitNonce) + .send({ + from: liquidityProvider, + authWitnesses: [token0Authwit, token1Authwit], + wait: { timeout: this.config.txMinedWaitSeconds }, + }); - this.log.info(`Sent tx to add liquidity to the AMM: ${addLiquidityReceipt.txHash.toString()}`); + this.log.info(`Sent tx to add liquidity to the AMM: ${receipt.txHash.toString()}`); this.log.info(`Liquidity added`); - const [newT0Bal, newT1Bal, newLPBal] = await getPrivateBalances(); + const [t0Bal, t1Bal, lpBal] = await Promise.all([ + token0.methods + .balance_of_private(liquidityProvider) + .simulate({ from: liquidityProvider }) + .then(r => r.result), + token1.methods + .balance_of_private(liquidityProvider) + .simulate({ from: liquidityProvider }) + .then(r => r.result), + lpToken.methods + .balance_of_private(liquidityProvider) + .simulate({ from: liquidityProvider }) + .then(r => r.result), + ]); this.log.info( - `Updated private balances of ${defaultAccountAddress} after minting and funding AMM: token0=${newT0Bal}, token1=${newT1Bal}, lp=${newLPBal}`, + `Updated private balances of ${defaultAccountAddress} after minting and funding AMM: token0=${t0Bal}, token1=${t1Bal}, lp=${lpBal}`, ); } @@ -590,19 +629,40 @@ export class BotFactory { return claim as L2AmountClaim; } +<<<<<<< HEAD private async withNoMinTxsPerBlock(fn: () => Promise): Promise { +======= + protected async withNoMinTxsPerBlock(fn: () => Promise): Promise { +>>>>>>> origin/v5-next if (!this.aztecNodeAdmin || !this.config.flushSetupTransactions) { this.log.verbose(`No node admin client or flushing not requested (not setting minTxsPerBlock to 0)`); return fn(); } - const { minTxsPerBlock } = await this.aztecNodeAdmin.getConfig(); - this.log.warn(`Setting sequencer minTxsPerBlock to 0 from ${minTxsPerBlock} to flush setup transactions`); - await this.aztecNodeAdmin.setConfig({ minTxsPerBlock: 0 }); + const aztecNodeAdmin = this.aztecNodeAdmin; + // Setup steps run concurrently, so this wrapper can be re-entered while another call is in flight. + // Reference-count the entrants: the first saves the current value and zeroes it, the last restores it. + // A naive save/zero/restore per call could interleave, with a late entrant reading the already-zeroed + // value and "restoring" 0 at the end. + if (this.noMinTxsPerBlockDepth++ === 0) { + this.savedMinTxsPerBlock = (async () => { + const { minTxsPerBlock } = await aztecNodeAdmin.getConfig(); + this.log.warn(`Setting sequencer minTxsPerBlock to 0 from ${minTxsPerBlock} to flush setup transactions`); + await aztecNodeAdmin.setConfig({ minTxsPerBlock: 0 }); + return { minTxsPerBlock }; + })(); + } try { + await this.savedMinTxsPerBlock; return await fn(); } finally { - this.log.warn(`Restoring sequencer minTxsPerBlock to ${minTxsPerBlock}`); - await this.aztecNodeAdmin.setConfig({ minTxsPerBlock }); + if (--this.noMinTxsPerBlockDepth === 0) { + // If saving/zeroing itself failed there is nothing to restore. + const saved = await this.savedMinTxsPerBlock!.catch(() => undefined); + if (saved) { + this.log.warn(`Restoring sequencer minTxsPerBlock to ${saved.minTxsPerBlock}`); + await aztecNodeAdmin.setConfig({ minTxsPerBlock: saved.minTxsPerBlock }); + } + } } } } diff --git a/yarn-project/cli-wallet/src/cmds/create_account.ts b/yarn-project/cli-wallet/src/cmds/create_account.ts index b883d23c0e15..e409cbfb4618 100644 --- a/yarn-project/cli-wallet/src/cmds/create_account.ts +++ b/yarn-project/cli-wallet/src/cmds/create_account.ts @@ -1,3 +1,4 @@ +import { deriveSecretKeyFromSigningKey } from '@aztec/accounts/utils'; import { NO_FROM } from '@aztec/aztec.js/account'; import { AztecAddress } from '@aztec/aztec.js/addresses'; import { NO_WAIT } from '@aztec/aztec.js/contracts'; @@ -5,6 +6,7 @@ import { type AztecNode, waitForTx } from '@aztec/aztec.js/node'; import type { DeployAccountOptions } from '@aztec/aztec.js/wallet'; import { prettyPrintJSON } from '@aztec/cli/cli-utils'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { LogFn, Logger } from '@aztec/foundation/log'; import { type TxHash, type TxReceipt, TxStatus } from '@aztec/stdlib/tx'; @@ -18,7 +20,7 @@ export async function createAccount( wallet: CLIWallet, aztecNode: AztecNode, accountType: AccountType, - secretKey: Fr | undefined, + signingKey: GrumpkinScalar | undefined, salt: Fr | undefined, publicKey: string | undefined, alias: string | undefined, @@ -35,15 +37,17 @@ export async function createAccount( debugLogger: Logger, log: LogFn, ) { - secretKey ??= Fr.random(); - - const account = await wallet.createOrRetrieveAccount( - undefined /* address, we don't have it yet */, - secretKey, - accountType, - salt, - publicKey, - ); + let secretKey: Fr; + if (accountType === 'ecdsasecp256r1ssh') { + // SSH accounts sign with a key held in the agent, and so we cannot derive their privacy secret key from it. Instead + // we pick a random value. + secretKey = Fr.random(); + } else { + signingKey ??= GrumpkinScalar.random(); + secretKey = await deriveSecretKeyFromSigningKey(signingKey); + } + + const account = await wallet.createAccount(accountType, signingKey, secretKey, salt, publicKey); const instanceSalt = account.getInstance().salt; const { address, publicKeys, partialAddress } = await account.getCompleteAddress(); @@ -51,6 +55,9 @@ export async function createAccount( if (json) { out.address = address; out.publicKey = publicKeys; + if (signingKey) { + out.signingKey = signingKey; + } if (secretKey) { out.secretKey = secretKey; } @@ -61,6 +68,9 @@ export async function createAccount( log(`\nNew account:\n`); log(`Address: ${address.toString()}`); log(`Public key: ${publicKeys.toString()}`); + if (signingKey) { + log(`Signing key: ${signingKey.toString()}`); + } if (secretKey) { log(`Secret key: ${secretKey.toString()}`); } @@ -162,5 +172,5 @@ export async function createAccount( } } - return { alias, address, secretKey, salt: instanceSalt }; + return { alias, address, signingKey, secretKey, salt: instanceSalt }; } diff --git a/yarn-project/cli-wallet/src/cmds/deploy_account.ts b/yarn-project/cli-wallet/src/cmds/deploy_account.ts index 5177e426fd3e..240d4d5180ae 100644 --- a/yarn-project/cli-wallet/src/cmds/deploy_account.ts +++ b/yarn-project/cli-wallet/src/cmds/deploy_account.ts @@ -30,7 +30,7 @@ export async function deployAccount( ) { const out: Record = {}; - const account = await wallet.createOrRetrieveAccount(address); + const account = await wallet.retrieveAccount(address); const { partialAddress, publicKeys } = await account.getCompleteAddress(); const { initializationHash, salt } = account.getInstance(); diff --git a/yarn-project/cli-wallet/src/cmds/import_test_accounts.ts b/yarn-project/cli-wallet/src/cmds/import_test_accounts.ts index f531b91ed1c4..aef3806b2ff6 100644 --- a/yarn-project/cli-wallet/src/cmds/import_test_accounts.ts +++ b/yarn-project/cli-wallet/src/cmds/import_test_accounts.ts @@ -18,7 +18,18 @@ export async function importTestAccounts(wallet: CLIWallet, db: WalletDB, json: const address = account.address; await db.storeAccount( address, +<<<<<<< HEAD { type: 'schnorr_initializerless', secretKey: secret, salt, alias, publicKey: undefined }, +======= + { + type: 'schnorr_initializerless', + signingKey: account.signingKey, + secretKey: secret, + salt, + alias, + publicKey: undefined, + }, +>>>>>>> origin/v5-next log, ); diff --git a/yarn-project/cli-wallet/src/cmds/index.ts b/yarn-project/cli-wallet/src/cmds/index.ts index d6ca67c97ecb..b9d362bc93e0 100644 --- a/yarn-project/cli-wallet/src/cmds/index.ts +++ b/yarn-project/cli-wallet/src/cmds/index.ts @@ -4,7 +4,7 @@ import { ETHEREUM_HOSTS, PRIVATE_KEY, addOptions, - createSecretKeyOption, + createSigningKeyOption, l1ChainIdOption, parseBigint, parseFieldFromHexString, @@ -24,7 +24,7 @@ import { ARTIFACT_DESCRIPTION, CLIFeeArgs, aliasedAddressParser, - aliasedSecretKeyParser, + aliasedSigningKeyParser, aliasedTxHashParser, artifactPathFromPromiseOrAlias, artifactPathParser, @@ -96,8 +96,8 @@ export function injectCommands( 'Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve.', ) .addOption( - createSecretKeyOption('Secret key for account. Uses random by default.', false, sk => - aliasedSecretKeyParser(sk, db), + createSigningKeyOption('Signing key for account. Uses random by default.', false, sk => + aliasedSigningKeyParser(sk, db), ).conflicts('public-key'), ) .addOption(createAliasOption('Alias for the account. Used for easy reference in subsequent commands.', !db)) @@ -124,7 +124,7 @@ export function injectCommands( const { type, from: parsedFromAddress, - secretKey, + signingKey, salt, wait, waitForStatus: waitForStatusStr, @@ -156,7 +156,7 @@ export function injectCommands( wallet, node, type, - secretKey, + signingKey, salt, publicKey, alias, @@ -174,8 +174,8 @@ export function injectCommands( log, ); if (db) { - const { address, alias, secretKey, salt } = accountCreationResult; - await db.storeAccount(address, { type, secretKey, salt, alias, publicKey }, log); + const { address, alias, signingKey, secretKey, salt } = accountCreationResult; + await db.storeAccount(address, { type, signingKey, secretKey, salt, alias, publicKey }, log); } }); @@ -399,7 +399,9 @@ export function injectCommands( .addOption(createContractAddressOption(db)) .addOption(createArtifactOption(db)) .addOption( - createSecretKeyOption("The sender's secret key", !db, sk => aliasedSecretKeyParser(sk, db)).conflicts('account'), + createSigningKeyOption("The sender's signing key", !db, sk => aliasedSigningKeyParser(sk, db)).conflicts( + 'account', + ), ) .addOption(createAuthwitnessOption('Authorization witness to use for the simulation', !db, db)) .addOption(createAccountOption('Alias or address of the account to simulate from', !db, db)) diff --git a/yarn-project/cli-wallet/src/storage/wallet_db.ts b/yarn-project/cli-wallet/src/storage/wallet_db.ts index fbb9b8eb70dd..e4e4af4a52c4 100644 --- a/yarn-project/cli-wallet/src/storage/wallet_db.ts +++ b/yarn-project/cli-wallet/src/storage/wallet_db.ts @@ -1,4 +1,5 @@ import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { LogFn } from '@aztec/foundation/log'; import type { AztecAsyncKVStore, AztecAsyncMap } from '@aztec/kv-store'; import type { AuthWitness } from '@aztec/stdlib/auth-witness'; @@ -88,13 +89,28 @@ export class WalletDB { address: AztecAddress, { type, + signingKey, secretKey, salt, alias, publicKey, - }: { type: AccountType; secretKey: Fr; salt: Fr; alias: string | undefined; publicKey: string | undefined }, + }: { + type: AccountType; + signingKey?: GrumpkinScalar; + secretKey?: Fr; + salt: Fr; + alias: string | undefined; + publicKey: string | undefined; + }, log: LogFn, ) { + // Even though the privacy secret key is sometimes derived from the signing key, we store it in the database + // regardless as that is not always the case. Local-key accounts also store their signing key, while external-key + // accounts such as SSH store only the privacy secret. + if (!secretKey) { + throw new Error('Cannot store account without a secret key'); + } + let publicSigningKey: Buffer | undefined; if (type === 'ecdsasecp256r1ssh' && publicKey) { publicSigningKey = extractECDSAPublicKeyFromBase64String(publicKey); @@ -106,6 +122,9 @@ export class WalletDB { } await this.#accounts.set(`${address.toString()}:type`, Buffer.from(type)); await this.#accounts.set(`${address.toString()}:sk`, secretKey.toBuffer()); + if (signingKey) { + await this.#accounts.set(`${address.toString()}:signing`, signingKey.toBuffer()); + } await this.#accounts.set(`${address.toString()}:salt`, salt.toBuffer()); if (publicSigningKey) { await this.#accounts.set(`${address.toString()}:publicSigningKey`, publicSigningKey); @@ -226,10 +245,13 @@ export class WalletDB { if (!secretKeyBuffer) { throw new Error(`Could not find ${address}:sk. Account "${address.toString}" does not exist on this wallet.`); } + const signingKeyBuffer = await this.#accounts.getAsync(`${address.toString()}:signing`); const secretKey = Fr.fromBuffer(secretKeyBuffer); + // External-key accounts (e.g. SSH) store no signing key. + const signingKey = signingKeyBuffer ? GrumpkinScalar.fromBuffer(signingKeyBuffer) : undefined; const salt = Fr.fromBuffer((await this.#accounts.getAsync(`${address.toString()}:salt`))!); const type = (await this.#accounts.getAsync(`${address.toString()}:type`))!.toString('utf8') as AccountType; - return { address, secretKey, salt, type }; + return { address, signingKey, secretKey, salt, type }; } async storeAlias(type: AliasType, key: string, value: Buffer, log: LogFn) { diff --git a/yarn-project/cli-wallet/src/utils/options/options.ts b/yarn-project/cli-wallet/src/utils/options/options.ts index 795234b93bd2..cf871daf9553 100644 --- a/yarn-project/cli-wallet/src/utils/options/options.ts +++ b/yarn-project/cli-wallet/src/utils/options/options.ts @@ -1,5 +1,5 @@ import { TxHash } from '@aztec/aztec.js/tx'; -import { parseAztecAddress, parseSecretKey, parseTxHash } from '@aztec/cli/utils'; +import { parseAztecAddress, parseSigningKey, parseTxHash } from '@aztec/cli/utils'; import { AuthWitness } from '@aztec/stdlib/auth-witness'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; @@ -64,13 +64,13 @@ export function aliasedAddressParser(defaultPrefix: AliasType, address: string, } } -export function aliasedSecretKeyParser(sk: string, db?: WalletDB) { +export function aliasedSigningKeyParser(sk: string, db?: WalletDB) { if (sk.startsWith('0x')) { - return parseSecretKey(sk); + return parseSigningKey(sk); } else { - const prefixed = `${sk.startsWith('accounts') ? '' : 'accounts'}:${sk.endsWith(':sk') ? sk : `${sk}:sk`}`; + const prefixed = `${sk.startsWith('accounts') ? '' : 'accounts'}:${sk.endsWith(':signing') ? sk : `${sk}:signing`}`; const rawSk = db ? db.tryRetrieveAlias(prefixed) : sk; - return parseSecretKey(rawSk); + return parseSigningKey(rawSk); } } diff --git a/yarn-project/cli-wallet/src/utils/wallet.ts b/yarn-project/cli-wallet/src/utils/wallet.ts index 865705f7038d..50515390478f 100644 --- a/yarn-project/cli-wallet/src/utils/wallet.ts +++ b/yarn-project/cli-wallet/src/utils/wallet.ts @@ -1,4 +1,8 @@ +<<<<<<< HEAD import { EcdsaRAccountContract, EcdsaRSSHAccountContract } from '@aztec/accounts/ecdsa'; +======= +import { EcdsaKAccountContract, EcdsaRAccountContract, EcdsaRSSHAccountContract } from '@aztec/accounts/ecdsa'; +>>>>>>> origin/v5-next import { StubEcdsaAccountContractArtifact, createStubEcdsaAccount } from '@aztec/accounts/ecdsa/stub'; import { SchnorrAccountContract, SchnorrInitializerlessAccountContract } from '@aztec/accounts/schnorr'; import { StubSchnorrAccountContractArtifact, createStubSchnorrAccount } from '@aztec/accounts/schnorr/stub'; @@ -15,6 +19,7 @@ import { TxSimulationResultWithAppOffset } from '@aztec/aztec.js/wallet'; import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account'; import { DefaultEntrypoint } from '@aztec/entrypoints/default'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import type { LogFn } from '@aztec/foundation/log'; import type { NotesFilter } from '@aztec/pxe/client/lazy'; import type { PXEConfig } from '@aztec/pxe/config'; @@ -23,7 +28,10 @@ import { createPXE, getPXEConfig } from '@aztec/pxe/server'; import { getStandardAuthRegistry } from '@aztec/standard-contracts/auth-registry'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import type { Gas, GasUsed } from '@aztec/stdlib/gas'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; +======= +>>>>>>> origin/v5-next import { NoteDao } from '@aztec/stdlib/note'; import type { SimulationOverrides, TxExecutionRequest, TxProvingResult } from '@aztec/stdlib/tx'; import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx'; @@ -145,7 +153,10 @@ export class CLIWallet extends BaseWallet { increasedFee: InteractionFeeOptions, ): Promise { const cancellationTxRequest = await this.createCancellationTxExecutionRequest(from, txNonce, increasedFee); - return await this.pxe.proveTx(cancellationTxRequest, { scopes: this.scopesFrom(from), senderForTags: from }); + return await this.pxe.proveTx(cancellationTxRequest, { + scopes: this.scopesFrom(from, [], undefined), + senderForTags: from, + }); } override async getAccountFromAddress(address: AztecAddress) { @@ -153,7 +164,7 @@ export class CLIWallet extends BaseWallet { if (this.accountCache.has(address.toString())) { return this.accountCache.get(address.toString())!; } else { - const accountManager = await this.createOrRetrieveAccount(address); + const accountManager = await this.retrieveAccount(address); account = await accountManager.getAccount(); } @@ -163,7 +174,93 @@ export class CLIWallet extends BaseWallet { return account; } - private async createAccount(secret: Fr, salt: Fr, contract: AccountContract): Promise { + /** + * Creates an account from freshly supplied keys. SSH accounts sign with a key held in the agent (resolved from + * `publicKey`), every other type is rooted on `signingKey`, with `secretKey` as its privacy secret. + */ + async createAccount( + type: AccountType, + signingKey: GrumpkinScalar | undefined, + secretKey: Fr | undefined, + salt: Fr = Fr.ZERO, + publicKey?: string, + ): Promise { + const publicSigningKey = + type === 'ecdsasecp256r1ssh' ? await this.resolveSshPublicSigningKey(publicKey) : undefined; + return this.buildAccount(type, salt, signingKey, secretKey, publicSigningKey); + } + + /** + * Retrieves a previously stored account by address, loading its keys, type and salt from the wallet database. + */ + async retrieveAccount(address: AztecAddress): Promise { + if (!this.db) { + throw new Error('Cannot retrieve an account without a wallet database'); + } + const { type, signingKey, secretKey, salt } = await this.db.retrieveAccount(address); + if (type !== 'ecdsasecp256r1ssh' && !signingKey) { + throw new Error( + `Account ${address} has no stored signing key: it was created with an older version of aztec-wallet and is ` + + `incompatible with this one. Create a new account to continue.`, + ); + } + const publicSigningKey = + type === 'ecdsasecp256r1ssh' ? await this.db.retrieveAccountMetadata(address, 'publicSigningKey') : undefined; + return this.buildAccount(type, salt, signingKey, secretKey, publicSigningKey); + } + + private async buildAccount( + type: AccountType, + salt: Fr, + signingKey: GrumpkinScalar | undefined, + secretKey: Fr | undefined, + publicSigningKey: Buffer | undefined, + ): Promise { + switch (type) { + case 'schnorr': + case 'schnorr_initializerless': + case 'ecdsasecp256r1': + case 'ecdsasecp256k1': { + if (!signingKey || !secretKey) { + throw new Error('Cannot build account without signing key and secret key'); + } + const contract = + type === 'schnorr' + ? new SchnorrAccountContract(signingKey) + : type === 'schnorr_initializerless' + ? new SchnorrInitializerlessAccountContract(signingKey) + : type === 'ecdsasecp256r1' + ? new EcdsaRAccountContract(signingKey.toBuffer()) + : new EcdsaKAccountContract(signingKey.toBuffer()); + return await this.materializeAccount(secretKey, salt, contract); + } + case 'ecdsasecp256r1ssh': { + if (!secretKey || !publicSigningKey) { + throw new Error('Cannot build SSH account without secret key and public signing key'); + } + return await this.materializeAccount(secretKey, salt, new EcdsaRSSHAccountContract(publicSigningKey)); + } + default: { + throw new Error(`Unsupported account type: ${type}`); + } + } + } + + private async resolveSshPublicSigningKey(publicKey: string | undefined): Promise { + if (!publicKey) { + throw new Error('Public key must be provided for ECDSA SSH account'); + } + const identities = await getIdentities(); + const foundIdentity = identities.find( + identity => identity.type === 'ecdsa-sha2-nistp256' && identity.publicKey === publicKey, + ); + if (!foundIdentity) { + throw new Error(`Identity for public key ${publicKey} not found in the SSH agent`); + } + return extractECDSAPublicKeyFromBase64String(foundIdentity.publicKey); + } + + private async materializeAccount(secret: Fr, salt: Fr, contract: AccountContract): Promise { const accountManager = await AccountManager.create(this, secret, contract, { salt }); const instance = accountManager.getInstance(); @@ -188,6 +285,7 @@ export class CLIWallet extends BaseWallet { return accountManager; } +<<<<<<< HEAD async createOrRetrieveAccount( address?: AztecAddress, secretKey?: Fr, @@ -255,6 +353,8 @@ export class CLIWallet extends BaseWallet { return account; } +======= +>>>>>>> origin/v5-next /** * Creates a stub account that impersonates the given address, allowing kernelless simulations * to bypass the account's authorization mechanisms via contract overrides. @@ -292,7 +392,7 @@ export class CLIWallet extends BaseWallet { opts: SimulateViaEntrypointOptions, ): Promise { const { from, feeOptions, additionalScopes, sendMessagesAs } = opts; - const scopes = this.scopesFrom(from, additionalScopes); + const scopes = this.scopesFrom(from, additionalScopes ?? [], sendMessagesAs); const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload(); const finalExecutionPayload = feeExecutionPayload ? mergeExecutionPayloads([feeExecutionPayload, executionPayload]) diff --git a/yarn-project/cli/src/cmds/validator_keys/index.ts b/yarn-project/cli/src/cmds/validator_keys/index.ts index 8588f40c55a7..0c6088a6cbf7 100644 --- a/yarn-project/cli/src/cmds/validator_keys/index.ts +++ b/yarn-project/cli/src/cmds/validator_keys/index.ts @@ -33,8 +33,10 @@ export function injectCommands(program: Command, log: LogFn) { 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress, ) - // TODO: add funding account back in when implemented - // .option('--funding-account ', 'ETH private key (or address for remote signer setup) to fund publishers') + .option( + '--funding-account ', + 'ETH funding account used to top up publisher EOAs. Provide a private key, or an address together with --remote-signer.', + ) .option('--remote-signer ', 'Default remote signer URL for accounts in this file') .option('--ikm ', 'Initial keying material for BLS (alternative to mnemonic)', value => parseHex(value, 32)) .option('--bls-path ', `EIP-2334 path (default ${defaultBlsPath})`) @@ -99,8 +101,6 @@ export function injectCommands(program: Command, log: LogFn) { 'Coinbase ETH address to use when proposing. Defaults to attester address.', parseEthereumAddress, ) - // TODO: add funding account back in when implemented - // .option('--funding-account ', 'ETH private key (or address for remote signer setup) to fund publishers') .option('--remote-signer ', 'Default remote signer URL for accounts in this file') .option('--ikm ', 'Initial keying material for BLS (alternative to mnemonic)', value => parseHex(value, 32)) .option('--bls-path ', `EIP-2334 path (default ${defaultBlsPath})`) @@ -117,6 +117,32 @@ export function injectCommands(program: Command, log: LogFn) { await addValidatorKeys(existing, options, log); }); + group + .command('set-funding-account') + .summary('Set the funding account of an existing keystore') + .description( + 'Sets the keystore-level ETH funding account used to top up publisher EOAs, replacing any existing one', + ) + .argument('', 'Path to existing keystore JSON') + .argument( + '', + 'Funding account: a private key, or an address (needs --remote-signer unless the keystore already defines one)', + ) + .option( + '--remote-signer ', + 'Remote signer URL for the funding account (required with an address unless the keystore already defines one)', + ) + .option( + '--password ', + 'Password for writing the funding key as an encrypted ETH JSON V3 file. Empty string allowed', + ) + .option('--encrypted-keystore-dir ', 'Output directory for the encrypted funding key file') + .option('--json', 'Echo resulting JSON to stdout') + .action(async (existing: string, fundingAccount: string, options) => { + const { setFundingAccount } = await import('./set_funding_account.js'); + await setFundingAccount(existing, fundingAccount, options, log); + }); + group .command('staker') .summary('Generate staking JSON from keystore') diff --git a/yarn-project/cli/src/cmds/validator_keys/new.ts b/yarn-project/cli/src/cmds/validator_keys/new.ts index 208ebc7a8748..ef780d37cbfa 100644 --- a/yarn-project/cli/src/cmds/validator_keys/new.ts +++ b/yarn-project/cli/src/cmds/validator_keys/new.ts @@ -9,12 +9,14 @@ import { wordlist } from '@scure/bip39/wordlists/english.js'; import { readFile, writeFile } from 'fs/promises'; import { basename, dirname, join } from 'path'; import { createPublicClient, fallback, http } from 'viem'; -import { generateMnemonic, mnemonicToAccount } from 'viem/accounts'; +import { generateMnemonic, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; import { buildValidatorEntries, + encryptFundingAccountToFile, logValidatorSummaries, maybePrintJson, + resolveFundingAccount, resolveKeystoreOutputPath, writeBlsBn254ToFile, writeEthJsonV3ToFile, @@ -23,6 +25,7 @@ import { import { processAttesterAccounts } from './staker.js'; import { validateBlsPathOptions, + validateFundingAccountOptions, validatePublisherOptions, validateRemoteSignerOptions, validateStakerOutputOptions, @@ -51,6 +54,7 @@ export type NewValidatorKeystoreOptions = { json?: boolean; feeRecipient: AztecAddress; coinbase?: EthAddress; + fundingAccount?: string; remoteSigner?: string; stakerOutput?: boolean; gseAddress?: EthAddress; @@ -147,6 +151,8 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions, validatePublisherOptions(options); // validate remote signer options validateRemoteSignerOptions(options); + // validate funding account option + validateFundingAccountOptions(options); const { dataDir, @@ -156,6 +162,7 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions, publishers, json, coinbase, + fundingAccount, accountIndex = 0, addressIndex = 0, feeRecipient, @@ -213,17 +220,29 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions, remoteSigner, }); + let resolvedFundingAccount = fundingAccount ? resolveFundingAccount(fundingAccount, remoteSigner) : undefined; + // If password provided, write ETH JSON V3 and BLS BN254 keystores and replace plaintext if (shouldEncryptKeystores) { const encryptedKeystoreOutDir = encryptedKeystoreDir && encryptedKeystoreDir.length > 0 ? encryptedKeystoreDir : keystoreOutDir; await writeEthJsonV3ToFile(validators, { outDir: encryptedKeystoreOutDir, password: ethPassword }); await writeBlsBn254ToFile(validators, { outDir: encryptedKeystoreOutDir, password: blsPassword }); +<<<<<<< HEAD +======= + if (resolvedFundingAccount) { + resolvedFundingAccount = await encryptFundingAccountToFile(resolvedFundingAccount, { + outDir: encryptedKeystoreOutDir, + password: ethPassword, + }); + } +>>>>>>> origin/v5-next } const keystore = { schemaVersion: 1, validators, + ...(resolvedFundingAccount ? { fundingAccount: resolvedFundingAccount } : {}), }; await writeKeystoreFile(outputPath, keystore); @@ -285,6 +304,11 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions, // print a concise summary of public keys (addresses and BLS pubkeys) if no --json options was selected if (!json) { logValidatorSummaries(log, summaries); + if (fundingAccount) { + const funderAddress = + fundingAccount.length === 66 ? privateKeyToAccount(fundingAccount as `0x${string}`).address : fundingAccount; + log(`funding account: ${funderAddress}`); + } } if (mnemonic && remoteSigner && !json) { diff --git a/yarn-project/cli/src/cmds/validator_keys/set_funding_account.ts b/yarn-project/cli/src/cmds/validator_keys/set_funding_account.ts new file mode 100644 index 000000000000..21258abb56b1 --- /dev/null +++ b/yarn-project/cli/src/cmds/validator_keys/set_funding_account.ts @@ -0,0 +1,55 @@ +import type { LogFn } from '@aztec/foundation/log'; +import { loadKeystoreFile } from '@aztec/node-keystore/loader'; +import type { KeyStore } from '@aztec/node-keystore/types'; + +import { dirname } from 'path'; +import { privateKeyToAccount } from 'viem/accounts'; + +import { encryptFundingAccountToFile, maybePrintJson, resolveFundingAccount, writeKeystoreFile } from './shared.js'; +import { validateFundingAccountOptions } from './utils.js'; + +export type SetFundingAccountOptions = { + remoteSigner?: string; + password?: string; + encryptedKeystoreDir?: string; + json?: boolean; +}; + +/** + * Sets the top-level funding account of an existing keystore, replacing any previous one. The + * account may be a private key, or an address paired with a remote signer URL. With a password, + * a plaintext key is encrypted to an ETH JSON V3 file and stored as a { path, password } reference. + */ +export async function setFundingAccount( + existing: string, + fundingAccount: string, + options: SetFundingAccountOptions, + log: LogFn, +) { + const { remoteSigner, password, encryptedKeystoreDir, json } = options; + + const keystore: KeyStore = loadKeystoreFile(existing); + + const validated = { fundingAccount, remoteSigner }; + validateFundingAccountOptions(validated, !!keystore.remoteSigner); + + let resolved = resolveFundingAccount(validated.fundingAccount!, remoteSigner); + if (password !== undefined) { + const outDir = encryptedKeystoreDir && encryptedKeystoreDir.length > 0 ? encryptedKeystoreDir : dirname(existing); + resolved = await encryptFundingAccountToFile(resolved, { outDir, password }); + } + + if (keystore.fundingAccount) { + log('Replacing existing funding account in keystore'); + } + keystore.fundingAccount = resolved; + + await writeKeystoreFile(existing, keystore); + + if (!json) { + const value = validated.fundingAccount!; + const funderAddress = value.length === 66 ? privateKeyToAccount(value as `0x${string}`).address : value; + log(`Set funding account ${funderAddress} in ${existing}`); + } + maybePrintJson(log, !!json, keystore as unknown as Record); +} diff --git a/yarn-project/cli/src/cmds/validator_keys/shared.ts b/yarn-project/cli/src/cmds/validator_keys/shared.ts index 981acc155e1b..64d162454505 100644 --- a/yarn-project/cli/src/cmds/validator_keys/shared.ts +++ b/yarn-project/cli/src/cmds/validator_keys/shared.ts @@ -3,7 +3,7 @@ import { asyncPool } from '@aztec/foundation/async-pool'; import { deriveBlsPrivateKey } from '@aztec/foundation/crypto/bls'; import { createBn254Keystore } from '@aztec/foundation/crypto/bls/bn254_keystore'; import { computeBn254G1PublicKeyCompressed } from '@aztec/foundation/crypto/bn254'; -import type { EthAddress } from '@aztec/foundation/eth-address'; +import { EthAddress } from '@aztec/foundation/eth-address'; import type { LogFn } from '@aztec/foundation/log'; import type { EthAccount, EthPrivateKey, ValidatorKeyStore } from '@aztec/node-keystore/types'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; @@ -125,6 +125,21 @@ export function deriveEthAttester( : (('0x' + Buffer.from(acct.getHdKey().privateKey!).toString('hex')) as EthPrivateKey); } +/** + * Resolve a `--funding-account` value into a keystore `EthAccount`. A 66-char value is a private key + * (used verbatim). A 42-char value is an address: with an explicit `remoteSigner` URL it becomes an + * `{ address, remoteSignerUrl }` pair; without one it is stored as a bare address that falls back to + * the keystore-level remote signer at runtime. Callers must validate the value first (see + * `validateFundingAccountOptions`). + */ +export function resolveFundingAccount(fundingAccount: string, remoteSigner?: string): EthAccount { + if (fundingAccount.length === 66) { + return fundingAccount as EthPrivateKey; + } + const address = EthAddress.fromString(fundingAccount); + return remoteSigner ? ({ address, remoteSignerUrl: remoteSigner } as EthAccount) : address; +} + export async function buildValidatorEntries(input: BuildValidatorsInput) { const { validatorCount, @@ -330,6 +345,27 @@ export async function writeEthJsonV3Keystore( return outPath; } +/** + * If `account` is a plaintext ETH private key, encrypt it to a JSON V3 file and return a + * { path, password } reference; otherwise return it unchanged. + */ +async function maybeEncryptEthAccount(account: any, label: string, options: { outDir: string; password: string }) { + if (typeof account === 'string' && account.startsWith('0x') && account.length === 66) { + const fileBase = `${label}_${account.slice(2, 10)}`; + const p = await writeEthJsonV3Keystore(options.outDir, fileBase, options.password, account); + return { path: p, password: options.password }; + } + return account; +} + +/** Encrypt a plaintext funding-account key to a JSON V3 file, replacing it with a { path, password } reference. */ +export async function encryptFundingAccountToFile( + account: EthAccount, + options: { outDir: string; password: string }, +): Promise { + return (await maybeEncryptEthAccount(account, 'funding', options)) as EthAccount; +} + /** Replace plaintext ETH keys in validators with { path, password } pointing to JSON V3 files. */ export async function writeEthJsonV3ToFile( validators: ValidatorKeyStore[], diff --git a/yarn-project/cli/src/cmds/validator_keys/utils.ts b/yarn-project/cli/src/cmds/validator_keys/utils.ts index 8b8dca71f191..1e83594f9b6a 100644 --- a/yarn-project/cli/src/cmds/validator_keys/utils.ts +++ b/yarn-project/cli/src/cmds/validator_keys/utils.ts @@ -1,4 +1,4 @@ -import type { EthAddress } from '@aztec/foundation/eth-address'; +import { EthAddress } from '@aztec/foundation/eth-address'; import { ethPrivateKeySchema } from '@aztec/node-keystore/schemas'; import type { EthPrivateKey } from '@aztec/node-keystore/types'; @@ -79,3 +79,46 @@ export function validatePublisherOptions(options: { publishers?: string[]; publi options.publishers = normalizedKeys as EthPrivateKey[]; } } + +/** + * Validates and normalizes the `--funding-account` option in place. The value may be a private key + * (used as a local signer) or an ETH address. An address needs a remote signer to sign funding txs: + * either `--remote-signer`, or a keystore that already defines one (pass `hasKeystoreRemoteSigner`), + * which a bare address inherits at runtime. + */ +export function validateFundingAccountOptions( + options: { fundingAccount?: string; remoteSigner?: string }, + hasKeystoreRemoteSigner = false, +) { + if (!options.fundingAccount) { + return; + } + + let value = options.fundingAccount.trim(); + if (!value.startsWith('0x')) { + value = '0x' + value; + } + + if (value.length === 66) { + try { + ethPrivateKeySchema.parse(value); + } catch (error) { + throw new Error(`Invalid funding account private key: ${error instanceof Error ? error.message : String(error)}`); + } + } else if (value.length === 42) { + try { + EthAddress.fromString(value); + } catch (error) { + throw new Error(`Invalid funding account address: ${error instanceof Error ? error.message : String(error)}`); + } + if (!options.remoteSigner && !hasKeystoreRemoteSigner) { + throw new Error( + '--funding-account as an address requires --remote-signer, or a keystore that already defines a remote signer', + ); + } + } else { + throw new Error('Invalid funding account: expected a 32-byte private key or a 20-byte address'); + } + + options.fundingAccount = value; +} diff --git a/yarn-project/cli/src/cmds/validator_keys/valkeys.test.ts b/yarn-project/cli/src/cmds/validator_keys/valkeys.test.ts index 24abb2c06169..e647115f7597 100644 --- a/yarn-project/cli/src/cmds/validator_keys/valkeys.test.ts +++ b/yarn-project/cli/src/cmds/validator_keys/valkeys.test.ts @@ -13,6 +13,7 @@ import { mnemonicToAccount } from 'viem/accounts'; import { addValidatorKeys } from './add.js'; import { generateBlsKeypair } from './generate_bls_keypair.js'; import { newValidatorKeystore } from './new.js'; +import { setFundingAccount } from './set_funding_account.js'; import { buildValidatorEntries, computeBlsPublicKeyCompressed, @@ -24,7 +25,7 @@ import { writeEthJsonV3ToFile, writeKeystoreFile, } from './shared.js'; -import { validatePublisherOptions } from './utils.js'; +import { validateFundingAccountOptions, validatePublisherOptions } from './utils.js'; const TEST_MNEMONIC = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'; @@ -402,6 +403,44 @@ describe('validator keys utilities', () => { }); }); + describe('validateFundingAccountOptions', () => { + const validPrivateKey = '0x' + '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'; + const validAddress = '0x' + '01'.repeat(20); + + it('accepts a private key and leaves it normalized', () => { + const options = { fundingAccount: validPrivateKey }; + expect(() => validateFundingAccountOptions(options)).not.toThrow(); + expect(options.fundingAccount).toBe(validPrivateKey); + }); + + it('adds a missing 0x prefix', () => { + const options = { fundingAccount: validPrivateKey.slice(2) }; + expect(() => validateFundingAccountOptions(options)).not.toThrow(); + expect(options.fundingAccount).toBe(validPrivateKey); + }); + + it('accepts an address when a remote signer is set', () => { + const options = { fundingAccount: validAddress, remoteSigner: 'http://localhost:9000' }; + expect(() => validateFundingAccountOptions(options)).not.toThrow(); + expect(options.fundingAccount).toBe(validAddress); + }); + + it('throws for an address without a remote signer', () => { + const options = { fundingAccount: validAddress }; + expect(() => validateFundingAccountOptions(options)).toThrow(/requires --remote-signer/); + }); + + it('throws for a malformed value', () => { + const options = { fundingAccount: '0x1234' }; + expect(() => validateFundingAccountOptions(options)).toThrow(/Invalid funding account/); + }); + + it('is a no-op when unset', () => { + const options = {}; + expect(() => validateFundingAccountOptions(options)).not.toThrow(); + }); + }); + describe('newValidatorKeystore', () => { it('creates a keystore file and logs a summary', async () => { const path = join(tmp, 'created.json'); @@ -946,6 +985,99 @@ describe('validator keys utilities', () => { expect(Array.isArray(validator.publisher)).toBe(true); expect(validator.publisher).toEqual([publisherKey1, publisherKey2]); }); + + it('writes a top-level funding account from a private key', async () => { + const path = join(tmp, 'with-funding-key.json'); + const fundingKey = '0x' + 'ab'.repeat(32); + await newValidatorKeystore( + { + dataDir: tmp, + file: 'with-funding-key.json', + count: 1, + mnemonic: TEST_MNEMONIC, + fundingAccount: fundingKey, + feeRecipient: ('0x' + '11'.repeat(32)) as unknown as AztecAddress, + }, + s => s, + ); + const keystore: KeyStore = loadKeystoreFile(path); + expect(keystore.fundingAccount).toBe(fundingKey); + }); + + it('writes a remote-signer funding account from an address', async () => { + const path = join(tmp, 'with-funding-address.json'); + const fundingAddress = '0x' + '02'.repeat(20); + const remoteSigner = 'http://localhost:9000'; + await newValidatorKeystore( + { + dataDir: tmp, + file: 'with-funding-address.json', + count: 1, + mnemonic: TEST_MNEMONIC, + fundingAccount: fundingAddress, + remoteSigner, + feeRecipient: ('0x' + '12'.repeat(32)) as unknown as AztecAddress, + }, + s => s, + ); + const keystore: KeyStore = loadKeystoreFile(path); + const funder = keystore.fundingAccount as any; + expect(funder.remoteSignerUrl).toBe(remoteSigner); + expect(funder.address.toString().toLowerCase()).toBe(fundingAddress); + }); + + it('rejects a funding-account address without a remote signer', async () => { + await expect( + newValidatorKeystore( + { + dataDir: tmp, + file: 'funding-address-no-signer.json', + count: 1, + mnemonic: TEST_MNEMONIC, + fundingAccount: '0x' + '03'.repeat(20), + feeRecipient: ('0x' + '13'.repeat(32)) as unknown as AztecAddress, + }, + s => s, + ), + ).rejects.toThrow(/requires --remote-signer/); + }); + + it('rejects a malformed funding account', async () => { + await expect( + newValidatorKeystore( + { + dataDir: tmp, + file: 'funding-malformed.json', + count: 1, + mnemonic: TEST_MNEMONIC, + fundingAccount: '0xdead', + feeRecipient: ('0x' + '14'.repeat(32)) as unknown as AztecAddress, + }, + s => s, + ), + ).rejects.toThrow(/Invalid funding account/); + }); + + it('encrypts a plaintext funding account when a password is provided', async () => { + const path = join(tmp, 'with-funding-encrypted.json'); + await newValidatorKeystore( + { + dataDir: tmp, + file: 'with-funding-encrypted.json', + count: 1, + mnemonic: TEST_MNEMONIC, + fundingAccount: '0x' + 'cd'.repeat(32), + password: 'funding-test-pw', + encryptedKeystoreDir: tmp, + feeRecipient: ('0x' + '15'.repeat(32)) as unknown as AztecAddress, + }, + s => s, + ); + const keystore: KeyStore = loadKeystoreFile(path); + const funder = keystore.fundingAccount as any; + expect(typeof funder.path).toBe('string'); + expect(existsSync(funder.path)).toBe(true); + }); }); describe('materialization helpers (invoked directly)', () => { @@ -1021,6 +1153,100 @@ describe('validator keys utilities', () => { }); }); + describe('setFundingAccount', () => { + const writeBaseKeystore = (path: string, extra: Record = {}) => { + const baseKeystore = { + schemaVersion: 1, + validators: [{ attester: '0x' + '0a'.repeat(32), feeRecipient: ('0x' + '06'.repeat(32)) as unknown as string }], + ...extra, + }; + writeFileSync(path, JSON.stringify(baseKeystore, null, 2), 'utf-8'); + }; + + it('sets a funding account on a keystore that has none', async () => { + const existing = join(tmp, 'set-funding.json'); + writeBaseKeystore(existing); + const fundingKey = '0x' + 'ab'.repeat(32); + + const logs: string[] = []; + await setFundingAccount(existing, fundingKey, {}, s => logs.push(s)); + + const updated: KeyStore = loadKeystoreFile(existing); + expect(updated.fundingAccount).toBe(fundingKey); + expect(logs.some(l => l.includes('Replacing existing funding account'))).toBe(false); + expect(logs.some(l => l.includes('Set funding account'))).toBe(true); + }); + + it('replaces an existing funding account and warns', async () => { + const existing = join(tmp, 'replace-funding.json'); + writeBaseKeystore(existing, { fundingAccount: '0x' + 'aa'.repeat(32) }); + const newFundingKey = '0x' + 'bb'.repeat(32); + + const logs: string[] = []; + await setFundingAccount(existing, newFundingKey, {}, s => logs.push(s)); + + const updated: KeyStore = loadKeystoreFile(existing); + expect(updated.fundingAccount).toBe(newFundingKey); + expect(logs.some(l => l.includes('Replacing existing funding account'))).toBe(true); + }); + + it('sets a remote-signer funding account from an address', async () => { + const existing = join(tmp, 'set-funding-address.json'); + writeBaseKeystore(existing); + const fundingAddress = '0x' + '02'.repeat(20); + const remoteSigner = 'http://localhost:9000'; + + await setFundingAccount(existing, fundingAddress, { remoteSigner }, s => s); + + const updated: KeyStore = loadKeystoreFile(existing); + const funder = updated.fundingAccount as any; + expect(funder.remoteSignerUrl).toBe(remoteSigner); + expect(funder.address.toString().toLowerCase()).toBe(fundingAddress); + }); + + it('inherits the keystore remote signer for an address when --remote-signer is omitted', async () => { + const existing = join(tmp, 'set-funding-inherit-signer.json'); + writeBaseKeystore(existing, { remoteSigner: 'http://localhost:9000' }); + const fundingAddress = '0x' + '02'.repeat(20); + + await setFundingAccount(existing, fundingAddress, {}, s => s); + + const updated: KeyStore = loadKeystoreFile(existing); + // Stored as a bare address (no inline remoteSignerUrl); resolved via the keystore-level signer at runtime. + const funder = updated.fundingAccount as any; + expect(funder.remoteSignerUrl).toBeUndefined(); + expect(funder.toString().toLowerCase()).toBe(fundingAddress); + }); + + it('rejects an address without a remote signer', async () => { + const existing = join(tmp, 'set-funding-no-signer.json'); + writeBaseKeystore(existing); + + await expect(setFundingAccount(existing, '0x' + '03'.repeat(20), {}, s => s)).rejects.toThrow( + /requires --remote-signer/, + ); + }); + + it('rejects a malformed funding account', async () => { + const existing = join(tmp, 'set-funding-malformed.json'); + writeBaseKeystore(existing); + + await expect(setFundingAccount(existing, '0xdead', {}, s => s)).rejects.toThrow(/Invalid funding account/); + }); + + it('encrypts a plaintext funding key when a password is provided', async () => { + const existing = join(tmp, 'set-funding-encrypted.json'); + writeBaseKeystore(existing); + + await setFundingAccount(existing, '0x' + 'cd'.repeat(32), { password: '', encryptedKeystoreDir: tmp }, s => s); + + const updated: KeyStore = loadKeystoreFile(existing); + const funder = updated.fundingAccount as any; + expect(typeof funder.path).toBe('string'); + expect(existsSync(funder.path)).toBe(true); + }); + }); + describe('generateBlsKeypair', () => { it('writes to file and logs a write message when out is provided', async () => { const out = join(tmp, 'bls.json'); diff --git a/yarn-project/cli/src/utils/aztec.ts b/yarn-project/cli/src/utils/aztec.ts index 89502f5c47a4..4f157d08ae04 100644 --- a/yarn-project/cli/src/utils/aztec.ts +++ b/yarn-project/cli/src/utils/aztec.ts @@ -3,7 +3,7 @@ import { type FunctionAbi, FunctionType, getAllFunctionAbis, - loadContractArtifact, + loadContractArtifactWithValidation, } from '@aztec/aztec.js/abi'; import { EthAddress } from '@aztec/aztec.js/addresses'; import type { L1ContractsConfig } from '@aztec/ethereum/config'; @@ -132,7 +132,7 @@ export async function getContractArtifact(fileDir: string, log: LogFn) { } try { - return loadContractArtifact(JSON.parse(contents)); + return loadContractArtifactWithValidation(JSON.parse(contents)); } catch (err) { log('Invalid file used. Please try again.'); throw err; diff --git a/yarn-project/cli/src/utils/commands.ts b/yarn-project/cli/src/utils/commands.ts index f4c35cc816a3..9677e2995cff 100644 --- a/yarn-project/cli/src/utils/commands.ts +++ b/yarn-project/cli/src/utils/commands.ts @@ -1,4 +1,5 @@ import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { EthAddress } from '@aztec/foundation/eth-address'; import type { LogFn } from '@aztec/foundation/log'; import type { PXE } from '@aztec/pxe/server'; @@ -50,14 +51,14 @@ export const l1ChainIdOption = new Option('-c, --l1-chain-id ', 'Chain I return parsedValue; }); -export const createSecretKeyOption = ( +export const createSigningKeyOption = ( description: string, mandatory: boolean, - argsParser?: (value: string, previous: Fr) => Fr, + argsParser?: (value: string, previous: GrumpkinScalar) => GrumpkinScalar, ) => - new Option('-sk, --secret-key ', description) - .env('SECRET_KEY') - .argParser(argsParser ?? parseSecretKey) + new Option('-sk, --signing-key ', description) + .env('SIGNING_KEY') + .argParser(argsParser ?? parseSigningKey) .makeOptionMandatory(mandatory); export const logJson = (log: LogFn) => (obj: object) => log(JSON.stringify(obj, null, 2)); @@ -357,16 +358,16 @@ export function parsePartialAddress(address: string): Fr { } /** - * Parses a secret key from a string. - * @param privateKey - A string - * @returns A secret key + * Parses an account signing key from a string. + * @param signingKey - A string + * @returns A signing key * @throws InvalidArgumentError if the input string is not valid. */ -export function parseSecretKey(secretKey: string): Fr { +export function parseSigningKey(signingKey: string): GrumpkinScalar { try { - return Fr.fromHexString(secretKey); + return GrumpkinScalar.fromHexString(signingKey); } catch { - throw new InvalidArgumentError(`Invalid encryption secret key: ${secretKey}`); + throw new InvalidArgumentError(`Invalid signing key: ${signingKey}`); } } diff --git a/yarn-project/constants/src/constants.gen.ts b/yarn-project/constants/src/constants.gen.ts index 8c37ccff3c20..2c12b8553580 100644 --- a/yarn-project/constants/src/constants.gen.ts +++ b/yarn-project/constants/src/constants.gen.ts @@ -254,10 +254,16 @@ export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 480; export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 480; export const CHONK_HIDING_OINK_LENGTH = 48; export const CHONK_MERGE_PROOF_SIZE = 41; +<<<<<<< HEAD export const CHONK_ECCVM_PROOF_LENGTH = 556; export const CHONK_TRIPLE_IPA_PROOF_LENGTH = 70; export const CHONK_JOINT_PROOF_LENGTH = 478; export const CHONK_PROOF_LENGTH = 1221; +======= +export const CHONK_ECCVM_PROOF_LENGTH = 612; +export const CHONK_JOINT_PROOF_LENGTH = 477; +export const CHONK_PROOF_LENGTH = 1270; +>>>>>>> origin/v5-next export const ULTRA_VK_LENGTH_IN_FIELDS = 115; export const MEGA_APP_VK_LENGTH_IN_FIELDS = 151; export const MEGA_KERNEL_VK_LENGTH_IN_FIELDS = 151; @@ -537,6 +543,10 @@ export enum DomainSeparator { CONSTRAINED_MSG_SENDER_SECRET = 1182889476, NON_INTERACTIVE_HANDSHAKE_LOG_TAG = 4046403018, INTERACTIVE_HANDSHAKE_SIGNATURE = 3098455647, +<<<<<<< HEAD +======= + HANDSHAKE_FORGERY_PROTECTION = 2291983127, +>>>>>>> origin/v5-next PRIVATE_LOG_FIRST_FIELD = 2769976252, PUBLIC_LEAF_SLOT = 1247650290, PUBLIC_STORAGE_MAP_SLOT = 4015149901, diff --git a/yarn-project/end-to-end/README.md b/yarn-project/end-to-end/README.md index 085fac046e10..89444f2e10cf 100644 --- a/yarn-project/end-to-end/README.md +++ b/yarn-project/end-to-end/README.md @@ -14,12 +14,17 @@ Run a single test (spawns its own in-process anvil): ```bash yarn test:e2e src/automine/token/access_control.parallel.test.ts +<<<<<<< HEAD yarn test:e2e src/single-node/block-building/block_building.test.ts -t 'rejects double spend' +======= +yarn test:e2e src/single-node/block-building/block_building.test.ts -t 'rejects a private then private double-spend' +>>>>>>> origin/v5-next ``` Turn up logging with `LOG_LEVEL` (`verbose` is the useful default; `debug:sequencer,archiver` scopes it): ```bash +<<<<<<< HEAD LOG_LEVEL=verbose yarn test:e2e src/single-node/proving/empty_blocks.test.ts ``` @@ -44,6 +49,38 @@ A handful of tests live **outside** this package, next to the code they test — [Tests that live elsewhere](#tests-that-live-elsewhere). Other non-category test groups (`composed/`, `guides/`, `bench/`) are described in the reference section. +======= +LOG_LEVEL=verbose yarn test:e2e src/single-node/proving/default_node.test.ts +``` + +Each run spawns anvil on port 8545, so two tests can only run side by side if each gets its own +`ANVIL_PORT` (p2p tests additionally bind fixed p2p ports and can never run concurrently — see +[`src/p2p/README.md`](src/p2p/README.md)). To shake flakiness out of a test, +`scripts/deflaker.sh yarn test:e2e ` reruns it up to 100 times and stops at the first failure +(output lands in `scripts/deflaker.log`). + +Compose-based tests (those under `src/composed/`) need a running local network — see +[Compose / HA / web3signer tests](#compose--ha--web3signer-tests). + +## Test categories + +Tests are grouped by **node topology** — the shape of the network a test needs. The top-level folder is +the category; the second level names the behavior under test. Each category owns a base class that builds +its environment, so a test file only describes the scenario, not the wiring. + +| Category | Topology | A test belongs here when… | README | +|---|---|---|---| +| [`automine/`](src/automine/README.md) | One node, deterministic `AutomineSequencer` — one block per tx, no committee/prover/validator. Fast. | it exercises contract or protocol behavior that doesn't depend on real block-building or consensus (transfers, nested calls, note discovery, tx semantics). | yes | +| [`single-node/`](src/single-node/README.md) | One node, production sequencer (interval block production), optional prover. | it asserts on sequencer, proving, partial-proof, L1-reorg, recovery, fee, or cross-chain behavior on a single sequencer. | yes | +| [`multi-node/`](src/multi-node/README.md) | N validators on an in-memory mock-gossip bus. | it needs a committee: consensus, attestations, slashing, governance, or multi-validator block production. | yes | +| [`p2p/`](src/p2p/README.md) | Real libp2p transport between nodes. | the networking transport itself is under test (gossip, rediscovery, req/resp). | yes | +| [`infra/`](src/infra/README.md) | Targets a deployed/external network (local anvil or a public testnet). | its concern is deployment or network targeting, not a specific protocol behavior. | yes | + +A handful of tests live **outside** this package, next to the code they test — see +[Tests that live elsewhere](#tests-that-live-elsewhere). Other non-category test groups (`composed/`, +`guides/`, `bench/`) are described in the reference section. + +>>>>>>> origin/v5-next ## Where does my test go? 1. **Does it need real networking transport?** → `p2p/`. @@ -78,7 +115,11 @@ Each category centralizes its environment in a base class. The hierarchy: (both wrap `fixtures/setup.ts:setup()`), but fixes the automine topology and makes `AUTOMINE_E2E_OPTS` the default. Exposes `markProvenAndWarp`, `registerContract`, `applyManualParentChild`. - `p2p/p2p_network.ts` → **`P2PNetworkTest`**. Real libp2p; node creation goes through +<<<<<<< HEAD `setup_p2p_test.ts`. +======= + `fixtures/setup_p2p_test.ts`. +>>>>>>> origin/v5-next - `infra/` has no shared base — its tests target a network selected by `L1_CHAIN_ID` (local anvil in CI, a public testnet with credentials). @@ -91,8 +132,13 @@ Categories expose thin factories over their base's static `setup`, named by what calls the factory instead of spreading option presets: - `single-node/setup.ts`: `setupWithProver` (fake in-process prover — the single-node default) and +<<<<<<< HEAD `setupBlockProducer` (no prover; raises `aztecProofSubmissionEpochs` to `1024` so unproven blocks aren't pruned, and points the PXE at `syncChainTip: 'proposed'`). +======= + `setupBlockProducer` (no prover; raises `aztecProofSubmissionEpochs` to `NO_REORG_SUBMISSION_EPOCHS` + (1024) so unproven blocks aren't pruned, and points the PXE at `syncChainTip: 'proposed'`). +>>>>>>> origin/v5-next - `automine` tests call `AutomineTestContext.setup({ numberOfAccounts })` directly. ### The harness pattern (domain setup on top of a category) @@ -136,6 +182,7 @@ CI splits each `it` in a `.parallel.test.ts` file into its own docker job, runni ### CI test discovery — `bootstrap.sh` +<<<<<<< HEAD `end-to-end/bootstrap.sh` enumerates tests in two arrays, and a test must appear in the relevant one or it **won't run in CI**: @@ -145,6 +192,22 @@ CI splits each `it` in a `.parallel.test.ts` file into its own docker job, runni Each leaf folder needs its own single-level glob line (e.g. `src/automine/token/*.test.ts`) in each array; globs are not recursive, so every sub-folder is listed explicitly. Folders that organize by behavior get one line per leaf. Bespoke handling to be aware of: +======= +`end-to-end/bootstrap.sh` enumerates tests in two arrays, and a test must resolve through the relevant one +or it **won't run in CI**: + +- `test_cmds` — the standard run. Covers each category with a recursive glob (e.g. + `src/automine/!(simulation)/**/*.test.ts`, `src/multi-node/**/*.test.ts`), so a new file or sub-folder + inside an existing category is picked up automatically; only a new top-level category needs its own glob + line. Tests with bespoke handling sit outside the globs: the `single-node/prover/` lanes at the top of + the function (real proofs and custom resources under `CI_FULL`, `FAKE_PROOFS=1` otherwise) and + `avm_simulator` (below). +- `compat_test_cmds` — the forward/legacy-compat run (a subset). This one enumerates **single-level leaf + globs** (e.g. `src/automine/token/*.test.ts`), so a new sub-folder whose tests should run against legacy + contract artifacts needs its own line here. + +Bespoke handling to be aware of: +>>>>>>> origin/v5-next - **`avm_simulator`** (`automine/simulation/avm_simulator.test.ts`) has a dedicated line in `test_cmds` that sets `DUMP_AVM_INPUTS_TO_DIR` (feeds the downstream `avm_check_circuit` job) and is therefore @@ -153,8 +216,13 @@ one line per leaf. Bespoke handling to be aware of: - **`kernelless_simulation`** is excluded from `compat_test_cmds` only. After editing the arrays, confirm every `*.test.ts` resolves through exactly one line (no duplicate, no +<<<<<<< HEAD omission). Per-test bash `TIMEOUT` overrides live in the `case` block in `test_cmds` and must stay in sync with the test's `jest.setTimeout`. +======= +omission — anything excluded via `!(...)` must be matched by its dedicated line). Per-test bash `TIMEOUT` +overrides live in the `case` block in `test_cmds` and must stay in sync with the test's `jest.setTimeout`. +>>>>>>> origin/v5-next ### Flaky tests — `.test_patterns.yml` @@ -190,11 +258,20 @@ These run in their own package's test lane (both packages already run anvil-back ### Support directories (not test categories) +<<<<<<< HEAD - `fixtures/` — the shared `setup()`, option presets (`fixtures.ts`), `CrossChainTestHarness`, `l1_to_l2_messaging`, and common utils. - `shared/` — shared test bodies and `timing_env.mjs`, a **custom jest `testEnvironment`** referenced from this package's `package.json`. `yarn prepare` / the package-json check will try to revert it to the default — don't let it. +======= +- `fixtures/` — the shared `setup()`, option presets (`fixtures.ts`), the named node-level waiters + (`wait_helpers.ts`), the span instrumentation (`timing.ts` — `testSpan`, zero-cost unless + `TEST_TIMING_FILE` is set), `l1_to_l2_messaging`, and common utils. +- `shared/` — shared test bodies, the `CrossChainTestHarness`, and `timing_env.mjs`, a **custom jest + `testEnvironment`** referenced from this package's `package.json`. `yarn prepare` / the package-json + check will try to revert it to the default — don't let it. +>>>>>>> origin/v5-next - `simulators/` — in-TS reference models (`TokenSimulator`, `LendingSimulator`) used to assert contract behavior. - `test-wallet/`, `bench/`, `spartan/`, `quality_of_service/`, `forward-compatibility/` — helpers, diff --git a/yarn-project/end-to-end/src/automine/accounts/2_pxes.parallel.test.ts b/yarn-project/end-to-end/src/automine/accounts/2_pxes.parallel.test.ts index cb399c845626..703ca33f86d0 100644 --- a/yarn-project/end-to-end/src/automine/accounts/2_pxes.parallel.test.ts +++ b/yarn-project/end-to-end/src/automine/accounts/2_pxes.parallel.test.ts @@ -44,6 +44,7 @@ describe('automine/accounts/2_pxes', () => { const accountManager = await wallet.createSchnorrAccount( fundedAccounts[accountIndex].secret, fundedAccounts[accountIndex].salt, + fundedAccounts[accountIndex].signingKey, ); const deployMethod = await accountManager.getDeployMethod(); await deployMethod.send({ from: NO_FROM }); @@ -214,13 +215,21 @@ describe('automine/accounts/2_pxes', () => { // setup an account that is shared across PXEs const sharedAccount = additionallyFundedAccounts[2]; +<<<<<<< HEAD const sharedAccountOnAManager = await walletA.createSchnorrAccount(sharedAccount.secret, sharedAccount.salt); +======= + const sharedAccountOnAManager = await walletA.createSchnorrAccount( + sharedAccount.secret, + sharedAccount.salt, + sharedAccount.signingKey, + ); +>>>>>>> origin/v5-next const sharedAccountOnADeployMethod = await sharedAccountOnAManager.getDeployMethod(); await sharedAccountOnADeployMethod.send({ from: NO_FROM }); const sharedAccountAddress = sharedAccountOnAManager.address; // Register the shared account on walletB. - await walletB.createSchnorrAccount(sharedAccount.secret, sharedAccount.salt); + await walletB.createSchnorrAccount(sharedAccount.secret, sharedAccount.salt, sharedAccount.signingKey); // deploy the contract on PXE A const { contract: token, instance } = await deployToken(walletA, accountAAddress, initialBalance, logger); diff --git a/yarn-project/end-to-end/src/automine/accounts/account_contracts.test.ts b/yarn-project/end-to-end/src/automine/accounts/account_contracts.test.ts index 2395232b287c..22346a2285dd 100644 --- a/yarn-project/end-to-end/src/automine/accounts/account_contracts.test.ts +++ b/yarn-project/end-to-end/src/automine/accounts/account_contracts.test.ts @@ -15,7 +15,6 @@ import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account'; import { randomBytes } from '@aztec/foundation/crypto/random'; import { ChildContract } from '@aztec/noir-test-contracts.js/Child'; import { createPXE, getPXEConfig } from '@aztec/pxe/server'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { TestWallet } from '../../test-wallet/test_wallet.js'; import { AztecNodeProxy } from '../../test-wallet/utils.js'; @@ -53,7 +52,7 @@ const itShouldBehaveLikeAnAccountContract = ( beforeAll(async () => { const secret = Fr.random(); const salt = Fr.random(); - const signingKey = deriveSigningKey(secret); + const signingKey = GrumpkinScalar.random(); const contract = getAccountContract(signingKey); const address = await getAccountContractAddress(contract, secret, salt); const accountData = { diff --git a/yarn-project/end-to-end/src/automine/accounts/multiple_accounts_1_enc_key.test.ts b/yarn-project/end-to-end/src/automine/accounts/multiple_accounts_1_enc_key.test.ts index ac53aaf65ebf..18372b814a22 100644 --- a/yarn-project/end-to-end/src/automine/accounts/multiple_accounts_1_enc_key.test.ts +++ b/yarn-project/end-to-end/src/automine/accounts/multiple_accounts_1_enc_key.test.ts @@ -33,7 +33,11 @@ describe('automine/accounts/multiple_accounts_1_enc_key', () => { // A different signing key for each account. const signingKey = GrumpkinScalar.random(); const salt = Fr.random(); +<<<<<<< HEAD const address = await getSchnorrInitializerlessAccountContractAddress(secret, salt, signingKey); +======= + const address = await getSchnorrInitializerlessAccountContractAddress(signingKey, salt, secret); +>>>>>>> origin/v5-next return { secret, signingKey, diff --git a/yarn-project/end-to-end/src/automine/contracts/contract_updates.parallel.test.ts b/yarn-project/end-to-end/src/automine/contracts/contract_updates.parallel.test.ts index fcd28dbfe791..5a44cd6ef3a0 100644 --- a/yarn-project/end-to-end/src/automine/contracts/contract_updates.parallel.test.ts +++ b/yarn-project/end-to-end/src/automine/contracts/contract_updates.parallel.test.ts @@ -1,7 +1,7 @@ import { getSchnorrInitializerlessAccountContractAddress } from '@aztec/accounts/schnorr'; import { fastForwardContractUpdate, getContractClassFromArtifact } from '@aztec/aztec.js/contracts'; import { publishContractClass } from '@aztec/aztec.js/deployment'; -import { Fr } from '@aztec/aztec.js/fields'; +import { Fr, GrumpkinScalar } from '@aztec/aztec.js/fields'; import type { AztecNode } from '@aztec/aztec.js/node'; import type { CheatCodes } from '@aztec/aztec/testing'; import { MINIMUM_UPDATE_DELAY, UPDATED_CLASS_IDS_SLOT } from '@aztec/constants'; @@ -17,7 +17,6 @@ import { } from '@aztec/stdlib/delayed-public-mutable'; import { computePublicDataTreeLeafSlot, deriveStorageSlotInMap } from '@aztec/stdlib/hash'; import type { AztecNodeDebug } from '@aztec/stdlib/interfaces/client'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { PublicDataTreeLeaf } from '@aztec/stdlib/trees'; import type { TestWallet } from '../../test-wallet/test_wallet.js'; @@ -83,7 +82,7 @@ describe('automine/contracts/contract_updates', () => { beforeEach(async () => { const senderPrivateKey = Fr.random(); - const signingKey = deriveSigningKey(senderPrivateKey); + const signingKey = GrumpkinScalar.random(); const salt = Fr.ONE; // Use a deterministic initializerless account whose address we know before setup, so the scheduled // delay can be seeded in genesis public data for it. We fund it and create it ourselves below. @@ -92,7 +91,11 @@ describe('automine/contracts/contract_updates', () => { signingKey, salt, type: 'schnorr_initializerless' as const, +<<<<<<< HEAD address: await getSchnorrInitializerlessAccountContractAddress(senderPrivateKey, salt, signingKey), +======= + address: await getSchnorrInitializerlessAccountContractAddress(signingKey, salt, senderPrivateKey), +>>>>>>> origin/v5-next }; defaultAccountAddress = account.address; diff --git a/yarn-project/end-to-end/src/automine/delivery/constrained.test.ts b/yarn-project/end-to-end/src/automine/delivery/constrained.test.ts index d3c1b1bef8ce..51a536249cdb 100644 --- a/yarn-project/end-to-end/src/automine/delivery/constrained.test.ts +++ b/yarn-project/end-to-end/src/automine/delivery/constrained.test.ts @@ -1,3 +1,4 @@ +<<<<<<< HEAD import type { AztecAddress } from '@aztec/aztec.js/addresses'; import { BatchCall } from '@aztec/aztec.js/contracts'; import type { Wallet } from '@aztec/aztec.js/wallet'; @@ -5,11 +6,32 @@ import { Point } from '@aztec/foundation/curves/grumpkin'; import { HandshakeRegistryContract } from '@aztec/noir-contracts.js/HandshakeRegistry'; import { OnchainDeliveryTestContract } from '@aztec/noir-test-contracts.js/OnchainDeliveryTest'; import { STANDARD_HANDSHAKE_REGISTRY_ADDRESS } from '@aztec/standard-contracts/handshake-registry/constants'; +======= +import { generateSchnorrAccounts } from '@aztec/accounts/testing'; +import { NO_FROM } from '@aztec/aztec.js/account'; +import { AztecAddress } from '@aztec/aztec.js/addresses'; +import { BatchCall } from '@aztec/aztec.js/contracts'; +import type { Wallet } from '@aztec/aztec.js/wallet'; +import { type Fq, Fr } from '@aztec/foundation/curves/bn254'; +import { Point } from '@aztec/foundation/curves/grumpkin'; +import { HandshakeRegistryContract } from '@aztec/noir-contracts.js/HandshakeRegistry'; +import { OnchainDeliveryTestContract } from '@aztec/noir-test-contracts.js/OnchainDeliveryTest'; +import { UtilityExecutionOracle } from '@aztec/pxe/simulator'; +import { STANDARD_HANDSHAKE_REGISTRY_ADDRESS } from '@aztec/standard-contracts/handshake-registry/constants'; +import { computeAddressSecret, deriveMasterIncomingViewingSecretKey } from '@aztec/stdlib/keys'; +>>>>>>> origin/v5-next import { jest } from '@jest/globals'; import { AUTOMINE_E2E_OPTS } from '../../fixtures/fixtures.js'; import { ensureHandshakeRegistryPublished, setup } from '../../fixtures/setup.js'; +<<<<<<< HEAD +======= +import type { TestWallet } from '../../test-wallet/test_wallet.js'; + +// Keep in sync with aztec::messages::delivery::OnchainDeliveryMode. +const ONCHAIN_CONSTRAINED_DELIVERY_MODE = { inner: 3 }; +>>>>>>> origin/v5-next // Delivery-method-specific tests that don't fit the generic (strategy, mode) matrix in `onchain.test.ts` describe('delivery/constrained', () => { @@ -56,7 +78,13 @@ describe('delivery/constrained', () => { // The second send reuses the handshake rather than bootstrapping a new one: the secret is unchanged. expect(secret).toEqual(secretAfterFirstSend); +<<<<<<< HEAD const { result: index } = await contract.methods.next_index_for_secret(secret).simulate({ from: sender }); +======= + const { result: index } = await contract.methods + .next_index_for_secret(secret, ONCHAIN_CONSTRAINED_DELIVERY_MODE) + .simulate({ from: sender }); +>>>>>>> origin/v5-next expect(index).toEqual(2n); }); @@ -92,7 +120,13 @@ describe('delivery/constrained', () => { .simulate({ from: sender }); expect(secret).toBeDefined(); +<<<<<<< HEAD const { result: index } = await contract.methods.next_index_for_secret(secret).simulate({ from: sender }); +======= + const { result: index } = await contract.methods + .next_index_for_secret(secret, ONCHAIN_CONSTRAINED_DELIVERY_MODE) + .simulate({ from: sender }); +>>>>>>> origin/v5-next expect(index).toEqual(2n); }); @@ -111,7 +145,13 @@ describe('delivery/constrained', () => { .simulate({ from: sender }); expect(secret).toBeDefined(); +<<<<<<< HEAD const { result: index } = await contract.methods.next_index_for_secret(secret).simulate({ from: sender }); +======= + const { result: index } = await contract.methods + .next_index_for_secret(secret, ONCHAIN_CONSTRAINED_DELIVERY_MODE) + .simulate({ from: sender }); +>>>>>>> origin/v5-next expect(index).toEqual(2n); }); @@ -128,7 +168,13 @@ describe('delivery/constrained', () => { .simulate({ from: sender }); expect(secret).toBeDefined(); +<<<<<<< HEAD const { result: index } = await contract.methods.next_index_for_secret(secret).simulate({ from: sender }); +======= + const { result: index } = await contract.methods + .next_index_for_secret(secret, ONCHAIN_CONSTRAINED_DELIVERY_MODE) + .simulate({ from: sender }); +>>>>>>> origin/v5-next expect(index).toEqual(1n); }); @@ -146,7 +192,13 @@ describe('delivery/constrained', () => { .simulate({ from: sender }); expect(secret).toBeDefined(); +<<<<<<< HEAD const { result: index } = await contract.methods.next_index_for_secret(secret).simulate({ from: sender }); +======= + const { result: index } = await contract.methods + .next_index_for_secret(secret, ONCHAIN_CONSTRAINED_DELIVERY_MODE) + .simulate({ from: sender }); +>>>>>>> origin/v5-next expect(index).toEqual(1n); }); }); @@ -181,3 +233,92 @@ describe('delivery/constrained: rejects unsound sources', () => { } }); }); +<<<<<<< HEAD +======= + +// Regression test: a recipient must not be able to forge a handshake that reuses an honest handshake's tag stream. +// The ECDH secret is symmetric, so the recipient can recompute it and mint a colliding handshake; aztec-nr's +// `protect_from_forgery` docs walk the full argument. The forgery forces bob's ephemeral key via the same +// `getRandomField` oracle that unit tests mock, intercepted at the PXE, as a real attacker does by running its own PXE. +describe('constrained delivery handshake forgery', () => { + jest.setTimeout(300_000); + + let teardown: () => Promise; + let wallet: TestWallet; + let alice: AztecAddress; + let bob: AztecAddress; + let bobAddressSecret: Fq; + let contract: OnchainDeliveryTestContract; + let registry: HandshakeRegistryContract; + + beforeAll(async () => { + const [bobAccount] = await generateSchnorrAccounts(1, 'schnorr'); + ({ + teardown, + wallet, + accounts: [alice], + } = await setup(1, { ...AUTOMINE_E2E_OPTS, additionallyFundedAccounts: [bobAccount] })); + + // Deploy bob (the recipient and forger) from its known secret, and recover its address secret: the discrete log + // of its address point. Knowing this is what lets bob force a handshake's ephemeral key to its own public key. + const bobManager = await wallet.createSchnorrAccount(bobAccount.secret, bobAccount.salt, bobAccount.signingKey); + await (await bobManager.getDeployMethod()).send({ from: NO_FROM }); + bob = bobManager.address; + bobAddressSecret = await computeAddressSecret( + await (await bobManager.getCompleteAddress()).getPreaddress(), + deriveMasterIncomingViewingSecretKey(bobAccount.secret), + ); + + await ensureHandshakeRegistryPublished(wallet, alice); + ({ contract } = await OnchainDeliveryTestContract.deploy(wallet).send({ from: alice })); + registry = HandshakeRegistryContract.at(STANDARD_HANDSHAKE_REGISTRY_ADDRESS, wallet); + }); + + afterAll(() => teardown()); + + it('binding the ephemeral key stops a recipient from reproducing an honest handshake secret', async () => { + await registry.methods.non_interactive_handshake(alice, bob).send({ from: alice }); + + await wallet.sync(); + const { result: page } = await registry.methods.get_non_interactive_handshakes(bob, 0).simulate({ from: bob }); + const aliceEphemeralPublicKey = page.items.storage[0].eph_pk; + + const { result: honestSecret } = await contract.methods + .get_app_siloed_secrets(alice, bob) + .simulate({ from: alice }); + expect(honestSecret).toBeDefined(); + + // bob forges a handshake addressed to alice's ephemeral key, with its OWN ephemeral forced to its address point, + // which by the symmetry above reproduces alice's raw shared point. + const forgedRecipient = AztecAddress.fromFieldUnsafe(new Fr(aliceEphemeralPublicKey.x)); + await withForcedEphemeral(new Fr(bobAddressSecret.toBigInt()), () => + registry.methods.non_interactive_handshake(bob, forgedRecipient).send({ from: bob }), + ); + const { result: forgedSecret } = await contract.methods + .get_app_siloed_secrets(bob, forgedRecipient) + .simulate({ from: bob }); + + // The forgery announces a different ephemeral key, so the forgery protection makes the two secrets diverge. + expect(forgedSecret).not.toEqual(honestSecret); + }); +}); + +/** + * Runs `fn` with the in-circuit `random()` oracle forced to `value`, so the ephemeral key the handshake generates is + * `value`'s keypair. A real attacker controls this by running its own PXE; we intercept it at `getRandomField`. + * + * Asserts the interception actually happened: whether the ephemeral key is forced is the premise of the forgery + * test, so if `getRandomField` ever stops carrying it the "forgery" silently degrades to an ordinary random + * handshake and the caller's divergence assertion would pass vacuously. + */ +async function withForcedEphemeral(value: Fr, fn: () => Promise): Promise { + const spy = jest.spyOn(UtilityExecutionOracle.prototype, 'getRandomField').mockReturnValue(value); + try { + const result = await fn(); + expect(spy).toHaveBeenCalled(); + return result; + } finally { + spy.mockRestore(); + } +} +>>>>>>> origin/v5-next diff --git a/yarn-project/end-to-end/src/automine/delivery/interactive_handshake_responder.ts b/yarn-project/end-to-end/src/automine/delivery/interactive_handshake_responder.ts new file mode 100644 index 000000000000..e46d0fa2b4d5 --- /dev/null +++ b/yarn-project/end-to-end/src/automine/delivery/interactive_handshake_responder.ts @@ -0,0 +1,125 @@ +import { AztecAddress, type CompleteAddress } from '@aztec/aztec.js/addresses'; +import { DomainSeparator } from '@aztec/constants'; +import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon'; +import { Schnorr, type SchnorrSignature } from '@aztec/foundation/crypto/schnorr'; +import { Fq, Fr } from '@aztec/foundation/curves/bn254'; +import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; +import type { CustomRequest } from '@aztec/pxe/config'; +import { + INTERACTIVE_HANDSHAKE_REQUEST_KIND, + STANDARD_HANDSHAKE_REGISTRY_ADDRESS, +} from '@aztec/standard-contracts/handshake-registry/constants'; +import { type PublicKeys, derivePublicKeyFromSecretKey } from '@aztec/stdlib/keys'; + +/** + * The decoded payload of the registry's interactive-handshake signature request. Note it never carries the sender, + * so the recipient authorizes the handshake without learning who initiated it. + */ +export type InteractiveHandshakeRequest = { + /** The account whose authorization is being requested. */ + recipient: AztecAddress; + chainId: Fr; + version: Fr; + /** The x-coordinate of the handshake's ephemeral public key (its y-coordinate is positive by construction). */ + ephPkX: Fr; +}; + +/** + * The recipient's signed authorization for an interactive handshake. Mirrors the registry contract's + * `RecipientSignature` struct field for field. + */ +export type RecipientSignature = { + /** The recipient's master public keys, bound in-circuit to the recipient's address via `partialAddress`. */ + publicKeys: PublicKeys; + partialAddress: Fr; + /** The x-coordinate of the recipient's master message-signing public key. */ + mspkX: Fr; + /** Whether that key's y-coordinate is positive, so the circuit can reconstruct the point from `mspkX`. */ + mspkYIsPositive: boolean; + /** The schnorr signature over the handshake message. */ + signature: SchnorrSignature; +}; + +/** + * Parses and validates the registry's interactive-handshake signature request. + * + * @throws If the request kind is not {@link INTERACTIVE_HANDSHAKE_REQUEST_KIND}, the issuing contract is not the + * standard HandshakeRegistry, or the payload does not have the expected shape. + */ +export function parseInteractiveHandshakeRequest(request: CustomRequest): InteractiveHandshakeRequest { + if (!request.kind.equals(INTERACTIVE_HANDSHAKE_REQUEST_KIND)) { + throw new Error(`Not an interactive-handshake signature request: unexpected kind ${request.kind}`); + } + if (!request.contractAddress.equals(STANDARD_HANDSHAKE_REGISTRY_ADDRESS)) { + throw new Error( + `Interactive-handshake signature request issued by ${request.contractAddress}, expected the standard HandshakeRegistry at ${STANDARD_HANDSHAKE_REGISTRY_ADDRESS}`, + ); + } + if (request.payload.length !== 4) { + throw new Error(`Interactive-handshake signature request payload has ${request.payload.length} fields, expected 4`); + } + + const [recipient, chainId, version, ephPkX] = request.payload; + return { recipient: new AztecAddress(recipient), chainId, version, ephPkX }; +} + +/** + * Produces the recipient's signed authorization for an interactive handshake, signing with the master + * message-signing secret key. + */ +export async function signInteractiveHandshake( + request: InteractiveHandshakeRequest, + completeAddress: CompleteAddress, + masterMessageSigningSecretKey: GrumpkinScalar, +): Promise { + const mspk = await derivePublicKeyFromSecretKey(masterMessageSigningSecretKey); + const [mspkX, mspkYIsPositive] = mspk.toXAndSign(); + + const message = await computeInteractiveHandshakeSignatureMessage({ + chainId: request.chainId, + version: request.version, + registry: STANDARD_HANDSHAKE_REGISTRY_ADDRESS, + ephPkX: request.ephPkX, + }); + const signature = await new Schnorr().constructSignature(message, masterMessageSigningSecretKey); + + return { + publicKeys: completeAddress.publicKeys, + partialAddress: completeAddress.partialAddress, + mspkX, + mspkYIsPositive, + signature, + }; +} + +/** Serializes a {@link RecipientSignature} to the field layout the registry's in-circuit deserialization expects. */ +export function recipientSignatureToFields(recipientSignature: RecipientSignature): Fr[] { + const s = Fq.fromBuffer(recipientSignature.signature.s); + const e = Fq.fromBuffer(recipientSignature.signature.e); + return [ + ...recipientSignature.publicKeys.toFields(), + recipientSignature.partialAddress, + recipientSignature.mspkX, + new Fr(recipientSignature.mspkYIsPositive), + s.lo, + s.hi, + e.lo, + e.hi, + ]; +} + +/** + * The message an interactive-handshake authorization signs: the handshake's ephemeral key and chain context under + * `DomainSeparator.INTERACTIVE_HANDSHAKE_SIGNATURE`, exactly as the registry recomputes it in-circuit. + */ +function computeInteractiveHandshakeSignatureMessage(args: { + chainId: Fr; + version: Fr; + registry: AztecAddress; + ephPkX: Fr; +}): Promise { + return poseidon2HashWithSeparator( + [args.chainId, args.version, args.registry, args.ephPkX], + DomainSeparator.INTERACTIVE_HANDSHAKE_SIGNATURE, + ); +} diff --git a/yarn-project/end-to-end/src/automine/delivery/onchain.test.ts b/yarn-project/end-to-end/src/automine/delivery/onchain.test.ts index cdab97abcf31..47190541171f 100644 --- a/yarn-project/end-to-end/src/automine/delivery/onchain.test.ts +++ b/yarn-project/end-to-end/src/automine/delivery/onchain.test.ts @@ -1,5 +1,20 @@ +<<<<<<< HEAD import { Point } from '@aztec/foundation/curves/grumpkin'; +======= +import type { InitialAccountData } from '@aztec/accounts/testing'; +import type { CompleteAddress } from '@aztec/aztec.js/addresses'; +import { Point } from '@aztec/foundation/curves/grumpkin'; +import type { ResolveCustomRequest } from '@aztec/pxe/config'; +import { deriveKeys } from '@aztec/stdlib/keys'; + +import type { TestWallet } from '../../test-wallet/test_wallet.js'; +import { + parseInteractiveHandshakeRequest, + recipientSignatureToFields, + signInteractiveHandshake, +} from './interactive_handshake_responder.js'; +>>>>>>> origin/v5-next import { buildMessageDeliveryTest } from './onchain_delivery_harness.js'; describe('onchain delivery', () => { @@ -34,8 +49,13 @@ describe('onchain delivery', () => { }, }); +<<<<<<< HEAD // With the recipient registering the sender, // the recipient PXE reconstructs the address-derived tag and discovers the delivery. +======= + // With the recipient registering the sender, the recipient PXE reconstructs the address-derived tag + // and discovers the delivery. +>>>>>>> origin/v5-next buildMessageDeliveryTest({ strategy: 'address-derived', mode: 'unconstrained', @@ -44,4 +64,50 @@ describe('onchain delivery', () => { await recipientWallet.registerSender(senderAddress); }, }); +<<<<<<< HEAD +======= + + buildMessageDeliveryTest({ + strategy: 'interactive handshake', + mode: 'constrained', + senderHook: () => Promise.resolve({ type: 'interactive-handshake' }), + customRequestResponder: interactiveHandshakeResponder, + }); + + buildMessageDeliveryTest({ + strategy: 'interactive handshake', + mode: 'unconstrained', + senderHook: () => Promise.resolve({ type: 'interactive-handshake' }), + customRequestResponder: interactiveHandshakeResponder, + }); + + // Serves the registry's interactive-handshake signature request for the recipient: registers the handshake on the + // recipient PXE, then answers with the signed response. + function interactiveHandshakeResponder( + recipientWallet: TestWallet, + recipientAccount: InitialAccountData, + recipientCompleteAddress: CompleteAddress, + ): ResolveCustomRequest { + return async request => { + const parsed = parseInteractiveHandshakeRequest(request); + + // Register before signing. + await recipientWallet.registerTaggingSecretSource({ + kind: 'handshake', + recipient: parsed.recipient, + ephPk: parsed.ephPkX, + }); + + // The master message-signing secret key is deliberately never held by PXE or the key store; the wallet + // derives it client-side from the account secret. + const { masterMessageSigningSecretKey } = await deriveKeys(recipientAccount.secret); + const recipientSignature = await signInteractiveHandshake( + parsed, + recipientCompleteAddress, + masterMessageSigningSecretKey, + ); + return recipientSignatureToFields(recipientSignature); + }; + } +>>>>>>> origin/v5-next }); diff --git a/yarn-project/end-to-end/src/automine/delivery/onchain_delivery_harness.ts b/yarn-project/end-to-end/src/automine/delivery/onchain_delivery_harness.ts index d10ae9196aea..d414c0b4f868 100644 --- a/yarn-project/end-to-end/src/automine/delivery/onchain_delivery_harness.ts +++ b/yarn-project/end-to-end/src/automine/delivery/onchain_delivery_harness.ts @@ -1,11 +1,20 @@ import { type InitialAccountData, generateSchnorrAccounts } from '@aztec/accounts/testing'; import type { FieldLike } from '@aztec/aztec.js/abi'; import { NO_FROM } from '@aztec/aztec.js/account'; +<<<<<<< HEAD import type { AztecAddress } from '@aztec/aztec.js/addresses'; import type { AztecNode } from '@aztec/aztec.js/node'; import { BlockNumber } from '@aztec/foundation/branded-types'; import { type DeliveryEvent, OnchainDeliveryTestContract } from '@aztec/noir-test-contracts.js/OnchainDeliveryTest'; import type { PXECreationOptions } from '@aztec/pxe/server'; +======= +import type { AztecAddress, CompleteAddress } from '@aztec/aztec.js/addresses'; +import type { AztecNode } from '@aztec/aztec.js/node'; +import type { AccountManager } from '@aztec/aztec.js/wallet'; +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { type DeliveryEvent, OnchainDeliveryTestContract } from '@aztec/noir-test-contracts.js/OnchainDeliveryTest'; +import type { CustomRequest, ResolveCustomRequest, ResolveTaggingSecretStrategy } from '@aztec/pxe/config'; +>>>>>>> origin/v5-next import type { AztecNodeDebug } from '@aztec/stdlib/interfaces/client'; import { jest } from '@jest/globals'; @@ -14,9 +23,19 @@ import { AUTOMINE_E2E_OPTS } from '../../fixtures/fixtures.js'; import { ensureHandshakeRegistryPublished, setup, setupPXEAndGetWallet } from '../../fixtures/setup.js'; import { TestWallet } from '../../test-wallet/test_wallet.js'; +<<<<<<< HEAD // The wallet hook that selects a message's tagging-secret source. Derived from the exported PXE options // rather than importing the hook type, which `@aztec/pxe/server` does not re-export. export type SenderHook = NonNullable['resolveTaggingSecretStrategy']>; +======= +// Builds the hook serving custom requests issued during the sender's simulations. Installed on the sender PXE at +// creation but built only once the recipient exists, since serving typically needs the recipient's wallet and keys. +export type CustomRequestResponder = ( + recipient: TestWallet, + recipientAccount: InitialAccountData, + recipientCompleteAddress: CompleteAddress, +) => ResolveCustomRequest; +>>>>>>> origin/v5-next export type Mode = 'constrained' | 'unconstrained'; @@ -40,19 +59,33 @@ export function buildMessageDeliveryTest(opts: { strategy: string; mode: DeliveryMode; // Required: every cell states its source explicitly rather than leaning on the PXE default (covered by unit tests). +<<<<<<< HEAD senderHook: SenderHook; +======= + senderHook: ResolveTaggingSecretStrategy; +>>>>>>> origin/v5-next // Recipient-side setup the source requires (e.g. registering a raw arbitrary secret); runs once after deployment. recipientRegistration?: ( recipient: TestWallet, recipientAddress: AztecAddress, sender: AztecAddress, ) => Promise; +<<<<<<< HEAD +======= + // Serves the custom requests issued during the sender's simulations (e.g. the registry's interactive-handshake + // signature request). + customRequestResponder?: CustomRequestResponder; +>>>>>>> origin/v5-next // Extra `it()`s to register in this cell's suite, e.g. assertions against state a custom `senderHook` recorded. // Called inside the same `describe`, after the two baseline assertions below, so it shares their `beforeAll` // instead of depending on Jest's cross-`describe` execution order. additionalTests?: () => void; }) { +<<<<<<< HEAD const { strategy, mode, senderHook, recipientRegistration, additionalTests } = opts; +======= + const { strategy, mode, senderHook, recipientRegistration, customRequestResponder, additionalTests } = opts; +>>>>>>> origin/v5-next const description = `${strategy} x ${formatMode(mode)}`; describe(description, () => { @@ -84,11 +117,21 @@ export function buildMessageDeliveryTest(opts: { ? contractSender.methods.emit_note(recipient, value) : contractSender.methods.emit_note_unconstrained(recipient, value); +<<<<<<< HEAD +======= + let additionallyFundedAccounts: InitialAccountData[]; + let recipientAccount: AccountManager | undefined; + let customRequestCount = 0; + +>>>>>>> origin/v5-next beforeAll(async () => { // The sender PXE holds the sender and carries this cell's tagging-secret-strategy hook. The recipient is funded // at genesis here but created and deployed on the isolated recipient PXE below, so it carries no sender state // from other cells. +<<<<<<< HEAD let additionallyFundedAccounts: InitialAccountData[]; +======= +>>>>>>> origin/v5-next ({ aztecNode, additionallyFundedAccounts, @@ -98,7 +141,30 @@ export function buildMessageDeliveryTest(opts: { } = await setup(1, { ...AUTOMINE_E2E_OPTS, additionallyFundedAccounts: await generateSchnorrAccounts(1, 'schnorr'), +<<<<<<< HEAD pxeCreationOptions: { hooks: { resolveTaggingSecretStrategy: senderHook } }, +======= + pxeCreationOptions: { + hooks: { + resolveTaggingSecretStrategy: senderHook, + resolveCustomRequest: async (request: CustomRequest) => { + if (!customRequestResponder) { + throw new Error('A custom request arrived but this test cell has no customRequestResponder configured'); + } + if (!recipientAccount) { + throw new Error('A custom request arrived before the recipient wallet was created'); + } + customRequestCount++; + const respond = customRequestResponder( + walletRecipient, + additionallyFundedAccounts[0], + await recipientAccount.getCompleteAddress(), + ); + return respond(request); + }, + }, + }, +>>>>>>> origin/v5-next })); ({ wallet: walletRecipient, teardown: teardownRecipient } = await setupPXEAndGetWallet( @@ -108,7 +174,11 @@ export function buildMessageDeliveryTest(opts: { undefined, 'pxe-recipient', )); +<<<<<<< HEAD const recipientAccount = await walletRecipient.createSchnorrAccount( +======= + recipientAccount = await walletRecipient.createSchnorrAccount( +>>>>>>> origin/v5-next additionallyFundedAccounts[0].secret, additionallyFundedAccounts[0].salt, additionallyFundedAccounts[0].signingKey, @@ -172,6 +242,15 @@ export function buildMessageDeliveryTest(opts: { expect(readNotes).toEqual(noteValues); }); +<<<<<<< HEAD +======= + if (customRequestResponder) { + it('the custom request hook fires exactly once, on the send that bootstraps the tagging secret', () => { + expect(customRequestCount).toBe(1); + }); + } + +>>>>>>> origin/v5-next additionalTests?.(); }); } diff --git a/yarn-project/end-to-end/src/automine/phase_check.parallel.test.ts b/yarn-project/end-to-end/src/automine/phase_check.parallel.test.ts index 36904d001078..8654c807f1b9 100644 --- a/yarn-project/end-to-end/src/automine/phase_check.parallel.test.ts +++ b/yarn-project/end-to-end/src/automine/phase_check.parallel.test.ts @@ -1,4 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js/addresses'; +import { BatchCall } from '@aztec/aztec.js/contracts'; import { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee'; import { SPONSORED_FPC_SALT } from '@aztec/constants'; import { Fr } from '@aztec/foundation/curves/bn254'; @@ -7,10 +8,25 @@ import { TestContract } from '@aztec/noir-test-contracts.js/Test'; import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice'; import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract'; import { PublicDataTreeLeaf } from '@aztec/stdlib/trees'; +import { ExecutionPayload } from '@aztec/stdlib/tx'; import { defaultInitialAccountFeeJuice } from '@aztec/world-state/testing'; import type { TestWallet } from '../test-wallet/test_wallet.js'; import { AutomineTestContext } from './automine_test_context.js'; +<<<<<<< HEAD +======= + +/** + * Declares a contract as the tx fee payer without contributing any call to the fee payload, unlike + * SponsoredFeePaymentMethod which prepends the sponsor call (and thus makes the election run before any app call). + * This lets a test place the electing call anywhere in the app payload, e.g. after the setup phase has ended. + */ +class DeferredSponsoredFeePaymentMethod extends SponsoredFeePaymentMethod { + override async getExecutionPayload(): Promise { + return new ExecutionPayload([], [], [], [], await this.getFeePayer()); + } +} +>>>>>>> origin/v5-next // Private functions should receive automatically a phase check that avoids any nested call changing the phase. // Functions that opt out of this phase check can be marked with #[allow_phase_change]. @@ -78,4 +94,21 @@ describe('automine/phase_check', () => { }, }); }); + + it('should fail when the fee payer is elected after the setup phase has ended', async () => { + // BatchCall.simulate ignores the fee payment method, which would make the wallet fall back to + // PREEXISTING_FEE_JUICE and end setup in the account entrypoint before any app call runs. Build the payload via + // request() instead, which merges the payment method's payload (and thus its fee payer), and simulate it directly. + const lateElection = await new BatchCall(wallet, [ + contract.methods.call_function_that_ends_setup_without_phase_check(), + sponsoredFPC.methods.sponsor_unconditionally(), + ]).request({ + fee: { + paymentMethod: new DeferredSponsoredFeePaymentMethod(sponsoredFPC.address), + }, + }); + await expect(wallet.simulateTx(lateElection, { from: defaultAccountAddress })).rejects.toThrow( + 'fee payer must be elected during the setup phase', + ); + }); }); diff --git a/yarn-project/end-to-end/src/bench/client_flows/client_flows_benchmark.ts b/yarn-project/end-to-end/src/bench/client_flows/client_flows_benchmark.ts index c3aa9d693cc4..81023665307c 100644 --- a/yarn-project/end-to-end/src/bench/client_flows/client_flows_benchmark.ts +++ b/yarn-project/end-to-end/src/bench/client_flows/client_flows_benchmark.ts @@ -13,6 +13,7 @@ import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract'; import { ChainMonitor } from '@aztec/ethereum/test'; import { randomBytes } from '@aztec/foundation/crypto/random'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { EthAddress } from '@aztec/foundation/eth-address'; import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi'; import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode'; @@ -26,7 +27,10 @@ import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice'; import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server'; import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract'; import { Gas, GasSettings } from '@aztec/stdlib/gas'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; +======= +>>>>>>> origin/v5-next import { AppTaggingSecretKind } from '@aztec/stdlib/logs'; import { @@ -192,7 +196,7 @@ export class ClientFlowsBenchmark { let benchysPrivateSigningKey; if (type === 'schnorr') { - benchysPrivateSigningKey = deriveSigningKey(benchysSecret); + benchysPrivateSigningKey = GrumpkinScalar.random(); return wallet.createSchnorrAccount(benchysSecret, salt, benchysPrivateSigningKey); } else if (type === 'ecdsar1') { benchysPrivateSigningKey = randomBytes(32); diff --git a/yarn-project/end-to-end/src/composed/e2e_persistence.test.ts b/yarn-project/end-to-end/src/composed/e2e_persistence.test.ts index 5a8dd8a9e222..cf2deaaa67ae 100644 --- a/yarn-project/end-to-end/src/composed/e2e_persistence.test.ts +++ b/yarn-project/end-to-end/src/composed/e2e_persistence.test.ts @@ -206,7 +206,15 @@ describe('Aztec persistence', () => { it('allows spending of private notes', async () => { const account = additionallyFundedAccounts[1]; // Not the owner account. +<<<<<<< HEAD const otherAccount = await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt); +======= + const otherAccount = await context.wallet.createSchnorrInitializerlessAccount( + account.secret, + account.salt, + account.signingKey, + ); +>>>>>>> origin/v5-next const otherAddress = otherAccount.address; const { result: initialOwnerBalance } = await contract.methods @@ -283,7 +291,11 @@ describe('Aztec persistence', () => { await context.wallet.registerContract(contractInstance, TokenBlacklistContract.artifact); const account = additionallyFundedAccounts[0]; +<<<<<<< HEAD await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt); +======= + await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt, account.signingKey); +>>>>>>> origin/v5-next const contract = TokenBlacklistContract.at(contractAddress, context.wallet); // check that notes total more than 0 so that this test isn't dependent on run order @@ -313,7 +325,11 @@ describe('Aztec persistence', () => { await temporaryContext.wallet.registerContract(contractInstance, TokenBlacklistContract.artifact); const account = additionallyFundedAccounts[0]; +<<<<<<< HEAD await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt); +======= + await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt, account.signingKey); +>>>>>>> origin/v5-next const contract = TokenBlacklistContract.at(contractAddress, context.wallet); @@ -338,7 +354,11 @@ describe('Aztec persistence', () => { beforeEach(async () => { context = await setup(0, { ...PIPELINING_SETUP_OPTS, dataDirectory, deployL1ContractsValues }, { dataDirectory }); const account = additionallyFundedAccounts[0]; +<<<<<<< HEAD await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt); +======= + await context.wallet.createSchnorrInitializerlessAccount(account.secret, account.salt, account.signingKey); +>>>>>>> origin/v5-next contract = TokenBlacklistContract.at(contractAddress, context.wallet); }, 120_000); diff --git a/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts b/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts index 638b2b8fd623..949bd56cae01 100644 --- a/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts +++ b/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts @@ -24,6 +24,10 @@ import { TestWallet } from '../test-wallet/test_wallet.js'; import { getACVMConfig } from './get_acvm_config.js'; import { getBBConfig } from './get_bb_config.js'; import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setup, setupPXEAndGetWallet } from './setup.js'; +<<<<<<< HEAD +======= +import { getStandardContractGenesisNullifiers } from './standard_contracts_genesis.js'; +>>>>>>> origin/v5-next type ProvenSetup = { wallet: TestWallet; @@ -196,8 +200,18 @@ export class FullProverTest extends SingleNodeTestContext { await provenWallet.createSchnorrInitializerlessAccount( this.fundedAccounts[i].secret, this.fundedAccounts[i].salt, +<<<<<<< HEAD ); await this.wallet.createSchnorrInitializerlessAccount(this.fundedAccounts[i].secret, this.fundedAccounts[i].salt); +======= + this.fundedAccounts[i].signingKey, + ); + await this.wallet.createSchnorrInitializerlessAccount( + this.fundedAccounts[i].secret, + this.fundedAccounts[i].salt, + this.fundedAccounts[i].signingKey, + ); +>>>>>>> origin/v5-next } const asset = TokenContract.at(this.fakeProofsAsset.address, provenWallet); @@ -229,6 +243,7 @@ export class FullProverTest extends SingleNodeTestContext { undefined, undefined, this.context.genesis!.genesisTimestamp, + await getStandardContractGenesisNullifiers(), ); const proverNodeConfig: Parameters[0] = { diff --git a/yarn-project/end-to-end/src/fixtures/fixtures.ts b/yarn-project/end-to-end/src/fixtures/fixtures.ts index 586c6d3ad474..217bc1ccf645 100644 --- a/yarn-project/end-to-end/src/fixtures/fixtures.ts +++ b/yarn-project/end-to-end/src/fixtures/fixtures.ts @@ -1,4 +1,5 @@ import type { AztecNode } from '@aztec/aztec.js/node'; +import { TEST_FEE_PADDING } from '@aztec/aztec/testing'; import type { GasFees } from '@aztec/stdlib/gas'; export const METRICS_PORT = 4318; @@ -17,9 +18,10 @@ export const LARGE_MIN_FEE_PADDING = 15; * price modifier evolves faster across the build/publish gap, so client-set maxFeesPerGas (sized * for the default 5x padding) was getting bumped past by the time the tx mined a few slots later. * Observed worst case in CI: fee evolved ~20x between PXE snapshot and inclusion, exceeding even - * LARGE_MIN_FEE_PADDING (15x). + * LARGE_MIN_FEE_PADDING (15x). Same multiplier and same class of problem as the published + * {@link TEST_FEE_PADDING}, re-exported under a name that captures the pipelining rationale. */ -export const PIPELINED_FEE_PADDING = 30; +export const PIPELINED_FEE_PADDING = TEST_FEE_PADDING; /** * Setup option preset that opts a test into proposer pipelining. Use with `setup()`: @@ -77,7 +79,7 @@ export const AUTOMINE_E2E_OPTS = { minTxsPerBlock: 0, aztecSlotDuration: 12, ethereumSlotDuration: 4, - walletMinFeePadding: PIPELINED_FEE_PADDING, + walletMinFeePadding: TEST_FEE_PADDING, } as const; /** Returns worst-case predicted min fees with padding applied, mirroring the BaseWallet pattern. */ diff --git a/yarn-project/end-to-end/src/fixtures/setup.ts b/yarn-project/end-to-end/src/fixtures/setup.ts index 3dc87c409dd2..2085e55f8b72 100644 --- a/yarn-project/end-to-end/src/fixtures/setup.ts +++ b/yarn-project/end-to-end/src/fixtures/setup.ts @@ -37,7 +37,7 @@ import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree'; import type { P2PClientDeps } from '@aztec/p2p'; import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers'; import { protocolContractsHash } from '@aztec/protocol-contracts'; -import type { ProverNodeConfig } from '@aztec/prover-node'; +import type { ProverNodeConfig, ProverNodeDeps } from '@aztec/prover-node'; import { type PXEConfig, type PXECreationOptions, getPXEConfig } from '@aztec/pxe/server'; import type { SequencerClient } from '@aztec/sequencer-client'; import { AuthRegistryArtifact, getStandardAuthRegistry } from '@aztec/standard-contracts/auth-registry'; @@ -77,6 +77,10 @@ import { MNEMONIC, TEST_MAX_PENDING_TX_POOL_COUNT, TEST_PEER_CHECK_INTERVAL_MS } import { getACVMConfig } from './get_acvm_config.js'; import { getBBConfig } from './get_bb_config.js'; import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js'; +<<<<<<< HEAD +======= +import { getStandardContractGenesisNullifiers } from './standard_contracts_genesis.js'; +>>>>>>> origin/v5-next import { testSpan } from './timing.js'; import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js'; @@ -220,6 +224,17 @@ export type SetupOptions = { zkPassportArgs?: ZKPassportArgs; /** Whether to fund the sponsored FPC in genesis (defaults to false). */ fundSponsoredFPC?: boolean; +<<<<<<< HEAD +======= + /** + * Compute extra addresses to fund at genesis from the accounts setup just generated (passed as the + * argument). Runs after the default accounts are created and before genesis values are computed, so a + * test can genesis-fund a contract whose address derives from a default account (e.g. an FPC whose + * admin is the first account) instead of bridging fee juice to it during setup. Each returned address + * is funded with the same fee juice as an initial account and included in the L1 portal `fundingNeeded`. + */ + computeExtraGenesisFundedAddresses?: (defaultAccounts: InitialAccountData[]) => Promise; +>>>>>>> origin/v5-next /** L1 contracts deployment arguments. */ l1ContractsArgs?: Partial; /** Wallet minimum fee padding multiplier */ @@ -460,12 +475,27 @@ async function setupInner( } logger.trace('Generated test accounts to fund at genesis'); + // Fund any extra addresses whose value depends on the just-generated accounts (e.g. an FPC admin'd + // by a default account), so a test can genesis-fund them instead of bridging fee juice during setup. + if (opts.computeExtraGenesisFundedAddresses) { + addressesToFund.push(...(await opts.computeExtraGenesisFundedAddresses(defaultAccounts))); + } + logger.trace('Generated test accounts to fund at genesis'); + + // Preload the standard contracts (AuthRegistry, PublicChecks, HandshakeRegistry) so their `ensure*Published` setup + // helpers short-circuit their publish txs. The archiver flag seeds the bytecode/instance into every spawned node's + // contract store; the genesis nullifiers make the AVM's deployment-nullifier check pass when they are called. Both + // must go together (flag alone would recreate the publish-collision bug), so the flag lives here beside the seeding. + config.testPreloadStandardContracts = true; + const standardContractNullifiers = await getStandardContractGenesisNullifiers(); + const genesisTimestamp = BigInt(Math.floor(Date.now() / 1000)); const { genesisArchiveRoot, genesis, fundingNeeded } = await getGenesisValues( addressesToFund, opts.initialAccountFeeJuice, opts.genesisPublicData, genesisTimestamp, + standardContractNullifiers, ); logger.trace('Computed genesis values'); @@ -849,6 +879,7 @@ export function createAndSyncProverNode( telemetry?: TelemetryClient; dateProvider: DateProvider; p2pClientDeps?: P2PClientDeps; + proverNodeDeps?: Partial; }, options: { genesis?: GenesisData; dontStart?: boolean }, ): Promise<{ proverNode: AztecNodeService }> { diff --git a/yarn-project/end-to-end/src/fixtures/standard_contracts_genesis.ts b/yarn-project/end-to-end/src/fixtures/standard_contracts_genesis.ts new file mode 100644 index 000000000000..14c52180234b --- /dev/null +++ b/yarn-project/end-to-end/src/fixtures/standard_contracts_genesis.ts @@ -0,0 +1,28 @@ +import type { Fr } from '@aztec/foundation/curves/bn254'; +import { ProtocolContractAddress } from '@aztec/protocol-contracts'; +import { getPublishableStandardContracts } from '@aztec/standard-contracts'; +import { siloNullifier } from '@aztec/stdlib/hash'; + +/** + * Computes the genesis nullifiers that pre-publish the standard contracts (AuthRegistry, PublicChecks, + * HandshakeRegistry) in e2e environments, mirroring the nullifiers their on-chain publish txs would emit. Per contract: + * - `siloNullifier(ContractClassRegistry, classId)` — the class-registration nullifier that `ContractClassRegistry.publish` pushes. + * - `siloNullifier(ContractInstanceRegistry, instanceAddress)` — the instance-deployment nullifier that + * `ContractInstanceRegistry.publish_for_public_execution` pushes, using the contract's real derived address (standard + * contracts are deployed at artifact-derived addresses, not magic protocol addresses). + * + * Seed these into the genesis nullifier tree (as the 5th `getGenesisValues` arg) alongside the archiver's + * `testPreloadStandardContracts` preload: the store preload makes the `ensure*Published` guards short-circuit, and these + * nullifiers make the AVM's deployment-nullifier check pass when the contracts are called. Every e2e node genesis that + * feeds an L1 `genesisArchiveRoot` must seed the same set, or the world-state root diverges from the deployed rollup. + */ +export async function getStandardContractGenesisNullifiers(): Promise { + const classRegistry = ProtocolContractAddress.ContractClassRegistry; + const instanceRegistry = ProtocolContractAddress.ContractInstanceRegistry; + const nullifiers: Fr[] = []; + for (const { contractClass, address } of await getPublishableStandardContracts()) { + nullifiers.push(await siloNullifier(classRegistry, contractClass.id)); + nullifiers.push(await siloNullifier(instanceRegistry, address.toField())); + } + return nullifiers; +} diff --git a/yarn-project/end-to-end/src/forward-compatibility/wallet_service.ts b/yarn-project/end-to-end/src/forward-compatibility/wallet_service.ts index a0fc4bb8c692..6a3e9cb17271 100644 --- a/yarn-project/end-to-end/src/forward-compatibility/wallet_service.ts +++ b/yarn-project/end-to-end/src/forward-compatibility/wallet_service.ts @@ -33,9 +33,9 @@ async function main() { const extraAccountSalt = Fr.ZERO; const extraAccountSigningKey = GrumpkinScalar.random(); const extraAccountAddress = await getSchnorrAccountContractAddress( - extraAccountSecret, - extraAccountSalt, extraAccountSigningKey, + extraAccountSalt, + extraAccountSecret, ); logger.info('Starting wallet service...', { l1RpcUrls }); diff --git a/yarn-project/end-to-end/src/multi-node/README.md b/yarn-project/end-to-end/src/multi-node/README.md index 9751a9856240..b46b9ad789ee 100644 --- a/yarn-project/end-to-end/src/multi-node/README.md +++ b/yarn-project/end-to-end/src/multi-node/README.md @@ -31,7 +31,12 @@ copy-pasted: `getPrivateKeyFromIndex(i + 3)`), passed as `initialValidators`. - `MOCK_GOSSIP_MULTI_VALIDATOR_OPTS` — a tight committee on the mock bus with no prover (`{ mockGossipSubNetwork, skipInitialSequencer, startProverNode: false, aztecProofSubmissionEpochs: +<<<<<<< HEAD 1024, numberOfAccounts: 0 }`). Tests that want a prover leave `startProverNode` explicit. +======= + NO_REORG_SUBMISSION_EPOCHS, numberOfAccounts: 0 }`, the constant re-exported from `../single-node/setup.ts`). + Tests that want a prover leave `startProverNode` explicit. +>>>>>>> origin/v5-next - `SLASHER_ENABLED_MULTI_VALIDATOR_OPTS` — the same committee with the slasher turned on, used by the offense-detection tests. - `defaultSlashingPenalties(unit?)` / `withOnlyOffense(offense, unit?)` — build the per-offense diff --git a/yarn-project/end-to-end/src/multi-node/block-production/high_tps.test.ts b/yarn-project/end-to-end/src/multi-node/block-production/high_tps.test.ts index 4c4c9611a6bf..86806def41e9 100644 --- a/yarn-project/end-to-end/src/multi-node/block-production/high_tps.test.ts +++ b/yarn-project/end-to-end/src/multi-node/block-production/high_tps.test.ts @@ -76,6 +76,14 @@ describe('multi-node/block-production/high_tps', () => { ({ test, context, logger, validators, nodes, from } = await setupSimpleBlockProduction({ nodeCount: NODE_COUNT, setupOpts: { +<<<<<<< HEAD +======= + // Pin the old 36s/6s cadence (overriding MULTI_VALIDATOR_BLOCK_PRODUCTION_TIMING's 24s/4s): this + // suite's per-block budget is 2 txs x 2.5s = 5s, which needs a 6s block sub-slot (the full T=0..36s + // budget in this file's header is built around it) and does not fit the profile's 4s block. + aztecSlotDurationInL1Slots: 3, + blockDurationMs: 6000, +>>>>>>> origin/v5-next fakeProcessingDelayPerTxMs: TX_DURATION_MS, attestationPropagationTime: 1, minTxsPerBlock: 1, diff --git a/yarn-project/end-to-end/src/multi-node/block-production/proof_boundary.parallel.test.ts b/yarn-project/end-to-end/src/multi-node/block-production/proof_boundary.parallel.test.ts index a48bdff9d1e7..8cd542958e3c 100644 --- a/yarn-project/end-to-end/src/multi-node/block-production/proof_boundary.parallel.test.ts +++ b/yarn-project/end-to-end/src/multi-node/block-production/proof_boundary.parallel.test.ts @@ -28,8 +28,13 @@ type PublishedEvent = Parameters[0]; // Suite: 5 parallel scenarios testing the interaction between the proof submission deadline and // the pipelining boundary slot. MultiNodeTestContext: 3 validator nodes + 1 prover node, +<<<<<<< HEAD // mockGossipSubNetwork, skipInitialSequencer. Timing: ethSlot=12s, aztecSlot=3×12=36s, // epoch=default 6, proofSubmissionEpochs=1 (overridden per test via setupTest), blockDurationMs=6s, +======= +// mockGossipSubNetwork, skipInitialSequencer. Timing: ethSlot=12s, aztecSlot=2×12=24s, +// epoch=default 6, proofSubmissionEpochs=1 (overridden per test via setupTest), blockDurationMs=4s, +>>>>>>> origin/v5-next // inboxLag=2 (v5 always enforces the timetable, so the former enforceTimeTable/disableAnvilTestWatcher // overrides are gone). The Delayer is used to steer proof tx timing. describe('multi-node/block-production/proof_boundary', () => { @@ -58,9 +63,10 @@ describe('multi-node/block-production/proof_boundary', () => { const minTxsPerBlock = validatorOverrides.minTxsPerBlock ?? 0; const maxTxsPerBlock = validatorOverrides.maxTxsPerBlock ?? 1; - logger.warn(`Initial setup complete. Starting ${NODE_COUNT} validator nodes.`); + logger.warn(`Initial setup complete. Creating ${NODE_COUNT} validator nodes with sequencers paused.`); + // Ensure every validator can handle the first proposal before any sequencer begins its polling loop. nodes = await asyncMap(validators, ({ privateKey }) => - test.createValidatorNode([privateKey], { minTxsPerBlock, maxTxsPerBlock }), + test.createValidatorNode([privateKey], { dontStartSequencer: true, minTxsPerBlock, maxTxsPerBlock }), ); proverNode = await test.createProverNode({ @@ -73,6 +79,11 @@ describe('multi-node/block-production/proof_boundary', () => { logger.warn(`Test setup completed.`, { validators: validators.map(v => v.attester.toString()) }); }; + const startSequencers = async () => { + await test.startSequencers(nodes); + logger.warn(`Started ${NODE_COUNT} validator sequencers.`); + }; + const collectSequencerEvents = (sequencers: SequencerClient[]) => { const published: PublishedEvent[] = []; const preparing: PreparingEvent[] = []; @@ -216,6 +227,7 @@ describe('multi-node/block-production/proof_boundary', () => { const sequencers = nodes.map(node => node.getSequencer()!); const events = collectSequencerEvents(sequencers); + await startSequencers(); const { boundarySlot, boundaryTs } = await computeBoundarySlot(); @@ -264,6 +276,7 @@ describe('multi-node/block-production/proof_boundary', () => { const sequencers = nodes.map(node => node.getSequencer()!); const events = collectSequencerEvents(sequencers); + await startSequencers(); const { boundarySlot, boundaryTs } = await computeBoundarySlot(); @@ -298,6 +311,7 @@ describe('multi-node/block-production/proof_boundary', () => { const sequencers = nodes.map(node => node.getSequencer()!); const events = collectSequencerEvents(sequencers); + await startSequencers(); const { boundarySlot, boundaryEpoch } = await computeBoundarySlot(); @@ -335,6 +349,7 @@ describe('multi-node/block-production/proof_boundary', () => { const sequencers = nodes.map(node => node.getSequencer()!); const events = collectSequencerEvents(sequencers); + await startSequencers(); const { boundarySlot } = await computeBoundarySlot(); const slotN = SlotNumber(Number(boundarySlot) - 1); @@ -374,6 +389,7 @@ describe('multi-node/block-production/proof_boundary', () => { const sequencers = nodes.map(node => node.getSequencer()!); const events = collectSequencerEvents(sequencers); + await startSequencers(); const { boundarySlot } = await computeBoundarySlot(); const slotN = SlotNumber(Number(boundarySlot) - 1); diff --git a/yarn-project/end-to-end/src/multi-node/block-production/simple.test.ts b/yarn-project/end-to-end/src/multi-node/block-production/simple.test.ts index 2f21f3ce519b..bf8b1e8c8f05 100644 --- a/yarn-project/end-to-end/src/multi-node/block-production/simple.test.ts +++ b/yarn-project/end-to-end/src/multi-node/block-production/simple.test.ts @@ -16,7 +16,11 @@ const TX_COUNT_SIMPLE = 8; // Verifies that 3 validator nodes can build blocks without sequencer errors. Lightweight RPC-only // initial node (skipInitialSequencer), mockGossipSubNetwork, no prover. Timing: ethSlot=12s, +<<<<<<< HEAD // aztecSlot=36s, epoch=default 6, proofSubmissionEpochs=1024, blockDurationMs=6s. Pre-proved txs sent +======= +// aztecSlot=24s, epoch=default 6, proofSubmissionEpochs=1024, blockDurationMs=4s. Pre-proved txs sent +>>>>>>> origin/v5-next // from the hardcoded genesis-funded account (no on-chain account deploy needed). describe('multi-node/block-production/simple', () => { let context: EndToEndContext; diff --git a/yarn-project/end-to-end/src/multi-node/governance/add_rollup.test.ts b/yarn-project/end-to-end/src/multi-node/governance/add_rollup.test.ts index b7085a1773ca..026985ff574c 100644 --- a/yarn-project/end-to-end/src/multi-node/governance/add_rollup.test.ts +++ b/yarn-project/end-to-end/src/multi-node/governance/add_rollup.test.ts @@ -34,6 +34,10 @@ import { type Hex, decodeEventLog, encodeFunctionData, getAddress, getContract } import { foundry } from 'viem/chains'; import { sendL1ToL2Message } from '../../fixtures/l1_to_l2_messaging.js'; +<<<<<<< HEAD +======= +import { getStandardContractGenesisNullifiers } from '../../fixtures/standard_contracts_genesis.js'; +>>>>>>> origin/v5-next import { getPrivateKeyFromIndex, getSponsoredFPCAddress } from '../../fixtures/utils.js'; import { TestWallet } from '../../test-wallet/test_wallet.js'; import { @@ -136,7 +140,17 @@ describe('multi-node/governance/add_rollup', () => { genesisArchiveRoot, fundingNeeded, genesis: newGenesis, +<<<<<<< HEAD } = await getGenesisValues(genesisFundedAddresses, undefined, undefined, context.genesis!.genesisTimestamp + 1n); +======= + } = await getGenesisValues( + genesisFundedAddresses, + undefined, + undefined, + context.genesis!.genesisTimestamp + 1n, + await getStandardContractGenesisNullifiers(), + ); +>>>>>>> origin/v5-next const { rollup: newRollup } = await deployRollupForUpgrade( deployerPrivateKey, @@ -174,11 +188,14 @@ describe('multi-node/governance/add_rollup', () => { slashAmountLarge: context.aztecNodeConfig.slashAmountLarge, localEjectionThreshold: context.aztecNodeConfig.localEjectionThreshold, governanceVotingDuration: context.aztecNodeConfig.governanceVotingDuration, +<<<<<<< HEAD entryQueueBootstrapValidatorSetSize: context.aztecNodeConfig.entryQueueBootstrapValidatorSetSize, entryQueueBootstrapFlushSize: context.aztecNodeConfig.entryQueueBootstrapFlushSize, entryQueueFlushSizeMin: context.aztecNodeConfig.entryQueueFlushSizeMin, entryQueueFlushSizeQuotient: context.aztecNodeConfig.entryQueueFlushSizeQuotient, entryQueueMaxFlushSize: context.aztecNodeConfig.entryQueueMaxFlushSize, +======= +>>>>>>> origin/v5-next }, ); @@ -240,6 +257,10 @@ describe('multi-node/governance/add_rollup', () => { const aliceAccountManager = await wallet.createSchnorrInitializerlessAccount( aliceAccount.secret, aliceAccount.salt, +<<<<<<< HEAD +======= + aliceAccount.signingKey, +>>>>>>> origin/v5-next ); const aliceAddress = aliceAccountManager.address; diff --git a/yarn-project/end-to-end/src/multi-node/high-availability/ha_checkpoint_handoff.test.ts b/yarn-project/end-to-end/src/multi-node/high-availability/ha_checkpoint_handoff.test.ts index 91fc8e5ac6a5..d8dd407802b6 100644 --- a/yarn-project/end-to-end/src/multi-node/high-availability/ha_checkpoint_handoff.test.ts +++ b/yarn-project/end-to-end/src/multi-node/high-availability/ha_checkpoint_handoff.test.ts @@ -57,8 +57,13 @@ const VALIDATOR_COUNT = 4; * `mockGossipSubNetwork` bus, then 4 validator nodes created via `test.createValidatorNode` in 2 HA pairs. Each pair * shares its two validator keys plus an in-memory `createSharedSlashingProtectionDb` (so only one peer signs per duty) * — explicitly NOT the Postgres-backed docker-compose HA suite, so this is an in-proc `multi-node` test, not infra. +<<<<<<< HEAD * Production `Sequencer`, no prover node. Timing: ethSlot=6s, aztecSlot=36s, epoch=4, proofSubEpochs=1024, * blockDurationMs=8s, committeeSize=4, attestationPropagationTime=0.5, inboxLag=2; anvil on interval mining. Nodes build +======= + * Production `Sequencer`, no prover node. Timing: ethSlot=6s, aztecSlot=24s, epoch=4, proofSubEpochs=1024, + * blockDurationMs=5s, committeeSize=4, attestationPropagationTime=0.5, inboxLag=2; anvil on interval mining. Nodes build +>>>>>>> origin/v5-next * empty checkpoints (`buildCheckpointIfEmpty` + `minTxsPerBlock: 0`) so no txs are needed, and each node uses a distinct * coinbase so the secondary assertion can prove which peer produced S2. Time is warped with `cheatCodes.eth.warp`: * `findConsecutiveSamePairSlots` recovers from `ValidatorSelection__EpochNotStable` by warping forward one epoch, and diff --git a/yarn-project/end-to-end/src/multi-node/recovery/equivocation_recovery.test.ts b/yarn-project/end-to-end/src/multi-node/recovery/equivocation_recovery.test.ts index 61fac1f986b9..ab293a3286c5 100644 --- a/yarn-project/end-to-end/src/multi-node/recovery/equivocation_recovery.test.ts +++ b/yarn-project/end-to-end/src/multi-node/recovery/equivocation_recovery.test.ts @@ -57,12 +57,12 @@ describe('multi-node/recovery/equivocation_recovery', () => { // Build 4 validators (V1..V4) using the shared deterministic builder (keys from index 3). const validators = buildMockGossipValidators(NODE_COUNT); - // Timing calculation for 3 blocks per checkpoint with 8s sub-slots: + // Timing calculation for 3 blocks per checkpoint with 5s sub-slots: // - initializationOffset = 0.5s (test mode, ethereumSlotDuration < 8) - // - 3 blocks x 8s = 24s + // - 3 blocks x 5s = 15s // - checkpointFinalization = 0.5s (assemble) + 0 (p2p in test) + 2s (L1 publish) = 2.5s - // - finalBlockDuration = 8s (re-execution) - // - Total: 0.5 + 24 + 8 + 2.5 = 35s => use 36s + // - finalBlockDuration = 5s (re-execution) + // - Total: 0.5 + 15 + 5 + 2.5 = 23s => use 24s const slashingUnit = BigInt(1e14); test = await MultiNodeTestContext.setup({ ...MOCK_GOSSIP_MULTI_VALIDATOR_OPTS, diff --git a/yarn-project/end-to-end/src/multi-node/recovery/proposal_failure_recovery.parallel.test.ts b/yarn-project/end-to-end/src/multi-node/recovery/proposal_failure_recovery.parallel.test.ts index 35387b9d38b8..afd4690b7736 100644 --- a/yarn-project/end-to-end/src/multi-node/recovery/proposal_failure_recovery.parallel.test.ts +++ b/yarn-project/end-to-end/src/multi-node/recovery/proposal_failure_recovery.parallel.test.ts @@ -2,7 +2,10 @@ import type { Archiver } from '@aztec/archiver'; import type { AztecNodeService } from '@aztec/aztec-node'; import { EthAddress } from '@aztec/aztec.js/addresses'; import type { Logger } from '@aztec/aztec.js/log'; +<<<<<<< HEAD import { waitUntilL1Timestamp } from '@aztec/ethereum/l1-tx-utils'; +======= +>>>>>>> origin/v5-next import { asyncMap } from '@aztec/foundation/async-map'; import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types'; import { retryUntil } from '@aztec/foundation/retry'; @@ -30,7 +33,11 @@ const NODE_COUNT = 4; * blocks, and the next proposer rebuilds a fresh checkpoint that lands on L1. * * Both scenarios share the same 4-validator mock-gossip cluster (one key per node, no prover) on the +<<<<<<< HEAD * multi-validator reorg cadence (ethSlot=6s, aztecSlot=36s, epoch=4, proofSubmissionEpochs=1024, blockDurationMs=8000, +======= + * multi-validator reorg cadence (ethSlot=6s, aztecSlot=24s, epoch=4, proofSubmissionEpochs=1024, blockDurationMs=5000, +>>>>>>> origin/v5-next * inboxLag=2 — v5 always enforces the timetable). Each test warps L1 to align with its target build slot. */ describe('multi-node/recovery/proposal_failure_recovery', () => { @@ -188,11 +195,24 @@ describe('multi-node/recovery/proposal_failure_recovery', () => { logger.warn(`Waiting for proposed chain to reach slot ${slotTwo} on all nodes (build during slotOne)`); await test.waitForAllNodesToReachBlockAtSlot(slotTwo, 'proposed', undefined, { timeout: slotAdvanceTimeout }); +<<<<<<< HEAD // (3) Wait until slotOne has fully ended on L1 — the archiver only prunes once slotAtNextL1Block > slotOne. // The end-of-slotOne timestamp equals the start-of-slotTwo timestamp. const slotOneEndTimestamp = getTimestampForSlot(slotTwo, test.constants); logger.warn(`Waiting until L1 timestamp ${slotOneEndTimestamp} (end of slot ${slotOne})`); await waitUntilL1Timestamp(test.l1Client, slotOneEndTimestamp, undefined, test.L2_SLOT_DURATION_IN_S * 3); +======= + // (3) Collapse the dead gap where the chain just waits for the L1 clock to roll past slotOne so the + // archiver prunes the uncheckpointed slotOne/slotTwo blocks (it only prunes once slotAtNextL1Block > + // slotOne, and the end-of-slotOne timestamp equals the start-of-slotTwo timestamp). The pipelined slotTwo + // broadcast has already reached every node (step 2) and slotThree does not build until slotTwo, so nothing + // needs to be produced in this window. The sequencers are paused across the warp — warping under a running + // sequencer would interrupt in-flight builds — and kept stopped (restart: false) until the prune is + // confirmed, so no proposer builds against the still-unpruned tip; they are restarted for recovery below. + const slotOneEndTimestamp = getTimestampForSlot(slotTwo, test.constants); + logger.warn(`Warping past the end of slot ${slotOne} (L1 timestamp ${slotOneEndTimestamp}) to trigger the prune`); + await test.warpWithSequencersPaused(nodes, test.context.cheatCodes, slotOneEndTimestamp, { restart: false }); +>>>>>>> origin/v5-next // (4) After slotOne ends without a checkpoint, all nodes should prune. // Verify rollback via the prune event itself: the pruned slot must equal slotOne, and the @@ -216,9 +236,19 @@ describe('multi-node/recovery/proposal_failure_recovery', () => { expect(prunedSlots).toContain(slotOne); } +<<<<<<< HEAD // (5) Allow the formerly suppressed node to publish again so the chain can recover. logger.warn(`Re-enabling checkpoint publishing on node ${proposerOneNodeIndex}`); await nodes[proposerOneNodeIndex].setConfig({ skipPublishingCheckpointsPercent: 0 }); +======= + // (5) Allow the formerly suppressed node to publish again, then restart the paused sequencers so the + // chain can build the recovery checkpoint. Restarting only now (after the prune is confirmed) keeps any + // proposer from building on the still-unpruned tip. + logger.warn(`Re-enabling checkpoint publishing on node ${proposerOneNodeIndex}`); + await nodes[proposerOneNodeIndex].setConfig({ skipPublishingCheckpointsPercent: 0 }); + await test.startSequencers(nodes); + logger.warn('Restarted all sequencers for recovery'); +>>>>>>> origin/v5-next // (6) During slotTwo: the pipelined proposer for slotThree builds and broadcasts → proposed advances again. // The chain must have rewound past slotOne and slotTwo and now build on whatever was diff --git a/yarn-project/end-to-end/src/p2p/p2p_network.ts b/yarn-project/end-to-end/src/p2p/p2p_network.ts index 045ca4529360..fc154d3cb13d 100644 --- a/yarn-project/end-to-end/src/p2p/p2p_network.ts +++ b/yarn-project/end-to-end/src/p2p/p2p_network.ts @@ -49,6 +49,7 @@ import { createValidatorConfig, generatePrivateKeys, } from '../fixtures/setup_p2p_test.js'; +import { getStandardContractGenesisNullifiers } from '../fixtures/standard_contracts_genesis.js'; import { getEndToEndTestTelemetryClient } from '../fixtures/with_telemetry_utils.js'; import type { TestWallet } from '../test-wallet/test_wallet.js'; @@ -415,6 +416,7 @@ export class P2PNetworkTest { undefined, undefined, this.context.genesis!.genesisTimestamp, + await getStandardContractGenesisNullifiers(), ); this.genesis = genesis; diff --git a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts index b2cfe4ac419c..27eb411cbe32 100644 --- a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts @@ -76,6 +76,7 @@ export async function deployAndInitializeTokenAndBridgeContracts( client: l1Client, }); +<<<<<<< HEAD // deploy l2 token const { contract: token } = await testSpan('deploy:token', () => TokenContract.deploy(wallet, owner, 'TokenName', 'TokenSymbol', 18).send({ @@ -89,6 +90,19 @@ export async function deployAndInitializeTokenAndBridgeContracts( from: owner, }), ); +======= + // Deploy the L2 token and its bridge concurrently so they share a slot: the bridge takes the token + // address as a constructor arg, but that address is known deterministically before the token deploy + // mines, and the bridge's constructor only stores it without calling into the token. + const tokenDeploy = TokenContract.deploy(wallet, owner, 'TokenName', 'TokenSymbol', 18, { deployer: owner }); + const tokenAddress = await tokenDeploy.getAddress(); + const [{ contract: token }, { contract: bridge }] = await Promise.all([ + testSpan('deploy:token', () => tokenDeploy.send({ from: owner })), + testSpan('deploy:bridge', () => + TokenBridgeContract.deploy(wallet, tokenAddress, tokenPortalAddress).send({ from: owner }), + ), + ]); +>>>>>>> origin/v5-next if ((await token.methods.get_admin().simulate({ from: owner })).result !== owner.toBigInt()) { throw new Error(`Token admin is not ${owner}`); diff --git a/yarn-project/end-to-end/src/single-node/README.md b/yarn-project/end-to-end/src/single-node/README.md index 0c4eca43beeb..eff01dc2be83 100644 --- a/yarn-project/end-to-end/src/single-node/README.md +++ b/yarn-project/end-to-end/src/single-node/README.md @@ -19,6 +19,14 @@ All tests use `SingleNodeTestContext` (`single_node_test_context.ts`), which own `MultiNodeTestContext` (in `../multi-node/`) extends this base with the N-validator topology, so the multi-node category inherits the same environment and waiters. +<<<<<<< HEAD +======= +Prefer these named waiters — and the node-level ones in `../fixtures/wait_helpers.ts` — over hand-rolled +`retryUntil` / `.on` / `sleep` polling in test bodies; the full catalog, including the helpers this base +class defines, is listed under [Helper surface](../multi-node/README.md#helper-surface) in the multi-node +README. + +>>>>>>> origin/v5-next ## Setup factories `setup.ts` holds thin factories over `SingleNodeTestContext.setup`, named by the prover mode a test @@ -27,9 +35,16 @@ wants. Tests call the factory rather than the static method directly: - `setupWithProver(opts)` — a single sequencer plus the context's fake in-process prover node. This is the default the proving / partial-proofs / l1-reorgs / recovery / misc suites use. - `setupBlockProducer(opts)` — a single production sequencer with **no prover node**, used by the +<<<<<<< HEAD block-building / sequencer / sync suites. It raises `aztecProofSubmissionEpochs` to `1024` so unproven blocks are not pruned without a prover, and points the PXE at `syncChainTip: 'proposed'` so tests can assert on freshly proposed blocks. Both are overridable via `opts`. +======= + block-building / sequencer / sync suites. It raises `aztecProofSubmissionEpochs` to + `NO_REORG_SUBMISSION_EPOCHS` (1024) so unproven blocks are not pruned without a prover, and points the + PXE at `syncChainTip: 'proposed'` so tests can assert on freshly proposed blocks. Both are overridable + via `opts`. +>>>>>>> origin/v5-next The `prover/` suite (real Barretenberg proofs) builds its environment through `FullProverTest`, which extends `SingleNodeTestContext` directly rather than going through a factory. @@ -47,6 +62,7 @@ top-level `it`; CI splits each `it` into its own job. | Path | Contents | |---|---| | `block-building/` | Block assembly mechanics under the production sequencer with pipelining. `block_building` (multi-tx blocks, double-spend rejection, log ordering, regressions, and L1 reorgs), `debug_trace` (blocks proposed through a Forwarder proxy, including a failing-then-succeeding propose call), `multiple_blobs` (a block whose combined side effects span more than one EIP-4844 blob). | +<<<<<<< HEAD | `sequencer/` | Sequencer configuration, governance signalling, and publisher management on a single node. `gov_proposal.parallel` (a 16-validator committee proposes blocks while casting governance votes, and votes even when block building is disabled), `escape_hatch_vote_only` (governance signals advance while the escape hatch is closed), `reload_keystore` (the keystore is hot-reloaded to add a validator and pick up new coinbases), `slasher_config` (slasher config updated at runtime via the admin API), `multi_eoa` (publisher rotation when an L1 tx is withheld; exercises multi-EOA publisher failover), `publisher_funding_multi` (PublisherManager auto top-up of publisher EOAs when balances drop below threshold), `sequencer_config` (runtime `maxL2BlockGas`/`manaTarget` reconfiguration via a live Bot). | | `fees/` | Fee mechanics on a single node. `fee_asset_price_oracle` (on-chain fee-asset price-oracle convergence; starts its own Anvil instance with a MockStateView etched at the StateView address). The remaining files run on the `FeesTest` harness (`fees_test.ts`), which extends `SingleNodeTestContext` with the fee/gas domain setup (FPC funding, fee-juice bridging, banana token): `account_init` (fee payment during account-contract initialization), `failures.parallel` (fees still charged when txs revert in setup/app/teardown), `fee_juice_payments` (direct Fee Juice payment with and without initial funds), `fee_settings` (max-fee-per-gas handling, stale-fee-snapshot race, governance fee-config bump), `gas_estimation.parallel` (gas-estimation accuracy and FPC teardown gas prediction), `private_payments.parallel` (private fee payment via the BananaCoin FPC), `public_payments` (public fee payment via the BananaCoin FPC), `sponsored_payments` (sponsored fee payment via SponsoredFPC). | | `cross-chain/` | L1↔L2 messaging on a single node, on the `CrossChainMessagingTest` harness (`cross_chain_messaging_test.ts`), which extends `SingleNodeTestContext` and owns a `CrossChainTestHarness` plus the L1 inbox/outbox handles (it auto-proves via an `EpochTestSettler` when no prover node runs). `l1_to_l2.parallel` (L1→L2 message readiness, duplicate messages, and inbox drift after a rollup reorg), `l2_to_l1.parallel` (L2→L1 message inclusion across single/multi-message txs, subtree-root balancing, and a reorg-and-remine case), `token_bridge_private.parallel` (private L1→L2 deposit and L2→L1 withdrawal via the TokenBridge), `token_bridge_public.parallel` (public L1→L2 deposit and L2→L1 withdrawal, including mint-on-behalf), `token_bridge_failure_cases.parallel` (rejected withdrawals without approval and mismatched public/private claim attempts). | @@ -54,6 +70,15 @@ top-level `it`; CI splits each `it` into its own job. | `sync/` | World-state sync stress and reorg-replay harness. `synching` builds fixture block data (env-gated, slow) and replays it for sync benchmarks and prune/reorg scenarios; only the outer `it.each` runs in CI. | | `proving/` | Epoch and proof lifecycle. `world_state_pruning` (consecutive epochs prove and finalized blocks are purged from world state beyond the checkpoint-history window), `empty_blocks` (a proof is submitted even with no txs), `long_proving_time` (a prover delay spanning multiple epochs), `multi_proof` (multiple prover nodes prove one epoch), `optimistic.parallel` (checkpoint-driven proving across the happy path and several mid-epoch / last-slot / during-proving reorg cases), `proof_fails.parallel` (proof not accepted after epoch end; proving aborts when the next epoch ends), `cross_chain_public_message` (an epoch with a public tx that consumes an L1→L2 message in the block it lands, guarding against a sequencer/prover state-root mismatch), `upload_failed_proof` (a failed proving job's state is uploaded and re-run on a fresh instance). | | `prover/` | Real-proof exercises on the `FullProverTest` harness (real Barretenberg when `FAKE_PROOFS=0`, fake otherwise). `client` (client-side proof generation and `verifyProof` for private and public transfers, no on-chain submission) and `full` (the end-to-end pipeline: client proves, node builds blocks, prover node generates epoch proofs, L1 verifies them). | +======= +| `sequencer/` | Sequencer configuration, governance signalling, and publisher management on a single node. `gov_proposal.parallel` (a 16-validator committee proposes blocks while casting governance votes, and votes even when block building is disabled), `escape_hatch_vote_only` (governance signals advance while the escape hatch is closed), `reload_keystore` (the keystore is hot-reloaded to add a validator and pick up new coinbases), `multi_eoa` (publisher rotation when an L1 tx is withheld; exercises multi-EOA publisher failover), `publisher_funding_multi` (PublisherManager auto top-up of publisher EOAs when balances drop below threshold), `runtime_config` (the former `slasher_config` and `sequencer_config` admin-API checks on one node: slasher inactivity-config getters, plus runtime `maxL2BlockGas`/`manaTarget` reconfiguration enforced via a live Bot). | +| `fees/` | Fee mechanics on a single node. `fee_asset_price_oracle` (on-chain fee-asset price-oracle convergence; starts its own Anvil instance with a MockStateView etched at the StateView address). The remaining files run on the `FeesTest` harness (`fees_test.ts`), which extends `SingleNodeTestContext` with the fee/gas domain setup (FPC funding, fee-juice bridging, banana token): `account_init` (fee payment during account-contract initialization), `failures` (fees still charged when txs revert in setup/app/teardown), `fee_juice_payments` (direct Fee Juice payment with and without initial funds), `fee_settings` (max-fee-per-gas handling, stale-fee-snapshot race, governance fee-config bump), `gas_estimation.parallel` (gas-estimation accuracy and FPC teardown gas prediction), `private_payments.parallel` (private fee payment via the BananaCoin FPC, plus the single-assertion public-FPC and sponsored-FPC payment checks folded onto the same fixture from the former `public_payments`/`sponsored_payments` files). | +| `cross-chain/` | L1↔L2 messaging on a single node, on the `CrossChainMessagingTest` harness (`cross_chain_messaging_test.ts`), which extends `SingleNodeTestContext` and owns a `CrossChainTestHarness` plus the L1 inbox/outbox handles (it auto-proves via an `EpochTestSettler` when no prover node runs). The shared L1→L2 message helpers live in `message_test_helpers.ts` (`createL1ToL2MessageHelpers`, whose injected `markAsProven` lets each suite plug in its own proving policy). `l1_to_l2` (L1→L2 message readiness and duplicate messages, over private and public scope), `l1_to_l2_inbox_drift` (inbox checkpoint drift after a rollup reorg, over private and public scope), `l2_to_l1` (L2→L1 message inclusion across single/multi-message txs and multi-block checkpoints, subtree-root balancing, and a reorg-and-remine case), `token_bridge` (private and public L1→L2 deposits and L2→L1 withdrawals via the TokenBridge — including mint-on-behalf — plus the withdrawal/claim failure cases, merged from the former three `token_bridge_*` files). | +| `bot/` | Transaction bot implementations. `bot` (transfer bot, AMM bot, and cross-chain bot; exercises fee-juice portal deposits, L2→L1 messages, and bot contract reuse). | +| `sync/` | World-state sync stress and snapshot sync. `synching` builds fixture block data (env-gated, slow) and replays it for sync benchmarks and prune/reorg scenarios (only the outer `it.each` runs in CI); `snapshot_sync` exercises the node snapshot upload/download path, syncing fresh nodes from one or multiple snapshot URLs, including fallback from a corrupted snapshot. | +| `proving/` | Epoch and proof lifecycle. `default_node` (basic proving/node coverage that shares one context-default node across three suites: consecutive epochs prove and finalized blocks are purged from world state beyond the checkpoint-history window, a proof is submitted even with no txs, and the node returns initial genesis-block data — the former `world_state_pruning`, `empty_blocks`, and `node_block_api` files), `long_proving_time` (a prover delay spanning multiple epochs), `multi_proof` (multiple prover nodes prove one epoch), `optimistic.parallel` (checkpoint-driven proving across the happy path and several mid-epoch / last-slot / during-proving reorg cases), `proof_fails.parallel` (proof not accepted after epoch end; proving aborts when the next epoch ends), `cross_chain_public_message` (an epoch with a public tx that consumes an L1→L2 message in the block it lands, guarding against a sequencer/prover state-root mismatch), `upload_failed_proof` (a failed proving job's state is uploaded and re-run on a fresh instance), `prover_restart.parallel` (a clean prover-node shutdown leaves its in-flight broker jobs untouched, and a restart against the same shared broker resumes proving from them rather than aborting and re-proving — one case gates the top tree and withholds the checkpoint-root proofs so those top-tree jobs are the in-flight, revived ones, the other starves agents from the start so real transaction base-rollup proofs are the in-flight, revived jobs). | +| `prover/` | Real-proof exercises on the `FullProverTest` harness (real Barretenberg when `FAKE_PROOFS=0`, fake otherwise), split by where the proving runs so CI can size their containers independently: `client/client` (client-side proof generation and `verifyProof` for private and public transfers, no on-chain submission) and `server/full` (the end-to-end pipeline: client proves, node builds blocks, prover node generates epoch proofs, L1 verifies them). | +>>>>>>> origin/v5-next | `partial-proofs/` | Manually driven partial-proof submission. `single_root` (the prover node's `startProof` path on a single root) and `multi_root` (three partial-proof roots are staged and messages consume against any covering root, exercising the multi-root Outbox semantics). | | `l1-reorgs/` | Behavior under L1 reorgs, split by what reorgs. `blocks.parallel` (prune L2 blocks when a reorg drops a proof, hold when a replacement proof lands in the window, restore blocks when a proof reappears, prune pending-chain blocks, and see new blocks added by a reorg) and `messages.parallel` (L1→L2 messages updated by a reorg, and a missed message inserted by one). `setup.ts` holds the shared `FAST_REORG_TIMING` profile and delayer wiring. | | `recovery/` | Reorg and pending-chain recovery. `manual_rollback` (the `rollbackTo` admin API rolls back to an unfinalized block), `sync_after_reorg` (a fresh node syncs world state past an unpruned reorg window), `prune_when_cannot_build` (a solo sequencer prunes the pending chain via the fallback path when it cannot propose). | diff --git a/yarn-project/end-to-end/src/single-node/block-building/block_building.test.ts b/yarn-project/end-to-end/src/single-node/block-building/block_building.test.ts index a0078fb1739a..0fa52e4e818e 100644 --- a/yarn-project/end-to-end/src/single-node/block-building/block_building.test.ts +++ b/yarn-project/end-to-end/src/single-node/block-building/block_building.test.ts @@ -503,7 +503,11 @@ describe('single-node/block-building/block_building', () => { const [accountData] = test.context.additionallyFundedAccounts; - const accountManager = await (wallet as TestWallet).createSchnorrAccount(accountData.secret, accountData.salt); + const accountManager = await (wallet as TestWallet).createSchnorrAccount( + accountData.secret, + accountData.salt, + accountData.signingKey, + ); const deployMethod = await accountManager.getDeployMethod(); await deployMethod.send({ from: NO_FROM, diff --git a/yarn-project/end-to-end/src/single-node/bot/bot.test.ts b/yarn-project/end-to-end/src/single-node/bot/bot.test.ts index 3a73306a5c8a..339641cdde64 100644 --- a/yarn-project/end-to-end/src/single-node/bot/bot.test.ts +++ b/yarn-project/end-to-end/src/single-node/bot/bot.test.ts @@ -22,6 +22,10 @@ import { EmbeddedWallet } from '@aztec/wallets/embedded'; import { jest } from '@jest/globals'; import { PIPELINED_FEE_PADDING, PIPELINING_SETUP_OPTS } from '../../fixtures/fixtures.js'; +<<<<<<< HEAD +======= +import { testSpan } from '../../fixtures/timing.js'; +>>>>>>> origin/v5-next import { getPrivateKeyFromIndex, setup } from '../../fixtures/utils.js'; import { NO_REORG_SUBMISSION_EPOCHS } from '../setup.js'; @@ -54,8 +58,15 @@ describe('single-node/bot/bot', () => { cheatCodes, config: { l1RpcUrls }, } = setupResult); +<<<<<<< HEAD wallet = await EmbeddedWallet.create(aztecNode, { ephemeral: true }); await wallet.createSchnorrInitializerlessAccount(botAccount.secret, botAccount.salt, botAccount.signingKey); +======= + wallet = await testSpan('setup:wallet', () => EmbeddedWallet.create(aztecNode, { ephemeral: true })); + await testSpan('wallet:create', () => + wallet.createSchnorrInitializerlessAccount(botAccount.secret, botAccount.salt, botAccount.signingKey), + ); +>>>>>>> origin/v5-next }); afterAll(() => teardown()); @@ -73,7 +84,9 @@ describe('single-node/bot/bot', () => { botMode: 'transfer', minFeePadding: PIPELINED_FEE_PADDING, }; - bot = await Bot.create(config, wallet, aztecNode, undefined, new BotStore(await openTmpStore('bot'))); + bot = await testSpan('setup:bot', async () => + Bot.create(config, wallet, aztecNode, undefined, new BotStore(await openTmpStore('bot'))), + ); }); // Runs bot.run() once and asserts recipient private and public balances each increase by 1. @@ -131,7 +144,7 @@ describe('single-node/bot/bot', () => { let store: BotStore; beforeAll(async () => { - store = new BotStore(await openTmpStore('bot')); + store = await testSpan('setup:bot', async () => new BotStore(await openTmpStore('bot'))); }); afterAll(async () => { @@ -238,7 +251,9 @@ describe('single-node/bot/bot', () => { followChain: 'CHECKPOINTED', botMode: 'amm', }; - bot = await AmmBot.create(config, wallet, aztecNode, undefined, new BotStore(await openTmpStore('bot'))); + bot = await testSpan('setup:bot', async () => + AmmBot.create(config, wallet, aztecNode, undefined, new BotStore(await openTmpStore('bot'))), + ); }); // Runs the AMM bot once and asserts one of the two private token balances decreased and @@ -302,12 +317,8 @@ describe('single-node/bot/bot', () => { flushSetupTransactions: true, l1ToL2SeedCount: 2, }; - bot = await CrossChainBot.create( - config, - wallet, - aztecNode, - aztecNodeAdmin, - new BotStore(await openTmpStore('bot')), + bot = await testSpan('setup:bot', async () => + CrossChainBot.create(config, wallet, aztecNode, aztecNodeAdmin, new BotStore(await openTmpStore('bot'))), ); }, 600_000); diff --git a/yarn-project/end-to-end/src/single-node/fees/account_init.test.ts b/yarn-project/end-to-end/src/single-node/fees/account_init.test.ts index b8aee5c64243..12da781fbdf1 100644 --- a/yarn-project/end-to-end/src/single-node/fees/account_init.test.ts +++ b/yarn-project/end-to-end/src/single-node/fees/account_init.test.ts @@ -33,8 +33,9 @@ describe('single-node/fees/account_init', () => { beforeAll(async () => { await t.setup({ ...PIPELINING_SETUP_OPTS }); - await t.applyFundAliceWithBananas(); - await t.applyFPCSetup(); + // Alice's banana mints and the BananaFPC deploy each depend only on the BananaCoin deployed + // during setup, so they run concurrently and share slots. + await Promise.all([t.applyFundAliceWithBananas(), t.applyFPCSetup()]); ({ aliceAddress, wallet, bananaCoin, bananaFPC, logger, aztecNode } = t); }); diff --git a/yarn-project/end-to-end/src/single-node/fees/failures.test.ts b/yarn-project/end-to-end/src/single-node/fees/failures.test.ts index 234b84c54f44..0640da34f502 100644 --- a/yarn-project/end-to-end/src/single-node/fees/failures.test.ts +++ b/yarn-project/end-to-end/src/single-node/fees/failures.test.ts @@ -57,7 +57,11 @@ describe('single-node/fees/failures', () => { aztecNode = t.aztecNode; // Prove up until the current state by advancing the epoch and waiting for the prover node. +<<<<<<< HEAD await t.cheatCodes.rollup.advanceToNextEpoch(); +======= + await t.advanceToNextEpoch(); +>>>>>>> origin/v5-next await t.catchUpProvenChain(); }); @@ -123,7 +127,11 @@ describe('single-node/fees/failures', () => { // @note There is a potential race condition here if other tests send transactions that get into the same // epoch and thereby pays out fees at the same time (when proven). +<<<<<<< HEAD await t.cheatCodes.rollup.advanceToNextEpoch(); +======= + await t.advanceToNextEpoch(); +>>>>>>> origin/v5-next const provenTimeout = (t.context.config.aztecProofSubmissionEpochs + 1) * t.context.config.aztecEpochDuration * @@ -362,7 +370,11 @@ describe('single-node/fees/failures', () => { ); // Prove the block containing the teardown-reverted tx (revert_code = 2). +<<<<<<< HEAD await t.cheatCodes.rollup.advanceToNextEpoch(); +======= + await t.advanceToNextEpoch(); +>>>>>>> origin/v5-next const provenTimeout = (t.context.config.aztecProofSubmissionEpochs + 1) * t.context.config.aztecEpochDuration * @@ -389,7 +401,11 @@ describe('single-node/fees/failures', () => { expect(receipt.executionResult).toBe(TxExecutionResult.REVERTED); expect(receipt.transactionFee).toBeGreaterThan(0n); +<<<<<<< HEAD await t.cheatCodes.rollup.advanceToNextEpoch(); +======= + await t.advanceToNextEpoch(); +>>>>>>> origin/v5-next const provenTimeout = (t.context.config.aztecProofSubmissionEpochs + 1) * t.context.config.aztecEpochDuration * diff --git a/yarn-project/end-to-end/src/single-node/fees/fees_test.ts b/yarn-project/end-to-end/src/single-node/fees/fees_test.ts index 0cc1d3a38a88..2fee621539fa 100644 --- a/yarn-project/end-to-end/src/single-node/fees/fees_test.ts +++ b/yarn-project/end-to-end/src/single-node/fees/fees_test.ts @@ -1,4 +1,9 @@ import type { AztecAddress } from '@aztec/aztec.js/addresses'; +<<<<<<< HEAD +======= +import { BatchCall } from '@aztec/aztec.js/contracts'; +import { Fr } from '@aztec/aztec.js/fields'; +>>>>>>> origin/v5-next import { createLogger } from '@aztec/aztec.js/log'; import type { AztecNode } from '@aztec/aztec.js/node'; import { CheatCodes, getTokenAllowedSetupFunctions } from '@aztec/aztec/testing'; @@ -17,6 +22,10 @@ import { TokenContract as BananaCoin } from '@aztec/noir-contracts.js/Token'; import { CounterContract } from '@aztec/noir-test-contracts.js/Counter'; import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice'; +<<<<<<< HEAD +======= +import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract'; +>>>>>>> origin/v5-next import { Gas, GasSettings } from '@aztec/stdlib/gas'; import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client'; @@ -33,14 +42,45 @@ import { } from '../../shared/gas_portal_test_harness.js'; import { TestWallet } from '../../test-wallet/test_wallet.js'; import { SingleNodeTestContext, type SingleNodeTestOpts } from '../single_node_test_context.js'; +<<<<<<< HEAD +======= + +// Fixed deploy salts so BananaCoin and its BananaFPC land at deterministic addresses given the FPC +// admin. This lets the BananaFPC's fee-juice balance be seeded at genesis (see `FeesTest.setup`) +// instead of bridged from L1 during setup — the address must be known before genesis is computed. +const BANANA_COIN_SALT = new Fr(0xba4a4a); +const BANANA_FPC_SALT = new Fr(0xfacade); + +const BANANA_COIN_CONSTRUCTOR_ARGS = ['BC', 'BC', 18n] as const; + +/** + * Computes the deterministic BananaCoin and BananaFPC instances for the given admin/deployer, matching + * what {@link FeesTest.applyDeployBananaToken} and {@link FeesTest.applyFPCSetup} deploy with the fixed + * salts above. Used both to seed the BananaFPC's fee juice at genesis and to assert the deployed + * addresses match the seeded one. + */ +async function computeBananaContractAddresses(admin: AztecAddress) { + const bananaCoin = await getContractInstanceFromInstantiationParams(BananaCoin.artifact, { + salt: BANANA_COIN_SALT, + constructorArgs: [admin, ...BANANA_COIN_CONSTRUCTOR_ARGS], + deployer: admin, + }); + const bananaFPC = await getContractInstanceFromInstantiationParams(FPCContract.artifact, { + salt: BANANA_FPC_SALT, + constructorArgs: [bananaCoin.address, admin], + deployer: admin, + }); + return { bananaCoinAddress: bananaCoin.address, bananaFPCAddress: bananaFPC.address }; +} +>>>>>>> origin/v5-next /** * Test fixture for testing fees. Provides the following setup steps: * InitialAccounts: Initializes 3 Schnorr account contracts. * PublicDeployAccounts: Deploys the accounts publicly. * DeployFeeJuice: Deploys the Fee Juice contract. - * FPCSetup: Deploys BananaCoin and FPC contracts, and bridges gas from L1. - * SponsoredFPCSetup: Deploys Sponsored FPC contract, and bridges gas from L1. + * FPCSetup: Deploys BananaCoin and FPC contracts; the FPC's fee juice is seeded at genesis. + * SponsoredFPCSetup: Registers the Sponsored FPC contract, whose fee juice is seeded at genesis. * FundAlice: Mints private and public bananas to Alice. * SetupSubscription: Deploys a counter contract and a subscription contract, and mints Fee Juice to the subscription contract. * @@ -116,6 +156,14 @@ export class FeesTest extends SingleNodeTestContext { ...this.setupOptions, ...opts, fundSponsoredFPC: true, +<<<<<<< HEAD +======= + // Seed the BananaFPC's fee juice at genesis instead of bridging it from L1 in applyFPCSetup. The + // FPC admin is the first account, so its address is deterministic once the accounts are generated. + computeExtraGenesisFundedAddresses: async defaultAccounts => [ + (await computeBananaContractAddresses(defaultAccounts[0].address)).bananaFPCAddress, + ], +>>>>>>> origin/v5-next l1ContractsArgs: { ...this.setupOptions }, txPublicSetupAllowListExtend: [...(this.setupOptions.txPublicSetupAllowListExtend ?? []), ...tokenAllowList], }); @@ -131,10 +179,23 @@ export class FeesTest extends SingleNodeTestContext { } async catchUpProvenChain() { - const bn = await this.aztecNode.getBlockNumber(); - while ((await this.aztecNode.getBlockNumber('proven')) < bn) { - await sleep(1000); - } + await testSpan('wait:proven-checkpoint', async () => { + const bn = await this.aztecNode.getBlockNumber(); + while ((await this.aztecNode.getBlockNumber('proven')) < bn) { + await sleep(1000); + } + }); + } + + /** Warps L1 to the next epoch boundary so the current epoch closes and can be proven. */ + async advanceToNextEpoch() { + await testSpan('warp:proven-checkpoint-epoch', () => this.cheatCodes.rollup.advanceToNextEpoch()); + } + + /** Advances to the next epoch and waits for the proven chain to catch up, so all prior fees are paid out. */ + async waitForEpochProven() { + await this.advanceToNextEpoch(); + await this.catchUpProvenChain(); } /** Advances to the next epoch and waits for the proven chain to catch up, so all prior fees are paid out. */ @@ -240,7 +301,14 @@ export class FeesTest extends SingleNodeTestContext { this.logger.info('Applying deploy banana token setup'); const { contract: bananaCoin } = await testSpan('deploy:token', () => +<<<<<<< HEAD BananaCoin.deploy(this.wallet, this.aliceAddress, 'BC', 'BC', 18n).send({ +======= + BananaCoin.deploy(this.wallet, this.aliceAddress, ...BANANA_COIN_CONSTRUCTOR_ARGS, { + salt: BANANA_COIN_SALT, + deployer: this.aliceAddress, + }).send({ +>>>>>>> origin/v5-next from: this.aliceAddress, }), ); @@ -263,15 +331,35 @@ export class FeesTest extends SingleNodeTestContext { const bananaCoin = this.bananaCoin; const { contract: bananaFPC } = await testSpan('deploy:fpc', () => +<<<<<<< HEAD FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin).send({ +======= + FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin, { + salt: BANANA_FPC_SALT, + deployer: this.aliceAddress, + }).send({ +>>>>>>> origin/v5-next from: this.aliceAddress, }), ); this.logger.info(`BananaPay deployed at ${bananaFPC.address}`); +<<<<<<< HEAD // bridgeFromL1ToL2 carries its own setup:bridge span. await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.aliceAddress); +======= + // The BananaFPC's fee juice is seeded at genesis (see FeesTest.setup) rather than bridged here. + // Assert the deploy landed at the seeded address so a params drift surfaces as a clear error rather + // than a downstream "insufficient fee payer balance". + const { bananaFPCAddress } = await computeBananaContractAddresses(this.aliceAddress); + if (!bananaFPC.address.equals(bananaFPCAddress)) { + throw new Error( + `Deployed BananaFPC address ${bananaFPC.address} does not match the genesis-funded address ` + + `${bananaFPCAddress}; the deterministic deploy params drifted from the genesis funding computation.`, + ); + } +>>>>>>> origin/v5-next this.bananaFPC = bananaFPC; @@ -352,12 +440,33 @@ export class FeesTest extends SingleNodeTestContext { public async applyFundAliceWithBananas() { this.logger.info('Applying fund Alice with bananas setup'); +<<<<<<< HEAD await this.mintPrivateBananas(this.ALICE_INITIAL_BANANAS, this.aliceAddress); await testSpan('tx:mint', () => this.bananaCoin.methods.mint_to_public(this.aliceAddress, this.ALICE_INITIAL_BANANAS).send({ from: this.aliceAddress, }), ); +======= + // Both mints are alice sends on BananaCoin touching disjoint balances, so they ride a single + // BatchCall tx (one proof, one slot) rather than two concurrent txs. The PXE serializes proving, + // so two concurrent sends would still be proven back-to-back and land in consecutive slots. + const { result: privateBalanceBefore } = await this.bananaCoin.methods + .balance_of_private(this.aliceAddress) + .simulate({ from: this.aliceAddress }); + + await testSpan('tx:mint', () => + new BatchCall(this.wallet, [ + this.bananaCoin.methods.mint_to_private(this.aliceAddress, this.ALICE_INITIAL_BANANAS), + this.bananaCoin.methods.mint_to_public(this.aliceAddress, this.ALICE_INITIAL_BANANAS), + ]).send({ from: this.aliceAddress }), + ); + + const { result: privateBalanceAfter } = await this.bananaCoin.methods + .balance_of_private(this.aliceAddress) + .simulate({ from: this.aliceAddress }); + expect(privateBalanceAfter).toEqual(privateBalanceBefore + this.ALICE_INITIAL_BANANAS); +>>>>>>> origin/v5-next } public async applyFundAliceWithPrivateBananas() { diff --git a/yarn-project/end-to-end/src/single-node/fees/gas_estimation.parallel.test.ts b/yarn-project/end-to-end/src/single-node/fees/gas_estimation.parallel.test.ts index 395bb286069d..c4d3d67f04e8 100644 --- a/yarn-project/end-to-end/src/single-node/fees/gas_estimation.parallel.test.ts +++ b/yarn-project/end-to-end/src/single-node/fees/gas_estimation.parallel.test.ts @@ -46,8 +46,9 @@ describe('single-node/fees/gas_estimation', () => { beforeAll(async () => { await t.setup({ ...PIPELINING_SETUP_OPTS }); - await t.applyFPCSetup(); - await t.applyFundAliceWithBananas(); + // Alice's banana mints and the BananaFPC deploy each depend only on the BananaCoin deployed + // during setup, so they run concurrently and share slots. + await Promise.all([t.applyFPCSetup(), t.applyFundAliceWithBananas()]); ({ wallet, aliceAddress, bobAddress, bananaCoin, bananaFPC, gasSettings, logger, aztecNode } = t); }); diff --git a/yarn-project/end-to-end/src/single-node/fees/private_payments.parallel.test.ts b/yarn-project/end-to-end/src/single-node/fees/private_payments.parallel.test.ts index ad155ec4a467..e9a901861e23 100644 --- a/yarn-project/end-to-end/src/single-node/fees/private_payments.parallel.test.ts +++ b/yarn-project/end-to-end/src/single-node/fees/private_payments.parallel.test.ts @@ -46,11 +46,18 @@ describe('single-node/fees/private_payments', () => { // cycle: the prover-node submits a proof as soon as the epoch is complete, so ~8x shorter // epochs ≈ ~8x faster proof cadence per cycle. Setup itself stays slot-bound. await t.setup({ ...PIPELINING_SETUP_OPTS, aztecProofSubmissionEpochs: 640, aztecEpochDuration: 4 }); +<<<<<<< HEAD await t.applyFPCSetup(); // Register the SponsoredFPC (funded at genesis via FeesTest's fundSponsoredFPC) so the folded // sponsored-payment it can use it; this is a PXE registration, not an L2 tx. await t.applySponsoredFPCSetup(); await t.applyFundAliceWithBananas(); +======= + // The BananaFPC deploy, the SponsoredFPC registration (funded at genesis via FeesTest's + // fundSponsoredFPC; a PXE registration, not an L2 tx), and Alice's banana mints each depend only + // on the BananaCoin deployed during setup, so they run concurrently and share slots. + await Promise.all([t.applyFPCSetup(), t.applySponsoredFPCSetup(), t.applyFundAliceWithBananas()]); +>>>>>>> origin/v5-next ({ wallet, aliceAddress, @@ -140,7 +147,7 @@ describe('single-node/fees/private_payments', () => { const provenCheckpointBefore = await t.rollupContract.getProvenCheckpointNumber(); const receipt = await localTx.send({ timeout: 300, interval: 10 }); - await t.cheatCodes.rollup.advanceToNextEpoch(); + await t.advanceToNextEpoch(); await waitForProven(aztecNode, receipt, { provenTimeout: 300 }); diff --git a/yarn-project/end-to-end/src/single-node/l1-reorgs/setup.ts b/yarn-project/end-to-end/src/single-node/l1-reorgs/setup.ts index c8f0737a6a8f..7be5a485e750 100644 --- a/yarn-project/end-to-end/src/single-node/l1-reorgs/setup.ts +++ b/yarn-project/end-to-end/src/single-node/l1-reorgs/setup.ts @@ -24,7 +24,11 @@ export const TX_COUNT = 8; /** * The single-node + prover-node fixture shared by the L1-reorg suites (`blocks`, `messages`). Stands * up a {@link SingleNodeTestContext} on the {@link FAST_REORG_TIMING} cadence (ethSlot=4s, +<<<<<<< HEAD * aztecSlot=36s, block=8s, epoch=4, 32 slots/epoch) with L1 speed-ups disabled so prover/sequencer txs +======= + * aztecSlot=24s, block=5s, epoch=4, 32 slots/epoch) with L1 speed-ups disabled so prover/sequencer txs +>>>>>>> origin/v5-next * can be held back and reorged, registers a {@link TestContract}, and exposes the per-test handles plus * a `sendTransactions` helper that pre-proves and fires `count` lightweight txs to drive multi-block * checkpoints. Reorgs themselves are driven by `EthCheatCodes.reorg`/`reorgWithReplacement` at the call @@ -47,14 +51,22 @@ export class L1ReorgsTest { public async setup(): Promise { this.test = await setupWithProver({ +<<<<<<< HEAD ...FAST_REORG_TIMING, // ethSlot=4s, aztecSlot=36s, block=8s, epoch=4, 32 slots/epoch (mainnet) +======= + ...FAST_REORG_TIMING, // ethSlot=4s, aztecSlot=24s, block=5s, epoch=4, 32 slots/epoch (mainnet) +>>>>>>> origin/v5-next numberOfAccounts: 1, maxSpeedUpAttempts: 0, // Do not speed up l1 txs, we dont want them to land cancelTxOnTimeout: false, minTxsPerBlock: 0, maxTxsPerBlock: 1, aztecProofSubmissionEpochs: 1, +<<<<<<< HEAD // Pipelining + multi-blocks-per-slot: 8s blocks fit ~4 blocks per 36s slot, and TX_COUNT=8 +======= + // Pipelining + multi-blocks-per-slot: 5s blocks fit ~3 blocks per 24s slot, and TX_COUNT=8 +>>>>>>> origin/v5-next // ensures multiple checkpoints have multiple blocks }); ({ diff --git a/yarn-project/end-to-end/src/single-node/proving/optimistic.parallel.test.ts b/yarn-project/end-to-end/src/single-node/proving/optimistic.parallel.test.ts index 8a719cd3556c..81763b11fc75 100644 --- a/yarn-project/end-to-end/src/single-node/proving/optimistic.parallel.test.ts +++ b/yarn-project/end-to-end/src/single-node/proving/optimistic.parallel.test.ts @@ -24,9 +24,15 @@ jest.setTimeout(1000 * 60 * 20); * Setup: a single sequencer/validator node from `setupWithProver` plus the context's fake prover-node (no * `mockGossipSubNetwork`, so no gossip bus), making this a `single-node` test on the production `Sequencer`. Each of the * six `describe` blocks builds a fresh context in its own `beforeEach` and tears it down in the shared `afterEach`. The +<<<<<<< HEAD * happy-path pair uses defaults (`numberOfAccounts: 1`; ethSlot=8s local/12s CI, aztecSlot=16s/24s, epoch=6, * proofSubEpochs=1); the five reorg describes use a faster cadence (ethSlot=4s, aztecSlot=36s, epoch=4 — or 8 for the * with-replacement case so the replacement lands in-epoch — proofSubEpochs=NO_REORG_SUBMISSION_EPOCHS, blockDurationMs=8s, minTxsPerBlock=0, +======= + * happy-path pair uses defaults (`numberOfAccounts: 1`; ethSlot=8s, aztecSlot=16s, epoch=6, + * proofSubEpochs=1); the five reorg describes use a faster cadence (ethSlot=4s, aztecSlot=24s, epoch=4 — or 8 for the + * with-replacement case so the replacement lands in-epoch — proofSubEpochs=NO_REORG_SUBMISSION_EPOCHS, blockDurationMs=5s, minTxsPerBlock=0, +>>>>>>> origin/v5-next * anvilSlotsInAnEpoch=32, maxSpeedUpAttempts=0, cancelTxOnTimeout=false). The `prover-node starts mid-epoch` describe * sets `startProverNode: false` and spins up the prover via `test.createProverNode()` partway through the epoch. * @@ -338,6 +344,7 @@ describe('single-node/proving/optimistic', () => { timeout: 30, }); +<<<<<<< HEAD // Verify the prover-node observes the prune. `markPruned()` fires reactively when // the L2BlockStream emits the prune; the SlotWatcher then reaps the (now pruned) // prover on its next tick (default 1s), so checking strictly for `isPruned()` would @@ -345,15 +352,28 @@ describe('single-node/proving/optimistic', () => { // checkpoint numbers refill sequentially after a reorg, so the replacement reuses // the same number but lives at a different slot. Accept either state for the // original: still in the store and pruned, or already reaped. +======= + // Verify the prover-node observes the prune. The prune reactively cancels and removes the + // orphaned prover from the store when the L2BlockStream emits it, so the original should drop + // out of the store (or, if observed mid-race, be cancelled). Identify the original by + // `(checkpointNumber, slot)` — checkpoint numbers refill sequentially after a reorg, so the + // replacement reuses the same number but lives at a different slot. +>>>>>>> origin/v5-next await retryUntil( () => { const prover = proverNode .getCheckpointStore() .listAll() .find(p => p.checkpoint.number === checkpointBeforeReorg && p.slotNumber === originalSlot); +<<<<<<< HEAD return Promise.resolve(!prover || prover.isPruned()); }, `prover marks original checkpoint ${checkpointBeforeReorg} (slot ${originalSlot}) as pruned (or reaps it)`, +======= + return Promise.resolve(!prover || prover.isCancelled()); + }, + `prover cancels and removes original checkpoint ${checkpointBeforeReorg} (slot ${originalSlot})`, +>>>>>>> origin/v5-next 30, 0.2, ); @@ -383,7 +403,11 @@ describe('single-node/proving/optimistic', () => { proverNode .getCheckpointStore() .listAll() +<<<<<<< HEAD .some(p => p.checkpoint.number === replacementCheckpoint && !p.isPruned()), +======= + .some(p => p.checkpoint.number === replacementCheckpoint), +>>>>>>> origin/v5-next ), `prover re-creates sub-tree for replacement checkpoint ${replacementCheckpoint}`, 30, @@ -875,7 +899,11 @@ describe('single-node/proving/optimistic', () => { // The session manager constructs a full session over the canonical content for the // anchored epoch when it completes, then proves it; the store retains the provers // until expiry. +<<<<<<< HEAD const epochCheckpointsInStore = await proverNode.getCheckpointStore().listCanonicalForEpoch(epoch); +======= + const epochCheckpointsInStore = await proverNode.getCheckpointStore().listForEpoch(epoch); +>>>>>>> origin/v5-next const storedNumbers = new Set(epochCheckpointsInStore.map(p => p.checkpoint.number)); for (const n of preSpawnCheckpointNumbers) { expect(storedNumbers.has(n)).toBe(true); diff --git a/yarn-project/end-to-end/src/single-node/proving/prover_restart.parallel.test.ts b/yarn-project/end-to-end/src/single-node/proving/prover_restart.parallel.test.ts new file mode 100644 index 000000000000..319ffee9e94f --- /dev/null +++ b/yarn-project/end-to-end/src/single-node/proving/prover_restart.parallel.test.ts @@ -0,0 +1,424 @@ +import type { Logger } from '@aztec/aztec.js/log'; +import type { RollupContract } from '@aztec/ethereum/contracts'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { promiseWithResolvers } from '@aztec/foundation/promise'; +import { retryUntil } from '@aztec/foundation/retry'; +import { type ProvingBroker, createAndStartProvingBroker } from '@aztec/prover-client/broker'; +import type { TestProverNode } from '@aztec/prover-node/test'; +import { EthAddress } from '@aztec/stdlib/block'; +import { getEpochAtSlot } from '@aztec/stdlib/epoch-helpers'; +import type { + AztecNode, + GetProvingJobResponse, + ProofUri, + ProvingJob, + ProvingJobBroker, + ProvingJobFilter, + ProvingJobId, + ProvingJobStatus, +} from '@aztec/stdlib/interfaces/server'; +import { ProvingRequestType } from '@aztec/stdlib/proofs'; +import { getTelemetryClient } from '@aztec/telemetry-client'; + +import { expect, jest } from '@jest/globals'; + +import type { EndToEndContext } from '../../fixtures/utils.js'; +import { proveInteraction } from '../../test-wallet/utils.js'; +import { NO_REORG_SUBMISSION_EPOCHS, setupWithProver } from '../setup.js'; +import { FAST_REORG_TIMING, SingleNodeTestContext } from '../single_node_test_context.js'; + +jest.setTimeout(1000 * 60 * 20); + +const ALL_PROVING_TYPES = Object.values(ProvingRequestType).filter( + (t): t is ProvingRequestType => typeof t === 'number', +); + +const isParity = (type: ProvingRequestType) => + type === ProvingRequestType.PARITY_BASE || type === ProvingRequestType.PARITY_ROOT; + +const isTxBaseRollup = (type: ProvingRequestType) => + type === ProvingRequestType.PRIVATE_TX_BASE_ROLLUP || type === ProvingRequestType.PUBLIC_TX_BASE_ROLLUP; + +// Checkpoint-root proofs are enqueued by the top-tree orchestrator (unlike parity, which is a +// block/sub-tree proof). A single-block checkpoint uses the SINGLE_BLOCK variant. Both are the +// "non-parity top-tree" jobs we withhold from agents to catch them in flight. +const CHECKPOINT_ROOT_TYPES = [ + ProvingRequestType.CHECKPOINT_ROOT_ROLLUP, + ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP, +]; +const isCheckpointRoot = (type: ProvingRequestType) => CHECKPOINT_ROOT_TYPES.includes(type); + +/** + * A thin proxy over a real {@link ProvingBroker} that (a) records every job enqueue and cancel so the + * test can assert what the prover node did, and (b) can starve agents on demand so proving jobs pile + * up unproven at the broker. It deliberately has no `stop()` method, so the prover node's shutdown + * (`tryStop` on its job producer) does not stop the underlying broker — the broker outlives the node + * and carries the in-flight jobs across a restart, exactly like a production external broker service. + */ +class RecordingBrokerProxy implements ProvingJobBroker { + /** When true, agents get no work (getProvingJob returns undefined) and the piggybacked next job on a report is withheld. */ + public agentsPaused = false; + /** + * Job types withheld from agents: their dependencies still prove, but these jobs are never handed + * out, so they pile up `in-queue` — letting the test catch a specific layer (e.g. checkpoint-root + * proofs) in flight without stalling everything else. + */ + public captureTypes = new Set(); + /** Every job passed to enqueueProvingJob, with the status the broker returned at the start of that call. */ + public readonly enqueues: { job: ProvingJob; returnedStatus: ProvingJobStatus['status'] }[] = []; + /** Every job id passed to cancelProvingJob. On a clean shutdown this must stay empty. */ + public readonly cancels: ProvingJobId[] = []; + + constructor(private readonly inner: ProvingBroker) {} + + // Narrow the agent's allow-list to exclude the captured types, so the broker never hands those jobs + // to an agent (via getProvingJob or the piggybacked next-job on a report). + private withCapture(filter?: ProvingJobFilter): ProvingJobFilter | undefined { + if (this.captureTypes.size === 0) { + return filter; + } + const base = filter?.allowList?.length ? filter.allowList : ALL_PROVING_TYPES; + return { allowList: base.filter(t => !this.captureTypes.has(t)) }; + } + + async enqueueProvingJob(job: ProvingJob): Promise { + const status = await this.inner.enqueueProvingJob(job); + this.enqueues.push({ job, returnedStatus: status.status }); + return status; + } + + cancelProvingJob(id: ProvingJobId): Promise { + this.cancels.push(id); + return this.inner.cancelProvingJob(id); + } + + getProvingJobStatus(id: ProvingJobId): Promise { + return this.inner.getProvingJobStatus(id); + } + + getCompletedJobs(ids: ProvingJobId[]): Promise { + return this.inner.getCompletedJobs(ids); + } + + getProvingJob(filter?: ProvingJobFilter): Promise { + return this.agentsPaused ? Promise.resolve(undefined) : this.inner.getProvingJob(this.withCapture(filter)); + } + + async reportProvingJobSuccess( + id: ProvingJobId, + result: ProofUri, + filter?: ProvingJobFilter, + ): Promise { + // Always settle the reported job (its result must be cached for reuse), but while paused withhold + // the next job the broker hands back so no new work starts. + const next = await this.inner.reportProvingJobSuccess(id, result, this.withCapture(filter)); + return this.agentsPaused ? undefined : next; + } + + async reportProvingJobError( + id: ProvingJobId, + err: string, + retry?: boolean, + filter?: ProvingJobFilter, + ): Promise { + const next = await this.inner.reportProvingJobError(id, err, retry, this.withCapture(filter)); + return this.agentsPaused ? undefined : next; + } + + reportProvingJobProgress( + id: ProvingJobId, + startedAt: number, + filter?: ProvingJobFilter, + ): Promise { + return this.inner.reportProvingJobProgress(id, startedAt, filter); + } +} + +/** + * E2E tests for a clean prover-node restart with jobs in flight at a shared broker. + * + * A clean prover-node shutdown must NOT abort its in-flight broker jobs — sessions are cancelled with + * `abortJobs: false` and checkpoint sub-trees with `cancelJobsOnStop: false` — so a restarted node + * re-requests them and the broker returns the existing jobs rather than a fresh `not-found`. The + * end-state alone ("epoch proven after restart") does not prove this: aborted jobs are revivable at + * the broker, so proving would recover even if the jobs were wrongly aborted. The discriminating + * assertions are that the shutdown issued zero `cancelProvingJob` calls and that the in-flight jobs + * remain `in-queue` (not `aborted`) across it. + * + * The broker is a test-owned object shared across both prover-node incarnations (production's external + * broker topology), so the in-flight jobs survive the restart in memory. + * + * Two scenarios, covering different layers of the proof tree in flight at shutdown: + * - top-tree checkpoint-root proofs: gate the top tree, then withhold only the checkpoint-root jobs + * from agents so everything below proves and the checkpoint roots sit in flight. These are enqueued + * by the top-tree orchestrator, so this exercises the `abortJobs: false` top-tree cancel path. + * - sub-tree transaction proofs: starve agents from the start so the transaction base rollups sit in + * flight, preserved by the checkpoint sub-tree's `cancelJobsOnStop: false`. + */ +describe('single-node/proving/prover_restart', () => { + let test: SingleNodeTestContext; + let context: EndToEndContext; + let node: AztecNode; + let rollup: RollupContract; + let logger: Logger; + let L2_SLOT_DURATION_IN_S: number; + + let realBroker: ProvingBroker; + let broker: RecordingBrokerProxy; + + const PINNED_PROVER_ID = EthAddress.fromNumber(1); + + // A shared in-memory broker (no dataDirectory) that outlives each prover node. + const createSharedBroker = async () => { + realBroker = await createAndStartProvingBroker( + { ...context.config, dataDirectory: undefined }, + getTelemetryClient(), + ); + broker = new RecordingBrokerProxy(realBroker); + }; + + afterEach(async () => { + await test?.teardown(); + await realBroker?.stop(); + }); + + describe('in-flight checkpoint-root proofs', () => { + beforeEach(async () => { + test = await setupWithProver({ + ...FAST_REORG_TIMING, + // We own prover-node creation so we can inject the shared broker and drive the stop/restart. + startProverNode: false, + maxSpeedUpAttempts: 0, + cancelTxOnTimeout: false, + minTxsPerBlock: 0, + aztecProofSubmissionEpochs: NO_REORG_SUBMISSION_EPOCHS, + // Recover promptly from any job left in-progress by a withheld piggyback, and never fail a job + // for retrying while agents are paused. + proverBrokerJobTimeoutMs: 2_000, + proverBrokerPollIntervalMs: 500, + proverBrokerJobMaxRetries: 1_000, + }); + ({ rollup, logger, context } = test); + ({ L2_SLOT_DURATION_IN_S } = test); + node = context.aztecNode; + await createSharedBroker(); + }); + + it('preserves and revives in-flight checkpoint-root proofs across a clean prover-node restart', async () => { + // Prover node #1, wired to the shared broker and a pinned prover id (so a restart re-requests the + // exact same content-addressed job ids). + const node1 = await test.createProverNode({ proverNodeDeps: { broker }, proverId: PINNED_PROVER_ID }); + const proverNode1 = node1.getProverNode() as TestProverNode; + + // Gate top-tree proving of the first full session so it blocks until we release it, giving us a + // deterministic point at which the top tree begins enqueuing its jobs. + const { promise: provingGate, resolve: releaseProvingGate } = promiseWithResolvers(); + let gatedSession: ReturnType[number] | undefined; + proverNode1.setSessionHooks({ + beforeTopTreeProve: async () => { + // EpochSession flips to `awaiting-root` before awaiting this hook, so the gating session is + // the live full session in that state. First one to arrive is the one we gate; later ones + // sail through once the gate is released. + const session = proverNode1.sessionManager + .allSessions() + .find(s => s.getKind() === 'full' && s.getState() === 'awaiting-root'); + if (!session) { + return; + } + gatedSession ??= session; + logger.warn(`Top-tree proving gated for epoch ${session.getEpochNumber()} — waiting for test to release`); + await provingGate; + logger.warn(`Proving gate released for epoch ${session.getEpochNumber()}`); + }, + }); + + // Wait for a full session to complete its checkpoints and block at the top-tree gate. + const inFlightSession = await retryUntil( + () => Promise.resolve(gatedSession), + 'full session blocks at the top-tree proving gate', + L2_SLOT_DURATION_IN_S * 12, + 0.5, + ); + const gatedEpoch = inFlightSession.getEpochNumber(); + const checkpoints = inFlightSession.getCheckpoints(); + const epochEndCheckpoint = checkpoints[checkpoints.length - 1].checkpoint.number; + logger.info(`Epoch ${gatedEpoch} is gated at top-tree proving (ends at checkpoint ${epochEndCheckpoint})`); + + // Stop block production so the system goes quiescent (no new sub-tree work), then withhold the + // checkpoint-root proofs from agents. Everything below (tx/block/parity sub-tree work) still + // proves, so the top tree reaches and enqueues its checkpoint-root jobs — which then sit + // `in-queue`, leaving the top tree mid-proof at shutdown. This is the fix's real target: a + // top-tree job (not a leaf parity job) in flight. + await context.aztecNodeAdmin!.setConfig({ skipPublishingCheckpointsPercent: 100 }); + broker.captureTypes = new Set(CHECKPOINT_ROOT_TYPES); + releaseProvingGate(); + + // Wait until at least one checkpoint-root job for the gated epoch is pending at the broker. + const pendingCheckpointRootIds = await retryUntil( + async () => { + const candidates = broker.enqueues + .filter(e => e.job.epochNumber === gatedEpoch && isCheckpointRoot(e.job.type)) + .map(e => e.job.id); + const inQueue: ProvingJobId[] = []; + for (const id of new Set(candidates)) { + if ((await broker.getProvingJobStatus(id)).status === 'in-queue') { + inQueue.push(id); + } + } + return inQueue.length > 0 ? inQueue : undefined; + }, + 'checkpoint-root jobs are enqueued and pending at the broker', + 60, + 0.5, + ); + logger.info( + `${pendingCheckpointRootIds.length} checkpoint-root job(s) pending at the broker for epoch ${gatedEpoch}`, + ); + + // Clean shutdown: this drives SessionManager.stop() -> session.cancel({ abortJobs: false }) -> + // TopTreeJob.cancel(false), which must NOT abort the in-flight checkpoint-root jobs. + const cancelsBeforeStop = broker.cancels.length; + await node1.stop(); + + // The fix under test: a clean shutdown leaves the in-flight jobs untouched. Pre-fix, the shutdown + // would abort them — a non-empty `cancels` and an `aborted` status. + expect(broker.cancels.length).toBe(cancelsBeforeStop); + for (const id of pendingCheckpointRootIds) { + expect((await broker.getProvingJobStatus(id)).status).toBe('in-queue'); + } + logger.info('Clean shutdown preserved the in-flight checkpoint-root jobs at the broker'); + + // Restart: a fresh prover node against the SAME broker and the same prover id. It resyncs from L1 + // and re-drives the epoch; re-requesting the preserved jobs reuses them rather than re-proving. + const enqueuesBeforeRestart = broker.enqueues.length; + const node2 = await test.createProverNode({ proverNodeDeps: { broker }, proverId: PINNED_PROVER_ID }); + expect((node2.getProverNode() as TestProverNode).getProverId()).toEqual(PINNED_PROVER_ID); + broker.captureTypes = new Set(); + + // Proving resumes automatically and the epoch lands on L1. + await test.waitUntilProvenCheckpointNumber(epochEndCheckpoint, 240); + expect(await rollup.getProvenCheckpointNumber()).toBeGreaterThanOrEqual(epochEndCheckpoint); + logger.info(`Epoch ${gatedEpoch} proven on L1 up to checkpoint ${epochEndCheckpoint} after restart`); + + // Reuse: the checkpoint-root proofs that were pending before the stop are re-requested and reused + // (returned with an existing status, never a fresh `not-found`, and never `aborted`). These are + // top-tree, non-parity proofs. + const reRequests = broker.enqueues.slice(enqueuesBeforeRestart); + const revivedCheckpointRoots = reRequests.filter( + e => pendingCheckpointRootIds.includes(e.job.id) && e.returnedStatus !== 'not-found', + ); + expect(revivedCheckpointRoots.length).toBeGreaterThan(0); + expect(revivedCheckpointRoots.every(e => isCheckpointRoot(e.job.type) && !isParity(e.job.type))).toBe(true); + expect(reRequests.every(e => e.returnedStatus !== 'aborted')).toBe(true); + }); + }); + + describe('in-flight transaction proofs', () => { + beforeEach(async () => { + test = await setupWithProver({ + ...FAST_REORG_TIMING, + numberOfAccounts: 1, + startProverNode: false, + maxSpeedUpAttempts: 0, + cancelTxOnTimeout: false, + minTxsPerBlock: 0, + aztecProofSubmissionEpochs: NO_REORG_SUBMISSION_EPOCHS, + // Keep the frozen epoch's jobs around while block production advances during the freeze. + proverBrokerMaxEpochsToKeepResultsFor: 10, + }); + ({ rollup, logger, context } = test); + node = context.aztecNode; + await createSharedBroker(); + }); + + it('preserves and revives in-flight checkpoint prover jobs across a clean prover-node restart', async () => { + // Starve agents before the prover node exists: it will enqueue jobs at the broker but prove none. + broker.agentsPaused = true; + + const node1 = await test.createProverNode({ proverNodeDeps: { broker }, proverId: PINNED_PROVER_ID }); + expect((node1.getProverNode() as TestProverNode).getProverId()).toEqual(PINNED_PROVER_ID); + + // Anchor on a fresh epoch, then land a couple of real txs in it so the broker gets actual + // transaction base-rollup jobs (not just the empty-block parity/root jobs). + await test.waitUntilNextEpochStarts(); + const contract = await test.registerTestContract(context.wallet); + const receipts = []; + for (let i = 0; i < 2; i++) { + const provenTx = await proveInteraction(context.wallet, contract.methods.emit_nullifier(new Fr(i + 1)), { + from: context.accounts[0], + }); + receipts.push(await provenTx.send()); + } + const txCheckpoint = (await node.getBlock(receipts[receipts.length - 1].blockNumber!))!.checkpointNumber; + const txCp = await retryUntil( + async () => (await node.getCheckpoints(txCheckpoint, 1))[0], + `archiver indexes checkpoint ${txCheckpoint}`, + 30, + 0.2, + ); + const txEpoch = getEpochAtSlot(txCp.header.slotNumber, test.constants); + logger.info(`Landed 2 txs in checkpoint ${txCheckpoint} (epoch ${txEpoch})`); + + // Wait until the transaction base-rollup jobs are enqueued and pending (in-queue) at the broker — + // these are the non-parity proofs we want to see revived. Agents are starved, so they cannot + // complete. + const pendingTxProofIds = await retryUntil( + async () => { + const ids = [...new Set(broker.enqueues.filter(e => isTxBaseRollup(e.job.type)).map(e => e.job.id))]; + const inQueue: ProvingJobId[] = []; + for (const id of ids) { + if ((await broker.getProvingJobStatus(id)).status === 'in-queue') { + inQueue.push(id); + } + } + return inQueue.length > 0 ? inQueue : undefined; + }, + 'transaction base-rollup jobs are enqueued and pending at the broker', + 60, + 0.5, + ); + logger.info( + `${pendingTxProofIds.length} transaction base-rollup job(s) pending at the broker for epoch ${txEpoch}`, + ); + + // Complete the epoch on L1 (so a restart can prove it), then stop producing so no further epochs + // pile up jobs while the prover is down. + await test.warpToEpochStart(txEpoch + 1); + await context.aztecNodeAdmin!.setConfig({ skipPublishingCheckpointsPercent: 100 }); + const epochEndCheckpoint = (await test.monitor.run(true)).checkpointNumber; + expect(epochEndCheckpoint).toBeGreaterThanOrEqual(txCheckpoint); + + // Clean shutdown: this must not abort any broker jobs. + const cancelsBeforeStop = broker.cancels.length; + const enqueuesBeforeRestart = broker.enqueues.length; + await node1.stop(); + + expect(broker.cancels.length).toBe(cancelsBeforeStop); + for (const id of pendingTxProofIds) { + expect((await broker.getProvingJobStatus(id)).status).toBe('in-queue'); + } + logger.info('Clean shutdown preserved the in-flight transaction proofs at the broker'); + + // Restart against the same broker with the same prover id and let agents run. + const node2 = await test.createProverNode({ proverNodeDeps: { broker }, proverId: PINNED_PROVER_ID }); + expect((node2.getProverNode() as TestProverNode).getProverId()).toEqual(PINNED_PROVER_ID); + broker.agentsPaused = false; + + // Proving resumes automatically and the epoch lands on L1. + await test.waitUntilProvenCheckpointNumber(epochEndCheckpoint, 240); + expect(await rollup.getProvenCheckpointNumber()).toBeGreaterThanOrEqual(epochEndCheckpoint); + logger.info(`Epoch ${txEpoch} proven on L1 up to checkpoint ${epochEndCheckpoint} after restart`); + + // The transaction proofs that were pending before the stop are re-requested and reused (returned + // with an existing status, never a fresh `not-found`, and never `aborted`). + const reRequests = broker.enqueues.slice(enqueuesBeforeRestart); + const revivedTxProofs = reRequests.filter( + e => pendingTxProofIds.includes(e.job.id) && e.returnedStatus !== 'not-found', + ); + expect(revivedTxProofs.length).toBeGreaterThan(0); + // The revived work is genuinely non-parity (the leaf parity jobs are not what we're asserting on). + expect(revivedTxProofs.every(e => !isParity(e.job.type))).toBe(true); + expect(reRequests.every(e => e.returnedStatus !== 'aborted')).toBe(true); + }); + }); +}); diff --git a/yarn-project/end-to-end/src/single-node/single_node_test_context.ts b/yarn-project/end-to-end/src/single-node/single_node_test_context.ts index 8a119b75d856..9dd3bfe90461 100644 --- a/yarn-project/end-to-end/src/single-node/single_node_test_context.ts +++ b/yarn-project/end-to-end/src/single-node/single_node_test_context.ts @@ -27,7 +27,11 @@ import { executeTimeout } from '@aztec/foundation/timer'; import { SpamContract } from '@aztec/noir-test-contracts.js/Spam'; import { TestContract } from '@aztec/noir-test-contracts.js/Test'; import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers'; +<<<<<<< HEAD import type { ProverNodeConfig } from '@aztec/prover-node'; +======= +import type { ProverNodeConfig, ProverNodeDeps } from '@aztec/prover-node'; +>>>>>>> origin/v5-next import type { PXEConfig } from '@aztec/pxe/config'; import { type Sequencer, type SequencerClient, type SequencerEvents, SequencerState } from '@aztec/sequencer-client'; import { type BlockParameter, EthAddress } from '@aztec/stdlib/block'; @@ -60,7 +64,18 @@ import type { TestWallet } from '../test-wallet/test_wallet.js'; export const WORLD_STATE_CHECKPOINT_HISTORY = 2; export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50; export const ARCHIVER_POLL_INTERVAL = 50; +<<<<<<< HEAD export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8; +======= +/** + * Default L1 (ethereum) slot duration in seconds for single-node e2e tests. Kept at 8s, the fast-profile + * boundary (`FAST_PROFILE_ETHEREUM_SLOT_DURATION`): at 8s the proposer still uses the production operational + * budgets (fast-profile clamping only kicks in strictly below 8s), so the default single-node L2 slot is + * `2 x 8 = 16s`. CI previously ran at 12s (24s L2 slots); unifying it with the local value removes a + * CI-vs-local cadence asymmetry and cuts every default-cadence single-node suite by a third. + */ +export const DEFAULT_L1_BLOCK_TIME = 8; +>>>>>>> origin/v5-next export type SingleNodeTestOpts = Partial & { numberOfAccounts?: number; @@ -87,15 +102,28 @@ export type TrackedSequencerEvent = { export type BlockProposedEvent = { blockNumber: BlockNumber; slot: SlotNumber; buildSlot: SlotNumber }; /** +<<<<<<< HEAD * The 36s-slot reorg cadence shared by every reorg/prune/HA test, regardless of single-node vs * multi-validator topology: a 36s L2 slot, 8s blocks, and a 4-slot epoch. The two concrete reorg +======= + * The 24s-slot reorg cadence shared by every reorg/prune/HA test, regardless of single-node vs + * multi-validator topology: a 24s L2 slot, 5s blocks, and a 4-slot epoch. The 5s block duration is chosen + * so the fast-profile budgets both reorg profiles run under (eth < 8s: p2p 0.5s, prepare 0.5s, init 1s) + * still fit ~3 full block sub-slots per checkpoint — `floor((24 - 1 - 5 - 2*0.5 - 0.5) / 5) = 3` — which + * the l1-reorgs suites' `assertMultipleBlocksPerSlot(2)` assertions require. The two concrete reorg +>>>>>>> origin/v5-next * profiles ({@link FAST_REORG_TIMING}, {@link MULTI_VALIDATOR_REORG_TIMING}) extend this with their topology's L1 * slot duration and any extra knobs. Kept timing-only — `maxSpeedUpAttempts`, `cancelTxOnTimeout`, and * `aztecProofSubmissionEpochs` encode per-test scenario intent and stay explicit at the call site. */ export const REORG_TIMING_BASE = { +<<<<<<< HEAD aztecSlotDuration: 36, blockDurationMs: 8000, +======= + aztecSlotDuration: 24, + blockDurationMs: 5000, +>>>>>>> origin/v5-next aztecEpochDuration: 4, } as const; @@ -115,7 +143,11 @@ export const FAST_REORG_TIMING = { } as const; /** +<<<<<<< HEAD * Timing-only profile naming the 36s/6s reorg-and-prune cadence copied verbatim across the +======= + * Timing-only profile naming the 24s/6s reorg-and-prune cadence copied verbatim across the +>>>>>>> origin/v5-next * multi-validator recovery and high-availability tests (`recovery/proposal_failure_recovery`, * `recovery/equivocation_recovery`, `high-availability/ha_sync`, * `high-availability/ha_checkpoint_handoff`). The multi-validator analogue of @@ -130,6 +162,7 @@ export const MULTI_VALIDATOR_REORG_TIMING = { } as const; /** +<<<<<<< HEAD * Timing-only profile naming the 36s/12s multi-validator block-production cadence copied across * `block-production/` (`simple`, `high_tps`, `first_slot`, and `proof_boundary`). Uses * `aztecSlotDurationInL1Slots: 3` rather than an explicit `aztecSlotDuration: 36` so the L2 slot stays @@ -141,6 +174,22 @@ export const MULTI_VALIDATOR_BLOCK_PRODUCTION_TIMING = { ethereumSlotDuration: 12, aztecSlotDurationInL1Slots: 3, blockDurationMs: 6000, +======= + * Timing-only profile naming the 24s/12s multi-validator block-production cadence copied across + * `block-production/` (`simple`, `first_slot`, and `proof_boundary`). Uses `aztecSlotDurationInL1Slots: 2` + * rather than an explicit `aztecSlotDuration: 24` so the L2 slot stays coupled to `ethereumSlotDuration` + * if a test overrides eth. The 4s block duration keeps enough full block sub-slots per checkpoint under + * the production budgets these eth=12 tests run with (init 1s, prepare 1s, min-block 2s, p2p = + * attestationPropagationTime): `floor((24 - 1 - 4 - 2P - 1) / 4)` = 4 blocks at P<=1, 3 blocks at P=2 + * (the default). Deliberately omits `attestationPropagationTime` (per-scenario: default 2, 0.5, or 1) — + * set it per test. `high_tps` pins the old 36s/6s cadence at its own call site because its 2-txs-x-2.5s + * per-block budget does not fit a 4s block. Spread BEFORE per-test overrides. + */ +export const MULTI_VALIDATOR_BLOCK_PRODUCTION_TIMING = { + ethereumSlotDuration: 12, + aztecSlotDurationInL1Slots: 2, + blockDurationMs: 4000, +>>>>>>> origin/v5-next } as const; /** @@ -358,8 +407,16 @@ export class SingleNodeTestContext { return accountManager.address; } +<<<<<<< HEAD public async createProverNode(opts: { dontStart?: boolean } & Partial = {}) { this.logger.warn('Creating and syncing a simulated prover node...'); +======= + public async createProverNode( + opts: { dontStart?: boolean; proverNodeDeps?: Partial } & Partial = {}, + ) { + this.logger.warn('Creating and syncing a simulated prover node...'); + const { proverNodeDeps, ...configOverrides } = opts; +>>>>>>> origin/v5-next const proverNodePrivateKey = this.getNextPrivateKey(); const proverIndex = this.proverNodes.length + 1; const { mockGossipSubNetwork } = this.context; @@ -372,7 +429,11 @@ export class SingleNodeTestContext { p2pEnabled: this.context.config.p2pEnabled || mockGossipSubNetwork !== undefined, proverId: EthAddress.fromNumber(proverIndex), dontStart: opts.dontStart, +<<<<<<< HEAD ...opts, +======= + ...configOverrides, +>>>>>>> origin/v5-next }, { dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')), @@ -385,6 +446,10 @@ export class SingleNodeTestContext { : undefined, rpcTxProviders: [this.context.aztecNode], }, +<<<<<<< HEAD +======= + proverNodeDeps, +>>>>>>> origin/v5-next }, { genesis: this.context.genesis, diff --git a/yarn-project/end-to-end/src/single-node/sync/synching.test.ts b/yarn-project/end-to-end/src/single-node/sync/synching.test.ts index 4180e23eca9f..46e1f9214fb5 100644 --- a/yarn-project/end-to-end/src/single-node/sync/synching.test.ts +++ b/yarn-project/end-to-end/src/single-node/sync/synching.test.ts @@ -155,7 +155,7 @@ class TestVariant { async deployAccounts(accounts: InitialAccountData[]) { // Create accounts such that we can send from many to not have colliding nullifiers const managers = await Promise.all( - accounts.map(account => this.wallet.createSchnorrAccount(account.secret, account.salt)), + accounts.map(account => this.wallet.createSchnorrAccount(account.secret, account.salt, account.signingKey)), ); await Promise.all( managers.map(async m => { diff --git a/yarn-project/end-to-end/src/spartan/block_capacity.test.ts b/yarn-project/end-to-end/src/spartan/block_capacity.test.ts index c40fbc6db502..aa204c84e862 100644 --- a/yarn-project/end-to-end/src/spartan/block_capacity.test.ts +++ b/yarn-project/end-to-end/src/spartan/block_capacity.test.ts @@ -9,12 +9,12 @@ import { asyncPool } from '@aztec/foundation/async-pool'; import { BlockNumber } from '@aztec/foundation/branded-types'; import { times } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { createLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking'; import { GasFees } from '@aztec/stdlib/gas'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { Tx } from '@aztec/stdlib/tx'; import { jest } from '@jest/globals'; @@ -108,14 +108,10 @@ describe('block capacity benchmark', () => { wallets.map(async wallet => { const secret = Fr.random(); const salt = Fr.random(); - const address = await wallet.registerAccount(secret, salt); + const signingKey = GrumpkinScalar.random(); + const address = await wallet.registerAccount(secret, salt, signingKey); await registerSponsoredFPC(wallet); - const manager = await AccountManager.create( - wallet, - secret, - new SchnorrAccountContract(deriveSigningKey(secret)), - { salt }, - ); + const manager = await AccountManager.create(wallet, secret, new SchnorrAccountContract(signingKey), { salt }); const deployMethod = await manager.getDeployMethod(); await deployMethod.send({ from: NO_FROM, diff --git a/yarn-project/end-to-end/src/spartan/mempool_limit.test.ts b/yarn-project/end-to-end/src/spartan/mempool_limit.test.ts index 92dcbba12e20..baba481c623a 100644 --- a/yarn-project/end-to-end/src/spartan/mempool_limit.test.ts +++ b/yarn-project/end-to-end/src/spartan/mempool_limit.test.ts @@ -1,20 +1,3 @@ -// import { getSchnorrAccount } from '@aztec/accounts/schnorr'; -// import { AztecAddress } from '@aztec/aztec.js/addresses'; -// import type { InteractionFeeOptions } from '@aztec/entrypoints/interfaces'; -// import { asyncPool } from '@aztec/foundation/async-pool'; -// import { times } from '@aztec/foundation/collection'; -// import { Agent, makeUndiciFetch } from '@aztec/foundation/json-rpc/undici'; -// import { createLogger } from '@aztec/foundation/log'; -// import { TokenContract } from '@aztec/noir-contracts.js/Token'; -// import { createPXE } from '@aztec/pxe/server'; -// import { -// type AztecNode, -// type AztecNodeAdmin, -// createAztecNodeAdminClient, -// createAztecNodeClient, -// } from '@aztec/stdlib/interfaces/client'; -// import { deriveSigningKey } from '@aztec/stdlib/keys'; -// import { makeTracedFetch } from '@aztec/telemetry-client'; import { AztecAddress } from '@aztec/aztec.js/addresses'; import { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee'; import { Fr } from '@aztec/aztec.js/fields'; diff --git a/yarn-project/end-to-end/src/spartan/n_tps.test.ts b/yarn-project/end-to-end/src/spartan/n_tps.test.ts index 33bee9d5a677..192bbd5e8764 100644 --- a/yarn-project/end-to-end/src/spartan/n_tps.test.ts +++ b/yarn-project/end-to-end/src/spartan/n_tps.test.ts @@ -10,13 +10,17 @@ import { BlockNumber } from '@aztec/foundation/branded-types'; import { times, timesParallel } from '@aztec/foundation/collection'; import { randomBigInt } from '@aztec/foundation/crypto/random'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/promise'; import { retryUntil } from '@aztec/foundation/retry'; import { sleep } from '@aztec/foundation/sleep'; import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking'; import { Gas, GasFees, GasSettings } from '@aztec/stdlib/gas'; +<<<<<<< HEAD import { deriveSigningKey } from '@aztec/stdlib/keys'; +======= +>>>>>>> origin/v5-next import { TopicType } from '@aztec/stdlib/p2p'; import { Tx, TxHash, TxStatus } from '@aztec/stdlib/tx'; import { getGasLimits } from '@aztec/wallet-sdk/base-wallet'; @@ -330,14 +334,10 @@ describe('sustained N TPS test', () => { wallets.map(async wallet => { const secret = Fr.random(); const salt = Fr.random(); - const address = await wallet.registerAccount(secret, salt); + const signingKey = GrumpkinScalar.random(); + const address = await wallet.registerAccount(secret, salt, signingKey); await registerSponsoredFPC(wallet); - const manager = await AccountManager.create( - wallet, - secret, - new SchnorrAccountContract(deriveSigningKey(secret)), - { salt }, - ); + const manager = await AccountManager.create(wallet, secret, new SchnorrAccountContract(signingKey), { salt }); const deployMethod = await manager.getDeployMethod(); // Explicit gas estimation: BaseWallet's fallback bakes ~196_608 daGas into deploys, which exceeds // the proposer's per-block fair-share daGas (~94k at 10 blocks/checkpoint diff --git a/yarn-project/end-to-end/src/spartan/n_tps_prove.test.ts b/yarn-project/end-to-end/src/spartan/n_tps_prove.test.ts index 7bc23728af59..89d091ee3ef7 100644 --- a/yarn-project/end-to-end/src/spartan/n_tps_prove.test.ts +++ b/yarn-project/end-to-end/src/spartan/n_tps_prove.test.ts @@ -11,13 +11,13 @@ import { EthCheatCodesWithState } from '@aztec/ethereum/test'; import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types'; import { timesParallel } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/curves/bn254'; +import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; import { sleep } from '@aztec/foundation/sleep'; import { DateProvider, Timer } from '@aztec/foundation/timer'; import { AvmGadgetsTestContract } from '@aztec/noir-test-contracts.js/AvmGadgetsTest'; import { GasFees } from '@aztec/stdlib/gas'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import { Tx, TxHash } from '@aztec/stdlib/tx'; import { jest } from '@jest/globals'; @@ -312,14 +312,10 @@ describe(`prove ${TARGET_TPS}TPS test`, () => { wallets.map(async wallet => { const secret = Fr.random(); const salt = Fr.random(); - const address = await wallet.registerAccount(secret, salt); + const signingKey = GrumpkinScalar.random(); + const address = await wallet.registerAccount(secret, salt, signingKey); await registerSponsoredFPC(wallet); - const manager = await AccountManager.create( - wallet, - secret, - new SchnorrAccountContract(deriveSigningKey(secret)), - { salt }, - ); + const manager = await AccountManager.create(wallet, secret, new SchnorrAccountContract(signingKey), { salt }); const deployMethod = await manager.getDeployMethod(); await deployMethod.send({ from: NO_FROM, diff --git a/yarn-project/end-to-end/src/spartan/setup_test_wallets.ts b/yarn-project/end-to-end/src/spartan/setup_test_wallets.ts index 82aa05d41b96..bc2c4a9be43d 100644 --- a/yarn-project/end-to-end/src/spartan/setup_test_wallets.ts +++ b/yarn-project/end-to-end/src/spartan/setup_test_wallets.ts @@ -88,8 +88,10 @@ export async function deploySponsoredTestAccountsWithTokens( numberOfFundedWallets = 1, ): Promise { const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1); - const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt); - const fundedAccounts = await Promise.all(funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt))); + const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt, recipient.signingKey); + const fundedAccounts = await Promise.all( + funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt, a.signingKey)), + ); await registerSponsoredFPC(wallet); @@ -235,8 +237,10 @@ export async function deploySponsoredTestAccounts( opts?: { estimateGas?: boolean }, ): Promise { const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1); - const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt); - const fundedAccounts = await Promise.all(funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt))); + const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt, recipient.signingKey); + const fundedAccounts = await Promise.all( + funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt, a.signingKey)), + ); await registerSponsoredFPC(wallet); @@ -282,8 +286,10 @@ export async function deployTestAccountsWithTokens( wallet.setDefaultWaitInterval(DefaultWaitOpts.interval); const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1); - const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt); - const fundedAccounts = await Promise.all(funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt))); + const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt, recipient.signingKey); + const fundedAccounts = await Promise.all( + funded.map(a => wallet.createSchnorrAccount(a.secret, a.salt, a.signingKey)), + ); const claims = await Promise.all( fundedAccounts.map(a => bridgeL1FeeJuice(l1RpcUrls, mnemonicOrPrivateKey, aztecNode, a.address, undefined, logger)), diff --git a/yarn-project/end-to-end/src/test-wallet/test_wallet.ts b/yarn-project/end-to-end/src/test-wallet/test_wallet.ts index 862c2f864af2..443b06c96aae 100644 --- a/yarn-project/end-to-end/src/test-wallet/test_wallet.ts +++ b/yarn-project/end-to-end/src/test-wallet/test_wallet.ts @@ -27,7 +27,6 @@ import { PXE, type PXECreationOptions, type TaggingSecretSource, createPXE } fro import { AuthWitness } from '@aztec/stdlib/auth-witness'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { getContractClassFromArtifact } from '@aztec/stdlib/contract'; -import { deriveSigningKey } from '@aztec/stdlib/keys'; import type { NoteDao } from '@aztec/stdlib/note'; import { type BlockHeader, @@ -108,13 +107,16 @@ export class TestWallet extends BaseWallet { this.nodeRef.updateTargetNode(node); } - createSchnorrAccount(secret: Fr, salt: Fr, signingKey?: Fq): Promise { - signingKey = signingKey ?? deriveSigningKey(secret); + createSchnorrAccount(secret: Fr, salt: Fr, signingKey: Fq): Promise { return this.createAccount({ secret, salt, type: 'schnorr', contract: new SchnorrAccountContract(signingKey) }); } +<<<<<<< HEAD createSchnorrInitializerlessAccount(secret: Fr, salt: Fr, signingKey?: Fq): Promise { signingKey = signingKey ?? deriveSigningKey(secret); +======= + createSchnorrInitializerlessAccount(secret: Fr, salt: Fr, signingKey: Fq): Promise { +>>>>>>> origin/v5-next return this.createAccount({ secret, salt, @@ -321,7 +323,7 @@ export class TestWallet extends BaseWallet { opts: SimulateViaEntrypointOptions, ): Promise { const { from, feeOptions, additionalScopes, skipTxValidation, skipFeeEnforcement, sendMessagesAs } = opts; - const scopes = this.scopesFrom(from, additionalScopes); + const scopes = this.scopesFrom(from, additionalScopes ?? [], sendMessagesAs); const skipKernels = this.simulationMode !== 'full'; const useOverride = this.simulationMode === 'kernelless-override'; @@ -387,7 +389,7 @@ export class TestWallet extends BaseWallet { }); const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(exec, opts.from, fee); const txProvingResult = await this.pxe.proveTx(txRequest, { - scopes: this.scopesFrom(opts.from, opts.additionalScopes), + scopes: this.scopesFrom(opts.from, opts.additionalScopes ?? [], opts.sendMessagesAs), senderForTags: this.senderForTagsFrom(opts.from, opts.sendMessagesAs), }); return new ProvenTx( diff --git a/yarn-project/end-to-end/src/test-wallet/wallet_worker_script.ts b/yarn-project/end-to-end/src/test-wallet/wallet_worker_script.ts index e11c336b9583..09537d5f4bf0 100644 --- a/yarn-project/end-to-end/src/test-wallet/wallet_worker_script.ts +++ b/yarn-project/end-to-end/src/test-wallet/wallet_worker_script.ts @@ -4,7 +4,7 @@ import type { SendOptions } from '@aztec/aztec.js/wallet'; import { BackendType, BarretenbergSync } from '@aztec/bb.js'; import { jsonStringify } from '@aztec/foundation/json-rpc'; import { createLogger } from '@aztec/foundation/log'; -import type { ApiSchema, Fr } from '@aztec/foundation/schemas'; +import type { ApiSchema, Fq, Fr } from '@aztec/foundation/schemas'; import { getSchemaParameters, parseWithOptionals, schemaHasMethod } from '@aztec/foundation/schemas'; import { NodeListener, TransportServer } from '@aztec/foundation/transport'; import { ExecutionPayload, Tx } from '@aztec/stdlib/tx'; @@ -39,8 +39,8 @@ try { provenTx.publicFunctionCalldata, ); }, - registerAccount: async (secret: Fr, salt: Fr) => { - const manager = await wallet.createSchnorrAccount(secret, salt); + registerAccount: async (secret: Fr, salt: Fr, signingKey: Fq) => { + const manager = await wallet.createSchnorrAccount(secret, salt, signingKey); return manager.address; }, }; diff --git a/yarn-project/end-to-end/src/test-wallet/worker_wallet.ts b/yarn-project/end-to-end/src/test-wallet/worker_wallet.ts index 1294154217ee..cf9b114d2239 100644 --- a/yarn-project/end-to-end/src/test-wallet/worker_wallet.ts +++ b/yarn-project/end-to-end/src/test-wallet/worker_wallet.ts @@ -18,7 +18,7 @@ import type { WalletCapabilities, } from '@aztec/aztec.js/wallet'; import type { ChainInfo } from '@aztec/entrypoints/interfaces'; -import type { Fr } from '@aztec/foundation/curves/bn254'; +import type { Fq, Fr } from '@aztec/foundation/curves/bn254'; import { jsonStringify } from '@aztec/foundation/json-rpc'; import { createLogger } from '@aztec/foundation/log'; import { promiseWithResolvers } from '@aztec/foundation/promise'; @@ -192,8 +192,8 @@ export class WorkerWallet implements Wallet { } /** Registers an account inside the worker's TestWallet, populating its accounts map. */ - registerAccount(secret: Fr, salt: Fr): Promise { - return this.call('registerAccount', secret, salt); + registerAccount(secret: Fr, salt: Fr, signingKey: Fq): Promise { + return this.call('registerAccount', secret, salt, signingKey); } createAuthWit(from: AztecAddress, messageHashOrIntent: IntentInnerHash | CallIntent): Promise { diff --git a/yarn-project/end-to-end/src/test-wallet/worker_wallet_schema.ts b/yarn-project/end-to-end/src/test-wallet/worker_wallet_schema.ts index ad6239219822..d7b4a73a57b3 100644 --- a/yarn-project/end-to-end/src/test-wallet/worker_wallet_schema.ts +++ b/yarn-project/end-to-end/src/test-wallet/worker_wallet_schema.ts @@ -10,5 +10,5 @@ import { z } from 'zod'; export const WorkerWalletSchema: ApiSchema = { ...WalletSchema, proveTx: z.function({ input: z.tuple([ExecutionPayloadSchema, SendOptionsSchema]), output: Tx.schema }), - registerAccount: z.function({ input: z.tuple([schemas.Fr, schemas.Fr]), output: AztecAddress.schema }), + registerAccount: z.function({ input: z.tuple([schemas.Fr, schemas.Fr, schemas.Fq]), output: AztecAddress.schema }), }; diff --git a/yarn-project/ethereum/scripts/anvil_kill_wrapper.sh b/yarn-project/ethereum/scripts/anvil_kill_wrapper.sh deleted file mode 100755 index 629750efda21..000000000000 --- a/yarn-project/ethereum/scripts/anvil_kill_wrapper.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Function to get the PPID in macOS -get_ppid_macos() { - ps -j $$ | awk 'NR==2 {print $3}' -} - -# Function to get the PPID in Linux -get_ppid_linux() { - awk '{print $4}' /proc/$$/stat -} - -# Function to check if a process is alive in macOS -is_process_alive_macos() { - ps -p $1 > /dev/null 2>&1 -} - -# Function to check if a process is alive in Linux -is_process_alive_linux() { - [ -d /proc/$1 ] -} - - -# Determine the operating system and call the appropriate function -if [[ "$OSTYPE" == "darwin"* ]]; then - PARENT_PID=$(get_ppid_macos) - check_process_alive() { is_process_alive_macos $1; } -elif [[ "$OSTYPE" == "linux-gnu"* ]]; then - PARENT_PID=$(get_ppid_linux) - check_process_alive() { is_process_alive_linux $1; } -else - echo "Unsupported OS" - exit 1 -fi - -# echo "Parent PID: $PARENT_PID" - -# Start anvil in the background. -RAYON_NUM_THREADS=1 anvil $@ & -CHILD_PID=$! - -cleanup() { - kill $CHILD_PID -} - -trap cleanup EXIT - -# Continuously check if the parent process is still alive. -while check_process_alive $PARENT_PID; do - sleep 1 -done diff --git a/yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts b/yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts index 71e0189bc071..f62c005c0949 100644 --- a/yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts @@ -22,6 +22,7 @@ import { createExtendedL1Client } from './client.js'; import { type L1ContractsConfig, assertValidSlotDurations } from './config.js'; import { deployMulticall3 } from './contracts/multicall.js'; import { RollupContract } from './contracts/rollup.js'; +import { resolveFoundryBinary } from './foundry_binary.js'; import type { L1ContractAddresses } from './l1_contract_addresses.js'; import type { ExtendedViemWalletClient } from './types.js'; @@ -95,11 +96,16 @@ function runProcess( // Covers an edge where where we may have a cached BlobLib that is not meant for production. // Despite the profile apparently sometimes cached code remains (so says Lasse after his ignition-monorepo arc). -async function maybeForgeForceProductionBuild(l1ContractsPath: string, script: string, chainId: number) { +async function maybeForgeForceProductionBuild( + forgeBin: string, + l1ContractsPath: string, + script: string, + chainId: number, +) { if (chainId === mainnet.id) { logger.info(`Recompiling ${script} with production profile for mainnet deployment`); logger.info('This may take a minute but ensures production BlobLib is used.'); - await runProcess('forge', ['build', script, '--force'], { FOUNDRY_PROFILE: 'production' }, l1ContractsPath); + await runProcess(forgeBin, ['build', script, '--force'], { FOUNDRY_PROFILE: 'production' }, l1ContractsPath); } } @@ -320,8 +326,9 @@ export async function deployAztecL1Contracts( // Use foundry-artifacts from l1-artifacts package const l1ContractsPath = prepareL1ContractsForDeployment(); + const forgeBin = resolveFoundryBinary('forge'); const FORGE_SCRIPT = 'script/deploy/DeployAztecL1Contracts.s.sol'; - await maybeForgeForceProductionBuild(l1ContractsPath, FORGE_SCRIPT, chainId); + await maybeForgeForceProductionBuild(forgeBin, l1ContractsPath, FORGE_SCRIPT, chainId); // Verify contracts on Etherscan when on mainnet/sepolia and ETHERSCAN_API_KEY is available. const isVerifiableChain = chainId === mainnet.id || chainId === sepolia.id; @@ -346,6 +353,8 @@ export async function deployAztecL1Contracts( ...(shouldVerify ? ['--verify'] : []), ]; const forgeEnv = { + // Resolved forge binary picked up by forge_broadcast.js, so it works without forge on PATH. + FORGE_BIN: forgeBin, // Env vars required by l1-contracts/script/deploy/DeploymentConfiguration.sol. NETWORK: getActiveNetworkName(), FOUNDRY_PROFILE: chainId === mainnet.id ? 'production' : undefined, @@ -618,12 +627,15 @@ export const deployRollupForUpgrade = async ( // Use foundry-artifacts from l1-artifacts package const l1ContractsPath = prepareL1ContractsForDeployment(); + const forgeBin = resolveFoundryBinary('forge'); const FORGE_SCRIPT = 'script/deploy/DeployRollupForUpgrade.s.sol'; - await maybeForgeForceProductionBuild(l1ContractsPath, FORGE_SCRIPT, chainId); + await maybeForgeForceProductionBuild(forgeBin, l1ContractsPath, FORGE_SCRIPT, chainId); const scriptPath = join(getL1ContractsPath(), 'scripts', 'forge_broadcast.js'); const forgeArgs = [FORGE_SCRIPT, '--sig', 'run()', '--private-key', privateKey, '--rpc-url', rpcUrl]; const forgeEnv = { + // Resolved forge binary picked up by forge_broadcast.js, so it works without forge on PATH. + FORGE_BIN: forgeBin, FOUNDRY_PROFILE: chainId === mainnet.id ? 'production' : undefined, // Env vars required by l1-contracts/script/deploy/RollupConfiguration.sol. REGISTRY_ADDRESS: registryAddress.toString(), diff --git a/yarn-project/ethereum/src/foundry_binary.ts b/yarn-project/ethereum/src/foundry_binary.ts new file mode 100644 index 000000000000..3e4aeeabf0ac --- /dev/null +++ b/yarn-project/ethereum/src/foundry_binary.ts @@ -0,0 +1,57 @@ +import { spawnSync } from 'child_process'; +import { accessSync, constants } from 'fs'; +import { homedir } from 'os'; +import { join } from 'path'; + +function isExecutable(path: string): boolean { + try { + accessSync(path, constants.X_OK); + return true; + } catch { + return false; + } +} + +/** + * Locate a Foundry binary (`anvil`, `forge`, ...) without relying on the caller's PATH. Order: + * 1. `$_BIN` (e.g. `$ANVIL_BIN`, `$FORGE_BIN`) — explicit override, e.g. for CI with a pinned + * version. Throws if set but not pointing at an executable, instead of silently falling back. + * 2. `~/.aztec/current/internal-bin/` — where aztec-up installs it. + * 3. `~/.aztec/current/bin/aztec-` — the publicly-exposed symlink. + * 4. `~/.foundry/bin/` — standalone foundryup install. + * 5. `command -v ` — anything else on PATH. + * + * Throws with a directive message if none work. + */ +export function resolveFoundryBinary(name: string): string { + const envVar = `${name.toUpperCase()}_BIN`; + const envBin = process.env[envVar]; + if (envBin) { + if (!isExecutable(envBin)) { + throw new Error(`$${envVar} is set to ${envBin}, which does not exist or is not executable.`); + } + return envBin; + } + + const candidates = [ + join(homedir(), '.aztec', 'current', 'internal-bin', name), + join(homedir(), '.aztec', 'current', 'bin', `aztec-${name}`), + join(homedir(), '.foundry', 'bin', name), + ]; + for (const path of candidates) { + if (isExecutable(path)) { + return path; + } + } + + const which = spawnSync('sh', ['-c', `command -v ${name}`], { encoding: 'utf8' }); + if (which.status === 0 && which.stdout.trim()) { + return which.stdout.trim(); + } + + throw new Error( + `${name} binary not found. Tried $${envVar}, ~/.aztec/current/internal-bin/${name}, ` + + `~/.aztec/current/bin/aztec-${name}, ~/.foundry/bin/${name}, and $PATH. ` + + `Install via \`aztec-up\` or set ${envVar} to a working binary.`, + ); +} diff --git a/yarn-project/ethereum/src/test/eth_cheat_codes.ts b/yarn-project/ethereum/src/test/eth_cheat_codes.ts index c3add05ddbad..6faab16f7ac8 100644 --- a/yarn-project/ethereum/src/test/eth_cheat_codes.ts +++ b/yarn-project/ethereum/src/test/eth_cheat_codes.ts @@ -505,26 +505,33 @@ export class EthCheatCodes { * reorg is needed because anvil applies a new gas limit only to future blocks: without it the just-mined * blocks would keep the tiny gas limit, and an `eth_call` against `latest` (whose gas is capped by the * block gas limit) would revert with "intrinsic gas too high". +<<<<<<< HEAD * * The replacement blocks advance L1 time. `anvil_reorg` stamps each replacement as `parent + N*interval`, * so on its own it would freeze L1 time at the parent timestamp; callers that measure elapsed L1 time * (L1TxUtils stall/timeout detection, `syncDateProvider`-driven slot advancement) rely on it moving * forward. We reproduce the wall-clock advance the mine step just made (at least 1s per block) via a * temporary block-timestamp interval, then restore any pre-existing interval. +======= +>>>>>>> origin/v5-next */ public async mineEmptyBlock(blockCount: number = 1): Promise { await this.execWithPausedAnvil(async () => { const originalGasLimit = await this.getBlockGasLimit(); +<<<<<<< HEAD const parentTimestamp = await this.lastBlockTimestamp(); // anvil has no getter for the block-timestamp interval, but the pending block is stamped // `latest + interval`, so this delta is the standing interval (0 when none is set). const priorInterval = (await this.nextBlockTimestamp()) - parentTimestamp; +======= +>>>>>>> origin/v5-next try { await this.setBlockGasLimit(1n); await this.doMine(blockCount); } finally { await this.setBlockGasLimit(originalGasLimit); } +<<<<<<< HEAD const advance = (await this.lastBlockTimestamp()) - parentTimestamp; const perBlockInterval = Math.max(1, Math.floor(advance / blockCount)); // Replace the tiny-gas-limit blocks with empty blocks at the restored gas limit, keeping the same @@ -539,6 +546,11 @@ export class EthCheatCodes { await this.doRpcCall('anvil_removeBlockTimestampInterval', []); } } +======= + // Replace the tiny-gas-limit blocks with empty blocks at the restored gas limit, keeping the same + // height and timestamps. The reorged-out blocks held no transactions, so nothing returns to the pool. + await this.doRpcCall('anvil_reorg', [blockCount, []]); +>>>>>>> origin/v5-next }); this.logger.warn(`Mined ${blockCount} empty L1 ${pluralize('block', blockCount)}`); diff --git a/yarn-project/ethereum/src/test/start_anvil.ts b/yarn-project/ethereum/src/test/start_anvil.ts index f5ba8609e15f..c1de2f673409 100644 --- a/yarn-project/ethereum/src/test/start_anvil.ts +++ b/yarn-project/ethereum/src/test/start_anvil.ts @@ -1,10 +1,10 @@ import { createLogger } from '@aztec/foundation/log'; import { makeBackoff, retry } from '@aztec/foundation/retry'; import type { TestDateProvider } from '@aztec/foundation/timer'; -import { fileURLToPath } from '@aztec/foundation/url'; import { type ChildProcess, spawn } from 'child_process'; -import { dirname, resolve } from 'path'; + +import { resolveFoundryBinary } from '../foundry_binary.js'; /** Minimal interface matching the @viem/anvil Anvil shape used by callers. */ export interface Anvil { @@ -14,6 +14,30 @@ export interface Anvil { stop(): Promise; } +// Watchdog wrapper: instead of spawning anvil directly, we spawn a small bash supervisor that runs +// anvil as a background child and polls its own parent (this node process). If the parent dies for +// ANY reason — including SIGKILL / crash / OOM, where node's own exit handlers never run — the poll +// loop ends and the EXIT trap reaps anvil. The script is inlined (rather than shipped as a `.sh`) so +// it works from the published npm tarball too, and the resolved anvil binary is passed via +// `$ANVIL_BIN` so it works without `anvil` on PATH. +// +// `$@` is the anvil argv; `bash -c