diff --git a/.claude/skills/iterate-on-pr/SKILL.md b/.claude/skills/iterate-on-pr/SKILL.md new file mode 100644 index 000000000000..92997e54768b --- /dev/null +++ b/.claude/skills/iterate-on-pr/SKILL.md @@ -0,0 +1,88 @@ +--- +name: iterate-on-pr +description: Iterate on a PR until CI passes. Use when fixing CI failures, debugging test issues, or waiting for CI results. Enforces local testing before pushing. +--- + +# Iterate on PR + +Workflow for getting a PR to green CI. + +## Golden Rule + +**NEVER push and pray.** Always run the failing test locally first. + +## Building + +**Full repo build:** +```bash +./bootstrap.sh # In repo root +``` + +**Targeted builds:** +```bash +# Project-specific bootstrap scripts +./yarn-project/bootstrap.sh +./barretenberg/bootstrap.sh + +# Or use make for specific targets + deps +make # Check Makefile for available targets +``` + +## Testing + +**Run the exact command CI reports as failed.** These are usually project-specific: +```bash +# Look at CI failure output for the actual command, typically: +./yarn-project/run_tests.sh +./barretenberg/run_tests.sh + +# Or for Jest tests with timeout (hang detection): +timeout 120 yarn test --testNamePattern="" +``` + +Only push when the test passes locally. + +## CI Iteration Loop + +1. **CI fails** → Read the failure logs (use analyze-logs agent if needed) +2. **Identify root cause** → Understand what broke +3. **Fix locally** → Make the code change +4. **Build** → Run bootstrap.sh or targeted make +5. **Test locally** → Run the exact CI command that failed +6. **Push** → Immediately after local tests pass. Do not ask the user for permission to push. +7. **Monitor CI** → Set up a cron to poll every 5 min until pass/fail +8. **Repeat** if CI fails again + +## Monitoring CI + +Poll PR checks every 5 minutes: +```bash +gh pr checks --json name,state | jq '.[] | select(.state != "SUCCESS" and .state != "SKIPPED")' +``` + +## Handling Flaky Tests + +**Do NOT immediately rerun CI.** Follow this process: + +1. **Try to replicate locally first** — run the failing test +2. **If it passes locally**: Check if the failure seems related to your changes +3. **Only rerun CI if**: Test passes locally AND failure appears unrelated to your changes +4. **If it fails locally**: Debug and fix it, don't assume it's flaky + +## Common Failures + +- **Lint errors**: Fix and verify with `yarn lint ` +- **Type errors**: Fix and verify with `yarn build` or `tsc --noEmit` +- **Test hangs (Jest)**: Usually resource leaks — check for unclosed handles, missing `.close()` calls +- **Build failures**: Run bootstrap.sh to rebuild everything + +## When to Ask for Help + +- Architectural decisions ("should I use approach A or B?") +- Unclear requirements +- CI infrastructure issues (not code problems) + +Do NOT ask for help with: +- Simple lint/type errors +- Obvious fixes +- Things you can figure out by reading the code diff --git a/Makefile b/Makefile index d0d5824ca76c..33d7a2f1aa5d 100644 --- a/Makefile +++ b/Makefile @@ -208,6 +208,7 @@ bb-cpp-release-dir: bb-cpp-native bb-cpp-cross bb-cpp-full: bb-cpp bb-cpp-gcc bb-cpp-fuzzing bb-cpp-asan bb-cpp-smt bb-cpp-cross-arm64-macos bb-cpp-cross-arm64-ios bb-cpp-cross-arm64-android # BB TypeScript - TypeScript bindings +# Codegen runs inline as a pre-build step in ts/bootstrap.sh (reads committed JSON schemas) bb-ts: bb-cpp-wasm bb-cpp-wasm-threads bb-cpp-native $(call build,$@,barretenberg/ts) @@ -216,7 +217,8 @@ bb-ts-cross-copy: bb-ts bb-cpp-cross $(call build,$@,barretenberg/ts,cross_copy) # BB Rust - barretenberg-rs FFI crate -bb-rs: bb-ts bb-cpp-native +# Codegen runs inline as a pre-build step in rust/bootstrap.sh (reads committed JSON schemas) +bb-rs: bb-cpp-native $(call build,$@,barretenberg/rust) # BB ACIR Tests - ACIR compatibility tests diff --git a/barretenberg/.gitignore b/barretenberg/.gitignore index ba04309b3eac..23b69902ae13 100644 --- a/barretenberg/.gitignore +++ b/barretenberg/.gitignore @@ -9,7 +9,5 @@ cmake-build-debug *_opt.pil bench-out -# Generated code from msgpack schema (run `yarn generate` in ts/) -rust/barretenberg-rs/src/generated_types.rs -rust/barretenberg-rs/src/api.rs -ts/src/cbind/generated/ +# Generated code (produced by barretenberg/codegen, not committed) +**/generated/ diff --git a/barretenberg/codegen/.rebuild_patterns b/barretenberg/codegen/.rebuild_patterns new file mode 100644 index 000000000000..7e918636bbcb --- /dev/null +++ b/barretenberg/codegen/.rebuild_patterns @@ -0,0 +1,5 @@ +^barretenberg/codegen/src/.*\.ts$ +^barretenberg/codegen/schemas/.*\.(json|msgpack)$ +^barretenberg/codegen/templates/ +^barretenberg/codegen/package\.json$ +^barretenberg/codegen/bootstrap\.sh$ diff --git a/barretenberg/codegen/bootstrap.sh b/barretenberg/codegen/bootstrap.sh new file mode 100755 index 000000000000..fa86e092305b --- /dev/null +++ b/barretenberg/codegen/bootstrap.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Codegen tool: generates bindings from committed JSON schemas. +# Zero npm dependencies — runs with just Node.js (v22+). +# +# Usage: +# ./bootstrap.sh # Run codegen (generate all bindings) +# ./bootstrap.sh generate # Same +# ./bootstrap.sh hash # Print content hash + +source $(git rev-parse --show-toplevel)/ci3/source_bootstrap + +# Hash includes codegen source AND committed schema files. +export hash=$(cache_content_hash .rebuild_patterns) + +NODE_FLAGS="--experimental-strip-types --experimental-transform-types --no-warnings" + +gen() { node $NODE_FLAGS src/generate.ts "$@"; } + +function generate { + echo_header "codegen generate" + local S="schemas" + local CPP="../cpp/src/barretenberg" + local TS="../ts/src" + local ZIG="../zig/aztec-ipc/src" + + # --- BB --- + gen --schema $S/bb_schema.json --lang cpp --out $CPP/bbapi/generated \ + --server --cpp-namespace bb::bbapi --prefix Bb --cpp-include-dir barretenberg/bbapi/generated + gen --schema $S/bb_schema.json --lang ts --out $TS/cbind/generated \ + --server --client --prefix Bb --strip-method-prefix --curve-constants + gen --schema $S/bb_schema.json --lang rust --out ../rust/barretenberg-rs/src/generated \ + --client --uds --ffi --prefix Bb + gen --schema $S/bb_schema.json --lang zig --out $ZIG/bb \ + --client --uds --ffi --prefix Bb + + # --- WSDB --- + gen --schema $S/wsdb_schema.json --lang cpp --out $CPP/wsdb/generated \ + --server --client --cpp-namespace bb::wsdb --prefix Wsdb --cpp-include-dir barretenberg/wsdb/generated + gen --schema $S/wsdb_schema.json --lang ts --out $TS/aztec-wsdb/generated \ + --server --client --prefix Wsdb + gen --schema $S/wsdb_schema.json --lang zig --out $ZIG/wsdb \ + --server --client --uds --ffi --prefix Wsdb + + # --- CDB --- + gen --schema $S/cdb_schema.json --lang cpp --out $CPP/cdb/generated \ + --client --cpp-namespace bb::cdb --prefix Cdb --cpp-include-dir barretenberg/cdb/generated + gen --schema $S/cdb_schema.json --lang ts --out $TS/aztec-cdb/generated \ + --server --client --prefix Cdb + gen --schema $S/cdb_schema.json --lang zig --out $ZIG/cdb \ + --client --uds --ffi --prefix Cdb + + # --- AVM --- + gen --schema $S/avm_schema.json --lang cpp --out $CPP/avm/generated \ + --server --cpp-namespace bb::avm --prefix Avm --cpp-include-dir barretenberg/avm/generated + gen --schema $S/avm_schema.json --lang ts --out $TS/aztec-avm/generated \ + --server --client --prefix Avm + gen --schema $S/avm_schema.json --lang zig --out $ZIG/avm \ + --server --client --uds --ffi --prefix Avm +} + +case "$cmd" in + ""|generate) + generate + ;; + hash) + echo $hash + ;; + *) + default_cmd_handler "$@" + ;; +esac diff --git a/barretenberg/codegen/schemas/avm_schema.json b/barretenberg/codegen/schemas/avm_schema.json new file mode 100644 index 000000000000..b1e8e050b4d5 --- /dev/null +++ b/barretenberg/codegen/schemas/avm_schema.json @@ -0,0 +1,2 @@ +{"__typename":"AvmApi","commands":["named_union",[["AvmSimulate",{"__typename":"AvmSimulate","inputs":["vector",["unsigned char"]]}],["AvmSimulateWithHints",{"__typename":"AvmSimulateWithHints","inputs":["vector",["unsigned char"]]}],["AvmShutdown",{"__typename":"AvmShutdown"}]]],"responses":["named_union",[["AvmErrorResponse",{"__typename":"AvmErrorResponse","message":"string"}],["AvmSimulateResponse",{"__typename":"AvmSimulateResponse","result":["vector",["unsigned char"]]}],["AvmSimulateWithHintsResponse",{"__typename":"AvmSimulateWithHintsResponse","result":["vector",["unsigned char"]]}],["AvmShutdownResponse",{"__typename":"AvmShutdownResponse"}]]]} + diff --git a/barretenberg/codegen/schemas/bb_curve_constants.json b/barretenberg/codegen/schemas/bb_curve_constants.json new file mode 100644 index 000000000000..20dab049c505 --- /dev/null +++ b/barretenberg/codegen/schemas/bb_curve_constants.json @@ -0,0 +1,36 @@ +{ + "bn254_fr_modulus": "30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001", + "bn254_fq_modulus": "30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47", + "bn254_g1_generator": { + "x": "0000000000000000000000000000000000000000000000000000000000000001", + "y": "0000000000000000000000000000000000000000000000000000000000000002" + }, + "bn254_g2_generator": { + "x": [ + "1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed", + "198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2" + ], + "y": [ + "12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", + "090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b" + ] + }, + "grumpkin_fr_modulus": "30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47", + "grumpkin_fq_modulus": "30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001", + "grumpkin_g1_generator": { + "x": "0000000000000000000000000000000000000000000000000000000000000001", + "y": "0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c" + }, + "secp256k1_fr_modulus": "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", + "secp256k1_fq_modulus": "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", + "secp256k1_g1_generator": { + "x": "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", + "y": "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" + }, + "secp256r1_fr_modulus": "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", + "secp256r1_fq_modulus": "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", + "secp256r1_g1_generator": { + "x": "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", + "y": "4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" + } +} \ No newline at end of file diff --git a/barretenberg/codegen/schemas/bb_schema.json b/barretenberg/codegen/schemas/bb_schema.json new file mode 100644 index 000000000000..a8defb4d4052 --- /dev/null +++ b/barretenberg/codegen/schemas/bb_schema.json @@ -0,0 +1,2 @@ +{"__typename":"Api","commands":["named_union",[["BbCircuitProve",{"__typename":"BbCircuitProve","circuit":{"__typename":"CircuitInput","name":"string","bytecode":["vector",["unsigned char"]],"verification_key":["vector",["unsigned char"]]},"witness":["vector",["unsigned char"]],"settings":{"__typename":"ProofSystemSettings","ipa_accumulation":"bool","oracle_hash_type":"string","disable_zk":"bool","optimized_solidity_verifier":"bool"}}],["BbCircuitComputeVk",{"__typename":"BbCircuitComputeVk","circuit":{"__typename":"CircuitInputNoVK","name":"string","bytecode":["vector",["unsigned char"]]},"settings":"ProofSystemSettings"}],["BbCircuitStats",{"__typename":"BbCircuitStats","circuit":"CircuitInput","include_gates_per_opcode":"bool","settings":"ProofSystemSettings"}],["BbCircuitVerify",{"__typename":"BbCircuitVerify","verification_key":["vector",["unsigned char"]],"public_inputs":["vector",[["vector",["unsigned char"]]]],"proof":["vector",[["vector",["unsigned char"]]]],"settings":"ProofSystemSettings"}],["BbChonkComputeVk",{"__typename":"BbChonkComputeVk","circuit":"CircuitInputNoVK"}],["BbChonkStart",{"__typename":"BbChonkStart","num_circuits":"unsigned int"}],["BbChonkLoad",{"__typename":"BbChonkLoad","circuit":"CircuitInput"}],["BbChonkAccumulate",{"__typename":"BbChonkAccumulate","witness":["vector",["unsigned char"]]}],["BbChonkProve",{"__typename":"BbChonkProve"}],["BbChonkVerify",{"__typename":"BbChonkVerify","proof":{"__typename":"ChonkProof","hiding_oink_proof":["vector",[["array",["unsigned char",32]]]],"merge_proof":["vector",[["array",["unsigned char",32]]]],"eccvm_proof":["vector",[["array",["unsigned char",32]]]],"ipa_proof":["vector",[["array",["unsigned char",32]]]],"joint_proof":["vector",[["array",["unsigned char",32]]]]},"vk":["vector",["unsigned char"]]}],["BbChonkBatchVerify",{"__typename":"BbChonkBatchVerify","proofs":["vector",["ChonkProof"]],"vks":["vector",[["vector",["unsigned char"]]]]}],["BbVkAsFields",{"__typename":"BbVkAsFields","verification_key":["vector",["unsigned char"]]}],["BbMegaVkAsFields",{"__typename":"BbMegaVkAsFields","verification_key":["vector",["unsigned char"]]}],["BbCircuitWriteSolidityVerifier",{"__typename":"BbCircuitWriteSolidityVerifier","verification_key":["vector",["unsigned char"]],"settings":"ProofSystemSettings"}],["BbChonkCheckPrecomputedVk",{"__typename":"BbChonkCheckPrecomputedVk","circuit":"CircuitInput"}],["BbChonkStats",{"__typename":"BbChonkStats","circuit":"CircuitInputNoVK","include_gates_per_opcode":"bool"}],["BbChonkCompressProof",{"__typename":"BbChonkCompressProof","proof":"ChonkProof"}],["BbChonkDecompressProof",{"__typename":"BbChonkDecompressProof","compressed_proof":["vector",["unsigned char"]]}],["BbPoseidon2Hash",{"__typename":"BbPoseidon2Hash","inputs":["vector",[["array",["unsigned char",32]]]]}],["BbPoseidon2Permutation",{"__typename":"BbPoseidon2Permutation","inputs":["array",[["array",["unsigned char",32]],4]]}],["BbPedersenCommit",{"__typename":"BbPedersenCommit","inputs":["vector",[["array",["unsigned char",32]]]],"hash_index":"unsigned int"}],["BbPedersenHash",{"__typename":"BbPedersenHash","inputs":["vector",[["array",["unsigned char",32]]]],"hash_index":"unsigned int"}],["BbPedersenHashBuffer",{"__typename":"BbPedersenHashBuffer","input":["vector",["unsigned char"]],"hash_index":"unsigned int"}],["BbBlake2s",{"__typename":"BbBlake2s","data":["vector",["unsigned char"]]}],["BbBlake2sToField",{"__typename":"BbBlake2sToField","data":["vector",["unsigned char"]]}],["BbAesEncrypt",{"__typename":"BbAesEncrypt","plaintext":["vector",["unsigned char"]],"iv":["vector",["unsigned char"]],"key":["vector",["unsigned char"]],"length":"unsigned int"}],["BbAesDecrypt",{"__typename":"BbAesDecrypt","ciphertext":["vector",["unsigned char"]],"iv":["vector",["unsigned char"]],"key":["vector",["unsigned char"]],"length":"unsigned int"}],["BbGrumpkinMul",{"__typename":"BbGrumpkinMul","point":{"__typename":"GrumpkinPoint","x":["array",["unsigned char",32]],"y":["array",["unsigned char",32]]},"scalar":["array",["unsigned char",32]]}],["BbGrumpkinAdd",{"__typename":"BbGrumpkinAdd","point_a":"GrumpkinPoint","point_b":"GrumpkinPoint"}],["BbGrumpkinBatchMul",{"__typename":"BbGrumpkinBatchMul","points":["vector",["GrumpkinPoint"]],"scalar":["array",["unsigned char",32]]}],["BbGrumpkinGetRandomFr",{"__typename":"BbGrumpkinGetRandomFr","points_buf":["vector",["unsigned char"]]}],["BbGrumpkinReduce512",{"__typename":"BbGrumpkinReduce512","input":["vector",["unsigned char"]]}],["BbSecp256k1Mul",{"__typename":"BbSecp256k1Mul","point":{"__typename":"Secp256k1Point","x":["array",["unsigned char",32]],"y":["array",["unsigned char",32]]},"scalar":["array",["unsigned char",32]]}],["BbSecp256k1GetRandomFr",{"__typename":"BbSecp256k1GetRandomFr","points_buf":["vector",["unsigned char"]]}],["BbSecp256k1Reduce512",{"__typename":"BbSecp256k1Reduce512","input":["vector",["unsigned char"]]}],["BbBn254FrSqrt",{"__typename":"BbBn254FrSqrt","input":["array",["unsigned char",32]]}],["BbBn254FqSqrt",{"__typename":"BbBn254FqSqrt","input":["array",["unsigned char",32]]}],["BbBn254G1Mul",{"__typename":"BbBn254G1Mul","point":{"__typename":"Bn254G1Point","x":["array",["unsigned char",32]],"y":["array",["unsigned char",32]]},"scalar":["array",["unsigned char",32]]}],["BbBn254G2Mul",{"__typename":"BbBn254G2Mul","point":{"__typename":"Bn254G2Point","x":["array",[["array",["unsigned char",32]],2]],"y":["array",[["array",["unsigned char",32]],2]]},"scalar":["array",["unsigned char",32]]}],["BbBn254G1IsOnCurve",{"__typename":"BbBn254G1IsOnCurve","point":"Bn254G1Point"}],["BbBn254G1FromCompressed",{"__typename":"BbBn254G1FromCompressed","compressed":["array",["unsigned char",32]]}],["BbSchnorrComputePublicKey",{"__typename":"BbSchnorrComputePublicKey","private_key":["array",["unsigned char",32]]}],["BbSchnorrConstructSignature",{"__typename":"BbSchnorrConstructSignature","message":["vector",["unsigned char"]],"private_key":["array",["unsigned char",32]]}],["BbSchnorrVerifySignature",{"__typename":"BbSchnorrVerifySignature","message":["vector",["unsigned char"]],"public_key":"GrumpkinPoint","s":["array",["unsigned char",32]],"e":["array",["unsigned char",32]]}],["BbEcdsaSecp256k1ComputePublicKey",{"__typename":"BbEcdsaSecp256k1ComputePublicKey","private_key":["array",["unsigned char",32]]}],["BbEcdsaSecp256r1ComputePublicKey",{"__typename":"BbEcdsaSecp256r1ComputePublicKey","private_key":["array",["unsigned char",32]]}],["BbEcdsaSecp256k1ConstructSignature",{"__typename":"BbEcdsaSecp256k1ConstructSignature","message":["vector",["unsigned char"]],"private_key":["array",["unsigned char",32]]}],["BbEcdsaSecp256r1ConstructSignature",{"__typename":"BbEcdsaSecp256r1ConstructSignature","message":["vector",["unsigned char"]],"private_key":["array",["unsigned char",32]]}],["BbEcdsaSecp256k1RecoverPublicKey",{"__typename":"BbEcdsaSecp256k1RecoverPublicKey","message":["vector",["unsigned char"]],"r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbEcdsaSecp256r1RecoverPublicKey",{"__typename":"BbEcdsaSecp256r1RecoverPublicKey","message":["vector",["unsigned char"]],"r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbEcdsaSecp256k1VerifySignature",{"__typename":"BbEcdsaSecp256k1VerifySignature","message":["vector",["unsigned char"]],"public_key":"Secp256k1Point","r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbEcdsaSecp256r1VerifySignature",{"__typename":"BbEcdsaSecp256r1VerifySignature","message":["vector",["unsigned char"]],"public_key":{"__typename":"Secp256r1Point","x":["array",["unsigned char",32]],"y":["array",["unsigned char",32]]},"r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbSrsInitSrs",{"__typename":"BbSrsInitSrs","points_buf":["vector",["unsigned char"]],"num_points":"unsigned int","g2_point":["vector",["unsigned char"]]}],["BbChonkBatchVerifierStart",{"__typename":"BbChonkBatchVerifierStart","vks":["vector",[["vector",["unsigned char"]]]],"num_cores":"unsigned int","batch_size":"unsigned int","fifo_path":"string"}],["BbChonkBatchVerifierQueue",{"__typename":"BbChonkBatchVerifierQueue","request_id":"unsigned long","vk_index":"unsigned int","proof_fields":["vector",[["array",["unsigned char",32]]]]}],["BbChonkBatchVerifierStop",{"__typename":"BbChonkBatchVerifierStop"}],["BbSrsInitGrumpkinSrs",{"__typename":"BbSrsInitGrumpkinSrs","points_buf":["vector",["unsigned char"]],"num_points":"unsigned int"}],["BbShutdown",{"__typename":"BbShutdown"}]]],"responses":["named_union",[["BbErrorResponse",{"__typename":"BbErrorResponse","message":"string"}],["BbCircuitProveResponse",{"__typename":"BbCircuitProveResponse","public_inputs":["vector",[["vector",["unsigned char"]]]],"proof":["vector",[["vector",["unsigned char"]]]],"vk":{"__typename":"BbCircuitComputeVkResponse","bytes":["vector",["unsigned char"]],"fields":["vector",[["vector",["unsigned char"]]]],"hash":["vector",["unsigned char"]]}}],["BbCircuitComputeVkResponse","BbCircuitComputeVkResponse"],["BbCircuitInfoResponse",{"__typename":"BbCircuitInfoResponse","num_gates":"unsigned int","num_gates_dyadic":"unsigned int","num_acir_opcodes":"unsigned int","gates_per_opcode":["vector",["unsigned int"]]}],["BbCircuitVerifyResponse",{"__typename":"BbCircuitVerifyResponse","verified":"bool"}],["BbChonkComputeVkResponse",{"__typename":"BbChonkComputeVkResponse","bytes":["vector",["unsigned char"]],"fields":["vector",[["array",["unsigned char",32]]]]}],["BbChonkStartResponse",{"__typename":"BbChonkStartResponse"}],["BbChonkLoadResponse",{"__typename":"BbChonkLoadResponse"}],["BbChonkAccumulateResponse",{"__typename":"BbChonkAccumulateResponse"}],["BbChonkProveResponse",{"__typename":"BbChonkProveResponse","proof":"ChonkProof"}],["BbChonkVerifyResponse",{"__typename":"BbChonkVerifyResponse","valid":"bool"}],["BbChonkBatchVerifyResponse",{"__typename":"BbChonkBatchVerifyResponse","valid":"bool"}],["BbVkAsFieldsResponse",{"__typename":"BbVkAsFieldsResponse","fields":["vector",[["array",["unsigned char",32]]]]}],["BbMegaVkAsFieldsResponse",{"__typename":"BbMegaVkAsFieldsResponse","fields":["vector",[["array",["unsigned char",32]]]]}],["BbCircuitWriteSolidityVerifierResponse",{"__typename":"BbCircuitWriteSolidityVerifierResponse","solidity_code":"string"}],["BbChonkCheckPrecomputedVkResponse",{"__typename":"BbChonkCheckPrecomputedVkResponse","valid":"bool","actual_vk":["vector",["unsigned char"]]}],["BbChonkStatsResponse",{"__typename":"BbChonkStatsResponse","acir_opcodes":"unsigned int","circuit_size":"unsigned int","gates_per_opcode":["vector",["unsigned int"]]}],["BbChonkCompressProofResponse",{"__typename":"BbChonkCompressProofResponse","compressed_proof":["vector",["unsigned char"]]}],["BbChonkDecompressProofResponse",{"__typename":"BbChonkDecompressProofResponse","proof":"ChonkProof"}],["BbPoseidon2HashResponse",{"__typename":"BbPoseidon2HashResponse","hash":["array",["unsigned char",32]]}],["BbPoseidon2PermutationResponse",{"__typename":"BbPoseidon2PermutationResponse","outputs":["array",[["array",["unsigned char",32]],4]]}],["BbPedersenCommitResponse",{"__typename":"BbPedersenCommitResponse","point":"GrumpkinPoint"}],["BbPedersenHashResponse",{"__typename":"BbPedersenHashResponse","hash":["array",["unsigned char",32]]}],["BbPedersenHashBufferResponse",{"__typename":"BbPedersenHashBufferResponse","hash":["array",["unsigned char",32]]}],["BbBlake2sResponse",{"__typename":"BbBlake2sResponse","hash":["array",["unsigned char",32]]}],["BbBlake2sToFieldResponse",{"__typename":"BbBlake2sToFieldResponse","field":["array",["unsigned char",32]]}],["BbAesEncryptResponse",{"__typename":"BbAesEncryptResponse","ciphertext":["vector",["unsigned char"]]}],["BbAesDecryptResponse",{"__typename":"BbAesDecryptResponse","plaintext":["vector",["unsigned char"]]}],["BbGrumpkinMulResponse",{"__typename":"BbGrumpkinMulResponse","point":"GrumpkinPoint"}],["BbGrumpkinAddResponse",{"__typename":"BbGrumpkinAddResponse","point":"GrumpkinPoint"}],["BbGrumpkinBatchMulResponse",{"__typename":"BbGrumpkinBatchMulResponse","points":["vector",["GrumpkinPoint"]]}],["BbGrumpkinGetRandomFrResponse",{"__typename":"BbGrumpkinGetRandomFrResponse","value":["array",["unsigned char",32]]}],["BbGrumpkinReduce512Response",{"__typename":"BbGrumpkinReduce512Response","value":["array",["unsigned char",32]]}],["BbSecp256k1MulResponse",{"__typename":"BbSecp256k1MulResponse","point":"Secp256k1Point"}],["BbSecp256k1GetRandomFrResponse",{"__typename":"BbSecp256k1GetRandomFrResponse","value":["array",["unsigned char",32]]}],["BbSecp256k1Reduce512Response",{"__typename":"BbSecp256k1Reduce512Response","value":["array",["unsigned char",32]]}],["BbBn254FrSqrtResponse",{"__typename":"BbBn254FrSqrtResponse","is_square_root":"bool","value":["array",["unsigned char",32]]}],["BbBn254FqSqrtResponse",{"__typename":"BbBn254FqSqrtResponse","is_square_root":"bool","value":["array",["unsigned char",32]]}],["BbBn254G1MulResponse",{"__typename":"BbBn254G1MulResponse","point":"Bn254G1Point"}],["BbBn254G2MulResponse",{"__typename":"BbBn254G2MulResponse","point":"Bn254G2Point"}],["BbBn254G1IsOnCurveResponse",{"__typename":"BbBn254G1IsOnCurveResponse","is_on_curve":"bool"}],["BbBn254G1FromCompressedResponse",{"__typename":"BbBn254G1FromCompressedResponse","point":"Bn254G1Point"}],["BbSchnorrComputePublicKeyResponse",{"__typename":"BbSchnorrComputePublicKeyResponse","public_key":"GrumpkinPoint"}],["BbSchnorrConstructSignatureResponse",{"__typename":"BbSchnorrConstructSignatureResponse","s":["array",["unsigned char",32]],"e":["array",["unsigned char",32]]}],["BbSchnorrVerifySignatureResponse",{"__typename":"BbSchnorrVerifySignatureResponse","verified":"bool"}],["BbEcdsaSecp256k1ComputePublicKeyResponse",{"__typename":"BbEcdsaSecp256k1ComputePublicKeyResponse","public_key":"Secp256k1Point"}],["BbEcdsaSecp256r1ComputePublicKeyResponse",{"__typename":"BbEcdsaSecp256r1ComputePublicKeyResponse","public_key":"Secp256r1Point"}],["BbEcdsaSecp256k1ConstructSignatureResponse",{"__typename":"BbEcdsaSecp256k1ConstructSignatureResponse","r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbEcdsaSecp256r1ConstructSignatureResponse",{"__typename":"BbEcdsaSecp256r1ConstructSignatureResponse","r":["array",["unsigned char",32]],"s":["array",["unsigned char",32]],"v":"unsigned char"}],["BbEcdsaSecp256k1RecoverPublicKeyResponse",{"__typename":"BbEcdsaSecp256k1RecoverPublicKeyResponse","public_key":"Secp256k1Point"}],["BbEcdsaSecp256r1RecoverPublicKeyResponse",{"__typename":"BbEcdsaSecp256r1RecoverPublicKeyResponse","public_key":"Secp256r1Point"}],["BbEcdsaSecp256k1VerifySignatureResponse",{"__typename":"BbEcdsaSecp256k1VerifySignatureResponse","verified":"bool"}],["BbEcdsaSecp256r1VerifySignatureResponse",{"__typename":"BbEcdsaSecp256r1VerifySignatureResponse","verified":"bool"}],["BbSrsInitSrsResponse",{"__typename":"BbSrsInitSrsResponse","points_buf":["vector",["unsigned char"]]}],["BbChonkBatchVerifierStartResponse",{"__typename":"BbChonkBatchVerifierStartResponse"}],["BbChonkBatchVerifierQueueResponse",{"__typename":"BbChonkBatchVerifierQueueResponse"}],["BbChonkBatchVerifierStopResponse",{"__typename":"BbChonkBatchVerifierStopResponse"}],["BbSrsInitGrumpkinSrsResponse",{"__typename":"BbSrsInitGrumpkinSrsResponse","points_buf":["vector",["unsigned char"]]}],["BbShutdownResponse",{"__typename":"BbShutdownResponse"}]]]} + diff --git a/barretenberg/codegen/schemas/cdb_schema.json b/barretenberg/codegen/schemas/cdb_schema.json new file mode 100644 index 000000000000..3e54b0e2035f --- /dev/null +++ b/barretenberg/codegen/schemas/cdb_schema.json @@ -0,0 +1,2 @@ +{"__typename":"CdbApi","commands":["named_union",[["CdbGetContractInstance",{"__typename":"CdbGetContractInstance","address":["array",["unsigned char",32]],"forkId":"unsigned long"}],["CdbGetContractClass",{"__typename":"CdbGetContractClass","classId":["array",["unsigned char",32]],"forkId":"unsigned long"}],["CdbGetBytecodeCommitment",{"__typename":"CdbGetBytecodeCommitment","classId":["array",["unsigned char",32]],"forkId":"unsigned long"}],["CdbGetDebugFunctionName",{"__typename":"CdbGetDebugFunctionName","address":["array",["unsigned char",32]],"selector":["array",["unsigned char",32]],"forkId":"unsigned long"}],["CdbAddContracts",{"__typename":"CdbAddContracts","contractDeploymentData":{"__typename":"ContractDeploymentData","contractClassLogs":["vector",[{"__typename":"ContractClassLog","contractAddress":["array",["unsigned char",32]],"fields":{"__typename":"ContractClassLogFields","fields":["vector",[["array",["unsigned char",32]]]]},"emittedLength":"unsigned int"}]],"privateLogs":["vector",[{"__typename":"PrivateLog","fields":["vector",[["array",["unsigned char",32]]]],"emittedLength":"unsigned int"}]]},"forkId":"unsigned long"}],["CdbCreateCheckpoint",{"__typename":"CdbCreateCheckpoint","forkId":"unsigned long"}],["CdbCommitCheckpoint",{"__typename":"CdbCommitCheckpoint","forkId":"unsigned long"}],["CdbRevertCheckpoint",{"__typename":"CdbRevertCheckpoint","forkId":"unsigned long"}],["CdbAddContractClass",{"__typename":"CdbAddContractClass","contractClass":{"__typename":"ContractClass","id":["array",["unsigned char",32]],"artifactHash":["array",["unsigned char",32]],"privateFunctionsRoot":["array",["unsigned char",32]],"packedBytecode":["vector",["unsigned char"]]},"bytecodeCommitment":["array",["unsigned char",32]]}],["CdbAddContractInstance",{"__typename":"CdbAddContractInstance","address":["array",["unsigned char",32]],"instance":{"__typename":"ContractInstance","salt":["array",["unsigned char",32]],"deployer":["array",["unsigned char",32]],"currentContractClassId":["array",["unsigned char",32]],"originalContractClassId":["array",["unsigned char",32]],"initializationHash":["array",["unsigned char",32]],"publicKeys":{"__typename":"PublicKeys","masterNullifierPublicKey":{"__typename":"GrumpkinPoint","x":["array",["unsigned char",32]],"y":["array",["unsigned char",32]]},"masterIncomingViewingPublicKey":"GrumpkinPoint","masterOutgoingViewingPublicKey":"GrumpkinPoint","masterTaggingPublicKey":"GrumpkinPoint"}}}],["CdbRegisterFunctionSignatures",{"__typename":"CdbRegisterFunctionSignatures","signatures":["vector",["string"]]}],["CdbGetContractClassIds",{"__typename":"CdbGetContractClassIds"}],["CdbShutdown",{"__typename":"CdbShutdown"}]]],"responses":["named_union",[["CdbErrorResponse",{"__typename":"CdbErrorResponse","message":"string"}],["CdbGetContractInstanceResponse",{"__typename":"CdbGetContractInstanceResponse","instance":["optional",["ContractInstance"]]}],["CdbGetContractClassResponse",{"__typename":"CdbGetContractClassResponse","contractClass":["optional",["ContractClass"]]}],["CdbGetBytecodeCommitmentResponse",{"__typename":"CdbGetBytecodeCommitmentResponse","commitment":["optional",[["array",["unsigned char",32]]]]}],["CdbGetDebugFunctionNameResponse",{"__typename":"CdbGetDebugFunctionNameResponse","name":["optional",["string"]]}],["CdbAddContractsResponse",{"__typename":"CdbAddContractsResponse"}],["CdbCreateCheckpointResponse",{"__typename":"CdbCreateCheckpointResponse"}],["CdbCommitCheckpointResponse",{"__typename":"CdbCommitCheckpointResponse"}],["CdbRevertCheckpointResponse",{"__typename":"CdbRevertCheckpointResponse"}],["CdbAddContractClassResponse",{"__typename":"CdbAddContractClassResponse"}],["CdbAddContractInstanceResponse",{"__typename":"CdbAddContractInstanceResponse"}],["CdbRegisterFunctionSignaturesResponse",{"__typename":"CdbRegisterFunctionSignaturesResponse"}],["CdbGetContractClassIdsResponse",{"__typename":"CdbGetContractClassIdsResponse","classIds":["vector",[["array",["unsigned char",32]]]]}],["CdbShutdownResponse",{"__typename":"CdbShutdownResponse"}]]]} + diff --git a/barretenberg/codegen/schemas/wsdb_schema.json b/barretenberg/codegen/schemas/wsdb_schema.json new file mode 100644 index 000000000000..8959153dca13 --- /dev/null +++ b/barretenberg/codegen/schemas/wsdb_schema.json @@ -0,0 +1,2 @@ +{"__typename":"WsdbApi","commands":["named_union",[["WsdbGetTreeInfo",{"__typename":"WsdbGetTreeInfo","treeId":"MerkleTreeId","revision":{"__typename":"WorldStateRevision","forkId":"unsigned long","blockNumber":"unsigned int","includeUncommitted":"bool"}}],["WsdbGetStateReference",{"__typename":"WsdbGetStateReference","revision":"WorldStateRevision"}],["WsdbGetInitialStateReference",{"__typename":"WsdbGetInitialStateReference"}],["WsdbGetLeafValue",{"__typename":"WsdbGetLeafValue","treeId":"MerkleTreeId","revision":"WorldStateRevision","leafIndex":"unsigned long"}],["WsdbGetLeafPreimage",{"__typename":"WsdbGetLeafPreimage","treeId":"MerkleTreeId","revision":"WorldStateRevision","leafIndex":"unsigned long"}],["WsdbGetSiblingPath",{"__typename":"WsdbGetSiblingPath","treeId":"MerkleTreeId","revision":"WorldStateRevision","leafIndex":"unsigned long"}],["WsdbGetBlockNumbersForLeafIndices",{"__typename":"WsdbGetBlockNumbersForLeafIndices","treeId":"MerkleTreeId","revision":"WorldStateRevision","leafIndices":["vector",["unsigned long"]]}],["WsdbFindLeafIndices",{"__typename":"WsdbFindLeafIndices","treeId":"MerkleTreeId","revision":"WorldStateRevision","leaves":["vector",[["vector",["unsigned char"]]]],"startIndex":"unsigned long"}],["WsdbFindLowLeaf",{"__typename":"WsdbFindLowLeaf","treeId":"MerkleTreeId","revision":"WorldStateRevision","key":["array",["unsigned char",32]]}],["WsdbFindSiblingPaths",{"__typename":"WsdbFindSiblingPaths","treeId":"MerkleTreeId","revision":"WorldStateRevision","leaves":["vector",[["vector",["unsigned char"]]]]}],["WsdbAppendLeaves",{"__typename":"WsdbAppendLeaves","treeId":"MerkleTreeId","leaves":["vector",[["vector",["unsigned char"]]]],"forkId":"unsigned long"}],["WsdbBatchInsert",{"__typename":"WsdbBatchInsert","treeId":"MerkleTreeId","leaves":["vector",[["vector",["unsigned char"]]]],"subtreeDepth":"unsigned int","forkId":"unsigned long"}],["WsdbSequentialInsert",{"__typename":"WsdbSequentialInsert","treeId":"MerkleTreeId","leaves":["vector",[["vector",["unsigned char"]]]],"forkId":"unsigned long"}],["WsdbUpdateArchive",{"__typename":"WsdbUpdateArchive","blockStateRef":"unordered_map","blockHeaderHash":["array",["unsigned char",32]],"forkId":"unsigned long"}],["WsdbCommit",{"__typename":"WsdbCommit"}],["WsdbRollback",{"__typename":"WsdbRollback"}],["WsdbSyncBlock",{"__typename":"WsdbSyncBlock","blockNumber":"unsigned int","blockStateRef":"unordered_map","blockHeaderHash":["array",["unsigned char",32]],"paddedNoteHashes":["vector",[["array",["unsigned char",32]]]],"paddedL1ToL2Messages":["vector",[["array",["unsigned char",32]]]],"paddedNullifiers":["vector",[{"__typename":"NullifierLeafValue","nullifier":["array",["unsigned char",32]]}]],"publicDataWrites":["vector",[{"__typename":"PublicDataLeafValue","slot":["array",["unsigned char",32]],"value":["array",["unsigned char",32]]}]]}],["WsdbCreateFork",{"__typename":"WsdbCreateFork","latest":"bool","blockNumber":"unsigned int"}],["WsdbDeleteFork",{"__typename":"WsdbDeleteFork","forkId":"unsigned long"}],["WsdbFinalizeBlocks",{"__typename":"WsdbFinalizeBlocks","toBlockNumber":"unsigned int"}],["WsdbUnwindBlocks",{"__typename":"WsdbUnwindBlocks","toBlockNumber":"unsigned int"}],["WsdbRemoveHistoricalBlocks",{"__typename":"WsdbRemoveHistoricalBlocks","toBlockNumber":"unsigned int"}],["WsdbGetStatus",{"__typename":"WsdbGetStatus"}],["WsdbCreateCheckpoint",{"__typename":"WsdbCreateCheckpoint","forkId":"unsigned long"}],["WsdbCommitCheckpoint",{"__typename":"WsdbCommitCheckpoint","forkId":"unsigned long"}],["WsdbRevertCheckpoint",{"__typename":"WsdbRevertCheckpoint","forkId":"unsigned long"}],["WsdbCommitAllCheckpoints",{"__typename":"WsdbCommitAllCheckpoints","forkId":"unsigned long"}],["WsdbRevertAllCheckpoints",{"__typename":"WsdbRevertAllCheckpoints","forkId":"unsigned long"}],["WsdbCopyStores",{"__typename":"WsdbCopyStores","dstPath":"string","compact":["optional",["bool"]]}],["WsdbShutdown",{"__typename":"WsdbShutdown"}]]],"responses":["named_union",[["WsdbErrorResponse",{"__typename":"WsdbErrorResponse","message":"string"}],["WsdbGetTreeInfoResponse",{"__typename":"WsdbGetTreeInfoResponse","treeId":"MerkleTreeId","root":["array",["unsigned char",32]],"size":"unsigned long","depth":"unsigned int"}],["WsdbGetStateReferenceResponse",{"__typename":"WsdbGetStateReferenceResponse","state":"unordered_map"}],["WsdbGetInitialStateReferenceResponse",{"__typename":"WsdbGetInitialStateReferenceResponse","state":"unordered_map"}],["WsdbGetLeafValueResponse",{"__typename":"WsdbGetLeafValueResponse","value":["optional",[["vector",["unsigned char"]]]]}],["WsdbGetLeafPreimageResponse",{"__typename":"WsdbGetLeafPreimageResponse","preimage":["optional",[["vector",["unsigned char"]]]]}],["WsdbGetSiblingPathResponse",{"__typename":"WsdbGetSiblingPathResponse","path":["vector",[["array",["unsigned char",32]]]]}],["WsdbGetBlockNumbersForLeafIndicesResponse",{"__typename":"WsdbGetBlockNumbersForLeafIndicesResponse","blockNumbers":["vector",[["optional",["unsigned int"]]]]}],["WsdbFindLeafIndicesResponse",{"__typename":"WsdbFindLeafIndicesResponse","indices":["vector",[["optional",["unsigned long"]]]]}],["WsdbFindLowLeafResponse",{"__typename":"WsdbFindLowLeafResponse","alreadyPresent":"bool","index":"unsigned long"}],["WsdbFindSiblingPathsResponse",{"__typename":"WsdbFindSiblingPathsResponse","paths":["vector",[["optional",[{"__typename":"SiblingPathAndIndex","index":"unsigned long","path":["vector",[["array",["unsigned char",32]]]]}]]]]}],["WsdbAppendLeavesResponse",{"__typename":"WsdbAppendLeavesResponse"}],["WsdbBatchInsertResponse",{"__typename":"WsdbBatchInsertResponse","result":["vector",["unsigned char"]]}],["WsdbSequentialInsertResponse",{"__typename":"WsdbSequentialInsertResponse","result":["vector",["unsigned char"]]}],["WsdbUpdateArchiveResponse",{"__typename":"WsdbUpdateArchiveResponse"}],["WsdbCommitResponse",{"__typename":"WsdbCommitResponse","status":{"__typename":"WorldStateStatusFull","summary":{"__typename":"WorldStateStatusSummary","unfinalizedBlockNumber":"unsigned long","finalizedBlockNumber":"unsigned long","oldestHistoricalBlock":"unsigned long","treesAreSynched":"bool"},"dbStats":{"__typename":"WorldStateDBStats","noteHashTreeStats":{"__typename":"TreeDBStats","mapSize":"unsigned long","physicalFileSize":"unsigned long","blocksDBStats":{"__typename":"DBStats","name":"string","numDataItems":"unsigned long","totalUsedSize":"unsigned long"},"nodesDBStats":"DBStats","leafPreimagesDBStats":"DBStats","leafIndicesDBStats":"DBStats","blockIndicesDBStats":"DBStats"},"messageTreeStats":"TreeDBStats","archiveTreeStats":"TreeDBStats","publicDataTreeStats":"TreeDBStats","nullifierTreeStats":"TreeDBStats"},"meta":{"__typename":"WorldStateMeta","noteHashTreeMeta":{"__typename":"TreeMeta","name":"string","depth":"unsigned int","size":"unsigned long","committedSize":"unsigned long","root":["array",["unsigned char",32]],"initialSize":"unsigned long","initialRoot":["array",["unsigned char",32]],"oldestHistoricBlock":"unsigned int","unfinalizedBlockHeight":"unsigned int","finalizedBlockHeight":"unsigned int"},"messageTreeMeta":"TreeMeta","archiveTreeMeta":"TreeMeta","publicDataTreeMeta":"TreeMeta","nullifierTreeMeta":"TreeMeta"}}}],["WsdbRollbackResponse",{"__typename":"WsdbRollbackResponse"}],["WsdbSyncBlockResponse",{"__typename":"WsdbSyncBlockResponse","status":"WorldStateStatusFull"}],["WsdbCreateForkResponse",{"__typename":"WsdbCreateForkResponse","forkId":"unsigned long"}],["WsdbDeleteForkResponse",{"__typename":"WsdbDeleteForkResponse"}],["WsdbFinalizeBlocksResponse",{"__typename":"WsdbFinalizeBlocksResponse","status":"WorldStateStatusSummary"}],["WsdbUnwindBlocksResponse",{"__typename":"WsdbUnwindBlocksResponse","status":"WorldStateStatusFull"}],["WsdbRemoveHistoricalBlocksResponse",{"__typename":"WsdbRemoveHistoricalBlocksResponse","status":"WorldStateStatusFull"}],["WsdbGetStatusResponse",{"__typename":"WsdbGetStatusResponse","status":"WorldStateStatusSummary"}],["WsdbCreateCheckpointResponse",{"__typename":"WsdbCreateCheckpointResponse"}],["WsdbCommitCheckpointResponse",{"__typename":"WsdbCommitCheckpointResponse"}],["WsdbRevertCheckpointResponse",{"__typename":"WsdbRevertCheckpointResponse"}],["WsdbCommitAllCheckpointsResponse",{"__typename":"WsdbCommitAllCheckpointsResponse"}],["WsdbRevertAllCheckpointsResponse",{"__typename":"WsdbRevertAllCheckpointsResponse"}],["WsdbCopyStoresResponse",{"__typename":"WsdbCopyStoresResponse"}],["WsdbShutdownResponse",{"__typename":"WsdbShutdownResponse"}]]]} + diff --git a/barretenberg/codegen/scripts/update_schemas.sh b/barretenberg/codegen/scripts/update_schemas.sh new file mode 100755 index 000000000000..5e230356ce6e --- /dev/null +++ b/barretenberg/codegen/scripts/update_schemas.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Update committed schema JSON files from C++ binaries. +# Run this after changing C++ command structs. +# +# Usage: ./scripts/update_schemas.sh +# +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +CODEGEN_DIR="$(dirname "$SCRIPT_DIR")" +BB_BIN="${CODEGEN_DIR}/../cpp/build/bin" + +echo "Updating schemas from C++ binaries..." + +for service in bb:bb wsdb:aztec-wsdb cdb:aztec-cdb avm:aztec-avm; do + IFS=: read -r name binary <<< "$service" + bin_path="${BB_BIN}/${binary}" + + if [ ! -x "$bin_path" ]; then + echo " [skip] ${name}: binary not found at ${bin_path}" + echo " Build C++ first: cd barretenberg/cpp && cmake --preset default && cd build && ninja ${binary}" + continue + fi + + "$bin_path" msgpack schema 2>/dev/null > "${CODEGEN_DIR}/schemas/${name}_schema.json" + echo " [updated] ${name}_schema.json" +done + +# Curve constants: export as msgpack then convert to JSON +bb_path="${BB_BIN}/bb" +if [ -x "$bb_path" ]; then + tmpfile=$(mktemp) + "$bb_path" msgpack curve_constants 2>/dev/null > "$tmpfile" + # Convert msgpack to JSON (msgpackr from barretenberg/ts node_modules) + NODE_PATH="${CODEGEN_DIR}/../ts/node_modules" node -e " + const {unpack} = require('msgpackr'); + const fs = require('fs'); + const buf = fs.readFileSync('$tmpfile'); + const c = unpack(buf); + const toHex = (a) => Buffer.from(a).toString('hex'); + const cvt = (p) => Array.isArray(p.x) ? {x:p.x.map(toHex),y:p.y.map(toHex)} : {x:toHex(p.x),y:toHex(p.y)}; + const out = {}; + for (const [k,v] of Object.entries(c)) { + out[k] = k.endsWith('_modulus') ? toHex(v) : cvt(v); + } + fs.writeFileSync('${CODEGEN_DIR}/schemas/bb_curve_constants.json', JSON.stringify(out, null, 2)); + " + rm -f "$tmpfile" + echo " [updated] bb_curve_constants.json" +fi + +echo "" +echo "Done. Run 'npx tsx src/generate.ts' to regenerate bindings, then commit." diff --git a/barretenberg/codegen/scripts/validate_schemas.sh b/barretenberg/codegen/scripts/validate_schemas.sh new file mode 100755 index 000000000000..34748e40ce42 --- /dev/null +++ b/barretenberg/codegen/scripts/validate_schemas.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# +# Validate committed schema JSON files match C++ binary output. +# Run in CI after C++ build to catch schema drift. +# +# Usage: ./scripts/validate_schemas.sh +# Exit 0: schemas match. Exit 1: schemas out of date. +# +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +CODEGEN_DIR="$(dirname "$SCRIPT_DIR")" +BB_BIN="${CODEGEN_DIR}/../cpp/build/bin" + +FAIL=0 + +for service in bb:bb wsdb:aztec-wsdb cdb:aztec-cdb avm:aztec-avm; do + IFS=: read -r name binary <<< "$service" + bin_path="${BB_BIN}/${binary}" + schema_path="${CODEGEN_DIR}/schemas/${name}_schema.json" + + if [ ! -x "$bin_path" ]; then + echo " [skip] ${name}: binary not found at ${bin_path}" + continue + fi + + if [ ! -f "$schema_path" ]; then + echo " [FAIL] ${name}: committed schema not found at ${schema_path}" + FAIL=1 + continue + fi + + # Export current schema from binary + current=$("$bin_path" msgpack schema 2>/dev/null) + + # Compare with committed + committed=$(cat "$schema_path") + + if [ "$current" = "$committed" ]; then + echo " [ok] ${name}_schema.json matches binary" + else + echo " [FAIL] ${name}_schema.json is out of date!" + echo " Run: cd barretenberg/codegen && ./scripts/update_schemas.sh" + FAIL=1 + fi +done + +if [ "$FAIL" -gt 0 ]; then + echo "" + echo "Schema validation failed. Committed schemas are out of sync with C++ code." + echo "Fix: cd barretenberg/codegen && ./scripts/update_schemas.sh && git add schemas/" + exit 1 +fi + +echo "" +echo "All schemas are up to date." diff --git a/barretenberg/codegen/src/README.md b/barretenberg/codegen/src/README.md new file mode 100644 index 000000000000..892a9ea1d6e8 --- /dev/null +++ b/barretenberg/codegen/src/README.md @@ -0,0 +1,86 @@ +# Multi-Language IPC Code Generation + +Generates type-safe client and server bindings from Aztec IPC service schemas +in four languages: **C++**, **TypeScript**, **Rust**, and **Zig**. + +## Architecture + +``` +C++ Service Binaries (aztec-wsdb, aztec-cdb, aztec-avm, bb) + │ + │ `./binary msgpack schema` → JSON to stdout + ▼ +Raw Schema JSON + │ + │ SchemaVisitor (schema_visitor.ts) + ▼ +CompiledSchema IR (language-neutral) + │ + ├──► TypeScriptCodegen → types, async client, server dispatch + ├──► CppCodegen → IPC client class, server handler + ├──► RustCodegen → types, API struct, Handler trait + └──► ZigCodegen → types, client struct, handler vtable +``` + +## Files + +| File | Purpose | +|------|---------| +| `generate.ts` | Unified entry point — runs all services and languages | +| `service_codegen.ts` | Service configs, language target wiring, `generateForService()` | +| `schema_visitor.ts` | Compiles raw JSON schema to `CompiledSchema` IR | +| `typescript_codegen.ts` | TypeScript types, async/sync client, server dispatch | +| `cpp_codegen.ts` | C++ IPC client class, server handler function | +| `rust_codegen.ts` | Rust types/enums, API struct, Handler trait | +| `zig_codegen.ts` | Zig structs, client, handler vtable | +| `naming.ts` | Shared naming utilities (snake_case, PascalCase) | +| `SCHEMA_SPEC.md` | Wire protocol and schema format specification | + +## Services + +| Service | Binary | Languages | Client | Server | +|---------|--------|-----------|--------|--------| +| bb | `bb` | TS, Rust | yes | no | +| wsdb | `aztec-wsdb` | TS, C++, Rust, Zig | yes | yes | +| cdb | `aztec-cdb` | TS, C++, Rust, Zig | yes | yes | +| avm | `aztec-avm` | TS, Rust, Zig | yes | no | + +## Usage + +```bash +# Generate all services, all languages +yarn generate + +# Generate a single service +yarn generate:wsdb + +# Generate specific services via unified entry point +npx tsx src/cbind/generate.ts wsdb cdb +``` + +## Adding a New Command + +1. Define the command struct in C++ with `MSGPACK_SCHEMA_NAME` and `SERIALIZATION_FIELDS` +2. Add a nested `Response` struct +3. Add both to the service's `Command` and `CommandResponse` NamedUnion types +4. Run `yarn generate` +5. All language bindings regenerate automatically + +## Adding a New Language + +1. Create `_codegen.ts` implementing `generateTypes()`, `generateClient()`, `generateServer()` +2. Add a target helper function in `service_codegen.ts` +3. Wire it into the relevant service configs +4. See `SCHEMA_SPEC.md` for the wire protocol contract + +## Output Locations + +- **TypeScript**: `src/aztec-{wsdb,cdb,avm}/generated/` +- **C++**: `cpp/src/barretenberg/{wsdb,cdb}/*_generated.{hpp,cpp}` +- **Rust**: `rust/aztec-ipc/src/{wsdb,cdb,avm}/` +- **Zig**: `zig/aztec-ipc/src/{wsdb,cdb,avm}/` + +## Schema Versioning + +Each generated file includes a `SCHEMA_HASH` constant (SHA-256 of the raw schema JSON). +Clients can check this at connection time to detect incompatible schema changes. diff --git a/barretenberg/codegen/src/SCHEMA_SPEC.md b/barretenberg/codegen/src/SCHEMA_SPEC.md new file mode 100644 index 000000000000..d8969daa53a2 --- /dev/null +++ b/barretenberg/codegen/src/SCHEMA_SPEC.md @@ -0,0 +1,242 @@ +# Aztec IPC Schema Format Specification + +This document specifies the JSON schema format used for cross-language code generation +in the Aztec IPC system. The schema is the contract between the C++ binary's +`msgpack schema` command and all language code generators. + +## Overview + +Each IPC service binary (aztec-wsdb, aztec-cdb, aztec-avm, bb) exports its schema via: + +```bash +./aztec-wsdb msgpack schema # Outputs JSON to stdout +``` + +The output is a JSON object representing the service's API, derived at compile time +from C++ type metadata via the `MsgpackSchemaPacker` infrastructure. + +## Top-Level Structure + +```json +{ + "commands": ["named_union", [ + ["CommandNameA", { "__typename": "CommandNameA", "field1": , ... }], + ["CommandNameB", { "__typename": "CommandNameB", "field1": , ... }] + ]], + "responses": ["named_union", [ + ["ResponseNameA", { "__typename": "ResponseNameA", "field1": , ... }], + ["ErrorResponse", { "__typename": "ErrorResponse", "message": "string" }] + ]] +} +``` + +- `commands` and `responses` are both **NamedUnion** types (see below). +- Commands and responses are positionally paired: the Nth command corresponds to the Nth + non-error response. The error response (ending in `ErrorResponse`) is shared across all commands. + +## Type Encodings + +Types in the schema are represented as one of: + +### Primitive Types (JSON strings) + +| Schema String | C++ Type | Description | +|---------------|----------|-------------| +| `"bool"` | `bool` | Boolean | +| `"int"` | `int` | Signed 32-bit integer | +| `"unsigned int"` | `unsigned int` / `uint32_t` | Unsigned 32-bit integer | +| `"unsigned short"` | `unsigned short` / `uint16_t` | Unsigned 16-bit integer | +| `"unsigned long"` | `unsigned long` / `uint64_t` | Unsigned 64-bit integer | +| `"unsigned char"` | `unsigned char` / `uint8_t` | Unsigned 8-bit integer | +| `"double"` | `double` | 64-bit floating point | +| `"string"` | `std::string` | UTF-8 string | +| `"bin32"` | Fixed-size byte arrays | Raw binary data (e.g., field elements) | +| `"field2"` | `Fq2` | Extension field: pair of 32-byte field elements | +| `"MerkleTreeId"` | `MerkleTreeId` enum | C++ enum, serialized as uint32 | +| `"unordered_map"` | `std::unordered_map` | Map type (special-cased per usage) | + +### Container Types (JSON arrays) + +Container types are encoded as 2-element arrays: `[kind, [args...]]` + +#### `vector` +```json +["vector", []] +``` +Example: `["vector", ["unsigned char"]]` = `std::vector` = byte array + +**Special case**: `["vector", ["unsigned char"]]` is treated as raw bytes, not an array of integers. + +#### `array` +```json +["array", [, ]] +``` +Example: `["array", ["unsigned char", 32]]` = `std::array` = 32-byte fixed buffer + +**Special case**: `["array", ["unsigned char", N]]` is treated as raw bytes (like `vector`). + +#### `optional` +```json +["optional", []] +``` +Example: `["optional", ["string"]]` = `std::optional` + +#### `shared_ptr` +```json +["shared_ptr", []] +``` +Treated as a transparent wrapper; the inner type is used directly. + +#### `tuple` +```json +["tuple", [, , ...]] +``` +Example: `["tuple", ["string", "unsigned long"]]` = `std::tuple` + +#### `alias` +```json +["alias", [, ]] +``` +Alias for a type that serializes as another msgpack type (e.g., `uint256_t` serializes as raw bytes). +Treated as raw bytes in code generation. + +### Struct Types (JSON objects) + +Structs are JSON objects with a `__typename` field and named fields: + +```json +{ + "__typename": "SomeStruct", + "field_a": "unsigned int", + "field_b": ["vector", ["unsigned char"]], + "field_c": { + "__typename": "NestedStruct", + "x": "unsigned long" + } +} +``` + +- `__typename` identifies the struct for deduplication and named reference. +- Field names are the original C++ field names (snake_case by convention). +- Field values are type encodings (primitives, containers, or nested structs). +- Nested structs are inlined on first occurrence and referenced by `__typename` string thereafter. + +### NamedUnion Type + +```json +["named_union", [ + ["VariantName1", ], + ["VariantName2", ] +]] +``` + +A tagged union where each variant has a string name and a type schema. +This is the top-level type for both `commands` and `responses`. + +## Wire Protocol + +The schema defines the types; this section specifies how they are serialized on the wire. + +### Framing + +All messages use length-prefix framing: + +``` +[4 bytes: payload length, little-endian uint32][payload: msgpack bytes] +``` + +### Request Wire Format + +A request is a 1-element msgpack **array** containing a NamedUnion: + +``` +msgpack array(1) [ + msgpack array(2) [ + msgpack string: "CommandName", + msgpack map: { field1: value1, field2: value2, ... } + ] +] +``` + +In msgpack terms: `[[command_name, {fields...}]]` + +The outer array (tuple wrapper) exists for extensibility. The inner 2-element array +is the NamedUnion encoding. + +### Response Wire Format + +A response is a NamedUnion (no tuple wrapper): + +``` +msgpack array(2) [ + msgpack string: "ResponseName" | "ErrorResponse", + msgpack map: { field1: value1, field2: value2, ... } +] +``` + +If the response variant name ends with `ErrorResponse`, the response indicates an error. +The error struct always has a `message` field (string). + +### NamedUnion Wire Encoding + +A NamedUnion value is always encoded as a **2-element msgpack array**: +- Element 0: `string` — the variant name (matches `MSGPACK_SCHEMA_NAME` in C++) +- Element 1: `map` — the variant's fields, encoded as a msgpack map with string keys + +### Struct Wire Encoding + +Structs are encoded as msgpack **maps** with string keys matching the original C++ field names. +The `__typename` field from the schema is NOT included in the wire encoding — it is only +used for schema identification. + +### Type Wire Encoding Summary + +| Schema Type | msgpack Encoding | +|-------------|------------------| +| `bool` | msgpack bool | +| `unsigned int`, `int` | msgpack integer (smallest encoding that fits) | +| `unsigned short` | msgpack integer | +| `unsigned long` | msgpack integer | +| `unsigned char` | msgpack integer | +| `double` | msgpack float64 | +| `string` | msgpack str | +| `bin32`, `bytes` | msgpack bin | +| `vector` | msgpack bin (NOT array of integers) | +| `array` | msgpack bin | +| `vector` | msgpack array | +| `array` | msgpack array (fixed length) | +| `optional` | msgpack nil (if absent) or value | +| `field2` | msgpack ext type or array of 2 bin values | +| `enum` | msgpack integer (uint32) | +| struct | msgpack map with string keys | +| NamedUnion | msgpack array(2): [string, map] | + +### Integer Encoding Note + +msgpack uses the **smallest encoding that fits the value**, not the declared type. +A `uint64_t` value of `5` encodes as a single byte (positive fixint), not as a +uint64 encoding. Decoders MUST accept any integer encoding width for any integer field. + +## Schema Versioning + +Schema compatibility can be validated by computing a SHA-256 hash of the raw JSON schema +output. This hash should be checked at connection time when possible. A mismatch indicates +that the service binary and client were generated from different schema versions. + +## Adding a New Command + +To add a new command to a service: + +1. Define the command struct in C++ with `MSGPACK_SCHEMA_NAME` and `SERIALIZATION_FIELDS` +2. Add a nested `Response` struct with its own `MSGPACK_SCHEMA_NAME` and `SERIALIZATION_FIELDS` +3. Add both to the service's `Command` and `CommandResponse` NamedUnion types +4. Run `yarn generate` to regenerate all language bindings +5. Verify generated code compiles in all target languages + +## Source Files + +- Schema export: `barretenberg/cpp/src/barretenberg/serialize/msgpack_impl/schema_impl.hpp` +- Schema naming: `barretenberg/cpp/src/barretenberg/serialize/msgpack_impl/schema_name.hpp` +- NamedUnion: `barretenberg/cpp/src/barretenberg/common/named_union.hpp` +- Schema visitor (IR compiler): `barretenberg/ts/src/cbind/schema_visitor.ts` +- Service codegen orchestrator: `barretenberg/ts/src/cbind/service_codegen.ts` diff --git a/barretenberg/codegen/src/cpp_codegen.ts b/barretenberg/codegen/src/cpp_codegen.ts new file mode 100644 index 000000000000..c823913df738 --- /dev/null +++ b/barretenberg/codegen/src/cpp_codegen.ts @@ -0,0 +1,1109 @@ +/** + * C++ IPC Client Code Generator + * + * Generates a C++ IPC client from a CompiledSchema. The generated client: + * - Connects to a server over Unix Domain Socket via ipc::IpcClient + * - Wraps each command in a NamedUnion, serializes with msgpack, sends, receives, deserializes + * - Has one method per command, returning the typed response + * + * Usage: + * const gen = new CppCodegen({ namespace: 'bb::cdb', prefix: 'Cdb' }); + * const header = gen.generateHeader(schema); + * const impl = gen.generateImpl(schema); + */ + +import type { CompiledSchema, Type, Struct, Field, Command } from './schema_visitor.ts'; +import { toSnakeCase } from './naming.ts'; + +export interface CppCodegenOptions { + /** C++ namespace for generated code, e.g. 'bb::cdb' */ + namespace: string; + /** Prefix for command/response types, e.g. 'Cdb' */ + prefix: string; + /** Header path for the *_execute.hpp file that defines Command/CommandResponse NamedUnions */ + executeHeader: string; + /** Header path for the *_commands.hpp file that defines the command structs */ + commandsHeader: string; + /** + * External types: types that already exist in barretenberg headers. + * Map from type name → header include path. + * These types will be #included instead of generated. + */ + externals?: Record; + /** + * Using-namespace declarations to add at the top of generated commands file. + * E.g. ['bb::world_state', 'bb::crypto::merkle_tree'] + */ + usingNamespaces?: string[]; + /** + * Additional headers to include in generated commands file. + */ + additionalIncludes?: string[]; + /** + * Override for the generated output directory include path. + * Used when commandsHeader doesn't point to the generated/ directory + * (e.g. bb keeps hand-written commands but generates server dispatch). + */ + generatedIncludeDir?: string; + /** + * Sub-namespace for wire types (e.g. 'wire' → types in ns::wire). + * When set, standalone types are wrapped in this sub-namespace, + * and the server dispatch deserializes into wire types then converts to domain types. + */ + wireNamespace?: string; +} + +export class CppCodegen { + constructor(private opts: CppCodegenOptions) {} + + /** Convert a command name to a C++ method name (snake_case without prefix) */ + private methodName(commandName: string): string { + // Strip prefix: "CdbGetContractInstance" -> "GetContractInstance" -> "get_contract_instance" + const withoutPrefix = commandName.startsWith(this.opts.prefix) + ? commandName.slice(this.opts.prefix.length) + : commandName; + return toSnakeCase(withoutPrefix); + } + + /** Check if the response has fields (non-void return) */ + private hasResponseFields(command: Command, schema: CompiledSchema): boolean { + const resp = schema.responses.get(command.responseType); + return !!resp && resp.fields.length > 0; + } + + /** Generate the method signature using command struct types directly */ + private generateMethodSignature(command: Command, schema: CompiledSchema, className?: string): string { + const method = this.methodName(command.name); + const hasFields = this.hasResponseFields(command, schema); + // Wire types use top-level response names (BbFooResponse). + // Command types with nested Response use Cmd::Response. + const retType = hasFields + ? (this.opts.wireNamespace ? command.responseType : `${command.name}::Response`) + : 'void'; + + // If the command has fields, take the whole command struct by value + const params = command.fields.length > 0 ? `${command.name} cmd` : ''; + + const prefix = className ? `${className}::` : ''; + const constSuffix = !this.isWriteCommand(command) ? ' const' : ''; + + return `${retType} ${prefix}${method}(${params})${constSuffix}`; + } + + /** Check if a command modifies state (non-const) */ + private isWriteCommand(command: Command): boolean { + const name = command.name.toLowerCase(); + return name.includes('add') || name.includes('create') || + name.includes('commit') || name.includes('revert') || + name.includes('register') || name.includes('shutdown') || + name.includes('delete') || name.includes('sync') || + name.includes('rollback') || name.includes('unwind'); + } + + /** Generate the header file */ + generateHeader(schema: CompiledSchema, schemaHash?: string): string { + const { namespace: ns, prefix } = this.opts; + const wireNs = this.opts.wireNamespace; + const className = `${prefix}IpcClient`; + + const methods = schema.commands.map(cmd => { + const sig = this.generateMethodSignature(cmd, schema); + return ` ${sig};`; + }).join('\n'); + + const hashConstant = schemaHash + ? `\n/** Schema version hash for compatibility checking */\nstatic constexpr const char SCHEMA_HASH[] = "${schemaHash}";\n` + : ''; + + // When wireNamespace is set, include wire types and bring them into scope + const wireInclude = wireNs + ? `#include "${this.generatedDir()}/${toSnakeCase(prefix)}_types.hpp"\n` + : ''; + const wireUsing = wireNs + ? `using namespace ${wireNs};\n` + : ''; + + const typesInclude = `${this.generatedDir()}/${toSnakeCase(prefix)}_types.hpp`; + + return `// AUTOGENERATED FILE - DO NOT EDIT +#pragma once + +#include "${typesInclude}" +#include "${this.generatedDir()}/ipc_client.hpp" +// clang-format on + +#include +#include + +namespace ${ns} { +${wireUsing}${hashConstant} +/** + * @brief Auto-generated IPC client. + * + * Each method sends a msgpack-serialized command to the server over UDS + * and returns the typed response. All methods block until the response arrives. + */ +class ${className} { + public: + explicit ${className}(const std::string& socket_path); + ~${className}(); + + ${className}(const ${className}&) = delete; + ${className}& operator=(const ${className}&) = delete; + +${methods} + + private: + template + Resp send(Cmd&& cmd) const; + + mutable std::unique_ptr<::ipc::IpcClient> client_; +}; + +} // namespace ${ns} +`; + } + + /** Generate the implementation file — string-based serialization, no NamedUnion */ + generateImpl(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const className = `${prefix}IpcClient`; + const errorType = schema.errorTypeName || `${prefix}ErrorResponse`; + + const methods = schema.commands.map(cmd => { + return this.generateMethodImpl(cmd, schema, className); + }).join('\n'); + + return `// AUTOGENERATED FILE - DO NOT EDIT + +#include "${this.headerIncludePath()}" +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/serialize/msgpack_impl.hpp" + +#include +#include + +namespace ${ns} { + +${className}::${className}(const std::string& socket_path) + : client_(std::make_unique<::ipc::IpcClient>(socket_path.c_str())) +{} + +${className}::~${className}() = default; + +template +Resp ${className}::send(Cmd&& cmd) const +{ + // Serialize as [[CommandName, {payload}]] + msgpack::sbuffer send_buffer; + msgpack::packer pk(send_buffer); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string(Cmd::MSGPACK_SCHEMA_NAME)); + pk.pack(std::forward(cmd)); + + // Send request, receive response + std::vector request_bytes(send_buffer.data(), send_buffer.data() + send_buffer.size()); + auto response_bytes = client_->call(request_bytes); + + if (response_bytes.empty()) { + throw std::runtime_error("Empty response from server"); + } + + // Parse response: [ResponseName, {payload}] + auto unpacked = msgpack::unpack( + reinterpret_cast(response_bytes.data()), response_bytes.size()); + auto obj = unpacked.get(); + + if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 2 || + obj.via.array.ptr[0].type != msgpack::type::STR) { + throw std::runtime_error("Invalid response format from server"); + } + + std::string resp_name(obj.via.array.ptr[0].via.str.ptr, obj.via.array.ptr[0].via.str.size); + if (resp_name == "${errorType}") { + std::string message; + auto& payload = obj.via.array.ptr[1]; + // Extract message field from the error map + if (payload.type == msgpack::type::MAP) { + for (uint32_t i = 0; i < payload.via.map.size; ++i) { + auto& kv = payload.via.map.ptr[i]; + if (kv.key.type == msgpack::type::STR) { + std::string key(kv.key.via.str.ptr, kv.key.via.str.size); + if (key == "message" && kv.val.type == msgpack::type::STR) { + message = std::string(kv.val.via.str.ptr, kv.val.via.str.size); + } + } + } + } + throw std::runtime_error("Server error: " + message); + } + + Resp result; + obj.via.array.ptr[1].convert(result); + return result; +} + +${methods} +} // namespace ${ns} +`; + } + + /** Generate a single method implementation */ + private generateMethodImpl(command: Command, schema: CompiledSchema, className: string): string { + const sig = this.generateMethodSignature(command, schema, className); + const hasFields = this.hasResponseFields(command, schema); + const respType = this.opts.wireNamespace ? command.responseType : `${command.name}::Response`; + + const cmdExpr = command.fields.length > 0 ? 'std::move(cmd)' : `${command.name}{}`; + + if (!hasFields) { + return `${sig} +{ + send<${command.name}, ${respType}>(${cmdExpr}); +} +`; + } + + return `${sig} +{ + return send<${command.name}, ${respType}>(${cmdExpr}); +} +`; + } + + /** Get the generated/ directory include path */ + private generatedDir(): string { + if (this.opts.generatedIncludeDir) { + return this.opts.generatedIncludeDir; + } + return this.opts.commandsHeader.substring(0, this.opts.commandsHeader.lastIndexOf('/')); + } + + /** Compute the include path for the generated client header */ + private headerIncludePath(): string { + return `${this.generatedDir()}/${toSnakeCase(this.opts.prefix)}_ipc_client.hpp`; + } + + // ----------------------------------------------------------------------- + // Standalone types (no barretenberg dependencies) + // ----------------------------------------------------------------------- + + /** Generate standalone C++ types with MSGPACK_DEFINE_MAP — no barretenberg deps */ + generateStandaloneTypes(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + + // Map schema types to C++ types + const mapType = (type: import('./schema_visitor.ts').Type): string => { + switch (type.kind) { + case 'primitive': + switch (type.primitive) { + case 'bool': return 'bool'; + case 'u8': return 'uint8_t'; + case 'u16': return 'uint16_t'; + case 'u32': return 'uint32_t'; + case 'u64': return 'uint64_t'; + case 'f64': return 'double'; + case 'string': return 'std::string'; + case 'bytes': return 'std::vector'; + case 'fr': return 'Fr'; // std::array + case 'field2': return 'std::array'; + case 'enum_u32': return 'uint32_t'; + case 'map_u32_pair': return 'std::unordered_map, uint64_t>>'; + } + break; + case 'vector': return `std::vector<${mapType(type.element!)}>`; + case 'array': return `std::array<${mapType(type.element!)}, ${type.size}>`; + case 'optional': return `std::optional<${mapType(type.element!)}>`; + case 'struct': return type.struct!.name; + } + return 'void'; + }; + + const allStructs = [...schema.structs.values(), ...schema.responses.values()]; + const structs = allStructs.map(s => { + const fields = s.fields.map(f => ` ${mapType(f.type)} ${f.name};`).join('\n'); + const fieldNames = s.fields.map(f => f.name).join(', '); + const schemaName = ` static constexpr const char MSGPACK_SCHEMA_NAME[] = "${s.name}";`; + const serialization = fieldNames + ? ` SERIALIZATION_FIELDS(${fieldNames})` + : ` template void msgpack(_PackFn&& pack_fn) { pack_fn(); }`; + return `struct ${s.name} {\n${schemaName}\n${fields}\n${serialization}\n bool operator==(const ${s.name}&) const = default;\n};`; + }).join('\n\n'); + + return `// AUTOGENERATED FILE - DO NOT EDIT +// Standalone types for ${prefix} service. +#pragma once + +#include +#include +#include +#include +#include +#include + +// --------------------------------------------------------------------------- +// Self-contained serialization macro. +// Defines a msgpack() method that enumerates field name/value pairs. +// Works with msgpack packers (serialization) and schema reflectors. +// If barretenberg's SERIALIZATION_FIELDS is already available, use it instead. +// --------------------------------------------------------------------------- +#ifndef SERIALIZATION_FIELDS +#define _SF_E1(x) #x, x +#define _SF_E2(x, ...) #x, x, _SF_E1(__VA_ARGS__) +#define _SF_E3(x, ...) #x, x, _SF_E2(__VA_ARGS__) +#define _SF_E4(x, ...) #x, x, _SF_E3(__VA_ARGS__) +#define _SF_E5(x, ...) #x, x, _SF_E4(__VA_ARGS__) +#define _SF_E6(x, ...) #x, x, _SF_E5(__VA_ARGS__) +#define _SF_E7(x, ...) #x, x, _SF_E6(__VA_ARGS__) +#define _SF_E8(x, ...) #x, x, _SF_E7(__VA_ARGS__) +#define _SF_E9(x, ...) #x, x, _SF_E8(__VA_ARGS__) +#define _SF_E10(x, ...) #x, x, _SF_E9(__VA_ARGS__) +#define _SF_E11(x, ...) #x, x, _SF_E10(__VA_ARGS__) +#define _SF_E12(x, ...) #x, x, _SF_E11(__VA_ARGS__) +#define _SF_E13(x, ...) #x, x, _SF_E12(__VA_ARGS__) +#define _SF_E14(x, ...) #x, x, _SF_E13(__VA_ARGS__) +#define _SF_E15(x, ...) #x, x, _SF_E14(__VA_ARGS__) +#define _SF_E16(x, ...) #x, x, _SF_E15(__VA_ARGS__) +#define _SF_E17(x, ...) #x, x, _SF_E16(__VA_ARGS__) +#define _SF_E18(x, ...) #x, x, _SF_E17(__VA_ARGS__) +#define _SF_E19(x, ...) #x, x, _SF_E18(__VA_ARGS__) +#define _SF_E20(x, ...) #x, x, _SF_E19(__VA_ARGS__) +#define _SF_CNT(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,N,...) N +#define _SF_NUM(...) _SF_CNT(__VA_ARGS__,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1) +#define _SF_CAT(a, b) a##b +#define _SF_SEL(n) _SF_CAT(_SF_E, n) +#define _SF_NVP(...) _SF_SEL(_SF_NUM(__VA_ARGS__))(__VA_ARGS__) +#define SERIALIZATION_FIELDS(...) \\ + template void msgpack(_PackFn pack_fn) { pack_fn(_SF_NVP(__VA_ARGS__)); } +#endif + +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated. +using Fr = std::array; + +namespace ${ns}${this.opts.wireNamespace ? '::' + this.opts.wireNamespace : ''} { + +${structs} + +} // namespace ${ns}${this.opts.wireNamespace ? '::' + this.opts.wireNamespace : ''} +`; + } + + /** Generate standalone server dispatch (no barretenberg deps) */ + generateStandaloneServer(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const errorType = schema.errorTypeName || `${prefix}ErrorResponse`; + + const dispatchCases = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + return ` if (cmd_name == "${c.name}") { + ${c.name} cmd; cmd_payload.convert(cmd); + auto resp = handle_${toSnakeCase(c.name.startsWith(prefix) ? c.name.slice(prefix.length) : c.name)}(cmd); + pk.pack_array(2); pk.pack(std::string("${c.responseType}")); pk.pack(resp); + }`; + }).join(' else '); + + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const method = toSnakeCase(c.name.startsWith(prefix) ? c.name.slice(prefix.length) : c.name); + return `// TODO: implement ${c.name} +inline ${c.responseType} handle_${method}(const ${c.name}& /*cmd*/) { + throw std::runtime_error("not implemented: ${c.name}"); +}`; + }).join('\n\n'); + + const shutdownName = schema.commands.find(c => c.name.endsWith('Shutdown'))?.name || `${prefix}Shutdown`; + const shutdownResp = shutdownName + 'Response'; + + return `// AUTOGENERATED FILE - DO NOT EDIT +// ${prefix} server dispatch — standalone, no barretenberg dependencies. +// Implement the handle_* functions to build your ${prefix} service. +#pragma once + +#include "types_gen.hpp" +#include "${this.generatedDir()}/ipc_server.hpp" +#include + +namespace ${ns} { + +// --------------------------------------------------------------------------- +// Dispatch: routes commands to handler functions +// --------------------------------------------------------------------------- + +inline std::vector dispatch(const std::vector& payload) { + auto oh = msgpack::unpack(reinterpret_cast(payload.data()), payload.size()); + auto obj = oh.get(); + auto& inner = obj.via.array.ptr[0]; + std::string cmd_name(inner.via.array.ptr[0].via.str.ptr, inner.via.array.ptr[0].via.str.size); + auto& cmd_payload = inner.via.array.ptr[1]; + + msgpack::sbuffer resp_buf; + msgpack::packer pk(resp_buf); + + try { + if (cmd_name == "${shutdownName}") { + pk.pack_array(2); pk.pack(std::string("${shutdownResp}")); pk.pack_map(0); + } else ${dispatchCases} else { + pk.pack_array(2); pk.pack(std::string("${errorType}")); + pk.pack_map(1); pk.pack(std::string("message")); pk.pack(std::string("unknown command: ") + cmd_name); + } + } catch (const std::exception& e) { + resp_buf.clear(); + msgpack::packer epk(resp_buf); + epk.pack_array(2); epk.pack(std::string("${errorType}")); + epk.pack_map(1); epk.pack(std::string("message")); epk.pack(std::string(e.what())); + } + + return std::vector(resp_buf.data(), resp_buf.data() + resp_buf.size()); +} + +/// Start the server on the given socket path. +inline void serve(const char* socket_path) { + ipc::serve(socket_path, dispatch); +} + +// --------------------------------------------------------------------------- +// Handler stubs — implement these to build your ${prefix} service. +// --------------------------------------------------------------------------- + +${stubs} + +} // namespace ${ns} +`; + } + + /** Generate standalone client wrapper (no barretenberg deps) */ + generateStandaloneClient(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const errorType = schema.errorTypeName || `${prefix}ErrorResponse`; + + const methods = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const method = toSnakeCase(c.name.startsWith(prefix) ? c.name.slice(prefix.length) : c.name); + const hasFields = c.fields.length > 0; + const param = hasFields ? `const ${c.name}& cmd` : ''; + const packCmd = hasFields ? 'cmd' : `${c.name}{}`; + return ` ${c.responseType} ${method}(${param}) { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(1); pk.pack_array(2); pk.pack(std::string("${c.name}")); pk.pack(${packCmd}); + auto resp = client_.call(std::vector(buf.data(), buf.data() + buf.size())); + auto oh = msgpack::unpack(reinterpret_cast(resp.data()), resp.size()); + auto obj = oh.get(); + std::string resp_name(obj.via.array.ptr[0].via.str.ptr, obj.via.array.ptr[0].via.str.size); + if (resp_name == "${errorType}") throw std::runtime_error("server error"); + ${c.responseType} result; obj.via.array.ptr[1].convert(result); + return result; + }`; + }).join('\n\n'); + + return `// AUTOGENERATED FILE - DO NOT EDIT +// ${prefix} typed IPC client — standalone, no barretenberg dependencies. +#pragma once + +#include "types_gen.hpp" +#include "${this.generatedDir()}/ipc_client.hpp" +#include + +namespace ${ns} { + +class ${prefix}Client { + public: + explicit ${prefix}Client(const char* socket_path) : client_(socket_path) {} + +${methods} + + void shutdown() { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(1); pk.pack_array(2); pk.pack(std::string("${prefix}Shutdown")); pk.pack_map(0); + client_.call(std::vector(buf.data(), buf.data() + buf.size())); + } + + private: + ipc::IpcClient client_; +}; + +} // namespace ${ns} +`; + } + + // ----------------------------------------------------------------------- + // Barretenberg commands generation (uses native bb types, has execute()) + // ----------------------------------------------------------------------- + + /** + * Map an IR type to a barretenberg C++ type. + * Uses native types (bb::fr, MerkleTreeId, StateReference) instead of + * standalone equivalents (Fr, uint32_t, std::unordered_map<...>). + */ + private mapTypeBb(type: import('./schema_visitor.ts').Type): string { + const externals = this.opts.externals || {}; + + switch (type.kind) { + case 'primitive': + switch (type.primitive) { + case 'bool': return 'bool'; + case 'u8': return 'uint8_t'; + case 'u16': return 'uint16_t'; + case 'u32': return 'uint32_t'; + case 'u64': return 'uint64_t'; + case 'f64': return 'double'; + case 'string': return 'std::string'; + case 'bytes': return 'std::vector'; + case 'fr': return 'bb::fr'; + case 'field2': return 'std::array'; + case 'enum_u32': + // Preserve original enum name if available + return type.originalName || 'uint32_t'; + case 'map_u32_pair': + // StateReference is the only map type we've seen + return 'StateReference'; + } + break; + case 'vector': return `std::vector<${this.mapTypeBb(type.element!)}>`; + case 'array': return `std::array<${this.mapTypeBb(type.element!)}, ${type.size}>`; + case 'optional': return `std::optional<${this.mapTypeBb(type.element!)}>`; + case 'struct': return type.struct!.name; + } + return 'void'; + } + + /** + * Generate barretenberg-specific commands header. + * + * This generates command structs that use native barretenberg types + * (bb::fr, MerkleTreeId, etc.) and include execute() declarations. + * External types (NullifierLeafValue, WorldStateRevision, etc.) are + * imported via #include instead of being generated. + */ + generateCommands(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const externals = this.opts.externals || {}; + + // Collect unique include paths from externals + const externalIncludes = new Set(); + for (const header of Object.values(externals)) { + externalIncludes.add(header); + } + for (const inc of this.opts.additionalIncludes || []) { + externalIncludes.add(inc); + } + + const includeLines = [...externalIncludes].sort().map(h => `#include "${h}"`).join('\n'); + const usingLines = (this.opts.usingNamespaces || []).map(ns => `using namespace ${ns};`).join('\n'); + + // Generate non-external struct types (only SiblingPathAndIndex-like types + // that are NOT commands/responses and NOT external) + const helperStructs: string[] = []; + for (const [name, struct] of schema.structs) { + if (name.startsWith(prefix)) continue; // Commands are generated below + if (externals[name]) continue; // External — imported via #include + // Generate this helper struct + const fields = struct.fields.map(f => ` ${this.mapTypeBb(f.type)} ${f.name};`).join('\n'); + const fieldNames = struct.fields.map(f => f.name).join(', '); + const serialization = fieldNames + ? ` SERIALIZATION_FIELDS(${fieldNames});` + : ` template void msgpack(_PackFn&& pack_fn) { pack_fn(); }`; + helperStructs.push( + `struct ${name} {\n static constexpr const char MSGPACK_SCHEMA_NAME[] = "${name}";\n${fields}\n${serialization}\n bool operator==(const ${name}&) const = default;\n};` + ); + } + for (const [name, struct] of schema.responses) { + if (name.startsWith(prefix)) continue; // Responses generated nested inside commands + if (externals[name]) continue; + // Non-prefixed response types (shouldn't normally happen) + } + + // Generate command structs with nested Response and execute() + const commandStructs = schema.commands.map(cmd => { + const respStruct = schema.responses.get(cmd.responseType); + + // Command fields + const cmdFields = cmd.fields.map(f => ` ${this.mapTypeBb(f.type)} ${f.name};`).join('\n'); + const cmdFieldNames = cmd.fields.map(f => f.name).join(', '); + const cmdSerialization = cmdFieldNames + ? ` SERIALIZATION_FIELDS(${cmdFieldNames});` + : ` template void msgpack(_PackFn&& pack_fn) { pack_fn(); }`; + + // Response fields + let responseBlock: string; + if (respStruct && respStruct.fields.length > 0) { + const respFields = respStruct.fields.map(f => ` ${this.mapTypeBb(f.type)} ${f.name};`).join('\n'); + const respFieldNames = respStruct.fields.map(f => f.name).join(', '); + responseBlock = ` struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "${cmd.responseType}"; +${respFields} + SERIALIZATION_FIELDS(${respFieldNames}); + bool operator==(const Response&) const = default; + };`; + } else { + responseBlock = ` struct Response { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "${cmd.responseType}"; + template void msgpack(_PackFn&& pack_fn) { pack_fn(); } + bool operator==(const Response&) const = default; + };`; + } + + return `struct ${cmd.name} { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "${cmd.name}"; +${responseBlock} +${cmdFields} + Response execute(${prefix}Request& request) &&; +${cmdSerialization} + bool operator==(const ${cmd.name}&) const = default; +};`; + }).join('\n\n'); + + return `// AUTOGENERATED FILE - DO NOT EDIT +#pragma once + +${includeLines} +#include +#include +#include +#include + +namespace ${ns} { + +${usingLines} + +// Forward declaration +struct ${prefix}Request; + +${helperStructs.join('\n\n')}${helperStructs.length > 0 ? '\n\n' : ''}// --------------------------------------------------------------------------- +// Commands +// --------------------------------------------------------------------------- + +${commandStructs} + +} // namespace ${ns} +`; + } + + // ----------------------------------------------------------------------- + // Server-side code generation (uses standalone ipc_server.hpp template) + // ----------------------------------------------------------------------- + + /** Generate the server dispatch — header-only, template */ + generateServerHeader(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const errorTypeName = schema.errorTypeName || `${prefix}ErrorResponse`; + const typesHeader = `${toSnakeCase(prefix)}_types.hpp`; + + // Handler declarations — template + const handlerDecls = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const method = toSnakeCase(c.name.startsWith(prefix) ? c.name.slice(prefix.length) : c.name); + return `template\nwire::${c.responseType} handle_${method}(Ctx& ctx, wire::${c.name}&& cmd);`; + }).join('\n\n'); + + // Handler entries for dispatch map + const handlerEntries = schema.commands.map(cmd => { + const isShutdown = cmd.name.endsWith('Shutdown'); + const method = toSnakeCase(cmd.name.startsWith(prefix) ? cmd.name.slice(prefix.length) : cmd.name); + + if (isShutdown) { + return ` { "${cmd.name}", []([[maybe_unused]] Ctx& ctx, [[maybe_unused]] const msgpack::object& payload) -> std::vector { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); pk.pack(std::string("${cmd.responseType}")); pk.pack_map(0); + THROW ::ipc::ShutdownRequested(std::vector(buf.data(), buf.data() + buf.size())); + } }`; + } + + const deserialize = cmd.fields.length > 0 + ? `wire::${cmd.name} wire_cmd; payload.convert(wire_cmd);` + : `wire::${cmd.name} wire_cmd;`; + + return ` { "${cmd.name}", [](Ctx& ctx, [[maybe_unused]] const msgpack::object& payload) -> std::vector { + ${deserialize} + auto wire_resp = handle_${method}(ctx, std::move(wire_cmd)); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); pk.pack(std::string("${cmd.responseType}")); pk.pack(wire_resp); + return std::vector(buf.data(), buf.data() + buf.size()); + } }`; + }).join(',\n'); + + return `// AUTOGENERATED FILE - DO NOT EDIT +// Header-only server dispatch — template for service context. +#pragma once + +#include "${typesHeader}" +#include "ipc_server.hpp" + +// msgpack headers needed for dispatch implementation. +// Includers within barretenberg must include try_catch_shim.hpp before this header. +#ifndef THROW +#define THROW throw +#define RETHROW throw +#endif +#include + +#include +#include +#include +#include +#include +#include + +namespace ${ns} { + +// Wire types are in the 'wire' sub-namespace (from ${typesHeader}) +// Handler declarations — implement these in your handler file. +// Template specializations must be visible before make_handler() is instantiated. + +${handlerDecls} + +// --------------------------------------------------------------------------- +// Dispatch — template on service context type +// --------------------------------------------------------------------------- + +namespace detail { + +inline std::vector make_error(const std::string& message) +{ + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("${errorTypeName}")); + pk.pack_map(1); + pk.pack(std::string("message")); + pk.pack(message); + return std::vector(buf.data(), buf.data() + buf.size()); +} + +} // namespace detail + +template +::ipc::Handler make_${toSnakeCase(prefix)}_handler(Ctx& ctx) +{ + using HandlerFn = std::function(Ctx&, const msgpack::object&)>; + static const std::unordered_map table = { +${handlerEntries}, + }; + + return [&ctx](const std::vector& raw_request) -> std::vector { + auto unpacked = msgpack::unpack( + reinterpret_cast(raw_request.data()), raw_request.size()); + auto obj = unpacked.get(); + + if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { + std::cerr << "Error: Expected array of size 1\\n"; + return {}; + } + + auto& inner = obj.via.array.ptr[0]; + if (inner.type != msgpack::type::ARRAY || inner.via.array.size != 2 || + inner.via.array.ptr[0].type != msgpack::type::STR) { + std::cerr << "Error: Expected [CommandName, {payload}]\\n"; + return {}; + } + + std::string cmd_name(inner.via.array.ptr[0].via.str.ptr, inner.via.array.ptr[0].via.str.size); + auto& cmd_payload = inner.via.array.ptr[1]; + + auto it = table.find(cmd_name); + if (it == table.end()) { + return detail::make_error("unknown command: " + cmd_name); + } +#ifdef BB_NO_EXCEPTIONS + return it->second(ctx, cmd_payload); +#else + try { + return it->second(ctx, cmd_payload); + } catch (const ::ipc::ShutdownRequested&) { + throw; + } catch (const std::exception& e) { + std::cerr << "Error processing " << cmd_name << ": " << e.what() << '\\n'; + return detail::make_error(e.what()); + } +#endif + }; +} + +template +void serve(const char* socket_path, Ctx& ctx, std::atomic* shutdown_flag = nullptr) +{ + ::ipc::serve(socket_path, make_${toSnakeCase(prefix)}_handler(ctx), shutdown_flag); +} + +} // namespace ${ns} +`; + } + + /** Generate the server dispatch implementation — map-based O(1) lookup */ + generateServerImpl(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const requestType = `${prefix}Request`; + const errorTypeName = schema.errorTypeName || `${prefix}ErrorResponse`; + + const serverHeaderPath = `${this.generatedDir()}/${toSnakeCase(prefix)}_ipc_server.hpp`; + + // Generate handler lambdas for each command + const wireNs = this.opts.wireNamespace; + const handlerEntries = schema.commands.map(cmd => { + const isShutdown = cmd.name.endsWith('Shutdown'); + + // When wireNamespace is set: deserialize wire type, call handle_xxx() which returns wire response + // When not set: wire types ARE domain types, call cmd.execute(request) directly + const method = toSnakeCase(cmd.name.startsWith(prefix) ? cmd.name.slice(prefix.length) : cmd.name); + let body: string; + + if (wireNs) { + if (isShutdown) { + // Shutdown: no handler call, just serialize empty response and throw + body = `msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); pk.pack(std::string("${cmd.responseType}")); pk.pack_map(0);`; + } else { + const wireType = `${wireNs}::${cmd.name}`; + const deserialize = cmd.fields.length > 0 + ? `${wireType} wire_cmd; payload.convert(wire_cmd);` + : `${wireType} wire_cmd;`; + body = `${deserialize} + auto wire_resp = handle_${method}(request, std::move(wire_cmd)); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); pk.pack(std::string("${cmd.responseType}")); pk.pack(wire_resp);`; + } + } else { + const deserialize = cmd.fields.length > 0 + ? `${cmd.name} cmd; payload.convert(cmd);` + : `${cmd.name} cmd;`; + body = `${deserialize} + auto resp = std::move(cmd).execute(request); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); pk.pack(std::string("${cmd.responseType}")); pk.pack(resp);`; + } + + if (isShutdown) { + return ` { "${cmd.name}", []([[maybe_unused]] ${requestType}& request, [[maybe_unused]] const msgpack::object& payload) -> std::vector { + ${body} + throw ::ipc::ShutdownRequested(std::vector(buf.data(), buf.data() + buf.size())); + } }`; + } + return ` { "${cmd.name}", [](${requestType}& request, [[maybe_unused]] const msgpack::object& payload) -> std::vector { + ${body} + return std::vector(buf.data(), buf.data() + buf.size()); + } }`; + }).join(',\n'); + + // Include wire types header when wire/domain split is used + const wireTypesInclude = wireNs + ? `#include "${this.generatedDir()}/${toSnakeCase(prefix)}_types.hpp"\n` + : ''; + + return `// AUTOGENERATED FILE - DO NOT EDIT + +#include "${serverHeaderPath}" +${wireTypesInclude}#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/serialize/msgpack_impl.hpp" + +#include +#include +#include +#include + +namespace ${ns} { + +using CommandHandler = std::function(${requestType}&, const msgpack::object&)>; + +static const std::unordered_map& get_dispatch_table() +{ + static const std::unordered_map table = { +${handlerEntries}, + }; + return table; +} + +static std::vector make_error(const std::string& message) +{ + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("${errorTypeName}")); + pk.pack_map(1); + pk.pack(std::string("message")); + pk.pack(message); + return std::vector(buf.data(), buf.data() + buf.size()); +} + +::ipc::Handler make_${toSnakeCase(prefix)}_handler(${requestType}& request) +{ + return [&request](const std::vector& raw_request) -> std::vector { + // Parse: [[CommandName, {payload}]] + auto unpacked = msgpack::unpack( + reinterpret_cast(raw_request.data()), raw_request.size()); + auto obj = unpacked.get(); + + if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { + std::cerr << "Error: Expected array of size 1\\n"; + return {}; + } + + auto& inner = obj.via.array.ptr[0]; + if (inner.type != msgpack::type::ARRAY || inner.via.array.size != 2 || + inner.via.array.ptr[0].type != msgpack::type::STR) { + std::cerr << "Error: Expected [CommandName, {payload}]\\n"; + return {}; + } + + std::string cmd_name(inner.via.array.ptr[0].via.str.ptr, inner.via.array.ptr[0].via.str.size); + auto& cmd_payload = inner.via.array.ptr[1]; + + try { + auto& table = get_dispatch_table(); + auto it = table.find(cmd_name); + if (it == table.end()) { + return make_error("unknown command: " + cmd_name); + } + return it->second(request, cmd_payload); + } catch (const ::ipc::ShutdownRequested&) { + throw; + } catch (const std::exception& e) { + std::cerr << "Error processing " << cmd_name << ": " << e.what() << '\\n'; + return make_error(e.what()); + } + }; +} + +} // namespace ${ns} +`; + } + + // ----------------------------------------------------------------------- + // Skeleton generation (one-time handler stubs + main) + // ----------------------------------------------------------------------- + + /** Generate handler stub implementations that throw "not implemented" */ + generateHandlerStubs(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const typesHeader = `${toSnakeCase(prefix)}_ipc_server.hpp`; + const ctxName = `${prefix}Context`; + + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const method = toSnakeCase(c.name.startsWith(prefix) ? c.name.slice(prefix.length) : c.name); + return `template<> +wire::${c.responseType} handle_${method}(${ctxName}& /*ctx*/, wire::${c.name}&& /*cmd*/) +{ + throw std::runtime_error("not implemented: ${c.name}"); +}`; + }).join('\n\n'); + + return `// Handler stubs — implement your service logic here. +// This file is generated ONCE. Edit freely — it will not be overwritten. +#include "generated/${typesHeader}" +#include + +struct ${ctxName} { + // Add your shared state here (database connection, etc.) +}; + +namespace ${ns} { + +${stubs} + +// Explicit template instantiation — must be at the bottom after all handlers. +template ::ipc::Handler make_${toSnakeCase(prefix)}_handler(${ctxName}& ctx); + +} // namespace ${ns} +`; + } + + /** Generate a main.cpp entry point for a standalone service */ + generateMain(schema: CompiledSchema): string { + const { namespace: ns, prefix } = this.opts; + const ctxName = `${prefix}Context`; + + return `// Entry point for ${prefix} service. +// This file is generated ONCE. Edit freely — it will not be overwritten. +#include "generated/${toSnakeCase(prefix)}_ipc_server.hpp" +#include "${toSnakeCase(prefix)}_handlers.cpp" + +#include +#include +#include + +static std::atomic shutdown_flag{ false }; + +int main(int argc, char* argv[]) +{ + if (argc < 2) { + std::cerr << "Usage: " << argv[0] << " \\n"; + return 1; + } + + ${ctxName} ctx{}; + std::signal(SIGTERM, [](int) { shutdown_flag.store(true); }); + std::signal(SIGINT, [](int) { shutdown_flag.store(true); }); + + std::cerr << "${prefix} server starting on " << argv[1] << "\\n"; + ::ipc::serve(argv[1], ${ns}::make_${toSnakeCase(prefix)}_handler(ctx), &shutdown_flag); + return 0; +} +`; + } + + /** Generate CMakeLists.txt for a standalone service */ + generateBuildFile(schema: CompiledSchema): string { + const { prefix } = this.opts; + const snakePrefix = toSnakeCase(prefix); + + return `cmake_minimum_required(VERSION 3.20) +project(${snakePrefix}_service CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# Generated IPC code +file(GLOB GENERATED_SOURCES generated/*.cpp generated/*.hpp) + +add_executable(${snakePrefix} + main.cpp + \${GENERATED_SOURCES} +) + +target_include_directories(${snakePrefix} PRIVATE \${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(${snakePrefix} PRIVATE pthread) +`; + } + + /** Generate .gitignore for the skeleton project */ + generateGitignore(): string { + return `# Generated IPC code — do not edit, re-run generate.sh instead +generated/ +build/ +`; + } + + /** Generate a shell script to re-run codegen */ + generateGenerateScript(schemaPath: string): string { + const { prefix, namespace: ns } = this.opts; + return `#!/usr/bin/env bash +# Re-generate IPC types, server, and client from schema. +# Run from the project root directory. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)" +SCHEMA="${schemaPath}" + +node --experimental-strip-types "$(dirname "$SCRIPT_DIR")/codegen/src/generate.ts" \\ + --schema "$SCHEMA" \\ + --lang cpp \\ + --out "$SCRIPT_DIR/generated" \\ + --prefix ${prefix} \\ + --cpp-namespace ${ns} \\ + --server +`; + } +} + diff --git a/barretenberg/codegen/src/generate.ts b/barretenberg/codegen/src/generate.ts new file mode 100644 index 000000000000..5af70dbc0f56 --- /dev/null +++ b/barretenberg/codegen/src/generate.ts @@ -0,0 +1,448 @@ +// CI trigger +/** + * IPC code generation CLI. + * + * Usage: + * generate.ts --schema --lang --out [flags] + * + * Required: + * --schema JSON schema file + * --lang Target language + * --out Output directory for always-regenerated code + * + * Optional: + * --prefix Type prefix (auto-detected if omitted) + * --server Generate server dispatch + * --client Generate client + * --skeleton Generate handler stubs + main (one-time, not regenerated) + * --cpp-namespace C++ namespace (e.g. bb::wsdb) + * --cpp-wire-namespace Wire types sub-namespace (default: wire) + * --curve-constants Generate TS curve constants (bb-only special case) + * + * Zero npm dependencies — runs with Node.js 22+ via --experimental-strip-types. + */ + +import { createHash } from 'crypto'; +import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs'; +import { execSync } from 'child_process'; +import { dirname, join, resolve } from 'path'; +import { fileURLToPath } from 'url'; +import { SchemaVisitor, type CompiledSchema } from './schema_visitor.ts'; +import { TypeScriptCodegen } from './typescript_codegen.ts'; +import { RustCodegen } from './rust_codegen.ts'; +import { ZigCodegen } from './zig_codegen.ts'; +import { CppCodegen } from './cpp_codegen.ts'; +import { toSnakeCase } from './naming.ts'; + +// @ts-ignore +const __dirname = dirname(fileURLToPath(import.meta.url)); + +// --------------------------------------------------------------------------- +// Argument parsing +// --------------------------------------------------------------------------- + +interface Args { + schema: string; + lang: string; + out: string; + prefix: string; + server: boolean; + client: boolean; + skeleton: string; + cppNamespace: string; + cppWireNamespace: string; + cppIncludeDir: string; + uds: boolean; + ffi: boolean; + curveConstants: boolean; + stripMethodPrefix: boolean; +} + +function parseArgs(argv: string[]): Args { + const args: Args = { + schema: '', lang: '', out: '', prefix: '', + server: false, client: false, skeleton: '', + cppNamespace: '', cppWireNamespace: 'wire', cppIncludeDir: '', + uds: false, ffi: false, + curveConstants: false, stripMethodPrefix: false, + }; + + for (let i = 0; i < argv.length; i++) { + switch (argv[i]) { + case '--schema': args.schema = argv[++i]; break; + case '--lang': args.lang = argv[++i]; break; + case '--out': args.out = argv[++i]; break; + case '--prefix': args.prefix = argv[++i]; break; + case '--server': args.server = true; break; + case '--client': args.client = true; break; + case '--skeleton': args.skeleton = argv[++i]; break; + case '--cpp-namespace': args.cppNamespace = argv[++i]; break; + case '--cpp-wire-namespace': args.cppWireNamespace = argv[++i]; break; + case '--cpp-include-dir': args.cppIncludeDir = argv[++i]; break; + case '--uds': args.uds = true; break; + case '--ffi': args.ffi = true; break; + case '--curve-constants': args.curveConstants = true; break; + case '--strip-method-prefix': args.stripMethodPrefix = true; break; + default: + console.error(`Unknown flag: ${argv[i]}`); + process.exit(1); + } + } + + if (!args.schema || !args.lang || !args.out) { + console.error(`Usage: generate.ts --schema --lang --out [flags] + +Required: + --schema JSON schema file + --lang Target language (ts, rust, zig, cpp) + --out Output directory + +Optional: + --server Generate server dispatch + --client Generate client + --skeleton Generate handler stubs + main (one-time) + --prefix Type prefix (auto-detected if omitted) + --cpp-namespace C++ namespace (e.g. bb::wsdb) + --cpp-wire-namespace Wire types sub-namespace (default: wire) + --cpp-include-dir Include path for generated dir (e.g. barretenberg/wsdb/generated) + --curve-constants Generate TS curve constants + --strip-method-prefix Strip prefix from TS method names (e.g. BbCircuitProve -> circuitProve)`); + process.exit(1); + } + + return args; +} + +// --------------------------------------------------------------------------- +// Schema loading +// --------------------------------------------------------------------------- + +function computeSchemaHash(schemaJson: string): string { + return createHash('sha256').update(schemaJson).digest('hex'); +} + +function loadSchema(schemaPath: string): { compiled: CompiledSchema; schemaHash: string } { + const rawJson = readFileSync(schemaPath, 'utf-8').trim(); + const schema = JSON.parse(rawJson); + const visitor = new SchemaVisitor(); + const compiled = visitor.visit(schema.commands, schema.responses); + const schemaHash = computeSchemaHash(rawJson); + return { compiled, schemaHash }; +} + +/** Detect common prefix from command names (e.g. WsdbGetTreeInfo, WsdbCreateFork → Wsdb) */ +function detectPrefix(compiled: CompiledSchema): string { + const names = compiled.commands.map(c => c.name); + if (names.length === 0) return ''; + let prefix = names[0]; + for (const name of names.slice(1)) { + while (prefix && !name.startsWith(prefix)) { + prefix = prefix.slice(0, -1); + } + } + const words = prefix.match(/[A-Z][a-z]*/g) || []; + let result = ''; + for (const word of words) { + const candidate = result + word; + if (names.every(n => n.startsWith(candidate))) { + result = candidate; + } else { + break; + } + } + return result; +} + +// --------------------------------------------------------------------------- +// Template copying +// --------------------------------------------------------------------------- + +function copyTemplate(lang: string, filename: string, outDir: string) { + const templatePath = join(__dirname, '..', 'templates', lang, filename); + const destPath = join(outDir, filename); + writeFileSync(destPath, readFileSync(templatePath, 'utf-8')); + console.log(` ${destPath} (template)`); +} + +/** Copy template only if destination doesn't exist (idempotent, one-time) */ +function copyTemplateOnce(lang: string, filename: string, outDir: string) { + const destPath = join(outDir, filename); + if (existsSync(destPath)) { + console.log(` ${destPath} (exists, skipped)`); + return; + } + copyTemplate(lang, filename, outDir); +} + +// --------------------------------------------------------------------------- +// C++ clang-format +// --------------------------------------------------------------------------- + +function formatCpp(files: string[]) { + if (files.length === 0) return; + try { + execSync(`clang-format-20 -i ${files.join(' ')}`, { stdio: 'ignore' }); + } catch { + // clang-format-20 may not be available + } +} + +// --------------------------------------------------------------------------- +// Generation +// --------------------------------------------------------------------------- + +function generate(args: Args) { + const absSchema = resolve(args.schema); + const absOut = resolve(args.out); + mkdirSync(absOut, { recursive: true }); + + const { compiled, schemaHash } = loadSchema(absSchema); + const prefix = args.prefix || detectPrefix(compiled); + + console.log(`Schema: ${absSchema} (${compiled.commands.length} commands, prefix=${prefix})`); + + function writeFile(name: string, content: string) { + const path = join(absOut, name); + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, content); + console.log(` ${path}`); + return path; + } + + const cppFiles: string[] = []; + + switch (args.lang) { + case 'ts': { + const gen = new TypeScriptCodegen({ stripMethodPrefix: args.stripMethodPrefix ? prefix : undefined }); + writeFile('api_types.ts', gen.generateTypes(compiled, schemaHash)); + if (args.server) { + writeFile('server.ts', gen.generateServerApi(compiled)); + copyTemplate('ts', 'ipc_server.ts', absOut); + } + if (args.client) { + writeFile('async.ts', gen.generateAsyncApi(compiled)); + writeFile('sync.ts', gen.generateSyncApi(compiled)); + copyTemplate('ts', 'ipc_client.ts', absOut); + } + if (args.curveConstants) { + generateCurveConstants(absOut); + } + // Skeleton (one-time handler stubs + main + build files) + if (args.skeleton) { + const skelDir = resolve(args.skeleton); + mkdirSync(skelDir, { recursive: true }); + const writeSkeleton = (name: string, content: string, opts?: { executable?: boolean }) => { + const path = join(skelDir, name); + if (existsSync(path)) { + console.log(` ${path} (exists, skipped)`); + return; + } + writeFileSync(path, content); + if (opts?.executable) { + try { execSync(`chmod +x ${path}`); } catch {} + } + console.log(` ${path} (skeleton)`); + }; + writeSkeleton(`${toSnakeCase(prefix)}_handlers.ts`, gen.generateHandlerStubs(compiled, prefix)); + writeSkeleton('main.ts', gen.generateMain(compiled, prefix)); + writeSkeleton('package.json', gen.generateBuildFile(prefix)); + writeSkeleton('.gitignore', gen.generateGitignore()); + writeSkeleton('generate.sh', gen.generateGenerateScript(args.schema, prefix), { executable: true }); + } + break; + } + case 'rust': { + const gen = new RustCodegen({ prefix }); + writeFile(`${toSnakeCase(prefix)}_types.rs`, gen.generateTypes(compiled, schemaHash)); + if (args.server) { + writeFile(`${toSnakeCase(prefix)}_server.rs`, gen.generateServer(compiled)); + copyTemplate('rust', 'ipc_server.rs', absOut); + } + if (args.client) { + writeFile(`${toSnakeCase(prefix)}_client.rs`, gen.generateApi(compiled)); + } + // Backend templates (copied once, not overwritten) + if (args.uds || args.ffi) { + copyTemplateOnce('rust', 'backend.rs', absOut); + copyTemplateOnce('rust', 'error.rs', absOut); + } + if (args.uds) { + copyTemplateOnce('rust', 'uds_backend.rs', absOut); + } + if (args.ffi) { + copyTemplateOnce('rust', 'ffi_backend.rs', absOut); + } + // Skeleton (one-time handler stubs + main + build files) + if (args.skeleton) { + const skelDir = resolve(args.skeleton); + mkdirSync(skelDir, { recursive: true }); + const writeSkeleton = (name: string, content: string, opts?: { executable?: boolean }) => { + const path = join(skelDir, name); + if (existsSync(path)) { + console.log(` ${path} (exists, skipped)`); + return; + } + writeFileSync(path, content); + if (opts?.executable) { + try { execSync(`chmod +x ${path}`); } catch {} + } + console.log(` ${path} (skeleton)`); + }; + writeSkeleton(`${toSnakeCase(prefix)}_handlers.rs`, gen.generateHandlerStubs(compiled)); + writeSkeleton('main.rs', gen.generateMain(compiled)); + writeSkeleton('Cargo.toml', gen.generateBuildFile(compiled)); + writeSkeleton('.gitignore', gen.generateGitignore()); + writeSkeleton('generate.sh', gen.generateGenerateScript(args.schema), { executable: true }); + } + break; + } + case 'zig': { + const gen = new ZigCodegen({ prefix, clientName: `${prefix}Client` }); + writeFile(`${toSnakeCase(prefix)}_types.zig`, gen.generateTypes(compiled, schemaHash)); + if (args.server) { + writeFile(`${toSnakeCase(prefix)}_server.zig`, gen.generateServer(compiled)); + copyTemplate('zig', 'ipc_server.zig', absOut); + } + if (args.client) { + writeFile(`${toSnakeCase(prefix)}_client.zig`, gen.generateClient(compiled)); + } + // Backend templates (copied once, not overwritten) + if (args.uds || args.ffi) { + copyTemplateOnce('zig', 'backend.zig', absOut); + } + if (args.uds) { + copyTemplateOnce('zig', 'uds_backend.zig', absOut); + } + if (args.ffi) { + copyTemplateOnce('zig', 'ffi_backend.zig', absOut); + } + // Skeleton (one-time handler stubs + main + build files) + if (args.skeleton) { + const skelDir = resolve(args.skeleton); + mkdirSync(skelDir, { recursive: true }); + const writeSkeleton = (name: string, content: string, opts?: { executable?: boolean }) => { + const path = join(skelDir, name); + if (existsSync(path)) { + console.log(` ${path} (exists, skipped)`); + return; + } + writeFileSync(path, content); + if (opts?.executable) { + try { execSync(`chmod +x ${path}`); } catch {} + } + console.log(` ${path} (skeleton)`); + }; + writeSkeleton(`${toSnakeCase(prefix)}_handlers.zig`, gen.generateHandlerStubs(compiled)); + writeSkeleton('main.zig', gen.generateMain(compiled)); + writeSkeleton('build.zig', gen.generateBuildFile(compiled)); + writeSkeleton('build.zig.zon', gen.generateBuildZon(compiled)); + writeSkeleton('.gitignore', gen.generateGitignore()); + writeSkeleton('generate.sh', gen.generateGenerateScript(args.schema), { executable: true }); + } + break; + } + case 'cpp': { + const ns = args.cppNamespace || prefix.toLowerCase(); + const wireNs = args.cppWireNamespace; + const gen = new CppCodegen({ + namespace: ns, + prefix, + executeHeader: '', + commandsHeader: '', + wireNamespace: wireNs, + generatedIncludeDir: args.cppIncludeDir, + }); + + cppFiles.push(writeFile(`${toSnakeCase(prefix)}_types.hpp`, gen.generateStandaloneTypes(compiled))); + if (args.server) { + cppFiles.push(writeFile(`${toSnakeCase(prefix)}_ipc_server.hpp`, gen.generateServerHeader(compiled))); + copyTemplate('cpp', 'ipc_server.hpp', absOut); + } + if (args.client) { + cppFiles.push(writeFile(`${toSnakeCase(prefix)}_ipc_client.hpp`, gen.generateHeader(compiled, schemaHash))); + cppFiles.push(writeFile(`${toSnakeCase(prefix)}_ipc_client.cpp`, gen.generateImpl(compiled))); + copyTemplate('cpp', 'ipc_client.hpp', absOut); + } + + // Skeleton (one-time handler stubs + main + build files) + if (args.skeleton) { + const skelDir = resolve(args.skeleton); + mkdirSync(skelDir, { recursive: true }); + const writeSkeleton = (name: string, content: string, opts?: { executable?: boolean }) => { + const path = join(skelDir, name); + if (existsSync(path)) { + console.log(` ${path} (exists, skipped)`); + return; + } + writeFileSync(path, content); + if (opts?.executable) { + try { execSync(`chmod +x ${path}`); } catch {} + } + console.log(` ${path} (skeleton)`); + if (path.endsWith('.cpp') || path.endsWith('.hpp')) { + cppFiles.push(path); + } + }; + writeSkeleton(`${toSnakeCase(prefix)}_handlers.cpp`, gen.generateHandlerStubs(compiled)); + writeSkeleton('main.cpp', gen.generateMain(compiled)); + writeSkeleton('CMakeLists.txt', gen.generateBuildFile(compiled)); + writeSkeleton('.gitignore', gen.generateGitignore()); + writeSkeleton('generate.sh', gen.generateGenerateScript(args.schema), { executable: true }); + } + + formatCpp(cppFiles); + break; + } + default: + console.error(`Unknown language: ${args.lang}. Available: ts, rust, zig, cpp`); + process.exit(1); + } + + console.log('Done.'); +} + +// --------------------------------------------------------------------------- +// Curve constants (special case for bb) +// --------------------------------------------------------------------------- + +function hexToBigInt(hex: string): bigint { return BigInt('0x' + hex); } + +function hexToByteList(hex: string): string { + const bytes: number[] = []; + for (let i = 0; i < hex.length; i += 2) bytes.push(parseInt(hex.substring(i, i + 2), 16)); + return `new Uint8Array([${bytes.join(', ')}])`; +} + +function serializeCoordinate(coord: string | string[]): string { + return Array.isArray(coord) ? `[${coord.map(c => hexToByteList(c)).join(', ')}]` : hexToByteList(coord); +} + +function generateCurveConstants(outputDir: string) { + const constantsPath = join(__dirname, '../schemas/bb_curve_constants.json'); + const constants = JSON.parse(readFileSync(constantsPath, 'utf-8')); + const content = `// AUTOGENERATED FILE - DO NOT EDIT +export const BN254_FR_MODULUS = ${hexToBigInt(constants.bn254_fr_modulus)}n; +export const BN254_FQ_MODULUS = ${hexToBigInt(constants.bn254_fq_modulus)}n; +export const BN254_G1_GENERATOR = { x: ${serializeCoordinate(constants.bn254_g1_generator.x)}, y: ${serializeCoordinate(constants.bn254_g1_generator.y)} } as const; +export const BN254_G2_GENERATOR = { x: ${serializeCoordinate(constants.bn254_g2_generator.x)}, y: ${serializeCoordinate(constants.bn254_g2_generator.y)} } as const; +export const GRUMPKIN_FR_MODULUS = ${hexToBigInt(constants.grumpkin_fr_modulus)}n; +export const GRUMPKIN_FQ_MODULUS = ${hexToBigInt(constants.grumpkin_fq_modulus)}n; +export const GRUMPKIN_G1_GENERATOR = { x: ${serializeCoordinate(constants.grumpkin_g1_generator.x)}, y: ${serializeCoordinate(constants.grumpkin_g1_generator.y)} } as const; +export const SECP256K1_FR_MODULUS = ${hexToBigInt(constants.secp256k1_fr_modulus)}n; +export const SECP256K1_FQ_MODULUS = ${hexToBigInt(constants.secp256k1_fq_modulus)}n; +export const SECP256K1_G1_GENERATOR = { x: ${serializeCoordinate(constants.secp256k1_g1_generator.x)}, y: ${serializeCoordinate(constants.secp256k1_g1_generator.y)} } as const; +export const SECP256R1_FR_MODULUS = ${hexToBigInt(constants.secp256r1_fr_modulus)}n; +export const SECP256R1_FQ_MODULUS = ${hexToBigInt(constants.secp256r1_fq_modulus)}n; +export const SECP256R1_G1_GENERATOR = { x: ${serializeCoordinate(constants.secp256r1_g1_generator.x)}, y: ${serializeCoordinate(constants.secp256r1_g1_generator.y)} } as const; +`; + mkdirSync(outputDir, { recursive: true }); + writeFileSync(join(outputDir, 'curve_constants.ts'), content); + console.log(` ${join(outputDir, 'curve_constants.ts')}`); +} + +// --------------------------------------------------------------------------- +// Main +// --------------------------------------------------------------------------- + +const args = parseArgs(process.argv.slice(2)); +generate(args); diff --git a/barretenberg/ts/src/cbind/naming.ts b/barretenberg/codegen/src/naming.ts similarity index 100% rename from barretenberg/ts/src/cbind/naming.ts rename to barretenberg/codegen/src/naming.ts diff --git a/barretenberg/ts/src/cbind/rust_codegen.ts b/barretenberg/codegen/src/rust_codegen.ts similarity index 59% rename from barretenberg/ts/src/cbind/rust_codegen.ts rename to barretenberg/codegen/src/rust_codegen.ts index db2b8252328c..6cbae852964d 100644 --- a/barretenberg/ts/src/cbind/rust_codegen.ts +++ b/barretenberg/codegen/src/rust_codegen.ts @@ -8,11 +8,43 @@ * - No complex abstraction */ -import type { CompiledSchema, Type, Struct, Field } from './schema_visitor.js'; -import { toSnakeCase, toPascalCase } from './naming.js'; +import type { CompiledSchema, Type, Struct, Field } from './schema_visitor.ts'; +import { toSnakeCase, toPascalCase } from './naming.ts'; + +export interface RustCodegenOptions { + /** Prefix for stripping from method names, e.g. 'Wsdb' makes WsdbGetTreeInfo -> get_tree_info */ + prefix?: string; + /** API struct name, e.g. 'WsdbApi'. Defaults to 'BarretenbergApi' */ + apiStructName?: string; + /** Import path for Backend trait. Defaults to 'crate::backend::Backend' */ + backendImport?: string; + /** Import path for error types. Defaults to 'crate::error::{BarretenbergError, Result}' */ + errorImport?: string; + /** Import path for generated types. Defaults to 'crate::types_gen::*' */ + typesImport?: string; + /** Module doc comment for types file */ + typesDocComment?: string; + /** Module doc comment for api file */ + apiDocComment?: string; +} export class RustCodegen { private errorTypeName: string = 'ErrorResponse'; + private opts: Required; + + constructor(options?: RustCodegenOptions) { + const prefix = options?.prefix ?? ''; + const name = prefix || 'Barretenberg'; + this.opts = { + prefix, + apiStructName: options?.apiStructName ?? `${name}Api`, + backendImport: options?.backendImport ?? 'super::backend::Backend', + errorImport: options?.errorImport ?? `super::error::{BarretenbergError, Result}`, + typesImport: options?.typesImport ?? `super::${toSnakeCase(prefix || 'bb')}_types::*`, + typesDocComment: options?.typesDocComment ?? `Generated types for ${name} IPC protocol`, + apiDocComment: options?.apiDocComment ?? `${name} IPC client API`, + }; + } // Type mapping: Schema type -> Rust type private mapType(type: Type): string { @@ -27,7 +59,8 @@ export class RustCodegen { case 'f64': return 'f64'; case 'string': return 'String'; case 'bytes': return 'Vec'; - case 'field2': return '[Vec; 2]'; // Extension field (Fq2) - pair of 32-byte field elements + case 'fr': return 'Fr'; // 32-byte field element + case 'field2': return '[Fr; 2]'; // Extension field (Fq2) } break; @@ -98,9 +131,10 @@ export class RustCodegen { ? `\n#[serde(rename = "${struct.name}")]` : ''; - // Commands need __typename field for struct identification, but skip it during serialization + // Commands have a __typename used for NamedUnion identification, but it's handled + // by the Command enum's custom serde, not by the struct itself. const typenameField = isCommand - ? ` #[serde(rename = "__typename", skip_serializing)]\n pub type_name: String,\n` + ? ` #[serde(rename = "__typename", skip, default)]\n pub type_name: String,\n` : ''; // Generate constructor for commands @@ -137,7 +171,7 @@ ${fieldInits} // Generate Command enum private generateCommandEnum(schema: CompiledSchema): string { - const names = Array.from(schema.structs.keys()); + const names = schema.commands.map(c => c.name); const variants = names .map(name => { const rustName = toPascalCase(name); @@ -383,7 +417,7 @@ mod serde_array4_bytes { } // Generate types file - generateTypes(schema: CompiledSchema): string { + generateTypes(schema: CompiledSchema, schemaHash?: string): string { this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; // Create set of top-level command struct names (only these need __typename) const commandNames = new Set(schema.commands.map(c => c.name)); @@ -397,10 +431,40 @@ mod serde_array4_bytes { .map(s => this.generateStruct(s, false)) .join('\n\n'); + const hashLine = schemaHash ? `\n/// Schema version hash for compatibility checking\npub const SCHEMA_HASH: &str = "${schemaHash}";\n` : ''; + return `//! AUTOGENERATED - DO NOT EDIT -//! Generated from Barretenberg msgpack schema +//! ${this.opts.typesDocComment} use serde::{Deserialize, Serialize}; +${hashLine} +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated, no heap. +/// Serializes as msgpack bin32 on the wire. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Fr(pub [u8; 32]); + +impl Fr { + pub fn from_bytes(bytes: [u8; 32]) -> Self { Self(bytes) } + pub fn to_bytes(&self) -> &[u8; 32] { &self.0 } + pub fn as_slice(&self) -> &[u8] { &self.0 } +} + +impl Serialize for Fr { + fn serialize(&self, serializer: S) -> Result + where S: serde::Serializer { + serializer.serialize_bytes(&self.0) + } +} + +impl<'de> Deserialize<'de> for Fr { + fn deserialize(deserializer: D) -> Result + where D: serde::Deserializer<'de> { + let bytes: Vec = >::deserialize(deserializer)?; + let arr: [u8; 32] = bytes.try_into() + .map_err(|v: Vec| serde::de::Error::invalid_length(v.len(), &"32 bytes"))?; + Ok(Fr(arr)) + } +} ${this.generateSerdeHelpers()} @@ -414,9 +478,17 @@ ${this.generateResponseEnum(schema)} `; } + /** Strip the service prefix from a command name for the method name */ + private methodName(commandName: string): string { + const withoutPrefix = this.opts.prefix && commandName.startsWith(this.opts.prefix) + ? commandName.slice(this.opts.prefix.length) + : commandName; + return toSnakeCase(withoutPrefix); + } + // Generate API method private generateApiMethod(command: {name: string, fields: Field[], responseType: string}): string { - const methodName = toSnakeCase(command.name); + const methodName = this.methodName(command.name); const cmdRustName = toPascalCase(command.name); const respRustName = toPascalCase(command.responseType); @@ -437,15 +509,18 @@ ${this.generateResponseEnum(schema)} return name; }).join(', '); - return ` /// Execute ${command.name} command + // Extract error type name from the error import (e.g., 'BarretenbergError' from 'crate::error::{BarretenbergError, Result}') + const errorType = this.opts.errorImport.match(/\{(\w+),/)?.[1] ?? 'BarretenbergError'; + + return ` /// Execute ${command.name} pub fn ${methodName}(&mut self, ${params}) -> Result<${respRustName}> { let cmd = Command::${cmdRustName}(${cmdRustName}::new(${paramConversions})); match self.execute(cmd)? { Response::${respRustName}(resp) => Ok(resp), - Response::${toPascalCase(this.errorTypeName)}(err) => Err(BarretenbergError::Backend( + Response::${toPascalCase(this.errorTypeName)}(err) => Err(${errorType}::Backend( err.message )), - _ => Err(BarretenbergError::InvalidResponse( + _ => Err(${errorType}::InvalidResponse( "Expected ${command.responseType}".to_string() )), } @@ -455,24 +530,41 @@ ${this.generateResponseEnum(schema)} // Generate API file generateApi(schema: CompiledSchema): string { this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + const { apiStructName, backendImport, errorImport, typesImport, apiDocComment } = this.opts; + + // Find shutdown command name (may be prefixed, e.g. WsdbShutdown) + const shutdownCmd = schema.commands.find(c => c.name.endsWith('Shutdown')); + const shutdownName = shutdownCmd ? toPascalCase(shutdownCmd.name) : null; + const apiMethods = schema.commands - .filter(c => c.name !== 'Shutdown') + .filter(c => !c.name.endsWith('Shutdown')) .map(c => this.generateApiMethod(c)) .join('\n\n'); + const shutdownMethod = shutdownName ? ` + /// Shutdown backend gracefully + pub fn shutdown(&mut self) -> Result<()> { + let cmd = Command::${shutdownName}(${shutdownName}::new()); + let _ = self.execute(cmd)?; + self.backend.destroy() + } +` : ''; + + const errorType = errorImport.match(/\{(\w+),/)?.[1] ?? 'BarretenbergError'; + return `//! AUTOGENERATED - DO NOT EDIT -//! High-level Barretenberg API - msgpack details hidden +//! ${apiDocComment} -use crate::backend::Backend; -use crate::error::{BarretenbergError, Result}; -use crate::generated_types::*; +use ${backendImport}; +use ${errorImport}; +use ${typesImport}; -/// High-level Barretenberg API -pub struct BarretenbergApi { +/// ${apiDocComment} +pub struct ${apiStructName} { backend: B, } -impl BarretenbergApi { +impl ${apiStructName} { /// Create API with custom backend pub fn new(backend: B) -> Self { Self { backend } @@ -480,30 +572,212 @@ impl BarretenbergApi { fn execute(&mut self, command: Command) -> Result { let input_buffer = rmp_serde::to_vec_named(&vec![command]) - .map_err(|e| BarretenbergError::Serialization(e.to_string()))?; + .map_err(|e| ${errorType}::Serialization(e.to_string()))?; let output_buffer = self.backend.call(&input_buffer)?; let response: Response = rmp_serde::from_slice(&output_buffer) - .map_err(|e| BarretenbergError::Deserialization(e.to_string()))?; + .map_err(|e| ${errorType}::Deserialization(e.to_string()))?; Ok(response) } ${apiMethods} - - /// Shutdown backend gracefully - pub fn shutdown(&mut self) -> Result<()> { - let cmd = Command::Shutdown(Shutdown::new()); - let _ = self.execute(cmd)?; - self.backend.destroy() - } - +${shutdownMethod} /// Destroy backend without shutdown command pub fn destroy(&mut self) -> Result<()> { self.backend.destroy() } } +`; + } + + // ----------------------------------------------------------------------- + // Server-side code generation + // ----------------------------------------------------------------------- + + /** Generate a Handler trait and serve() function */ + generateServer(schema: CompiledSchema): string { + this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + const { prefix, errorImport, typesImport } = this.opts; + const errorType = errorImport.match(/\{(\w+),/)?.[1] ?? 'IpcError'; + const errorRespType = toPascalCase(this.errorTypeName); + + const traitMethods = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const cmdRustName = toPascalCase(c.name); + const respRustName = toPascalCase(c.responseType); + return ` fn ${methodName}(&mut self, cmd: ${cmdRustName}) -> Result<${respRustName}>;`; + }) + .join('\n'); + + const dispatchArms = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const cmdRustName = toPascalCase(c.name); + const respRustName = toPascalCase(c.responseType); + return ` Command::${cmdRustName}(cmd) => { + match handler.${methodName}(cmd) { + Ok(resp) => Response::${respRustName}(resp), + Err(e) => Response::${errorRespType}(${errorRespType} { message: e.to_string() }), + } + }`; + }) + .join('\n'); + + // Handle shutdown arm + const shutdownCmd = schema.commands.find(c => c.name.endsWith('Shutdown')); + const shutdownArm = shutdownCmd + ? ` Command::${toPascalCase(shutdownCmd.name)}(_) => { + return Err(${errorType}::Backend("shutdown requested".to_string())); + }` + : ''; + + return `//! AUTOGENERATED - DO NOT EDIT +//! Server-side dispatch for ${prefix || 'service'} IPC protocol + +use ${errorImport}; +use ${typesImport}; + +/// Handler trait — implement this to serve ${prefix || 'service'} commands. +pub trait Handler { +${traitMethods} +} + +/// Dispatch a single command to the handler and return the response. +pub fn dispatch(handler: &mut dyn Handler, command: Command) -> Result { + let response = match command { +${dispatchArms} +${shutdownArm} + }; + Ok(response) +} +`; + } + + // ----------------------------------------------------------------------- + // Skeleton generation (one-time handler stubs + main + build files) + // ----------------------------------------------------------------------- + + /** Generate handler stub implementations that return unimplemented errors */ + generateHandlerStubs(schema: CompiledSchema): string { + const { prefix } = this.opts; + const typesModule = `${toSnakeCase(prefix)}_types`; + const serverModule = `${toSnakeCase(prefix)}_server`; + const ctxName = `${prefix}Context`; + + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const cmdRustName = toPascalCase(c.name); + const respRustName = toPascalCase(c.responseType); + return ` fn ${methodName}(&mut self, _cmd: ${typesModule}::${cmdRustName}) -> Result<${typesModule}::${respRustName}> { + unimplemented!("${c.name}") + }`; + }).join('\n\n'); + + return `// Handler stubs — implement your service logic here. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +mod generated { + pub mod ${typesModule}; + pub mod ${serverModule}; + pub mod ipc_server; +} + +use generated::${typesModule}; +use generated::${serverModule}; + +/// Shared context for your service — add database connections, state, etc. +pub struct ${ctxName} { + // Add your shared state here +} + +/// Handler implementation +pub struct ${prefix}Handler { + pub ctx: ${ctxName}, +} + +impl ${serverModule}::Handler for ${prefix}Handler { +${stubs} +} +`; + } + + /** Generate a main.rs entry point for a standalone service */ + generateMain(schema: CompiledSchema): string { + const { prefix } = this.opts; + const ctxName = `${prefix}Context`; + const serverModule = `${toSnakeCase(prefix)}_server`; + + return `// Entry point for ${prefix} service. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +mod ${toSnakeCase(prefix)}_handlers; + +use ${toSnakeCase(prefix)}_handlers::{${ctxName}, ${prefix}Handler}; + +fn main() { + let socket_path = std::env::args().nth(1).expect("Usage: ${toSnakeCase(prefix)} "); + + let ctx = ${ctxName} {}; + let mut handler = ${prefix}Handler { ctx }; + + eprintln!("${prefix} server starting on {}", socket_path); + generated::ipc_server::serve(&socket_path, &mut handler); +} +`; + } + + /** Generate Cargo.toml for a standalone service */ + generateBuildFile(schema: CompiledSchema): string { + const { prefix } = this.opts; + const pkgName = toSnakeCase(prefix).replace(/_/g, '-'); + + return `[package] +name = "${pkgName}-service" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "${pkgName}" +path = "main.rs" + +[dependencies] +rmp-serde = "1" +serde = { version = "1", features = ["derive"] } +`; + } + + /** Generate .gitignore for the skeleton project */ + generateGitignore(): string { + return `# Generated IPC code — do not edit, re-run generate.sh instead +generated/ +target/ +`; + } + + /** Generate a shell script to re-run codegen */ + generateGenerateScript(schemaPath: string): string { + const { prefix } = this.opts; + return `#!/usr/bin/env bash +# Re-generate IPC types, server, and client from schema. +# Run from the project root directory. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)" +SCHEMA="${schemaPath}" + +node --experimental-strip-types "$(dirname "$SCRIPT_DIR")/codegen/src/generate.ts" \\ + --schema "$SCHEMA" \\ + --lang rust \\ + --out "$SCRIPT_DIR/generated" \\ + --prefix ${prefix} \\ + --server `; } } diff --git a/barretenberg/ts/src/cbind/schema_visitor.ts b/barretenberg/codegen/src/schema_visitor.ts similarity index 92% rename from barretenberg/ts/src/cbind/schema_visitor.ts rename to barretenberg/codegen/src/schema_visitor.ts index e182c1f1abd4..572c0d6330a4 100644 --- a/barretenberg/ts/src/cbind/schema_visitor.ts +++ b/barretenberg/codegen/src/schema_visitor.ts @@ -8,7 +8,7 @@ * - Output is "compiled schema" with resolved types */ -export type PrimitiveType = 'bool' | 'u8' | 'u16' | 'u32' | 'u64' | 'f64' | 'string' | 'bytes' | 'field2' | 'enum_u32' | 'map_u32_pair'; +export type PrimitiveType = 'bool' | 'u8' | 'u16' | 'u32' | 'u64' | 'f64' | 'string' | 'bytes' | 'fr' | 'field2' | 'enum_u32' | 'map_u32_pair'; export interface Type { kind: 'primitive' | 'vector' | 'array' | 'optional' | 'struct'; @@ -16,6 +16,7 @@ export interface Type { element?: Type; // For vector, array, optional size?: number; // For array struct?: Struct; // For struct types + originalName?: string; // Original type name from schema (e.g. 'MerkleTreeId', 'unordered_map') } export interface Field { @@ -145,7 +146,11 @@ export class SchemaVisitor { case 'array': { const [elemType, size] = args as [any, number]; - // Special case: array = bytes + // Special case: array = field element (Fr/Fq) + if (elemType === 'unsigned char' && size === 32) { + return { kind: 'primitive', primitive: 'fr' }; + } + // Special case: array (other sizes) = bytes if (elemType === 'unsigned char') { return { kind: 'primitive', primitive: 'bytes' }; } @@ -216,7 +221,7 @@ export class SchemaVisitor { const primitive = primitiveMap[name]; if (primitive) { - return { kind: 'primitive', primitive }; + return { kind: 'primitive', primitive, originalName: name }; } // Unknown primitive - treat as struct reference diff --git a/barretenberg/ts/src/cbind/typescript_codegen.ts b/barretenberg/codegen/src/typescript_codegen.ts similarity index 60% rename from barretenberg/ts/src/cbind/typescript_codegen.ts rename to barretenberg/codegen/src/typescript_codegen.ts index b711efcb0246..22c27c7203a8 100644 --- a/barretenberg/ts/src/cbind/typescript_codegen.ts +++ b/barretenberg/codegen/src/typescript_codegen.ts @@ -8,16 +8,37 @@ * - No complex abstraction */ -import type { CompiledSchema, Type, Struct, Field, Command } from './schema_visitor.js'; -import { toPascalCase } from './naming.js'; +import type { CompiledSchema, Type, Struct, Field, Command } from './schema_visitor.ts'; +import { toPascalCase, toSnakeCase } from './naming.ts'; function toCamelCase(name: string): string { + // If no underscores, assume already camelCase (e.g. forkId, classId) + if (!name.includes('_')) { + return name.charAt(0).toLowerCase() + name.slice(1); + } const pascal = toPascalCase(name); return pascal.charAt(0).toLowerCase() + pascal.slice(1); } export class TypeScriptCodegen { private errorTypeName: string = 'ErrorResponse'; + /** Prefix to strip from command names when generating method names (e.g. "Bb" -> BbCircuitProve becomes circuitProve) */ + private methodPrefix: string = ''; + + constructor(options?: { stripMethodPrefix?: string }) { + if (options?.stripMethodPrefix) { + this.methodPrefix = options.stripMethodPrefix; + } + } + + /** Strip the method prefix and convert to camelCase for API method names */ + private toMethodName(commandName: string): string { + let name = commandName; + if (this.methodPrefix && name.startsWith(this.methodPrefix)) { + name = name.slice(this.methodPrefix.length); + } + return toCamelCase(name); + } // Type mapping: Schema type -> TypeScript type private mapType(type: Type): string { @@ -32,7 +53,8 @@ export class TypeScriptCodegen { case 'f64': return 'number'; case 'string': return 'string'; case 'bytes': return 'Uint8Array'; - case 'field2': return '[Uint8Array, Uint8Array]'; // Extension field (Fq2) + case 'fr': return 'Fr'; // 32-byte field element + case 'field2': return '[Fr, Fr]'; // Extension field (Fq2) case 'enum_u32': return 'number'; // C++ enum as integer case 'map_u32_pair': return 'Record'; // map> } @@ -50,7 +72,7 @@ export class TypeScriptCodegen { } case 'optional': - return `${this.mapType(type.element!)} | undefined`; + return `${this.mapType(type.element!)} | null`; case 'struct': return toPascalCase(type.struct!.name); @@ -72,6 +94,7 @@ export class TypeScriptCodegen { case 'f64': return 'number'; case 'string': return 'string'; case 'bytes': return 'Uint8Array'; + case 'fr': return 'Uint8Array'; // Fr on the wire is still 32 bytes case 'field2': return '[Uint8Array, Uint8Array]'; case 'enum_u32': return 'number'; case 'map_u32_pair': return 'Record'; @@ -89,7 +112,7 @@ export class TypeScriptCodegen { } case 'optional': - return `${this.mapMsgpackType(type.element!)} | undefined`; + return `${this.mapMsgpackType(type.element!)} | null`; case 'struct': return `Msgpack${toPascalCase(type.struct!.name)}`; @@ -224,7 +247,7 @@ ${conversions} return value; case 'optional': if (this.needsConversion(type.element!)) { - return `${value} != null ? ${this.generateToConverter(type.element!, value)} : undefined`; + return `${value} != null ? ${this.generateToConverter(type.element!, value)} : null`; } return value; case 'struct': @@ -248,7 +271,7 @@ ${conversions} return value; case 'optional': if (this.needsConversion(type.element!)) { - return `${value} != null ? ${this.generateFromConverter(type.element!, value)} : undefined`; + return `${value} != null ? ${this.generateFromConverter(type.element!, value)} : null`; } return value; case 'struct': @@ -258,7 +281,7 @@ ${conversions} } // Generate types file (api_types.ts) - generateTypes(schema: CompiledSchema): string { + generateTypes(schema: CompiledSchema, schemaHash?: string): string { const allStructs = [...schema.structs.values(), ...schema.responses.values()]; // Public interfaces @@ -282,13 +305,17 @@ ${conversions} // BbApiBase interface const apiMethods = schema.commands - .map(c => ` ${toCamelCase(c.name)}(command: ${toPascalCase(c.name)}): Promise<${toPascalCase(c.responseType)}>;`) + .map(c => ` ${this.toMethodName(c.name)}(command: ${toPascalCase(c.name)}): Promise<${toPascalCase(c.responseType)}>;`) .join('\n'); - return `// AUTOGENERATED FILE - DO NOT EDIT + const hashLine = schemaHash ? `\n/** Schema version hash for compatibility checking */\nexport const SCHEMA_HASH = '${schemaHash}';\n` : ''; + return `// AUTOGENERATED FILE - DO NOT EDIT +${hashLine} // Type aliases for primitive types -export type Field2 = [Uint8Array, Uint8Array]; +/** 32-byte field element (Fr/Fq). Branded Uint8Array — no arithmetic, just type safety. */ +export type Fr = Uint8Array; +export type Field2 = [Fr, Fr]; // Public interfaces (exported) ${publicInterfaces} @@ -311,7 +338,7 @@ ${apiMethods} // Generate API method private generateAsyncApiMethod(command: Command): string { - const methodName = toCamelCase(command.name); + const methodName = this.toMethodName(command.name); const cmdType = toPascalCase(command.name); const respType = toPascalCase(command.responseType); @@ -330,14 +357,14 @@ ${apiMethods} } private generateSyncApiMethod(command: Command): string { - const methodName = toCamelCase(command.name); + const methodName = this.toMethodName(command.name); const cmdType = toPascalCase(command.name); const respType = toPascalCase(command.responseType); return ` ${methodName}(command: ${cmdType}): ${respType} { const msgpackCommand = from${cmdType}(command); const [variantName, result] = msgpackCall(this.backend, [["${command.name}", msgpackCommand]]); - if (variantName === 'ErrorResponse') { + if (variantName === '${this.errorTypeName}') { throw new BBApiException(result.message || 'Unknown error from barretenberg'); } if (variantName !== '${command.responseType}') { @@ -433,4 +460,203 @@ ${methods} const sortedTypes = Array.from(types).sort(); return `import { ${sortedTypes.join(', ')} } from './api_types.js';`; } + + // ----------------------------------------------------------------------- + // Server-side code generation + // ----------------------------------------------------------------------- + + /** Generate a server handler interface and dispatch function */ + generateServerApi(schema: CompiledSchema): string { + this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + const errorType = toPascalCase(this.errorTypeName); + + // Generate handler interface + const handlerMethods = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.toMethodName(c.name); + const cmdType = toPascalCase(c.name); + const respType = toPascalCase(c.responseType); + return ` ${methodName}(command: ${cmdType}): Promise<${respType}>;`; + }) + .join('\n'); + + // Generate dispatch switch cases + const dispatchCases = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.toMethodName(c.name); + const cmdType = toPascalCase(c.name); + const respType = toPascalCase(c.responseType); + return ` case '${c.name}': { + const cmd = to${cmdType}(payload); + const result = await handler.${methodName}(cmd); + return ['${c.responseType}', from${respType}(result)]; + }`; + }) + .join('\n'); + + // Collect imports + const importTypes = new Set(); + for (const cmd of schema.commands) { + if (cmd.name.endsWith('Shutdown')) continue; + const cmdType = toPascalCase(cmd.name); + const respType = toPascalCase(cmd.responseType); + importTypes.add(cmdType); + importTypes.add(respType); + importTypes.add(`to${cmdType}`); + importTypes.add(`from${respType}`); + } + const sortedImports = Array.from(importTypes).sort(); + + return `// AUTOGENERATED FILE - DO NOT EDIT +// Server-side dispatch for IPC protocol + +import { ${sortedImports.join(', ')} } from './api_types.js'; + +/** Handler interface — implement this to serve commands. */ +export interface Handler { +${handlerMethods} +} + +/** + * Dispatch a [commandName, payload] pair to the handler. + * Returns [responseName, responsePayload] for serialization. + */ +export async function dispatch( + handler: Handler, + commandName: string, + payload: any, +): Promise<[string, any]> { + switch (commandName) { +${dispatchCases} + default: + throw new Error(\`Unknown command: \${commandName}\`); + } +} +`; + } + + // ----------------------------------------------------------------------- + // Skeleton generation (one-time handler stubs + main + build files) + // ----------------------------------------------------------------------- + + /** Generate handler stub implementations that throw "not implemented" */ + generateHandlerStubs(schema: CompiledSchema, prefix: string): string { + const serverModule = `${toSnakeCase(prefix)}_server`; + + // Collect import types + const importTypes = new Set(); + for (const cmd of schema.commands) { + if (cmd.name.endsWith('Shutdown')) continue; + importTypes.add(toPascalCase(cmd.name)); + importTypes.add(toPascalCase(cmd.responseType)); + } + importTypes.add('Handler'); + const sortedImports = Array.from(importTypes).sort(); + + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.toMethodName(c.name); + const cmdType = toPascalCase(c.name); + const respType = toPascalCase(c.responseType); + return ` async ${methodName}(command: ${cmdType}): Promise<${respType}> { + throw new Error('not implemented: ${c.name}'); + }`; + }).join('\n\n'); + + return `// Handler stubs — implement your service logic here. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +import { ${sortedImports.join(', ')} } from './generated/${serverModule}.js'; + +/** Shared context for your service — add database connections, state, etc. */ +export interface ${prefix}Context { + // Add your shared state here +} + +/** Handler implementation */ +export class ${prefix}Handler implements Handler { + constructor(public ctx: ${prefix}Context) {} + +${stubs} +} +`; + } + + /** Generate a main.ts entry point for a standalone service */ + generateMain(schema: CompiledSchema, prefix: string): string { + const serverModule = `${toSnakeCase(prefix)}_server`; + + return `// Entry point for ${prefix} service. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +import { serve } from './generated/ipc_server.js'; +import { dispatch } from './generated/${serverModule}.js'; +import { ${prefix}Handler } from './${toSnakeCase(prefix)}_handlers.js'; + +const socketPath = process.argv[2]; +if (!socketPath) { + console.error('Usage: ${toSnakeCase(prefix)} '); + process.exit(1); +} + +const ctx = {}; +const handler = new ${prefix}Handler(ctx); + +console.error(\`${prefix} server starting on \${socketPath}\`); +serve(socketPath, (commandName: string, payload: any) => dispatch(handler, commandName, payload)); +`; + } + + /** Generate package.json for a standalone service */ + generateBuildFile(prefix: string): string { + const pkgName = toSnakeCase(prefix).replace(/_/g, '-'); + + return JSON.stringify({ + name: `${pkgName}-service`, + version: '0.1.0', + type: 'module', + scripts: { + build: 'tsc', + start: 'node --experimental-strip-types main.ts', + generate: 'bash generate.sh', + }, + dependencies: { + msgpackr: '^1.10.0', + }, + devDependencies: { + typescript: '^5.4.0', + }, + }, null, 2) + '\n'; + } + + /** Generate .gitignore for the skeleton project */ + generateGitignore(): string { + return `# Generated IPC code — do not edit, re-run generate.sh instead +generated/ +node_modules/ +dist/ +`; + } + + /** Generate a shell script to re-run codegen */ + generateGenerateScript(schemaPath: string, prefix: string): string { + return `#!/usr/bin/env bash +# Re-generate IPC types, server, and client from schema. +# Run from the project root directory. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)" +SCHEMA="${schemaPath}" + +node --experimental-strip-types "$(dirname "$SCRIPT_DIR")/codegen/src/generate.ts" \\ + --schema "$SCHEMA" \\ + --lang ts \\ + --out "$SCRIPT_DIR/generated" \\ + --prefix ${prefix} \\ + --server +`; + } } diff --git a/barretenberg/codegen/src/zig_codegen.ts b/barretenberg/codegen/src/zig_codegen.ts new file mode 100644 index 000000000000..459237cc340f --- /dev/null +++ b/barretenberg/codegen/src/zig_codegen.ts @@ -0,0 +1,651 @@ +/** + * Zig Code Generator + * + * Generates Zig structs, serialization/deserialization functions, and IPC client + * from a CompiledSchema. Uses zig-msgpack's Payload API for wire encoding. + * + * Since Zig has no reflection-based serde, all serialization code is generated + * explicitly per struct. + */ + +import type { CompiledSchema, Type, Struct, Field, Command } from './schema_visitor.ts'; +import { toSnakeCase, toPascalCase } from './naming.ts'; + +export interface ZigCodegenOptions { + /** Service prefix to strip from method names (e.g., 'Wsdb') */ + prefix?: string; + /** Client struct name (e.g., 'WsdbClient') */ + clientName?: string; +} + +export class ZigCodegen { + private errorTypeName: string = 'ErrorResponse'; + private opts: Required; + + constructor(options?: ZigCodegenOptions) { + this.opts = { + prefix: options?.prefix ?? '', + clientName: options?.clientName ?? 'Client', + }; + } + + /** Map schema type to Zig type */ + private mapType(type: Type): string { + switch (type.kind) { + case 'primitive': + switch (type.primitive) { + case 'bool': return 'bool'; + case 'u8': return 'u8'; + case 'u16': return 'u16'; + case 'u32': return 'u32'; + case 'u64': return 'u64'; + case 'f64': return 'f64'; + case 'string': return '[]const u8'; + case 'bytes': return '[]const u8'; + case 'fr': return 'Fr'; // [32]u8 + case 'field2': return '[2]Fr'; + case 'enum_u32': return 'u32'; + case 'map_u32_pair': return 'void'; // TODO: proper map support + } + break; + case 'vector': + return `[]const ${this.mapType(type.element!)}`; + case 'array': + return `[${type.size}]${this.mapType(type.element!)}`; + case 'optional': + return `?${this.mapType(type.element!)}`; + case 'struct': + return toPascalCase(type.struct!.name); + } + return 'void'; + } + + /** Generate a Zig field-to-payload conversion expression */ + private fieldToPayload(fieldExpr: string, type: import('./schema_visitor.ts').Type): string { + switch (type.kind) { + case 'primitive': + switch (type.primitive) { + case 'bool': return `Payload{ .bool = ${fieldExpr} }`; + case 'u8': case 'u16': case 'u32': case 'u64': + return `Payload{ .uint = @intCast(${fieldExpr}) }`; + case 'f64': return `Payload{ .float = ${fieldExpr} }`; + case 'string': return `try Payload.strToPayload(${fieldExpr}, allocator)`; + case 'bytes': return `try Payload.binToPayload(${fieldExpr}, allocator)`; + case 'fr': return `try Payload.binToPayload(&${fieldExpr}, allocator)`; + case 'enum_u32': return `Payload{ .uint = @intCast(${fieldExpr}) }`; + default: return `Payload{ .nil = {} }`; + } + case 'optional': + return `if (${fieldExpr}) |v| ${this.fieldToPayload('v', type.element!)} else Payload{ .nil = {} }`; + case 'vector': { + // For vectors, build an array payload + return `blk: { + var arr = try Payload.arrPayload(${fieldExpr}.len, allocator); + for (${fieldExpr}, 0..) |item, i| { + try arr.setArrElement(i, ${this.fieldToPayload('item', type.element!)}); + } + break :blk arr; + }`; + } + case 'struct': + return `try ${fieldExpr}.toPayload(allocator)`; + default: return `Payload{ .nil = {} }`; + } + } + + /** Generate a Zig payload-to-field conversion expression */ + private fieldFromPayload(payloadExpr: string, type: import('./schema_visitor.ts').Type): string { + switch (type.kind) { + case 'primitive': + switch (type.primitive) { + case 'bool': return `try ${payloadExpr}.asBool()`; + case 'u8': return `@intCast(try ${payloadExpr}.asUint())`; + case 'u16': return `@intCast(try ${payloadExpr}.asUint())`; + case 'u32': return `@intCast(try ${payloadExpr}.asUint())`; + case 'u64': return `try ${payloadExpr}.asUint()`; + case 'f64': return `try ${payloadExpr}.asFloat()`; + case 'string': return `try ${payloadExpr}.asStr()`; + case 'bytes': return `${payloadExpr}.bin.value()`; + case 'fr': return `${payloadExpr}.bin.value()[0..32].*`; + case 'enum_u32': return `@intCast(try ${payloadExpr}.asUint())`; + default: return `undefined`; + } + case 'vector': { + const elemConv = this.fieldFromPayload('elem', type.element!); + return `blk: { + const arr_len = try ${payloadExpr}.getArrLen(); + var result = try std.heap.page_allocator.alloc(${this.mapType(type.element!)}, arr_len); + for (0..arr_len) |i| { + const elem = try ${payloadExpr}.getArrElement(i); + result[i] = ${elemConv}; + } + break :blk result; + }`; + } + case 'optional': + return `if (${payloadExpr} == .nil) null else ${this.fieldFromPayload(payloadExpr, type.element!)}`; + case 'struct': + return `try ${toPascalCase(type.struct!.name)}.fromPayload(${payloadExpr})`; + default: return `undefined`; + } + } + + /** Generate a Zig struct definition with toPayload/fromPayload methods */ + private generateStruct(struct: Struct): string { + const zigName = toPascalCase(struct.name); + const fields = struct.fields.map(f => { + const zigFieldName = toSnakeCase(f.name); + const zigType = this.mapType(f.type); + return ` ${zigFieldName}: ${zigType},`; + }).join('\n'); + + // Treat structs with only void fields as empty (void comes from unmapped types) + const hasFields = struct.fields.length > 0 && struct.fields.some(f => this.mapType(f.type) !== 'void'); + + // toPayload method + const toPayloadFields = struct.fields.map(f => { + const zigFieldName = toSnakeCase(f.name); + return ` try map.mapPut("${f.name}", ${this.fieldToPayload(`self.${zigFieldName}`, f.type)});`; + }).join('\n'); + + // fromPayload method + const fromPayloadFields = struct.fields.map(f => { + const zigFieldName = toSnakeCase(f.name); + return ` .${zigFieldName} = ${this.fieldFromPayload(`(try payload.mapGet("${f.name}")).?`, f.type)},`; + }).join('\n'); + + // Empty structs: suppress unused parameter warnings + if (!hasFields) { + return `/// ${struct.name} +pub const ${zigName} = struct { + + pub fn toPayload(_: ${zigName}, allocator: std.mem.Allocator) !Payload { + return Payload.mapPayload(allocator); + } + + pub fn fromPayload(_: Payload) !${zigName} { + return ${zigName}{}; + } +};`; + } + + return `/// ${struct.name} +pub const ${zigName} = struct { +${fields} + + pub fn toPayload(self: ${zigName}, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); +${toPayloadFields} + return map; + } + + pub fn fromPayload(payload: Payload) !${zigName} { + return ${zigName}{ +${fromPayloadFields} + }; + } +};`; + } + + /** Generate serialize function for a struct */ + private generateSerializeFn(struct: Struct): string { + const zigName = toPascalCase(struct.name); + const fieldCount = struct.fields.length; + + const fieldPacks = struct.fields.map(f => { + const zigFieldName = toSnakeCase(f.name); + return ` try packField(packer, "${f.name}", self.${zigFieldName});`; + }).join('\n'); + + return `pub fn serialize${zigName}(self: ${zigName}, packer: anytype) !void { + try packer.writeMapHeader(${fieldCount}); +${fieldPacks} +}`; + } + + /** Generate deserialize function for a struct */ + private generateDeserializeFn(struct: Struct): string { + const zigName = toPascalCase(struct.name); + + const fieldReads = struct.fields.map(f => { + const zigFieldName = toSnakeCase(f.name); + const zigType = this.mapType(f.type); + return ` .${zigFieldName} = try readField(${zigType}, unpacker, "${f.name}"),`; + }).join('\n'); + + return `pub fn deserialize${zigName}(unpacker: anytype, allocator: std.mem.Allocator) !${zigName} { + _ = allocator; + const map_len = try unpacker.readMapHeader(); + _ = map_len; + return ${zigName}{ +${fieldReads} + }; +}`; + } + + /** Generate the Command tagged union */ + private generateCommandUnion(schema: CompiledSchema): string { + const variants = schema.commands.map(c => { + const zigName = toPascalCase(c.name); + return ` ${toSnakeCase(c.name)}: ${zigName},`; + }).join('\n'); + + const nameMap = schema.commands.map(c => { + return ` .${toSnakeCase(c.name)} => "${c.name}",`; + }).join('\n'); + + return `/// Tagged union of all commands +pub const Command = union(enum) { +${variants} + + pub fn schemaName(self: Command) []const u8 { + return switch (self) { +${nameMap} + }; + } +};`; + } + + /** Generate the Response tagged union */ + private generateResponseUnion(schema: CompiledSchema): string { + const commandResponseTypes = Array.from(new Set(schema.commands.map(c => c.responseType))); + const errorName = schema.errorTypeName || 'ErrorResponse'; + const responseTypes = schema.responses.has(errorName) + ? [...commandResponseTypes, errorName] + : commandResponseTypes; + + const variants = responseTypes.map(name => { + const zigName = toPascalCase(name); + return ` ${toSnakeCase(name)}: ${zigName},`; + }).join('\n'); + + return `/// Tagged union of all responses +pub const Response = union(enum) { +${variants} +};`; + } + + /** Generate the types file */ + generateTypes(schema: CompiledSchema, schemaHash?: string): string { + this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + + const allStructs = [...schema.structs.values(), ...schema.responses.values()]; + + const structDefs = allStructs.map(s => this.generateStruct(s)).join('\n\n'); + + const hashLine = schemaHash + ? `\n/// Schema version hash for compatibility checking\npub const SCHEMA_HASH = "${schemaHash}";\n` + : ''; + + return `//! AUTOGENERATED - DO NOT EDIT +//! Generated from Aztec IPC msgpack schema +//! +//! Each struct has toPayload() and fromPayload() methods that convert +//! to/from zig-msgpack Payload objects for serialization. + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const PackerIO = msgpack.PackerIO; +${hashLine} +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated. +pub const Fr = [32]u8; + +// --------------------------------------------------------------------------- +// Type definitions +// --------------------------------------------------------------------------- + +${structDefs} + +// --------------------------------------------------------------------------- +// Command / Response unions +// --------------------------------------------------------------------------- + +${this.generateCommandUnion(schema)} + +${this.generateResponseUnion(schema)} +`; + } + + /** Strip service prefix from command name for method naming */ + private methodName(commandName: string): string { + const withoutPrefix = this.opts.prefix && commandName.startsWith(this.opts.prefix) + ? commandName.slice(this.opts.prefix.length) + : commandName; + return toSnakeCase(withoutPrefix); + } + + /** Generate the client wrapper — typed methods parameterized on backend type */ + generateClient(schema: CompiledSchema): string { + this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + const { prefix } = this.opts; + const errorRespName = toPascalCase(this.errorTypeName); + const typesFile = `${toSnakeCase(prefix)}_types.zig`; + + const methods = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const zigCmdName = toPascalCase(c.name); + const zigRespName = toPascalCase(c.responseType); + return ` pub fn ${methodName}(self: *Self, cmd: types.${zigCmdName}) !types.${zigRespName} { + const request_bytes = try Self.encode("${c.name}", try cmd.toPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + defer alloc.free(response_bytes); + const resp_name, const resp_payload = try Self.decode(response_bytes); + if (std.mem.eql(u8, resp_name, "${this.errorTypeName}")) return error.ServerError; + return try types.${zigRespName}.fromPayload(resp_payload); + }`; + }).join('\n\n'); + + return `//! AUTOGENERATED - DO NOT EDIT +//! ${prefix} client — typed methods parameterized on a backend type. +//! +//! The backend must satisfy: call(self, request: []const u8) ![]u8 and destroy(self) void. +//! See backend.zig for the interface contract. +//! Implementations: UdsBackend (uds_backend.zig), FfiBackend (ffi_backend.zig). + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const types = @import("${typesFile}"); +const backend_mod = @import("backend.zig"); + +const alloc = std.heap.page_allocator; + +pub fn Client(comptime BackendType: type) type { + comptime backend_mod.assertBackend(BackendType); + + return struct { + const Self = @This(); + backend: *BackendType, + + pub fn init(backend: *BackendType) Self { + return .{ .backend = backend }; + } + + pub fn destroy(self: *Self) void { + self.backend.destroy(); + } + + pub fn shutdown(self: *Self) !void { + const request_bytes = try Self.encode("${prefix}Shutdown", Payload.mapPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + alloc.free(response_bytes); + } + +${methods} + + // --- internal helpers --- + + fn encode(cmd_name: []const u8, cmd_fields: Payload) ![]u8 { + var inner = try Payload.arrPayload(2, alloc); + try inner.setArrElement(0, try Payload.strToPayload(cmd_name, alloc)); + try inner.setArrElement(1, cmd_fields); + var outer = try Payload.arrPayload(1, alloc); + try outer.setArrElement(0, inner); + + var allocating_writer = std.Io.Writer.Allocating.init(alloc); + var packer = msgpack.PackerIO.init(undefined, &allocating_writer.writer); + try packer.write(outer); + return try allocating_writer.toOwnedSlice(); + } + + fn decode(response_bytes: []const u8) !struct { []const u8, Payload } { + var reader = std.Io.Reader.fixed(response_bytes); + var unpacker = msgpack.PackerIO.init(&reader, undefined); + const resp = try unpacker.read(alloc); + const resp_len = try resp.getArrLen(); + if (resp_len != 2) return error.InvalidResponse; + const name = try (try resp.getArrElement(0)).asStr(); + const payload = try resp.getArrElement(1); + return .{ name, payload }; + } + }; +} +`; + } + + /** Generate the server wrapper — dispatch + stub handlers over generic IPC server */ + generateServer(schema: CompiledSchema): string { + this.errorTypeName = schema.errorTypeName || 'ErrorResponse'; + const { prefix } = this.opts; + const errorRespName = toPascalCase(this.errorTypeName); + const typesFile = `${toSnakeCase(prefix)}_types.zig`; + + // Dispatch cases: match command name → deserialize → call handler → serialize response + const dispatchCases = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const zigCmdName = toPascalCase(c.name); + const zigRespName = toPascalCase(c.responseType); + return ` if (std.mem.eql(u8, cmd_name, "${c.name}")) { + const cmd = types.${zigCmdName}.fromPayload(cmd_fields) catch return makeError("deser failed"); + const resp = ${methodName}(cmd) catch return makeError("not implemented: ${c.name}"); + return .{ .resp_name = "${c.responseType}", .resp_payload = resp.toPayload(alloc) }; + }`; + }).join('\n'); + + // Stub handler functions + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const zigCmdName = toPascalCase(c.name); + const zigRespName = toPascalCase(c.responseType); + return `/// TODO: implement ${c.name} +fn ${methodName}(cmd: types.${zigCmdName}) !types.${zigRespName} { + _ = cmd; + return error.NotImplemented; +}`; + }).join('\n\n'); + + return `//! AUTOGENERATED - DO NOT EDIT +//! ${prefix} IPC server — dispatch + stub handlers over generic IPC transport. +//! +//! Implement the handler functions below to build a working ${prefix} service. +//! Then call: serve("socket_path") + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const types = @import("${typesFile}"); +const ipc_server = @import("ipc_server.zig"); + +const alloc = std.heap.page_allocator; + +/// Start the ${prefix} server on the given socket path. +pub fn serve(socket_path: []const u8) !void { + try ipc_server.serve(socket_path, dispatch); +} + +fn dispatch(cmd_name: []const u8, cmd_fields: Payload) ipc_server.DispatchResult { + // Shutdown + if (std.mem.eql(u8, cmd_name, "${prefix}Shutdown")) { + return .{ .resp_name = "${prefix}ShutdownResponse", .resp_payload = Payload.mapPayload(alloc) }; + } + + // Command dispatch +${dispatchCases} + + return makeError("unknown command"); +} + +fn makeError(message: []const u8) ipc_server.DispatchResult { + var err_map = Payload.mapPayload(alloc); + err_map.mapPut("message", Payload.strToPayload(message, alloc) catch return .{ .resp_name = "${errorRespName}", .resp_payload = Payload.mapPayload(alloc) }) catch {}; + return .{ .resp_name = "${errorRespName}", .resp_payload = err_map }; +} + +// --------------------------------------------------------------------------- +// Handler stubs — implement these to build your ${prefix} service. +// --------------------------------------------------------------------------- + +${stubs} +`; + } + + // ----------------------------------------------------------------------- + // Skeleton generation (one-time handler stubs + main + build files) + // ----------------------------------------------------------------------- + + /** Generate handler stub implementations that return error.NotImplemented */ + generateHandlerStubs(schema: CompiledSchema): string { + const { prefix } = this.opts; + const typesFile = `${toSnakeCase(prefix)}_types.zig`; + const serverFile = `${toSnakeCase(prefix)}_server.zig`; + const ctxName = `${prefix}Context`; + + const stubs = schema.commands + .filter(c => !c.name.endsWith('Shutdown')) + .map(c => { + const methodName = this.methodName(c.name); + const zigCmdName = toPascalCase(c.name); + const zigRespName = toPascalCase(c.responseType); + return `pub fn ${methodName}(ctx: *${ctxName}, cmd: types.${zigCmdName}) !types.${zigRespName} { + _ = ctx; + _ = cmd; + return error.NotImplemented; +}`; + }).join('\n\n'); + + return `// Handler stubs — implement your service logic here. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +const std = @import("std"); +const types = @import("generated/${typesFile}"); + +/// Shared context for your service — add database connections, state, etc. +pub const ${ctxName} = struct { + // Add your shared state here +}; + +// --------------------------------------------------------------------------- +// Handler implementations — fill these in with your service logic. +// --------------------------------------------------------------------------- + +${stubs} +`; + } + + /** Generate a main.zig entry point for a standalone service */ + generateMain(schema: CompiledSchema): string { + const { prefix } = this.opts; + const serverFile = `${toSnakeCase(prefix)}_server`; + const handlersFile = `${toSnakeCase(prefix)}_handlers`; + + return `// Entry point for ${prefix} service. +// This file is generated ONCE. Edit freely — it will not be overwritten. + +const std = @import("std"); +const server = @import("generated/${serverFile}.zig"); + +pub fn main() !void { + const args = try std.process.argsAlloc(std.heap.page_allocator); + defer std.process.argsFree(std.heap.page_allocator, args); + + if (args.len < 2) { + std.debug.print("Usage: ${toSnakeCase(prefix)} \\n", .{}); + std.process.exit(1); + } + + const socket_path = args[1]; + std.debug.print("${prefix} server starting on {s}\\n", .{socket_path}); + try server.serve(socket_path); +} +`; + } + + /** Generate build.zig for a standalone service */ + generateBuildFile(schema: CompiledSchema): string { + const { prefix } = this.opts; + const binName = toSnakeCase(prefix); + + return `const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const msgpack_dep = b.dependency("zig-msgpack", .{ + .target = target, + .optimize = optimize, + }); + + const exe = b.addExecutable(.{ + .name = "${binName}", + .root_source_file = b.path("main.zig"), + .target = target, + .optimize = optimize, + }); + exe.root_module.addImport("msgpack", msgpack_dep.module("msgpack")); + b.installArtifact(exe); + + const run_cmd = b.addRunArtifact(exe); + run_cmd.step.dependOn(b.getInstallStep()); + if (b.args) |args| { + run_cmd.addArgs(args); + } + + const run_step = b.step("run", "Run the ${prefix} service"); + run_step.dependOn(&run_cmd.step); +} +`; + } + + /** Generate build.zig.zon for dependency management */ + generateBuildZon(schema: CompiledSchema): string { + const { prefix } = this.opts; + const binName = toSnakeCase(prefix); + + return `.{ + .name = "${binName}-service", + .version = "0.1.0", + .dependencies = .{ + .@"zig-msgpack" = .{ + .url = "https://github.com/zig-msgpack/zig-msgpack/archive/refs/heads/main.tar.gz", + }, + }, + .paths = .{ + "build.zig", + "build.zig.zon", + "main.zig", + "generated", + }, +} +`; + } + + /** Generate .gitignore for the skeleton project */ + generateGitignore(): string { + return `# Generated IPC code — do not edit, re-run generate.sh instead +generated/ +zig-out/ +zig-cache/ +.zig-cache/ +`; + } + + /** Generate a shell script to re-run codegen */ + generateGenerateScript(schemaPath: string): string { + const { prefix } = this.opts; + return `#!/usr/bin/env bash +# Re-generate IPC types, server, and client from schema. +# Run from the project root directory. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)" +SCHEMA="${schemaPath}" + +node --experimental-strip-types "$(dirname "$SCRIPT_DIR")/codegen/src/generate.ts" \\ + --schema "$SCHEMA" \\ + --lang zig \\ + --out "$SCRIPT_DIR/generated" \\ + --prefix ${prefix} \\ + --server +`; + } +} diff --git a/barretenberg/codegen/templates/cpp/ipc_client.hpp b/barretenberg/codegen/templates/cpp/ipc_client.hpp new file mode 100644 index 000000000000..4e3db6c204c6 --- /dev/null +++ b/barretenberg/codegen/templates/cpp/ipc_client.hpp @@ -0,0 +1,112 @@ +/** + * Generic IPC client over Unix Domain Sockets. + * Handles: socket connect, length-prefixed framing, send/receive raw bytes. + * Header-only. + */ +#pragma once +#ifndef IPC_CLIENT_HPP_INCLUDED +#define IPC_CLIENT_HPP_INCLUDED + +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace ipc { + +class IpcClient { + public: + explicit IpcClient(const char* socket_path) + { + fd_ = ::socket(AF_UNIX, SOCK_STREAM, 0); + if (fd_ < 0) { + throw std::runtime_error(std::string("socket() failed: ") + strerror(errno)); + } + struct sockaddr_un addr {}; + addr.sun_family = AF_UNIX; + strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1); + if (::connect(fd_, reinterpret_cast(&addr), sizeof(addr)) < 0) { + ::close(fd_); + fd_ = -1; + throw std::runtime_error(std::string("connect() failed: ") + strerror(errno)); + } + } + + ~IpcClient() + { + if (fd_ >= 0) { + ::close(fd_); + } + } + + IpcClient(const IpcClient&) = delete; + IpcClient& operator=(const IpcClient&) = delete; + + std::vector call(const std::vector& request) + { + // Send length-prefixed request + uint32_t len = static_cast(request.size()); + uint8_t header[4] = { + static_cast(len & 0xFF), + static_cast((len >> 8) & 0xFF), + static_cast((len >> 16) & 0xFF), + static_cast((len >> 24) & 0xFF), + }; + write_all(header, 4); + write_all(request.data(), request.size()); + + // Receive length-prefixed response + uint8_t resp_hdr[4]; + read_all(resp_hdr, 4); + uint32_t resp_len = static_cast(resp_hdr[0]) | (static_cast(resp_hdr[1]) << 8) | + (static_cast(resp_hdr[2]) << 16) | (static_cast(resp_hdr[3]) << 24); + std::vector resp(resp_len); + read_all(resp.data(), resp_len); + return resp; + } + + private: + void write_all(const void* data, size_t len) + { + const auto* ptr = static_cast(data); + size_t written = 0; + while (written < len) { + auto n = ::write(fd_, ptr + written, len - written); + if (n <= 0) { + throw std::runtime_error("write failed"); + } + written += static_cast(n); + } + } + + void read_all(void* data, size_t len) + { + auto* ptr = static_cast(data); + size_t got = 0; + while (got < len) { + auto n = ::read(fd_, ptr + got, len - got); + if (n <= 0) { + throw std::runtime_error("read failed"); + } + got += static_cast(n); + } + } + + int fd_ = -1; +}; + +} // namespace ipc +#endif // IPC_CLIENT_HPP_INCLUDED diff --git a/barretenberg/codegen/templates/cpp/ipc_server.hpp b/barretenberg/codegen/templates/cpp/ipc_server.hpp new file mode 100644 index 000000000000..d57ad50e7b64 --- /dev/null +++ b/barretenberg/codegen/templates/cpp/ipc_server.hpp @@ -0,0 +1,252 @@ +/** + * Generic IPC server over Unix Domain Sockets. + * Handles: socket setup, multi-client accept via poll(), length-prefixed framing. + * Service-specific dispatch is injected via the handler function parameter. + * + * Does NOT handle signal handling or parent death monitoring — those are + * the responsibility of the binary that calls serve(). + * + * Header-only — no separate .cpp needed. + */ +#pragma once +#ifndef IPC_SERVER_HPP_INCLUDED +#define IPC_SERVER_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +#if defined(__wasm__) +// UDS not available in WASM — provide stub types only +namespace ipc { +struct ShutdownRequested : std::exception { + std::vector final_response; + explicit ShutdownRequested(std::vector resp) : final_response(std::move(resp)) {} + const char* what() const noexcept override { return "shutdown requested"; } +}; +using Handler = std::function(const std::vector&)>; +inline void serve(const char*, Handler, std::atomic* = nullptr, int = 5) {} +} // namespace ipc +#else + +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace ipc { + +/// Exception thrown by handlers to trigger graceful shutdown. +/// Carries the final response to send before closing. +struct ShutdownRequested : std::exception { + std::vector final_response; + explicit ShutdownRequested(std::vector resp) + : final_response(std::move(resp)) + {} + const char* what() const noexcept override { return "shutdown requested"; } +}; + +using Handler = std::function(const std::vector&)>; + +// --------------------------------------------------------------------------- +// Framing: 4-byte little-endian length prefix +// --------------------------------------------------------------------------- + +inline bool send_frame(int fd, const std::vector& data) +{ + uint32_t len = static_cast(data.size()); + uint8_t header[4] = { + static_cast(len & 0xFF), + static_cast((len >> 8) & 0xFF), + static_cast((len >> 16) & 0xFF), + static_cast((len >> 24) & 0xFF), + }; + // Write header + size_t written = 0; + while (written < 4) { + auto n = ::write(fd, header + written, 4 - written); + if (n <= 0) { + return false; + } + written += static_cast(n); + } + // Write payload + written = 0; + while (written < data.size()) { + auto n = ::write(fd, data.data() + written, data.size() - written); + if (n <= 0) { + return false; + } + written += static_cast(n); + } + return true; +} + +/// Returns empty vector on EOF/error. +inline std::vector recv_frame(int fd) +{ + uint8_t header[4]; + size_t got = 0; + while (got < 4) { + auto n = ::read(fd, header + got, 4 - got); + if (n <= 0) { + return {}; + } + got += static_cast(n); + } + uint32_t len = static_cast(header[0]) | (static_cast(header[1]) << 8) | + (static_cast(header[2]) << 16) | (static_cast(header[3]) << 24); + std::vector buf(len); + got = 0; + while (got < len) { + auto n = ::read(fd, buf.data() + got, len - got); + if (n <= 0) { + return {}; + } + got += static_cast(n); + } + return buf; +} + +// --------------------------------------------------------------------------- +// Multi-client UDS server +// --------------------------------------------------------------------------- + +/** + * @brief Run a multi-client UDS server. + * + * Accepts multiple client connections via poll(). Handles one request at a time + * (sequential, not concurrent). When a handler throws ShutdownRequested, the + * final response is sent and the server exits cleanly. + * + * The caller should set up signal handlers and parent death monitoring before + * calling this function. To request external shutdown, store true into the + * provided shutdown_flag (or pass nullptr to disable external shutdown). + * + * @param socket_path Path for the Unix domain socket + * @param handler Function that processes a request and returns a response + * @param shutdown_flag Atomic flag checked each poll cycle; serve() exits when true. + * May be nullptr if only ShutdownRequested is used. + * @param backlog listen() backlog (max pending connections) + */ +inline void serve(const char* socket_path, + Handler handler, + std::atomic* shutdown_flag = nullptr, + int backlog = 5) +{ + unlink(socket_path); + int server_fd = ::socket(AF_UNIX, SOCK_STREAM, 0); + if (server_fd < 0) { + throw std::runtime_error(std::string("socket() failed: ") + strerror(errno)); + } + + struct sockaddr_un addr {}; + addr.sun_family = AF_UNIX; + strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1); + + if (::bind(server_fd, reinterpret_cast(&addr), sizeof(addr)) < 0) { + ::close(server_fd); + throw std::runtime_error(std::string("bind() failed: ") + strerror(errno)); + } + if (::listen(server_fd, backlog) < 0) { + ::close(server_fd); + throw std::runtime_error(std::string("listen() failed: ") + strerror(errno)); + } + + // Poll set: [0] = server_fd, [1..N] = client fds + std::vector fds; + fds.push_back({ server_fd, POLLIN, 0 }); + + auto remove_client = [&](size_t idx) { + ::close(fds[idx].fd); + fds.erase(fds.begin() + static_cast(idx)); + }; + + auto should_shutdown = [&]() { + return shutdown_flag != nullptr && shutdown_flag->load(std::memory_order_acquire); + }; + + while (!should_shutdown()) { + int ready = ::poll(fds.data(), static_cast(fds.size()), 100 /* ms */); + if (ready < 0) { + if (errno == EINTR) { + continue; + } + break; + } + if (ready == 0) { + continue; + } + + // Check server fd for new connections + if (fds[0].revents & POLLIN) { + int client_fd = ::accept(server_fd, nullptr, nullptr); + if (client_fd >= 0) { + fds.push_back({ client_fd, POLLIN, 0 }); + } + } + + // Check client fds for data + for (size_t i = 1; i < fds.size(); /* incremented below */) { + if (!(fds[i].revents & POLLIN)) { + ++i; + continue; + } + + auto payload = recv_frame(fds[i].fd); + if (payload.empty()) { + // Client disconnected + remove_client(i); + continue; + } + + try { + auto response = handler(payload); + if (!send_frame(fds[i].fd, response)) { + remove_client(i); + continue; + } + } catch (const ShutdownRequested& shutdown) { + send_frame(fds[i].fd, shutdown.final_response); + goto done; + } catch (const std::exception& e) { + std::cerr << "ipc-server: handler error: " << e.what() << "\n"; + remove_client(i); + continue; + } + ++i; + } + } + +done: + // Close all client connections + for (size_t i = 1; i < fds.size(); ++i) { + ::close(fds[i].fd); + } + ::close(server_fd); + unlink(socket_path); +} + +} // namespace ipc +#endif // !defined(__wasm__) +#endif // IPC_SERVER_HPP_INCLUDED diff --git a/barretenberg/codegen/templates/rust/backend.rs b/barretenberg/codegen/templates/rust/backend.rs new file mode 100644 index 000000000000..d35f58dfd3e0 --- /dev/null +++ b/barretenberg/codegen/templates/rust/backend.rs @@ -0,0 +1,44 @@ +//! Backend trait for msgpack communication +//! +//! This module defines a simple, pluggable interface for Barretenberg backends. +//! Users can easily implement custom backends (FFI, WASM, IPC, etc.). + +use super::error::Result; + +/// Simple interface for msgpack backend implementations. +/// +/// Implement this trait to create a custom backend for Barretenberg. +/// The backend handles msgpack-encoded command/response communication. +/// +/// # Example +/// +/// ```ignore +/// struct MyCustomBackend { +/// // your FFI handle, connection, etc. +/// } +/// +/// impl Backend for MyCustomBackend { +/// fn call(&mut self, input: &[u8]) -> Result> { +/// // Send input to your backend +/// // Return the response +/// } +/// +/// fn destroy(&mut self) -> Result<()> { +/// // Clean up resources +/// Ok(()) +/// } +/// } +/// ``` +pub trait Backend { + /// Execute a msgpack command and return the msgpack response. + /// + /// # Arguments + /// * `input` - Msgpack-encoded command + /// + /// # Returns + /// Msgpack-encoded response + fn call(&mut self, input: &[u8]) -> Result>; + + /// Clean up resources and shutdown the backend. + fn destroy(&mut self) -> Result<()>; +} diff --git a/barretenberg/rust/barretenberg-rs/src/error.rs b/barretenberg/codegen/templates/rust/error.rs similarity index 100% rename from barretenberg/rust/barretenberg-rs/src/error.rs rename to barretenberg/codegen/templates/rust/error.rs diff --git a/barretenberg/rust/barretenberg-rs/src/backends/ffi.rs b/barretenberg/codegen/templates/rust/ffi_backend.rs similarity index 93% rename from barretenberg/rust/barretenberg-rs/src/backends/ffi.rs rename to barretenberg/codegen/templates/rust/ffi_backend.rs index 22a4243d92ef..490546001feb 100644 --- a/barretenberg/rust/barretenberg-rs/src/backends/ffi.rs +++ b/barretenberg/codegen/templates/rust/ffi_backend.rs @@ -14,17 +14,17 @@ //! # Example //! //! ```ignore -//! use barretenberg_rs::{BarretenbergApi, backends::FfiBackend}; +//! use barretenberg_rs::{BbApi, FfiBackend}; //! //! let backend = FfiBackend::new()?; -//! let mut api = BarretenbergApi::new(backend); +//! let mut api = BbApi::new(backend); //! //! let response = api.blake2s(b"hello world")?; //! println!("Hash: {:?}", response.hash); //! ``` -use crate::backend::Backend; -use crate::error::{BarretenbergError, Result}; +use super::backend::Backend; +use super::error::{BarretenbergError, Result}; use std::ptr; // C API exported by Barretenberg @@ -140,7 +140,7 @@ impl Default for FfiBackend { #[cfg(test)] mod tests { use super::*; - use crate::api::BarretenbergApi; + use crate::generated::bb_client::BbApi; #[test] fn test_ffi_backend_creation() { @@ -151,10 +151,10 @@ mod tests { #[test] fn test_ffi_blake2s() { let backend = FfiBackend::new().unwrap(); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let response = api.blake2s(b"hello world").unwrap(); - assert_eq!(response.hash.len(), 32); + assert_eq!(response.hash.as_slice().len(), 32); // Verify deterministic output let response2 = api.blake2s(b"hello world").unwrap(); diff --git a/barretenberg/codegen/templates/rust/ipc_client.rs b/barretenberg/codegen/templates/rust/ipc_client.rs new file mode 100644 index 000000000000..35f7094ddef6 --- /dev/null +++ b/barretenberg/codegen/templates/rust/ipc_client.rs @@ -0,0 +1,42 @@ +//! Generic IPC client over Unix Domain Sockets. +//! Handles: socket connect, length-prefixed framing, send/receive raw bytes. +//! Service-specific typed methods are in the generated wrapper. + +use std::io::{Read, Write}; +use std::os::unix::net::UnixStream; + +pub struct IpcClient { + stream: UnixStream, +} + +impl IpcClient { + pub fn connect(socket_path: &str) -> std::io::Result { + let stream = UnixStream::connect(socket_path)?; + Ok(Self { stream }) + } + + /// Send a msgpack request and receive the raw response bytes. + pub fn call(&mut self, request: &[u8]) -> std::io::Result> { + // Send length-prefixed + let len = (request.len() as u32).to_le_bytes(); + self.stream.write_all(&len)?; + self.stream.write_all(request)?; + self.stream.flush()?; + + // Read response length + let mut len_buf = [0u8; 4]; + self.stream.read_exact(&mut len_buf)?; + let resp_len = u32::from_le_bytes(len_buf) as usize; + + // Read response payload + let mut resp = vec![0u8; resp_len]; + self.stream.read_exact(&mut resp)?; + Ok(resp) + } +} + +impl Drop for IpcClient { + fn drop(&mut self) { + let _ = self.stream.shutdown(std::net::Shutdown::Both); + } +} diff --git a/barretenberg/codegen/templates/rust/ipc_server.rs b/barretenberg/codegen/templates/rust/ipc_server.rs new file mode 100644 index 000000000000..cfce19cbc26a --- /dev/null +++ b/barretenberg/codegen/templates/rust/ipc_server.rs @@ -0,0 +1,51 @@ +//! Generic IPC server over Unix Domain Sockets. +//! Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. +//! Service-specific dispatch is injected via the dispatch function parameter. + +use std::io::{Read, Write}; +use std::os::unix::net::UnixListener; + +/// Dispatch function signature: takes raw command name + msgpack bytes, returns response name + bytes +pub type DispatchFn = Box Vec>; + +/// Run an IPC server. Accepts one connection, serves until disconnect or shutdown. +pub fn serve(socket_path: &str, handler: impl Fn(&[u8]) -> Vec) -> std::io::Result<()> { + let _ = std::fs::remove_file(socket_path); + let listener = UnixListener::bind(socket_path)?; + eprintln!("ipc-server(rust): listening on {}", socket_path); + + let (mut stream, _) = listener.accept()?; + + loop { + // Read 4-byte LE length + let mut len_buf = [0u8; 4]; + if stream.read_exact(&mut len_buf).is_err() { + break; + } + let len = u32::from_le_bytes(len_buf) as usize; + + // Read payload + let mut payload = vec![0u8; len]; + stream.read_exact(&mut payload)?; + + // Check for shutdown + let is_shutdown = payload.windows(8).any(|w| w == b"Shutdown"); + + // Dispatch + let response = handler(&payload); + + // Send length-prefixed response + let resp_len = (response.len() as u32).to_le_bytes(); + stream.write_all(&resp_len)?; + stream.write_all(&response)?; + stream.flush()?; + + if is_shutdown { + break; + } + } + + let _ = std::fs::remove_file(socket_path); + eprintln!("ipc-server(rust): shutdown"); + Ok(()) +} diff --git a/barretenberg/codegen/templates/rust/uds_backend.rs b/barretenberg/codegen/templates/rust/uds_backend.rs new file mode 100644 index 000000000000..a524391cd687 --- /dev/null +++ b/barretenberg/codegen/templates/rust/uds_backend.rs @@ -0,0 +1,78 @@ +//! UDS (Unix Domain Socket) backend for Barretenberg +//! +//! Connects to a running BB server over a Unix domain socket, +//! using the standard 4-byte LE length-prefixed msgpack protocol. +//! Same wire format as C++/TS/Zig IPC clients. + +use super::backend::Backend; +use super::error::{BarretenbergError, Result}; +use std::io::{Read, Write}; +use std::os::unix::net::UnixStream; +use std::path::Path; + +/// UDS backend — connects to a BB server over Unix domain socket. +pub struct UdsBackend { + stream: UnixStream, +} + +impl UdsBackend { + /// Connect to a BB server at the given socket path. + /// + /// # Arguments + /// * `socket_path` - Path to the Unix domain socket (e.g. "/tmp/bb.sock") + pub fn connect(socket_path: impl AsRef) -> Result { + let stream = UnixStream::connect(socket_path.as_ref()).map_err(|e| { + BarretenbergError::Ipc(format!( + "Failed to connect to {}: {}", + socket_path.as_ref().display(), + e + )) + })?; + Ok(Self { stream }) + } + + fn send_with_prefix(&mut self, data: &[u8]) -> Result<()> { + let len = data.len() as u32; + self.stream + .write_all(&len.to_le_bytes()) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to write length: {}", e)))?; + self.stream + .write_all(data) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to write data: {}", e)))?; + self.stream + .flush() + .map_err(|e| BarretenbergError::Ipc(format!("Failed to flush: {}", e)))?; + Ok(()) + } + + fn receive_with_prefix(&mut self) -> Result> { + let mut len_buf = [0u8; 4]; + self.stream + .read_exact(&mut len_buf) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to read length: {}", e)))?; + let len = u32::from_le_bytes(len_buf) as usize; + let mut data = vec![0u8; len]; + self.stream + .read_exact(&mut data) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to read data: {}", e)))?; + Ok(data) + } +} + +impl Backend for UdsBackend { + fn call(&mut self, input: &[u8]) -> Result> { + self.send_with_prefix(input)?; + self.receive_with_prefix() + } + + fn destroy(&mut self) -> Result<()> { + let _ = self.stream.shutdown(std::net::Shutdown::Both); + Ok(()) + } +} + +impl Drop for UdsBackend { + fn drop(&mut self) { + let _ = self.destroy(); + } +} diff --git a/barretenberg/codegen/templates/ts/ipc_client.ts b/barretenberg/codegen/templates/ts/ipc_client.ts new file mode 100644 index 000000000000..1fbdf761b3b1 --- /dev/null +++ b/barretenberg/codegen/templates/ts/ipc_client.ts @@ -0,0 +1,58 @@ +/** + * Generic IPC client over Unix Domain Sockets. + * Handles: socket connect, length-prefixed framing, msgpack encode/decode. + * Service-specific typed methods are in the generated wrapper. + */ +import * as net from 'node:net'; +import { Decoder, Encoder } from 'msgpackr'; + +const encoder = new Encoder({ useRecords: false }); +const decoder = new Decoder({ useRecords: false }); + +export class IpcClient { + private conn: net.Socket; + private buffer = Buffer.alloc(0); + + private constructor(conn: net.Socket) { + this.conn = conn; + } + + static async connect(socketPath: string): Promise { + const conn = net.createConnection(socketPath); + await new Promise((resolve, reject) => { + conn.on('connect', resolve); + conn.on('error', reject); + }); + return new IpcClient(conn); + } + + close() { + this.conn.destroy(); + } + + /** Send a command and receive the response. */ + async call(commandName: string, fields: any): Promise<[string, any]> { + const packed = encoder.pack([[commandName, fields]]); + const lenBuf = Buffer.alloc(4); + lenBuf.writeUInt32LE(packed.length, 0); + this.conn.write(lenBuf); + this.conn.write(packed); + + return new Promise((resolve, reject) => { + const onData = (data: Buffer) => { + this.buffer = Buffer.concat([this.buffer, data]); + if (this.buffer.length >= 4) { + const len = this.buffer.readUInt32LE(0); + if (this.buffer.length >= 4 + len) { + this.conn.removeListener('data', onData); + const payload = this.buffer.subarray(4, 4 + len); + this.buffer = this.buffer.subarray(4 + len); + resolve(decoder.unpack(payload) as [string, any]); + } + } + }; + this.conn.on('data', onData); + this.conn.on('error', reject); + }); + } +} diff --git a/barretenberg/codegen/templates/ts/ipc_server.ts b/barretenberg/codegen/templates/ts/ipc_server.ts new file mode 100644 index 000000000000..3ef981ba2182 --- /dev/null +++ b/barretenberg/codegen/templates/ts/ipc_server.ts @@ -0,0 +1,82 @@ +/** + * Generic IPC server over Unix Domain Sockets. + * Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. + * Service-specific dispatch is injected via the dispatchFn parameter. + */ +import * as net from 'node:net'; +import * as fs from 'node:fs'; +import { Decoder, Encoder } from 'msgpackr'; + +const encoder = new Encoder({ useRecords: false }); +const decoder = new Decoder({ useRecords: false }); + +export type DispatchFn = (commandName: string, payload: any) => Promise<[string, any]>; + +export function createServer(socketPath: string, dispatchFn: DispatchFn): { close: () => Promise } { + try { fs.unlinkSync(socketPath); } catch {} + + const server = net.createServer((conn) => { + let buffer = Buffer.alloc(0); + let responseChain: Promise = Promise.resolve(); + + conn.on('data', (data: Buffer) => { + buffer = Buffer.concat([buffer, data]); + + while (buffer.length >= 4) { + const len = buffer.readUInt32LE(0); + if (buffer.length < 4 + len) break; + + const payload = buffer.subarray(4, 4 + len); + buffer = buffer.subarray(4 + len); + + const request = decoder.unpack(payload) as any[]; + const [commandName, fields] = request[0] as [string, any]; + + if (commandName.endsWith('Shutdown')) { + sendResponse(conn, [commandName.replace(/^(.*)$/, '$1Response'), {}]); + setTimeout(() => { + server.close(); + try { fs.unlinkSync(socketPath); } catch {} + }, 50); + return; + } + + const prev = responseChain; + const result = dispatchFn(commandName, fields ?? {}); + responseChain = (async () => { + await prev; + try { + const [name, resp] = await result; + sendResponse(conn, [name, resp]); + } catch (err: any) { + sendResponse(conn, ['ErrorResponse', { message: err.message ?? 'Unknown error' }]); + } + })(); + void responseChain.catch(() => {}); + } + }); + + conn.on('error', () => {}); + }); + + server.listen(socketPath, () => { + console.error(`ipc-server(ts): listening on ${socketPath}`); + }); + + return { + close: () => new Promise(resolve => { + server.close(() => { + try { fs.unlinkSync(socketPath); } catch {} + resolve(); + }); + }), + }; +} + +function sendResponse(conn: net.Socket, response: [string, any]) { + const packed = encoder.pack(response); + const lenBuf = Buffer.alloc(4); + lenBuf.writeUInt32LE(packed.length, 0); + conn.write(lenBuf); + conn.write(packed); +} diff --git a/barretenberg/codegen/templates/zig/backend.zig b/barretenberg/codegen/templates/zig/backend.zig new file mode 100644 index 000000000000..97a65bdbfa07 --- /dev/null +++ b/barretenberg/codegen/templates/zig/backend.zig @@ -0,0 +1,27 @@ +/// Backend abstraction — comptime interface for transport. +/// +/// A valid backend type must provide: +/// fn call(self: *T, request: []const u8) ![]u8 +/// fn destroy(self: *T) void +/// +/// Implementations: +/// UdsBackend (uds_backend.zig) — Unix Domain Socket IPC +/// FfiBackend (ffi_backend.zig) — Direct C FFI linking +/// +/// Usage with the generated client: +/// const Client = @import("wsdb_client.zig").Client; +/// const UdsBackend = @import("uds_backend.zig").UdsBackend; +/// var backend = try UdsBackend.connect("/tmp/wsdb.sock"); +/// var client = Client(UdsBackend){ .backend = &backend }; + +/// Compile-time check that a type satisfies the backend interface. +pub fn assertBackend(comptime T: type) void { + // Must have: fn call(self: *T, request: []const u8) ![]u8 + if (!@hasDecl(T, "call")) { + @compileError("Backend type " ++ @typeName(T) ++ " missing 'call' method"); + } + // Must have: fn destroy(self: *T) void + if (!@hasDecl(T, "destroy")) { + @compileError("Backend type " ++ @typeName(T) ++ " missing 'destroy' method"); + } +} diff --git a/barretenberg/codegen/templates/zig/ffi_backend.zig b/barretenberg/codegen/templates/zig/ffi_backend.zig new file mode 100644 index 000000000000..0963dfb0589e --- /dev/null +++ b/barretenberg/codegen/templates/zig/ffi_backend.zig @@ -0,0 +1,22 @@ +/// FFI backend for direct library linking. +/// Calls the C function bbapi() with msgpack bytes — no IPC overhead. +/// Link against libbarretenberg.a to use this backend. +/// Satisfies the backend interface: call(request) -> response, destroy(). +const std = @import("std"); + +extern fn bbapi(input: [*]const u8, input_len: usize, output: *[*]u8, output_len: *usize) void; + +pub const FfiBackend = struct { + /// Send a msgpack command and receive the response via FFI. + pub fn call(self: *FfiBackend, request: []const u8) ![]u8 { + _ = self; + var out_ptr: [*]u8 = undefined; + var out_len: usize = 0; + bbapi(request.ptr, request.len, &out_ptr, &out_len); + return out_ptr[0..out_len]; + } + + pub fn destroy(self: *FfiBackend) void { + _ = self; + } +}; diff --git a/barretenberg/codegen/templates/zig/ffi_client.zig b/barretenberg/codegen/templates/zig/ffi_client.zig new file mode 100644 index 000000000000..960a4eee9b21 --- /dev/null +++ b/barretenberg/codegen/templates/zig/ffi_client.zig @@ -0,0 +1,21 @@ +/// FFI client for direct library linking. +/// Calls the C function bbapi() with msgpack bytes — no IPC overhead. +/// Link against libbarretenberg.a to use this backend. +const std = @import("std"); + +extern fn bbapi(input: [*]const u8, input_len: usize, output: *[*]u8, output_len: *usize) void; + +pub const FfiClient = struct { + /// Send a msgpack command and receive the response via FFI. + pub fn call(self: *FfiClient, request: []const u8) ![]u8 { + _ = self; + var out_ptr: [*]u8 = undefined; + var out_len: usize = 0; + bbapi(request.ptr, request.len, &out_ptr, &out_len); + return out_ptr[0..out_len]; + } + + pub fn destroy(self: *FfiClient) void { + _ = self; + } +}; diff --git a/barretenberg/codegen/templates/zig/ipc_client.zig b/barretenberg/codegen/templates/zig/ipc_client.zig new file mode 100644 index 000000000000..db53693cf57c --- /dev/null +++ b/barretenberg/codegen/templates/zig/ipc_client.zig @@ -0,0 +1,93 @@ +/// Generic IPC client over Unix Domain Sockets. +/// Handles: socket connect, length-prefixed framing, msgpack encode/decode. +/// Service-specific typed methods are in the generated wrapper. +const std = @import("std"); +const posix = std.posix; +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; + +const alloc = std.heap.page_allocator; + +pub const IpcClient = struct { + fd: posix.socket_t, + + /// Connect to a service at the given UDS path. + pub fn connect(socket_path: []const u8) !IpcClient { + const address = try std.net.Address.initUnix(socket_path); + const fd = try posix.socket(posix.AF.UNIX, posix.SOCK.STREAM, 0); + try posix.connect(fd, &address.any, address.getOsSockLen()); + return .{ .fd = fd }; + } + + /// Close the connection. + pub fn close(self: *IpcClient) void { + posix.close(self.fd); + } + + /// Send a command and receive a response. + /// Returns [responseName, responsePayload]. + pub fn call(self: *IpcClient, cmd_name: []const u8, fields: Payload) !struct { []const u8, Payload } { + // Encode: [[cmdName, fields]] + var inner = try Payload.arrPayload(2, alloc); + try inner.setArrElement(0, try Payload.strToPayload(cmd_name, alloc)); + try inner.setArrElement(1, fields); + var outer = try Payload.arrPayload(1, alloc); + try outer.setArrElement(0, inner); + + // Serialize + var allocating_writer = std.Io.Writer.Allocating.init(alloc); + var packer = msgpack.PackerIO.init(undefined, &allocating_writer.writer); + try packer.write(outer); + const request_bytes = try allocating_writer.toOwnedSlice(); + defer alloc.free(request_bytes); + + // Send + try sendFrame(self.fd, request_bytes); + + // Receive + const response_bytes = try recvFrame(self.fd); + defer alloc.free(response_bytes); + + // Decode: [responseName, payload] + var reader = std.Io.Reader.fixed(response_bytes); + var unpacker = msgpack.PackerIO.init(&reader, undefined); + const resp = try unpacker.read(alloc); + const resp_len = try resp.getArrLen(); + if (resp_len != 2) return error.InvalidResponse; + + const name = try (try resp.getArrElement(0)).asStr(); + const payload = try resp.getArrElement(1); + return .{ name, payload }; + } + + fn sendFrame(fd: posix.socket_t, data: []const u8) !void { + const len: u32 = @intCast(data.len); + const header = [4]u8{ + @intCast(len & 0xFF), + @intCast((len >> 8) & 0xFF), + @intCast((len >> 16) & 0xFF), + @intCast((len >> 24) & 0xFF), + }; + _ = try posix.write(fd, &header); + _ = try posix.write(fd, data); + } + + fn recvFrame(fd: posix.socket_t) ![]u8 { + var hdr: [4]u8 = undefined; + var got: usize = 0; + while (got < 4) { + const n = try posix.read(fd, hdr[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + const len: u32 = @as(u32, hdr[0]) | (@as(u32, hdr[1]) << 8) | (@as(u32, hdr[2]) << 16) | (@as(u32, hdr[3]) << 24); + const data = try alloc.alloc(u8, len); + got = 0; + while (got < len) { + const n = try posix.read(fd, data[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + return data; + } +}; diff --git a/barretenberg/codegen/templates/zig/ipc_server.zig b/barretenberg/codegen/templates/zig/ipc_server.zig new file mode 100644 index 000000000000..ba58a09b5a61 --- /dev/null +++ b/barretenberg/codegen/templates/zig/ipc_server.zig @@ -0,0 +1,112 @@ +/// Generic IPC server over Unix Domain Sockets. +/// Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. +/// Service-specific dispatch is injected via the DispatchFn parameter. +const std = @import("std"); +const posix = std.posix; +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; + +const alloc = std.heap.page_allocator; + +pub const DispatchFn = *const fn (cmd_name: []const u8, fields: Payload) DispatchResult; +pub const DispatchResult = struct { resp_name: []const u8, resp_payload: anyerror!Payload }; + +/// Run an IPC server on the given UDS path. +/// Accepts one connection, serves requests until shutdown or disconnect. +pub fn serve(socket_path: []const u8, dispatch: DispatchFn) !void { + std.fs.cwd().deleteFile(socket_path) catch {}; + + const address = try std.net.Address.initUnix(socket_path); + const server_fd = try posix.socket(posix.AF.UNIX, posix.SOCK.STREAM, 0); + defer posix.close(server_fd); + try posix.bind(server_fd, &address.any, address.getOsSockLen()); + try posix.listen(server_fd, 1); + + std.debug.print("ipc-server: listening on {s}\n", .{socket_path}); + + const client_fd = try posix.accept(server_fd, null, null, 0); + defer posix.close(client_fd); + + while (true) { + const frame = recvFrame(client_fd) catch break; + defer alloc.free(frame); + + // Decode msgpack: [[commandName, {fields}]] + var reader = std.Io.Reader.fixed(frame); + var packer = msgpack.PackerIO.init(&reader, undefined); + const request = packer.read(alloc) catch break; + + const outer_len = request.getArrLen() catch break; + if (outer_len != 1) break; + + const inner = request.getArrElement(0) catch break; + const inner_len = inner.getArrLen() catch break; + if (inner_len != 2) break; + + const cmd_name = (inner.getArrElement(0) catch break).asStr() catch break; + const fields = inner.getArrElement(1) catch break; + + // Dispatch + const result = dispatch(cmd_name, fields); + const resp_payload = result.resp_payload catch blk: { + var err_map = Payload.mapPayload(alloc); + const msg = std.fmt.allocPrint(alloc, "error: {s}", .{cmd_name}) catch "error"; + err_map.mapPut("message", Payload.strToPayload(msg, alloc) catch break) catch break; + break :blk err_map; + }; + const is_error = if (result.resp_payload) |_| false else |_| true; + const resp_name = if (is_error) "ErrorResponse" else result.resp_name; + + const response = encodeResponse(resp_name, resp_payload) catch break; + defer alloc.free(response); + sendFrame(client_fd, response) catch break; + + // Check for shutdown + if (std.mem.indexOf(u8, cmd_name, "Shutdown") != null) break; + } + + std.fs.cwd().deleteFile(socket_path) catch {}; + std.debug.print("ipc-server: shutdown\n", .{}); +} + +fn encodeResponse(name: []const u8, payload: Payload) ![]u8 { + var resp_arr = try Payload.arrPayload(2, alloc); + try resp_arr.setArrElement(0, try Payload.strToPayload(name, alloc)); + try resp_arr.setArrElement(1, payload); + + var allocating_writer = std.Io.Writer.Allocating.init(alloc); + var packer = msgpack.PackerIO.init(undefined, &allocating_writer.writer); + try packer.write(resp_arr); + return try allocating_writer.toOwnedSlice(); +} + +fn recvFrame(fd: posix.socket_t) ![]u8 { + var hdr: [4]u8 = undefined; + var got: usize = 0; + while (got < 4) { + const n = try posix.read(fd, hdr[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + const len: u32 = @as(u32, hdr[0]) | (@as(u32, hdr[1]) << 8) | (@as(u32, hdr[2]) << 16) | (@as(u32, hdr[3]) << 24); + const data = try alloc.alloc(u8, len); + got = 0; + while (got < len) { + const n = try posix.read(fd, data[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + return data; +} + +fn sendFrame(fd: posix.socket_t, data: []const u8) !void { + const len: u32 = @intCast(data.len); + const header = [4]u8{ + @intCast(len & 0xFF), + @intCast((len >> 8) & 0xFF), + @intCast((len >> 16) & 0xFF), + @intCast((len >> 24) & 0xFF), + }; + _ = try posix.write(fd, &header); + _ = try posix.write(fd, data); +} diff --git a/barretenberg/codegen/templates/zig/uds_backend.zig b/barretenberg/codegen/templates/zig/uds_backend.zig new file mode 100644 index 000000000000..af701e2d05c9 --- /dev/null +++ b/barretenberg/codegen/templates/zig/uds_backend.zig @@ -0,0 +1,62 @@ +/// UDS (Unix Domain Socket) backend for IPC communication. +/// Handles: socket connect, length-prefixed framing, raw byte send/receive. +/// Satisfies the backend interface: call(request) -> response, destroy(). +const std = @import("std"); +const posix = std.posix; + +const alloc = std.heap.page_allocator; + +pub const UdsBackend = struct { + fd: posix.socket_t, + + /// Connect to a service at the given UDS path. + pub fn connect(socket_path: []const u8) !UdsBackend { + const address = try std.net.Address.initUnix(socket_path); + const fd = try posix.socket(posix.AF.UNIX, posix.SOCK.STREAM, 0); + try posix.connect(fd, &address.any, address.getOsSockLen()); + return .{ .fd = fd }; + } + + /// Send a raw msgpack request and receive a raw msgpack response. + /// Framing: 4-byte LE length prefix + payload. + pub fn call(self: *UdsBackend, request: []const u8) ![]u8 { + try sendFrame(self.fd, request); + return try recvFrame(self.fd); + } + + /// Close the connection. + pub fn destroy(self: *UdsBackend) void { + posix.close(self.fd); + } + + fn sendFrame(fd: posix.socket_t, data: []const u8) !void { + const len: u32 = @intCast(data.len); + const header = [4]u8{ + @intCast(len & 0xFF), + @intCast((len >> 8) & 0xFF), + @intCast((len >> 16) & 0xFF), + @intCast((len >> 24) & 0xFF), + }; + _ = try posix.write(fd, &header); + _ = try posix.write(fd, data); + } + + fn recvFrame(fd: posix.socket_t) ![]u8 { + var hdr: [4]u8 = undefined; + var got: usize = 0; + while (got < 4) { + const n = try posix.read(fd, hdr[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + const len: u32 = @as(u32, hdr[0]) | (@as(u32, hdr[1]) << 8) | (@as(u32, hdr[2]) << 16) | (@as(u32, hdr[3]) << 24); + const data = try alloc.alloc(u8, len); + got = 0; + while (got < len) { + const n = try posix.read(fd, data[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + return data; + } +}; diff --git a/barretenberg/cpp/bootstrap.sh b/barretenberg/cpp/bootstrap.sh index b9c2f351d656..aee0b5a26cd8 100755 --- a/barretenberg/cpp/bootstrap.sh +++ b/barretenberg/cpp/bootstrap.sh @@ -6,7 +6,8 @@ if [ "${AVM:-1}" -eq "1" ]; then else export native_preset=${NATIVE_PRESET:-clang20-no-avm} fi -export hash=$(hash_str $(../../avm-transpiler/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns)) +# Hash includes avm-transpiler, cpp sources, and codegen (schemas + codegen tool) +export hash=$(hash_str $(../../avm-transpiler/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns) $(../codegen/bootstrap.sh hash)) export native_build_dir=$(scripts/preset-build-dir $native_preset) # Injects version number into a given bb binary. @@ -98,6 +99,7 @@ function build_preset { local preset=$1 local build_dir=$(scripts/preset-build-dir $preset) if ! cache_download barretenberg-$preset-$hash.zst; then + (cd ../codegen && ./bootstrap.sh generate) cmake_build $preset cache_upload barretenberg-$preset-$hash.zst $(preset_cache_paths $preset $build_dir) fi @@ -117,6 +119,8 @@ function build_format_check { function build_native_objects { set -eu if ! cache_exists barretenberg-$native_preset-$hash.zst; then + # Generate IPC client/server code from committed schemas (zero deps, ~2s) + (cd ../codegen && ./bootstrap.sh generate) cmake --preset "$native_preset" targets=$(cmake --build --preset "$native_preset" --target help | awk -F: '$1 ~ /(_objects|_tests|_bench|_gen|.a)$/ && $1 !~ /^cmake_/{print $1}' | tr '\n' ' ') cmake --build --preset "$native_preset" --target $targets nodejs_module @@ -130,6 +134,7 @@ function build_cross_objects { set -eu target=$1 if ! cache_exists barretenberg-$target-$hash.zst; then + (cd ../codegen && ./bootstrap.sh generate) cmake_build $target --target barretenberg vm2_stub vm2_sim circuit_checker honk fi } @@ -142,6 +147,7 @@ function build_gcc_syntax_check_only { if cache_download barretenberg-gcc-$hash.zst; then return fi + (cd ../codegen && ./bootstrap.sh generate) cmake --preset gcc -DSYNTAX_ONLY=1 cmake --build --preset gcc --target bb # Note: There's no real artifact here, we fake one for consistency. @@ -155,6 +161,7 @@ function build_fuzzing_syntax_check_only { if cache_download barretenberg-fuzzing-$hash.zst; then return fi + (cd ../codegen && ./bootstrap.sh generate) cmake --preset fuzzing -DSYNTAX_ONLY=1 cmake --build --preset fuzzing cmake --preset fuzzing-avm -DSYNTAX_ONLY=1 diff --git a/barretenberg/cpp/src/barretenberg/api/api_chonk.cpp b/barretenberg/cpp/src/barretenberg/api/api_chonk.cpp index cc3eef368ed5..7b0b889f872a 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_chonk.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_chonk.cpp @@ -34,7 +34,7 @@ namespace { // anonymous namespace */ void write_chonk_vk(std::vector bytecode, const std::filesystem::path& output_path, const API::Flags& flags) { - auto response = bbapi::ChonkComputeVk{ .circuit = { .bytecode = std::move(bytecode) } }.execute(); + auto response = bbapi::BbChonkComputeVk{ .circuit = { .bytecode = std::move(bytecode) } }.execute(); const bool is_stdout = output_path == "-"; if (is_stdout) { @@ -55,23 +55,23 @@ void ChonkAPI::prove(const Flags& flags, const std::filesystem::path& output_dir) { BB_BENCH_NAME("ChonkAPI::prove"); - bbapi::BBApiRequest request; + bbapi::BbRequest request; request.vk_policy = bbapi::parse_vk_policy(flags.vk_policy); std::vector raw_steps = PrivateExecutionStepRaw::load_and_decompress(input_path); - bbapi::ChonkStart{ .num_circuits = static_cast(raw_steps.size()) }.execute(request); + bbapi::BbChonkStart{ .num_circuits = static_cast(raw_steps.size()) }.execute(request); info("Chonk: starting with ", raw_steps.size(), " circuits"); for (const auto& step : raw_steps) { - bbapi::ChonkLoad{ + bbapi::BbChonkLoad{ .circuit = { .name = step.function_name, .bytecode = step.bytecode, .verification_key = step.vk } }.execute(request); // NOLINTNEXTLINE(bugprone-unchecked-optional-access): we know the optional has been set here. info("Chonk: accumulating " + step.function_name); - bbapi::ChonkAccumulate{ .witness = step.witness }.execute(request); + bbapi::BbChonkAccumulate{ .witness = step.witness }.execute(request); } - auto proof = bbapi::ChonkProve{}.execute(request).proof; + auto proof = bbapi::BbChonkProve{}.execute(request).proof; const bool output_to_stdout = output_dir == "-"; @@ -112,7 +112,7 @@ bool ChonkAPI::verify([[maybe_unused]] const Flags& flags, auto vk_buffer = read_vk_file(vk_path); - auto response = bbapi::ChonkVerify{ .proof = std::move(proof), .vk = std::move(vk_buffer) }.execute(); + auto response = bbapi::BbChonkVerify{ .proof = std::move(proof), .vk = std::move(vk_buffer) }.execute(); return response.valid; } @@ -142,7 +142,7 @@ bool ChonkAPI::batch_verify([[maybe_unused]] const Flags& flags, const std::file info("ChonkAPI::batch_verify - found ", proofs.size(), " proof/vk pairs in ", proofs_dir.string()); - auto response = bbapi::ChonkBatchVerify{ .proofs = std::move(proofs), .vks = std::move(vks) }.execute(); + auto response = bbapi::BbChonkBatchVerify{ .proofs = std::move(proofs), .vks = std::move(vks) }.execute(); return response.valid; } @@ -204,7 +204,7 @@ void ChonkAPI::write_solidity_verifier([[maybe_unused]] const Flags& flags, bool ChonkAPI::check_precomputed_vks(const Flags& flags, const std::filesystem::path& input_path) { BB_BENCH_NAME("ChonkAPI::check_precomputed_vks"); - bbapi::BBApiRequest request; + bbapi::BbRequest request; std::vector raw_steps = PrivateExecutionStepRaw::load_and_decompress(input_path); bbapi::VkPolicy vk_policy = bbapi::parse_vk_policy(flags.vk_policy); @@ -214,7 +214,7 @@ bool ChonkAPI::check_precomputed_vks(const Flags& flags, const std::filesystem:: info("FAIL: Expected precomputed vk for function ", step.function_name); return false; } - auto response = bbapi::ChonkCheckPrecomputedVk{ + auto response = bbapi::BbChonkCheckPrecomputedVk{ .circuit = { .name = step.function_name, .bytecode = step.bytecode, .verification_key = step.vk } }.execute(); @@ -258,11 +258,11 @@ void chonk_gate_count(const std::string& bytecode_path, bool include_gates_per_o // All circuit reports will be built into the std::string below std::string functions_string = "{\"functions\": [\n "; - bbapi::BBApiRequest request; + bbapi::BbRequest request; auto bytecode = get_bytecode(bytecode_path); - auto response = bbapi::ChonkStats{ .circuit = { .name = "ivc_circuit", .bytecode = std::move(bytecode) }, - .include_gates_per_opcode = include_gates_per_opcode } + auto response = bbapi::BbChonkStats{ .circuit = { .name = "ivc_circuit", .bytecode = std::move(bytecode) }, + .include_gates_per_opcode = include_gates_per_opcode } .execute(request); // Build the circuit report. It always has one function, corresponding to the ACIR constraint systems. diff --git a/barretenberg/cpp/src/barretenberg/api/api_msgpack.cpp b/barretenberg/cpp/src/barretenberg/api/api_msgpack.cpp index bc50a2749129..98ef2e0b232a 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_msgpack.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_msgpack.cpp @@ -1,5 +1,10 @@ #include "barretenberg/api/api_msgpack.hpp" -#include "barretenberg/bbapi/c_bind.hpp" +#include "barretenberg/bbapi/bbapi_execute.hpp" +#include "barretenberg/bbapi/generated/bb_ipc_server.hpp" +#include "barretenberg/common/try_catch_shim.hpp" + +// Suppress implicit instantiation — explicit instantiation is in bbapi_handlers.cpp +extern template ::ipc::Handler bb::bbapi::make_bb_handler(bb::bbapi::BbRequest& ctx); #include "barretenberg/common/log.hpp" #include "barretenberg/serialize/msgpack.hpp" #include @@ -9,15 +14,9 @@ #include #if !defined(__wasm__) && !defined(_WIN32) +#include "barretenberg/common/parent_monitor.hpp" #include "barretenberg/ipc/ipc_server.hpp" #include -#include -#include -#ifdef __linux__ -#include -#elif defined(__APPLE__) -#include -#endif #endif namespace bb { @@ -31,6 +30,10 @@ int process_msgpack_commands(std::istream& input_stream) // Create an ostream that writes directly to stdout std::ostream stdout_stream(original_cout_buf); + // Create generated dispatch handler + static bbapi::BbRequest bb_request; + auto handler = bbapi::make_bb_handler(bb_request); + // Process length-encoded msgpack buffers while (!input_stream.eof()) { // Read 4-byte length prefix in little-endian format @@ -53,49 +56,14 @@ int process_msgpack_commands(std::istream& input_stream) return 1; } - // Deserialize the msgpack buffer - // The buffer should contain a tuple of arguments (array) matching the bbapi function signature. - // Since bbapi(Command) takes one argument, we expect a 1-element array containing the Command. - auto unpacked = msgpack::unpack(reinterpret_cast(buffer.data()), buffer.size()); - auto obj = unpacked.get(); - - // First, expect an array (the tuple of arguments) - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { - throw_or_abort("Expected an array of size 1 (tuple of arguments) for bbapi command deserialization"); - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& tuple_arr = obj.via.array; - auto& command_obj = tuple_arr.ptr[0]; - - // Now access the Command itself, which should be an array of size 2 [command-name, payload] - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (command_obj.type != msgpack::type::ARRAY || command_obj.via.array.size != 2) { - throw_or_abort("Expected Command to be an array of size 2 [command-name, payload]"); - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& command_arr = command_obj.via.array; - if (command_arr.ptr[0].type != msgpack::type::STR) { - throw_or_abort("Expected first element of Command to be a string (type name)"); - } - - // Convert to Command (which is a NamedUnion) - bb::bbapi::Command command; - command_obj.convert(command); - - // Execute the command - auto response = bbapi::bbapi(std::move(command)); - - // Serialize the response - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); + // Dispatch via generated handler + auto response_bytes = handler(buffer); // Write length-encoded response directly to stdout - uint32_t response_length = static_cast(response_buffer.size()); + uint32_t response_length = static_cast(response_bytes.size()); stdout_stream.write(reinterpret_cast(&response_length), sizeof(response_length)); - stdout_stream.write(response_buffer.data(), static_cast(response_buffer.size())); + stdout_stream.write(reinterpret_cast(response_bytes.data()), + static_cast(response_bytes.size())); stdout_stream.flush(); } @@ -105,46 +73,6 @@ int process_msgpack_commands(std::istream& input_stream) } #if !defined(__wasm__) && !defined(_WIN32) -// Set up platform-specific parent death monitoring -// This ensures the bb process exits when the parent (Node.js) dies -static void setup_parent_death_monitoring() -{ -#ifdef __linux__ - // Linux: Use prctl to request SIGTERM when parent dies - // This is kernel-level and very reliable - if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { - std::cerr << "Warning: Could not set parent death signal" << '\n'; - } -#elif defined(__APPLE__) - // macOS: Use kqueue to monitor parent process - // Spawn a dedicated thread that blocks waiting for parent to exit - pid_t parent_pid = getppid(); - std::thread([parent_pid]() { - int kq = kqueue(); - if (kq == -1) { - std::cerr << "Warning: Could not create kqueue for parent monitoring" << '\n'; - return; - } - - struct kevent change; - EV_SET(&change, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, nullptr); - if (kevent(kq, &change, 1, nullptr, 0, nullptr) == -1) { - std::cerr << "Warning: Could not monitor parent process" << '\n'; - close(kq); - return; - } - - // Block until parent exits - struct kevent event; - kevent(kq, nullptr, 0, &event, 1, nullptr); - - std::cerr << "Parent process exited, shutting down..." << '\n'; - close(kq); - std::exit(0); - }).detach(); -#endif -} - int execute_msgpack_ipc_server(std::unique_ptr server) { // Store server pointer for signal handler cleanup (works for both socket and shared memory) @@ -187,8 +115,14 @@ int execute_msgpack_ipc_server(std::unique_ptr server) (void)std::signal(SIGBUS, fatal_error_handler); (void)std::signal(SIGSEGV, fatal_error_handler); - // Set up parent death monitoring (kills this process when parent dies) - setup_parent_death_monitoring(); + // Parent death monitoring: request shutdown when parent (e.g. Node.js) exits. + // On Linux: SIGTERM is delivered, handled by graceful_shutdown_handler above. + // On macOS: kqueue thread calls request_shutdown() directly. + bb::monitor_parent_process([&server]() { + if (server) { + server->request_shutdown(); + } + }); if (!server->listen()) { std::cerr << "Error: Could not start IPC server" << '\n'; @@ -197,82 +131,14 @@ int execute_msgpack_ipc_server(std::unique_ptr server) std::cerr << "IPC server ready" << '\n'; - // Run server with msgpack handler - server->run([](int client_id, std::span request) -> std::vector { - try { - // Deserialize msgpack command - // The buffer should contain a tuple of arguments (array) matching the bbapi function signature. - // Since bbapi(Command) takes one argument, we expect a 1-element array containing the Command. - auto unpacked = msgpack::unpack(reinterpret_cast(request.data()), request.size()); - auto obj = unpacked.get(); - - // First, expect an array (the tuple of arguments) - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { - std::cerr << "Error: Expected an array of size 1 (tuple of arguments) from client " << client_id - << '\n'; - return {}; // Return empty to skip response - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& tuple_arr = obj.via.array; - auto& command_obj = tuple_arr.ptr[0]; - - // Now access the Command itself, which should be an array of size 2 [command-name, payload] - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (command_obj.type != msgpack::type::ARRAY || command_obj.via.array.size != 2) { - std::cerr << "Error: Expected Command to be an array of size 2 [command-name, payload] from client " - << client_id << '\n'; - return {}; - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& command_arr = command_obj.via.array; - if (command_arr.ptr[0].type != msgpack::type::STR) { - std::cerr << "Error: Expected first element of Command to be a string (type name) from client " - << client_id << '\n'; - return {}; - } - - // Check if this is a Shutdown command - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - std::string command_name(command_arr.ptr[0].via.str.ptr, command_arr.ptr[0].via.str.size); - bool is_shutdown = (command_name == "Shutdown"); - - // Convert to Command and execute - bb::bbapi::Command command; - command_obj.convert(command); - auto response = bbapi::bbapi(std::move(command)); - - // Serialize response - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - std::vector result(response_buffer.data(), response_buffer.data() + response_buffer.size()); - - // If this was a shutdown command, throw exception with response - // This signals the server to send the response and then exit gracefully - if (is_shutdown) { - throw ipc::ShutdownRequested(std::move(result)); - } - - return result; - } catch (const ipc::ShutdownRequested&) { - // Re-throw shutdown request - throw; - } catch (const std::exception& e) { - // Log error to stderr for debugging (goes to log file if logger enabled) - std::cerr << "Error processing request from client " << client_id << ": " << e.what() << '\n'; - std::cerr.flush(); - - // Create error response with exception message - bb::bbapi::ErrorResponse error_response{ .message = std::string(e.what()) }; - bb::bbapi::CommandResponse response = error_response; - - // Serialize and return error response to client - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - return std::vector(response_buffer.data(), response_buffer.data() + response_buffer.size()); - } + // Use generated dispatch handler, adapted for ipc::IpcServer::Handler signature. + // Generated handler: (const vector&) -> vector + // IPC server expects: (int client_id, span) -> vector + static bbapi::BbRequest bb_request; + auto generated_handler = bbapi::make_bb_handler(bb_request); + server->run([&generated_handler](int /*client_id*/, std::span raw_request) -> std::vector { + std::vector request_vec(raw_request.begin(), raw_request.end()); + return generated_handler(request_vec); }); server->close(); diff --git a/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp b/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp index 345b65b02fe1..7e8213f98b77 100644 --- a/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp +++ b/barretenberg/cpp/src/barretenberg/api/api_ultra_honk.cpp @@ -13,7 +13,7 @@ namespace bb { namespace { -void write_vk_outputs(const bbapi::CircuitComputeVk::Response& vk_response, +void write_vk_outputs(const bbapi::BbCircuitComputeVk::Response& vk_response, const std::filesystem::path& output_dir, const API::Flags& flags) { @@ -30,7 +30,7 @@ void write_vk_outputs(const bbapi::CircuitComputeVk::Response& vk_response, } } -void write_proof_outputs(const bbapi::CircuitProve::Response& prove_response, +void write_proof_outputs(const bbapi::BbCircuitProve::Response& prove_response, const std::filesystem::path& output_dir, const API::Flags& flags) { @@ -93,11 +93,11 @@ void UltraHonkAPI::prove(const Flags& flags, } // Prove - auto response = bbapi::CircuitProve{ .circuit = { .name = "circuit", - .bytecode = std::move(bytecode), - .verification_key = std::move(vk_bytes) }, - .witness = std::move(witness), - .settings = std::move(settings) } + auto response = bbapi::BbCircuitProve{ .circuit = { .name = "circuit", + .bytecode = std::move(bytecode), + .verification_key = std::move(vk_bytes) }, + .witness = std::move(witness), + .settings = std::move(settings) } .execute(); write_proof_outputs(response, output_dir, flags); if (flags.write_vk) { @@ -144,10 +144,10 @@ bool UltraHonkAPI::verify(const Flags& flags, .disable_zk = flags.disable_zk }; // Execute verify command - auto response = bbapi::CircuitVerify{ .verification_key = std::move(vk_bytes), - .public_inputs = std::move(public_inputs), - .proof = std::move(proof), - .settings = settings } + auto response = bbapi::BbCircuitVerify{ .verification_key = std::move(vk_bytes), + .public_inputs = std::move(public_inputs), + .proof = std::move(proof), + .settings = settings } .execute(); return response.verified; @@ -179,8 +179,8 @@ void UltraHonkAPI::write_vk(const Flags& flags, .oracle_hash_type = flags.oracle_hash_type, .disable_zk = flags.disable_zk }; - auto response = bbapi::CircuitComputeVk{ .circuit = { .name = "circuit", .bytecode = std::move(bytecode) }, - .settings = settings } + auto response = bbapi::BbCircuitComputeVk{ .circuit = { .name = "circuit", .bytecode = std::move(bytecode) }, + .settings = settings } .execute(); write_vk_outputs(response, output_dir, flags); @@ -202,11 +202,12 @@ void UltraHonkAPI::gates([[maybe_unused]] const Flags& flags, .oracle_hash_type = flags.oracle_hash_type, .disable_zk = flags.disable_zk }; - // Execute CircuitStats command - auto response = bbapi::CircuitStats{ .circuit = { .name = "circuit", .bytecode = bytecode, .verification_key = {} }, - .include_gates_per_opcode = flags.include_gates_per_opcode, - .settings = settings } - .execute(); + // Execute BbCircuitStats command + auto response = + bbapi::BbCircuitStats{ .circuit = { .name = "circuit", .bytecode = bytecode, .verification_key = {} }, + .include_gates_per_opcode = flags.include_gates_per_opcode, + .settings = settings } + .execute(); vinfo("Calculated circuit size in gate_count: ", response.num_gates); @@ -223,7 +224,7 @@ void UltraHonkAPI::gates([[maybe_unused]] const Flags& flags, } } - // For now, we'll use the CircuitStats response which includes circuit statistics + // For now, we'll use the BbCircuitStats response which includes circuit statistics // The num_acir_opcodes is not directly available from bytecode alone auto result_string = format( "{\n \"acir_opcodes\": ", @@ -252,7 +253,8 @@ void UltraHonkAPI::write_solidity_verifier(const Flags& flags, .optimized_solidity_verifier = flags.optimized_solidity_verifier }; // Execute solidity verifier command - auto response = bbapi::CircuitWriteSolidityVerifier{ .verification_key = vk_bytes, .settings = settings }.execute(); + auto response = + bbapi::BbCircuitWriteSolidityVerifier{ .verification_key = vk_bytes, .settings = settings }.execute(); // Write output if (output_path == "-") { diff --git a/barretenberg/cpp/src/barretenberg/api/aztec_process.cpp b/barretenberg/cpp/src/barretenberg/api/aztec_process.cpp index 671f72dfd9a7..8e9cda6e2ada 100644 --- a/barretenberg/cpp/src/barretenberg/api/aztec_process.cpp +++ b/barretenberg/cpp/src/barretenberg/api/aztec_process.cpp @@ -109,7 +109,7 @@ std::vector get_or_generate_cached_vk(const std::filesystem::path& cach // Generate new VK info("Generating verification key: ", hash_str); - auto response = bbapi::ChonkComputeVk{ .circuit = { .name = circuit_name, .bytecode = bytecode } }.execute(); + auto response = bbapi::BbChonkComputeVk{ .circuit = { .name = circuit_name, .bytecode = bytecode } }.execute(); // Cache the VK write_file(vk_cache_path, response.bytes); diff --git a/barretenberg/cpp/src/barretenberg/avm/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/avm/CMakeLists.txt index f88bc12121cf..02cc13404e53 100644 --- a/barretenberg/cpp/src/barretenberg/avm/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/avm/CMakeLists.txt @@ -19,7 +19,7 @@ if(NOT(FUZZING) AND NOT(WASM)) aztec-avm main.cpp cli.cpp - avm_execute.cpp + avm_handlers.cpp avm_ipc_server.cpp ) target_link_libraries( diff --git a/barretenberg/cpp/src/barretenberg/avm/avm_commands.hpp b/barretenberg/cpp/src/barretenberg/avm/avm_commands.hpp deleted file mode 100644 index 9be0968ad4cb..000000000000 --- a/barretenberg/cpp/src/barretenberg/avm/avm_commands.hpp +++ /dev/null @@ -1,68 +0,0 @@ -#pragma once -/** - * @file avm_commands.hpp - * @brief NamedUnion command structs for the aztec-avm simulation API. - * - * Commands use opaque std::vector for inputs/outputs since - * AvmFastSimulationInputs and TxSimulationResult are large, complex types - * with existing msgpack serialization. - */ - -#include "barretenberg/serialize/msgpack.hpp" - -#include -#include -#include - -namespace bb::avm { - -// Forward declaration -struct AvmRequest; - -// --------------------------------------------------------------------------- -// Simulation commands -// --------------------------------------------------------------------------- - -struct AvmSimulate { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulate"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateResponse"; - std::vector result; - SERIALIZATION_FIELDS(result); - bool operator==(const Response&) const = default; - }; - // Msgpack-serialized AvmFastSimulationInputs - std::vector inputs; - SERIALIZATION_FIELDS(inputs); - Response execute(AvmRequest& request) &&; - bool operator==(const AvmSimulate&) const = default; -}; - -struct AvmSimulateWithHints { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateWithHints"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmSimulateWithHintsResponse"; - std::vector result; - SERIALIZATION_FIELDS(result); - bool operator==(const Response&) const = default; - }; - // Msgpack-serialized AvmProvingInputs - std::vector inputs; - SERIALIZATION_FIELDS(inputs); - Response execute(AvmRequest& request) &&; - bool operator==(const AvmSimulateWithHints&) const = default; -}; - -struct AvmShutdown { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmShutdown"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmShutdownResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - void msgpack(auto&& pack_fn) { pack_fn(); } - Response execute(AvmRequest& request) &&; - bool operator==(const AvmShutdown&) const = default; -}; - -} // namespace bb::avm diff --git a/barretenberg/cpp/src/barretenberg/avm/avm_context.hpp b/barretenberg/cpp/src/barretenberg/avm/avm_context.hpp new file mode 100644 index 000000000000..8287416852d9 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/avm/avm_context.hpp @@ -0,0 +1,10 @@ +#pragma once +#include "barretenberg/cdb/cdb_ipc_client.hpp" +#include "barretenberg/wsdb/generated/wsdb_ipc_client.hpp" + +namespace bb::avm { +struct AvmContext { + cdb::CdbIpcContractDB& cdb_client; + wsdb::WsdbIpcClient& wsdb_client; +}; +} // namespace bb::avm diff --git a/barretenberg/cpp/src/barretenberg/avm/avm_execute.hpp b/barretenberg/cpp/src/barretenberg/avm/avm_execute.hpp index a1ad1371b721..101ee85dd0f1 100644 --- a/barretenberg/cpp/src/barretenberg/avm/avm_execute.hpp +++ b/barretenberg/cpp/src/barretenberg/avm/avm_execute.hpp @@ -1,14 +1,13 @@ #pragma once /** * @file avm_execute.hpp - * @brief AvmCommand NamedUnion, AvmRequest context, and dispatch function. + * @brief Umbrella include for AVM command execution. + * + * The AvmContext type (previously AvmRequest) is now defined in avm_handlers.cpp + * as a template specialization detail. */ -#include "barretenberg/avm/avm_commands.hpp" -#include "barretenberg/cdb/cdb_ipc_client.hpp" -#include "barretenberg/common/named_union.hpp" #include "barretenberg/vm2/simulation/lib/cancellation_token.hpp" -#include "barretenberg/wsdb/wsdb_ipc_client_generated.hpp" #include @@ -18,50 +17,4 @@ namespace bb::avm { // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) extern std::atomic g_active_cancellation_token; -/** - * @brief Context passed to each command's execute() method. - * Provides access to WSDB and CDB IPC clients. - */ -struct AvmRequest { - cdb::CdbIpcContractDB& cdb_client; - wsdb::WsdbIpcClient& wsdb_client; -}; - -/** - * @brief Error response returned when a command fails. - */ -struct AvmErrorResponse { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AvmErrorResponse"; - std::string message; - SERIALIZATION_FIELDS(message); - bool operator==(const AvmErrorResponse&) const = default; -}; - -/** - * @brief Union of all AVM commands (request types). - */ -using AvmCommand = NamedUnion; - -/** - * @brief Union of all AVM response types. - */ -using AvmCommandResponse = - NamedUnion; - -/** - * @brief Execute an AVM command using the visitor pattern. - */ -inline AvmCommandResponse execute(AvmRequest& request, AvmCommand&& command) -{ - return std::move(command).visit([&request](auto&& cmd) -> AvmCommandResponse { - using CmdType = std::decay_t; - return std::forward(cmd).execute(request); - }); -} - -/** - * @brief Top-level AVM API entry point. Takes an AvmRequest and dispatches the command. - */ -AvmCommandResponse avm_dispatch(AvmRequest& request, AvmCommand&& command); - } // namespace bb::avm diff --git a/barretenberg/cpp/src/barretenberg/avm/avm_execute.cpp b/barretenberg/cpp/src/barretenberg/avm/avm_handlers.cpp similarity index 72% rename from barretenberg/cpp/src/barretenberg/avm/avm_execute.cpp rename to barretenberg/cpp/src/barretenberg/avm/avm_handlers.cpp index 6e6617300f94..7c72660cbf1c 100644 --- a/barretenberg/cpp/src/barretenberg/avm/avm_execute.cpp +++ b/barretenberg/cpp/src/barretenberg/avm/avm_handlers.cpp @@ -1,5 +1,7 @@ -#include "barretenberg/avm/avm_execute.hpp" +#include "barretenberg/avm/avm_context.hpp" +#include "barretenberg/avm/generated/avm_ipc_server.hpp" #include "barretenberg/avm/wsdb_ipc_merkle_db.hpp" +#include "barretenberg/cdb/cdb_ipc_client.hpp" #include "barretenberg/common/log.hpp" #include "barretenberg/serialize/msgpack.hpp" #include "barretenberg/serialize/msgpack_impl.hpp" @@ -7,12 +9,13 @@ #include "barretenberg/vm2/common/avm_io.hpp" #include "barretenberg/vm2/simulation/lib/cancellation_token.hpp" #include "barretenberg/vm2/simulation_helper.hpp" -#include "barretenberg/wsdb/wsdb_commands.hpp" +#include "barretenberg/wsdb/generated/wsdb_ipc_client.hpp" namespace bb::avm { using namespace bb::avm2; using namespace bb::world_state; +using AvmContext = bb::avm::AvmContext; // Global cancellation token for the currently active simulation. // Set before simulation starts, cleared after. SIGUSR1 handler reads this to cancel. @@ -20,7 +23,7 @@ using namespace bb::world_state; std::atomic g_active_cancellation_token{ nullptr }; // --------------------------------------------------------------------------- -// Helper: serialize a value to msgpack bytes +// Helpers // --------------------------------------------------------------------------- template static std::vector serialize_to_msgpack(const T& value) @@ -39,22 +42,13 @@ template static T deserialize_from_msgpack(const std::vector wire::AvmSimulateResponse handle_simulate(AvmContext& ctx, wire::AvmSimulate&& cmd) { // Deserialize AvmFastSimulationInputs from opaque bytes - auto sim_inputs = deserialize_from_msgpack(inputs); + auto sim_inputs = deserialize_from_msgpack(cmd.inputs); // If a fork ID was provided (block builder's fork), use it directly. // Otherwise create a temporary fork for this simulation. @@ -62,7 +56,7 @@ AvmSimulate::Response AvmSimulate::execute(AvmRequest& request) && uint64_t fork_id = sim_inputs.ws_revision.forkId; if (!use_external_fork) { - auto fork_resp = request.wsdb_client.create_fork(wsdb::WsdbCreateFork{ .latest = true, .blockNumber = 0 }); + auto fork_resp = ctx.wsdb_client.create_fork(wsdb::wire::WsdbCreateFork{ .latest = true, .blockNumber = 0 }); fork_id = fork_resp.forkId; vinfo("Created WSDB fork ", fork_id, " for AVM simulation"); } else { @@ -70,7 +64,7 @@ AvmSimulate::Response AvmSimulate::execute(AvmRequest& request) && } // Route CDB requests to the correct PublicContractsDB via fork ID - request.cdb_client.set_fork_id(fork_id); + ctx.cdb_client.set_fork_id(fork_id); // Create a cancellation token for this simulation and expose it globally // so the SIGUSR1 handler can signal cancellation from TypeScript. @@ -86,20 +80,19 @@ AvmSimulate::Response AvmSimulate::execute(AvmRequest& request) && }; // Create IPC-backed MerkleDB and ContractDB - WsdbIpcMerkleDB merkle_db(request.wsdb_client, revision); + WsdbIpcMerkleDB merkle_db(ctx.wsdb_client, revision); - // Run simulation using the helper that takes raw DB interfaces. - // Route to hint collection or fast path based on config. + // Run simulation AvmSimulationHelper simulation_helper; auto result = sim_inputs.config.collect_hints - ? simulation_helper.simulate_for_hint_collection_internal(request.cdb_client, + ? simulation_helper.simulate_for_hint_collection_internal(ctx.cdb_client, merkle_db, sim_inputs.config, sim_inputs.tx, sim_inputs.global_variables, sim_inputs.protocol_contracts, cancellation_token) - : simulation_helper.simulate_fast_internal(request.cdb_client, + : simulation_helper.simulate_fast_internal(ctx.cdb_client, merkle_db, sim_inputs.config, sim_inputs.tx, @@ -111,17 +104,16 @@ AvmSimulate::Response AvmSimulate::execute(AvmRequest& request) && // Only clean up fork if we created it if (!use_external_fork) { - request.wsdb_client.delete_fork(wsdb::WsdbDeleteFork{ .forkId = fork_id }); + ctx.wsdb_client.delete_fork(wsdb::wire::WsdbDeleteFork{ .forkId = fork_id }); } - return Response{ .result = serialize_to_msgpack(result) }; + return { .result = serialize_to_msgpack(result) }; } catch (...) { g_active_cancellation_token.store(nullptr, std::memory_order_release); - // Only clean up fork on error if we created it if (!use_external_fork) { try { - request.wsdb_client.delete_fork(wsdb::WsdbDeleteFork{ .forkId = fork_id }); + ctx.wsdb_client.delete_fork(wsdb::wire::WsdbDeleteFork{ .forkId = fork_id }); } catch (...) { // Ignore cleanup errors } @@ -130,32 +122,22 @@ AvmSimulate::Response AvmSimulate::execute(AvmRequest& request) && } } -// --------------------------------------------------------------------------- -// AvmSimulateWithHints -// --------------------------------------------------------------------------- - -AvmSimulateWithHints::Response AvmSimulateWithHints::execute(AvmRequest& request) && +template <> +wire::AvmSimulateWithHintsResponse handle_simulate_with_hints(AvmContext& ctx, wire::AvmSimulateWithHints&& cmd) { - (void)request; + (void)ctx; // Deserialize AvmProvingInputs from opaque bytes - auto proving_inputs = deserialize_from_msgpack(inputs); + auto proving_inputs = deserialize_from_msgpack(cmd.inputs); // Run simulation with hinted DBs (self-contained, no external DB needed) AvmSimAPI api; auto result = api.simulate_with_hinted_dbs(proving_inputs); - return Response{ .result = serialize_to_msgpack(result) }; + return { .result = serialize_to_msgpack(result) }; } -// --------------------------------------------------------------------------- -// AvmShutdown -// --------------------------------------------------------------------------- - -AvmShutdown::Response AvmShutdown::execute(AvmRequest& request) && -{ - (void)request; - return Response{}; -} +// Explicit instantiation of the dispatch handler for AvmContext +template ::ipc::Handler make_avm_handler(AvmContext& ctx); } // namespace bb::avm diff --git a/barretenberg/cpp/src/barretenberg/avm/avm_ipc_server.cpp b/barretenberg/cpp/src/barretenberg/avm/avm_ipc_server.cpp index 8a4a264ec83f..f795a05a86f9 100644 --- a/barretenberg/cpp/src/barretenberg/avm/avm_ipc_server.cpp +++ b/barretenberg/cpp/src/barretenberg/avm/avm_ipc_server.cpp @@ -1,65 +1,31 @@ #include "barretenberg/avm/avm_ipc_server.hpp" #include "barretenberg/avm/avm_execute.hpp" +#include "barretenberg/avm/generated/avm_ipc_server.hpp" +#include "barretenberg/common/try_catch_shim.hpp" + +#include "barretenberg/avm/avm_context.hpp" +using bb::avm::AvmContext; +extern template ::ipc::Handler bb::avm::make_avm_handler(AvmContext& ctx); + #include "barretenberg/cdb/cdb_ipc_client.hpp" #include "barretenberg/common/log.hpp" -#include "barretenberg/ipc/ipc_server.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/wsdb/wsdb_ipc_client_generated.hpp" +#include "barretenberg/common/parent_monitor.hpp" +#include "barretenberg/wsdb/generated/wsdb_ipc_client.hpp" +#include #include #include #include #include #include #include -#include #include -#ifdef __linux__ -#include -#elif defined(__APPLE__) -#include -#endif - namespace bb::avm { -// --------------------------------------------------------------------------- -// Platform-specific parent death monitoring -// --------------------------------------------------------------------------- - -static void setup_parent_death_monitoring() -{ -#ifdef __linux__ - if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { - std::cerr << "Warning: Could not set parent death signal" << '\n'; - } -#elif defined(__APPLE__) - pid_t parent_pid = getppid(); - std::thread([parent_pid]() { - int kq = kqueue(); - if (kq == -1) { - std::cerr << "Warning: Could not create kqueue for parent monitoring" << '\n'; - return; - } - struct kevent change; - EV_SET(&change, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, nullptr); - if (kevent(kq, &change, 1, nullptr, 0, nullptr) == -1) { - std::cerr << "Warning: Could not monitor parent process" << '\n'; - close(kq); - return; - } - struct kevent event; - kevent(kq, nullptr, 0, &event, 1, nullptr); - std::cerr << "Parent process exited, shutting down..." << '\n'; - close(kq); - std::exit(0); - }).detach(); -#endif -} - -// --------------------------------------------------------------------------- -// IPC server execution -// --------------------------------------------------------------------------- +// Forward declaration — defined in avm_handlers.cpp +#include "barretenberg/avm/avm_context.hpp" +using bb::avm::AvmContext; int execute_avm_server(const std::string& input_path, const std::string& wsdb_path, const std::string& cdb_path) { @@ -99,37 +65,14 @@ int execute_avm_server(const std::string& input_path, const std::string& wsdb_pa } } - AvmRequest request{ .cdb_client = *cdb_client, .wsdb_client = *wsdb_client }; + AvmContext ctx{ .cdb_client = *cdb_client, .wsdb_client = *wsdb_client }; - // Create IPC server - std::unique_ptr server; - - if (input_path.size() >= 5 && input_path.substr(input_path.size() - 5) == ".sock") { - server = ipc::IpcServer::create_socket(input_path, 1); - std::cerr << "Socket server at " << input_path << '\n'; - } else { - std::cerr << "Error: --input path must end with .sock" << '\n'; - return 1; - } - - // Set up signal handlers - static ipc::IpcServer* global_server = server.get(); - - auto graceful_shutdown_handler = [](int signal) { - std::cerr << "\nReceived signal " << signal << ", shutting down gracefully..." << '\n'; - if (global_server) { - global_server->request_shutdown(); - } - }; - - auto fatal_error_handler = [](int signal) { - const char* signal_name = (signal == SIGBUS) ? "SIGBUS" : (signal == SIGSEGV) ? "SIGSEGV" : "UNKNOWN"; - std::cerr << "\nFatal error: received " << signal_name << '\n'; - if (global_server) { - global_server->close(); - } - std::exit(1); - }; + // Signal handling + static std::atomic shutdown_flag{ false }; + auto signal_handler = [](int) { shutdown_flag.store(true, std::memory_order_release); }; + std::signal(SIGTERM, signal_handler); + std::signal(SIGINT, signal_handler); + std::signal(SIGPIPE, SIG_IGN); // SIGUSR1 cancels the active simulation without killing the process. // TypeScript sends this signal when a tx exceeds its deadline. @@ -139,90 +82,14 @@ int execute_avm_server(const std::string& input_path, const std::string& wsdb_pa token->cancel(); } }; + std::signal(SIGUSR1, cancel_simulation_handler); - (void)std::signal(SIGTERM, graceful_shutdown_handler); - (void)std::signal(SIGINT, graceful_shutdown_handler); - (void)std::signal(SIGUSR1, cancel_simulation_handler); - (void)std::signal(SIGBUS, fatal_error_handler); - (void)std::signal(SIGSEGV, fatal_error_handler); - - setup_parent_death_monitoring(); - - if (!server->listen()) { - std::cerr << "Error: Could not start IPC server" << '\n'; - return 1; - } - - std::cerr << "aztec-avm IPC server ready" << '\n'; - - // Run server with AVM command handler - server->run([&request](int client_id, std::span raw_request) -> std::vector { - try { - // Deserialize msgpack command - auto unpacked = msgpack::unpack(reinterpret_cast(raw_request.data()), raw_request.size()); - auto obj = unpacked.get(); - - // Expect array of size 1 (tuple wrapping) - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { - std::cerr << "Error: Expected array of size 1 from client " << client_id << '\n'; - return {}; - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& command_obj = obj.via.array.ptr[0]; - - // Check for shutdown before converting - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (command_obj.type == msgpack::type::ARRAY && command_obj.via.array.size == 2 && - command_obj.via.array.ptr[0].type == msgpack::type::STR) { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - std::string_view command_name(command_obj.via.array.ptr[0].via.str.ptr, - command_obj.via.array.ptr[0].via.str.size); - bool is_shutdown = (command_name == "AvmShutdown"); - - // Convert and execute - AvmCommand command; - command_obj.convert(command); - auto response = avm_dispatch(request, std::move(command)); - - // Serialize response - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - std::vector result(response_buffer.data(), response_buffer.data() + response_buffer.size()); - - if (is_shutdown) { - throw ipc::ShutdownRequested(std::move(result)); - } - - return result; - } - - // Fallback: try converting directly - AvmCommand command; - command_obj.convert(command); - auto response = avm_dispatch(request, std::move(command)); - - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - return std::vector(response_buffer.data(), response_buffer.data() + response_buffer.size()); - - } catch (const ipc::ShutdownRequested&) { - throw; - } catch (const std::exception& e) { - std::cerr << "Error processing request from client " << client_id << ": " << e.what() << '\n'; - std::cerr.flush(); - - AvmErrorResponse error_response{ .message = std::string(e.what()) }; - AvmCommandResponse response = error_response; - - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - return std::vector(response_buffer.data(), response_buffer.data() + response_buffer.size()); - } - }); + // Parent death monitoring (SIGTERM on Linux, kqueue on macOS) + bb::monitor_parent_process(shutdown_flag); - server->close(); + // Run server using generated dispatch. + std::cerr << "aztec-avm IPC server starting on " << input_path << '\n'; + ::ipc::serve(input_path.c_str(), make_avm_handler(ctx), &shutdown_flag); return 0; } diff --git a/barretenberg/cpp/src/barretenberg/avm/cli.cpp b/barretenberg/cpp/src/barretenberg/avm/cli.cpp index d9ac0aa1519e..848dc2804c06 100644 --- a/barretenberg/cpp/src/barretenberg/avm/cli.cpp +++ b/barretenberg/cpp/src/barretenberg/avm/cli.cpp @@ -1,9 +1,6 @@ #include "barretenberg/avm/cli.hpp" -#include "barretenberg/avm/avm_execute.hpp" #include "barretenberg/avm/avm_ipc_server.hpp" #include "barretenberg/common/log.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/serialize/msgpack_impl.hpp" #include "barretenberg/bb/deps/cli11.hpp" #include @@ -11,36 +8,15 @@ namespace bb::avm { -namespace { - -struct AvmApi { - AvmCommand commands; - AvmCommandResponse responses; - SERIALIZATION_FIELDS(commands, responses); -}; - -std::string get_avm_schema_as_json() -{ - return msgpack_schema_to_string(AvmApi{}); -} - -} // namespace - int parse_and_run_avm(int argc, char* argv[]) { CLI::App app{ "aztec-avm: Standalone AVM simulator server" }; app.require_subcommand(1); // ----------------------------------------------------------------------- - // Subcommand: msgpack + // Subcommand: msgpack run // ----------------------------------------------------------------------- CLI::App* msgpack_command = app.add_subcommand("msgpack", "Msgpack API interface."); - - // msgpack schema - CLI::App* msgpack_schema_command = - msgpack_command->add_subcommand("schema", "Output a msgpack schema encoded as JSON to stdout."); - - // msgpack run CLI::App* msgpack_run_command = msgpack_command->add_subcommand("run", "Start the AVM simulator IPC server."); std::string input_path; @@ -60,11 +36,6 @@ int parse_and_run_avm(int argc, char* argv[]) } try { - if (msgpack_schema_command->parsed()) { - std::cout << get_avm_schema_as_json() << std::endl; - return 0; - } - if (msgpack_run_command->parsed()) { return execute_avm_server(input_path, wsdb_path, cdb_path); } diff --git a/barretenberg/cpp/src/barretenberg/avm/wsdb_ipc_merkle_db.cpp b/barretenberg/cpp/src/barretenberg/avm/wsdb_ipc_merkle_db.cpp index 46c4209dd8df..746b902c65e2 100644 --- a/barretenberg/cpp/src/barretenberg/avm/wsdb_ipc_merkle_db.cpp +++ b/barretenberg/cpp/src/barretenberg/avm/wsdb_ipc_merkle_db.cpp @@ -3,7 +3,8 @@ #include "barretenberg/serialize/msgpack.hpp" #include "barretenberg/serialize/msgpack_impl.hpp" #include "barretenberg/vm2/common/aztec_constants.hpp" -#include "barretenberg/wsdb/wsdb_commands.hpp" + +#include namespace bb::avm { @@ -11,6 +12,50 @@ namespace bb::avm { // imports crypto::merkle_tree which conflicts with avm2::simulation aliases). using namespace avm2::simulation; +// --------------------------------------------------------------------------- +// Wire <-> Domain conversion helpers +// --------------------------------------------------------------------------- + +namespace { + +inline ::Fr fr_to_wire(const bb::fr& d) +{ + ::Fr r; + bb::fr::serialize_to_buffer(d, r.data()); + return r; +} + +inline bb::fr fr_from_wire(const ::Fr& w) +{ + return bb::fr::serialize_from_buffer(w.data()); +} + +inline std::vector fr_vec_from_wire(const std::vector<::Fr>& wire) +{ + std::vector result; + result.reserve(wire.size()); + for (const auto& w : wire) { + result.push_back(fr_from_wire(w)); + } + return result; +} + +inline wsdb::wire::WorldStateRevision revision_to_wire(const world_state::WorldStateRevision& r) +{ + return wsdb::wire::WorldStateRevision{ + .forkId = r.forkId, + .blockNumber = r.blockNumber, + .includeUncommitted = r.includeUncommitted, + }; +} + +inline uint32_t tree_id_to_wire(MerkleTreeId id) +{ + return static_cast(id); +} + +} // anonymous namespace + // --------------------------------------------------------------------------- // Helpers // --------------------------------------------------------------------------- @@ -49,24 +94,26 @@ avm2::TreeSnapshots WsdbIpcMerkleDB::get_tree_roots() const return cached_tree_roots_.value(); } + auto wire_rev = revision_to_wire(revision_); + auto l1_info = client_.get_tree_info( - wsdb::WsdbGetTreeInfo{ .treeId = MerkleTreeId::L1_TO_L2_MESSAGE_TREE, .revision = revision_ }); - auto nh_info = - client_.get_tree_info(wsdb::WsdbGetTreeInfo{ .treeId = MerkleTreeId::NOTE_HASH_TREE, .revision = revision_ }); - auto null_info = - client_.get_tree_info(wsdb::WsdbGetTreeInfo{ .treeId = MerkleTreeId::NULLIFIER_TREE, .revision = revision_ }); - auto pd_info = - client_.get_tree_info(wsdb::WsdbGetTreeInfo{ .treeId = MerkleTreeId::PUBLIC_DATA_TREE, .revision = revision_ }); + wsdb::WsdbGetTreeInfo{ .treeId = tree_id_to_wire(MerkleTreeId::L1_TO_L2_MESSAGE_TREE), .revision = wire_rev }); + auto nh_info = client_.get_tree_info( + wsdb::WsdbGetTreeInfo{ .treeId = tree_id_to_wire(MerkleTreeId::NOTE_HASH_TREE), .revision = wire_rev }); + auto null_info = client_.get_tree_info( + wsdb::WsdbGetTreeInfo{ .treeId = tree_id_to_wire(MerkleTreeId::NULLIFIER_TREE), .revision = wire_rev }); + auto pd_info = client_.get_tree_info( + wsdb::WsdbGetTreeInfo{ .treeId = tree_id_to_wire(MerkleTreeId::PUBLIC_DATA_TREE), .revision = wire_rev }); avm2::TreeSnapshots snapshots{ - .l1_to_l2_message_tree = - avm2::AppendOnlyTreeSnapshot{ .root = l1_info.root, .next_available_leaf_index = l1_info.size }, - .note_hash_tree = - avm2::AppendOnlyTreeSnapshot{ .root = nh_info.root, .next_available_leaf_index = nh_info.size }, - .nullifier_tree = - avm2::AppendOnlyTreeSnapshot{ .root = null_info.root, .next_available_leaf_index = null_info.size }, - .public_data_tree = - avm2::AppendOnlyTreeSnapshot{ .root = pd_info.root, .next_available_leaf_index = pd_info.size }, + .l1_to_l2_message_tree = avm2::AppendOnlyTreeSnapshot{ .root = fr_from_wire(l1_info.root), + .next_available_leaf_index = l1_info.size }, + .note_hash_tree = avm2::AppendOnlyTreeSnapshot{ .root = fr_from_wire(nh_info.root), + .next_available_leaf_index = nh_info.size }, + .nullifier_tree = avm2::AppendOnlyTreeSnapshot{ .root = fr_from_wire(null_info.root), + .next_available_leaf_index = null_info.size }, + .public_data_tree = avm2::AppendOnlyTreeSnapshot{ .root = fr_from_wire(pd_info.root), + .next_available_leaf_index = pd_info.size }, }; cached_tree_roots_ = snapshots; return snapshots; @@ -83,22 +130,23 @@ void WsdbIpcMerkleDB::invalidate_tree_roots_cache() SiblingPath WsdbIpcMerkleDB::get_sibling_path(MerkleTreeId tree_id, index_t leaf_index) const { - auto resp = client_.get_sibling_path( - wsdb::WsdbGetSiblingPath{ .treeId = tree_id, .revision = revision_, .leafIndex = leaf_index }); - return resp.path; + auto resp = client_.get_sibling_path(wsdb::WsdbGetSiblingPath{ + .treeId = tree_id_to_wire(tree_id), .revision = revision_to_wire(revision_), .leafIndex = leaf_index }); + return fr_vec_from_wire(resp.path); } crypto::merkle_tree::GetLowIndexedLeafResponse WsdbIpcMerkleDB::get_low_indexed_leaf(MerkleTreeId tree_id, const avm2::FF& value) const { - auto resp = client_.find_low_leaf(wsdb::WsdbFindLowLeaf{ .treeId = tree_id, .revision = revision_, .key = value }); + auto resp = client_.find_low_leaf(wsdb::WsdbFindLowLeaf{ + .treeId = tree_id_to_wire(tree_id), .revision = revision_to_wire(revision_), .key = fr_to_wire(value) }); return GetLowIndexedLeafResponse(resp.alreadyPresent, resp.index); } avm2::FF WsdbIpcMerkleDB::get_leaf_value(MerkleTreeId tree_id, index_t leaf_index) const { - auto resp = client_.get_leaf_value( - wsdb::WsdbGetLeafValue{ .treeId = tree_id, .revision = revision_, .leafIndex = leaf_index }); + auto resp = client_.get_leaf_value(wsdb::WsdbGetLeafValue{ + .treeId = tree_id_to_wire(tree_id), .revision = revision_to_wire(revision_), .leafIndex = leaf_index }); if (!resp.value.has_value()) { throw std::runtime_error("Invalid get_leaf_value request for tree " + std::to_string(static_cast(tree_id)) + " index " + @@ -109,8 +157,10 @@ avm2::FF WsdbIpcMerkleDB::get_leaf_value(MerkleTreeId tree_id, index_t leaf_inde IndexedLeaf WsdbIpcMerkleDB::get_leaf_preimage_public_data_tree(index_t leaf_index) const { - auto resp = client_.get_leaf_preimage(wsdb::WsdbGetLeafPreimage{ - .treeId = MerkleTreeId::PUBLIC_DATA_TREE, .revision = revision_, .leafIndex = leaf_index }); + auto resp = + client_.get_leaf_preimage(wsdb::WsdbGetLeafPreimage{ .treeId = tree_id_to_wire(MerkleTreeId::PUBLIC_DATA_TREE), + .revision = revision_to_wire(revision_), + .leafIndex = leaf_index }); if (!resp.preimage.has_value()) { throw std::runtime_error("Invalid get_leaf_preimage_public_data_tree request for index " + std::to_string(leaf_index)); @@ -120,8 +170,10 @@ IndexedLeaf WsdbIpcMerkleDB::get_leaf_preimage_public_data_ IndexedLeaf WsdbIpcMerkleDB::get_leaf_preimage_nullifier_tree(index_t leaf_index) const { - auto resp = client_.get_leaf_preimage(wsdb::WsdbGetLeafPreimage{ - .treeId = MerkleTreeId::NULLIFIER_TREE, .revision = revision_, .leafIndex = leaf_index }); + auto resp = + client_.get_leaf_preimage(wsdb::WsdbGetLeafPreimage{ .treeId = tree_id_to_wire(MerkleTreeId::NULLIFIER_TREE), + .revision = revision_to_wire(revision_), + .leafIndex = leaf_index }); if (!resp.preimage.has_value()) { throw std::runtime_error("Invalid get_leaf_preimage_nullifier_tree request for index " + std::to_string(leaf_index)); @@ -137,8 +189,10 @@ SequentialInsertionResult WsdbIpcMerkleDB::insert_indexed_l const PublicDataLeafValue& leaf_value) { std::vector> serialized_leaves = { serialize_to_msgpack(leaf_value) }; - auto resp = client_.sequential_insert(wsdb::WsdbSequentialInsert{ - .treeId = MerkleTreeId::PUBLIC_DATA_TREE, .leaves = std::move(serialized_leaves), .forkId = revision_.forkId }); + auto resp = + client_.sequential_insert(wsdb::WsdbSequentialInsert{ .treeId = tree_id_to_wire(MerkleTreeId::PUBLIC_DATA_TREE), + .leaves = std::move(serialized_leaves), + .forkId = revision_.forkId }); invalidate_tree_roots_cache(); return deserialize_from_msgpack>(resp.result); } @@ -147,8 +201,10 @@ SequentialInsertionResult WsdbIpcMerkleDB::insert_indexed_le const NullifierLeafValue& leaf_value) { std::vector> serialized_leaves = { serialize_to_msgpack(leaf_value) }; - auto resp = client_.sequential_insert(wsdb::WsdbSequentialInsert{ - .treeId = MerkleTreeId::NULLIFIER_TREE, .leaves = std::move(serialized_leaves), .forkId = revision_.forkId }); + auto resp = + client_.sequential_insert(wsdb::WsdbSequentialInsert{ .treeId = tree_id_to_wire(MerkleTreeId::NULLIFIER_TREE), + .leaves = std::move(serialized_leaves), + .forkId = revision_.forkId }); invalidate_tree_roots_cache(); return deserialize_from_msgpack>(resp.result); } @@ -161,7 +217,7 @@ void WsdbIpcMerkleDB::append_leaves(MerkleTreeId tree_id, std::span #include diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp index 644192ee7185..5a6b023cca90 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi.test.cpp @@ -2,50 +2,42 @@ #include "barretenberg/api/file_io.hpp" #include "barretenberg/bbapi/bbapi_crypto.hpp" #include "barretenberg/bbapi/bbapi_shared.hpp" +#include "barretenberg/bbapi/generated/bb_types.hpp" #include "barretenberg/chonk/private_execution_steps.hpp" #include "barretenberg/common/assert.hpp" #include "barretenberg/common/serialize.hpp" -#include "barretenberg/common/utils.hpp" +#include "barretenberg/flavor/flavor.hpp" #include "barretenberg/serialize/test_helper.hpp" -#include "msgpack/v3/sbuffer_decl.hpp" #include using namespace bb; +using namespace bb::bbapi::wire; -// Template for testing roundtrip serialization -template class BBApiSerializationTest : public ::testing::Test {}; - -// Enumerate each command type -using Commands = ::testing::Types; - -// Typed test suites +// Template for testing roundtrip serialization of wire types template class BBApiMsgpack : public ::testing::Test {}; +// Enumerate wire command types (these have SERIALIZATION_FIELDS for msgpack roundtrip) +using Commands = ::testing::Types; + TYPED_TEST_SUITE(BBApiMsgpack, Commands); -// Test roundtrip serialization for UltraHonk commands TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip) { TypeParam command{}; auto [actual_command, expected_command] = msgpack_roundtrip(command); EXPECT_EQ(actual_command, expected_command); - - typename TypeParam::Response response{}; - auto [actual_response, expected_response] = msgpack_roundtrip(response); - EXPECT_EQ(actual_response, expected_response); - std::cout << msgpack_schema_to_string(command) << " " << msgpack_schema_to_string(response) << std::endl; } // Regression tests for input validation at API boundaries. @@ -53,7 +45,7 @@ TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip) TEST(BBApiInputValidation, NonCanonicalPublicInputRejected) { - using Flavor = UltraFlavor; + using Flavor = bb::UltraFlavor; // A value >= BN254 scalar field modulus should be rejected uint256_t non_canonical = fr::modulus + 1; std::vector bad_public_inputs = { non_canonical }; @@ -64,7 +56,7 @@ TEST(BBApiInputValidation, NonCanonicalPublicInputRejected) TEST(BBApiInputValidation, NonCanonicalProofElementRejected) { - using Flavor = UltraFlavor; + using Flavor = bb::UltraFlavor; // The modulus itself is non-canonical (valid range is [0, modulus)) uint256_t non_canonical = fr::modulus; std::vector public_inputs = { uint256_t(42) }; @@ -75,7 +67,7 @@ TEST(BBApiInputValidation, NonCanonicalProofElementRejected) TEST(BBApiInputValidation, CanonicalValuesAccepted) { - using Flavor = UltraFlavor; + using Flavor = bb::UltraFlavor; // modulus - 1 is the largest canonical value uint256_t max_canonical = fr::modulus - 1; std::vector public_inputs = { uint256_t(0), max_canonical }; @@ -193,28 +185,28 @@ TEST(BBApiInputValidation, MsgpackLoadRejectsTrailingData) // encrypt zero-padded tail bytes. TEST(BBApiInputValidation, AesEncryptRejectsLengthMismatch) { - bbapi::BBApiRequest request{}; - bbapi::AesEncrypt cmd{ .plaintext = std::vector(16, 0), .iv = {}, .key = {}, .length = 32 }; + bbapi::BbRequest request{}; + bbapi::BbAesEncrypt cmd{ .plaintext = std::vector(16, 0), .iv = {}, .key = {}, .length = 32 }; EXPECT_THROW_OR_ABORT(std::move(cmd).execute(request), ".*length must equal plaintext.*"); } TEST(BBApiInputValidation, AesEncryptRejectsNonBlockAlignedLength) { - bbapi::BBApiRequest request{}; - bbapi::AesEncrypt cmd{ .plaintext = std::vector(17, 0), .iv = {}, .key = {}, .length = 17 }; + bbapi::BbRequest request{}; + bbapi::BbAesEncrypt cmd{ .plaintext = std::vector(17, 0), .iv = {}, .key = {}, .length = 17 }; EXPECT_THROW_OR_ABORT(std::move(cmd).execute(request), ".*multiple of 16.*"); } TEST(BBApiInputValidation, AesDecryptRejectsLengthMismatch) { - bbapi::BBApiRequest request{}; - bbapi::AesDecrypt cmd{ .ciphertext = std::vector(16, 0), .iv = {}, .key = {}, .length = 32 }; + bbapi::BbRequest request{}; + bbapi::BbAesDecrypt cmd{ .ciphertext = std::vector(16, 0), .iv = {}, .key = {}, .length = 32 }; EXPECT_THROW_OR_ABORT(std::move(cmd).execute(request), ".*length must equal ciphertext.*"); } TEST(BBApiInputValidation, AesDecryptRejectsNonBlockAlignedLength) { - bbapi::BBApiRequest request{}; - bbapi::AesDecrypt cmd{ .ciphertext = std::vector(17, 0), .iv = {}, .key = {}, .length = 17 }; + bbapi::BbRequest request{}; + bbapi::BbAesDecrypt cmd{ .ciphertext = std::vector(17, 0), .iv = {}, .key = {}, .length = 17 }; EXPECT_THROW_OR_ABORT(std::move(cmd).execute(request), ".*multiple of 16.*"); } diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.cpp index 73a0012cb873..91c98b42bc4d 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.cpp @@ -23,9 +23,9 @@ namespace bb::bbapi { -ChonkStart::Response ChonkStart::execute(BBApiRequest& request) && +BbChonkStart::Response BbChonkStart::execute(BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); request.ivc_in_progress = std::make_shared(num_circuits); request.ivc_stack_depth = 0; @@ -39,31 +39,31 @@ ChonkStart::Response ChonkStart::execute(BBApiRequest& request) && return Response{}; } -ChonkLoad::Response ChonkLoad::execute(BBApiRequest& request) && +BbChonkLoad::Response BbChonkLoad::execute(BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); if (!request.ivc_in_progress) { - throw_or_abort("Chonk not started. Call ChonkStart first."); + throw_or_abort("Chonk not started. Call BbChonkStart first."); } request.loaded_circuit_name = circuit.name; request.loaded_circuit_constraints = acir_format::circuit_buf_to_acir_format(std::move(circuit.bytecode)); request.loaded_circuit_vk = circuit.verification_key; - info("ChonkLoad - loaded circuit '", request.loaded_circuit_name, "'"); + info("BbChonkLoad - loaded circuit '", request.loaded_circuit_name, "'"); return Response{}; } -ChonkAccumulate::Response ChonkAccumulate::execute(BBApiRequest& request) && +BbChonkAccumulate::Response BbChonkAccumulate::execute(BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); if (!request.ivc_in_progress) { - throw_or_abort("Chonk not started. Call ChonkStart first."); + throw_or_abort("Chonk not started. Call BbChonkStart first."); } if (!request.loaded_circuit_constraints.has_value()) { - throw_or_abort("No circuit loaded. Call ChonkLoad first."); + throw_or_abort("No circuit loaded. Call BbChonkLoad first."); } acir_format::WitnessVector witness_data = acir_format::witness_buf_to_witness_vector(std::move(witness)); @@ -105,7 +105,7 @@ ChonkAccumulate::Response ChonkAccumulate::execute(BBApiRequest& request) && throw_or_abort("Invalid VK policy. Valid options: default, check, recompute"); } - info("ChonkAccumulate - accumulating circuit '", circuit_name, "'"); + info("BbChonkAccumulate - accumulating circuit '", circuit_name, "'"); if (detail::use_memory_profile) { detail::GLOBAL_MEMORY_PROFILE.set_circuit_name(circuit_name); } @@ -115,31 +115,31 @@ ChonkAccumulate::Response ChonkAccumulate::execute(BBApiRequest& request) && return Response{}; } -ChonkProve::Response ChonkProve::execute(BBApiRequest& request) && +BbChonkProve::Response BbChonkProve::execute(BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); if (!request.ivc_in_progress) { - throw_or_abort("Chonk not started. Call ChonkStart first."); + throw_or_abort("Chonk not started. Call BbChonkStart first."); } if (request.ivc_stack_depth == 0) { - throw_or_abort("No circuits accumulated. Call ChonkAccumulate first."); + throw_or_abort("No circuits accumulated. Call BbChonkAccumulate first."); } - info("ChonkProve - generating proof for ", request.ivc_stack_depth, " accumulated circuits"); + info("BbChonkProve - generating proof for ", request.ivc_stack_depth, " accumulated circuits"); // Call prove and verify using the appropriate IVC type Response response; bool verification_passed = false; - info("ChonkProve - using Chonk"); + info("BbChonkProve - using Chonk"); auto chonk = std::dynamic_pointer_cast(request.ivc_in_progress); auto proof = chonk->prove(); auto vk_and_hash = chonk->get_hiding_kernel_vk_and_hash(); // We verify this proof. Another bb call to verify has some overhead of loading VK/proof/SRS, // and it is mysterious if this transaction fails later in the lifecycle. - info("ChonkProve - verifying the generated proof as a sanity check"); + info("BbChonkProve - verifying the generated proof as a sanity check"); ChonkNativeVerifier verifier(vk_and_hash); verification_passed = verifier.verify(proof); @@ -155,9 +155,9 @@ ChonkProve::Response ChonkProve::execute(BBApiRequest& request) && return response; } -ChonkVerify::Response ChonkVerify::execute(const BBApiRequest& /*request*/) && +BbChonkVerify::Response BbChonkVerify::execute(const BbRequest& /*request*/) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); using VerificationKey = Chonk::MegaVerificationKey; validate_vk_size(vk); @@ -169,8 +169,8 @@ ChonkVerify::Response ChonkVerify::execute(const BBApiRequest& /*request*/) && const size_t expected_proof_size = static_cast(hiding_kernel_vk->num_public_inputs) + ChonkProof::PROOF_LENGTH_WITHOUT_PUB_INPUTS; if (proof.size() != expected_proof_size) { - throw_or_abort("ChonkVerify: proof has wrong size: expected " + std::to_string(expected_proof_size) + ", got " + - std::to_string(proof.size())); + throw_or_abort("BbChonkVerify: proof has wrong size: expected " + std::to_string(expected_proof_size) + + ", got " + std::to_string(proof.size())); } // Verify the proof using ChonkNativeVerifier @@ -181,16 +181,16 @@ ChonkVerify::Response ChonkVerify::execute(const BBApiRequest& /*request*/) && return { .valid = verified }; } -ChonkBatchVerify::Response ChonkBatchVerify::execute(const BBApiRequest& /*request*/) && +BbChonkBatchVerify::Response BbChonkBatchVerify::execute(const BbRequest& /*request*/) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); if (proofs.size() != vks.size()) { - throw_or_abort("ChonkBatchVerify: proofs.size() (" + std::to_string(proofs.size()) + ") != vks.size() (" + + throw_or_abort("BbChonkBatchVerify: proofs.size() (" + std::to_string(proofs.size()) + ") != vks.size() (" + std::to_string(vks.size()) + ")"); } if (proofs.empty()) { - throw_or_abort("ChonkBatchVerify: no proofs provided"); + throw_or_abort("BbChonkBatchVerify: no proofs provided"); } using VerificationKey = Chonk::MegaVerificationKey; @@ -208,7 +208,7 @@ ChonkBatchVerify::Response ChonkBatchVerify::execute(const BBApiRequest& /*reque const size_t expected_proof_size = static_cast(hiding_kernel_vk->num_public_inputs) + ChonkProof::PROOF_LENGTH_WITHOUT_PUB_INPUTS; if (proofs[i].size() != expected_proof_size) { - throw_or_abort("ChonkBatchVerify: proof[" + std::to_string(i) + "] has wrong size: expected " + + throw_or_abort("BbChonkBatchVerify: proof[" + std::to_string(i) + "] has wrong size: expected " + std::to_string(expected_proof_size) + ", got " + std::to_string(proofs[i].size())); } @@ -237,10 +237,10 @@ static std::shared_ptr get_acir_program_prover_instance(a return std::make_shared(builder); } -ChonkComputeVk::Response ChonkComputeVk::execute([[maybe_unused]] const BBApiRequest& request) && +BbChonkComputeVk::Response BbChonkComputeVk::execute([[maybe_unused]] const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); - info("ChonkComputeVk - deriving MegaVerificationKey for circuit '", circuit.name, "'"); + BB_BENCH_NAME(__func__); + info("BbChonkComputeVk - deriving MegaVerificationKey for circuit '", circuit.name, "'"); auto constraint_system = acir_format::circuit_buf_to_acir_format(std::move(circuit.bytecode)); @@ -248,14 +248,14 @@ ChonkComputeVk::Response ChonkComputeVk::execute([[maybe_unused]] const BBApiReq std::shared_ptr prover_instance = get_acir_program_prover_instance(program); auto verification_key = std::make_shared(prover_instance->get_precomputed()); - info("ChonkComputeVk - VK derived, size: ", to_buffer(*verification_key).size(), " bytes"); + info("BbChonkComputeVk - VK derived, size: ", to_buffer(*verification_key).size(), " bytes"); return { .bytes = to_buffer(*verification_key), .fields = verification_key->to_field_elements() }; } -ChonkCheckPrecomputedVk::Response ChonkCheckPrecomputedVk::execute([[maybe_unused]] const BBApiRequest& request) && +BbChonkCheckPrecomputedVk::Response BbChonkCheckPrecomputedVk::execute([[maybe_unused]] const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); acir_format::AcirProgram program{ acir_format::circuit_buf_to_acir_format(std::move(circuit.bytecode)), /*witness=*/{} }; @@ -281,9 +281,9 @@ ChonkCheckPrecomputedVk::Response ChonkCheckPrecomputedVk::execute([[maybe_unuse return response; } -ChonkStats::Response ChonkStats::execute([[maybe_unused]] BBApiRequest& request) && +BbChonkStats::Response BbChonkStats::execute([[maybe_unused]] BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); Response response; const auto constraint_system = acir_format::circuit_buf_to_acir_format(std::move(circuit.bytecode)); @@ -313,7 +313,7 @@ ChonkStats::Response ChonkStats::execute([[maybe_unused]] BBApiRequest& request) } // Log circuit details - info("ChonkStats - circuit: ", + info("BbChonkStats - circuit: ", circuit.name, ", acir_opcodes: ", response.acir_opcodes, @@ -326,15 +326,15 @@ ChonkStats::Response ChonkStats::execute([[maybe_unused]] BBApiRequest& request) return response; } -ChonkCompressProof::Response ChonkCompressProof::execute(const BBApiRequest& /*request*/) && +BbChonkCompressProof::Response BbChonkCompressProof::execute(const BbRequest& /*request*/) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); return { .compressed_proof = ProofCompressor::compress_chonk_proof(proof) }; } -ChonkDecompressProof::Response ChonkDecompressProof::execute(const BBApiRequest& /*request*/) && +BbChonkDecompressProof::Response BbChonkDecompressProof::execute(const BbRequest& /*request*/) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); size_t mega_num_pub = ProofCompressor::compressed_mega_num_public_inputs(compressed_proof.size()); return { .proof = ProofCompressor::decompress_chonk_proof(compressed_proof, mega_num_pub) }; } @@ -454,10 +454,10 @@ void ChonkBatchVerifierService::writer_loop(const std::string& fifo_path) // ── Batch Verifier RPC Commands ───────────────────────────────────────────── -ChonkBatchVerifierStart::Response ChonkBatchVerifierStart::execute(BBApiRequest& request) && +BbChonkBatchVerifierStart::Response BbChonkBatchVerifierStart::execute(BbRequest& request) && { if (request.batch_verifier_service && request.batch_verifier_service->is_running()) { - throw_or_abort("ChonkBatchVerifierStart: service already running. Call ChonkBatchVerifierStop first."); + throw_or_abort("BbChonkBatchVerifierStart: service already running. Call BbChonkBatchVerifierStop first."); } using VerificationKey = Chonk::MegaVerificationKey; @@ -476,10 +476,10 @@ ChonkBatchVerifierStart::Response ChonkBatchVerifierStart::execute(BBApiRequest& return {}; } -ChonkBatchVerifierQueue::Response ChonkBatchVerifierQueue::execute(BBApiRequest& request) && +BbChonkBatchVerifierQueue::Response BbChonkBatchVerifierQueue::execute(BbRequest& request) && { if (!request.batch_verifier_service || !request.batch_verifier_service->is_running()) { - throw_or_abort("ChonkBatchVerifierQueue: service not running. Call ChonkBatchVerifierStart first."); + throw_or_abort("BbChonkBatchVerifierQueue: service not running. Call BbChonkBatchVerifierStart first."); } request.batch_verifier_service->enqueue(VerifyRequest{ @@ -491,10 +491,10 @@ ChonkBatchVerifierQueue::Response ChonkBatchVerifierQueue::execute(BBApiRequest& return {}; } -ChonkBatchVerifierStop::Response ChonkBatchVerifierStop::execute(BBApiRequest& request) && +BbChonkBatchVerifierStop::Response BbChonkBatchVerifierStop::execute(BbRequest& request) && { if (!request.batch_verifier_service || !request.batch_verifier_service->is_running()) { - throw_or_abort("ChonkBatchVerifierStop: service not running."); + throw_or_abort("BbChonkBatchVerifierStop: service not running."); } request.batch_verifier_service->stop(); @@ -504,19 +504,19 @@ ChonkBatchVerifierStop::Response ChonkBatchVerifierStop::execute(BBApiRequest& r #else // __wasm__ -ChonkBatchVerifierStart::Response ChonkBatchVerifierStart::execute(BBApiRequest& /*request*/) && +BbChonkBatchVerifierStart::Response BbChonkBatchVerifierStart::execute(BbRequest& /*request*/) && { - throw_or_abort("ChonkBatchVerifierStart is not supported in WASM builds"); + throw_or_abort("BbChonkBatchVerifierStart is not supported in WASM builds"); } -ChonkBatchVerifierQueue::Response ChonkBatchVerifierQueue::execute(BBApiRequest& /*request*/) && +BbChonkBatchVerifierQueue::Response BbChonkBatchVerifierQueue::execute(BbRequest& /*request*/) && { - throw_or_abort("ChonkBatchVerifierQueue is not supported in WASM builds"); + throw_or_abort("BbChonkBatchVerifierQueue is not supported in WASM builds"); } -ChonkBatchVerifierStop::Response ChonkBatchVerifierStop::execute(BBApiRequest& /*request*/) && +BbChonkBatchVerifierStop::Response BbChonkBatchVerifierStop::execute(BbRequest& /*request*/) && { - throw_or_abort("ChonkBatchVerifierStop is not supported in WASM builds"); + throw_or_abort("BbChonkBatchVerifierStop is not supported in WASM builds"); } #endif // __wasm__ diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.hpp index 9250bc173ec1..e0320096c6a0 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_chonk.hpp @@ -11,7 +11,6 @@ #include "barretenberg/chonk/chonk.hpp" #include "barretenberg/common/named_union.hpp" #include "barretenberg/honk/proof_system/types/proof.hpp" -#include "barretenberg/serialize/msgpack.hpp" #ifndef __wasm__ #include "barretenberg/chonk/batch_verifier_types.hpp" @@ -29,44 +28,39 @@ namespace bb::bbapi { /** - * @struct ChonkStart + * @struct BbChonkStart * @brief Initialize a new Chonk instance for incremental proof accumulation * * @note Only one IVC request can be made at a time for each batch_request. */ -struct ChonkStart { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkStart"; +struct BbChonkStart { /** * @struct Response * @brief Empty response indicating successful initialization */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkStartResponse"; // Empty response - success indicated by no exception void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; }; // Number of circuits to be accumulated. uint32_t num_circuits; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(num_circuits); - bool operator==(const ChonkStart&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkStart&) const = default; }; /** - * @struct ChonkLoad + * @struct BbChonkLoad * @brief Load a circuit into the Chonk instance for accumulation */ -struct ChonkLoad { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkLoad"; +struct BbChonkLoad { /** * @struct Response * @brief Empty response indicating successful circuit loading */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkLoadResponse"; // Empty response - success indicated by no exception void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; @@ -74,24 +68,21 @@ struct ChonkLoad { /** @brief Circuit to be loaded with its bytecode and verification key */ CircuitInput circuit; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(circuit); - bool operator==(const ChonkLoad&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkLoad&) const = default; }; /** - * @struct ChonkAccumulate + * @struct BbChonkAccumulate * @brief Accumulate the previously loaded circuit into the IVC proof */ -struct ChonkAccumulate { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkAccumulate"; +struct BbChonkAccumulate { /** * @struct Response * @brief Empty response indicating successful circuit accumulation */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkAccumulateResponse"; // Empty response - success indicated by no exception void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; @@ -99,52 +90,45 @@ struct ChonkAccumulate { /** @brief Serialized witness data for the last loaded circuit */ std::vector witness; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(witness); - bool operator==(const ChonkAccumulate&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkAccumulate&) const = default; }; /** - * @struct ChonkProve + * @struct BbChonkProve * @brief Generate a proof for all accumulated circuits */ -struct ChonkProve { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkProve"; +struct BbChonkProve { /** * @struct Response * @brief Contains the generated IVC proof */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkProveResponse"; /** @brief Complete IVC proof for all accumulated circuits */ ChonkProof proof; - SERIALIZATION_FIELDS(proof); bool operator==(const Response&) const = default; }; - Response execute(BBApiRequest& request) &&; + Response execute(BbRequest& request) &&; void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const ChonkProve&) const = default; + bool operator==(const BbChonkProve&) const = default; }; /** - * @struct ChonkVerify + * @struct BbChonkVerify * @brief Verify a Chonk proof with its verification key */ -struct ChonkVerify { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkVerify"; +struct BbChonkVerify { /** * @struct Response * @brief Contains the verification result */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkVerifyResponse"; /** @brief True if the proof is valid */ bool valid; - SERIALIZATION_FIELDS(valid); bool operator==(const Response&) const = default; }; @@ -152,86 +136,75 @@ struct ChonkVerify { ChonkProof proof; /** @brief The verification key */ std::vector vk; - Response execute(const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(proof, vk); - bool operator==(const ChonkVerify&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbChonkVerify&) const = default; }; /** - * @struct ChonkComputeVk + * @struct BbChonkComputeVk * @brief Compute MegaHonk verification key for a circuit to be accumulated in Chonk * * @details This unified command replaces the former ChonkComputeStandaloneVk and ChonkComputeIvcVk. * Both standalone circuits (to be accumulated) and the IVC hiding kernel use the same MegaVerificationKey, * so a single implementation suffices for all Chonk VK computation needs. */ -struct ChonkComputeVk { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkComputeVk"; +struct BbChonkComputeVk { /** * @struct Response * @brief Contains the computed verification key in multiple formats */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkComputeVkResponse"; /** @brief Serialized MegaVerificationKey in binary format */ std::vector bytes; /** @brief Verification key as array of field elements */ std::vector fields; - SERIALIZATION_FIELDS(bytes, fields); bool operator==(const Response&) const = default; }; CircuitInputNoVK circuit; - Response execute([[maybe_unused]] const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(circuit); - bool operator==(const ChonkComputeVk&) const = default; + Response execute([[maybe_unused]] const BbRequest& request = {}) &&; + bool operator==(const BbChonkComputeVk&) const = default; }; /** - * @struct ChonkCheckPrecomputedVk + * @struct BbChonkCheckPrecomputedVk * @brief Verify that a precomputed verification key matches the circuit */ -struct ChonkCheckPrecomputedVk { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkCheckPrecomputedVk"; +struct BbChonkCheckPrecomputedVk { /** * @struct Response * @brief Contains the validation result */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkCheckPrecomputedVkResponse"; /** @brief True if the precomputed VK matches the circuit */ bool valid; /** @brief The actual VK it should be. */ std::vector actual_vk; - SERIALIZATION_FIELDS(valid, actual_vk); bool operator==(const Response&) const = default; }; /** @brief Circuit with its precomputed verification key */ CircuitInput circuit; - Response execute(const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(circuit); - bool operator==(const ChonkCheckPrecomputedVk&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbChonkCheckPrecomputedVk&) const = default; }; /** - * @struct ChonkStats + * @struct BbChonkStats * @brief Get gate counts for a circuit */ -struct ChonkStats { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkStats"; +struct BbChonkStats { /** * @struct Response * @brief Contains gate count information */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkStatsResponse"; /** @brief Number of ACIR opcodes */ uint32_t acir_opcodes; @@ -239,7 +212,6 @@ struct ChonkStats { uint32_t circuit_size; /** @brief Optional: gate counts per opcode */ std::vector gates_per_opcode; - SERIALIZATION_FIELDS(acir_opcodes, circuit_size, gates_per_opcode); bool operator==(const Response&) const = default; }; @@ -247,74 +219,61 @@ struct ChonkStats { CircuitInputNoVK circuit; /** @brief Whether to include detailed gate counts per opcode */ bool include_gates_per_opcode; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(circuit, include_gates_per_opcode); - bool operator==(const ChonkStats&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkStats&) const = default; }; /** - * @struct ChonkBatchVerify + * @struct BbChonkBatchVerify * @brief Batch-verify multiple Chonk proofs with a single IPA SRS MSM */ -struct ChonkBatchVerify { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerify"; +struct BbChonkBatchVerify { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifyResponse"; bool valid; - SERIALIZATION_FIELDS(valid); bool operator==(const Response&) const = default; }; std::vector proofs; std::vector> vks; - Response execute(const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(proofs, vks); - bool operator==(const ChonkBatchVerify&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbChonkBatchVerify&) const = default; }; /** - * @struct ChonkCompressProof + * @struct BbChonkCompressProof * @brief Compress a Chonk proof to a compact byte representation * * @details Uses point compression and uniform 32-byte encoding to reduce proof size (~1.72x). */ -struct ChonkCompressProof { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkCompressProof"; +struct BbChonkCompressProof { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkCompressProofResponse"; std::vector compressed_proof; - SERIALIZATION_FIELDS(compressed_proof); bool operator==(const Response&) const = default; }; ChonkProof proof; - Response execute(const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(proof); - bool operator==(const ChonkCompressProof&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbChonkCompressProof&) const = default; }; /** - * @struct ChonkDecompressProof + * @struct BbChonkDecompressProof * @brief Decompress a compressed Chonk proof back to field elements * * @details Derives mega_num_public_inputs from the compressed size automatically. */ -struct ChonkDecompressProof { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkDecompressProof"; +struct BbChonkDecompressProof { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkDecompressProofResponse"; ChonkProof proof; - SERIALIZATION_FIELDS(proof); bool operator==(const Response&) const = default; }; std::vector compressed_proof; - Response execute(const BBApiRequest& request = {}) &&; - SERIALIZATION_FIELDS(compressed_proof); - bool operator==(const ChonkDecompressProof&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbChonkDecompressProof&) const = default; }; #ifndef __wasm__ @@ -358,14 +317,12 @@ class ChonkBatchVerifierService { #endif // __wasm__ /** - * @struct ChonkBatchVerifierStart + * @struct BbChonkBatchVerifierStart * @brief Start the batch verifier service. */ -struct ChonkBatchVerifierStart { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierStart"; +struct BbChonkBatchVerifierStart { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierStartResponse"; void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; }; @@ -375,20 +332,17 @@ struct ChonkBatchVerifierStart { uint32_t batch_size = 8; std::string fifo_path; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(vks, num_cores, batch_size, fifo_path); - bool operator==(const ChonkBatchVerifierStart&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkBatchVerifierStart&) const = default; }; /** - * @struct ChonkBatchVerifierQueue + * @struct BbChonkBatchVerifierQueue * @brief Enqueue a proof for batch verification. */ -struct ChonkBatchVerifierQueue { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierQueue"; +struct BbChonkBatchVerifierQueue { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierQueueResponse"; void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; }; @@ -397,27 +351,24 @@ struct ChonkBatchVerifierQueue { uint32_t vk_index = 0; std::vector proof_fields; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(request_id, vk_index, proof_fields); - bool operator==(const ChonkBatchVerifierQueue&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbChonkBatchVerifierQueue&) const = default; }; /** - * @struct ChonkBatchVerifierStop + * @struct BbChonkBatchVerifierStop * @brief Stop the batch verifier service. */ -struct ChonkBatchVerifierStop { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierStop"; +struct BbChonkBatchVerifierStop { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ChonkBatchVerifierStopResponse"; void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; }; - Response execute(BBApiRequest& request) &&; + Response execute(BbRequest& request) &&; void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const ChonkBatchVerifierStop&) const = default; + bool operator==(const BbChonkBatchVerifierStop&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.cpp index b30cf0c890a2..142057918521 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.cpp @@ -20,12 +20,12 @@ namespace bb::bbapi { -Poseidon2Hash::Response Poseidon2Hash::execute(BB_UNUSED BBApiRequest& request) && +BbPoseidon2Hash::Response BbPoseidon2Hash::execute(BB_UNUSED BbRequest& request) && { return { crypto::Poseidon2::hash(inputs) }; } -Poseidon2Permutation::Response Poseidon2Permutation::execute(BB_UNUSED BBApiRequest& request) && +BbPoseidon2Permutation::Response BbPoseidon2Permutation::execute(BB_UNUSED BbRequest& request) && { using Permutation = crypto::Poseidon2Permutation; @@ -33,39 +33,39 @@ Poseidon2Permutation::Response Poseidon2Permutation::execute(BB_UNUSED BBApiRequ return { Permutation::permutation(inputs) }; } -PedersenCommit::Response PedersenCommit::execute(BB_UNUSED BBApiRequest& request) && +BbPedersenCommit::Response BbPedersenCommit::execute(BB_UNUSED BbRequest& request) && { crypto::GeneratorContext ctx; ctx.offset = static_cast(hash_index); return { crypto::pedersen_commitment::commit_native(inputs, ctx) }; } -PedersenHash::Response PedersenHash::execute(BB_UNUSED BBApiRequest& request) && +BbPedersenHash::Response BbPedersenHash::execute(BB_UNUSED BbRequest& request) && { crypto::GeneratorContext ctx; ctx.offset = static_cast(hash_index); return { crypto::pedersen_hash::hash(inputs, ctx) }; } -PedersenHashBuffer::Response PedersenHashBuffer::execute(BB_UNUSED BBApiRequest& request) && +BbPedersenHashBuffer::Response BbPedersenHashBuffer::execute(BB_UNUSED BbRequest& request) && { crypto::GeneratorContext ctx; ctx.offset = static_cast(hash_index); return { crypto::pedersen_hash::hash_buffer(input, ctx) }; } -Blake2s::Response Blake2s::execute(BB_UNUSED BBApiRequest& request) && +BbBlake2s::Response BbBlake2s::execute(BB_UNUSED BbRequest& request) && { return { crypto::blake2s(data) }; } -Blake2sToField::Response Blake2sToField::execute(BB_UNUSED BBApiRequest& request) && +BbBlake2sToField::Response BbBlake2sToField::execute(BB_UNUSED BbRequest& request) && { auto hash_result = crypto::blake2s(data); return { fr::serialize_from_buffer(hash_result.data()) }; } -AesEncrypt::Response AesEncrypt::execute(BB_UNUSED BBApiRequest& request) && +BbAesEncrypt::Response BbAesEncrypt::execute(BB_UNUSED BbRequest& request) && { BB_ASSERT(length == plaintext.size(), "AesEncrypt: length must equal plaintext.size()"); BB_ASSERT(length % 16 == 0, "AesEncrypt: length must be a multiple of 16"); @@ -79,7 +79,7 @@ AesEncrypt::Response AesEncrypt::execute(BB_UNUSED BBApiRequest& request) && return { std::move(result) }; } -AesDecrypt::Response AesDecrypt::execute(BB_UNUSED BBApiRequest& request) && +BbAesDecrypt::Response BbAesDecrypt::execute(BB_UNUSED BbRequest& request) && { BB_ASSERT(length == ciphertext.size(), "AesDecrypt: length must equal ciphertext.size()"); BB_ASSERT(length % 16 == 0, "AesDecrypt: length must be a multiple of 16"); diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.hpp index 929da35e7d84..d2b5a02bbf0a 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_crypto.hpp @@ -10,13 +10,12 @@ * @brief Cryptographic primitives command definitions for the Barretenberg RPC API. * * This file contains command structures for cryptographic operations including - * Poseidon2, Pedersen, Blake2s, and AES. + * Poseidon2, Pedersen, BbBlake2s, and AES. */ #include "barretenberg/bbapi/bbapi_shared.hpp" #include "barretenberg/common/named_union.hpp" #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include #include @@ -24,159 +23,128 @@ namespace bb::bbapi { /** - * @struct Poseidon2Hash + * @struct BbPoseidon2Hash * @brief Compute Poseidon2 hash of input field elements */ -struct Poseidon2Hash { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Poseidon2Hash"; +struct BbPoseidon2Hash { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Poseidon2HashResponse"; fr hash; - SERIALIZATION_FIELDS(hash); bool operator==(const Response&) const = default; }; std::vector inputs; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(inputs); - bool operator==(const Poseidon2Hash&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbPoseidon2Hash&) const = default; }; /** - * @struct Poseidon2Permutation + * @struct BbPoseidon2Permutation * @brief Compute Poseidon2 permutation on state (4 field elements) */ -struct Poseidon2Permutation { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Poseidon2Permutation"; +struct BbPoseidon2Permutation { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Poseidon2PermutationResponse"; std::array outputs; - SERIALIZATION_FIELDS(outputs); bool operator==(const Response&) const = default; }; std::array inputs; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(inputs); - bool operator==(const Poseidon2Permutation&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbPoseidon2Permutation&) const = default; }; /** - * @struct PedersenCommit + * @struct BbPedersenCommit * @brief Compute Pedersen commitment to field elements */ -struct PedersenCommit { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenCommit"; +struct BbPedersenCommit { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenCommitResponse"; grumpkin::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; std::vector inputs; uint32_t hash_index; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(inputs, hash_index); - bool operator==(const PedersenCommit&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbPedersenCommit&) const = default; }; /** - * @struct PedersenHash + * @struct BbPedersenHash * @brief Compute Pedersen hash of field elements */ -struct PedersenHash { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenHash"; +struct BbPedersenHash { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenHashResponse"; grumpkin::fq hash; - SERIALIZATION_FIELDS(hash); bool operator==(const Response&) const = default; }; std::vector inputs; uint32_t hash_index; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(inputs, hash_index); - bool operator==(const PedersenHash&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbPedersenHash&) const = default; }; /** - * @struct PedersenHashBuffer + * @struct BbPedersenHashBuffer * @brief Compute Pedersen hash of raw buffer */ -struct PedersenHashBuffer { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenHashBuffer"; +struct BbPedersenHashBuffer { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "PedersenHashBufferResponse"; grumpkin::fq hash; - SERIALIZATION_FIELDS(hash); bool operator==(const Response&) const = default; }; std::vector input; uint32_t hash_index; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(input, hash_index); - bool operator==(const PedersenHashBuffer&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbPedersenHashBuffer&) const = default; }; /** - * @struct Blake2s - * @brief Compute Blake2s hash + * @struct BbBlake2s + * @brief Compute BbBlake2s hash */ -struct Blake2s { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Blake2s"; +struct BbBlake2s { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Blake2sResponse"; std::array hash; - SERIALIZATION_FIELDS(hash); bool operator==(const Response&) const = default; }; std::vector data; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(data); - bool operator==(const Blake2s&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBlake2s&) const = default; }; /** - * @struct Blake2sToField - * @brief Compute Blake2s hash and convert to field element + * @struct BbBlake2sToField + * @brief Compute BbBlake2s hash and convert to field element */ -struct Blake2sToField { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Blake2sToField"; +struct BbBlake2sToField { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Blake2sToFieldResponse"; fr field; - SERIALIZATION_FIELDS(field); bool operator==(const Response&) const = default; }; std::vector data; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(data); - bool operator==(const Blake2sToField&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBlake2sToField&) const = default; }; /** - * @struct AesEncrypt + * @struct BbAesEncrypt * @brief AES-128 CBC encryption */ -struct AesEncrypt { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AesEncrypt"; +struct BbAesEncrypt { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AesEncryptResponse"; std::vector ciphertext; - SERIALIZATION_FIELDS(ciphertext); bool operator==(const Response&) const = default; }; @@ -184,22 +152,18 @@ struct AesEncrypt { std::array iv; std::array key; uint32_t length; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(plaintext, iv, key, length); - bool operator==(const AesEncrypt&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbAesEncrypt&) const = default; }; /** - * @struct AesDecrypt + * @struct BbAesDecrypt * @brief AES-128 CBC decryption */ -struct AesDecrypt { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AesDecrypt"; +struct BbAesDecrypt { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "AesDecryptResponse"; std::vector plaintext; - SERIALIZATION_FIELDS(plaintext); bool operator==(const Response&) const = default; }; @@ -207,9 +171,8 @@ struct AesDecrypt { std::array iv; std::array key; uint32_t length; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(ciphertext, iv, key, length); - bool operator==(const AesDecrypt&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbAesDecrypt&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.cpp index 533f541db738..d81dfbfc8974 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.cpp @@ -6,42 +6,42 @@ namespace bb::bbapi { -GrumpkinMul::Response GrumpkinMul::execute(BBApiRequest& request) && +BbGrumpkinMul::Response BbGrumpkinMul::execute(BB_UNUSED BbRequest& request) && { if (!point.on_curve()) { - BBAPI_ERROR(request, "Input point must be on the curve"); + throw_or_abort("Input point must be on the curve"); } return { point * scalar }; } -GrumpkinAdd::Response GrumpkinAdd::execute(BBApiRequest& request) && +BbGrumpkinAdd::Response BbGrumpkinAdd::execute(BB_UNUSED BbRequest& request) && { if (!point_a.on_curve()) { - BBAPI_ERROR(request, "Input point_a must be on the curve"); + throw_or_abort("Input point_a must be on the curve"); } if (!point_b.on_curve()) { - BBAPI_ERROR(request, "Input point_b must be on the curve"); + throw_or_abort("Input point_b must be on the curve"); } return { point_a + point_b }; } -GrumpkinBatchMul::Response GrumpkinBatchMul::execute(BBApiRequest& request) && +BbGrumpkinBatchMul::Response BbGrumpkinBatchMul::execute(BB_UNUSED BbRequest& request) && { for (const auto& p : points) { if (!p.on_curve()) { - BBAPI_ERROR(request, "Input point must be on the curve"); + throw_or_abort("Input point must be on the curve"); } } auto output = grumpkin::g1::element::batch_mul_with_endomorphism(points, scalar); return { std::move(output) }; } -GrumpkinGetRandomFr::Response GrumpkinGetRandomFr::execute(BB_UNUSED BBApiRequest& request) && +BbGrumpkinGetRandomFr::Response BbGrumpkinGetRandomFr::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { return { bb::fr::random_element() }; } -GrumpkinReduce512::Response GrumpkinReduce512::execute(BB_UNUSED BBApiRequest& request) && +BbGrumpkinReduce512::Response BbGrumpkinReduce512::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { auto bigint_input = from_buffer(input.data()); uint512_t barretenberg_modulus(bb::fr::modulus); @@ -49,20 +49,20 @@ GrumpkinReduce512::Response GrumpkinReduce512::execute(BB_UNUSED BBApiRequest& r return { bb::fr(target_output.lo) }; } -Secp256k1Mul::Response Secp256k1Mul::execute(BBApiRequest& request) && +BbSecp256k1Mul::Response BbSecp256k1Mul::execute(BB_UNUSED BbRequest& request) && { if (!point.on_curve()) { - BBAPI_ERROR(request, "Input point must be on the curve"); + throw_or_abort("Input point must be on the curve"); } return { point * scalar }; } -Secp256k1GetRandomFr::Response Secp256k1GetRandomFr::execute(BB_UNUSED BBApiRequest& request) && +BbSecp256k1GetRandomFr::Response BbSecp256k1GetRandomFr::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { return { secp256k1::fr::random_element() }; } -Secp256k1Reduce512::Response Secp256k1Reduce512::execute(BB_UNUSED BBApiRequest& request) && +BbSecp256k1Reduce512::Response BbSecp256k1Reduce512::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { auto bigint_input = from_buffer(input.data()); uint512_t secp256k1_modulus(secp256k1::fr::modulus); @@ -70,56 +70,63 @@ Secp256k1Reduce512::Response Secp256k1Reduce512::execute(BB_UNUSED BBApiRequest& return { secp256k1::fr(target_output.lo) }; } -Bn254FrSqrt::Response Bn254FrSqrt::execute(BB_UNUSED BBApiRequest& request) && +BbBn254FrSqrt::Response BbBn254FrSqrt::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { auto [is_sqr, root] = input.sqrt(); return { is_sqr, root }; } -Bn254FqSqrt::Response Bn254FqSqrt::execute(BB_UNUSED BBApiRequest& request) && +BbBn254FqSqrt::Response BbBn254FqSqrt::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { auto [is_sqr, root] = input.sqrt(); return { is_sqr, root }; } -Bn254G1Mul::Response Bn254G1Mul::execute(BBApiRequest& request) && +BbBn254G1Mul::Response BbBn254G1Mul::execute(BB_UNUSED BbRequest& request) && { if (!point.on_curve()) { - BBAPI_ERROR(request, "Input point must be on the curve"); + throw_or_abort("Input point must be on the curve"); } auto result = point * scalar; if (!result.on_curve()) { - BBAPI_ERROR(request, "Output point must be on the curve"); + throw_or_abort("Output point must be on the curve"); } return { result }; } -Bn254G2Mul::Response Bn254G2Mul::execute(BBApiRequest& request) && +BbBn254G2Mul::Response BbBn254G2Mul::execute(BB_UNUSED BbRequest& request) && { if (!point.on_curve()) { - BBAPI_ERROR(request, "Input point must be on the curve"); + throw_or_abort("Input point must be on the curve"); } auto result = point * scalar; if (!result.on_curve()) { - BBAPI_ERROR(request, "Output point must be on the curve"); + throw_or_abort("Output point must be on the curve"); } return { result }; } -Bn254G1IsOnCurve::Response Bn254G1IsOnCurve::execute(BB_UNUSED BBApiRequest& request) && +BbBn254G1IsOnCurve::Response BbBn254G1IsOnCurve::execute(BB_UNUSED BB_UNUSED BbRequest& request) && { return { point.on_curve() }; } -Bn254G1FromCompressed::Response Bn254G1FromCompressed::execute(BBApiRequest& request) && +BbBn254G1FromCompressed::Response BbBn254G1FromCompressed::execute(BB_UNUSED BbRequest& request) && { // Convert 32-byte array to uint256_t uint256_t compressed_value = from_buffer(compressed.data()); + // Bit 255 encodes the y-parity; mask it off to get the x-coordinate + uint256_t x_coord = compressed_value; + x_coord.data[3] &= 0x7FFFFFFFFFFFFFFFULL; // Clear bit 255 + // Reject x-coordinates >= field modulus + if (x_coord >= bb::fq::modulus) { + throw_or_abort("Compressed x-coordinate is out of field range"); + } // Decompress the point auto point = bb::g1::affine_element::from_compressed(compressed_value); // Verify the decompressed point is on the curve if (!point.on_curve()) { - BBAPI_ERROR(request, "Decompressed point is not on the curve"); + throw_or_abort("Decompressed point is not on the curve"); } return { point }; } diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.hpp index 5d47a227447b..a9c1cfe92ea0 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecc.hpp @@ -12,7 +12,6 @@ #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp" #include "barretenberg/ecc/curves/secp256k1/secp256k1.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include #include @@ -20,293 +19,237 @@ namespace bb::bbapi { /** - * @struct GrumpkinMul + * @struct BbGrumpkinMul * @brief Multiply a Grumpkin point by a scalar */ -struct GrumpkinMul { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinMul"; +struct BbGrumpkinMul { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinMulResponse"; grumpkin::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; grumpkin::g1::affine_element point; grumpkin::fr scalar; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point, scalar); - bool operator==(const GrumpkinMul&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbGrumpkinMul&) const = default; }; /** - * @struct GrumpkinAdd + * @struct BbGrumpkinAdd * @brief Add two Grumpkin points */ -struct GrumpkinAdd { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinAdd"; +struct BbGrumpkinAdd { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinAddResponse"; grumpkin::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; grumpkin::g1::affine_element point_a; grumpkin::g1::affine_element point_b; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point_a, point_b); - bool operator==(const GrumpkinAdd&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbGrumpkinAdd&) const = default; }; /** - * @struct GrumpkinBatchMul + * @struct BbGrumpkinBatchMul * @brief Multiply multiple Grumpkin points by a single scalar */ -struct GrumpkinBatchMul { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinBatchMul"; +struct BbGrumpkinBatchMul { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinBatchMulResponse"; std::vector points; - SERIALIZATION_FIELDS(points); bool operator==(const Response&) const = default; }; std::vector points; grumpkin::fr scalar; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(points, scalar); - bool operator==(const GrumpkinBatchMul&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbGrumpkinBatchMul&) const = default; }; /** - * @struct GrumpkinGetRandomFr + * @struct BbGrumpkinGetRandomFr * @brief Get a random Grumpkin field element (BN254 Fr) */ -struct GrumpkinGetRandomFr { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinGetRandomFr"; +struct BbGrumpkinGetRandomFr { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinGetRandomFrResponse"; bb::fr value; - SERIALIZATION_FIELDS(value); bool operator==(const Response&) const = default; }; // Empty struct for commands with no input - use a dummy field for msgpack uint8_t dummy = 0; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(dummy); - bool operator==(const GrumpkinGetRandomFr&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbGrumpkinGetRandomFr&) const = default; }; /** - * @struct GrumpkinReduce512 + * @struct BbGrumpkinReduce512 * @brief Reduce a 512-bit value modulo Grumpkin scalar field (BN254 Fr) */ -struct GrumpkinReduce512 { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinReduce512"; +struct BbGrumpkinReduce512 { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "GrumpkinReduce512Response"; bb::fr value; - SERIALIZATION_FIELDS(value); bool operator==(const Response&) const = default; }; std::array input; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(input); - bool operator==(const GrumpkinReduce512&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbGrumpkinReduce512&) const = default; }; /** - * @struct Secp256k1Mul + * @struct BbSecp256k1Mul * @brief Multiply a Secp256k1 point by a scalar */ -struct Secp256k1Mul { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1Mul"; +struct BbSecp256k1Mul { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1MulResponse"; secp256k1::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; secp256k1::g1::affine_element point; secp256k1::fr scalar; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point, scalar); - bool operator==(const Secp256k1Mul&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSecp256k1Mul&) const = default; }; /** - * @struct Secp256k1GetRandomFr + * @struct BbSecp256k1GetRandomFr * @brief Get a random Secp256k1 field element */ -struct Secp256k1GetRandomFr { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1GetRandomFr"; +struct BbSecp256k1GetRandomFr { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1GetRandomFrResponse"; secp256k1::fr value; - SERIALIZATION_FIELDS(value); bool operator==(const Response&) const = default; }; // Empty struct for commands with no input - use a dummy field for msgpack uint8_t dummy = 0; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(dummy); - bool operator==(const Secp256k1GetRandomFr&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSecp256k1GetRandomFr&) const = default; }; /** - * @struct Secp256k1Reduce512 + * @struct BbSecp256k1Reduce512 * @brief Reduce a 512-bit value modulo Secp256k1 scalar field */ -struct Secp256k1Reduce512 { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1Reduce512"; +struct BbSecp256k1Reduce512 { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Secp256k1Reduce512Response"; secp256k1::fr value; - SERIALIZATION_FIELDS(value); bool operator==(const Response&) const = default; }; std::array input; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(input); - bool operator==(const Secp256k1Reduce512&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSecp256k1Reduce512&) const = default; }; /** - * @struct Bn254FrSqrt + * @struct BbBn254FrSqrt * @brief Compute square root of a BN254 Fr (scalar field) element */ -struct Bn254FrSqrt { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254FrSqrt"; +struct BbBn254FrSqrt { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254FrSqrtResponse"; bool is_square_root; bb::fr value; - SERIALIZATION_FIELDS(is_square_root, value); bool operator==(const Response&) const = default; }; bb::fr input; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(input); - bool operator==(const Bn254FrSqrt&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254FrSqrt&) const = default; }; /** - * @struct Bn254FqSqrt + * @struct BbBn254FqSqrt * @brief Compute square root of a BN254 Fq (base field) element */ -struct Bn254FqSqrt { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254FqSqrt"; +struct BbBn254FqSqrt { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254FqSqrtResponse"; bool is_square_root; bb::fq value; - SERIALIZATION_FIELDS(is_square_root, value); bool operator==(const Response&) const = default; }; bb::fq input; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(input); - bool operator==(const Bn254FqSqrt&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254FqSqrt&) const = default; }; /** - * @struct Bn254G1Mul + * @struct BbBn254G1Mul * @brief Multiply a BN254 G1 point by a scalar */ -struct Bn254G1Mul { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1Mul"; +struct BbBn254G1Mul { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1MulResponse"; bb::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; bb::g1::affine_element point; bb::fr scalar; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point, scalar); - bool operator==(const Bn254G1Mul&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254G1Mul&) const = default; }; /** - * @struct Bn254G2Mul + * @struct BbBn254G2Mul * @brief Multiply a BN254 G2 point by a scalar */ -struct Bn254G2Mul { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G2Mul"; +struct BbBn254G2Mul { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G2MulResponse"; bb::g2::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; bb::g2::affine_element point; bb::fr scalar; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point, scalar); - bool operator==(const Bn254G2Mul&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254G2Mul&) const = default; }; /** - * @struct Bn254G1IsOnCurve + * @struct BbBn254G1IsOnCurve * @brief Check if a BN254 G1 point is on the curve */ -struct Bn254G1IsOnCurve { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1IsOnCurve"; +struct BbBn254G1IsOnCurve { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1IsOnCurveResponse"; bool is_on_curve; - SERIALIZATION_FIELDS(is_on_curve); bool operator==(const Response&) const = default; }; bb::g1::affine_element point; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(point); - bool operator==(const Bn254G1IsOnCurve&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254G1IsOnCurve&) const = default; }; /** - * @struct Bn254G1FromCompressed + * @struct BbBn254G1FromCompressed * @brief Decompress a BN254 G1 point from compressed form */ -struct Bn254G1FromCompressed { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1FromCompressed"; +struct BbBn254G1FromCompressed { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Bn254G1FromCompressedResponse"; bb::g1::affine_element point; - SERIALIZATION_FIELDS(point); bool operator==(const Response&) const = default; }; std::array compressed = {}; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(compressed); - bool operator==(const Bn254G1FromCompressed&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbBn254G1FromCompressed&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.cpp index c664e74d65a5..1243c1d4091a 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.cpp @@ -8,12 +8,13 @@ namespace bb::bbapi { // Secp256k1 implementations -EcdsaSecp256k1ComputePublicKey::Response EcdsaSecp256k1ComputePublicKey::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256k1ComputePublicKey::Response BbEcdsaSecp256k1ComputePublicKey::execute(BB_UNUSED BbRequest& request) && { return { secp256k1::g1::one * private_key }; } -EcdsaSecp256k1ConstructSignature::Response EcdsaSecp256k1ConstructSignature::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256k1ConstructSignature::Response BbEcdsaSecp256k1ConstructSignature::execute( + BB_UNUSED BbRequest& request) && { auto pub_key = secp256k1::g1::one * private_key; crypto::ecdsa_key_pair key_pair = { private_key, pub_key }; @@ -25,7 +26,7 @@ EcdsaSecp256k1ConstructSignature::Response EcdsaSecp256k1ConstructSignature::exe return { sig.r, sig.s, sig.v }; } -EcdsaSecp256k1RecoverPublicKey::Response EcdsaSecp256k1RecoverPublicKey::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256k1RecoverPublicKey::Response BbEcdsaSecp256k1RecoverPublicKey::execute(BB_UNUSED BbRequest& request) && { crypto::ecdsa_signature sig = { r, s, v }; std::string message_str(reinterpret_cast(message.data()), message.size()); @@ -33,7 +34,7 @@ EcdsaSecp256k1RecoverPublicKey::Response EcdsaSecp256k1RecoverPublicKey::execute message_str, sig) }; } -EcdsaSecp256k1VerifySignature::Response EcdsaSecp256k1VerifySignature::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256k1VerifySignature::Response BbEcdsaSecp256k1VerifySignature::execute(BB_UNUSED BbRequest& request) && { crypto::ecdsa_signature sig = { r, s, v }; std::string message_str(reinterpret_cast(message.data()), message.size()); @@ -42,12 +43,13 @@ EcdsaSecp256k1VerifySignature::Response EcdsaSecp256k1VerifySignature::execute(B } // Secp256r1 implementations -EcdsaSecp256r1ComputePublicKey::Response EcdsaSecp256r1ComputePublicKey::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256r1ComputePublicKey::Response BbEcdsaSecp256r1ComputePublicKey::execute(BB_UNUSED BbRequest& request) && { return { secp256r1::g1::one * private_key }; } -EcdsaSecp256r1ConstructSignature::Response EcdsaSecp256r1ConstructSignature::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256r1ConstructSignature::Response BbEcdsaSecp256r1ConstructSignature::execute( + BB_UNUSED BbRequest& request) && { auto pub_key = secp256r1::g1::one * private_key; crypto::ecdsa_key_pair key_pair = { private_key, pub_key }; @@ -59,7 +61,7 @@ EcdsaSecp256r1ConstructSignature::Response EcdsaSecp256r1ConstructSignature::exe return { sig.r, sig.s, sig.v }; } -EcdsaSecp256r1RecoverPublicKey::Response EcdsaSecp256r1RecoverPublicKey::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256r1RecoverPublicKey::Response BbEcdsaSecp256r1RecoverPublicKey::execute(BB_UNUSED BbRequest& request) && { crypto::ecdsa_signature sig = { r, s, v }; std::string message_str(reinterpret_cast(message.data()), message.size()); @@ -67,7 +69,7 @@ EcdsaSecp256r1RecoverPublicKey::Response EcdsaSecp256r1RecoverPublicKey::execute message_str, sig) }; } -EcdsaSecp256r1VerifySignature::Response EcdsaSecp256r1VerifySignature::execute(BB_UNUSED BBApiRequest& request) && +BbEcdsaSecp256r1VerifySignature::Response BbEcdsaSecp256r1VerifySignature::execute(BB_UNUSED BbRequest& request) && { crypto::ecdsa_signature sig = { r, s, v }; std::string message_str(reinterpret_cast(message.data()), message.size()); diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.hpp index 61efa550bc4e..d71d1e41ec2f 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ecdsa.hpp @@ -11,7 +11,6 @@ #include "barretenberg/crypto/ecdsa/ecdsa.hpp" #include "barretenberg/ecc/curves/secp256k1/secp256k1.hpp" #include "barretenberg/ecc/curves/secp256r1/secp256r1.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include #include @@ -20,102 +19,83 @@ namespace bb::bbapi { /** - * @struct EcdsaSecp256k1ComputePublicKey + * @struct BbEcdsaSecp256k1ComputePublicKey * @brief Compute ECDSA public key from private key for secp256k1 */ -struct EcdsaSecp256k1ComputePublicKey { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1ComputePublicKey"; +struct BbEcdsaSecp256k1ComputePublicKey { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1ComputePublicKeyResponse"; secp256k1::g1::affine_element public_key; - SERIALIZATION_FIELDS(public_key); bool operator==(const Response&) const = default; }; secp256k1::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(private_key); - bool operator==(const EcdsaSecp256k1ComputePublicKey&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256k1ComputePublicKey&) const = default; }; /** - * @struct EcdsaSecp256r1ComputePublicKey + * @struct BbEcdsaSecp256r1ComputePublicKey * @brief Compute ECDSA public key from private key for secp256r1 */ -struct EcdsaSecp256r1ComputePublicKey { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1ComputePublicKey"; +struct BbEcdsaSecp256r1ComputePublicKey { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1ComputePublicKeyResponse"; secp256r1::g1::affine_element public_key; - SERIALIZATION_FIELDS(public_key); bool operator==(const Response&) const = default; }; secp256r1::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(private_key); - bool operator==(const EcdsaSecp256r1ComputePublicKey&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256r1ComputePublicKey&) const = default; }; /** - * @struct EcdsaSecp256k1ConstructSignature + * @struct BbEcdsaSecp256k1ConstructSignature * @brief Construct an ECDSA signature for secp256k1 */ -struct EcdsaSecp256k1ConstructSignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1ConstructSignature"; +struct BbEcdsaSecp256k1ConstructSignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1ConstructSignatureResponse"; std::array r; std::array s; uint8_t v; - SERIALIZATION_FIELDS(r, s, v); bool operator==(const Response&) const = default; }; std::vector message; secp256k1::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, private_key); - bool operator==(const EcdsaSecp256k1ConstructSignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256k1ConstructSignature&) const = default; }; /** - * @struct EcdsaSecp256r1ConstructSignature + * @struct BbEcdsaSecp256r1ConstructSignature * @brief Construct an ECDSA signature for secp256r1 */ -struct EcdsaSecp256r1ConstructSignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1ConstructSignature"; +struct BbEcdsaSecp256r1ConstructSignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1ConstructSignatureResponse"; std::array r; std::array s; uint8_t v; - SERIALIZATION_FIELDS(r, s, v); bool operator==(const Response&) const = default; }; std::vector message; secp256r1::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, private_key); - bool operator==(const EcdsaSecp256r1ConstructSignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256r1ConstructSignature&) const = default; }; /** - * @struct EcdsaSecp256k1RecoverPublicKey + * @struct BbEcdsaSecp256k1RecoverPublicKey * @brief Recover public key from ECDSA signature for secp256k1 */ -struct EcdsaSecp256k1RecoverPublicKey { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1RecoverPublicKey"; +struct BbEcdsaSecp256k1RecoverPublicKey { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1RecoverPublicKeyResponse"; secp256k1::g1::affine_element public_key; - SERIALIZATION_FIELDS(public_key); bool operator==(const Response&) const = default; }; @@ -123,22 +103,18 @@ struct EcdsaSecp256k1RecoverPublicKey { std::array r; std::array s; uint8_t v; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, r, s, v); - bool operator==(const EcdsaSecp256k1RecoverPublicKey&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256k1RecoverPublicKey&) const = default; }; /** - * @struct EcdsaSecp256r1RecoverPublicKey + * @struct BbEcdsaSecp256r1RecoverPublicKey * @brief Recover public key from ECDSA signature for secp256r1 */ -struct EcdsaSecp256r1RecoverPublicKey { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1RecoverPublicKey"; +struct BbEcdsaSecp256r1RecoverPublicKey { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1RecoverPublicKeyResponse"; secp256r1::g1::affine_element public_key; - SERIALIZATION_FIELDS(public_key); bool operator==(const Response&) const = default; }; @@ -146,22 +122,18 @@ struct EcdsaSecp256r1RecoverPublicKey { std::array r; std::array s; uint8_t v; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, r, s, v); - bool operator==(const EcdsaSecp256r1RecoverPublicKey&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256r1RecoverPublicKey&) const = default; }; /** - * @struct EcdsaSecp256k1VerifySignature + * @struct BbEcdsaSecp256k1VerifySignature * @brief Verify an ECDSA signature for secp256k1 */ -struct EcdsaSecp256k1VerifySignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1VerifySignature"; +struct BbEcdsaSecp256k1VerifySignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256k1VerifySignatureResponse"; bool verified; - SERIALIZATION_FIELDS(verified); bool operator==(const Response&) const = default; }; @@ -170,22 +142,18 @@ struct EcdsaSecp256k1VerifySignature { std::array r; std::array s; uint8_t v; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, public_key, r, s, v); - bool operator==(const EcdsaSecp256k1VerifySignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256k1VerifySignature&) const = default; }; /** - * @struct EcdsaSecp256r1VerifySignature + * @struct BbEcdsaSecp256r1VerifySignature * @brief Verify an ECDSA signature for secp256r1 */ -struct EcdsaSecp256r1VerifySignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1VerifySignature"; +struct BbEcdsaSecp256r1VerifySignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "EcdsaSecp256r1VerifySignatureResponse"; bool verified; - SERIALIZATION_FIELDS(verified); bool operator==(const Response&) const = default; }; @@ -194,9 +162,8 @@ struct EcdsaSecp256r1VerifySignature { std::array r; std::array s; uint8_t v; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, public_key, r, s, v); - bool operator==(const EcdsaSecp256r1VerifySignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbEcdsaSecp256r1VerifySignature&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.cpp index 4a59f76cd339..be1f26f0d711 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.cpp @@ -1,15 +1,142 @@ #include "bbapi_execute.hpp" +#include "barretenberg/bbapi/generated/bb_types.hpp" +#include "barretenberg/common/named_union.hpp" +#include "barretenberg/serialize/msgpack_impl.hpp" namespace bb::bbapi { -namespace { // anonymous + +// Schema export uses wire types (which have SERIALIZATION_FIELDS + MSGPACK_SCHEMA_NAME). +// NamedUnion is used ONLY here for schema reflection — not for runtime dispatch. +namespace { +using Command = NamedUnion; + +using CommandResponse = NamedUnion; + struct Api { Command commands; - bb::bbapi::CommandResponse responses; + CommandResponse responses; SERIALIZATION_FIELDS(commands, responses); }; } // namespace + std::string get_msgpack_schema_as_json() { return msgpack_schema_to_string(Api{}); } + } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp index e9031a9363ec..8fd897f1f517 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_execute.hpp @@ -1,4 +1,11 @@ #pragma once +/** + * @file bbapi_execute.hpp + * @brief BbRequest context and command includes for the bb binary. + * + * Command dispatch is handled by the generated server in generated/bb_ipc_server.hpp. + * This file provides the BbRequest context and includes all command headers. + */ #include "barretenberg/bbapi/bbapi_chonk.hpp" #include "barretenberg/bbapi/bbapi_crypto.hpp" @@ -8,157 +15,10 @@ #include "barretenberg/bbapi/bbapi_shared.hpp" #include "barretenberg/bbapi/bbapi_srs.hpp" #include "barretenberg/bbapi/bbapi_ultra_honk.hpp" -#include "barretenberg/common/throw_or_abort.hpp" -#include namespace bb::bbapi { -using Command = NamedUnion; - -using CommandResponse = NamedUnion; - -/** - * @brief Executes a command by visiting a variant of all possible commands. - * - * @param command The command to execute, consumed by this function. - * @param request The circuit registry (acting as the request context). - * @return A variant of all possible command responses. - */ -inline CommandResponse execute(BBApiRequest& request, Command&& command) -{ - // Reset error state before execution - request.error_message.clear(); - - CommandResponse response = std::move(command).visit([&request](auto&& cmd) -> CommandResponse { - using CmdType = std::decay_t; - return std::forward(cmd).execute(request); - }); - - // Check if an error occurred during execution - if (!request.error_message.empty()) { - return ErrorResponse{ .message = std::move(request.error_message) }; - } - - return response; -} - -// The msgpack scheme is an ad-hoc format that allows for cbind/compiler.ts to -// generate TypeScript bindings for the API. +/// Export the msgpack schema as JSON (uses wire type reflection). std::string get_msgpack_schema_as_json(); } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_handlers.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_handlers.cpp new file mode 100644 index 000000000000..d689a5a490ed --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_handlers.cpp @@ -0,0 +1,866 @@ +/** + * @file bbapi_handlers.cpp + * @brief Handler implementations bridging wire types to domain types for the BB IPC server. + * + * Each handler: + * 1. Takes a wire command (bb::bbapi::wire::BbFoo&&) + * 2. Converts wire fields to domain types + * 3. Calls std::move(domain_cmd).execute(ctx) + * 4. Converts the domain response back to wire response + * 5. Returns wire response + */ + +#include "barretenberg/bbapi/bbapi_execute.hpp" +#include "barretenberg/bbapi/generated/bb_ipc_server.hpp" +#include "barretenberg/bbapi/wire_convert.hpp" +#include "barretenberg/numeric/uint256/uint256.hpp" +#include "barretenberg/serialize/msgpack.hpp" + +#include +#include + +namespace bb::bbapi { + +// =========================================================================================== +// Conversion helpers (local to this TU) +// =========================================================================================== + +namespace { + +/// Convert vector (32 bytes, big-endian) → uint256_t +inline uint256_t uint256_from_bytes(const std::vector& bytes) +{ + if (bytes.size() >= 32) { + return from_buffer(bytes.data()); + } + return uint256_t(0); +} + +/// Convert uint256_t → vector (32 bytes, big-endian) +inline std::vector uint256_to_bytes(const uint256_t& val) +{ + return to_buffer(val); +} + +/// Convert vector> → vector +inline std::vector uint256_vec_from_wire(const std::vector>& wire) +{ + std::vector result; + result.reserve(wire.size()); + for (const auto& w : wire) { + result.push_back(uint256_from_bytes(w)); + } + return result; +} + +/// Convert vector → vector> +inline std::vector> uint256_vec_to_wire(const std::vector& domain) +{ + std::vector> result; + result.reserve(domain.size()); + for (const auto& d : domain) { + result.push_back(uint256_to_bytes(d)); + } + return result; +} + +/// Convert vector → array (truncates or zero-pads) +template inline std::array vec_to_array(const std::vector& v) +{ + std::array arr{}; + std::memcpy(arr.data(), v.data(), std::min(v.size(), N)); + return arr; +} + +/// Convert wire CircuitInput → domain CircuitInput +inline CircuitInput circuit_input_from_wire(wire::CircuitInput&& w) +{ + return { .name = std::move(w.name), + .bytecode = std::move(w.bytecode), + .verification_key = std::move(w.verification_key) }; +} + +/// Convert wire CircuitInputNoVK → domain CircuitInputNoVK +inline CircuitInputNoVK circuit_input_novk_from_wire(wire::CircuitInputNoVK&& w) +{ + return { .name = std::move(w.name), .bytecode = std::move(w.bytecode) }; +} + +/// Convert wire ProofSystemSettings → domain ProofSystemSettings +inline ProofSystemSettings settings_from_wire(wire::ProofSystemSettings&& w) +{ + return { .ipa_accumulation = w.ipa_accumulation, + .oracle_hash_type = std::move(w.oracle_hash_type), + .disable_zk = w.disable_zk, + .optimized_solidity_verifier = w.optimized_solidity_verifier }; +} + +/// Convert wire ChonkProof → domain ChonkProof (vector → vector) +inline ChonkProof chonk_proof_from_wire(wire::ChonkProof&& w) +{ + ChonkProof p; + p.hiding_oink_proof = field_vec_from_wire(w.hiding_oink_proof); + p.merge_proof = field_vec_from_wire(w.merge_proof); + p.eccvm_proof = field_vec_from_wire(w.eccvm_proof); + p.ipa_proof = field_vec_from_wire(w.ipa_proof); + p.joint_proof = field_vec_from_wire(w.joint_proof); + return p; +} + +/// Convert domain ChonkProof → wire ChonkProof (vector → vector) +inline wire::ChonkProof chonk_proof_to_wire(const ChonkProof& d) +{ + return { .hiding_oink_proof = field_vec_to_wire(d.hiding_oink_proof), + .merge_proof = field_vec_to_wire(d.merge_proof), + .eccvm_proof = field_vec_to_wire(d.eccvm_proof), + .ipa_proof = field_vec_to_wire(d.ipa_proof), + .joint_proof = field_vec_to_wire(d.joint_proof) }; +} + +/// Convert domain BbCircuitComputeVk::Response → wire BbCircuitComputeVkResponse +inline wire::BbCircuitComputeVkResponse compute_vk_response_to_wire(const BbCircuitComputeVk::Response& d) +{ + return { .bytes = d.bytes, .fields = uint256_vec_to_wire(d.fields), .hash = d.hash }; +} + +/// Convert G2 wire point → domain g2::affine_element +/// Wire: { array x, array y } where each Fr pair is fq2 = {fq c0, fq c1} +inline bb::g2::affine_element g2_point_from_wire(const wire::Bn254G2Point& w) +{ + bb::g2::affine_element r; + r.x.c0 = field_from_wire(w.x[0]); + r.x.c1 = field_from_wire(w.x[1]); + r.y.c0 = field_from_wire(w.y[0]); + r.y.c1 = field_from_wire(w.y[1]); + return r; +} + +/// Convert domain g2::affine_element → wire G2 point +inline wire::Bn254G2Point g2_point_to_wire(const bb::g2::affine_element& d) +{ + wire::Bn254G2Point r; + r.x[0] = field_to_wire(d.x.c0); + r.x[1] = field_to_wire(d.x.c1); + r.y[0] = field_to_wire(d.y.c0); + r.y[1] = field_to_wire(d.y.c1); + return r; +} + +} // anonymous namespace + +// =========================================================================================== +// UltraHonk handlers +// =========================================================================================== + +template <> wire::BbCircuitProveResponse handle_circuit_prove(BbRequest& ctx, wire::BbCircuitProve&& w) +{ + auto resp = + BbCircuitProve{ + .circuit = circuit_input_from_wire(std::move(w.circuit)), + .witness = std::move(w.witness), + .settings = settings_from_wire(std::move(w.settings)), + } + .execute(ctx); + return { .public_inputs = uint256_vec_to_wire(resp.public_inputs), + .proof = uint256_vec_to_wire(resp.proof), + .vk = compute_vk_response_to_wire(resp.vk) }; +} + +template <> wire::BbCircuitComputeVkResponse handle_circuit_compute_vk(BbRequest& ctx, wire::BbCircuitComputeVk&& w) +{ + auto resp = + BbCircuitComputeVk{ + .circuit = circuit_input_novk_from_wire(std::move(w.circuit)), + .settings = settings_from_wire(std::move(w.settings)), + } + .execute(ctx); + return compute_vk_response_to_wire(resp); +} + +template <> wire::BbCircuitInfoResponse handle_circuit_stats(BbRequest& ctx, wire::BbCircuitStats&& w) +{ + auto resp = + BbCircuitStats{ + .circuit = circuit_input_from_wire(std::move(w.circuit)), + .include_gates_per_opcode = w.include_gates_per_opcode, + .settings = settings_from_wire(std::move(w.settings)), + } + .execute(ctx); + return { .num_gates = resp.num_gates, + .num_gates_dyadic = resp.num_gates_dyadic, + .num_acir_opcodes = resp.num_acir_opcodes, + .gates_per_opcode = std::move(resp.gates_per_opcode) }; +} + +template <> wire::BbCircuitVerifyResponse handle_circuit_verify(BbRequest& ctx, wire::BbCircuitVerify&& w) +{ + auto resp = + BbCircuitVerify{ + .verification_key = std::move(w.verification_key), + .public_inputs = uint256_vec_from_wire(w.public_inputs), + .proof = uint256_vec_from_wire(w.proof), + .settings = settings_from_wire(std::move(w.settings)), + } + .execute(ctx); + return { .verified = resp.verified }; +} + +template <> wire::BbVkAsFieldsResponse handle_vk_as_fields(BbRequest& ctx, wire::BbVkAsFields&& w) +{ + auto resp = + BbVkAsFields{ + .verification_key = std::move(w.verification_key), + } + .execute(ctx); + return { .fields = field_vec_to_wire(resp.fields) }; +} + +template <> wire::BbMegaVkAsFieldsResponse handle_mega_vk_as_fields(BbRequest& ctx, wire::BbMegaVkAsFields&& w) +{ + auto resp = + BbMegaVkAsFields{ + .verification_key = std::move(w.verification_key), + } + .execute(ctx); + return { .fields = field_vec_to_wire(resp.fields) }; +} + +template <> +wire::BbCircuitWriteSolidityVerifierResponse handle_circuit_write_solidity_verifier( + BbRequest& ctx, wire::BbCircuitWriteSolidityVerifier&& w) +{ + auto resp = + BbCircuitWriteSolidityVerifier{ + .verification_key = std::move(w.verification_key), + .settings = settings_from_wire(std::move(w.settings)), + } + .execute(ctx); + return { .solidity_code = std::move(resp.solidity_code) }; +} + +// =========================================================================================== +// Chonk handlers +// =========================================================================================== + +template <> wire::BbChonkComputeVkResponse handle_chonk_compute_vk(BbRequest& ctx, wire::BbChonkComputeVk&& w) +{ + auto resp = + BbChonkComputeVk{ + .circuit = circuit_input_novk_from_wire(std::move(w.circuit)), + } + .execute(ctx); + return { .bytes = std::move(resp.bytes), .fields = field_vec_to_wire(resp.fields) }; +} + +template <> wire::BbChonkStartResponse handle_chonk_start(BbRequest& ctx, wire::BbChonkStart&& w) +{ + BbChonkStart{ .num_circuits = w.num_circuits }.execute(ctx); + return {}; +} + +template <> wire::BbChonkLoadResponse handle_chonk_load(BbRequest& ctx, wire::BbChonkLoad&& w) +{ + BbChonkLoad{ + .circuit = circuit_input_from_wire(std::move(w.circuit)), + } + .execute(ctx); + return {}; +} + +template <> wire::BbChonkAccumulateResponse handle_chonk_accumulate(BbRequest& ctx, wire::BbChonkAccumulate&& w) +{ + BbChonkAccumulate{ + .witness = std::move(w.witness), + } + .execute(ctx); + return {}; +} + +template <> wire::BbChonkProveResponse handle_chonk_prove(BbRequest& ctx, wire::BbChonkProve&& /*w*/) +{ + auto resp = BbChonkProve{}.execute(ctx); + return { .proof = chonk_proof_to_wire(resp.proof) }; +} + +template <> wire::BbChonkVerifyResponse handle_chonk_verify(BbRequest& ctx, wire::BbChonkVerify&& w) +{ + auto resp = + BbChonkVerify{ + .proof = chonk_proof_from_wire(std::move(w.proof)), + .vk = std::move(w.vk), + } + .execute(ctx); + return { .valid = resp.valid }; +} + +template <> wire::BbChonkBatchVerifyResponse handle_chonk_batch_verify(BbRequest& ctx, wire::BbChonkBatchVerify&& w) +{ + std::vector proofs; + proofs.reserve(w.proofs.size()); + for (auto& wp : w.proofs) { + proofs.push_back(chonk_proof_from_wire(std::move(wp))); + } + auto resp = + BbChonkBatchVerify{ + .proofs = std::move(proofs), + .vks = std::move(w.vks), + } + .execute(ctx); + return { .valid = resp.valid }; +} + +template <> +wire::BbChonkCheckPrecomputedVkResponse handle_chonk_check_precomputed_vk(BbRequest& ctx, + wire::BbChonkCheckPrecomputedVk&& w) +{ + auto resp = + BbChonkCheckPrecomputedVk{ + .circuit = circuit_input_from_wire(std::move(w.circuit)), + } + .execute(ctx); + return { .valid = resp.valid, .actual_vk = std::move(resp.actual_vk) }; +} + +template <> wire::BbChonkStatsResponse handle_chonk_stats(BbRequest& ctx, wire::BbChonkStats&& w) +{ + auto resp = + BbChonkStats{ + .circuit = circuit_input_novk_from_wire(std::move(w.circuit)), + .include_gates_per_opcode = w.include_gates_per_opcode, + } + .execute(ctx); + return { .acir_opcodes = resp.acir_opcodes, + .circuit_size = resp.circuit_size, + .gates_per_opcode = std::move(resp.gates_per_opcode) }; +} + +template <> +wire::BbChonkCompressProofResponse handle_chonk_compress_proof(BbRequest& ctx, wire::BbChonkCompressProof&& w) +{ + auto resp = + BbChonkCompressProof{ + .proof = chonk_proof_from_wire(std::move(w.proof)), + } + .execute(ctx); + return { .compressed_proof = std::move(resp.compressed_proof) }; +} + +template <> +wire::BbChonkDecompressProofResponse handle_chonk_decompress_proof(BbRequest& ctx, wire::BbChonkDecompressProof&& w) +{ + auto resp = + BbChonkDecompressProof{ + .compressed_proof = std::move(w.compressed_proof), + } + .execute(ctx); + return { .proof = chonk_proof_to_wire(resp.proof) }; +} + +template <> +wire::BbChonkBatchVerifierStartResponse handle_chonk_batch_verifier_start(BbRequest& ctx, + wire::BbChonkBatchVerifierStart&& w) +{ + BbChonkBatchVerifierStart{ + .vks = std::move(w.vks), + .num_cores = w.num_cores, + .batch_size = w.batch_size, + .fifo_path = std::move(w.fifo_path), + } + .execute(ctx); + return {}; +} + +template <> +wire::BbChonkBatchVerifierQueueResponse handle_chonk_batch_verifier_queue(BbRequest& ctx, + wire::BbChonkBatchVerifierQueue&& w) +{ + BbChonkBatchVerifierQueue{ + .request_id = w.request_id, + .vk_index = w.vk_index, + .proof_fields = field_vec_from_wire(w.proof_fields), + } + .execute(ctx); + return {}; +} + +template <> +wire::BbChonkBatchVerifierStopResponse handle_chonk_batch_verifier_stop(BbRequest& ctx, + wire::BbChonkBatchVerifierStop&& /*w*/) +{ + BbChonkBatchVerifierStop{}.execute(ctx); + return {}; +} + +// =========================================================================================== +// Crypto handlers +// =========================================================================================== + +template <> wire::BbPoseidon2HashResponse handle_poseidon2_hash(BbRequest& ctx, wire::BbPoseidon2Hash&& w) +{ + auto resp = + BbPoseidon2Hash{ + .inputs = field_vec_from_wire(w.inputs), + } + .execute(ctx); + return { .hash = field_to_wire(resp.hash) }; +} + +template <> +wire::BbPoseidon2PermutationResponse handle_poseidon2_permutation(BbRequest& ctx, wire::BbPoseidon2Permutation&& w) +{ + auto resp = + BbPoseidon2Permutation{ + .inputs = { field_from_wire(w.inputs[0]), + field_from_wire(w.inputs[1]), + field_from_wire(w.inputs[2]), + field_from_wire(w.inputs[3]) }, + } + .execute(ctx); + return { .outputs = { field_to_wire(resp.outputs[0]), + field_to_wire(resp.outputs[1]), + field_to_wire(resp.outputs[2]), + field_to_wire(resp.outputs[3]) } }; +} + +template <> wire::BbPedersenCommitResponse handle_pedersen_commit(BbRequest& ctx, wire::BbPedersenCommit&& w) +{ + auto resp = + BbPedersenCommit{ + .inputs = field_vec_from_wire(w.inputs), + .hash_index = w.hash_index, + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +template <> wire::BbPedersenHashResponse handle_pedersen_hash(BbRequest& ctx, wire::BbPedersenHash&& w) +{ + auto resp = + BbPedersenHash{ + .inputs = field_vec_from_wire(w.inputs), + .hash_index = w.hash_index, + } + .execute(ctx); + return { .hash = field_to_wire(resp.hash) }; +} + +template <> +wire::BbPedersenHashBufferResponse handle_pedersen_hash_buffer(BbRequest& ctx, wire::BbPedersenHashBuffer&& w) +{ + auto resp = + BbPedersenHashBuffer{ + .input = std::move(w.input), + .hash_index = w.hash_index, + } + .execute(ctx); + return { .hash = field_to_wire(resp.hash) }; +} + +template <> wire::BbBlake2sResponse handle_blake2s(BbRequest& ctx, wire::BbBlake2s&& w) +{ + auto resp = + BbBlake2s{ + .data = std::move(w.data), + } + .execute(ctx); + // Domain: std::array, Wire: Fr = std::array — same type + return { .hash = resp.hash }; +} + +template <> wire::BbBlake2sToFieldResponse handle_blake2s_to_field(BbRequest& ctx, wire::BbBlake2sToField&& w) +{ + auto resp = + BbBlake2sToField{ + .data = std::move(w.data), + } + .execute(ctx); + return { .field = field_to_wire(resp.field) }; +} + +template <> wire::BbAesEncryptResponse handle_aes_encrypt(BbRequest& ctx, wire::BbAesEncrypt&& w) +{ + auto resp = + BbAesEncrypt{ + .plaintext = std::move(w.plaintext), + .iv = vec_to_array<16>(w.iv), + .key = vec_to_array<16>(w.key), + .length = w.length, + } + .execute(ctx); + return { .ciphertext = std::move(resp.ciphertext) }; +} + +template <> wire::BbAesDecryptResponse handle_aes_decrypt(BbRequest& ctx, wire::BbAesDecrypt&& w) +{ + auto resp = + BbAesDecrypt{ + .ciphertext = std::move(w.ciphertext), + .iv = vec_to_array<16>(w.iv), + .key = vec_to_array<16>(w.key), + .length = w.length, + } + .execute(ctx); + return { .plaintext = std::move(resp.plaintext) }; +} + +// =========================================================================================== +// ECC handlers — Grumpkin +// =========================================================================================== + +template <> wire::BbGrumpkinMulResponse handle_grumpkin_mul(BbRequest& ctx, wire::BbGrumpkinMul&& w) +{ + auto resp = + BbGrumpkinMul{ + .point = point_from_wire(w.point), + .scalar = field_from_wire(w.scalar), + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +template <> wire::BbGrumpkinAddResponse handle_grumpkin_add(BbRequest& ctx, wire::BbGrumpkinAdd&& w) +{ + auto resp = + BbGrumpkinAdd{ + .point_a = point_from_wire(w.point_a), + .point_b = point_from_wire(w.point_b), + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +template <> wire::BbGrumpkinBatchMulResponse handle_grumpkin_batch_mul(BbRequest& ctx, wire::BbGrumpkinBatchMul&& w) +{ + std::vector points; + points.reserve(w.points.size()); + for (const auto& wp : w.points) { + points.push_back(point_from_wire(wp)); + } + auto resp = + BbGrumpkinBatchMul{ + .points = std::move(points), + .scalar = field_from_wire(w.scalar), + } + .execute(ctx); + std::vector wire_points; + wire_points.reserve(resp.points.size()); + for (const auto& p : resp.points) { + wire_points.push_back(point_to_wire(p)); + } + return { .points = std::move(wire_points) }; +} + +template <> +wire::BbGrumpkinGetRandomFrResponse handle_grumpkin_get_random_fr(BbRequest& ctx, wire::BbGrumpkinGetRandomFr&& /*w*/) +{ + auto resp = BbGrumpkinGetRandomFr{}.execute(ctx); + return { .value = field_to_wire(resp.value) }; +} + +template <> wire::BbGrumpkinReduce512Response handle_grumpkin_reduce512(BbRequest& ctx, wire::BbGrumpkinReduce512&& w) +{ + auto resp = + BbGrumpkinReduce512{ + .input = vec_to_array<64>(w.input), + } + .execute(ctx); + return { .value = field_to_wire(resp.value) }; +} + +// =========================================================================================== +// ECC handlers — Secp256k1 +// =========================================================================================== + +template <> wire::BbSecp256k1MulResponse handle_secp256k1_mul(BbRequest& ctx, wire::BbSecp256k1Mul&& w) +{ + auto resp = + BbSecp256k1Mul{ + .point = point_from_wire(w.point), + .scalar = field_from_wire(w.scalar), + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +template <> +wire::BbSecp256k1GetRandomFrResponse handle_secp256k1_get_random_fr(BbRequest& ctx, + wire::BbSecp256k1GetRandomFr&& /*w*/) +{ + auto resp = BbSecp256k1GetRandomFr{}.execute(ctx); + return { .value = field_to_wire(resp.value) }; +} + +template <> +wire::BbSecp256k1Reduce512Response handle_secp256k1_reduce512(BbRequest& ctx, wire::BbSecp256k1Reduce512&& w) +{ + auto resp = + BbSecp256k1Reduce512{ + .input = vec_to_array<64>(w.input), + } + .execute(ctx); + return { .value = field_to_wire(resp.value) }; +} + +// =========================================================================================== +// ECC handlers — BN254 +// =========================================================================================== + +template <> wire::BbBn254FrSqrtResponse handle_bn254_fr_sqrt(BbRequest& ctx, wire::BbBn254FrSqrt&& w) +{ + auto resp = + BbBn254FrSqrt{ + .input = field_from_wire(w.input), + } + .execute(ctx); + return { .is_square_root = resp.is_square_root, .value = field_to_wire(resp.value) }; +} + +template <> wire::BbBn254FqSqrtResponse handle_bn254_fq_sqrt(BbRequest& ctx, wire::BbBn254FqSqrt&& w) +{ + auto resp = + BbBn254FqSqrt{ + .input = field_from_wire(w.input), + } + .execute(ctx); + return { .is_square_root = resp.is_square_root, .value = field_to_wire(resp.value) }; +} + +template <> wire::BbBn254G1MulResponse handle_bn254_g1_mul(BbRequest& ctx, wire::BbBn254G1Mul&& w) +{ + auto resp = + BbBn254G1Mul{ + .point = point_from_wire(w.point), + .scalar = field_from_wire(w.scalar), + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +template <> wire::BbBn254G2MulResponse handle_bn254_g2_mul(BbRequest& ctx, wire::BbBn254G2Mul&& w) +{ + auto resp = + BbBn254G2Mul{ + .point = g2_point_from_wire(w.point), + .scalar = field_from_wire(w.scalar), + } + .execute(ctx); + return { .point = g2_point_to_wire(resp.point) }; +} + +template <> wire::BbBn254G1IsOnCurveResponse handle_bn254_g1_is_on_curve(BbRequest& ctx, wire::BbBn254G1IsOnCurve&& w) +{ + auto resp = + BbBn254G1IsOnCurve{ + .point = point_from_wire(w.point), + } + .execute(ctx); + return { .is_on_curve = resp.is_on_curve }; +} + +template <> +wire::BbBn254G1FromCompressedResponse handle_bn254_g1_from_compressed(BbRequest& ctx, wire::BbBn254G1FromCompressed&& w) +{ + // Wire: Fr compressed (array), Domain: std::array — same type + auto resp = + BbBn254G1FromCompressed{ + .compressed = w.compressed, + } + .execute(ctx); + return { .point = point_to_wire(resp.point) }; +} + +// =========================================================================================== +// Schnorr handlers +// =========================================================================================== + +template <> +wire::BbSchnorrComputePublicKeyResponse handle_schnorr_compute_public_key(BbRequest& ctx, + wire::BbSchnorrComputePublicKey&& w) +{ + auto resp = + BbSchnorrComputePublicKey{ + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + return { .public_key = point_to_wire(resp.public_key) }; +} + +template <> +wire::BbSchnorrConstructSignatureResponse handle_schnorr_construct_signature(BbRequest& ctx, + wire::BbSchnorrConstructSignature&& w) +{ + auto resp = + BbSchnorrConstructSignature{ + .message = std::move(w.message), + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + // Domain response: std::array s, e — Wire: Fr (= array) s, e — same type + return { .s = resp.s, .e = resp.e }; +} + +template <> +wire::BbSchnorrVerifySignatureResponse handle_schnorr_verify_signature(BbRequest& ctx, + wire::BbSchnorrVerifySignature&& w) +{ + // Wire s, e are Fr (array), domain s, e are std::array — same type + auto resp = + BbSchnorrVerifySignature{ + .message = std::move(w.message), + .public_key = point_from_wire(w.public_key), + .s = w.s, + .e = w.e, + } + .execute(ctx); + return { .verified = resp.verified }; +} + +// =========================================================================================== +// ECDSA handlers +// =========================================================================================== + +template <> +wire::BbEcdsaSecp256k1ComputePublicKeyResponse handle_ecdsa_secp256k1_compute_public_key( + BbRequest& ctx, wire::BbEcdsaSecp256k1ComputePublicKey&& w) +{ + auto resp = + BbEcdsaSecp256k1ComputePublicKey{ + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + return { .public_key = point_to_wire(resp.public_key) }; +} + +template <> +wire::BbEcdsaSecp256r1ComputePublicKeyResponse handle_ecdsa_secp256r1_compute_public_key( + BbRequest& ctx, wire::BbEcdsaSecp256r1ComputePublicKey&& w) +{ + auto resp = + BbEcdsaSecp256r1ComputePublicKey{ + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + return { .public_key = point_to_wire(resp.public_key) }; +} + +template <> +wire::BbEcdsaSecp256k1ConstructSignatureResponse handle_ecdsa_secp256k1_construct_signature( + BbRequest& ctx, wire::BbEcdsaSecp256k1ConstructSignature&& w) +{ + auto resp = + BbEcdsaSecp256k1ConstructSignature{ + .message = std::move(w.message), + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + // Domain r,s: array Wire r,s: Fr = array — same type + return { .r = resp.r, .s = resp.s, .v = resp.v }; +} + +template <> +wire::BbEcdsaSecp256r1ConstructSignatureResponse handle_ecdsa_secp256r1_construct_signature( + BbRequest& ctx, wire::BbEcdsaSecp256r1ConstructSignature&& w) +{ + auto resp = + BbEcdsaSecp256r1ConstructSignature{ + .message = std::move(w.message), + .private_key = field_from_wire(w.private_key), + } + .execute(ctx); + return { .r = resp.r, .s = resp.s, .v = resp.v }; +} + +template <> +wire::BbEcdsaSecp256k1RecoverPublicKeyResponse handle_ecdsa_secp256k1_recover_public_key( + BbRequest& ctx, wire::BbEcdsaSecp256k1RecoverPublicKey&& w) +{ + // Wire r,s: Fr = array; Domain r,s: array — same type + auto resp = + BbEcdsaSecp256k1RecoverPublicKey{ + .message = std::move(w.message), + .r = w.r, + .s = w.s, + .v = w.v, + } + .execute(ctx); + return { .public_key = point_to_wire(resp.public_key) }; +} + +template <> +wire::BbEcdsaSecp256r1RecoverPublicKeyResponse handle_ecdsa_secp256r1_recover_public_key( + BbRequest& ctx, wire::BbEcdsaSecp256r1RecoverPublicKey&& w) +{ + auto resp = + BbEcdsaSecp256r1RecoverPublicKey{ + .message = std::move(w.message), + .r = w.r, + .s = w.s, + .v = w.v, + } + .execute(ctx); + return { .public_key = point_to_wire(resp.public_key) }; +} + +template <> +wire::BbEcdsaSecp256k1VerifySignatureResponse handle_ecdsa_secp256k1_verify_signature( + BbRequest& ctx, wire::BbEcdsaSecp256k1VerifySignature&& w) +{ + auto resp = + BbEcdsaSecp256k1VerifySignature{ + .message = std::move(w.message), + .public_key = point_from_wire(w.public_key), + .r = w.r, + .s = w.s, + .v = w.v, + } + .execute(ctx); + return { .verified = resp.verified }; +} + +template <> +wire::BbEcdsaSecp256r1VerifySignatureResponse handle_ecdsa_secp256r1_verify_signature( + BbRequest& ctx, wire::BbEcdsaSecp256r1VerifySignature&& w) +{ + auto resp = + BbEcdsaSecp256r1VerifySignature{ + .message = std::move(w.message), + .public_key = point_from_wire(w.public_key), + .r = w.r, + .s = w.s, + .v = w.v, + } + .execute(ctx); + return { .verified = resp.verified }; +} + +// =========================================================================================== +// SRS handlers +// =========================================================================================== + +template <> wire::BbSrsInitSrsResponse handle_srs_init_srs(BbRequest& ctx, wire::BbSrsInitSrs&& w) +{ + auto resp = + BbSrsInitSrs{ + .points_buf = std::move(w.points_buf), + .num_points = w.num_points, + .g2_point = std::move(w.g2_point), + } + .execute(ctx); + return { .points_buf = std::move(resp.points_buf) }; +} + +template <> +wire::BbSrsInitGrumpkinSrsResponse handle_srs_init_grumpkin_srs(BbRequest& ctx, wire::BbSrsInitGrumpkinSrs&& w) +{ + BbSrsInitGrumpkinSrs{ + .points_buf = std::move(w.points_buf), + .num_points = w.num_points, + } + .execute(ctx); + return {}; +} + +// Explicit instantiation of the dispatch handler for BbRequest +template ::ipc::Handler make_bb_handler(BbRequest& ctx); + +} // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.cpp index c845a1f37cf1..e69cdbdfe3fc 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.cpp @@ -6,12 +6,12 @@ namespace bb::bbapi { -SchnorrComputePublicKey::Response SchnorrComputePublicKey::execute(BB_UNUSED BBApiRequest& request) && +BbSchnorrComputePublicKey::Response BbSchnorrComputePublicKey::execute(BB_UNUSED BbRequest& request) && { return { grumpkin::g1::one * private_key }; } -SchnorrConstructSignature::Response SchnorrConstructSignature::execute(BB_UNUSED BBApiRequest& request) && +BbSchnorrConstructSignature::Response BbSchnorrConstructSignature::execute(BB_UNUSED BbRequest& request) && { grumpkin::g1::affine_element pub_key = grumpkin::g1::one * private_key; crypto::schnorr_key_pair key_pair = { private_key, pub_key }; @@ -23,7 +23,7 @@ SchnorrConstructSignature::Response SchnorrConstructSignature::execute(BB_UNUSED return { sig.s, sig.e }; } -SchnorrVerifySignature::Response SchnorrVerifySignature::execute(BB_UNUSED BBApiRequest& request) && +BbSchnorrVerifySignature::Response BbSchnorrVerifySignature::execute(BB_UNUSED BbRequest& request) && { std::string message_str(reinterpret_cast(message.data()), message.size()); crypto::schnorr_signature sig = { s, e }; diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.hpp index a8617dbd2c55..e517be113013 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_schnorr.hpp @@ -10,7 +10,6 @@ #include "barretenberg/common/named_union.hpp" #include "barretenberg/crypto/schnorr/schnorr.hpp" #include "barretenberg/ecc/curves/grumpkin/grumpkin.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include #include @@ -18,58 +17,47 @@ namespace bb::bbapi { /** - * @struct SchnorrComputePublicKey + * @struct BbSchnorrComputePublicKey * @brief Compute Schnorr public key from private key */ -struct SchnorrComputePublicKey { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrComputePublicKey"; +struct BbSchnorrComputePublicKey { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrComputePublicKeyResponse"; grumpkin::g1::affine_element public_key; - SERIALIZATION_FIELDS(public_key); bool operator==(const Response&) const = default; }; grumpkin::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(private_key); - bool operator==(const SchnorrComputePublicKey&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSchnorrComputePublicKey&) const = default; }; /** - * @struct SchnorrConstructSignature + * @struct BbSchnorrConstructSignature * @brief Construct a Schnorr signature */ -struct SchnorrConstructSignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrConstructSignature"; +struct BbSchnorrConstructSignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrConstructSignatureResponse"; std::array s; std::array e; - SERIALIZATION_FIELDS(s, e); bool operator==(const Response&) const = default; }; std::vector message; // Variable length grumpkin::fr private_key; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, private_key); - bool operator==(const SchnorrConstructSignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSchnorrConstructSignature&) const = default; }; /** - * @struct SchnorrVerifySignature + * @struct BbSchnorrVerifySignature * @brief Verify a Schnorr signature */ -struct SchnorrVerifySignature { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrVerifySignature"; +struct BbSchnorrVerifySignature { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SchnorrVerifySignatureResponse"; bool verified; - SERIALIZATION_FIELDS(verified); bool operator==(const Response&) const = default; }; @@ -77,9 +65,8 @@ struct SchnorrVerifySignature { grumpkin::g1::affine_element public_key; std::array s; std::array e; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(message, public_key, s, e); - bool operator==(const SchnorrVerifySignature&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSchnorrVerifySignature&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp index 9dc0f0913e42..0c0b7ed73c76 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_shared.hpp @@ -74,7 +74,6 @@ struct CircuitInputNoVK { */ std::vector bytecode; - SERIALIZATION_FIELDS(name, bytecode); bool operator==(const CircuitInputNoVK& other) const = default; }; @@ -105,7 +104,6 @@ struct CircuitInput { */ std::vector verification_key; - SERIALIZATION_FIELDS(name, bytecode, verification_key); bool operator==(const CircuitInput& other) const = default; }; @@ -133,7 +131,6 @@ struct ProofSystemSettings { // TODO(md): remove this once considered stable bool optimized_solidity_verifier = false; - SERIALIZATION_FIELDS(ipa_accumulation, oracle_hash_type, disable_zk, optimized_solidity_verifier); bool operator==(const ProofSystemSettings& other) const = default; }; @@ -175,7 +172,7 @@ inline VkPolicy parse_vk_policy(const std::string& policy) class ChonkBatchVerifierService; #endif -struct BBApiRequest { +struct BbRequest { // Current depth of the IVC stack for this request uint32_t ivc_stack_depth = 0; std::shared_ptr ivc_in_progress; @@ -198,15 +195,13 @@ struct BBApiRequest { /** * @brief Error response returned when a command fails */ -struct ErrorResponse { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ErrorResponse"; +struct BbErrorResponse { std::string message; - SERIALIZATION_FIELDS(message); - bool operator==(const ErrorResponse&) const = default; + bool operator==(const BbErrorResponse&) const = default; }; /** - * @brief Macro to set error in BBApiRequest and return default response + * @brief Macro to set error in BbRequest and return default response */ #define BBAPI_ERROR(request, msg) \ do { \ @@ -214,17 +209,15 @@ struct ErrorResponse { return {}; \ } while (0) -struct Shutdown { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "Shutdown"; +struct BbShutdown { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "ShutdownResponse"; // Empty response - success indicated by no exception void msgpack(auto&& pack_fn) { pack_fn(); } bool operator==(const Response&) const = default; }; void msgpack(auto&& pack_fn) { pack_fn(); } - Response execute(const BBApiRequest&) && { return {}; } - bool operator==(const Shutdown&) const = default; + Response execute(const BbRequest&) && { return {}; } + bool operator==(const BbShutdown&) const = default; }; /** diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.cpp index 1225e844bd4e..352e9997ec46 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.cpp @@ -13,7 +13,7 @@ namespace bb::bbapi { -SrsInitSrs::Response SrsInitSrs::execute(BB_UNUSED BBApiRequest& request) && +BbSrsInitSrs::Response BbSrsInitSrs::execute(BB_UNUSED BbRequest& request) && { constexpr size_t COMPRESSED_POINT_SIZE = 32; constexpr size_t UNCOMPRESSED_POINT_SIZE = sizeof(g1::affine_element); // 64 @@ -59,7 +59,7 @@ SrsInitSrs::Response SrsInitSrs::execute(BB_UNUSED BBApiRequest& request) && return { .points_buf = std::move(uncompressed_out) }; } -SrsInitGrumpkinSrs::Response SrsInitGrumpkinSrs::execute(BB_UNUSED BBApiRequest& request) && +BbSrsInitGrumpkinSrs::Response BbSrsInitGrumpkinSrs::execute(BB_UNUSED BbRequest& request) && { // Validate buffer size before accessing raw pointer const size_t required_size = static_cast(num_points) * sizeof(curve::Grumpkin::AffineElement); diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.hpp index f59fc3ab4357..411941306258 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_srs.hpp @@ -7,54 +7,45 @@ */ #include "barretenberg/bbapi/bbapi_shared.hpp" #include "barretenberg/common/named_union.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include namespace bb::bbapi { /** - * @struct SrsInitSrs + * @struct BbSrsInitSrs * @brief Initialize BN254 SRS with G1 and G2 points */ -struct SrsInitSrs { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SrsInitSrs"; +struct BbSrsInitSrs { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SrsInitSrsResponse"; std::vector points_buf; // Uncompressed G1 points (64 bytes each), empty if input was already uncompressed - SERIALIZATION_FIELDS(points_buf); bool operator==(const Response&) const = default; }; std::vector points_buf; // G1 points: compressed (32 bytes each) or uncompressed (64 bytes each) uint32_t num_points; std::vector g2_point; // G2 point (128 bytes) - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(points_buf, num_points, g2_point); - bool operator==(const SrsInitSrs&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSrsInitSrs&) const = default; }; /** - * @struct SrsInitGrumpkinSrs + * @struct BbSrsInitGrumpkinSrs * @brief Initialize Grumpkin SRS with Grumpkin points */ -struct SrsInitGrumpkinSrs { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SrsInitGrumpkinSrs"; +struct BbSrsInitGrumpkinSrs { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "SrsInitGrumpkinSrsResponse"; uint8_t dummy = 0; // Empty response needs a dummy field for msgpack - SERIALIZATION_FIELDS(dummy); bool operator==(const Response&) const = default; }; std::vector points_buf; // Grumpkin affine elements uint32_t num_points; - Response execute(BBApiRequest& request) &&; - SERIALIZATION_FIELDS(points_buf, num_points); - bool operator==(const SrsInitGrumpkinSrs&) const = default; + Response execute(BbRequest& request) &&; + bool operator==(const BbSrsInitGrumpkinSrs&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.cpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.cpp index 470cada44001..cf3c855c3912 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.cpp @@ -39,7 +39,7 @@ std::shared_ptr> _compute_prover_instance(std::vector>(builder); auto final_time = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast(final_time - initial_time); - info("CircuitProve: Proving key computed in ", duration.count(), " ms"); + info("BbCircuitProve: Proving key computed in ", duration.count(), " ms"); // Validate consistency between IO type and IPA proof presence // IO::HasIPA indicates the circuit type requires IPA accumulation (rollup circuits) @@ -57,9 +57,9 @@ std::shared_ptr> _compute_prover_instance(std::vector -CircuitProve::Response _prove(std::vector&& bytecode, - std::vector&& witness, - std::vector&& vk_bytes) +BbCircuitProve::Response _prove(std::vector&& bytecode, + std::vector&& witness, + std::vector&& vk_bytes) { using Proof = typename Flavor::Transcript::Proof; using VerificationKey = typename Flavor::VerificationKey; @@ -86,7 +86,7 @@ CircuitProve::Response _prove(std::vector&& bytecode, size_t num_inner_public_inputs = num_public_inputs - IO::PUBLIC_INPUTS_SIZE; // Optimization: if vk not provided, include it in response - CircuitComputeVk::Response vk_response; + BbCircuitComputeVk::Response vk_response; if (vk_bytes.empty()) { vk_response = { .bytes = to_buffer(*vk), .fields = vk_to_uint256_fields(*vk), .hash = to_buffer(vk->hash()) }; } @@ -141,28 +141,28 @@ bool _verify(const std::vector& vk_bytes, return verified; } -CircuitProve::Response CircuitProve::execute(BB_UNUSED const BBApiRequest& request) && +BbCircuitProve::Response BbCircuitProve::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); return dispatch_by_settings(settings, [&]() { return _prove(std::move(circuit.bytecode), std::move(witness), std::move(circuit.verification_key)); }); } -CircuitComputeVk::Response CircuitComputeVk::execute(BB_UNUSED const BBApiRequest& request) && +BbCircuitComputeVk::Response BbCircuitComputeVk::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); return dispatch_by_settings(settings, [&]() { auto prover_instance = _compute_prover_instance(std::move(circuit.bytecode), {}); auto vk = std::make_shared(prover_instance->get_precomputed()); - return CircuitComputeVk::Response{ .bytes = to_buffer(*vk), - .fields = vk_to_uint256_fields(*vk), - .hash = to_buffer(vk->hash()) }; + return BbCircuitComputeVk::Response{ .bytes = to_buffer(*vk), + .fields = vk_to_uint256_fields(*vk), + .hash = to_buffer(vk->hash()) }; }); } template -CircuitStats::Response _stats(std::vector&& bytecode, bool include_gates_per_opcode) +BbCircuitStats::Response _stats(std::vector&& bytecode, bool include_gates_per_opcode) { using Circuit = typename Flavor::CircuitBuilder; // Parse the circuit to get gate count information @@ -170,7 +170,7 @@ CircuitStats::Response _stats(std::vector&& bytecode, bool include_gate acir_format::ProgramMetadata metadata = _create_program_metadata(); metadata.collect_gates_per_opcode = include_gates_per_opcode; - CircuitStats::Response response; + BbCircuitStats::Response response; response.num_acir_opcodes = static_cast(constraint_system.num_acir_opcodes); acir_format::AcirProgram program{ std::move(constraint_system), {} }; @@ -186,26 +186,26 @@ CircuitStats::Response _stats(std::vector&& bytecode, bool include_gate return response; } -CircuitStats::Response CircuitStats::execute(BB_UNUSED const BBApiRequest& request) && +BbCircuitStats::Response BbCircuitStats::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); return dispatch_by_settings(settings, [&]() { return _stats(std::move(circuit.bytecode), include_gates_per_opcode); }); } -CircuitVerify::Response CircuitVerify::execute(BB_UNUSED const BBApiRequest& request) && +BbCircuitVerify::Response BbCircuitVerify::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); bool verified = dispatch_by_settings(settings, [&]() { return _verify(verification_key, public_inputs, proof); }); return { verified }; } -VkAsFields::Response VkAsFields::execute(BB_UNUSED const BBApiRequest& request) && +BbVkAsFields::Response BbVkAsFields::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); using VK = UltraFlavor::VerificationKey; validate_vk_size(verification_key); @@ -218,9 +218,9 @@ VkAsFields::Response VkAsFields::execute(BB_UNUSED const BBApiRequest& request) return { std::move(fields) }; } -MegaVkAsFields::Response MegaVkAsFields::execute(BB_UNUSED const BBApiRequest& request) && +BbMegaVkAsFields::Response BbMegaVkAsFields::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); using VK = MegaFlavor::VerificationKey; validate_vk_size(verification_key); @@ -233,9 +233,9 @@ MegaVkAsFields::Response MegaVkAsFields::execute(BB_UNUSED const BBApiRequest& r return { std::move(fields) }; } -CircuitWriteSolidityVerifier::Response CircuitWriteSolidityVerifier::execute(BB_UNUSED const BBApiRequest& request) && +BbCircuitWriteSolidityVerifier::Response BbCircuitWriteSolidityVerifier::execute(BB_UNUSED const BbRequest& request) && { - BB_BENCH_NAME(MSGPACK_SCHEMA_NAME); + BB_BENCH_NAME(__func__); using VK = UltraKeccakFlavor::VerificationKey; validate_vk_size(verification_key); diff --git a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.hpp b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.hpp index 9ab37bbfd6cc..ee25858b40a7 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/bbapi_ultra_honk.hpp @@ -10,42 +10,36 @@ #include "barretenberg/common/named_union.hpp" #include "barretenberg/honk/proof_system/types/proof.hpp" #include "barretenberg/numeric/uint256/uint256.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include #include #include namespace bb::bbapi { -struct CircuitComputeVk { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitComputeVk"; +struct BbCircuitComputeVk { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitComputeVkResponse"; std::vector bytes; // Serialized verification key std::vector fields; // VK as field elements (unless keccak, then just uint256_t's) std::vector hash; // The VK hash - SERIALIZATION_FIELDS(bytes, fields, hash); bool operator==(const Response&) const = default; }; CircuitInputNoVK circuit; ProofSystemSettings settings; - SERIALIZATION_FIELDS(circuit, settings); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const CircuitComputeVk&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbCircuitComputeVk&) const = default; }; /** - * @struct CircuitProve + * @struct BbCircuitProve * @brief Represents a request to generate a proof. * Currently, UltraHonk is the only proving system supported by BB (after plonk was deprecated and removed). * This is used for one-shot proving, not our "IVC" scheme, Chonk. For that, use the Chonk* * commands. */ -struct CircuitProve { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitProve"; +struct BbCircuitProve { /** * @brief Contains proof and public inputs. @@ -53,62 +47,52 @@ struct CircuitProve { * Example uses of this Response would be verification in native BB, WASM BB, solidity or recursively through Noir. */ struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitProveResponse"; std::vector public_inputs; std::vector proof; - CircuitComputeVk::Response vk; - SERIALIZATION_FIELDS(public_inputs, proof, vk); + BbCircuitComputeVk::Response vk; bool operator==(const Response&) const = default; }; CircuitInput circuit; std::vector witness; ProofSystemSettings settings; - SERIALIZATION_FIELDS(circuit, witness, settings); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const CircuitProve&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbCircuitProve&) const = default; }; /** - * @struct CircuitStats + * @struct BbCircuitStats * @brief Consolidated command for retrieving circuit information. * Combines gate count, circuit size, and other metadata into a single command. */ -struct CircuitStats { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitStats"; +struct BbCircuitStats { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitInfoResponse"; uint32_t num_gates{}; uint32_t num_gates_dyadic{}; uint32_t num_acir_opcodes{}; std::vector gates_per_opcode; - SERIALIZATION_FIELDS(num_gates, num_gates_dyadic, num_acir_opcodes, gates_per_opcode); bool operator==(const Response&) const = default; }; CircuitInput circuit; bool include_gates_per_opcode = false; ProofSystemSettings settings; - SERIALIZATION_FIELDS(circuit, include_gates_per_opcode, settings); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const CircuitStats&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbCircuitStats&) const = default; }; /** - * @struct CircuitVerify + * @struct BbCircuitVerify * @brief Verify a proof against a verification key and public inputs. */ -struct CircuitVerify { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitVerify"; +struct BbCircuitVerify { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitVerifyResponse"; bool verified; - SERIALIZATION_FIELDS(verified); bool operator==(const Response&) const = default; }; @@ -116,76 +100,63 @@ struct CircuitVerify { std::vector public_inputs; std::vector proof; ProofSystemSettings settings; - SERIALIZATION_FIELDS(verification_key, public_inputs, proof, settings); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const CircuitVerify&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbCircuitVerify&) const = default; }; /** - * @struct VkAsFields + * @struct BbVkAsFields * @brief Convert a verification key to field elements representation. * WORKTODO(bbapi): this should become mostly obsolete with having the verification keys always reported as field elements as well, * and having a simpler serialization method. */ -struct VkAsFields { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "VkAsFields"; +struct BbVkAsFields { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "VkAsFieldsResponse"; std::vector fields; - SERIALIZATION_FIELDS(fields); bool operator==(const Response&) const = default; }; std::vector verification_key; - SERIALIZATION_FIELDS(verification_key); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const VkAsFields&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbVkAsFields&) const = default; }; /** - * @struct MegaVkAsFields + * @struct BbMegaVkAsFields * @brief Convert a MegaFlavor verification key to field elements representation. * Used for private function verification keys which use MegaFlavor (127 fields). */ -struct MegaVkAsFields { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "MegaVkAsFields"; +struct BbMegaVkAsFields { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "MegaVkAsFieldsResponse"; std::vector fields; - SERIALIZATION_FIELDS(fields); bool operator==(const Response&) const = default; }; std::vector verification_key; - SERIALIZATION_FIELDS(verification_key); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const MegaVkAsFields&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbMegaVkAsFields&) const = default; }; /** * @brief Command to generate Solidity verifier contract */ -struct CircuitWriteSolidityVerifier { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitWriteSolidityVerifier"; +struct BbCircuitWriteSolidityVerifier { struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CircuitWriteSolidityVerifierResponse"; std::string solidity_code; - SERIALIZATION_FIELDS(solidity_code); bool operator==(const Response&) const = default; }; std::vector verification_key; ProofSystemSettings settings; - SERIALIZATION_FIELDS(verification_key, settings); - Response execute(const BBApiRequest& request = {}) &&; - bool operator==(const CircuitWriteSolidityVerifier&) const = default; + Response execute(const BbRequest& request = {}) &&; + bool operator==(const BbCircuitWriteSolidityVerifier&) const = default; }; } // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/bbapi/c_bind.cpp b/barretenberg/cpp/src/barretenberg/bbapi/c_bind.cpp index dd74f8dcf759..74833a74f41c 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/c_bind.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/c_bind.cpp @@ -1,41 +1,29 @@ #include "c_bind.hpp" -#include "barretenberg/bbapi/bbapi_execute.hpp" #include "barretenberg/bbapi/bbapi_shared.hpp" -#include "barretenberg/common/throw_or_abort.hpp" +#include "barretenberg/bbapi/generated/bb_ipc_server.hpp" +#include "barretenberg/common/try_catch_shim.hpp" #include "barretenberg/serialize/msgpack_impl.hpp" -#ifndef NO_MULTITHREADING -#include -#endif namespace bb::bbapi { - -// Global BBApiRequest object in anonymous namespace namespace { // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) -BBApiRequest global_request; +BbRequest global_request; +// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) +auto global_handler = make_bb_handler(global_request); } // namespace +} // namespace bb::bbapi -/** - * @brief Main API function that processes commands and returns responses - * - * @param command The command to execute - * @return CommandResponse The response from executing the command - */ -CommandResponse bbapi(Command&& command) +// WASM entrypoint: raw msgpack bytes in → raw msgpack bytes out. +// Uses the same generated string-based dispatch as the IPC server. +// The input is [[CommandName, {payload}]], the output is [ResponseName, {payload}]. +WASM_EXPORT void bbapi(const uint8_t* input_in, size_t input_len_in, uint8_t** output_out, size_t* output_len_out) { -#ifndef BB_NO_EXCEPTIONS - try { -#endif - // Execute the command using the global request and return the response - return execute(global_request, std::move(command)); -#ifndef BB_NO_EXCEPTIONS - } catch (const std::exception& e) { - return ErrorResponse{ .message = e.what() }; - } -#endif -} + std::vector input(input_in, input_in + input_len_in); + auto output = bb::bbapi::global_handler(input); -} // namespace bb::bbapi - -// Use CBIND macro to export the bbapi function for WASM -CBIND_NOSCHEMA(bbapi, bb::bbapi::bbapi) + // Allocate output buffer (caller frees) + *output_len_out = output.size(); + // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) + *output_out = static_cast(aligned_alloc(64, output.size())); + memcpy(*output_out, output.data(), output.size()); +} diff --git a/barretenberg/cpp/src/barretenberg/bbapi/c_bind.hpp b/barretenberg/cpp/src/barretenberg/bbapi/c_bind.hpp index 7b7878d4412a..66ff84afd32e 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/c_bind.hpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/c_bind.hpp @@ -1,12 +1,5 @@ #pragma once -#include "barretenberg/bbapi/bbapi_execute.hpp" #include "barretenberg/serialize/cbind_fwd.hpp" -#include -namespace bb::bbapi { -// Function declaration for CLI usage -CommandResponse bbapi(Command&& command); -} // namespace bb::bbapi - -// Forward declaration for CBIND +// Forward declaration for WASM export CBIND_DECL(bbapi) diff --git a/barretenberg/cpp/src/barretenberg/bbapi/c_bind_exception.test.cpp b/barretenberg/cpp/src/barretenberg/bbapi/c_bind_exception.test.cpp index e38f71320b2c..8934aab76c58 100644 --- a/barretenberg/cpp/src/barretenberg/bbapi/c_bind_exception.test.cpp +++ b/barretenberg/cpp/src/barretenberg/bbapi/c_bind_exception.test.cpp @@ -1,62 +1,42 @@ #include "barretenberg/bbapi/bbapi_execute.hpp" -#include "barretenberg/bbapi/bbapi_srs.hpp" -#include "barretenberg/bbapi/c_bind.hpp" +#include "barretenberg/bbapi/generated/bb_ipc_server.hpp" #include -#include -#include +#include using namespace bb::bbapi; #ifndef BB_NO_EXCEPTIONS -// Test that exceptions thrown during command execution are caught and converted to ErrorResponse +// Test that exceptions thrown during command execution are caught by the generated dispatch TEST(CBind, CatchesExceptionAndReturnsErrorResponse) { - // Create an SrsInitSrs command with invalid data that will cause an exception - // The from_buffer calls in bbapi_srs.cpp will read past buffer boundaries - SrsInitSrs cmd; - cmd.num_points = 100; // Request 100 points (6400 bytes needed) - cmd.points_buf = std::vector(10, 0); // Only provide 10 bytes - will cause out of bounds access - cmd.g2_point = std::vector(10, 0); // Also too small (needs 128 bytes) - - Command command = std::move(cmd); - - // Call bbapi - exception should be caught and converted to ErrorResponse - CommandResponse response = bbapi(std::move(command)); - - // Check that we got an ErrorResponse using get_type_name() - std::string_view type_name = response.get_type_name(); - EXPECT_EQ(type_name, "ErrorResponse") << "Expected ErrorResponse but got: " << type_name; - - // Also verify using std::holds_alternative on the underlying variant - bool is_error = std::holds_alternative(response.get()); - EXPECT_TRUE(is_error) << "Expected ErrorResponse variant"; - - if (is_error) { - const auto& error = std::get(response.get()); - EXPECT_FALSE(error.message.empty()) << "Error message should not be empty"; - std::cout << "Successfully caught exception with message: " << error.message << '\n'; - } -} - -// Test that valid operations still work correctly (no false positives) -TEST(CBind, ValidOperationReturnsSuccess) -{ - // Create a Shutdown command which should succeed without throwing - Shutdown shutdown_cmd; - Command command = shutdown_cmd; - - // Call bbapi - should return success response - CommandResponse response = bbapi(std::move(command)); - - // Check that we got a ShutdownResponse, not an ErrorResponse - std::string_view type_name = response.get_type_name(); - EXPECT_NE(type_name, "ErrorResponse") << "Valid command should not return ErrorResponse"; - EXPECT_EQ(type_name, "ShutdownResponse") << "Expected ShutdownResponse"; - - // Also verify using std::holds_alternative on the underlying variant - bool is_shutdown = std::holds_alternative(response.get()); - EXPECT_TRUE(is_shutdown) << "Expected Shutdown::Response variant"; + // Create an invalid SRS command via wire types — too few bytes for the claimed num_points + wire::BbSrsInitSrs wire_cmd; + wire_cmd.num_points = 100; // Request 100 points + wire_cmd.points_buf = std::vector(10, 0); // Only 10 bytes — will fail + wire_cmd.g2_point = std::vector(10, 0); // Also too small + + // Serialize as [[CommandName, {payload}]] + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string("BbSrsInitSrs")); + pk.pack(wire_cmd); + + // Call the generated handler — exception should be caught and converted to error response + static BbRequest request; + auto handler = make_bb_handler(request); + auto response_bytes = handler(std::vector(buf.data(), buf.data() + buf.size())); + + // Parse response: [ResponseName, {payload}] + auto unpacked = msgpack::unpack(reinterpret_cast(response_bytes.data()), response_bytes.size()); + auto obj = unpacked.get(); + ASSERT_EQ(obj.type, msgpack::type::ARRAY); + ASSERT_EQ(obj.via.array.size, 2u); + + std::string resp_name(obj.via.array.ptr[0].via.str.ptr, obj.via.array.ptr[0].via.str.size); + EXPECT_EQ(resp_name, "BbErrorResponse") << "Expected error response but got: " << resp_name; } #else diff --git a/barretenberg/cpp/src/barretenberg/bbapi/wire_convert.hpp b/barretenberg/cpp/src/barretenberg/bbapi/wire_convert.hpp new file mode 100644 index 000000000000..4c25723afe1f --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/bbapi/wire_convert.hpp @@ -0,0 +1,79 @@ +#pragma once +/** + * @brief Conversion between wire types (Fr = array) and + * barretenberg domain types (bb::fr, grumpkin::fr, affine_element, etc.) + * + * Uses bb::field's own serialize_to_buffer / serialize_from_buffer methods + * which handle endian swap + Montgomery form conversion correctly. + */ + +#include +#include +#include + +namespace bb::bbapi { + +/// Wire field element: 32-byte serialized form +using Fr = std::array; + +// --------------------------------------------------------------------------- +// Field element conversion — delegates to bb::field's serialization +// --------------------------------------------------------------------------- + +template inline FieldType field_from_wire(const Fr& w) +{ + return FieldType::serialize_from_buffer(w.data()); +} + +template inline Fr field_to_wire(const FieldType& d) +{ + Fr r; + FieldType::serialize_to_buffer(d, r.data()); + return r; +} + +// --------------------------------------------------------------------------- +// Vector conversion +// --------------------------------------------------------------------------- + +template inline std::vector field_vec_from_wire(const std::vector& wire) +{ + std::vector result; + result.reserve(wire.size()); + for (const auto& w : wire) { + result.push_back(field_from_wire(w)); + } + return result; +} + +template inline std::vector field_vec_to_wire(const std::vector& domain) +{ + std::vector result; + result.reserve(domain.size()); + for (const auto& d : domain) { + result.push_back(field_to_wire(d)); + } + return result; +} + +// --------------------------------------------------------------------------- +// Affine element conversion (point = {Fq x, Fq y}) +// --------------------------------------------------------------------------- + +template inline AffineType point_from_wire(const WirePoint& w) +{ + AffineType r; + r.x = field_from_wire(w.x); + r.y = field_from_wire(w.y); + return r; +} + +template inline WirePoint point_to_wire(const AffineType& d) +{ + WirePoint r; + r.x = field_to_wire(d.x); + r.y = field_to_wire(d.y); + return r; +} + +} // namespace bb::bbapi diff --git a/barretenberg/cpp/src/barretenberg/benchmark/ipc_bench/ipc.bench.cpp b/barretenberg/cpp/src/barretenberg/benchmark/ipc_bench/ipc.bench.cpp index 6a9b8afcf011..a646ac37f20f 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/ipc_bench/ipc.bench.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/ipc_bench/ipc.bench.cpp @@ -1,4 +1,4 @@ -#include "barretenberg/bbapi/bbapi.hpp" +#include "barretenberg/bbapi/generated/bb_types.hpp" #include "barretenberg/crypto/poseidon2/poseidon2.hpp" #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/ipc/ipc_client.hpp" @@ -16,7 +16,9 @@ #include using namespace benchmark; +using Fr = std::array; using namespace bb; +using Fr = std::array; namespace { @@ -161,13 +163,22 @@ template class Poseidon2BBMsgpack : while (!stop_background.load(std::memory_order_relaxed)) { // Create Poseidon2Hash command - bb::bbapi::Poseidon2Hash hash_cmd; - hash_cmd.inputs = { uint256_t(bx), uint256_t(by) }; - bb::bbapi::Command command{ std::move(hash_cmd) }; + bb::bbapi::wire::BbPoseidon2Hash hash_cmd; + { + Fr fr_x; + std::memcpy(fr_x.data(), &bx, 32); + Fr fr_y; + std::memcpy(fr_y.data(), &by, 32); + hash_cmd.inputs = { fr_x, fr_y }; + } // Serialize command with tuple wrapping for CBIND compatibility msgpack::sbuffer cmd_buffer; - msgpack::pack(cmd_buffer, std::make_tuple(command)); + msgpack::packer pk(cmd_buffer); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string("BbPoseidon2Hash")); + pk.pack(hash_cmd); // Send with retry on backpressure (100ms timeout) constexpr uint64_t TIMEOUT_NS = 100000000; // 100ms @@ -214,12 +225,15 @@ template class Poseidon2BBMsgpack : // Send Shutdown command to bb so it exits gracefully (use client 0) if (clients[0]) { // Create Shutdown command - bb::bbapi::Shutdown shutdown_cmd; - bb::bbapi::Command command{ std::move(shutdown_cmd) }; + bb::bbapi::wire::BbShutdown shutdown_cmd; // Serialize command with tuple wrapping for CBIND compatibility msgpack::sbuffer cmd_buffer; - msgpack::pack(cmd_buffer, std::make_tuple(command)); + msgpack::packer pk(cmd_buffer); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string("BbShutdown")); + pk.pack(shutdown_cmd); // Send shutdown command with retry (1s timeout) constexpr uint64_t TIMEOUT_NS = 1000000000; // 1 second @@ -261,13 +275,22 @@ template class Poseidon2BBMsgpack : for (auto _ : state) { // Create Poseidon2Hash command - bb::bbapi::Poseidon2Hash hash_cmd; - hash_cmd.inputs = { uint256_t(x), uint256_t(y) }; - bb::bbapi::Command command{ std::move(hash_cmd) }; + bb::bbapi::wire::BbPoseidon2Hash hash_cmd; + { + Fr fr_x; + std::memcpy(fr_x.data(), &x, 32); + Fr fr_y; + std::memcpy(fr_y.data(), &y, 32); + hash_cmd.inputs = { fr_x, fr_y }; + } // Serialize command with tuple wrapping for CBIND compatibility msgpack::sbuffer cmd_buffer; - msgpack::pack(cmd_buffer, std::make_tuple(command)); + msgpack::packer pk(cmd_buffer); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string("BbPoseidon2Hash")); + pk.pack(hash_cmd); // Send command with retry on backpressure while (!clients[0]->send(cmd_buffer.data(), cmd_buffer.size(), TIMEOUT_NS)) { @@ -280,23 +303,28 @@ template class Poseidon2BBMsgpack : // Response not ready, retry } - // Deserialize response + // Deserialize response: wire format is [name, payload] auto unpacked = msgpack::unpack(reinterpret_cast(resp.data()), resp.size()); - bb::bbapi::CommandResponse response; - unpacked.get().convert(response); + auto arr = unpacked.get().via.array; + if (arr.size != 2) { + clients[0]->release(resp.size()); + state.SkipWithError("Invalid response format"); + break; + } + std::string resp_name; + arr.ptr[0].convert(resp_name); + if (resp_name != "BbPoseidon2HashResponse") { + clients[0]->release(resp.size()); + state.SkipWithError("Unexpected response type"); + break; + } + bb::bbapi::wire::BbPoseidon2HashResponse hash_response; + arr.ptr[1].convert(hash_response); // Release the message clients[0]->release(resp.size()); - // Extract hash from response - const auto& response_variant = static_cast(response); - const auto* hash_response = std::get_if(&response_variant); - if (hash_response == nullptr) { - state.SkipWithError("Invalid response type"); - break; - } - - auto hash = hash_response->hash; + auto hash = hash_response.hash; DoNotOptimize(hash); } } diff --git a/barretenberg/cpp/src/barretenberg/cdb/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/cdb/CMakeLists.txt index 190ce5d3a7c4..9062aa07801c 100644 --- a/barretenberg/cpp/src/barretenberg/cdb/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/cdb/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT(FUZZING) AND NOT(WASM)) add_library( cdb_ipc_client STATIC - cdb_ipc_client_generated.cpp + generated/cdb_ipc_client.cpp cdb_ipc_client.cpp ) target_link_libraries( diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_commands.hpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_commands.hpp deleted file mode 100644 index 224fddb96c5c..000000000000 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_commands.hpp +++ /dev/null @@ -1,226 +0,0 @@ -#pragma once -/** - * @file cdb_commands.hpp - * @brief NamedUnion command structs for the aztec-cdb contracts 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(CdbRequest&) && method (implemented in cdb_execute.cpp) - */ - -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/vm2/common/aztec_types.hpp" -#include "barretenberg/vm2/common/field.hpp" - -#include -#include -#include - -namespace bb::cdb { - -// Forward declaration -struct CdbRequest; - -// --------------------------------------------------------------------------- -// Contract queries (matching ContractDBInterface) -// --------------------------------------------------------------------------- - -struct CdbGetContractInstance { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractInstance"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractInstanceResponse"; - std::optional instance; - SERIALIZATION_FIELDS(instance); - bool operator==(const Response&) const = default; - }; - avm2::AztecAddress address; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(address, forkId); - bool operator==(const CdbGetContractInstance&) const = default; -}; - -struct CdbGetContractClass { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractClass"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractClassResponse"; - std::optional contractClass; - SERIALIZATION_FIELDS(contractClass); - bool operator==(const Response&) const = default; - }; - avm2::ContractClassId classId; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(classId, forkId); - bool operator==(const CdbGetContractClass&) const = default; -}; - -struct CdbGetBytecodeCommitment { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetBytecodeCommitment"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetBytecodeCommitmentResponse"; - std::optional commitment; - SERIALIZATION_FIELDS(commitment); - bool operator==(const Response&) const = default; - }; - avm2::ContractClassId classId; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(classId, forkId); - bool operator==(const CdbGetBytecodeCommitment&) const = default; -}; - -struct CdbGetDebugFunctionName { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetDebugFunctionName"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetDebugFunctionNameResponse"; - std::optional name; - SERIALIZATION_FIELDS(name); - bool operator==(const Response&) const = default; - }; - avm2::AztecAddress address; - avm2::FunctionSelector selector; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(address, selector, forkId); - bool operator==(const CdbGetDebugFunctionName&) const = default; -}; - -// --------------------------------------------------------------------------- -// Contract mutation (used by AVM during simulation) -// --------------------------------------------------------------------------- - -struct CdbAddContracts { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContracts"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContractsResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - avm2::ContractDeploymentData contractDeploymentData; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(contractDeploymentData, forkId); - bool operator==(const CdbAddContracts&) const = default; -}; - -// --------------------------------------------------------------------------- -// Checkpoint operations (tx-scoped rollback support) -// --------------------------------------------------------------------------- - -struct CdbCreateCheckpoint { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbCreateCheckpoint"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbCreateCheckpointResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(forkId); - bool operator==(const CdbCreateCheckpoint&) const = default; -}; - -struct CdbCommitCheckpoint { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbCommitCheckpoint"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbCommitCheckpointResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(forkId); - bool operator==(const CdbCommitCheckpoint&) const = default; -}; - -struct CdbRevertCheckpoint { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbRevertCheckpoint"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbRevertCheckpointResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - uint64_t forkId = 0; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(forkId); - bool operator==(const CdbRevertCheckpoint&) const = default; -}; - -// --------------------------------------------------------------------------- -// Management operations (used by TS node to populate store) -// --------------------------------------------------------------------------- - -struct CdbAddContractClass { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContractClass"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContractClassResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - avm2::ContractClass contractClass; - avm2::FF bytecodeCommitment; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(contractClass, bytecodeCommitment); - bool operator==(const CdbAddContractClass&) const = default; -}; - -struct CdbAddContractInstance { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContractInstance"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbAddContractInstanceResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - avm2::AztecAddress address; - avm2::ContractInstance instance; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(address, instance); - bool operator==(const CdbAddContractInstance&) const = default; -}; - -struct CdbRegisterFunctionSignatures { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbRegisterFunctionSignatures"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbRegisterFunctionSignaturesResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - std::vector signatures; - Response execute(CdbRequest& request) &&; - SERIALIZATION_FIELDS(signatures); - bool operator==(const CdbRegisterFunctionSignatures&) const = default; -}; - -struct CdbGetContractClassIds { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractClassIds"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbGetContractClassIdsResponse"; - std::vector classIds; - SERIALIZATION_FIELDS(classIds); - bool operator==(const Response&) const = default; - }; - Response execute(CdbRequest& request) &&; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const CdbGetContractClassIds&) const = default; -}; - -// --------------------------------------------------------------------------- -// Lifecycle -// --------------------------------------------------------------------------- - -struct CdbShutdown { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbShutdown"; - struct Response { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbShutdownResponse"; - void msgpack(auto&& pack_fn) { pack_fn(); } - bool operator==(const Response&) const = default; - }; - void msgpack(auto&& pack_fn) { pack_fn(); } - Response execute(CdbRequest& request) &&; - bool operator==(const CdbShutdown&) const = default; -}; - -} // namespace bb::cdb diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_execute.hpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_execute.hpp index 7a7f8adbde5b..3c70d8fbb4e1 100644 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_execute.hpp +++ b/barretenberg/cpp/src/barretenberg/cdb/cdb_execute.hpp @@ -1,57 +1,11 @@ #pragma once /** * @file cdb_execute.hpp - * @brief CdbCommand NamedUnion, CdbRequest context, and dispatch function. + * @brief CDB is a TypeScript server — no C++ request context needed. + * This header exists for consistency with other services. */ -#include "barretenberg/cdb/cdb_commands.hpp" -#include "barretenberg/common/named_union.hpp" - namespace bb::cdb { - -/** - * @brief Error response returned when a command fails. - */ -struct CdbErrorResponse { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "CdbErrorResponse"; - std::string message; - SERIALIZATION_FIELDS(message); - bool operator==(const CdbErrorResponse&) const = default; -}; - -/** - * @brief Union of all cdb commands (request types). - */ -using CdbCommand = NamedUnion; - -/** - * @brief Union of all cdb response types. - */ -using CdbCommandResponse = NamedUnion; - +// CDB commands are executed by the TypeScript server. +// The C++ side only uses the generated IPC client (cdb_ipc_client_gen.hpp). } // namespace bb::cdb diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.cpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.cpp index ab2d228fc35e..44b1ab9db9a1 100644 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.cpp +++ b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.cpp @@ -1,7 +1,107 @@ #include "barretenberg/cdb/cdb_ipc_client.hpp" +#include + namespace bb::cdb { +namespace { + +// --------------------------------------------------------------------------- +// Wire ↔ domain conversion helpers (big-endian canonical ↔ Montgomery form) +// --------------------------------------------------------------------------- + +inline Fr fr_to_wire(const bb::fr& d) +{ + Fr r; + bb::fr::serialize_to_buffer(d, r.data()); + return r; +} + +inline bb::fr fr_from_wire(const Fr& w) +{ + return bb::fr::serialize_from_buffer(w.data()); +} + +inline avm2::PublicKeys public_keys_from_wire(const wire::PublicKeys& w) +{ + return avm2::PublicKeys{ + .nullifier_key = { fr_from_wire(w.masterNullifierPublicKey.x), fr_from_wire(w.masterNullifierPublicKey.y) }, + .incoming_viewing_key = { fr_from_wire(w.masterIncomingViewingPublicKey.x), + fr_from_wire(w.masterIncomingViewingPublicKey.y) }, + .outgoing_viewing_key = { fr_from_wire(w.masterOutgoingViewingPublicKey.x), + fr_from_wire(w.masterOutgoingViewingPublicKey.y) }, + .tagging_key = { fr_from_wire(w.masterTaggingPublicKey.x), fr_from_wire(w.masterTaggingPublicKey.y) }, + }; +} + +inline avm2::ContractInstance contract_instance_from_wire(const wire::ContractInstance& w) +{ + return avm2::ContractInstance{ + .salt = fr_from_wire(w.salt), + .deployer = fr_from_wire(w.deployer), + .current_contract_class_id = fr_from_wire(w.currentContractClassId), + .original_contract_class_id = fr_from_wire(w.originalContractClassId), + .initialization_hash = fr_from_wire(w.initializationHash), + .public_keys = public_keys_from_wire(w.publicKeys), + }; +} + +inline avm2::ContractClass contract_class_from_wire(const wire::ContractClass& w) +{ + return avm2::ContractClass{ + .id = fr_from_wire(w.id), + .artifact_hash = fr_from_wire(w.artifactHash), + .private_functions_root = fr_from_wire(w.privateFunctionsRoot), + .packed_bytecode = w.packedBytecode, + }; +} + +inline wire::ContractClassLogFields contract_class_log_fields_to_wire(const avm2::ContractClassLogFields& d) +{ + wire::ContractClassLogFields r; + r.fields.reserve(d.fields.size()); + for (const auto& f : d.fields) { + r.fields.push_back(fr_to_wire(f)); + } + return r; +} + +inline wire::ContractClassLog contract_class_log_to_wire(const avm2::ContractClassLog& d) +{ + return wire::ContractClassLog{ + .contractAddress = fr_to_wire(d.contract_address), + .fields = contract_class_log_fields_to_wire(d.fields), + .emittedLength = d.emitted_length, + }; +} + +inline wire::PrivateLog private_log_to_wire(const avm2::PrivateLog& d) +{ + wire::PrivateLog r; + r.fields.reserve(d.fields.size()); + for (const auto& f : d.fields) { + r.fields.push_back(fr_to_wire(f)); + } + r.emittedLength = d.emitted_length; + return r; +} + +inline wire::ContractDeploymentData contract_deployment_data_to_wire(const avm2::ContractDeploymentData& d) +{ + wire::ContractDeploymentData r; + r.contractClassLogs.reserve(d.contract_class_logs.size()); + for (const auto& log : d.contract_class_logs) { + r.contractClassLogs.push_back(contract_class_log_to_wire(log)); + } + r.privateLogs.reserve(d.private_logs.size()); + for (const auto& log : d.private_logs) { + r.privateLogs.push_back(private_log_to_wire(log)); + } + return r; +} + +} // anonymous namespace + CdbIpcContractDB::CdbIpcContractDB(const std::string& socket_path) : client_(std::make_unique(socket_path)) {} @@ -10,48 +110,61 @@ CdbIpcContractDB::~CdbIpcContractDB() = default; std::optional CdbIpcContractDB::get_contract_instance(const avm2::AztecAddress& address) const { - auto resp = client_->get_contract_instance(CdbGetContractInstance{ .address = address, .forkId = fork_id_ }); - return resp.instance; + auto resp = client_->get_contract_instance( + wire::CdbGetContractInstance{ .address = fr_to_wire(address), .forkId = fork_id_ }); + if (!resp.instance.has_value()) { + return std::nullopt; + } + return contract_instance_from_wire(*resp.instance); } std::optional CdbIpcContractDB::get_contract_class(const avm2::ContractClassId& class_id) const { - auto resp = client_->get_contract_class(CdbGetContractClass{ .classId = class_id, .forkId = fork_id_ }); - return resp.contractClass; + auto resp = + client_->get_contract_class(wire::CdbGetContractClass{ .classId = fr_to_wire(class_id), .forkId = fork_id_ }); + if (!resp.contractClass.has_value()) { + return std::nullopt; + } + return contract_class_from_wire(*resp.contractClass); } std::optional CdbIpcContractDB::get_bytecode_commitment(const avm2::ContractClassId& class_id) const { - auto resp = client_->get_bytecode_commitment(CdbGetBytecodeCommitment{ .classId = class_id, .forkId = fork_id_ }); - return resp.commitment; + auto resp = client_->get_bytecode_commitment( + wire::CdbGetBytecodeCommitment{ .classId = fr_to_wire(class_id), .forkId = fork_id_ }); + if (!resp.commitment.has_value()) { + return std::nullopt; + } + return fr_from_wire(*resp.commitment); } std::optional CdbIpcContractDB::get_debug_function_name(const avm2::AztecAddress& address, const avm2::FunctionSelector& selector) const { - auto resp = client_->get_debug_function_name( - CdbGetDebugFunctionName{ .address = address, .selector = selector, .forkId = fork_id_ }); + auto resp = client_->get_debug_function_name(wire::CdbGetDebugFunctionName{ + .address = fr_to_wire(address), .selector = fr_to_wire(selector), .forkId = fork_id_ }); return resp.name; } void CdbIpcContractDB::add_contracts(const avm2::ContractDeploymentData& contract_deployment_data) { - client_->add_contracts(CdbAddContracts{ .contractDeploymentData = contract_deployment_data, .forkId = fork_id_ }); + client_->add_contracts(wire::CdbAddContracts{ + .contractDeploymentData = contract_deployment_data_to_wire(contract_deployment_data), .forkId = fork_id_ }); } void CdbIpcContractDB::create_checkpoint() { - client_->create_checkpoint(CdbCreateCheckpoint{ .forkId = fork_id_ }); + client_->create_checkpoint(wire::CdbCreateCheckpoint{ .forkId = fork_id_ }); } void CdbIpcContractDB::commit_checkpoint() { - client_->commit_checkpoint(CdbCommitCheckpoint{ .forkId = fork_id_ }); + client_->commit_checkpoint(wire::CdbCommitCheckpoint{ .forkId = fork_id_ }); } void CdbIpcContractDB::revert_checkpoint() { - client_->revert_checkpoint(CdbRevertCheckpoint{ .forkId = fork_id_ }); + client_->revert_checkpoint(wire::CdbRevertCheckpoint{ .forkId = fork_id_ }); } } // namespace bb::cdb diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.hpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.hpp index 34ce80421c1d..1b024a7e0c7c 100644 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.hpp +++ b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client.hpp @@ -7,7 +7,7 @@ * auto-generated client. */ -#include "barretenberg/cdb/cdb_ipc_client_generated.hpp" +#include "barretenberg/cdb/generated/cdb_ipc_client.hpp" #include "barretenberg/vm2/simulation/interfaces/db.hpp" #include diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.cpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.cpp deleted file mode 100644 index 8c965be9a40b..000000000000 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// AUTOGENERATED FILE - DO NOT EDIT - -#include "barretenberg/cdb/cdb_ipc_client_generated.hpp" -#include "barretenberg/cdb/cdb_execute.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/serialize/msgpack_impl.hpp" - -#include -#include - -namespace bb::cdb { - -CdbIpcClient::CdbIpcClient(const std::string& socket_path) - : client_(ipc::IpcClient::create_socket(socket_path)) -{ - if (!client_->connect()) { - throw std::runtime_error("Failed to connect to server at " + socket_path); - } -} - -CdbIpcClient::~CdbIpcClient() -{ - if (client_) { - client_->close(); - } -} - -template typename Cmd::Response CdbIpcClient::send(Cmd&& cmd) const -{ - // Wrap command in CdbCommand NamedUnion, then in a 1-element tuple (matches server expectations) - CdbCommand command = std::forward(cmd); - auto wrapped = std::make_tuple(std::move(command)); - - // Serialize to msgpack - msgpack::sbuffer send_buffer; - msgpack::pack(send_buffer, wrapped); - - // Send to server - constexpr uint64_t timeout_ns = 30'000'000'000ULL; // 30 seconds - if (!client_->send(send_buffer.data(), send_buffer.size(), timeout_ns)) { - throw std::runtime_error("Failed to send command to server"); - } - - // Receive response - auto response_span = client_->receive(timeout_ns); - if (response_span.empty()) { - throw std::runtime_error("Empty response from server"); - } - - // Deserialize response - auto unpacked = msgpack::unpack(reinterpret_cast(response_span.data()), response_span.size()); - auto response_obj = unpacked.get(); - - CdbCommandResponse response; - response_obj.convert(response); - - // Release the receive buffer - client_->release(response_span.size()); - - // Check for error response - return std::move(response).visit([](auto&& resp) -> typename Cmd::Response { - using RespType = std::decay_t; - - if constexpr (std::is_same_v) { - throw std::runtime_error("Server error: " + resp.message); - } else if constexpr (std::is_same_v) { - return std::forward(resp); - } else { - throw std::runtime_error("Unexpected response type from server"); - } - }); -} - -CdbGetContractInstance::Response CdbIpcClient::get_contract_instance(CdbGetContractInstance cmd) const -{ - return send(std::move(cmd)); -} - -CdbGetContractClass::Response CdbIpcClient::get_contract_class(CdbGetContractClass cmd) const -{ - return send(std::move(cmd)); -} - -CdbGetBytecodeCommitment::Response CdbIpcClient::get_bytecode_commitment(CdbGetBytecodeCommitment cmd) -{ - return send(std::move(cmd)); -} - -CdbGetDebugFunctionName::Response CdbIpcClient::get_debug_function_name(CdbGetDebugFunctionName cmd) const -{ - return send(std::move(cmd)); -} - -void CdbIpcClient::add_contracts(CdbAddContracts cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::create_checkpoint(CdbCreateCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::commit_checkpoint(CdbCommitCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::revert_checkpoint(CdbRevertCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::add_contract_class(CdbAddContractClass cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::add_contract_instance(CdbAddContractInstance cmd) -{ - send(std::move(cmd)); -} - -void CdbIpcClient::register_function_signatures(CdbRegisterFunctionSignatures cmd) -{ - send(std::move(cmd)); -} - -CdbGetContractClassIds::Response CdbIpcClient::get_contract_class_ids() const -{ - return send(CdbGetContractClassIds{}); -} - -void CdbIpcClient::shutdown() -{ - send(CdbShutdown{}); -} - -} // namespace bb::cdb diff --git a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.hpp b/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.hpp deleted file mode 100644 index ef48b0de12d9..000000000000 --- a/barretenberg/cpp/src/barretenberg/cdb/cdb_ipc_client_generated.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// AUTOGENERATED FILE - DO NOT EDIT -#pragma once - -#include "barretenberg/cdb/cdb_execute.hpp" -#include "barretenberg/common/try_catch_shim.hpp" -#include "barretenberg/ipc/ipc_client.hpp" - -#include -#include - -namespace bb::cdb { - -/** - * @brief Auto-generated IPC client. - * - * Each method sends a msgpack-serialized command to the server over UDS - * and returns the typed response. All methods block until the response arrives. - */ -class CdbIpcClient { - public: - explicit CdbIpcClient(const std::string& socket_path); - ~CdbIpcClient(); - - CdbIpcClient(const CdbIpcClient&) = delete; - CdbIpcClient& operator=(const CdbIpcClient&) = delete; - - CdbGetContractInstance::Response get_contract_instance(CdbGetContractInstance cmd) const; - CdbGetContractClass::Response get_contract_class(CdbGetContractClass cmd) const; - CdbGetBytecodeCommitment::Response get_bytecode_commitment(CdbGetBytecodeCommitment cmd); - CdbGetDebugFunctionName::Response get_debug_function_name(CdbGetDebugFunctionName cmd) const; - void add_contracts(CdbAddContracts cmd); - void create_checkpoint(CdbCreateCheckpoint cmd); - void commit_checkpoint(CdbCommitCheckpoint cmd); - void revert_checkpoint(CdbRevertCheckpoint cmd); - void add_contract_class(CdbAddContractClass cmd); - void add_contract_instance(CdbAddContractInstance cmd); - void register_function_signatures(CdbRegisterFunctionSignatures cmd); - CdbGetContractClassIds::Response get_contract_class_ids() const; - void shutdown(); - - private: - template typename Cmd::Response send(Cmd&& cmd) const; - - mutable std::unique_ptr client_; -}; - -} // namespace bb::cdb diff --git a/barretenberg/cpp/src/barretenberg/cdb/cli.cpp b/barretenberg/cpp/src/barretenberg/cdb/cli.cpp index 06df5abb281a..057422e916b7 100644 --- a/barretenberg/cpp/src/barretenberg/cdb/cli.cpp +++ b/barretenberg/cpp/src/barretenberg/cdb/cli.cpp @@ -1,7 +1,4 @@ #include "barretenberg/cdb/cli.hpp" -#include "barretenberg/cdb/cdb_execute.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/serialize/msgpack_impl.hpp" #include "barretenberg/bb/deps/cli11.hpp" #include @@ -9,35 +6,11 @@ namespace bb::cdb { -namespace { - -struct CdbApi { - CdbCommand commands; - CdbCommandResponse responses; - SERIALIZATION_FIELDS(commands, responses); -}; - -std::string get_cdb_schema_as_json() -{ - return msgpack_schema_to_string(CdbApi{}); -} - -} // namespace - int parse_and_run_cdb(int argc, char* argv[]) { - CLI::App app{ "aztec-cdb: Contract database schema provider" }; + CLI::App app{ "aztec-cdb: Contract database IPC server" }; app.require_subcommand(1); - // ----------------------------------------------------------------------- - // Subcommand: msgpack - // ----------------------------------------------------------------------- - CLI::App* msgpack_command = app.add_subcommand("msgpack", "Msgpack API interface."); - - // msgpack schema - CLI::App* msgpack_schema_command = - msgpack_command->add_subcommand("schema", "Output a msgpack schema encoded as JSON to stdout."); - // Parse CLI try { app.parse(argc, argv); @@ -45,16 +18,6 @@ int parse_and_run_cdb(int argc, char* argv[]) return app.exit(e); } - try { - if (msgpack_schema_command->parsed()) { - std::cout << get_cdb_schema_as_json() << std::endl; - return 0; - } - } catch (const std::exception& e) { - std::cerr << "Error: " << e.what() << '\n'; - return 1; - } - return 0; } diff --git a/barretenberg/cpp/src/barretenberg/common/parent_monitor.hpp b/barretenberg/cpp/src/barretenberg/common/parent_monitor.hpp new file mode 100644 index 000000000000..3c80fc6e3bde --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/common/parent_monitor.hpp @@ -0,0 +1,81 @@ +#pragma once +/** + * @brief Platform-specific parent death monitoring. + * + * Ensures a child process exits when its parent (e.g. Node.js) dies. + * Call once at startup before entering the main event loop. + * + * - Linux: uses prctl(PR_SET_PDEATHSIG) to receive SIGTERM when parent exits. + * - macOS: spawns a kqueue thread that sets the shutdown flag when parent exits. + * + * Header-only — no .cpp needed. + */ + +#include +#include +#include + +#ifdef __linux__ +#include +#include +#include +#elif defined(__APPLE__) +#include +#include +#include +#endif + +namespace bb { + +/** + * @brief Monitor the parent process and invoke a callback when it exits. + * + * On Linux, this requests SIGTERM delivery when the parent dies. The caller's + * SIGTERM handler will fire — the callback is only invoked if the parent has + * already exited (race condition check). + * + * On macOS, this spawns a background thread that invokes the callback directly. + * + * @param on_parent_exit Callback invoked when parent exit is detected. + */ +inline void monitor_parent_process([[maybe_unused]] std::function on_parent_exit) +{ +#ifdef __linux__ + if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { + std::cerr << "Warning: Could not set parent death signal\n"; + } + // Note: no getppid() == 1 race check here. In Docker containers, + // Node.js often runs as PID 1, so getppid() == 1 is a false positive. + // prctl(PR_SET_PDEATHSIG) handles the race correctly — the kernel + // delivers SIGTERM immediately if the parent already exited. +#elif defined(__APPLE__) + pid_t parent_pid = getppid(); + std::thread([parent_pid, on_parent_exit = std::move(on_parent_exit)]() { + int kq = kqueue(); + if (kq == -1) { + return; + } + struct kevent change; + EV_SET(&change, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, nullptr); + if (kevent(kq, &change, 1, nullptr, 0, nullptr) == -1) { + ::close(kq); + return; + } + struct kevent event; + kevent(kq, nullptr, 0, &event, 1, nullptr); + std::cerr << "Parent process exited, shutting down\n"; + ::close(kq); + on_parent_exit(); + }).detach(); +#endif +} + +/** + * @brief Convenience overload: sets an atomic shutdown flag when parent exits. + */ +inline void monitor_parent_process(std::atomic& shutdown_flag) +{ + monitor_parent_process([&shutdown_flag]() { shutdown_flag.store(true, std::memory_order_release); }); +} + +} // namespace bb diff --git a/barretenberg/cpp/src/barretenberg/common/try_catch_shim.hpp b/barretenberg/cpp/src/barretenberg/common/try_catch_shim.hpp index 2cb08e6f2225..f1ec623d2b81 100644 --- a/barretenberg/cpp/src/barretenberg/common/try_catch_shim.hpp +++ b/barretenberg/cpp/src/barretenberg/common/try_catch_shim.hpp @@ -13,11 +13,19 @@ struct __AbortStream { std::abort(); } }; +#ifndef THROW #define THROW __AbortStream() << +#endif #define try if (true) #define catch(...) if (false) +#ifndef RETHROW #define RETHROW +#endif #else +#ifndef THROW #define THROW throw +#endif +#ifndef RETHROW #define RETHROW THROW #endif +#endif diff --git a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp index 6ffeb94066a1..57cf71053aa0 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp +++ b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp @@ -11,6 +11,8 @@ #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/serialize/msgpack.hpp" #include "barretenberg/stdlib/primitives/field/field.hpp" +#include "barretenberg/wsdb/generated/wsdb_types.hpp" +#include namespace bb::crypto::merkle_tree { @@ -70,6 +72,18 @@ struct NullifierLeafValue { size_t hash() const noexcept { return std::hash{}(nullifier); } static std::string name() { return "NullifierLeafValue"; }; + + static NullifierLeafValue from_wire(const bb::wsdb::wire::NullifierLeafValue& w) + { + return NullifierLeafValue(fr::serialize_from_buffer(w.nullifier.data())); + } + + bb::wsdb::wire::NullifierLeafValue to_wire() const + { + bb::wsdb::wire::NullifierLeafValue w; + fr::serialize_to_buffer(nullifier, w.nullifier.data()); + return w; + } }; struct PublicDataLeafValue { @@ -132,6 +146,19 @@ struct PublicDataLeafValue { size_t hash() const noexcept { return utils::hash_as_tuple(value, slot); } static std::string name() { return "PublicDataLeafValue"; }; + + static PublicDataLeafValue from_wire(const bb::wsdb::wire::PublicDataLeafValue& w) + { + return PublicDataLeafValue(fr::serialize_from_buffer(w.slot.data()), fr::serialize_from_buffer(w.value.data())); + } + + bb::wsdb::wire::PublicDataLeafValue to_wire() const + { + bb::wsdb::wire::PublicDataLeafValue w; + fr::serialize_to_buffer(slot, w.slot.data()); + fr::serialize_to_buffer(value, w.value.data()); + return w; + } }; template struct IndexedLeaf { diff --git a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/node_store/tree_meta.hpp b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/node_store/tree_meta.hpp index 3127c46808bc..7730941b01fd 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/node_store/tree_meta.hpp +++ b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/node_store/tree_meta.hpp @@ -8,7 +8,9 @@ #include "barretenberg/crypto/merkle_tree/types.hpp" #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/wsdb/generated/wsdb_types.hpp" #include +#include #include #include #include @@ -73,6 +75,38 @@ struct TreeMeta { initialSize == other.initialSize && unfinalizedBlockHeight == other.unfinalizedBlockHeight && oldestHistoricBlock == other.oldestHistoricBlock && finalizedBlockHeight == other.finalizedBlockHeight; } + + static TreeMeta from_wire(const bb::wsdb::wire::TreeMeta& w) + { + TreeMeta r; + r.name = w.name; + r.depth = w.depth; + r.size = w.size; + r.committedSize = w.committedSize; + r.root = bb::fr::serialize_from_buffer(w.root.data()); + r.initialSize = w.initialSize; + r.initialRoot = bb::fr::serialize_from_buffer(w.initialRoot.data()); + r.oldestHistoricBlock = w.oldestHistoricBlock; + r.unfinalizedBlockHeight = w.unfinalizedBlockHeight; + r.finalizedBlockHeight = w.finalizedBlockHeight; + return r; + } + + bb::wsdb::wire::TreeMeta to_wire() const + { + bb::wsdb::wire::TreeMeta w; + w.name = name; + w.depth = depth; + w.size = size; + w.committedSize = committedSize; + bb::fr::serialize_to_buffer(root, w.root.data()); + w.initialSize = initialSize; + bb::fr::serialize_to_buffer(initialRoot, w.initialRoot.data()); + w.oldestHistoricBlock = oldestHistoricBlock; + w.unfinalizedBlockHeight = unfinalizedBlockHeight; + w.finalizedBlockHeight = finalizedBlockHeight; + return w; + } }; inline std::ostream& operator<<(std::ostream& os, const TreeMeta& meta) diff --git a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/response.hpp b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/response.hpp index 2e36dd514428..e9db74079661 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/response.hpp +++ b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/response.hpp @@ -13,6 +13,8 @@ #include "barretenberg/crypto/merkle_tree/types.hpp" #include "barretenberg/ecc/curves/bn254/fr.hpp" #include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/wsdb/generated/wsdb_types.hpp" +#include #include #include #include @@ -152,6 +154,30 @@ struct SiblingPathAndIndex { SiblingPathAndIndex(SiblingPathAndIndex&& other) noexcept = default; SiblingPathAndIndex& operator=(const SiblingPathAndIndex& other) = default; SiblingPathAndIndex& operator=(SiblingPathAndIndex&& other) noexcept = default; + + static SiblingPathAndIndex from_wire(const bb::wsdb::wire::SiblingPathAndIndex& w) + { + SiblingPathAndIndex r; + r.index = w.index; + r.path.reserve(w.path.size()); + for (const auto& f : w.path) { + r.path.push_back(bb::fr::serialize_from_buffer(f.data())); + } + return r; + } + + bb::wsdb::wire::SiblingPathAndIndex to_wire() const + { + bb::wsdb::wire::SiblingPathAndIndex w; + w.index = index; + w.path.reserve(path.size()); + for (const auto& f : path) { + Fr wire_fr; + bb::fr::serialize_to_buffer(f, wire_fr.data()); + w.path.push_back(wire_fr); + } + return w; + } }; struct FindLeafPathResponse { diff --git a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/types.hpp b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/types.hpp index 2af3fb57c206..24df87dd3e6c 100644 --- a/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/types.hpp +++ b/barretenberg/cpp/src/barretenberg/crypto/merkle_tree/types.hpp @@ -139,6 +139,32 @@ struct TreeDBStats { << stats.blockIndicesDBStats; return os; } + + static TreeDBStats from_wire(const bb::wsdb::wire::TreeDBStats& w) + { + TreeDBStats r; + r.mapSize = w.mapSize; + r.physicalFileSize = w.physicalFileSize; + r.blocksDBStats = DBStats::from_wire(w.blocksDBStats); + r.nodesDBStats = DBStats::from_wire(w.nodesDBStats); + r.leafPreimagesDBStats = DBStats::from_wire(w.leafPreimagesDBStats); + r.leafIndicesDBStats = DBStats::from_wire(w.leafIndicesDBStats); + r.blockIndicesDBStats = DBStats::from_wire(w.blockIndicesDBStats); + return r; + } + + bb::wsdb::wire::TreeDBStats to_wire() const + { + return bb::wsdb::wire::TreeDBStats{ + .mapSize = mapSize, + .physicalFileSize = physicalFileSize, + .blocksDBStats = blocksDBStats.to_wire(), + .nodesDBStats = nodesDBStats.to_wire(), + .leafPreimagesDBStats = leafPreimagesDBStats.to_wire(), + .leafIndicesDBStats = leafIndicesDBStats.to_wire(), + .blockIndicesDBStats = blockIndicesDBStats.to_wire(), + }; + } }; std::ostream& operator<<(std::ostream& os, const TreeDBStats& stats); diff --git a/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp b/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp index fdbb7508dfa8..528ed9381442 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp @@ -536,7 +536,17 @@ template struct alignas(32) field { // For serialization void msgpack_pack(auto& packer) const; void msgpack_unpack(auto o); - void msgpack_schema(auto& packer) const { packer.pack_alias(Params::schema_name, "bin32"); } + // Field elements export as fixed-size 32-byte arrays in the schema. + // This produces ["array", ["unsigned char", 32]] which codegen maps to + // typed Fr/Fq types in each language (not opaque bytes). + void msgpack_schema(auto& packer) const + { + packer.pack_array(2); + packer.pack("array"); + packer.pack_array(2); + packer.pack("unsigned char"); + packer.pack(32); + } static constexpr uint256_t twice_modulus = modulus + modulus; static constexpr uint256_t not_modulus = -modulus; diff --git a/barretenberg/cpp/src/barretenberg/lmdblib/types.hpp b/barretenberg/cpp/src/barretenberg/lmdblib/types.hpp index 68b48091f2de..64ef8654ec37 100644 --- a/barretenberg/cpp/src/barretenberg/lmdblib/types.hpp +++ b/barretenberg/cpp/src/barretenberg/lmdblib/types.hpp @@ -1,6 +1,7 @@ #pragma once #include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/wsdb/generated/wsdb_types.hpp" #include "lmdb.h" #include #include @@ -64,6 +65,24 @@ struct DBStats { << ", total used size: " << stats.totalUsedSize; return os; } + + static DBStats from_wire(const bb::wsdb::wire::DBStats& w) + { + DBStats r; + r.name = w.name; + r.numDataItems = w.numDataItems; + r.totalUsedSize = w.totalUsedSize; + return r; + } + + bb::wsdb::wire::DBStats to_wire() const + { + return bb::wsdb::wire::DBStats{ + .name = name, + .numDataItems = numDataItems, + .totalUsedSize = totalUsedSize, + }; + } }; } // namespace bb::lmdblib \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/serialize/msgpack.hpp b/barretenberg/cpp/src/barretenberg/serialize/msgpack.hpp index d93896bf3215..e3bbf2525ef5 100644 --- a/barretenberg/cpp/src/barretenberg/serialize/msgpack.hpp +++ b/barretenberg/cpp/src/barretenberg/serialize/msgpack.hpp @@ -118,6 +118,11 @@ to the object itself, do break up the above to keep a reference to the handle, f // Helper for above documented syntax // Define a macro that takes any amount of parameters and expands to a msgpack method definition // __VA__ARGS__ expands to the parmeters, comma separated. +// Barretenberg's SERIALIZATION_FIELDS uses the NVP macro for schema reflection. +// Always override any standalone definition (e.g. from generated wire types). +#ifdef SERIALIZATION_FIELDS +#undef SERIALIZATION_FIELDS +#endif #define SERIALIZATION_FIELDS(...) \ void msgpack(auto pack_fn) \ { \ diff --git a/barretenberg/cpp/src/barretenberg/serialize/msgpack_schema.test.cpp b/barretenberg/cpp/src/barretenberg/serialize/msgpack_schema.test.cpp index 709713beeede..10b2ee17a7dd 100644 --- a/barretenberg/cpp/src/barretenberg/serialize/msgpack_schema.test.cpp +++ b/barretenberg/cpp/src/barretenberg/serialize/msgpack_schema.test.cpp @@ -76,12 +76,13 @@ struct ComplicatedSchema { TEST(msgpack_tests, msgpack_schema_sanity) { + EXPECT_EQ(msgpack_schema_to_string(good_example), + "{\"__typename\":\"GoodExample\",\"a\":[\"array\",[\"unsigned char\",32]],\"b\":[\"array\",[\"unsigned " + "char\",32]]}\n"); EXPECT_EQ( - msgpack_schema_to_string(good_example), - "{\"__typename\":\"GoodExample\",\"a\":[\"alias\",[\"fr\",\"bin32\"]],\"b\":[\"alias\",[\"fr\",\"bin32\"]]}\n"); - EXPECT_EQ(msgpack_schema_to_string(complicated_schema), - "{\"__typename\":\"ComplicatedSchema\",\"array\":[\"vector\",[[\"array\",[[\"alias\",[\"fr\",\"bin32\"]]," - "20]]]],\"good_or_not\":[\"optional\",[{\"__typename\":\"GoodExample\",\"a\":[\"alias\",[\"fr\"," - "\"bin32\"]],\"b\":[\"alias\",[\"fr\",\"bin32\"]]}]],\"bare\":[\"alias\",[\"fr\",\"bin32\"]],\"huh\":[" - "\"variant\",[[\"alias\",[\"fr\",\"bin32\"]],\"GoodExample\"]]}\n"); + msgpack_schema_to_string(complicated_schema), + "{\"__typename\":\"ComplicatedSchema\",\"array\":[\"vector\",[[\"array\",[[\"array\",[\"unsigned char\",32]]," + "20]]]],\"good_or_not\":[\"optional\",[{\"__typename\":\"GoodExample\",\"a\":[\"array\",[\"unsigned char\"," + "32]],\"b\":[\"array\",[\"unsigned char\",32]]}]],\"bare\":[\"array\",[\"unsigned char\",32]],\"huh\":[" + "\"variant\",[[\"array\",[\"unsigned char\",32]],\"GoodExample\"]]}\n"); } diff --git a/barretenberg/cpp/src/barretenberg/world_state/types.hpp b/barretenberg/cpp/src/barretenberg/world_state/types.hpp index 45985775dabf..5970f3df2cf3 100644 --- a/barretenberg/cpp/src/barretenberg/world_state/types.hpp +++ b/barretenberg/cpp/src/barretenberg/world_state/types.hpp @@ -42,6 +42,24 @@ struct WorldStateRevision { static WorldStateRevision uncommitted() { return WorldStateRevision{ .includeUncommitted = true }; } bool operator==(const WorldStateRevision& other) const = default; + + static WorldStateRevision from_wire(const bb::wsdb::wire::WorldStateRevision& w) + { + return WorldStateRevision{ + .forkId = w.forkId, + .blockNumber = w.blockNumber, + .includeUncommitted = w.includeUncommitted, + }; + } + + bb::wsdb::wire::WorldStateRevision to_wire() const + { + return bb::wsdb::wire::WorldStateRevision{ + .forkId = forkId, + .blockNumber = blockNumber, + .includeUncommitted = includeUncommitted, + }; + } }; struct WorldStateStatusSummary { @@ -91,6 +109,22 @@ struct WorldStateStatusSummary { << ", treesAreSynched: " << status.treesAreSynched; return os; } + + static WorldStateStatusSummary from_wire(const bb::wsdb::wire::WorldStateStatusSummary& w) + { + return WorldStateStatusSummary( + w.unfinalizedBlockNumber, w.finalizedBlockNumber, w.oldestHistoricalBlock, w.treesAreSynched); + } + + bb::wsdb::wire::WorldStateStatusSummary to_wire() const + { + return bb::wsdb::wire::WorldStateStatusSummary{ + .unfinalizedBlockNumber = unfinalizedBlockNumber, + .finalizedBlockNumber = finalizedBlockNumber, + .oldestHistoricalBlock = oldestHistoricalBlock, + .treesAreSynched = treesAreSynched, + }; + } }; struct WorldStateDBStats { @@ -148,6 +182,26 @@ struct WorldStateDBStats { << stats.publicDataTreeStats << ", Nullifier tree stats " << stats.nullifierTreeStats; return os; } + + static WorldStateDBStats from_wire(const bb::wsdb::wire::WorldStateDBStats& w) + { + return WorldStateDBStats(TreeDBStats::from_wire(w.noteHashTreeStats), + TreeDBStats::from_wire(w.messageTreeStats), + TreeDBStats::from_wire(w.archiveTreeStats), + TreeDBStats::from_wire(w.publicDataTreeStats), + TreeDBStats::from_wire(w.nullifierTreeStats)); + } + + bb::wsdb::wire::WorldStateDBStats to_wire() const + { + return bb::wsdb::wire::WorldStateDBStats{ + .noteHashTreeStats = noteHashTreeStats.to_wire(), + .messageTreeStats = messageTreeStats.to_wire(), + .archiveTreeStats = archiveTreeStats.to_wire(), + .publicDataTreeStats = publicDataTreeStats.to_wire(), + .nullifierTreeStats = nullifierTreeStats.to_wire(), + }; + } }; struct WorldStateMeta { @@ -204,6 +258,26 @@ struct WorldStateMeta { << ", Nullifier tree meta " << stats.nullifierTreeMeta; return os; } + + static WorldStateMeta from_wire(const bb::wsdb::wire::WorldStateMeta& w) + { + return WorldStateMeta(TreeMeta::from_wire(w.noteHashTreeMeta), + TreeMeta::from_wire(w.messageTreeMeta), + TreeMeta::from_wire(w.archiveTreeMeta), + TreeMeta::from_wire(w.publicDataTreeMeta), + TreeMeta::from_wire(w.nullifierTreeMeta)); + } + + bb::wsdb::wire::WorldStateMeta to_wire() const + { + return bb::wsdb::wire::WorldStateMeta{ + .noteHashTreeMeta = noteHashTreeMeta.to_wire(), + .messageTreeMeta = messageTreeMeta.to_wire(), + .archiveTreeMeta = archiveTreeMeta.to_wire(), + .publicDataTreeMeta = publicDataTreeMeta.to_wire(), + .nullifierTreeMeta = nullifierTreeMeta.to_wire(), + }; + } }; struct WorldStateStatusFull { @@ -248,5 +322,23 @@ struct WorldStateStatusFull { os << "Summary: " << status.summary << ", DB Stats " << status.dbStats << ", Meta " << status.meta; return os; } + + static WorldStateStatusFull from_wire(const bb::wsdb::wire::WorldStateStatusFull& w) + { + return WorldStateStatusFull(WorldStateStatusSummary::from_wire(w.summary), + WorldStateDBStats::from_wire(w.dbStats), + WorldStateMeta::from_wire(w.meta)); + } + + bb::wsdb::wire::WorldStateStatusFull to_wire() const + { + return bb::wsdb::wire::WorldStateStatusFull{ + .summary = summary.to_wire(), + .dbStats = dbStats.to_wire(), + .meta = meta.to_wire(), + }; + } }; } // namespace bb::world_state + +MSGPACK_ADD_ENUM(bb::world_state::MerkleTreeId) diff --git a/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp b/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp index 2e6414b2409a..d1e7dfca2b88 100644 --- a/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp +++ b/barretenberg/cpp/src/barretenberg/world_state/world_state.hpp @@ -747,5 +747,3 @@ SequentialInsertionResult WorldState::insert_indexed_leaves(MerkleTreeId id, return result; } } // namespace bb::world_state - -MSGPACK_ADD_ENUM(bb::world_state::MerkleTreeId) diff --git a/barretenberg/cpp/src/barretenberg/wsdb/CMakeLists.txt b/barretenberg/cpp/src/barretenberg/wsdb/CMakeLists.txt index f7fead2146fe..7161765e1ace 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/CMakeLists.txt +++ b/barretenberg/cpp/src/barretenberg/wsdb/CMakeLists.txt @@ -4,7 +4,7 @@ if(NOT(FUZZING) AND NOT(WASM)) add_library( wsdb_ipc_client STATIC - wsdb_ipc_client_generated.cpp + generated/wsdb_ipc_client.cpp ) target_link_libraries( wsdb_ipc_client @@ -18,7 +18,7 @@ if(NOT(FUZZING) AND NOT(WASM)) aztec-wsdb main.cpp cli.cpp - wsdb_execute.cpp + wsdb_handlers.cpp wsdb_ipc_server.cpp ) target_link_libraries( @@ -41,4 +41,36 @@ if(NOT(FUZZING) AND NOT(WASM)) -ldw -lelf ) endif() + + # Wire-format compatibility tests + # Uses the same pattern as barretenberg_module() for ABI compatibility with gtest. + add_library( + wsdb_wire_compat_test_objects + OBJECT + wsdb_wire_compat.test.cpp + ) + target_link_libraries( + wsdb_wire_compat_test_objects + PRIVATE + barretenberg + world_state + GTest::gtest + GTest::gtest_main + GTest::gmock_main + ) + + add_executable( + wsdb_wire_compat_tests + $ + ) + target_link_libraries( + wsdb_wire_compat_tests + PRIVATE + barretenberg + world_state + GTest::gtest + GTest::gtest_main + GTest::gmock_main + ) + gtest_discover_tests(wsdb_wire_compat_tests) endif() diff --git a/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp b/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp index 3e54cb4fb580..b6454cb60dd3 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/cli.cpp @@ -1,8 +1,6 @@ #include "barretenberg/wsdb/cli.hpp" #include "barretenberg/common/log.hpp" #include "barretenberg/common/throw_or_abort.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/wsdb/wsdb_execute.hpp" #include "barretenberg/wsdb/wsdb_ipc_server.hpp" #include "barretenberg/bb/deps/cli11.hpp" @@ -14,88 +12,41 @@ namespace bb::wsdb { -using namespace bb::world_state; -using namespace bb::crypto::merkle_tree; - -namespace { - -struct WsdbApi { - WsdbCommand commands; - WsdbCommandResponse responses; - SERIALIZATION_FIELDS(commands, responses); -}; - -std::string get_wsdb_schema_as_json() -{ - return msgpack_schema_to_string(WsdbApi{}); -} - -} // namespace - int parse_and_run_wsdb(int argc, char* argv[]) { CLI::App app{ "aztec-wsdb: Standalone world state database server" }; app.require_subcommand(1); - // ----------------------------------------------------------------------- - // Subcommand: msgpack - // ----------------------------------------------------------------------- - CLI::App* msgpack_command = app.add_subcommand("msgpack", "Msgpack API interface."); - - // msgpack schema - CLI::App* msgpack_schema_command = - msgpack_command->add_subcommand("schema", "Output a msgpack schema encoded as JSON to stdout."); - - // msgpack run - CLI::App* msgpack_run_command = - msgpack_command->add_subcommand("run", "Start the world state database IPC server."); + auto* msgpack_command = app.add_subcommand("msgpack", "Msgpack API interface"); + auto* msgpack_run_command = msgpack_command->add_subcommand("run", "Start the IPC server"); std::string input_path; - msgpack_run_command->add_option( - "-i,--input", input_path, "IPC socket/shm path (.sock for UDS, .shm for shared memory)"); + msgpack_run_command->add_option("--input", input_path, "Socket path (.sock)")->required(); std::string data_dir; - msgpack_run_command->add_option("-d,--data-dir", data_dir, "Data directory for LMDB stores")->required(); + msgpack_run_command->add_option("--data-dir", data_dir, "Data directory for LMDB stores")->required(); + + uint32_t threads = 16; + msgpack_run_command->add_option("--threads", threads, "Number of worker threads (default: 16)"); - // Tree heights (JSON map: treeId -> height) std::string tree_heights_json; - msgpack_run_command->add_option("--tree-heights", tree_heights_json, "Tree heights as JSON: {0:40,1:32,...}"); + msgpack_run_command->add_option("--tree-heights", tree_heights_json, "Tree heights as JSON map")->required(); - // Tree prefill sizes std::string tree_prefill_json; - msgpack_run_command->add_option( - "--tree-prefill", tree_prefill_json, "Tree prefill sizes as JSON: {0:128,2:128,...}"); + msgpack_run_command->add_option("--tree-prefill", tree_prefill_json, "Tree prefill counts as JSON map"); - // Map sizes (KB) std::string map_sizes_json; - msgpack_run_command->add_option("--map-sizes", map_sizes_json, "LMDB map sizes in KB as JSON: {0:1024,...}"); - - uint32_t threads = 16; - msgpack_run_command->add_option("-t,--threads", threads, "Thread pool size (default: 16)") - ->check(CLI::PositiveNumber); + msgpack_run_command->add_option("--map-sizes", map_sizes_json, "LMDB map sizes as JSON map"); uint32_t initial_header_generator_point = 0; msgpack_run_command->add_option( - "--initial-header-generator-point", initial_header_generator_point, "Header generator point (default: 0)"); + "--initial-header-generator-point", initial_header_generator_point, "Initial header generator point"); // Prefilled public data as JSON array of [slot_hex, value_hex] pairs std::string prefilled_public_data_json; msgpack_run_command->add_option( "--prefilled-public-data", prefilled_public_data_json, "Prefilled public data as JSON array"); - size_t request_ring_size = 1024 * 1024; - msgpack_run_command - ->add_option( - "--request-ring-size", request_ring_size, "Request ring buffer size for shared memory IPC (default: 1MB)") - ->check(CLI::PositiveNumber); - - size_t response_ring_size = 1024 * 1024; - msgpack_run_command - ->add_option("--response-ring-size", - response_ring_size, - "Response ring buffer size for shared memory IPC (default: 1MB)") - ->check(CLI::PositiveNumber); - // Parse CLI try { app.parse(argc, argv); @@ -104,11 +55,6 @@ int parse_and_run_wsdb(int argc, char* argv[]) } try { - if (msgpack_schema_command->parsed()) { - std::cout << get_wsdb_schema_as_json() << std::endl; - return 0; - } - if (msgpack_run_command->parsed()) { return execute_wsdb_server(input_path, data_dir, @@ -117,9 +63,7 @@ int parse_and_run_wsdb(int argc, char* argv[]) map_sizes_json, threads, initial_header_generator_point, - prefilled_public_data_json, - request_ring_size, - response_ring_size); + prefilled_public_data_json); } } catch (const std::exception& e) { std::cerr << "Error: " << e.what() << '\n'; diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp deleted file mode 100644 index 5ccf8cc760bc..000000000000 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_commands.hpp +++ /dev/null @@ -1,536 +0,0 @@ -#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; - std::vector paddedNoteHashes; - std::vector paddedL1ToL2Messages; - std::vector paddedNullifiers; - std::vector publicDataWrites; - Response execute(WsdbRequest& request) &&; - SERIALIZATION_FIELDS(blockNumber, - blockStateRef, - blockHeaderHash, - 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_context.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_context.hpp new file mode 100644 index 000000000000..84beb89dcd81 --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_context.hpp @@ -0,0 +1,8 @@ +#pragma once +#include "barretenberg/world_state/world_state.hpp" + +namespace bb::wsdb { +struct WsdbContext { + world_state::WorldState& world_state; +}; +} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp deleted file mode 100644 index 5a6282b9de8f..000000000000 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.cpp +++ /dev/null @@ -1,414 +0,0 @@ -#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); - 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_execute.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.hpp index 20de7d738c4c..e642abe89c45 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.hpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_execute.hpp @@ -1,115 +1,10 @@ #pragma once /** * @file wsdb_execute.hpp - * @brief WsdbCommand NamedUnion, WsdbRequest context, and dispatch function. + * @brief Umbrella include for WSDB command execution. + * + * The WsdbContext type (previously WsdbRequest) is now defined in wsdb_handlers.cpp + * as a template specialization detail. */ -#include "barretenberg/common/named_union.hpp" #include "barretenberg/world_state/world_state.hpp" -#include "barretenberg/wsdb/wsdb_commands.hpp" - -namespace bb::wsdb { - -/** - * @brief Context passed to each command's execute() method, providing access to the WorldState. - */ -struct WsdbRequest { - world_state::WorldState& world_state; -}; - -/** - * @brief Error response returned when a command fails. - */ -struct WsdbErrorResponse { - static constexpr const char MSGPACK_SCHEMA_NAME[] = "WsdbErrorResponse"; - std::string message; - SERIALIZATION_FIELDS(message); - bool operator==(const WsdbErrorResponse&) const = default; -}; - -/** - * @brief Union of all wsdb commands (request types). - */ -using WsdbCommand = NamedUnion; - -/** - * @brief Union of all wsdb response types. - */ -using WsdbCommandResponse = NamedUnion; - -/** - * @brief Execute a wsdb command using the visitor pattern. - */ -inline WsdbCommandResponse execute(WsdbRequest& request, WsdbCommand&& command) -{ - return std::move(command).visit([&request](auto&& cmd) -> WsdbCommandResponse { - using CmdType = std::decay_t; - return std::forward(cmd).execute(request); - }); -} - -/** - * @brief Top-level wsdb API entry point. Takes a WsdbRequest and dispatches the command. - */ -WsdbCommandResponse wsdb(WsdbRequest& request, WsdbCommand&& command); - -} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_handlers.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_handlers.cpp new file mode 100644 index 000000000000..4bc8f4c44caf --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_handlers.cpp @@ -0,0 +1,539 @@ +/** + * @file wsdb_handlers.cpp + * @brief Handler implementations bridging wire types to domain types for the WSDB IPC server. + * + * Each handler: + * 1. Takes a wire command (bb::wsdb::wire::WsdbFoo&&) + * 2. Converts wire fields to domain types (MerkleTreeId, bb::fr, WorldStateRevision, etc.) + * 3. Calls the corresponding WorldState method + * 4. Converts the domain response back to wire types + * 5. Returns wire response + */ + +#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 "barretenberg/wsdb/generated/wsdb_ipc_server.hpp" + +#include +#include +#include + +#include "barretenberg/wsdb/wsdb_context.hpp" + +namespace bb::wsdb { + +using WsdbContext = bb::wsdb::WsdbContext; + +using namespace bb::world_state; +using namespace bb::crypto::merkle_tree; + +// --------------------------------------------------------------------------- +// Context type for WSDB handlers +// --------------------------------------------------------------------------- + +// WsdbContext defined in wsdb_context.hpp + +// --------------------------------------------------------------------------- +// Wire <-> Domain conversion helpers +// --------------------------------------------------------------------------- + +namespace { + +inline bb::fr fr_from_wire(const Fr& w) +{ + return bb::fr::serialize_from_buffer(w.data()); +} + +inline Fr fr_to_wire(const bb::fr& d) +{ + Fr r; + bb::fr::serialize_to_buffer(d, r.data()); + return r; +} + +inline std::vector fr_vec_from_wire(const std::vector& wire) +{ + std::vector result; + result.reserve(wire.size()); + for (const auto& w : wire) { + result.push_back(fr_from_wire(w)); + } + return result; +} + +inline std::vector fr_vec_to_wire(const std::vector& domain) +{ + std::vector result; + result.reserve(domain.size()); + for (const auto& d : domain) { + result.push_back(fr_to_wire(d)); + } + return result; +} + +inline MerkleTreeId tree_id_from_wire(uint32_t id) +{ + return static_cast(id); +} + +// StateReference: domain = map> +// wire = map, uint64_t>> +// The pair serializes as pair(32 bytes), uint64_t> in msgpack. +// However, the wire type uses vector for the serialized fr bytes. + +inline StateReference state_ref_from_wire( + const std::unordered_map, uint64_t>>& wire) +{ + StateReference result; + for (const auto& [k, v] : wire) { + bb::fr root; + if (v.first.size() >= 32) { + root = bb::fr::serialize_from_buffer(v.first.data()); + } + result[static_cast(k)] = { root, v.second }; + } + return result; +} + +inline std::unordered_map, uint64_t>> state_ref_to_wire( + const StateReference& domain) +{ + std::unordered_map, uint64_t>> result; + for (const auto& [k, v] : domain) { + std::vector root_bytes(32); + bb::fr::serialize_to_buffer(v.first, root_bytes.data()); + result[static_cast(k)] = { std::move(root_bytes), v.second }; + } + return result; +} + +// Helper: serialize a value to msgpack bytes +template 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 +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; +} + +} // anonymous namespace + +// --------------------------------------------------------------------------- +// Handler implementations (template specializations for WsdbContext) +// --------------------------------------------------------------------------- + +template <> wire::WsdbGetTreeInfoResponse handle_get_tree_info(WsdbContext& ctx, wire::WsdbGetTreeInfo&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + auto info = ctx.world_state.get_tree_info(revision, tree_id); + return wire::WsdbGetTreeInfoResponse{ + .treeId = cmd.treeId, + .root = fr_to_wire(info.meta.root), + .size = info.meta.size, + .depth = info.meta.depth, + }; +} + +template <> +wire::WsdbGetStateReferenceResponse handle_get_state_reference(WsdbContext& ctx, wire::WsdbGetStateReference&& cmd) +{ + auto revision = WorldStateRevision::from_wire(cmd.revision); + auto state = ctx.world_state.get_state_reference(revision); + return wire::WsdbGetStateReferenceResponse{ .state = state_ref_to_wire(state) }; +} + +template <> +wire::WsdbGetInitialStateReferenceResponse handle_get_initial_state_reference( + WsdbContext& ctx, [[maybe_unused]] wire::WsdbGetInitialStateReference&& cmd) +{ + auto state = ctx.world_state.get_initial_state_reference(); + return wire::WsdbGetInitialStateReferenceResponse{ .state = state_ref_to_wire(state) }; +} + +template <> wire::WsdbGetLeafValueResponse handle_get_leaf_value(WsdbContext& ctx, wire::WsdbGetLeafValue&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + + switch (tree_id) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto leaf = ctx.world_state.get_leaf(revision, tree_id, cmd.leafIndex); + if (!leaf.has_value()) { + return wire::WsdbGetLeafValueResponse{ .value = std::nullopt }; + } + return wire::WsdbGetLeafValueResponse{ .value = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = ctx.world_state.get_leaf(revision, tree_id, cmd.leafIndex); + if (!leaf.has_value()) { + return wire::WsdbGetLeafValueResponse{ .value = std::nullopt }; + } + return wire::WsdbGetLeafValueResponse{ .value = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = ctx.world_state.get_leaf(revision, tree_id, cmd.leafIndex); + if (!leaf.has_value()) { + return wire::WsdbGetLeafValueResponse{ .value = std::nullopt }; + } + return wire::WsdbGetLeafValueResponse{ .value = serialize_to_msgpack(leaf.value()) }; + } + default: + throw std::runtime_error("Unsupported tree type for get_leaf_value"); + } +} + +template <> +wire::WsdbGetLeafPreimageResponse handle_get_leaf_preimage(WsdbContext& ctx, wire::WsdbGetLeafPreimage&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + + switch (tree_id) { + case MerkleTreeId::NULLIFIER_TREE: { + auto leaf = ctx.world_state.get_indexed_leaf(revision, tree_id, cmd.leafIndex); + if (!leaf.has_value()) { + return wire::WsdbGetLeafPreimageResponse{ .preimage = std::nullopt }; + } + return wire::WsdbGetLeafPreimageResponse{ .preimage = serialize_to_msgpack(leaf.value()) }; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto leaf = ctx.world_state.get_indexed_leaf(revision, tree_id, cmd.leafIndex); + if (!leaf.has_value()) { + return wire::WsdbGetLeafPreimageResponse{ .preimage = std::nullopt }; + } + return wire::WsdbGetLeafPreimageResponse{ .preimage = serialize_to_msgpack(leaf.value()) }; + } + default: + throw std::runtime_error("Unsupported tree type for get_leaf_preimage"); + } +} + +template <> wire::WsdbGetSiblingPathResponse handle_get_sibling_path(WsdbContext& ctx, wire::WsdbGetSiblingPath&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + fr_sibling_path path = ctx.world_state.get_sibling_path(revision, tree_id, cmd.leafIndex); + return wire::WsdbGetSiblingPathResponse{ .path = fr_vec_to_wire(path) }; +} + +template <> +wire::WsdbGetBlockNumbersForLeafIndicesResponse handle_get_block_numbers_for_leaf_indices( + WsdbContext& ctx, wire::WsdbGetBlockNumbersForLeafIndices&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + std::vector> block_numbers; + ctx.world_state.get_block_numbers_for_leaf_indices(revision, tree_id, cmd.leafIndices, block_numbers); + // Wire type uses optional which is the same as optional + return wire::WsdbGetBlockNumbersForLeafIndicesResponse{ .blockNumbers = block_numbers }; +} + +template <> +wire::WsdbFindLeafIndicesResponse handle_find_leaf_indices(WsdbContext& ctx, wire::WsdbFindLeafIndices&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + std::vector> indices; + + switch (tree_id) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_leaf_indices(revision, tree_id, typed_leaves, indices, cmd.startIndex); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_leaf_indices( + revision, tree_id, typed_leaves, indices, cmd.startIndex); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_leaf_indices(revision, tree_id, typed_leaves, indices, cmd.startIndex); + break; + } + default: + throw std::runtime_error("Unsupported tree type for find_leaf_indices"); + } + return wire::WsdbFindLeafIndicesResponse{ .indices = indices }; +} + +template <> wire::WsdbFindLowLeafResponse handle_find_low_leaf(WsdbContext& ctx, wire::WsdbFindLowLeaf&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + auto key = fr_from_wire(cmd.key); + auto low_leaf_info = ctx.world_state.find_low_leaf_index(revision, tree_id, key); + return wire::WsdbFindLowLeafResponse{ + .alreadyPresent = low_leaf_info.is_already_present, + .index = low_leaf_info.index, + }; +} + +template <> +wire::WsdbFindSiblingPathsResponse handle_find_sibling_paths(WsdbContext& ctx, wire::WsdbFindSiblingPaths&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + auto revision = WorldStateRevision::from_wire(cmd.revision); + std::vector> paths; + + switch (tree_id) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_sibling_paths(revision, tree_id, typed_leaves, paths); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_sibling_paths(revision, tree_id, typed_leaves, paths); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.find_sibling_paths(revision, tree_id, typed_leaves, paths); + break; + } + default: + throw std::runtime_error("Unsupported tree type for find_sibling_paths"); + } + + // Convert domain SiblingPathAndIndex -> wire SiblingPathAndIndex + std::vector> wire_paths; + wire_paths.reserve(paths.size()); + for (const auto& p : paths) { + if (p.has_value()) { + wire_paths.push_back(p.value().to_wire()); + } else { + wire_paths.push_back(std::nullopt); + } + } + return wire::WsdbFindSiblingPathsResponse{ .paths = std::move(wire_paths) }; +} + +template <> wire::WsdbAppendLeavesResponse handle_append_leaves(WsdbContext& ctx, wire::WsdbAppendLeaves&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + + switch (tree_id) { + case MerkleTreeId::NOTE_HASH_TREE: + case MerkleTreeId::L1_TO_L2_MESSAGE_TREE: + case MerkleTreeId::ARCHIVE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.append_leaves(tree_id, typed_leaves, cmd.forkId); + break; + } + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.append_leaves(tree_id, typed_leaves, cmd.forkId); + break; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + ctx.world_state.append_leaves(tree_id, typed_leaves, cmd.forkId); + break; + } + default: + throw std::runtime_error("Unsupported tree type for append_leaves"); + } + return wire::WsdbAppendLeavesResponse{}; +} + +template <> wire::WsdbBatchInsertResponse handle_batch_insert(WsdbContext& ctx, wire::WsdbBatchInsert&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + + switch (tree_id) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + auto result = ctx.world_state.batch_insert_indexed_leaves( + tree_id, typed_leaves, cmd.subtreeDepth, cmd.forkId); + return wire::WsdbBatchInsertResponse{ .result = serialize_to_msgpack(result) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + auto result = ctx.world_state.batch_insert_indexed_leaves( + tree_id, typed_leaves, cmd.subtreeDepth, cmd.forkId); + return wire::WsdbBatchInsertResponse{ .result = serialize_to_msgpack(result) }; + } + default: + throw std::runtime_error("Unsupported tree type for batch_insert"); + } +} + +template <> +wire::WsdbSequentialInsertResponse handle_sequential_insert(WsdbContext& ctx, wire::WsdbSequentialInsert&& cmd) +{ + auto tree_id = tree_id_from_wire(cmd.treeId); + + switch (tree_id) { + case MerkleTreeId::PUBLIC_DATA_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + auto result = ctx.world_state.insert_indexed_leaves(tree_id, typed_leaves, cmd.forkId); + return wire::WsdbSequentialInsertResponse{ .result = serialize_to_msgpack(result) }; + } + case MerkleTreeId::NULLIFIER_TREE: { + auto typed_leaves = deserialize_leaves(cmd.leaves); + auto result = ctx.world_state.insert_indexed_leaves(tree_id, typed_leaves, cmd.forkId); + return wire::WsdbSequentialInsertResponse{ .result = serialize_to_msgpack(result) }; + } + default: + throw std::runtime_error("Unsupported tree type for sequential_insert"); + } +} + +template <> wire::WsdbUpdateArchiveResponse handle_update_archive(WsdbContext& ctx, wire::WsdbUpdateArchive&& cmd) +{ + auto block_state_ref = state_ref_from_wire(cmd.blockStateRef); + auto block_header_hash = fr_from_wire(cmd.blockHeaderHash); + ctx.world_state.update_archive(block_state_ref, block_header_hash, cmd.forkId); + return wire::WsdbUpdateArchiveResponse{}; +} + +template <> wire::WsdbCommitResponse handle_commit(WsdbContext& ctx, [[maybe_unused]] wire::WsdbCommit&& cmd) +{ + WorldStateStatusFull status; + ctx.world_state.commit(status); + return wire::WsdbCommitResponse{ .status = status.to_wire() }; +} + +template <> wire::WsdbRollbackResponse handle_rollback(WsdbContext& ctx, [[maybe_unused]] wire::WsdbRollback&& cmd) +{ + ctx.world_state.rollback(); + return wire::WsdbRollbackResponse{}; +} + +template <> wire::WsdbSyncBlockResponse handle_sync_block(WsdbContext& ctx, wire::WsdbSyncBlock&& cmd) +{ + auto block_state_ref = state_ref_from_wire(cmd.blockStateRef); + auto block_header_hash = fr_from_wire(cmd.blockHeaderHash); + auto padded_note_hashes = fr_vec_from_wire(cmd.paddedNoteHashes); + auto padded_l1_to_l2_messages = fr_vec_from_wire(cmd.paddedL1ToL2Messages); + std::vector padded_nullifiers; + padded_nullifiers.reserve(cmd.paddedNullifiers.size()); + for (const auto& w : cmd.paddedNullifiers) { + padded_nullifiers.push_back(NullifierLeafValue::from_wire(w)); + } + std::vector public_data_writes; + public_data_writes.reserve(cmd.publicDataWrites.size()); + for (const auto& w : cmd.publicDataWrites) { + public_data_writes.push_back(PublicDataLeafValue::from_wire(w)); + } + + WorldStateStatusFull status = ctx.world_state.sync_block(block_state_ref, + block_header_hash, + padded_note_hashes, + padded_l1_to_l2_messages, + padded_nullifiers, + public_data_writes); + return wire::WsdbSyncBlockResponse{ .status = status.to_wire() }; +} + +template <> wire::WsdbCreateForkResponse handle_create_fork(WsdbContext& ctx, wire::WsdbCreateFork&& cmd) +{ + std::optional block = cmd.latest ? std::nullopt : std::optional(cmd.blockNumber); + uint64_t id = ctx.world_state.create_fork(block); + return wire::WsdbCreateForkResponse{ .forkId = id }; +} + +template <> wire::WsdbDeleteForkResponse handle_delete_fork(WsdbContext& ctx, wire::WsdbDeleteFork&& cmd) +{ + ctx.world_state.delete_fork(cmd.forkId); + return wire::WsdbDeleteForkResponse{}; +} + +template <> wire::WsdbFinalizeBlocksResponse handle_finalize_blocks(WsdbContext& ctx, wire::WsdbFinalizeBlocks&& cmd) +{ + WorldStateStatusSummary status = ctx.world_state.set_finalized_blocks(cmd.toBlockNumber); + return wire::WsdbFinalizeBlocksResponse{ .status = status.to_wire() }; +} + +template <> wire::WsdbUnwindBlocksResponse handle_unwind_blocks(WsdbContext& ctx, wire::WsdbUnwindBlocks&& cmd) +{ + WorldStateStatusFull status = ctx.world_state.unwind_blocks(cmd.toBlockNumber); + return wire::WsdbUnwindBlocksResponse{ .status = status.to_wire() }; +} + +template <> +wire::WsdbRemoveHistoricalBlocksResponse handle_remove_historical_blocks(WsdbContext& ctx, + wire::WsdbRemoveHistoricalBlocks&& cmd) +{ + WorldStateStatusFull status = ctx.world_state.remove_historical_blocks(cmd.toBlockNumber); + return wire::WsdbRemoveHistoricalBlocksResponse{ .status = status.to_wire() }; +} + +template <> wire::WsdbGetStatusResponse handle_get_status(WsdbContext& ctx, [[maybe_unused]] wire::WsdbGetStatus&& cmd) +{ + WorldStateStatusSummary status; + ctx.world_state.get_status_summary(status); + return wire::WsdbGetStatusResponse{ .status = status.to_wire() }; +} + +template <> +wire::WsdbCreateCheckpointResponse handle_create_checkpoint(WsdbContext& ctx, wire::WsdbCreateCheckpoint&& cmd) +{ + ctx.world_state.checkpoint(cmd.forkId); + return wire::WsdbCreateCheckpointResponse{}; +} + +template <> +wire::WsdbCommitCheckpointResponse handle_commit_checkpoint(WsdbContext& ctx, wire::WsdbCommitCheckpoint&& cmd) +{ + ctx.world_state.commit_checkpoint(cmd.forkId); + return wire::WsdbCommitCheckpointResponse{}; +} + +template <> +wire::WsdbRevertCheckpointResponse handle_revert_checkpoint(WsdbContext& ctx, wire::WsdbRevertCheckpoint&& cmd) +{ + ctx.world_state.revert_checkpoint(cmd.forkId); + return wire::WsdbRevertCheckpointResponse{}; +} + +template <> +wire::WsdbCommitAllCheckpointsResponse handle_commit_all_checkpoints(WsdbContext& ctx, + wire::WsdbCommitAllCheckpoints&& cmd) +{ + ctx.world_state.commit_all_checkpoints_to(cmd.forkId, 0); + return wire::WsdbCommitAllCheckpointsResponse{}; +} + +template <> +wire::WsdbRevertAllCheckpointsResponse handle_revert_all_checkpoints(WsdbContext& ctx, + wire::WsdbRevertAllCheckpoints&& cmd) +{ + ctx.world_state.revert_all_checkpoints_to(cmd.forkId, 0); + return wire::WsdbRevertAllCheckpointsResponse{}; +} + +template <> wire::WsdbCopyStoresResponse handle_copy_stores(WsdbContext& ctx, wire::WsdbCopyStores&& cmd) +{ + ctx.world_state.copy_stores(cmd.dstPath, cmd.compact.value_or(false)); + return wire::WsdbCopyStoresResponse{}; +} + +// Explicit instantiation of the dispatch handler for WsdbContext +template ::ipc::Handler make_wsdb_handler(WsdbContext& ctx); + +} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.cpp deleted file mode 100644 index 08da0e939635..000000000000 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.cpp +++ /dev/null @@ -1,225 +0,0 @@ -// AUTOGENERATED FILE - DO NOT EDIT - -#include "barretenberg/wsdb/wsdb_ipc_client_generated.hpp" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/serialize/msgpack_impl.hpp" -#include "barretenberg/wsdb/wsdb_execute.hpp" - -#include -#include - -namespace bb::wsdb { - -WsdbIpcClient::WsdbIpcClient(const std::string& socket_path) - : client_(ipc::IpcClient::create_socket(socket_path)) -{ - if (!client_->connect()) { - throw std::runtime_error("Failed to connect to server at " + socket_path); - } -} - -WsdbIpcClient::~WsdbIpcClient() -{ - if (client_) { - client_->close(); - } -} - -template typename Cmd::Response WsdbIpcClient::send(Cmd&& cmd) const -{ - // Wrap command in WsdbCommand NamedUnion, then in a 1-element tuple (matches server expectations) - WsdbCommand command = std::forward(cmd); - auto wrapped = std::make_tuple(std::move(command)); - - // Serialize to msgpack - msgpack::sbuffer send_buffer; - msgpack::pack(send_buffer, wrapped); - - // Send to server - constexpr uint64_t timeout_ns = 30'000'000'000ULL; // 30 seconds - if (!client_->send(send_buffer.data(), send_buffer.size(), timeout_ns)) { - throw std::runtime_error("Failed to send command to server"); - } - - // Receive response - auto response_span = client_->receive(timeout_ns); - if (response_span.empty()) { - throw std::runtime_error("Empty response from server"); - } - - // Deserialize response - auto unpacked = msgpack::unpack(reinterpret_cast(response_span.data()), response_span.size()); - auto response_obj = unpacked.get(); - - WsdbCommandResponse response; - response_obj.convert(response); - - // Release the receive buffer - client_->release(response_span.size()); - - // Check for error response - return std::move(response).visit([](auto&& resp) -> typename Cmd::Response { - using RespType = std::decay_t; - - if constexpr (std::is_same_v) { - throw std::runtime_error("Server error: " + resp.message); - } else if constexpr (std::is_same_v) { - return std::forward(resp); - } else { - throw std::runtime_error("Unexpected response type from server"); - } - }); -} - -WsdbGetTreeInfo::Response WsdbIpcClient::get_tree_info(WsdbGetTreeInfo cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetStateReference::Response WsdbIpcClient::get_state_reference(WsdbGetStateReference cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetInitialStateReference::Response WsdbIpcClient::get_initial_state_reference() const -{ - return send(WsdbGetInitialStateReference{}); -} - -WsdbGetLeafValue::Response WsdbIpcClient::get_leaf_value(WsdbGetLeafValue cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetLeafPreimage::Response WsdbIpcClient::get_leaf_preimage(WsdbGetLeafPreimage cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetSiblingPath::Response WsdbIpcClient::get_sibling_path(WsdbGetSiblingPath cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetBlockNumbersForLeafIndices::Response WsdbIpcClient::get_block_numbers_for_leaf_indices( - WsdbGetBlockNumbersForLeafIndices cmd) const -{ - return send(std::move(cmd)); -} - -WsdbFindLeafIndices::Response WsdbIpcClient::find_leaf_indices(WsdbFindLeafIndices cmd) const -{ - return send(std::move(cmd)); -} - -WsdbFindLowLeaf::Response WsdbIpcClient::find_low_leaf(WsdbFindLowLeaf cmd) const -{ - return send(std::move(cmd)); -} - -WsdbFindSiblingPaths::Response WsdbIpcClient::find_sibling_paths(WsdbFindSiblingPaths cmd) const -{ - return send(std::move(cmd)); -} - -void WsdbIpcClient::append_leaves(WsdbAppendLeaves cmd) const -{ - send(std::move(cmd)); -} - -WsdbBatchInsert::Response WsdbIpcClient::batch_insert(WsdbBatchInsert cmd) const -{ - return send(std::move(cmd)); -} - -WsdbSequentialInsert::Response WsdbIpcClient::sequential_insert(WsdbSequentialInsert cmd) const -{ - return send(std::move(cmd)); -} - -void WsdbIpcClient::update_archive(WsdbUpdateArchive cmd) const -{ - send(std::move(cmd)); -} - -WsdbCommit::Response WsdbIpcClient::commit() -{ - return send(WsdbCommit{}); -} - -void WsdbIpcClient::rollback() -{ - send(WsdbRollback{}); -} - -WsdbSyncBlock::Response WsdbIpcClient::sync_block(WsdbSyncBlock cmd) -{ - return send(std::move(cmd)); -} - -WsdbCreateFork::Response WsdbIpcClient::create_fork(WsdbCreateFork cmd) -{ - return send(std::move(cmd)); -} - -void WsdbIpcClient::delete_fork(WsdbDeleteFork cmd) -{ - send(std::move(cmd)); -} - -WsdbFinalizeBlocks::Response WsdbIpcClient::finalize_blocks(WsdbFinalizeBlocks cmd) const -{ - return send(std::move(cmd)); -} - -WsdbUnwindBlocks::Response WsdbIpcClient::unwind_blocks(WsdbUnwindBlocks cmd) -{ - return send(std::move(cmd)); -} - -WsdbRemoveHistoricalBlocks::Response WsdbIpcClient::remove_historical_blocks(WsdbRemoveHistoricalBlocks cmd) const -{ - return send(std::move(cmd)); -} - -WsdbGetStatus::Response WsdbIpcClient::get_status() const -{ - return send(WsdbGetStatus{}); -} - -void WsdbIpcClient::create_checkpoint(WsdbCreateCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::commit_checkpoint(WsdbCommitCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::revert_checkpoint(WsdbRevertCheckpoint cmd) -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::commit_all_checkpoints(WsdbCommitAllCheckpoints cmd) -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::revert_all_checkpoints(WsdbRevertAllCheckpoints cmd) -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::copy_stores(WsdbCopyStores cmd) const -{ - send(std::move(cmd)); -} - -void WsdbIpcClient::shutdown() -{ - send(WsdbShutdown{}); -} - -} // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.hpp deleted file mode 100644 index cc5fede28845..000000000000 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// AUTOGENERATED FILE - DO NOT EDIT -#pragma once - -#include "barretenberg/common/try_catch_shim.hpp" -#include "barretenberg/ipc/ipc_client.hpp" -#include "barretenberg/wsdb/wsdb_execute.hpp" - -#include -#include - -namespace bb::wsdb { - -/** - * @brief Auto-generated IPC client. - * - * Each method sends a msgpack-serialized command to the server over UDS - * and returns the typed response. All methods block until the response arrives. - */ -class WsdbIpcClient { - public: - explicit WsdbIpcClient(const std::string& socket_path); - ~WsdbIpcClient(); - - WsdbIpcClient(const WsdbIpcClient&) = delete; - WsdbIpcClient& operator=(const WsdbIpcClient&) = delete; - - WsdbGetTreeInfo::Response get_tree_info(WsdbGetTreeInfo cmd) const; - WsdbGetStateReference::Response get_state_reference(WsdbGetStateReference cmd) const; - WsdbGetInitialStateReference::Response get_initial_state_reference() const; - WsdbGetLeafValue::Response get_leaf_value(WsdbGetLeafValue cmd) const; - WsdbGetLeafPreimage::Response get_leaf_preimage(WsdbGetLeafPreimage cmd) const; - WsdbGetSiblingPath::Response get_sibling_path(WsdbGetSiblingPath cmd) const; - WsdbGetBlockNumbersForLeafIndices::Response get_block_numbers_for_leaf_indices( - WsdbGetBlockNumbersForLeafIndices cmd) const; - WsdbFindLeafIndices::Response find_leaf_indices(WsdbFindLeafIndices cmd) const; - WsdbFindLowLeaf::Response find_low_leaf(WsdbFindLowLeaf cmd) const; - WsdbFindSiblingPaths::Response find_sibling_paths(WsdbFindSiblingPaths cmd) const; - void append_leaves(WsdbAppendLeaves cmd) const; - WsdbBatchInsert::Response batch_insert(WsdbBatchInsert cmd) const; - WsdbSequentialInsert::Response sequential_insert(WsdbSequentialInsert cmd) const; - void update_archive(WsdbUpdateArchive cmd) const; - WsdbCommit::Response commit(); - void rollback(); - WsdbSyncBlock::Response sync_block(WsdbSyncBlock cmd); - WsdbCreateFork::Response create_fork(WsdbCreateFork cmd); - void delete_fork(WsdbDeleteFork cmd); - WsdbFinalizeBlocks::Response finalize_blocks(WsdbFinalizeBlocks cmd) const; - WsdbUnwindBlocks::Response unwind_blocks(WsdbUnwindBlocks cmd); - WsdbRemoveHistoricalBlocks::Response remove_historical_blocks(WsdbRemoveHistoricalBlocks cmd) const; - WsdbGetStatus::Response get_status() const; - void create_checkpoint(WsdbCreateCheckpoint cmd); - void commit_checkpoint(WsdbCommitCheckpoint cmd); - void revert_checkpoint(WsdbRevertCheckpoint cmd); - void commit_all_checkpoints(WsdbCommitAllCheckpoints cmd); - void revert_all_checkpoints(WsdbRevertAllCheckpoints cmd); - void copy_stores(WsdbCopyStores cmd) const; - void shutdown(); - - private: - template typename Cmd::Response send(Cmd&& cmd) const; - - mutable std::unique_ptr client_; -}; - -} // 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 70ea97bf8bd3..3701d2656749 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.cpp @@ -1,28 +1,25 @@ #include "barretenberg/wsdb/wsdb_ipc_server.hpp" #include "barretenberg/common/log.hpp" +#include "barretenberg/common/parent_monitor.hpp" +#include "barretenberg/common/try_catch_shim.hpp" #include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp" -#include "barretenberg/ipc/ipc_server.hpp" -#include "barretenberg/serialize/msgpack.hpp" #include "barretenberg/world_state/world_state.hpp" -#include "barretenberg/wsdb/wsdb_execute.hpp" +#include "barretenberg/wsdb/generated/wsdb_ipc_server.hpp" +// Suppress implicit instantiation — explicit instantiation is in wsdb_handlers.cpp +#include "barretenberg/wsdb/wsdb_context.hpp" +using bb::wsdb::WsdbContext; +extern template ::ipc::Handler bb::wsdb::make_wsdb_handler(WsdbContext& ctx); + +#include #include #include #include #include #include -#include -#include #include #include -#ifdef __linux__ -#include -#elif defined(__APPLE__) -#include -#endif - -// Use nlohmann/json if available, otherwise minimal parsing #include namespace bb::wsdb { @@ -30,40 +27,9 @@ namespace bb::wsdb { using namespace bb::world_state; using namespace bb::crypto::merkle_tree; -// --------------------------------------------------------------------------- -// Platform-specific parent death monitoring -// (Same pattern as api_msgpack.cpp) -// --------------------------------------------------------------------------- - -static void setup_parent_death_monitoring() -{ -#ifdef __linux__ - if (prctl(PR_SET_PDEATHSIG, SIGTERM) == -1) { - std::cerr << "Warning: Could not set parent death signal" << '\n'; - } -#elif defined(__APPLE__) - pid_t parent_pid = getppid(); - std::thread([parent_pid]() { - int kq = kqueue(); - if (kq == -1) { - std::cerr << "Warning: Could not create kqueue for parent monitoring" << '\n'; - return; - } - struct kevent change; - EV_SET(&change, parent_pid, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, nullptr); - if (kevent(kq, &change, 1, nullptr, 0, nullptr) == -1) { - std::cerr << "Warning: Could not monitor parent process" << '\n'; - close(kq); - return; - } - struct kevent event; - kevent(kq, nullptr, 0, &event, 1, nullptr); - std::cerr << "Parent process exited, shutting down..." << '\n'; - close(kq); - std::exit(0); - }).detach(); -#endif -} +// Forward declaration — defined in wsdb_handlers.cpp +#include "barretenberg/wsdb/wsdb_context.hpp" +using bb::wsdb::WsdbContext; // --------------------------------------------------------------------------- // Simple JSON-like parsing for config maps @@ -78,7 +44,7 @@ static std::unordered_map parse_tree_uint64_map(const st } std::string cleaned; for (char c : json) { - if (c != '{' && c != '}' && c != ' ') { + if (c != '{' && c != '}' && c != ' ' && c != '"') { cleaned += c; } } @@ -179,9 +145,7 @@ int execute_wsdb_server(const std::string& input_path, const std::string& map_sizes_json, uint32_t threads, uint32_t initial_header_generator_point, - const std::string& prefilled_public_data_json, - size_t request_ring_size, - size_t response_ring_size) + const std::string& prefilled_public_data_json) { const uint64_t DEFAULT_MAP_SIZE = 1024UL * 1024; @@ -215,126 +179,22 @@ int execute_wsdb_server(const std::string& input_path, auto ws = std::make_unique( threads, data_dir, map_size, tree_height, tree_prefill, prefilled_public_data, initial_header_generator_point); - WsdbRequest request{ .world_state = *ws }; + WsdbContext ctx{ .world_state = *ws }; - // Create IPC server based on path suffix - std::unique_ptr server; - - if (input_path.size() >= 4 && input_path.substr(input_path.size() - 4) == ".shm") { - std::string base_name = input_path.substr(0, input_path.size() - 4); - constexpr size_t MAX_SHM_CLIENTS = 2; // TS backend (client 0) + AVM binary (client 1) - server = ipc::IpcServer::create_mpsc_shm(base_name, MAX_SHM_CLIENTS, request_ring_size, response_ring_size); - std::cerr << "MPSC shared memory server at " << base_name << " (max " << MAX_SHM_CLIENTS << " clients)\n"; - } else if (input_path.size() >= 5 && input_path.substr(input_path.size() - 5) == ".sock") { - server = ipc::IpcServer::create_socket(input_path, 1); - std::cerr << "Socket server at " << input_path << '\n'; - } else { - std::cerr << "Error: --input path must end with .sock or .shm" << '\n'; - return 1; - } - - // Set up signal handlers - static ipc::IpcServer* global_server = server.get(); - - auto graceful_shutdown_handler = [](int signal) { - std::cerr << "\nReceived signal " << signal << ", shutting down gracefully..." << '\n'; - if (global_server) { - global_server->request_shutdown(); - } - }; - - auto fatal_error_handler = [](int signal) { - const char* signal_name = (signal == SIGBUS) ? "SIGBUS" : (signal == SIGSEGV) ? "SIGSEGV" : "UNKNOWN"; - std::cerr << "\nFatal error: received " << signal_name << '\n'; - if (global_server) { - global_server->close(); - } - std::exit(1); - }; + // Signal handling: SIGTERM/SIGINT trigger graceful shutdown via atomic flag. + static std::atomic shutdown_flag{ false }; + auto signal_handler = [](int) { shutdown_flag.store(true, std::memory_order_release); }; + std::signal(SIGTERM, signal_handler); + std::signal(SIGINT, signal_handler); + std::signal(SIGPIPE, SIG_IGN); - (void)std::signal(SIGTERM, graceful_shutdown_handler); - (void)std::signal(SIGINT, graceful_shutdown_handler); - (void)std::signal(SIGBUS, fatal_error_handler); - (void)std::signal(SIGSEGV, fatal_error_handler); - - setup_parent_death_monitoring(); - - if (!server->listen()) { - std::cerr << "Error: Could not start IPC server" << '\n'; - return 1; - } - - std::cerr << "aztec-wsdb IPC server ready" << '\n'; - - // Run server with wsdb command handler - server->run([&request](int client_id, std::span raw_request) -> std::vector { - try { - // Deserialize msgpack command - // Format: [["CommandName", {payload}]] - a 1-element tuple containing the NamedUnion - auto unpacked = msgpack::unpack(reinterpret_cast(raw_request.data()), raw_request.size()); - auto obj = unpacked.get(); - - // Expect array of size 1 (tuple wrapping) - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { - std::cerr << "Error: Expected array of size 1 from client " << client_id << '\n'; - return {}; - } - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - auto& command_obj = obj.via.array.ptr[0]; - - // Check for shutdown before converting - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - if (command_obj.type == msgpack::type::ARRAY && command_obj.via.array.size == 2 && - command_obj.via.array.ptr[0].type == msgpack::type::STR) { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access) - std::string_view command_name(command_obj.via.array.ptr[0].via.str.ptr, - command_obj.via.array.ptr[0].via.str.size); - bool is_shutdown = (command_name == "WsdbShutdown"); - - // Convert and execute - WsdbCommand command; - command_obj.convert(command); - auto response = wsdb(request, std::move(command)); - - // Serialize response - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - std::vector result(response_buffer.data(), response_buffer.data() + response_buffer.size()); - - if (is_shutdown) { - throw ipc::ShutdownRequested(std::move(result)); - } - - return result; - } - - // Fallback: try converting directly - WsdbCommand command; - command_obj.convert(command); - auto response = wsdb(request, std::move(command)); - - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - return std::vector(response_buffer.data(), response_buffer.data() + response_buffer.size()); - - } catch (const ipc::ShutdownRequested&) { - throw; - } catch (const std::exception& e) { - std::cerr << "Error processing request from client " << client_id << ": " << e.what() << '\n'; - std::cerr.flush(); - - WsdbErrorResponse error_response{ .message = std::string(e.what()) }; - WsdbCommandResponse response = error_response; - - msgpack::sbuffer response_buffer; - msgpack::pack(response_buffer, response); - return std::vector(response_buffer.data(), response_buffer.data() + response_buffer.size()); - } - }); + // Parent death monitoring (SIGTERM on Linux, kqueue on macOS) + bb::monitor_parent_process(shutdown_flag); - server->close(); + // Run server using generated dispatch. + // make_wsdb_handler is explicitly instantiated in wsdb_handlers.cpp. + std::cerr << "aztec-wsdb IPC server starting on " << input_path << '\n'; + ::ipc::serve(input_path.c_str(), make_wsdb_handler(ctx), &shutdown_flag); return 0; } diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp index 45e14e9882cd..0569f3b68329 100644 --- a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_ipc_server.hpp @@ -19,8 +19,6 @@ int execute_wsdb_server(const std::string& input_path, const std::string& map_sizes_json, uint32_t threads, uint32_t initial_header_generator_point, - const std::string& prefilled_public_data_json, - size_t request_ring_size, - size_t response_ring_size); + const std::string& prefilled_public_data_json); } // namespace bb::wsdb diff --git a/barretenberg/cpp/src/barretenberg/wsdb/wsdb_wire_compat.test.cpp b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_wire_compat.test.cpp new file mode 100644 index 000000000000..22dc5805970c --- /dev/null +++ b/barretenberg/cpp/src/barretenberg/wsdb/wsdb_wire_compat.test.cpp @@ -0,0 +1,152 @@ +/** + * @brief Wire-format compatibility tests for WSDB IPC protocol. + * + * These tests serialize WSDB wire types to msgpack and verify the wire format + * matches the expected structure. This ensures cross-language compatibility -- + * any language that can produce the same bytes can talk to WSDB. + */ + +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/serialize/msgpack_impl.hpp" +#include "barretenberg/wsdb/generated/wsdb_types.hpp" + +#include +#include +#include + +namespace bb::wsdb::wire { + +// Helper: Deserialize and inspect the msgpack structure +msgpack::object_handle unpack(const std::vector& data) +{ + return msgpack::unpack(reinterpret_cast(data.data()), data.size()); +} + +// Helper: Serialize a value to msgpack bytes +template std::vector to_bytes(const T& value) +{ + msgpack::sbuffer buffer; + msgpack::pack(buffer, value); + return std::vector(buffer.data(), buffer.data() + buffer.size()); +} + +// --------------------------------------------------------------------------- +// Wire type round-trip tests +// --------------------------------------------------------------------------- + +TEST(WsdbWireCompat, GetTreeInfoRoundTrip) +{ + WsdbGetTreeInfo original; + original.treeId = 1; // NOTE_HASH_TREE + original.revision = WorldStateRevision{ .forkId = 5, .blockNumber = 100, .includeUncommitted = false }; + + auto bytes = to_bytes(original); + auto oh = unpack(bytes); + + WsdbGetTreeInfo deserialized; + oh.get().convert(deserialized); + + EXPECT_EQ(deserialized.treeId, original.treeId); + EXPECT_EQ(deserialized.revision.forkId, original.revision.forkId); + EXPECT_EQ(deserialized.revision.blockNumber, original.revision.blockNumber); + EXPECT_EQ(deserialized.revision.includeUncommitted, original.revision.includeUncommitted); +} + +TEST(WsdbWireCompat, GetTreeInfoResponseRoundTrip) +{ + Fr test_root{}; + test_root[0] = 1; // Simple non-zero root + + WsdbGetTreeInfoResponse original; + original.treeId = 0; // NULLIFIER_TREE + original.root = test_root; + original.size = 512; + original.depth = 32; + + auto bytes = to_bytes(original); + auto oh = unpack(bytes); + + WsdbGetTreeInfoResponse deserialized; + oh.get().convert(deserialized); + + EXPECT_EQ(deserialized.treeId, original.treeId); + EXPECT_EQ(deserialized.root, original.root); + EXPECT_EQ(deserialized.size, original.size); + EXPECT_EQ(deserialized.depth, original.depth); +} + +TEST(WsdbWireCompat, CreateForkRoundTrip) +{ + WsdbCreateFork original; + original.latest = false; + original.blockNumber = 50; + + auto bytes = to_bytes(original); + auto oh = unpack(bytes); + + WsdbCreateFork deserialized; + oh.get().convert(deserialized); + + EXPECT_EQ(deserialized.latest, original.latest); + EXPECT_EQ(deserialized.blockNumber, original.blockNumber); +} + +TEST(WsdbWireCompat, GetLeafValueRequestRoundTrip) +{ + WsdbGetLeafValue original; + original.treeId = 2; // PUBLIC_DATA_TREE + original.revision = WorldStateRevision{ .forkId = 1, .blockNumber = 10, .includeUncommitted = true }; + original.leafIndex = 42; + + auto bytes = to_bytes(original); + auto oh = unpack(bytes); + + WsdbGetLeafValue deserialized; + oh.get().convert(deserialized); + + EXPECT_EQ(deserialized.treeId, original.treeId); + EXPECT_EQ(deserialized.leafIndex, original.leafIndex); + EXPECT_EQ(deserialized.revision.forkId, original.revision.forkId); +} + +TEST(WsdbWireCompat, ErrorResponseFormat) +{ + WsdbErrorResponse err; + err.message = "tree not found"; + + auto bytes = to_bytes(err); + auto oh = unpack(bytes); + auto obj = oh.get(); + + // Should be a map with "message" field + ASSERT_EQ(obj.type, msgpack::type::MAP); + + WsdbErrorResponse deserialized; + obj.convert(deserialized); + EXPECT_EQ(deserialized.message, "tree not found"); +} + +TEST(WsdbWireCompat, StatusFullRoundTrip) +{ + WorldStateStatusSummary summary; + summary.unfinalizedBlockNumber = 100; + summary.finalizedBlockNumber = 90; + summary.oldestHistoricalBlock = 10; + summary.treesAreSynched = true; + + WorldStateStatusFull original; + original.summary = summary; + // Leave other fields default-initialized + + auto bytes = to_bytes(original); + auto oh = unpack(bytes); + + WorldStateStatusFull deserialized; + oh.get().convert(deserialized); + + EXPECT_EQ(deserialized.summary.unfinalizedBlockNumber, original.summary.unfinalizedBlockNumber); + EXPECT_EQ(deserialized.summary.finalizedBlockNumber, original.summary.finalizedBlockNumber); + EXPECT_EQ(deserialized.summary.treesAreSynched, original.summary.treesAreSynched); +} + +} // namespace bb::wsdb::wire diff --git a/barretenberg/rust/barretenberg-rs/Cargo.toml b/barretenberg/rust/barretenberg-rs/Cargo.toml index f637a2a82a56..83e122e60b4f 100644 --- a/barretenberg/rust/barretenberg-rs/Cargo.toml +++ b/barretenberg/rust/barretenberg-rs/Cargo.toml @@ -21,21 +21,16 @@ rmp-serde.workspace = true rmpv.workspace = true serde.workspace = true -# Async runtime -tokio = { workspace = true, optional = true } - # IPC and system libc.workspace = true -nix = { workspace = true, optional = true } # Utilities thiserror.workspace = true -tracing = { workspace = true, optional = true } hex.workspace = true [features] -default = ["native", "ffi"] -native = ["tokio", "nix", "tracing"] -async = ["tokio"] -# FFI backend - links against libbarretenberg from cpp build +default = ["uds", "ffi"] +# UDS backend — connects to a running BB server via Unix domain socket +uds = [] +# FFI backend — links against libbarretenberg from cpp build ffi = [] diff --git a/barretenberg/rust/barretenberg-rs/src/backends/pipe.rs b/barretenberg/rust/barretenberg-rs/src/backends/pipe.rs deleted file mode 100644 index 2e3cd248061d..000000000000 --- a/barretenberg/rust/barretenberg-rs/src/backends/pipe.rs +++ /dev/null @@ -1,112 +0,0 @@ -//! Pipe backend for Barretenberg -//! -//! This backend communicates with the BB binary via stdin/stdout pipes, -//! using a 4-byte little-endian length prefix protocol. - -use crate::backend::Backend; -use crate::error::{BarretenbergError, Result}; -use std::io::{Read, Write}; -use std::path::Path; -use std::process::{Child, ChildStdin, ChildStdout, Command, Stdio}; - -/// Pipe backend implementation using stdin/stdout -pub struct PipeBackend { - stdin: ChildStdin, - stdout: ChildStdout, - process: Option, -} - -impl PipeBackend { - /// Create a new pipe backend by spawning the BB process - /// - /// # Arguments - /// * `bb_binary_path` - Path to the BB binary - /// * `threads` - Number of threads for BB to use - pub fn new(bb_binary_path: impl AsRef, threads: Option) -> Result { - // Build command - let mut cmd = Command::new(bb_binary_path.as_ref()); - cmd.arg("msgpack") - .arg("run") - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::inherit()); - - // Note: BB uses HARDWARE_CONCURRENCY env var for thread control - if let Some(t) = threads { - cmd.env("HARDWARE_CONCURRENCY", t.to_string()); - } - - // Spawn the process - let mut process = cmd.spawn() - .map_err(|e| BarretenbergError::Backend(format!("Failed to spawn BB process: {}", e)))?; - - // Take stdin and stdout handles - let stdin = process.stdin.take() - .ok_or_else(|| BarretenbergError::Backend("Failed to get stdin handle".to_string()))?; - let stdout = process.stdout.take() - .ok_or_else(|| BarretenbergError::Backend("Failed to get stdout handle".to_string()))?; - - // Check if process exited immediately (indicates startup failure) - if let Ok(Some(status)) = process.try_wait() { - return Err(BarretenbergError::Backend( - format!("BB process exited immediately with status: {}", status) - )); - } - - Ok(Self { - stdin, - stdout, - process: Some(process), - }) - } - - /// Send data with length prefix - fn send_with_prefix(&mut self, data: &[u8]) -> Result<()> { - let len = data.len() as u32; - self.stdin.write_all(&len.to_le_bytes()) - .map_err(|e| BarretenbergError::Ipc(format!("Failed to write length: {}", e)))?; - self.stdin.write_all(data) - .map_err(|e| BarretenbergError::Ipc(format!("Failed to write data: {}", e)))?; - self.stdin.flush() - .map_err(|e| BarretenbergError::Ipc(format!("Failed to flush stdin: {}", e)))?; - Ok(()) - } - - /// Receive data with length prefix - fn receive_with_prefix(&mut self) -> Result> { - let mut len_buf = [0u8; 4]; - self.stdout.read_exact(&mut len_buf) - .map_err(|e| BarretenbergError::Ipc(format!("Failed to read length: {}", e)))?; - - let len = u32::from_le_bytes(len_buf) as usize; - - let mut data = vec![0u8; len]; - self.stdout.read_exact(&mut data) - .map_err(|e| BarretenbergError::Ipc(format!("Failed to read data: {}", e)))?; - - Ok(data) - } -} - -impl Backend for PipeBackend { - fn call(&mut self, input: &[u8]) -> Result> { - self.send_with_prefix(input)?; - self.receive_with_prefix() - } - - fn destroy(&mut self) -> Result<()> { - // Kill the process if it's still running - if let Some(mut process) = self.process.take() { - let _ = process.kill(); - let _ = process.wait(); - } - - Ok(()) - } -} - -impl Drop for PipeBackend { - fn drop(&mut self) { - let _ = self.destroy(); - } -} diff --git a/barretenberg/rust/barretenberg-rs/src/lib.rs b/barretenberg/rust/barretenberg-rs/src/lib.rs index ffccd08c514d..b029622e67c5 100644 --- a/barretenberg/rust/barretenberg-rs/src/lib.rs +++ b/barretenberg/rust/barretenberg-rs/src/lib.rs @@ -1,75 +1,53 @@ //! # Barretenberg Rust Bindings //! -//! High-performance Rust bindings to the Barretenberg cryptographic library -//! using msgpack protocol over pluggable backends. +//! High-performance Rust bindings to the Barretenberg cryptographic library. +//! Two backends available: //! -//! ## Usage with PipeBackend +//! - **UDS** (`--features uds`): Connect to a running BB server via Unix domain socket +//! - **FFI** (`--features ffi`): Link against libbarretenberg.a, call directly (no IPC) +//! +//! ## Example (UDS) //! //! ```ignore -//! use barretenberg_rs::{BarretenbergApi, backends::PipeBackend}; +//! use barretenberg_rs::generated::{uds_backend::UdsBackend, bb_client::BarretenbergApi}; //! -//! // Create a pipe backend (requires BB binary) -//! let backend = PipeBackend::new("/path/to/bb", Some(4))?; +//! let backend = UdsBackend::connect("/tmp/bb.sock")?; //! let mut api = BarretenbergApi::new(backend); -//! -//! // Use the API -//! let response = api.blake2s(b"hello world")?; -//! println!("Hash: {:?}", response.hash); -//! -//! // Cleanup -//! api.destroy()?; -//! ``` -//! -//! ## Custom Backend -//! -//! Implement the `Backend` trait for custom IPC strategies: -//! +//! let resp = api.blake2s(b"hello")?; //! ``` -//! use barretenberg_rs::{Backend, BarretenbergError, Result}; //! -//! struct MyBackend { -//! // Your implementation (WASM module, FFI handle, network connection, etc.) -//! } +//! ## Example (FFI) //! -//! impl Backend for MyBackend { -//! fn call(&mut self, request: &[u8]) -> Result> { -//! // Send msgpack request, receive msgpack response -//! // The request is a msgpack-encoded Vec -//! // The response should be a msgpack-encoded Response -//! todo!() -//! } +//! ```ignore +//! use barretenberg_rs::generated::{ffi_backend::FfiBackend, bb_client::BarretenbergApi}; //! -//! fn destroy(&mut self) -> Result<()> { -//! // Cleanup resources -//! Ok(()) -//! } -//! } +//! let mut api = BarretenbergApi::new(FfiBackend); +//! let resp = api.blake2s(b"hello")?; //! ``` -pub mod backend; -pub mod types; -pub mod api; -pub mod error; - -// Generated types from msgpack schema -// Run: cd ../ts && yarn generate -pub mod generated_types; +// Everything is codegen-generated or template-copied into generated/. +// Run: cd barretenberg/codegen && ./bootstrap.sh generate +pub mod generated { + pub mod bb_types; + pub mod bb_client; + pub mod backend; + pub mod error; -pub use backend::Backend; -pub use types::{Fr, Point}; -pub use generated_types::{Command, Response, GrumpkinPoint}; -pub use api::BarretenbergApi; -pub use error::{BarretenbergError, Result}; + #[cfg(feature = "uds")] + pub mod uds_backend; -/// Backend implementations -pub mod backends { - #[cfg(feature = "native")] - pub mod pipe; - #[cfg(feature = "native")] - pub use pipe::PipeBackend; - - #[cfg(feature = "ffi")] - pub mod ffi; #[cfg(feature = "ffi")] - pub use ffi::FfiBackend; + pub mod ffi_backend; } + +// Re-exports for convenience +pub use generated::backend::Backend; +pub use generated::error::{BarretenbergError, Result}; +pub use generated::bb_client::BbApi; +pub use generated::bb_types::{Fr, GrumpkinPoint}; + +#[cfg(feature = "uds")] +pub use generated::uds_backend::UdsBackend; + +#[cfg(feature = "ffi")] +pub use generated::ffi_backend::FfiBackend; diff --git a/barretenberg/rust/barretenberg-rs/src/types.rs b/barretenberg/rust/barretenberg-rs/src/types.rs deleted file mode 100644 index 6ad04b26ecd7..000000000000 --- a/barretenberg/rust/barretenberg-rs/src/types.rs +++ /dev/null @@ -1,53 +0,0 @@ -//! Core utility types for Barretenberg operations - -use serde::{Deserialize, Serialize}; - -/// Field element (Fr) - 254-bit field element for BN254 -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Fr(pub [u8; 32]); - -impl Fr { - /// Create a new field element from a u64 value (big-endian encoding, matching C++ msgpack format) - pub fn from_u64(value: u64) -> Self { - let mut bytes = [0u8; 32]; - bytes[24..32].copy_from_slice(&value.to_be_bytes()); - Fr(bytes) - } - - /// Create a field element from bytes (big-endian) - pub fn from_be_bytes(bytes: [u8; 32]) -> Self { - Fr(bytes) - } - - /// Create a field element from bytes (little-endian) - pub fn from_le_bytes(bytes: [u8; 32]) -> Self { - Fr(bytes) - } - - /// Create a field element from a 32-byte buffer (no reduction) - /// Panics if buffer is not exactly 32 bytes - pub fn from_buffer(buffer: &[u8]) -> Self { - let bytes: [u8; 32] = buffer.try_into().expect("Buffer must be exactly 32 bytes"); - Fr(bytes) - } - - /// Create a field element from a byte slice, reducing if necessary - pub fn from_buffer_reduce(buffer: &[u8]) -> Self { - let mut bytes = [0u8; 32]; - let len = buffer.len().min(32); - bytes[..len].copy_from_slice(&buffer[..len]); - Fr(bytes) - } - - /// Convert to a byte buffer (as used in msgpack) - pub fn to_buffer(&self) -> Vec { - self.0.to_vec() - } -} - -/// Point on the elliptic curve (affine_element) -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Point { - pub x: [u8; 32], - pub y: [u8; 32], -} diff --git a/barretenberg/rust/bootstrap.sh b/barretenberg/rust/bootstrap.sh index 6c3938fc2d58..39ef1ba4e0a7 100755 --- a/barretenberg/rust/bootstrap.sh +++ b/barretenberg/rust/bootstrap.sh @@ -2,15 +2,15 @@ # Use ci3 script base. source $(git rev-parse --show-toplevel)/ci3/source_bootstrap -# Hash depends on ts because ts generates the Rust bindings -hash=$(hash_str $(../ts/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns)) +# Hash depends on codegen hash (includes schemas + codegen source) +hash=$(hash_str $(../codegen/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns)) function build { echo_header "barretenberg-rs build" if ! cache_download barretenberg-rs-$hash.tar.gz; then - # Generate Rust bindings from msgpack schema (uses ts-node, no build needed) - (cd ../ts && yarn generate) + # Generate bindings from committed schemas (zero npm deps, ~2s) + (cd ../codegen && ./bootstrap.sh generate) # Build all targets # BB_LIB_DIR tells build.rs to use local lib instead of downloading (ffi feature is on by default) @@ -18,7 +18,7 @@ function build { BB_LIB_DIR="$(cd ../cpp/build/lib && pwd)" denoise "cargo build --release" # Upload build artifacts and generated source files to cache - cache_upload barretenberg-rs-$hash.tar.gz target/release barretenberg-rs/src/generated_types.rs barretenberg-rs/src/api.rs + cache_upload barretenberg-rs-$hash.tar.gz target/release barretenberg-rs/src/generated/ fi } @@ -36,9 +36,9 @@ function test { source "$HOME/.cargo/env" fi - # Run PipeBackend tests (spawns bb binary) + # Run UdsBackend tests (requires a running bb server on a socket) # Use --no-default-features to skip FFI (which requires libbb-external.a) - denoise "cargo test --release --no-default-features --features native" + denoise "cargo test --release --no-default-features --features uds" # Run FFI backend tests (requires libbb-external.a from cpp build) # BB_LIB_DIR tells build.rs to use local lib instead of downloading @@ -55,9 +55,9 @@ function release { sed -i "s/^version = \".*\"/version = \"$version\"/" Cargo.toml # Generated files must exist (created during build step, or generate now) - if [ ! -f barretenberg-rs/src/api.rs ] || [ ! -f barretenberg-rs/src/generated_types.rs ]; then - echo "Generated files not found, running yarn generate..." - (cd ../ts && yarn generate) + if [ ! -f barretenberg-rs/src/generated/bb_client.rs ] || [ ! -f barretenberg-rs/src/generated/bb_types.rs ]; then + echo "Generated files not found, running codegen..." + (cd ../codegen && ./bootstrap.sh generate) fi # Check if this version is already published on crates.io (idempotent re-runs). diff --git a/barretenberg/rust/scripts/run_test.sh b/barretenberg/rust/scripts/run_test.sh index 02cf98907bd4..6f659204945f 100755 --- a/barretenberg/rust/scripts/run_test.sh +++ b/barretenberg/rust/scripts/run_test.sh @@ -10,7 +10,7 @@ fi # Run PipeBackend tests (spawns bb binary) # Use --no-default-features to skip FFI (which requires libbb-external.a) -denoise "cargo test --release --no-default-features --features native" +denoise "cargo test --release --no-default-features --features uds" # Run FFI backend tests (requires libbb-external.a from cpp build) # BB_LIB_DIR tells build.rs to use local lib instead of downloading diff --git a/barretenberg/rust/tests/Cargo.toml b/barretenberg/rust/tests/Cargo.toml index c52ddf88621e..9eda5c7484e4 100644 --- a/barretenberg/rust/tests/Cargo.toml +++ b/barretenberg/rust/tests/Cargo.toml @@ -9,7 +9,7 @@ publish = false ffi = ["barretenberg-rs/ffi"] [dependencies] -barretenberg-rs = { path = "../barretenberg-rs", default-features = false, features = ["native", "async"] } +barretenberg-rs = { path = "../barretenberg-rs", default-features = false, features = ["uds"] } # Serialization serde.workspace = true diff --git a/barretenberg/rust/tests/src/blake2s.rs b/barretenberg/rust/tests/src/blake2s.rs index c6181452e0d3..9c7f2cc23fe1 100644 --- a/barretenberg/rust/tests/src/blake2s.rs +++ b/barretenberg/rust/tests/src/blake2s.rs @@ -1,24 +1,14 @@ //! Blake2s hash tests -//! -//! Parallels barretenberg/ts/src/barretenberg/blake2s.test.ts -//! -//! These tests require the BB binary to be built. They are skipped if the binary is not found. #[cfg(test)] -use barretenberg_rs::{backends::PipeBackend, BarretenbergApi, Fr}; -#[cfg(test)] -use crate::utils::get_bb_binary_path; +use barretenberg_rs::Fr; #[cfg(test)] use crate::require_bb_binary; #[test] fn test_blake2s() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let input = b"abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"; let expected: [u8; 32] = [ @@ -28,12 +18,7 @@ fn test_blake2s() { ]; let response = api.blake2s(input).expect("Blake2s failed"); - - assert_eq!( - response.hash.as_slice(), - &expected, - "Blake2s hash mismatch" - ); + assert_eq!(response.hash.as_slice(), &expected, "Blake2s hash mismatch"); api.destroy().expect("Failed to destroy backend"); } @@ -41,25 +26,16 @@ fn test_blake2s() { #[test] fn test_blake2s_to_field() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let input = b"abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"; - // Blake2sToField returns the hash reduced to a field element - let expected_field: [u8; 32] = [ + let expected = Fr([ 20, 121, 140, 198, 220, 129, 15, 87, 8, 247, 67, 149, 155, 244, 18, 125, 20, 232, 66, 122, 55, 70, 227, 140, 193, 28, 146, 32, 181, 158, 18, 66, - ]; - - let expected = Fr(expected_field); + ]); let response = api.blake2s_to_field(input).expect("Blake2sToField failed"); - let result = Fr::from_buffer_reduce(&response.field); - - assert_eq!(result, expected, "Blake2sToField result mismatch"); + assert_eq!(response.field, expected, "Blake2sToField result mismatch"); api.destroy().expect("Failed to destroy backend"); } diff --git a/barretenberg/rust/tests/src/debug_msgpack.rs b/barretenberg/rust/tests/src/debug_msgpack.rs index 5ab317a5d8bd..cee4e25ce474 100644 --- a/barretenberg/rust/tests/src/debug_msgpack.rs +++ b/barretenberg/rust/tests/src/debug_msgpack.rs @@ -1,11 +1,15 @@ //! Debug msgpack serialization format #[cfg(test)] -use barretenberg_rs::{generated_types::*, Fr}; +use barretenberg_rs::generated::bb_types::*; +#[cfg(test)] +use barretenberg_rs::Fr; +#[cfg(test)] +use crate::utils::fr_from_u64; #[test] fn test_msgpack_format() { - let cmd = Command::Blake2s(Blake2s::new(b"test".to_vec())); + let cmd = Command::BbBlake2s(BbBlake2s::new(b"test".to_vec())); let bytes = rmp_serde::to_vec_named(&vec![cmd]).unwrap(); println!("\n=== Msgpack Format Debug (Blake2s with to_vec_named) ==="); @@ -22,12 +26,9 @@ fn test_msgpack_format() { #[test] fn test_pedersen_msgpack_format() { - let inputs: Vec> = vec![ - Fr::from_u64(4).to_buffer().to_vec(), - Fr::from_u64(8).to_buffer().to_vec(), - ]; + let inputs = vec![fr_from_u64(4), fr_from_u64(8)]; - let cmd = Command::PedersenHash(PedersenHash::new(inputs, 7)); + let cmd = Command::BbPedersenHash(BbPedersenHash::new(inputs, 7)); let bytes = rmp_serde::to_vec_named(&vec![cmd]).unwrap(); println!("\n=== Msgpack Format Debug (PedersenHash) ==="); diff --git a/barretenberg/rust/tests/src/ffi/aes.rs b/barretenberg/rust/tests/src/ffi/aes.rs index c9fc81731401..e9a45aa8b0c0 100644 --- a/barretenberg/rust/tests/src/ffi/aes.rs +++ b/barretenberg/rust/tests/src/ffi/aes.rs @@ -3,7 +3,7 @@ //! Ported from zkpassport/aztec-packages bb_rs aes_tests.rs #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi}; +use barretenberg_rs::{FfiBackend, BbApi}; /// Apply PKCS#7 padding to input data (for testing purposes) #[cfg(test)] @@ -44,7 +44,7 @@ fn remove_pkcs7_padding(data: &[u8]) -> Result, &'static str> { #[test] fn test_aes_encrypt_decrypt_roundtrip() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let plaintext = b"Hello, AES world! This is a test message for encryption."; let key = [ @@ -86,7 +86,7 @@ fn test_aes_encrypt_decrypt_roundtrip() { #[test] fn test_aes_buffer_encrypt_decrypt() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let plaintext = b"AES buffer test message"; let key = [ @@ -124,7 +124,7 @@ fn test_aes_buffer_encrypt_decrypt() { #[test] fn test_aes_different_keys_produce_different_outputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let plaintext = b"Test message for key difference"; let key1 = [ @@ -160,7 +160,7 @@ fn test_aes_different_keys_produce_different_outputs() { #[test] fn test_aes_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let plaintext = b"Deterministic test message"; let key = [ diff --git a/barretenberg/rust/tests/src/ffi/blake2s.rs b/barretenberg/rust/tests/src/ffi/blake2s.rs index ddb7ab85f794..f188b44acc5d 100644 --- a/barretenberg/rust/tests/src/ffi/blake2s.rs +++ b/barretenberg/rust/tests/src/ffi/blake2s.rs @@ -3,12 +3,14 @@ //! Parallels barretenberg/ts/src/barretenberg/blake2s.test.ts #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi, Fr}; +use barretenberg_rs::{FfiBackend, BbApi, Fr}; +#[cfg(test)] +use crate::utils::fr_from_u64; #[test] fn test_blake2s() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let input = b"abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"; let expected: [u8; 32] = [ @@ -31,7 +33,7 @@ fn test_blake2s() { #[test] fn test_blake2s_to_field() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let input = b"abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"; // Blake2sToField returns the hash reduced to a field element @@ -43,7 +45,7 @@ fn test_blake2s_to_field() { let expected = Fr(expected_field); let response = api.blake2s_to_field(input).expect("Blake2sToField failed"); - let result = Fr::from_buffer_reduce(&response.field); + let result = response.field; assert_eq!(result, expected, "Blake2sToField result mismatch"); diff --git a/barretenberg/rust/tests/src/ffi/bn254.rs b/barretenberg/rust/tests/src/ffi/bn254.rs index 2a610759d711..8a846f93dc56 100644 --- a/barretenberg/rust/tests/src/ffi/bn254.rs +++ b/barretenberg/rust/tests/src/ffi/bn254.rs @@ -1,26 +1,23 @@ //! BN254 curve tests using FfiBackend -//! -//! Tests for BN254 field operations (sqrt). #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi}; +use barretenberg_rs::{FfiBackend, BbApi, Fr}; + +#[cfg(test)] +fn fr_val(v: u8) -> Fr { + let mut bytes = [0u8; 32]; + bytes[31] = v; + Fr(bytes) +} #[test] fn test_bn254_fr_sqrt_of_zero() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - // Square root of zero should be zero - let zero = vec![0u8; 32]; - - let response = api.bn254_fr_sqrt(&zero).expect("bn254_fr_sqrt failed"); + let mut api = BbApi::new(backend); + let response = api.bn254_fr_sqrt(Fr([0u8; 32])).expect("bn254_fr_sqrt failed"); assert!(response.is_square_root, "Square root of zero should exist"); - assert_eq!( - response.value, - vec![0u8; 32], - "Square root of zero should be zero" - ); + assert_eq!(response.value, Fr([0u8; 32]), "Square root of zero should be zero"); api.destroy().expect("Failed to destroy backend"); } @@ -28,19 +25,12 @@ fn test_bn254_fr_sqrt_of_zero() { #[test] fn test_bn254_fr_sqrt_of_one() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - // Square root of one should be one - let mut one = vec![0u8; 32]; - one[31] = 1; - - let response = api.bn254_fr_sqrt(&one).expect("bn254_fr_sqrt failed"); + let mut api = BbApi::new(backend); + let one = fr_val(1); + let response = api.bn254_fr_sqrt(one.clone()).expect("bn254_fr_sqrt failed"); assert!(response.is_square_root, "Square root of one should exist"); - assert_eq!( - response.value, one, - "Square root of one should be one" - ); + assert_eq!(response.value, one, "Square root of one should be one"); api.destroy().expect("Failed to destroy backend"); } @@ -48,23 +38,11 @@ fn test_bn254_fr_sqrt_of_one() { #[test] fn test_bn254_fr_sqrt_of_four() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - // Square root of four should be two - let mut four = vec![0u8; 32]; - four[31] = 4; - - let response = api.bn254_fr_sqrt(&four).expect("bn254_fr_sqrt failed"); + let mut api = BbApi::new(backend); + let response = api.bn254_fr_sqrt(fr_val(4)).expect("bn254_fr_sqrt failed"); assert!(response.is_square_root, "Square root of four should exist"); - - // The square root should be 2 - let mut expected = vec![0u8; 32]; - expected[31] = 2; - assert_eq!( - response.value, expected, - "Square root of four should be two" - ); + assert_eq!(response.value, fr_val(2), "Square root of four should be two"); api.destroy().expect("Failed to destroy backend"); } @@ -72,15 +50,10 @@ fn test_bn254_fr_sqrt_of_four() { #[test] fn test_bn254_fr_sqrt_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - let mut input = vec![0u8; 32]; - input[31] = 16; // Perfect square - - let response1 = api.bn254_fr_sqrt(&input).expect("bn254_fr_sqrt failed"); - let response2 = api.bn254_fr_sqrt(&input).expect("bn254_fr_sqrt failed"); + let mut api = BbApi::new(backend); - // Should be deterministic + let response1 = api.bn254_fr_sqrt(fr_val(16)).expect("bn254_fr_sqrt failed"); + let response2 = api.bn254_fr_sqrt(fr_val(16)).expect("bn254_fr_sqrt failed"); assert_eq!(response1.is_square_root, response2.is_square_root); assert_eq!(response1.value, response2.value); @@ -90,19 +63,11 @@ fn test_bn254_fr_sqrt_deterministic() { #[test] fn test_bn254_fq_sqrt() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - // Test Fq sqrt (base field) with a perfect square - let mut four = vec![0u8; 32]; - four[31] = 4; - - let response = api.bn254_fq_sqrt(&four).expect("bn254_fq_sqrt failed"); + let mut api = BbApi::new(backend); + let response = api.bn254_fq_sqrt(fr_val(4)).expect("bn254_fq_sqrt failed"); assert!(response.is_square_root, "Square root of four in Fq should exist"); - - let mut expected = vec![0u8; 32]; - expected[31] = 2; - assert_eq!(response.value, expected); + assert_eq!(response.value, fr_val(2)); api.destroy().expect("Failed to destroy backend"); } diff --git a/barretenberg/rust/tests/src/ffi/ecdsa.rs b/barretenberg/rust/tests/src/ffi/ecdsa.rs index 1a4ce8455120..3e64308a29c2 100644 --- a/barretenberg/rust/tests/src/ffi/ecdsa.rs +++ b/barretenberg/rust/tests/src/ffi/ecdsa.rs @@ -3,12 +3,12 @@ //! Tests for ECDSA secp256k1 signatures. #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, generated_types::Secp256k1Point, BarretenbergApi}; +use barretenberg_rs::{Fr, FfiBackend, generated::bb_types::Secp256k1Point, BbApi}; #[test] fn test_ecdsa_compute_public_key() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // A valid secp256k1 private key (32 bytes) let private_key: [u8; 32] = [ @@ -18,14 +18,14 @@ fn test_ecdsa_compute_public_key() { ]; let response = api - .ecdsa_secp256k1_compute_public_key(&private_key) + .ecdsa_secp256k1_compute_public_key(Fr(private_key)) .expect("ecdsa_secp256k1_compute_public_key failed"); // Should return a valid public key point - assert_eq!(response.public_key.x.len(), 32); - assert_eq!(response.public_key.y.len(), 32); + assert_eq!(response.public_key.x.as_slice().len(), 32); + assert_eq!(response.public_key.y.as_slice().len(), 32); // Should not be all zeros - assert_ne!(response.public_key.x, vec![0u8; 32]); + assert_ne!(response.public_key.x, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -33,7 +33,7 @@ fn test_ecdsa_compute_public_key() { #[test] fn test_ecdsa_compute_public_key_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key: [u8; 32] = [ 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, @@ -42,10 +42,10 @@ fn test_ecdsa_compute_public_key_deterministic() { ]; let response1 = api - .ecdsa_secp256k1_compute_public_key(&private_key) + .ecdsa_secp256k1_compute_public_key(Fr(private_key)) .expect("ecdsa_secp256k1_compute_public_key failed"); let response2 = api - .ecdsa_secp256k1_compute_public_key(&private_key) + .ecdsa_secp256k1_compute_public_key(Fr(private_key)) .expect("ecdsa_secp256k1_compute_public_key failed"); // Same private key should produce same public key @@ -58,7 +58,7 @@ fn test_ecdsa_compute_public_key_deterministic() { #[test] fn test_ecdsa_different_private_keys() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key1: [u8; 32] = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -72,10 +72,10 @@ fn test_ecdsa_different_private_keys() { ]; let response1 = api - .ecdsa_secp256k1_compute_public_key(&private_key1) + .ecdsa_secp256k1_compute_public_key(Fr(private_key1)) .expect("ecdsa_secp256k1_compute_public_key failed"); let response2 = api - .ecdsa_secp256k1_compute_public_key(&private_key2) + .ecdsa_secp256k1_compute_public_key(Fr(private_key2)) .expect("ecdsa_secp256k1_compute_public_key failed"); // Different private keys should produce different public keys @@ -90,7 +90,7 @@ fn test_ecdsa_different_private_keys() { #[test] fn test_ecdsa_sign_and_verify() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // Private key let private_key: [u8; 32] = [ @@ -101,7 +101,7 @@ fn test_ecdsa_sign_and_verify() { // Compute public key let pub_key_response = api - .ecdsa_secp256k1_compute_public_key(&private_key) + .ecdsa_secp256k1_compute_public_key(Fr(private_key)) .expect("ecdsa_secp256k1_compute_public_key failed"); let public_key = Secp256k1Point { x: pub_key_response.public_key.x.clone(), @@ -117,16 +117,16 @@ fn test_ecdsa_sign_and_verify() { // Sign let sign_response = api - .ecdsa_secp256k1_construct_signature(&message_hash, &private_key) + .ecdsa_secp256k1_construct_signature(&message_hash, Fr(private_key)) .expect("ecdsa_secp256k1_construct_signature failed"); // Signature should have r, s, and v components - assert_eq!(sign_response.r.len(), 32); - assert_eq!(sign_response.s.len(), 32); + assert_eq!(sign_response.r.as_slice().len(), 32); + assert_eq!(sign_response.s.as_slice().len(), 32); // Verify let verify_response = api - .ecdsa_secp256k1_verify_signature(&message_hash, public_key, &sign_response.r, &sign_response.s, sign_response.v) + .ecdsa_secp256k1_verify_signature(&message_hash, public_key, sign_response.r.clone(), sign_response.s.clone(), sign_response.v) .expect("ecdsa_secp256k1_verify_signature failed"); assert!(verify_response.verified, "Signature should be valid"); @@ -137,7 +137,7 @@ fn test_ecdsa_sign_and_verify() { #[test] fn test_ecdsa_verify_wrong_message() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key: [u8; 32] = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -146,7 +146,7 @@ fn test_ecdsa_verify_wrong_message() { ]; let pub_key_response = api - .ecdsa_secp256k1_compute_public_key(&private_key) + .ecdsa_secp256k1_compute_public_key(Fr(private_key)) .expect("ecdsa_secp256k1_compute_public_key failed"); let public_key = Secp256k1Point { x: pub_key_response.public_key.x.clone(), @@ -158,12 +158,12 @@ fn test_ecdsa_verify_wrong_message() { // Sign with message_hash1 let sign_response = api - .ecdsa_secp256k1_construct_signature(&message_hash1, &private_key) + .ecdsa_secp256k1_construct_signature(&message_hash1, Fr(private_key)) .expect("ecdsa_secp256k1_construct_signature failed"); // Verify with message_hash2 - should fail let verify_response = api - .ecdsa_secp256k1_verify_signature(&message_hash2, public_key, &sign_response.r, &sign_response.s, sign_response.v) + .ecdsa_secp256k1_verify_signature(&message_hash2, public_key, sign_response.r.clone(), sign_response.s.clone(), sign_response.v) .expect("ecdsa_secp256k1_verify_signature failed"); assert!(!verify_response.verified, "Signature should be invalid for wrong message"); diff --git a/barretenberg/rust/tests/src/ffi/grumpkin.rs b/barretenberg/rust/tests/src/ffi/grumpkin.rs index 1482485000a1..08ed8afb96f2 100644 --- a/barretenberg/rust/tests/src/ffi/grumpkin.rs +++ b/barretenberg/rust/tests/src/ffi/grumpkin.rs @@ -3,7 +3,7 @@ //! Ported from zkpassport/aztec-packages bb_rs grumpkin_tests.rs #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, generated_types::GrumpkinPoint, BarretenbergApi}; +use barretenberg_rs::{Fr, FfiBackend, generated::bb_types::GrumpkinPoint, BbApi}; // Grumpkin generator point // x = 1 @@ -24,28 +24,27 @@ fn grumpkin_generator() -> GrumpkinPoint { 0x27, 0x2c, ]; GrumpkinPoint { - x: x.to_vec(), - y: y.to_vec(), + x: Fr(x), + y: Fr(y), } } #[test] fn test_grumpkin_scalar_multiplication() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = grumpkin_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 3; // scalar = 3 + let scalar = { let mut b = [0u8; 32]; b[31] = 3; Fr(b) }; // scalar = 3 let response = api - .grumpkin_mul(point.clone(), &scalar) + .grumpkin_mul(point.clone(), scalar.clone()) .expect("grumpkin_mul failed"); // Result should be different from input (3*G != G) assert_ne!(response.point.x, point.x); // Result should be a valid point (non-zero) - assert_ne!(response.point.x, vec![0u8; 32]); + assert_ne!(response.point.x, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -53,15 +52,14 @@ fn test_grumpkin_scalar_multiplication() { #[test] fn test_grumpkin_scalar_multiplication_by_one() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = grumpkin_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 1; // scalar = 1 + let scalar = { let mut b = [0u8; 32]; b[31] = 1; Fr(b) }; // scalar = 1 let response = api - .grumpkin_mul(point.clone(), &scalar) + .grumpkin_mul(point.clone(), scalar.clone()) .expect("grumpkin_mul failed"); // Multiplying by 1 should give the same point @@ -74,20 +72,20 @@ fn test_grumpkin_scalar_multiplication_by_one() { #[test] fn test_grumpkin_random_scalar_generation() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let response1 = api - .grumpkin_get_random_fr(0) + .grumpkin_get_random_fr(&[]) .expect("grumpkin_get_random_fr failed"); let response2 = api - .grumpkin_get_random_fr(0) + .grumpkin_get_random_fr(&[]) .expect("grumpkin_get_random_fr failed"); // Random scalars should be different (very high probability) assert_ne!(response1.value, response2.value); // Should not be zero - assert_ne!(response1.value, vec![0u8; 32]); - assert_ne!(response2.value, vec![0u8; 32]); + assert_ne!(response1.value, Fr([0u8; 32])); + assert_ne!(response2.value, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -95,12 +93,12 @@ fn test_grumpkin_random_scalar_generation() { #[test] fn test_grumpkin_random_scalar_multiple_calls() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let mut scalars = Vec::new(); for _ in 0..10 { let response = api - .grumpkin_get_random_fr(0) + .grumpkin_get_random_fr(&[]) .expect("grumpkin_get_random_fr failed"); scalars.push(response.value); } @@ -122,7 +120,7 @@ fn test_grumpkin_random_scalar_multiple_calls() { #[test] fn test_grumpkin_reduce512() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let large_input = [0xffu8; 64]; // Maximum 512-bit value @@ -131,7 +129,7 @@ fn test_grumpkin_reduce512() { .expect("grumpkin_reduce512 failed"); // Should produce a valid field element - assert_ne!(response.value, vec![0u8; 32]); + assert_ne!(response.value, Fr([0u8; 32])); // Should be different from the first 32 bytes of input (since we're reducing) assert_ne!(response.value.as_slice(), &large_input[..32]); @@ -141,7 +139,7 @@ fn test_grumpkin_reduce512() { #[test] fn test_grumpkin_reduce512_small_value() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let mut small_input = [0u8; 64]; small_input[63] = 42; // A small value @@ -151,8 +149,7 @@ fn test_grumpkin_reduce512_small_value() { .expect("grumpkin_reduce512 failed"); // For a small value, the reduction should preserve it - let mut expected = vec![0u8; 32]; - expected[31] = 42; + let expected = { let mut b = [0u8; 32]; b[31] = 42; Fr(b) }; assert_eq!(response.value, expected); api.destroy().expect("Failed to destroy backend"); @@ -161,7 +158,7 @@ fn test_grumpkin_reduce512_small_value() { #[test] fn test_grumpkin_reduce512_zero() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let zero_input = [0u8; 64]; @@ -170,7 +167,7 @@ fn test_grumpkin_reduce512_zero() { .expect("grumpkin_reduce512 failed"); // Zero should remain zero after reduction - assert_eq!(response.value, vec![0u8; 32]); + assert_eq!(response.value, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -178,18 +175,17 @@ fn test_grumpkin_reduce512_zero() { #[test] fn test_grumpkin_mul_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = grumpkin_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 5; + let scalar = { let mut b = [0u8; 32]; b[31] = 5; Fr(b) }; let result1 = api - .grumpkin_mul(point.clone(), &scalar) + .grumpkin_mul(point.clone(), scalar.clone()) .expect("grumpkin_mul failed"); let result2 = api - .grumpkin_mul(point, &scalar) + .grumpkin_mul(point, scalar.clone()) .expect("grumpkin_mul failed"); // Should be deterministic @@ -202,7 +198,7 @@ fn test_grumpkin_mul_deterministic() { #[test] fn test_grumpkin_reduce512_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let large_scalar_512 = [0xffu8; 64]; diff --git a/barretenberg/rust/tests/src/ffi/pedersen.rs b/barretenberg/rust/tests/src/ffi/pedersen.rs index e317b5bccd32..9e3d1558625a 100644 --- a/barretenberg/rust/tests/src/ffi/pedersen.rs +++ b/barretenberg/rust/tests/src/ffi/pedersen.rs @@ -3,25 +3,27 @@ //! Ported from zkpassport/aztec-packages bb_rs pedersen_tests.rs #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi, Fr}; +use barretenberg_rs::{FfiBackend, BbApi, Fr}; +#[cfg(test)] +use crate::utils::fr_from_u64; #[test] fn test_pedersen_hash_basic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // Test with simple inputs let inputs = vec![ - Fr::from_u64(1).to_buffer(), - Fr::from_u64(2).to_buffer(), + fr_from_u64(1), + fr_from_u64(2), ]; let response = api.pedersen_hash(inputs, 0).expect("PedersenHash failed"); // Result should be a valid field element (32 bytes) - assert_eq!(response.hash.len(), 32); + assert_eq!(response.hash.as_slice().len(), 32); // Should not be zero - assert_ne!(response.hash, vec![0u8; 32]); + assert_ne!(response.hash, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -29,11 +31,11 @@ fn test_pedersen_hash_basic() { #[test] fn test_pedersen_hash_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs = vec![ - Fr::from_u64(42).to_buffer(), - Fr::from_u64(123).to_buffer(), + fr_from_u64(42), + fr_from_u64(123), ]; let response1 = api.pedersen_hash(inputs.clone(), 0).expect("PedersenHash failed"); @@ -48,15 +50,15 @@ fn test_pedersen_hash_deterministic() { #[test] fn test_pedersen_hash_different_inputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs1 = vec![ - Fr::from_u64(1).to_buffer(), - Fr::from_u64(2).to_buffer(), + fr_from_u64(1), + fr_from_u64(2), ]; let inputs2 = vec![ - Fr::from_u64(3).to_buffer(), - Fr::from_u64(4).to_buffer(), + fr_from_u64(3), + fr_from_u64(4), ]; let response1 = api.pedersen_hash(inputs1, 0).expect("PedersenHash failed"); @@ -71,14 +73,14 @@ fn test_pedersen_hash_different_inputs() { #[test] fn test_pedersen_hash_single_input() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); - let inputs = vec![Fr::from_u64(42).to_buffer()]; + let inputs = vec![fr_from_u64(42)]; let response = api.pedersen_hash(inputs, 0).expect("PedersenHash failed"); - assert_eq!(response.hash.len(), 32); - assert_ne!(response.hash, vec![0u8; 32]); + assert_eq!(response.hash.as_slice().len(), 32); + assert_ne!(response.hash, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -86,15 +88,15 @@ fn test_pedersen_hash_single_input() { #[test] fn test_pedersen_hash_zero_input() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); - let inputs = vec![Fr::from_u64(0).to_buffer()]; + let inputs = vec![fr_from_u64(0)]; let response = api.pedersen_hash(inputs.clone(), 0).expect("PedersenHash failed"); // Even zero input should produce non-zero output - assert_ne!(response.hash, vec![0u8; 32]); - assert_ne!(response.hash, inputs[0]); + assert_ne!(response.hash, Fr([0u8; 32])); + assert_ne!(response.hash, inputs[0].clone()); api.destroy().expect("Failed to destroy backend"); } @@ -102,15 +104,15 @@ fn test_pedersen_hash_zero_input() { #[test] fn test_pedersen_hash_many_inputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // Test with many inputs - let inputs: Vec> = (0..10).map(|i| Fr::from_u64(i).to_buffer()).collect(); + let inputs: Vec = (0..10).map(|i| fr_from_u64(i)).collect(); let response = api.pedersen_hash(inputs, 0).expect("PedersenHash failed"); - assert_eq!(response.hash.len(), 32); - assert_ne!(response.hash, vec![0u8; 32]); + assert_eq!(response.hash.as_slice().len(), 32); + assert_ne!(response.hash, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -118,11 +120,11 @@ fn test_pedersen_hash_many_inputs() { #[test] fn test_pedersen_hash_different_hash_indices() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs = vec![ - Fr::from_u64(1).to_buffer(), - Fr::from_u64(2).to_buffer(), + fr_from_u64(1), + fr_from_u64(2), ]; let response1 = api.pedersen_hash(inputs.clone(), 0).expect("PedersenHash failed"); @@ -137,20 +139,20 @@ fn test_pedersen_hash_different_hash_indices() { #[test] fn test_pedersen_commit_basic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs = vec![ - Fr::from_u64(1).to_buffer(), - Fr::from_u64(2).to_buffer(), + fr_from_u64(1), + fr_from_u64(2), ]; let response = api.pedersen_commit(inputs, 0).expect("PedersenCommit failed"); // Result should be a point (x, y coordinates) - assert_eq!(response.point.x.len(), 32); - assert_eq!(response.point.y.len(), 32); + assert_eq!(response.point.x.as_slice().len(), 32); + assert_eq!(response.point.y.as_slice().len(), 32); // Should not be the point at infinity - assert_ne!(response.point.x, vec![0u8; 32]); + assert_ne!(response.point.x, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -158,11 +160,11 @@ fn test_pedersen_commit_basic() { #[test] fn test_pedersen_commit_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs = vec![ - Fr::from_u64(42).to_buffer(), - Fr::from_u64(123).to_buffer(), + fr_from_u64(42), + fr_from_u64(123), ]; let response1 = api.pedersen_commit(inputs.clone(), 0).expect("PedersenCommit failed"); @@ -178,15 +180,15 @@ fn test_pedersen_commit_deterministic() { #[test] fn test_pedersen_commit_different_inputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs1 = vec![ - Fr::from_u64(1).to_buffer(), - Fr::from_u64(2).to_buffer(), + fr_from_u64(1), + fr_from_u64(2), ]; let inputs2 = vec![ - Fr::from_u64(3).to_buffer(), - Fr::from_u64(4).to_buffer(), + fr_from_u64(3), + fr_from_u64(4), ]; let response1 = api.pedersen_commit(inputs1, 0).expect("PedersenCommit failed"); diff --git a/barretenberg/rust/tests/src/ffi/poseidon.rs b/barretenberg/rust/tests/src/ffi/poseidon.rs index c1aae2dd7080..9d23d44dded3 100644 --- a/barretenberg/rust/tests/src/ffi/poseidon.rs +++ b/barretenberg/rust/tests/src/ffi/poseidon.rs @@ -3,20 +3,22 @@ //! Ported from zkpassport/aztec-packages bb_rs poseidon2_tests.rs #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi, Fr}; +use barretenberg_rs::{FfiBackend, BbApi, Fr}; +#[cfg(test)] +use crate::utils::fr_from_u64; #[test] fn test_poseidon2_hash() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let inputs = vec![ - Fr::from_u64(4).to_buffer(), - Fr::from_u64(8).to_buffer(), + fr_from_u64(4), + fr_from_u64(8), ]; let response = api.poseidon2_hash(inputs).expect("Poseidon2Hash failed"); - let result = Fr::from_buffer_reduce(&response.hash); + let result = response.hash; // Print result for snapshot comparison println!("Poseidon2 hash result: {:?}", hex::encode(&result.0)); @@ -27,9 +29,9 @@ fn test_poseidon2_hash() { #[test] fn test_poseidon2_hash_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); - let input = vec![42u8; 32]; + let input = Fr([42u8; 32]); let response1 = api.poseidon2_hash(vec![input.clone()]).expect("Poseidon2Hash failed"); let response2 = api.poseidon2_hash(vec![input]).expect("Poseidon2Hash failed"); @@ -43,10 +45,10 @@ fn test_poseidon2_hash_deterministic() { #[test] fn test_poseidon2_hash_different_inputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); - let input1 = vec![1u8; 32]; - let input2 = vec![2u8; 32]; + let input1 = Fr([1u8; 32]); + let input2 = Fr([2u8; 32]); let response1 = api.poseidon2_hash(vec![input1]).expect("Poseidon2Hash failed"); let response2 = api.poseidon2_hash(vec![input2]).expect("Poseidon2Hash failed"); @@ -60,14 +62,14 @@ fn test_poseidon2_hash_different_inputs() { #[test] fn test_poseidon2_hash_zero_input() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); - let input = vec![0u8; 32]; + let input = Fr([0u8; 32]); let response = api.poseidon2_hash(vec![input.clone()]).expect("Poseidon2Hash failed"); // Even zero input should produce non-zero output - assert_ne!(response.hash, vec![0u8; 32]); + assert_ne!(response.hash, Fr([0u8; 32])); assert_ne!(response.hash, input); api.destroy().expect("Failed to destroy backend"); @@ -76,19 +78,19 @@ fn test_poseidon2_hash_zero_input() { #[test] fn test_poseidon2_permutation_js_compatibility_cpp() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // JS test: poseidon2Permutation([0, 1, 2, 3]) // Expected results from the JS test - let mut inputs = [vec![0u8; 32], vec![0u8; 32], vec![0u8; 32], vec![0u8; 32]]; + let mut inputs = [Fr([0u8; 32]), Fr([0u8; 32]), Fr([0u8; 32]), Fr([0u8; 32])]; // inputs[0] stays 0 - inputs[1][31] = 1; - inputs[2][31] = 2; - inputs[3][31] = 3; + inputs[1].0[31] = 1; + inputs[2].0[31] = 2; + inputs[3].0[31] = 3; let response = api.poseidon2_permutation(inputs).expect("Poseidon2Permutation failed"); - assert_eq!(response.outputs.len(), 4); + // outputs is [Fr; 4] // Expected results from the JS test let expected_0: [u8; 32] = [ @@ -123,21 +125,21 @@ fn test_poseidon2_permutation_js_compatibility_cpp() { #[test] fn test_poseidon2_permutation_js_compatibility_noir() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // JS test: poseidon2Permutation([1n, 2n, 3n, 0x0a0000000000000000n]) - let mut inputs = [vec![0u8; 32], vec![0u8; 32], vec![0u8; 32], vec![0u8; 32]]; + let mut inputs = [Fr([0u8; 32]), Fr([0u8; 32]), Fr([0u8; 32]), Fr([0u8; 32])]; // Set the values in big-endian - inputs[0][31] = 1; // 1n - inputs[1][31] = 2; // 2n - inputs[2][31] = 3; // 3n + inputs[0].0[31] = 1; // 1n + inputs[1].0[31] = 2; // 2n + inputs[2].0[31] = 3; // 3n // 0x0a0000000000000000n = 720575940379279360 - inputs[3][23] = 0x0a; // Set the appropriate byte for this large number + inputs[3].0[23] = 0x0a; // Set the appropriate byte for this large number let response = api.poseidon2_permutation(inputs).expect("Poseidon2Permutation failed"); - assert_eq!(response.outputs.len(), 4); + // outputs is [Fr; 4] // Expected results from the JS test let expected_0: [u8; 32] = [ diff --git a/barretenberg/rust/tests/src/ffi/schnorr.rs b/barretenberg/rust/tests/src/ffi/schnorr.rs index ea8086fd617f..033405085d10 100644 --- a/barretenberg/rust/tests/src/ffi/schnorr.rs +++ b/barretenberg/rust/tests/src/ffi/schnorr.rs @@ -3,12 +3,12 @@ //! Tests for Schnorr signatures over the Grumpkin curve. #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, BarretenbergApi}; +use barretenberg_rs::{Fr, FfiBackend, BbApi}; #[test] fn test_schnorr_compute_public_key() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // A valid private key (32 bytes) let private_key: [u8; 32] = [ @@ -18,14 +18,14 @@ fn test_schnorr_compute_public_key() { ]; let response = api - .schnorr_compute_public_key(&private_key) + .schnorr_compute_public_key(Fr(private_key)) .expect("schnorr_compute_public_key failed"); // Should return a valid public key point - assert_eq!(response.public_key.x.len(), 32); - assert_eq!(response.public_key.y.len(), 32); + assert_eq!(response.public_key.x.as_slice().len(), 32); + assert_eq!(response.public_key.y.as_slice().len(), 32); // Should not be zero - assert_ne!(response.public_key.x, vec![0u8; 32]); + assert_ne!(response.public_key.x, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -33,7 +33,7 @@ fn test_schnorr_compute_public_key() { #[test] fn test_schnorr_compute_public_key_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key: [u8; 32] = [ 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, @@ -42,10 +42,10 @@ fn test_schnorr_compute_public_key_deterministic() { ]; let response1 = api - .schnorr_compute_public_key(&private_key) + .schnorr_compute_public_key(Fr(private_key)) .expect("schnorr_compute_public_key failed"); let response2 = api - .schnorr_compute_public_key(&private_key) + .schnorr_compute_public_key(Fr(private_key)) .expect("schnorr_compute_public_key failed"); // Same private key should produce same public key @@ -58,7 +58,7 @@ fn test_schnorr_compute_public_key_deterministic() { #[test] fn test_schnorr_different_private_keys() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key1: [u8; 32] = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -72,10 +72,10 @@ fn test_schnorr_different_private_keys() { ]; let response1 = api - .schnorr_compute_public_key(&private_key1) + .schnorr_compute_public_key(Fr(private_key1)) .expect("schnorr_compute_public_key failed"); let response2 = api - .schnorr_compute_public_key(&private_key2) + .schnorr_compute_public_key(Fr(private_key2)) .expect("schnorr_compute_public_key failed"); // Different private keys should produce different public keys @@ -90,7 +90,7 @@ fn test_schnorr_different_private_keys() { #[test] fn test_schnorr_sign_and_verify() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // Private key let private_key: [u8; 32] = [ @@ -101,7 +101,7 @@ fn test_schnorr_sign_and_verify() { // Compute public key let pub_key_response = api - .schnorr_compute_public_key(&private_key) + .schnorr_compute_public_key(Fr(private_key)) .expect("schnorr_compute_public_key failed"); // Message (arbitrary bytes) @@ -109,16 +109,16 @@ fn test_schnorr_sign_and_verify() { // Sign let sign_response = api - .schnorr_construct_signature(message, &private_key) + .schnorr_construct_signature(message, Fr(private_key)) .expect("schnorr_construct_signature failed"); // Signature should have s and e components (32 bytes each) - assert_eq!(sign_response.s.len(), 32); - assert_eq!(sign_response.e.len(), 32); + assert_eq!(sign_response.s.as_slice().len(), 32); + assert_eq!(sign_response.e.as_slice().len(), 32); // Verify let verify_response = api - .schnorr_verify_signature(message, pub_key_response.public_key.clone(), &sign_response.s, &sign_response.e) + .schnorr_verify_signature(message, pub_key_response.public_key.clone(), sign_response.s.clone(), sign_response.e.clone()) .expect("schnorr_verify_signature failed"); assert!(verify_response.verified, "Signature should be valid"); @@ -129,7 +129,7 @@ fn test_schnorr_sign_and_verify() { #[test] fn test_schnorr_verify_wrong_message() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let private_key: [u8; 32] = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -138,7 +138,7 @@ fn test_schnorr_verify_wrong_message() { ]; let pub_key_response = api - .schnorr_compute_public_key(&private_key) + .schnorr_compute_public_key(Fr(private_key)) .expect("schnorr_compute_public_key failed"); let message1 = b"Original message"; @@ -146,12 +146,12 @@ fn test_schnorr_verify_wrong_message() { // Sign with message1 let sign_response = api - .schnorr_construct_signature(message1, &private_key) + .schnorr_construct_signature(message1, Fr(private_key)) .expect("schnorr_construct_signature failed"); // Verify with message2 - should fail let verify_response = api - .schnorr_verify_signature(message2, pub_key_response.public_key.clone(), &sign_response.s, &sign_response.e) + .schnorr_verify_signature(message2, pub_key_response.public_key.clone(), sign_response.s.clone(), sign_response.e.clone()) .expect("schnorr_verify_signature failed"); assert!(!verify_response.verified, "Signature should be invalid for wrong message"); diff --git a/barretenberg/rust/tests/src/ffi/secp256k1.rs b/barretenberg/rust/tests/src/ffi/secp256k1.rs index d65358663ef9..1d3887e1d2b4 100644 --- a/barretenberg/rust/tests/src/ffi/secp256k1.rs +++ b/barretenberg/rust/tests/src/ffi/secp256k1.rs @@ -3,7 +3,7 @@ //! Ported from zkpassport/aztec-packages bb_rs secp256k1_tests.rs #[cfg(test)] -use barretenberg_rs::{backends::FfiBackend, generated_types::Secp256k1Point, BarretenbergApi}; +use barretenberg_rs::{Fr, FfiBackend, generated::bb_types::Secp256k1Point, BbApi}; // secp256k1 generator point G // x = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 @@ -23,28 +23,27 @@ fn secp256k1_generator() -> Secp256k1Point { 0x9c, 0x47, 0xd0, 0x8f, 0xfb, 0x10, 0xd4, 0xb8, ]; Secp256k1Point { - x: generator_x.to_vec(), - y: generator_y.to_vec(), + x: Fr(generator_x), + y: Fr(generator_y), } } #[test] fn test_secp256k1_scalar_multiplication() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = secp256k1_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 3; // scalar = 3 + let scalar = { let mut b = [0u8; 32]; b[31] = 3; Fr(b) }; // scalar = 3 let response = api - .secp256k1_mul(point.clone(), &scalar) + .secp256k1_mul(point.clone(), scalar.clone()) .expect("secp256k1_mul failed"); // Result should be different from input (3*G != G) assert_ne!(response.point.x, point.x); // Result should be a valid point (non-zero) - assert_ne!(response.point.x, vec![0u8; 32]); + assert_ne!(response.point.x, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -52,15 +51,14 @@ fn test_secp256k1_scalar_multiplication() { #[test] fn test_secp256k1_scalar_multiplication_by_one() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = secp256k1_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 1; // scalar = 1 + let scalar = { let mut b = [0u8; 32]; b[31] = 1; Fr(b) }; // scalar = 1 let response = api - .secp256k1_mul(point.clone(), &scalar) + .secp256k1_mul(point.clone(), scalar.clone()) .expect("secp256k1_mul failed"); // Multiplying by 1 should give the same point @@ -73,20 +71,20 @@ fn test_secp256k1_scalar_multiplication_by_one() { #[test] fn test_secp256k1_random_scalar_generation() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let response1 = api - .secp256k1_get_random_fr(0) + .secp256k1_get_random_fr(&[]) .expect("secp256k1_get_random_fr failed"); let response2 = api - .secp256k1_get_random_fr(0) + .secp256k1_get_random_fr(&[]) .expect("secp256k1_get_random_fr failed"); // Random scalars should be different (very high probability) assert_ne!(response1.value, response2.value); // Should not be zero - assert_ne!(response1.value, vec![0u8; 32]); - assert_ne!(response2.value, vec![0u8; 32]); + assert_ne!(response1.value, Fr([0u8; 32])); + assert_ne!(response2.value, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -94,12 +92,12 @@ fn test_secp256k1_random_scalar_generation() { #[test] fn test_secp256k1_random_scalar_multiple_calls() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let mut scalars = Vec::new(); for _ in 0..10 { let response = api - .secp256k1_get_random_fr(0) + .secp256k1_get_random_fr(&[]) .expect("secp256k1_get_random_fr failed"); scalars.push(response.value); } @@ -121,7 +119,7 @@ fn test_secp256k1_random_scalar_multiple_calls() { #[test] fn test_secp256k1_reduce512() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let large_input = [0xffu8; 64]; // Maximum 512-bit value @@ -130,7 +128,7 @@ fn test_secp256k1_reduce512() { .expect("secp256k1_reduce512 failed"); // Should produce a valid field element - assert_ne!(response.value, vec![0u8; 32]); + assert_ne!(response.value, Fr([0u8; 32])); // Should be different from the first 32 bytes of input (since we're reducing) assert_ne!(response.value.as_slice(), &large_input[..32]); @@ -140,7 +138,7 @@ fn test_secp256k1_reduce512() { #[test] fn test_secp256k1_reduce512_small_value() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let mut small_input = [0u8; 64]; small_input[63] = 42; // A small value @@ -150,8 +148,7 @@ fn test_secp256k1_reduce512_small_value() { .expect("secp256k1_reduce512 failed"); // For a small value, the reduction should preserve it - let mut expected = vec![0u8; 32]; - expected[31] = 42; + let expected = { let mut b = [0u8; 32]; b[31] = 42; Fr(b) }; assert_eq!(response.value, expected); api.destroy().expect("Failed to destroy backend"); @@ -160,7 +157,7 @@ fn test_secp256k1_reduce512_small_value() { #[test] fn test_secp256k1_reduce512_zero() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let zero_input = [0u8; 64]; @@ -169,7 +166,7 @@ fn test_secp256k1_reduce512_zero() { .expect("secp256k1_reduce512 failed"); // Zero should remain zero after reduction - assert_eq!(response.value, vec![0u8; 32]); + assert_eq!(response.value, Fr([0u8; 32])); api.destroy().expect("Failed to destroy backend"); } @@ -177,7 +174,7 @@ fn test_secp256k1_reduce512_zero() { #[test] fn test_secp256k1_reduce512_various_inputs() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); // Test with different patterns let mut input1 = [0u8; 64]; @@ -201,18 +198,17 @@ fn test_secp256k1_reduce512_various_inputs() { #[test] fn test_secp256k1_mul_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let point = secp256k1_generator(); - let mut scalar = vec![0u8; 32]; - scalar[31] = 5; + let scalar = { let mut b = [0u8; 32]; b[31] = 5; Fr(b) }; let result1 = api - .secp256k1_mul(point.clone(), &scalar) + .secp256k1_mul(point.clone(), scalar.clone()) .expect("secp256k1_mul failed"); let result2 = api - .secp256k1_mul(point, &scalar) + .secp256k1_mul(point, scalar.clone()) .expect("secp256k1_mul failed"); // Should be deterministic @@ -225,7 +221,7 @@ fn test_secp256k1_mul_deterministic() { #[test] fn test_secp256k1_reduce512_deterministic() { let backend = FfiBackend::new().expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let mut api = BbApi::new(backend); let large_scalar_512 = [0xffu8; 64]; diff --git a/barretenberg/rust/tests/src/pedersen.rs b/barretenberg/rust/tests/src/pedersen.rs index d7ff5f9c62d3..63bd540cda86 100644 --- a/barretenberg/rust/tests/src/pedersen.rs +++ b/barretenberg/rust/tests/src/pedersen.rs @@ -1,35 +1,18 @@ //! Pedersen hash and commit tests -//! -//! Parallels barretenberg/ts/src/barretenberg/pedersen.test.ts -//! -//! These tests require the BB binary to be built. They are skipped if the binary is not found. #[cfg(test)] -use barretenberg_rs::{backends::PipeBackend, BarretenbergApi, Fr}; -#[cfg(test)] -use crate::utils::{get_bb_binary_path, random_fr, Timer}; +use crate::utils::{fr_from_u64, random_fr, Timer}; #[cfg(test)] use crate::require_bb_binary; #[test] fn test_pedersen_hash() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - let inputs = vec![ - Fr::from_u64(4).to_buffer().try_into().unwrap(), - Fr::from_u64(8).to_buffer().try_into().unwrap(), - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + let inputs = vec![fr_from_u64(4), fr_from_u64(8)]; let response = api.pedersen_hash(inputs, 7).expect("PedersenHash failed"); - let result = Fr::from_buffer_reduce(&response.hash); - - // Print result for snapshot comparison - println!("Pedersen hash result: {:?}", hex::encode(&result.0)); + println!("Pedersen hash result: {:?}", hex::encode(&response.hash.0)); api.destroy().expect("Failed to destroy backend"); } @@ -37,23 +20,14 @@ fn test_pedersen_hash() { #[test] fn test_pedersen_hash_buffer() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let mut input = vec![0u8; 123]; input[0..4].copy_from_slice(&321u32.to_be_bytes()); input[119..123].copy_from_slice(&456u32.to_be_bytes()); - let response = api - .pedersen_hash_buffer(input.as_slice(), 0) - .expect("PedersenHashBuffer failed"); - let result = Fr::from_buffer_reduce(&response.hash); - - // Print result for snapshot comparison - println!("Pedersen hash buffer result: {:?}", hex::encode(&result.0)); + let response = api.pedersen_hash_buffer(input.as_slice(), 0).expect("PedersenHashBuffer failed"); + println!("Pedersen hash buffer result: {:?}", hex::encode(&response.hash.0)); api.destroy().expect("Failed to destroy backend"); } @@ -61,87 +35,51 @@ fn test_pedersen_hash_buffer() { #[test] fn test_pedersen_commit() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - let inputs = vec![ - Fr::from_u64(4).to_buffer().try_into().unwrap(), - Fr::from_u64(8).to_buffer().try_into().unwrap(), - Fr::from_u64(12).to_buffer().try_into().unwrap(), - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + let inputs = vec![fr_from_u64(4), fr_from_u64(8), fr_from_u64(12)]; let response = api.pedersen_commit(inputs, 0).expect("PedersenCommit failed"); - - let x = Fr::from_buffer_reduce(&response.point.x); - let y = Fr::from_buffer_reduce(&response.point.y); - - // Print result for snapshot comparison - println!("Pedersen commit point.x: {:?}", hex::encode(&x.0)); - println!("Pedersen commit point.y: {:?}", hex::encode(&y.0)); + println!("Pedersen commit point.x: {:?}", hex::encode(&response.point.x.0)); + println!("Pedersen commit point.y: {:?}", hex::encode(&response.point.y.0)); api.destroy().expect("Failed to destroy backend"); } #[test] -#[ignore] // Performance test - run with --ignored +#[ignore] fn test_pedersen_hash_perf() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let loops = 1000; - let mut fields = Vec::with_capacity(loops * 2); - for _ in 0..loops * 2 { - fields.push(random_fr()); - } + let fields: Vec<_> = (0..loops * 2).map(|_| random_fr()).collect(); let timer = Timer::new(); for i in 0..loops { - let inputs = vec![ - fields[i * 2].to_buffer().try_into().unwrap(), - fields[i * 2 + 1].to_buffer().try_into().unwrap(), - ]; + let inputs = vec![fields[i * 2].clone(), fields[i * 2 + 1].clone()]; let _ = api.pedersen_hash(inputs, 0).expect("PedersenHash failed"); } let us = timer.us() / loops as u128; - println!("Executed {} hashes at an average {}us / hash", loops, us); api.destroy().expect("Failed to destroy backend"); } #[test] -#[ignore] // Performance test - run with --ignored +#[ignore] fn test_pedersen_commit_perf() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let loops = 1000; - let mut fields = Vec::with_capacity(loops * 2); - for _ in 0..loops * 2 { - fields.push(random_fr()); - } + let fields: Vec<_> = (0..loops * 2).map(|_| random_fr()).collect(); let timer = Timer::new(); for i in 0..loops { - let inputs = vec![ - fields[i * 2].to_buffer().try_into().unwrap(), - fields[i * 2 + 1].to_buffer().try_into().unwrap(), - ]; + let inputs = vec![fields[i * 2].clone(), fields[i * 2 + 1].clone()]; let _ = api.pedersen_commit(inputs, 0).expect("PedersenCommit failed"); } let us = timer.us() / loops as u128; - println!("Executed {} commits at an average {}us / commit", loops, us); api.destroy().expect("Failed to destroy backend"); diff --git a/barretenberg/rust/tests/src/pipe_test.rs b/barretenberg/rust/tests/src/pipe_test.rs index 3cb17bcc2809..8027077f5972 100644 --- a/barretenberg/rust/tests/src/pipe_test.rs +++ b/barretenberg/rust/tests/src/pipe_test.rs @@ -1,24 +1,16 @@ -//! Pipe backend tests -//! -//! Tests for the pipe (stdin/stdout) backend implementation -//! -//! These tests require the BB binary to be built. They are skipped if the binary is not found. +//! UDS backend tests #[cfg(test)] -use barretenberg_rs::{backends::PipeBackend, BarretenbergApi, Fr}; +use barretenberg_rs::{Fr, GrumpkinPoint}; #[cfg(test)] -use crate::utils::get_bb_binary_path; +use crate::utils::fr_from_u64; #[cfg(test)] use crate::require_bb_binary; #[test] -fn test_pipe_blake2s() { +fn test_uds_blake2s() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create pipe backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let input = b"abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"; let expected: [u8; 32] = [ @@ -28,74 +20,40 @@ fn test_pipe_blake2s() { ]; let response = api.blake2s(input).expect("Blake2s failed"); - - assert_eq!( - response.hash.as_slice(), - &expected, - "Blake2s hash mismatch" - ); + assert_eq!(response.hash.as_slice(), &expected, "Blake2s hash mismatch"); api.destroy().expect("Failed to destroy backend"); } #[test] -fn test_pipe_pedersen_hash() { +fn test_uds_pedersen_hash() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create pipe backend"); - let mut api = BarretenbergApi::new(backend); - - let inputs = vec![ - Fr::from_u64(4).to_buffer(), - Fr::from_u64(8).to_buffer(), - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + let inputs = vec![fr_from_u64(4), fr_from_u64(8)]; let response = api.pedersen_hash(inputs, 7).expect("PedersenHash failed"); - let result = Fr::from_buffer_reduce(&response.hash); - - // Print result for snapshot comparison - println!("Pedersen hash result (pipe): {:?}", hex::encode(&result.0)); + println!("Pedersen hash result (UDS): {:?}", hex::encode(&response.hash.0)); api.destroy().expect("Failed to destroy backend"); } #[test] -fn test_pipe_poseidon2_hash() { +fn test_uds_poseidon2_hash() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create pipe backend"); - let mut api = BarretenbergApi::new(backend); - - let inputs = vec![ - Fr::from_u64(4).to_buffer(), - Fr::from_u64(8).to_buffer(), - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + let inputs = vec![fr_from_u64(4), fr_from_u64(8)]; let response = api.poseidon2_hash(inputs).expect("Poseidon2Hash failed"); - let result = Fr::from_buffer_reduce(&response.hash); - - // Print result for snapshot comparison - println!("Poseidon2 hash result (pipe): {:?}", hex::encode(&result.0)); + println!("Poseidon2 hash result (UDS): {:?}", hex::encode(&response.hash.0)); api.destroy().expect("Failed to destroy backend"); } #[test] -fn test_pipe_grumpkin_add() { +fn test_uds_grumpkin_add() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create pipe backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); - // Grumpkin generator point (from precomputed_generators_grumpkin_impl.hpp) - // x = 0x2df8b940e5890e4e1377e05373fae69a1d754f6935e6a780b666947431f2cdcd - // y = 0x2ecd88d15967bc53b885912e0d16866154acb6aac2d3f85e27ca7eefb2c19083 let generator_x: [u8; 32] = [ 0x2d, 0xf8, 0xb9, 0x40, 0xe5, 0x89, 0x0e, 0x4e, 0x13, 0x77, 0xe0, 0x53, 0x73, 0xfa, 0xe6, 0x9a, @@ -109,62 +67,33 @@ fn test_pipe_grumpkin_add() { 0x27, 0xca, 0x7e, 0xef, 0xb2, 0xc1, 0x90, 0x83, ]; - use barretenberg_rs::GrumpkinPoint; - let point_a = GrumpkinPoint { - x: generator_x.to_vec(), - y: generator_y.to_vec(), - }; + let point_a = GrumpkinPoint { x: Fr(generator_x), y: Fr(generator_y) }; let point_b = point_a.clone(); let response = api.grumpkin_add(point_a, point_b).expect("GrumpkinAdd failed"); println!("GrumpkinAdd result: x={}, y={}", - hex::encode(&response.point.x), - hex::encode(&response.point.y)); + hex::encode(&response.point.x.0), + hex::encode(&response.point.y.0)); api.destroy().expect("Failed to destroy backend"); } #[test] -fn test_pipe_error_response() { +fn test_uds_error_response() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create pipe backend"); - let mut api = BarretenbergApi::new(backend); - - // Create an invalid point (off-curve) to trigger an error - // This point has x=1, y=1 which is NOT on the Grumpkin curve - let invalid_x: [u8; 32] = [ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - ]; - let invalid_y: [u8; 32] = [ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + + let mut invalid_bytes = [0u8; 32]; + invalid_bytes[31] = 1; - use barretenberg_rs::GrumpkinPoint; - let invalid_point = GrumpkinPoint { - x: invalid_x.to_vec(), - y: invalid_y.to_vec(), - }; + let invalid_point = GrumpkinPoint { x: Fr(invalid_bytes), y: Fr(invalid_bytes) }; - // This should fail because the point is not on the curve let result = api.grumpkin_add(invalid_point.clone(), invalid_point); match result { - Ok(_) => { - // Some backends might not validate points, which is also acceptable - println!("Note: Backend did not validate point on curve"); - }, + Ok(_) => println!("Note: Backend did not validate point on curve"), Err(e) => { println!("Got expected error for off-curve point: {:?}", e); - // Verify it's a backend error (ErrorResponse) assert!( format!("{:?}", e).contains("Backend") || format!("{:?}", e).contains("error"), "Expected a backend error, got: {:?}", e diff --git a/barretenberg/rust/tests/src/poseidon.rs b/barretenberg/rust/tests/src/poseidon.rs index 10391a00c42c..766aca146c5c 100644 --- a/barretenberg/rust/tests/src/poseidon.rs +++ b/barretenberg/rust/tests/src/poseidon.rs @@ -1,65 +1,37 @@ //! Poseidon2 hash tests -//! -//! Parallels barretenberg/ts/src/barretenberg/poseidon.test.ts -//! -//! These tests require the BB binary to be built. They are skipped if the binary is not found. #[cfg(test)] -use barretenberg_rs::{backends::PipeBackend, BarretenbergApi, Fr}; -#[cfg(test)] -use crate::utils::{get_bb_binary_path, random_fr, Timer}; +use crate::utils::{fr_from_u64, random_fr, Timer}; #[cfg(test)] use crate::require_bb_binary; #[test] fn test_poseidon2_hash() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); - - let inputs = vec![ - Fr::from_u64(4).to_buffer(), - Fr::from_u64(8).to_buffer(), - ]; + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); + let inputs = vec![fr_from_u64(4), fr_from_u64(8)]; let response = api.poseidon2_hash(inputs).expect("Poseidon2Hash failed"); - let result = Fr::from_buffer_reduce(&response.hash); - - // Print result for snapshot comparison - println!("Poseidon2 hash result: {:?}", hex::encode(&result.0)); + println!("Poseidon2 hash result: {:?}", hex::encode(&response.hash.0)); api.destroy().expect("Failed to destroy backend"); } #[test] -#[ignore] // Performance test - run with --ignored +#[ignore] fn test_poseidon2_hash_perf() { require_bb_binary!(); - let bb_path = get_bb_binary_path(); - - let backend = PipeBackend::new(&bb_path, Some(1)) - .expect("Failed to create backend"); - let mut api = BarretenbergApi::new(backend); + let (mut api, mut _bb_child) = crate::utils::spawn_bb_api(); let loops = 1000; - let mut fields = Vec::with_capacity(loops * 2); - for _ in 0..loops * 2 { - fields.push(random_fr().to_buffer()); - } + let mut fields: Vec<_> = (0..loops * 2).map(|_| random_fr()).collect(); let timer = Timer::new(); for i in 0..loops { - let inputs = vec![ - fields[i * 2].clone(), - fields[i * 2 + 1].clone(), - ]; + let inputs = vec![fields[i * 2].clone(), fields[i * 2 + 1].clone()]; let _ = api.poseidon2_hash(inputs).expect("Poseidon2Hash failed"); } let us = timer.us() / loops as u128; - println!("Executed {} hashes at an average {}us / hash", loops, us); api.destroy().expect("Failed to destroy backend"); diff --git a/barretenberg/rust/tests/src/utils.rs b/barretenberg/rust/tests/src/utils.rs index 5d19a2e8ce96..7f7eb9a3af3f 100644 --- a/barretenberg/rust/tests/src/utils.rs +++ b/barretenberg/rust/tests/src/utils.rs @@ -3,6 +3,13 @@ use std::time::Instant; use barretenberg_rs::Fr; +/// Create an Fr from a u64 value (big-endian, zero-padded) +pub fn fr_from_u64(val: u64) -> Fr { + let mut bytes = [0u8; 32]; + bytes[24..32].copy_from_slice(&val.to_be_bytes()); + Fr(bytes) +} + /// Generate a pseudo-random Fr for testing (NOT cryptographically secure) pub fn random_fr() -> Fr { use std::time::SystemTime; @@ -54,6 +61,47 @@ impl Default for Timer { } } +/// Spawn a BB process and connect via UDS. +/// Returns the BbApi and the child process handle. +pub fn spawn_bb_api() -> (barretenberg_rs::BbApi, std::process::Child) { + use std::process::{Command, Stdio}; + use std::sync::atomic::{AtomicU64, Ordering}; + use std::thread; + use std::time::Duration; + + static COUNTER: AtomicU64 = AtomicU64::new(0); + let id = COUNTER.fetch_add(1, Ordering::SeqCst); + + let bb_path = get_bb_binary_path(); + let socket_path = format!("/tmp/bb-test-{}-{}.sock", std::process::id(), id); + + // Clean up any stale socket + let _ = std::fs::remove_file(&socket_path); + + // Spawn bb in msgpack UDS server mode + let child = Command::new(&bb_path) + .args(["msgpack", "run", "--input", &socket_path]) + .env("HARDWARE_CONCURRENCY", "1") + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .spawn() + .expect("Failed to spawn bb binary"); + + // Wait for socket to appear + for _ in 0..30 { + if std::path::Path::new(&socket_path).exists() { + break; + } + thread::sleep(Duration::from_millis(100)); + } + + let backend = barretenberg_rs::UdsBackend::connect(&socket_path) + .expect("Failed to connect to bb UDS socket"); + let api = barretenberg_rs::BbApi::new(backend); + + (api, child) +} + /// Get path to BB binary for testing pub fn get_bb_binary_path() -> String { std::env::var("BB_BINARY_PATH") diff --git a/barretenberg/ts/.gitignore b/barretenberg/ts/.gitignore index 70ca434e6987..df0ad02ca7bd 100644 --- a/barretenberg/ts/.gitignore +++ b/barretenberg/ts/.gitignore @@ -10,7 +10,7 @@ dest package.tgz package -# Generated files +# Generated files (produced by barretenberg/codegen, not committed) src/cbind/generated/ src/aztec-cdb/generated/ src/aztec-wsdb/generated/ diff --git a/barretenberg/ts/bootstrap.sh b/barretenberg/ts/bootstrap.sh index 60448f66e79f..182fac0761d9 100755 --- a/barretenberg/ts/bootstrap.sh +++ b/barretenberg/ts/bootstrap.sh @@ -6,7 +6,10 @@ source $(git rev-parse --show-toplevel)/ci3/source_bootstrap # Include AVM_TRANSPILER setting to prevent cache poisoning: ci-barretenberg-full builds # with AVM_TRANSPILER=0, producing a bb binary without AVM transpiler support. Without this, # that build can populate the bb.js cache with a non-AVM bb, which ci-fast then downloads. +# Hash depends on codegen hash (includes schemas + codegen source), +# plus our own source files, release status, and AVM transpiler setting. hash=$(hash_str \ + $(../codegen/bootstrap.sh hash) \ $(../cpp/bootstrap.sh hash) \ $(cache_content_hash .rebuild_patterns) \ $(semver check $REF_NAME && echo 1 || echo 0) \ @@ -19,7 +22,8 @@ function build { if ! cache_download bb.js-$hash.tar.gz; then find . -exec touch -d "@0" {} + 2>/dev/null || true yarn clean - yarn generate + # Generate bindings from committed schemas (zero npm deps, ~2s) + (cd ../codegen && ./bootstrap.sh generate) yarn build:wasm yarn build:native parallel -v --line-buffered --tag 'denoise "yarn {}"' ::: build:esm build:cjs build:browser diff --git a/barretenberg/ts/package.json b/barretenberg/ts/package.json index 769b4b952388..c5a39cc6b3ef 100644 --- a/barretenberg/ts/package.json +++ b/barretenberg/ts/package.json @@ -15,6 +15,9 @@ "./aztec-wsdb": { "default": "./dest/node/aztec-wsdb/index.js" }, + "./aztec-cdb": { + "default": "./dest/node/aztec-cdb/index.js" + }, "./aztec-avm": { "default": "./dest/node/aztec-avm/index.js" }, @@ -32,14 +35,13 @@ "README.md" ], "scripts": { - "clean": "rm -rf ./dest .tsbuildinfo .tsbuildinfo.cjs ./src/cbind/generated ./src/aztec-cdb/generated ./src/aztec-wsdb/generated ./src/aztec-avm/generated", - "build": "yarn clean && yarn generate && yarn build:wasm && yarn build:native && yarn build:esm && yarn build:cjs && yarn build:browser", + "clean": "rm -rf ./dest .tsbuildinfo .tsbuildinfo.cjs", + "build": "yarn clean && yarn build:wasm && yarn build:native && yarn build:esm && yarn build:cjs && yarn build:browser", "build:wasm": "./scripts/copy_wasm.sh", "build:native": "./scripts/copy_native.sh", "build:esm": "tsgo -b tsconfig.esm.json && chmod +x ./dest/node/bin/index.js", "build:cjs": "tsgo -b tsconfig.cjs.json && ./scripts/cjs_postprocess.sh", "build:browser": "tsgo -b tsconfig.browser.json && ./scripts/browser_postprocess.sh", - "generate": "NODE_OPTIONS='--loader ts-node/esm' NODE_NO_WARNINGS=1 ts-node src/cbind/generate.ts && npx tsx src/aztec-wsdb/generate.ts && npx tsx src/aztec-cdb/generate.ts && npx tsx src/aztec-avm/generate.ts", "formatting": "prettier --check ./src && eslint --max-warnings 0 ./src", "formatting:fix": "prettier -w ./src", "test": "NODE_OPTIONS='--loader ts-node/esm' NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests", diff --git a/barretenberg/ts/src/aztec-avm/generate.ts b/barretenberg/ts/src/aztec-avm/generate.ts deleted file mode 100644 index e634563bdb91..000000000000 --- a/barretenberg/ts/src/aztec-avm/generate.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Code generation for aztec-avm TypeScript bindings. - * - * Uses the same codegen pipeline as bb.js but targets the aztec-avm binary schema. - * Run: npx tsx src/aztec-avm/generate.ts - */ - -import { writeFileSync, mkdirSync } from 'fs'; -import { dirname, join } from 'path'; -import { exec } from 'child_process'; -import { promisify } from 'util'; -import { fileURLToPath } from 'url'; -import { SchemaVisitor } from '../cbind/schema_visitor.js'; -import { TypeScriptCodegen } from '../cbind/typescript_codegen.js'; - -const execAsync = promisify(exec); - -// @ts-ignore -const __dirname = dirname(fileURLToPath(import.meta.url)); - -async function generate() { - const avmBuildPath = process.env.AVM_BINARY_PATH || join(__dirname, '../../../cpp/build/bin/aztec-avm'); - - // Get schema from aztec-avm - console.log('Fetching msgpack schema from aztec-avm...'); - const { stdout } = await execAsync(`${avmBuildPath} msgpack schema`); - const schema = JSON.parse(stdout.trim()); - - if (!schema.commands || !schema.responses) { - throw new Error('Invalid schema: missing commands or responses'); - } - - // Compile schema using the shared visitor - console.log('Compiling schema...'); - const visitor = new SchemaVisitor(); - const compiled = visitor.visit(schema.commands, schema.responses); - - console.log(`Found ${compiled.commands.length} commands, ${compiled.structs.size} structs\n`); - - // Generate TypeScript bindings - const tsGen = new TypeScriptCodegen(); - const files = [ - { path: 'generated/api_types.ts', content: tsGen.generateTypes(compiled) }, - { path: 'generated/async.ts', content: tsGen.generateAsyncApi(compiled) }, - ]; - - // Ensure output directory exists - const outputDir = join(__dirname, 'generated'); - mkdirSync(outputDir, { recursive: true }); - - for (const file of files) { - const outputPath = join(__dirname, file.path); - mkdirSync(dirname(outputPath), { recursive: true }); - writeFileSync(outputPath, file.content); - console.log(` ${outputPath}`); - } - - console.log('\nAvm codegen complete.'); -} - -generate().catch(error => { - console.error('Generation failed:', error); - process.exit(1); -}); diff --git a/barretenberg/ts/src/aztec-cdb/generate.ts b/barretenberg/ts/src/aztec-cdb/generate.ts deleted file mode 100644 index eca953d84c3b..000000000000 --- a/barretenberg/ts/src/aztec-cdb/generate.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Code generation for aztec-cdb TypeScript and C++ bindings. - * - * Uses the same codegen pipeline as bb.js but targets the aztec-cdb binary schema. - * Run: npx tsx src/aztec-cdb/generate.ts - */ - -import { writeFileSync, mkdirSync } from 'fs'; -import { dirname, join } from 'path'; -import { exec } from 'child_process'; -import { promisify } from 'util'; -import { fileURLToPath } from 'url'; -import { SchemaVisitor } from '../cbind/schema_visitor.js'; -import { TypeScriptCodegen } from '../cbind/typescript_codegen.js'; -import { CppCodegen } from '../cbind/cpp_codegen.js'; - -const execAsync = promisify(exec); - -// @ts-ignore -const __dirname = dirname(fileURLToPath(import.meta.url)); - -async function generate() { - const cdbBuildPath = process.env.CDB_BINARY_PATH || join(__dirname, '../../../cpp/build/bin/aztec-cdb'); - - // Get schema from aztec-cdb - console.log('Fetching msgpack schema from aztec-cdb...'); - const { stdout } = await execAsync(`${cdbBuildPath} msgpack schema`); - const schema = JSON.parse(stdout.trim()); - - if (!schema.commands || !schema.responses) { - throw new Error('Invalid schema: missing commands or responses'); - } - - // Compile schema using the shared visitor - console.log('Compiling schema...'); - const visitor = new SchemaVisitor(); - const compiled = visitor.visit(schema.commands, schema.responses); - - console.log(`Found ${compiled.commands.length} commands, ${compiled.structs.size} structs\n`); - - // Generate TypeScript bindings - const tsGen = new TypeScriptCodegen(); - - // Generate C++ IPC client - const cppGen = new CppCodegen({ - namespace: 'bb::cdb', - prefix: 'Cdb', - executeHeader: 'barretenberg/cdb/cdb_execute.hpp', - commandsHeader: 'barretenberg/cdb/cdb_commands.hpp', - }); - - const files = [ - { path: 'generated/api_types.ts', content: tsGen.generateTypes(compiled) }, - { path: 'generated/async.ts', content: tsGen.generateAsyncApi(compiled) }, - { path: '../../../cpp/src/barretenberg/cdb/cdb_ipc_client_generated.hpp', content: cppGen.generateHeader(compiled) }, - { path: '../../../cpp/src/barretenberg/cdb/cdb_ipc_client_generated.cpp', content: cppGen.generateImpl(compiled) }, - ]; - - // Ensure output directory exists - const outputDir = join(__dirname, 'generated'); - mkdirSync(outputDir, { recursive: true }); - - const cppFiles: string[] = []; - for (const file of files) { - const outputPath = join(__dirname, file.path); - mkdirSync(dirname(outputPath), { recursive: true }); - writeFileSync(outputPath, file.content); - console.log(` ${outputPath}`); - if (file.path.endsWith('.hpp') || file.path.endsWith('.cpp')) { - cppFiles.push(outputPath); - } - } - - // Run clang-format on generated C++ files - if (cppFiles.length > 0) { - try { - await execAsync(`clang-format-20 -i ${cppFiles.join(' ')}`); - } catch { - // clang-format-20 may not be available in all environments - } - } - - console.log('\nCdb codegen complete.'); -} - -generate().catch(error => { - console.error('Generation failed:', error); - process.exit(1); -}); diff --git a/barretenberg/ts/src/aztec-cdb/index.ts b/barretenberg/ts/src/aztec-cdb/index.ts new file mode 100644 index 000000000000..a7145809ecea --- /dev/null +++ b/barretenberg/ts/src/aztec-cdb/index.ts @@ -0,0 +1,23 @@ +// CDB IPC generated types and server dispatch +export { + type Handler as CdbHandler, + dispatch as cdbDispatch, +} from './generated/server.js'; +export type { + CdbGetContractInstance, + CdbGetContractInstanceResponse, + CdbGetContractClass, + CdbGetContractClassResponse, + CdbGetBytecodeCommitment, + CdbGetBytecodeCommitmentResponse, + CdbGetDebugFunctionName, + CdbGetDebugFunctionNameResponse, + CdbAddContracts, + CdbAddContractsResponse, + CdbCreateCheckpoint, + CdbCreateCheckpointResponse, + CdbCommitCheckpoint, + CdbCommitCheckpointResponse, + CdbRevertCheckpoint, + CdbRevertCheckpointResponse, +} from './generated/api_types.js'; diff --git a/barretenberg/ts/src/aztec-wsdb/generate.ts b/barretenberg/ts/src/aztec-wsdb/generate.ts deleted file mode 100644 index 510a0179eb54..000000000000 --- a/barretenberg/ts/src/aztec-wsdb/generate.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Code generation for aztec-wsdb TypeScript bindings. - * - * Uses the same codegen pipeline as bb.js but targets the aztec-wsdb binary schema. - * Run: npx tsx src/aztec-wsdb/generate.ts - */ - -import { writeFileSync, mkdirSync } from 'fs'; -import { dirname, join } from 'path'; -import { exec } from 'child_process'; -import { promisify } from 'util'; -import { fileURLToPath } from 'url'; -import { SchemaVisitor } from '../cbind/schema_visitor.js'; -import { TypeScriptCodegen } from '../cbind/typescript_codegen.js'; -import { CppCodegen } from '../cbind/cpp_codegen.js'; - -const execAsync = promisify(exec); - -// @ts-ignore -const __dirname = dirname(fileURLToPath(import.meta.url)); - -async function generate() { - const wsdbBuildPath = process.env.WSDB_BINARY_PATH || join(__dirname, '../../../cpp/build/bin/aztec-wsdb'); - - // Get schema from aztec-wsdb - console.log('Fetching msgpack schema from aztec-wsdb...'); - const { stdout } = await execAsync(`${wsdbBuildPath} msgpack schema`); - const schema = JSON.parse(stdout.trim()); - - if (!schema.commands || !schema.responses) { - throw new Error('Invalid schema: missing commands or responses'); - } - - // Compile schema using the shared visitor - console.log('Compiling schema...'); - const visitor = new SchemaVisitor(); - const compiled = visitor.visit(schema.commands, schema.responses); - - console.log(`Found ${compiled.commands.length} commands, ${compiled.structs.size} structs\n`); - - // Generate TypeScript bindings - const tsGen = new TypeScriptCodegen(); - - // Generate C++ IPC client - const cppGen = new CppCodegen({ - namespace: 'bb::wsdb', - prefix: 'Wsdb', - executeHeader: 'barretenberg/wsdb/wsdb_execute.hpp', - commandsHeader: 'barretenberg/wsdb/wsdb_commands.hpp', - }); - - const files = [ - { path: 'generated/api_types.ts', content: tsGen.generateTypes(compiled) }, - { path: 'generated/async.ts', content: tsGen.generateAsyncApi(compiled) }, - { path: '../../../cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.hpp', content: cppGen.generateHeader(compiled) }, - { path: '../../../cpp/src/barretenberg/wsdb/wsdb_ipc_client_generated.cpp', content: cppGen.generateImpl(compiled) }, - ]; - - // Ensure output directory exists - const outputDir = join(__dirname, 'generated'); - mkdirSync(outputDir, { recursive: true }); - - const cppFiles: string[] = []; - for (const file of files) { - const outputPath = join(__dirname, file.path); - mkdirSync(dirname(outputPath), { recursive: true }); - writeFileSync(outputPath, file.content); - console.log(` ${outputPath}`); - if (file.path.endsWith('.hpp') || file.path.endsWith('.cpp')) { - cppFiles.push(outputPath); - } - } - - // Run clang-format on generated C++ files - if (cppFiles.length > 0) { - try { - await execAsync(`clang-format-20 -i ${cppFiles.join(' ')}`); - } catch { - // clang-format-20 may not be available in all environments - } - } - - console.log('\nWsdb codegen complete.'); -} - -generate().catch(error => { - console.error('Generation failed:', error); - process.exit(1); -}); diff --git a/barretenberg/ts/src/cbind/README.md b/barretenberg/ts/src/cbind/README.md deleted file mode 100644 index 9cd309aa9801..000000000000 --- a/barretenberg/ts/src/cbind/README.md +++ /dev/null @@ -1 +0,0 @@ -Derives bindings from the reported msgpack schema from bb. diff --git a/barretenberg/ts/src/cbind/cpp_codegen.ts b/barretenberg/ts/src/cbind/cpp_codegen.ts deleted file mode 100644 index f13f524da171..000000000000 --- a/barretenberg/ts/src/cbind/cpp_codegen.ts +++ /dev/null @@ -1,241 +0,0 @@ -/** - * C++ IPC Client Code Generator - * - * Generates a C++ IPC client from a CompiledSchema. The generated client: - * - Connects to a server over Unix Domain Socket via ipc::IpcClient - * - Wraps each command in a NamedUnion, serializes with msgpack, sends, receives, deserializes - * - Has one method per command, returning the typed response - * - * Usage: - * const gen = new CppCodegen({ namespace: 'bb::cdb', prefix: 'Cdb' }); - * const header = gen.generateHeader(schema); - * const impl = gen.generateImpl(schema); - */ - -import type { CompiledSchema, Type, Struct, Field, Command } from './schema_visitor.js'; -import { toSnakeCase } from './naming.js'; - -export interface CppCodegenOptions { - /** C++ namespace for generated code, e.g. 'bb::cdb' */ - namespace: string; - /** Prefix for command/response types, e.g. 'Cdb' */ - prefix: string; - /** Header path for the *_execute.hpp file that defines Command/CommandResponse NamedUnions */ - executeHeader: string; - /** Header path for the *_commands.hpp file that defines the command structs */ - commandsHeader: string; -} - -export class CppCodegen { - constructor(private opts: CppCodegenOptions) {} - - /** Convert a command name to a C++ method name (snake_case without prefix) */ - private methodName(commandName: string): string { - // Strip prefix: "CdbGetContractInstance" -> "GetContractInstance" -> "get_contract_instance" - const withoutPrefix = commandName.startsWith(this.opts.prefix) - ? commandName.slice(this.opts.prefix.length) - : commandName; - return toSnakeCase(withoutPrefix); - } - - /** Check if the response has fields (non-void return) */ - private hasResponseFields(command: Command, schema: CompiledSchema): boolean { - const resp = schema.responses.get(command.responseType); - return !!resp && resp.fields.length > 0; - } - - /** Generate the method signature using command struct types directly */ - private generateMethodSignature(command: Command, schema: CompiledSchema, className?: string): string { - const method = this.methodName(command.name); - const hasFields = this.hasResponseFields(command, schema); - const retType = hasFields ? `${command.name}::Response` : 'void'; - - // If the command has fields, take the whole command struct by value - const params = command.fields.length > 0 ? `${command.name} cmd` : ''; - - const prefix = className ? `${className}::` : ''; - const constSuffix = !this.isWriteCommand(command) ? ' const' : ''; - - return `${retType} ${prefix}${method}(${params})${constSuffix}`; - } - - /** Check if a command modifies state (non-const) */ - private isWriteCommand(command: Command): boolean { - const name = command.name.toLowerCase(); - return name.includes('add') || name.includes('create') || - name.includes('commit') || name.includes('revert') || - name.includes('register') || name.includes('shutdown') || - name.includes('delete') || name.includes('sync') || - name.includes('rollback') || name.includes('unwind'); - } - - /** Generate the header file */ - generateHeader(schema: CompiledSchema): string { - const { namespace: ns, prefix } = this.opts; - const className = `${prefix}IpcClient`; - const guardName = `${ns.replace(/::/g, '_').toUpperCase()}_${prefix.toUpperCase()}_IPC_CLIENT_GENERATED_HPP`; - - const methods = schema.commands.map(cmd => { - const sig = this.generateMethodSignature(cmd, schema); - return ` ${sig};`; - }).join('\n'); - - return `// AUTOGENERATED FILE - DO NOT EDIT -#pragma once - -#include "barretenberg/common/try_catch_shim.hpp" -#include "${this.opts.executeHeader}" -#include "barretenberg/ipc/ipc_client.hpp" - -#include -#include - -namespace ${ns} { - -/** - * @brief Auto-generated IPC client. - * - * Each method sends a msgpack-serialized command to the server over UDS - * and returns the typed response. All methods block until the response arrives. - */ -class ${className} { - public: - explicit ${className}(const std::string& socket_path); - ~${className}(); - - ${className}(const ${className}&) = delete; - ${className}& operator=(const ${className}&) = delete; - -${methods} - - private: - template - typename Cmd::Response send(Cmd&& cmd) const; - - mutable std::unique_ptr client_; -}; - -} // namespace ${ns} -`; - } - - /** Generate the implementation file */ - generateImpl(schema: CompiledSchema): string { - const { namespace: ns, prefix } = this.opts; - const className = `${prefix}IpcClient`; - const commandType = `${prefix}Command`; - const responseType = `${prefix}CommandResponse`; - const errorType = `${prefix}ErrorResponse`; - - const methods = schema.commands.map(cmd => { - return this.generateMethodImpl(cmd, schema, className); - }).join('\n'); - - return `// AUTOGENERATED FILE - DO NOT EDIT - -#include "${this.headerIncludePath()}" -#include "${this.opts.executeHeader}" -#include "barretenberg/serialize/msgpack.hpp" -#include "barretenberg/serialize/msgpack_impl.hpp" - -#include -#include - -namespace ${ns} { - -${className}::${className}(const std::string& socket_path) - : client_(ipc::IpcClient::create_socket(socket_path)) -{ - if (!client_->connect()) { - throw std::runtime_error("Failed to connect to server at " + socket_path); - } -} - -${className}::~${className}() -{ - if (client_) { - client_->close(); - } -} - -template -typename Cmd::Response ${className}::send(Cmd&& cmd) const -{ - // Wrap command in ${commandType} NamedUnion, then in a 1-element tuple (matches server expectations) - ${commandType} command = std::forward(cmd); - auto wrapped = std::make_tuple(std::move(command)); - - // Serialize to msgpack - msgpack::sbuffer send_buffer; - msgpack::pack(send_buffer, wrapped); - - // Send to server - constexpr uint64_t timeout_ns = 30'000'000'000ULL; // 30 seconds - if (!client_->send(send_buffer.data(), send_buffer.size(), timeout_ns)) { - throw std::runtime_error("Failed to send command to server"); - } - - // Receive response - auto response_span = client_->receive(timeout_ns); - if (response_span.empty()) { - throw std::runtime_error("Empty response from server"); - } - - // Deserialize response - auto unpacked = msgpack::unpack(reinterpret_cast(response_span.data()), response_span.size()); - auto response_obj = unpacked.get(); - - ${responseType} response; - response_obj.convert(response); - - // Release the receive buffer - client_->release(response_span.size()); - - // Check for error response - return std::move(response).visit([](auto&& resp) -> typename Cmd::Response { - using RespType = std::decay_t; - - if constexpr (std::is_same_v) { - throw std::runtime_error("Server error: " + resp.message); - } else if constexpr (std::is_same_v) { - return std::forward(resp); - } else { - throw std::runtime_error("Unexpected response type from server"); - } - }); -} - -${methods} -} // namespace ${ns} -`; - } - - /** Generate a single method implementation */ - private generateMethodImpl(command: Command, schema: CompiledSchema, className: string): string { - const sig = this.generateMethodSignature(command, schema, className); - const hasFields = this.hasResponseFields(command, schema); - - const cmdExpr = command.fields.length > 0 ? 'std::move(cmd)' : `${command.name}{}`; - - if (!hasFields) { - return `${sig} -{ - send(${cmdExpr}); -} -`; - } - - return `${sig} -{ - return send(${cmdExpr}); -} -`; - } - - /** Compute the include path for the generated header */ - private headerIncludePath(): string { - // Derive from the executeHeader path: replace _execute.hpp with _ipc_client_generated.hpp - const dir = this.opts.executeHeader.substring(0, this.opts.executeHeader.lastIndexOf('/')); - return `${dir}/${toSnakeCase(this.opts.prefix)}_ipc_client_generated.hpp`; - } -} diff --git a/barretenberg/ts/src/cbind/generate.ts b/barretenberg/ts/src/cbind/generate.ts deleted file mode 100644 index 79d56925df15..000000000000 --- a/barretenberg/ts/src/cbind/generate.ts +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Multi-language code generation from BB msgpack schema - * - * Architecture: - * Raw Schema → SchemaVisitor → CompiledSchema IR → Language Codegens → Files - */ - -import { writeFileSync, mkdirSync } from 'fs'; -import { dirname, join } from 'path'; -import { exec } from 'child_process'; -import { promisify } from 'util'; -import { fileURLToPath } from 'url'; -import { unpack } from 'msgpackr'; -import { SchemaVisitor, type CompiledSchema } from './schema_visitor.js'; -import { TypeScriptCodegen } from './typescript_codegen.js'; -import { RustCodegen } from './rust_codegen.js'; - -const execAsync = promisify(exec); - -// Language generators - all use the same CompiledSchema IR -interface LanguageGenerator { - name: string; - enabled: boolean; - generate: (compiled: CompiledSchema) => Array<{ path: string; content: string }>; -} - -const LANGUAGE_GENERATORS: LanguageGenerator[] = [ - { - name: 'TypeScript', - enabled: true, - generate: (compiled) => { - const tsGen = new TypeScriptCodegen(); - return [ - { path: 'generated/api_types.ts', content: tsGen.generateTypes(compiled) }, - { path: 'generated/sync.ts', content: tsGen.generateSyncApi(compiled) }, - { path: 'generated/async.ts', content: tsGen.generateAsyncApi(compiled) }, - ]; - }, - }, - { - name: 'Rust', - enabled: true, - generate: (compiled) => { - const rustGen = new RustCodegen(); - return [ - { path: '../../../rust/barretenberg-rs/src/generated_types.rs', content: rustGen.generateTypes(compiled) }, - { path: '../../../rust/barretenberg-rs/src/api.rs', content: rustGen.generateApi(compiled) }, - ]; - }, - }, -]; - -// @ts-ignore -const __dirname = dirname(fileURLToPath(import.meta.url)); - -async function generate() { - const bbBuildPath = process.env.BB_BINARY_PATH || join(__dirname, '../../../cpp/build/bin/bb'); - - // Get schema from bb - console.log('Fetching msgpack schema from bb...'); - const { stdout } = await execAsync(`${bbBuildPath} msgpack schema`); - const schema = JSON.parse(stdout.trim()); - - if (!schema.commands || !schema.responses) { - throw new Error('Invalid schema: missing commands or responses'); - } - - // Compile schema once using visitor pattern - console.log('Compiling schema...'); - const visitor = new SchemaVisitor(); - const compiled = visitor.visit(schema.commands, schema.responses); - - console.log(`Found ${compiled.commands.length} commands, ${compiled.structs.size} structs\n`); - - // Ensure output directory exists - const outputDir = join(__dirname, 'generated'); - mkdirSync(outputDir, { recursive: true }); - - // Generate all language bindings from compiled IR - for (const generator of LANGUAGE_GENERATORS) { - if (!generator.enabled) { - console.log(`⊘ ${generator.name}: disabled`); - continue; - } - - const files = generator.generate(compiled); - - for (const file of files) { - const outputPath = join(__dirname, file.path); - mkdirSync(dirname(outputPath), { recursive: true }); - writeFileSync(outputPath, file.content); - console.log(`✓ ${generator.name}: ${outputPath}`); - } - } - - // Generate curve constants - console.log('\nGenerating curve constants...'); - await generateCurveConstants(bbBuildPath, outputDir); - - console.log('\n✨ Generation complete! Clean, maintainable, multi-language architecture.'); -} - -async function generateCurveConstants(bbBuildPath: string, outputDir: string) { - // Get curve constants from bb as msgpack binary - const { stdout: constantsBuffer } = await execAsync(`${bbBuildPath} msgpack curve_constants`, { - encoding: 'buffer', - maxBuffer: 10 * 1024 * 1024, // 10MB buffer - }); - - // Decode msgpack - const constants = unpack(constantsBuffer as Buffer); - - // Helper to convert Uint8Array to hex string - const toHex = (bytes: Uint8Array) => '0x' + Buffer.from(bytes).toString('hex'); - - // Helper to convert Uint8Array to bigint (big-endian) - const toBigInt = (bytes: Uint8Array) => { - let result = 0n; - for (const byte of bytes) { - result = (result << 8n) | BigInt(byte); - } - return result; - }; - - // Helper to serialize point coordinate (handles both Uint8Array and array of Uint8Array for field2) - const serializeCoordinate = (coord: Uint8Array | Uint8Array[]) => { - if (Array.isArray(coord)) { - // For field2 (like BN254 G2), we have array of two Uint8Arrays - return `[${coord.map(c => `new Uint8Array([${Array.from(c).join(', ')}])`).join(', ')}]`; - } else { - // For regular fields, single Uint8Array - return `new Uint8Array([${Array.from(coord).join(', ')}])`; - } - }; - - // Generate TypeScript file - const content = `/** - * Curve constants generated from barretenberg native binary. - * DO NOT EDIT - This file is auto-generated by generate.ts - */ - -/** - * BN254 curve constants - */ -export const BN254_FR_MODULUS = ${toBigInt(constants.bn254_fr_modulus)}n; -export const BN254_FQ_MODULUS = ${toBigInt(constants.bn254_fq_modulus)}n; - -export const BN254_G1_GENERATOR = { - x: ${serializeCoordinate(constants.bn254_g1_generator.x)}, - y: ${serializeCoordinate(constants.bn254_g1_generator.y)}, -} as const; - -export const BN254_G2_GENERATOR = { - x: ${serializeCoordinate(constants.bn254_g2_generator.x)}, - y: ${serializeCoordinate(constants.bn254_g2_generator.y)}, -} as const; - -/** - * Grumpkin curve constants - */ -export const GRUMPKIN_FR_MODULUS = ${toBigInt(constants.grumpkin_fr_modulus)}n; -export const GRUMPKIN_FQ_MODULUS = ${toBigInt(constants.grumpkin_fq_modulus)}n; - -export const GRUMPKIN_G1_GENERATOR = { - x: ${serializeCoordinate(constants.grumpkin_g1_generator.x)}, - y: ${serializeCoordinate(constants.grumpkin_g1_generator.y)}, -} as const; - -/** - * Secp256k1 curve constants - */ -export const SECP256K1_FR_MODULUS = ${toBigInt(constants.secp256k1_fr_modulus)}n; -export const SECP256K1_FQ_MODULUS = ${toBigInt(constants.secp256k1_fq_modulus)}n; - -export const SECP256K1_G1_GENERATOR = { - x: ${serializeCoordinate(constants.secp256k1_g1_generator.x)}, - y: ${serializeCoordinate(constants.secp256k1_g1_generator.y)}, -} as const; - -/** - * Secp256r1 curve constants - */ -export const SECP256R1_FR_MODULUS = ${toBigInt(constants.secp256r1_fr_modulus)}n; -export const SECP256R1_FQ_MODULUS = ${toBigInt(constants.secp256r1_fq_modulus)}n; - -export const SECP256R1_G1_GENERATOR = { - x: ${serializeCoordinate(constants.secp256r1_g1_generator.x)}, - y: ${serializeCoordinate(constants.secp256r1_g1_generator.y)}, -} as const; -`; - - const outputPath = join(outputDir, 'curve_constants.ts'); - writeFileSync(outputPath, content); - console.log(`✓ Curve constants: ${outputPath}`); -} - -// Run the generator -generate().catch(error => { - console.error('Generation failed:', error); - process.exit(1); -}); diff --git a/barretenberg/zig/aztec-ipc/.gitignore b/barretenberg/zig/aztec-ipc/.gitignore new file mode 100644 index 000000000000..3389c86c9946 --- /dev/null +++ b/barretenberg/zig/aztec-ipc/.gitignore @@ -0,0 +1,2 @@ +.zig-cache/ +zig-out/ diff --git a/barretenberg/zig/aztec-ipc/build.zig b/barretenberg/zig/aztec-ipc/build.zig new file mode 100644 index 000000000000..03ede41a4acf --- /dev/null +++ b/barretenberg/zig/aztec-ipc/build.zig @@ -0,0 +1,35 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + // zig-msgpack dependency + const msgpack_dep = b.dependency("zig_msgpack", .{ + .target = target, + .optimize = optimize, + }); + const msgpack_mod = msgpack_dep.module("msgpack"); + + // Main library module (importable by downstream projects) + const lib_mod = b.addModule("aztec-ipc", .{ + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }); + lib_mod.addImport("msgpack", msgpack_mod); + + // Unit tests + const tests = b.addTest(.{ + .root_module = b.createModule(.{ + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }), + }); + tests.root_module.addImport("msgpack", msgpack_mod); + + const run_tests = b.addRunArtifact(tests); + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_tests.step); +} diff --git a/barretenberg/zig/aztec-ipc/build.zig.zon b/barretenberg/zig/aztec-ipc/build.zig.zon new file mode 100644 index 000000000000..5aeb51ea4db5 --- /dev/null +++ b/barretenberg/zig/aztec-ipc/build.zig.zon @@ -0,0 +1,17 @@ +.{ + .name = .aztec_ipc, + .version = "0.1.0", + .fingerprint = 0x21e1cd121fe9694b, + .minimum_zig_version = "0.14.0", + .dependencies = .{ + .zig_msgpack = .{ + .url = "https://github.com/zigcc/zig-msgpack/archive/refs/heads/main.tar.gz", + .hash = "zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem", + }, + }, + .paths = .{ + "build.zig", + "build.zig.zon", + "src", + }, +} diff --git a/barretenberg/zig/aztec-ipc/src/ipc_framing.zig b/barretenberg/zig/aztec-ipc/src/ipc_framing.zig new file mode 100644 index 000000000000..7cab35aa7df8 --- /dev/null +++ b/barretenberg/zig/aztec-ipc/src/ipc_framing.zig @@ -0,0 +1,37 @@ +//! IPC framing: 4-byte little-endian length prefix over a stream. +//! +//! All Aztec IPC services use this framing protocol: +//! [4 bytes: payload length, LE u32][payload: msgpack bytes] + +const std = @import("std"); + +/// Send a length-prefixed message over a stream. +pub fn send(writer: anytype, data: []const u8) !void { + const len: u32 = @intCast(data.len); + try writer.writeInt(u32, len, .little); + try writer.writeAll(data); +} + +/// Receive a length-prefixed message from a stream. +/// Caller owns the returned slice. +pub fn receive(reader: anytype, allocator: std.mem.Allocator) ![]u8 { + const len = try reader.readInt(u32, .little); + const data = try allocator.alloc(u8, len); + errdefer allocator.free(data); + try reader.readNoEof(data); + return data; +} + +test "round-trip framing" { + var buf: [1024]u8 = undefined; + var write_stream = std.io.fixedBufferStream(&buf); + + const payload = "hello msgpack"; + try send(write_stream.writer(), payload); + + var read_stream = std.io.fixedBufferStream(write_stream.getWritten()); + const result = try receive(read_stream.reader(), std.testing.allocator); + defer std.testing.allocator.free(result); + + try std.testing.expectEqualStrings(payload, result); +} diff --git a/barretenberg/zig/aztec-ipc/src/root.zig b/barretenberg/zig/aztec-ipc/src/root.zig new file mode 100644 index 000000000000..566d088faf24 --- /dev/null +++ b/barretenberg/zig/aztec-ipc/src/root.zig @@ -0,0 +1,23 @@ +//! Aztec IPC Service Clients (Zig) +//! +//! Generated Zig clients for Aztec IPC services (wsdb, cdb, avm). +//! Each service module contains types, serialization, and a typed client. +//! +//! ## Usage +//! +//! ```zig +//! const ipc = @import("aztec-ipc"); +//! var client = try ipc.wsdb.WsdbClient.connect("/tmp/wsdb.sock"); +//! defer client.close(); +//! ``` + +pub const ipc_framing = @import("ipc_framing.zig"); + +// Per-service generated modules (populated by codegen) +pub const wsdb = @import("wsdb/generated_types.zig"); +pub const cdb = @import("cdb/generated_types.zig"); +pub const avm = @import("avm/generated_types.zig"); + +test { + _ = ipc_framing; +} diff --git a/service-examples/cpp/echo/echo_client b/service-examples/cpp/echo/echo_client new file mode 100755 index 000000000000..a1b009353d1b Binary files /dev/null and b/service-examples/cpp/echo/echo_client differ diff --git a/service-examples/cpp/echo/echo_client.cpp b/service-examples/cpp/echo/echo_client.cpp new file mode 100644 index 000000000000..2a7ef59434c7 --- /dev/null +++ b/service-examples/cpp/echo/echo_client.cpp @@ -0,0 +1,91 @@ +/** + * Echo IPC client (C++) — uses GENERATED types + IPC client template. + * Usage: echo_client --socket /tmp/echo.sock + * + * Note: The generated EchoIpcClient (.hpp/.cpp) depends on barretenberg + * msgpack headers which are not available in this standalone test context. + * Instead we build a thin client directly on the generated types + ipc_client. + */ + +#include "generated/echo_types.hpp" +#include "generated/ipc_client.hpp" + +// Need msgpack for serialization + barretenberg's SERIALIZATION_FIELDS adaptor +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif +#include +#include "struct_map_impl.hpp" + +#include +#include +#include + +using namespace echo::wire; + +template +Resp call(ipc::IpcClient& client, Cmd&& cmd) { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(1); pk.pack_array(2); + pk.pack(std::string(Cmd::MSGPACK_SCHEMA_NAME)); + pk.pack(std::forward(cmd)); + + auto resp = client.call(std::vector(buf.data(), buf.data() + buf.size())); + auto oh = msgpack::unpack(reinterpret_cast(resp.data()), resp.size()); + auto obj = oh.get(); + std::string resp_name(obj.via.array.ptr[0].via.str.ptr, obj.via.array.ptr[0].via.str.size); + if (resp_name == "EchoErrorResponse") throw std::runtime_error("server error"); + Resp result; obj.via.array.ptr[1].convert(result); + return result; +} + +int main(int argc, char** argv) { + const char* socket_path = nullptr; + for (int i = 1; i < argc - 1; i++) { + if (std::string_view(argv[i]) == "--socket") socket_path = argv[i + 1]; + } + if (!socket_path) { std::cerr << "Usage: echo_client --socket \n"; return 1; } + + ipc::IpcClient client(socket_path); + + // EchoBytes + { + EchoBytes cmd{ .data = { 0xDE, 0xAD, 0xBE, 0xEF, 0x42 } }; + auto resp = call(client, std::move(cmd)); + assert((resp.data == std::vector{ 0xDE, 0xAD, 0xBE, 0xEF, 0x42 })); + std::cerr << "echo_client(cpp): EchoBytes OK\n"; + } + + // EchoFields + { + EchoFields cmd{ .a = 42, .b = 999999, .name = "hello wire compat" }; + auto resp = call(client, std::move(cmd)); + assert(resp.a == 42 && resp.b == 999999 && resp.name == "hello wire compat"); + std::cerr << "echo_client(cpp): EchoFields OK\n"; + } + + // EchoNested + { + EchoNested cmd{ .inner = { .values = { {1, 2, 3}, {4, 5} }, .flag = true } }; + auto resp = call(client, std::move(cmd)); + assert((resp.inner.values == std::vector>{ {1, 2, 3}, {4, 5} })); + assert(resp.inner.flag == true); + std::cerr << "echo_client(cpp): EchoNested OK\n"; + } + + // Shutdown + { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(1); pk.pack_array(2); + pk.pack(std::string("EchoShutdown")); pk.pack_map(0); + client.call(std::vector(buf.data(), buf.data() + buf.size())); + } + + std::cerr << "echo_client(cpp): all tests passed\n"; + return 0; +} diff --git a/service-examples/cpp/echo/echo_server b/service-examples/cpp/echo/echo_server new file mode 100755 index 000000000000..2c2b8c92ca03 Binary files /dev/null and b/service-examples/cpp/echo/echo_server differ diff --git a/service-examples/cpp/echo/echo_server.cpp b/service-examples/cpp/echo/echo_server.cpp new file mode 100644 index 000000000000..db60c102d7d5 --- /dev/null +++ b/service-examples/cpp/echo/echo_server.cpp @@ -0,0 +1,61 @@ +/** + * Echo IPC server (C++) — uses GENERATED dispatch + template Ctx. + * Usage: echo_server --socket /tmp/echo.sock + */ + +// barretenberg's custom msgpack adaptor for SERIALIZATION_FIELDS — +// enables msgpack::object::convert() to work with the generated types. +// Must be included before echo_ipc_server.hpp which uses convert()/pack(). +#include "generated/echo_types.hpp" +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif +#include +#include "struct_map_impl.hpp" + +// The generated server header declares template handler functions. +// We need to see those declarations before providing specializations. +// Importantly, make_echo_handler() is defined inline but only instantiated +// when serve() is called in main() — so specializations defined after +// the header but before main() are visible at instantiation time. +#include "generated/echo_ipc_server.hpp" + +#include +#include + +namespace echo { + +struct EchoCtx {}; // empty context for the echo service + +// Template specializations — echo input fields back in response. +template <> +wire::EchoBytesResponse handle_bytes(EchoCtx& /*ctx*/, wire::EchoBytes&& cmd) { + return { .data = std::move(cmd.data) }; +} + +template <> +wire::EchoFieldsResponse handle_fields(EchoCtx& /*ctx*/, wire::EchoFields&& cmd) { + return { .a = cmd.a, .b = cmd.b, .name = std::move(cmd.name) }; +} + +template <> +wire::EchoNestedResponse handle_nested(EchoCtx& /*ctx*/, wire::EchoNested&& cmd) { + return { .inner = std::move(cmd.inner) }; +} + +} // namespace echo + +int main(int argc, char** argv) { + const char* socket_path = nullptr; + for (int i = 1; i < argc - 1; i++) { + if (std::string_view(argv[i]) == "--socket") socket_path = argv[i + 1]; + } + if (!socket_path) { std::cerr << "Usage: echo_server --socket \n"; return 1; } + + echo::EchoCtx ctx; + echo::serve(socket_path, ctx); + return 0; +} diff --git a/service-examples/cpp/echo/generated/echo_ipc_client.cpp b/service-examples/cpp/echo/generated/echo_ipc_client.cpp new file mode 100644 index 000000000000..c12d0571d2f8 --- /dev/null +++ b/service-examples/cpp/echo/generated/echo_ipc_client.cpp @@ -0,0 +1,88 @@ +// AUTOGENERATED FILE - DO NOT EDIT + +#include "echo/echo_ipc_client.hpp" +#include "barretenberg/serialize/msgpack.hpp" +#include "barretenberg/serialize/msgpack_impl.hpp" + +#include +#include + +namespace echo { + +EchoIpcClient::EchoIpcClient(const std::string &socket_path) + : client_(std::make_unique<::ipc::IpcClient>(socket_path.c_str())) {} + +EchoIpcClient::~EchoIpcClient() = default; + +template +Resp EchoIpcClient::send(Cmd &&cmd) const { + // Serialize as [[CommandName, {payload}]] + msgpack::sbuffer send_buffer; + msgpack::packer pk(send_buffer); + pk.pack_array(1); + pk.pack_array(2); + pk.pack(std::string(Cmd::MSGPACK_SCHEMA_NAME)); + pk.pack(std::forward(cmd)); + + // Send request, receive response + std::vector request_bytes(send_buffer.data(), + send_buffer.data() + send_buffer.size()); + auto response_bytes = client_->call(request_bytes); + + if (response_bytes.empty()) { + throw std::runtime_error("Empty response from server"); + } + + // Parse response: [ResponseName, {payload}] + auto unpacked = + msgpack::unpack(reinterpret_cast(response_bytes.data()), + response_bytes.size()); + auto obj = unpacked.get(); + + if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 2 || + obj.via.array.ptr[0].type != msgpack::type::STR) { + throw std::runtime_error("Invalid response format from server"); + } + + std::string resp_name(obj.via.array.ptr[0].via.str.ptr, + obj.via.array.ptr[0].via.str.size); + if (resp_name == "EchoErrorResponse") { + std::string message; + auto &payload = obj.via.array.ptr[1]; + // Extract message field from the error map + if (payload.type == msgpack::type::MAP) { + for (uint32_t i = 0; i < payload.via.map.size; ++i) { + auto &kv = payload.via.map.ptr[i]; + if (kv.key.type == msgpack::type::STR) { + std::string key(kv.key.via.str.ptr, kv.key.via.str.size); + if (key == "message" && kv.val.type == msgpack::type::STR) { + message = std::string(kv.val.via.str.ptr, kv.val.via.str.size); + } + } + } + } + throw std::runtime_error("Server error: " + message); + } + + Resp result; + obj.via.array.ptr[1].convert(result); + return result; +} + +EchoBytesResponse EchoIpcClient::bytes(EchoBytes cmd) const { + return send(std::move(cmd)); +} + +EchoFieldsResponse EchoIpcClient::fields(EchoFields cmd) const { + return send(std::move(cmd)); +} + +EchoNestedResponse EchoIpcClient::nested(EchoNested cmd) const { + return send(std::move(cmd)); +} + +void EchoIpcClient::shutdown() { + send(EchoShutdown{}); +} + +} // namespace echo diff --git a/service-examples/cpp/echo/generated/echo_ipc_client.hpp b/service-examples/cpp/echo/generated/echo_ipc_client.hpp new file mode 100644 index 000000000000..28d680093425 --- /dev/null +++ b/service-examples/cpp/echo/generated/echo_ipc_client.hpp @@ -0,0 +1,43 @@ +// AUTOGENERATED FILE - DO NOT EDIT +#pragma once + +#include "echo/echo_types.hpp" +#include "echo/ipc_client.hpp" +// clang-format on + +#include +#include + +namespace echo { +using namespace wire; + +/** Schema version hash for compatibility checking */ +static constexpr const char SCHEMA_HASH[] = + "bb6458c4c159270c9a0e50ec8ad88d1e1c93271550542c7ab148e96adb6460cc"; + +/** + * @brief Auto-generated IPC client. + * + * Each method sends a msgpack-serialized command to the server over UDS + * and returns the typed response. All methods block until the response arrives. + */ +class EchoIpcClient { +public: + explicit EchoIpcClient(const std::string &socket_path); + ~EchoIpcClient(); + + EchoIpcClient(const EchoIpcClient &) = delete; + EchoIpcClient &operator=(const EchoIpcClient &) = delete; + + EchoBytesResponse bytes(EchoBytes cmd) const; + EchoFieldsResponse fields(EchoFields cmd) const; + EchoNestedResponse nested(EchoNested cmd) const; + void shutdown(); + +private: + template Resp send(Cmd &&cmd) const; + + mutable std::unique_ptr<::ipc::IpcClient> client_; +}; + +} // namespace echo diff --git a/service-examples/cpp/echo/generated/echo_ipc_server.hpp b/service-examples/cpp/echo/generated/echo_ipc_server.hpp new file mode 100644 index 000000000000..e6519ccb3310 --- /dev/null +++ b/service-examples/cpp/echo/generated/echo_ipc_server.hpp @@ -0,0 +1,159 @@ +// AUTOGENERATED FILE - DO NOT EDIT +// Header-only server dispatch — template for service context. +#pragma once + +#include "echo_types.hpp" +#include "ipc_server.hpp" + +// msgpack headers needed for dispatch implementation. +// Includers within barretenberg must include try_catch_shim.hpp before this +// header. +#ifndef THROW +#define THROW throw +#define RETHROW throw +#endif +#include + +#include +#include +#include +#include +#include +#include + +namespace echo { + +// Wire types are in the 'wire' sub-namespace (from echo_types.hpp) +// Handler declarations — implement these in your handler file. +// Template specializations must be visible before make_handler() is +// instantiated. + +template +wire::EchoBytesResponse handle_bytes(Ctx &ctx, wire::EchoBytes &&cmd); + +template +wire::EchoFieldsResponse handle_fields(Ctx &ctx, wire::EchoFields &&cmd); + +template +wire::EchoNestedResponse handle_nested(Ctx &ctx, wire::EchoNested &&cmd); + +// --------------------------------------------------------------------------- +// Dispatch — template on service context type +// --------------------------------------------------------------------------- + +namespace detail { + +inline std::vector make_error(const std::string &message) { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("EchoErrorResponse")); + pk.pack_map(1); + pk.pack(std::string("message")); + pk.pack(message); + return std::vector(buf.data(), buf.data() + buf.size()); +} + +} // namespace detail + +template ::ipc::Handler make_echo_handler(Ctx &ctx) { + using HandlerFn = + std::function(Ctx &, const msgpack::object &)>; + static const std::unordered_map table = { + {"EchoBytes", + [](Ctx &ctx, [[maybe_unused]] const msgpack::object &payload) + -> std::vector { + wire::EchoBytes wire_cmd; + payload.convert(wire_cmd); + auto wire_resp = handle_bytes(ctx, std::move(wire_cmd)); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("EchoBytesResponse")); + pk.pack(wire_resp); + return std::vector(buf.data(), buf.data() + buf.size()); + }}, + {"EchoFields", + [](Ctx &ctx, [[maybe_unused]] const msgpack::object &payload) + -> std::vector { + wire::EchoFields wire_cmd; + payload.convert(wire_cmd); + auto wire_resp = handle_fields(ctx, std::move(wire_cmd)); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("EchoFieldsResponse")); + pk.pack(wire_resp); + return std::vector(buf.data(), buf.data() + buf.size()); + }}, + {"EchoNested", + [](Ctx &ctx, [[maybe_unused]] const msgpack::object &payload) + -> std::vector { + wire::EchoNested wire_cmd; + payload.convert(wire_cmd); + auto wire_resp = handle_nested(ctx, std::move(wire_cmd)); + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("EchoNestedResponse")); + pk.pack(wire_resp); + return std::vector(buf.data(), buf.data() + buf.size()); + }}, + {"EchoShutdown", + []([[maybe_unused]] Ctx &ctx, + [[maybe_unused]] const msgpack::object &payload) + -> std::vector { + msgpack::sbuffer buf; + msgpack::packer pk(buf); + pk.pack_array(2); + pk.pack(std::string("EchoShutdownResponse")); + pk.pack_map(0); + throw ::ipc::ShutdownRequested( + std::vector(buf.data(), buf.data() + buf.size())); + }}, + }; + + return [&ctx]( + const std::vector &raw_request) -> std::vector { + auto unpacked = msgpack::unpack( + reinterpret_cast(raw_request.data()), raw_request.size()); + auto obj = unpacked.get(); + + if (obj.type != msgpack::type::ARRAY || obj.via.array.size != 1) { + std::cerr << "Error: Expected array of size 1\n"; + return {}; + } + + auto &inner = obj.via.array.ptr[0]; + if (inner.type != msgpack::type::ARRAY || inner.via.array.size != 2 || + inner.via.array.ptr[0].type != msgpack::type::STR) { + std::cerr << "Error: Expected [CommandName, {payload}]\n"; + return {}; + } + + std::string cmd_name(inner.via.array.ptr[0].via.str.ptr, + inner.via.array.ptr[0].via.str.size); + auto &cmd_payload = inner.via.array.ptr[1]; + + try { + auto it = table.find(cmd_name); + if (it == table.end()) { + return detail::make_error("unknown command: " + cmd_name); + } + return it->second(ctx, cmd_payload); + } catch (const ::ipc::ShutdownRequested &) { + throw; + } catch (const std::exception &e) { + std::cerr << "Error processing " << cmd_name << ": " << e.what() << '\n'; + return detail::make_error(e.what()); + } + }; +} + +template +void serve(const char *socket_path, Ctx &ctx, + std::atomic *shutdown_flag = nullptr) { + ::ipc::serve(socket_path, make_echo_handler(ctx), shutdown_flag); +} + +} // namespace echo diff --git a/service-examples/cpp/echo/generated/echo_types.hpp b/service-examples/cpp/echo/generated/echo_types.hpp new file mode 100644 index 000000000000..29ad89ce13f8 --- /dev/null +++ b/service-examples/cpp/echo/generated/echo_types.hpp @@ -0,0 +1,132 @@ +// AUTOGENERATED FILE - DO NOT EDIT +// Standalone types for Echo service. +#pragma once + +#include +#include +#include +#include +#include +#include + +// --------------------------------------------------------------------------- +// Self-contained serialization macro. +// Defines a msgpack() method that enumerates field name/value pairs. +// Works with msgpack packers (serialization) and schema reflectors. +// If barretenberg's SERIALIZATION_FIELDS is already available, use it instead. +// --------------------------------------------------------------------------- +#ifndef SERIALIZATION_FIELDS +#define _SF_E1(x) #x, x +#define _SF_E2(x, ...) #x, x, _SF_E1(__VA_ARGS__) +#define _SF_E3(x, ...) #x, x, _SF_E2(__VA_ARGS__) +#define _SF_E4(x, ...) #x, x, _SF_E3(__VA_ARGS__) +#define _SF_E5(x, ...) #x, x, _SF_E4(__VA_ARGS__) +#define _SF_E6(x, ...) #x, x, _SF_E5(__VA_ARGS__) +#define _SF_E7(x, ...) #x, x, _SF_E6(__VA_ARGS__) +#define _SF_E8(x, ...) #x, x, _SF_E7(__VA_ARGS__) +#define _SF_E9(x, ...) #x, x, _SF_E8(__VA_ARGS__) +#define _SF_E10(x, ...) #x, x, _SF_E9(__VA_ARGS__) +#define _SF_E11(x, ...) #x, x, _SF_E10(__VA_ARGS__) +#define _SF_E12(x, ...) #x, x, _SF_E11(__VA_ARGS__) +#define _SF_E13(x, ...) #x, x, _SF_E12(__VA_ARGS__) +#define _SF_E14(x, ...) #x, x, _SF_E13(__VA_ARGS__) +#define _SF_E15(x, ...) #x, x, _SF_E14(__VA_ARGS__) +#define _SF_E16(x, ...) #x, x, _SF_E15(__VA_ARGS__) +#define _SF_E17(x, ...) #x, x, _SF_E16(__VA_ARGS__) +#define _SF_E18(x, ...) #x, x, _SF_E17(__VA_ARGS__) +#define _SF_E19(x, ...) #x, x, _SF_E18(__VA_ARGS__) +#define _SF_E20(x, ...) #x, x, _SF_E19(__VA_ARGS__) +#define _SF_CNT(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, \ + _15, _16, _17, _18, _19, _20, N, ...) \ + N +#define _SF_NUM(...) \ + _SF_CNT(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, \ + 5, 4, 3, 2, 1) +#define _SF_CAT(a, b) a##b +#define _SF_SEL(n) _SF_CAT(_SF_E, n) +#define _SF_NVP(...) _SF_SEL(_SF_NUM(__VA_ARGS__))(__VA_ARGS__) +#define SERIALIZATION_FIELDS(...) \ + void msgpack(auto pack_fn) { pack_fn(_SF_NVP(__VA_ARGS__)); } +#endif + +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated. +using Fr = std::array; + +namespace echo::wire { + +struct EchoInner { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoInner"; + std::vector> values; + std::optional flag; + SERIALIZATION_FIELDS(values, flag) + bool operator==(const EchoInner &) const = default; +}; + +struct EchoBytes { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoBytes"; + std::vector data; + SERIALIZATION_FIELDS(data) + bool operator==(const EchoBytes &) const = default; +}; + +struct EchoFields { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoFields"; + uint32_t a; + uint64_t b; + std::string name; + SERIALIZATION_FIELDS(a, b, name) + bool operator==(const EchoFields &) const = default; +}; + +struct EchoNested { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoNested"; + EchoInner inner; + SERIALIZATION_FIELDS(inner) + bool operator==(const EchoNested &) const = default; +}; + +struct EchoShutdown { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoShutdown"; + + void msgpack(auto &&pack_fn) { pack_fn(); } + bool operator==(const EchoShutdown &) const = default; +}; + +struct EchoBytesResponse { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoBytesResponse"; + std::vector data; + SERIALIZATION_FIELDS(data) + bool operator==(const EchoBytesResponse &) const = default; +}; + +struct EchoFieldsResponse { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoFieldsResponse"; + uint32_t a; + uint64_t b; + std::string name; + SERIALIZATION_FIELDS(a, b, name) + bool operator==(const EchoFieldsResponse &) const = default; +}; + +struct EchoNestedResponse { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoNestedResponse"; + EchoInner inner; + SERIALIZATION_FIELDS(inner) + bool operator==(const EchoNestedResponse &) const = default; +}; + +struct EchoShutdownResponse { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoShutdownResponse"; + + void msgpack(auto &&pack_fn) { pack_fn(); } + bool operator==(const EchoShutdownResponse &) const = default; +}; + +struct EchoErrorResponse { + static constexpr const char MSGPACK_SCHEMA_NAME[] = "EchoErrorResponse"; + std::string message; + SERIALIZATION_FIELDS(message) + bool operator==(const EchoErrorResponse &) const = default; +}; + +} // namespace echo::wire diff --git a/service-examples/cpp/echo/generated/ipc_client.hpp b/service-examples/cpp/echo/generated/ipc_client.hpp new file mode 100644 index 000000000000..4e3db6c204c6 --- /dev/null +++ b/service-examples/cpp/echo/generated/ipc_client.hpp @@ -0,0 +1,112 @@ +/** + * Generic IPC client over Unix Domain Sockets. + * Handles: socket connect, length-prefixed framing, send/receive raw bytes. + * Header-only. + */ +#pragma once +#ifndef IPC_CLIENT_HPP_INCLUDED +#define IPC_CLIENT_HPP_INCLUDED + +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace ipc { + +class IpcClient { + public: + explicit IpcClient(const char* socket_path) + { + fd_ = ::socket(AF_UNIX, SOCK_STREAM, 0); + if (fd_ < 0) { + throw std::runtime_error(std::string("socket() failed: ") + strerror(errno)); + } + struct sockaddr_un addr {}; + addr.sun_family = AF_UNIX; + strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1); + if (::connect(fd_, reinterpret_cast(&addr), sizeof(addr)) < 0) { + ::close(fd_); + fd_ = -1; + throw std::runtime_error(std::string("connect() failed: ") + strerror(errno)); + } + } + + ~IpcClient() + { + if (fd_ >= 0) { + ::close(fd_); + } + } + + IpcClient(const IpcClient&) = delete; + IpcClient& operator=(const IpcClient&) = delete; + + std::vector call(const std::vector& request) + { + // Send length-prefixed request + uint32_t len = static_cast(request.size()); + uint8_t header[4] = { + static_cast(len & 0xFF), + static_cast((len >> 8) & 0xFF), + static_cast((len >> 16) & 0xFF), + static_cast((len >> 24) & 0xFF), + }; + write_all(header, 4); + write_all(request.data(), request.size()); + + // Receive length-prefixed response + uint8_t resp_hdr[4]; + read_all(resp_hdr, 4); + uint32_t resp_len = static_cast(resp_hdr[0]) | (static_cast(resp_hdr[1]) << 8) | + (static_cast(resp_hdr[2]) << 16) | (static_cast(resp_hdr[3]) << 24); + std::vector resp(resp_len); + read_all(resp.data(), resp_len); + return resp; + } + + private: + void write_all(const void* data, size_t len) + { + const auto* ptr = static_cast(data); + size_t written = 0; + while (written < len) { + auto n = ::write(fd_, ptr + written, len - written); + if (n <= 0) { + throw std::runtime_error("write failed"); + } + written += static_cast(n); + } + } + + void read_all(void* data, size_t len) + { + auto* ptr = static_cast(data); + size_t got = 0; + while (got < len) { + auto n = ::read(fd_, ptr + got, len - got); + if (n <= 0) { + throw std::runtime_error("read failed"); + } + got += static_cast(n); + } + } + + int fd_ = -1; +}; + +} // namespace ipc +#endif // IPC_CLIENT_HPP_INCLUDED diff --git a/service-examples/cpp/echo/generated/ipc_server.hpp b/service-examples/cpp/echo/generated/ipc_server.hpp new file mode 100644 index 000000000000..d33f72ff1329 --- /dev/null +++ b/service-examples/cpp/echo/generated/ipc_server.hpp @@ -0,0 +1,231 @@ +/** + * Generic IPC server over Unix Domain Sockets. + * Handles: socket setup, multi-client accept via poll(), length-prefixed framing. + * Service-specific dispatch is injected via the handler function parameter. + * + * Does NOT handle signal handling or parent death monitoring — those are + * the responsibility of the binary that calls serve(). + * + * Header-only — no separate .cpp needed. + */ +#pragma once +#ifndef IPC_SERVER_HPP_INCLUDED +#define IPC_SERVER_HPP_INCLUDED + +#ifndef THROW +#define THROW throw +#endif +#ifndef RETHROW +#define RETHROW throw +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace ipc { + +/// Exception thrown by handlers to trigger graceful shutdown. +/// Carries the final response to send before closing. +struct ShutdownRequested : std::exception { + std::vector final_response; + explicit ShutdownRequested(std::vector resp) + : final_response(std::move(resp)) + {} + const char* what() const noexcept override { return "shutdown requested"; } +}; + +using Handler = std::function(const std::vector&)>; + +// --------------------------------------------------------------------------- +// Framing: 4-byte little-endian length prefix +// --------------------------------------------------------------------------- + +inline bool send_frame(int fd, const std::vector& data) +{ + uint32_t len = static_cast(data.size()); + uint8_t header[4] = { + static_cast(len & 0xFF), + static_cast((len >> 8) & 0xFF), + static_cast((len >> 16) & 0xFF), + static_cast((len >> 24) & 0xFF), + }; + // Write header + size_t written = 0; + while (written < 4) { + auto n = ::write(fd, header + written, 4 - written); + if (n <= 0) { + return false; + } + written += static_cast(n); + } + // Write payload + written = 0; + while (written < data.size()) { + auto n = ::write(fd, data.data() + written, data.size() - written); + if (n <= 0) { + return false; + } + written += static_cast(n); + } + return true; +} + +/// Returns empty vector on EOF/error. +inline std::vector recv_frame(int fd) +{ + uint8_t header[4]; + size_t got = 0; + while (got < 4) { + auto n = ::read(fd, header + got, 4 - got); + if (n <= 0) { + return {}; + } + got += static_cast(n); + } + uint32_t len = static_cast(header[0]) | (static_cast(header[1]) << 8) | + (static_cast(header[2]) << 16) | (static_cast(header[3]) << 24); + std::vector buf(len); + got = 0; + while (got < len) { + auto n = ::read(fd, buf.data() + got, len - got); + if (n <= 0) { + return {}; + } + got += static_cast(n); + } + return buf; +} + +// --------------------------------------------------------------------------- +// Multi-client UDS server +// --------------------------------------------------------------------------- + +/** + * @brief Run a multi-client UDS server. + * + * Accepts multiple client connections via poll(). Handles one request at a time + * (sequential, not concurrent). When a handler throws ShutdownRequested, the + * final response is sent and the server exits cleanly. + * + * The caller should set up signal handlers and parent death monitoring before + * calling this function. To request external shutdown, store true into the + * provided shutdown_flag (or pass nullptr to disable external shutdown). + * + * @param socket_path Path for the Unix domain socket + * @param handler Function that processes a request and returns a response + * @param shutdown_flag Atomic flag checked each poll cycle; serve() exits when true. + * May be nullptr if only ShutdownRequested is used. + * @param backlog listen() backlog (max pending connections) + */ +inline void serve(const char* socket_path, + Handler handler, + std::atomic* shutdown_flag = nullptr, + int backlog = 5) +{ + unlink(socket_path); + int server_fd = ::socket(AF_UNIX, SOCK_STREAM, 0); + if (server_fd < 0) { + throw std::runtime_error(std::string("socket() failed: ") + strerror(errno)); + } + + struct sockaddr_un addr {}; + addr.sun_family = AF_UNIX; + strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path) - 1); + + if (::bind(server_fd, reinterpret_cast(&addr), sizeof(addr)) < 0) { + ::close(server_fd); + throw std::runtime_error(std::string("bind() failed: ") + strerror(errno)); + } + if (::listen(server_fd, backlog) < 0) { + ::close(server_fd); + throw std::runtime_error(std::string("listen() failed: ") + strerror(errno)); + } + + // Poll set: [0] = server_fd, [1..N] = client fds + std::vector fds; + fds.push_back({ server_fd, POLLIN, 0 }); + + auto remove_client = [&](size_t idx) { + ::close(fds[idx].fd); + fds.erase(fds.begin() + static_cast(idx)); + }; + + auto should_shutdown = [&]() { + return shutdown_flag != nullptr && shutdown_flag->load(std::memory_order_acquire); + }; + + while (!should_shutdown()) { + int ready = ::poll(fds.data(), fds.size(), 100 /* ms */); + if (ready < 0) { + if (errno == EINTR) { + continue; + } + break; + } + if (ready == 0) { + continue; + } + + // Check server fd for new connections + if (fds[0].revents & POLLIN) { + int client_fd = ::accept(server_fd, nullptr, nullptr); + if (client_fd >= 0) { + fds.push_back({ client_fd, POLLIN, 0 }); + } + } + + // Check client fds for data + for (size_t i = 1; i < fds.size(); /* incremented below */) { + if (!(fds[i].revents & POLLIN)) { + ++i; + continue; + } + + auto payload = recv_frame(fds[i].fd); + if (payload.empty()) { + // Client disconnected + remove_client(i); + continue; + } + + try { + auto response = handler(payload); + if (!send_frame(fds[i].fd, response)) { + remove_client(i); + continue; + } + } catch (const ShutdownRequested& shutdown) { + send_frame(fds[i].fd, shutdown.final_response); + goto done; + } catch (const std::exception& e) { + std::cerr << "ipc-server: handler error: " << e.what() << "\n"; + remove_client(i); + continue; + } + ++i; + } + } + +done: + // Close all client connections + for (size_t i = 1; i < fds.size(); ++i) { + ::close(fds[i].fd); + } + ::close(server_fd); + unlink(socket_path); +} + +} // namespace ipc +#endif // IPC_SERVER_HPP_INCLUDED diff --git a/service-examples/echo-schema/generate.sh b/service-examples/echo-schema/generate.sh new file mode 100755 index 000000000000..83f77e4f68e9 --- /dev/null +++ b/service-examples/echo-schema/generate.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Generate echo service types for all 4 languages from schema.json. +# Uses the codegen CLI — same as any service developer would. +set -euo pipefail + +DIR="$(cd "$(dirname "$0")" && pwd)" +EXAMPLES="$(cd "$DIR/.." && pwd)" +CODEGEN="$(cd "$DIR/../../barretenberg/codegen" && pwd)" +NODE="node --experimental-strip-types --experimental-transform-types --no-warnings" +GEN="$CODEGEN/src/generate.ts" +SCHEMA="$DIR/schema.json" + +echo "Generating echo types from $SCHEMA" + +$NODE "$GEN" --schema "$SCHEMA" --lang cpp --server --client --uds --out "$EXAMPLES/cpp/echo/generated" --prefix Echo --cpp-namespace echo --cpp-include-dir echo +$NODE "$GEN" --schema "$SCHEMA" --lang ts --server --client --uds --out "$EXAMPLES/ts/echo/generated" --prefix Echo +$NODE "$GEN" --schema "$SCHEMA" --lang rust --server --client --uds --out "$EXAMPLES/rust/echo/src/generated" --prefix Echo +$NODE "$GEN" --schema "$SCHEMA" --lang zig --server --client --uds --out "$EXAMPLES/zig/echo/generated" --prefix Echo + +echo "Done." diff --git a/service-examples/echo-schema/golden/echo_bytes_request.msgpack b/service-examples/echo-schema/golden/echo_bytes_request.msgpack new file mode 100644 index 000000000000..fbd6f3e3f32d --- /dev/null +++ b/service-examples/echo-schema/golden/echo_bytes_request.msgpack @@ -0,0 +1 @@ +���EchoBytes��data�ޭ��B \ No newline at end of file diff --git a/service-examples/echo-schema/golden/echo_bytes_response.msgpack b/service-examples/echo-schema/golden/echo_bytes_response.msgpack new file mode 100644 index 000000000000..f15b07218068 --- /dev/null +++ b/service-examples/echo-schema/golden/echo_bytes_response.msgpack @@ -0,0 +1 @@ +��EchoBytesResponse��data�ޭ��B \ No newline at end of file diff --git a/service-examples/echo-schema/golden/echo_fields_request.msgpack b/service-examples/echo-schema/golden/echo_fields_request.msgpack new file mode 100644 index 000000000000..d72172943bc0 Binary files /dev/null and b/service-examples/echo-schema/golden/echo_fields_request.msgpack differ diff --git a/service-examples/echo-schema/golden/echo_fields_response.msgpack b/service-examples/echo-schema/golden/echo_fields_response.msgpack new file mode 100644 index 000000000000..1b2aba194ac4 Binary files /dev/null and b/service-examples/echo-schema/golden/echo_fields_response.msgpack differ diff --git a/service-examples/echo-schema/golden/echo_nested_request.msgpack b/service-examples/echo-schema/golden/echo_nested_request.msgpack new file mode 100644 index 000000000000..6c8ded7184ed --- /dev/null +++ b/service-examples/echo-schema/golden/echo_nested_request.msgpack @@ -0,0 +1 @@ +���EchoNested��inner��values����flag� \ No newline at end of file diff --git a/service-examples/echo-schema/golden/echo_nested_response.msgpack b/service-examples/echo-schema/golden/echo_nested_response.msgpack new file mode 100644 index 000000000000..c8966a9d4f46 --- /dev/null +++ b/service-examples/echo-schema/golden/echo_nested_response.msgpack @@ -0,0 +1 @@ +��EchoNestedResponse��inner��values����flag� \ No newline at end of file diff --git a/service-examples/echo-schema/schema.json b/service-examples/echo-schema/schema.json new file mode 100644 index 000000000000..47b6755e8ea9 --- /dev/null +++ b/service-examples/echo-schema/schema.json @@ -0,0 +1,52 @@ +{ + "commands": ["named_union", [ + ["EchoBytes", { + "__typename": "EchoBytes", + "data": ["vector", ["unsigned char"]] + }], + ["EchoFields", { + "__typename": "EchoFields", + "a": "unsigned int", + "b": "unsigned long", + "name": "string" + }], + ["EchoNested", { + "__typename": "EchoNested", + "inner": { + "__typename": "EchoInner", + "values": ["vector", [["vector", ["unsigned char"]]]], + "flag": ["optional", ["bool"]] + } + }], + ["EchoShutdown", { + "__typename": "EchoShutdown" + }] + ]], + "responses": ["named_union", [ + ["EchoBytesResponse", { + "__typename": "EchoBytesResponse", + "data": ["vector", ["unsigned char"]] + }], + ["EchoFieldsResponse", { + "__typename": "EchoFieldsResponse", + "a": "unsigned int", + "b": "unsigned long", + "name": "string" + }], + ["EchoNestedResponse", { + "__typename": "EchoNestedResponse", + "inner": { + "__typename": "EchoInner", + "values": ["vector", [["vector", ["unsigned char"]]]], + "flag": ["optional", ["bool"]] + } + }], + ["EchoShutdownResponse", { + "__typename": "EchoShutdownResponse" + }], + ["EchoErrorResponse", { + "__typename": "EchoErrorResponse", + "message": "string" + }] + ]] +} diff --git a/service-examples/rust/echo/Cargo.lock b/service-examples/rust/echo/Cargo.lock new file mode 100644 index 000000000000..e121ba639343 --- /dev/null +++ b/service-examples/rust/echo/Cargo.lock @@ -0,0 +1,131 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "echo-wire-compat" +version = "0.1.0" +dependencies = [ + "rmp-serde", + "serde", + "thiserror", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rmp" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "rmp-serde" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" +dependencies = [ + "rmp", + "serde", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" diff --git a/service-examples/rust/echo/Cargo.toml b/service-examples/rust/echo/Cargo.toml new file mode 100644 index 000000000000..321f54c6fd8d --- /dev/null +++ b/service-examples/rust/echo/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "echo-wire-compat" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "echo_server" +path = "src/echo_server.rs" + +[[bin]] +name = "echo_client" +path = "src/echo_client.rs" + +[dependencies] +rmp-serde = "1.1" +serde = { version = "1.0", features = ["derive"] } +thiserror = "1.0" diff --git a/service-examples/rust/echo/src/bin/generate_golden.rs b/service-examples/rust/echo/src/bin/generate_golden.rs new file mode 100644 index 000000000000..6f53dd283fa0 --- /dev/null +++ b/service-examples/rust/echo/src/bin/generate_golden.rs @@ -0,0 +1,65 @@ +//! Generate golden msgpack files for wire compatibility testing. +//! Usage: generate_golden --output-dir golden/ +//! +//! Outputs one .msgpack file per test command (request format: [[name, {fields}]]) +//! and one per response. + +use echo_wire_compat::types_gen::*; +use std::fs; +use std::path::Path; + +fn main() { + let args: Vec = std::env::args().collect(); + let output_dir = args.iter() + .position(|a| a == "--output-dir") + .and_then(|i| args.get(i + 1)) + .expect("Usage: generate_golden --output-dir "); + + fs::create_dir_all(output_dir).unwrap(); + + // Request format: [command] — serialized as Vec (1-element array) + write_golden(output_dir, "echo_bytes_request.msgpack", &vec![ + Command::EchoBytes(EchoBytes::new(vec![0xDE, 0xAD, 0xBE, 0xEF, 0x42])) + ]); + + write_golden(output_dir, "echo_fields_request.msgpack", &vec![ + Command::EchoFields(EchoFields::new(42, 999999, "hello wire compat".to_string())) + ]); + + write_golden(output_dir, "echo_nested_request.msgpack", &vec![ + Command::EchoNested(EchoNested::new(EchoInner { + values: vec![vec![1, 2, 3], vec![4, 5]], + flag: Some(true), + })) + ]); + + // Response format: NamedUnion (no tuple wrapper) + write_golden(output_dir, "echo_bytes_response.msgpack", + &Response::EchoBytesResponse(EchoBytesResponse { + data: vec![0xDE, 0xAD, 0xBE, 0xEF, 0x42], + })); + + write_golden(output_dir, "echo_fields_response.msgpack", + &Response::EchoFieldsResponse(EchoFieldsResponse { + a: 42, + b: 999999, + name: "hello wire compat".to_string(), + })); + + write_golden(output_dir, "echo_nested_response.msgpack", + &Response::EchoNestedResponse(EchoNestedResponse { + inner: EchoInner { + values: vec![vec![1, 2, 3], vec![4, 5]], + flag: Some(true), + }, + })); + + eprintln!("Generated 6 golden files in {}", output_dir); +} + +fn write_golden(dir: &str, name: &str, value: &T) { + let bytes = rmp_serde::to_vec_named(value).unwrap(); + let path = Path::new(dir).join(name); + fs::write(&path, &bytes).unwrap(); + eprintln!(" {} ({} bytes)", name, bytes.len()); +} diff --git a/service-examples/rust/echo/src/bin/golden_test.rs b/service-examples/rust/echo/src/bin/golden_test.rs new file mode 100644 index 000000000000..3f52379ceb6a --- /dev/null +++ b/service-examples/rust/echo/src/bin/golden_test.rs @@ -0,0 +1,109 @@ +//! Golden file deserialization test (Rust). +//! Verifies Rust can deserialize the golden msgpack files. +//! Usage: golden_test --golden-dir golden/ + +use echo_wire_compat::types_gen::*; +use std::fs; + +fn main() { + let args: Vec = std::env::args().collect(); + let golden_dir = args.iter() + .position(|a| a == "--golden-dir") + .and_then(|i| args.get(i + 1)) + .expect("Usage: golden_test --golden-dir "); + + let mut pass = 0; + let mut fail = 0; + + // Request golden files + match check_request::(golden_dir, "echo_bytes_request.msgpack") { + Ok(cmd) => { + assert_eq!(cmd.data, vec![0xDE, 0xAD, 0xBE, 0xEF, 0x42]); + eprintln!(" PASS: echo_bytes_request.msgpack"); + pass += 1; + } + Err(e) => { eprintln!(" FAIL: echo_bytes_request.msgpack: {e}"); fail += 1; } + } + + match check_request::(golden_dir, "echo_fields_request.msgpack") { + Ok(cmd) => { + assert_eq!(cmd.a, 42); + assert_eq!(cmd.b, 999999); + assert_eq!(cmd.name, "hello wire compat"); + eprintln!(" PASS: echo_fields_request.msgpack"); + pass += 1; + } + Err(e) => { eprintln!(" FAIL: echo_fields_request.msgpack: {e}"); fail += 1; } + } + + match check_request::(golden_dir, "echo_nested_request.msgpack") { + Ok(cmd) => { + assert_eq!(cmd.inner.values, vec![vec![1u8, 2, 3], vec![4, 5]]); + assert_eq!(cmd.inner.flag, Some(true)); + eprintln!(" PASS: echo_nested_request.msgpack"); + pass += 1; + } + Err(e) => { eprintln!(" FAIL: echo_nested_request.msgpack: {e}"); fail += 1; } + } + + // Response golden files + match check_response(golden_dir, "echo_bytes_response.msgpack") { + Ok(Response::EchoBytesResponse(r)) => { + assert_eq!(r.data, vec![0xDE, 0xAD, 0xBE, 0xEF, 0x42]); + eprintln!(" PASS: echo_bytes_response.msgpack"); + pass += 1; + } + Ok(_) => { eprintln!(" FAIL: echo_bytes_response.msgpack: wrong variant"); fail += 1; } + Err(e) => { eprintln!(" FAIL: echo_bytes_response.msgpack: {e}"); fail += 1; } + } + + match check_response(golden_dir, "echo_fields_response.msgpack") { + Ok(Response::EchoFieldsResponse(r)) => { + assert_eq!(r.a, 42); + assert_eq!(r.b, 999999); + assert_eq!(r.name, "hello wire compat"); + eprintln!(" PASS: echo_fields_response.msgpack"); + pass += 1; + } + Ok(_) => { eprintln!(" FAIL: echo_fields_response.msgpack: wrong variant"); fail += 1; } + Err(e) => { eprintln!(" FAIL: echo_fields_response.msgpack: {e}"); fail += 1; } + } + + match check_response(golden_dir, "echo_nested_response.msgpack") { + Ok(Response::EchoNestedResponse(r)) => { + assert_eq!(r.inner.values, vec![vec![1u8, 2, 3], vec![4, 5]]); + assert_eq!(r.inner.flag, Some(true)); + eprintln!(" PASS: echo_nested_response.msgpack"); + pass += 1; + } + Ok(_) => { eprintln!(" FAIL: echo_nested_response.msgpack: wrong variant"); fail += 1; } + Err(e) => { eprintln!(" FAIL: echo_nested_response.msgpack: {e}"); fail += 1; } + } + + eprintln!("\nResults: {pass}/{} passed, {fail} failed", pass + fail); + if fail > 0 { std::process::exit(1); } +} + +fn check_request(dir: &str, name: &str) -> Result { + let path = format!("{dir}/{name}"); + let data = fs::read(&path).map_err(|e| format!("read {path}: {e}"))?; + // Request format: [Command] — deserialized as Vec + let commands: Vec = rmp_serde::from_slice(&data) + .map_err(|e| format!("deserialize: {e}"))?; + let command = commands.into_iter().next().ok_or("empty")?; + // Extract the specific variant + // We need to serialize the inner value back to msgpack and then deserialize as T + let inner_bytes = match command { + Command::EchoBytes(v) => rmp_serde::to_vec_named(&v).unwrap(), + Command::EchoFields(v) => rmp_serde::to_vec_named(&v).unwrap(), + Command::EchoNested(v) => rmp_serde::to_vec_named(&v).unwrap(), + Command::EchoShutdown(v) => rmp_serde::to_vec_named(&v).unwrap(), + }; + rmp_serde::from_slice(&inner_bytes).map_err(|e| format!("re-deserialize: {e}")) +} + +fn check_response(dir: &str, name: &str) -> Result { + let path = format!("{dir}/{name}"); + let data = fs::read(&path).map_err(|e| format!("read {path}: {e}"))?; + rmp_serde::from_slice(&data).map_err(|e| format!("deserialize: {e}")) +} diff --git a/service-examples/rust/echo/src/echo_client.rs b/service-examples/rust/echo/src/echo_client.rs new file mode 100644 index 000000000000..31928ce5c106 --- /dev/null +++ b/service-examples/rust/echo/src/echo_client.rs @@ -0,0 +1,47 @@ +//! Echo IPC client — uses GENERATED typed client (EchoApi) + UDS backend. +//! Usage: echo_client --socket /tmp/echo.sock +//! Exits 0 on success, 1 on failure. + +use echo_wire_compat::generated::echo_client::EchoApi; +use echo_wire_compat::generated::echo_types::EchoInner; +use echo_wire_compat::generated::error::Result; +use echo_wire_compat::generated::uds_backend::UdsBackend; + +fn main() -> Result<()> { + let args: Vec = std::env::args().collect(); + let socket_path = args.iter() + .position(|a| a == "--socket") + .and_then(|i| args.get(i + 1)) + .expect("Usage: echo_client --socket "); + + let backend = UdsBackend::connect(socket_path)?; + let mut client = EchoApi::new(backend); + + // Test 1: EchoBytes + let test_data = vec![0xDE, 0xAD, 0xBE, 0xEF, 0x42]; + let resp = client.bytes(&test_data)?; + assert_eq!(resp.data, test_data, "EchoBytes data mismatch"); + eprintln!("echo_client(rust): EchoBytes OK"); + + // Test 2: EchoFields + let resp = client.fields(42, 999999, "hello wire compat".to_string())?; + assert_eq!(resp.a, 42); + assert_eq!(resp.b, 999999); + assert_eq!(resp.name, "hello wire compat"); + eprintln!("echo_client(rust): EchoFields OK"); + + // Test 3: EchoNested + let inner = EchoInner { + values: vec![vec![1, 2, 3], vec![4, 5]], + flag: Some(true), + }; + let resp = client.nested(inner.clone())?; + assert_eq!(resp.inner.values, inner.values); + assert_eq!(resp.inner.flag, inner.flag); + eprintln!("echo_client(rust): EchoNested OK"); + + // Shutdown + client.shutdown()?; + eprintln!("echo_client(rust): all tests passed"); + Ok(()) +} diff --git a/service-examples/rust/echo/src/echo_server.rs b/service-examples/rust/echo/src/echo_server.rs new file mode 100644 index 000000000000..0d63b0d54820 --- /dev/null +++ b/service-examples/rust/echo/src/echo_server.rs @@ -0,0 +1,71 @@ +//! Echo IPC server — uses GENERATED dispatch + server template + types. +//! Usage: echo_server --socket /tmp/echo.sock + +use echo_wire_compat::generated::echo_server::Handler; +use echo_wire_compat::generated::echo_types::*; +use echo_wire_compat::generated::error::{EchoError, Result}; +use echo_wire_compat::generated::ipc_server; +use std::cell::RefCell; + +struct EchoHandler; + +impl Handler for EchoHandler { + fn bytes(&mut self, cmd: EchoBytes) -> Result { + Ok(EchoBytesResponse { data: cmd.data }) + } + fn fields(&mut self, cmd: EchoFields) -> Result { + Ok(EchoFieldsResponse { a: cmd.a, b: cmd.b, name: cmd.name }) + } + fn nested(&mut self, cmd: EchoNested) -> Result { + Ok(EchoNestedResponse { inner: cmd.inner }) + } +} + +fn main() -> Result<()> { + let args: Vec = std::env::args().collect(); + let socket_path = args.iter() + .position(|a| a == "--socket") + .and_then(|i| args.get(i + 1)) + .expect("Usage: echo_server --socket "); + + let _ = std::fs::remove_file(socket_path); + + // Wrap handler in RefCell so the Fn closure can borrow mutably. + let handler = RefCell::new(EchoHandler); + + ipc_server::serve(socket_path, |payload: &[u8]| { + // Deserialize: [Command] + let request: Vec = rmp_serde::from_slice(payload) + .unwrap_or_default(); + + let command = match request.into_iter().next() { + Some(cmd) => cmd, + None => { + let err = Response::EchoErrorResponse(EchoErrorResponse { + message: "empty request".to_string(), + }); + return rmp_serde::to_vec_named(&err).unwrap_or_default(); + } + }; + + // Check for shutdown before dispatch + let is_shutdown = matches!(&command, Command::EchoShutdown(_)); + + let response = match echo_wire_compat::generated::echo_server::dispatch( + &mut *handler.borrow_mut(), command + ) { + Ok(resp) => resp, + Err(_e) => { + if is_shutdown { + Response::EchoShutdownResponse(EchoShutdownResponse {}) + } else { + Response::EchoErrorResponse(EchoErrorResponse { + message: _e.to_string(), + }) + } + } + }; + + rmp_serde::to_vec_named(&response).unwrap_or_default() + }).map_err(|e| EchoError::Io(e)) +} diff --git a/barretenberg/rust/barretenberg-rs/src/backend.rs b/service-examples/rust/echo/src/generated/backend.rs similarity index 100% rename from barretenberg/rust/barretenberg-rs/src/backend.rs rename to service-examples/rust/echo/src/generated/backend.rs diff --git a/service-examples/rust/echo/src/generated/echo_client.rs b/service-examples/rust/echo/src/generated/echo_client.rs new file mode 100644 index 000000000000..99307068d804 --- /dev/null +++ b/service-examples/rust/echo/src/generated/echo_client.rs @@ -0,0 +1,84 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Echo IPC client API + +use crate::backend::Backend; +use crate::error::{EchoError, Result}; +use crate::types_gen::*; + +/// Echo IPC client API +pub struct EchoApi { + backend: B, +} + +impl EchoApi { + /// Create API with custom backend + pub fn new(backend: B) -> Self { + Self { backend } + } + + fn execute(&mut self, command: Command) -> Result { + let input_buffer = rmp_serde::to_vec_named(&vec![command]) + .map_err(|e| EchoError::Serialization(e.to_string()))?; + + let output_buffer = self.backend.call(&input_buffer)?; + + let response: Response = rmp_serde::from_slice(&output_buffer) + .map_err(|e| EchoError::Deserialization(e.to_string()))?; + + Ok(response) + } + + /// Execute EchoBytes + pub fn bytes(&mut self, data: &[u8]) -> Result { + let cmd = Command::EchoBytes(EchoBytes::new(data.to_vec())); + match self.execute(cmd)? { + Response::EchoBytesResponse(resp) => Ok(resp), + Response::EchoErrorResponse(err) => Err(EchoError::Backend( + err.message + )), + _ => Err(EchoError::InvalidResponse( + "Expected EchoBytesResponse".to_string() + )), + } + } + + /// Execute EchoFields + pub fn fields(&mut self, a: u32, b: u64, name: String) -> Result { + let cmd = Command::EchoFields(EchoFields::new(a, b, name)); + match self.execute(cmd)? { + Response::EchoFieldsResponse(resp) => Ok(resp), + Response::EchoErrorResponse(err) => Err(EchoError::Backend( + err.message + )), + _ => Err(EchoError::InvalidResponse( + "Expected EchoFieldsResponse".to_string() + )), + } + } + + /// Execute EchoNested + pub fn nested(&mut self, inner: EchoInner) -> Result { + let cmd = Command::EchoNested(EchoNested::new(inner)); + match self.execute(cmd)? { + Response::EchoNestedResponse(resp) => Ok(resp), + Response::EchoErrorResponse(err) => Err(EchoError::Backend( + err.message + )), + _ => Err(EchoError::InvalidResponse( + "Expected EchoNestedResponse".to_string() + )), + } + } + + /// Shutdown backend gracefully + pub fn shutdown(&mut self) -> Result<()> { + let cmd = Command::EchoShutdown(EchoShutdown::new()); + let _ = self.execute(cmd)?; + self.backend.destroy() + } + + /// Destroy backend without shutdown command + pub fn destroy(&mut self) -> Result<()> { + self.backend.destroy() + } +} diff --git a/service-examples/rust/echo/src/generated/echo_server.rs b/service-examples/rust/echo/src/generated/echo_server.rs new file mode 100644 index 000000000000..0a1c848bdc1d --- /dev/null +++ b/service-examples/rust/echo/src/generated/echo_server.rs @@ -0,0 +1,40 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Server-side dispatch for Echo IPC protocol + +use crate::error::{EchoError, Result}; +use crate::types_gen::*; + +/// Handler trait — implement this to serve Echo commands. +pub trait Handler { + fn bytes(&mut self, cmd: EchoBytes) -> Result; + fn fields(&mut self, cmd: EchoFields) -> Result; + fn nested(&mut self, cmd: EchoNested) -> Result; +} + +/// Dispatch a single command to the handler and return the response. +pub fn dispatch(handler: &mut dyn Handler, command: Command) -> Result { + let response = match command { + Command::EchoBytes(cmd) => { + match handler.bytes(cmd) { + Ok(resp) => Response::EchoBytesResponse(resp), + Err(e) => Response::EchoErrorResponse(EchoErrorResponse { message: e.to_string() }), + } + } + Command::EchoFields(cmd) => { + match handler.fields(cmd) { + Ok(resp) => Response::EchoFieldsResponse(resp), + Err(e) => Response::EchoErrorResponse(EchoErrorResponse { message: e.to_string() }), + } + } + Command::EchoNested(cmd) => { + match handler.nested(cmd) { + Ok(resp) => Response::EchoNestedResponse(resp), + Err(e) => Response::EchoErrorResponse(EchoErrorResponse { message: e.to_string() }), + } + } + Command::EchoShutdown(_) => { + return Err(EchoError::Backend("shutdown requested".to_string())); + } + }; + Ok(response) +} diff --git a/service-examples/rust/echo/src/generated/echo_types.rs b/service-examples/rust/echo/src/generated/echo_types.rs new file mode 100644 index 000000000000..72530f1e7ab4 --- /dev/null +++ b/service-examples/rust/echo/src/generated/echo_types.rs @@ -0,0 +1,401 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Generated types for Echo IPC protocol + +use serde::{Deserialize, Serialize}; + +/// Schema version hash for compatibility checking +pub const SCHEMA_HASH: &str = "bb6458c4c159270c9a0e50ec8ad88d1e1c93271550542c7ab148e96adb6460cc"; + +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated, no heap. +/// Serializes as msgpack bin32 on the wire. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Fr(pub [u8; 32]); + +impl Fr { + pub fn from_bytes(bytes: [u8; 32]) -> Self { Self(bytes) } + pub fn to_bytes(&self) -> &[u8; 32] { &self.0 } + pub fn as_slice(&self) -> &[u8] { &self.0 } +} + +impl Serialize for Fr { + fn serialize(&self, serializer: S) -> Result + where S: serde::Serializer { + serializer.serialize_bytes(&self.0) + } +} + +impl<'de> Deserialize<'de> for Fr { + fn deserialize(deserializer: D) -> Result + where D: serde::Deserializer<'de> { + let bytes: Vec = >::deserialize(deserializer)?; + let arr: [u8; 32] = bytes.try_into() + .map_err(|v: Vec| serde::de::Error::invalid_length(v.len(), &"32 bytes"))?; + Ok(Fr(arr)) + } +} + +mod serde_bytes { + use serde::{Deserialize, Deserializer, Serializer}; + pub fn serialize(bytes: &Vec, serializer: S) -> Result + where S: Serializer { serializer.serialize_bytes(bytes) } + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where D: Deserializer<'de> { >::deserialize(deserializer) } +} + +mod serde_vec_bytes { + use serde::{Deserialize, Deserializer, Serializer, Serialize}; + use serde::ser::SerializeSeq; + use serde::de::{SeqAccess, Visitor}; + + #[derive(Serialize, Deserialize)] + struct BytesWrapper(#[serde(with = "super::serde_bytes")] Vec); + + pub fn serialize(vec: &Vec>, serializer: S) -> Result + where S: Serializer { + let mut seq = serializer.serialize_seq(Some(vec.len()))?; + for bytes in vec { + seq.serialize_element(&BytesWrapper(bytes.clone()))?; + } + seq.end() + } + pub fn deserialize<'de, D>(deserializer: D) -> Result>, D::Error> + where D: Deserializer<'de> { + struct VecVecU8Visitor; + impl<'de> Visitor<'de> for VecVecU8Visitor { + type Value = Vec>; + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + formatter.write_str("a sequence of byte arrays") + } + fn visit_seq(self, mut seq: A) -> Result + where A: SeqAccess<'de> { + let mut vec = Vec::new(); + while let Some(wrapper) = seq.next_element::()? { + vec.push(wrapper.0); + } + Ok(vec) + } + } + deserializer.deserialize_seq(VecVecU8Visitor) + } +} + +mod serde_array4_bytes { + use serde::{Deserialize, Deserializer, Serialize, Serializer}; + use serde::ser::SerializeTuple; + use serde::de::{SeqAccess, Visitor}; + + #[derive(Serialize, Deserialize)] + struct BytesWrapper(#[serde(with = "super::serde_bytes")] Vec); + + pub fn serialize(arr: &[Vec; 4], serializer: S) -> Result + where S: Serializer { + let mut tup = serializer.serialize_tuple(4)?; + for bytes in arr { + tup.serialize_element(&BytesWrapper(bytes.clone()))?; + } + tup.end() + } + pub fn deserialize<'de, D>(deserializer: D) -> Result<[Vec; 4], D::Error> + where D: Deserializer<'de> { + struct Array4Visitor; + impl<'de> Visitor<'de> for Array4Visitor { + type Value = [Vec; 4]; + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + formatter.write_str("an array of 4 byte arrays") + } + fn visit_seq(self, mut seq: A) -> Result + where A: SeqAccess<'de> { + let mut arr: [Vec; 4] = Default::default(); + for (i, item) in arr.iter_mut().enumerate() { + *item = seq.next_element::()? + .ok_or_else(|| serde::de::Error::invalid_length(i, &self))?.0; + } + Ok(arr) + } + } + deserializer.deserialize_tuple(4, Array4Visitor) + } +} + +/// EchoInner +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoInner { + #[serde(with = "serde_vec_bytes")] + pub values: Vec>, + pub flag: Option, +} + +/// EchoBytes +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoBytes { + #[serde(rename = "__typename", skip, default)] + pub type_name: String, + #[serde(with = "serde_bytes")] + pub data: Vec, +} + +impl EchoBytes { + pub fn new(data: Vec) -> Self { + Self { + type_name: "EchoBytes".to_string(), + data, + } + } +} + +/// EchoFields +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoFields { + #[serde(rename = "__typename", skip, default)] + pub type_name: String, + pub a: u32, + pub b: u64, + pub name: String, +} + +impl EchoFields { + pub fn new(a: u32, b: u64, name: String) -> Self { + Self { + type_name: "EchoFields".to_string(), + a, + b, + name, + } + } +} + +/// EchoNested +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoNested { + #[serde(rename = "__typename", skip, default)] + pub type_name: String, + pub inner: EchoInner, +} + +impl EchoNested { + pub fn new(inner: EchoInner) -> Self { + Self { + type_name: "EchoNested".to_string(), + inner, + } + } +} + +/// EchoShutdown +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoShutdown { + #[serde(rename = "__typename", skip, default)] + pub type_name: String, + +} + +impl EchoShutdown { + pub fn new() -> Self { + Self { + type_name: "EchoShutdown".to_string(), + } + } +} + +/// EchoBytesResponse +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoBytesResponse { + #[serde(with = "serde_bytes")] + pub data: Vec, +} + +/// EchoFieldsResponse +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoFieldsResponse { + pub a: u32, + pub b: u64, + pub name: String, +} + +/// EchoNestedResponse +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoNestedResponse { + pub inner: EchoInner, +} + +/// EchoShutdownResponse +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoShutdownResponse { + +} + +/// EchoErrorResponse +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct EchoErrorResponse { + pub message: String, +} + +/// Command enum - wraps all possible commands +#[derive(Debug, Clone)] +pub enum Command { + EchoBytes(EchoBytes), + EchoFields(EchoFields), + EchoNested(EchoNested), + EchoShutdown(EchoShutdown), +} + +impl Serialize for Command { + fn serialize(&self, serializer: S) -> Result + where S: serde::Serializer { + use serde::ser::SerializeTuple; + let mut tuple = serializer.serialize_tuple(2)?; + match self { + Command::EchoBytes(data) => { + tuple.serialize_element("EchoBytes")?; + tuple.serialize_element(data)?; + } + Command::EchoFields(data) => { + tuple.serialize_element("EchoFields")?; + tuple.serialize_element(data)?; + } + Command::EchoNested(data) => { + tuple.serialize_element("EchoNested")?; + tuple.serialize_element(data)?; + } + Command::EchoShutdown(data) => { + tuple.serialize_element("EchoShutdown")?; + tuple.serialize_element(data)?; + } + } + tuple.end() + } +} + +impl<'de> Deserialize<'de> for Command { + fn deserialize(deserializer: D) -> Result + where D: serde::Deserializer<'de> { + use serde::de::{SeqAccess, Visitor}; + struct CommandVisitor; + + impl<'de> Visitor<'de> for CommandVisitor { + type Value = Command; + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + formatter.write_str("a 2-element array [name, payload]") + } + fn visit_seq(self, mut seq: A) -> Result + where A: SeqAccess<'de> { + let name: String = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(0, &self))?; + match name.as_str() { + "EchoBytes" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Command::EchoBytes(data)) + } + "EchoFields" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Command::EchoFields(data)) + } + "EchoNested" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Command::EchoNested(data)) + } + "EchoShutdown" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Command::EchoShutdown(data)) + } + _ => Err(serde::de::Error::unknown_variant(&name, &["EchoBytes", "EchoFields", "EchoNested", "EchoShutdown"])), + } + } + } + deserializer.deserialize_tuple(2, CommandVisitor) + } +} + +/// Response enum - wraps all possible responses +#[derive(Debug, Clone)] +pub enum Response { + EchoBytesResponse(EchoBytesResponse), + EchoFieldsResponse(EchoFieldsResponse), + EchoNestedResponse(EchoNestedResponse), + EchoShutdownResponse(EchoShutdownResponse), + EchoErrorResponse(EchoErrorResponse), +} + +impl Serialize for Response { + fn serialize(&self, serializer: S) -> Result + where S: serde::Serializer { + use serde::ser::SerializeTuple; + let mut tuple = serializer.serialize_tuple(2)?; + match self { + Response::EchoBytesResponse(data) => { + tuple.serialize_element("EchoBytesResponse")?; + tuple.serialize_element(data)?; + } + Response::EchoFieldsResponse(data) => { + tuple.serialize_element("EchoFieldsResponse")?; + tuple.serialize_element(data)?; + } + Response::EchoNestedResponse(data) => { + tuple.serialize_element("EchoNestedResponse")?; + tuple.serialize_element(data)?; + } + Response::EchoShutdownResponse(data) => { + tuple.serialize_element("EchoShutdownResponse")?; + tuple.serialize_element(data)?; + } + Response::EchoErrorResponse(data) => { + tuple.serialize_element("EchoErrorResponse")?; + tuple.serialize_element(data)?; + } + } + tuple.end() + } +} + +impl<'de> Deserialize<'de> for Response { + fn deserialize(deserializer: D) -> Result + where D: serde::Deserializer<'de> { + use serde::de::{SeqAccess, Visitor}; + struct ResponseVisitor; + + impl<'de> Visitor<'de> for ResponseVisitor { + type Value = Response; + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + formatter.write_str("a 2-element array [name, payload]") + } + fn visit_seq(self, mut seq: A) -> Result + where A: SeqAccess<'de> { + let name: String = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(0, &self))?; + match name.as_str() { + "EchoBytesResponse" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Response::EchoBytesResponse(data)) + } + "EchoFieldsResponse" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Response::EchoFieldsResponse(data)) + } + "EchoNestedResponse" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Response::EchoNestedResponse(data)) + } + "EchoShutdownResponse" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Response::EchoShutdownResponse(data)) + } + "EchoErrorResponse" => { + let data = seq.next_element()? + .ok_or_else(|| serde::de::Error::invalid_length(1, &self))?; + Ok(Response::EchoErrorResponse(data)) + } + _ => Err(serde::de::Error::unknown_variant(&name, &["EchoBytesResponse", "EchoFieldsResponse", "EchoNestedResponse", "EchoShutdownResponse", "EchoErrorResponse"])), + } + } + } + deserializer.deserialize_tuple(2, ResponseVisitor) + } +} diff --git a/service-examples/rust/echo/src/generated/error.rs b/service-examples/rust/echo/src/generated/error.rs new file mode 100644 index 000000000000..f70fa5e89612 --- /dev/null +++ b/service-examples/rust/echo/src/generated/error.rs @@ -0,0 +1,35 @@ +//! Error types for Barretenberg operations + +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum BarretenbergError { + #[error("Serialization error: {0}")] + Serialization(String), + + #[error("Deserialization error: {0}")] + Deserialization(String), + + #[error("Backend error: {0}")] + Backend(String), + + #[error("IPC error: {0}")] + Ipc(String), + + #[error("IO error: {0}")] + Io(#[from] std::io::Error), + + #[error("Invalid response: {0}")] + InvalidResponse(String), + + #[error("Connection error: {0}")] + Connection(String), + + #[error("WASM error: {0}")] + Wasm(String), +} + +pub type Result = std::result::Result; + +// Alias for codegen compatibility — generated server/client code uses EchoError +pub type EchoError = BarretenbergError; diff --git a/service-examples/rust/echo/src/generated/ipc_server.rs b/service-examples/rust/echo/src/generated/ipc_server.rs new file mode 100644 index 000000000000..cfce19cbc26a --- /dev/null +++ b/service-examples/rust/echo/src/generated/ipc_server.rs @@ -0,0 +1,51 @@ +//! Generic IPC server over Unix Domain Sockets. +//! Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. +//! Service-specific dispatch is injected via the dispatch function parameter. + +use std::io::{Read, Write}; +use std::os::unix::net::UnixListener; + +/// Dispatch function signature: takes raw command name + msgpack bytes, returns response name + bytes +pub type DispatchFn = Box Vec>; + +/// Run an IPC server. Accepts one connection, serves until disconnect or shutdown. +pub fn serve(socket_path: &str, handler: impl Fn(&[u8]) -> Vec) -> std::io::Result<()> { + let _ = std::fs::remove_file(socket_path); + let listener = UnixListener::bind(socket_path)?; + eprintln!("ipc-server(rust): listening on {}", socket_path); + + let (mut stream, _) = listener.accept()?; + + loop { + // Read 4-byte LE length + let mut len_buf = [0u8; 4]; + if stream.read_exact(&mut len_buf).is_err() { + break; + } + let len = u32::from_le_bytes(len_buf) as usize; + + // Read payload + let mut payload = vec![0u8; len]; + stream.read_exact(&mut payload)?; + + // Check for shutdown + let is_shutdown = payload.windows(8).any(|w| w == b"Shutdown"); + + // Dispatch + let response = handler(&payload); + + // Send length-prefixed response + let resp_len = (response.len() as u32).to_le_bytes(); + stream.write_all(&resp_len)?; + stream.write_all(&response)?; + stream.flush()?; + + if is_shutdown { + break; + } + } + + let _ = std::fs::remove_file(socket_path); + eprintln!("ipc-server(rust): shutdown"); + Ok(()) +} diff --git a/service-examples/rust/echo/src/generated/uds_backend.rs b/service-examples/rust/echo/src/generated/uds_backend.rs new file mode 100644 index 000000000000..a524391cd687 --- /dev/null +++ b/service-examples/rust/echo/src/generated/uds_backend.rs @@ -0,0 +1,78 @@ +//! UDS (Unix Domain Socket) backend for Barretenberg +//! +//! Connects to a running BB server over a Unix domain socket, +//! using the standard 4-byte LE length-prefixed msgpack protocol. +//! Same wire format as C++/TS/Zig IPC clients. + +use super::backend::Backend; +use super::error::{BarretenbergError, Result}; +use std::io::{Read, Write}; +use std::os::unix::net::UnixStream; +use std::path::Path; + +/// UDS backend — connects to a BB server over Unix domain socket. +pub struct UdsBackend { + stream: UnixStream, +} + +impl UdsBackend { + /// Connect to a BB server at the given socket path. + /// + /// # Arguments + /// * `socket_path` - Path to the Unix domain socket (e.g. "/tmp/bb.sock") + pub fn connect(socket_path: impl AsRef) -> Result { + let stream = UnixStream::connect(socket_path.as_ref()).map_err(|e| { + BarretenbergError::Ipc(format!( + "Failed to connect to {}: {}", + socket_path.as_ref().display(), + e + )) + })?; + Ok(Self { stream }) + } + + fn send_with_prefix(&mut self, data: &[u8]) -> Result<()> { + let len = data.len() as u32; + self.stream + .write_all(&len.to_le_bytes()) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to write length: {}", e)))?; + self.stream + .write_all(data) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to write data: {}", e)))?; + self.stream + .flush() + .map_err(|e| BarretenbergError::Ipc(format!("Failed to flush: {}", e)))?; + Ok(()) + } + + fn receive_with_prefix(&mut self) -> Result> { + let mut len_buf = [0u8; 4]; + self.stream + .read_exact(&mut len_buf) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to read length: {}", e)))?; + let len = u32::from_le_bytes(len_buf) as usize; + let mut data = vec![0u8; len]; + self.stream + .read_exact(&mut data) + .map_err(|e| BarretenbergError::Ipc(format!("Failed to read data: {}", e)))?; + Ok(data) + } +} + +impl Backend for UdsBackend { + fn call(&mut self, input: &[u8]) -> Result> { + self.send_with_prefix(input)?; + self.receive_with_prefix() + } + + fn destroy(&mut self) -> Result<()> { + let _ = self.stream.shutdown(std::net::Shutdown::Both); + Ok(()) + } +} + +impl Drop for UdsBackend { + fn drop(&mut self) { + let _ = self.destroy(); + } +} diff --git a/service-examples/rust/echo/src/lib.rs b/service-examples/rust/echo/src/lib.rs new file mode 100644 index 000000000000..1fae1aba7198 --- /dev/null +++ b/service-examples/rust/echo/src/lib.rs @@ -0,0 +1,16 @@ +// Generated modules live in src/generated/ +pub mod generated { + pub mod echo_types; + pub mod echo_server; + pub mod echo_client; + pub mod backend; + pub mod error; + pub mod ipc_server; + pub mod uds_backend; +} + +// Re-export under the names that generated server/client code expects +// (they use `crate::types_gen`, `crate::error`, `crate::backend`) +pub use generated::echo_types as types_gen; +pub use generated::error; +pub use generated::backend; diff --git a/service-examples/rust/echo/target/.rustc_info.json b/service-examples/rust/echo/target/.rustc_info.json new file mode 100644 index 000000000000..80ee218c04b2 --- /dev/null +++ b/service-examples/rust/echo/target/.rustc_info.json @@ -0,0 +1 @@ +{"rustc_fingerprint":16384717173431420846,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.85.0 (4d91de4e4 2025-02-17)\nbinary: rustc\ncommit-hash: 4d91de4e48198da2e33413efdcd9cd2cc0c46688\ncommit-date: 2025-02-17\nhost: x86_64-unknown-linux-gnu\nrelease: 1.85.0\nLLVM version: 19.1.7\n","stderr":""},"13331785392996375709":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/opt/rust/rustup/toolchains/1.85.0-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/service-examples/rust/echo/target/CACHEDIR.TAG b/service-examples/rust/echo/target/CACHEDIR.TAG new file mode 100644 index 000000000000..20d7c319cda9 --- /dev/null +++ b/service-examples/rust/echo/target/CACHEDIR.TAG @@ -0,0 +1,3 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by cargo. +# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/service-examples/rust/echo/target/debug/.cargo-lock b/service-examples/rust/echo/target/debug/.cargo-lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/dep-lib-autocfg b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/dep-lib-autocfg new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/dep-lib-autocfg differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg new file mode 100644 index 000000000000..8265eb45adaa --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg @@ -0,0 +1 @@ +b36cfc472edca16b \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg.json b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg.json new file mode 100644 index 000000000000..da24dc28018a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/autocfg-b2e0182c95f197a6/lib-autocfg.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":6962977057026645649,"profile":2225463790103693989,"path":639142995810166220,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/autocfg-b2e0182c95f197a6/dep-lib-autocfg","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/dep-lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/dep-lib-echo_wire_compat new file mode 100644 index 000000000000..b8a81d730674 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/dep-lib-echo_wire_compat differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat new file mode 100644 index 000000000000..ad393c25d241 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat @@ -0,0 +1 @@ +85edb7468d3a81bf \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat.json new file mode 100644 index 000000000000..9bbdb4273b1a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/lib-echo_wire_compat.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":9153811035713815181,"profile":17672942494452627365,"path":10763286916239946207,"deps":[[8008191657135824715,"thiserror",false,7415303072064615090],[13548984313718623784,"serde",false,1286157859315972290],[18016425402093879400,"rmp_serde",false,16699525113905229299]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/dep-lib-echo_wire_compat","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/output-lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/output-lib-echo_wire_compat new file mode 100644 index 000000000000..626492a2baf4 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-11bab1a30b39b38c/output-lib-echo_wire_compat @@ -0,0 +1,3 @@ +{"$message_type":"diagnostic","message":"function `serialize` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/generated_types.rs","byte_start":2175,"byte_end":2184,"line_start":59,"line_end":59,"column_start":12,"column_end":21,"is_primary":true,"text":[{"text":" pub fn serialize(arr: &[Vec; 4], serializer: S) -> Result","highlight_start":12,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `serialize` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/generated_types.rs:59:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m59\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn serialize(arr: &[Vec; 4], serializer: S) -> Result\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"function `deserialize` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/generated_types.rs","byte_start":2468,"byte_end":2479,"line_start":67,"line_end":67,"column_start":12,"column_end":23,"is_primary":true,"text":[{"text":" pub fn deserialize<'de, D>(deserializer: D) -> Result<[Vec; 4], D::Error>","highlight_start":12,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `deserialize` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/generated_types.rs:67:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m67\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn deserialize<'de, D>(deserializer: D) -> Result<[Vec; 4], D::Error>\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client new file mode 100644 index 000000000000..b00c77076807 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client @@ -0,0 +1 @@ +646c15d6bafa8ee5 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client.json new file mode 100644 index 000000000000..775fddf96c45 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/bin-echo_client.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":17977111269688031250,"profile":8731458305071235362,"path":8567133690664829607,"deps":[[7758124070069613978,"echo_wire_compat",false,13473775980129260516],[8008191657135824715,"thiserror",false,4496675665447254951],[13548984313718623784,"serde",false,1484917311612796336],[18016425402093879400,"rmp_serde",false,3557982676238429699]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/dep-bin-echo_client","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/dep-bin-echo_client b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/dep-bin-echo_client new file mode 100644 index 000000000000..dc5dd4bb5bce Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/dep-bin-echo_client differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-12557bf4d1de6ce8/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/dep-lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/dep-lib-echo_wire_compat new file mode 100644 index 000000000000..8accb0005be7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/dep-lib-echo_wire_compat differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat new file mode 100644 index 000000000000..869fed7b6a22 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat @@ -0,0 +1 @@ +e493cbe6dd77fcba \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat.json new file mode 100644 index 000000000000..6e08fb75b87f --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/lib-echo_wire_compat.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":9153811035713815181,"profile":8731458305071235362,"path":10763286916239946207,"deps":[[8008191657135824715,"thiserror",false,4496675665447254951],[13548984313718623784,"serde",false,1484917311612796336],[18016425402093879400,"rmp_serde",false,3557982676238429699]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-37075038126d203b/dep-lib-echo_wire_compat","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/output-lib-echo_wire_compat b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/output-lib-echo_wire_compat new file mode 100644 index 000000000000..ade31aae7bb2 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-37075038126d203b/output-lib-echo_wire_compat @@ -0,0 +1,3 @@ +{"$message_type":"diagnostic","message":"function `serialize` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/generated/echo_types.rs","byte_start":3242,"byte_end":3251,"line_start":90,"line_end":90,"column_start":12,"column_end":21,"is_primary":true,"text":[{"text":" pub fn serialize(arr: &[Vec; 4], serializer: S) -> Result","highlight_start":12,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `serialize` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/generated/echo_types.rs:90:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m90\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn serialize(arr: &[Vec; 4], serializer: S) -> Result\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"function `deserialize` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/generated/echo_types.rs","byte_start":3535,"byte_end":3546,"line_start":98,"line_end":98,"column_start":12,"column_end":23,"is_primary":true,"text":[{"text":" pub fn deserialize<'de, D>(deserializer: D) -> Result<[Vec; 4], D::Error>","highlight_start":12,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `deserialize` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/generated/echo_types.rs:98:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m98\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn deserialize<'de, D>(deserializer: D) -> Result<[Vec; 4], D::Error>\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\n\n"} +{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden new file mode 100644 index 000000000000..77aff2be5686 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden @@ -0,0 +1 @@ +516aa8c1f3559390 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden.json new file mode 100644 index 000000000000..4d8bac41bf7f --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/bin-generate_golden.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":3722045569835064029,"profile":8731458305071235362,"path":2719996617365979451,"deps":[[7758124070069613978,"echo_wire_compat",false,13473775980129260516],[8008191657135824715,"thiserror",false,4496675665447254951],[13548984313718623784,"serde",false,1484917311612796336],[18016425402093879400,"rmp_serde",false,3557982676238429699]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-736c3286d40075dd/dep-bin-generate_golden","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/dep-bin-generate_golden b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/dep-bin-generate_golden new file mode 100644 index 000000000000..d9a479cd76ac Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/dep-bin-generate_golden differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-736c3286d40075dd/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client new file mode 100644 index 000000000000..a85927541518 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client @@ -0,0 +1 @@ +298da41f5e620d1d \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client.json new file mode 100644 index 000000000000..54ab06a593a7 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/bin-echo_client.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":17977111269688031250,"profile":17672942494452627365,"path":8567133690664829607,"deps":[[7758124070069613978,"echo_wire_compat",false,13799375111691169157],[8008191657135824715,"thiserror",false,7415303072064615090],[13548984313718623784,"serde",false,1286157859315972290],[18016425402093879400,"rmp_serde",false,16699525113905229299]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-cb292818c4837e46/dep-bin-echo_client","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/dep-bin-echo_client b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/dep-bin-echo_client new file mode 100644 index 000000000000..dc5dd4bb5bce Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/dep-bin-echo_client differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-cb292818c4837e46/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server new file mode 100644 index 000000000000..6adea30918e0 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server @@ -0,0 +1 @@ +9ce84ee82835426a \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server.json new file mode 100644 index 000000000000..6c883708f015 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/bin-echo_server.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":16239762799409858034,"profile":17672942494452627365,"path":890751331742694834,"deps":[[7758124070069613978,"echo_wire_compat",false,13799375111691169157],[8008191657135824715,"thiserror",false,7415303072064615090],[13548984313718623784,"serde",false,1286157859315972290],[18016425402093879400,"rmp_serde",false,16699525113905229299]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/dep-bin-echo_server","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/dep-bin-echo_server b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/dep-bin-echo_server new file mode 100644 index 000000000000..fd2471237aa1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/dep-bin-echo_server differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-ddb4e1542bce398f/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test new file mode 100644 index 000000000000..2ee1771b9a66 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test @@ -0,0 +1 @@ +8a301f0837e8696c \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test.json new file mode 100644 index 000000000000..62a70f21fef3 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/bin-golden_test.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":14383425604802180253,"profile":8731458305071235362,"path":11964719788086741806,"deps":[[7758124070069613978,"echo_wire_compat",false,13473775980129260516],[8008191657135824715,"thiserror",false,4496675665447254951],[13548984313718623784,"serde",false,1484917311612796336],[18016425402093879400,"rmp_serde",false,3557982676238429699]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/dep-bin-golden_test","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/dep-bin-golden_test b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/dep-bin-golden_test new file mode 100644 index 000000000000..350c69d70f9d Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/dep-bin-golden_test differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-de2cf77060ba7b08/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server new file mode 100644 index 000000000000..6d46e3cf63b4 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server @@ -0,0 +1 @@ +a08d248e0b9bfed5 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server.json b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server.json new file mode 100644 index 000000000000..cf98f057a5ae --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/bin-echo_server.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":16239762799409858034,"profile":8731458305071235362,"path":890751331742694834,"deps":[[7758124070069613978,"echo_wire_compat",false,13473775980129260516],[8008191657135824715,"thiserror",false,4496675665447254951],[13548984313718623784,"serde",false,1484917311612796336],[18016425402093879400,"rmp_serde",false,3557982676238429699]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/dep-bin-echo_server","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/dep-bin-echo_server b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/dep-bin-echo_server new file mode 100644 index 000000000000..fd2471237aa1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/dep-bin-echo_server differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/echo-wire-compat-e6bcb241412567b7/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build new file mode 100644 index 000000000000..8003754dfa7a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build @@ -0,0 +1 @@ +163ab80b440d3394 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build.json new file mode 100644 index 000000000000..7ab15093ed63 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"std\"]","declared_features":"[\"default\", \"i128\", \"libm\", \"std\"]","target":5408242616063297496,"profile":2225463790103693989,"path":18048926325326831625,"deps":[[13927012481677012980,"autocfg",false,7755722124643036339]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-0e8a62a1c5a0ece2/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/dep-lib-num_traits b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/dep-lib-num_traits new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/dep-lib-num_traits differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits new file mode 100644 index 000000000000..79beac864d83 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits @@ -0,0 +1 @@ +0da18ec4987afb79 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits.json b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits.json new file mode 100644 index 000000000000..32dee680aea3 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-6310f1ac860e1a9e/lib-num_traits.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"std\"]","declared_features":"[\"default\", \"i128\", \"libm\", \"std\"]","target":4278088450330190724,"profile":15657897354478470176,"path":15280923504030136701,"deps":[[5157631553186200874,"build_script_build",false,5800637217504952655]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/num-traits-6310f1ac860e1a9e/dep-lib-num_traits","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build new file mode 100644 index 000000000000..4e7fe3fea1d4 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build @@ -0,0 +1 @@ +4f014bf4d0008050 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build.json new file mode 100644 index 000000000000..94c060375a7a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-7ac911e9e5502fe3/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[5157631553186200874,"build_script_build",false,10678893727331138070]],"local":[{"RerunIfChanged":{"output":"debug/build/num-traits-7ac911e9e5502fe3/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/dep-lib-num_traits b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/dep-lib-num_traits new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/dep-lib-num_traits differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits new file mode 100644 index 000000000000..7c02cc244329 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits @@ -0,0 +1 @@ +2f4fce9fd4e61a8b \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits.json b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits.json new file mode 100644 index 000000000000..c577a0192c0e --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/num-traits-c1b3868491c46c8e/lib-num_traits.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"std\"]","declared_features":"[\"default\", \"i128\", \"libm\", \"std\"]","target":4278088450330190724,"profile":2241668132362809309,"path":15280923504030136701,"deps":[[5157631553186200874,"build_script_build",false,5800637217504952655]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/num-traits-c1b3868491c46c8e/dep-lib-num_traits","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/dep-lib-proc_macro2 b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/dep-lib-proc_macro2 new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/dep-lib-proc_macro2 differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2 b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2 new file mode 100644 index 000000000000..ae2dfe80f64a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2 @@ -0,0 +1 @@ +26aa7bd17350376a \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2.json b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2.json new file mode 100644 index 000000000000..4265db3711de --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-16dfa973c0728e42/lib-proc_macro2.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":369203346396300798,"profile":2225463790103693989,"path":16375362041463075550,"deps":[[4289358735036141001,"build_script_build",false,8352227847295035344],[8901712065508858692,"unicode_ident",false,12981726819360963568]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-16dfa973c0728e42/dep-lib-proc_macro2","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build new file mode 100644 index 000000000000..4909fb6b04ed --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build @@ -0,0 +1 @@ +4bc863b525a41d3d \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build.json new file mode 100644 index 000000000000..c4ea0d695791 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":5408242616063297496,"profile":2225463790103693989,"path":419041829189908068,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-52ba0290d173a05a/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-52ba0290d173a05a/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build new file mode 100644 index 000000000000..c07eac831cd3 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build @@ -0,0 +1 @@ +d06725a1f912e973 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build.json new file mode 100644 index 000000000000..43c908f06ebb --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/proc-macro2-c4a37ec22c6fa35b/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[4289358735036141001,"build_script_build",false,4403856492502173771]],"local":[{"RerunIfChanged":{"output":"debug/build/proc-macro2-c4a37ec22c6fa35b/output","paths":["src/probe/proc_macro_span.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/dep-lib-quote b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/dep-lib-quote new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/dep-lib-quote differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote new file mode 100644 index 000000000000..f683161f610f --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote @@ -0,0 +1 @@ +89494053159fd74f \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote.json b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote.json new file mode 100644 index 000000000000..ca92b223656e --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-57ed189e95422886/lib-quote.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":8313845041260779044,"profile":2225463790103693989,"path":1207719732193100186,"deps":[[4289358735036141001,"proc_macro2",false,7653674550105451046],[13111758008314797071,"build_script_build",false,14884864514990912708]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-57ed189e95422886/dep-lib-quote","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build new file mode 100644 index 000000000000..fc443f348cd5 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build @@ -0,0 +1 @@ +c4b4d9b969a991ce \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build.json new file mode 100644 index 000000000000..f46fd3b7e619 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-bd634d9c8c826502/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[13111758008314797071,"build_script_build",false,5572935802016015150]],"local":[{"RerunIfChanged":{"output":"debug/build/quote-bd634d9c8c826502/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build new file mode 100644 index 000000000000..42f15c20ef49 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build @@ -0,0 +1 @@ +2ea338d3950b574d \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build.json new file mode 100644 index 000000000000..9853e0d2ba40 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":5408242616063297496,"profile":2225463790103693989,"path":17245067335576813337,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-faa27da7098d5508/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/quote-faa27da7098d5508/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/dep-lib-rmp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/dep-lib-rmp new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/dep-lib-rmp differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp new file mode 100644 index 000000000000..287cec86ad51 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp @@ -0,0 +1 @@ +74f9d38968037286 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp.json b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp.json new file mode 100644 index 000000000000..d2af0ff5fd59 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-885eb6c2dfd189c0/lib-rmp.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":6516410200713787631,"profile":15657897354478470176,"path":18032890108415859835,"deps":[[5157631553186200874,"num_traits",false,8789753894294954253]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rmp-885eb6c2dfd189c0/dep-lib-rmp","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/dep-lib-rmp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/dep-lib-rmp new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/dep-lib-rmp differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp new file mode 100644 index 000000000000..4ce17dc98ff3 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp @@ -0,0 +1 @@ +c30148af75125e5f \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp.json b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp.json new file mode 100644 index 000000000000..c3d5a2f20bc3 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-beb0c7308ab837f1/lib-rmp.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":6516410200713787631,"profile":2241668132362809309,"path":18032890108415859835,"deps":[[5157631553186200874,"num_traits",false,10023577721555013423]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rmp-beb0c7308ab837f1/dep-lib-rmp","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/dep-lib-rmp_serde b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/dep-lib-rmp_serde new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/dep-lib-rmp_serde differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde new file mode 100644 index 000000000000..3ad1a3440735 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde @@ -0,0 +1 @@ +036e2f9e647e6031 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde.json b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde.json new file mode 100644 index 000000000000..29ff6725baf1 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-0c1d529588ec67af/lib-rmp_serde.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":194213231170220168,"profile":15657897354478470176,"path":8414273376697488932,"deps":[[7826430537256723020,"rmp",false,9687809495951210868],[13548984313718623784,"serde",false,1484917311612796336]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rmp-serde-0c1d529588ec67af/dep-lib-rmp_serde","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/dep-lib-rmp_serde b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/dep-lib-rmp_serde new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/dep-lib-rmp_serde differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde new file mode 100644 index 000000000000..49e4bb53274d --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde @@ -0,0 +1 @@ +f32d09fc9ca1c0e7 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde.json b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde.json new file mode 100644 index 000000000000..ef4655c72a7e --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/rmp-serde-6fba03b1b3d96439/lib-rmp_serde.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":194213231170220168,"profile":2241668132362809309,"path":8414273376697488932,"deps":[[7826430537256723020,"rmp",false,6871950378075161027],[13548984313718623784,"serde",false,1286157859315972290]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rmp-serde-6fba03b1b3d96439/dep-lib-rmp_serde","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build new file mode 100644 index 000000000000..67a3d747ddab --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build @@ -0,0 +1 @@ +075476c04f1cd67f \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build.json new file mode 100644 index 000000000000..36b40c345d46 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-073a7ef43ee78fab/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[13548984313718623784,"build_script_build",false,11751474001087917048]],"local":[{"RerunIfChanged":{"output":"debug/build/serde-073a7ef43ee78fab/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build new file mode 100644 index 000000000000..9346f6e38012 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build @@ -0,0 +1 @@ +f86b158e579f15a3 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build.json new file mode 100644 index 000000000000..fac3059c77f9 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"derive\", \"serde_derive\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"derive\", \"rc\", \"serde_derive\", \"std\", \"unstable\"]","target":5408242616063297496,"profile":2225463790103693989,"path":15821099767966626370,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde-26c1fa3d8cfe62ef/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-26c1fa3d8cfe62ef/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/dep-lib-serde b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/dep-lib-serde new file mode 100644 index 000000000000..e2b81f876f54 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/dep-lib-serde differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde new file mode 100644 index 000000000000..9a45547bd5b1 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde @@ -0,0 +1 @@ +c2f89a39c259d911 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde.json b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde.json new file mode 100644 index 000000000000..04cbcb889418 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-4162afa942240556/lib-serde.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"derive\", \"serde_derive\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"derive\", \"rc\", \"serde_derive\", \"std\", \"unstable\"]","target":11327258112168116673,"profile":2241668132362809309,"path":10636390340720991549,"deps":[[3051629642231505422,"serde_derive",false,5226777244739953528],[11899261697793765154,"serde_core",false,4053366851300588858],[13548984313718623784,"build_script_build",false,9211581216689902599]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde-4162afa942240556/dep-lib-serde","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/dep-lib-serde b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/dep-lib-serde new file mode 100644 index 000000000000..e2b81f876f54 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/dep-lib-serde differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde new file mode 100644 index 000000000000..078182434646 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde @@ -0,0 +1 @@ +b03d826f6d7c9b14 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde.json b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde.json new file mode 100644 index 000000000000..b6573d05e5b1 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde-9fa077858b66cbea/lib-serde.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\", \"derive\", \"serde_derive\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"derive\", \"rc\", \"serde_derive\", \"std\", \"unstable\"]","target":11327258112168116673,"profile":15657897354478470176,"path":10636390340720991549,"deps":[[3051629642231505422,"serde_derive",false,5226777244739953528],[11899261697793765154,"serde_core",false,13550042331251622124],[13548984313718623784,"build_script_build",false,9211581216689902599]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde-9fa077858b66cbea/dep-lib-serde","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build new file mode 100644 index 000000000000..ca6c01bf462c --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build @@ -0,0 +1 @@ +5e30a15cc709ebe1 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build.json new file mode 100644 index 000000000000..a8576140409f --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-31a976a2b80ba788/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[11899261697793765154,"build_script_build",false,14310736022334942061]],"local":[{"RerunIfChanged":{"output":"debug/build/serde_core-31a976a2b80ba788/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/dep-lib-serde_core b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/dep-lib-serde_core new file mode 100644 index 000000000000..035275a14b8a Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/dep-lib-serde_core differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core new file mode 100644 index 000000000000..0134958e87aa --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core @@ -0,0 +1 @@ +3a7d1df4ac734038 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core.json b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core.json new file mode 100644 index 000000000000..369e1fb9a73b --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-d580390c876dedb8/lib-serde_core.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"result\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"rc\", \"result\", \"std\", \"unstable\"]","target":6810695588070812737,"profile":2241668132362809309,"path":9129893127867143078,"deps":[[11899261697793765154,"build_script_build",false,16279116029917999198]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde_core-d580390c876dedb8/dep-lib-serde_core","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build new file mode 100644 index 000000000000..6ce9dd9ee3ba --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build @@ -0,0 +1 @@ +6d2ba93d97f299c6 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build.json new file mode 100644 index 000000000000..dc25f33425ff --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"result\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"rc\", \"result\", \"std\", \"unstable\"]","target":5408242616063297496,"profile":2225463790103693989,"path":6615405151884261341,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde_core-dfb10809113fe9a7/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-dfb10809113fe9a7/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/dep-lib-serde_core b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/dep-lib-serde_core new file mode 100644 index 000000000000..035275a14b8a Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/dep-lib-serde_core differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core new file mode 100644 index 000000000000..462a3de56739 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core @@ -0,0 +1 @@ +ec40c285b56b0bbc \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core.json b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core.json new file mode 100644 index 000000000000..d3ff3db018ce --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_core-f14df7eff59447f5/lib-serde_core.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"result\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"rc\", \"result\", \"std\", \"unstable\"]","target":6810695588070812737,"profile":15657897354478470176,"path":9129893127867143078,"deps":[[11899261697793765154,"build_script_build",false,16279116029917999198]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde_core-f14df7eff59447f5/dep-lib-serde_core","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/dep-lib-serde_derive b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/dep-lib-serde_derive new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/dep-lib-serde_derive differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive new file mode 100644 index 000000000000..c75237c2355d --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive @@ -0,0 +1 @@ +78e3d120363e8948 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive.json b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive.json new file mode 100644 index 000000000000..c3fed20691a2 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/serde_derive-44f95efcbcde04f7/lib-serde_derive.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"default\"]","declared_features":"[\"default\", \"deserialize_in_place\"]","target":13076129734743110817,"profile":2225463790103693989,"path":4091579944627725786,"deps":[[4289358735036141001,"proc_macro2",false,7653674550105451046],[10420560437213941093,"syn",false,10140652599285154387],[13111758008314797071,"quote",false,5753241962928949641]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/serde_derive-44f95efcbcde04f7/dep-lib-serde_derive","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/dep-lib-syn b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/dep-lib-syn new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/dep-lib-syn differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn new file mode 100644 index 000000000000..6ebc9b3e8262 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn @@ -0,0 +1 @@ +538208c3cfd5ba8c \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn.json b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn.json new file mode 100644 index 000000000000..a2554e21bb2b --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/syn-a9d4be73b91b6884/lib-syn.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[\"clone-impls\", \"default\", \"derive\", \"parsing\", \"printing\", \"proc-macro\"]","declared_features":"[\"clone-impls\", \"default\", \"derive\", \"extra-traits\", \"fold\", \"full\", \"parsing\", \"printing\", \"proc-macro\", \"test\", \"visit\", \"visit-mut\"]","target":9442126953582868550,"profile":2225463790103693989,"path":7434547897852794456,"deps":[[4289358735036141001,"proc_macro2",false,7653674550105451046],[8901712065508858692,"unicode_ident",false,12981726819360963568],[13111758008314797071,"quote",false,5753241962928949641]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/syn-a9d4be73b91b6884/dep-lib-syn","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/dep-lib-thiserror b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/dep-lib-thiserror new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/dep-lib-thiserror differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror new file mode 100644 index 000000000000..81977a0ecb1a --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror @@ -0,0 +1 @@ +a77b207db166673e \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror.json b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror.json new file mode 100644 index 000000000000..2f6e73643935 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-42e08e57cc1c0bec/lib-thiserror.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":13586076721141200315,"profile":15657897354478470176,"path":621207043016710330,"deps":[[8008191657135824715,"build_script_build",false,16779172400435598898],[15291996789830541733,"thiserror_impl",false,2849545088079498771]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-42e08e57cc1c0bec/dep-lib-thiserror","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/dep-lib-thiserror b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/dep-lib-thiserror new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/dep-lib-thiserror differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror new file mode 100644 index 000000000000..af102437fad9 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror @@ -0,0 +1 @@ +b2324628db72e866 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror.json b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror.json new file mode 100644 index 000000000000..25065c970509 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-7676895f228b785d/lib-thiserror.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":13586076721141200315,"profile":2241668132362809309,"path":621207043016710330,"deps":[[8008191657135824715,"build_script_build",false,16779172400435598898],[15291996789830541733,"thiserror_impl",false,2849545088079498771]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-7676895f228b785d/dep-lib-thiserror","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build new file mode 100644 index 000000000000..a881749dd361 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build @@ -0,0 +1 @@ +329600f96598dbe8 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build.json new file mode 100644 index 000000000000..d209ac7cd270 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-da6313d498605aa2/run-build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[8008191657135824715,"build_script_build",false,5468909948074489064]],"local":[{"RerunIfChanged":{"output":"debug/build/thiserror-da6313d498605aa2/output","paths":["build/probe.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build new file mode 100644 index 000000000000..9b57009c4f5e --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build @@ -0,0 +1 @@ +e874944b9f78e54b \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build.json b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build.json new file mode 100644 index 000000000000..09dbf8bbb67c --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/build-script-build-script-build.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":5408242616063297496,"profile":2225463790103693989,"path":16861865486213737179,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-e31d3e24e00ef88d/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/dep-build-script-build-script-build b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/dep-build-script-build-script-build new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/dep-build-script-build-script-build differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-e31d3e24e00ef88d/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/dep-lib-thiserror_impl b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/dep-lib-thiserror_impl new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/dep-lib-thiserror_impl differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl new file mode 100644 index 000000000000..815490802ca8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl @@ -0,0 +1 @@ +130e70fa289e8b27 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl.json b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl.json new file mode 100644 index 000000000000..026ea090d8da --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/lib-thiserror_impl.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":6216210811039475267,"profile":2225463790103693989,"path":11415833884217894561,"deps":[[4289358735036141001,"proc_macro2",false,7653674550105451046],[10420560437213941093,"syn",false,10140652599285154387],[13111758008314797071,"quote",false,5753241962928949641]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/thiserror-impl-ddbfa6e2b801ebf9/dep-lib-thiserror_impl","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/dep-lib-unicode_ident b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/dep-lib-unicode_ident new file mode 100644 index 000000000000..ec3cb8bfd280 Binary files /dev/null and b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/dep-lib-unicode_ident differ diff --git a/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/invoked.timestamp b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/invoked.timestamp new file mode 100644 index 000000000000..e00328da5aa8 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/invoked.timestamp @@ -0,0 +1 @@ +This file has an mtime of when this was started. \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident new file mode 100644 index 000000000000..4103ff670352 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident @@ -0,0 +1 @@ +f0fb2b17c35b28b4 \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident.json b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident.json new file mode 100644 index 000000000000..4067cc5f0601 --- /dev/null +++ b/service-examples/rust/echo/target/debug/.fingerprint/unicode-ident-c5ebacf4969de86c/lib-unicode_ident.json @@ -0,0 +1 @@ +{"rustc":8277423686421874925,"features":"[]","declared_features":"[]","target":14045917370260632744,"profile":2225463790103693989,"path":2481712810371388421,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/unicode-ident-c5ebacf4969de86c/dep-lib-unicode_ident","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0} \ No newline at end of file diff --git a/service-examples/rust/echo/target/debug/deps/autocfg-b2e0182c95f197a6.d b/service-examples/rust/echo/target/debug/deps/autocfg-b2e0182c95f197a6.d new file mode 100644 index 000000000000..afcd8abcd9a4 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/autocfg-b2e0182c95f197a6.d @@ -0,0 +1,10 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libautocfg-b2e0182c95f197a6.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/rustc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/version.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libautocfg-b2e0182c95f197a6.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/rustc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/version.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/autocfg-b2e0182c95f197a6.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/rustc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/version.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/error.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/rustc.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/autocfg-1.5.0/src/version.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8 b/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8 new file mode 100755 index 000000000000..45c9597cc2b5 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8 differ diff --git a/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8.d b/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8.d new file mode 100644 index 000000000000..1999f6673eed --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8: src/echo_client.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/echo_client-12557bf4d1de6ce8.d: src/echo_client.rs + +src/echo_client.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_client-cb292818c4837e46.d b/service-examples/rust/echo/target/debug/deps/echo_client-cb292818c4837e46.d new file mode 100644 index 000000000000..9f910c55c3c5 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_client-cb292818c4837e46.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libecho_client-cb292818c4837e46.rmeta: src/echo_client.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/echo_client-cb292818c4837e46.d: src/echo_client.rs + +src/echo_client.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_server-ddb4e1542bce398f.d b/service-examples/rust/echo/target/debug/deps/echo_server-ddb4e1542bce398f.d new file mode 100644 index 000000000000..90d226a154a5 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_server-ddb4e1542bce398f.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libecho_server-ddb4e1542bce398f.rmeta: src/echo_server.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/echo_server-ddb4e1542bce398f.d: src/echo_server.rs + +src/echo_server.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7 b/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7 new file mode 100755 index 000000000000..a0e152492612 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7 differ diff --git a/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7.d b/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7.d new file mode 100644 index 000000000000..f2b24189afb0 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7: src/echo_server.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/echo_server-e6bcb241412567b7.d: src/echo_server.rs + +src/echo_server.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_wire_compat-11bab1a30b39b38c.d b/service-examples/rust/echo/target/debug/deps/echo_wire_compat-11bab1a30b39b38c.d new file mode 100644 index 000000000000..91de0a179490 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_wire_compat-11bab1a30b39b38c.d @@ -0,0 +1,10 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libecho_wire_compat-11bab1a30b39b38c.rmeta: src/lib.rs src/backend.rs src/error.rs src/generated_types.rs src/api.rs src/server.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/echo_wire_compat-11bab1a30b39b38c.d: src/lib.rs src/backend.rs src/error.rs src/generated_types.rs src/api.rs src/server.rs + +src/lib.rs: +src/backend.rs: +src/error.rs: +src/generated_types.rs: +src/api.rs: +src/server.rs: diff --git a/service-examples/rust/echo/target/debug/deps/echo_wire_compat-37075038126d203b.d b/service-examples/rust/echo/target/debug/deps/echo_wire_compat-37075038126d203b.d new file mode 100644 index 000000000000..17b4c1be7b07 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/echo_wire_compat-37075038126d203b.d @@ -0,0 +1,14 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rmeta: src/lib.rs src/generated/echo_types.rs src/generated/echo_server.rs src/generated/echo_client.rs src/generated/backend.rs src/generated/error.rs src/generated/ipc_server.rs src/generated/uds_backend.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rlib: src/lib.rs src/generated/echo_types.rs src/generated/echo_server.rs src/generated/echo_client.rs src/generated/backend.rs src/generated/error.rs src/generated/ipc_server.rs src/generated/uds_backend.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/echo_wire_compat-37075038126d203b.d: src/lib.rs src/generated/echo_types.rs src/generated/echo_server.rs src/generated/echo_client.rs src/generated/backend.rs src/generated/error.rs src/generated/ipc_server.rs src/generated/uds_backend.rs + +src/lib.rs: +src/generated/echo_types.rs: +src/generated/echo_server.rs: +src/generated/echo_client.rs: +src/generated/backend.rs: +src/generated/error.rs: +src/generated/ipc_server.rs: +src/generated/uds_backend.rs: diff --git a/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd b/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd new file mode 100755 index 000000000000..7e50f9437a50 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd differ diff --git a/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd.d b/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd.d new file mode 100644 index 000000000000..17cbfd42fa68 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd: src/bin/generate_golden.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/generate_golden-736c3286d40075dd.d: src/bin/generate_golden.rs + +src/bin/generate_golden.rs: diff --git a/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08 b/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08 new file mode 100755 index 000000000000..7b838c4e5cd6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08 differ diff --git a/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08.d b/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08.d new file mode 100644 index 000000000000..5aea7caabf62 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08.d @@ -0,0 +1,5 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08: src/bin/golden_test.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/golden_test-de2cf77060ba7b08.d: src/bin/golden_test.rs + +src/bin/golden_test.rs: diff --git a/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rlib b/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rlib new file mode 100644 index 000000000000..0c67d51e13e1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rmeta b/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rmeta new file mode 100644 index 000000000000..667bc9ed4175 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libautocfg-b2e0182c95f197a6.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libecho_client-cb292818c4837e46.rmeta b/service-examples/rust/echo/target/debug/deps/libecho_client-cb292818c4837e46.rmeta new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/deps/libecho_server-ddb4e1542bce398f.rmeta b/service-examples/rust/echo/target/debug/deps/libecho_server-ddb4e1542bce398f.rmeta new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-11bab1a30b39b38c.rmeta b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-11bab1a30b39b38c.rmeta new file mode 100644 index 000000000000..304766cd7ea6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-11bab1a30b39b38c.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rlib b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rlib new file mode 100644 index 000000000000..8f7f7fc591bc Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rmeta b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rmeta new file mode 100644 index 000000000000..957c6f006b8b Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libecho_wire_compat-37075038126d203b.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rlib b/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rlib new file mode 100644 index 000000000000..40306917e221 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rmeta b/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rmeta new file mode 100644 index 000000000000..48fc48302f4d Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libnum_traits-c1b3868491c46c8e.rmeta b/service-examples/rust/echo/target/debug/deps/libnum_traits-c1b3868491c46c8e.rmeta new file mode 100644 index 000000000000..87c38720374d Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libnum_traits-c1b3868491c46c8e.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rlib b/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rlib new file mode 100644 index 000000000000..04a16801724c Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rmeta b/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rmeta new file mode 100644 index 000000000000..5e01ba2c70b8 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rlib b/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rlib new file mode 100644 index 000000000000..ce202ca75bab Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rmeta b/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rmeta new file mode 100644 index 000000000000..4435c554f3e8 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rlib b/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rlib new file mode 100644 index 000000000000..78b36ea8d50f Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rmeta b/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rmeta new file mode 100644 index 000000000000..fa238f629012 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp-beb0c7308ab837f1.rmeta b/service-examples/rust/echo/target/debug/deps/librmp-beb0c7308ab837f1.rmeta new file mode 100644 index 000000000000..a60c77a88127 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp-beb0c7308ab837f1.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rlib b/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rlib new file mode 100644 index 000000000000..b568cb66f5a8 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rmeta b/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rmeta new file mode 100644 index 000000000000..2b6b493dce69 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/librmp_serde-6fba03b1b3d96439.rmeta b/service-examples/rust/echo/target/debug/deps/librmp_serde-6fba03b1b3d96439.rmeta new file mode 100644 index 000000000000..59308fb99ced Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/librmp_serde-6fba03b1b3d96439.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde-4162afa942240556.rmeta b/service-examples/rust/echo/target/debug/deps/libserde-4162afa942240556.rmeta new file mode 100644 index 000000000000..8f77d0cfabcb Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde-4162afa942240556.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rlib b/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rlib new file mode 100644 index 000000000000..73abd17a3b9a Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rmeta b/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rmeta new file mode 100644 index 000000000000..edf34fec9aa1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde_core-d580390c876dedb8.rmeta b/service-examples/rust/echo/target/debug/deps/libserde_core-d580390c876dedb8.rmeta new file mode 100644 index 000000000000..b9eae886c820 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde_core-d580390c876dedb8.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rlib b/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rlib new file mode 100644 index 000000000000..aa9bf1b8d2df Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rmeta b/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rmeta new file mode 100644 index 000000000000..ae8efdc90a06 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libserde_derive-44f95efcbcde04f7.so b/service-examples/rust/echo/target/debug/deps/libserde_derive-44f95efcbcde04f7.so new file mode 100755 index 000000000000..1f6470e8a83d Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libserde_derive-44f95efcbcde04f7.so differ diff --git a/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rlib b/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rlib new file mode 100644 index 000000000000..18e3277c9958 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rmeta b/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rmeta new file mode 100644 index 000000000000..1857b70c3bbd Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rlib b/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rlib new file mode 100644 index 000000000000..89b045e547e3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rmeta b/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rmeta new file mode 100644 index 000000000000..667bcc802f7a Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libthiserror-7676895f228b785d.rmeta b/service-examples/rust/echo/target/debug/deps/libthiserror-7676895f228b785d.rmeta new file mode 100644 index 000000000000..20317c5fb7aa Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libthiserror-7676895f228b785d.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/libthiserror_impl-ddbfa6e2b801ebf9.so b/service-examples/rust/echo/target/debug/deps/libthiserror_impl-ddbfa6e2b801ebf9.so new file mode 100755 index 000000000000..24f4592d0892 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libthiserror_impl-ddbfa6e2b801ebf9.so differ diff --git a/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rlib b/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rlib new file mode 100644 index 000000000000..ef0307bd3e80 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rlib differ diff --git a/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rmeta b/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rmeta new file mode 100644 index 000000000000..6911e0ae55f2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rmeta differ diff --git a/service-examples/rust/echo/target/debug/deps/num_traits-6310f1ac860e1a9e.d b/service-examples/rust/echo/target/debug/deps/num_traits-6310f1ac860e1a9e.d new file mode 100644 index 000000000000..c497d41a8679 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/num_traits-6310f1ac860e1a9e.d @@ -0,0 +1,25 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libnum_traits-6310f1ac860e1a9e.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/num_traits-6310f1ac860e1a9e.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs: diff --git a/service-examples/rust/echo/target/debug/deps/num_traits-c1b3868491c46c8e.d b/service-examples/rust/echo/target/debug/deps/num_traits-c1b3868491c46c8e.d new file mode 100644 index 000000000000..e988d5048a01 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/num_traits-c1b3868491c46c8e.d @@ -0,0 +1,23 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libnum_traits-c1b3868491c46c8e.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/num_traits-c1b3868491c46c8e.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs: diff --git a/service-examples/rust/echo/target/debug/deps/proc_macro2-16dfa973c0728e42.d b/service-examples/rust/echo/target/debug/deps/proc_macro2-16dfa973c0728e42.d new file mode 100644 index 000000000000..504871be51fe --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/proc_macro2-16dfa973c0728e42.d @@ -0,0 +1,15 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libproc_macro2-16dfa973c0728e42.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/proc_macro2-16dfa973c0728e42.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs: diff --git a/service-examples/rust/echo/target/debug/deps/quote-57ed189e95422886.d b/service-examples/rust/echo/target/debug/deps/quote-57ed189e95422886.d new file mode 100644 index 000000000000..8a52f358b03c --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/quote-57ed189e95422886.d @@ -0,0 +1,13 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ident_fragment.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/to_tokens.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/runtime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/spanned.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libquote-57ed189e95422886.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ident_fragment.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/to_tokens.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/runtime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/spanned.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/quote-57ed189e95422886.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ident_fragment.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/to_tokens.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/runtime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/spanned.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/format.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/ident_fragment.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/to_tokens.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/runtime.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quote-1.0.45/src/spanned.rs: diff --git a/service-examples/rust/echo/target/debug/deps/rmp-885eb6c2dfd189c0.d b/service-examples/rust/echo/target/debug/deps/rmp-885eb6c2dfd189c0.d new file mode 100644 index 000000000000..f1325d5fe4d4 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/rmp-885eb6c2dfd189c0.d @@ -0,0 +1,28 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/librmp-885eb6c2dfd189c0.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/rmp-885eb6c2dfd189c0.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md: diff --git a/service-examples/rust/echo/target/debug/deps/rmp-beb0c7308ab837f1.d b/service-examples/rust/echo/target/debug/deps/rmp-beb0c7308ab837f1.d new file mode 100644 index 000000000000..67fb7b2e465c --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/rmp-beb0c7308ab837f1.d @@ -0,0 +1,26 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/librmp-beb0c7308ab837f1.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/rmp-beb0c7308ab837f1.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/dec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/sint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/str.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/uint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/est.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/decode/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/bin.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/dec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/map.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/sint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/str.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/uint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/vec.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/encode/buffer.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/errors.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/marker.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-0.8.15/src/../README.md: diff --git a/service-examples/rust/echo/target/debug/deps/rmp_serde-0c1d529588ec67af.d b/service-examples/rust/echo/target/debug/deps/rmp_serde-0c1d529588ec67af.d new file mode 100644 index 000000000000..d737eee1600b --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/rmp_serde-0c1d529588ec67af.d @@ -0,0 +1,12 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/librmp_serde-0c1d529588ec67af.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/rmp_serde-0c1d529588ec67af.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md: diff --git a/service-examples/rust/echo/target/debug/deps/rmp_serde-6fba03b1b3d96439.d b/service-examples/rust/echo/target/debug/deps/rmp_serde-6fba03b1b3d96439.d new file mode 100644 index 000000000000..e5e1a0a1db06 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/rmp_serde-6fba03b1b3d96439.d @@ -0,0 +1,10 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/librmp_serde-6fba03b1b3d96439.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/rmp_serde-6fba03b1b3d96439.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/bytes.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/config.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/decode.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/encode.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rmp-serde-1.3.1/src/../README.md: diff --git a/service-examples/rust/echo/target/debug/deps/serde-4162afa942240556.d b/service-examples/rust/echo/target/debug/deps/serde-4162afa942240556.d new file mode 100644 index 000000000000..a0d90cb4babb --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/serde-4162afa942240556.d @@ -0,0 +1,12 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libserde-4162afa942240556.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde-073a7ef43ee78fab/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/serde-4162afa942240556.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde-073a7ef43ee78fab/out/private.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs: +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde-073a7ef43ee78fab/out/private.rs: + +# env-dep:OUT_DIR=/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde-073a7ef43ee78fab/out diff --git a/service-examples/rust/echo/target/debug/deps/serde-9fa077858b66cbea.d b/service-examples/rust/echo/target/debug/deps/serde-9fa077858b66cbea.d new file mode 100644 index 000000000000..874e433c20f1 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/serde-9fa077858b66cbea.d @@ -0,0 +1,14 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde-073a7ef43ee78fab/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libserde-9fa077858b66cbea.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde-073a7ef43ee78fab/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/serde-9fa077858b66cbea.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde-073a7ef43ee78fab/out/private.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/integer128.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/de.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.228/src/private/ser.rs: +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde-073a7ef43ee78fab/out/private.rs: + +# env-dep:OUT_DIR=/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde-073a7ef43ee78fab/out diff --git a/service-examples/rust/echo/target/debug/deps/serde_core-d580390c876dedb8.d b/service-examples/rust/echo/target/debug/deps/serde_core-d580390c876dedb8.d new file mode 100644 index 000000000000..d747d7b0b0f7 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/serde_core-d580390c876dedb8.d @@ -0,0 +1,25 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libserde_core-d580390c876dedb8.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/serde_core-d580390c876dedb8.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs: +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs: + +# env-dep:OUT_DIR=/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/build/serde_core-31a976a2b80ba788/out diff --git a/service-examples/rust/echo/target/debug/deps/serde_core-f14df7eff59447f5.d b/service-examples/rust/echo/target/debug/deps/serde_core-f14df7eff59447f5.d new file mode 100644 index 000000000000..d505dd0ff0e2 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/serde_core-f14df7eff59447f5.d @@ -0,0 +1,27 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libserde_core-f14df7eff59447f5.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/serde_core-f14df7eff59447f5.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/crate_root.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/macros.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/value.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/ignored_any.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/de/impls.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/fmt.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impls.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/ser/impossible.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/format.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/content.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/seed.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/doc.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/size_hint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_core-1.0.228/src/private/string.rs: +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde_core-31a976a2b80ba788/out/private.rs: + +# env-dep:OUT_DIR=/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/build/serde_core-31a976a2b80ba788/out diff --git a/service-examples/rust/echo/target/debug/deps/serde_derive-44f95efcbcde04f7.d b/service-examples/rust/echo/target/debug/deps/serde_derive-44f95efcbcde04f7.d new file mode 100644 index 000000000000..5e81b374ab89 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/serde_derive-44f95efcbcde04f7.d @@ -0,0 +1,34 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libserde_derive-44f95efcbcde04f7.so: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/name.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/case.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/check.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ctxt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/receiver.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/respan.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/symbol.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/bound.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/fragment.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_adjacently.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_externally.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_internally.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_untagged.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/identifier.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/struct_.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/tuple.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/unit.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/deprecated.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/dummy.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/pretend.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/ser.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/this.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/serde_derive-44f95efcbcde04f7.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/mod.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/name.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/case.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/check.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ctxt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/receiver.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/respan.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/symbol.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/bound.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/fragment.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_adjacently.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_externally.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_internally.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_untagged.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/identifier.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/struct_.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/tuple.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/unit.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/deprecated.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/dummy.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/pretend.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/ser.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/this.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/mod.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ast.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/attr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/name.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/case.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/check.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/ctxt.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/receiver.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/respan.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/internals/symbol.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/bound.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/fragment.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_adjacently.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_externally.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_internally.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/enum_untagged.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/identifier.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/struct_.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/tuple.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/de/unit.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/deprecated.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/dummy.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/pretend.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/ser.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_derive-1.0.228/src/this.rs: + +# env-dep:CARGO_PKG_VERSION_PATCH=228 diff --git a/service-examples/rust/echo/target/debug/deps/syn-a9d4be73b91b6884.d b/service-examples/rust/echo/target/debug/deps/syn-a9d4be73b91b6884.d new file mode 100644 index 000000000000..d74621d18881 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/syn-a9d4be73b91b6884.d @@ -0,0 +1,49 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/group.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/token.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/bigint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/classify.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_keyword.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_punctuation.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/data.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/derive.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/drops.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/fixup.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/generics.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ident.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lifetime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lit.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lookahead.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/mac.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/meta.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/op.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/discouraged.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_macro_input.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_quote.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/path.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/precedence.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/print.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/punctuated.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/restriction.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/sealed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/scan_expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/span.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/spanned.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/thread.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ty.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/verbatim.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/export.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/gen/clone.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libsyn-a9d4be73b91b6884.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/group.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/token.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/bigint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/classify.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_keyword.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_punctuation.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/data.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/derive.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/drops.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/fixup.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/generics.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ident.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lifetime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lit.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lookahead.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/mac.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/meta.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/op.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/discouraged.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_macro_input.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_quote.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/path.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/precedence.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/print.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/punctuated.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/restriction.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/sealed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/scan_expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/span.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/spanned.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/thread.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ty.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/verbatim.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/export.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/gen/clone.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/syn-a9d4be73b91b6884.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/macros.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/group.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/token.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/bigint.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/buffer.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/classify.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_keyword.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_punctuation.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/data.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/derive.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/drops.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/error.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ext.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/fixup.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/generics.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ident.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lifetime.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lit.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lookahead.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/mac.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/meta.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/op.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/discouraged.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_macro_input.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_quote.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/path.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/precedence.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/print.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/punctuated.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/restriction.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/sealed.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/scan_expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/span.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/spanned.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/thread.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ty.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/verbatim.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/export.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/gen/clone.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/macros.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/group.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/token.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/attr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/bigint.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/buffer.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/classify.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_keyword.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/custom_punctuation.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/data.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/derive.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/drops.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/error.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/expr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ext.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/fixup.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/generics.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ident.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lifetime.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lit.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/lookahead.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/mac.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/meta.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/op.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/discouraged.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_macro_input.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/parse_quote.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/path.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/precedence.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/print.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/punctuated.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/restriction.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/sealed.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/scan_expr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/span.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/spanned.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/thread.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/ty.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/verbatim.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/export.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.117/src/gen/clone.rs: diff --git a/service-examples/rust/echo/target/debug/deps/thiserror-42e08e57cc1c0bec.d b/service-examples/rust/echo/target/debug/deps/thiserror-42e08e57cc1c0bec.d new file mode 100644 index 000000000000..fde9511c8cb7 --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/thiserror-42e08e57cc1c0bec.d @@ -0,0 +1,9 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libthiserror-42e08e57cc1c0bec.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/thiserror-42e08e57cc1c0bec.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs: diff --git a/service-examples/rust/echo/target/debug/deps/thiserror-7676895f228b785d.d b/service-examples/rust/echo/target/debug/deps/thiserror-7676895f228b785d.d new file mode 100644 index 000000000000..bb2bd514d62c --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/thiserror-7676895f228b785d.d @@ -0,0 +1,7 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libthiserror-7676895f228b785d.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/thiserror-7676895f228b785d.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/aserror.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-1.0.69/src/display.rs: diff --git a/service-examples/rust/echo/target/debug/deps/thiserror_impl-ddbfa6e2b801ebf9.d b/service-examples/rust/echo/target/debug/deps/thiserror_impl-ddbfa6e2b801ebf9.d new file mode 100644 index 000000000000..d58d3dc934ac --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/thiserror_impl-ddbfa6e2b801ebf9.d @@ -0,0 +1,14 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/libthiserror_impl-ddbfa6e2b801ebf9.so: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/ast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/expand.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/generics.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/prop.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/scan_expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/span.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/valid.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/deps/thiserror_impl-ddbfa6e2b801ebf9.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/ast.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/attr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/expand.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/fmt.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/generics.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/prop.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/scan_expr.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/span.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/valid.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/ast.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/attr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/expand.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/fmt.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/generics.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/prop.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/scan_expr.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/span.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/thiserror-impl-1.0.69/src/valid.rs: diff --git a/service-examples/rust/echo/target/debug/deps/unicode_ident-c5ebacf4969de86c.d b/service-examples/rust/echo/target/debug/deps/unicode_ident-c5ebacf4969de86c.d new file mode 100644 index 000000000000..90675f962b9e --- /dev/null +++ b/service-examples/rust/echo/target/debug/deps/unicode_ident-c5ebacf4969de86c.d @@ -0,0 +1,8 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rmeta: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/tables.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/libunicode_ident-c5ebacf4969de86c.rlib: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/tables.rs + +/mnt/user-data/charlie/aztec-repos/aztec-packages3/barretenberg/test/wire_compat/rust/target/debug/deps/unicode_ident-c5ebacf4969de86c.d: /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/lib.rs /mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/tables.rs + +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/lib.rs: +/mnt/user-data/charlie/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-ident-1.0.24/src/tables.rs: diff --git a/service-examples/rust/echo/target/debug/echo_client b/service-examples/rust/echo/target/debug/echo_client new file mode 100755 index 000000000000..45c9597cc2b5 Binary files /dev/null and b/service-examples/rust/echo/target/debug/echo_client differ diff --git a/service-examples/rust/echo/target/debug/echo_client.d b/service-examples/rust/echo/target/debug/echo_client.d new file mode 100644 index 000000000000..cb4419c5d077 --- /dev/null +++ b/service-examples/rust/echo/target/debug/echo_client.d @@ -0,0 +1 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/echo_client: /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_types.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/error.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/ipc_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/uds_backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/lib.rs diff --git a/service-examples/rust/echo/target/debug/echo_server b/service-examples/rust/echo/target/debug/echo_server new file mode 100755 index 000000000000..a0e152492612 Binary files /dev/null and b/service-examples/rust/echo/target/debug/echo_server differ diff --git a/service-examples/rust/echo/target/debug/echo_server.d b/service-examples/rust/echo/target/debug/echo_server.d new file mode 100644 index 000000000000..9ec47d5df3e2 --- /dev/null +++ b/service-examples/rust/echo/target/debug/echo_server.d @@ -0,0 +1 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/echo_server: /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_types.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/error.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/ipc_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/uds_backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/lib.rs diff --git a/service-examples/rust/echo/target/debug/generate_golden b/service-examples/rust/echo/target/debug/generate_golden new file mode 100755 index 000000000000..7e50f9437a50 Binary files /dev/null and b/service-examples/rust/echo/target/debug/generate_golden differ diff --git a/service-examples/rust/echo/target/debug/generate_golden.d b/service-examples/rust/echo/target/debug/generate_golden.d new file mode 100644 index 000000000000..dd4f42e59547 --- /dev/null +++ b/service-examples/rust/echo/target/debug/generate_golden.d @@ -0,0 +1 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/generate_golden: /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/bin/generate_golden.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_types.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/error.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/ipc_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/uds_backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/lib.rs diff --git a/service-examples/rust/echo/target/debug/golden_test b/service-examples/rust/echo/target/debug/golden_test new file mode 100755 index 000000000000..7b838c4e5cd6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/golden_test differ diff --git a/service-examples/rust/echo/target/debug/golden_test.d b/service-examples/rust/echo/target/debug/golden_test.d new file mode 100644 index 000000000000..b0f269faa50f --- /dev/null +++ b/service-examples/rust/echo/target/debug/golden_test.d @@ -0,0 +1 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/golden_test: /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/bin/golden_test.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_types.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/error.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/ipc_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/uds_backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/lib.rs diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/dep-graph.bin new file mode 100644 index 000000000000..65ae3945da0a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/query-cache.bin new file mode 100644 index 000000000000..260ed90b2094 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/work-products.bin new file mode 100644 index 000000000000..85e1d98ee553 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f-2detycslf1v2rz8g6qvaas2pb/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f.lock b/service-examples/rust/echo/target/debug/incremental/echo_client-1tdehlagvqulo/s-hgzgun8yq7-1vtzn8f.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/03ucztcwgy2t35bb2x084otkh.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/03ucztcwgy2t35bb2x084otkh.o new file mode 100644 index 000000000000..18c804297c75 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/03ucztcwgy2t35bb2x084otkh.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/04puclel92xi709rclaely63l.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/04puclel92xi709rclaely63l.o new file mode 100644 index 000000000000..c19ade244300 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/04puclel92xi709rclaely63l.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0f4686t1t9682horbdyg71ktk.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0f4686t1t9682horbdyg71ktk.o new file mode 100644 index 000000000000..b2f03d76f7b1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0f4686t1t9682horbdyg71ktk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0ucc55hn6otvwdtdx73xc315b.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0ucc55hn6otvwdtdx73xc315b.o new file mode 100644 index 000000000000..703998de2daf Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/0ucc55hn6otvwdtdx73xc315b.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/155lxkux338cxwtaij6r1q7lo.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/155lxkux338cxwtaij6r1q7lo.o new file mode 100644 index 000000000000..6d4c9fd6de2b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/155lxkux338cxwtaij6r1q7lo.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/17odvxtejetzq0ji668b1oy9a.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/17odvxtejetzq0ji668b1oy9a.o new file mode 100644 index 000000000000..0511af471219 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/17odvxtejetzq0ji668b1oy9a.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1hjq95rfyi9yz7ciriaeuynni.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1hjq95rfyi9yz7ciriaeuynni.o new file mode 100644 index 000000000000..efd25d65e6a9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1hjq95rfyi9yz7ciriaeuynni.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1pchr9w2atco0oyjuqbx782y6.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1pchr9w2atco0oyjuqbx782y6.o new file mode 100644 index 000000000000..7b8f1d0144a3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1pchr9w2atco0oyjuqbx782y6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1ygnbfqihpb46d0f4knz3cv73.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1ygnbfqihpb46d0f4knz3cv73.o new file mode 100644 index 000000000000..99563320d77d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/1ygnbfqihpb46d0f4knz3cv73.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27sdk9p4slxwd49mtoxqkfyh8.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27sdk9p4slxwd49mtoxqkfyh8.o new file mode 100644 index 000000000000..fac0baf5ae24 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27sdk9p4slxwd49mtoxqkfyh8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27u2np5p16gv3ud1r1bp5htk1.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27u2np5p16gv3ud1r1bp5htk1.o new file mode 100644 index 000000000000..b36dbaf1a7ec Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/27u2np5p16gv3ud1r1bp5htk1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2al7xzxpl3z5uc9j3onu5o179.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2al7xzxpl3z5uc9j3onu5o179.o new file mode 100644 index 000000000000..c9b5277eddad Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2al7xzxpl3z5uc9j3onu5o179.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2eezxav0v51gmjuqll31kexec.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2eezxav0v51gmjuqll31kexec.o new file mode 100644 index 000000000000..4a9be42ebecb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2eezxav0v51gmjuqll31kexec.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2ftt8hjee0nu5g8pr2rv2x1y8.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2ftt8hjee0nu5g8pr2rv2x1y8.o new file mode 100644 index 000000000000..4bcf208d3a8d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2ftt8hjee0nu5g8pr2rv2x1y8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2kovdc1e994du8xzmq3n2ydzy.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2kovdc1e994du8xzmq3n2ydzy.o new file mode 100644 index 000000000000..7f942b28cfd4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2kovdc1e994du8xzmq3n2ydzy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2x7bn0lwi563pjkhgii1c9316.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2x7bn0lwi563pjkhgii1c9316.o new file mode 100644 index 000000000000..474a3411a2a6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/2x7bn0lwi563pjkhgii1c9316.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/31xchiteoqqgcyggfshjyxqr8.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/31xchiteoqqgcyggfshjyxqr8.o new file mode 100644 index 000000000000..7a5a26d5eabc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/31xchiteoqqgcyggfshjyxqr8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/32npijc18ky0rsqy9tvchkopf.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/32npijc18ky0rsqy9tvchkopf.o new file mode 100644 index 000000000000..0ae63eb242e7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/32npijc18ky0rsqy9tvchkopf.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/33apbhrxw4bw4bziq6bvno1xe.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/33apbhrxw4bw4bziq6bvno1xe.o new file mode 100644 index 000000000000..4066f3a209c3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/33apbhrxw4bw4bziq6bvno1xe.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/38vltmpv0e8hii5c0qtw9vs8y.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/38vltmpv0e8hii5c0qtw9vs8y.o new file mode 100644 index 000000000000..2da642aa1c34 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/38vltmpv0e8hii5c0qtw9vs8y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3c4y1r11f9gbxqfpherva88h9.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3c4y1r11f9gbxqfpherva88h9.o new file mode 100644 index 000000000000..4bb5512c0854 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3c4y1r11f9gbxqfpherva88h9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3jcuaxietblpx2ov98e7kcxcz.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3jcuaxietblpx2ov98e7kcxcz.o new file mode 100644 index 000000000000..15c80f822b68 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3jcuaxietblpx2ov98e7kcxcz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3xzbnixgwitdlbax7h4ybvl9e.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3xzbnixgwitdlbax7h4ybvl9e.o new file mode 100644 index 000000000000..b9c28388f433 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/3xzbnixgwitdlbax7h4ybvl9e.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/44gumzgtg3700elzyo2pozx3n.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/44gumzgtg3700elzyo2pozx3n.o new file mode 100644 index 000000000000..296cea0466c1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/44gumzgtg3700elzyo2pozx3n.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4bp0fktcdcoi08hpk4mwcgpkg.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4bp0fktcdcoi08hpk4mwcgpkg.o new file mode 100644 index 000000000000..dc5aba62b863 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4bp0fktcdcoi08hpk4mwcgpkg.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4i46sg3axrlid7e1mcbyg94b5.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4i46sg3axrlid7e1mcbyg94b5.o new file mode 100644 index 000000000000..be719b3ce121 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4i46sg3axrlid7e1mcbyg94b5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4o4ep7ym0vb0iwku9pf90m4vf.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4o4ep7ym0vb0iwku9pf90m4vf.o new file mode 100644 index 000000000000..6ee60aa2835d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4o4ep7ym0vb0iwku9pf90m4vf.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4ruxqhv2wd1zq0nb2oef8l8xl.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4ruxqhv2wd1zq0nb2oef8l8xl.o new file mode 100644 index 000000000000..749e65ad6b71 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4ruxqhv2wd1zq0nb2oef8l8xl.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4unt4cl3jje33gsamcyzuwpwu.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4unt4cl3jje33gsamcyzuwpwu.o new file mode 100644 index 000000000000..4430bb565a20 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4unt4cl3jje33gsamcyzuwpwu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4wt7jr7v4qm6bxdssa11kfxih.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4wt7jr7v4qm6bxdssa11kfxih.o new file mode 100644 index 000000000000..d2ae68f050b2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/4wt7jr7v4qm6bxdssa11kfxih.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/529rv85vdrm5s06pvz0w2wt2w.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/529rv85vdrm5s06pvz0w2wt2w.o new file mode 100644 index 000000000000..e52944d5c521 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/529rv85vdrm5s06pvz0w2wt2w.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5a5ye44661qvldvahin6a7n63.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5a5ye44661qvldvahin6a7n63.o new file mode 100644 index 000000000000..2f6fdabea312 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5a5ye44661qvldvahin6a7n63.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5eifigrrjm1vhnvmfsihq425f.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5eifigrrjm1vhnvmfsihq425f.o new file mode 100644 index 000000000000..ab8d5af0d762 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5eifigrrjm1vhnvmfsihq425f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5g4drlfchwph4hq5i7so6s8kq.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5g4drlfchwph4hq5i7so6s8kq.o new file mode 100644 index 000000000000..5fb45a1b6b92 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5g4drlfchwph4hq5i7so6s8kq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5l0sp7de9grd14k69xfoe1fsf.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5l0sp7de9grd14k69xfoe1fsf.o new file mode 100644 index 000000000000..36325204b0ba Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5l0sp7de9grd14k69xfoe1fsf.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5qqm76qarwhb1egbfzmsm5ypd.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5qqm76qarwhb1egbfzmsm5ypd.o new file mode 100644 index 000000000000..32b55e024c04 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5qqm76qarwhb1egbfzmsm5ypd.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5z7mnqjfq8v78e59pbjs6cw28.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5z7mnqjfq8v78e59pbjs6cw28.o new file mode 100644 index 000000000000..27db9f3ea653 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/5z7mnqjfq8v78e59pbjs6cw28.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/65kemtf4reeu6ommd1kqgpqui.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/65kemtf4reeu6ommd1kqgpqui.o new file mode 100644 index 000000000000..36765b933511 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/65kemtf4reeu6ommd1kqgpqui.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6o7i0l8ppyzmz7umoeyvgtfhs.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6o7i0l8ppyzmz7umoeyvgtfhs.o new file mode 100644 index 000000000000..a378f11f7de4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6o7i0l8ppyzmz7umoeyvgtfhs.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6pybmxh6a80pgfpphwyqld8ur.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6pybmxh6a80pgfpphwyqld8ur.o new file mode 100644 index 000000000000..91aa465eafcc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6pybmxh6a80pgfpphwyqld8ur.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6xyb5vwis0n8gbyg5vtvurzmp.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6xyb5vwis0n8gbyg5vtvurzmp.o new file mode 100644 index 000000000000..1ffa551ed812 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/6xyb5vwis0n8gbyg5vtvurzmp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/70pko77uya9nyol7gwafifxr0.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/70pko77uya9nyol7gwafifxr0.o new file mode 100644 index 000000000000..e945f12090f3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/70pko77uya9nyol7gwafifxr0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/73ucasx0j0jc42e3ek5jyvahw.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/73ucasx0j0jc42e3ek5jyvahw.o new file mode 100644 index 000000000000..3ffccb6ab944 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/73ucasx0j0jc42e3ek5jyvahw.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/74osy8sgyp3b7gtz86nym2g2j.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/74osy8sgyp3b7gtz86nym2g2j.o new file mode 100644 index 000000000000..2dd809ac2611 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/74osy8sgyp3b7gtz86nym2g2j.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/76ese356kk79isnhu6g5mwisd.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/76ese356kk79isnhu6g5mwisd.o new file mode 100644 index 000000000000..589433134ccf Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/76ese356kk79isnhu6g5mwisd.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/77ytf2ay43s7evyfvl31eljv7.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/77ytf2ay43s7evyfvl31eljv7.o new file mode 100644 index 000000000000..fecfa6993c3f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/77ytf2ay43s7evyfvl31eljv7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7a4a21aiqiho5pxdoo7976tmr.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7a4a21aiqiho5pxdoo7976tmr.o new file mode 100644 index 000000000000..bac13626ead2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7a4a21aiqiho5pxdoo7976tmr.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7avh92y0xtjxul2yp6kprke5y.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7avh92y0xtjxul2yp6kprke5y.o new file mode 100644 index 000000000000..aa7f23542d40 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7avh92y0xtjxul2yp6kprke5y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7cnblyeoa8ke4epc3jiiqbdic.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7cnblyeoa8ke4epc3jiiqbdic.o new file mode 100644 index 000000000000..911fba26f923 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7cnblyeoa8ke4epc3jiiqbdic.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7lfs6bmkt61kv0470179ndf5l.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7lfs6bmkt61kv0470179ndf5l.o new file mode 100644 index 000000000000..b5d8952f25c4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7lfs6bmkt61kv0470179ndf5l.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7m82dc97u3ojial0ef9bhldrp.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7m82dc97u3ojial0ef9bhldrp.o new file mode 100644 index 000000000000..be868b27e01c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7m82dc97u3ojial0ef9bhldrp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pgumwbixhxuz706bh0cpln0s.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pgumwbixhxuz706bh0cpln0s.o new file mode 100644 index 000000000000..2c60374f0cf4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pgumwbixhxuz706bh0cpln0s.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pwknc1ch4wx7vlxcdswaweuv.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pwknc1ch4wx7vlxcdswaweuv.o new file mode 100644 index 000000000000..9623b2f2fcd2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7pwknc1ch4wx7vlxcdswaweuv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7vi545nu5pvplgfkel0ho9xw8.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7vi545nu5pvplgfkel0ho9xw8.o new file mode 100644 index 000000000000..9ad5a9991762 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/7vi545nu5pvplgfkel0ho9xw8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/82su0azmgitv1batidzfxlzm2.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/82su0azmgitv1batidzfxlzm2.o new file mode 100644 index 000000000000..f78ed2a45b0f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/82su0azmgitv1batidzfxlzm2.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/86kc936mcwbwwc0zw83jqnlw5.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/86kc936mcwbwwc0zw83jqnlw5.o new file mode 100644 index 000000000000..c01defa86e85 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/86kc936mcwbwwc0zw83jqnlw5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8dob2fzkq918jjakk877ikth5.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8dob2fzkq918jjakk877ikth5.o new file mode 100644 index 000000000000..04f639502afc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8dob2fzkq918jjakk877ikth5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8jtnww0k2xulciox8owefuay3.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8jtnww0k2xulciox8owefuay3.o new file mode 100644 index 000000000000..3266c5c48c28 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8jtnww0k2xulciox8owefuay3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8mwnrmwz6ceed13bqzgrkmubb.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8mwnrmwz6ceed13bqzgrkmubb.o new file mode 100644 index 000000000000..35e6a2e15f31 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/8mwnrmwz6ceed13bqzgrkmubb.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/999ix7j99leui0uodhaudmmgk.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/999ix7j99leui0uodhaudmmgk.o new file mode 100644 index 000000000000..e5a93ca5833f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/999ix7j99leui0uodhaudmmgk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/99elrqv9tc1wxepx77a09y2qx.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/99elrqv9tc1wxepx77a09y2qx.o new file mode 100644 index 000000000000..3ba7af5fd703 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/99elrqv9tc1wxepx77a09y2qx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9b79tyoscms50nbv51weeqw94.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9b79tyoscms50nbv51weeqw94.o new file mode 100644 index 000000000000..4b21ae922b78 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9b79tyoscms50nbv51weeqw94.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9kad1o4ka8tfyuf9um7ts5xfs.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9kad1o4ka8tfyuf9um7ts5xfs.o new file mode 100644 index 000000000000..3918683bf212 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9kad1o4ka8tfyuf9um7ts5xfs.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9ujceh836zf3a1ec2vh4bezup.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9ujceh836zf3a1ec2vh4bezup.o new file mode 100644 index 000000000000..39c538c3484c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9ujceh836zf3a1ec2vh4bezup.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9xbl2yk5gv2s1y4kshijnwop1.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9xbl2yk5gv2s1y4kshijnwop1.o new file mode 100644 index 000000000000..741e508c0806 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/9xbl2yk5gv2s1y4kshijnwop1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a0ma6ymi7s5j73f5fo3zps5mv.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a0ma6ymi7s5j73f5fo3zps5mv.o new file mode 100644 index 000000000000..c63ecff193d2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a0ma6ymi7s5j73f5fo3zps5mv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a7a39lm8ijyhk40us2usj2sqo.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a7a39lm8ijyhk40us2usj2sqo.o new file mode 100644 index 000000000000..1d64a76387bc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/a7a39lm8ijyhk40us2usj2sqo.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/aawejdcwd309g44ni2ycnhswx.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/aawejdcwd309g44ni2ycnhswx.o new file mode 100644 index 000000000000..7659919c51ad Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/aawejdcwd309g44ni2ycnhswx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/amkdt0lj0wcq1pqlgotptxmw4.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/amkdt0lj0wcq1pqlgotptxmw4.o new file mode 100644 index 000000000000..c190443e76df Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/amkdt0lj0wcq1pqlgotptxmw4.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/azb63ctsjcu2org3kjilonu6f.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/azb63ctsjcu2org3kjilonu6f.o new file mode 100644 index 000000000000..c84f92030a1f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/azb63ctsjcu2org3kjilonu6f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/b56vkwgyjxze0lu8qqw895ior.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/b56vkwgyjxze0lu8qqw895ior.o new file mode 100644 index 000000000000..f0c20f2618fd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/b56vkwgyjxze0lu8qqw895ior.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bjllbp5xj7fccr0gpi4t4fz4m.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bjllbp5xj7fccr0gpi4t4fz4m.o new file mode 100644 index 000000000000..33f6352790fb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bjllbp5xj7fccr0gpi4t4fz4m.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bmwqw8nazpgjmose8lzukolg1.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bmwqw8nazpgjmose8lzukolg1.o new file mode 100644 index 000000000000..a9698234ba6a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bmwqw8nazpgjmose8lzukolg1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bqizlm7nfmafpf7sabg1gcikr.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bqizlm7nfmafpf7sabg1gcikr.o new file mode 100644 index 000000000000..c8a22d2f877e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bqizlm7nfmafpf7sabg1gcikr.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bslu9f1ekn9gmiekufsj6ccwz.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bslu9f1ekn9gmiekufsj6ccwz.o new file mode 100644 index 000000000000..1395931aebff Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bslu9f1ekn9gmiekufsj6ccwz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bxk6ofqf6ekv1m7pf62n18d3u.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bxk6ofqf6ekv1m7pf62n18d3u.o new file mode 100644 index 000000000000..c6807c342cd1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/bxk6ofqf6ekv1m7pf62n18d3u.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c24lvrfkccl2ki15pkr5k9wjg.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c24lvrfkccl2ki15pkr5k9wjg.o new file mode 100644 index 000000000000..614fcf91d384 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c24lvrfkccl2ki15pkr5k9wjg.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c6ooi14484vr72ivz6pr54c8l.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c6ooi14484vr72ivz6pr54c8l.o new file mode 100644 index 000000000000..bcce15b0f336 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c6ooi14484vr72ivz6pr54c8l.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c8q5bcyx63sroy4vw7yculpxy.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c8q5bcyx63sroy4vw7yculpxy.o new file mode 100644 index 000000000000..4561a8365b0a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c8q5bcyx63sroy4vw7yculpxy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c9kp8or3h2h7uqf66mxhujltn.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c9kp8or3h2h7uqf66mxhujltn.o new file mode 100644 index 000000000000..7a5ca14a6141 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/c9kp8or3h2h7uqf66mxhujltn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ci85bp4k6wlpgg344qm0oecjy.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ci85bp4k6wlpgg344qm0oecjy.o new file mode 100644 index 000000000000..89dece44bcdb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ci85bp4k6wlpgg344qm0oecjy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cwto5frys9kvrsp12uyen6dwc.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cwto5frys9kvrsp12uyen6dwc.o new file mode 100644 index 000000000000..c60d44ee209e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cwto5frys9kvrsp12uyen6dwc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cx87dajbrkce6eixzr68yastg.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cx87dajbrkce6eixzr68yastg.o new file mode 100644 index 000000000000..b5e37e16639d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/cx87dajbrkce6eixzr68yastg.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9elw7y8dc2qa9f6elykptozt.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9elw7y8dc2qa9f6elykptozt.o new file mode 100644 index 000000000000..fbed766ed3de Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9elw7y8dc2qa9f6elykptozt.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9y71rdat3ha7f2w5vv8q2uvc.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9y71rdat3ha7f2w5vv8q2uvc.o new file mode 100644 index 000000000000..7d4f032c8d41 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/d9y71rdat3ha7f2w5vv8q2uvc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dc54ech4cpt24lva34qr5phfe.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dc54ech4cpt24lva34qr5phfe.o new file mode 100644 index 000000000000..6fd5129f61ea Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dc54ech4cpt24lva34qr5phfe.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/deh6oniogqucz3i9mzi748ug0.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/deh6oniogqucz3i9mzi748ug0.o new file mode 100644 index 000000000000..ec664a154e3e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/deh6oniogqucz3i9mzi748ug0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dep-graph.bin new file mode 100644 index 000000000000..67fa6b343417 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/djqfik4q43lo4bgo77v26bg54.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/djqfik4q43lo4bgo77v26bg54.o new file mode 100644 index 000000000000..759fdb5dcd37 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/djqfik4q43lo4bgo77v26bg54.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dx06rkby8on28eszr78g4nnwq.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dx06rkby8on28eszr78g4nnwq.o new file mode 100644 index 000000000000..c99b5607c473 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dx06rkby8on28eszr78g4nnwq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dz5nb5yrvwjcaqjmlk1pv39yr.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dz5nb5yrvwjcaqjmlk1pv39yr.o new file mode 100644 index 000000000000..6bce8706ec17 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/dz5nb5yrvwjcaqjmlk1pv39yr.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e19lp3m59cd53uxveyuhtlklu.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e19lp3m59cd53uxveyuhtlklu.o new file mode 100644 index 000000000000..74e6700af73e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e19lp3m59cd53uxveyuhtlklu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e6exlid1s09vx4z1bvpn4ze83.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e6exlid1s09vx4z1bvpn4ze83.o new file mode 100644 index 000000000000..711cf85fd833 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/e6exlid1s09vx4z1bvpn4ze83.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ebogp50ufehczswgupcdscv9f.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ebogp50ufehczswgupcdscv9f.o new file mode 100644 index 000000000000..511c845190cd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ebogp50ufehczswgupcdscv9f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ec03mr5w9rlmt2t4nfol02auy.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ec03mr5w9rlmt2t4nfol02auy.o new file mode 100644 index 000000000000..c76922b07d49 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/ec03mr5w9rlmt2t4nfol02auy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/es1j5kiev5nspmbpka5vhfrvn.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/es1j5kiev5nspmbpka5vhfrvn.o new file mode 100644 index 000000000000..1fda04c5cc72 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/es1j5kiev5nspmbpka5vhfrvn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/f1unp7o1qip6n6gx8l5rbq3ed.o b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/f1unp7o1qip6n6gx8l5rbq3ed.o new file mode 100644 index 000000000000..fc85620ba232 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/f1unp7o1qip6n6gx8l5rbq3ed.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/query-cache.bin new file mode 100644 index 000000000000..4bc631b3349f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/work-products.bin new file mode 100644 index 000000000000..b8c6ed0c0c12 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci-23529cnkq0dqpa4dyrw292kdx/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci.lock b/service-examples/rust/echo/target/debug/incremental/echo_client-3mjfwyu5la00o/s-hh67g1h4k9-0949aci.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/dep-graph.bin new file mode 100644 index 000000000000..1fc8e0d52b2d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/query-cache.bin new file mode 100644 index 000000000000..bd20dd157c1b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/work-products.bin new file mode 100644 index 000000000000..85e1d98ee553 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5-1tovqhfu57f7orjqlfuih4e43/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5.lock b/service-examples/rust/echo/target/debug/incremental/echo_server-13ixnyeosi0i5/s-hgzguequfe-0xkf9p5.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/00idxfkfvie5b5cihu9dvks10.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/00idxfkfvie5b5cihu9dvks10.o new file mode 100644 index 000000000000..e959c4ce441f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/00idxfkfvie5b5cihu9dvks10.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/09m9ic33j6m9cuolm44vjxgxg.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/09m9ic33j6m9cuolm44vjxgxg.o new file mode 100644 index 000000000000..b8b2f07301dc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/09m9ic33j6m9cuolm44vjxgxg.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0gpxlfsh08xjspkqv7pxtehpp.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0gpxlfsh08xjspkqv7pxtehpp.o new file mode 100644 index 000000000000..63058b9dccf7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0gpxlfsh08xjspkqv7pxtehpp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0odcwrfjfsqv5s7yeyzeo4czo.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0odcwrfjfsqv5s7yeyzeo4czo.o new file mode 100644 index 000000000000..a5f7522f47a9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0odcwrfjfsqv5s7yeyzeo4czo.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0u3t9acshm24tecr7vwgvwoix.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0u3t9acshm24tecr7vwgvwoix.o new file mode 100644 index 000000000000..276c5b9acfee Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/0u3t9acshm24tecr7vwgvwoix.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/15a5tewldhlio3b9df0avh8ee.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/15a5tewldhlio3b9df0avh8ee.o new file mode 100644 index 000000000000..b26fb3f8bb6b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/15a5tewldhlio3b9df0avh8ee.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/18p2c6pvzufmjwa7fw5wr4g8a.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/18p2c6pvzufmjwa7fw5wr4g8a.o new file mode 100644 index 000000000000..1a81fa68fa47 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/18p2c6pvzufmjwa7fw5wr4g8a.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1e8c4m0yz6hzcdps45t3e5726.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1e8c4m0yz6hzcdps45t3e5726.o new file mode 100644 index 000000000000..c207cf2053d4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1e8c4m0yz6hzcdps45t3e5726.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ggp2bi9jf076phx66xug2v2y.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ggp2bi9jf076phx66xug2v2y.o new file mode 100644 index 000000000000..8ce9468f8eb9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ggp2bi9jf076phx66xug2v2y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1gy76d5b5ec8p4h5tjefvain2.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1gy76d5b5ec8p4h5tjefvain2.o new file mode 100644 index 000000000000..790d20989859 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1gy76d5b5ec8p4h5tjefvain2.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ri32zwl451ti2slaej5yvyud.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ri32zwl451ti2slaej5yvyud.o new file mode 100644 index 000000000000..1da67b9a3231 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1ri32zwl451ti2slaej5yvyud.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1t4phsbok7iy9eou0oip4rqot.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1t4phsbok7iy9eou0oip4rqot.o new file mode 100644 index 000000000000..f794c70f88e6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/1t4phsbok7iy9eou0oip4rqot.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/27b7tuamc2dxeaat3h3yfwcry.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/27b7tuamc2dxeaat3h3yfwcry.o new file mode 100644 index 000000000000..3e26e1728b06 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/27b7tuamc2dxeaat3h3yfwcry.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2aqyvyubp60bohgkru2lw1z42.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2aqyvyubp60bohgkru2lw1z42.o new file mode 100644 index 000000000000..4a5b25ae0bf5 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2aqyvyubp60bohgkru2lw1z42.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2c4x6d22a7yqswnk8n21xsw8v.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2c4x6d22a7yqswnk8n21xsw8v.o new file mode 100644 index 000000000000..008d2d8361ec Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2c4x6d22a7yqswnk8n21xsw8v.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2f0jgduh5e8m5msvqir42q1zh.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2f0jgduh5e8m5msvqir42q1zh.o new file mode 100644 index 000000000000..7b8e58ce9981 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2f0jgduh5e8m5msvqir42q1zh.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2hakpx2rc4q2g64f2a6vyq8v9.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2hakpx2rc4q2g64f2a6vyq8v9.o new file mode 100644 index 000000000000..07bee00dd4d3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2hakpx2rc4q2g64f2a6vyq8v9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2wz76xgi41an3mp6t9v6koduy.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2wz76xgi41an3mp6t9v6koduy.o new file mode 100644 index 000000000000..3ff22e0cb851 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2wz76xgi41an3mp6t9v6koduy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2yp0s2yaloughsq4zrr52lc78.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2yp0s2yaloughsq4zrr52lc78.o new file mode 100644 index 000000000000..2c476718f9f6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/2yp0s2yaloughsq4zrr52lc78.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/39edbrc9v7np7ww60del3gy8z.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/39edbrc9v7np7ww60del3gy8z.o new file mode 100644 index 000000000000..99e11ddfe3fb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/39edbrc9v7np7ww60del3gy8z.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3bpmgwdiqbsz1g4809iujzwyp.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3bpmgwdiqbsz1g4809iujzwyp.o new file mode 100644 index 000000000000..d6e660a7c6d4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3bpmgwdiqbsz1g4809iujzwyp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3sv07dvti9ab82eglu6t78qnc.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3sv07dvti9ab82eglu6t78qnc.o new file mode 100644 index 000000000000..d54217cee733 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/3sv07dvti9ab82eglu6t78qnc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/40vz7vo29evr6eyaeiv841ry4.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/40vz7vo29evr6eyaeiv841ry4.o new file mode 100644 index 000000000000..3fdc57ef83c5 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/40vz7vo29evr6eyaeiv841ry4.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/45x8uygetlmait3tmde6mg864.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/45x8uygetlmait3tmde6mg864.o new file mode 100644 index 000000000000..56bdb3b9af17 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/45x8uygetlmait3tmde6mg864.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/46e39xdio4uy5ghik1hakl3o8.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/46e39xdio4uy5ghik1hakl3o8.o new file mode 100644 index 000000000000..f67883c480a1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/46e39xdio4uy5ghik1hakl3o8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4g0a5mnydamkx285y1xv9y880.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4g0a5mnydamkx285y1xv9y880.o new file mode 100644 index 000000000000..e2c7f30f7fa6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4g0a5mnydamkx285y1xv9y880.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4lmvn5bkxhesbhk0da0urc0ra.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4lmvn5bkxhesbhk0da0urc0ra.o new file mode 100644 index 000000000000..4acd0e63a672 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4lmvn5bkxhesbhk0da0urc0ra.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4qxswfaf4fb1k0u2o3seazbz7.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4qxswfaf4fb1k0u2o3seazbz7.o new file mode 100644 index 000000000000..969da0627c00 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4qxswfaf4fb1k0u2o3seazbz7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4u5r6t5jvxqu4hoq3h38fznnx.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4u5r6t5jvxqu4hoq3h38fznnx.o new file mode 100644 index 000000000000..6f10ae1655d3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4u5r6t5jvxqu4hoq3h38fznnx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4xlie6aexrha161npbaauorau.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4xlie6aexrha161npbaauorau.o new file mode 100644 index 000000000000..6a931a1b7365 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/4xlie6aexrha161npbaauorau.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5kjag6twkzz5x5sydh9jnefyd.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5kjag6twkzz5x5sydh9jnefyd.o new file mode 100644 index 000000000000..2294037e5acb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5kjag6twkzz5x5sydh9jnefyd.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5rvoft3cgue3kpdlz2h6g0eb4.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5rvoft3cgue3kpdlz2h6g0eb4.o new file mode 100644 index 000000000000..4936a1a380c2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5rvoft3cgue3kpdlz2h6g0eb4.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5s9nkhcocfjxprtvltdzbvh2u.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5s9nkhcocfjxprtvltdzbvh2u.o new file mode 100644 index 000000000000..009f3ff4abbb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/5s9nkhcocfjxprtvltdzbvh2u.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/65qtlm9mqcxltlyfcsbjn5yzx.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/65qtlm9mqcxltlyfcsbjn5yzx.o new file mode 100644 index 000000000000..a013b625bec1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/65qtlm9mqcxltlyfcsbjn5yzx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/66w9ofkincp4cy9sy4u6ihfag.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/66w9ofkincp4cy9sy4u6ihfag.o new file mode 100644 index 000000000000..fe3767a3f55c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/66w9ofkincp4cy9sy4u6ihfag.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/69r0gpzfl10zqmujnoj0s501h.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/69r0gpzfl10zqmujnoj0s501h.o new file mode 100644 index 000000000000..65977d2620be Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/69r0gpzfl10zqmujnoj0s501h.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6bhnwqu5dxsv5pilfa7rpehki.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6bhnwqu5dxsv5pilfa7rpehki.o new file mode 100644 index 000000000000..7eac9a5b3a8d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6bhnwqu5dxsv5pilfa7rpehki.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6pzb4thgbsyufkq34fw2kk15e.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6pzb4thgbsyufkq34fw2kk15e.o new file mode 100644 index 000000000000..4a56df26dbc9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/6pzb4thgbsyufkq34fw2kk15e.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/77sz91p0946dtomzwfi2vngtk.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/77sz91p0946dtomzwfi2vngtk.o new file mode 100644 index 000000000000..0247187049f0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/77sz91p0946dtomzwfi2vngtk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7a1op2pggvpk7uvnu5if4k69n.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7a1op2pggvpk7uvnu5if4k69n.o new file mode 100644 index 000000000000..125f34a45f5c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7a1op2pggvpk7uvnu5if4k69n.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7m6idjjuqltguaq1iq5ga4vun.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7m6idjjuqltguaq1iq5ga4vun.o new file mode 100644 index 000000000000..2d3912605349 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7m6idjjuqltguaq1iq5ga4vun.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7y0pkp6sxqd6busizf8wo3mnc.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7y0pkp6sxqd6busizf8wo3mnc.o new file mode 100644 index 000000000000..e70042c1f24f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/7y0pkp6sxqd6busizf8wo3mnc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/82qgt1reb4ur8qzdlf8038kt4.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/82qgt1reb4ur8qzdlf8038kt4.o new file mode 100644 index 000000000000..8f410897c0c9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/82qgt1reb4ur8qzdlf8038kt4.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8g1tdy2wyppws70yzlat9313f.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8g1tdy2wyppws70yzlat9313f.o new file mode 100644 index 000000000000..a3f7d4bafe4a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8g1tdy2wyppws70yzlat9313f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8ve7zsohm0mv1c7g4ewxyvr5o.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8ve7zsohm0mv1c7g4ewxyvr5o.o new file mode 100644 index 000000000000..9e953c2d332a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/8ve7zsohm0mv1c7g4ewxyvr5o.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/93bs5x3tk4o1cyvfidokxhu5h.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/93bs5x3tk4o1cyvfidokxhu5h.o new file mode 100644 index 000000000000..5c8d72174288 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/93bs5x3tk4o1cyvfidokxhu5h.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9p9dsr5pnepsfeqdwv9yu77gu.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9p9dsr5pnepsfeqdwv9yu77gu.o new file mode 100644 index 000000000000..6b36d8a15ae4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9p9dsr5pnepsfeqdwv9yu77gu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9uaodf5pbknel9fk9qssya8rd.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9uaodf5pbknel9fk9qssya8rd.o new file mode 100644 index 000000000000..89e1b043447b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9uaodf5pbknel9fk9qssya8rd.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9vwo8nbe5lm37v3emfebuzbtk.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9vwo8nbe5lm37v3emfebuzbtk.o new file mode 100644 index 000000000000..c898c397c8b0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9vwo8nbe5lm37v3emfebuzbtk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9y62alrvhrrl2f64nmfzthxb5.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9y62alrvhrrl2f64nmfzthxb5.o new file mode 100644 index 000000000000..d0a975b0bd33 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/9y62alrvhrrl2f64nmfzthxb5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a4x02fze2oh4fgbxxmhr1h43u.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a4x02fze2oh4fgbxxmhr1h43u.o new file mode 100644 index 000000000000..eb0414de8171 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a4x02fze2oh4fgbxxmhr1h43u.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a8yq85fa188ncumgp6lmimzf1.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a8yq85fa188ncumgp6lmimzf1.o new file mode 100644 index 000000000000..b99b9af23285 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/a8yq85fa188ncumgp6lmimzf1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/acrddquxt3pq3yu6zhps1zwl6.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/acrddquxt3pq3yu6zhps1zwl6.o new file mode 100644 index 000000000000..8776ec238b59 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/acrddquxt3pq3yu6zhps1zwl6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/aix624j2fj0buxlq0v70lcmr2.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/aix624j2fj0buxlq0v70lcmr2.o new file mode 100644 index 000000000000..572e721bf5db Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/aix624j2fj0buxlq0v70lcmr2.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/an3ms0667gw4ui1bn9fm6uft3.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/an3ms0667gw4ui1bn9fm6uft3.o new file mode 100644 index 000000000000..1cbf36bcdef0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/an3ms0667gw4ui1bn9fm6uft3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b871h3gzq2dfs9nmfst8x9ixx.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b871h3gzq2dfs9nmfst8x9ixx.o new file mode 100644 index 000000000000..3152609d998b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b871h3gzq2dfs9nmfst8x9ixx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b8uj3f2ugspx2ij9ig1dvzzbz.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b8uj3f2ugspx2ij9ig1dvzzbz.o new file mode 100644 index 000000000000..d478ae78de2c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/b8uj3f2ugspx2ij9ig1dvzzbz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bcpz5rbw113e79qtyx15hups6.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bcpz5rbw113e79qtyx15hups6.o new file mode 100644 index 000000000000..dedc2123b7af Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bcpz5rbw113e79qtyx15hups6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bhmol12sucgcrktjhhkj6xva0.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bhmol12sucgcrktjhhkj6xva0.o new file mode 100644 index 000000000000..75af12c09f90 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bhmol12sucgcrktjhhkj6xva0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bi2vmosuytia9edsmy8afu7wn.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bi2vmosuytia9edsmy8afu7wn.o new file mode 100644 index 000000000000..6fe33fb8ada7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bi2vmosuytia9edsmy8afu7wn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bimwx4wlfl2jlbgiajr096gxs.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bimwx4wlfl2jlbgiajr096gxs.o new file mode 100644 index 000000000000..6cf4a065a990 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bimwx4wlfl2jlbgiajr096gxs.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bv6xipnj83uxkyed0pui8exz9.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bv6xipnj83uxkyed0pui8exz9.o new file mode 100644 index 000000000000..0b1354509a27 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bv6xipnj83uxkyed0pui8exz9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bw8e24pez09itba7atb9k8owj.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bw8e24pez09itba7atb9k8owj.o new file mode 100644 index 000000000000..656309103486 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bw8e24pez09itba7atb9k8owj.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bwbe0sml9gy9rqy939nyu35vy.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bwbe0sml9gy9rqy939nyu35vy.o new file mode 100644 index 000000000000..bd5e90979625 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/bwbe0sml9gy9rqy939nyu35vy.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c42zqa3ewb3iszebmd9l332dk.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c42zqa3ewb3iszebmd9l332dk.o new file mode 100644 index 000000000000..b77b6652f363 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c42zqa3ewb3iszebmd9l332dk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c77zh6vfssb002eq5xq6txlzu.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c77zh6vfssb002eq5xq6txlzu.o new file mode 100644 index 000000000000..cf84fa3cb63a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/c77zh6vfssb002eq5xq6txlzu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cadtsytupqu05ovab7j3ef1zu.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cadtsytupqu05ovab7j3ef1zu.o new file mode 100644 index 000000000000..534876ef1751 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cadtsytupqu05ovab7j3ef1zu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cchyzme3ooyxu6z23h5cujoww.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cchyzme3ooyxu6z23h5cujoww.o new file mode 100644 index 000000000000..38ce35d24737 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cchyzme3ooyxu6z23h5cujoww.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/ces2xds3e00hy59cnqdl3jrld.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/ces2xds3e00hy59cnqdl3jrld.o new file mode 100644 index 000000000000..53f0ce934bc1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/ces2xds3e00hy59cnqdl3jrld.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cjgj4294wjwguiroa3gjub9sb.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cjgj4294wjwguiroa3gjub9sb.o new file mode 100644 index 000000000000..7e7cb678cc4c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cjgj4294wjwguiroa3gjub9sb.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cvnngpf0lqhn25029vpqqgwuj.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cvnngpf0lqhn25029vpqqgwuj.o new file mode 100644 index 000000000000..b2f9dbe882ee Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cvnngpf0lqhn25029vpqqgwuj.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cyyn5ud799t083mdrkrt9irs8.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cyyn5ud799t083mdrkrt9irs8.o new file mode 100644 index 000000000000..ae8838dace70 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/cyyn5ud799t083mdrkrt9irs8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/czkmgsz1tbazi47im40k2alo9.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/czkmgsz1tbazi47im40k2alo9.o new file mode 100644 index 000000000000..43b1400f3a03 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/czkmgsz1tbazi47im40k2alo9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d7ply26mggvluk0w2i2fi00qh.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d7ply26mggvluk0w2i2fi00qh.o new file mode 100644 index 000000000000..b8a3ef6ea87c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d7ply26mggvluk0w2i2fi00qh.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d97yfjncp1qzuhz04x0nq2r7y.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d97yfjncp1qzuhz04x0nq2r7y.o new file mode 100644 index 000000000000..593d51b944a4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/d97yfjncp1qzuhz04x0nq2r7y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dep-graph.bin new file mode 100644 index 000000000000..d6e5c58697ad Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dlmr5oupzt0nixajlp6r6frlv.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dlmr5oupzt0nixajlp6r6frlv.o new file mode 100644 index 000000000000..345a069a0e3c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dlmr5oupzt0nixajlp6r6frlv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dnh86nnk0a1zejei3mbwhn7em.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dnh86nnk0a1zejei3mbwhn7em.o new file mode 100644 index 000000000000..2064a61636c1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/dnh86nnk0a1zejei3mbwhn7em.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/duzbxw088cvd3rnl2pxlsiflw.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/duzbxw088cvd3rnl2pxlsiflw.o new file mode 100644 index 000000000000..bcfe038246f4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/duzbxw088cvd3rnl2pxlsiflw.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e2u51xekoxqcegly5i4v8935r.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e2u51xekoxqcegly5i4v8935r.o new file mode 100644 index 000000000000..cd41b21b059f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e2u51xekoxqcegly5i4v8935r.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e86uboef4772nkau8gp87024q.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e86uboef4772nkau8gp87024q.o new file mode 100644 index 000000000000..a232a1b6400f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/e86uboef4772nkau8gp87024q.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/edlq881azacc8t6u0mux6h7a9.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/edlq881azacc8t6u0mux6h7a9.o new file mode 100644 index 000000000000..dfe1f9dfa02d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/edlq881azacc8t6u0mux6h7a9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evd95oer04j7175624cjb9r35.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evd95oer04j7175624cjb9r35.o new file mode 100644 index 000000000000..2af82fbab151 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evd95oer04j7175624cjb9r35.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evvm1p7wj4sda61bpu2lfjwep.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evvm1p7wj4sda61bpu2lfjwep.o new file mode 100644 index 000000000000..6dbea2f10884 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/evvm1p7wj4sda61bpu2lfjwep.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/f2ha0rxvjs6am5kdc7jjwhtmt.o b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/f2ha0rxvjs6am5kdc7jjwhtmt.o new file mode 100644 index 000000000000..baf4fa36b635 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/f2ha0rxvjs6am5kdc7jjwhtmt.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/query-cache.bin new file mode 100644 index 000000000000..1aa1867dab1d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/work-products.bin new file mode 100644 index 000000000000..0ad452eb64a6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no-5av1mmdqi7j3jpcvi5si92ijb/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no.lock b/service-examples/rust/echo/target/debug/incremental/echo_server-2xp04p4ylnt9e/s-hh67g1h5n6-1fon1no.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/dep-graph.bin new file mode 100644 index 000000000000..8ebfde7d62c2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/query-cache.bin new file mode 100644 index 000000000000..ef56efa6e174 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/work-products.bin new file mode 100644 index 000000000000..85e1d98ee553 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5-caoli3pmb2hwwihzwrsk3ax5p/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5.lock b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1f79vp7yha50i/s-hgzguelc26-04sj0y5.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0c8vz9emirj1sqyot53wnwozu.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0c8vz9emirj1sqyot53wnwozu.o new file mode 100644 index 000000000000..74ff235ef7fb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0c8vz9emirj1sqyot53wnwozu.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0k7i3etnhmz7t4qreg9bc97wn.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0k7i3etnhmz7t4qreg9bc97wn.o new file mode 100644 index 000000000000..bbd646c53a3d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/0k7i3etnhmz7t4qreg9bc97wn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/159dl0twsffxz8r948aulh6di.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/159dl0twsffxz8r948aulh6di.o new file mode 100644 index 000000000000..ad1c2b3e1891 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/159dl0twsffxz8r948aulh6di.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n4wqqo82244yd3syk8ximdy8.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n4wqqo82244yd3syk8ximdy8.o new file mode 100644 index 000000000000..c99582f93095 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n4wqqo82244yd3syk8ximdy8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n5asz3u7z07zyfk34slgxutg.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n5asz3u7z07zyfk34slgxutg.o new file mode 100644 index 000000000000..cef8a260bc00 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1n5asz3u7z07zyfk34slgxutg.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o09hyz2lhtobdss41vfuwcgq.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o09hyz2lhtobdss41vfuwcgq.o new file mode 100644 index 000000000000..3a2d5d430966 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o09hyz2lhtobdss41vfuwcgq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o6u8pwtuf3nx6hepq7lpfvby.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o6u8pwtuf3nx6hepq7lpfvby.o new file mode 100644 index 000000000000..499b04a4c1fb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/1o6u8pwtuf3nx6hepq7lpfvby.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/23yxwyc9suecv1qgzgngzq35z.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/23yxwyc9suecv1qgzgngzq35z.o new file mode 100644 index 000000000000..78e6a80f232a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/23yxwyc9suecv1qgzgngzq35z.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2jcgzaybyat7od9a2d57pt52d.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2jcgzaybyat7od9a2d57pt52d.o new file mode 100644 index 000000000000..de41f4688cb2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2jcgzaybyat7od9a2d57pt52d.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2tkggodqxh2uudr4h8uetfeks.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2tkggodqxh2uudr4h8uetfeks.o new file mode 100644 index 000000000000..a559cd357f2e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2tkggodqxh2uudr4h8uetfeks.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2zm2at09s0db9z81bx7g96clx.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2zm2at09s0db9z81bx7g96clx.o new file mode 100644 index 000000000000..d33a47574e78 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/2zm2at09s0db9z81bx7g96clx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/31vhz41py0ipt4f623u8smye3.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/31vhz41py0ipt4f623u8smye3.o new file mode 100644 index 000000000000..5bc07c426889 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/31vhz41py0ipt4f623u8smye3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/430w77mc1kxn113omxrxady2i.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/430w77mc1kxn113omxrxady2i.o new file mode 100644 index 000000000000..18e6b73d89ec Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/430w77mc1kxn113omxrxady2i.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/43jk3csl49b805s194luuyat5.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/43jk3csl49b805s194luuyat5.o new file mode 100644 index 000000000000..6411abb6427c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/43jk3csl49b805s194luuyat5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/60kfai29jfld5jjcitlfnvlsd.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/60kfai29jfld5jjcitlfnvlsd.o new file mode 100644 index 000000000000..e9dfd6bc7cf0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/60kfai29jfld5jjcitlfnvlsd.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6t1wmpxpiga2crvbhq9wz76m7.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6t1wmpxpiga2crvbhq9wz76m7.o new file mode 100644 index 000000000000..5957a041a85a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6t1wmpxpiga2crvbhq9wz76m7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6wozldo6ru2b3224bubz3an5b.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6wozldo6ru2b3224bubz3an5b.o new file mode 100644 index 000000000000..27b47300a7b1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/6wozldo6ru2b3224bubz3an5b.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/888a1c8nc8r2by5afy1qj25if.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/888a1c8nc8r2by5afy1qj25if.o new file mode 100644 index 000000000000..051818af1c97 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/888a1c8nc8r2by5afy1qj25if.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ew61qwz3k8zhx1d75i0zzbz0.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ew61qwz3k8zhx1d75i0zzbz0.o new file mode 100644 index 000000000000..799b583126f2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ew61qwz3k8zhx1d75i0zzbz0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ijhyd7tq5e1b58e5l5pqacxj.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ijhyd7tq5e1b58e5l5pqacxj.o new file mode 100644 index 000000000000..c6c26adb46b2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8ijhyd7tq5e1b58e5l5pqacxj.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8uhj89y0imrqat8dtxn69qs26.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8uhj89y0imrqat8dtxn69qs26.o new file mode 100644 index 000000000000..1de5766a7ffe Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/8uhj89y0imrqat8dtxn69qs26.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/90mio0950xu55u5ja12y17y4v.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/90mio0950xu55u5ja12y17y4v.o new file mode 100644 index 000000000000..c84112973967 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/90mio0950xu55u5ja12y17y4v.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/982an6qfb57vb99hg9hcel7hk.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/982an6qfb57vb99hg9hcel7hk.o new file mode 100644 index 000000000000..b39885b84f03 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/982an6qfb57vb99hg9hcel7hk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9qm3n60d1huu27xpye9hajk2f.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9qm3n60d1huu27xpye9hajk2f.o new file mode 100644 index 000000000000..e7e6075fb5dd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9qm3n60d1huu27xpye9hajk2f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9yqd3lkkk7xmojzhpar29kd63.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9yqd3lkkk7xmojzhpar29kd63.o new file mode 100644 index 000000000000..62eaa9dd3dcf Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/9yqd3lkkk7xmojzhpar29kd63.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ahe1yswg2x9jju6iurbr70gok.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ahe1yswg2x9jju6iurbr70gok.o new file mode 100644 index 000000000000..922cb2756b35 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ahe1yswg2x9jju6iurbr70gok.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/be3podtnzodixlac7a90lzl84.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/be3podtnzodixlac7a90lzl84.o new file mode 100644 index 000000000000..2c03dd9287dd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/be3podtnzodixlac7a90lzl84.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/bo5zsj528zqzr7mzwqys9pl1h.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/bo5zsj528zqzr7mzwqys9pl1h.o new file mode 100644 index 000000000000..c445562874ac Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/bo5zsj528zqzr7mzwqys9pl1h.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/c7nk6mm1gn2vqgp1ogl18t7ea.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/c7nk6mm1gn2vqgp1ogl18t7ea.o new file mode 100644 index 000000000000..03591d84176f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/c7nk6mm1gn2vqgp1ogl18t7ea.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ctf89xtw0irtx3pvmo989ld4f.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ctf89xtw0irtx3pvmo989ld4f.o new file mode 100644 index 000000000000..f289667f9057 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/ctf89xtw0irtx3pvmo989ld4f.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dep-graph.bin new file mode 100644 index 000000000000..f7670da7e51a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dkiyrml7odeu9pomjy3l7cnej.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dkiyrml7odeu9pomjy3l7cnej.o new file mode 100644 index 000000000000..0939e6a9aeff Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/dkiyrml7odeu9pomjy3l7cnej.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/e0izndp51yzccqd7fi8m7oyj0.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/e0izndp51yzccqd7fi8m7oyj0.o new file mode 100644 index 000000000000..5143480e09a1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/e0izndp51yzccqd7fi8m7oyj0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/eo0ymduvbs20sonqlt7zx8gdw.o b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/eo0ymduvbs20sonqlt7zx8gdw.o new file mode 100644 index 000000000000..02fbaa9ea672 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/eo0ymduvbs20sonqlt7zx8gdw.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/query-cache.bin new file mode 100644 index 000000000000..c54fa2799b09 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/work-products.bin b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/work-products.bin new file mode 100644 index 000000000000..18e711f47a1d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed-bv30jnzw3ytkhrn515cso5gyf/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed.lock b/service-examples/rust/echo/target/debug/incremental/echo_wire_compat-1trzfasnnapfz/s-hh67g19bqn-0x9jwed.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0pqubb70kr2d6sbs496nqevra.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0pqubb70kr2d6sbs496nqevra.o new file mode 100644 index 000000000000..834b4c5f23d6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0pqubb70kr2d6sbs496nqevra.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0uuia23fcun1op46a6pe0nf7a.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0uuia23fcun1op46a6pe0nf7a.o new file mode 100644 index 000000000000..70683d3804aa Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0uuia23fcun1op46a6pe0nf7a.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0x6v4jyo2o6rktk7twjckxck2.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0x6v4jyo2o6rktk7twjckxck2.o new file mode 100644 index 000000000000..c0bbd1d26e9d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/0x6v4jyo2o6rktk7twjckxck2.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/10kuh3oswuxqd3rlspsnwhc0e.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/10kuh3oswuxqd3rlspsnwhc0e.o new file mode 100644 index 000000000000..be87f15a746a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/10kuh3oswuxqd3rlspsnwhc0e.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/151b8kmqi06y45ibgvin9cd1z.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/151b8kmqi06y45ibgvin9cd1z.o new file mode 100644 index 000000000000..e3c9780256c1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/151b8kmqi06y45ibgvin9cd1z.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1ctwgefsvrawpxva8a5aa6ldh.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1ctwgefsvrawpxva8a5aa6ldh.o new file mode 100644 index 000000000000..52138bdb2136 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1ctwgefsvrawpxva8a5aa6ldh.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1d16ffsdhadup7939flhy5at0.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1d16ffsdhadup7939flhy5at0.o new file mode 100644 index 000000000000..817bf972916f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1d16ffsdhadup7939flhy5at0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1jwawfu0p0h5hsgszl6q2d2zs.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1jwawfu0p0h5hsgszl6q2d2zs.o new file mode 100644 index 000000000000..ec3c8667fd0f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/1jwawfu0p0h5hsgszl6q2d2zs.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/22biw6acbqztjh3oxye2kufzp.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/22biw6acbqztjh3oxye2kufzp.o new file mode 100644 index 000000000000..0e261ceb1197 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/22biw6acbqztjh3oxye2kufzp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/25m1zw103yv93ce5sp8co93k5.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/25m1zw103yv93ce5sp8co93k5.o new file mode 100644 index 000000000000..b195ccb60de9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/25m1zw103yv93ce5sp8co93k5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2ixqlhodgbjzhq4b6qjs8z25g.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2ixqlhodgbjzhq4b6qjs8z25g.o new file mode 100644 index 000000000000..9b5df6f237d9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2ixqlhodgbjzhq4b6qjs8z25g.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2zlg36rl4d9btvfebwpzwtez0.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2zlg36rl4d9btvfebwpzwtez0.o new file mode 100644 index 000000000000..67a0c9b4f49a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/2zlg36rl4d9btvfebwpzwtez0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/30o5rkt5xf22a8eckhvye3yxq.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/30o5rkt5xf22a8eckhvye3yxq.o new file mode 100644 index 000000000000..104f80be5dfa Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/30o5rkt5xf22a8eckhvye3yxq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/31kla8c4i0c2rmary2gybbkh2.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/31kla8c4i0c2rmary2gybbkh2.o new file mode 100644 index 000000000000..d731b7d75c12 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/31kla8c4i0c2rmary2gybbkh2.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3dk4jqfjgi9154usk4qsvik2p.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3dk4jqfjgi9154usk4qsvik2p.o new file mode 100644 index 000000000000..684abdf8942b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3dk4jqfjgi9154usk4qsvik2p.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3g3k4haw4ptyb3bzoy9o6qf8c.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3g3k4haw4ptyb3bzoy9o6qf8c.o new file mode 100644 index 000000000000..584af5ff217b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3g3k4haw4ptyb3bzoy9o6qf8c.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3iconrlin2viwn4pajhqpaf8v.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3iconrlin2viwn4pajhqpaf8v.o new file mode 100644 index 000000000000..175257ebac38 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3iconrlin2viwn4pajhqpaf8v.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3ijg84fpfe0vr6tdm34z1nc2n.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3ijg84fpfe0vr6tdm34z1nc2n.o new file mode 100644 index 000000000000..630f95938662 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3ijg84fpfe0vr6tdm34z1nc2n.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3xwxg6m0owp0xj7i8z236kjla.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3xwxg6m0owp0xj7i8z236kjla.o new file mode 100644 index 000000000000..711f47f4879f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/3xwxg6m0owp0xj7i8z236kjla.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4ac23lef15qdupwrajjblfx9p.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4ac23lef15qdupwrajjblfx9p.o new file mode 100644 index 000000000000..f4a166a9b279 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4ac23lef15qdupwrajjblfx9p.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4pya4913x95rr7mpqaw9c185u.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4pya4913x95rr7mpqaw9c185u.o new file mode 100644 index 000000000000..7615568e0c7a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4pya4913x95rr7mpqaw9c185u.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4uk7nf5mrm9lq4atote3qk6hz.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4uk7nf5mrm9lq4atote3qk6hz.o new file mode 100644 index 000000000000..2ad1620fe7d3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4uk7nf5mrm9lq4atote3qk6hz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4wj6594s7ajlnw65qrgr6x26i.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4wj6594s7ajlnw65qrgr6x26i.o new file mode 100644 index 000000000000..e5d5cf596ffb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/4wj6594s7ajlnw65qrgr6x26i.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/520wxsbbefql15e0wjev2b0ld.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/520wxsbbefql15e0wjev2b0ld.o new file mode 100644 index 000000000000..7b20accc8e86 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/520wxsbbefql15e0wjev2b0ld.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/52fhcu0roetjwgi28rqwkshv6.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/52fhcu0roetjwgi28rqwkshv6.o new file mode 100644 index 000000000000..10621aa9d9a9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/52fhcu0roetjwgi28rqwkshv6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/53mwfghnsgwakknkofhfhlhf1.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/53mwfghnsgwakknkofhfhlhf1.o new file mode 100644 index 000000000000..d8d047e0741d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/53mwfghnsgwakknkofhfhlhf1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/564jm2x2zyp225w5rdqvc5sup.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/564jm2x2zyp225w5rdqvc5sup.o new file mode 100644 index 000000000000..e0a83f3248a6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/564jm2x2zyp225w5rdqvc5sup.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/58g7r5lf6131k50mcts82zy03.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/58g7r5lf6131k50mcts82zy03.o new file mode 100644 index 000000000000..7434ae975abe Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/58g7r5lf6131k50mcts82zy03.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/5t4ncfi6ed0j4u11oiuqhlif9.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/5t4ncfi6ed0j4u11oiuqhlif9.o new file mode 100644 index 000000000000..ab621464cccd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/5t4ncfi6ed0j4u11oiuqhlif9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6ka0xf7fyrlj1nbgt8pwwukz7.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6ka0xf7fyrlj1nbgt8pwwukz7.o new file mode 100644 index 000000000000..e91b9d3c5455 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6ka0xf7fyrlj1nbgt8pwwukz7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6kpi6uiuwzkjobw70b8ntysbi.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6kpi6uiuwzkjobw70b8ntysbi.o new file mode 100644 index 000000000000..562386bd0704 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6kpi6uiuwzkjobw70b8ntysbi.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6p5bes4753n6ttd81ajwkgc9g.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6p5bes4753n6ttd81ajwkgc9g.o new file mode 100644 index 000000000000..9365e5f618f6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6p5bes4753n6ttd81ajwkgc9g.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6pzluk1kmnhsc2w0hii4a4dcc.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6pzluk1kmnhsc2w0hii4a4dcc.o new file mode 100644 index 000000000000..546870b03156 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6pzluk1kmnhsc2w0hii4a4dcc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6qguh86hwpa24k2ldy0zt7lv1.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6qguh86hwpa24k2ldy0zt7lv1.o new file mode 100644 index 000000000000..7a539908949a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6qguh86hwpa24k2ldy0zt7lv1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sc8i4oypjrn9sgy70w16pzrm.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sc8i4oypjrn9sgy70w16pzrm.o new file mode 100644 index 000000000000..33bb7847bf74 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sc8i4oypjrn9sgy70w16pzrm.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sxwn158gsqt1imwrt067d6bp.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sxwn158gsqt1imwrt067d6bp.o new file mode 100644 index 000000000000..80cb4acf2012 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/6sxwn158gsqt1imwrt067d6bp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/71oloqb8k3182blvd9o4ev1gc.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/71oloqb8k3182blvd9o4ev1gc.o new file mode 100644 index 000000000000..7a25313978e4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/71oloqb8k3182blvd9o4ev1gc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7867o8l8d8ueckeu7yldlyx8y.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7867o8l8d8ueckeu7yldlyx8y.o new file mode 100644 index 000000000000..079cda3cb839 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7867o8l8d8ueckeu7yldlyx8y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/78wqvk6u30efhtxsgmrm5e7dq.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/78wqvk6u30efhtxsgmrm5e7dq.o new file mode 100644 index 000000000000..845342777416 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/78wqvk6u30efhtxsgmrm5e7dq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7cpgyovg8glnnkji7oqx7kmdf.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7cpgyovg8glnnkji7oqx7kmdf.o new file mode 100644 index 000000000000..60fcae282419 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7cpgyovg8glnnkji7oqx7kmdf.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7pimxlgavaczfx5eomanmdivq.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7pimxlgavaczfx5eomanmdivq.o new file mode 100644 index 000000000000..48aba26a56ec Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/7pimxlgavaczfx5eomanmdivq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/80d08m04dvcgzso4arm0oh1l3.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/80d08m04dvcgzso4arm0oh1l3.o new file mode 100644 index 000000000000..be6f79123945 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/80d08m04dvcgzso4arm0oh1l3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/8lfgahg24s9f732wl15ho558a.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/8lfgahg24s9f732wl15ho558a.o new file mode 100644 index 000000000000..467a7ca66c11 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/8lfgahg24s9f732wl15ho558a.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/969gra50ra87hibl08apapy4o.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/969gra50ra87hibl08apapy4o.o new file mode 100644 index 000000000000..cf066407df43 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/969gra50ra87hibl08apapy4o.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9r8a13jul73dfvm4gou42qywb.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9r8a13jul73dfvm4gou42qywb.o new file mode 100644 index 000000000000..b2f09d57c9ac Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9r8a13jul73dfvm4gou42qywb.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9yk2sb3xc1pqszhru6axz3684.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9yk2sb3xc1pqszhru6axz3684.o new file mode 100644 index 000000000000..884790a91c31 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/9yk2sb3xc1pqszhru6axz3684.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/a7ofjd997d197mxg0ojkajl41.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/a7ofjd997d197mxg0ojkajl41.o new file mode 100644 index 000000000000..b4f7a27fe3fe Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/a7ofjd997d197mxg0ojkajl41.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/aakuki4ukii7tagd3708egywv.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/aakuki4ukii7tagd3708egywv.o new file mode 100644 index 000000000000..880240503d44 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/aakuki4ukii7tagd3708egywv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/agk5818nt4jjoels4gfbnmwo8.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/agk5818nt4jjoels4gfbnmwo8.o new file mode 100644 index 000000000000..25f0597ec0d9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/agk5818nt4jjoels4gfbnmwo8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/asc4ssys2f2aicq0um6zhbcix.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/asc4ssys2f2aicq0um6zhbcix.o new file mode 100644 index 000000000000..de560b9f3075 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/asc4ssys2f2aicq0um6zhbcix.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b3c8ll6f1xn09qqt32ngsgzc0.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b3c8ll6f1xn09qqt32ngsgzc0.o new file mode 100644 index 000000000000..a06d493e58bb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b3c8ll6f1xn09qqt32ngsgzc0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b7p9jlfizvm4kivz9o96u2tnt.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b7p9jlfizvm4kivz9o96u2tnt.o new file mode 100644 index 000000000000..6057f02b8e39 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/b7p9jlfizvm4kivz9o96u2tnt.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/br4qoqldhwiubczbbfru8khe8.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/br4qoqldhwiubczbbfru8khe8.o new file mode 100644 index 000000000000..0df2b9f2d986 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/br4qoqldhwiubczbbfru8khe8.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/c0o9ic5rh7a4xg0wroginqkxa.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/c0o9ic5rh7a4xg0wroginqkxa.o new file mode 100644 index 000000000000..7cef846c74df Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/c0o9ic5rh7a4xg0wroginqkxa.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/d2zsh3a6iq2hdlvqi8ccefvic.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/d2zsh3a6iq2hdlvqi8ccefvic.o new file mode 100644 index 000000000000..2a730ed9efcd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/d2zsh3a6iq2hdlvqi8ccefvic.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dep-graph.bin new file mode 100644 index 000000000000..e5a470b23bbd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dksbbot18r6wwwv7rwlobr33o.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dksbbot18r6wwwv7rwlobr33o.o new file mode 100644 index 000000000000..175f94ed2405 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dksbbot18r6wwwv7rwlobr33o.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dydoo22ad90bm2i8smmqfdfks.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dydoo22ad90bm2i8smmqfdfks.o new file mode 100644 index 000000000000..4fa96b6279ec Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/dydoo22ad90bm2i8smmqfdfks.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/evrvuz4trofc9wif1g9agvued.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/evrvuz4trofc9wif1g9agvued.o new file mode 100644 index 000000000000..914d69f52d87 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/evrvuz4trofc9wif1g9agvued.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/f1n1p3g3ug1mhoh9sz87qnd5n.o b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/f1n1p3g3ug1mhoh9sz87qnd5n.o new file mode 100644 index 000000000000..a402aa420483 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/f1n1p3g3ug1mhoh9sz87qnd5n.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/query-cache.bin new file mode 100644 index 000000000000..1fc28729615c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/work-products.bin b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/work-products.bin new file mode 100644 index 000000000000..2ade1a0b16c2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56-0gq3vw5og9zgp1shofvpr3v2i/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56.lock b/service-examples/rust/echo/target/debug/incremental/generate_golden-1tz5selptahgm/s-hh67g1h5mv-1y3rf56.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0aridl0gusnaqc32bubjly4ev.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0aridl0gusnaqc32bubjly4ev.o new file mode 100644 index 000000000000..edcdecc3da44 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0aridl0gusnaqc32bubjly4ev.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0en2qs05y6tqtjlcp1tdwdqi6.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0en2qs05y6tqtjlcp1tdwdqi6.o new file mode 100644 index 000000000000..6586a2a6089c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0en2qs05y6tqtjlcp1tdwdqi6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0h1oh3xd6q5ld2132oqafyl8p.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0h1oh3xd6q5ld2132oqafyl8p.o new file mode 100644 index 000000000000..06ad73e91312 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0h1oh3xd6q5ld2132oqafyl8p.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0j55kwajx4y1a233iiasoq3mn.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0j55kwajx4y1a233iiasoq3mn.o new file mode 100644 index 000000000000..becafd4d2fc1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0j55kwajx4y1a233iiasoq3mn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0uyt87b0dn477tuzkxcf6oml6.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0uyt87b0dn477tuzkxcf6oml6.o new file mode 100644 index 000000000000..426341e1cad5 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0uyt87b0dn477tuzkxcf6oml6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0y9yl3f0owyzg668k5glas8yo.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0y9yl3f0owyzg668k5glas8yo.o new file mode 100644 index 000000000000..8376a8fc1d7d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/0y9yl3f0owyzg668k5glas8yo.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/12207c8xtzk9iksrj1n01x9tj.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/12207c8xtzk9iksrj1n01x9tj.o new file mode 100644 index 000000000000..60ade28b9051 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/12207c8xtzk9iksrj1n01x9tj.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1jgobizc1cldk3gxkwi9xx105.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1jgobizc1cldk3gxkwi9xx105.o new file mode 100644 index 000000000000..681dc7d90104 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1jgobizc1cldk3gxkwi9xx105.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1khojw182wxkeq1q7d8ch5sie.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1khojw182wxkeq1q7d8ch5sie.o new file mode 100644 index 000000000000..5959043bb8cf Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1khojw182wxkeq1q7d8ch5sie.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1xv70ejxfgoamdj02b4xhtjl9.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1xv70ejxfgoamdj02b4xhtjl9.o new file mode 100644 index 000000000000..74826784e4c4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/1xv70ejxfgoamdj02b4xhtjl9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/26koe1rt8hvz3ksgdbsbbhrej.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/26koe1rt8hvz3ksgdbsbbhrej.o new file mode 100644 index 000000000000..f0be075a9a73 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/26koe1rt8hvz3ksgdbsbbhrej.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/29gbxra8nvre1ezdd8fnymhk0.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/29gbxra8nvre1ezdd8fnymhk0.o new file mode 100644 index 000000000000..cd5461ab696b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/29gbxra8nvre1ezdd8fnymhk0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ckc0fwrf0genrey0luuz13rj.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ckc0fwrf0genrey0luuz13rj.o new file mode 100644 index 000000000000..9d3ae5e9b060 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ckc0fwrf0genrey0luuz13rj.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ird9ff7vslwkmxvcgznssaa6.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ird9ff7vslwkmxvcgznssaa6.o new file mode 100644 index 000000000000..0e00e28c79b3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ird9ff7vslwkmxvcgznssaa6.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ojp8lafysntg089nqj99h9nm.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ojp8lafysntg089nqj99h9nm.o new file mode 100644 index 000000000000..bc5eee48ad91 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/2ojp8lafysntg089nqj99h9nm.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/341jbiqe9oyin5dms3jfnw1tz.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/341jbiqe9oyin5dms3jfnw1tz.o new file mode 100644 index 000000000000..5e727f1c541b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/341jbiqe9oyin5dms3jfnw1tz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/35cfwfb8tzws8v0lqx3kw3kte.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/35cfwfb8tzws8v0lqx3kw3kte.o new file mode 100644 index 000000000000..f8046a2e9cab Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/35cfwfb8tzws8v0lqx3kw3kte.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/39qgdey6tjktxltd8g7durllb.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/39qgdey6tjktxltd8g7durllb.o new file mode 100644 index 000000000000..c210f92ce319 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/39qgdey6tjktxltd8g7durllb.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3dprnrh7fycxq6y2a1xdnwjyt.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3dprnrh7fycxq6y2a1xdnwjyt.o new file mode 100644 index 000000000000..75c4697d5ae7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3dprnrh7fycxq6y2a1xdnwjyt.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3i2ycjbpju74ap05vwom46pab.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3i2ycjbpju74ap05vwom46pab.o new file mode 100644 index 000000000000..f48f25a7d40c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3i2ycjbpju74ap05vwom46pab.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3oelpet6sfcdbk0ml92bg97ow.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3oelpet6sfcdbk0ml92bg97ow.o new file mode 100644 index 000000000000..1af1894d9df3 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3oelpet6sfcdbk0ml92bg97ow.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3slilnvqwfb6rtg3yl43q0vpz.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3slilnvqwfb6rtg3yl43q0vpz.o new file mode 100644 index 000000000000..4a96143336e0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3slilnvqwfb6rtg3yl43q0vpz.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3tuofox69gha9mt6w3f2vgsm3.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3tuofox69gha9mt6w3f2vgsm3.o new file mode 100644 index 000000000000..a0c4483eb30f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3tuofox69gha9mt6w3f2vgsm3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3v5os1edc5eohfdfn1nexxfdv.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3v5os1edc5eohfdfn1nexxfdv.o new file mode 100644 index 000000000000..6ea326c9ee5d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3v5os1edc5eohfdfn1nexxfdv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3wrezrymxss4gnrbhzua7qfy3.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3wrezrymxss4gnrbhzua7qfy3.o new file mode 100644 index 000000000000..651506787c91 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3wrezrymxss4gnrbhzua7qfy3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3yx8km89qsnyl3zskkk8i0lye.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3yx8km89qsnyl3zskkk8i0lye.o new file mode 100644 index 000000000000..a30d152e73ca Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/3yx8km89qsnyl3zskkk8i0lye.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/43cq9vv3t9pbeoexbyy1phthx.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/43cq9vv3t9pbeoexbyy1phthx.o new file mode 100644 index 000000000000..7c416d11d166 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/43cq9vv3t9pbeoexbyy1phthx.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/46s4zeqs4dxzo24760x9r97i1.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/46s4zeqs4dxzo24760x9r97i1.o new file mode 100644 index 000000000000..7bb4cf2a04e4 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/46s4zeqs4dxzo24760x9r97i1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/48ldl2klry4g3feqztb1ib35y.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/48ldl2klry4g3feqztb1ib35y.o new file mode 100644 index 000000000000..15bfd3fc85cd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/48ldl2klry4g3feqztb1ib35y.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4jmx85heyy0ttwd9g1k2yjhg3.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4jmx85heyy0ttwd9g1k2yjhg3.o new file mode 100644 index 000000000000..b2e421640370 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4jmx85heyy0ttwd9g1k2yjhg3.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4lqg6a0b42rif6sfy5dmzu5q4.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4lqg6a0b42rif6sfy5dmzu5q4.o new file mode 100644 index 000000000000..ac321470cafa Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4lqg6a0b42rif6sfy5dmzu5q4.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4ns4g9z9zf5uu7uhl38dumkfp.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4ns4g9z9zf5uu7uhl38dumkfp.o new file mode 100644 index 000000000000..66eaaba0496f Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4ns4g9z9zf5uu7uhl38dumkfp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4st7mx8c5i9tij5ghghuhvrq5.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4st7mx8c5i9tij5ghghuhvrq5.o new file mode 100644 index 000000000000..936cd4fcd052 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4st7mx8c5i9tij5ghghuhvrq5.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4z6ots8h7q7slwv242msxqz0r.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4z6ots8h7q7slwv242msxqz0r.o new file mode 100644 index 000000000000..2e57c65572b9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/4z6ots8h7q7slwv242msxqz0r.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5aqjmyzisdxo4m3vmqseo03v9.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5aqjmyzisdxo4m3vmqseo03v9.o new file mode 100644 index 000000000000..807f8cd0e520 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5aqjmyzisdxo4m3vmqseo03v9.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5i6kdaynuv5pmgdzh9a9ntvu1.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5i6kdaynuv5pmgdzh9a9ntvu1.o new file mode 100644 index 000000000000..0f50bbeb0971 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5i6kdaynuv5pmgdzh9a9ntvu1.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5jjz7o9umyyn47n17z7b4zhw7.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5jjz7o9umyyn47n17z7b4zhw7.o new file mode 100644 index 000000000000..5751671b283e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5jjz7o9umyyn47n17z7b4zhw7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5m7kkh0eh59lao8xlm10faimq.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5m7kkh0eh59lao8xlm10faimq.o new file mode 100644 index 000000000000..d51643e8fb35 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5m7kkh0eh59lao8xlm10faimq.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5mh9ujvgjqokfbgm0jpjy99fn.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5mh9ujvgjqokfbgm0jpjy99fn.o new file mode 100644 index 000000000000..60443822b01a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/5mh9ujvgjqokfbgm0jpjy99fn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6ifpgsyladd70ztqyacix1rhn.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6ifpgsyladd70ztqyacix1rhn.o new file mode 100644 index 000000000000..d6dc6181208b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6ifpgsyladd70ztqyacix1rhn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s1vj9kyfvhm19qiahkl3iqyn.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s1vj9kyfvhm19qiahkl3iqyn.o new file mode 100644 index 000000000000..933607c913f1 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s1vj9kyfvhm19qiahkl3iqyn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s9qazwbtkvd7pxbdt0ovyacb.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s9qazwbtkvd7pxbdt0ovyacb.o new file mode 100644 index 000000000000..e259185ab26a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6s9qazwbtkvd7pxbdt0ovyacb.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6tf2n8mmmqvcwxro3s801k5tm.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6tf2n8mmmqvcwxro3s801k5tm.o new file mode 100644 index 000000000000..e40474835f5d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6tf2n8mmmqvcwxro3s801k5tm.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6z3h7l03mcxfvrokluddx2fjl.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6z3h7l03mcxfvrokluddx2fjl.o new file mode 100644 index 000000000000..7920294982bf Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/6z3h7l03mcxfvrokluddx2fjl.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7227g9a6wz6pd4fdkol6hkyek.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7227g9a6wz6pd4fdkol6hkyek.o new file mode 100644 index 000000000000..b5848e5b0b8e Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7227g9a6wz6pd4fdkol6hkyek.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7cch5k7omdf0dadjvhxgxz504.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7cch5k7omdf0dadjvhxgxz504.o new file mode 100644 index 000000000000..d3ea1ee894c0 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7cch5k7omdf0dadjvhxgxz504.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7tyeis2i0e92z297uex07bajw.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7tyeis2i0e92z297uex07bajw.o new file mode 100644 index 000000000000..33fd516f4c24 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7tyeis2i0e92z297uex07bajw.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7vqfjtcmkj0ampaybwwfhvn5q.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7vqfjtcmkj0ampaybwwfhvn5q.o new file mode 100644 index 000000000000..8160b5c80c75 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/7vqfjtcmkj0ampaybwwfhvn5q.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/897bg9hiuttpq6bktgajhiqse.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/897bg9hiuttpq6bktgajhiqse.o new file mode 100644 index 000000000000..7ce85043029b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/897bg9hiuttpq6bktgajhiqse.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8i15ub1dnqz5zuoe0jvu78r4v.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8i15ub1dnqz5zuoe0jvu78r4v.o new file mode 100644 index 000000000000..02faae294097 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8i15ub1dnqz5zuoe0jvu78r4v.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8ruh9piikly2am2uszbzhcn9o.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8ruh9piikly2am2uszbzhcn9o.o new file mode 100644 index 000000000000..3c64f25ac597 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/8ruh9piikly2am2uszbzhcn9o.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/92h4gs7z6u7hscaoth0yx7x76.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/92h4gs7z6u7hscaoth0yx7x76.o new file mode 100644 index 000000000000..9362e09e7605 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/92h4gs7z6u7hscaoth0yx7x76.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/944ay3kn5lnws8wjlauuh8t9q.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/944ay3kn5lnws8wjlauuh8t9q.o new file mode 100644 index 000000000000..971db3165893 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/944ay3kn5lnws8wjlauuh8t9q.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9fp9sxo2642mhv5f803c6bs2r.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9fp9sxo2642mhv5f803c6bs2r.o new file mode 100644 index 000000000000..2177b3022982 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9fp9sxo2642mhv5f803c6bs2r.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9r54pb59is5n6bdl6wnyxz7ya.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9r54pb59is5n6bdl6wnyxz7ya.o new file mode 100644 index 000000000000..3aed86c62a49 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9r54pb59is5n6bdl6wnyxz7ya.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9vi7j7a32j2jbdlpfmwirvjxi.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9vi7j7a32j2jbdlpfmwirvjxi.o new file mode 100644 index 000000000000..80e7d5276bc9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/9vi7j7a32j2jbdlpfmwirvjxi.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/arc2dc4jpjxr5sv0lyx0u4erk.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/arc2dc4jpjxr5sv0lyx0u4erk.o new file mode 100644 index 000000000000..669b2cae9ce7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/arc2dc4jpjxr5sv0lyx0u4erk.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/avto5ij4cpfliqqoe56wanaz7.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/avto5ij4cpfliqqoe56wanaz7.o new file mode 100644 index 000000000000..4131e2724db2 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/avto5ij4cpfliqqoe56wanaz7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b38tqq3udmijxenhuyc586a1j.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b38tqq3udmijxenhuyc586a1j.o new file mode 100644 index 000000000000..8b185da7e4ac Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b38tqq3udmijxenhuyc586a1j.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b4kq53frbs8j9kp7mzee9g89m.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b4kq53frbs8j9kp7mzee9g89m.o new file mode 100644 index 000000000000..9b64d5c10cdb Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/b4kq53frbs8j9kp7mzee9g89m.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bax5yzyd6ff1flssyye2ijyln.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bax5yzyd6ff1flssyye2ijyln.o new file mode 100644 index 000000000000..216ec8bd8d09 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bax5yzyd6ff1flssyye2ijyln.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bepni5hx26suwwv6s4pfu9x0z.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bepni5hx26suwwv6s4pfu9x0z.o new file mode 100644 index 000000000000..3c74bfbee853 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bepni5hx26suwwv6s4pfu9x0z.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bmjti797jklvqlal5r7e2iiwp.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bmjti797jklvqlal5r7e2iiwp.o new file mode 100644 index 000000000000..70d04d97b0cd Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bmjti797jklvqlal5r7e2iiwp.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bo38kf421k6i5c4sfw0fmd2mn.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bo38kf421k6i5c4sfw0fmd2mn.o new file mode 100644 index 000000000000..00986142a7da Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bo38kf421k6i5c4sfw0fmd2mn.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bqqu4u091n0xq2gpznkx16w8q.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bqqu4u091n0xq2gpznkx16w8q.o new file mode 100644 index 000000000000..1a5518e3caf7 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bqqu4u091n0xq2gpznkx16w8q.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bzayi257r6hyyn6tj2wnvc4kf.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bzayi257r6hyyn6tj2wnvc4kf.o new file mode 100644 index 000000000000..2f8a158f939d Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/bzayi257r6hyyn6tj2wnvc4kf.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0h9qall3e166p6zfvzlu6m23.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0h9qall3e166p6zfvzlu6m23.o new file mode 100644 index 000000000000..2549d9273e12 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0h9qall3e166p6zfvzlu6m23.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0ri56y8d6n2hwf5q65oux5q7.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0ri56y8d6n2hwf5q65oux5q7.o new file mode 100644 index 000000000000..c84e6ba0ef43 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/c0ri56y8d6n2hwf5q65oux5q7.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/cdcjq554yhya9djun7wgp0uct.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/cdcjq554yhya9djun7wgp0uct.o new file mode 100644 index 000000000000..4abf6bf8afd8 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/cdcjq554yhya9djun7wgp0uct.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d4vy49w6p0lal2ydvnptxn5qc.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d4vy49w6p0lal2ydvnptxn5qc.o new file mode 100644 index 000000000000..60fe31dccc8a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d4vy49w6p0lal2ydvnptxn5qc.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d6ilqohe9nzboof4v3mz61mak.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d6ilqohe9nzboof4v3mz61mak.o new file mode 100644 index 000000000000..9aa93cbb6a9a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/d6ilqohe9nzboof4v3mz61mak.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dep-graph.bin b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dep-graph.bin new file mode 100644 index 000000000000..5bfabcee5e5c Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dep-graph.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dii7auoj6vnrig93xnlmgeypm.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dii7auoj6vnrig93xnlmgeypm.o new file mode 100644 index 000000000000..17e0fb92adf9 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dii7auoj6vnrig93xnlmgeypm.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dkhigfwxouz3dpn8njzm47ilt.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dkhigfwxouz3dpn8njzm47ilt.o new file mode 100644 index 000000000000..0402a18a8f55 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dkhigfwxouz3dpn8njzm47ilt.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dn7er06uawyfivxoecewlyy80.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dn7er06uawyfivxoecewlyy80.o new file mode 100644 index 000000000000..94331de0659b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dn7er06uawyfivxoecewlyy80.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dnkcyhdxaomrla1t9aq1jrtqs.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dnkcyhdxaomrla1t9aq1jrtqs.o new file mode 100644 index 000000000000..de8590f8ceda Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dnkcyhdxaomrla1t9aq1jrtqs.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dq16zg9fv5rd92cwrndpmypr0.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dq16zg9fv5rd92cwrndpmypr0.o new file mode 100644 index 000000000000..20183ad34250 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/dq16zg9fv5rd92cwrndpmypr0.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/eml3t2s6z77iovr7q8b4wsecv.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/eml3t2s6z77iovr7q8b4wsecv.o new file mode 100644 index 000000000000..cd346f4d31e6 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/eml3t2s6z77iovr7q8b4wsecv.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/exrkksrry92ynku0jjbihr99z.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/exrkksrry92ynku0jjbihr99z.o new file mode 100644 index 000000000000..87f2cafa906a Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/exrkksrry92ynku0jjbihr99z.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/f2p3k4yad3q5q0p6gtgunv10k.o b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/f2p3k4yad3q5q0p6gtgunv10k.o new file mode 100644 index 000000000000..375dd37bd69b Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/f2p3k4yad3q5q0p6gtgunv10k.o differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/query-cache.bin b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/query-cache.bin new file mode 100644 index 000000000000..1bf57db488bc Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/query-cache.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/work-products.bin b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/work-products.bin new file mode 100644 index 000000000000..6cc3c7861b72 Binary files /dev/null and b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni-7s1xoqkrh8jkpjf666kw8l0ha/work-products.bin differ diff --git a/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni.lock b/service-examples/rust/echo/target/debug/incremental/golden_test-21fw912kea2c3/s-hh67g1h3n5-0bdixni.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/rust/echo/target/debug/libecho_wire_compat.d b/service-examples/rust/echo/target/debug/libecho_wire_compat.d new file mode 100644 index 000000000000..a52f56d5ecef --- /dev/null +++ b/service-examples/rust/echo/target/debug/libecho_wire_compat.d @@ -0,0 +1 @@ +/mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/target/debug/libecho_wire_compat.rlib: /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_client.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/echo_types.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/error.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/ipc_server.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/generated/uds_backend.rs /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/rust/echo/src/lib.rs diff --git a/service-examples/rust/echo/target/debug/libecho_wire_compat.rlib b/service-examples/rust/echo/target/debug/libecho_wire_compat.rlib new file mode 100644 index 000000000000..8f7f7fc591bc Binary files /dev/null and b/service-examples/rust/echo/target/debug/libecho_wire_compat.rlib differ diff --git a/service-examples/rust/wsdb/Cargo.toml b/service-examples/rust/wsdb/Cargo.toml new file mode 100644 index 000000000000..89a915403bba --- /dev/null +++ b/service-examples/rust/wsdb/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "wsdb-service-example" +version = "0.1.0" +edition = "2021" +description = "Example WSDB service implementation in Rust using codegen" + +[dependencies] +rmp = "0.8" +rmp-serde = "1" +serde = { version = "1", features = ["derive"] } +thiserror = "2" diff --git a/service-examples/rust/wsdb/README.md b/service-examples/rust/wsdb/README.md new file mode 100644 index 000000000000..fdb68399e07f --- /dev/null +++ b/service-examples/rust/wsdb/README.md @@ -0,0 +1,45 @@ +# Rust WSDB Service Example + +Demonstrates building a WSDB service in Rust using the codegen tool. + +## Setup + +```bash +# Generate all bindings (types, client, server, backends, handler stubs) +./generate.sh + +# Build +cargo build +``` + +## Structure + +``` +src/ + generated/ # Always-regenerated by codegen (don't hand-edit) + wsdb_types.rs # Wire types with serialization + wsdb_client.rs # Typed client wrapper + wsdb_server.rs # Server dispatch + backend.rs # Backend trait (template, editable) + error.rs # Error types (template, editable) + uds_backend.rs # UDS transport (template, editable) + ffi_backend.rs # FFI transport (template, editable) + wsdb_handlers.rs # Handler stubs (skeleton, implement these!) + main.rs # Entry point (skeleton, edit as needed) + lib.rs # Module declarations +``` + +## Implementing handlers + +Edit `src/wsdb_handlers.rs` — each `handle_*` function receives a wire command +and returns a wire response. Add your business logic (database, state management, etc.) +to the `WsdbContext` struct. + +## Regenerating after schema changes + +```bash +./generate.sh +``` + +This regenerates types/client/server in `generated/` but does NOT overwrite +your handler implementations or backend templates. diff --git a/service-examples/rust/wsdb/generate.sh b/service-examples/rust/wsdb/generate.sh new file mode 100755 index 000000000000..ce8a7dd26b7f --- /dev/null +++ b/service-examples/rust/wsdb/generate.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Generate WSDB Rust bindings from the committed schema. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CODEGEN="$SCRIPT_DIR/../../../barretenberg/codegen" +SCHEMA="$CODEGEN/schemas/wsdb_schema.json" +NODE_FLAGS="--experimental-strip-types --experimental-transform-types --no-warnings" + +echo "Generating Rust WSDB bindings..." +node $NODE_FLAGS "$CODEGEN/src/generate.ts" \ + --schema "$SCHEMA" \ + --lang rust \ + --out "$SCRIPT_DIR/src/generated" \ + --server --client --uds --ffi \ + --prefix Wsdb \ + --skeleton "$SCRIPT_DIR/src" + +echo "Done. Generated files in src/generated/, skeleton in src/" diff --git a/service-examples/rust/wsdb/src/lib.rs b/service-examples/rust/wsdb/src/lib.rs new file mode 100644 index 000000000000..d63ef4575379 --- /dev/null +++ b/service-examples/rust/wsdb/src/lib.rs @@ -0,0 +1,21 @@ +// WSDB service example — generated + hand-written code. +// +// To regenerate: ./generate.sh +// Then implement the handlers in wsdb_handlers.rs + +pub mod generated { + pub mod wsdb_types; + pub mod wsdb_client; + pub mod wsdb_server; + pub mod backend; + pub mod error; + + #[cfg(feature = "uds")] + pub mod uds_backend; + + #[cfg(feature = "ffi")] + pub mod ffi_backend; +} + +pub use generated::backend::Backend; +pub use generated::error::{BarretenbergError, Result}; diff --git a/service-examples/scripts/run_cross_language_tests.sh b/service-examples/scripts/run_cross_language_tests.sh new file mode 100755 index 000000000000..4ede92a73a8d --- /dev/null +++ b/service-examples/scripts/run_cross_language_tests.sh @@ -0,0 +1,162 @@ +#!/usr/bin/env bash +# +# Cross-language IPC wire compatibility test matrix. +# Tests all server/client language pairs for the echo service. +# +# Usage: ./scripts/run_cross_language_tests.sh +# +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +EXAMPLES_DIR="$(dirname "$SCRIPT_DIR")" +cd "$EXAMPLES_DIR" + +PASS=0 +FAIL=0 +TOTAL=0 + +# Generate types from echo schema using the codegen CLI +"$EXAMPLES_DIR/echo-schema/generate.sh" + +# Build Rust binaries +echo "Building Rust echo binaries..." +(cd rust/echo && cargo build --quiet 2>&1) + +# Build C++ binaries +echo "Building C++ echo binaries..." +MSGPACK_INC="$(cd "$EXAMPLES_DIR/../barretenberg/cpp/build/_deps/msgpack-c/src/msgpack-c/include" 2>/dev/null && pwd)" || true +BB_SERIALIZE="$(cd "$EXAMPLES_DIR/../barretenberg/cpp/src/barretenberg/serialize/msgpack_impl" 2>/dev/null && pwd)" || true +if [ -n "$MSGPACK_INC" ] && [ -d "$MSGPACK_INC" ]; then + CXX_FLAGS="-std=c++20 -I $MSGPACK_INC -I $BB_SERIALIZE -I . -DMSGPACK_NO_BOOST -DMSGPACK_USE_STD_VARIANT_ADAPTOR" + (cd cpp/echo && clang++ $CXX_FLAGS -o echo_server echo_server.cpp 2>&1) + (cd cpp/echo && clang++ $CXX_FLAGS -o echo_client echo_client.cpp 2>&1) + CPP_AVAILABLE=true +else + echo " (skipping C++ — msgpack-c not found, run cmake first)" + CPP_AVAILABLE=false +fi + +# Install TS dependencies if needed +if [ ! -d ts/echo/node_modules ]; then + echo "Installing TS dependencies..." + (cd ts/echo && npm install --no-package-lock --quiet 2>&1) +fi + +# Server/client definitions +# Format: "lang:start_cmd:name" +SERVERS=( + "rust:rust/echo/target/debug/echo_server:Rust" + "ts:npx tsx ts/echo/echo_server.ts:TS" +) +CLIENTS=( + "rust:rust/echo/target/debug/echo_client:Rust" + "ts:npx tsx ts/echo/echo_client.ts:TS" +) + +if [ "$CPP_AVAILABLE" = true ]; then + SERVERS+=("cpp:cpp/echo/echo_server:C++") + CLIENTS+=("cpp:cpp/echo/echo_client:C++") +fi + +# Build Zig binaries +echo "Building Zig echo binaries..." +(cd zig/echo && zig build 2>&1) +SERVERS+=("zig:zig/echo/zig-out/bin/echo_server:Zig") +CLIENTS+=("zig:zig/echo/zig-out/bin/echo_client:Zig") + +run_pair() { + local server_cmd="$1" + local server_name="$2" + local client_cmd="$3" + local client_name="$4" + + TOTAL=$((TOTAL + 1)) + local socket="/tmp/echo-matrix-${server_name}-${client_name}-$$.sock" + + # Start server + $server_cmd --socket "$socket" & + local server_pid=$! + + # Wait for socket (up to 2 seconds) + for i in $(seq 1 20); do + if [ -S "$socket" ]; then break; fi + sleep 0.1 + done + + if [ ! -S "$socket" ]; then + echo " FAIL: server did not create socket" + FAIL=$((FAIL + 1)) + kill $server_pid 2>/dev/null || true + return + fi + + # Run client + if $client_cmd --socket "$socket" 2>/dev/null; then + echo " PASS: $server_name server + $client_name client" + PASS=$((PASS + 1)) + else + echo " FAIL: $server_name server + $client_name client" + FAIL=$((FAIL + 1)) + fi + + # Cleanup + wait $server_pid 2>/dev/null || true + rm -f "$socket" +} + +# --------------------------------------------------------------------------- +# Level 1: Golden file deserialization tests +# --------------------------------------------------------------------------- +echo "=== Golden File Deserialization Tests ===" +echo "" + +# Generate golden files from Rust reference +echo "Generating golden files from Rust reference..." +(cd rust/echo && cargo build --quiet --bin generate_golden 2>&1) +rust/echo/target/debug/generate_golden --output-dir echo-schema/golden 2>/dev/null + +# Rust golden test +echo " Rust:" +if (cd rust/echo && cargo build --quiet --bin golden_test 2>&1) && \ + rust/echo/target/debug/golden_test --golden-dir echo-schema/golden 2>/dev/null; then + echo " PASS" + PASS=$((PASS + 1)) +else + echo " FAIL" + FAIL=$((FAIL + 1)) +fi +TOTAL=$((TOTAL + 1)) + +# TypeScript golden test +echo " TypeScript:" +if npx tsx ts/echo/golden_test.ts 2>/dev/null; then + echo " PASS" + PASS=$((PASS + 1)) +else + echo " FAIL" + FAIL=$((FAIL + 1)) +fi +TOTAL=$((TOTAL + 1)) + +echo "" + +# --------------------------------------------------------------------------- +# Level 2+3: IPC Round-Trip Matrix +# --------------------------------------------------------------------------- +echo "=== Cross-Language Wire Compatibility Matrix ===" +echo "" + +for server_entry in "${SERVERS[@]}"; do + IFS=: read -r _ server_cmd server_name <<< "$server_entry" + for client_entry in "${CLIENTS[@]}"; do + IFS=: read -r _ client_cmd client_name <<< "$client_entry" + run_pair "$server_cmd" "$server_name" "$client_cmd" "$client_name" + done +done + +echo "" +echo "Results: $PASS/$TOTAL passed, $FAIL failed" + +if [ "$FAIL" -gt 0 ]; then + exit 1 +fi diff --git a/service-examples/ts/echo/echo_client.ts b/service-examples/ts/echo/echo_client.ts new file mode 100644 index 000000000000..5d42daf5f04e --- /dev/null +++ b/service-examples/ts/echo/echo_client.ts @@ -0,0 +1,64 @@ +/** + * Echo IPC client (TypeScript) — uses GENERATED types + IPC client template. + * Usage: npx tsx echo_client.ts --socket /tmp/echo.sock + * Exits 0 on success, 1 on failure. + * + * Note: The generated AsyncApi client depends on barretenberg-specific interfaces + * (IMsgpackBackendAsync, BBApiException). For this standalone test we use the + * generated IpcClient template directly with raw call(). + */ +import { IpcClient } from './generated/ipc_client.js'; +import type { + EchoBytesResponse, EchoFieldsResponse, EchoNestedResponse, +} from './generated/echo_types.js'; + +const args = process.argv.slice(2); +const socketIdx = args.indexOf('--socket'); +const socketPath = socketIdx >= 0 ? args[socketIdx + 1] : undefined; +if (!socketPath) { + console.error('Usage: echo_client.ts --socket '); + process.exit(1); +} + +function assertEqual(actual: any, expected: any, label: string) { + const a = JSON.stringify(actual); + const e = JSON.stringify(expected); + if (a !== e) throw new Error(`${label}: expected ${e}, got ${a}`); +} + +async function run() { + const client = await IpcClient.connect(socketPath); + + // Test 1: EchoBytes + const testData = Buffer.from([0xDE, 0xAD, 0xBE, 0xEF, 0x42]); + const [name1, resp1] = await client.call('EchoBytes', { data: testData }) as [string, EchoBytesResponse]; + assertEqual(name1, 'EchoBytesResponse', 'EchoBytes name'); + assertEqual(Buffer.from(resp1.data).toString('hex'), testData.toString('hex'), 'EchoBytes data'); + console.error('echo_client(ts): EchoBytes OK'); + + // Test 2: EchoFields + const [name2, resp2] = await client.call('EchoFields', { a: 42, b: 999999, name: 'hello wire compat' }) as [string, EchoFieldsResponse]; + assertEqual(name2, 'EchoFieldsResponse', 'EchoFields name'); + assertEqual(resp2.a, 42, 'EchoFields a'); + assertEqual(resp2.b, 999999, 'EchoFields b'); + assertEqual(resp2.name, 'hello wire compat', 'EchoFields name field'); + console.error('echo_client(ts): EchoFields OK'); + + // Test 3: EchoNested + const inner = { values: [Buffer.from([1, 2, 3]), Buffer.from([4, 5])], flag: true }; + const [name3, resp3] = await client.call('EchoNested', { inner }) as [string, EchoNestedResponse]; + assertEqual(name3, 'EchoNestedResponse', 'EchoNested name'); + assertEqual(resp3.inner.flag, true, 'EchoNested flag'); + assertEqual(resp3.inner.values.length, 2, 'EchoNested values length'); + console.error('echo_client(ts): EchoNested OK'); + + // Shutdown + await client.call('EchoShutdown', {}); + client.close(); + console.error('echo_client(ts): all tests passed'); +} + +run().catch(e => { + console.error(`echo_client(ts): FAILED: ${e.message}`); + process.exit(1); +}); diff --git a/service-examples/ts/echo/echo_server.ts b/service-examples/ts/echo/echo_server.ts new file mode 100644 index 000000000000..9b9336a20ac6 --- /dev/null +++ b/service-examples/ts/echo/echo_server.ts @@ -0,0 +1,35 @@ +/** + * Echo IPC server (TypeScript) — uses GENERATED dispatch + IPC server template. + * Usage: npx tsx echo_server.ts --socket /tmp/echo.sock + */ +import { createServer } from './generated/ipc_server.js'; +import { dispatch } from './generated/server.js'; +import type { Handler } from './generated/server.js'; +import type { + EchoBytes, EchoBytesResponse, + EchoFields, EchoFieldsResponse, + EchoNested, EchoNestedResponse, +} from './generated/echo_types.js'; + +const args = process.argv.slice(2); +const socketIdx = args.indexOf('--socket'); +const socketPath = socketIdx >= 0 ? args[socketIdx + 1] : undefined; +if (!socketPath) { + console.error('Usage: echo_server.ts --socket '); + process.exit(1); +} + +// Implement the GENERATED Handler interface — echo everything back +const handler: Handler = { + async echoBytes(cmd: EchoBytes): Promise { + return { data: cmd.data }; + }, + async echoFields(cmd: EchoFields): Promise { + return { a: cmd.a, b: cmd.b, name: cmd.name }; + }, + async echoNested(cmd: EchoNested): Promise { + return { inner: cmd.inner }; + }, +}; + +createServer(socketPath, (commandName, payload) => dispatch(handler, commandName, payload)); diff --git a/service-examples/ts/echo/generated/api_types.ts b/service-examples/ts/echo/generated/api_types.ts new file mode 100644 index 000000000000..3a2c013ecca4 --- /dev/null +++ b/service-examples/ts/echo/generated/api_types.ts @@ -0,0 +1,259 @@ +// AUTOGENERATED FILE - DO NOT EDIT + +/** Schema version hash for compatibility checking */ +export const SCHEMA_HASH = 'bb6458c4c159270c9a0e50ec8ad88d1e1c93271550542c7ab148e96adb6460cc'; + +// Type aliases for primitive types +/** 32-byte field element (Fr/Fq). Branded Uint8Array — no arithmetic, just type safety. */ +export type Fr = Uint8Array; +export type Field2 = [Fr, Fr]; + +// Public interfaces (exported) +export interface EchoInner { + values: Uint8Array[]; + flag: boolean | undefined; +} + +export interface EchoBytes { + data: Uint8Array; +} + +export interface EchoFields { + a: number; + b: number; + name: string; +} + +export interface EchoNested { + inner: EchoInner; +} + +export interface EchoShutdown { + +} + +export interface EchoBytesResponse { + data: Uint8Array; +} + +export interface EchoFieldsResponse { + a: number; + b: number; + name: string; +} + +export interface EchoNestedResponse { + inner: EchoInner; +} + +export interface EchoShutdownResponse { + +} + +export interface EchoErrorResponse { + message: string; +} + +// Private Msgpack interfaces (not exported) +interface MsgpackEchoInner { + values: Uint8Array[]; + flag: boolean | undefined; +} + +interface MsgpackEchoBytes { + data: Uint8Array; +} + +interface MsgpackEchoFields { + a: number; + b: number; + name: string; +} + +interface MsgpackEchoNested { + inner: MsgpackEchoInner; +} + +interface MsgpackEchoShutdown { + +} + +interface MsgpackEchoBytesResponse { + data: Uint8Array; +} + +interface MsgpackEchoFieldsResponse { + a: number; + b: number; + name: string; +} + +interface MsgpackEchoNestedResponse { + inner: MsgpackEchoInner; +} + +interface MsgpackEchoShutdownResponse { + +} + +interface MsgpackEchoErrorResponse { + message: string; +} + +// Conversion functions (exported) +export function toEchoInner(o: MsgpackEchoInner): EchoInner { + if (o.values === undefined) { throw new Error("Expected values in EchoInner deserialization"); } + if (o.flag === undefined) { throw new Error("Expected flag in EchoInner deserialization"); }; + return { + values: o.values, + flag: o.flag, + }; +} + +export function toEchoBytes(o: MsgpackEchoBytes): EchoBytes { + if (o.data === undefined) { throw new Error("Expected data in EchoBytes deserialization"); }; + return { + data: o.data, + }; +} + +export function toEchoFields(o: MsgpackEchoFields): EchoFields { + if (o.a === undefined) { throw new Error("Expected a in EchoFields deserialization"); } + if (o.b === undefined) { throw new Error("Expected b in EchoFields deserialization"); } + if (o.name === undefined) { throw new Error("Expected name in EchoFields deserialization"); }; + return { + a: o.a, + b: o.b, + name: o.name, + }; +} + +export function toEchoNested(o: MsgpackEchoNested): EchoNested { + if (o.inner === undefined) { throw new Error("Expected inner in EchoNested deserialization"); }; + return { + inner: toEchoInner(o.inner), + }; +} + +export function toEchoShutdown(o: MsgpackEchoShutdown): EchoShutdown { + return {}; +} + +export function toEchoBytesResponse(o: MsgpackEchoBytesResponse): EchoBytesResponse { + if (o.data === undefined) { throw new Error("Expected data in EchoBytesResponse deserialization"); }; + return { + data: o.data, + }; +} + +export function toEchoFieldsResponse(o: MsgpackEchoFieldsResponse): EchoFieldsResponse { + if (o.a === undefined) { throw new Error("Expected a in EchoFieldsResponse deserialization"); } + if (o.b === undefined) { throw new Error("Expected b in EchoFieldsResponse deserialization"); } + if (o.name === undefined) { throw new Error("Expected name in EchoFieldsResponse deserialization"); }; + return { + a: o.a, + b: o.b, + name: o.name, + }; +} + +export function toEchoNestedResponse(o: MsgpackEchoNestedResponse): EchoNestedResponse { + if (o.inner === undefined) { throw new Error("Expected inner in EchoNestedResponse deserialization"); }; + return { + inner: toEchoInner(o.inner), + }; +} + +export function toEchoShutdownResponse(o: MsgpackEchoShutdownResponse): EchoShutdownResponse { + return {}; +} + +export function toEchoErrorResponse(o: MsgpackEchoErrorResponse): EchoErrorResponse { + if (o.message === undefined) { throw new Error("Expected message in EchoErrorResponse deserialization"); }; + return { + message: o.message, + }; +} + +export function fromEchoInner(o: EchoInner): MsgpackEchoInner { + if (o.values === undefined) { throw new Error("Expected values in EchoInner serialization"); } + if (o.flag === undefined) { throw new Error("Expected flag in EchoInner serialization"); }; + return { + values: o.values, + flag: o.flag, + }; +} + +export function fromEchoBytes(o: EchoBytes): MsgpackEchoBytes { + if (o.data === undefined) { throw new Error("Expected data in EchoBytes serialization"); }; + return { + data: o.data, + }; +} + +export function fromEchoFields(o: EchoFields): MsgpackEchoFields { + if (o.a === undefined) { throw new Error("Expected a in EchoFields serialization"); } + if (o.b === undefined) { throw new Error("Expected b in EchoFields serialization"); } + if (o.name === undefined) { throw new Error("Expected name in EchoFields serialization"); }; + return { + a: o.a, + b: o.b, + name: o.name, + }; +} + +export function fromEchoNested(o: EchoNested): MsgpackEchoNested { + if (o.inner === undefined) { throw new Error("Expected inner in EchoNested serialization"); }; + return { + inner: fromEchoInner(o.inner), + }; +} + +export function fromEchoShutdown(o: EchoShutdown): MsgpackEchoShutdown { + return {}; +} + +export function fromEchoBytesResponse(o: EchoBytesResponse): MsgpackEchoBytesResponse { + if (o.data === undefined) { throw new Error("Expected data in EchoBytesResponse serialization"); }; + return { + data: o.data, + }; +} + +export function fromEchoFieldsResponse(o: EchoFieldsResponse): MsgpackEchoFieldsResponse { + if (o.a === undefined) { throw new Error("Expected a in EchoFieldsResponse serialization"); } + if (o.b === undefined) { throw new Error("Expected b in EchoFieldsResponse serialization"); } + if (o.name === undefined) { throw new Error("Expected name in EchoFieldsResponse serialization"); }; + return { + a: o.a, + b: o.b, + name: o.name, + }; +} + +export function fromEchoNestedResponse(o: EchoNestedResponse): MsgpackEchoNestedResponse { + if (o.inner === undefined) { throw new Error("Expected inner in EchoNestedResponse serialization"); }; + return { + inner: fromEchoInner(o.inner), + }; +} + +export function fromEchoShutdownResponse(o: EchoShutdownResponse): MsgpackEchoShutdownResponse { + return {}; +} + +export function fromEchoErrorResponse(o: EchoErrorResponse): MsgpackEchoErrorResponse { + if (o.message === undefined) { throw new Error("Expected message in EchoErrorResponse serialization"); }; + return { + message: o.message, + }; +} + +// Base API interface +export interface BbApiBase { + echoBytes(command: EchoBytes): Promise; + echoFields(command: EchoFields): Promise; + echoNested(command: EchoNested): Promise; + echoShutdown(command: EchoShutdown): Promise; + destroy(): Promise; +} diff --git a/service-examples/ts/echo/generated/async.ts b/service-examples/ts/echo/generated/async.ts new file mode 100644 index 000000000000..a64717f9af5f --- /dev/null +++ b/service-examples/ts/echo/generated/async.ts @@ -0,0 +1,72 @@ +// AUTOGENERATED FILE - DO NOT EDIT + +import { IMsgpackBackendAsync } from '../../bb_backends/interface.js'; +import { Decoder, Encoder } from 'msgpackr'; +import { BBApiException } from '../../bbapi_exception.js'; +import { BbApiBase, EchoBytes, EchoBytesResponse, EchoFields, EchoFieldsResponse, EchoNested, EchoNestedResponse, EchoShutdown, EchoShutdownResponse, fromEchoBytes, fromEchoFields, fromEchoNested, fromEchoShutdown, toEchoBytesResponse, toEchoFieldsResponse, toEchoNestedResponse, toEchoShutdownResponse } from './api_types.js'; + +async function msgpackCall(backend: IMsgpackBackendAsync, input: any[]) { + const inputBuffer = new Encoder({ useRecords: false }).pack(input); + const encodedResult = await backend.call(inputBuffer); + return new Decoder({ useRecords: false }).unpack(encodedResult); +} + +export class AsyncApi implements BbApiBase { + constructor(protected backend: IMsgpackBackendAsync) {} + + echoBytes(command: EchoBytes): Promise { + const msgpackCommand = fromEchoBytes(command); + return msgpackCall(this.backend, [["EchoBytes", msgpackCommand]]).then(([variantName, result]: [string, any]) => { + if (variantName === 'EchoErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoBytesResponse') { + throw new BBApiException(`Expected variant name 'EchoBytesResponse' but got '${variantName}'`); + } + return toEchoBytesResponse(result); + }); + } + + echoFields(command: EchoFields): Promise { + const msgpackCommand = fromEchoFields(command); + return msgpackCall(this.backend, [["EchoFields", msgpackCommand]]).then(([variantName, result]: [string, any]) => { + if (variantName === 'EchoErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoFieldsResponse') { + throw new BBApiException(`Expected variant name 'EchoFieldsResponse' but got '${variantName}'`); + } + return toEchoFieldsResponse(result); + }); + } + + echoNested(command: EchoNested): Promise { + const msgpackCommand = fromEchoNested(command); + return msgpackCall(this.backend, [["EchoNested", msgpackCommand]]).then(([variantName, result]: [string, any]) => { + if (variantName === 'EchoErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoNestedResponse') { + throw new BBApiException(`Expected variant name 'EchoNestedResponse' but got '${variantName}'`); + } + return toEchoNestedResponse(result); + }); + } + + echoShutdown(command: EchoShutdown): Promise { + const msgpackCommand = fromEchoShutdown(command); + return msgpackCall(this.backend, [["EchoShutdown", msgpackCommand]]).then(([variantName, result]: [string, any]) => { + if (variantName === 'EchoErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoShutdownResponse') { + throw new BBApiException(`Expected variant name 'EchoShutdownResponse' but got '${variantName}'`); + } + return toEchoShutdownResponse(result); + }); + } + + destroy(): Promise { + return this.backend.destroy ? this.backend.destroy() : Promise.resolve(); + } +} diff --git a/service-examples/ts/echo/generated/ipc_client.ts b/service-examples/ts/echo/generated/ipc_client.ts new file mode 100644 index 000000000000..1fbdf761b3b1 --- /dev/null +++ b/service-examples/ts/echo/generated/ipc_client.ts @@ -0,0 +1,58 @@ +/** + * Generic IPC client over Unix Domain Sockets. + * Handles: socket connect, length-prefixed framing, msgpack encode/decode. + * Service-specific typed methods are in the generated wrapper. + */ +import * as net from 'node:net'; +import { Decoder, Encoder } from 'msgpackr'; + +const encoder = new Encoder({ useRecords: false }); +const decoder = new Decoder({ useRecords: false }); + +export class IpcClient { + private conn: net.Socket; + private buffer = Buffer.alloc(0); + + private constructor(conn: net.Socket) { + this.conn = conn; + } + + static async connect(socketPath: string): Promise { + const conn = net.createConnection(socketPath); + await new Promise((resolve, reject) => { + conn.on('connect', resolve); + conn.on('error', reject); + }); + return new IpcClient(conn); + } + + close() { + this.conn.destroy(); + } + + /** Send a command and receive the response. */ + async call(commandName: string, fields: any): Promise<[string, any]> { + const packed = encoder.pack([[commandName, fields]]); + const lenBuf = Buffer.alloc(4); + lenBuf.writeUInt32LE(packed.length, 0); + this.conn.write(lenBuf); + this.conn.write(packed); + + return new Promise((resolve, reject) => { + const onData = (data: Buffer) => { + this.buffer = Buffer.concat([this.buffer, data]); + if (this.buffer.length >= 4) { + const len = this.buffer.readUInt32LE(0); + if (this.buffer.length >= 4 + len) { + this.conn.removeListener('data', onData); + const payload = this.buffer.subarray(4, 4 + len); + this.buffer = this.buffer.subarray(4 + len); + resolve(decoder.unpack(payload) as [string, any]); + } + } + }; + this.conn.on('data', onData); + this.conn.on('error', reject); + }); + } +} diff --git a/service-examples/ts/echo/generated/ipc_server.ts b/service-examples/ts/echo/generated/ipc_server.ts new file mode 100644 index 000000000000..3ef981ba2182 --- /dev/null +++ b/service-examples/ts/echo/generated/ipc_server.ts @@ -0,0 +1,82 @@ +/** + * Generic IPC server over Unix Domain Sockets. + * Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. + * Service-specific dispatch is injected via the dispatchFn parameter. + */ +import * as net from 'node:net'; +import * as fs from 'node:fs'; +import { Decoder, Encoder } from 'msgpackr'; + +const encoder = new Encoder({ useRecords: false }); +const decoder = new Decoder({ useRecords: false }); + +export type DispatchFn = (commandName: string, payload: any) => Promise<[string, any]>; + +export function createServer(socketPath: string, dispatchFn: DispatchFn): { close: () => Promise } { + try { fs.unlinkSync(socketPath); } catch {} + + const server = net.createServer((conn) => { + let buffer = Buffer.alloc(0); + let responseChain: Promise = Promise.resolve(); + + conn.on('data', (data: Buffer) => { + buffer = Buffer.concat([buffer, data]); + + while (buffer.length >= 4) { + const len = buffer.readUInt32LE(0); + if (buffer.length < 4 + len) break; + + const payload = buffer.subarray(4, 4 + len); + buffer = buffer.subarray(4 + len); + + const request = decoder.unpack(payload) as any[]; + const [commandName, fields] = request[0] as [string, any]; + + if (commandName.endsWith('Shutdown')) { + sendResponse(conn, [commandName.replace(/^(.*)$/, '$1Response'), {}]); + setTimeout(() => { + server.close(); + try { fs.unlinkSync(socketPath); } catch {} + }, 50); + return; + } + + const prev = responseChain; + const result = dispatchFn(commandName, fields ?? {}); + responseChain = (async () => { + await prev; + try { + const [name, resp] = await result; + sendResponse(conn, [name, resp]); + } catch (err: any) { + sendResponse(conn, ['ErrorResponse', { message: err.message ?? 'Unknown error' }]); + } + })(); + void responseChain.catch(() => {}); + } + }); + + conn.on('error', () => {}); + }); + + server.listen(socketPath, () => { + console.error(`ipc-server(ts): listening on ${socketPath}`); + }); + + return { + close: () => new Promise(resolve => { + server.close(() => { + try { fs.unlinkSync(socketPath); } catch {} + resolve(); + }); + }), + }; +} + +function sendResponse(conn: net.Socket, response: [string, any]) { + const packed = encoder.pack(response); + const lenBuf = Buffer.alloc(4); + lenBuf.writeUInt32LE(packed.length, 0); + conn.write(lenBuf); + conn.write(packed); +} diff --git a/service-examples/ts/echo/generated/server.ts b/service-examples/ts/echo/generated/server.ts new file mode 100644 index 000000000000..55f9c283140d --- /dev/null +++ b/service-examples/ts/echo/generated/server.ts @@ -0,0 +1,41 @@ +// AUTOGENERATED FILE - DO NOT EDIT +// Server-side dispatch for IPC protocol + +import { EchoBytes, EchoBytesResponse, EchoFields, EchoFieldsResponse, EchoNested, EchoNestedResponse, fromEchoBytesResponse, fromEchoFieldsResponse, fromEchoNestedResponse, toEchoBytes, toEchoFields, toEchoNested } from './api_types.js'; + +/** Handler interface — implement this to serve commands. */ +export interface Handler { + echoBytes(command: EchoBytes): Promise; + echoFields(command: EchoFields): Promise; + echoNested(command: EchoNested): Promise; +} + +/** + * Dispatch a [commandName, payload] pair to the handler. + * Returns [responseName, responsePayload] for serialization. + */ +export async function dispatch( + handler: Handler, + commandName: string, + payload: any, +): Promise<[string, any]> { + switch (commandName) { + case 'EchoBytes': { + const cmd = toEchoBytes(payload); + const result = await handler.echoBytes(cmd); + return ['EchoBytesResponse', fromEchoBytesResponse(result)]; + } + case 'EchoFields': { + const cmd = toEchoFields(payload); + const result = await handler.echoFields(cmd); + return ['EchoFieldsResponse', fromEchoFieldsResponse(result)]; + } + case 'EchoNested': { + const cmd = toEchoNested(payload); + const result = await handler.echoNested(cmd); + return ['EchoNestedResponse', fromEchoNestedResponse(result)]; + } + default: + throw new Error(`Unknown command: ${commandName}`); + } +} diff --git a/service-examples/ts/echo/generated/sync.ts b/service-examples/ts/echo/generated/sync.ts new file mode 100644 index 000000000000..3a493e18f952 --- /dev/null +++ b/service-examples/ts/echo/generated/sync.ts @@ -0,0 +1,68 @@ +// AUTOGENERATED FILE - DO NOT EDIT + +import { IMsgpackBackendSync } from '../../bb_backends/interface.js'; +import { Decoder, Encoder } from 'msgpackr'; +import { BBApiException } from '../../bbapi_exception.js'; +import { BbApiBase, EchoBytes, EchoBytesResponse, EchoFields, EchoFieldsResponse, EchoNested, EchoNestedResponse, EchoShutdown, EchoShutdownResponse, fromEchoBytes, fromEchoFields, fromEchoNested, fromEchoShutdown, toEchoBytesResponse, toEchoFieldsResponse, toEchoNestedResponse, toEchoShutdownResponse } from './api_types.js'; + +function msgpackCall(backend: IMsgpackBackendSync, input: any[]) { + const inputBuffer = new Encoder({ useRecords: false }).pack(input); + const encodedResult = backend.call(inputBuffer); + return new Decoder({ useRecords: false }).unpack(encodedResult); +} + +export class SyncApi { + constructor(protected backend: IMsgpackBackendSync) {} + + echoBytes(command: EchoBytes): EchoBytesResponse { + const msgpackCommand = fromEchoBytes(command); + const [variantName, result] = msgpackCall(this.backend, [["EchoBytes", msgpackCommand]]); + if (variantName === 'ErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoBytesResponse') { + throw new BBApiException(`Expected variant name 'EchoBytesResponse' but got '${variantName}'`); + } + return toEchoBytesResponse(result); + } + + echoFields(command: EchoFields): EchoFieldsResponse { + const msgpackCommand = fromEchoFields(command); + const [variantName, result] = msgpackCall(this.backend, [["EchoFields", msgpackCommand]]); + if (variantName === 'ErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoFieldsResponse') { + throw new BBApiException(`Expected variant name 'EchoFieldsResponse' but got '${variantName}'`); + } + return toEchoFieldsResponse(result); + } + + echoNested(command: EchoNested): EchoNestedResponse { + const msgpackCommand = fromEchoNested(command); + const [variantName, result] = msgpackCall(this.backend, [["EchoNested", msgpackCommand]]); + if (variantName === 'ErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoNestedResponse') { + throw new BBApiException(`Expected variant name 'EchoNestedResponse' but got '${variantName}'`); + } + return toEchoNestedResponse(result); + } + + echoShutdown(command: EchoShutdown): EchoShutdownResponse { + const msgpackCommand = fromEchoShutdown(command); + const [variantName, result] = msgpackCall(this.backend, [["EchoShutdown", msgpackCommand]]); + if (variantName === 'ErrorResponse') { + throw new BBApiException(result.message || 'Unknown error from barretenberg'); + } + if (variantName !== 'EchoShutdownResponse') { + throw new BBApiException(`Expected variant name 'EchoShutdownResponse' but got '${variantName}'`); + } + return toEchoShutdownResponse(result); + } + + destroy(): void { + if (this.backend.destroy) this.backend.destroy(); + } +} diff --git a/service-examples/ts/echo/golden_test.ts b/service-examples/ts/echo/golden_test.ts new file mode 100644 index 000000000000..c48da32470b3 --- /dev/null +++ b/service-examples/ts/echo/golden_test.ts @@ -0,0 +1,116 @@ +/** + * Golden file wire compatibility test (TypeScript). + * + * Verifies that TypeScript can correctly deserialize msgpack data produced by + * the Rust reference implementation (the golden files). This is the critical + * cross-language compatibility check — if TS can read Rust's output, and the + * round-trip tests show Rust can read TS's output, wire compat is proven. + * + * Usage: npx tsx golden_test.ts + * Exits 0 if all pass, 1 on failure. + */ + +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { Decoder } from 'msgpackr'; + +const decoder = new Decoder({ useRecords: false }); +const goldenDir = path.join(import.meta.dirname!, '../../echo-schema', 'golden'); + +let pass = 0; +let fail = 0; + +function assertEqual(actual: any, expected: any, label: string) { + const a = JSON.stringify(actual); + const e = JSON.stringify(expected); + if (a !== e) { + throw new Error(`${label}: expected ${e}, got ${a}`); + } +} + +function bufEqual(a: Uint8Array, b: number[]) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; +} + +function checkGoldenRequest(name: string, expectedCmdName: string, validate: (fields: any) => void) { + try { + const golden = fs.readFileSync(path.join(goldenDir, name)); + const decoded = decoder.unpack(golden) as any[]; + // Request format: [[commandName, {fields}]] + assertEqual(decoded.length, 1, `${name} array length`); + const [cmdName, fields] = decoded[0]; + assertEqual(cmdName, expectedCmdName, `${name} command name`); + validate(fields); + console.log(` PASS: ${name}`); + pass++; + } catch (e: any) { + console.log(` FAIL: ${name}: ${e.message}`); + fail++; + } +} + +function checkGoldenResponse(name: string, expectedRespName: string, validate: (fields: any) => void) { + try { + const golden = fs.readFileSync(path.join(goldenDir, name)); + const decoded = decoder.unpack(golden) as any[]; + // Response format: [responseName, {fields}] + assertEqual(decoded.length, 2, `${name} array length`); + const [respName, fields] = decoded; + assertEqual(respName, expectedRespName, `${name} response name`); + validate(fields); + console.log(` PASS: ${name}`); + pass++; + } catch (e: any) { + console.log(` FAIL: ${name}: ${e.message}`); + fail++; + } +} + +console.log('Golden file deserialization tests (TypeScript):\n'); + +// Request golden files +checkGoldenRequest('echo_bytes_request.msgpack', 'EchoBytes', (f) => { + if (!bufEqual(f.data, [0xDE, 0xAD, 0xBE, 0xEF, 0x42])) { + throw new Error('data mismatch'); + } +}); + +checkGoldenRequest('echo_fields_request.msgpack', 'EchoFields', (f) => { + assertEqual(f.a, 42, 'a'); + assertEqual(f.b, 999999, 'b'); + assertEqual(f.name, 'hello wire compat', 'name'); +}); + +checkGoldenRequest('echo_nested_request.msgpack', 'EchoNested', (f) => { + assertEqual(f.inner.flag, true, 'flag'); + assertEqual(f.inner.values.length, 2, 'values length'); + if (!bufEqual(f.inner.values[0], [1, 2, 3])) throw new Error('values[0] mismatch'); + if (!bufEqual(f.inner.values[1], [4, 5])) throw new Error('values[1] mismatch'); +}); + +// Response golden files +checkGoldenResponse('echo_bytes_response.msgpack', 'EchoBytesResponse', (f) => { + if (!bufEqual(f.data, [0xDE, 0xAD, 0xBE, 0xEF, 0x42])) { + throw new Error('data mismatch'); + } +}); + +checkGoldenResponse('echo_fields_response.msgpack', 'EchoFieldsResponse', (f) => { + assertEqual(f.a, 42, 'a'); + assertEqual(f.b, 999999, 'b'); + assertEqual(f.name, 'hello wire compat', 'name'); +}); + +checkGoldenResponse('echo_nested_response.msgpack', 'EchoNestedResponse', (f) => { + assertEqual(f.inner.flag, true, 'flag'); + assertEqual(f.inner.values.length, 2, 'values length'); + if (!bufEqual(f.inner.values[0], [1, 2, 3])) throw new Error('values[0] mismatch'); + if (!bufEqual(f.inner.values[1], [4, 5])) throw new Error('values[1] mismatch'); +}); + +console.log(`\nResults: ${pass}/${pass + fail} passed, ${fail} failed`); +if (fail > 0) process.exit(1); diff --git a/service-examples/ts/echo/package.json b/service-examples/ts/echo/package.json new file mode 100644 index 000000000000..3f4aaee24171 --- /dev/null +++ b/service-examples/ts/echo/package.json @@ -0,0 +1,8 @@ +{ + "name": "echo-wire-compat-ts", + "private": true, + "type": "module", + "dependencies": { + "msgpackr": "^1.10.0" + } +} diff --git a/service-examples/zig/echo/.zig-cache/h/20e6aa3e975d97e29b2f3577798cdee6.txt b/service-examples/zig/echo/.zig-cache/h/20e6aa3e975d97e29b2f3577798cdee6.txt new file mode 100644 index 000000000000..450b606dfa31 --- /dev/null +++ b/service-examples/zig/echo/.zig-cache/h/20e6aa3e975d97e29b2f3577798cdee6.txt @@ -0,0 +1,842 @@ +0 +2555 13293100791 1774964394127314010 af7b8c503dd3bc7d9e6e9d4fddb44557 0 echo_client.zig +116312 17453079976 1774434465607528606 6c8819762147bc41fbcad5a476b27fea 3 p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem/src/msgpack.zig +22187 2158150032 1755651176000000000 408a2a1c3d712caf2107e3e3dfb7022b 1 ubsan_rt.zig +11083 2158133725 1755651171000000000 3c8016eb348fede9a19b94ec4869d8a6 1 compiler_rt.zig +7957 1358769308 1755651176000000000 0ebbb46b337b65e85e7d177cfc93d2ca 1 std/std.zig +2525 1358747925 1755651176000000000 71e0dabdb301ba10f8ca420941767e70 1 std/BitStack.zig +100782 1358747926 1755651176000000000 93d126516cbe85e7dab1c855c82058cb 1 std/Build.zig +4266 1358747943 1755651176000000000 16fdba428de22eb1305e855dec42f9a9 1 std/buf_map.zig +4526 1358747944 1755651176000000000 8e63f8aad9b21f2cac5dcdcafd975d93 1 std/buf_set.zig +8139 1358747927 1755651176000000000 b344fa05d00dd94ca9bb8e95cc23b3fc 1 std/DoublyLinkedList.zig +25874 1358747952 1755651176000000000 84e0fbf3feb0ac8196cb74e389a3ccb0 1 std/dynamic_library.zig +35271 1358747929 1755651176000000000 0d7d03be6dc0cb75afa123aa4eb4d818 1 std/Io.zig +43556 1358752733 1755651176000000000 5bfaba216d6a1896e7f4b43e7ee7fe1a 1 std/multi_array_list.zig +21416 1358760861 1755651176000000000 4328abc876b82840e689434566876bc7 1 std/priority_queue.zig +33889 1358760856 1755651176000000000 431c78ed77c39d0be4be43c7634c12d0 1 std/priority_dequeue.zig +60600 1358747930 1755651176000000000 518fc21273ed20754da5c332f4c01208 1 std/Progress.zig +17628 1358747931 1755651176000000000 697e28034ef9cf05bb04d3be028a9653 1 std/Random.zig +20351 1358769295 1755651176000000000 41f61f133b5c7661bc5f90889fd39045 1 std/segmented_list.zig +10911 1358747932 1755651176000000000 72379f2cc10c10e56c76ebebd42ca14c 1 std/SemanticVersion.zig +5252 1358747933 1755651176000000000 b2d7e2ffcc15cc25fbc30a3e3799cfba 1 std/SinglyLinkedList.zig +107040 1358747934 1755651176000000000 f931b01a199517a5df7184e98bad442e 1 std/Target.zig +60770 1358747935 1755651176000000000 9d935b7746e443b6cfa58f88eb113dc4 1 std/Thread.zig +24524 1358770048 1755651176000000000 1694ad0602c4425ddf33879d415f4ab1 1 std/treap.zig +31490 1358747936 1755651176000000000 7cd075d309fe4bb3e810216b10d3f0c8 1 std/Uri.zig +95685 1358747938 1755651176000000000 a68eb5aa7a6d2c07cb820b6b5ffa0604 1 std/array_list.zig +119750 1358747937 1755651176000000000 a483a92911be1b36d25671285d410963 1 std/array_hash_map.zig +19425 1358747940 1755651176000000000 09d08e5d80b113466699bf4262b53875 1 std/atomic.zig +24490 1358747941 1755651176000000000 db10a569a8a9a16313103b691a443b4a 1 std/base64.zig +69019 1358747942 1755651176000000000 a44de477fecc990a1381fe54649a934b 1 std/bit_set.zig +39860 1358747945 1755651176000000000 bab8724be90660375455f96475ebd26f 1 std/builtin.zig +360045 1358747946 1755651176000000000 41c881372d765477c751e9b06e39e91f 1 std/c.zig +51742 1358747947 1755651176000000000 a9384cc5046eaeedcb1b30e646b423dc 1 std/coff.zig +372 1358747948 1755651176000000000 b867983786f01e8333e32b633eb10410 1 std/compress.zig +17640 1358769307 1755651176000000000 bd79322afba3cc08000a99c21bfd26d7 1 std/static_string_map.zig +13676 1358747949 1755651176000000000 56a50f35f9d4227c9754ad2bad741de1 1 std/crypto.zig +69500 1358747950 1755651176000000000 f2ac0dce249b308c0c7483a07e9d8c21 1 std/debug.zig +4894 1358747951 1755651176000000000 61fff94fe737bda88edd8ca624c0a93c 1 std/dwarf.zig +65720 1358747953 1755651176000000000 bbe1ed25b53adc620fcc2bcd89a2a536 1 std/elf.zig +57857 1358747954 1755651176000000000 e8bdba1d4814ce140abed00d8ac27c66 1 std/enums.zig +58752 1358747955 1755651176000000000 94d08677478fb7c8fd9ecad13a05a7f6 1 std/fmt.zig +34417 1358747956 1755651176000000000 2d9a528a5756bb811d20d393011711e8 1 std/fs.zig +4919 1358747957 1755651176000000000 9c3f0431c1637a1fc64fa91b0520d1b3 1 std/gpu.zig +4120 1358747958 1755651176000000000 287776a366bc2fa9071678dd14432afc 1 std/hash.zig +80684 1358747959 1755651176000000000 5d2dba5503b8646ccb51c7481cec177d 1 std/hash_map.zig +35783 1358747960 1755651176000000000 291afdd8c7934ab8495ad0cb24e3272b 1 std/heap.zig +39240 1358747961 1755651176000000000 948901b44d7c0b5b43749fa91ebd4552 1 std/http.zig +5465 1358747962 1755651176000000000 050dd347d737c8ab1673d3762b02a7e0 1 std/json.zig +18649 1358747963 1755651176000000000 f1185edfabdd268969ce0577870e98a2 1 std/leb128.zig +8342 1358747964 1755651176000000000 7a79e5053bcf4725fcf9ca5e03c43252 1 std/log.zig +70826 1358747965 1755651176000000000 6a8358e9e839fb48052b1b0c7aa87559 1 std/macho.zig +74776 1358747966 1755651176000000000 d4a0c6126fce11a0cafaea7b313668ac 1 std/math.zig +184945 1358747967 1755651176000000000 780cc406a638f4fee16e04354f8b9612 1 std/mem.zig +39789 1358751424 1755651176000000000 05e33fd489986e7ef7a2114c8f3040d0 1 std/meta.zig +88641 1358752741 1755651176000000000 f046d7172f3a3de58ed9e665b16b72ce 1 std/net.zig +10310 1358753186 1755651176000000000 2384f794189b66c622279a439a06e7a5 1 std/os.zig +2016 1358752763 1755651176000000000 b634eff517218815e970c18230425d31 1 std/once.zig +13947 1358753188 1755651176000000000 4e879b4dee70c859bd0938a160593e4c 1 std/pdb.zig +11147 1358753189 1755651176000000000 67e0f1b41fa1dbada2b0874d26ef4d81 1 std/pie.zig +290871 1358758782 1755651176000000000 0a923dee580fffa1623318e59d0a2b3e 1 std/posix.zig +78344 1358769290 1755651176000000000 b08239d255f89ec21465710fcbc5e908 1 std/process.zig +39596 1358769301 1755651176000000000 338f2628729e859f51865caf708004bc 1 std/sort.zig +23280 1358769300 1755651176000000000 8de2dfb1368f1051037084ba56ea4a97 1 std/simd.zig +16059 1358747939 1755651176000000000 7d6ee226b3aea4e399efa02748582a57 1 std/ascii.zig +42826 1358769309 1755651176000000000 55143931b33969e1e759f8623049586c 1 std/tar.zig +48207 1358769310 1755651176000000000 deee7351dbab0664b3bc9a4bdb2a5d38 1 std/testing.zig +11575 1358769311 1755651176000000000 04290176ff236793a2846b7afe763a99 1 std/time.zig +11173 1358770049 1755651176000000000 a51ee0838574fdd01999198cbeff620f 1 std/tz.zig +85999 1358770050 1755651176000000000 a384b975bb355f986219464058d80145 1 std/unicode.zig +12292 1358770051 1755651176000000000 8757ba546e520503fcc6a58d9b0d0083 1 std/valgrind.zig +17661 1358770054 1755651176000000000 a8988138c7ee50f868cd1db24ab3d1d6 1 std/wasm.zig +37103 1358770055 1755651176000000000 954dfee598538ddb98e9fc105c2e0a39 1 std/zig.zig +26592 1358770056 1755651176000000000 2d4666d88f0c60307ae5724c74a78854 1 std/zip.zig +1242 1358770057 1755651176000000000 c5e5cebc2cfc9353dc65aa5193442b60 1 std/zon.zig +28071 1358769306 1755651176000000000 76d2b688d1d45fbb74ca560efdaac238 1 std/start.zig +5929 8072386496 1755651176000000000 a75e2588e1a73369810b6ba7657e4bfd 1 std/crypto/tlcsprng.zig +59803 1636611718 1755651176000000000 b6406a99c6bcfa6765bfb08eafcbff0d 1 std/Build/Cache.zig +38694 1636611721 1755651176000000000 4bafc6be1344a4b0b4bfce1abc099568 1 std/Build/Step.zig +26376 1636611720 1755651176000000000 bb934510edbc055949ffff1646e5e1e6 1 std/Build/Module.zig +43006 1636611722 1755651176000000000 01457aac972ac3a8e51fa2185c19c1be 1 std/Build/Watch.zig +17168 1636611719 1755651176000000000 907b4dad04e8cdc9fb34a46e35e44fb3 1 std/Build/Fuzz.zig +30748 1636611723 1755651176000000000 5bf5917eafea467894d1bdebd37cc3aa 1 std/Build/WebServer.zig +10407 1636611724 1755651176000000000 219f7675797b83c184e56753dff6542a 1 std/Build/abi.zig +64087 2702453039 1755651176000000000 1ba61be2534ce203f154a61c6565f179 1 std/Io/Reader.zig +106521 2702453040 1755651176000000000 d8e9286f3772f2b52339c5bf9facf601 1 std/Io/Writer.zig +14469 2702453037 1755651176000000000 50460af6b2b24665a01f2798a19968d6 1 std/Io/DeprecatedReader.zig +3660 2702453038 1755651176000000000 667198a0bb922d33d2c2fb81a9a25d30 1 std/Io/DeprecatedWriter.zig +6043 2702453042 1755651176000000000 8a44e6b03e4a42b09a4077448a7c41db 1 std/Io/fixed_buffer_stream.zig +1227 2702453041 1755651176000000000 8e42c53c443deeb5a1d9cd2b1a3dbee7 1 std/Io/counting_reader.zig +5692 2702453044 1755651176000000000 1ef2fac09b5b843536005bd1350d920d 1 std/Io/tty.zig +0 2702453043 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/test.zig +1811 3233988262 1755651176000000000 4f975bd4c885c2b17936c7c15e2a1fa0 1 std/Random/Ascon.zig +2685 3233988263 1755651176000000000 5244bfd5edd68ad074bfdf866029fa86 1 std/Random/ChaCha.zig +6100 3233988264 1755651176000000000 14fb5367ee7128106466c91abe89d828 1 std/Random/Isaac64.zig +2727 3233988265 1755651176000000000 98b129620d81fc551cc2747eb5e93a2d 1 std/Random/Pcg.zig +3242 3233988330 1755651176000000000 13e05c7b4ba6bd757c30dbc6e1520198 1 std/Random/Xoroshiro128.zig +3177 3233988369 1755651176000000000 ece4176296c0d5a4735a0e13195d3e89 1 std/Random/Xoshiro256.zig +3158 3233988267 1755651176000000000 e0b128479f8a117718ec288761f83ac0 1 std/Random/Sfc64.zig +3699 3233988266 1755651176000000000 f562dad96707be48e6745a1f57cbf27c 1 std/Random/RomuTrio.zig +530 3233988268 1755651176000000000 6862d091fadcbbb652464ab10689bd23 1 std/Random/SplitMix64.zig +4526 3233988378 1755651176000000000 8ac3cfca93be2f623ce661fc9fb27686 1 std/Random/ziggurat.zig +0 3233988374 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Random/test.zig +29955 3503343368 1755651176000000000 7abef445358bc9111ee7720810ab2dfe 1 std/Target/Query.zig +106498 3503343369 1755651176000000000 4e1faa0e06f720a8513cc19957f2cd52 1 std/Target/aarch64.zig +104612 3503343370 1755651176000000000 06339133610c2f04ff7073b54ed9f610 1 std/Target/amdgcn.zig +1274 3503343371 1755651176000000000 c251325fefba8d6614a0692c5ceb2eea 1 std/Target/arc.zig +79071 3503343372 1755651176000000000 c8ffd174d8ea40cc06efcf87bf4b657a 1 std/Target/arm.zig +71492 3503343373 1755651176000000000 8dcc898c0cae23c1a6c85b1acad47ada 1 std/Target/avr.zig +2425 3503343374 1755651176000000000 3376bf5f146580e9b3ce5e329a604817 1 std/Target/bpf.zig +77604 3503343375 1755651176000000000 be007dfe415760a79fc1d9d7dc89a548 1 std/Target/csky.zig +18058 3503343377 1755651176000000000 8ccf22d3bcff20d7636d8251948f4618 1 std/Target/hexagon.zig +665 3503343376 1755651176000000000 1dec26e22b22006cd47d45b427f8a00c 1 std/Target/generic.zig +1207 3503343378 1755651176000000000 2119135642c6ce06557e5005da5d27d3 1 std/Target/lanai.zig +6753 3503343379 1755651176000000000 da13f92a1b8d03cc797a3beeaa2922d6 1 std/Target/loongarch.zig +7140 3503343380 1755651176000000000 85a640161b5e75f1b0e44aafa7b2ac12 1 std/Target/m68k.zig +16348 3503343381 1755651176000000000 12a09875d65985836758c030c651b686 1 std/Target/mips.zig +2227 3503343382 1755651176000000000 f424aba074f946c774143fd6a0cc9b02 1 std/Target/msp430.zig +16613 3503343383 1755651176000000000 166964aa1c4340f0f5e8c2079fbe6806 1 std/Target/nvptx.zig +36467 3503343384 1755651176000000000 aba041f244b5c814708cec688ed2ab9b 1 std/Target/powerpc.zig +1396 3503343385 1755651176000000000 11966b944c6a6f5eb378759087686f44 1 std/Target/propeller.zig +90023 3503343386 1755651176000000000 f9c2faa81a8573bbbf95b94084ffd3be 1 std/Target/riscv.zig +30256 3503343387 1755651176000000000 a3772db647d2b9a091f142be3fe81a5a 1 std/Target/s390x.zig +21324 3503359904 1755651176000000000 dff9a38ced436d7efc5afea4972eb822 1 std/Target/sparc.zig +5037 3503359905 1755651176000000000 7a802abba56de166296a02820267f278 1 std/Target/spirv.zig +1276 3503359906 1755651176000000000 320e5694ddc1e4347015e29952472e47 1 std/Target/ve.zig +6517 3503359907 1755651176000000000 1babc8b342fb599193f79f08f76e9463 1 std/Target/wasm.zig +139090 3503359908 1755651176000000000 6c63cbfe59447c9f4755d8b977fd0e4d 1 std/Target/x86.zig +1234 3503359909 1755651176000000000 9977314bd28dc12c6017784ed96cc578 1 std/Target/xcore.zig +1274 3503359910 1755651176000000000 b20b4af52a8974acb1c9cf688822a23c 1 std/Target/xtensa.zig +42124 3769667637 1755651176000000000 a3d49f74bb65b5f4d7a02d5cac8c7afe 1 std/Thread/Futex.zig +9112 3769667642 1755651176000000000 fe6a25bfea2dcf9533b026b4e0846b98 1 std/Thread/ResetEvent.zig +10156 3769667639 1755651176000000000 f3390bd4b6bae3fe12192885ee63130d 1 std/Thread/Mutex.zig +2650 3769667644 1755651176000000000 3ea6f138fe347f9c36c6331f8ba278e3 1 std/Thread/Semaphore.zig +23329 3769667636 1755651176000000000 6fcf321e05d855b3995cb3a50125c3f8 1 std/Thread/Condition.zig +11411 3769667643 1755651176000000000 215e3b4416494f856a25895960f5a4ca 1 std/Thread/RwLock.zig +9540 3769667640 1755651176000000000 628f9bee010911810b3c9193792c6f53 1 std/Thread/Pool.zig +1988 3769667645 1755651176000000000 6793266710d780758ac32c2edcc166a9 1 std/Thread/WaitGroup.zig +59140 4340765711 1755651176000000000 92182faee34134d52a9ad2d0a5a5fb2f 1 std/builtin/assembly.zig +50235 4576346041 1755651176000000000 9708ebe35d8d2550494584ceeba81209 1 std/c/darwin.zig +11274 4576346045 1755651176000000000 09bec7c3f40f6de5099b6d1914d351cf 1 std/c/freebsd.zig +9878 4576346075 1755651176000000000 ab1e53cee5c67832574a9055e0108e66 1 std/c/solaris.zig +6617 4576346072 1755651176000000000 d16786c18fabd57be5a8635a6ef08bb1 1 std/c/netbsd.zig +3875 4576346043 1755651176000000000 907c436f260d11e9f80420d838051111 1 std/c/dragonfly.zig +15535 4576346070 1755651176000000000 43ebba145dd0318d69788910b66220e7 1 std/c/haiku.zig +13681 4576346073 1755651176000000000 06689937d111c195fd6baae889fc720b 1 std/c/openbsd.zig +3099 4576346074 1755651176000000000 6a897bb99820db129b41bc2b5d6046bb 1 std/c/serenity.zig +6341 4845181927 1755651176000000000 33490794e8bee84517ccfebe261d4eae 1 std/compress/flate.zig +3010 4845181929 1755651176000000000 e6aae4a5afa281030d98b006a53807e0 1 std/compress/lzma.zig +894 4845181930 1755651176000000000 0112dea02a7ad758670754ecb2e3ff09 1 std/compress/lzma2.zig +5317 4845181932 1755651176000000000 23792685eae819b737bc8922607d4ba7 1 std/compress/xz.zig +6605 4845181933 1755651176000000000 295f3b5136806a9f26e893c51e33025d 1 std/compress/zstd.zig +10441 8072380959 1755651176000000000 b922de5f94704738f619903775fecb17 1 std/crypto/timing_safe.zig +47614 8072380895 1755651176000000000 a03a980a4a1a9a95bf94441f8c307101 1 std/crypto/aegis.zig +6851 8072380897 1755651176000000000 ea7fad6fda828c72abcc0148e4659e9c 1 std/crypto/aes_gcm.zig +14129 8072380898 1755651176000000000 65b51cb2f9dda41995f89b221db5507e 1 std/crypto/aes_ocb.zig +51909 8072380912 1755651176000000000 451cb3546d86929665419cd05bea0293 1 std/crypto/chacha20.zig +6309 8072380923 1755651176000000000 1318dc8b9450bda7d30b2f2bd66ef98f 1 std/crypto/isap.zig +27260 8072380931 1755651176000000000 b95f25fd28a65f6f71761d12efaee503 1 std/crypto/salsa20.zig +3626 8072380922 1755651176000000000 7d28bd5a64f521b7f7322612e4d5f562 1 std/crypto/hmac.zig +18629 8072380957 1755651176000000000 0ee80c1bcfed0bfc7fe20c0fd3c04d22 1 std/crypto/siphash.zig +6226 8072380914 1755651176000000000 4270e1555211de4aca948cd086fc7129 1 std/crypto/cmac.zig +8993 8072380896 1755651176000000000 1565baef5de85c1722fc1f3661e7418c 1 std/crypto/aes.zig +15303 8072380924 1755651176000000000 ac2b7ab43674f07a4208ffa738f420c5 1 std/crypto/keccak_p.zig +9666 8072380907 1755651176000000000 bfcf52448d42cda00bcaa777deca80cf 1 std/crypto/ascon.zig +2303 8072380927 1755651176000000000 64e2696fd33ff024c44aee16a197afac 1 std/crypto/modes.zig +8666 8345434072 1755651176000000000 3f63b88b98e1cb4a076af7d105c52b5f 1 std/crypto/25519/x25519.zig +65291 8072380926 1755651176000000000 d602189df4b86e3751c21259bc485f24 1 std/crypto/ml_kem.zig +8492 8345434063 1755651176000000000 1ad8b856fa664e2584776361ba03bdc0 1 std/crypto/25519/curve25519.zig +25932 8345434068 1755651176000000000 a2d994ac2ed36751f95ac92b85a4931d 1 std/crypto/25519/edwards25519.zig +16174 10483472283 1755651176000000000 1624d5389942bffd6016dc87453db0b7 1 std/crypto/pcurves/p256.zig +16370 10483472284 1755651176000000000 c7fb645fa9fd8e26db3c4252856cdc9d 1 std/crypto/pcurves/p384.zig +7971 8345434070 1755651176000000000 d0d33655dcbd80c50d53283108a54034 1 std/crypto/25519/ristretto255.zig +20520 10483472285 1755651176000000000 e8ead8fcc9affae7d203ecb87a0e8236 1 std/crypto/pcurves/secp256k1.zig +29319 8072380910 1755651176000000000 30d94c7ccda432eb5df2b6e7c68e0c35 1 std/crypto/blake2.zig +41428 8072380911 1755651176000000000 711b0501d46a7c267b6f90ee8be3aacd 1 std/crypto/blake3.zig +9751 8072380925 1755651176000000000 d4911af79a2684c60a4325e9142b1609 1 std/crypto/md5.zig +9321 8072380894 1755651176000000000 15ebe6e9b9de51b93b00e1b463f00cb4 1 std/crypto/Sha1.zig +36825 8072380934 1755651176000000000 bfc45b688f4f79b09cd3fa2ec3ce7a9e 1 std/crypto/sha2.zig +35726 8072380956 1755651176000000000 74ba21545a132750f9a4eef5a37da502 1 std/crypto/sha3.zig +2756 8072380920 1755651176000000000 3f1b15f01d5b6045525b1b5b73081e67 1 std/crypto/hash_composition.zig +3703 8072380921 1755651176000000000 09d36564cbdc5d24ea6fa90e4b7dd6e5 1 std/crypto/hkdf.zig +20494 8072380919 1755651176000000000 c857473fa22ec9e817a3c52e298e2eec 1 std/crypto/ghash_polyval.zig +7259 8072380930 1755651176000000000 1b5aed273103196d0bdc885bc2b6ec2c 1 std/crypto/poly1305.zig +28906 8072380900 1755651176000000000 da61f4b2f151f214129e329fd7af44dc 1 std/crypto/argon2.zig +37669 8072380908 1755651176000000000 147c9e47e9a5a805c79882ce141f1fad 1 std/crypto/bcrypt.zig +25878 8072380932 1755651176000000000 21725e7f671298d416186499754301ea 1 std/crypto/scrypt.zig +8451 8072380928 1755651176000000000 e0bc6ddf2119b9cfe2a19626ded9635a 1 std/crypto/pbkdf2.zig +13838 8072380929 1755651176000000000 7867fa74be498feed958e4107163a822 1 std/crypto/phc_encoding.zig +31401 8345434067 1755651176000000000 727ee4c7eeb22bc4a90a96437f332593 1 std/crypto/25519/ed25519.zig +395201 8072380916 1755651176000000000 4f4d382c531f90a2b4550ea4207a4d70 1 std/crypto/ecdsa.zig +38465 8072380918 1755651176000000000 5ec16eac7226fcb11dbfeba8f371ee79 1 std/crypto/ff.zig +165 8072380915 1755651176000000000 0ab9a19cc7544d7896d8555b38c3292a 1 std/crypto/codecs.zig +1715 8072380917 1755651176000000000 f0b8832dd923baeda761e9855ed9d1ab 1 std/crypto/errors.zig +25575 8072386497 1755651176000000000 05de4a472e23ccd4ece1a15329fc0dcb 1 std/crypto/tls.zig +50895 8072380893 1755651176000000000 37739975874d2d5867dbd6043614417c 1 std/crypto/Certificate.zig +4783 12094458721 1755651176000000000 bcebc8664d30ed61fbe6f4f52df7e6c8 1 std/debug/MemoryAccessor.zig +2664 12094458719 1755651176000000000 d18c45d7c3943d59326b6215041f7b9b 1 std/debug/FixedBufferReader.zig +95718 12094458718 1755651176000000000 031ee6c2142eb78ee4d751fdef4e8aee 1 std/debug/Dwarf.zig +22200 12094458722 1755651176000000000 cadc751a24d7fe6cd0045c67d91fccc4 1 std/debug/Pdb.zig +90918 12094458723 1755651176000000000 1af6e89bf60261270c63c0b89b93dbe4 1 std/debug/SelfInfo.zig +2274 12094458720 1755651176000000000 a1cbdaf27c5043ba4157f3a1bfcd68fd 1 std/debug/Info.zig +8486 12094458717 1755651176000000000 2ff9c5b27e3411a59088d247231e9d0f 1 std/debug/Coverage.zig +3221 12094458725 1755651176000000000 ff7b6d80307d98046c1a6b71ce9736cb 1 std/debug/simple_panic.zig +2349 12094458724 1755651176000000000 58f6d8954e49f4e277db7b9bad6e1f3c 1 std/debug/no_panic.zig +3939 12626842388 1755651176000000000 5ee5df976eaaf300e36cd234fc3f2f43 1 std/dwarf/TAG.zig +7632 12626842380 1755651176000000000 101aeaf3e9df594bf04093c15135dc96 1 std/dwarf/AT.zig +5693 12626842387 1755651176000000000 01d731f8d28ba8382ff3c5885d5e0c75 1 std/dwarf/OP.zig +1963 12626842386 1755651176000000000 055280c08a34f56d3d4ea7d69cf3fca3 1 std/dwarf/LANG.zig +1399 12626842385 1755651176000000000 40a7d4ac60d12c6e9ca294acaed35474 1 std/dwarf/FORM.zig +1479 12626842382 1755651176000000000 8bd901aaa561652b86f99819d0da7a57 1 std/dwarf/ATE.zig +643 12626842384 1755651176000000000 6f6a9e4e1602df062ad02179710971c4 1 std/dwarf/EH.zig +94944 12899024245 1755651176000000000 f351cb76a2427938af1d074abce787ce 1 std/fmt/float.zig +13189 12899024262 1755651176000000000 8fcd1365fb1fe2c743d223fc34880b6a 1 std/fmt/parse_float.zig +2845 13703306145 1755651176000000000 4f058fd80be3876870bc26a123c9de42 1 std/fs/AtomicFile.zig +114999 13703306146 1755651176000000000 a44f3eadd8cf27aad7b7c047f184c8e7 1 std/fs/Dir.zig +86478 13703306147 1755651176000000000 995d0bf84e899044cc3510a9ca641329 1 std/fs/File.zig +78108 13703306149 1755651176000000000 be1cf725a1de08084d5bf813f6758d74 1 std/fs/path.zig +1888 13703306151 1755651176000000000 2c143a188f1f9a5e0b6cf6eb3a2a3825 1 std/fs/wasi.zig +2665 13703306148 1755651176000000000 a74f4aed0521f238f302bbce59933ebd 1 std/fs/get_app_data_dir.zig +0 13703306150 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/fs/test.zig +2797 14239609756 1755651176000000000 e2d2903d78455f002bdf1543be5bd9b3 1 std/hash/Adler32.zig +14624 14239609757 1755651176000000000 5d40bb3c14d452873d2170a0dc501e12 1 std/hash/auto_hash.zig +19972 14239609762 1755651176000000000 c36dede4b91e35db37ea45c66dbe6fe9 1 std/hash/crc.zig +1890 14239609765 1755651176000000000 8022a7844b1545ef9cc7889a3a71944a 1 std/hash/fnv.zig +9977 14239609766 1755651176000000000 26add2cb2571b835338f163c8ca63459 1 std/hash/murmur.zig +12412 14239609760 1755651176000000000 cd681dc3507b42839b769eae04b1dc3b 1 std/hash/cityhash.zig +8367 14239609768 1755651176000000000 4744eb583f951c0ddcee1cf3bdde33fb 1 std/hash/wyhash.zig +41799 14239609769 1755651176000000000 ee3e90d0630039df9f6254b022ce80e1 1 std/hash/xxhash.zig +13560 14783155617 1755651176000000000 12f037849d64048bd40c550289bf0826 1 std/heap/arena_allocator.zig +7465 14783155614 1755651176000000000 c45d8aa65e37758c03dbedc65850dbf5 1 std/heap/SmpAllocator.zig +7575 14783155612 1755651176000000000 b8819311409154f2ecf659e0c1e915b6 1 std/heap/FixedBufferAllocator.zig +8217 14783155613 1755651176000000000 fb438f5e75bc8857d9d1a5b0e9421e85 1 std/heap/PageAllocator.zig +7469 14783155620 1755651176000000000 d0066bdd4d2784177387f85d9c416259 1 std/heap/sbrk_allocator.zig +1681 14783155615 1755651176000000000 720fc81adedeb4b35463081496f20d4a 1 std/heap/ThreadSafeAllocator.zig +10472 14783155616 1755651176000000000 21ee044c07f5991f129755da06deea5a 1 std/heap/WasmAllocator.zig +59918 14783155618 1755651176000000000 552ab3f08dc9b1a495663dc5b84ab562 1 std/heap/debug_allocator.zig +8049 14783155619 1755651176000000000 cd6c38f86fa0a1bd7ddaa85a0e7f94f7 1 std/heap/memory_pool.zig +70675 15048099509 1755651176000000000 dbf2b76bc62a45f82da46916ded41556 1 std/http/Client.zig +31360 15048099516 1755651176000000000 abd6ae4080522f73e4745e5efce346dc 1 std/http/Server.zig +13015 15048099510 1755651176000000000 4c7e2ad894ad12f141066550c9bb326a 1 std/http/HeadParser.zig +3791 15048099508 1755651176000000000 61420280e3c9986a74a687031fdcf831 1 std/http/ChunkParser.zig +3108 15048099515 1755651176000000000 149ac2b5413f4e7bdf793b3740a63558 1 std/http/HeaderIterator.zig +0 15048099517 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/http/test.zig +7996 15317222681 1755651176000000000 8b3aa35651f2969c3a859a3fab94f443 1 std/json/dynamic.zig +3272 15317222684 1755651176000000000 39fdbe23f321a0cb11a35e428810a09e 1 std/json/hashmap.zig +72868 15317222678 1755651176000000000 ae7b2e59c7744ce34ba98c07df5ef06b 1 std/json/Scanner.zig +33828 15317222687 1755651176000000000 bb79d803b31bd0bc320ba90aa1d2b0dd 1 std/json/static.zig +37319 15317222679 1755651176000000000 48c6d66b659b03b4e105add369592eda 1 std/json/Stringify.zig +0 15317222689 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/test.zig +0 15317221419 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/JSONTestSuite_test.zig +12048 15580753241 1755651176000000000 423025cbe9a3339e236aaf0fc007496c 1 std/math/float.zig +1681 15580753262 1755651176000000000 23aba00e34aa5a807ee8d4bddf2738c5 1 std/math/isnan.zig +7877 15580753245 1755651176000000000 21099ae36d31e459824cfc3757a834f2 1 std/math/frexp.zig +4458 15580753472 1755651176000000000 78dbab36632b04ee9c8bc0e72a713100 1 std/math/modf.zig +1136 15580753233 1755651176000000000 9f0946a16071ec7d7cb9f45c227c22f1 1 std/math/copysign.zig +1083 15580753255 1755651176000000000 eb357e7577b828d5fc2ce3b4118459f2 1 std/math/isfinite.zig +1775 15580753260 1755651176000000000 44fb86a5536455ca3877bb415347c6ac 1 std/math/isinf.zig +1456 15580753266 1755651176000000000 a37461dca6f9345d8f8a2729c13b9ff6 1 std/math/iszero.zig +1837 15580753263 1755651176000000000 cb4e66e7b3adbf190150294715c788b0 1 std/math/isnormal.zig +19209 15580753473 1755651176000000000 000ec81e9c79a332fb482883ab800777 1 std/math/nextafter.zig +1557 15580753477 1755651176000000000 3157574850d20851e8580a398e6895a9 1 std/math/signbit.zig +503 15580753476 1755651176000000000 66d1263715127908b281862dba5dc24b 1 std/math/scalbn.zig +6839 15580753274 1755651176000000000 65cf74d2abee4d99cea2993060dc9cc0 1 std/math/ldexp.zig +9113 15580753474 1755651176000000000 2a24fb6143c914862a5d74c95a9f8b13 1 std/math/pow.zig +7643 15580753475 1755651176000000000 5c50833e1a201a5be1f48de7ea538f0d 1 std/math/powi.zig +2837 15580753479 1755651176000000000 50e9a695059ca6bb04cd979304e4c09b 1 std/math/sqrt.zig +4812 15580753231 1755651176000000000 6f62d1f1ae7bff93c034f6f664aeaa12 1 std/math/cbrt.zig +5378 15580753216 1755651176000000000 25b4039f6f32ddc437baa4061a3f8c3d 1 std/math/acos.zig +5337 15580753218 1755651176000000000 eb35acdb17b747cc2f790e4ff8666d54 1 std/math/asin.zig +7275 15580753220 1755651176000000000 5d8af88aea5f35ce7e37d0f0af8a4baf 1 std/math/atan.zig +10553 15580753221 1755651176000000000 0cafcb907ba579b6b64631165a647329 1 std/math/atan2.zig +4748 15580753249 1755651176000000000 910e3c3ba1e7626618c73be7f12f9319 1 std/math/hypot.zig +11499 15580753236 1755651176000000000 1ddb2b66fbdf7acb2a4ad484203ae340 1 std/math/expm1.zig +5519 15580753252 1755651176000000000 eacf48263508740f77738f675caef7a6 1 std/math/ilogb.zig +2531 15580753275 1755651176000000000 b3b40fd4682f372913e09bc18ca3fcd6 1 std/math/log.zig +1919 15580753456 1755651176000000000 a350e2bd40b9fc740607c3d658668abb 1 std/math/log2.zig +5553 15580753276 1755651176000000000 e10fe90c6d01abfe27b7f2ee6e929a68 1 std/math/log10.zig +4219 15580753470 1755651176000000000 88ffa0f96518ccc1715935c0618e543e 1 std/math/log_int.zig +8872 15580753442 1755651176000000000 754de08c8dc06a6115beb96e5a991ad7 1 std/math/log1p.zig +4299 15580753219 1755651176000000000 9d6c681faf8421823919e5bf347bf740 1 std/math/asinh.zig +2756 15580753217 1755651176000000000 349667a0bb1e62bdc0383bce5747190c 1 std/math/acosh.zig +3399 15580753228 1755651176000000000 7b22337c4a4df112f2c4be431b076007 1 std/math/atanh.zig +4294 15580753478 1755651176000000000 42ef534228feb279b81e6fa2a5d79333 1 std/math/sinh.zig +4157 15580753234 1755651176000000000 1dcc281bf0ca8a9782e5ae845f7b1fa5 1 std/math/cosh.zig +4581 15580753480 1755651176000000000 2b64632014a58c73e7052420b356fcaa 1 std/math/tanh.zig +2024 15580753248 1755651176000000000 28fd0ee50d92f0c08fd6aab95d6f15ee 1 std/math/gcd.zig +1194 15580753273 1755651176000000000 40b3836f0a2277cb76754547dd483869 1 std/math/lcm.zig +11487 15580753247 1755651176000000000 c0bf0098a075fd684bcbeff41e5abbc4 1 std/math/gamma.zig +6563 15580753232 1755651176000000000 dccdf309b3630a59978e204ea0cbde99 1 std/math/complex.zig +746 15580753229 1755651176000000000 cd57ee7b96c9ee1b66a3e7fc3ef16da9 1 std/math/big.zig +17718 16386458075 1755651176000000000 aeefc50be34a4361ff7a2aa85861ab23 1 std/mem/Allocator.zig +6027 16654392804 1755651176000000000 a9b245c6e260e2a4606e53d2d51f65c6 1 std/meta/trailer_flags.zig +0 16923139929 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/net/test.zig +283817 10783549 1755651176000000000 e22376b03b7f60e971b4376ee895d68b 1 std/os/linux.zig +10460 10783550 1755651176000000000 488b62d22bbe9301ab373d2949f7d23b 1 std/os/plan9.zig +7746 10783551 1755651176000000000 931017d063b5a98aee21c888aac3dc3d 1 std/os/uefi.zig +16108 10784384 1755651176000000000 3cfe5b8a9735273d6782d1c456b08f15 1 std/os/wasi.zig +34093 10783547 1755651176000000000 d0e8187f608f5706844bd3662b1ea1ad 1 std/os/emscripten.zig +207257 10784400 1755651176000000000 773327deeb78ed0db89c9fa256583be1 1 std/os/windows.zig +2097 10783548 1755651176000000000 6b77b7f42ffec7eedf37dfecdfdd7014 1 std/os/freebsd.zig +0 2424035805 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/posix/test.zig +72290 2702453046 1755651176000000000 e37f5a4f9f40fbfad5a97b8ac9aacaae 1 std/process/Child.zig +51714 2969763857 1755651176000000000 eb8790d984ce4a6ddd6376d877c85ff1 1 std/sort/block.zig +10719 2969763867 1755651176000000000 112b7c1a501cf9a872fe6b59ffa7df08 1 std/sort/pdq.zig +17117 3233988546 1755651176000000000 5e6a75c2975430f5d46623d1537855a5 1 std/tar/Writer.zig +0 3233988547 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/tar/test.zig +5694 3769667651 1755651176000000000 cd71b2d90772c02d65444191f9fd7d5d 1 std/testing/FailingAllocator.zig +6764 4036588557 1755651176000000000 c674a37722ac57c1bfc929140e058755 1 std/time/epoch.zig +7574 4845181954 1755651176000000000 d017fea857f95f2c01199efab8dbf965 1 std/valgrind/memcheck.zig +2493 4845181953 1755651176000000000 30a771b8491dd283a50c6166babded38 1 std/valgrind/callgrind.zig +1249 4845181952 1755651176000000000 6781a2e56089a14f4f2a391169bf7c05 1 std/valgrind/cachegrind.zig +62827 5117700830 1755651176000000000 d1f5a0dbf135b754ed6a703e23df50e6 1 std/zig/tokenizer.zig +32614 5117700802 1755651176000000000 198542319824c4a3f109c64260324d68 1 std/zig/ErrorBundle.zig +7166 5117700806 1755651176000000000 860d7dc4b9813278374fb24397bb0a4d 1 std/zig/Server.zig +1605 5117700801 1755651176000000000 7cfa1ea3449449667ebf6c5201f6dbaf 1 std/zig/Client.zig +14323 5117700821 1755651176000000000 7e26c1a770304af7ccd5f605ada0a2e5 1 std/zig/string_literal.zig +6720 5117700817 1755651176000000000 07baee4aa2d7c097b1307a2cdec422cf 1 std/zig/number_literal.zig +1666 5117700820 1755651176000000000 87e0eb501395d68ddce525f8555f960c 1 std/zig/primitives.zig +148759 5117700541 1755651176000000000 5f6f4c60784f8ab4107f3383e980dfca 1 std/zig/Ast.zig +568292 5117700542 1755651176000000000 cd6d40183f2ae21282fd3d5fbbfc8238 1 std/zig/AstGen.zig +204779 5117700809 1755651176000000000 4104285d49190afffd58ec1c3544ed4a 1 std/zig/Zir.zig +9166 5117700810 1755651176000000000 6e1c16d90de3a0ffaeaf1d478014a072 1 std/zig/Zoir.zig +36096 5117700811 1755651176000000000 a625edc6603167137dcd761c6dc77e82 1 std/zig/ZonGen.zig +58141 5117700822 1755651176000000000 816fe631c09ee2b8359e520acee70d8b 1 std/zig/system.zig +21416 5117700800 1755651176000000000 d1b3749b34a2551f94643e698928aae0 1 std/zig/BuiltinFn.zig +41574 5117700543 1755651176000000000 a042f3e8774e8bd3822b35117bbc3d78 1 std/zig/AstRlAnnotate.zig +36100 5117700804 1755651176000000000 62fa4ce130060129db4288d3749f2488 1 std/zig/LibCInstallation.zig +45848 5117700808 1755651176000000000 e70747937d94d1333d148947c57547da 1 std/zig/WindowsSdk.zig +9786 5117700803 1755651176000000000 280d2bdf0f1a8f96ecaa4af86ba0a60e 1 std/zig/LibCDirs.zig +25071 5117700829 1755651176000000000 959e2ad518bd8b10bbd16a31cfe2cf7a 1 std/zig/target.zig +247 5117700816 1755651176000000000 4fee6920e55c663811dd32d69b7f2937 1 std/zig/llvm.zig +8713 5117700812 1755651176000000000 53cfae8a8276d7204622550f50243f6b 1 std/zig/c_builtins.zig +28363 5117700815 1755651176000000000 e2c60f43c6ae6eb4e168dc7fabd2138a 1 std/zig/c_translation.zig +117354 6465198947 1755651176000000000 ab567b993b2504504e04ae0815a40fed 1 std/zon/parse.zig +46916 6465198948 1755651176000000000 7bf4408cdd1c84975a793e5daefb12a8 1 std/zon/stringify.zig +32288 6465198946 1755651176000000000 5eeb9845ed3d086fe03083e2f7b9e446 1 std/zon/Serializer.zig +2159 1890351199 1755651176000000000 e912d0164349d3c86eb8b1226a86388f 1 std/os/windows/tls.zig +10957 7804547908 1755651171000000000 86adef0c76818174cbce959185f8aa9c 1 compiler_rt/common.zig +7394 7804547916 1755651171000000000 4d63e8360c0ca220253582124186fb27 1 compiler_rt/count0bits.zig +1385 7804551496 1755651171000000000 929736d7c0636ec88ef908c0b4c15a65 1 compiler_rt/parity.zig +1916 7804551501 1755651171000000000 9e893175f43f5d42fd541260ca5386e7 1 compiler_rt/popcount.zig +2762 7804547400 1755651171000000000 972f20e5339815a5e21e7b0bc6202353 1 compiler_rt/bitreverse.zig +3260 7804547404 1755651171000000000 0ec938dfe8c0a2d466838df303eef58d 1 compiler_rt/bswap.zig +1971 7804547418 1755651171000000000 f4b500a005ae4486ff3df7110a9e2523 1 compiler_rt/cmp.zig +4845 7804551512 1755651171000000000 8761326b4fa02822928e9a2bf1845ea7 1 compiler_rt/shift.zig +1171 7804551482 1755651171000000000 b64a4252e2958ab85e11cf3e72046c01 1 compiler_rt/negXi2.zig +27737 7804551220 1755651171000000000 0dc9529debd21eeb1908af208d1f2e9e 1 compiler_rt/int.zig +3064 7804551457 1755651171000000000 c4a4e1485c87b5438551c701951d1b90 1 compiler_rt/mulXi3.zig +1113 7804547946 1755651171000000000 8a9686a30bb60ded94cfbc7b0c188192 1 compiler_rt/divti3.zig +770 7804552715 1755651171000000000 6c53a5d81aa4786ec59e8bd320265f7d 1 compiler_rt/udivti3.zig +1380 7804551230 1755651171000000000 e03900eae21e2b320a2e62fc03e5074f 1 compiler_rt/modti3.zig +846 7804552716 1755651171000000000 afc9b4b801628d3040423cf318155f2f 1 compiler_rt/umodti3.zig +671 7804547376 1755651171000000000 a6cfe83f9d8eb6e22dee6dc0ccee3367 1 compiler_rt/absv.zig +311 7804547379 1755651171000000000 9a044dbb5695c2eea3bda231bfeda676 1 compiler_rt/absvsi2.zig +311 7804547377 1755651171000000000 0c0607d153f93dee28f63beeb116cbc1 1 compiler_rt/absvdi2.zig +314 7804547381 1755651171000000000 d826815938d3df68320935b9968c29db 1 compiler_rt/absvti2.zig +1303 7804551490 1755651171000000000 50df1f7234ac1a8d4f2093362c90b93e 1 compiler_rt/negv.zig +874 7804547393 1755651171000000000 02f065d511a9d47115363632c4dbdeda 1 compiler_rt/addvsi3.zig +860 7804552684 1755651171000000000 28391dec7d271786c0a340a5d698d3ba 1 compiler_rt/subvsi3.zig +932 7804552683 1755651171000000000 c20c4bc9d2bbfbdf0b900e7d7218879e 1 compiler_rt/subvdi3.zig +902 7804551479 1755651171000000000 45f09fd05e65513dfd810114991820f4 1 compiler_rt/mulvsi3.zig +1752 7804547387 1755651171000000000 1e067dd191e3750e2eebc9a9891bfe8d 1 compiler_rt/addo.zig +1742 7804552677 1755651171000000000 a6e4dadcd9f88d3c47b48642ea0242d5 1 compiler_rt/subo.zig +2643 7804551471 1755651171000000000 7437cfee5e2a6d47f221d2f163a92242 1 compiler_rt/mulo.zig +6009 7804547956 1755651171000000000 013ab2758ced7bbc2fc6988565eeb6c7 1 compiler_rt/extendf.zig +920 7804547959 1755651171000000000 f422913a85e1e91ef2039ab58547c0fc 1 compiler_rt/extendhfsf2.zig +373 7804547958 1755651171000000000 ed651ccba735e247ddf2016832e06f1c 1 compiler_rt/extendhfdf2.zig +376 7804547960 1755651171000000000 0c74a49a05b638424700546195a373ee 1 compiler_rt/extendhftf2.zig +373 7804547961 1755651171000000000 23b1c51db225608b57400e8118ffa9ec 1 compiler_rt/extendhfxf2.zig +644 7804547962 1755651171000000000 5bd066e81499f866ae53e4e86d5e5c07 1 compiler_rt/extendsfdf2.zig +781 7804547963 1755651171000000000 e52fbda9a494609786f8fcb77d847604 1 compiler_rt/extendsftf2.zig +360 7804547964 1755651171000000000 e942ea8b9c6b17baaeea42c96e99effa 1 compiler_rt/extendsfxf2.zig +781 7804547954 1755651171000000000 87ecde8777ad8ff8ed4dbc9c650f0270 1 compiler_rt/extenddftf2.zig +364 7804547955 1755651171000000000 9f715eab9e2e310deef980aead0e7500 1 compiler_rt/extenddfxf2.zig +1604 7804547965 1755651171000000000 c4862b4d4cfcee360ed2c56a114cbf4a 1 compiler_rt/extendxftf2.zig +8121 7804552694 1755651171000000000 20afe15564559323e44421df48412060 1 compiler_rt/truncf.zig +881 7804552696 1755651171000000000 47d13f34934c26c69eb88e81670d8f85 1 compiler_rt/truncsfhf2.zig +616 7804552692 1755651171000000000 0641d56997ae4f4b5207adc68dc72f3b 1 compiler_rt/truncdfhf2.zig +600 7804552693 1755651171000000000 02da0cc6b32c97637c74cbb10ccb54db 1 compiler_rt/truncdfsf2.zig +356 7804552704 1755651171000000000 3bf820f222640094f3a72a66ffe8198e 1 compiler_rt/truncxfhf2.zig +333 7804552705 1755651171000000000 66119941d376ee0a437b06bd3072d524 1 compiler_rt/truncxfsf2.zig +333 7804552703 1755651171000000000 c13541abc36c28230d412dc5252b693e 1 compiler_rt/truncxfdf2.zig +359 7804552700 1755651171000000000 d8f660a94187293e5a911454282b4029 1 compiler_rt/trunctfhf2.zig +731 7804552701 1755651171000000000 13584c74605e851e6d831a9e0fce9886 1 compiler_rt/trunctfsf2.zig +731 7804552697 1755651171000000000 457c0f6c909aa10450fd884ff88287f9 1 compiler_rt/trunctfdf2.zig +2852 7804552702 1755651171000000000 d8494bd8878af1312bf45635b710a4b1 1 compiler_rt/trunctfxf2.zig +4079 7804551221 1755651171000000000 5a505058b770b465ce081eb6a57e7a43 1 compiler_rt/int_from_float.zig +341 7804548360 1755651171000000000 287cd5239eed800fcc228dfe9a2734d4 1 compiler_rt/fixhfsi.zig +341 7804548358 1755651171000000000 8acd6b1ce769a390c40385d65d7fad51 1 compiler_rt/fixhfdi.zig +713 7804548361 1755651171000000000 f02a5506718df6aec134d680607bf58f 1 compiler_rt/fixhfti.zig +564 7804548359 1755651171000000000 9ae4ea7e25821706c5468c7c2c445448 1 compiler_rt/fixhfei.zig +616 7804548365 1755651171000000000 703dfbffebdc9fddd06b6c8d668e5e6a 1 compiler_rt/fixsfsi.zig +701 7804548363 1755651171000000000 88e7049e069292d16c1ff8720dff21c5 1 compiler_rt/fixsfdi.zig +713 7804548366 1755651171000000000 27665f157ae97b6a905d2c3b3d14b55c 1 compiler_rt/fixsfti.zig +564 7804548364 1755651171000000000 9296a734389623faf0ccbbce95248896 1 compiler_rt/fixsfei.zig +616 7804548356 1755651171000000000 d6c6cfff39408568470a4ce56f20701b 1 compiler_rt/fixdfsi.zig +701 7804548354 1755651171000000000 d37fe214a882924d291912211617b7e0 1 compiler_rt/fixdfdi.zig +713 7804548357 1755651171000000000 acf45affbae83f950121a0e78d1d9d43 1 compiler_rt/fixdfti.zig +564 7804548355 1755651171000000000 475c0ed3637871aa4bdba39fb7ac07c7 1 compiler_rt/fixdfei.zig +736 7804548370 1755651171000000000 9e04b0c9b7e24d0a417e6418967a82bf 1 compiler_rt/fixtfsi.zig +736 7804548367 1755651171000000000 54e8e270c03030539e0b628265ebe138 1 compiler_rt/fixtfdi.zig +867 7804548373 1755651171000000000 159fff04699a850f0877d0d860fc5c23 1 compiler_rt/fixtfti.zig +565 7804548368 1755651171000000000 f3202275d298913c25f0f8dfd3242be8 1 compiler_rt/fixtfei.zig +341 7804548407 1755651171000000000 c5d9b1d68c225613e28b45cb4cec11bc 1 compiler_rt/fixxfsi.zig +341 7804548404 1755651171000000000 87e625ba575a65977f04b534e5fc766d 1 compiler_rt/fixxfdi.zig +713 7804548408 1755651171000000000 66c8929d08870c9d48875898ac51d464 1 compiler_rt/fixxfti.zig +564 7804548406 1755651171000000000 4e4a4e4ac45142bc6c99b298914cc0e4 1 compiler_rt/fixxfei.zig +350 7804548386 1755651171000000000 ba04537148169a4eda9cc74755e9d2b2 1 compiler_rt/fixunshfsi.zig +350 7804548381 1755651171000000000 3f19d12e7ff9198e211b2298b6bd5efc 1 compiler_rt/fixunshfdi.zig +731 7804548387 1755651171000000000 3dc5d5bb0159c254a4dc44defc534d08 1 compiler_rt/fixunshfti.zig +575 7804548385 1755651171000000000 7747207f7d598d23ace14265322b94f9 1 compiler_rt/fixunshfei.zig +628 7804548390 1755651171000000000 57232664ed8c180d0347c1a5b7fb707c 1 compiler_rt/fixunssfsi.zig +713 7804548388 1755651171000000000 7ccb1263e66738a414ca7a9521baf546 1 compiler_rt/fixunssfdi.zig +731 7804548391 1755651171000000000 46aa3b64c89e9e65d2ce377e2fda821b 1 compiler_rt/fixunssfti.zig +575 7804548389 1755651171000000000 38283592b0bac48f035456b4aa28b777 1 compiler_rt/fixunssfei.zig +628 7804548379 1755651171000000000 18ae349f0a3aee101c1024994601c18b 1 compiler_rt/fixunsdfsi.zig +713 7804548374 1755651171000000000 15697c6d14ff144c8a8fbbbfc25b56ac 1 compiler_rt/fixunsdfdi.zig +731 7804548380 1755651171000000000 ccb4ab408cf9f6b931333d2e2281d138 1 compiler_rt/fixunsdfti.zig +575 7804548376 1755651171000000000 0a1cb46013571dde4b1bb4448121ba85 1 compiler_rt/fixunsdfei.zig +754 7804548394 1755651171000000000 717dbc2cecb0b7f0417ed241602b0235 1 compiler_rt/fixunstfsi.zig +754 7804548392 1755651171000000000 e0117ad5626119b0e5de39f22424c41d 1 compiler_rt/fixunstfdi.zig +891 7804548399 1755651171000000000 c4d7fd8a337264713824559441d264bf 1 compiler_rt/fixunstfti.zig +576 7804548393 1755651171000000000 cf926c64f6225389c139b32f9fce285b 1 compiler_rt/fixunstfei.zig +350 7804548402 1755651171000000000 08e70a885b4a61a0e97871cbe7781a36 1 compiler_rt/fixunsxfsi.zig +350 7804548400 1755651171000000000 9df747511c3f54bb2bb63cfce791b071 1 compiler_rt/fixunsxfdi.zig +731 7804548403 1755651171000000000 89cbbf3a56b9124c65e08a4c565b4754 1 compiler_rt/fixunsxfti.zig +575 7804548401 1755651171000000000 9834bffa03e61a47b5f6368b93c2b278 1 compiler_rt/fixunsxfei.zig +4111 7804548409 1755651171000000000 0731ddef2609f045793d30b988a64339 1 compiler_rt/float_from_int.zig +347 7804551174 1755651171000000000 46437c47ae3550f8dfea8ffe706e5cd5 1 compiler_rt/floatsihf.zig +619 7804551175 1755651171000000000 d0709844134d344f649fe5de487e8d43 1 compiler_rt/floatsisf.zig +619 7804551173 1755651171000000000 eb5e4bb9bdf0af3d17044dbab1c19f6a 1 compiler_rt/floatsidf.zig +748 7804551176 1755651171000000000 6acf05da538e6fe3f7a19cdbf9326f26 1 compiler_rt/floatsitf.zig +347 7804551177 1755651171000000000 f364c5d870c6ecf44a5a38ec49aaabe6 1 compiler_rt/floatsixf.zig +347 7804548412 1755651171000000000 2b30fc40286f695404a52daa3020e46d 1 compiler_rt/floatdihf.zig +704 7804548413 1755651171000000000 be61dfcf3ef7f7cb87fdb442491846aa 1 compiler_rt/floatdisf.zig +704 7804548411 1755651171000000000 cf1600427d0617517935eed129801a82 1 compiler_rt/floatdidf.zig +748 7804548414 1755651171000000000 8811790f2053d4000e252e7019110198 1 compiler_rt/floatditf.zig +347 7804548415 1755651171000000000 eb71124e4f62f32423d28d002b3dc4fa 1 compiler_rt/floatdixf.zig +712 7804551179 1755651171000000000 b0cac521d295bf19d575119ed72c24e5 1 compiler_rt/floattihf.zig +712 7804551180 1755651171000000000 72a9275278530696bb432b1a92758b42 1 compiler_rt/floattisf.zig +712 7804551178 1755651171000000000 5dde3f565fe32da11fe052594ee197ee 1 compiler_rt/floattidf.zig +872 7804551182 1755651171000000000 1ae512923174c3e6fa1ba8d65abf6c4f 1 compiler_rt/floattitf.zig +712 7804551183 1755651171000000000 e7550374f92dcebdb11cdef092ffb719 1 compiler_rt/floattixf.zig +569 7804551169 1755651171000000000 6cacec7f1baf3962451f632af2333d15 1 compiler_rt/floateihf.zig +569 7804551170 1755651171000000000 00ff12ec132a6de0ddba566b32f0ce56 1 compiler_rt/floateisf.zig +569 7804551168 1755651171000000000 39f48db5b22c07b8e1ede4f6ad7dfeab 1 compiler_rt/floateidf.zig +571 7804551171 1755651171000000000 558b7faae150629fc02a56c6f795823a 1 compiler_rt/floateitf.zig +569 7804551172 1755651171000000000 3219adecb483c360d12a9f49677362a1 1 compiler_rt/floateixf.zig +357 7804551195 1755651171000000000 00a0cc52e80a5d8768c00c875a2c38fb 1 compiler_rt/floatunsihf.zig +628 7804551196 1755651171000000000 7758994bb35f2593765f89bd87e8f055 1 compiler_rt/floatunsisf.zig +628 7804551194 1755651171000000000 20cada91ea193709f7cdb30fc7e305ed 1 compiler_rt/floatunsidf.zig +761 7804551197 1755651171000000000 c3fa8cad530a016146e93e31095198f1 1 compiler_rt/floatunsitf.zig +353 7804551199 1755651171000000000 182b577da08432924ceb5ee9bd0f2d88 1 compiler_rt/floatunsixf.zig +353 7804551185 1755651171000000000 0e605deb96515a6775375e7e47db3215 1 compiler_rt/floatundihf.zig +713 7804551186 1755651171000000000 e063c2d245ac649a28457da928aa6736 1 compiler_rt/floatundisf.zig +713 7804551184 1755651171000000000 904d6181c4aecb7405c8e4edc325cc82 1 compiler_rt/floatundidf.zig +761 7804551187 1755651171000000000 3e7630bf1c35c7de0a6c3ffd69b2673d 1 compiler_rt/floatunditf.zig +353 7804551188 1755651171000000000 1799170b2737a9e2a28a9808dd0e051a 1 compiler_rt/floatundixf.zig +724 7804551201 1755651171000000000 2df4b1f0edb48dd79ccda95408b91311 1 compiler_rt/floatuntihf.zig +724 7804551202 1755651171000000000 b990cd4c97634e1f3f4261191531b301 1 compiler_rt/floatuntisf.zig +724 7804551200 1755651171000000000 f7a4d0e5f29f41cadf67ddd6f68c29df 1 compiler_rt/floatuntidf.zig +888 7804551203 1755651171000000000 db22f0e3984446069375f2cae2a9aca7 1 compiler_rt/floatuntitf.zig +724 7804551204 1755651171000000000 bc561095bbe802fe90354de9e376c896 1 compiler_rt/floatuntixf.zig +577 7804551190 1755651171000000000 588ff37c9a79b9efee8d8ab27866c544 1 compiler_rt/floatuneihf.zig +577 7804551191 1755651171000000000 83c4fadef25daa676e2b17560f7b5b9f 1 compiler_rt/floatuneisf.zig +577 7804551189 1755651171000000000 9ab7e41efc150cfc29183a68faa98145 1 compiler_rt/floatuneidf.zig +579 7804551192 1755651171000000000 c63445cffc5e5f137b97a50c2bb9ef88 1 compiler_rt/floatuneitf.zig +577 7804551193 1755651171000000000 36f8e586a4b887c1b1b1537a5a28ae74 1 compiler_rt/floatuneixf.zig +4582 7804547911 1755651171000000000 e5686ffdd46c3d4d1c4485eb9eef4475 1 compiler_rt/comparef.zig +2267 7804547421 1755651171000000000 f21670514136306b5c179b4ee414d001 1 compiler_rt/cmphf2.zig +3161 7804547422 1755651171000000000 2bb653afb77db3d5045cbb9a02ba3d6f 1 compiler_rt/cmpsf2.zig +3161 7804547419 1755651171000000000 5ff781811d3f999df43ff5a63d8e0b2f 1 compiler_rt/cmpdf2.zig +4739 7804547904 1755651171000000000 13d86b526247d5092d8aacf0b67bdcf1 1 compiler_rt/cmptf2.zig +2248 7804547906 1755651171000000000 c47b1b506563f516dd85df37da1ca80d 1 compiler_rt/cmpxf2.zig +341 7804552718 1755651171000000000 2ed4e26e2ea3869e810a2840aa44890c 1 compiler_rt/unordhf2.zig +634 7804552719 1755651171000000000 ab97f41ff7e85578831672d29873bb7c 1 compiler_rt/unordsf2.zig +634 7804552717 1755651171000000000 8fcd7331877db9156a9489d458816d1a 1 compiler_rt/unorddf2.zig +341 7804552721 1755651171000000000 c6765ab1f830c13ccdf800de46e1d4c3 1 compiler_rt/unordxf2.zig +656 7804552720 1755651171000000000 2a6c721c57e5b4fc4d03f1414d3bfa0c 1 compiler_rt/unordtf2.zig +960 7804551215 1755651171000000000 44f070ee85c4299b7b861a8753e20983 1 compiler_rt/gehf2.zig +1567 7804551216 1755651171000000000 d83ee65d70e22642ca348d28af9e8b1d 1 compiler_rt/gesf2.zig +1567 7804551212 1755651171000000000 f7babfa2824209ae274b4f7f048979ff 1 compiler_rt/gedf2.zig +531 7804551218 1755651171000000000 825137d9239fe8820abd067fa358ff6c 1 compiler_rt/gexf2.zig +1375 7804551217 1755651171000000000 baf5038daac3654c38c49861c12af8f8 1 compiler_rt/getf2.zig +6348 7804547384 1755651171000000000 9d6fb22665d5ae546ff48bce14f4265e 1 compiler_rt/addf3.zig +319 7804547386 1755651171000000000 522a47928eb441889cd2d8293ee58f93 1 compiler_rt/addhf3.zig +594 7804547391 1755651171000000000 98c81cd3c52b093c912ead4cc50ee463 1 compiler_rt/addsf3.zig +594 7804547383 1755651171000000000 2fd1f70cd54ab97c68acda6ccd8698ca 1 compiler_rt/adddf3.zig +725 7804547392 1755651171000000000 37b20d2aff3bdc9e0e864c4dd0285ce2 1 compiler_rt/addtf3.zig +323 7804547394 1755651171000000000 3de55ee7141ae65ffda2d57872f49058 1 compiler_rt/addxf3.zig +406 7804552675 1755651171000000000 974a08d8b377c7154ee50e645c4aa5f1 1 compiler_rt/subhf3.zig +735 7804552681 1755651171000000000 c6bad960b48197993e5154abc0dad73e 1 compiler_rt/subsf3.zig +735 7804552674 1755651171000000000 932c462bb7a1ebd827a8601a1a673d8f 1 compiler_rt/subdf3.zig +884 7804552682 1755651171000000000 68c91ec93f437c6420395ef3a23d922a 1 compiler_rt/subtf3.zig +399 7804552685 1755651171000000000 78f78d004278fcfad7128556fb169afb 1 compiler_rt/subxf3.zig +8398 7804551467 1755651171000000000 2e26880d97fb35e9bd4cc1993465b0cb 1 compiler_rt/mulf3.zig +323 7804551470 1755651171000000000 da7bee33a5dc12783e6265082c6339c5 1 compiler_rt/mulhf3.zig +598 7804551476 1755651171000000000 fee4abf27cb742c17acbc579ce4181c9 1 compiler_rt/mulsf3.zig +598 7804551466 1755651171000000000 a3c5a4d1d76996c6a8862bc7edee60e9 1 compiler_rt/muldf3.zig +737 7804551478 1755651171000000000 05e662af04b7c0553caed681261620bc 1 compiler_rt/multf3.zig +323 7804551481 1755651171000000000 20b9631d337fdb552805ef976ffdc51e 1 compiler_rt/mulxf3.zig +344 7804547933 1755651171000000000 c658197861ba0fe65f6c4da66921da72 1 compiler_rt/divhf3.zig +8574 7804547941 1755651171000000000 57deaddafd7a8db15df6bbeca7d2d850 1 compiler_rt/divsf3.zig +9366 7804547926 1755651171000000000 3f0a4a77ece42e5c0a92b591f8219814 1 compiler_rt/divdf3.zig +8669 7804547949 1755651171000000000 9c07b341767fa995dedd55167cc3e222 1 compiler_rt/divxf3.zig +9925 7804547944 1755651171000000000 28531f064bbb7a862fb99a6dd7127380 1 compiler_rt/divtf3.zig +265 7804551485 1755651171000000000 ff779eb9e3281d0f8136f5b61b8e6515 1 compiler_rt/neghf2.zig +530 7804551486 1755651171000000000 e570a93d326095aad9dfa0af89f5e12d 1 compiler_rt/negsf2.zig +530 7804551483 1755651171000000000 239867284b810ba2b4b7139ff96a22c0 1 compiler_rt/negdf2.zig +409 7804551488 1755651171000000000 68cda8c4538ebcdadbb16771ebed9613 1 compiler_rt/negtf2.zig +265 7804551494 1755651171000000000 e6f608fbc42d09928e6d353d3e4ae05e 1 compiler_rt/negxf2.zig +2072 7804551506 1755651171000000000 73e4d664a217ad2fe999244a64307073 1 compiler_rt/powiXf2.zig +2275 7804551460 1755651171000000000 31c049fe940585ddd225b0c4f49de0ab 1 compiler_rt/mulc3.zig +425 7804551469 1755651171000000000 9057d1c7c2b8e98f5c09215baab464e3 1 compiler_rt/mulhc3.zig +425 7804551475 1755651171000000000 46a186b40dbf8b1a78fd7664e825477d 1 compiler_rt/mulsc3.zig +425 7804551464 1755651171000000000 ae9761607983803a875dc03e2bcf93b2 1 compiler_rt/muldc3.zig +425 7804551480 1755651171000000000 241de1bd5170ea794fe6a65e3ca1c4b6 1 compiler_rt/mulxc3.zig +581 7804551477 1755651171000000000 8ff2e7539ccf94a8ea6a7d0fb870f8ac 1 compiler_rt/multc3.zig +2280 7804547921 1755651171000000000 9e6aaeda713b6cd43eca1180606dc9f8 1 compiler_rt/divc3.zig +434 7804547928 1755651171000000000 99234ee0594362f25d0034479872a24d 1 compiler_rt/divhc3.zig +434 7804547939 1755651171000000000 19324ba1cf08e607b54db47c52783c60 1 compiler_rt/divsc3.zig +434 7804547924 1755651171000000000 a5c0557ad47ea2daea69c331226b6bb8 1 compiler_rt/divdc3.zig +434 7804547948 1755651171000000000 0ba3ba63c22ba9609413264f8e142986 1 compiler_rt/divxc3.zig +590 7804547943 1755651171000000000 b09a8555aa3985adc8de9d9dbbaeaab0 1 compiler_rt/divtc3.zig +5139 7804547413 1755651171000000000 3377d5bdbc89549229fcc2bdded00385 1 compiler_rt/ceil.zig +5691 7804547914 1755651171000000000 4e53be9b20a311a96eb63bafe37225d8 1 compiler_rt/cos.zig +11677 7804547952 1755651171000000000 c4da63d897aa5d3cef3988faddf0733e 1 compiler_rt/exp.zig +20924 7804547953 1755651171000000000 8444963967b3c617eebec50d6b319393 1 compiler_rt/exp2.zig +1913 7804547966 1755651171000000000 d639f3899db4d8abd8eb6de3c9db692b 1 compiler_rt/fabs.zig +6290 7804551205 1755651171000000000 f78026c2945813b1868334b3f8d6b1ea 1 compiler_rt/floor.zig +11575 7804551206 1755651171000000000 acbf337ea57443d50122200a70477bd3 1 compiler_rt/fma.zig +2867 7804551207 1755651171000000000 53832890224a36ee564f78656fad8acb 1 compiler_rt/fmax.zig +2869 7804551208 1755651171000000000 16d3b98ffc9e7622d085e6ec340bef8b 1 compiler_rt/fmin.zig +12218 7804551209 1755651171000000000 6096cb43202506289c56b29536a3c88b 1 compiler_rt/fmod.zig +8304 7804551223 1755651171000000000 4a2ae209edc8dde5555884addb0c3270 1 compiler_rt/log.zig +9499 7804551224 1755651171000000000 192e6cb083dc2203281a462a1129dc3e 1 compiler_rt/log10.zig +8927 7804551225 1755651171000000000 788bd8e755b980f4765163024433bbef 1 compiler_rt/log2.zig +5307 7804551511 1755651171000000000 64efbcc2e1df4cd325e1f4f05a9b43b6 1 compiler_rt/round.zig +6783 7804551514 1755651171000000000 46b58824ce56ea0819341b2de4e4ce88 1 compiler_rt/sin.zig +8779 7804551515 1755651171000000000 3372bf45f142a4244845a7d576e8a739 1 compiler_rt/sincos.zig +8445 7804551517 1755651171000000000 834a20db0b154a40177782adbf1d021c 1 compiler_rt/sqrt.zig +6175 7804552686 1755651171000000000 38bdd1e5397ae3ef6734324ee90f2cd8 1 compiler_rt/tan.zig +4509 7804552691 1755651171000000000 452e79786bcf746a89464e0b468a1772 1 compiler_rt/trunc.zig +2047 7804547936 1755651171000000000 1b5ba254fdfc08708a375c730450065e 1 compiler_rt/divmodei4.zig +5345 7804552711 1755651171000000000 ce988d5b59fa957acec0cc0f5514f027 1 compiler_rt/udivmodei4.zig +886 7804552713 1755651171000000000 3884d7d5d17d10b6c390591f14760c21 1 compiler_rt/udivmodti4.zig +2988 7804551495 1755651171000000000 727f94ca1d77099453ad061b28f9f45b 1 compiler_rt/os_version_check.zig +12571 7804547951 1755651171000000000 f2228bdf0cb635f1b1b962a3db633e85 1 compiler_rt/emutls.zig +11129 7804547395 1755651171000000000 48b4362e028a3e1634d5ca553bd4f739 1 compiler_rt/arm.zig +2563 7804547397 1755651171000000000 667b1a412a0d66f8b44b2a8e8e4e16e2 1 compiler_rt/aulldiv.zig +2618 7804547398 1755651171000000000 420aa19734f8e183daf736d09d96e8e9 1 compiler_rt/aullrem.zig +7746 7804547414 1755651171000000000 65f560b740acc191d870c5c89599c99a 1 compiler_rt/clear_cache.zig +45809 7804551219 1755651171000000000 8aceb9f3653d891b582dbd9b55b0d02a 1 compiler_rt/hexagon.zig +26388 7804547396 1755651171000000000 2dbf62f073b314f8249867dbbbfb5589 1 compiler_rt/atomics.zig +9539 7804552672 1755651171000000000 1d35c260060522cd892607322c1b0e17 1 compiler_rt/stack_probe.zig +79084 7804547375 1755651171000000000 bda0e04701fa77ae568c29186ee9ccfb 1 compiler_rt/aarch64_outline_atomics.zig +6452 7804551227 1755651171000000000 4cf074ce1df0bab8aba60356cc8ab857 1 compiler_rt/memcpy.zig +876 7804551229 1755651171000000000 13a474bc83ea39da1548064a0ec84fe6 1 compiler_rt/memset.zig +7246 7804551228 1755651171000000000 ab21f482b4ceecf867dcaf6370424fd5 1 compiler_rt/memmove.zig +931 7804551226 1755651171000000000 ab9203076a9f7358651a1ac57a2238e6 1 compiler_rt/memcmp.zig +874 7804547399 1755651171000000000 964d18da8969575344227310559069cf 1 compiler_rt/bcmp.zig +4524 7804551519 1755651171000000000 3e80fe1b407f6f691b38a2b042fb4b64 1 compiler_rt/ssp.zig +8052 1890351183 1755651176000000000 bbc3cbd53ca9eaab481a4b2874506c59 1 std/Build/Cache/Path.zig +2142 1890351182 1755651176000000000 fe57a392618de045bf46b476d4e9b36f 1 std/Build/Cache/Directory.zig +37958 1890351181 1755651176000000000 09f6c6d5c5a3e85759082f1ad46ebffa 1 std/Build/Cache/DepTokenizer.zig +2901 2158145397 1755651176000000000 d277c72d570fa923fd437605bbd83e30 1 std/Build/Step/CheckFile.zig +117426 2158145398 1755651176000000000 f327f9fe4a8649cc483e714c56bdafff 1 std/Build/Step/CheckObject.zig +41853 2158150016 1755651176000000000 b089407ebc9e35a98f96dcfafbea622a 1 std/Build/Step/ConfigHeader.zig +831 2158150017 1755651176000000000 0f223ee68995072c4beb7fd3ae600b02 1 std/Build/Step/Fail.zig +2711 2158150018 1755651176000000000 72715636b21818d37288de283148c101 1 std/Build/Step/Fmt.zig +7843 2158150019 1755651176000000000 b720790bf6e89535660d8996075ceed1 1 std/Build/Step/InstallArtifact.zig +4431 2158150020 1755651176000000000 d1f0707c6afc3c9202b9d6dd0c114338 1 std/Build/Step/InstallDir.zig +1460 2158150021 1755651176000000000 0040eb5b0836e8fa2056b8e33d66b4dd 1 std/Build/Step/InstallFile.zig +8154 2158150022 1755651176000000000 fdd933a4e6d14f259812199ba337c9f2 1 std/Build/Step/ObjCopy.zig +86953 2158145407 1755651176000000000 e814ef2854d0025d3c1a64913f7cbbf2 1 std/Build/Step/Compile.zig +23856 2158150023 1755651176000000000 04314b9ec6c4719520c8922f20479b10 1 std/Build/Step/Options.zig +1443 2158150025 1755651176000000000 ad5ec7793142fc110b85e04588c7be90 1 std/Build/Step/RemoveDir.zig +73144 2158150026 1755651176000000000 defa27d5c5918845503abf3bee647924 1 std/Build/Step/Run.zig +7344 2158150027 1755651176000000000 1a07c4e3f9436bca621e0ab521e389b5 1 std/Build/Step/TranslateC.zig +13184 2158150029 1755651176000000000 d3b8a19eb1eb2d1fa857b99bfea07950 1 std/Build/Step/WriteFile.zig +4247 2158150028 1755651176000000000 78c06c4c05a1846f4e7d6ff9c0da4068 1 std/Build/Step/UpdateSourceFiles.zig +22825 2424035803 1755651176000000000 e4bcf69644dd1afc10772570851bf6db 1 std/Build/Watch/FsEvents.zig +1731 2969763820 1755651176000000000 daa1d02b14c40a08f9a23bf20fa27ab2 1 std/Io/Reader/Limited.zig +0 2969763845 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/Reader/test.zig +2533 4036588555 1755651176000000000 e0af5510611c7c2688093972c6ace145 1 std/Thread/Mutex/Recursive.zig +11928 5117700534 1755651176000000000 7a1e10e0d0e9210d2757e410d8473def 1 std/compress/flate/Compress.zig +47768 5117700536 1755651176000000000 d87a77c2d3a950f7fb4503b2e91beb66 1 std/compress/flate/Decompress.zig +18914 5117700537 1755651176000000000 c9cb33e59ca13018183045e0a1d980a9 1 std/compress/flate/HuffmanEncoder.zig +11871 5920176865 1755651176000000000 1a80b6a0f5b379bcaa6324ad497a62d9 1 std/compress/lzma/decode.zig +0 5920176866 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/lzma/test.zig +3774 5920176867 1755651176000000000 ba9dc0a0f8124583244e2f0c677410fc 1 std/compress/lzma/vec2d.zig +4704 6729771881 1755651176000000000 34dab553e7d44c4c18351939467c745c 1 std/compress/lzma2/decode.zig +7157 7261586167 1755651176000000000 a0e5aefb8ceae6798c4b2fe9540cefee 1 std/compress/xz/block.zig +0 7261586168 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/xz/test.zig +78531 7804560029 1755651176000000000 d44d8434a6ff685d9cec10bd257151c5 1 std/compress/zstd/Decompress.zig +0 8072380958 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/test.zig +22223 9137195870 1755651176000000000 7e23bb5bcd64c4725f7c071dd3496b74 1 std/crypto/aes/aesni.zig +22711 9137195871 1755651176000000000 8e77a640bfd456ac5363ff36bd93c4ba 1 std/crypto/aes/armcrypto.zig +33347 9137195872 1755651176000000000 7de9cecbcab3c869e16f2fbaf7076a48 1 std/crypto/aes/soft.zig +14574 8345434069 1755651176000000000 b552b509d9ec611014aa027c881ac91c 1 std/crypto/25519/field.zig +33703 8345434071 1755651176000000000 d4b52682012c0195eb1aa7312d067798 1 std/crypto/25519/scalar.zig +338 10758886324 1755651176000000000 433b788abb384ec7e4c3641754e6dde9 1 std/crypto/pcurves/p256/field.zig +7421 10758886333 1755651176000000000 00494b8811c2d7df07fff5d27198954c 1 std/crypto/pcurves/p256/scalar.zig +5656 11552451177 1755651176000000000 05c95744a349b07172e4c400b1e28cc1 1 std/crypto/pcurves/tests/p256.zig +376 11017003009 1755651176000000000 69a49ff5f537dcd2044702ac14b6891c 1 std/crypto/pcurves/p384/field.zig +6669 11017003016 1755651176000000000 7aee4435d80a972d5bcff185b164ee8e 1 std/crypto/pcurves/p384/scalar.zig +6707 11552451178 1755651176000000000 3f1e1e56980e64672ccd1fba3a631951 1 std/crypto/pcurves/tests/p384.zig +343 11288617743 1755651176000000000 738b22249e1d3a4c001765286bc82756 1 std/crypto/pcurves/secp256k1/field.zig +7426 11288617744 1755651176000000000 1b99358655e3f9a938c25cb631d52e50 1 std/crypto/pcurves/secp256k1/scalar.zig +6029 11552451179 1755651176000000000 4a9ce792ab6709c6ebf9e7dbf5e30590 1 std/crypto/pcurves/tests/secp256k1.zig +11649 9407958267 1755651176000000000 884bf9edd77ebad5200670e26c236280 1 std/crypto/codecs/asn1.zig +17997 9407959248 1755651176000000000 7ea1a954927b43ca5ab7f95c3becd401 1 std/crypto/codecs/base64_hex_ct.zig +80831 11826519934 1755651176000000000 f151081149e53c1078be673dc2116ec2 1 std/crypto/tls/Client.zig +12470 8603041826 1755651176000000000 9c92810e5147e8de0f25e1658fa23a75 1 std/crypto/Certificate/Bundle.zig +71838 12363111571 1755651176000000000 5c3513456ba79222f02ca36a90963776 1 std/debug/Dwarf/expression.zig +17609 12363111569 1755651176000000000 f39611d52911878891dbef3fba794ac1 1 std/debug/Dwarf/abi.zig +10007 12363111570 1755651176000000000 46471a00c4eea2acab55cc6337899adc 1 std/debug/Dwarf/call_frame.zig +9426 13433097429 1755651176000000000 19fe74e26814be7f5083c3d8b5a0983e 1 std/fmt/parse_float/parse.zig +2950 13433097426 1755651176000000000 e2f6cedde735fdaf086b7e0efdb66505 1 std/fmt/parse_float/convert_hex.zig +5401 13433097425 1755651176000000000 cbeba905313f9b6c917fb231993989fe 1 std/fmt/parse_float/convert_fast.zig +48543 13433097424 1755651176000000000 82c419f8469193cf67852d0ac4c65f55 1 std/fmt/parse_float/convert_eisel_lemire.zig +4586 13433097427 1755651176000000000 2562e4c50c6403023d508a0c7e1f15f0 1 std/fmt/parse_float/convert_slow.zig +3506 14510404238 1755651176000000000 9428b7df45d5b928d9c004b955588fe0 1 std/hash/crc/impl.zig +0 14510404239 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/hash/crc/test.zig +2075 14239609767 1755651176000000000 5910881f138d791cfa09dd89cc12fc40 1 std/hash/verify.zig +237477 1890351196 1755651176000000000 67644436e9162e79563b60f574b36f99 1 std/os/windows/ntstatus.zig +0 15317222682 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/dynamic_test.zig +0 15317222685 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/hashmap_test.zig +0 15317222686 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/scanner_test.zig +0 15317222688 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/static_test.zig +995 15580753240 1755651176000000000 59077bc2784a5df334de08609b4c2a55 1 std/math/expo2.zig +452 16120016982 1755651176000000000 ce633e6b665f3caba98995a3f146d7c7 1 std/math/complex/abs.zig +678 16120016984 1755651176000000000 9dd2ece0bd4c6366c4a3cb5bf7b3db17 1 std/math/complex/acosh.zig +608 16120016983 1755651176000000000 e3a7d70f219edead2e32e66a9476a469 1 std/math/complex/acos.zig +458 16120016988 1755651176000000000 2fea305ef49ff29fdd688d2f7342051d 1 std/math/complex/arg.zig +641 16120023930 1755651176000000000 59bed4da0e5763cbf2a3e08ec4bc9c6c 1 std/math/complex/asinh.zig +750 16120023929 1755651176000000000 26f02f5afc54b9ec7673ddd6d0fcc3a9 1 std/math/complex/asin.zig +645 16120023933 1755651176000000000 adf7751d27453fed0d4977a2dc50e85e 1 std/math/complex/atanh.zig +2527 16120023931 1755651176000000000 2a909954adb7520e1eb158124c280ca2 1 std/math/complex/atan.zig +484 16120023955 1755651176000000000 a9e61e0f7280deab3d077856af6ca8d9 1 std/math/complex/conj.zig +5818 16120023957 1755651176000000000 3b53a3d1a1285447f00cc90f422cb7b1 1 std/math/complex/cosh.zig +577 16120023956 1755651176000000000 26877517b7d9d620e841272fd8ea3661 1 std/math/complex/cos.zig +4899 16120023958 1755651176000000000 4f31c5e9d921097840da690cc0324595 1 std/math/complex/exp.zig +620 16120023960 1755651176000000000 4e4bb03cdbb57072938d447952587286 1 std/math/complex/log.zig +608 16120023961 1755651176000000000 1258f2af84237de74fd033b6776798f2 1 std/math/complex/pow.zig +628 16120023962 1755651176000000000 b5f2e65410101f915fb75fa5712c2fd4 1 std/math/complex/proj.zig +5363 16120023964 1755651176000000000 89568cfbf7f8196aafffbd55ea670070 1 std/math/complex/sinh.zig +620 16120023963 1755651176000000000 4aade0cdfc8ac82b062412f5566aec6c 1 std/math/complex/sin.zig +4249 16120023965 1755651176000000000 0aeb21db75d92940ddcb1491d2f0445e 1 std/math/complex/sqrt.zig +3847 16120023967 1755651176000000000 98009ed972f9f5fcb177d10a345456e1 1 std/math/complex/tanh.zig +626 16120023966 1755651176000000000 ac4f4ba1ea51c6a8f2101a7bdf3b0d7c 1 std/math/complex/tan.zig +175931 15855759075 1755651176000000000 cb0553d36d2eb461b87312f4e15a99e8 1 std/math/big/int.zig +3762 281042739 1755651176000000000 2fd0c246f4a8e9ba6ccef5ff7cf0ccfe 1 std/os/linux/vdso.zig +0 281042736 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/linux/test.zig +13117 281042740 1755651176000000000 71b9a59db11f287d3253e001a21a4028 1 std/os/linux/x86.zig +13489 281042741 1755651176000000000 958bec870d653d2a62890b93b463512b 1 std/os/linux/x86_64.zig +6720 281042628 1755651176000000000 186c59f27378f16795ba8c8611b5ed95 1 std/os/linux/aarch64.zig +7970 281042629 1755651176000000000 0f4c26b73e6698859b53f9b715f3d611 1 std/os/linux/arm.zig +6097 281042638 1755651176000000000 a5e8b96435a27d99de81726a3b93e16d 1 std/os/linux/hexagon.zig +6540 281042722 1755651176000000000 9b9c64b903ecbb48c7b6c661455ef036 1 std/os/linux/riscv32.zig +6541 281042725 1755651176000000000 b833f96b582cdd1676bf2bda0ac01e90 1 std/os/linux/riscv64.zig +10847 281042730 1755651176000000000 0c589fb5ebf73b4b5662a31d45d76c75 1 std/os/linux/sparc64.zig +7941 281042643 1755651176000000000 7e1c50fd483adea99b19665fe38b2f72 1 std/os/linux/loongarch64.zig +6634 281042646 1755651176000000000 ad9a26a1c9c2d04c67203fdcf578c9f1 1 std/os/linux/m68k.zig +11254 281042650 1755651176000000000 69fd31ffc9e830951f1293a9ee9cfb72 1 std/os/linux/mips.zig +10635 281042651 1755651176000000000 ff911a8bf83253a4b85221f8a5f72189 1 std/os/linux/mips64.zig +8845 281042652 1755651176000000000 bd51d61d7005f2954e793de4ea335f5c 1 std/os/linux/powerpc.zig +8837 281042653 1755651176000000000 c1b8858b561db0b710d1f0d729e836e5 1 std/os/linux/powerpc64.zig +7186 281042727 1755651176000000000 29692c77734256a2fc877fcec567d9a0 1 std/os/linux/s390x.zig +4390 281042737 1755651176000000000 9e872767168dbe4e563e8ca82d35d42e 1 std/os/linux/thumb.zig +18676 281042738 1755651176000000000 79cbf225d0993e9837e569f3e09e0314 1 std/os/linux/tls.zig +46056 281042630 1755651176000000000 fe2f435321fb0e6eb75eeb3ca30c93b4 1 std/os/linux/bpf.zig +1297 281042641 1755651176000000000 daac8c407161fbb4bb996238aee46635 1 std/os/linux/ioctl.zig +8427 281042729 1755651176000000000 b845f84a2ea6f5532d8ffc78297dafed 1 std/os/linux/seccomp.zig +183126 281042735 1755651176000000000 fd2ae47bc58a4f876d2cb8205d4888ea 1 std/os/linux/syscalls.zig +19909 281042640 1755651176000000000 a1611786e4dda806effaf2301a5cf0ae 1 std/os/linux/io_uring_sqe.zig +173427 281042627 1755651176000000000 46b12a066a5e37b8a275732fa67d5529 1 std/os/linux/IoUring.zig +2126 816974655 1755651176000000000 d6f497f7c3ede56b9dd8eb2cae54c566 1 std/os/plan9/x86_64.zig +2368 1085913223 1755651176000000000 ef3b4d934ff0fc89d4b9c013f363e19f 1 std/os/uefi/protocol.zig +37311 1085912253 1755651176000000000 a67c5d40f56e40984ce32fba49cfa0bc 1 std/os/uefi/device_path.zig +2078 1085912254 1755651176000000000 13b23e26af6b210b16c77d73b956e867 1 std/os/uefi/hii.zig +10107 1085913224 1755651176000000000 e4c1fe82be2b68376749dbb625002706 1 std/os/uefi/status.zig +10739 1085913225 1755651176000000000 627c77aa253ea0232b674a9a41a09650 1 std/os/uefi/tables.zig +3906 1085912255 1755651176000000000 5c4587a7b4f3370e256119bdab607b4a 1 std/os/uefi/pool_allocator.zig +0 1890351198 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/windows/test.zig +2144 1890351185 1755651176000000000 25e202ff708858513ae7203c6f1043cf 1 std/os/windows/advapi32.zig +19302 1890351187 1755651176000000000 4166d597fb4bd529b9418c145598c4d4 1 std/os/windows/kernel32.zig +12119 1890351195 1755651176000000000 90384510a1298bc4a80542f39d2cc399 1 std/os/windows/ntdll.zig +77480 1890353313 1755651176000000000 d85c6950ac08847c1673726e62f4953f 1 std/os/windows/ws2_32.zig +850 1890351186 1755651176000000000 058a13f92bf4ee16e52beb60bf057dc9 1 std/os/windows/crypt32.zig +20117 1890351189 1755651176000000000 696b67a75a9a665eb00672233edffbb2 1 std/os/windows/nls.zig +130227 1890353312 1755651176000000000 a0ee928ca20f189c11667764ca96b243 1 std/os/windows/win32error.zig +3697 1890351188 1755651176000000000 f5f54b1cf522ff663148d3c96268d459 1 std/os/windows/lang.zig +8449 1890351197 1755651176000000000 3c42a760ba486f9b9455bd95d20d2e0b 1 std/os/windows/sublang.zig +135650 5117700805 1755651176000000000 a31eb8d48506c25579555c4efd1a9faf 1 std/zig/Parse.zig +142067 5382995573 1755651176000000000 c11d0a46b8fb10db9e0b6b86306a47a4 1 std/zig/Ast/Render.zig +8409 5920176868 1755651176000000000 05fc398cc2e6071c55b8a2a2fbc73720 1 std/zig/system/NativePaths.zig +12217 5920176875 1755651176000000000 431d341ca0da87ee822118293b8def7c 1 std/zig/system/windows.zig +2441 5920176872 1755651176000000000 35ecedf1e23a5fca314cc4de0bb8b2f9 1 std/zig/system/darwin.zig +15304 5920176874 1755651176000000000 580566ad2ff69b205932568d7672a3e9 1 std/zig/system/linux.zig +26641 5920176876 1755651176000000000 1653caac0003b8e8b9474f11b36c5a76 1 std/zig/system/x86.zig +19758 5649753788 1755651176000000000 3952091e9a90d59dd1ba998c365bce09 1 std/zig/llvm/BitcodeReader.zig +17956 5649753813 1755651176000000000 fc195102d6af02ed5678e5f0aa8b8390 1 std/zig/llvm/bitcode_writer.zig +592181 5649753807 1755651176000000000 eb4547393bea04ef1cf32079beef364a 1 std/zig/llvm/Builder.zig +0 7804547416 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzsi2_test.zig +0 7804547415 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzdi2_test.zig +0 7804547417 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzti2_test.zig +0 7804547919 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzsi2_test.zig +0 7804547918 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzdi2_test.zig +0 7804547920 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzti2_test.zig +0 7804548352 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffssi2_test.zig +0 7804547967 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsdi2_test.zig +0 7804548353 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsti2_test.zig +0 7804551498 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritysi2_test.zig +0 7804551497 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritydi2_test.zig +0 7804551499 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/parityti2_test.zig +0 7804551504 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountsi2_test.zig +0 7804551503 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountdi2_test.zig +0 7804551505 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountti2_test.zig +0 7804547402 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversesi2_test.zig +0 7804547401 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversedi2_test.zig +0 7804547403 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreverseti2_test.zig +0 7804547408 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapsi2_test.zig +0 7804547406 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapdi2_test.zig +0 7804547411 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapti2_test.zig +0 7804547423 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpsi2_test.zig +0 7804547420 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpdi2_test.zig +0 7804547905 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpti2_test.zig +0 7804552707 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpsi2_test.zig +0 7804552706 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpdi2_test.zig +0 7804552708 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpti2_test.zig +0 7804551513 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/shift_test.zig +0 7804551487 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negsi2_test.zig +0 7804551484 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negdi2_test.zig +0 7804551489 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negti2_test.zig +4285 7804552709 1755651171000000000 3a706e00becb790763e2c63d183e345f 1 compiler_rt/udivmod.zig +0 7804552710 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmoddi4_test.zig +0 7804551459 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulXi3_test.zig +0 7804547947 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divti3_test.zig +0 7804551456 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/modti3_test.zig +0 7804547380 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvsi2_test.zig +0 7804547378 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvdi2_test.zig +0 7804547382 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvti2_test.zig +0 7804551492 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvsi2_test.zig +0 7804551491 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvdi2_test.zig +0 7804551493 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvti2_test.zig +0 7804547389 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addosi4_test.zig +0 7804547388 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addodi4_test.zig +0 7804547390 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addoti4_test.zig +0 7804552679 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subosi4_test.zig +0 7804552678 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subodi4_test.zig +0 7804552680 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/suboti4_test.zig +0 7804551473 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulosi4_test.zig +0 7804551472 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulodi4_test.zig +0 7804551474 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/muloti4_test.zig +0 7804547957 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/extendf_test.zig +0 7804552695 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/truncf_test.zig +0 7804551222 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/int_from_float_test.zig +0 7804548410 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/float_from_int_test.zig +0 7804547913 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparesf2_test.zig +0 7804547910 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparedf2_test.zig +0 7804547385 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addf3_test.zig +0 7804551468 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulf3_test.zig +0 7804547942 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divsf3_test.zig +0 7804547927 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divdf3_test.zig +0 7804547950 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divxf3_test.zig +0 7804547945 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divtf3_test.zig +0 7804551507 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/powiXf2_test.zig +11743 7804552689 1755651171000000000 20b5273f511a6677b3f49f750fcaf786 1 compiler_rt/trig.zig +6045 7804551508 1755651171000000000 18b634df64d66eb7c240db46b32eea60 1 compiler_rt/rem_pio2.zig +2247 7804551510 1755651171000000000 2337e183931c970621500018ffe636df 1 compiler_rt/rem_pio2f.zig +0 7804551210 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodq_test.zig +0 7804551211 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodx_test.zig +0 7804552714 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmodti4_test.zig +13531 5117700539 1755651176000000000 479ed8dfe695d0a2eea06b674b3ed0da 1 std/compress/flate/Token.zig +20508 5117700533 1755651176000000000 453a65b5b55858b073099208c4e07ca8 1 std/compress/flate/BlockWriter.zig +3588 5117700538 1755651176000000000 5a3d7acaca811bf6b6e62a58645eddae 1 std/compress/flate/Lookup.zig +5945 6190427818 1755651176000000000 937d6b84c08ac71922db69ef4603ee39 1 std/compress/lzma/decode/lzbuffer.zig +4994 6190427819 1755651176000000000 159872c0de3e30f43567e5ed7666125d 1 std/compress/lzma/decode/rangecoder.zig +12650 10483472282 1755651176000000000 56befc361ef070a7bd0a2d3c1dc46994 1 std/crypto/pcurves/common.zig +67958 10758886325 1755651176000000000 0f2daafefad01026d6796eec68d65d2e 1 std/crypto/pcurves/p256/p256_64.zig +76136 10758886332 1755651176000000000 8ec5f177ef28f7a2a0ec8d103665db00 1 std/crypto/pcurves/p256/p256_scalar_64.zig +134511 11017003012 1755651176000000000 2e0dda7c40794e981dd2d2471c4776a5 1 std/crypto/pcurves/p384/p384_64.zig +137291 11017003014 1755651176000000000 81eb087d46e6c49907ae0c02d3230828 1 std/crypto/pcurves/p384/p384_scalar_64.zig +73280 11288617745 1755651176000000000 c871f98dad15c7a8c29be9ccefa4b181 1 std/crypto/pcurves/secp256k1/secp256k1_64.zig +75859 11288617746 1755651176000000000 e29275bdb0eb931fc383e7f2f5ded944 1 std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig +1807 9674508949 1755651176000000000 f47429307ac0920ff18758ce86074549 1 std/crypto/codecs/asn1/der.zig +7178 9674508948 1755651176000000000 6d4dab023a981a670d308b0b120c9077 1 std/crypto/codecs/asn1/Oid.zig +0 9674508951 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/codecs/asn1/test.zig +3892 8873237885 1755651176000000000 b6e0d691e62b1e9830666c4f8c67fdf4 1 std/crypto/Certificate/Bundle/macos.zig +3081 13433097423 1755651176000000000 2aeda0b8b6036bb4d980778abb5a928a 1 std/fmt/parse_float/common.zig +3073 13433097422 1755651176000000000 3950e4fa1fdd11d50db0b4abfc254022 1 std/fmt/parse_float/FloatStream.zig +6036 13433097421 1755651176000000000 68169ffe43d55f0eb5e26b984ef98670 1 std/fmt/parse_float/FloatInfo.zig +29140 13433097428 1755651176000000000 04115d79320f402803a56bd43cc34cf9 1 std/fmt/parse_float/decimal.zig +2726 16120023959 1755651176000000000 7f318d60fafbfa10754d5644fd131ffe 1 std/math/complex/ldexp.zig +0 15855759076 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/math/big/int_test.zig +4082 552950742 1755651176000000000 11a08913a0ec64b8325b0d29601479a7 1 std/os/linux/bpf/btf.zig +1543 552950745 1755651176000000000 95995c37b42f8d7a12578170850af6ee 1 std/os/linux/bpf/kern.zig +1998 1358753109 1755651176000000000 5a705fc01bb083d82cd43ab9ab1c6542 1 std/os/uefi/protocol/service_binding.zig +1743 1358753103 1755651176000000000 e4e18b6e0741218763e2f0eefe57c63c 1 std/os/uefi/protocol/loaded_image.zig +4860 1358753094 1755651176000000000 db6a8b32ce1366281968b6a3dbffb173 1 std/os/uefi/protocol/device_path.zig +3924 1358753107 1755651176000000000 636ee102096b7ee8d15380af87b55c99 1 std/os/uefi/protocol/rng.zig +544 1358753112 1755651176000000000 a0f63cfe62d021c13659600cea4aaa1a 1 std/os/uefi/protocol/shell_parameters.zig +1524 1358753113 1755651176000000000 7748a7cf094118fb46a4fa8cb0e326fb 1 std/os/uefi/protocol/simple_file_system.zig +13432 1358753096 1755651176000000000 995882ac23c2af4019a5dd716a5f09f3 1 std/os/uefi/protocol/file.zig +5171 1358753093 1755651176000000000 9136b751bd537d37181af6f96f23bc0d 1 std/os/uefi/protocol/block_io.zig +1827 1358753116 1755651176000000000 dc816c9ebf174e0f2191f721ebf627fd 1 std/os/uefi/protocol/simple_text_input.zig +5002 1358753117 1755651176000000000 33197652ebd5358fbd566ba1598a738f 1 std/os/uefi/protocol/simple_text_input_ex.zig +9857 1358753118 1755651176000000000 ac75efaf87e83f490e1b05ca64f3d221 1 std/os/uefi/protocol/simple_text_output.zig +2028 1358753115 1755651176000000000 2b300415efacd2dec40e6f1d67488799 1 std/os/uefi/protocol/simple_pointer.zig +2398 1358753090 1755651176000000000 2c87d630cff25fb47ddfd2241990d8f4 1 std/os/uefi/protocol/absolute_pointer.zig +4876 1358753108 1755651176000000000 1955a5a309db3628c52bf415af05b0f8 1 std/os/uefi/protocol/serial_io.zig +4296 1358753097 1755651176000000000 702a798c1a856afdd0ade5a1ee67b3cd 1 std/os/uefi/protocol/graphics_output.zig +2479 1358753095 1755651176000000000 0fab22ebe8c02b50099313679d4e2eb5 1 std/os/uefi/protocol/edid.zig +15978 1358753114 1755651176000000000 95a49124c8237f8d2ab01672bf2a69b1 1 std/os/uefi/protocol/simple_network.zig +9851 1358753105 1755651176000000000 fc89ee17ffacbefb54626ee378473525 1 std/os/uefi/protocol/managed_network.zig +13201 1358753101 1755651176000000000 427b83b08791055f001b217a1bd39a8b 1 std/os/uefi/protocol/ip6.zig +5373 1358753102 1755651176000000000 911ecc11b1404b1bef6afcda6cd7868e 1 std/os/uefi/protocol/ip6_config.zig +8567 1358753185 1755651176000000000 47adbb9c98a53124032c9ef80ce5889f 1 std/os/uefi/protocol/udp6.zig +4199 1358753098 1755651176000000000 b821152f4c9abddf1c1fb114333c66dd 1 std/os/uefi/protocol/hii_database.zig +1712 1358753099 1755651176000000000 1a882e3749f4ef9b5c5827cbb346f6a3 1 std/os/uefi/protocol/hii_popup.zig +47589 1636611726 1755651176000000000 da7566eb78da06f1636e8eb3a693eb3e 1 std/os/uefi/tables/boot_services.zig +18947 1636611728 1755651176000000000 cb1eb30776a43459956ea4c0675dee88 1 std/os/uefi/tables/runtime_services.zig +2796 1636611727 1755651176000000000 f0a08fa361dffa5eadb351a471801946 1 std/os/uefi/tables/configuration_table.zig +2295 1636611729 1755651176000000000 25bf31dd5f33af51b4b9da897fa1e3d5 1 std/os/uefi/tables/system_table.zig +214 1636611730 1755651176000000000 cdb95d6c52cd4654ef26be0bd9f114d4 1 std/os/uefi/tables/table_header.zig +0 5117700818 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/zig/parser_test.zig +15091 5920176871 1755651176000000000 e1ff2fae360a9d1df9777ae4f90bda6a 1 std/zig/system/arm.zig +16495 6190427823 1755651176000000000 753462fa54f971ae23b566336ad73030 1 std/zig/system/darwin/macos.zig +50924 5649753814 1755651176000000000 5c60970433f1092302f7ef4ff90d3f62 1 std/zig/llvm/ir.zig +20581 7804551509 1755651171000000000 e8eaf68a4ffa3364b8f352326a575189 1 compiler_rt/rem_pio2_large.zig +5806 9947794600 1755651176000000000 92f1dd53520d8191f93c177825b7845c 1 std/crypto/codecs/asn1/der/Decoder.zig +5861 9947794601 1755651176000000000 650695830257d32d9ea72d767d918703 1 std/crypto/codecs/asn1/der/Encoder.zig +419 552950743 1755651176000000000 ed7dfc04a5d0c4f0853edb5414ce981e 1 std/os/linux/bpf/btf_ext.zig +24293 552950744 1755651176000000000 0c7d3ee9ea8e698a843ee6039fd161c4 1 std/os/linux/bpf/helpers.zig +3221 9947794599 1755651176000000000 fda67b74062c7f535bb0a6d0f1fe74fb 1 std/crypto/codecs/asn1/der/ArrayListReverse.zig +2555 13293100791 1774964394127314010 af7b8c503dd3bc7d9e6e9d4fddb44557 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/echo_client.zig +4258 18810886825 1774964519812011219 064ad95de0404d880967d9741c4709f4 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/echo_client.zig +2165 18810886828 1774964394130251358 c0e1d3bc8b51f925411a5afc5e481449 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/uds_backend.zig +7666 18810886826 1774964519811011203 77dbfaf869e548f80dbc3a2ed4fb5e3c 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/echo_types.zig +1094 18810886827 1774964394130208567 f3eb00adc6a82886766c8d64f80b7130 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/backend.zig +1833 17453079975 1774434465607528606 ca552a4a253c35adc49cc174cc3a7c2e 3 p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem/src/compat.zig diff --git a/service-examples/zig/echo/.zig-cache/h/a201adbf677f3b9eed3b1c20add551ac.txt b/service-examples/zig/echo/.zig-cache/h/a201adbf677f3b9eed3b1c20add551ac.txt new file mode 100644 index 000000000000..2d1bd15f6e8f --- /dev/null +++ b/service-examples/zig/echo/.zig-cache/h/a201adbf677f3b9eed3b1c20add551ac.txt @@ -0,0 +1,839 @@ +0 +66312 2969746748 1755651176000000000 14fae37210c02c5e37e12220a8d796e3 1 compiler/build_runner.zig +1090 13293100788 1774964394116379942 66529a2e088d3e7853ed1befa6ad9503 0 build.zig +619 14260321298 1774964530245176886 77ca293595758d70c71b4e480719301c 2 o/3d49a05050fcba58dc9679bb1ea6840e/dependencies.zig +22187 2158150032 1755651176000000000 408a2a1c3d712caf2107e3e3dfb7022b 1 ubsan_rt.zig +3709 16708518544 1774434465607528606 96d05fa0f655ac755ea593aa5e3a6bae 3 p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem/build.zig +11083 2158133725 1755651171000000000 3c8016eb348fede9a19b94ec4869d8a6 1 compiler_rt.zig +7957 1358769308 1755651176000000000 0ebbb46b337b65e85e7d177cfc93d2ca 1 std/std.zig +2525 1358747925 1755651176000000000 71e0dabdb301ba10f8ca420941767e70 1 std/BitStack.zig +100782 1358747926 1755651176000000000 93d126516cbe85e7dab1c855c82058cb 1 std/Build.zig +4266 1358747943 1755651176000000000 16fdba428de22eb1305e855dec42f9a9 1 std/buf_map.zig +4526 1358747944 1755651176000000000 8e63f8aad9b21f2cac5dcdcafd975d93 1 std/buf_set.zig +8139 1358747927 1755651176000000000 b344fa05d00dd94ca9bb8e95cc23b3fc 1 std/DoublyLinkedList.zig +25874 1358747952 1755651176000000000 84e0fbf3feb0ac8196cb74e389a3ccb0 1 std/dynamic_library.zig +35271 1358747929 1755651176000000000 0d7d03be6dc0cb75afa123aa4eb4d818 1 std/Io.zig +43556 1358752733 1755651176000000000 5bfaba216d6a1896e7f4b43e7ee7fe1a 1 std/multi_array_list.zig +21416 1358760861 1755651176000000000 4328abc876b82840e689434566876bc7 1 std/priority_queue.zig +33889 1358760856 1755651176000000000 431c78ed77c39d0be4be43c7634c12d0 1 std/priority_dequeue.zig +60600 1358747930 1755651176000000000 518fc21273ed20754da5c332f4c01208 1 std/Progress.zig +17628 1358747931 1755651176000000000 697e28034ef9cf05bb04d3be028a9653 1 std/Random.zig +20351 1358769295 1755651176000000000 41f61f133b5c7661bc5f90889fd39045 1 std/segmented_list.zig +10911 1358747932 1755651176000000000 72379f2cc10c10e56c76ebebd42ca14c 1 std/SemanticVersion.zig +5252 1358747933 1755651176000000000 b2d7e2ffcc15cc25fbc30a3e3799cfba 1 std/SinglyLinkedList.zig +107040 1358747934 1755651176000000000 f931b01a199517a5df7184e98bad442e 1 std/Target.zig +60770 1358747935 1755651176000000000 9d935b7746e443b6cfa58f88eb113dc4 1 std/Thread.zig +24524 1358770048 1755651176000000000 1694ad0602c4425ddf33879d415f4ab1 1 std/treap.zig +31490 1358747936 1755651176000000000 7cd075d309fe4bb3e810216b10d3f0c8 1 std/Uri.zig +95685 1358747938 1755651176000000000 a68eb5aa7a6d2c07cb820b6b5ffa0604 1 std/array_list.zig +119750 1358747937 1755651176000000000 a483a92911be1b36d25671285d410963 1 std/array_hash_map.zig +19425 1358747940 1755651176000000000 09d08e5d80b113466699bf4262b53875 1 std/atomic.zig +24490 1358747941 1755651176000000000 db10a569a8a9a16313103b691a443b4a 1 std/base64.zig +69019 1358747942 1755651176000000000 a44de477fecc990a1381fe54649a934b 1 std/bit_set.zig +39860 1358747945 1755651176000000000 bab8724be90660375455f96475ebd26f 1 std/builtin.zig +360045 1358747946 1755651176000000000 41c881372d765477c751e9b06e39e91f 1 std/c.zig +51742 1358747947 1755651176000000000 a9384cc5046eaeedcb1b30e646b423dc 1 std/coff.zig +372 1358747948 1755651176000000000 b867983786f01e8333e32b633eb10410 1 std/compress.zig +17640 1358769307 1755651176000000000 bd79322afba3cc08000a99c21bfd26d7 1 std/static_string_map.zig +13676 1358747949 1755651176000000000 56a50f35f9d4227c9754ad2bad741de1 1 std/crypto.zig +69500 1358747950 1755651176000000000 f2ac0dce249b308c0c7483a07e9d8c21 1 std/debug.zig +4894 1358747951 1755651176000000000 61fff94fe737bda88edd8ca624c0a93c 1 std/dwarf.zig +65720 1358747953 1755651176000000000 bbe1ed25b53adc620fcc2bcd89a2a536 1 std/elf.zig +57857 1358747954 1755651176000000000 e8bdba1d4814ce140abed00d8ac27c66 1 std/enums.zig +58752 1358747955 1755651176000000000 94d08677478fb7c8fd9ecad13a05a7f6 1 std/fmt.zig +34417 1358747956 1755651176000000000 2d9a528a5756bb811d20d393011711e8 1 std/fs.zig +4919 1358747957 1755651176000000000 9c3f0431c1637a1fc64fa91b0520d1b3 1 std/gpu.zig +4120 1358747958 1755651176000000000 287776a366bc2fa9071678dd14432afc 1 std/hash.zig +80684 1358747959 1755651176000000000 5d2dba5503b8646ccb51c7481cec177d 1 std/hash_map.zig +35783 1358747960 1755651176000000000 291afdd8c7934ab8495ad0cb24e3272b 1 std/heap.zig +39240 1358747961 1755651176000000000 948901b44d7c0b5b43749fa91ebd4552 1 std/http.zig +5465 1358747962 1755651176000000000 050dd347d737c8ab1673d3762b02a7e0 1 std/json.zig +18649 1358747963 1755651176000000000 f1185edfabdd268969ce0577870e98a2 1 std/leb128.zig +8342 1358747964 1755651176000000000 7a79e5053bcf4725fcf9ca5e03c43252 1 std/log.zig +70826 1358747965 1755651176000000000 6a8358e9e839fb48052b1b0c7aa87559 1 std/macho.zig +74776 1358747966 1755651176000000000 d4a0c6126fce11a0cafaea7b313668ac 1 std/math.zig +184945 1358747967 1755651176000000000 780cc406a638f4fee16e04354f8b9612 1 std/mem.zig +39789 1358751424 1755651176000000000 05e33fd489986e7ef7a2114c8f3040d0 1 std/meta.zig +88641 1358752741 1755651176000000000 f046d7172f3a3de58ed9e665b16b72ce 1 std/net.zig +10310 1358753186 1755651176000000000 2384f794189b66c622279a439a06e7a5 1 std/os.zig +2016 1358752763 1755651176000000000 b634eff517218815e970c18230425d31 1 std/once.zig +13947 1358753188 1755651176000000000 4e879b4dee70c859bd0938a160593e4c 1 std/pdb.zig +11147 1358753189 1755651176000000000 67e0f1b41fa1dbada2b0874d26ef4d81 1 std/pie.zig +290871 1358758782 1755651176000000000 0a923dee580fffa1623318e59d0a2b3e 1 std/posix.zig +78344 1358769290 1755651176000000000 b08239d255f89ec21465710fcbc5e908 1 std/process.zig +39596 1358769301 1755651176000000000 338f2628729e859f51865caf708004bc 1 std/sort.zig +23280 1358769300 1755651176000000000 8de2dfb1368f1051037084ba56ea4a97 1 std/simd.zig +16059 1358747939 1755651176000000000 7d6ee226b3aea4e399efa02748582a57 1 std/ascii.zig +42826 1358769309 1755651176000000000 55143931b33969e1e759f8623049586c 1 std/tar.zig +48207 1358769310 1755651176000000000 deee7351dbab0664b3bc9a4bdb2a5d38 1 std/testing.zig +11575 1358769311 1755651176000000000 04290176ff236793a2846b7afe763a99 1 std/time.zig +11173 1358770049 1755651176000000000 a51ee0838574fdd01999198cbeff620f 1 std/tz.zig +85999 1358770050 1755651176000000000 a384b975bb355f986219464058d80145 1 std/unicode.zig +12292 1358770051 1755651176000000000 8757ba546e520503fcc6a58d9b0d0083 1 std/valgrind.zig +17661 1358770054 1755651176000000000 a8988138c7ee50f868cd1db24ab3d1d6 1 std/wasm.zig +37103 1358770055 1755651176000000000 954dfee598538ddb98e9fc105c2e0a39 1 std/zig.zig +26592 1358770056 1755651176000000000 2d4666d88f0c60307ae5724c74a78854 1 std/zip.zig +1242 1358770057 1755651176000000000 c5e5cebc2cfc9353dc65aa5193442b60 1 std/zon.zig +28071 1358769306 1755651176000000000 76d2b688d1d45fbb74ca560efdaac238 1 std/start.zig +5929 8072386496 1755651176000000000 a75e2588e1a73369810b6ba7657e4bfd 1 std/crypto/tlcsprng.zig +59803 1636611718 1755651176000000000 b6406a99c6bcfa6765bfb08eafcbff0d 1 std/Build/Cache.zig +38694 1636611721 1755651176000000000 4bafc6be1344a4b0b4bfce1abc099568 1 std/Build/Step.zig +26376 1636611720 1755651176000000000 bb934510edbc055949ffff1646e5e1e6 1 std/Build/Module.zig +43006 1636611722 1755651176000000000 01457aac972ac3a8e51fa2185c19c1be 1 std/Build/Watch.zig +17168 1636611719 1755651176000000000 907b4dad04e8cdc9fb34a46e35e44fb3 1 std/Build/Fuzz.zig +30748 1636611723 1755651176000000000 5bf5917eafea467894d1bdebd37cc3aa 1 std/Build/WebServer.zig +10407 1636611724 1755651176000000000 219f7675797b83c184e56753dff6542a 1 std/Build/abi.zig +64087 2702453039 1755651176000000000 1ba61be2534ce203f154a61c6565f179 1 std/Io/Reader.zig +106521 2702453040 1755651176000000000 d8e9286f3772f2b52339c5bf9facf601 1 std/Io/Writer.zig +14469 2702453037 1755651176000000000 50460af6b2b24665a01f2798a19968d6 1 std/Io/DeprecatedReader.zig +3660 2702453038 1755651176000000000 667198a0bb922d33d2c2fb81a9a25d30 1 std/Io/DeprecatedWriter.zig +6043 2702453042 1755651176000000000 8a44e6b03e4a42b09a4077448a7c41db 1 std/Io/fixed_buffer_stream.zig +1227 2702453041 1755651176000000000 8e42c53c443deeb5a1d9cd2b1a3dbee7 1 std/Io/counting_reader.zig +5692 2702453044 1755651176000000000 1ef2fac09b5b843536005bd1350d920d 1 std/Io/tty.zig +0 2702453043 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/test.zig +1811 3233988262 1755651176000000000 4f975bd4c885c2b17936c7c15e2a1fa0 1 std/Random/Ascon.zig +2685 3233988263 1755651176000000000 5244bfd5edd68ad074bfdf866029fa86 1 std/Random/ChaCha.zig +6100 3233988264 1755651176000000000 14fb5367ee7128106466c91abe89d828 1 std/Random/Isaac64.zig +2727 3233988265 1755651176000000000 98b129620d81fc551cc2747eb5e93a2d 1 std/Random/Pcg.zig +3242 3233988330 1755651176000000000 13e05c7b4ba6bd757c30dbc6e1520198 1 std/Random/Xoroshiro128.zig +3177 3233988369 1755651176000000000 ece4176296c0d5a4735a0e13195d3e89 1 std/Random/Xoshiro256.zig +3158 3233988267 1755651176000000000 e0b128479f8a117718ec288761f83ac0 1 std/Random/Sfc64.zig +3699 3233988266 1755651176000000000 f562dad96707be48e6745a1f57cbf27c 1 std/Random/RomuTrio.zig +530 3233988268 1755651176000000000 6862d091fadcbbb652464ab10689bd23 1 std/Random/SplitMix64.zig +4526 3233988378 1755651176000000000 8ac3cfca93be2f623ce661fc9fb27686 1 std/Random/ziggurat.zig +0 3233988374 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Random/test.zig +29955 3503343368 1755651176000000000 7abef445358bc9111ee7720810ab2dfe 1 std/Target/Query.zig +106498 3503343369 1755651176000000000 4e1faa0e06f720a8513cc19957f2cd52 1 std/Target/aarch64.zig +104612 3503343370 1755651176000000000 06339133610c2f04ff7073b54ed9f610 1 std/Target/amdgcn.zig +1274 3503343371 1755651176000000000 c251325fefba8d6614a0692c5ceb2eea 1 std/Target/arc.zig +79071 3503343372 1755651176000000000 c8ffd174d8ea40cc06efcf87bf4b657a 1 std/Target/arm.zig +71492 3503343373 1755651176000000000 8dcc898c0cae23c1a6c85b1acad47ada 1 std/Target/avr.zig +2425 3503343374 1755651176000000000 3376bf5f146580e9b3ce5e329a604817 1 std/Target/bpf.zig +77604 3503343375 1755651176000000000 be007dfe415760a79fc1d9d7dc89a548 1 std/Target/csky.zig +18058 3503343377 1755651176000000000 8ccf22d3bcff20d7636d8251948f4618 1 std/Target/hexagon.zig +665 3503343376 1755651176000000000 1dec26e22b22006cd47d45b427f8a00c 1 std/Target/generic.zig +1207 3503343378 1755651176000000000 2119135642c6ce06557e5005da5d27d3 1 std/Target/lanai.zig +6753 3503343379 1755651176000000000 da13f92a1b8d03cc797a3beeaa2922d6 1 std/Target/loongarch.zig +7140 3503343380 1755651176000000000 85a640161b5e75f1b0e44aafa7b2ac12 1 std/Target/m68k.zig +16348 3503343381 1755651176000000000 12a09875d65985836758c030c651b686 1 std/Target/mips.zig +2227 3503343382 1755651176000000000 f424aba074f946c774143fd6a0cc9b02 1 std/Target/msp430.zig +16613 3503343383 1755651176000000000 166964aa1c4340f0f5e8c2079fbe6806 1 std/Target/nvptx.zig +36467 3503343384 1755651176000000000 aba041f244b5c814708cec688ed2ab9b 1 std/Target/powerpc.zig +1396 3503343385 1755651176000000000 11966b944c6a6f5eb378759087686f44 1 std/Target/propeller.zig +90023 3503343386 1755651176000000000 f9c2faa81a8573bbbf95b94084ffd3be 1 std/Target/riscv.zig +30256 3503343387 1755651176000000000 a3772db647d2b9a091f142be3fe81a5a 1 std/Target/s390x.zig +21324 3503359904 1755651176000000000 dff9a38ced436d7efc5afea4972eb822 1 std/Target/sparc.zig +5037 3503359905 1755651176000000000 7a802abba56de166296a02820267f278 1 std/Target/spirv.zig +1276 3503359906 1755651176000000000 320e5694ddc1e4347015e29952472e47 1 std/Target/ve.zig +6517 3503359907 1755651176000000000 1babc8b342fb599193f79f08f76e9463 1 std/Target/wasm.zig +139090 3503359908 1755651176000000000 6c63cbfe59447c9f4755d8b977fd0e4d 1 std/Target/x86.zig +1234 3503359909 1755651176000000000 9977314bd28dc12c6017784ed96cc578 1 std/Target/xcore.zig +1274 3503359910 1755651176000000000 b20b4af52a8974acb1c9cf688822a23c 1 std/Target/xtensa.zig +42124 3769667637 1755651176000000000 a3d49f74bb65b5f4d7a02d5cac8c7afe 1 std/Thread/Futex.zig +9112 3769667642 1755651176000000000 fe6a25bfea2dcf9533b026b4e0846b98 1 std/Thread/ResetEvent.zig +10156 3769667639 1755651176000000000 f3390bd4b6bae3fe12192885ee63130d 1 std/Thread/Mutex.zig +2650 3769667644 1755651176000000000 3ea6f138fe347f9c36c6331f8ba278e3 1 std/Thread/Semaphore.zig +23329 3769667636 1755651176000000000 6fcf321e05d855b3995cb3a50125c3f8 1 std/Thread/Condition.zig +11411 3769667643 1755651176000000000 215e3b4416494f856a25895960f5a4ca 1 std/Thread/RwLock.zig +9540 3769667640 1755651176000000000 628f9bee010911810b3c9193792c6f53 1 std/Thread/Pool.zig +1988 3769667645 1755651176000000000 6793266710d780758ac32c2edcc166a9 1 std/Thread/WaitGroup.zig +59140 4340765711 1755651176000000000 92182faee34134d52a9ad2d0a5a5fb2f 1 std/builtin/assembly.zig +50235 4576346041 1755651176000000000 9708ebe35d8d2550494584ceeba81209 1 std/c/darwin.zig +11274 4576346045 1755651176000000000 09bec7c3f40f6de5099b6d1914d351cf 1 std/c/freebsd.zig +9878 4576346075 1755651176000000000 ab1e53cee5c67832574a9055e0108e66 1 std/c/solaris.zig +6617 4576346072 1755651176000000000 d16786c18fabd57be5a8635a6ef08bb1 1 std/c/netbsd.zig +3875 4576346043 1755651176000000000 907c436f260d11e9f80420d838051111 1 std/c/dragonfly.zig +15535 4576346070 1755651176000000000 43ebba145dd0318d69788910b66220e7 1 std/c/haiku.zig +13681 4576346073 1755651176000000000 06689937d111c195fd6baae889fc720b 1 std/c/openbsd.zig +3099 4576346074 1755651176000000000 6a897bb99820db129b41bc2b5d6046bb 1 std/c/serenity.zig +6341 4845181927 1755651176000000000 33490794e8bee84517ccfebe261d4eae 1 std/compress/flate.zig +3010 4845181929 1755651176000000000 e6aae4a5afa281030d98b006a53807e0 1 std/compress/lzma.zig +894 4845181930 1755651176000000000 0112dea02a7ad758670754ecb2e3ff09 1 std/compress/lzma2.zig +5317 4845181932 1755651176000000000 23792685eae819b737bc8922607d4ba7 1 std/compress/xz.zig +6605 4845181933 1755651176000000000 295f3b5136806a9f26e893c51e33025d 1 std/compress/zstd.zig +10441 8072380959 1755651176000000000 b922de5f94704738f619903775fecb17 1 std/crypto/timing_safe.zig +47614 8072380895 1755651176000000000 a03a980a4a1a9a95bf94441f8c307101 1 std/crypto/aegis.zig +6851 8072380897 1755651176000000000 ea7fad6fda828c72abcc0148e4659e9c 1 std/crypto/aes_gcm.zig +14129 8072380898 1755651176000000000 65b51cb2f9dda41995f89b221db5507e 1 std/crypto/aes_ocb.zig +51909 8072380912 1755651176000000000 451cb3546d86929665419cd05bea0293 1 std/crypto/chacha20.zig +6309 8072380923 1755651176000000000 1318dc8b9450bda7d30b2f2bd66ef98f 1 std/crypto/isap.zig +27260 8072380931 1755651176000000000 b95f25fd28a65f6f71761d12efaee503 1 std/crypto/salsa20.zig +3626 8072380922 1755651176000000000 7d28bd5a64f521b7f7322612e4d5f562 1 std/crypto/hmac.zig +18629 8072380957 1755651176000000000 0ee80c1bcfed0bfc7fe20c0fd3c04d22 1 std/crypto/siphash.zig +6226 8072380914 1755651176000000000 4270e1555211de4aca948cd086fc7129 1 std/crypto/cmac.zig +8993 8072380896 1755651176000000000 1565baef5de85c1722fc1f3661e7418c 1 std/crypto/aes.zig +15303 8072380924 1755651176000000000 ac2b7ab43674f07a4208ffa738f420c5 1 std/crypto/keccak_p.zig +9666 8072380907 1755651176000000000 bfcf52448d42cda00bcaa777deca80cf 1 std/crypto/ascon.zig +2303 8072380927 1755651176000000000 64e2696fd33ff024c44aee16a197afac 1 std/crypto/modes.zig +8666 8345434072 1755651176000000000 3f63b88b98e1cb4a076af7d105c52b5f 1 std/crypto/25519/x25519.zig +65291 8072380926 1755651176000000000 d602189df4b86e3751c21259bc485f24 1 std/crypto/ml_kem.zig +8492 8345434063 1755651176000000000 1ad8b856fa664e2584776361ba03bdc0 1 std/crypto/25519/curve25519.zig +25932 8345434068 1755651176000000000 a2d994ac2ed36751f95ac92b85a4931d 1 std/crypto/25519/edwards25519.zig +16174 10483472283 1755651176000000000 1624d5389942bffd6016dc87453db0b7 1 std/crypto/pcurves/p256.zig +16370 10483472284 1755651176000000000 c7fb645fa9fd8e26db3c4252856cdc9d 1 std/crypto/pcurves/p384.zig +7971 8345434070 1755651176000000000 d0d33655dcbd80c50d53283108a54034 1 std/crypto/25519/ristretto255.zig +20520 10483472285 1755651176000000000 e8ead8fcc9affae7d203ecb87a0e8236 1 std/crypto/pcurves/secp256k1.zig +29319 8072380910 1755651176000000000 30d94c7ccda432eb5df2b6e7c68e0c35 1 std/crypto/blake2.zig +41428 8072380911 1755651176000000000 711b0501d46a7c267b6f90ee8be3aacd 1 std/crypto/blake3.zig +9751 8072380925 1755651176000000000 d4911af79a2684c60a4325e9142b1609 1 std/crypto/md5.zig +9321 8072380894 1755651176000000000 15ebe6e9b9de51b93b00e1b463f00cb4 1 std/crypto/Sha1.zig +36825 8072380934 1755651176000000000 bfc45b688f4f79b09cd3fa2ec3ce7a9e 1 std/crypto/sha2.zig +35726 8072380956 1755651176000000000 74ba21545a132750f9a4eef5a37da502 1 std/crypto/sha3.zig +2756 8072380920 1755651176000000000 3f1b15f01d5b6045525b1b5b73081e67 1 std/crypto/hash_composition.zig +3703 8072380921 1755651176000000000 09d36564cbdc5d24ea6fa90e4b7dd6e5 1 std/crypto/hkdf.zig +20494 8072380919 1755651176000000000 c857473fa22ec9e817a3c52e298e2eec 1 std/crypto/ghash_polyval.zig +7259 8072380930 1755651176000000000 1b5aed273103196d0bdc885bc2b6ec2c 1 std/crypto/poly1305.zig +28906 8072380900 1755651176000000000 da61f4b2f151f214129e329fd7af44dc 1 std/crypto/argon2.zig +37669 8072380908 1755651176000000000 147c9e47e9a5a805c79882ce141f1fad 1 std/crypto/bcrypt.zig +25878 8072380932 1755651176000000000 21725e7f671298d416186499754301ea 1 std/crypto/scrypt.zig +8451 8072380928 1755651176000000000 e0bc6ddf2119b9cfe2a19626ded9635a 1 std/crypto/pbkdf2.zig +13838 8072380929 1755651176000000000 7867fa74be498feed958e4107163a822 1 std/crypto/phc_encoding.zig +31401 8345434067 1755651176000000000 727ee4c7eeb22bc4a90a96437f332593 1 std/crypto/25519/ed25519.zig +395201 8072380916 1755651176000000000 4f4d382c531f90a2b4550ea4207a4d70 1 std/crypto/ecdsa.zig +38465 8072380918 1755651176000000000 5ec16eac7226fcb11dbfeba8f371ee79 1 std/crypto/ff.zig +165 8072380915 1755651176000000000 0ab9a19cc7544d7896d8555b38c3292a 1 std/crypto/codecs.zig +1715 8072380917 1755651176000000000 f0b8832dd923baeda761e9855ed9d1ab 1 std/crypto/errors.zig +25575 8072386497 1755651176000000000 05de4a472e23ccd4ece1a15329fc0dcb 1 std/crypto/tls.zig +50895 8072380893 1755651176000000000 37739975874d2d5867dbd6043614417c 1 std/crypto/Certificate.zig +4783 12094458721 1755651176000000000 bcebc8664d30ed61fbe6f4f52df7e6c8 1 std/debug/MemoryAccessor.zig +2664 12094458719 1755651176000000000 d18c45d7c3943d59326b6215041f7b9b 1 std/debug/FixedBufferReader.zig +95718 12094458718 1755651176000000000 031ee6c2142eb78ee4d751fdef4e8aee 1 std/debug/Dwarf.zig +22200 12094458722 1755651176000000000 cadc751a24d7fe6cd0045c67d91fccc4 1 std/debug/Pdb.zig +90918 12094458723 1755651176000000000 1af6e89bf60261270c63c0b89b93dbe4 1 std/debug/SelfInfo.zig +2274 12094458720 1755651176000000000 a1cbdaf27c5043ba4157f3a1bfcd68fd 1 std/debug/Info.zig +8486 12094458717 1755651176000000000 2ff9c5b27e3411a59088d247231e9d0f 1 std/debug/Coverage.zig +3221 12094458725 1755651176000000000 ff7b6d80307d98046c1a6b71ce9736cb 1 std/debug/simple_panic.zig +2349 12094458724 1755651176000000000 58f6d8954e49f4e277db7b9bad6e1f3c 1 std/debug/no_panic.zig +3939 12626842388 1755651176000000000 5ee5df976eaaf300e36cd234fc3f2f43 1 std/dwarf/TAG.zig +7632 12626842380 1755651176000000000 101aeaf3e9df594bf04093c15135dc96 1 std/dwarf/AT.zig +5693 12626842387 1755651176000000000 01d731f8d28ba8382ff3c5885d5e0c75 1 std/dwarf/OP.zig +1963 12626842386 1755651176000000000 055280c08a34f56d3d4ea7d69cf3fca3 1 std/dwarf/LANG.zig +1399 12626842385 1755651176000000000 40a7d4ac60d12c6e9ca294acaed35474 1 std/dwarf/FORM.zig +1479 12626842382 1755651176000000000 8bd901aaa561652b86f99819d0da7a57 1 std/dwarf/ATE.zig +643 12626842384 1755651176000000000 6f6a9e4e1602df062ad02179710971c4 1 std/dwarf/EH.zig +94944 12899024245 1755651176000000000 f351cb76a2427938af1d074abce787ce 1 std/fmt/float.zig +13189 12899024262 1755651176000000000 8fcd1365fb1fe2c743d223fc34880b6a 1 std/fmt/parse_float.zig +2845 13703306145 1755651176000000000 4f058fd80be3876870bc26a123c9de42 1 std/fs/AtomicFile.zig +114999 13703306146 1755651176000000000 a44f3eadd8cf27aad7b7c047f184c8e7 1 std/fs/Dir.zig +86478 13703306147 1755651176000000000 995d0bf84e899044cc3510a9ca641329 1 std/fs/File.zig +78108 13703306149 1755651176000000000 be1cf725a1de08084d5bf813f6758d74 1 std/fs/path.zig +1888 13703306151 1755651176000000000 2c143a188f1f9a5e0b6cf6eb3a2a3825 1 std/fs/wasi.zig +2665 13703306148 1755651176000000000 a74f4aed0521f238f302bbce59933ebd 1 std/fs/get_app_data_dir.zig +0 13703306150 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/fs/test.zig +2797 14239609756 1755651176000000000 e2d2903d78455f002bdf1543be5bd9b3 1 std/hash/Adler32.zig +14624 14239609757 1755651176000000000 5d40bb3c14d452873d2170a0dc501e12 1 std/hash/auto_hash.zig +19972 14239609762 1755651176000000000 c36dede4b91e35db37ea45c66dbe6fe9 1 std/hash/crc.zig +1890 14239609765 1755651176000000000 8022a7844b1545ef9cc7889a3a71944a 1 std/hash/fnv.zig +9977 14239609766 1755651176000000000 26add2cb2571b835338f163c8ca63459 1 std/hash/murmur.zig +12412 14239609760 1755651176000000000 cd681dc3507b42839b769eae04b1dc3b 1 std/hash/cityhash.zig +8367 14239609768 1755651176000000000 4744eb583f951c0ddcee1cf3bdde33fb 1 std/hash/wyhash.zig +41799 14239609769 1755651176000000000 ee3e90d0630039df9f6254b022ce80e1 1 std/hash/xxhash.zig +13560 14783155617 1755651176000000000 12f037849d64048bd40c550289bf0826 1 std/heap/arena_allocator.zig +7465 14783155614 1755651176000000000 c45d8aa65e37758c03dbedc65850dbf5 1 std/heap/SmpAllocator.zig +7575 14783155612 1755651176000000000 b8819311409154f2ecf659e0c1e915b6 1 std/heap/FixedBufferAllocator.zig +8217 14783155613 1755651176000000000 fb438f5e75bc8857d9d1a5b0e9421e85 1 std/heap/PageAllocator.zig +7469 14783155620 1755651176000000000 d0066bdd4d2784177387f85d9c416259 1 std/heap/sbrk_allocator.zig +1681 14783155615 1755651176000000000 720fc81adedeb4b35463081496f20d4a 1 std/heap/ThreadSafeAllocator.zig +10472 14783155616 1755651176000000000 21ee044c07f5991f129755da06deea5a 1 std/heap/WasmAllocator.zig +59918 14783155618 1755651176000000000 552ab3f08dc9b1a495663dc5b84ab562 1 std/heap/debug_allocator.zig +8049 14783155619 1755651176000000000 cd6c38f86fa0a1bd7ddaa85a0e7f94f7 1 std/heap/memory_pool.zig +70675 15048099509 1755651176000000000 dbf2b76bc62a45f82da46916ded41556 1 std/http/Client.zig +31360 15048099516 1755651176000000000 abd6ae4080522f73e4745e5efce346dc 1 std/http/Server.zig +13015 15048099510 1755651176000000000 4c7e2ad894ad12f141066550c9bb326a 1 std/http/HeadParser.zig +3791 15048099508 1755651176000000000 61420280e3c9986a74a687031fdcf831 1 std/http/ChunkParser.zig +3108 15048099515 1755651176000000000 149ac2b5413f4e7bdf793b3740a63558 1 std/http/HeaderIterator.zig +0 15048099517 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/http/test.zig +7996 15317222681 1755651176000000000 8b3aa35651f2969c3a859a3fab94f443 1 std/json/dynamic.zig +3272 15317222684 1755651176000000000 39fdbe23f321a0cb11a35e428810a09e 1 std/json/hashmap.zig +72868 15317222678 1755651176000000000 ae7b2e59c7744ce34ba98c07df5ef06b 1 std/json/Scanner.zig +33828 15317222687 1755651176000000000 bb79d803b31bd0bc320ba90aa1d2b0dd 1 std/json/static.zig +37319 15317222679 1755651176000000000 48c6d66b659b03b4e105add369592eda 1 std/json/Stringify.zig +0 15317222689 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/test.zig +0 15317221419 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/JSONTestSuite_test.zig +12048 15580753241 1755651176000000000 423025cbe9a3339e236aaf0fc007496c 1 std/math/float.zig +1681 15580753262 1755651176000000000 23aba00e34aa5a807ee8d4bddf2738c5 1 std/math/isnan.zig +7877 15580753245 1755651176000000000 21099ae36d31e459824cfc3757a834f2 1 std/math/frexp.zig +4458 15580753472 1755651176000000000 78dbab36632b04ee9c8bc0e72a713100 1 std/math/modf.zig +1136 15580753233 1755651176000000000 9f0946a16071ec7d7cb9f45c227c22f1 1 std/math/copysign.zig +1083 15580753255 1755651176000000000 eb357e7577b828d5fc2ce3b4118459f2 1 std/math/isfinite.zig +1775 15580753260 1755651176000000000 44fb86a5536455ca3877bb415347c6ac 1 std/math/isinf.zig +1456 15580753266 1755651176000000000 a37461dca6f9345d8f8a2729c13b9ff6 1 std/math/iszero.zig +1837 15580753263 1755651176000000000 cb4e66e7b3adbf190150294715c788b0 1 std/math/isnormal.zig +19209 15580753473 1755651176000000000 000ec81e9c79a332fb482883ab800777 1 std/math/nextafter.zig +1557 15580753477 1755651176000000000 3157574850d20851e8580a398e6895a9 1 std/math/signbit.zig +503 15580753476 1755651176000000000 66d1263715127908b281862dba5dc24b 1 std/math/scalbn.zig +6839 15580753274 1755651176000000000 65cf74d2abee4d99cea2993060dc9cc0 1 std/math/ldexp.zig +9113 15580753474 1755651176000000000 2a24fb6143c914862a5d74c95a9f8b13 1 std/math/pow.zig +7643 15580753475 1755651176000000000 5c50833e1a201a5be1f48de7ea538f0d 1 std/math/powi.zig +2837 15580753479 1755651176000000000 50e9a695059ca6bb04cd979304e4c09b 1 std/math/sqrt.zig +4812 15580753231 1755651176000000000 6f62d1f1ae7bff93c034f6f664aeaa12 1 std/math/cbrt.zig +5378 15580753216 1755651176000000000 25b4039f6f32ddc437baa4061a3f8c3d 1 std/math/acos.zig +5337 15580753218 1755651176000000000 eb35acdb17b747cc2f790e4ff8666d54 1 std/math/asin.zig +7275 15580753220 1755651176000000000 5d8af88aea5f35ce7e37d0f0af8a4baf 1 std/math/atan.zig +10553 15580753221 1755651176000000000 0cafcb907ba579b6b64631165a647329 1 std/math/atan2.zig +4748 15580753249 1755651176000000000 910e3c3ba1e7626618c73be7f12f9319 1 std/math/hypot.zig +11499 15580753236 1755651176000000000 1ddb2b66fbdf7acb2a4ad484203ae340 1 std/math/expm1.zig +5519 15580753252 1755651176000000000 eacf48263508740f77738f675caef7a6 1 std/math/ilogb.zig +2531 15580753275 1755651176000000000 b3b40fd4682f372913e09bc18ca3fcd6 1 std/math/log.zig +1919 15580753456 1755651176000000000 a350e2bd40b9fc740607c3d658668abb 1 std/math/log2.zig +5553 15580753276 1755651176000000000 e10fe90c6d01abfe27b7f2ee6e929a68 1 std/math/log10.zig +4219 15580753470 1755651176000000000 88ffa0f96518ccc1715935c0618e543e 1 std/math/log_int.zig +8872 15580753442 1755651176000000000 754de08c8dc06a6115beb96e5a991ad7 1 std/math/log1p.zig +4299 15580753219 1755651176000000000 9d6c681faf8421823919e5bf347bf740 1 std/math/asinh.zig +2756 15580753217 1755651176000000000 349667a0bb1e62bdc0383bce5747190c 1 std/math/acosh.zig +3399 15580753228 1755651176000000000 7b22337c4a4df112f2c4be431b076007 1 std/math/atanh.zig +4294 15580753478 1755651176000000000 42ef534228feb279b81e6fa2a5d79333 1 std/math/sinh.zig +4157 15580753234 1755651176000000000 1dcc281bf0ca8a9782e5ae845f7b1fa5 1 std/math/cosh.zig +4581 15580753480 1755651176000000000 2b64632014a58c73e7052420b356fcaa 1 std/math/tanh.zig +2024 15580753248 1755651176000000000 28fd0ee50d92f0c08fd6aab95d6f15ee 1 std/math/gcd.zig +1194 15580753273 1755651176000000000 40b3836f0a2277cb76754547dd483869 1 std/math/lcm.zig +11487 15580753247 1755651176000000000 c0bf0098a075fd684bcbeff41e5abbc4 1 std/math/gamma.zig +6563 15580753232 1755651176000000000 dccdf309b3630a59978e204ea0cbde99 1 std/math/complex.zig +746 15580753229 1755651176000000000 cd57ee7b96c9ee1b66a3e7fc3ef16da9 1 std/math/big.zig +17718 16386458075 1755651176000000000 aeefc50be34a4361ff7a2aa85861ab23 1 std/mem/Allocator.zig +6027 16654392804 1755651176000000000 a9b245c6e260e2a4606e53d2d51f65c6 1 std/meta/trailer_flags.zig +0 16923139929 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/net/test.zig +283817 10783549 1755651176000000000 e22376b03b7f60e971b4376ee895d68b 1 std/os/linux.zig +10460 10783550 1755651176000000000 488b62d22bbe9301ab373d2949f7d23b 1 std/os/plan9.zig +7746 10783551 1755651176000000000 931017d063b5a98aee21c888aac3dc3d 1 std/os/uefi.zig +16108 10784384 1755651176000000000 3cfe5b8a9735273d6782d1c456b08f15 1 std/os/wasi.zig +34093 10783547 1755651176000000000 d0e8187f608f5706844bd3662b1ea1ad 1 std/os/emscripten.zig +207257 10784400 1755651176000000000 773327deeb78ed0db89c9fa256583be1 1 std/os/windows.zig +2097 10783548 1755651176000000000 6b77b7f42ffec7eedf37dfecdfdd7014 1 std/os/freebsd.zig +0 2424035805 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/posix/test.zig +72290 2702453046 1755651176000000000 e37f5a4f9f40fbfad5a97b8ac9aacaae 1 std/process/Child.zig +51714 2969763857 1755651176000000000 eb8790d984ce4a6ddd6376d877c85ff1 1 std/sort/block.zig +10719 2969763867 1755651176000000000 112b7c1a501cf9a872fe6b59ffa7df08 1 std/sort/pdq.zig +17117 3233988546 1755651176000000000 5e6a75c2975430f5d46623d1537855a5 1 std/tar/Writer.zig +0 3233988547 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/tar/test.zig +5694 3769667651 1755651176000000000 cd71b2d90772c02d65444191f9fd7d5d 1 std/testing/FailingAllocator.zig +6764 4036588557 1755651176000000000 c674a37722ac57c1bfc929140e058755 1 std/time/epoch.zig +7574 4845181954 1755651176000000000 d017fea857f95f2c01199efab8dbf965 1 std/valgrind/memcheck.zig +2493 4845181953 1755651176000000000 30a771b8491dd283a50c6166babded38 1 std/valgrind/callgrind.zig +1249 4845181952 1755651176000000000 6781a2e56089a14f4f2a391169bf7c05 1 std/valgrind/cachegrind.zig +62827 5117700830 1755651176000000000 d1f5a0dbf135b754ed6a703e23df50e6 1 std/zig/tokenizer.zig +32614 5117700802 1755651176000000000 198542319824c4a3f109c64260324d68 1 std/zig/ErrorBundle.zig +7166 5117700806 1755651176000000000 860d7dc4b9813278374fb24397bb0a4d 1 std/zig/Server.zig +1605 5117700801 1755651176000000000 7cfa1ea3449449667ebf6c5201f6dbaf 1 std/zig/Client.zig +14323 5117700821 1755651176000000000 7e26c1a770304af7ccd5f605ada0a2e5 1 std/zig/string_literal.zig +6720 5117700817 1755651176000000000 07baee4aa2d7c097b1307a2cdec422cf 1 std/zig/number_literal.zig +1666 5117700820 1755651176000000000 87e0eb501395d68ddce525f8555f960c 1 std/zig/primitives.zig +148759 5117700541 1755651176000000000 5f6f4c60784f8ab4107f3383e980dfca 1 std/zig/Ast.zig +568292 5117700542 1755651176000000000 cd6d40183f2ae21282fd3d5fbbfc8238 1 std/zig/AstGen.zig +204779 5117700809 1755651176000000000 4104285d49190afffd58ec1c3544ed4a 1 std/zig/Zir.zig +9166 5117700810 1755651176000000000 6e1c16d90de3a0ffaeaf1d478014a072 1 std/zig/Zoir.zig +36096 5117700811 1755651176000000000 a625edc6603167137dcd761c6dc77e82 1 std/zig/ZonGen.zig +58141 5117700822 1755651176000000000 816fe631c09ee2b8359e520acee70d8b 1 std/zig/system.zig +21416 5117700800 1755651176000000000 d1b3749b34a2551f94643e698928aae0 1 std/zig/BuiltinFn.zig +41574 5117700543 1755651176000000000 a042f3e8774e8bd3822b35117bbc3d78 1 std/zig/AstRlAnnotate.zig +36100 5117700804 1755651176000000000 62fa4ce130060129db4288d3749f2488 1 std/zig/LibCInstallation.zig +45848 5117700808 1755651176000000000 e70747937d94d1333d148947c57547da 1 std/zig/WindowsSdk.zig +9786 5117700803 1755651176000000000 280d2bdf0f1a8f96ecaa4af86ba0a60e 1 std/zig/LibCDirs.zig +25071 5117700829 1755651176000000000 959e2ad518bd8b10bbd16a31cfe2cf7a 1 std/zig/target.zig +247 5117700816 1755651176000000000 4fee6920e55c663811dd32d69b7f2937 1 std/zig/llvm.zig +8713 5117700812 1755651176000000000 53cfae8a8276d7204622550f50243f6b 1 std/zig/c_builtins.zig +28363 5117700815 1755651176000000000 e2c60f43c6ae6eb4e168dc7fabd2138a 1 std/zig/c_translation.zig +117354 6465198947 1755651176000000000 ab567b993b2504504e04ae0815a40fed 1 std/zon/parse.zig +46916 6465198948 1755651176000000000 7bf4408cdd1c84975a793e5daefb12a8 1 std/zon/stringify.zig +32288 6465198946 1755651176000000000 5eeb9845ed3d086fe03083e2f7b9e446 1 std/zon/Serializer.zig +2159 1890351199 1755651176000000000 e912d0164349d3c86eb8b1226a86388f 1 std/os/windows/tls.zig +10957 7804547908 1755651171000000000 86adef0c76818174cbce959185f8aa9c 1 compiler_rt/common.zig +7394 7804547916 1755651171000000000 4d63e8360c0ca220253582124186fb27 1 compiler_rt/count0bits.zig +1385 7804551496 1755651171000000000 929736d7c0636ec88ef908c0b4c15a65 1 compiler_rt/parity.zig +1916 7804551501 1755651171000000000 9e893175f43f5d42fd541260ca5386e7 1 compiler_rt/popcount.zig +2762 7804547400 1755651171000000000 972f20e5339815a5e21e7b0bc6202353 1 compiler_rt/bitreverse.zig +3260 7804547404 1755651171000000000 0ec938dfe8c0a2d466838df303eef58d 1 compiler_rt/bswap.zig +1971 7804547418 1755651171000000000 f4b500a005ae4486ff3df7110a9e2523 1 compiler_rt/cmp.zig +4845 7804551512 1755651171000000000 8761326b4fa02822928e9a2bf1845ea7 1 compiler_rt/shift.zig +1171 7804551482 1755651171000000000 b64a4252e2958ab85e11cf3e72046c01 1 compiler_rt/negXi2.zig +27737 7804551220 1755651171000000000 0dc9529debd21eeb1908af208d1f2e9e 1 compiler_rt/int.zig +3064 7804551457 1755651171000000000 c4a4e1485c87b5438551c701951d1b90 1 compiler_rt/mulXi3.zig +1113 7804547946 1755651171000000000 8a9686a30bb60ded94cfbc7b0c188192 1 compiler_rt/divti3.zig +770 7804552715 1755651171000000000 6c53a5d81aa4786ec59e8bd320265f7d 1 compiler_rt/udivti3.zig +1380 7804551230 1755651171000000000 e03900eae21e2b320a2e62fc03e5074f 1 compiler_rt/modti3.zig +846 7804552716 1755651171000000000 afc9b4b801628d3040423cf318155f2f 1 compiler_rt/umodti3.zig +671 7804547376 1755651171000000000 a6cfe83f9d8eb6e22dee6dc0ccee3367 1 compiler_rt/absv.zig +311 7804547379 1755651171000000000 9a044dbb5695c2eea3bda231bfeda676 1 compiler_rt/absvsi2.zig +311 7804547377 1755651171000000000 0c0607d153f93dee28f63beeb116cbc1 1 compiler_rt/absvdi2.zig +314 7804547381 1755651171000000000 d826815938d3df68320935b9968c29db 1 compiler_rt/absvti2.zig +1303 7804551490 1755651171000000000 50df1f7234ac1a8d4f2093362c90b93e 1 compiler_rt/negv.zig +874 7804547393 1755651171000000000 02f065d511a9d47115363632c4dbdeda 1 compiler_rt/addvsi3.zig +860 7804552684 1755651171000000000 28391dec7d271786c0a340a5d698d3ba 1 compiler_rt/subvsi3.zig +932 7804552683 1755651171000000000 c20c4bc9d2bbfbdf0b900e7d7218879e 1 compiler_rt/subvdi3.zig +902 7804551479 1755651171000000000 45f09fd05e65513dfd810114991820f4 1 compiler_rt/mulvsi3.zig +1752 7804547387 1755651171000000000 1e067dd191e3750e2eebc9a9891bfe8d 1 compiler_rt/addo.zig +1742 7804552677 1755651171000000000 a6e4dadcd9f88d3c47b48642ea0242d5 1 compiler_rt/subo.zig +2643 7804551471 1755651171000000000 7437cfee5e2a6d47f221d2f163a92242 1 compiler_rt/mulo.zig +6009 7804547956 1755651171000000000 013ab2758ced7bbc2fc6988565eeb6c7 1 compiler_rt/extendf.zig +920 7804547959 1755651171000000000 f422913a85e1e91ef2039ab58547c0fc 1 compiler_rt/extendhfsf2.zig +373 7804547958 1755651171000000000 ed651ccba735e247ddf2016832e06f1c 1 compiler_rt/extendhfdf2.zig +376 7804547960 1755651171000000000 0c74a49a05b638424700546195a373ee 1 compiler_rt/extendhftf2.zig +373 7804547961 1755651171000000000 23b1c51db225608b57400e8118ffa9ec 1 compiler_rt/extendhfxf2.zig +644 7804547962 1755651171000000000 5bd066e81499f866ae53e4e86d5e5c07 1 compiler_rt/extendsfdf2.zig +781 7804547963 1755651171000000000 e52fbda9a494609786f8fcb77d847604 1 compiler_rt/extendsftf2.zig +360 7804547964 1755651171000000000 e942ea8b9c6b17baaeea42c96e99effa 1 compiler_rt/extendsfxf2.zig +781 7804547954 1755651171000000000 87ecde8777ad8ff8ed4dbc9c650f0270 1 compiler_rt/extenddftf2.zig +364 7804547955 1755651171000000000 9f715eab9e2e310deef980aead0e7500 1 compiler_rt/extenddfxf2.zig +1604 7804547965 1755651171000000000 c4862b4d4cfcee360ed2c56a114cbf4a 1 compiler_rt/extendxftf2.zig +8121 7804552694 1755651171000000000 20afe15564559323e44421df48412060 1 compiler_rt/truncf.zig +881 7804552696 1755651171000000000 47d13f34934c26c69eb88e81670d8f85 1 compiler_rt/truncsfhf2.zig +616 7804552692 1755651171000000000 0641d56997ae4f4b5207adc68dc72f3b 1 compiler_rt/truncdfhf2.zig +600 7804552693 1755651171000000000 02da0cc6b32c97637c74cbb10ccb54db 1 compiler_rt/truncdfsf2.zig +356 7804552704 1755651171000000000 3bf820f222640094f3a72a66ffe8198e 1 compiler_rt/truncxfhf2.zig +333 7804552705 1755651171000000000 66119941d376ee0a437b06bd3072d524 1 compiler_rt/truncxfsf2.zig +333 7804552703 1755651171000000000 c13541abc36c28230d412dc5252b693e 1 compiler_rt/truncxfdf2.zig +359 7804552700 1755651171000000000 d8f660a94187293e5a911454282b4029 1 compiler_rt/trunctfhf2.zig +731 7804552701 1755651171000000000 13584c74605e851e6d831a9e0fce9886 1 compiler_rt/trunctfsf2.zig +731 7804552697 1755651171000000000 457c0f6c909aa10450fd884ff88287f9 1 compiler_rt/trunctfdf2.zig +2852 7804552702 1755651171000000000 d8494bd8878af1312bf45635b710a4b1 1 compiler_rt/trunctfxf2.zig +4079 7804551221 1755651171000000000 5a505058b770b465ce081eb6a57e7a43 1 compiler_rt/int_from_float.zig +341 7804548360 1755651171000000000 287cd5239eed800fcc228dfe9a2734d4 1 compiler_rt/fixhfsi.zig +341 7804548358 1755651171000000000 8acd6b1ce769a390c40385d65d7fad51 1 compiler_rt/fixhfdi.zig +713 7804548361 1755651171000000000 f02a5506718df6aec134d680607bf58f 1 compiler_rt/fixhfti.zig +564 7804548359 1755651171000000000 9ae4ea7e25821706c5468c7c2c445448 1 compiler_rt/fixhfei.zig +616 7804548365 1755651171000000000 703dfbffebdc9fddd06b6c8d668e5e6a 1 compiler_rt/fixsfsi.zig +701 7804548363 1755651171000000000 88e7049e069292d16c1ff8720dff21c5 1 compiler_rt/fixsfdi.zig +713 7804548366 1755651171000000000 27665f157ae97b6a905d2c3b3d14b55c 1 compiler_rt/fixsfti.zig +564 7804548364 1755651171000000000 9296a734389623faf0ccbbce95248896 1 compiler_rt/fixsfei.zig +616 7804548356 1755651171000000000 d6c6cfff39408568470a4ce56f20701b 1 compiler_rt/fixdfsi.zig +701 7804548354 1755651171000000000 d37fe214a882924d291912211617b7e0 1 compiler_rt/fixdfdi.zig +713 7804548357 1755651171000000000 acf45affbae83f950121a0e78d1d9d43 1 compiler_rt/fixdfti.zig +564 7804548355 1755651171000000000 475c0ed3637871aa4bdba39fb7ac07c7 1 compiler_rt/fixdfei.zig +736 7804548370 1755651171000000000 9e04b0c9b7e24d0a417e6418967a82bf 1 compiler_rt/fixtfsi.zig +736 7804548367 1755651171000000000 54e8e270c03030539e0b628265ebe138 1 compiler_rt/fixtfdi.zig +867 7804548373 1755651171000000000 159fff04699a850f0877d0d860fc5c23 1 compiler_rt/fixtfti.zig +565 7804548368 1755651171000000000 f3202275d298913c25f0f8dfd3242be8 1 compiler_rt/fixtfei.zig +341 7804548407 1755651171000000000 c5d9b1d68c225613e28b45cb4cec11bc 1 compiler_rt/fixxfsi.zig +341 7804548404 1755651171000000000 87e625ba575a65977f04b534e5fc766d 1 compiler_rt/fixxfdi.zig +713 7804548408 1755651171000000000 66c8929d08870c9d48875898ac51d464 1 compiler_rt/fixxfti.zig +564 7804548406 1755651171000000000 4e4a4e4ac45142bc6c99b298914cc0e4 1 compiler_rt/fixxfei.zig +350 7804548386 1755651171000000000 ba04537148169a4eda9cc74755e9d2b2 1 compiler_rt/fixunshfsi.zig +350 7804548381 1755651171000000000 3f19d12e7ff9198e211b2298b6bd5efc 1 compiler_rt/fixunshfdi.zig +731 7804548387 1755651171000000000 3dc5d5bb0159c254a4dc44defc534d08 1 compiler_rt/fixunshfti.zig +575 7804548385 1755651171000000000 7747207f7d598d23ace14265322b94f9 1 compiler_rt/fixunshfei.zig +628 7804548390 1755651171000000000 57232664ed8c180d0347c1a5b7fb707c 1 compiler_rt/fixunssfsi.zig +713 7804548388 1755651171000000000 7ccb1263e66738a414ca7a9521baf546 1 compiler_rt/fixunssfdi.zig +731 7804548391 1755651171000000000 46aa3b64c89e9e65d2ce377e2fda821b 1 compiler_rt/fixunssfti.zig +575 7804548389 1755651171000000000 38283592b0bac48f035456b4aa28b777 1 compiler_rt/fixunssfei.zig +628 7804548379 1755651171000000000 18ae349f0a3aee101c1024994601c18b 1 compiler_rt/fixunsdfsi.zig +713 7804548374 1755651171000000000 15697c6d14ff144c8a8fbbbfc25b56ac 1 compiler_rt/fixunsdfdi.zig +731 7804548380 1755651171000000000 ccb4ab408cf9f6b931333d2e2281d138 1 compiler_rt/fixunsdfti.zig +575 7804548376 1755651171000000000 0a1cb46013571dde4b1bb4448121ba85 1 compiler_rt/fixunsdfei.zig +754 7804548394 1755651171000000000 717dbc2cecb0b7f0417ed241602b0235 1 compiler_rt/fixunstfsi.zig +754 7804548392 1755651171000000000 e0117ad5626119b0e5de39f22424c41d 1 compiler_rt/fixunstfdi.zig +891 7804548399 1755651171000000000 c4d7fd8a337264713824559441d264bf 1 compiler_rt/fixunstfti.zig +576 7804548393 1755651171000000000 cf926c64f6225389c139b32f9fce285b 1 compiler_rt/fixunstfei.zig +350 7804548402 1755651171000000000 08e70a885b4a61a0e97871cbe7781a36 1 compiler_rt/fixunsxfsi.zig +350 7804548400 1755651171000000000 9df747511c3f54bb2bb63cfce791b071 1 compiler_rt/fixunsxfdi.zig +731 7804548403 1755651171000000000 89cbbf3a56b9124c65e08a4c565b4754 1 compiler_rt/fixunsxfti.zig +575 7804548401 1755651171000000000 9834bffa03e61a47b5f6368b93c2b278 1 compiler_rt/fixunsxfei.zig +4111 7804548409 1755651171000000000 0731ddef2609f045793d30b988a64339 1 compiler_rt/float_from_int.zig +347 7804551174 1755651171000000000 46437c47ae3550f8dfea8ffe706e5cd5 1 compiler_rt/floatsihf.zig +619 7804551175 1755651171000000000 d0709844134d344f649fe5de487e8d43 1 compiler_rt/floatsisf.zig +619 7804551173 1755651171000000000 eb5e4bb9bdf0af3d17044dbab1c19f6a 1 compiler_rt/floatsidf.zig +748 7804551176 1755651171000000000 6acf05da538e6fe3f7a19cdbf9326f26 1 compiler_rt/floatsitf.zig +347 7804551177 1755651171000000000 f364c5d870c6ecf44a5a38ec49aaabe6 1 compiler_rt/floatsixf.zig +347 7804548412 1755651171000000000 2b30fc40286f695404a52daa3020e46d 1 compiler_rt/floatdihf.zig +704 7804548413 1755651171000000000 be61dfcf3ef7f7cb87fdb442491846aa 1 compiler_rt/floatdisf.zig +704 7804548411 1755651171000000000 cf1600427d0617517935eed129801a82 1 compiler_rt/floatdidf.zig +748 7804548414 1755651171000000000 8811790f2053d4000e252e7019110198 1 compiler_rt/floatditf.zig +347 7804548415 1755651171000000000 eb71124e4f62f32423d28d002b3dc4fa 1 compiler_rt/floatdixf.zig +712 7804551179 1755651171000000000 b0cac521d295bf19d575119ed72c24e5 1 compiler_rt/floattihf.zig +712 7804551180 1755651171000000000 72a9275278530696bb432b1a92758b42 1 compiler_rt/floattisf.zig +712 7804551178 1755651171000000000 5dde3f565fe32da11fe052594ee197ee 1 compiler_rt/floattidf.zig +872 7804551182 1755651171000000000 1ae512923174c3e6fa1ba8d65abf6c4f 1 compiler_rt/floattitf.zig +712 7804551183 1755651171000000000 e7550374f92dcebdb11cdef092ffb719 1 compiler_rt/floattixf.zig +569 7804551169 1755651171000000000 6cacec7f1baf3962451f632af2333d15 1 compiler_rt/floateihf.zig +569 7804551170 1755651171000000000 00ff12ec132a6de0ddba566b32f0ce56 1 compiler_rt/floateisf.zig +569 7804551168 1755651171000000000 39f48db5b22c07b8e1ede4f6ad7dfeab 1 compiler_rt/floateidf.zig +571 7804551171 1755651171000000000 558b7faae150629fc02a56c6f795823a 1 compiler_rt/floateitf.zig +569 7804551172 1755651171000000000 3219adecb483c360d12a9f49677362a1 1 compiler_rt/floateixf.zig +357 7804551195 1755651171000000000 00a0cc52e80a5d8768c00c875a2c38fb 1 compiler_rt/floatunsihf.zig +628 7804551196 1755651171000000000 7758994bb35f2593765f89bd87e8f055 1 compiler_rt/floatunsisf.zig +628 7804551194 1755651171000000000 20cada91ea193709f7cdb30fc7e305ed 1 compiler_rt/floatunsidf.zig +761 7804551197 1755651171000000000 c3fa8cad530a016146e93e31095198f1 1 compiler_rt/floatunsitf.zig +353 7804551199 1755651171000000000 182b577da08432924ceb5ee9bd0f2d88 1 compiler_rt/floatunsixf.zig +353 7804551185 1755651171000000000 0e605deb96515a6775375e7e47db3215 1 compiler_rt/floatundihf.zig +713 7804551186 1755651171000000000 e063c2d245ac649a28457da928aa6736 1 compiler_rt/floatundisf.zig +713 7804551184 1755651171000000000 904d6181c4aecb7405c8e4edc325cc82 1 compiler_rt/floatundidf.zig +761 7804551187 1755651171000000000 3e7630bf1c35c7de0a6c3ffd69b2673d 1 compiler_rt/floatunditf.zig +353 7804551188 1755651171000000000 1799170b2737a9e2a28a9808dd0e051a 1 compiler_rt/floatundixf.zig +724 7804551201 1755651171000000000 2df4b1f0edb48dd79ccda95408b91311 1 compiler_rt/floatuntihf.zig +724 7804551202 1755651171000000000 b990cd4c97634e1f3f4261191531b301 1 compiler_rt/floatuntisf.zig +724 7804551200 1755651171000000000 f7a4d0e5f29f41cadf67ddd6f68c29df 1 compiler_rt/floatuntidf.zig +888 7804551203 1755651171000000000 db22f0e3984446069375f2cae2a9aca7 1 compiler_rt/floatuntitf.zig +724 7804551204 1755651171000000000 bc561095bbe802fe90354de9e376c896 1 compiler_rt/floatuntixf.zig +577 7804551190 1755651171000000000 588ff37c9a79b9efee8d8ab27866c544 1 compiler_rt/floatuneihf.zig +577 7804551191 1755651171000000000 83c4fadef25daa676e2b17560f7b5b9f 1 compiler_rt/floatuneisf.zig +577 7804551189 1755651171000000000 9ab7e41efc150cfc29183a68faa98145 1 compiler_rt/floatuneidf.zig +579 7804551192 1755651171000000000 c63445cffc5e5f137b97a50c2bb9ef88 1 compiler_rt/floatuneitf.zig +577 7804551193 1755651171000000000 36f8e586a4b887c1b1b1537a5a28ae74 1 compiler_rt/floatuneixf.zig +4582 7804547911 1755651171000000000 e5686ffdd46c3d4d1c4485eb9eef4475 1 compiler_rt/comparef.zig +2267 7804547421 1755651171000000000 f21670514136306b5c179b4ee414d001 1 compiler_rt/cmphf2.zig +3161 7804547422 1755651171000000000 2bb653afb77db3d5045cbb9a02ba3d6f 1 compiler_rt/cmpsf2.zig +3161 7804547419 1755651171000000000 5ff781811d3f999df43ff5a63d8e0b2f 1 compiler_rt/cmpdf2.zig +4739 7804547904 1755651171000000000 13d86b526247d5092d8aacf0b67bdcf1 1 compiler_rt/cmptf2.zig +2248 7804547906 1755651171000000000 c47b1b506563f516dd85df37da1ca80d 1 compiler_rt/cmpxf2.zig +341 7804552718 1755651171000000000 2ed4e26e2ea3869e810a2840aa44890c 1 compiler_rt/unordhf2.zig +634 7804552719 1755651171000000000 ab97f41ff7e85578831672d29873bb7c 1 compiler_rt/unordsf2.zig +634 7804552717 1755651171000000000 8fcd7331877db9156a9489d458816d1a 1 compiler_rt/unorddf2.zig +341 7804552721 1755651171000000000 c6765ab1f830c13ccdf800de46e1d4c3 1 compiler_rt/unordxf2.zig +656 7804552720 1755651171000000000 2a6c721c57e5b4fc4d03f1414d3bfa0c 1 compiler_rt/unordtf2.zig +960 7804551215 1755651171000000000 44f070ee85c4299b7b861a8753e20983 1 compiler_rt/gehf2.zig +1567 7804551216 1755651171000000000 d83ee65d70e22642ca348d28af9e8b1d 1 compiler_rt/gesf2.zig +1567 7804551212 1755651171000000000 f7babfa2824209ae274b4f7f048979ff 1 compiler_rt/gedf2.zig +531 7804551218 1755651171000000000 825137d9239fe8820abd067fa358ff6c 1 compiler_rt/gexf2.zig +1375 7804551217 1755651171000000000 baf5038daac3654c38c49861c12af8f8 1 compiler_rt/getf2.zig +6348 7804547384 1755651171000000000 9d6fb22665d5ae546ff48bce14f4265e 1 compiler_rt/addf3.zig +319 7804547386 1755651171000000000 522a47928eb441889cd2d8293ee58f93 1 compiler_rt/addhf3.zig +594 7804547391 1755651171000000000 98c81cd3c52b093c912ead4cc50ee463 1 compiler_rt/addsf3.zig +594 7804547383 1755651171000000000 2fd1f70cd54ab97c68acda6ccd8698ca 1 compiler_rt/adddf3.zig +725 7804547392 1755651171000000000 37b20d2aff3bdc9e0e864c4dd0285ce2 1 compiler_rt/addtf3.zig +323 7804547394 1755651171000000000 3de55ee7141ae65ffda2d57872f49058 1 compiler_rt/addxf3.zig +406 7804552675 1755651171000000000 974a08d8b377c7154ee50e645c4aa5f1 1 compiler_rt/subhf3.zig +735 7804552681 1755651171000000000 c6bad960b48197993e5154abc0dad73e 1 compiler_rt/subsf3.zig +735 7804552674 1755651171000000000 932c462bb7a1ebd827a8601a1a673d8f 1 compiler_rt/subdf3.zig +884 7804552682 1755651171000000000 68c91ec93f437c6420395ef3a23d922a 1 compiler_rt/subtf3.zig +399 7804552685 1755651171000000000 78f78d004278fcfad7128556fb169afb 1 compiler_rt/subxf3.zig +8398 7804551467 1755651171000000000 2e26880d97fb35e9bd4cc1993465b0cb 1 compiler_rt/mulf3.zig +323 7804551470 1755651171000000000 da7bee33a5dc12783e6265082c6339c5 1 compiler_rt/mulhf3.zig +598 7804551476 1755651171000000000 fee4abf27cb742c17acbc579ce4181c9 1 compiler_rt/mulsf3.zig +598 7804551466 1755651171000000000 a3c5a4d1d76996c6a8862bc7edee60e9 1 compiler_rt/muldf3.zig +737 7804551478 1755651171000000000 05e662af04b7c0553caed681261620bc 1 compiler_rt/multf3.zig +323 7804551481 1755651171000000000 20b9631d337fdb552805ef976ffdc51e 1 compiler_rt/mulxf3.zig +344 7804547933 1755651171000000000 c658197861ba0fe65f6c4da66921da72 1 compiler_rt/divhf3.zig +8574 7804547941 1755651171000000000 57deaddafd7a8db15df6bbeca7d2d850 1 compiler_rt/divsf3.zig +9366 7804547926 1755651171000000000 3f0a4a77ece42e5c0a92b591f8219814 1 compiler_rt/divdf3.zig +8669 7804547949 1755651171000000000 9c07b341767fa995dedd55167cc3e222 1 compiler_rt/divxf3.zig +9925 7804547944 1755651171000000000 28531f064bbb7a862fb99a6dd7127380 1 compiler_rt/divtf3.zig +265 7804551485 1755651171000000000 ff779eb9e3281d0f8136f5b61b8e6515 1 compiler_rt/neghf2.zig +530 7804551486 1755651171000000000 e570a93d326095aad9dfa0af89f5e12d 1 compiler_rt/negsf2.zig +530 7804551483 1755651171000000000 239867284b810ba2b4b7139ff96a22c0 1 compiler_rt/negdf2.zig +409 7804551488 1755651171000000000 68cda8c4538ebcdadbb16771ebed9613 1 compiler_rt/negtf2.zig +265 7804551494 1755651171000000000 e6f608fbc42d09928e6d353d3e4ae05e 1 compiler_rt/negxf2.zig +2072 7804551506 1755651171000000000 73e4d664a217ad2fe999244a64307073 1 compiler_rt/powiXf2.zig +2275 7804551460 1755651171000000000 31c049fe940585ddd225b0c4f49de0ab 1 compiler_rt/mulc3.zig +425 7804551469 1755651171000000000 9057d1c7c2b8e98f5c09215baab464e3 1 compiler_rt/mulhc3.zig +425 7804551475 1755651171000000000 46a186b40dbf8b1a78fd7664e825477d 1 compiler_rt/mulsc3.zig +425 7804551464 1755651171000000000 ae9761607983803a875dc03e2bcf93b2 1 compiler_rt/muldc3.zig +425 7804551480 1755651171000000000 241de1bd5170ea794fe6a65e3ca1c4b6 1 compiler_rt/mulxc3.zig +581 7804551477 1755651171000000000 8ff2e7539ccf94a8ea6a7d0fb870f8ac 1 compiler_rt/multc3.zig +2280 7804547921 1755651171000000000 9e6aaeda713b6cd43eca1180606dc9f8 1 compiler_rt/divc3.zig +434 7804547928 1755651171000000000 99234ee0594362f25d0034479872a24d 1 compiler_rt/divhc3.zig +434 7804547939 1755651171000000000 19324ba1cf08e607b54db47c52783c60 1 compiler_rt/divsc3.zig +434 7804547924 1755651171000000000 a5c0557ad47ea2daea69c331226b6bb8 1 compiler_rt/divdc3.zig +434 7804547948 1755651171000000000 0ba3ba63c22ba9609413264f8e142986 1 compiler_rt/divxc3.zig +590 7804547943 1755651171000000000 b09a8555aa3985adc8de9d9dbbaeaab0 1 compiler_rt/divtc3.zig +5139 7804547413 1755651171000000000 3377d5bdbc89549229fcc2bdded00385 1 compiler_rt/ceil.zig +5691 7804547914 1755651171000000000 4e53be9b20a311a96eb63bafe37225d8 1 compiler_rt/cos.zig +11677 7804547952 1755651171000000000 c4da63d897aa5d3cef3988faddf0733e 1 compiler_rt/exp.zig +20924 7804547953 1755651171000000000 8444963967b3c617eebec50d6b319393 1 compiler_rt/exp2.zig +1913 7804547966 1755651171000000000 d639f3899db4d8abd8eb6de3c9db692b 1 compiler_rt/fabs.zig +6290 7804551205 1755651171000000000 f78026c2945813b1868334b3f8d6b1ea 1 compiler_rt/floor.zig +11575 7804551206 1755651171000000000 acbf337ea57443d50122200a70477bd3 1 compiler_rt/fma.zig +2867 7804551207 1755651171000000000 53832890224a36ee564f78656fad8acb 1 compiler_rt/fmax.zig +2869 7804551208 1755651171000000000 16d3b98ffc9e7622d085e6ec340bef8b 1 compiler_rt/fmin.zig +12218 7804551209 1755651171000000000 6096cb43202506289c56b29536a3c88b 1 compiler_rt/fmod.zig +8304 7804551223 1755651171000000000 4a2ae209edc8dde5555884addb0c3270 1 compiler_rt/log.zig +9499 7804551224 1755651171000000000 192e6cb083dc2203281a462a1129dc3e 1 compiler_rt/log10.zig +8927 7804551225 1755651171000000000 788bd8e755b980f4765163024433bbef 1 compiler_rt/log2.zig +5307 7804551511 1755651171000000000 64efbcc2e1df4cd325e1f4f05a9b43b6 1 compiler_rt/round.zig +6783 7804551514 1755651171000000000 46b58824ce56ea0819341b2de4e4ce88 1 compiler_rt/sin.zig +8779 7804551515 1755651171000000000 3372bf45f142a4244845a7d576e8a739 1 compiler_rt/sincos.zig +8445 7804551517 1755651171000000000 834a20db0b154a40177782adbf1d021c 1 compiler_rt/sqrt.zig +6175 7804552686 1755651171000000000 38bdd1e5397ae3ef6734324ee90f2cd8 1 compiler_rt/tan.zig +4509 7804552691 1755651171000000000 452e79786bcf746a89464e0b468a1772 1 compiler_rt/trunc.zig +2047 7804547936 1755651171000000000 1b5ba254fdfc08708a375c730450065e 1 compiler_rt/divmodei4.zig +5345 7804552711 1755651171000000000 ce988d5b59fa957acec0cc0f5514f027 1 compiler_rt/udivmodei4.zig +886 7804552713 1755651171000000000 3884d7d5d17d10b6c390591f14760c21 1 compiler_rt/udivmodti4.zig +2988 7804551495 1755651171000000000 727f94ca1d77099453ad061b28f9f45b 1 compiler_rt/os_version_check.zig +12571 7804547951 1755651171000000000 f2228bdf0cb635f1b1b962a3db633e85 1 compiler_rt/emutls.zig +11129 7804547395 1755651171000000000 48b4362e028a3e1634d5ca553bd4f739 1 compiler_rt/arm.zig +2563 7804547397 1755651171000000000 667b1a412a0d66f8b44b2a8e8e4e16e2 1 compiler_rt/aulldiv.zig +2618 7804547398 1755651171000000000 420aa19734f8e183daf736d09d96e8e9 1 compiler_rt/aullrem.zig +7746 7804547414 1755651171000000000 65f560b740acc191d870c5c89599c99a 1 compiler_rt/clear_cache.zig +45809 7804551219 1755651171000000000 8aceb9f3653d891b582dbd9b55b0d02a 1 compiler_rt/hexagon.zig +26388 7804547396 1755651171000000000 2dbf62f073b314f8249867dbbbfb5589 1 compiler_rt/atomics.zig +9539 7804552672 1755651171000000000 1d35c260060522cd892607322c1b0e17 1 compiler_rt/stack_probe.zig +79084 7804547375 1755651171000000000 bda0e04701fa77ae568c29186ee9ccfb 1 compiler_rt/aarch64_outline_atomics.zig +6452 7804551227 1755651171000000000 4cf074ce1df0bab8aba60356cc8ab857 1 compiler_rt/memcpy.zig +876 7804551229 1755651171000000000 13a474bc83ea39da1548064a0ec84fe6 1 compiler_rt/memset.zig +7246 7804551228 1755651171000000000 ab21f482b4ceecf867dcaf6370424fd5 1 compiler_rt/memmove.zig +931 7804551226 1755651171000000000 ab9203076a9f7358651a1ac57a2238e6 1 compiler_rt/memcmp.zig +874 7804547399 1755651171000000000 964d18da8969575344227310559069cf 1 compiler_rt/bcmp.zig +4524 7804551519 1755651171000000000 3e80fe1b407f6f691b38a2b042fb4b64 1 compiler_rt/ssp.zig +8052 1890351183 1755651176000000000 bbc3cbd53ca9eaab481a4b2874506c59 1 std/Build/Cache/Path.zig +2142 1890351182 1755651176000000000 fe57a392618de045bf46b476d4e9b36f 1 std/Build/Cache/Directory.zig +37958 1890351181 1755651176000000000 09f6c6d5c5a3e85759082f1ad46ebffa 1 std/Build/Cache/DepTokenizer.zig +2901 2158145397 1755651176000000000 d277c72d570fa923fd437605bbd83e30 1 std/Build/Step/CheckFile.zig +117426 2158145398 1755651176000000000 f327f9fe4a8649cc483e714c56bdafff 1 std/Build/Step/CheckObject.zig +41853 2158150016 1755651176000000000 b089407ebc9e35a98f96dcfafbea622a 1 std/Build/Step/ConfigHeader.zig +831 2158150017 1755651176000000000 0f223ee68995072c4beb7fd3ae600b02 1 std/Build/Step/Fail.zig +2711 2158150018 1755651176000000000 72715636b21818d37288de283148c101 1 std/Build/Step/Fmt.zig +7843 2158150019 1755651176000000000 b720790bf6e89535660d8996075ceed1 1 std/Build/Step/InstallArtifact.zig +4431 2158150020 1755651176000000000 d1f0707c6afc3c9202b9d6dd0c114338 1 std/Build/Step/InstallDir.zig +1460 2158150021 1755651176000000000 0040eb5b0836e8fa2056b8e33d66b4dd 1 std/Build/Step/InstallFile.zig +8154 2158150022 1755651176000000000 fdd933a4e6d14f259812199ba337c9f2 1 std/Build/Step/ObjCopy.zig +86953 2158145407 1755651176000000000 e814ef2854d0025d3c1a64913f7cbbf2 1 std/Build/Step/Compile.zig +23856 2158150023 1755651176000000000 04314b9ec6c4719520c8922f20479b10 1 std/Build/Step/Options.zig +1443 2158150025 1755651176000000000 ad5ec7793142fc110b85e04588c7be90 1 std/Build/Step/RemoveDir.zig +73144 2158150026 1755651176000000000 defa27d5c5918845503abf3bee647924 1 std/Build/Step/Run.zig +7344 2158150027 1755651176000000000 1a07c4e3f9436bca621e0ab521e389b5 1 std/Build/Step/TranslateC.zig +13184 2158150029 1755651176000000000 d3b8a19eb1eb2d1fa857b99bfea07950 1 std/Build/Step/WriteFile.zig +4247 2158150028 1755651176000000000 78c06c4c05a1846f4e7d6ff9c0da4068 1 std/Build/Step/UpdateSourceFiles.zig +22825 2424035803 1755651176000000000 e4bcf69644dd1afc10772570851bf6db 1 std/Build/Watch/FsEvents.zig +1731 2969763820 1755651176000000000 daa1d02b14c40a08f9a23bf20fa27ab2 1 std/Io/Reader/Limited.zig +0 2969763845 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/Reader/test.zig +2533 4036588555 1755651176000000000 e0af5510611c7c2688093972c6ace145 1 std/Thread/Mutex/Recursive.zig +11928 5117700534 1755651176000000000 7a1e10e0d0e9210d2757e410d8473def 1 std/compress/flate/Compress.zig +47768 5117700536 1755651176000000000 d87a77c2d3a950f7fb4503b2e91beb66 1 std/compress/flate/Decompress.zig +18914 5117700537 1755651176000000000 c9cb33e59ca13018183045e0a1d980a9 1 std/compress/flate/HuffmanEncoder.zig +11871 5920176865 1755651176000000000 1a80b6a0f5b379bcaa6324ad497a62d9 1 std/compress/lzma/decode.zig +0 5920176866 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/lzma/test.zig +3774 5920176867 1755651176000000000 ba9dc0a0f8124583244e2f0c677410fc 1 std/compress/lzma/vec2d.zig +4704 6729771881 1755651176000000000 34dab553e7d44c4c18351939467c745c 1 std/compress/lzma2/decode.zig +7157 7261586167 1755651176000000000 a0e5aefb8ceae6798c4b2fe9540cefee 1 std/compress/xz/block.zig +0 7261586168 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/xz/test.zig +78531 7804560029 1755651176000000000 d44d8434a6ff685d9cec10bd257151c5 1 std/compress/zstd/Decompress.zig +0 8072380958 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/test.zig +22223 9137195870 1755651176000000000 7e23bb5bcd64c4725f7c071dd3496b74 1 std/crypto/aes/aesni.zig +22711 9137195871 1755651176000000000 8e77a640bfd456ac5363ff36bd93c4ba 1 std/crypto/aes/armcrypto.zig +33347 9137195872 1755651176000000000 7de9cecbcab3c869e16f2fbaf7076a48 1 std/crypto/aes/soft.zig +14574 8345434069 1755651176000000000 b552b509d9ec611014aa027c881ac91c 1 std/crypto/25519/field.zig +33703 8345434071 1755651176000000000 d4b52682012c0195eb1aa7312d067798 1 std/crypto/25519/scalar.zig +338 10758886324 1755651176000000000 433b788abb384ec7e4c3641754e6dde9 1 std/crypto/pcurves/p256/field.zig +7421 10758886333 1755651176000000000 00494b8811c2d7df07fff5d27198954c 1 std/crypto/pcurves/p256/scalar.zig +5656 11552451177 1755651176000000000 05c95744a349b07172e4c400b1e28cc1 1 std/crypto/pcurves/tests/p256.zig +376 11017003009 1755651176000000000 69a49ff5f537dcd2044702ac14b6891c 1 std/crypto/pcurves/p384/field.zig +6669 11017003016 1755651176000000000 7aee4435d80a972d5bcff185b164ee8e 1 std/crypto/pcurves/p384/scalar.zig +6707 11552451178 1755651176000000000 3f1e1e56980e64672ccd1fba3a631951 1 std/crypto/pcurves/tests/p384.zig +343 11288617743 1755651176000000000 738b22249e1d3a4c001765286bc82756 1 std/crypto/pcurves/secp256k1/field.zig +7426 11288617744 1755651176000000000 1b99358655e3f9a938c25cb631d52e50 1 std/crypto/pcurves/secp256k1/scalar.zig +6029 11552451179 1755651176000000000 4a9ce792ab6709c6ebf9e7dbf5e30590 1 std/crypto/pcurves/tests/secp256k1.zig +11649 9407958267 1755651176000000000 884bf9edd77ebad5200670e26c236280 1 std/crypto/codecs/asn1.zig +17997 9407959248 1755651176000000000 7ea1a954927b43ca5ab7f95c3becd401 1 std/crypto/codecs/base64_hex_ct.zig +80831 11826519934 1755651176000000000 f151081149e53c1078be673dc2116ec2 1 std/crypto/tls/Client.zig +12470 8603041826 1755651176000000000 9c92810e5147e8de0f25e1658fa23a75 1 std/crypto/Certificate/Bundle.zig +71838 12363111571 1755651176000000000 5c3513456ba79222f02ca36a90963776 1 std/debug/Dwarf/expression.zig +17609 12363111569 1755651176000000000 f39611d52911878891dbef3fba794ac1 1 std/debug/Dwarf/abi.zig +10007 12363111570 1755651176000000000 46471a00c4eea2acab55cc6337899adc 1 std/debug/Dwarf/call_frame.zig +9426 13433097429 1755651176000000000 19fe74e26814be7f5083c3d8b5a0983e 1 std/fmt/parse_float/parse.zig +2950 13433097426 1755651176000000000 e2f6cedde735fdaf086b7e0efdb66505 1 std/fmt/parse_float/convert_hex.zig +5401 13433097425 1755651176000000000 cbeba905313f9b6c917fb231993989fe 1 std/fmt/parse_float/convert_fast.zig +48543 13433097424 1755651176000000000 82c419f8469193cf67852d0ac4c65f55 1 std/fmt/parse_float/convert_eisel_lemire.zig +4586 13433097427 1755651176000000000 2562e4c50c6403023d508a0c7e1f15f0 1 std/fmt/parse_float/convert_slow.zig +3506 14510404238 1755651176000000000 9428b7df45d5b928d9c004b955588fe0 1 std/hash/crc/impl.zig +0 14510404239 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/hash/crc/test.zig +2075 14239609767 1755651176000000000 5910881f138d791cfa09dd89cc12fc40 1 std/hash/verify.zig +237477 1890351196 1755651176000000000 67644436e9162e79563b60f574b36f99 1 std/os/windows/ntstatus.zig +0 15317222682 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/dynamic_test.zig +0 15317222685 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/hashmap_test.zig +0 15317222686 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/scanner_test.zig +0 15317222688 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/static_test.zig +995 15580753240 1755651176000000000 59077bc2784a5df334de08609b4c2a55 1 std/math/expo2.zig +452 16120016982 1755651176000000000 ce633e6b665f3caba98995a3f146d7c7 1 std/math/complex/abs.zig +678 16120016984 1755651176000000000 9dd2ece0bd4c6366c4a3cb5bf7b3db17 1 std/math/complex/acosh.zig +608 16120016983 1755651176000000000 e3a7d70f219edead2e32e66a9476a469 1 std/math/complex/acos.zig +458 16120016988 1755651176000000000 2fea305ef49ff29fdd688d2f7342051d 1 std/math/complex/arg.zig +641 16120023930 1755651176000000000 59bed4da0e5763cbf2a3e08ec4bc9c6c 1 std/math/complex/asinh.zig +750 16120023929 1755651176000000000 26f02f5afc54b9ec7673ddd6d0fcc3a9 1 std/math/complex/asin.zig +645 16120023933 1755651176000000000 adf7751d27453fed0d4977a2dc50e85e 1 std/math/complex/atanh.zig +2527 16120023931 1755651176000000000 2a909954adb7520e1eb158124c280ca2 1 std/math/complex/atan.zig +484 16120023955 1755651176000000000 a9e61e0f7280deab3d077856af6ca8d9 1 std/math/complex/conj.zig +5818 16120023957 1755651176000000000 3b53a3d1a1285447f00cc90f422cb7b1 1 std/math/complex/cosh.zig +577 16120023956 1755651176000000000 26877517b7d9d620e841272fd8ea3661 1 std/math/complex/cos.zig +4899 16120023958 1755651176000000000 4f31c5e9d921097840da690cc0324595 1 std/math/complex/exp.zig +620 16120023960 1755651176000000000 4e4bb03cdbb57072938d447952587286 1 std/math/complex/log.zig +608 16120023961 1755651176000000000 1258f2af84237de74fd033b6776798f2 1 std/math/complex/pow.zig +628 16120023962 1755651176000000000 b5f2e65410101f915fb75fa5712c2fd4 1 std/math/complex/proj.zig +5363 16120023964 1755651176000000000 89568cfbf7f8196aafffbd55ea670070 1 std/math/complex/sinh.zig +620 16120023963 1755651176000000000 4aade0cdfc8ac82b062412f5566aec6c 1 std/math/complex/sin.zig +4249 16120023965 1755651176000000000 0aeb21db75d92940ddcb1491d2f0445e 1 std/math/complex/sqrt.zig +3847 16120023967 1755651176000000000 98009ed972f9f5fcb177d10a345456e1 1 std/math/complex/tanh.zig +626 16120023966 1755651176000000000 ac4f4ba1ea51c6a8f2101a7bdf3b0d7c 1 std/math/complex/tan.zig +175931 15855759075 1755651176000000000 cb0553d36d2eb461b87312f4e15a99e8 1 std/math/big/int.zig +3762 281042739 1755651176000000000 2fd0c246f4a8e9ba6ccef5ff7cf0ccfe 1 std/os/linux/vdso.zig +0 281042736 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/linux/test.zig +13117 281042740 1755651176000000000 71b9a59db11f287d3253e001a21a4028 1 std/os/linux/x86.zig +13489 281042741 1755651176000000000 958bec870d653d2a62890b93b463512b 1 std/os/linux/x86_64.zig +6720 281042628 1755651176000000000 186c59f27378f16795ba8c8611b5ed95 1 std/os/linux/aarch64.zig +7970 281042629 1755651176000000000 0f4c26b73e6698859b53f9b715f3d611 1 std/os/linux/arm.zig +6097 281042638 1755651176000000000 a5e8b96435a27d99de81726a3b93e16d 1 std/os/linux/hexagon.zig +6540 281042722 1755651176000000000 9b9c64b903ecbb48c7b6c661455ef036 1 std/os/linux/riscv32.zig +6541 281042725 1755651176000000000 b833f96b582cdd1676bf2bda0ac01e90 1 std/os/linux/riscv64.zig +10847 281042730 1755651176000000000 0c589fb5ebf73b4b5662a31d45d76c75 1 std/os/linux/sparc64.zig +7941 281042643 1755651176000000000 7e1c50fd483adea99b19665fe38b2f72 1 std/os/linux/loongarch64.zig +6634 281042646 1755651176000000000 ad9a26a1c9c2d04c67203fdcf578c9f1 1 std/os/linux/m68k.zig +11254 281042650 1755651176000000000 69fd31ffc9e830951f1293a9ee9cfb72 1 std/os/linux/mips.zig +10635 281042651 1755651176000000000 ff911a8bf83253a4b85221f8a5f72189 1 std/os/linux/mips64.zig +8845 281042652 1755651176000000000 bd51d61d7005f2954e793de4ea335f5c 1 std/os/linux/powerpc.zig +8837 281042653 1755651176000000000 c1b8858b561db0b710d1f0d729e836e5 1 std/os/linux/powerpc64.zig +7186 281042727 1755651176000000000 29692c77734256a2fc877fcec567d9a0 1 std/os/linux/s390x.zig +4390 281042737 1755651176000000000 9e872767168dbe4e563e8ca82d35d42e 1 std/os/linux/thumb.zig +18676 281042738 1755651176000000000 79cbf225d0993e9837e569f3e09e0314 1 std/os/linux/tls.zig +46056 281042630 1755651176000000000 fe2f435321fb0e6eb75eeb3ca30c93b4 1 std/os/linux/bpf.zig +1297 281042641 1755651176000000000 daac8c407161fbb4bb996238aee46635 1 std/os/linux/ioctl.zig +8427 281042729 1755651176000000000 b845f84a2ea6f5532d8ffc78297dafed 1 std/os/linux/seccomp.zig +183126 281042735 1755651176000000000 fd2ae47bc58a4f876d2cb8205d4888ea 1 std/os/linux/syscalls.zig +19909 281042640 1755651176000000000 a1611786e4dda806effaf2301a5cf0ae 1 std/os/linux/io_uring_sqe.zig +173427 281042627 1755651176000000000 46b12a066a5e37b8a275732fa67d5529 1 std/os/linux/IoUring.zig +2126 816974655 1755651176000000000 d6f497f7c3ede56b9dd8eb2cae54c566 1 std/os/plan9/x86_64.zig +2368 1085913223 1755651176000000000 ef3b4d934ff0fc89d4b9c013f363e19f 1 std/os/uefi/protocol.zig +37311 1085912253 1755651176000000000 a67c5d40f56e40984ce32fba49cfa0bc 1 std/os/uefi/device_path.zig +2078 1085912254 1755651176000000000 13b23e26af6b210b16c77d73b956e867 1 std/os/uefi/hii.zig +10107 1085913224 1755651176000000000 e4c1fe82be2b68376749dbb625002706 1 std/os/uefi/status.zig +10739 1085913225 1755651176000000000 627c77aa253ea0232b674a9a41a09650 1 std/os/uefi/tables.zig +3906 1085912255 1755651176000000000 5c4587a7b4f3370e256119bdab607b4a 1 std/os/uefi/pool_allocator.zig +0 1890351198 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/windows/test.zig +2144 1890351185 1755651176000000000 25e202ff708858513ae7203c6f1043cf 1 std/os/windows/advapi32.zig +19302 1890351187 1755651176000000000 4166d597fb4bd529b9418c145598c4d4 1 std/os/windows/kernel32.zig +12119 1890351195 1755651176000000000 90384510a1298bc4a80542f39d2cc399 1 std/os/windows/ntdll.zig +77480 1890353313 1755651176000000000 d85c6950ac08847c1673726e62f4953f 1 std/os/windows/ws2_32.zig +850 1890351186 1755651176000000000 058a13f92bf4ee16e52beb60bf057dc9 1 std/os/windows/crypt32.zig +20117 1890351189 1755651176000000000 696b67a75a9a665eb00672233edffbb2 1 std/os/windows/nls.zig +130227 1890353312 1755651176000000000 a0ee928ca20f189c11667764ca96b243 1 std/os/windows/win32error.zig +3697 1890351188 1755651176000000000 f5f54b1cf522ff663148d3c96268d459 1 std/os/windows/lang.zig +8449 1890351197 1755651176000000000 3c42a760ba486f9b9455bd95d20d2e0b 1 std/os/windows/sublang.zig +135650 5117700805 1755651176000000000 a31eb8d48506c25579555c4efd1a9faf 1 std/zig/Parse.zig +142067 5382995573 1755651176000000000 c11d0a46b8fb10db9e0b6b86306a47a4 1 std/zig/Ast/Render.zig +8409 5920176868 1755651176000000000 05fc398cc2e6071c55b8a2a2fbc73720 1 std/zig/system/NativePaths.zig +12217 5920176875 1755651176000000000 431d341ca0da87ee822118293b8def7c 1 std/zig/system/windows.zig +2441 5920176872 1755651176000000000 35ecedf1e23a5fca314cc4de0bb8b2f9 1 std/zig/system/darwin.zig +15304 5920176874 1755651176000000000 580566ad2ff69b205932568d7672a3e9 1 std/zig/system/linux.zig +26641 5920176876 1755651176000000000 1653caac0003b8e8b9474f11b36c5a76 1 std/zig/system/x86.zig +19758 5649753788 1755651176000000000 3952091e9a90d59dd1ba998c365bce09 1 std/zig/llvm/BitcodeReader.zig +17956 5649753813 1755651176000000000 fc195102d6af02ed5678e5f0aa8b8390 1 std/zig/llvm/bitcode_writer.zig +592181 5649753807 1755651176000000000 eb4547393bea04ef1cf32079beef364a 1 std/zig/llvm/Builder.zig +0 7804547416 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzsi2_test.zig +0 7804547415 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzdi2_test.zig +0 7804547417 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzti2_test.zig +0 7804547919 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzsi2_test.zig +0 7804547918 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzdi2_test.zig +0 7804547920 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzti2_test.zig +0 7804548352 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffssi2_test.zig +0 7804547967 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsdi2_test.zig +0 7804548353 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsti2_test.zig +0 7804551498 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritysi2_test.zig +0 7804551497 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritydi2_test.zig +0 7804551499 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/parityti2_test.zig +0 7804551504 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountsi2_test.zig +0 7804551503 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountdi2_test.zig +0 7804551505 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountti2_test.zig +0 7804547402 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversesi2_test.zig +0 7804547401 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversedi2_test.zig +0 7804547403 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreverseti2_test.zig +0 7804547408 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapsi2_test.zig +0 7804547406 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapdi2_test.zig +0 7804547411 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapti2_test.zig +0 7804547423 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpsi2_test.zig +0 7804547420 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpdi2_test.zig +0 7804547905 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpti2_test.zig +0 7804552707 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpsi2_test.zig +0 7804552706 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpdi2_test.zig +0 7804552708 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpti2_test.zig +0 7804551513 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/shift_test.zig +0 7804551487 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negsi2_test.zig +0 7804551484 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negdi2_test.zig +0 7804551489 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negti2_test.zig +4285 7804552709 1755651171000000000 3a706e00becb790763e2c63d183e345f 1 compiler_rt/udivmod.zig +0 7804552710 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmoddi4_test.zig +0 7804551459 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulXi3_test.zig +0 7804547947 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divti3_test.zig +0 7804551456 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/modti3_test.zig +0 7804547380 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvsi2_test.zig +0 7804547378 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvdi2_test.zig +0 7804547382 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvti2_test.zig +0 7804551492 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvsi2_test.zig +0 7804551491 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvdi2_test.zig +0 7804551493 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvti2_test.zig +0 7804547389 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addosi4_test.zig +0 7804547388 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addodi4_test.zig +0 7804547390 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addoti4_test.zig +0 7804552679 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subosi4_test.zig +0 7804552678 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subodi4_test.zig +0 7804552680 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/suboti4_test.zig +0 7804551473 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulosi4_test.zig +0 7804551472 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulodi4_test.zig +0 7804551474 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/muloti4_test.zig +0 7804547957 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/extendf_test.zig +0 7804552695 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/truncf_test.zig +0 7804551222 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/int_from_float_test.zig +0 7804548410 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/float_from_int_test.zig +0 7804547913 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparesf2_test.zig +0 7804547910 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparedf2_test.zig +0 7804547385 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addf3_test.zig +0 7804551468 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulf3_test.zig +0 7804547942 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divsf3_test.zig +0 7804547927 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divdf3_test.zig +0 7804547950 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divxf3_test.zig +0 7804547945 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divtf3_test.zig +0 7804551507 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/powiXf2_test.zig +11743 7804552689 1755651171000000000 20b5273f511a6677b3f49f750fcaf786 1 compiler_rt/trig.zig +6045 7804551508 1755651171000000000 18b634df64d66eb7c240db46b32eea60 1 compiler_rt/rem_pio2.zig +2247 7804551510 1755651171000000000 2337e183931c970621500018ffe636df 1 compiler_rt/rem_pio2f.zig +0 7804551210 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodq_test.zig +0 7804551211 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodx_test.zig +0 7804552714 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmodti4_test.zig +13531 5117700539 1755651176000000000 479ed8dfe695d0a2eea06b674b3ed0da 1 std/compress/flate/Token.zig +20508 5117700533 1755651176000000000 453a65b5b55858b073099208c4e07ca8 1 std/compress/flate/BlockWriter.zig +3588 5117700538 1755651176000000000 5a3d7acaca811bf6b6e62a58645eddae 1 std/compress/flate/Lookup.zig +5945 6190427818 1755651176000000000 937d6b84c08ac71922db69ef4603ee39 1 std/compress/lzma/decode/lzbuffer.zig +4994 6190427819 1755651176000000000 159872c0de3e30f43567e5ed7666125d 1 std/compress/lzma/decode/rangecoder.zig +12650 10483472282 1755651176000000000 56befc361ef070a7bd0a2d3c1dc46994 1 std/crypto/pcurves/common.zig +67958 10758886325 1755651176000000000 0f2daafefad01026d6796eec68d65d2e 1 std/crypto/pcurves/p256/p256_64.zig +76136 10758886332 1755651176000000000 8ec5f177ef28f7a2a0ec8d103665db00 1 std/crypto/pcurves/p256/p256_scalar_64.zig +134511 11017003012 1755651176000000000 2e0dda7c40794e981dd2d2471c4776a5 1 std/crypto/pcurves/p384/p384_64.zig +137291 11017003014 1755651176000000000 81eb087d46e6c49907ae0c02d3230828 1 std/crypto/pcurves/p384/p384_scalar_64.zig +73280 11288617745 1755651176000000000 c871f98dad15c7a8c29be9ccefa4b181 1 std/crypto/pcurves/secp256k1/secp256k1_64.zig +75859 11288617746 1755651176000000000 e29275bdb0eb931fc383e7f2f5ded944 1 std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig +1807 9674508949 1755651176000000000 f47429307ac0920ff18758ce86074549 1 std/crypto/codecs/asn1/der.zig +7178 9674508948 1755651176000000000 6d4dab023a981a670d308b0b120c9077 1 std/crypto/codecs/asn1/Oid.zig +0 9674508951 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/codecs/asn1/test.zig +3892 8873237885 1755651176000000000 b6e0d691e62b1e9830666c4f8c67fdf4 1 std/crypto/Certificate/Bundle/macos.zig +3081 13433097423 1755651176000000000 2aeda0b8b6036bb4d980778abb5a928a 1 std/fmt/parse_float/common.zig +3073 13433097422 1755651176000000000 3950e4fa1fdd11d50db0b4abfc254022 1 std/fmt/parse_float/FloatStream.zig +6036 13433097421 1755651176000000000 68169ffe43d55f0eb5e26b984ef98670 1 std/fmt/parse_float/FloatInfo.zig +29140 13433097428 1755651176000000000 04115d79320f402803a56bd43cc34cf9 1 std/fmt/parse_float/decimal.zig +2726 16120023959 1755651176000000000 7f318d60fafbfa10754d5644fd131ffe 1 std/math/complex/ldexp.zig +0 15855759076 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/math/big/int_test.zig +4082 552950742 1755651176000000000 11a08913a0ec64b8325b0d29601479a7 1 std/os/linux/bpf/btf.zig +1543 552950745 1755651176000000000 95995c37b42f8d7a12578170850af6ee 1 std/os/linux/bpf/kern.zig +1998 1358753109 1755651176000000000 5a705fc01bb083d82cd43ab9ab1c6542 1 std/os/uefi/protocol/service_binding.zig +1743 1358753103 1755651176000000000 e4e18b6e0741218763e2f0eefe57c63c 1 std/os/uefi/protocol/loaded_image.zig +4860 1358753094 1755651176000000000 db6a8b32ce1366281968b6a3dbffb173 1 std/os/uefi/protocol/device_path.zig +3924 1358753107 1755651176000000000 636ee102096b7ee8d15380af87b55c99 1 std/os/uefi/protocol/rng.zig +544 1358753112 1755651176000000000 a0f63cfe62d021c13659600cea4aaa1a 1 std/os/uefi/protocol/shell_parameters.zig +1524 1358753113 1755651176000000000 7748a7cf094118fb46a4fa8cb0e326fb 1 std/os/uefi/protocol/simple_file_system.zig +13432 1358753096 1755651176000000000 995882ac23c2af4019a5dd716a5f09f3 1 std/os/uefi/protocol/file.zig +5171 1358753093 1755651176000000000 9136b751bd537d37181af6f96f23bc0d 1 std/os/uefi/protocol/block_io.zig +1827 1358753116 1755651176000000000 dc816c9ebf174e0f2191f721ebf627fd 1 std/os/uefi/protocol/simple_text_input.zig +5002 1358753117 1755651176000000000 33197652ebd5358fbd566ba1598a738f 1 std/os/uefi/protocol/simple_text_input_ex.zig +9857 1358753118 1755651176000000000 ac75efaf87e83f490e1b05ca64f3d221 1 std/os/uefi/protocol/simple_text_output.zig +2028 1358753115 1755651176000000000 2b300415efacd2dec40e6f1d67488799 1 std/os/uefi/protocol/simple_pointer.zig +2398 1358753090 1755651176000000000 2c87d630cff25fb47ddfd2241990d8f4 1 std/os/uefi/protocol/absolute_pointer.zig +4876 1358753108 1755651176000000000 1955a5a309db3628c52bf415af05b0f8 1 std/os/uefi/protocol/serial_io.zig +4296 1358753097 1755651176000000000 702a798c1a856afdd0ade5a1ee67b3cd 1 std/os/uefi/protocol/graphics_output.zig +2479 1358753095 1755651176000000000 0fab22ebe8c02b50099313679d4e2eb5 1 std/os/uefi/protocol/edid.zig +15978 1358753114 1755651176000000000 95a49124c8237f8d2ab01672bf2a69b1 1 std/os/uefi/protocol/simple_network.zig +9851 1358753105 1755651176000000000 fc89ee17ffacbefb54626ee378473525 1 std/os/uefi/protocol/managed_network.zig +13201 1358753101 1755651176000000000 427b83b08791055f001b217a1bd39a8b 1 std/os/uefi/protocol/ip6.zig +5373 1358753102 1755651176000000000 911ecc11b1404b1bef6afcda6cd7868e 1 std/os/uefi/protocol/ip6_config.zig +8567 1358753185 1755651176000000000 47adbb9c98a53124032c9ef80ce5889f 1 std/os/uefi/protocol/udp6.zig +4199 1358753098 1755651176000000000 b821152f4c9abddf1c1fb114333c66dd 1 std/os/uefi/protocol/hii_database.zig +1712 1358753099 1755651176000000000 1a882e3749f4ef9b5c5827cbb346f6a3 1 std/os/uefi/protocol/hii_popup.zig +47589 1636611726 1755651176000000000 da7566eb78da06f1636e8eb3a693eb3e 1 std/os/uefi/tables/boot_services.zig +18947 1636611728 1755651176000000000 cb1eb30776a43459956ea4c0675dee88 1 std/os/uefi/tables/runtime_services.zig +2796 1636611727 1755651176000000000 f0a08fa361dffa5eadb351a471801946 1 std/os/uefi/tables/configuration_table.zig +2295 1636611729 1755651176000000000 25bf31dd5f33af51b4b9da897fa1e3d5 1 std/os/uefi/tables/system_table.zig +214 1636611730 1755651176000000000 cdb95d6c52cd4654ef26be0bd9f114d4 1 std/os/uefi/tables/table_header.zig +0 5117700818 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/zig/parser_test.zig +15091 5920176871 1755651176000000000 e1ff2fae360a9d1df9777ae4f90bda6a 1 std/zig/system/arm.zig +16495 6190427823 1755651176000000000 753462fa54f971ae23b566336ad73030 1 std/zig/system/darwin/macos.zig +50924 5649753814 1755651176000000000 5c60970433f1092302f7ef4ff90d3f62 1 std/zig/llvm/ir.zig +20581 7804551509 1755651171000000000 e8eaf68a4ffa3364b8f352326a575189 1 compiler_rt/rem_pio2_large.zig +5806 9947794600 1755651176000000000 92f1dd53520d8191f93c177825b7845c 1 std/crypto/codecs/asn1/der/Decoder.zig +5861 9947794601 1755651176000000000 650695830257d32d9ea72d767d918703 1 std/crypto/codecs/asn1/der/Encoder.zig +419 552950743 1755651176000000000 ed7dfc04a5d0c4f0853edb5414ce981e 1 std/os/linux/bpf/btf_ext.zig +24293 552950744 1755651176000000000 0c7d3ee9ea8e698a843ee6039fd161c4 1 std/os/linux/bpf/helpers.zig +3221 9947794599 1755651176000000000 fda67b74062c7f535bb0a6d0f1fe74fb 1 std/crypto/codecs/asn1/der/ArrayListReverse.zig +1090 13293100788 1774964394116379942 66529a2e088d3e7853ed1befa6ad9503 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/build.zig diff --git a/service-examples/zig/echo/.zig-cache/h/f1906e334cc1d1d1346fdb7a744a90d8.txt b/service-examples/zig/echo/.zig-cache/h/f1906e334cc1d1d1346fdb7a744a90d8.txt new file mode 100644 index 000000000000..65804ee19cd0 --- /dev/null +++ b/service-examples/zig/echo/.zig-cache/h/f1906e334cc1d1d1346fdb7a744a90d8.txt @@ -0,0 +1,840 @@ +0 +2582 13293100793 1774964394129942073 2f02e93b4153950a4f60f10f6f994f5b 0 echo_server.zig +116312 17453079976 1774434465607528606 6c8819762147bc41fbcad5a476b27fea 3 p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem/src/msgpack.zig +22187 2158150032 1755651176000000000 408a2a1c3d712caf2107e3e3dfb7022b 1 ubsan_rt.zig +7957 1358769308 1755651176000000000 0ebbb46b337b65e85e7d177cfc93d2ca 1 std/std.zig +2525 1358747925 1755651176000000000 71e0dabdb301ba10f8ca420941767e70 1 std/BitStack.zig +100782 1358747926 1755651176000000000 93d126516cbe85e7dab1c855c82058cb 1 std/Build.zig +4266 1358747943 1755651176000000000 16fdba428de22eb1305e855dec42f9a9 1 std/buf_map.zig +4526 1358747944 1755651176000000000 8e63f8aad9b21f2cac5dcdcafd975d93 1 std/buf_set.zig +8139 1358747927 1755651176000000000 b344fa05d00dd94ca9bb8e95cc23b3fc 1 std/DoublyLinkedList.zig +25874 1358747952 1755651176000000000 84e0fbf3feb0ac8196cb74e389a3ccb0 1 std/dynamic_library.zig +35271 1358747929 1755651176000000000 0d7d03be6dc0cb75afa123aa4eb4d818 1 std/Io.zig +43556 1358752733 1755651176000000000 5bfaba216d6a1896e7f4b43e7ee7fe1a 1 std/multi_array_list.zig +21416 1358760861 1755651176000000000 4328abc876b82840e689434566876bc7 1 std/priority_queue.zig +33889 1358760856 1755651176000000000 431c78ed77c39d0be4be43c7634c12d0 1 std/priority_dequeue.zig +60600 1358747930 1755651176000000000 518fc21273ed20754da5c332f4c01208 1 std/Progress.zig +17628 1358747931 1755651176000000000 697e28034ef9cf05bb04d3be028a9653 1 std/Random.zig +20351 1358769295 1755651176000000000 41f61f133b5c7661bc5f90889fd39045 1 std/segmented_list.zig +10911 1358747932 1755651176000000000 72379f2cc10c10e56c76ebebd42ca14c 1 std/SemanticVersion.zig +5252 1358747933 1755651176000000000 b2d7e2ffcc15cc25fbc30a3e3799cfba 1 std/SinglyLinkedList.zig +107040 1358747934 1755651176000000000 f931b01a199517a5df7184e98bad442e 1 std/Target.zig +60770 1358747935 1755651176000000000 9d935b7746e443b6cfa58f88eb113dc4 1 std/Thread.zig +24524 1358770048 1755651176000000000 1694ad0602c4425ddf33879d415f4ab1 1 std/treap.zig +31490 1358747936 1755651176000000000 7cd075d309fe4bb3e810216b10d3f0c8 1 std/Uri.zig +95685 1358747938 1755651176000000000 a68eb5aa7a6d2c07cb820b6b5ffa0604 1 std/array_list.zig +119750 1358747937 1755651176000000000 a483a92911be1b36d25671285d410963 1 std/array_hash_map.zig +19425 1358747940 1755651176000000000 09d08e5d80b113466699bf4262b53875 1 std/atomic.zig +24490 1358747941 1755651176000000000 db10a569a8a9a16313103b691a443b4a 1 std/base64.zig +69019 1358747942 1755651176000000000 a44de477fecc990a1381fe54649a934b 1 std/bit_set.zig +39860 1358747945 1755651176000000000 bab8724be90660375455f96475ebd26f 1 std/builtin.zig +360045 1358747946 1755651176000000000 41c881372d765477c751e9b06e39e91f 1 std/c.zig +51742 1358747947 1755651176000000000 a9384cc5046eaeedcb1b30e646b423dc 1 std/coff.zig +372 1358747948 1755651176000000000 b867983786f01e8333e32b633eb10410 1 std/compress.zig +17640 1358769307 1755651176000000000 bd79322afba3cc08000a99c21bfd26d7 1 std/static_string_map.zig +13676 1358747949 1755651176000000000 56a50f35f9d4227c9754ad2bad741de1 1 std/crypto.zig +69500 1358747950 1755651176000000000 f2ac0dce249b308c0c7483a07e9d8c21 1 std/debug.zig +4894 1358747951 1755651176000000000 61fff94fe737bda88edd8ca624c0a93c 1 std/dwarf.zig +65720 1358747953 1755651176000000000 bbe1ed25b53adc620fcc2bcd89a2a536 1 std/elf.zig +57857 1358747954 1755651176000000000 e8bdba1d4814ce140abed00d8ac27c66 1 std/enums.zig +58752 1358747955 1755651176000000000 94d08677478fb7c8fd9ecad13a05a7f6 1 std/fmt.zig +34417 1358747956 1755651176000000000 2d9a528a5756bb811d20d393011711e8 1 std/fs.zig +4919 1358747957 1755651176000000000 9c3f0431c1637a1fc64fa91b0520d1b3 1 std/gpu.zig +4120 1358747958 1755651176000000000 287776a366bc2fa9071678dd14432afc 1 std/hash.zig +80684 1358747959 1755651176000000000 5d2dba5503b8646ccb51c7481cec177d 1 std/hash_map.zig +35783 1358747960 1755651176000000000 291afdd8c7934ab8495ad0cb24e3272b 1 std/heap.zig +39240 1358747961 1755651176000000000 948901b44d7c0b5b43749fa91ebd4552 1 std/http.zig +5465 1358747962 1755651176000000000 050dd347d737c8ab1673d3762b02a7e0 1 std/json.zig +18649 1358747963 1755651176000000000 f1185edfabdd268969ce0577870e98a2 1 std/leb128.zig +8342 1358747964 1755651176000000000 7a79e5053bcf4725fcf9ca5e03c43252 1 std/log.zig +70826 1358747965 1755651176000000000 6a8358e9e839fb48052b1b0c7aa87559 1 std/macho.zig +74776 1358747966 1755651176000000000 d4a0c6126fce11a0cafaea7b313668ac 1 std/math.zig +184945 1358747967 1755651176000000000 780cc406a638f4fee16e04354f8b9612 1 std/mem.zig +39789 1358751424 1755651176000000000 05e33fd489986e7ef7a2114c8f3040d0 1 std/meta.zig +88641 1358752741 1755651176000000000 f046d7172f3a3de58ed9e665b16b72ce 1 std/net.zig +10310 1358753186 1755651176000000000 2384f794189b66c622279a439a06e7a5 1 std/os.zig +2016 1358752763 1755651176000000000 b634eff517218815e970c18230425d31 1 std/once.zig +13947 1358753188 1755651176000000000 4e879b4dee70c859bd0938a160593e4c 1 std/pdb.zig +11147 1358753189 1755651176000000000 67e0f1b41fa1dbada2b0874d26ef4d81 1 std/pie.zig +290871 1358758782 1755651176000000000 0a923dee580fffa1623318e59d0a2b3e 1 std/posix.zig +78344 1358769290 1755651176000000000 b08239d255f89ec21465710fcbc5e908 1 std/process.zig +39596 1358769301 1755651176000000000 338f2628729e859f51865caf708004bc 1 std/sort.zig +23280 1358769300 1755651176000000000 8de2dfb1368f1051037084ba56ea4a97 1 std/simd.zig +16059 1358747939 1755651176000000000 7d6ee226b3aea4e399efa02748582a57 1 std/ascii.zig +42826 1358769309 1755651176000000000 55143931b33969e1e759f8623049586c 1 std/tar.zig +48207 1358769310 1755651176000000000 deee7351dbab0664b3bc9a4bdb2a5d38 1 std/testing.zig +11575 1358769311 1755651176000000000 04290176ff236793a2846b7afe763a99 1 std/time.zig +11173 1358770049 1755651176000000000 a51ee0838574fdd01999198cbeff620f 1 std/tz.zig +85999 1358770050 1755651176000000000 a384b975bb355f986219464058d80145 1 std/unicode.zig +12292 1358770051 1755651176000000000 8757ba546e520503fcc6a58d9b0d0083 1 std/valgrind.zig +17661 1358770054 1755651176000000000 a8988138c7ee50f868cd1db24ab3d1d6 1 std/wasm.zig +37103 1358770055 1755651176000000000 954dfee598538ddb98e9fc105c2e0a39 1 std/zig.zig +26592 1358770056 1755651176000000000 2d4666d88f0c60307ae5724c74a78854 1 std/zip.zig +1242 1358770057 1755651176000000000 c5e5cebc2cfc9353dc65aa5193442b60 1 std/zon.zig +28071 1358769306 1755651176000000000 76d2b688d1d45fbb74ca560efdaac238 1 std/start.zig +2582 13293100793 1774964394129942073 2f02e93b4153950a4f60f10f6f994f5b 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/echo_server.zig +5929 8072386496 1755651176000000000 a75e2588e1a73369810b6ba7657e4bfd 1 std/crypto/tlcsprng.zig +59803 1636611718 1755651176000000000 b6406a99c6bcfa6765bfb08eafcbff0d 1 std/Build/Cache.zig +11083 2158133725 1755651171000000000 3c8016eb348fede9a19b94ec4869d8a6 1 compiler_rt.zig +38694 1636611721 1755651176000000000 4bafc6be1344a4b0b4bfce1abc099568 1 std/Build/Step.zig +26376 1636611720 1755651176000000000 bb934510edbc055949ffff1646e5e1e6 1 std/Build/Module.zig +43006 1636611722 1755651176000000000 01457aac972ac3a8e51fa2185c19c1be 1 std/Build/Watch.zig +17168 1636611719 1755651176000000000 907b4dad04e8cdc9fb34a46e35e44fb3 1 std/Build/Fuzz.zig +30748 1636611723 1755651176000000000 5bf5917eafea467894d1bdebd37cc3aa 1 std/Build/WebServer.zig +10407 1636611724 1755651176000000000 219f7675797b83c184e56753dff6542a 1 std/Build/abi.zig +64087 2702453039 1755651176000000000 1ba61be2534ce203f154a61c6565f179 1 std/Io/Reader.zig +106521 2702453040 1755651176000000000 d8e9286f3772f2b52339c5bf9facf601 1 std/Io/Writer.zig +14469 2702453037 1755651176000000000 50460af6b2b24665a01f2798a19968d6 1 std/Io/DeprecatedReader.zig +3660 2702453038 1755651176000000000 667198a0bb922d33d2c2fb81a9a25d30 1 std/Io/DeprecatedWriter.zig +6043 2702453042 1755651176000000000 8a44e6b03e4a42b09a4077448a7c41db 1 std/Io/fixed_buffer_stream.zig +1227 2702453041 1755651176000000000 8e42c53c443deeb5a1d9cd2b1a3dbee7 1 std/Io/counting_reader.zig +5692 2702453044 1755651176000000000 1ef2fac09b5b843536005bd1350d920d 1 std/Io/tty.zig +0 2702453043 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/test.zig +1811 3233988262 1755651176000000000 4f975bd4c885c2b17936c7c15e2a1fa0 1 std/Random/Ascon.zig +2685 3233988263 1755651176000000000 5244bfd5edd68ad074bfdf866029fa86 1 std/Random/ChaCha.zig +6100 3233988264 1755651176000000000 14fb5367ee7128106466c91abe89d828 1 std/Random/Isaac64.zig +2727 3233988265 1755651176000000000 98b129620d81fc551cc2747eb5e93a2d 1 std/Random/Pcg.zig +3242 3233988330 1755651176000000000 13e05c7b4ba6bd757c30dbc6e1520198 1 std/Random/Xoroshiro128.zig +3177 3233988369 1755651176000000000 ece4176296c0d5a4735a0e13195d3e89 1 std/Random/Xoshiro256.zig +3158 3233988267 1755651176000000000 e0b128479f8a117718ec288761f83ac0 1 std/Random/Sfc64.zig +3699 3233988266 1755651176000000000 f562dad96707be48e6745a1f57cbf27c 1 std/Random/RomuTrio.zig +530 3233988268 1755651176000000000 6862d091fadcbbb652464ab10689bd23 1 std/Random/SplitMix64.zig +4526 3233988378 1755651176000000000 8ac3cfca93be2f623ce661fc9fb27686 1 std/Random/ziggurat.zig +0 3233988374 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Random/test.zig +29955 3503343368 1755651176000000000 7abef445358bc9111ee7720810ab2dfe 1 std/Target/Query.zig +106498 3503343369 1755651176000000000 4e1faa0e06f720a8513cc19957f2cd52 1 std/Target/aarch64.zig +104612 3503343370 1755651176000000000 06339133610c2f04ff7073b54ed9f610 1 std/Target/amdgcn.zig +1274 3503343371 1755651176000000000 c251325fefba8d6614a0692c5ceb2eea 1 std/Target/arc.zig +79071 3503343372 1755651176000000000 c8ffd174d8ea40cc06efcf87bf4b657a 1 std/Target/arm.zig +71492 3503343373 1755651176000000000 8dcc898c0cae23c1a6c85b1acad47ada 1 std/Target/avr.zig +2425 3503343374 1755651176000000000 3376bf5f146580e9b3ce5e329a604817 1 std/Target/bpf.zig +77604 3503343375 1755651176000000000 be007dfe415760a79fc1d9d7dc89a548 1 std/Target/csky.zig +18058 3503343377 1755651176000000000 8ccf22d3bcff20d7636d8251948f4618 1 std/Target/hexagon.zig +665 3503343376 1755651176000000000 1dec26e22b22006cd47d45b427f8a00c 1 std/Target/generic.zig +1207 3503343378 1755651176000000000 2119135642c6ce06557e5005da5d27d3 1 std/Target/lanai.zig +6753 3503343379 1755651176000000000 da13f92a1b8d03cc797a3beeaa2922d6 1 std/Target/loongarch.zig +7140 3503343380 1755651176000000000 85a640161b5e75f1b0e44aafa7b2ac12 1 std/Target/m68k.zig +16348 3503343381 1755651176000000000 12a09875d65985836758c030c651b686 1 std/Target/mips.zig +2227 3503343382 1755651176000000000 f424aba074f946c774143fd6a0cc9b02 1 std/Target/msp430.zig +16613 3503343383 1755651176000000000 166964aa1c4340f0f5e8c2079fbe6806 1 std/Target/nvptx.zig +36467 3503343384 1755651176000000000 aba041f244b5c814708cec688ed2ab9b 1 std/Target/powerpc.zig +1396 3503343385 1755651176000000000 11966b944c6a6f5eb378759087686f44 1 std/Target/propeller.zig +90023 3503343386 1755651176000000000 f9c2faa81a8573bbbf95b94084ffd3be 1 std/Target/riscv.zig +30256 3503343387 1755651176000000000 a3772db647d2b9a091f142be3fe81a5a 1 std/Target/s390x.zig +21324 3503359904 1755651176000000000 dff9a38ced436d7efc5afea4972eb822 1 std/Target/sparc.zig +5037 3503359905 1755651176000000000 7a802abba56de166296a02820267f278 1 std/Target/spirv.zig +1276 3503359906 1755651176000000000 320e5694ddc1e4347015e29952472e47 1 std/Target/ve.zig +6517 3503359907 1755651176000000000 1babc8b342fb599193f79f08f76e9463 1 std/Target/wasm.zig +139090 3503359908 1755651176000000000 6c63cbfe59447c9f4755d8b977fd0e4d 1 std/Target/x86.zig +1234 3503359909 1755651176000000000 9977314bd28dc12c6017784ed96cc578 1 std/Target/xcore.zig +1274 3503359910 1755651176000000000 b20b4af52a8974acb1c9cf688822a23c 1 std/Target/xtensa.zig +42124 3769667637 1755651176000000000 a3d49f74bb65b5f4d7a02d5cac8c7afe 1 std/Thread/Futex.zig +9112 3769667642 1755651176000000000 fe6a25bfea2dcf9533b026b4e0846b98 1 std/Thread/ResetEvent.zig +10156 3769667639 1755651176000000000 f3390bd4b6bae3fe12192885ee63130d 1 std/Thread/Mutex.zig +2650 3769667644 1755651176000000000 3ea6f138fe347f9c36c6331f8ba278e3 1 std/Thread/Semaphore.zig +23329 3769667636 1755651176000000000 6fcf321e05d855b3995cb3a50125c3f8 1 std/Thread/Condition.zig +11411 3769667643 1755651176000000000 215e3b4416494f856a25895960f5a4ca 1 std/Thread/RwLock.zig +9540 3769667640 1755651176000000000 628f9bee010911810b3c9193792c6f53 1 std/Thread/Pool.zig +1988 3769667645 1755651176000000000 6793266710d780758ac32c2edcc166a9 1 std/Thread/WaitGroup.zig +59140 4340765711 1755651176000000000 92182faee34134d52a9ad2d0a5a5fb2f 1 std/builtin/assembly.zig +50235 4576346041 1755651176000000000 9708ebe35d8d2550494584ceeba81209 1 std/c/darwin.zig +11274 4576346045 1755651176000000000 09bec7c3f40f6de5099b6d1914d351cf 1 std/c/freebsd.zig +9878 4576346075 1755651176000000000 ab1e53cee5c67832574a9055e0108e66 1 std/c/solaris.zig +6617 4576346072 1755651176000000000 d16786c18fabd57be5a8635a6ef08bb1 1 std/c/netbsd.zig +3875 4576346043 1755651176000000000 907c436f260d11e9f80420d838051111 1 std/c/dragonfly.zig +15535 4576346070 1755651176000000000 43ebba145dd0318d69788910b66220e7 1 std/c/haiku.zig +13681 4576346073 1755651176000000000 06689937d111c195fd6baae889fc720b 1 std/c/openbsd.zig +3099 4576346074 1755651176000000000 6a897bb99820db129b41bc2b5d6046bb 1 std/c/serenity.zig +6341 4845181927 1755651176000000000 33490794e8bee84517ccfebe261d4eae 1 std/compress/flate.zig +3010 4845181929 1755651176000000000 e6aae4a5afa281030d98b006a53807e0 1 std/compress/lzma.zig +894 4845181930 1755651176000000000 0112dea02a7ad758670754ecb2e3ff09 1 std/compress/lzma2.zig +5317 4845181932 1755651176000000000 23792685eae819b737bc8922607d4ba7 1 std/compress/xz.zig +6605 4845181933 1755651176000000000 295f3b5136806a9f26e893c51e33025d 1 std/compress/zstd.zig +10441 8072380959 1755651176000000000 b922de5f94704738f619903775fecb17 1 std/crypto/timing_safe.zig +47614 8072380895 1755651176000000000 a03a980a4a1a9a95bf94441f8c307101 1 std/crypto/aegis.zig +6851 8072380897 1755651176000000000 ea7fad6fda828c72abcc0148e4659e9c 1 std/crypto/aes_gcm.zig +14129 8072380898 1755651176000000000 65b51cb2f9dda41995f89b221db5507e 1 std/crypto/aes_ocb.zig +51909 8072380912 1755651176000000000 451cb3546d86929665419cd05bea0293 1 std/crypto/chacha20.zig +6309 8072380923 1755651176000000000 1318dc8b9450bda7d30b2f2bd66ef98f 1 std/crypto/isap.zig +27260 8072380931 1755651176000000000 b95f25fd28a65f6f71761d12efaee503 1 std/crypto/salsa20.zig +3626 8072380922 1755651176000000000 7d28bd5a64f521b7f7322612e4d5f562 1 std/crypto/hmac.zig +18629 8072380957 1755651176000000000 0ee80c1bcfed0bfc7fe20c0fd3c04d22 1 std/crypto/siphash.zig +6226 8072380914 1755651176000000000 4270e1555211de4aca948cd086fc7129 1 std/crypto/cmac.zig +8993 8072380896 1755651176000000000 1565baef5de85c1722fc1f3661e7418c 1 std/crypto/aes.zig +15303 8072380924 1755651176000000000 ac2b7ab43674f07a4208ffa738f420c5 1 std/crypto/keccak_p.zig +9666 8072380907 1755651176000000000 bfcf52448d42cda00bcaa777deca80cf 1 std/crypto/ascon.zig +2303 8072380927 1755651176000000000 64e2696fd33ff024c44aee16a197afac 1 std/crypto/modes.zig +8666 8345434072 1755651176000000000 3f63b88b98e1cb4a076af7d105c52b5f 1 std/crypto/25519/x25519.zig +65291 8072380926 1755651176000000000 d602189df4b86e3751c21259bc485f24 1 std/crypto/ml_kem.zig +8492 8345434063 1755651176000000000 1ad8b856fa664e2584776361ba03bdc0 1 std/crypto/25519/curve25519.zig +25932 8345434068 1755651176000000000 a2d994ac2ed36751f95ac92b85a4931d 1 std/crypto/25519/edwards25519.zig +16174 10483472283 1755651176000000000 1624d5389942bffd6016dc87453db0b7 1 std/crypto/pcurves/p256.zig +16370 10483472284 1755651176000000000 c7fb645fa9fd8e26db3c4252856cdc9d 1 std/crypto/pcurves/p384.zig +7971 8345434070 1755651176000000000 d0d33655dcbd80c50d53283108a54034 1 std/crypto/25519/ristretto255.zig +20520 10483472285 1755651176000000000 e8ead8fcc9affae7d203ecb87a0e8236 1 std/crypto/pcurves/secp256k1.zig +29319 8072380910 1755651176000000000 30d94c7ccda432eb5df2b6e7c68e0c35 1 std/crypto/blake2.zig +41428 8072380911 1755651176000000000 711b0501d46a7c267b6f90ee8be3aacd 1 std/crypto/blake3.zig +9751 8072380925 1755651176000000000 d4911af79a2684c60a4325e9142b1609 1 std/crypto/md5.zig +9321 8072380894 1755651176000000000 15ebe6e9b9de51b93b00e1b463f00cb4 1 std/crypto/Sha1.zig +36825 8072380934 1755651176000000000 bfc45b688f4f79b09cd3fa2ec3ce7a9e 1 std/crypto/sha2.zig +35726 8072380956 1755651176000000000 74ba21545a132750f9a4eef5a37da502 1 std/crypto/sha3.zig +2756 8072380920 1755651176000000000 3f1b15f01d5b6045525b1b5b73081e67 1 std/crypto/hash_composition.zig +3703 8072380921 1755651176000000000 09d36564cbdc5d24ea6fa90e4b7dd6e5 1 std/crypto/hkdf.zig +20494 8072380919 1755651176000000000 c857473fa22ec9e817a3c52e298e2eec 1 std/crypto/ghash_polyval.zig +7259 8072380930 1755651176000000000 1b5aed273103196d0bdc885bc2b6ec2c 1 std/crypto/poly1305.zig +28906 8072380900 1755651176000000000 da61f4b2f151f214129e329fd7af44dc 1 std/crypto/argon2.zig +37669 8072380908 1755651176000000000 147c9e47e9a5a805c79882ce141f1fad 1 std/crypto/bcrypt.zig +25878 8072380932 1755651176000000000 21725e7f671298d416186499754301ea 1 std/crypto/scrypt.zig +8451 8072380928 1755651176000000000 e0bc6ddf2119b9cfe2a19626ded9635a 1 std/crypto/pbkdf2.zig +13838 8072380929 1755651176000000000 7867fa74be498feed958e4107163a822 1 std/crypto/phc_encoding.zig +31401 8345434067 1755651176000000000 727ee4c7eeb22bc4a90a96437f332593 1 std/crypto/25519/ed25519.zig +395201 8072380916 1755651176000000000 4f4d382c531f90a2b4550ea4207a4d70 1 std/crypto/ecdsa.zig +38465 8072380918 1755651176000000000 5ec16eac7226fcb11dbfeba8f371ee79 1 std/crypto/ff.zig +165 8072380915 1755651176000000000 0ab9a19cc7544d7896d8555b38c3292a 1 std/crypto/codecs.zig +1715 8072380917 1755651176000000000 f0b8832dd923baeda761e9855ed9d1ab 1 std/crypto/errors.zig +25575 8072386497 1755651176000000000 05de4a472e23ccd4ece1a15329fc0dcb 1 std/crypto/tls.zig +50895 8072380893 1755651176000000000 37739975874d2d5867dbd6043614417c 1 std/crypto/Certificate.zig +4783 12094458721 1755651176000000000 bcebc8664d30ed61fbe6f4f52df7e6c8 1 std/debug/MemoryAccessor.zig +2664 12094458719 1755651176000000000 d18c45d7c3943d59326b6215041f7b9b 1 std/debug/FixedBufferReader.zig +95718 12094458718 1755651176000000000 031ee6c2142eb78ee4d751fdef4e8aee 1 std/debug/Dwarf.zig +22200 12094458722 1755651176000000000 cadc751a24d7fe6cd0045c67d91fccc4 1 std/debug/Pdb.zig +90918 12094458723 1755651176000000000 1af6e89bf60261270c63c0b89b93dbe4 1 std/debug/SelfInfo.zig +2274 12094458720 1755651176000000000 a1cbdaf27c5043ba4157f3a1bfcd68fd 1 std/debug/Info.zig +8486 12094458717 1755651176000000000 2ff9c5b27e3411a59088d247231e9d0f 1 std/debug/Coverage.zig +3221 12094458725 1755651176000000000 ff7b6d80307d98046c1a6b71ce9736cb 1 std/debug/simple_panic.zig +2349 12094458724 1755651176000000000 58f6d8954e49f4e277db7b9bad6e1f3c 1 std/debug/no_panic.zig +3939 12626842388 1755651176000000000 5ee5df976eaaf300e36cd234fc3f2f43 1 std/dwarf/TAG.zig +7632 12626842380 1755651176000000000 101aeaf3e9df594bf04093c15135dc96 1 std/dwarf/AT.zig +5693 12626842387 1755651176000000000 01d731f8d28ba8382ff3c5885d5e0c75 1 std/dwarf/OP.zig +1963 12626842386 1755651176000000000 055280c08a34f56d3d4ea7d69cf3fca3 1 std/dwarf/LANG.zig +1399 12626842385 1755651176000000000 40a7d4ac60d12c6e9ca294acaed35474 1 std/dwarf/FORM.zig +1479 12626842382 1755651176000000000 8bd901aaa561652b86f99819d0da7a57 1 std/dwarf/ATE.zig +643 12626842384 1755651176000000000 6f6a9e4e1602df062ad02179710971c4 1 std/dwarf/EH.zig +94944 12899024245 1755651176000000000 f351cb76a2427938af1d074abce787ce 1 std/fmt/float.zig +13189 12899024262 1755651176000000000 8fcd1365fb1fe2c743d223fc34880b6a 1 std/fmt/parse_float.zig +2845 13703306145 1755651176000000000 4f058fd80be3876870bc26a123c9de42 1 std/fs/AtomicFile.zig +114999 13703306146 1755651176000000000 a44f3eadd8cf27aad7b7c047f184c8e7 1 std/fs/Dir.zig +86478 13703306147 1755651176000000000 995d0bf84e899044cc3510a9ca641329 1 std/fs/File.zig +78108 13703306149 1755651176000000000 be1cf725a1de08084d5bf813f6758d74 1 std/fs/path.zig +1888 13703306151 1755651176000000000 2c143a188f1f9a5e0b6cf6eb3a2a3825 1 std/fs/wasi.zig +2665 13703306148 1755651176000000000 a74f4aed0521f238f302bbce59933ebd 1 std/fs/get_app_data_dir.zig +0 13703306150 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/fs/test.zig +2797 14239609756 1755651176000000000 e2d2903d78455f002bdf1543be5bd9b3 1 std/hash/Adler32.zig +14624 14239609757 1755651176000000000 5d40bb3c14d452873d2170a0dc501e12 1 std/hash/auto_hash.zig +19972 14239609762 1755651176000000000 c36dede4b91e35db37ea45c66dbe6fe9 1 std/hash/crc.zig +1890 14239609765 1755651176000000000 8022a7844b1545ef9cc7889a3a71944a 1 std/hash/fnv.zig +9977 14239609766 1755651176000000000 26add2cb2571b835338f163c8ca63459 1 std/hash/murmur.zig +12412 14239609760 1755651176000000000 cd681dc3507b42839b769eae04b1dc3b 1 std/hash/cityhash.zig +8367 14239609768 1755651176000000000 4744eb583f951c0ddcee1cf3bdde33fb 1 std/hash/wyhash.zig +41799 14239609769 1755651176000000000 ee3e90d0630039df9f6254b022ce80e1 1 std/hash/xxhash.zig +13560 14783155617 1755651176000000000 12f037849d64048bd40c550289bf0826 1 std/heap/arena_allocator.zig +7465 14783155614 1755651176000000000 c45d8aa65e37758c03dbedc65850dbf5 1 std/heap/SmpAllocator.zig +7575 14783155612 1755651176000000000 b8819311409154f2ecf659e0c1e915b6 1 std/heap/FixedBufferAllocator.zig +8217 14783155613 1755651176000000000 fb438f5e75bc8857d9d1a5b0e9421e85 1 std/heap/PageAllocator.zig +7469 14783155620 1755651176000000000 d0066bdd4d2784177387f85d9c416259 1 std/heap/sbrk_allocator.zig +1681 14783155615 1755651176000000000 720fc81adedeb4b35463081496f20d4a 1 std/heap/ThreadSafeAllocator.zig +10472 14783155616 1755651176000000000 21ee044c07f5991f129755da06deea5a 1 std/heap/WasmAllocator.zig +59918 14783155618 1755651176000000000 552ab3f08dc9b1a495663dc5b84ab562 1 std/heap/debug_allocator.zig +8049 14783155619 1755651176000000000 cd6c38f86fa0a1bd7ddaa85a0e7f94f7 1 std/heap/memory_pool.zig +70675 15048099509 1755651176000000000 dbf2b76bc62a45f82da46916ded41556 1 std/http/Client.zig +31360 15048099516 1755651176000000000 abd6ae4080522f73e4745e5efce346dc 1 std/http/Server.zig +13015 15048099510 1755651176000000000 4c7e2ad894ad12f141066550c9bb326a 1 std/http/HeadParser.zig +3791 15048099508 1755651176000000000 61420280e3c9986a74a687031fdcf831 1 std/http/ChunkParser.zig +3108 15048099515 1755651176000000000 149ac2b5413f4e7bdf793b3740a63558 1 std/http/HeaderIterator.zig +0 15048099517 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/http/test.zig +7996 15317222681 1755651176000000000 8b3aa35651f2969c3a859a3fab94f443 1 std/json/dynamic.zig +3272 15317222684 1755651176000000000 39fdbe23f321a0cb11a35e428810a09e 1 std/json/hashmap.zig +72868 15317222678 1755651176000000000 ae7b2e59c7744ce34ba98c07df5ef06b 1 std/json/Scanner.zig +33828 15317222687 1755651176000000000 bb79d803b31bd0bc320ba90aa1d2b0dd 1 std/json/static.zig +37319 15317222679 1755651176000000000 48c6d66b659b03b4e105add369592eda 1 std/json/Stringify.zig +0 15317222689 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/test.zig +0 15317221419 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/JSONTestSuite_test.zig +12048 15580753241 1755651176000000000 423025cbe9a3339e236aaf0fc007496c 1 std/math/float.zig +1681 15580753262 1755651176000000000 23aba00e34aa5a807ee8d4bddf2738c5 1 std/math/isnan.zig +7877 15580753245 1755651176000000000 21099ae36d31e459824cfc3757a834f2 1 std/math/frexp.zig +4458 15580753472 1755651176000000000 78dbab36632b04ee9c8bc0e72a713100 1 std/math/modf.zig +1136 15580753233 1755651176000000000 9f0946a16071ec7d7cb9f45c227c22f1 1 std/math/copysign.zig +1083 15580753255 1755651176000000000 eb357e7577b828d5fc2ce3b4118459f2 1 std/math/isfinite.zig +1775 15580753260 1755651176000000000 44fb86a5536455ca3877bb415347c6ac 1 std/math/isinf.zig +1456 15580753266 1755651176000000000 a37461dca6f9345d8f8a2729c13b9ff6 1 std/math/iszero.zig +1837 15580753263 1755651176000000000 cb4e66e7b3adbf190150294715c788b0 1 std/math/isnormal.zig +19209 15580753473 1755651176000000000 000ec81e9c79a332fb482883ab800777 1 std/math/nextafter.zig +1557 15580753477 1755651176000000000 3157574850d20851e8580a398e6895a9 1 std/math/signbit.zig +503 15580753476 1755651176000000000 66d1263715127908b281862dba5dc24b 1 std/math/scalbn.zig +6839 15580753274 1755651176000000000 65cf74d2abee4d99cea2993060dc9cc0 1 std/math/ldexp.zig +9113 15580753474 1755651176000000000 2a24fb6143c914862a5d74c95a9f8b13 1 std/math/pow.zig +7643 15580753475 1755651176000000000 5c50833e1a201a5be1f48de7ea538f0d 1 std/math/powi.zig +2837 15580753479 1755651176000000000 50e9a695059ca6bb04cd979304e4c09b 1 std/math/sqrt.zig +4812 15580753231 1755651176000000000 6f62d1f1ae7bff93c034f6f664aeaa12 1 std/math/cbrt.zig +5378 15580753216 1755651176000000000 25b4039f6f32ddc437baa4061a3f8c3d 1 std/math/acos.zig +5337 15580753218 1755651176000000000 eb35acdb17b747cc2f790e4ff8666d54 1 std/math/asin.zig +7275 15580753220 1755651176000000000 5d8af88aea5f35ce7e37d0f0af8a4baf 1 std/math/atan.zig +10553 15580753221 1755651176000000000 0cafcb907ba579b6b64631165a647329 1 std/math/atan2.zig +4748 15580753249 1755651176000000000 910e3c3ba1e7626618c73be7f12f9319 1 std/math/hypot.zig +11499 15580753236 1755651176000000000 1ddb2b66fbdf7acb2a4ad484203ae340 1 std/math/expm1.zig +5519 15580753252 1755651176000000000 eacf48263508740f77738f675caef7a6 1 std/math/ilogb.zig +2531 15580753275 1755651176000000000 b3b40fd4682f372913e09bc18ca3fcd6 1 std/math/log.zig +1919 15580753456 1755651176000000000 a350e2bd40b9fc740607c3d658668abb 1 std/math/log2.zig +5553 15580753276 1755651176000000000 e10fe90c6d01abfe27b7f2ee6e929a68 1 std/math/log10.zig +4219 15580753470 1755651176000000000 88ffa0f96518ccc1715935c0618e543e 1 std/math/log_int.zig +8872 15580753442 1755651176000000000 754de08c8dc06a6115beb96e5a991ad7 1 std/math/log1p.zig +4299 15580753219 1755651176000000000 9d6c681faf8421823919e5bf347bf740 1 std/math/asinh.zig +2756 15580753217 1755651176000000000 349667a0bb1e62bdc0383bce5747190c 1 std/math/acosh.zig +3399 15580753228 1755651176000000000 7b22337c4a4df112f2c4be431b076007 1 std/math/atanh.zig +4294 15580753478 1755651176000000000 42ef534228feb279b81e6fa2a5d79333 1 std/math/sinh.zig +4157 15580753234 1755651176000000000 1dcc281bf0ca8a9782e5ae845f7b1fa5 1 std/math/cosh.zig +4581 15580753480 1755651176000000000 2b64632014a58c73e7052420b356fcaa 1 std/math/tanh.zig +2024 15580753248 1755651176000000000 28fd0ee50d92f0c08fd6aab95d6f15ee 1 std/math/gcd.zig +1194 15580753273 1755651176000000000 40b3836f0a2277cb76754547dd483869 1 std/math/lcm.zig +11487 15580753247 1755651176000000000 c0bf0098a075fd684bcbeff41e5abbc4 1 std/math/gamma.zig +6563 15580753232 1755651176000000000 dccdf309b3630a59978e204ea0cbde99 1 std/math/complex.zig +746 15580753229 1755651176000000000 cd57ee7b96c9ee1b66a3e7fc3ef16da9 1 std/math/big.zig +17718 16386458075 1755651176000000000 aeefc50be34a4361ff7a2aa85861ab23 1 std/mem/Allocator.zig +6027 16654392804 1755651176000000000 a9b245c6e260e2a4606e53d2d51f65c6 1 std/meta/trailer_flags.zig +0 16923139929 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/net/test.zig +283817 10783549 1755651176000000000 e22376b03b7f60e971b4376ee895d68b 1 std/os/linux.zig +10460 10783550 1755651176000000000 488b62d22bbe9301ab373d2949f7d23b 1 std/os/plan9.zig +7746 10783551 1755651176000000000 931017d063b5a98aee21c888aac3dc3d 1 std/os/uefi.zig +16108 10784384 1755651176000000000 3cfe5b8a9735273d6782d1c456b08f15 1 std/os/wasi.zig +34093 10783547 1755651176000000000 d0e8187f608f5706844bd3662b1ea1ad 1 std/os/emscripten.zig +207257 10784400 1755651176000000000 773327deeb78ed0db89c9fa256583be1 1 std/os/windows.zig +2097 10783548 1755651176000000000 6b77b7f42ffec7eedf37dfecdfdd7014 1 std/os/freebsd.zig +0 2424035805 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/posix/test.zig +72290 2702453046 1755651176000000000 e37f5a4f9f40fbfad5a97b8ac9aacaae 1 std/process/Child.zig +51714 2969763857 1755651176000000000 eb8790d984ce4a6ddd6376d877c85ff1 1 std/sort/block.zig +10719 2969763867 1755651176000000000 112b7c1a501cf9a872fe6b59ffa7df08 1 std/sort/pdq.zig +17117 3233988546 1755651176000000000 5e6a75c2975430f5d46623d1537855a5 1 std/tar/Writer.zig +0 3233988547 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/tar/test.zig +5694 3769667651 1755651176000000000 cd71b2d90772c02d65444191f9fd7d5d 1 std/testing/FailingAllocator.zig +6764 4036588557 1755651176000000000 c674a37722ac57c1bfc929140e058755 1 std/time/epoch.zig +7574 4845181954 1755651176000000000 d017fea857f95f2c01199efab8dbf965 1 std/valgrind/memcheck.zig +2493 4845181953 1755651176000000000 30a771b8491dd283a50c6166babded38 1 std/valgrind/callgrind.zig +1249 4845181952 1755651176000000000 6781a2e56089a14f4f2a391169bf7c05 1 std/valgrind/cachegrind.zig +62827 5117700830 1755651176000000000 d1f5a0dbf135b754ed6a703e23df50e6 1 std/zig/tokenizer.zig +32614 5117700802 1755651176000000000 198542319824c4a3f109c64260324d68 1 std/zig/ErrorBundle.zig +7166 5117700806 1755651176000000000 860d7dc4b9813278374fb24397bb0a4d 1 std/zig/Server.zig +1605 5117700801 1755651176000000000 7cfa1ea3449449667ebf6c5201f6dbaf 1 std/zig/Client.zig +14323 5117700821 1755651176000000000 7e26c1a770304af7ccd5f605ada0a2e5 1 std/zig/string_literal.zig +6720 5117700817 1755651176000000000 07baee4aa2d7c097b1307a2cdec422cf 1 std/zig/number_literal.zig +1666 5117700820 1755651176000000000 87e0eb501395d68ddce525f8555f960c 1 std/zig/primitives.zig +148759 5117700541 1755651176000000000 5f6f4c60784f8ab4107f3383e980dfca 1 std/zig/Ast.zig +568292 5117700542 1755651176000000000 cd6d40183f2ae21282fd3d5fbbfc8238 1 std/zig/AstGen.zig +204779 5117700809 1755651176000000000 4104285d49190afffd58ec1c3544ed4a 1 std/zig/Zir.zig +9166 5117700810 1755651176000000000 6e1c16d90de3a0ffaeaf1d478014a072 1 std/zig/Zoir.zig +36096 5117700811 1755651176000000000 a625edc6603167137dcd761c6dc77e82 1 std/zig/ZonGen.zig +58141 5117700822 1755651176000000000 816fe631c09ee2b8359e520acee70d8b 1 std/zig/system.zig +21416 5117700800 1755651176000000000 d1b3749b34a2551f94643e698928aae0 1 std/zig/BuiltinFn.zig +41574 5117700543 1755651176000000000 a042f3e8774e8bd3822b35117bbc3d78 1 std/zig/AstRlAnnotate.zig +36100 5117700804 1755651176000000000 62fa4ce130060129db4288d3749f2488 1 std/zig/LibCInstallation.zig +45848 5117700808 1755651176000000000 e70747937d94d1333d148947c57547da 1 std/zig/WindowsSdk.zig +9786 5117700803 1755651176000000000 280d2bdf0f1a8f96ecaa4af86ba0a60e 1 std/zig/LibCDirs.zig +25071 5117700829 1755651176000000000 959e2ad518bd8b10bbd16a31cfe2cf7a 1 std/zig/target.zig +247 5117700816 1755651176000000000 4fee6920e55c663811dd32d69b7f2937 1 std/zig/llvm.zig +8713 5117700812 1755651176000000000 53cfae8a8276d7204622550f50243f6b 1 std/zig/c_builtins.zig +28363 5117700815 1755651176000000000 e2c60f43c6ae6eb4e168dc7fabd2138a 1 std/zig/c_translation.zig +117354 6465198947 1755651176000000000 ab567b993b2504504e04ae0815a40fed 1 std/zon/parse.zig +46916 6465198948 1755651176000000000 7bf4408cdd1c84975a793e5daefb12a8 1 std/zon/stringify.zig +32288 6465198946 1755651176000000000 5eeb9845ed3d086fe03083e2f7b9e446 1 std/zon/Serializer.zig +2159 1890351199 1755651176000000000 e912d0164349d3c86eb8b1226a86388f 1 std/os/windows/tls.zig +10957 7804547908 1755651171000000000 86adef0c76818174cbce959185f8aa9c 1 compiler_rt/common.zig +7394 7804547916 1755651171000000000 4d63e8360c0ca220253582124186fb27 1 compiler_rt/count0bits.zig +1385 7804551496 1755651171000000000 929736d7c0636ec88ef908c0b4c15a65 1 compiler_rt/parity.zig +1916 7804551501 1755651171000000000 9e893175f43f5d42fd541260ca5386e7 1 compiler_rt/popcount.zig +2762 7804547400 1755651171000000000 972f20e5339815a5e21e7b0bc6202353 1 compiler_rt/bitreverse.zig +3260 7804547404 1755651171000000000 0ec938dfe8c0a2d466838df303eef58d 1 compiler_rt/bswap.zig +1971 7804547418 1755651171000000000 f4b500a005ae4486ff3df7110a9e2523 1 compiler_rt/cmp.zig +4845 7804551512 1755651171000000000 8761326b4fa02822928e9a2bf1845ea7 1 compiler_rt/shift.zig +1171 7804551482 1755651171000000000 b64a4252e2958ab85e11cf3e72046c01 1 compiler_rt/negXi2.zig +27737 7804551220 1755651171000000000 0dc9529debd21eeb1908af208d1f2e9e 1 compiler_rt/int.zig +3064 7804551457 1755651171000000000 c4a4e1485c87b5438551c701951d1b90 1 compiler_rt/mulXi3.zig +1113 7804547946 1755651171000000000 8a9686a30bb60ded94cfbc7b0c188192 1 compiler_rt/divti3.zig +770 7804552715 1755651171000000000 6c53a5d81aa4786ec59e8bd320265f7d 1 compiler_rt/udivti3.zig +1380 7804551230 1755651171000000000 e03900eae21e2b320a2e62fc03e5074f 1 compiler_rt/modti3.zig +846 7804552716 1755651171000000000 afc9b4b801628d3040423cf318155f2f 1 compiler_rt/umodti3.zig +671 7804547376 1755651171000000000 a6cfe83f9d8eb6e22dee6dc0ccee3367 1 compiler_rt/absv.zig +311 7804547379 1755651171000000000 9a044dbb5695c2eea3bda231bfeda676 1 compiler_rt/absvsi2.zig +311 7804547377 1755651171000000000 0c0607d153f93dee28f63beeb116cbc1 1 compiler_rt/absvdi2.zig +314 7804547381 1755651171000000000 d826815938d3df68320935b9968c29db 1 compiler_rt/absvti2.zig +1303 7804551490 1755651171000000000 50df1f7234ac1a8d4f2093362c90b93e 1 compiler_rt/negv.zig +874 7804547393 1755651171000000000 02f065d511a9d47115363632c4dbdeda 1 compiler_rt/addvsi3.zig +860 7804552684 1755651171000000000 28391dec7d271786c0a340a5d698d3ba 1 compiler_rt/subvsi3.zig +932 7804552683 1755651171000000000 c20c4bc9d2bbfbdf0b900e7d7218879e 1 compiler_rt/subvdi3.zig +902 7804551479 1755651171000000000 45f09fd05e65513dfd810114991820f4 1 compiler_rt/mulvsi3.zig +1752 7804547387 1755651171000000000 1e067dd191e3750e2eebc9a9891bfe8d 1 compiler_rt/addo.zig +1742 7804552677 1755651171000000000 a6e4dadcd9f88d3c47b48642ea0242d5 1 compiler_rt/subo.zig +2643 7804551471 1755651171000000000 7437cfee5e2a6d47f221d2f163a92242 1 compiler_rt/mulo.zig +6009 7804547956 1755651171000000000 013ab2758ced7bbc2fc6988565eeb6c7 1 compiler_rt/extendf.zig +920 7804547959 1755651171000000000 f422913a85e1e91ef2039ab58547c0fc 1 compiler_rt/extendhfsf2.zig +373 7804547958 1755651171000000000 ed651ccba735e247ddf2016832e06f1c 1 compiler_rt/extendhfdf2.zig +376 7804547960 1755651171000000000 0c74a49a05b638424700546195a373ee 1 compiler_rt/extendhftf2.zig +373 7804547961 1755651171000000000 23b1c51db225608b57400e8118ffa9ec 1 compiler_rt/extendhfxf2.zig +644 7804547962 1755651171000000000 5bd066e81499f866ae53e4e86d5e5c07 1 compiler_rt/extendsfdf2.zig +781 7804547963 1755651171000000000 e52fbda9a494609786f8fcb77d847604 1 compiler_rt/extendsftf2.zig +360 7804547964 1755651171000000000 e942ea8b9c6b17baaeea42c96e99effa 1 compiler_rt/extendsfxf2.zig +781 7804547954 1755651171000000000 87ecde8777ad8ff8ed4dbc9c650f0270 1 compiler_rt/extenddftf2.zig +364 7804547955 1755651171000000000 9f715eab9e2e310deef980aead0e7500 1 compiler_rt/extenddfxf2.zig +1604 7804547965 1755651171000000000 c4862b4d4cfcee360ed2c56a114cbf4a 1 compiler_rt/extendxftf2.zig +8121 7804552694 1755651171000000000 20afe15564559323e44421df48412060 1 compiler_rt/truncf.zig +881 7804552696 1755651171000000000 47d13f34934c26c69eb88e81670d8f85 1 compiler_rt/truncsfhf2.zig +616 7804552692 1755651171000000000 0641d56997ae4f4b5207adc68dc72f3b 1 compiler_rt/truncdfhf2.zig +600 7804552693 1755651171000000000 02da0cc6b32c97637c74cbb10ccb54db 1 compiler_rt/truncdfsf2.zig +356 7804552704 1755651171000000000 3bf820f222640094f3a72a66ffe8198e 1 compiler_rt/truncxfhf2.zig +333 7804552705 1755651171000000000 66119941d376ee0a437b06bd3072d524 1 compiler_rt/truncxfsf2.zig +333 7804552703 1755651171000000000 c13541abc36c28230d412dc5252b693e 1 compiler_rt/truncxfdf2.zig +359 7804552700 1755651171000000000 d8f660a94187293e5a911454282b4029 1 compiler_rt/trunctfhf2.zig +731 7804552701 1755651171000000000 13584c74605e851e6d831a9e0fce9886 1 compiler_rt/trunctfsf2.zig +731 7804552697 1755651171000000000 457c0f6c909aa10450fd884ff88287f9 1 compiler_rt/trunctfdf2.zig +2852 7804552702 1755651171000000000 d8494bd8878af1312bf45635b710a4b1 1 compiler_rt/trunctfxf2.zig +4079 7804551221 1755651171000000000 5a505058b770b465ce081eb6a57e7a43 1 compiler_rt/int_from_float.zig +341 7804548360 1755651171000000000 287cd5239eed800fcc228dfe9a2734d4 1 compiler_rt/fixhfsi.zig +341 7804548358 1755651171000000000 8acd6b1ce769a390c40385d65d7fad51 1 compiler_rt/fixhfdi.zig +713 7804548361 1755651171000000000 f02a5506718df6aec134d680607bf58f 1 compiler_rt/fixhfti.zig +564 7804548359 1755651171000000000 9ae4ea7e25821706c5468c7c2c445448 1 compiler_rt/fixhfei.zig +616 7804548365 1755651171000000000 703dfbffebdc9fddd06b6c8d668e5e6a 1 compiler_rt/fixsfsi.zig +701 7804548363 1755651171000000000 88e7049e069292d16c1ff8720dff21c5 1 compiler_rt/fixsfdi.zig +713 7804548366 1755651171000000000 27665f157ae97b6a905d2c3b3d14b55c 1 compiler_rt/fixsfti.zig +564 7804548364 1755651171000000000 9296a734389623faf0ccbbce95248896 1 compiler_rt/fixsfei.zig +616 7804548356 1755651171000000000 d6c6cfff39408568470a4ce56f20701b 1 compiler_rt/fixdfsi.zig +701 7804548354 1755651171000000000 d37fe214a882924d291912211617b7e0 1 compiler_rt/fixdfdi.zig +713 7804548357 1755651171000000000 acf45affbae83f950121a0e78d1d9d43 1 compiler_rt/fixdfti.zig +564 7804548355 1755651171000000000 475c0ed3637871aa4bdba39fb7ac07c7 1 compiler_rt/fixdfei.zig +736 7804548370 1755651171000000000 9e04b0c9b7e24d0a417e6418967a82bf 1 compiler_rt/fixtfsi.zig +736 7804548367 1755651171000000000 54e8e270c03030539e0b628265ebe138 1 compiler_rt/fixtfdi.zig +867 7804548373 1755651171000000000 159fff04699a850f0877d0d860fc5c23 1 compiler_rt/fixtfti.zig +565 7804548368 1755651171000000000 f3202275d298913c25f0f8dfd3242be8 1 compiler_rt/fixtfei.zig +341 7804548407 1755651171000000000 c5d9b1d68c225613e28b45cb4cec11bc 1 compiler_rt/fixxfsi.zig +341 7804548404 1755651171000000000 87e625ba575a65977f04b534e5fc766d 1 compiler_rt/fixxfdi.zig +713 7804548408 1755651171000000000 66c8929d08870c9d48875898ac51d464 1 compiler_rt/fixxfti.zig +564 7804548406 1755651171000000000 4e4a4e4ac45142bc6c99b298914cc0e4 1 compiler_rt/fixxfei.zig +350 7804548386 1755651171000000000 ba04537148169a4eda9cc74755e9d2b2 1 compiler_rt/fixunshfsi.zig +350 7804548381 1755651171000000000 3f19d12e7ff9198e211b2298b6bd5efc 1 compiler_rt/fixunshfdi.zig +731 7804548387 1755651171000000000 3dc5d5bb0159c254a4dc44defc534d08 1 compiler_rt/fixunshfti.zig +575 7804548385 1755651171000000000 7747207f7d598d23ace14265322b94f9 1 compiler_rt/fixunshfei.zig +628 7804548390 1755651171000000000 57232664ed8c180d0347c1a5b7fb707c 1 compiler_rt/fixunssfsi.zig +713 7804548388 1755651171000000000 7ccb1263e66738a414ca7a9521baf546 1 compiler_rt/fixunssfdi.zig +731 7804548391 1755651171000000000 46aa3b64c89e9e65d2ce377e2fda821b 1 compiler_rt/fixunssfti.zig +575 7804548389 1755651171000000000 38283592b0bac48f035456b4aa28b777 1 compiler_rt/fixunssfei.zig +628 7804548379 1755651171000000000 18ae349f0a3aee101c1024994601c18b 1 compiler_rt/fixunsdfsi.zig +713 7804548374 1755651171000000000 15697c6d14ff144c8a8fbbbfc25b56ac 1 compiler_rt/fixunsdfdi.zig +731 7804548380 1755651171000000000 ccb4ab408cf9f6b931333d2e2281d138 1 compiler_rt/fixunsdfti.zig +575 7804548376 1755651171000000000 0a1cb46013571dde4b1bb4448121ba85 1 compiler_rt/fixunsdfei.zig +754 7804548394 1755651171000000000 717dbc2cecb0b7f0417ed241602b0235 1 compiler_rt/fixunstfsi.zig +754 7804548392 1755651171000000000 e0117ad5626119b0e5de39f22424c41d 1 compiler_rt/fixunstfdi.zig +891 7804548399 1755651171000000000 c4d7fd8a337264713824559441d264bf 1 compiler_rt/fixunstfti.zig +576 7804548393 1755651171000000000 cf926c64f6225389c139b32f9fce285b 1 compiler_rt/fixunstfei.zig +350 7804548402 1755651171000000000 08e70a885b4a61a0e97871cbe7781a36 1 compiler_rt/fixunsxfsi.zig +350 7804548400 1755651171000000000 9df747511c3f54bb2bb63cfce791b071 1 compiler_rt/fixunsxfdi.zig +731 7804548403 1755651171000000000 89cbbf3a56b9124c65e08a4c565b4754 1 compiler_rt/fixunsxfti.zig +575 7804548401 1755651171000000000 9834bffa03e61a47b5f6368b93c2b278 1 compiler_rt/fixunsxfei.zig +4111 7804548409 1755651171000000000 0731ddef2609f045793d30b988a64339 1 compiler_rt/float_from_int.zig +347 7804551174 1755651171000000000 46437c47ae3550f8dfea8ffe706e5cd5 1 compiler_rt/floatsihf.zig +619 7804551175 1755651171000000000 d0709844134d344f649fe5de487e8d43 1 compiler_rt/floatsisf.zig +619 7804551173 1755651171000000000 eb5e4bb9bdf0af3d17044dbab1c19f6a 1 compiler_rt/floatsidf.zig +748 7804551176 1755651171000000000 6acf05da538e6fe3f7a19cdbf9326f26 1 compiler_rt/floatsitf.zig +347 7804551177 1755651171000000000 f364c5d870c6ecf44a5a38ec49aaabe6 1 compiler_rt/floatsixf.zig +347 7804548412 1755651171000000000 2b30fc40286f695404a52daa3020e46d 1 compiler_rt/floatdihf.zig +704 7804548413 1755651171000000000 be61dfcf3ef7f7cb87fdb442491846aa 1 compiler_rt/floatdisf.zig +704 7804548411 1755651171000000000 cf1600427d0617517935eed129801a82 1 compiler_rt/floatdidf.zig +748 7804548414 1755651171000000000 8811790f2053d4000e252e7019110198 1 compiler_rt/floatditf.zig +347 7804548415 1755651171000000000 eb71124e4f62f32423d28d002b3dc4fa 1 compiler_rt/floatdixf.zig +712 7804551179 1755651171000000000 b0cac521d295bf19d575119ed72c24e5 1 compiler_rt/floattihf.zig +712 7804551180 1755651171000000000 72a9275278530696bb432b1a92758b42 1 compiler_rt/floattisf.zig +712 7804551178 1755651171000000000 5dde3f565fe32da11fe052594ee197ee 1 compiler_rt/floattidf.zig +872 7804551182 1755651171000000000 1ae512923174c3e6fa1ba8d65abf6c4f 1 compiler_rt/floattitf.zig +712 7804551183 1755651171000000000 e7550374f92dcebdb11cdef092ffb719 1 compiler_rt/floattixf.zig +569 7804551169 1755651171000000000 6cacec7f1baf3962451f632af2333d15 1 compiler_rt/floateihf.zig +569 7804551170 1755651171000000000 00ff12ec132a6de0ddba566b32f0ce56 1 compiler_rt/floateisf.zig +569 7804551168 1755651171000000000 39f48db5b22c07b8e1ede4f6ad7dfeab 1 compiler_rt/floateidf.zig +571 7804551171 1755651171000000000 558b7faae150629fc02a56c6f795823a 1 compiler_rt/floateitf.zig +569 7804551172 1755651171000000000 3219adecb483c360d12a9f49677362a1 1 compiler_rt/floateixf.zig +357 7804551195 1755651171000000000 00a0cc52e80a5d8768c00c875a2c38fb 1 compiler_rt/floatunsihf.zig +628 7804551196 1755651171000000000 7758994bb35f2593765f89bd87e8f055 1 compiler_rt/floatunsisf.zig +628 7804551194 1755651171000000000 20cada91ea193709f7cdb30fc7e305ed 1 compiler_rt/floatunsidf.zig +761 7804551197 1755651171000000000 c3fa8cad530a016146e93e31095198f1 1 compiler_rt/floatunsitf.zig +353 7804551199 1755651171000000000 182b577da08432924ceb5ee9bd0f2d88 1 compiler_rt/floatunsixf.zig +353 7804551185 1755651171000000000 0e605deb96515a6775375e7e47db3215 1 compiler_rt/floatundihf.zig +713 7804551186 1755651171000000000 e063c2d245ac649a28457da928aa6736 1 compiler_rt/floatundisf.zig +713 7804551184 1755651171000000000 904d6181c4aecb7405c8e4edc325cc82 1 compiler_rt/floatundidf.zig +761 7804551187 1755651171000000000 3e7630bf1c35c7de0a6c3ffd69b2673d 1 compiler_rt/floatunditf.zig +353 7804551188 1755651171000000000 1799170b2737a9e2a28a9808dd0e051a 1 compiler_rt/floatundixf.zig +724 7804551201 1755651171000000000 2df4b1f0edb48dd79ccda95408b91311 1 compiler_rt/floatuntihf.zig +724 7804551202 1755651171000000000 b990cd4c97634e1f3f4261191531b301 1 compiler_rt/floatuntisf.zig +724 7804551200 1755651171000000000 f7a4d0e5f29f41cadf67ddd6f68c29df 1 compiler_rt/floatuntidf.zig +888 7804551203 1755651171000000000 db22f0e3984446069375f2cae2a9aca7 1 compiler_rt/floatuntitf.zig +724 7804551204 1755651171000000000 bc561095bbe802fe90354de9e376c896 1 compiler_rt/floatuntixf.zig +577 7804551190 1755651171000000000 588ff37c9a79b9efee8d8ab27866c544 1 compiler_rt/floatuneihf.zig +577 7804551191 1755651171000000000 83c4fadef25daa676e2b17560f7b5b9f 1 compiler_rt/floatuneisf.zig +577 7804551189 1755651171000000000 9ab7e41efc150cfc29183a68faa98145 1 compiler_rt/floatuneidf.zig +579 7804551192 1755651171000000000 c63445cffc5e5f137b97a50c2bb9ef88 1 compiler_rt/floatuneitf.zig +577 7804551193 1755651171000000000 36f8e586a4b887c1b1b1537a5a28ae74 1 compiler_rt/floatuneixf.zig +4582 7804547911 1755651171000000000 e5686ffdd46c3d4d1c4485eb9eef4475 1 compiler_rt/comparef.zig +2267 7804547421 1755651171000000000 f21670514136306b5c179b4ee414d001 1 compiler_rt/cmphf2.zig +3161 7804547422 1755651171000000000 2bb653afb77db3d5045cbb9a02ba3d6f 1 compiler_rt/cmpsf2.zig +3161 7804547419 1755651171000000000 5ff781811d3f999df43ff5a63d8e0b2f 1 compiler_rt/cmpdf2.zig +4739 7804547904 1755651171000000000 13d86b526247d5092d8aacf0b67bdcf1 1 compiler_rt/cmptf2.zig +2248 7804547906 1755651171000000000 c47b1b506563f516dd85df37da1ca80d 1 compiler_rt/cmpxf2.zig +341 7804552718 1755651171000000000 2ed4e26e2ea3869e810a2840aa44890c 1 compiler_rt/unordhf2.zig +634 7804552719 1755651171000000000 ab97f41ff7e85578831672d29873bb7c 1 compiler_rt/unordsf2.zig +634 7804552717 1755651171000000000 8fcd7331877db9156a9489d458816d1a 1 compiler_rt/unorddf2.zig +341 7804552721 1755651171000000000 c6765ab1f830c13ccdf800de46e1d4c3 1 compiler_rt/unordxf2.zig +656 7804552720 1755651171000000000 2a6c721c57e5b4fc4d03f1414d3bfa0c 1 compiler_rt/unordtf2.zig +960 7804551215 1755651171000000000 44f070ee85c4299b7b861a8753e20983 1 compiler_rt/gehf2.zig +1567 7804551216 1755651171000000000 d83ee65d70e22642ca348d28af9e8b1d 1 compiler_rt/gesf2.zig +1567 7804551212 1755651171000000000 f7babfa2824209ae274b4f7f048979ff 1 compiler_rt/gedf2.zig +531 7804551218 1755651171000000000 825137d9239fe8820abd067fa358ff6c 1 compiler_rt/gexf2.zig +1375 7804551217 1755651171000000000 baf5038daac3654c38c49861c12af8f8 1 compiler_rt/getf2.zig +6348 7804547384 1755651171000000000 9d6fb22665d5ae546ff48bce14f4265e 1 compiler_rt/addf3.zig +319 7804547386 1755651171000000000 522a47928eb441889cd2d8293ee58f93 1 compiler_rt/addhf3.zig +594 7804547391 1755651171000000000 98c81cd3c52b093c912ead4cc50ee463 1 compiler_rt/addsf3.zig +594 7804547383 1755651171000000000 2fd1f70cd54ab97c68acda6ccd8698ca 1 compiler_rt/adddf3.zig +725 7804547392 1755651171000000000 37b20d2aff3bdc9e0e864c4dd0285ce2 1 compiler_rt/addtf3.zig +323 7804547394 1755651171000000000 3de55ee7141ae65ffda2d57872f49058 1 compiler_rt/addxf3.zig +406 7804552675 1755651171000000000 974a08d8b377c7154ee50e645c4aa5f1 1 compiler_rt/subhf3.zig +735 7804552681 1755651171000000000 c6bad960b48197993e5154abc0dad73e 1 compiler_rt/subsf3.zig +735 7804552674 1755651171000000000 932c462bb7a1ebd827a8601a1a673d8f 1 compiler_rt/subdf3.zig +884 7804552682 1755651171000000000 68c91ec93f437c6420395ef3a23d922a 1 compiler_rt/subtf3.zig +399 7804552685 1755651171000000000 78f78d004278fcfad7128556fb169afb 1 compiler_rt/subxf3.zig +8398 7804551467 1755651171000000000 2e26880d97fb35e9bd4cc1993465b0cb 1 compiler_rt/mulf3.zig +323 7804551470 1755651171000000000 da7bee33a5dc12783e6265082c6339c5 1 compiler_rt/mulhf3.zig +598 7804551476 1755651171000000000 fee4abf27cb742c17acbc579ce4181c9 1 compiler_rt/mulsf3.zig +598 7804551466 1755651171000000000 a3c5a4d1d76996c6a8862bc7edee60e9 1 compiler_rt/muldf3.zig +737 7804551478 1755651171000000000 05e662af04b7c0553caed681261620bc 1 compiler_rt/multf3.zig +323 7804551481 1755651171000000000 20b9631d337fdb552805ef976ffdc51e 1 compiler_rt/mulxf3.zig +344 7804547933 1755651171000000000 c658197861ba0fe65f6c4da66921da72 1 compiler_rt/divhf3.zig +8574 7804547941 1755651171000000000 57deaddafd7a8db15df6bbeca7d2d850 1 compiler_rt/divsf3.zig +9366 7804547926 1755651171000000000 3f0a4a77ece42e5c0a92b591f8219814 1 compiler_rt/divdf3.zig +8669 7804547949 1755651171000000000 9c07b341767fa995dedd55167cc3e222 1 compiler_rt/divxf3.zig +9925 7804547944 1755651171000000000 28531f064bbb7a862fb99a6dd7127380 1 compiler_rt/divtf3.zig +265 7804551485 1755651171000000000 ff779eb9e3281d0f8136f5b61b8e6515 1 compiler_rt/neghf2.zig +530 7804551486 1755651171000000000 e570a93d326095aad9dfa0af89f5e12d 1 compiler_rt/negsf2.zig +530 7804551483 1755651171000000000 239867284b810ba2b4b7139ff96a22c0 1 compiler_rt/negdf2.zig +409 7804551488 1755651171000000000 68cda8c4538ebcdadbb16771ebed9613 1 compiler_rt/negtf2.zig +265 7804551494 1755651171000000000 e6f608fbc42d09928e6d353d3e4ae05e 1 compiler_rt/negxf2.zig +2072 7804551506 1755651171000000000 73e4d664a217ad2fe999244a64307073 1 compiler_rt/powiXf2.zig +2275 7804551460 1755651171000000000 31c049fe940585ddd225b0c4f49de0ab 1 compiler_rt/mulc3.zig +425 7804551469 1755651171000000000 9057d1c7c2b8e98f5c09215baab464e3 1 compiler_rt/mulhc3.zig +425 7804551475 1755651171000000000 46a186b40dbf8b1a78fd7664e825477d 1 compiler_rt/mulsc3.zig +425 7804551464 1755651171000000000 ae9761607983803a875dc03e2bcf93b2 1 compiler_rt/muldc3.zig +425 7804551480 1755651171000000000 241de1bd5170ea794fe6a65e3ca1c4b6 1 compiler_rt/mulxc3.zig +581 7804551477 1755651171000000000 8ff2e7539ccf94a8ea6a7d0fb870f8ac 1 compiler_rt/multc3.zig +2280 7804547921 1755651171000000000 9e6aaeda713b6cd43eca1180606dc9f8 1 compiler_rt/divc3.zig +434 7804547928 1755651171000000000 99234ee0594362f25d0034479872a24d 1 compiler_rt/divhc3.zig +434 7804547939 1755651171000000000 19324ba1cf08e607b54db47c52783c60 1 compiler_rt/divsc3.zig +434 7804547924 1755651171000000000 a5c0557ad47ea2daea69c331226b6bb8 1 compiler_rt/divdc3.zig +434 7804547948 1755651171000000000 0ba3ba63c22ba9609413264f8e142986 1 compiler_rt/divxc3.zig +590 7804547943 1755651171000000000 b09a8555aa3985adc8de9d9dbbaeaab0 1 compiler_rt/divtc3.zig +5139 7804547413 1755651171000000000 3377d5bdbc89549229fcc2bdded00385 1 compiler_rt/ceil.zig +5691 7804547914 1755651171000000000 4e53be9b20a311a96eb63bafe37225d8 1 compiler_rt/cos.zig +11677 7804547952 1755651171000000000 c4da63d897aa5d3cef3988faddf0733e 1 compiler_rt/exp.zig +20924 7804547953 1755651171000000000 8444963967b3c617eebec50d6b319393 1 compiler_rt/exp2.zig +1913 7804547966 1755651171000000000 d639f3899db4d8abd8eb6de3c9db692b 1 compiler_rt/fabs.zig +6290 7804551205 1755651171000000000 f78026c2945813b1868334b3f8d6b1ea 1 compiler_rt/floor.zig +11575 7804551206 1755651171000000000 acbf337ea57443d50122200a70477bd3 1 compiler_rt/fma.zig +2867 7804551207 1755651171000000000 53832890224a36ee564f78656fad8acb 1 compiler_rt/fmax.zig +2869 7804551208 1755651171000000000 16d3b98ffc9e7622d085e6ec340bef8b 1 compiler_rt/fmin.zig +12218 7804551209 1755651171000000000 6096cb43202506289c56b29536a3c88b 1 compiler_rt/fmod.zig +8304 7804551223 1755651171000000000 4a2ae209edc8dde5555884addb0c3270 1 compiler_rt/log.zig +9499 7804551224 1755651171000000000 192e6cb083dc2203281a462a1129dc3e 1 compiler_rt/log10.zig +8927 7804551225 1755651171000000000 788bd8e755b980f4765163024433bbef 1 compiler_rt/log2.zig +5307 7804551511 1755651171000000000 64efbcc2e1df4cd325e1f4f05a9b43b6 1 compiler_rt/round.zig +6783 7804551514 1755651171000000000 46b58824ce56ea0819341b2de4e4ce88 1 compiler_rt/sin.zig +8779 7804551515 1755651171000000000 3372bf45f142a4244845a7d576e8a739 1 compiler_rt/sincos.zig +8445 7804551517 1755651171000000000 834a20db0b154a40177782adbf1d021c 1 compiler_rt/sqrt.zig +6175 7804552686 1755651171000000000 38bdd1e5397ae3ef6734324ee90f2cd8 1 compiler_rt/tan.zig +4509 7804552691 1755651171000000000 452e79786bcf746a89464e0b468a1772 1 compiler_rt/trunc.zig +2047 7804547936 1755651171000000000 1b5ba254fdfc08708a375c730450065e 1 compiler_rt/divmodei4.zig +5345 7804552711 1755651171000000000 ce988d5b59fa957acec0cc0f5514f027 1 compiler_rt/udivmodei4.zig +886 7804552713 1755651171000000000 3884d7d5d17d10b6c390591f14760c21 1 compiler_rt/udivmodti4.zig +2988 7804551495 1755651171000000000 727f94ca1d77099453ad061b28f9f45b 1 compiler_rt/os_version_check.zig +12571 7804547951 1755651171000000000 f2228bdf0cb635f1b1b962a3db633e85 1 compiler_rt/emutls.zig +11129 7804547395 1755651171000000000 48b4362e028a3e1634d5ca553bd4f739 1 compiler_rt/arm.zig +2563 7804547397 1755651171000000000 667b1a412a0d66f8b44b2a8e8e4e16e2 1 compiler_rt/aulldiv.zig +2618 7804547398 1755651171000000000 420aa19734f8e183daf736d09d96e8e9 1 compiler_rt/aullrem.zig +7746 7804547414 1755651171000000000 65f560b740acc191d870c5c89599c99a 1 compiler_rt/clear_cache.zig +45809 7804551219 1755651171000000000 8aceb9f3653d891b582dbd9b55b0d02a 1 compiler_rt/hexagon.zig +26388 7804547396 1755651171000000000 2dbf62f073b314f8249867dbbbfb5589 1 compiler_rt/atomics.zig +9539 7804552672 1755651171000000000 1d35c260060522cd892607322c1b0e17 1 compiler_rt/stack_probe.zig +79084 7804547375 1755651171000000000 bda0e04701fa77ae568c29186ee9ccfb 1 compiler_rt/aarch64_outline_atomics.zig +6452 7804551227 1755651171000000000 4cf074ce1df0bab8aba60356cc8ab857 1 compiler_rt/memcpy.zig +876 7804551229 1755651171000000000 13a474bc83ea39da1548064a0ec84fe6 1 compiler_rt/memset.zig +7246 7804551228 1755651171000000000 ab21f482b4ceecf867dcaf6370424fd5 1 compiler_rt/memmove.zig +931 7804551226 1755651171000000000 ab9203076a9f7358651a1ac57a2238e6 1 compiler_rt/memcmp.zig +874 7804547399 1755651171000000000 964d18da8969575344227310559069cf 1 compiler_rt/bcmp.zig +4524 7804551519 1755651171000000000 3e80fe1b407f6f691b38a2b042fb4b64 1 compiler_rt/ssp.zig +8052 1890351183 1755651176000000000 bbc3cbd53ca9eaab481a4b2874506c59 1 std/Build/Cache/Path.zig +2142 1890351182 1755651176000000000 fe57a392618de045bf46b476d4e9b36f 1 std/Build/Cache/Directory.zig +37958 1890351181 1755651176000000000 09f6c6d5c5a3e85759082f1ad46ebffa 1 std/Build/Cache/DepTokenizer.zig +2901 2158145397 1755651176000000000 d277c72d570fa923fd437605bbd83e30 1 std/Build/Step/CheckFile.zig +117426 2158145398 1755651176000000000 f327f9fe4a8649cc483e714c56bdafff 1 std/Build/Step/CheckObject.zig +41853 2158150016 1755651176000000000 b089407ebc9e35a98f96dcfafbea622a 1 std/Build/Step/ConfigHeader.zig +831 2158150017 1755651176000000000 0f223ee68995072c4beb7fd3ae600b02 1 std/Build/Step/Fail.zig +2711 2158150018 1755651176000000000 72715636b21818d37288de283148c101 1 std/Build/Step/Fmt.zig +7843 2158150019 1755651176000000000 b720790bf6e89535660d8996075ceed1 1 std/Build/Step/InstallArtifact.zig +4431 2158150020 1755651176000000000 d1f0707c6afc3c9202b9d6dd0c114338 1 std/Build/Step/InstallDir.zig +1460 2158150021 1755651176000000000 0040eb5b0836e8fa2056b8e33d66b4dd 1 std/Build/Step/InstallFile.zig +8154 2158150022 1755651176000000000 fdd933a4e6d14f259812199ba337c9f2 1 std/Build/Step/ObjCopy.zig +86953 2158145407 1755651176000000000 e814ef2854d0025d3c1a64913f7cbbf2 1 std/Build/Step/Compile.zig +23856 2158150023 1755651176000000000 04314b9ec6c4719520c8922f20479b10 1 std/Build/Step/Options.zig +1443 2158150025 1755651176000000000 ad5ec7793142fc110b85e04588c7be90 1 std/Build/Step/RemoveDir.zig +73144 2158150026 1755651176000000000 defa27d5c5918845503abf3bee647924 1 std/Build/Step/Run.zig +7344 2158150027 1755651176000000000 1a07c4e3f9436bca621e0ab521e389b5 1 std/Build/Step/TranslateC.zig +13184 2158150029 1755651176000000000 d3b8a19eb1eb2d1fa857b99bfea07950 1 std/Build/Step/WriteFile.zig +4247 2158150028 1755651176000000000 78c06c4c05a1846f4e7d6ff9c0da4068 1 std/Build/Step/UpdateSourceFiles.zig +22825 2424035803 1755651176000000000 e4bcf69644dd1afc10772570851bf6db 1 std/Build/Watch/FsEvents.zig +1731 2969763820 1755651176000000000 daa1d02b14c40a08f9a23bf20fa27ab2 1 std/Io/Reader/Limited.zig +0 2969763845 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/Io/Reader/test.zig +2533 4036588555 1755651176000000000 e0af5510611c7c2688093972c6ace145 1 std/Thread/Mutex/Recursive.zig +11928 5117700534 1755651176000000000 7a1e10e0d0e9210d2757e410d8473def 1 std/compress/flate/Compress.zig +47768 5117700536 1755651176000000000 d87a77c2d3a950f7fb4503b2e91beb66 1 std/compress/flate/Decompress.zig +18914 5117700537 1755651176000000000 c9cb33e59ca13018183045e0a1d980a9 1 std/compress/flate/HuffmanEncoder.zig +11871 5920176865 1755651176000000000 1a80b6a0f5b379bcaa6324ad497a62d9 1 std/compress/lzma/decode.zig +0 5920176866 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/lzma/test.zig +3774 5920176867 1755651176000000000 ba9dc0a0f8124583244e2f0c677410fc 1 std/compress/lzma/vec2d.zig +4704 6729771881 1755651176000000000 34dab553e7d44c4c18351939467c745c 1 std/compress/lzma2/decode.zig +7157 7261586167 1755651176000000000 a0e5aefb8ceae6798c4b2fe9540cefee 1 std/compress/xz/block.zig +0 7261586168 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/compress/xz/test.zig +78531 7804560029 1755651176000000000 d44d8434a6ff685d9cec10bd257151c5 1 std/compress/zstd/Decompress.zig +0 8072380958 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/test.zig +22223 9137195870 1755651176000000000 7e23bb5bcd64c4725f7c071dd3496b74 1 std/crypto/aes/aesni.zig +22711 9137195871 1755651176000000000 8e77a640bfd456ac5363ff36bd93c4ba 1 std/crypto/aes/armcrypto.zig +33347 9137195872 1755651176000000000 7de9cecbcab3c869e16f2fbaf7076a48 1 std/crypto/aes/soft.zig +14574 8345434069 1755651176000000000 b552b509d9ec611014aa027c881ac91c 1 std/crypto/25519/field.zig +33703 8345434071 1755651176000000000 d4b52682012c0195eb1aa7312d067798 1 std/crypto/25519/scalar.zig +338 10758886324 1755651176000000000 433b788abb384ec7e4c3641754e6dde9 1 std/crypto/pcurves/p256/field.zig +7421 10758886333 1755651176000000000 00494b8811c2d7df07fff5d27198954c 1 std/crypto/pcurves/p256/scalar.zig +5656 11552451177 1755651176000000000 05c95744a349b07172e4c400b1e28cc1 1 std/crypto/pcurves/tests/p256.zig +376 11017003009 1755651176000000000 69a49ff5f537dcd2044702ac14b6891c 1 std/crypto/pcurves/p384/field.zig +6669 11017003016 1755651176000000000 7aee4435d80a972d5bcff185b164ee8e 1 std/crypto/pcurves/p384/scalar.zig +6707 11552451178 1755651176000000000 3f1e1e56980e64672ccd1fba3a631951 1 std/crypto/pcurves/tests/p384.zig +343 11288617743 1755651176000000000 738b22249e1d3a4c001765286bc82756 1 std/crypto/pcurves/secp256k1/field.zig +7426 11288617744 1755651176000000000 1b99358655e3f9a938c25cb631d52e50 1 std/crypto/pcurves/secp256k1/scalar.zig +6029 11552451179 1755651176000000000 4a9ce792ab6709c6ebf9e7dbf5e30590 1 std/crypto/pcurves/tests/secp256k1.zig +11649 9407958267 1755651176000000000 884bf9edd77ebad5200670e26c236280 1 std/crypto/codecs/asn1.zig +17997 9407959248 1755651176000000000 7ea1a954927b43ca5ab7f95c3becd401 1 std/crypto/codecs/base64_hex_ct.zig +80831 11826519934 1755651176000000000 f151081149e53c1078be673dc2116ec2 1 std/crypto/tls/Client.zig +12470 8603041826 1755651176000000000 9c92810e5147e8de0f25e1658fa23a75 1 std/crypto/Certificate/Bundle.zig +71838 12363111571 1755651176000000000 5c3513456ba79222f02ca36a90963776 1 std/debug/Dwarf/expression.zig +17609 12363111569 1755651176000000000 f39611d52911878891dbef3fba794ac1 1 std/debug/Dwarf/abi.zig +10007 12363111570 1755651176000000000 46471a00c4eea2acab55cc6337899adc 1 std/debug/Dwarf/call_frame.zig +9426 13433097429 1755651176000000000 19fe74e26814be7f5083c3d8b5a0983e 1 std/fmt/parse_float/parse.zig +2950 13433097426 1755651176000000000 e2f6cedde735fdaf086b7e0efdb66505 1 std/fmt/parse_float/convert_hex.zig +5401 13433097425 1755651176000000000 cbeba905313f9b6c917fb231993989fe 1 std/fmt/parse_float/convert_fast.zig +48543 13433097424 1755651176000000000 82c419f8469193cf67852d0ac4c65f55 1 std/fmt/parse_float/convert_eisel_lemire.zig +4586 13433097427 1755651176000000000 2562e4c50c6403023d508a0c7e1f15f0 1 std/fmt/parse_float/convert_slow.zig +3506 14510404238 1755651176000000000 9428b7df45d5b928d9c004b955588fe0 1 std/hash/crc/impl.zig +0 14510404239 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/hash/crc/test.zig +2075 14239609767 1755651176000000000 5910881f138d791cfa09dd89cc12fc40 1 std/hash/verify.zig +237477 1890351196 1755651176000000000 67644436e9162e79563b60f574b36f99 1 std/os/windows/ntstatus.zig +0 15317222682 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/dynamic_test.zig +0 15317222685 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/hashmap_test.zig +0 15317222686 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/scanner_test.zig +0 15317222688 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/json/static_test.zig +995 15580753240 1755651176000000000 59077bc2784a5df334de08609b4c2a55 1 std/math/expo2.zig +452 16120016982 1755651176000000000 ce633e6b665f3caba98995a3f146d7c7 1 std/math/complex/abs.zig +678 16120016984 1755651176000000000 9dd2ece0bd4c6366c4a3cb5bf7b3db17 1 std/math/complex/acosh.zig +608 16120016983 1755651176000000000 e3a7d70f219edead2e32e66a9476a469 1 std/math/complex/acos.zig +458 16120016988 1755651176000000000 2fea305ef49ff29fdd688d2f7342051d 1 std/math/complex/arg.zig +641 16120023930 1755651176000000000 59bed4da0e5763cbf2a3e08ec4bc9c6c 1 std/math/complex/asinh.zig +750 16120023929 1755651176000000000 26f02f5afc54b9ec7673ddd6d0fcc3a9 1 std/math/complex/asin.zig +645 16120023933 1755651176000000000 adf7751d27453fed0d4977a2dc50e85e 1 std/math/complex/atanh.zig +2527 16120023931 1755651176000000000 2a909954adb7520e1eb158124c280ca2 1 std/math/complex/atan.zig +484 16120023955 1755651176000000000 a9e61e0f7280deab3d077856af6ca8d9 1 std/math/complex/conj.zig +5818 16120023957 1755651176000000000 3b53a3d1a1285447f00cc90f422cb7b1 1 std/math/complex/cosh.zig +577 16120023956 1755651176000000000 26877517b7d9d620e841272fd8ea3661 1 std/math/complex/cos.zig +4899 16120023958 1755651176000000000 4f31c5e9d921097840da690cc0324595 1 std/math/complex/exp.zig +620 16120023960 1755651176000000000 4e4bb03cdbb57072938d447952587286 1 std/math/complex/log.zig +608 16120023961 1755651176000000000 1258f2af84237de74fd033b6776798f2 1 std/math/complex/pow.zig +628 16120023962 1755651176000000000 b5f2e65410101f915fb75fa5712c2fd4 1 std/math/complex/proj.zig +5363 16120023964 1755651176000000000 89568cfbf7f8196aafffbd55ea670070 1 std/math/complex/sinh.zig +620 16120023963 1755651176000000000 4aade0cdfc8ac82b062412f5566aec6c 1 std/math/complex/sin.zig +4249 16120023965 1755651176000000000 0aeb21db75d92940ddcb1491d2f0445e 1 std/math/complex/sqrt.zig +3847 16120023967 1755651176000000000 98009ed972f9f5fcb177d10a345456e1 1 std/math/complex/tanh.zig +626 16120023966 1755651176000000000 ac4f4ba1ea51c6a8f2101a7bdf3b0d7c 1 std/math/complex/tan.zig +175931 15855759075 1755651176000000000 cb0553d36d2eb461b87312f4e15a99e8 1 std/math/big/int.zig +3762 281042739 1755651176000000000 2fd0c246f4a8e9ba6ccef5ff7cf0ccfe 1 std/os/linux/vdso.zig +0 281042736 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/linux/test.zig +13117 281042740 1755651176000000000 71b9a59db11f287d3253e001a21a4028 1 std/os/linux/x86.zig +13489 281042741 1755651176000000000 958bec870d653d2a62890b93b463512b 1 std/os/linux/x86_64.zig +6720 281042628 1755651176000000000 186c59f27378f16795ba8c8611b5ed95 1 std/os/linux/aarch64.zig +7970 281042629 1755651176000000000 0f4c26b73e6698859b53f9b715f3d611 1 std/os/linux/arm.zig +6097 281042638 1755651176000000000 a5e8b96435a27d99de81726a3b93e16d 1 std/os/linux/hexagon.zig +6540 281042722 1755651176000000000 9b9c64b903ecbb48c7b6c661455ef036 1 std/os/linux/riscv32.zig +6541 281042725 1755651176000000000 b833f96b582cdd1676bf2bda0ac01e90 1 std/os/linux/riscv64.zig +10847 281042730 1755651176000000000 0c589fb5ebf73b4b5662a31d45d76c75 1 std/os/linux/sparc64.zig +7941 281042643 1755651176000000000 7e1c50fd483adea99b19665fe38b2f72 1 std/os/linux/loongarch64.zig +6634 281042646 1755651176000000000 ad9a26a1c9c2d04c67203fdcf578c9f1 1 std/os/linux/m68k.zig +11254 281042650 1755651176000000000 69fd31ffc9e830951f1293a9ee9cfb72 1 std/os/linux/mips.zig +10635 281042651 1755651176000000000 ff911a8bf83253a4b85221f8a5f72189 1 std/os/linux/mips64.zig +8845 281042652 1755651176000000000 bd51d61d7005f2954e793de4ea335f5c 1 std/os/linux/powerpc.zig +8837 281042653 1755651176000000000 c1b8858b561db0b710d1f0d729e836e5 1 std/os/linux/powerpc64.zig +7186 281042727 1755651176000000000 29692c77734256a2fc877fcec567d9a0 1 std/os/linux/s390x.zig +4390 281042737 1755651176000000000 9e872767168dbe4e563e8ca82d35d42e 1 std/os/linux/thumb.zig +18676 281042738 1755651176000000000 79cbf225d0993e9837e569f3e09e0314 1 std/os/linux/tls.zig +46056 281042630 1755651176000000000 fe2f435321fb0e6eb75eeb3ca30c93b4 1 std/os/linux/bpf.zig +1297 281042641 1755651176000000000 daac8c407161fbb4bb996238aee46635 1 std/os/linux/ioctl.zig +8427 281042729 1755651176000000000 b845f84a2ea6f5532d8ffc78297dafed 1 std/os/linux/seccomp.zig +183126 281042735 1755651176000000000 fd2ae47bc58a4f876d2cb8205d4888ea 1 std/os/linux/syscalls.zig +19909 281042640 1755651176000000000 a1611786e4dda806effaf2301a5cf0ae 1 std/os/linux/io_uring_sqe.zig +173427 281042627 1755651176000000000 46b12a066a5e37b8a275732fa67d5529 1 std/os/linux/IoUring.zig +2126 816974655 1755651176000000000 d6f497f7c3ede56b9dd8eb2cae54c566 1 std/os/plan9/x86_64.zig +2368 1085913223 1755651176000000000 ef3b4d934ff0fc89d4b9c013f363e19f 1 std/os/uefi/protocol.zig +37311 1085912253 1755651176000000000 a67c5d40f56e40984ce32fba49cfa0bc 1 std/os/uefi/device_path.zig +2078 1085912254 1755651176000000000 13b23e26af6b210b16c77d73b956e867 1 std/os/uefi/hii.zig +10107 1085913224 1755651176000000000 e4c1fe82be2b68376749dbb625002706 1 std/os/uefi/status.zig +10739 1085913225 1755651176000000000 627c77aa253ea0232b674a9a41a09650 1 std/os/uefi/tables.zig +3906 1085912255 1755651176000000000 5c4587a7b4f3370e256119bdab607b4a 1 std/os/uefi/pool_allocator.zig +0 1890351198 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/os/windows/test.zig +2144 1890351185 1755651176000000000 25e202ff708858513ae7203c6f1043cf 1 std/os/windows/advapi32.zig +19302 1890351187 1755651176000000000 4166d597fb4bd529b9418c145598c4d4 1 std/os/windows/kernel32.zig +12119 1890351195 1755651176000000000 90384510a1298bc4a80542f39d2cc399 1 std/os/windows/ntdll.zig +77480 1890353313 1755651176000000000 d85c6950ac08847c1673726e62f4953f 1 std/os/windows/ws2_32.zig +850 1890351186 1755651176000000000 058a13f92bf4ee16e52beb60bf057dc9 1 std/os/windows/crypt32.zig +20117 1890351189 1755651176000000000 696b67a75a9a665eb00672233edffbb2 1 std/os/windows/nls.zig +130227 1890353312 1755651176000000000 a0ee928ca20f189c11667764ca96b243 1 std/os/windows/win32error.zig +3697 1890351188 1755651176000000000 f5f54b1cf522ff663148d3c96268d459 1 std/os/windows/lang.zig +8449 1890351197 1755651176000000000 3c42a760ba486f9b9455bd95d20d2e0b 1 std/os/windows/sublang.zig +135650 5117700805 1755651176000000000 a31eb8d48506c25579555c4efd1a9faf 1 std/zig/Parse.zig +142067 5382995573 1755651176000000000 c11d0a46b8fb10db9e0b6b86306a47a4 1 std/zig/Ast/Render.zig +8409 5920176868 1755651176000000000 05fc398cc2e6071c55b8a2a2fbc73720 1 std/zig/system/NativePaths.zig +12217 5920176875 1755651176000000000 431d341ca0da87ee822118293b8def7c 1 std/zig/system/windows.zig +2441 5920176872 1755651176000000000 35ecedf1e23a5fca314cc4de0bb8b2f9 1 std/zig/system/darwin.zig +15304 5920176874 1755651176000000000 580566ad2ff69b205932568d7672a3e9 1 std/zig/system/linux.zig +26641 5920176876 1755651176000000000 1653caac0003b8e8b9474f11b36c5a76 1 std/zig/system/x86.zig +19758 5649753788 1755651176000000000 3952091e9a90d59dd1ba998c365bce09 1 std/zig/llvm/BitcodeReader.zig +17956 5649753813 1755651176000000000 fc195102d6af02ed5678e5f0aa8b8390 1 std/zig/llvm/bitcode_writer.zig +592181 5649753807 1755651176000000000 eb4547393bea04ef1cf32079beef364a 1 std/zig/llvm/Builder.zig +0 7804547416 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzsi2_test.zig +0 7804547415 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzdi2_test.zig +0 7804547417 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/clzti2_test.zig +0 7804547919 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzsi2_test.zig +0 7804547918 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzdi2_test.zig +0 7804547920 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ctzti2_test.zig +0 7804548352 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffssi2_test.zig +0 7804547967 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsdi2_test.zig +0 7804548353 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ffsti2_test.zig +0 7804551498 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritysi2_test.zig +0 7804551497 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/paritydi2_test.zig +0 7804551499 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/parityti2_test.zig +0 7804551504 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountsi2_test.zig +0 7804551503 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountdi2_test.zig +0 7804551505 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/popcountti2_test.zig +0 7804547402 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversesi2_test.zig +0 7804547401 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreversedi2_test.zig +0 7804547403 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bitreverseti2_test.zig +0 7804547408 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapsi2_test.zig +0 7804547406 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapdi2_test.zig +0 7804547411 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/bswapti2_test.zig +0 7804547423 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpsi2_test.zig +0 7804547420 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpdi2_test.zig +0 7804547905 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/cmpti2_test.zig +0 7804552707 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpsi2_test.zig +0 7804552706 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpdi2_test.zig +0 7804552708 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/ucmpti2_test.zig +0 7804551513 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/shift_test.zig +0 7804551487 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negsi2_test.zig +0 7804551484 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negdi2_test.zig +0 7804551489 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negti2_test.zig +4285 7804552709 1755651171000000000 3a706e00becb790763e2c63d183e345f 1 compiler_rt/udivmod.zig +0 7804552710 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmoddi4_test.zig +0 7804551459 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulXi3_test.zig +0 7804547947 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divti3_test.zig +0 7804551456 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/modti3_test.zig +0 7804547380 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvsi2_test.zig +0 7804547378 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvdi2_test.zig +0 7804547382 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/absvti2_test.zig +0 7804551492 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvsi2_test.zig +0 7804551491 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvdi2_test.zig +0 7804551493 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/negvti2_test.zig +0 7804547389 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addosi4_test.zig +0 7804547388 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addodi4_test.zig +0 7804547390 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addoti4_test.zig +0 7804552679 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subosi4_test.zig +0 7804552678 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/subodi4_test.zig +0 7804552680 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/suboti4_test.zig +0 7804551473 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulosi4_test.zig +0 7804551472 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulodi4_test.zig +0 7804551474 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/muloti4_test.zig +0 7804547957 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/extendf_test.zig +0 7804552695 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/truncf_test.zig +0 7804551222 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/int_from_float_test.zig +0 7804548410 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/float_from_int_test.zig +0 7804547913 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparesf2_test.zig +0 7804547910 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/comparedf2_test.zig +0 7804547385 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/addf3_test.zig +0 7804551468 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/mulf3_test.zig +0 7804547942 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divsf3_test.zig +0 7804547927 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divdf3_test.zig +0 7804547950 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divxf3_test.zig +0 7804547945 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/divtf3_test.zig +0 7804551507 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/powiXf2_test.zig +11743 7804552689 1755651171000000000 20b5273f511a6677b3f49f750fcaf786 1 compiler_rt/trig.zig +6045 7804551508 1755651171000000000 18b634df64d66eb7c240db46b32eea60 1 compiler_rt/rem_pio2.zig +2247 7804551510 1755651171000000000 2337e183931c970621500018ffe636df 1 compiler_rt/rem_pio2f.zig +0 7804551210 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodq_test.zig +0 7804551211 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/fmodx_test.zig +0 7804552714 1755651171000000000 82547a8dd7f3efb3f077622e34876868 1 compiler_rt/udivmodti4_test.zig +13531 5117700539 1755651176000000000 479ed8dfe695d0a2eea06b674b3ed0da 1 std/compress/flate/Token.zig +20508 5117700533 1755651176000000000 453a65b5b55858b073099208c4e07ca8 1 std/compress/flate/BlockWriter.zig +3588 5117700538 1755651176000000000 5a3d7acaca811bf6b6e62a58645eddae 1 std/compress/flate/Lookup.zig +5945 6190427818 1755651176000000000 937d6b84c08ac71922db69ef4603ee39 1 std/compress/lzma/decode/lzbuffer.zig +4994 6190427819 1755651176000000000 159872c0de3e30f43567e5ed7666125d 1 std/compress/lzma/decode/rangecoder.zig +12650 10483472282 1755651176000000000 56befc361ef070a7bd0a2d3c1dc46994 1 std/crypto/pcurves/common.zig +67958 10758886325 1755651176000000000 0f2daafefad01026d6796eec68d65d2e 1 std/crypto/pcurves/p256/p256_64.zig +76136 10758886332 1755651176000000000 8ec5f177ef28f7a2a0ec8d103665db00 1 std/crypto/pcurves/p256/p256_scalar_64.zig +134511 11017003012 1755651176000000000 2e0dda7c40794e981dd2d2471c4776a5 1 std/crypto/pcurves/p384/p384_64.zig +137291 11017003014 1755651176000000000 81eb087d46e6c49907ae0c02d3230828 1 std/crypto/pcurves/p384/p384_scalar_64.zig +73280 11288617745 1755651176000000000 c871f98dad15c7a8c29be9ccefa4b181 1 std/crypto/pcurves/secp256k1/secp256k1_64.zig +75859 11288617746 1755651176000000000 e29275bdb0eb931fc383e7f2f5ded944 1 std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig +1807 9674508949 1755651176000000000 f47429307ac0920ff18758ce86074549 1 std/crypto/codecs/asn1/der.zig +7178 9674508948 1755651176000000000 6d4dab023a981a670d308b0b120c9077 1 std/crypto/codecs/asn1/Oid.zig +0 9674508951 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/crypto/codecs/asn1/test.zig +3892 8873237885 1755651176000000000 b6e0d691e62b1e9830666c4f8c67fdf4 1 std/crypto/Certificate/Bundle/macos.zig +3081 13433097423 1755651176000000000 2aeda0b8b6036bb4d980778abb5a928a 1 std/fmt/parse_float/common.zig +3073 13433097422 1755651176000000000 3950e4fa1fdd11d50db0b4abfc254022 1 std/fmt/parse_float/FloatStream.zig +6036 13433097421 1755651176000000000 68169ffe43d55f0eb5e26b984ef98670 1 std/fmt/parse_float/FloatInfo.zig +29140 13433097428 1755651176000000000 04115d79320f402803a56bd43cc34cf9 1 std/fmt/parse_float/decimal.zig +2726 16120023959 1755651176000000000 7f318d60fafbfa10754d5644fd131ffe 1 std/math/complex/ldexp.zig +0 15855759076 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/math/big/int_test.zig +4082 552950742 1755651176000000000 11a08913a0ec64b8325b0d29601479a7 1 std/os/linux/bpf/btf.zig +1543 552950745 1755651176000000000 95995c37b42f8d7a12578170850af6ee 1 std/os/linux/bpf/kern.zig +1998 1358753109 1755651176000000000 5a705fc01bb083d82cd43ab9ab1c6542 1 std/os/uefi/protocol/service_binding.zig +1743 1358753103 1755651176000000000 e4e18b6e0741218763e2f0eefe57c63c 1 std/os/uefi/protocol/loaded_image.zig +4860 1358753094 1755651176000000000 db6a8b32ce1366281968b6a3dbffb173 1 std/os/uefi/protocol/device_path.zig +3924 1358753107 1755651176000000000 636ee102096b7ee8d15380af87b55c99 1 std/os/uefi/protocol/rng.zig +544 1358753112 1755651176000000000 a0f63cfe62d021c13659600cea4aaa1a 1 std/os/uefi/protocol/shell_parameters.zig +1524 1358753113 1755651176000000000 7748a7cf094118fb46a4fa8cb0e326fb 1 std/os/uefi/protocol/simple_file_system.zig +13432 1358753096 1755651176000000000 995882ac23c2af4019a5dd716a5f09f3 1 std/os/uefi/protocol/file.zig +5171 1358753093 1755651176000000000 9136b751bd537d37181af6f96f23bc0d 1 std/os/uefi/protocol/block_io.zig +1827 1358753116 1755651176000000000 dc816c9ebf174e0f2191f721ebf627fd 1 std/os/uefi/protocol/simple_text_input.zig +5002 1358753117 1755651176000000000 33197652ebd5358fbd566ba1598a738f 1 std/os/uefi/protocol/simple_text_input_ex.zig +9857 1358753118 1755651176000000000 ac75efaf87e83f490e1b05ca64f3d221 1 std/os/uefi/protocol/simple_text_output.zig +2028 1358753115 1755651176000000000 2b300415efacd2dec40e6f1d67488799 1 std/os/uefi/protocol/simple_pointer.zig +2398 1358753090 1755651176000000000 2c87d630cff25fb47ddfd2241990d8f4 1 std/os/uefi/protocol/absolute_pointer.zig +4876 1358753108 1755651176000000000 1955a5a309db3628c52bf415af05b0f8 1 std/os/uefi/protocol/serial_io.zig +4296 1358753097 1755651176000000000 702a798c1a856afdd0ade5a1ee67b3cd 1 std/os/uefi/protocol/graphics_output.zig +2479 1358753095 1755651176000000000 0fab22ebe8c02b50099313679d4e2eb5 1 std/os/uefi/protocol/edid.zig +15978 1358753114 1755651176000000000 95a49124c8237f8d2ab01672bf2a69b1 1 std/os/uefi/protocol/simple_network.zig +9851 1358753105 1755651176000000000 fc89ee17ffacbefb54626ee378473525 1 std/os/uefi/protocol/managed_network.zig +13201 1358753101 1755651176000000000 427b83b08791055f001b217a1bd39a8b 1 std/os/uefi/protocol/ip6.zig +5373 1358753102 1755651176000000000 911ecc11b1404b1bef6afcda6cd7868e 1 std/os/uefi/protocol/ip6_config.zig +8567 1358753185 1755651176000000000 47adbb9c98a53124032c9ef80ce5889f 1 std/os/uefi/protocol/udp6.zig +4199 1358753098 1755651176000000000 b821152f4c9abddf1c1fb114333c66dd 1 std/os/uefi/protocol/hii_database.zig +1712 1358753099 1755651176000000000 1a882e3749f4ef9b5c5827cbb346f6a3 1 std/os/uefi/protocol/hii_popup.zig +47589 1636611726 1755651176000000000 da7566eb78da06f1636e8eb3a693eb3e 1 std/os/uefi/tables/boot_services.zig +18947 1636611728 1755651176000000000 cb1eb30776a43459956ea4c0675dee88 1 std/os/uefi/tables/runtime_services.zig +2796 1636611727 1755651176000000000 f0a08fa361dffa5eadb351a471801946 1 std/os/uefi/tables/configuration_table.zig +2295 1636611729 1755651176000000000 25bf31dd5f33af51b4b9da897fa1e3d5 1 std/os/uefi/tables/system_table.zig +214 1636611730 1755651176000000000 cdb95d6c52cd4654ef26be0bd9f114d4 1 std/os/uefi/tables/table_header.zig +0 5117700818 1755651176000000000 82547a8dd7f3efb3f077622e34876868 1 std/zig/parser_test.zig +15091 5920176871 1755651176000000000 e1ff2fae360a9d1df9777ae4f90bda6a 1 std/zig/system/arm.zig +16495 6190427823 1755651176000000000 753462fa54f971ae23b566336ad73030 1 std/zig/system/darwin/macos.zig +50924 5649753814 1755651176000000000 5c60970433f1092302f7ef4ff90d3f62 1 std/zig/llvm/ir.zig +20581 7804551509 1755651171000000000 e8eaf68a4ffa3364b8f352326a575189 1 compiler_rt/rem_pio2_large.zig +5806 9947794600 1755651176000000000 92f1dd53520d8191f93c177825b7845c 1 std/crypto/codecs/asn1/der/Decoder.zig +5861 9947794601 1755651176000000000 650695830257d32d9ea72d767d918703 1 std/crypto/codecs/asn1/der/Encoder.zig +419 552950743 1755651176000000000 ed7dfc04a5d0c4f0853edb5414ce981e 1 std/os/linux/bpf/btf_ext.zig +24293 552950744 1755651176000000000 0c7d3ee9ea8e698a843ee6039fd161c4 1 std/os/linux/bpf/helpers.zig +3221 9947794599 1755651176000000000 fda67b74062c7f535bb0a6d0f1fe74fb 1 std/crypto/codecs/asn1/der/ArrayListReverse.zig +7666 18810886826 1774964519811011203 77dbfaf869e548f80dbc3a2ed4fb5e3c 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/echo_types.zig +4320 18810886829 1774964519812011219 896a9687ec58495899786c6600ececea 0 /mnt/user-data/charlie/aztec-repos/aztec-packages3/service-examples/zig/echo/generated/ipc_server.zig +1833 17453079975 1774434465607528606 ca552a4a253c35adc49cc174cc3a7c2e 3 p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem/src/compat.zig diff --git a/service-examples/zig/echo/.zig-cache/h/timestamp b/service-examples/zig/echo/.zig-cache/h/timestamp new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/service-examples/zig/echo/.zig-cache/o/2ddf698b52ab64085137698add0f16a1/build b/service-examples/zig/echo/.zig-cache/o/2ddf698b52ab64085137698add0f16a1/build new file mode 100755 index 000000000000..2b64d80a1c95 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/o/2ddf698b52ab64085137698add0f16a1/build differ diff --git a/service-examples/zig/echo/.zig-cache/o/3d49a05050fcba58dc9679bb1ea6840e/dependencies.zig b/service-examples/zig/echo/.zig-cache/o/3d49a05050fcba58dc9679bb1ea6840e/dependencies.zig new file mode 100644 index 000000000000..a93ffae63269 --- /dev/null +++ b/service-examples/zig/echo/.zig-cache/o/3d49a05050fcba58dc9679bb1ea6840e/dependencies.zig @@ -0,0 +1,12 @@ +pub const packages = struct { + pub const @"zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem" = struct { + pub const build_root = "/mnt/user-data/charlie/.cache/zig/p/zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem"; + pub const build_zig = @import("zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem"); + pub const deps: []const struct { []const u8, []const u8 } = &.{ + }; + }; +}; + +pub const root_deps: []const struct { []const u8, []const u8 } = &.{ + .{ "zig_msgpack", "zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem" }, +}; diff --git a/service-examples/zig/echo/.zig-cache/o/49d4e4c40777a40c32bfe5084d973f9d/echo_client b/service-examples/zig/echo/.zig-cache/o/49d4e4c40777a40c32bfe5084d973f9d/echo_client new file mode 100755 index 000000000000..22856bc56c84 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/o/49d4e4c40777a40c32bfe5084d973f9d/echo_client differ diff --git a/service-examples/zig/echo/.zig-cache/o/54bcd6b460e6508f7f493b5781956eea/echo_server b/service-examples/zig/echo/.zig-cache/o/54bcd6b460e6508f7f493b5781956eea/echo_server new file mode 100755 index 000000000000..ff04f3156f29 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/o/54bcd6b460e6508f7f493b5781956eea/echo_server differ diff --git a/service-examples/zig/echo/.zig-cache/z/0ac7c98481eb96640f419725c6e76815 b/service-examples/zig/echo/.zig-cache/z/0ac7c98481eb96640f419725c6e76815 new file mode 100644 index 000000000000..d5a0d84384be Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/0ac7c98481eb96640f419725c6e76815 differ diff --git a/service-examples/zig/echo/.zig-cache/z/195cd76ed52b9353d9ae12d80694800f b/service-examples/zig/echo/.zig-cache/z/195cd76ed52b9353d9ae12d80694800f new file mode 100644 index 000000000000..dd53d808a88b Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/195cd76ed52b9353d9ae12d80694800f differ diff --git a/service-examples/zig/echo/.zig-cache/z/52c2c97435807b6cd29875b6a87ead9f b/service-examples/zig/echo/.zig-cache/z/52c2c97435807b6cd29875b6a87ead9f new file mode 100644 index 000000000000..9942a40e882c Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/52c2c97435807b6cd29875b6a87ead9f differ diff --git a/service-examples/zig/echo/.zig-cache/z/7be23388cb8b649bf3fda1acd65fbc70 b/service-examples/zig/echo/.zig-cache/z/7be23388cb8b649bf3fda1acd65fbc70 new file mode 100644 index 000000000000..9605859279d5 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/7be23388cb8b649bf3fda1acd65fbc70 differ diff --git a/service-examples/zig/echo/.zig-cache/z/81c5f7fd5c214067f30be4231f4cf30d b/service-examples/zig/echo/.zig-cache/z/81c5f7fd5c214067f30be4231f4cf30d new file mode 100644 index 000000000000..bbb3d21b35ca Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/81c5f7fd5c214067f30be4231f4cf30d differ diff --git a/service-examples/zig/echo/.zig-cache/z/9b7d466ffbfaa5c786fbea07c64d8df0 b/service-examples/zig/echo/.zig-cache/z/9b7d466ffbfaa5c786fbea07c64d8df0 new file mode 100644 index 000000000000..1533b5c3e577 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/9b7d466ffbfaa5c786fbea07c64d8df0 differ diff --git a/service-examples/zig/echo/.zig-cache/z/a417080c2ad6eeb4bf7aeff4b43faea3 b/service-examples/zig/echo/.zig-cache/z/a417080c2ad6eeb4bf7aeff4b43faea3 new file mode 100644 index 000000000000..8d33316ef133 Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/a417080c2ad6eeb4bf7aeff4b43faea3 differ diff --git a/service-examples/zig/echo/.zig-cache/z/f1f30060d2235fbb83765b76fbd5ad43 b/service-examples/zig/echo/.zig-cache/z/f1f30060d2235fbb83765b76fbd5ad43 new file mode 100644 index 000000000000..d078f591d9cc Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/f1f30060d2235fbb83765b76fbd5ad43 differ diff --git a/service-examples/zig/echo/.zig-cache/z/f7bfa6ec0e3d3e821218257244961872 b/service-examples/zig/echo/.zig-cache/z/f7bfa6ec0e3d3e821218257244961872 new file mode 100644 index 000000000000..04cef2c34e8a Binary files /dev/null and b/service-examples/zig/echo/.zig-cache/z/f7bfa6ec0e3d3e821218257244961872 differ diff --git a/service-examples/zig/echo/build.zig b/service-examples/zig/echo/build.zig new file mode 100644 index 000000000000..bf3f9a6f61d5 --- /dev/null +++ b/service-examples/zig/echo/build.zig @@ -0,0 +1,36 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const msgpack_dep = b.dependency("zig_msgpack", .{ + .target = target, + .optimize = optimize, + }); + const msgpack_mod = msgpack_dep.module("msgpack"); + + // Echo server + const server_exe = b.addExecutable(.{ + .name = "echo_server", + .root_module = b.createModule(.{ + .root_source_file = b.path("echo_server.zig"), + .target = target, + .optimize = optimize, + }), + }); + server_exe.root_module.addImport("msgpack", msgpack_mod); + b.installArtifact(server_exe); + + // Echo client + const client_exe = b.addExecutable(.{ + .name = "echo_client", + .root_module = b.createModule(.{ + .root_source_file = b.path("echo_client.zig"), + .target = target, + .optimize = optimize, + }), + }); + client_exe.root_module.addImport("msgpack", msgpack_mod); + b.installArtifact(client_exe); +} diff --git a/service-examples/zig/echo/build.zig.zon b/service-examples/zig/echo/build.zig.zon new file mode 100644 index 000000000000..0a16193fa043 --- /dev/null +++ b/service-examples/zig/echo/build.zig.zon @@ -0,0 +1,19 @@ +.{ + .name = .echo_zig, + .version = "0.1.0", + .fingerprint = 0x15539c02bc3573e2, + .minimum_zig_version = "0.14.0", + .dependencies = .{ + .zig_msgpack = .{ + .url = "https://github.com/zigcc/zig-msgpack/archive/refs/heads/main.tar.gz", + .hash = "zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem", + }, + }, + .paths = .{ + "build.zig", + "build.zig.zon", + "echo_server.zig", + "echo_client.zig", + "generated", + }, +} diff --git a/service-examples/zig/echo/echo_client b/service-examples/zig/echo/echo_client new file mode 100755 index 000000000000..47d0fd44b58e Binary files /dev/null and b/service-examples/zig/echo/echo_client differ diff --git a/service-examples/zig/echo/echo_client.zig b/service-examples/zig/echo/echo_client.zig new file mode 100644 index 000000000000..9281ea21d764 --- /dev/null +++ b/service-examples/zig/echo/echo_client.zig @@ -0,0 +1,69 @@ +/// Echo IPC client (Zig) — uses GENERATED typed client + UDS backend. +/// Usage: echo_client --socket /tmp/echo.sock +const std = @import("std"); +const echo_client = @import("generated/echo_client.zig"); +const uds_backend = @import("generated/uds_backend.zig"); +const types = @import("generated/echo_types.zig"); + +pub fn main() !void { + var args = std.process.args(); + _ = args.next(); + var socket_path: ?[]const u8 = null; + while (args.next()) |arg| { + if (std.mem.eql(u8, arg, "--socket")) { + socket_path = args.next(); + } + } + const path = socket_path orelse { + std.debug.print("Usage: echo_client --socket \n", .{}); + std.process.exit(1); + }; + + var backend = try uds_backend.UdsBackend.connect(path); + const EchoClient = echo_client.Client(uds_backend.UdsBackend); + var client = EchoClient.init(&backend); + + // Test 1: EchoBytes + { + const cmd = types.EchoBytes{ .data = &[_]u8{ 0xDE, 0xAD, 0xBE, 0xEF, 0x42 } }; + const resp = try client.bytes(cmd); + if (!std.mem.eql(u8, resp.data, &[_]u8{ 0xDE, 0xAD, 0xBE, 0xEF, 0x42 })) { + std.debug.print("echo_client(zig): EchoBytes FAIL\n", .{}); + std.process.exit(1); + } + std.debug.print("echo_client(zig): EchoBytes OK\n", .{}); + } + + // Test 2: EchoFields + { + const cmd = types.EchoFields{ .a = 42, .b = 999999, .name = "hello wire compat" }; + const resp = try client.fields(cmd); + if (resp.a != 42 or resp.b != 999999 or !std.mem.eql(u8, resp.name, "hello wire compat")) { + std.debug.print("echo_client(zig): EchoFields FAIL\n", .{}); + std.process.exit(1); + } + std.debug.print("echo_client(zig): EchoFields OK\n", .{}); + } + + // Test 3: EchoNested + { + const values = &[_][]const u8{ &[_]u8{ 1, 2, 3 }, &[_]u8{ 4, 5 } }; + const cmd = types.EchoNested{ + .inner = types.EchoInner{ .values = values, .flag = true }, + }; + const resp = try client.nested(cmd); + if (resp.inner.values.len != 2) { + std.debug.print("echo_client(zig): EchoNested FAIL\n", .{}); + std.process.exit(1); + } + if (resp.inner.flag != true) { + std.debug.print("echo_client(zig): EchoNested flag FAIL\n", .{}); + std.process.exit(1); + } + std.debug.print("echo_client(zig): EchoNested OK\n", .{}); + } + + // Shutdown + try client.shutdown(); + std.debug.print("echo_client(zig): all tests passed\n", .{}); +} diff --git a/service-examples/zig/echo/echo_server b/service-examples/zig/echo/echo_server new file mode 100755 index 000000000000..7969e3196bb2 Binary files /dev/null and b/service-examples/zig/echo/echo_server differ diff --git a/service-examples/zig/echo/echo_server.zig b/service-examples/zig/echo/echo_server.zig new file mode 100644 index 000000000000..ad9071b39cb1 --- /dev/null +++ b/service-examples/zig/echo/echo_server.zig @@ -0,0 +1,63 @@ +/// Echo IPC server (Zig) — uses GENERATED types + IPC server template. +/// Hand-written dispatch + echo handlers. +/// Usage: echo_server --socket /tmp/echo.sock +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const types = @import("generated/echo_types.zig"); +const ipc_server = @import("generated/ipc_server.zig"); + +const alloc = std.heap.page_allocator; + +pub fn main() !void { + var args = std.process.args(); + _ = args.next(); + var socket_path: ?[]const u8 = null; + while (args.next()) |arg| { + if (std.mem.eql(u8, arg, "--socket")) { + socket_path = args.next(); + } + } + const path = socket_path orelse { + std.debug.print("Usage: echo_server --socket \n", .{}); + return error.InvalidArgument; + }; + + try ipc_server.serve(path, dispatch); +} + +fn dispatch(cmd_name: []const u8, fields: Payload) ipc_server.DispatchResult { + // Shutdown + if (std.mem.eql(u8, cmd_name, "EchoShutdown")) { + return .{ .resp_name = "EchoShutdownResponse", .resp_payload = Payload.mapPayload(alloc) }; + } + + // EchoBytes — echo back + if (std.mem.eql(u8, cmd_name, "EchoBytes")) { + const cmd = types.EchoBytes.fromPayload(fields) catch return makeError("deser failed"); + const resp = types.EchoBytesResponse{ .data = cmd.data }; + return .{ .resp_name = "EchoBytesResponse", .resp_payload = resp.toPayload(alloc) }; + } + + // EchoFields — echo back + if (std.mem.eql(u8, cmd_name, "EchoFields")) { + const cmd = types.EchoFields.fromPayload(fields) catch return makeError("deser failed"); + const resp = types.EchoFieldsResponse{ .a = cmd.a, .b = cmd.b, .name = cmd.name }; + return .{ .resp_name = "EchoFieldsResponse", .resp_payload = resp.toPayload(alloc) }; + } + + // EchoNested — echo back + if (std.mem.eql(u8, cmd_name, "EchoNested")) { + const cmd = types.EchoNested.fromPayload(fields) catch return makeError("deser failed"); + const resp = types.EchoNestedResponse{ .inner = cmd.inner }; + return .{ .resp_name = "EchoNestedResponse", .resp_payload = resp.toPayload(alloc) }; + } + + return makeError("unknown command"); +} + +fn makeError(message: []const u8) ipc_server.DispatchResult { + var err_map = Payload.mapPayload(alloc); + err_map.mapPut("message", Payload.strToPayload(message, alloc) catch return .{ .resp_name = "EchoErrorResponse", .resp_payload = Payload.mapPayload(alloc) }) catch {}; + return .{ .resp_name = "EchoErrorResponse", .resp_payload = err_map }; +} diff --git a/service-examples/zig/echo/generated/backend.zig b/service-examples/zig/echo/generated/backend.zig new file mode 100644 index 000000000000..97a65bdbfa07 --- /dev/null +++ b/service-examples/zig/echo/generated/backend.zig @@ -0,0 +1,27 @@ +/// Backend abstraction — comptime interface for transport. +/// +/// A valid backend type must provide: +/// fn call(self: *T, request: []const u8) ![]u8 +/// fn destroy(self: *T) void +/// +/// Implementations: +/// UdsBackend (uds_backend.zig) — Unix Domain Socket IPC +/// FfiBackend (ffi_backend.zig) — Direct C FFI linking +/// +/// Usage with the generated client: +/// const Client = @import("wsdb_client.zig").Client; +/// const UdsBackend = @import("uds_backend.zig").UdsBackend; +/// var backend = try UdsBackend.connect("/tmp/wsdb.sock"); +/// var client = Client(UdsBackend){ .backend = &backend }; + +/// Compile-time check that a type satisfies the backend interface. +pub fn assertBackend(comptime T: type) void { + // Must have: fn call(self: *T, request: []const u8) ![]u8 + if (!@hasDecl(T, "call")) { + @compileError("Backend type " ++ @typeName(T) ++ " missing 'call' method"); + } + // Must have: fn destroy(self: *T) void + if (!@hasDecl(T, "destroy")) { + @compileError("Backend type " ++ @typeName(T) ++ " missing 'destroy' method"); + } +} diff --git a/service-examples/zig/echo/generated/echo_client.zig b/service-examples/zig/echo/generated/echo_client.zig new file mode 100644 index 000000000000..c06d06f9c33b --- /dev/null +++ b/service-examples/zig/echo/generated/echo_client.zig @@ -0,0 +1,94 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Echo client — typed methods parameterized on a backend type. +//! +//! The backend must satisfy: call(self, request: []const u8) ![]u8 and destroy(self) void. +//! See backend.zig for the interface contract. +//! Implementations: UdsBackend (uds_backend.zig), FfiBackend (ffi_backend.zig). + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const types = @import("echo_types.zig"); +const backend_mod = @import("backend.zig"); + +const alloc = std.heap.page_allocator; + +pub fn Client(comptime BackendType: type) type { + comptime backend_mod.assertBackend(BackendType); + + return struct { + const Self = @This(); + backend: *BackendType, + + pub fn init(backend: *BackendType) Self { + return .{ .backend = backend }; + } + + pub fn destroy(self: *Self) void { + self.backend.destroy(); + } + + pub fn shutdown(self: *Self) !void { + const request_bytes = try Self.encode("EchoShutdown", Payload.mapPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + alloc.free(response_bytes); + } + + pub fn bytes(self: *Self, cmd: types.EchoBytes) !types.EchoBytesResponse { + const request_bytes = try Self.encode("EchoBytes", try cmd.toPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + defer alloc.free(response_bytes); + const resp_name, const resp_payload = try Self.decode(response_bytes); + if (std.mem.eql(u8, resp_name, "EchoErrorResponse")) return error.ServerError; + return try types.EchoBytesResponse.fromPayload(resp_payload); + } + + pub fn fields(self: *Self, cmd: types.EchoFields) !types.EchoFieldsResponse { + const request_bytes = try Self.encode("EchoFields", try cmd.toPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + defer alloc.free(response_bytes); + const resp_name, const resp_payload = try Self.decode(response_bytes); + if (std.mem.eql(u8, resp_name, "EchoErrorResponse")) return error.ServerError; + return try types.EchoFieldsResponse.fromPayload(resp_payload); + } + + pub fn nested(self: *Self, cmd: types.EchoNested) !types.EchoNestedResponse { + const request_bytes = try Self.encode("EchoNested", try cmd.toPayload(alloc)); + defer alloc.free(request_bytes); + const response_bytes = try self.backend.call(request_bytes); + defer alloc.free(response_bytes); + const resp_name, const resp_payload = try Self.decode(response_bytes); + if (std.mem.eql(u8, resp_name, "EchoErrorResponse")) return error.ServerError; + return try types.EchoNestedResponse.fromPayload(resp_payload); + } + + // --- internal helpers --- + + fn encode(cmd_name: []const u8, cmd_fields: Payload) ![]u8 { + var inner = try Payload.arrPayload(2, alloc); + try inner.setArrElement(0, try Payload.strToPayload(cmd_name, alloc)); + try inner.setArrElement(1, cmd_fields); + var outer = try Payload.arrPayload(1, alloc); + try outer.setArrElement(0, inner); + + var allocating_writer = std.Io.Writer.Allocating.init(alloc); + var packer = msgpack.PackerIO.init(undefined, &allocating_writer.writer); + try packer.write(outer); + return try allocating_writer.toOwnedSlice(); + } + + fn decode(response_bytes: []const u8) !struct { []const u8, Payload } { + var reader = std.Io.Reader.fixed(response_bytes); + var unpacker = msgpack.PackerIO.init(&reader, undefined); + const resp = try unpacker.read(alloc); + const resp_len = try resp.getArrLen(); + if (resp_len != 2) return error.InvalidResponse; + const name = try (try resp.getArrElement(0)).asStr(); + const payload = try resp.getArrElement(1); + return .{ name, payload }; + } + }; +} diff --git a/service-examples/zig/echo/generated/echo_server.zig b/service-examples/zig/echo/generated/echo_server.zig new file mode 100644 index 000000000000..f6da558629e4 --- /dev/null +++ b/service-examples/zig/echo/generated/echo_server.zig @@ -0,0 +1,72 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Echo IPC server — dispatch + stub handlers over generic IPC transport. +//! +//! Implement the handler functions below to build a working Echo service. +//! Then call: serve("socket_path") + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const types = @import("echo_types.zig"); +const ipc_server = @import("ipc_server.zig"); + +const alloc = std.heap.page_allocator; + +/// Start the Echo server on the given socket path. +pub fn serve(socket_path: []const u8) !void { + try ipc_server.serve(socket_path, dispatch); +} + +fn dispatch(cmd_name: []const u8, cmd_fields: Payload) ipc_server.DispatchResult { + // Shutdown + if (std.mem.eql(u8, cmd_name, "EchoShutdown")) { + return .{ .resp_name = "EchoShutdownResponse", .resp_payload = Payload.mapPayload(alloc) }; + } + + // Command dispatch + if (std.mem.eql(u8, cmd_name, "EchoBytes")) { + const cmd = types.EchoBytes.fromPayload(cmd_fields) catch return makeError("deser failed"); + const resp = bytes(cmd) catch return makeError("not implemented: EchoBytes"); + return .{ .resp_name = "EchoBytesResponse", .resp_payload = resp.toPayload(alloc) }; + } + if (std.mem.eql(u8, cmd_name, "EchoFields")) { + const cmd = types.EchoFields.fromPayload(cmd_fields) catch return makeError("deser failed"); + const resp = fields(cmd) catch return makeError("not implemented: EchoFields"); + return .{ .resp_name = "EchoFieldsResponse", .resp_payload = resp.toPayload(alloc) }; + } + if (std.mem.eql(u8, cmd_name, "EchoNested")) { + const cmd = types.EchoNested.fromPayload(cmd_fields) catch return makeError("deser failed"); + const resp = nested(cmd) catch return makeError("not implemented: EchoNested"); + return .{ .resp_name = "EchoNestedResponse", .resp_payload = resp.toPayload(alloc) }; + } + + return makeError("unknown command"); +} + +fn makeError(message: []const u8) ipc_server.DispatchResult { + var err_map = Payload.mapPayload(alloc); + err_map.mapPut("message", Payload.strToPayload(message, alloc) catch return .{ .resp_name = "EchoErrorResponse", .resp_payload = Payload.mapPayload(alloc) }) catch {}; + return .{ .resp_name = "EchoErrorResponse", .resp_payload = err_map }; +} + +// --------------------------------------------------------------------------- +// Handler stubs — implement these to build your Echo service. +// --------------------------------------------------------------------------- + +/// TODO: implement EchoBytes +fn bytes(cmd: types.EchoBytes) !types.EchoBytesResponse { + _ = cmd; + return error.NotImplemented; +} + +/// TODO: implement EchoFields +fn fields(cmd: types.EchoFields) !types.EchoFieldsResponse { + _ = cmd; + return error.NotImplemented; +} + +/// TODO: implement EchoNested +fn nested(cmd: types.EchoNested) !types.EchoNestedResponse { + _ = cmd; + return error.NotImplemented; +} diff --git a/service-examples/zig/echo/generated/echo_types.zig b/service-examples/zig/echo/generated/echo_types.zig new file mode 100644 index 000000000000..9ecd3bd833a6 --- /dev/null +++ b/service-examples/zig/echo/generated/echo_types.zig @@ -0,0 +1,239 @@ +//! AUTOGENERATED - DO NOT EDIT +//! Generated from Aztec IPC msgpack schema +//! +//! Each struct has toPayload() and fromPayload() methods that convert +//! to/from zig-msgpack Payload objects for serialization. + +const std = @import("std"); +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; +const PackerIO = msgpack.PackerIO; + +/// Schema version hash for compatibility checking +pub const SCHEMA_HASH = "bb6458c4c159270c9a0e50ec8ad88d1e1c93271550542c7ab148e96adb6460cc"; + +/// 32-byte field element (Fr/Fq). Fixed-size, stack-allocated. +pub const Fr = [32]u8; + +// --------------------------------------------------------------------------- +// Type definitions +// --------------------------------------------------------------------------- + +/// EchoInner +pub const EchoInner = struct { + values: []const []const u8, + flag: ?bool, + + pub fn toPayload(self: EchoInner, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("values", blk: { + var arr = try Payload.arrPayload(self.values.len, allocator); + for (self.values, 0..) |item, i| { + try arr.setArrElement(i, try Payload.binToPayload(item, allocator)); + } + break :blk arr; + }); + try map.mapPut("flag", if (self.flag) |v| Payload{ .bool = v } else Payload{ .nil = {} }); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoInner { + return EchoInner{ + .values = blk: { + const arr_len = try (try payload.mapGet("values")).?.getArrLen(); + var result = try std.heap.page_allocator.alloc([]const u8, arr_len); + for (0..arr_len) |i| { + const elem = try (try payload.mapGet("values")).?.getArrElement(i); + result[i] = elem.bin.value(); + } + break :blk result; + }, + .flag = if ((try payload.mapGet("flag")).? == .nil) null else try (try payload.mapGet("flag")).?.asBool(), + }; + } +}; + +/// EchoBytes +pub const EchoBytes = struct { + data: []const u8, + + pub fn toPayload(self: EchoBytes, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("data", try Payload.binToPayload(self.data, allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoBytes { + return EchoBytes{ + .data = (try payload.mapGet("data")).?.bin.value(), + }; + } +}; + +/// EchoFields +pub const EchoFields = struct { + a: u32, + b: u64, + name: []const u8, + + pub fn toPayload(self: EchoFields, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("a", Payload{ .uint = @intCast(self.a) }); + try map.mapPut("b", Payload{ .uint = @intCast(self.b) }); + try map.mapPut("name", try Payload.strToPayload(self.name, allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoFields { + return EchoFields{ + .a = @intCast(try (try payload.mapGet("a")).?.asUint()), + .b = try (try payload.mapGet("b")).?.asUint(), + .name = try (try payload.mapGet("name")).?.asStr(), + }; + } +}; + +/// EchoNested +pub const EchoNested = struct { + inner: EchoInner, + + pub fn toPayload(self: EchoNested, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("inner", try self.inner.toPayload(allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoNested { + return EchoNested{ + .inner = try EchoInner.fromPayload((try payload.mapGet("inner")).?), + }; + } +}; + +/// EchoShutdown +pub const EchoShutdown = struct { + + pub fn toPayload(_: EchoShutdown, allocator: std.mem.Allocator) !Payload { + return Payload.mapPayload(allocator); + } + + pub fn fromPayload(_: Payload) !EchoShutdown { + return EchoShutdown{}; + } +}; + +/// EchoBytesResponse +pub const EchoBytesResponse = struct { + data: []const u8, + + pub fn toPayload(self: EchoBytesResponse, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("data", try Payload.binToPayload(self.data, allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoBytesResponse { + return EchoBytesResponse{ + .data = (try payload.mapGet("data")).?.bin.value(), + }; + } +}; + +/// EchoFieldsResponse +pub const EchoFieldsResponse = struct { + a: u32, + b: u64, + name: []const u8, + + pub fn toPayload(self: EchoFieldsResponse, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("a", Payload{ .uint = @intCast(self.a) }); + try map.mapPut("b", Payload{ .uint = @intCast(self.b) }); + try map.mapPut("name", try Payload.strToPayload(self.name, allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoFieldsResponse { + return EchoFieldsResponse{ + .a = @intCast(try (try payload.mapGet("a")).?.asUint()), + .b = try (try payload.mapGet("b")).?.asUint(), + .name = try (try payload.mapGet("name")).?.asStr(), + }; + } +}; + +/// EchoNestedResponse +pub const EchoNestedResponse = struct { + inner: EchoInner, + + pub fn toPayload(self: EchoNestedResponse, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("inner", try self.inner.toPayload(allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoNestedResponse { + return EchoNestedResponse{ + .inner = try EchoInner.fromPayload((try payload.mapGet("inner")).?), + }; + } +}; + +/// EchoShutdownResponse +pub const EchoShutdownResponse = struct { + + pub fn toPayload(_: EchoShutdownResponse, allocator: std.mem.Allocator) !Payload { + return Payload.mapPayload(allocator); + } + + pub fn fromPayload(_: Payload) !EchoShutdownResponse { + return EchoShutdownResponse{}; + } +}; + +/// EchoErrorResponse +pub const EchoErrorResponse = struct { + message: []const u8, + + pub fn toPayload(self: EchoErrorResponse, allocator: std.mem.Allocator) !Payload { + var map = Payload.mapPayload(allocator); + try map.mapPut("message", try Payload.strToPayload(self.message, allocator)); + return map; + } + + pub fn fromPayload(payload: Payload) !EchoErrorResponse { + return EchoErrorResponse{ + .message = try (try payload.mapGet("message")).?.asStr(), + }; + } +}; + +// --------------------------------------------------------------------------- +// Command / Response unions +// --------------------------------------------------------------------------- + +/// Tagged union of all commands +pub const Command = union(enum) { + echo_bytes: EchoBytes, + echo_fields: EchoFields, + echo_nested: EchoNested, + echo_shutdown: EchoShutdown, + + pub fn schemaName(self: Command) []const u8 { + return switch (self) { + .echo_bytes => "EchoBytes", + .echo_fields => "EchoFields", + .echo_nested => "EchoNested", + .echo_shutdown => "EchoShutdown", + }; + } +}; + +/// Tagged union of all responses +pub const Response = union(enum) { + echo_bytes_response: EchoBytesResponse, + echo_fields_response: EchoFieldsResponse, + echo_nested_response: EchoNestedResponse, + echo_shutdown_response: EchoShutdownResponse, + echo_error_response: EchoErrorResponse, +}; diff --git a/service-examples/zig/echo/generated/ipc_server.zig b/service-examples/zig/echo/generated/ipc_server.zig new file mode 100644 index 000000000000..ba58a09b5a61 --- /dev/null +++ b/service-examples/zig/echo/generated/ipc_server.zig @@ -0,0 +1,112 @@ +/// Generic IPC server over Unix Domain Sockets. +/// Handles: socket setup, accept, length-prefixed framing, msgpack decode/encode. +/// Service-specific dispatch is injected via the DispatchFn parameter. +const std = @import("std"); +const posix = std.posix; +const msgpack = @import("msgpack"); +const Payload = msgpack.Payload; + +const alloc = std.heap.page_allocator; + +pub const DispatchFn = *const fn (cmd_name: []const u8, fields: Payload) DispatchResult; +pub const DispatchResult = struct { resp_name: []const u8, resp_payload: anyerror!Payload }; + +/// Run an IPC server on the given UDS path. +/// Accepts one connection, serves requests until shutdown or disconnect. +pub fn serve(socket_path: []const u8, dispatch: DispatchFn) !void { + std.fs.cwd().deleteFile(socket_path) catch {}; + + const address = try std.net.Address.initUnix(socket_path); + const server_fd = try posix.socket(posix.AF.UNIX, posix.SOCK.STREAM, 0); + defer posix.close(server_fd); + try posix.bind(server_fd, &address.any, address.getOsSockLen()); + try posix.listen(server_fd, 1); + + std.debug.print("ipc-server: listening on {s}\n", .{socket_path}); + + const client_fd = try posix.accept(server_fd, null, null, 0); + defer posix.close(client_fd); + + while (true) { + const frame = recvFrame(client_fd) catch break; + defer alloc.free(frame); + + // Decode msgpack: [[commandName, {fields}]] + var reader = std.Io.Reader.fixed(frame); + var packer = msgpack.PackerIO.init(&reader, undefined); + const request = packer.read(alloc) catch break; + + const outer_len = request.getArrLen() catch break; + if (outer_len != 1) break; + + const inner = request.getArrElement(0) catch break; + const inner_len = inner.getArrLen() catch break; + if (inner_len != 2) break; + + const cmd_name = (inner.getArrElement(0) catch break).asStr() catch break; + const fields = inner.getArrElement(1) catch break; + + // Dispatch + const result = dispatch(cmd_name, fields); + const resp_payload = result.resp_payload catch blk: { + var err_map = Payload.mapPayload(alloc); + const msg = std.fmt.allocPrint(alloc, "error: {s}", .{cmd_name}) catch "error"; + err_map.mapPut("message", Payload.strToPayload(msg, alloc) catch break) catch break; + break :blk err_map; + }; + const is_error = if (result.resp_payload) |_| false else |_| true; + const resp_name = if (is_error) "ErrorResponse" else result.resp_name; + + const response = encodeResponse(resp_name, resp_payload) catch break; + defer alloc.free(response); + sendFrame(client_fd, response) catch break; + + // Check for shutdown + if (std.mem.indexOf(u8, cmd_name, "Shutdown") != null) break; + } + + std.fs.cwd().deleteFile(socket_path) catch {}; + std.debug.print("ipc-server: shutdown\n", .{}); +} + +fn encodeResponse(name: []const u8, payload: Payload) ![]u8 { + var resp_arr = try Payload.arrPayload(2, alloc); + try resp_arr.setArrElement(0, try Payload.strToPayload(name, alloc)); + try resp_arr.setArrElement(1, payload); + + var allocating_writer = std.Io.Writer.Allocating.init(alloc); + var packer = msgpack.PackerIO.init(undefined, &allocating_writer.writer); + try packer.write(resp_arr); + return try allocating_writer.toOwnedSlice(); +} + +fn recvFrame(fd: posix.socket_t) ![]u8 { + var hdr: [4]u8 = undefined; + var got: usize = 0; + while (got < 4) { + const n = try posix.read(fd, hdr[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + const len: u32 = @as(u32, hdr[0]) | (@as(u32, hdr[1]) << 8) | (@as(u32, hdr[2]) << 16) | (@as(u32, hdr[3]) << 24); + const data = try alloc.alloc(u8, len); + got = 0; + while (got < len) { + const n = try posix.read(fd, data[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + return data; +} + +fn sendFrame(fd: posix.socket_t, data: []const u8) !void { + const len: u32 = @intCast(data.len); + const header = [4]u8{ + @intCast(len & 0xFF), + @intCast((len >> 8) & 0xFF), + @intCast((len >> 16) & 0xFF), + @intCast((len >> 24) & 0xFF), + }; + _ = try posix.write(fd, &header); + _ = try posix.write(fd, data); +} diff --git a/service-examples/zig/echo/generated/uds_backend.zig b/service-examples/zig/echo/generated/uds_backend.zig new file mode 100644 index 000000000000..af701e2d05c9 --- /dev/null +++ b/service-examples/zig/echo/generated/uds_backend.zig @@ -0,0 +1,62 @@ +/// UDS (Unix Domain Socket) backend for IPC communication. +/// Handles: socket connect, length-prefixed framing, raw byte send/receive. +/// Satisfies the backend interface: call(request) -> response, destroy(). +const std = @import("std"); +const posix = std.posix; + +const alloc = std.heap.page_allocator; + +pub const UdsBackend = struct { + fd: posix.socket_t, + + /// Connect to a service at the given UDS path. + pub fn connect(socket_path: []const u8) !UdsBackend { + const address = try std.net.Address.initUnix(socket_path); + const fd = try posix.socket(posix.AF.UNIX, posix.SOCK.STREAM, 0); + try posix.connect(fd, &address.any, address.getOsSockLen()); + return .{ .fd = fd }; + } + + /// Send a raw msgpack request and receive a raw msgpack response. + /// Framing: 4-byte LE length prefix + payload. + pub fn call(self: *UdsBackend, request: []const u8) ![]u8 { + try sendFrame(self.fd, request); + return try recvFrame(self.fd); + } + + /// Close the connection. + pub fn destroy(self: *UdsBackend) void { + posix.close(self.fd); + } + + fn sendFrame(fd: posix.socket_t, data: []const u8) !void { + const len: u32 = @intCast(data.len); + const header = [4]u8{ + @intCast(len & 0xFF), + @intCast((len >> 8) & 0xFF), + @intCast((len >> 16) & 0xFF), + @intCast((len >> 24) & 0xFF), + }; + _ = try posix.write(fd, &header); + _ = try posix.write(fd, data); + } + + fn recvFrame(fd: posix.socket_t) ![]u8 { + var hdr: [4]u8 = undefined; + var got: usize = 0; + while (got < 4) { + const n = try posix.read(fd, hdr[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + const len: u32 = @as(u32, hdr[0]) | (@as(u32, hdr[1]) << 8) | (@as(u32, hdr[2]) << 16) | (@as(u32, hdr[3]) << 24); + const data = try alloc.alloc(u8, len); + got = 0; + while (got < len) { + const n = try posix.read(fd, data[got..]); + if (n == 0) return error.ConnectionClosed; + got += n; + } + return data; + } +}; diff --git a/service-examples/zig/echo/zig-out/bin/echo_client b/service-examples/zig/echo/zig-out/bin/echo_client new file mode 100755 index 000000000000..22856bc56c84 Binary files /dev/null and b/service-examples/zig/echo/zig-out/bin/echo_client differ diff --git a/service-examples/zig/echo/zig-out/bin/echo_server b/service-examples/zig/echo/zig-out/bin/echo_server new file mode 100755 index 000000000000..ff04f3156f29 Binary files /dev/null and b/service-examples/zig/echo/zig-out/bin/echo_server differ diff --git a/service-examples/zig/wsdb/.gitignore b/service-examples/zig/wsdb/.gitignore new file mode 100644 index 000000000000..647d2f5a5919 --- /dev/null +++ b/service-examples/zig/wsdb/.gitignore @@ -0,0 +1,3 @@ +src/generated/ +.zig-cache/ +zig-out/ diff --git a/service-examples/zig/wsdb/README.md b/service-examples/zig/wsdb/README.md new file mode 100644 index 000000000000..52f6fb2b9ea6 --- /dev/null +++ b/service-examples/zig/wsdb/README.md @@ -0,0 +1,93 @@ +# Zig WSDB Server Example + +A skeleton WSDB (World State Database) implementation in Zig, using +generated types and serialization from the Aztec IPC codegen tool. + +All command handlers return "not implemented" errors. Replace them with +your world-state logic to build a working WSDB. + +## Prerequisites + +- [Zig](https://ziglang.org/) 0.15+ +- [Node.js](https://nodejs.org/) 22+ (for the codegen step) + +## Build & Run + +```bash +# 1. Generate types from the committed WSDB schema +./generate.sh + +# 2. Build +zig build + +# 3. Run +./zig-out/bin/zig-wsdb --socket /tmp/wsdb.sock +``` + +## How It Works + +``` +generate.sh calls: + codegen/src/generate.ts --schema wsdb_schema.json --lang zig --prefix Wsdb --out src/generated/ + + produces: src/generated/types.zig (WSDB command/response structs) + src/generated/server.zig (server dispatch vtable) + +src/main.zig + UDS server → recv frame → decode msgpack → dispatch by command name + → deserialize fields into generated struct via fromPayload() + → call handler (your code) + → serialize response via toPayload() + → encode as NamedUnion [responseName, {fields}] + → send frame +``` + +## Implementing a Command + +Edit `handleCommand()` in `src/main.zig`: + +```zig +fn handleCommand(comptime CmdType: type, comptime RespType: type, cmd: CmdType) !RespType { + if (CmdType == types.WsdbGetTreeInfo) { + return types.WsdbGetTreeInfoResponse{ + .tree_id = cmd.tree_id, + .root = std.mem.zeroes(types.Fr), // 32-byte field element + .size = 0, + .depth = 32, + }; + } + return error.NotImplemented; +} +``` + +## Connecting a Client + +Any WSDB client that speaks the IPC protocol can connect — C++, TypeScript, Rust, or Zig. +The wire format is: 4-byte LE length prefix + msgpack payload. + +```bash +# Example: connect the existing C++ WSDB client +aztec-wsdb-client --socket /tmp/wsdb.sock +``` + +## Project Structure + +``` +├── generate.sh # Invokes codegen CLI to produce types +├── build.zig # Zig build file +├── build.zig.zon # Zig package manifest (depends on zig-msgpack) +├── src/ +│ ├── main.zig # Server: UDS, framing, dispatch, handlers +│ └── generated/ # AUTOGENERATED (gitignored) +│ ├── types.zig # All WSDB command/response structs +│ └── server.zig # Server dispatch vtable +└── README.md +``` + +## Schema Updates + +If the WSDB schema changes: +1. Someone updates `barretenberg/codegen/schemas/wsdb_schema.json` +2. Run `./generate.sh` to regenerate types +3. Fix any compilation errors from changed/removed commands +4. `zig build` diff --git a/service-examples/zig/wsdb/build.zig b/service-examples/zig/wsdb/build.zig new file mode 100644 index 000000000000..e287aaa276e1 --- /dev/null +++ b/service-examples/zig/wsdb/build.zig @@ -0,0 +1,31 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const msgpack_dep = b.dependency("zig_msgpack", .{ + .target = target, + .optimize = optimize, + }); + const msgpack_mod = msgpack_dep.module("msgpack"); + + const exe = b.addExecutable(.{ + .name = "zig-wsdb", + .root_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }), + }); + exe.root_module.addImport("msgpack", msgpack_mod); + b.installArtifact(exe); + + const run_cmd = b.addRunArtifact(exe); + run_cmd.step.dependOn(b.getInstallStep()); + if (b.args) |args| { + run_cmd.addArgs(args); + } + const run_step = b.step("run", "Run the WSDB server"); + run_step.dependOn(&run_cmd.step); +} diff --git a/service-examples/zig/wsdb/build.zig.zon b/service-examples/zig/wsdb/build.zig.zon new file mode 100644 index 000000000000..1e4c2b8243ab --- /dev/null +++ b/service-examples/zig/wsdb/build.zig.zon @@ -0,0 +1,17 @@ +.{ + .name = .zig_wsdb, + .version = "0.1.0", + .fingerprint = 0xeb5cdc04a6a8770f, + .minimum_zig_version = "0.14.0", + .dependencies = .{ + .zig_msgpack = .{ + .url = "https://github.com/zigcc/zig-msgpack/archive/refs/heads/main.tar.gz", + .hash = "zig_msgpack-0.0.14-evvueIkqBQA7F_-8hpmPYvAjmg9MOWJLm6p8sb0HnGem", + }, + }, + .paths = .{ + "build.zig", + "build.zig.zon", + "src", + }, +} diff --git a/service-examples/zig/wsdb/generate.sh b/service-examples/zig/wsdb/generate.sh new file mode 100755 index 000000000000..c852bdf50406 --- /dev/null +++ b/service-examples/zig/wsdb/generate.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Generate WSDB Zig bindings from the committed schema. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" +CODEGEN="$REPO_ROOT/barretenberg/codegen" + +mkdir -p "$SCRIPT_DIR/src/generated" + +node --experimental-strip-types --experimental-transform-types --no-warnings \ + "$CODEGEN/src/generate.ts" \ + --schema "$CODEGEN/schemas/wsdb_schema.json" \ + --lang zig \ + --out "$SCRIPT_DIR/src/generated" \ + --server --client --uds --ffi \ + --prefix Wsdb diff --git a/service-examples/zig/wsdb/src/main.zig b/service-examples/zig/wsdb/src/main.zig new file mode 100644 index 000000000000..2e65067c85f4 --- /dev/null +++ b/service-examples/zig/wsdb/src/main.zig @@ -0,0 +1,24 @@ +/// Zig WSDB Server — uses generated server dispatch + generic IPC transport. +/// +/// All command handlers return "not implemented" errors. +/// Edit src/generated/server.zig to implement your world-state logic. +/// +/// Usage: zig-wsdb --socket /tmp/wsdb.sock +const server = @import("generated/server_gen.zig"); + +pub fn main() !void { + var args = @import("std").process.args(); + _ = args.next(); + var socket_path: ?[]const u8 = null; + while (args.next()) |arg| { + if (@import("std").mem.eql(u8, arg, "--socket")) { + socket_path = args.next(); + } + } + const path = socket_path orelse { + @import("std").debug.print("Usage: zig-wsdb --socket \n", .{}); + @import("std").process.exit(1); + }; + + try server.serve(path); +} diff --git a/yarn-project/foundation/src/crypto/grumpkin/index.ts b/yarn-project/foundation/src/crypto/grumpkin/index.ts index 161fc82d7c89..47f8aee29d31 100644 --- a/yarn-project/foundation/src/crypto/grumpkin/index.ts +++ b/yarn-project/foundation/src/crypto/grumpkin/index.ts @@ -71,7 +71,7 @@ export class Grumpkin { public static async getRandomFr(): Promise { await BarretenbergSync.initSingleton(); const api = BarretenbergSync.getSingleton(); - const response = api.grumpkinGetRandomFr({ dummy: 0 }); + const response = api.grumpkinGetRandomFr({ pointsBuf: new Uint8Array() }); return Fr.fromBuffer(Buffer.from(response.value)); } diff --git a/yarn-project/foundation/src/crypto/secp256k1/index.ts b/yarn-project/foundation/src/crypto/secp256k1/index.ts index 23ad2e61b6e6..6f082106a2ee 100644 --- a/yarn-project/foundation/src/crypto/secp256k1/index.ts +++ b/yarn-project/foundation/src/crypto/secp256k1/index.ts @@ -43,7 +43,7 @@ export class Secp256k1 { public async getRandomFr() { await BarretenbergSync.initSingleton(); const api = BarretenbergSync.getSingleton(); - const response = api.secp256k1GetRandomFr({ dummy: 0 }); + const response = api.secp256k1GetRandomFr({ pointsBuf: new Uint8Array() }); return Buffer.from(response.value); } diff --git a/yarn-project/foundation/src/crypto/serialize.ts b/yarn-project/foundation/src/crypto/serialize.ts new file mode 100644 index 000000000000..4268f7bf95ed --- /dev/null +++ b/yarn-project/foundation/src/crypto/serialize.ts @@ -0,0 +1,85 @@ +// TODO find a new home for this as we move to external bb.js +// See https://github.com/AztecProtocol/aztec-packages/issues/782 +import { Buffer } from 'buffer'; + +/** + * For serializing an array of fixed length buffers. + * TODO move to foundation pkg. + * @param arr - Array of bufffers. + * @returns The serialized buffers. + */ +export function serializeBufferArrayToVector(arr: Buffer[]) { + const lengthBuf = Buffer.alloc(4); + lengthBuf.writeUInt32BE(arr.length, 0); + return Buffer.concat([lengthBuf, ...arr]); +} + +/** + * Helper function for deserializeArrayFromVector. + */ +type DeserializeFn = ( + buf: Buffer, + offset: number, +) => { + /** + * The deserialized type. + */ + elem: T; + /** + * How many bytes to advance by. + */ + adv: number; +}; + +/** + * For deserializing numbers to 32-bit little-endian form. + * TODO move to foundation pkg. + * @param n - The number. + * @returns The endian-corrected number. + */ +export function deserializeArrayFromVector(deserialize: DeserializeFn, vector: Buffer, offset = 0) { + let pos = offset; + const size = vector.readUInt32BE(pos); + pos += 4; + const arr = new Array(size); + for (let i = 0; i < size; ++i) { + const { elem, adv } = deserialize(vector, pos); + pos += adv; + arr[i] = elem; + } + return { elem: arr, adv: pos - offset }; +} + +/** + * For serializing numbers to 32 bit little-endian form. + * TODO move to foundation pkg. + * @param n - The number. + * @returns The endian-corrected number. + */ +export function numToUInt32LE(n: number, bufferSize = 4) { + const buf = Buffer.alloc(bufferSize); + buf.writeUInt32LE(n, bufferSize - 4); + return buf; +} + +/** + * Deserialize the 256-bit number at address `offset`. + * @param buf - The buffer. + * @param offset - The address. + * @returns The derserialized 256-bit field. + */ +export function deserializeField(buf: Buffer, offset = 0) { + const adv = 32; + return { elem: buf.slice(offset, offset + adv), adv }; +} + +export function concatenateUint8Arrays(arrayOfUint8Arrays: Uint8Array[]) { + const totalLength = arrayOfUint8Arrays.reduce((prev, curr) => prev + curr.length, 0); + const result = new Uint8Array(totalLength); + let length = 0; + for (const array of arrayOfUint8Arrays) { + result.set(array, length); + length += array.length; + } + return result; +} diff --git a/yarn-project/foundation/src/curves/bn254/point.ts b/yarn-project/foundation/src/curves/bn254/point.ts index 172d89d48375..fa7edd94ca07 100644 --- a/yarn-project/foundation/src/curves/bn254/point.ts +++ b/yarn-project/foundation/src/curves/bn254/point.ts @@ -148,7 +148,7 @@ export class Bn254G2Point { const api = BarretenbergSync.getSingleton(); const response = api.bn254G2Mul({ - point: BN254_G2_GENERATOR as BbApiBn254G2Point, + point: BN254_G2_GENERATOR as unknown as BbApiBn254G2Point, scalar: scalar.toBuffer(), }); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/README.md b/yarn-project/p2p/src/mem_pools/tx_pool/README.md new file mode 100644 index 000000000000..21fd5a68cbca --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/README.md @@ -0,0 +1,270 @@ +# Transaction Pool (Mempool) + +This module implements the transaction pool (mempool) for the Aztec P2P network. The mempool holds unconfirmed transactions awaiting inclusion in a block. + +## Overview + +The transaction pool serves as a staging area for transactions before they are included in blocks. It manages the lifecycle of transactions from initial submission through mining, handling duplicates, priority ordering, and eviction of invalid or low-priority transactions. + +## Interface: `TxPool` + +The [`TxPool`](tx_pool.ts) interface defines the contract that all transaction pool implementations must fulfill: + +### Transaction Lifecycle + +The lifecycle of transactions in the pool is summarised in the following table: + +| State | Meaning | Possible Future States | +| --- | --- | --- | +| Pending | Available to be added to a block, can be evicted | Protected, Mined, Soft Deleted | +| Protected | Added to a proposal, must not be evicted | Mined, Pending | +| Mined | Confirmed as added to a block | Soft Deleted, Pending | +| Soft Deleted | Awaiting full deletion once state has been finalised on L1 | Pending, Deleted | +| Deleted | Removed from the pool | N/A | + +**Note on why Soft Delete:** +Mined transactions are soft-deleted rather than permanently removed to support: +1. Reorg handling — If a chain reorganization occurs, soft-deleted transactions are still available in the mempool +2. Slash condition detection — The epoch prune watcher needs access to transactions from pruned epochs to correctly identify data withholding slash conditions. Without soft-delete, transactions invalidated by reorgs (e.g., built on removed blocks) would be lost, causing false positives for data withholding violations. + +Mined transactions are permanently deleted via `cleanupDeletedMinedTxs()` once their original block is finalized on L1, ensuring theyremain available during the uncertainty window. +Alternatively, mined transactions can be permanently deleted immediately by passing the `permanent: true` option to `deleteTxs()`. + +#### Transaction Lifecycle Methods + +| Method | Description | +|--------|-------------| +| `addTxs(txs, opts?)` | Adds transactions to the pool. Duplicates and nullifier conflicts are handled. Returns count of newly added txs. | +| `deleteTxs(txHashes, opts?)` | Removes transactions from the pool. Supports soft-delete for mined txs. | +| `markAsMined(txHashes, blockHeader)` | Marks transactions as included in a block. | +| `markMinedAsPending(txHashes, blockNumber)` | Reverts mined transactions to pending (used during reorgs). | +| `getArchivedTxByHash(txHash)` | Retrieves archived (historical) transactions. | +| `getTxStatus(txHash)` | Returns status: `'pending'`, `'mined'`, `'deleted'`, or `undefined`. | + +### Transaction Fetching + +| Method | Description | +|--------|-------------| +| `hasTx(txHash)` / `hasTxs(txHashes)` | Checks if transaction(s) exist in the pool. | +| `getTxByHash(txHash)` | Retrieves a transaction by its hash. | +| `getTxsByHash(txHashes)` | Batch retrieval of transactions by hash. | +| `getAllTxs()` / `getAllTxHashes()` | Returns all transactions or their hashes. | +| `getPendingTxHashes()` | Returns pending tx hashes **sorted by priority** (highest first). | +| `getPendingTxCount()` | Returns count of pending transactions. | +| `getMinedTxHashes()` | Returns mined tx hashes with their block numbers. | + +### Pool Management + +| Method | Description | +|--------|-------------| +| `updateConfig(config)` | Updates pool configuration (max size, archive limit). | +| `markTxsAsNonEvictable(txHashes)` | Protects transactions from eviction. | +| `clearNonEvictableTxs()` | Clears non-evictable flag from all transactions. | +| `cleanupDeletedMinedTxs(blockNumber)` | Permanently removes soft-deleted txs from blocks ≤ blockNumber. | +| `isEmpty()` | Checks if the pool has no transactions. | + +### Events + +The pool emits a `txs-added` event when new transactions are successfully added, allowing subscribers to react to pool changes. + +## `AztecKVTxPool` + +The [`AztecKVTxPool`](aztec_kv_tx_pool.ts) is the production-grade implementation backed by a persistent key-value store. It provides: + +- **Persistent storage** via `AztecAsyncKVStore` +- **Multiple indexes** for efficient queries +- **Automatic eviction** of invalid and low-priority transactions +- **Transaction archival** for historical lookups +- **Soft-delete semantics** for mined transactions + +#### Storage Structure + +The pool maintains several KV maps and indexes: + +| Store | Purpose | +|-------|---------| +| `#txs` | Primary storage: tx hash → serialized tx buffer | +| `#minedTxHashToBlock` | Index of mined txs: tx hash → block number | +| `#pendingTxPriorityToHash` | Priority-ordered index of pending txs | +| `#deletedMinedTxHashes` | Soft-deleted mined txs: tx hash → original block number | +| `#blockToDeletedMinedTxHash` | Reverse index for cleanup: block → deleted tx hashes | +| `#txHashToHistoricalBlockHeaderHash` | Anchor block reference for each tx | +| `#historicalHeaderToTxHash` | Index from historical block → tx hashes | +| `#feePayerToTxHash` | Index from fee payer address → tx hashes | +| `#pendingNullifierToTxHash` | Index from nullifier → tx hash | +| `#archivedTxs` | Archived transactions for historical lookup | + +#### In-Memory Caches + +| Cache | Purpose | +|-------|---------| +| `#pendingTxs` | Hydrated pending transactions for fast access | +| `#nonEvictableTxs` | Set of tx hashes protected from eviction | + +## Transaction Priority + +Transactions are prioritized based on their **total priority fees** (see [`priority.ts`](priority.ts)): + +```typescript +priorityFee = maxPriorityFeesPerGas.feePerDaGas + maxPriorityFeesPerGas.feePerL2Gas +``` + +The priority is stored as a hex string derived from a 32-byte buffer representation of the fee amount, enabling lexicographic ordering in the KV store. Pending transactions are returned in **descending priority order** (highest fees first). + +## Transaction Lifecycle in AztecKVTxPool + +### 1. Adding Transactions + +When `addTxs()` is called: + +1. Check for duplicates (skip if tx already exists) +2. Check for nullifier conflicts (see Nullifier Deduplication below) +3. Store the serialized tx in `#txs` +4. Index the tx by its anchor block hash +5. If not already mined, add to pending indexes: + - Priority-to-hash index (for ordering) + - Historical header index (for reorg handling) + - Fee payer index (for balance validation) + - Nullifier-to-tx-hash index (for conflict detection) +6. Record metrics +7. Trigger eviction rules for `TXS_ADDED` event +8. Emit `txs-added` event + +### 2. Marking as Mined + +When a block is finalized, `markAsMined()`: + +1. Move tx from pending to mined status +2. If previously soft-deleted, restore to mined status +3. Trigger eviction rules for `BLOCK_MINED` event + +### 3. Handling Reorgs + +When blocks are pruned, `markMinedAsPending()`: + +1. Remove tx from mined index +2. Rehydrate pending indexes +3. Trigger eviction rules for `CHAIN_PRUNED` event + +### 4. Deleting Transactions + +The `deleteTxs()` method handles two cases: + +- **Pending transactions**: Permanently deleted (transactions and all indexes to the transaction) +- **Mined transactions**: Soft-deleted by default (moved to `#deletedMinedTxHashes`), with option for permanent deletion + +Soft-deleted mined transactions are retained for potential future reference and can be permanently cleaned up later via `cleanupDeletedMinedTxs()`. + +### Nullifier Deduplication + +The pool prevents nullifier spam attacks by ensuring only one pending transaction can reference each unique nullifier. When an incoming transaction shares nullifiers with existing pending transactions: + +- **Higher fee wins**: If the incoming tx has a higher priority fee than ALL conflicting txs, those conflicting txs are replaced +- **Existing tx wins on tie**: If any conflicting tx has an equal or higher fee, the incoming tx is rejected +- **Partial overlap counts**: Even a single shared nullifier triggers conflict resolution + +This is enforced at entry time via the `#pendingNullifierToTxHash` index, which maps each nullifier to the tx hash that references it. The index is maintained atomically with tx additions and removals. + +## Eviction System + +The eviction system automatically removes invalid or low-priority transactions based on configurable rules. See the [`eviction/`](eviction/) subdirectory for implementation details. + +### Architecture + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ EvictionManager │ +│ Orchestrates eviction rules based on pool events │ +├─────────────────────────────────────────────────────────────────┤ +│ │ +│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ +│ │EvictionRule #1 │ │EvictionRule #2 │ │EvictionRule #N │ │ +│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ +│ │ +└─────────────────────────────────────────────────────────────────┘ + │ + ▼ + ┌─────────────────┐ + │ TxPoolOperations│ + │ (interface) │ + └─────────────────┘ +``` + +The [`EvictionManager`](eviction/eviction_manager.ts) coordinates eviction by: + +1. Registering multiple `EvictionRule` implementations +2. Calling each rule when tx pool events occur +3. Propagating configuration updates to all rules + +### Eviction Events + +| Event | Trigger | Purpose | +|-------|---------|---------| +| `TXS_ADDED` | New transactions added | Enforce pool size limits | +| `BLOCK_MINED` | Block finalized | Remove invalidated transactions | +| `CHAIN_PRUNED` | Chain reorganization | Remove txs referencing pruned blocks and re-evaluate fee payer balances | + +### Eviction Rules + +#### 1. `InvalidTxsAfterMiningRule` + +**Triggers on:** `BLOCK_MINED` + +Evicts transactions that become invalid after a block is mined: + +- Duplicate nullifiers: Txs with nullifiers already included in the mined block +- Expired transactions: Txs with `expirationTimestamp` ≤ mined block timestamp + +#### 2. `InvalidTxsAfterReorgRule` + +**Triggers on:** `CHAIN_PRUNED` + +Evicts transactions that reference blocks no longer in the canonical chain: + +- Checks each pending tx's anchor block hash against the archive tree +- Removes txs whose anchor blocks are not found (pruned) + +#### 3. `FeePayerBalanceEvictionRule` + +**Triggers on:** `TXS_ADDED`, `BLOCK_MINED`, `CHAIN_PRUNED` + +Evicts low-priority transactions when a fee payer's pending fee limits exceed their Fee Juice balance: + +- Evaluates transactions in priority order so higher-priority claims can fund lower-priority spends +- Accounts for self-funding claims made during setup +- Removes evictable txs that do not fit within the running balance + +#### 4. `LowPriorityEvictionRule` + +**Triggers on:** `TXS_ADDED` + +Enforces maximum pool size by evicting lowest-priority (by fee) transactions: + +- Configured via `maxPendingTxCount` option (0 = disabled) +- Uses `getLowestPriorityEvictable()` to find txs to evict + +### Non-Evictable Transactions + +Transactions can be marked as non-evictable via `markTxsAsNonEvictable()`. This protects them from all eviction rules, typically used during block building to ensure transactions being processed aren't evicted mid-operation. The flag is cleared after block processing via `clearNonEvictableTxs()`. +The `clearNonEvictableTxs` is called upon getting new L2 block. + +## Configuration + +The pool accepts configuration via `TxPoolOptions`: + +```typescript +type TxPoolOptions = { + maxPendingTxCount?: number; // Max pending txs (0 = unlimited) + archivedTxLimit?: number; // Number of archived txs to retain +}; +``` + +Configuration can be updated at runtime via `updateConfig()`. + +## Telemetry + +The pool integrates with the telemetry system to report: + +- Transaction counts (pending vs mined) +- Transaction sizes +- Store size estimates diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.test.ts new file mode 100644 index 000000000000..614c12c80d31 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.test.ts @@ -0,0 +1,534 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { times, timesAsync } from '@aztec/foundation/collection'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { map, sort, toArray } from '@aztec/foundation/iterable'; +import { openTmpStore } from '@aztec/kv-store/lmdb-v2'; +import { computeFeePayerBalanceLeafSlot } from '@aztec/protocol-contracts/fee-juice'; +import { GasFees } from '@aztec/stdlib/gas'; +import type { MerkleTreeReadOperations, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { mockTx } from '@aztec/stdlib/testing'; +import { + MerkleTreeId, + NullifierLeaf, + NullifierLeafPreimage, + PublicDataTreeLeaf, + PublicDataTreeLeafPreimage, +} from '@aztec/stdlib/trees'; +import { BlockHeader, GlobalVariables, TxHash } from '@aztec/stdlib/tx'; + +import { jest } from '@jest/globals'; +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { AztecKVTxPool } from './aztec_kv_tx_pool.js'; +import { describeTxPool } from './tx_pool_test_suite.js'; + +describe('KV TX pool', () => { + let txPool: AztecKVTxPool; + let worldState: MockProxy; + let db: MockProxy; + let nextTxSeed: number; + const mockFixedTxSize = 100; + + const block1Header = BlockHeader.empty({ + globalVariables: GlobalVariables.empty({ blockNumber: BlockNumber(1), timestamp: 0n }), + }); + const block2Header = BlockHeader.empty({ + globalVariables: GlobalVariables.empty({ blockNumber: BlockNumber(2), timestamp: 36n }), + }); + + const checkPendingTxConsistency = async () => { + const pendingTxHashCount = await txPool.getPendingTxHashes().then(h => h.length); + expect(await txPool.getPendingTxCount()).toEqual(pendingTxHashCount); + }; + + beforeEach(async () => { + nextTxSeed = 1; + + worldState = worldState = mock(); + db = mock(); + worldState.getCommitted.mockReturnValue(db); + worldState.getSnapshot.mockReturnValue(db); + + db.findLeafIndices.mockImplementation((_tree, leaves) => { + return Promise.resolve(times(leaves.length, () => 1n)); + }); + + db.getPreviousValueIndex.mockImplementation((_tree, slot) => { + return Promise.resolve({ index: slot, alreadyPresent: true }); + }); + db.getLeafPreimage.mockImplementation((tree, index) => { + return Promise.resolve( + tree === MerkleTreeId.NULLIFIER_TREE + ? new NullifierLeafPreimage(new NullifierLeaf(new Fr(index)), Fr.ONE, 1n) + : new PublicDataTreeLeafPreimage(new PublicDataTreeLeaf(new Fr(index), new Fr(1e18)), Fr.ONE, 1n), + ); + }); + + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState); + }); + + afterEach(checkPendingTxConsistency); + + describeTxPool(() => txPool); + + const mockFixedSizeTx = async (maxPriorityFeesPerGas?: GasFees) => { + const tx = await mockTx(nextTxSeed++, { maxPriorityFeesPerGas }); + jest.spyOn(tx, 'getSize').mockReturnValue(mockFixedTxSize); + return tx; + }; + + it('Returns archived txs and purges archived txs once the archived tx limit is reached', async () => { + // set the archived tx limit to 2 + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + archivedTxLimit: 2, + }); + + const txs = await timesAsync(5, i => mockTx(i + 1)); + await txPool.addTxs(txs); + + // Only mined txs should be archived, pending are never archived + await txPool.markAsMined( + txs.map(t => t.txHash), + block1Header, + ); + + const expectArchivedTx = async (txHash: TxHash, shouldExist: boolean) => { + const archived = await txPool.getArchivedTxByHash(txHash); + if (shouldExist) { + expect(archived).toBeDefined(); + expect(archived!.getTxHash()).toEqual(txHash); + } else { + expect(archived).toBeUndefined(); + } + }; + + // delete two txs and assert that they are properly archived + await txPool.deleteTxs([txs[0].getTxHash(), txs[1].getTxHash()]); + await expectArchivedTx(txs[0].getTxHash(), true); + await expectArchivedTx(txs[1].getTxHash(), true); + + // delete a single tx and assert that the first tx is purged and the new tx is archived + await txPool.deleteTxs([txs[2].getTxHash()]); + await expectArchivedTx(txs[0].getTxHash(), false); + await expectArchivedTx(txs[1].getTxHash(), true); + await expectArchivedTx(txs[2].getTxHash(), true); + + // delete multiple txs and assert that the old txs are purged and the new txs are archived + await txPool.deleteTxs([txs[3].getTxHash(), txs[4].getTxHash()]); + await expectArchivedTx(txs[0].getTxHash(), false); + await expectArchivedTx(txs[1].getTxHash(), false); + await expectArchivedTx(txs[2].getTxHash(), false); + await expectArchivedTx(txs[3].getTxHash(), true); + await expectArchivedTx(txs[4].getTxHash(), true); + }); + + it('Evicts low priority txs to satisfy the pending tx size limit', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + maxPendingTxCount: 3, + }); + + const tx1 = await mockTx(1, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + const tx2 = await mockTx(2, { maxPriorityFeesPerGas: new GasFees(2, 2) }); + const tx3 = await mockTx(3, { maxPriorityFeesPerGas: new GasFees(3, 3) }); + await txPool.addTxs([tx1, tx2, tx3]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx3.getTxHash(), tx2.getTxHash(), tx1.getTxHash()]); + + // once the tx pool size limit is reached, the lowest priority txs (tx1, tx2) should be evicted + const tx4 = await mockTx(4, { maxPriorityFeesPerGas: new GasFees(4, 4) }); + const tx5 = await mockTx(5, { maxPriorityFeesPerGas: new GasFees(5, 5) }); + await txPool.addTxs([tx4, tx5]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx4.getTxHash(), tx3.getTxHash()]); + + // if another low priority tx is added after the tx pool size limit is reached, it should be evicted + const tx6 = await mockTx(6, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + await txPool.addTxs([tx6]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx4.getTxHash(), tx3.getTxHash()]); + + // if a tx is deleted, any txs can be added until the tx pool size limit is reached + await txPool.deleteTxs([tx3.getTxHash()]); + const tx7 = await mockTx(7, { maxPriorityFeesPerGas: new GasFees(2, 2) }); + await txPool.addTxs([tx7]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx4.getTxHash(), tx7.getTxHash()]); + + // if a tx is mined, any txs can be added until the tx pool size limit is reached + await txPool.markAsMined([tx4.getTxHash()], block1Header); + const tx8 = await mockTx(8, { maxPriorityFeesPerGas: new GasFees(3, 3) }); + await txPool.addTxs([tx8]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx8.getTxHash(), tx7.getTxHash()]); + + // verify that the tx pool size limit is respected after mining and deletions + const tx9 = await mockTx(9, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + await txPool.addTxs([tx9]); + await checkPendingTxConsistency(); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx8.getTxHash(), tx7.getTxHash()]); + }); + + it('respects the maximum transaction count configured', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + maxPendingTxCount: 10, // pool should contain no more than 10 txs + }); + + const cmp = (a: TxHash, b: TxHash) => (a.toBigInt() < b.toBigInt() ? -1 : a.toBigInt() > b.toBigInt() ? 1 : 0); + + const firstBatch = await timesAsync(10, () => mockFixedSizeTx()); + await txPool.addTxs(firstBatch); + + // we've just added 10 txs. They should all be available + expect(await toArray(sort(await txPool.getPendingTxHashes(), cmp))).toEqual( + await toArray( + sort( + map(firstBatch, tx => tx.getTxHash()), + cmp, + ), + ), + ); + + const secondBatch = await timesAsync(2, () => mockFixedSizeTx()); + await txPool.addTxs(secondBatch); + + // pool should evict 2 txs to bring it back to 10 + expect(await txPool.getPendingTxCount()).toBe(10); + + const lastTx = await mockFixedSizeTx(); + await txPool.addTxs([lastTx]); + + // the pool should evict enough txs to stay below the limit + expect(await txPool.getPendingTxCount()).toBe(10); + }); + + it('evicts based on the updated size limit', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + maxPendingTxCount: 10, // pool should contain no more than 10 mock txs + }); + + const cmp = (a: TxHash, b: TxHash) => (a.toBigInt() < b.toBigInt() ? -1 : a.toBigInt() > b.toBigInt() ? 1 : 0); + + const firstBatch = await timesAsync(10, (i: number) => mockFixedSizeTx(new GasFees(i + 1, i + 1))); + const expectedRemainingTxs = firstBatch.slice(6); + await txPool.addTxs(firstBatch); + + // we've just added 10 txs. They should all be available + expect(await toArray(sort(await txPool.getPendingTxHashes(), cmp))).toEqual( + await toArray( + sort( + map(firstBatch, tx => tx.getTxHash()), + cmp, + ), + ), + ); + + // now set the limit to 5 txs + const numRemainingTxs = 5; + txPool.updateConfig({ maxPendingTxCount: numRemainingTxs }); + + // txs are not immediately evicted + expect(await toArray(sort(await txPool.getPendingTxHashes(), cmp))).toEqual( + await toArray( + sort( + map(firstBatch, tx => tx.getTxHash()), + cmp, + ), + ), + ); + + // now add one more transaction + const lastTx = await mockFixedSizeTx(new GasFees(20, 20)); + await txPool.addTxs([lastTx]); + + const finalExpectedPool = expectedRemainingTxs.concat(lastTx); + + // There should now just be numRemainingTxs txs in the pool + expect(await txPool.getPendingTxCount()).toEqual(finalExpectedPool.length); + + expect(await toArray(sort(await txPool.getPendingTxHashes(), cmp))).toEqual( + await toArray( + sort( + map(finalExpectedPool, tx => tx.getTxHash()), + cmp, + ), + ), + ); + }); + + it('Evicts txs with nullifiers that are already included in the mined block', async () => { + const tx1 = await mockTx(1, { numberOfNonRevertiblePublicCallRequests: 1 }); + const tx2 = await mockTx(2, { numberOfNonRevertiblePublicCallRequests: 1 }); + const tx3 = await mockTx(3, { numberOfNonRevertiblePublicCallRequests: 1 }); + const tx4 = await mockTx(4, { numberOfNonRevertiblePublicCallRequests: 1 }); + + // simulate a situation where tx1, tx2, and tx3 have the same nullifier + tx2.data.forPublic!.nonRevertibleAccumulatedData.nullifiers[0] = + tx1.data.forPublic!.nonRevertibleAccumulatedData.nullifiers[0]; + tx3.data.forPublic!.nonRevertibleAccumulatedData.nullifiers[0] = + tx1.data.forPublic!.nonRevertibleAccumulatedData.nullifiers[0]; + + await txPool.addTxs([tx1, tx2, tx3, tx4]); + await txPool.markAsMined([tx1.getTxHash()], block1Header); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx4.getTxHash()]); + }); + + it('Evicts txs with an insufficient fee payer balance after a block is mined', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + const tx4 = await mockTx(4); + + // modify tx1 to have the same fee payer as the mined tx and an insufficient fee payer balance + tx1.data.feePayer = tx4.data.feePayer; + const prev = db.getLeafPreimage.getMockImplementation()!; + const expectedSlot = await computeFeePayerBalanceLeafSlot(tx1.data.feePayer); + db.getLeafPreimage.mockImplementation((tree, index) => { + if (index === expectedSlot.toBigInt() && tree === MerkleTreeId.PUBLIC_DATA_TREE) { + return Promise.resolve( + // this feePayer has a balance of 0 now + new PublicDataTreeLeafPreimage(new PublicDataTreeLeaf(tx1.data.feePayer.toField(), Fr.ZERO), Fr.ONE, 1n), + ); + } else { + return prev(tree, index); + } + }); + + await txPool.addTxs([tx1, tx2, tx3, tx4]); + await txPool.markAsMined([tx4.getTxHash()], block1Header); + + const pendingTxHashes = await txPool.getPendingTxHashes(); + expect(pendingTxHashes).toEqual(expect.arrayContaining([tx2.getTxHash(), tx3.getTxHash()])); + expect(pendingTxHashes).toHaveLength(2); + }); + + it('Evicts txs with an expiration timestamp lower than or equal to the timestamp of the mined block', async () => { + const tx1 = await mockTx(1); + tx1.data.expirationTimestamp = 0n; + const tx2 = await mockTx(2); + tx2.data.expirationTimestamp = 32n; + const tx3 = await mockTx(3); + tx3.data.expirationTimestamp = 64n; + + await txPool.addTxs([tx1, tx2, tx3]); + await txPool.markAsMined([tx1.getTxHash()], block2Header); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx3.getTxHash()]); + }); + + it('Evicts txs with invalid archive roots after a reorg', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + // modify tx1 to return no archive indices + tx1.data.constants.anchorBlockHeader.globalVariables.blockNumber = BlockNumber(1); + const tx1HeaderHash = await tx1.data.constants.anchorBlockHeader.hash(); + const tx1HeaderHashFr = tx1HeaderHash; + db.findLeafIndices.mockImplementation((tree, leaves) => { + if (tree === MerkleTreeId.ARCHIVE) { + return Promise.resolve((leaves as Fr[]).map(l => (l.equals(tx1HeaderHashFr) ? undefined : 1n))); + } + return Promise.resolve([]); + }); + + await txPool.addTxs([tx1, tx2, tx3]); + const txHashes = [tx1.getTxHash(), tx2.getTxHash(), tx3.getTxHash()]; + await txPool.markAsMined(txHashes, block1Header); + await txPool.markMinedAsPending(txHashes, tx2.data.constants.anchorBlockHeader.getBlockNumber()); + + const pendingTxHashes = await txPool.getPendingTxHashes(); + expect(pendingTxHashes).toEqual(expect.arrayContaining([tx2.getTxHash(), tx3.getTxHash()])); + expect(pendingTxHashes).toHaveLength(2); + }); + + it('Evicts txs with invalid fee payer balances after a reorg', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + await txPool.addTxs([tx1, tx2, tx3]); + await txPool.markAsMined([tx2.getTxHash()], block1Header); + await checkPendingTxConsistency(); + + const prev = db.getLeafPreimage.getMockImplementation()!; + const expectedSlot = await computeFeePayerBalanceLeafSlot(tx1.data.feePayer); + db.getLeafPreimage.mockImplementation((tree, index) => { + if (index === expectedSlot.toBigInt() && tree === MerkleTreeId.PUBLIC_DATA_TREE) { + return Promise.resolve( + // this feePayer has a balance of 0 now + new PublicDataTreeLeafPreimage(new PublicDataTreeLeaf(tx1.data.feePayer.toField(), Fr.ZERO), Fr.ONE, 1n), + ); + } else { + return prev(tree, index); + } + }); + + await txPool.markMinedAsPending([tx2.getTxHash()], BlockNumber(1)); + await checkPendingTxConsistency(); + + const pendingTxHashes = await txPool.getPendingTxHashes(); + expect(pendingTxHashes).toEqual(expect.arrayContaining([tx2.getTxHash(), tx3.getTxHash()])); + expect(pendingTxHashes).toHaveLength(2); + }); + + it('Does not evict low priority txs marked as non-evictable', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + maxPendingTxCount: 3, + }); + + const tx1 = await mockTx(1, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + const tx2 = await mockTx(2, { maxPriorityFeesPerGas: new GasFees(2, 2) }); + const tx3 = await mockTx(3, { maxPriorityFeesPerGas: new GasFees(3, 3) }); + await txPool.addTxs([tx1, tx2, tx3]); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx3.getTxHash(), tx2.getTxHash(), tx1.getTxHash()]); + + const tx1Hash = tx1.getTxHash(); + await txPool.markTxsAsNonEvictable([tx1Hash]); + + // once the tx pool size limit is reached, the lowest priority txs that are evictable (tx2, tx3) should be evicted + const tx4 = await mockTx(4, { maxPriorityFeesPerGas: new GasFees(4, 4) }); + const tx5 = await mockTx(5, { maxPriorityFeesPerGas: new GasFees(5, 5) }); + await txPool.addTxs([tx4, tx5]); + await expect(txPool.getPendingTxHashes()).resolves.toEqual([tx5.getTxHash(), tx4.getTxHash(), tx1.getTxHash()]); + }); + + describe('getLowestPriorityEvictable', () => { + it('returns the lowest-priority evictable tx hashes up to limit', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState, undefined, { + maxPendingTxCount: 0, + }); + + const tx1 = await mockTx(1, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + const tx2 = await mockTx(2, { maxPriorityFeesPerGas: new GasFees(2, 2) }); + const tx3 = await mockTx(3, { maxPriorityFeesPerGas: new GasFees(3, 3) }); + const tx4 = await mockTx(4, { maxPriorityFeesPerGas: new GasFees(4, 4) }); + await txPool.addTxs([tx3, tx1, tx4, tx2]); + + // Mark tx2 as non-evictable; tx1 should be considered first + await txPool.markTxsAsNonEvictable([tx2.getTxHash()]); + + const res1 = await txPool.getLowestPriorityEvictable(1); + expect(res1).toEqual([tx1.getTxHash()]); + + const res2 = await txPool.getLowestPriorityEvictable(2); + // After skipping non-evictable tx2, next lowest is tx3 + expect(res2).toEqual([tx1.getTxHash(), tx3.getTxHash()]); + + const res3 = await txPool.getLowestPriorityEvictable(10); + expect(res3).toEqual([tx1.getTxHash(), tx3.getTxHash(), tx4.getTxHash()]); + }); + + it('respects zero and all non-evictable cases', async () => { + txPool = new AztecKVTxPool(await openTmpStore('p2p'), await openTmpStore('archive'), worldState); + const tx1 = await mockTx(10, { maxPriorityFeesPerGas: new GasFees(1, 1) }); + await txPool.addTxs([tx1]); + + expect(await txPool.getLowestPriorityEvictable(0)).toEqual([]); + + await txPool.markTxsAsNonEvictable([tx1.getTxHash()]); + expect(await txPool.getLowestPriorityEvictable(1)).toEqual([]); + }); + }); + + /** + * Nullifier Index Consistency Tests + * + * These integration tests verify that the nullifier index is maintained + * correctly across all pool operations (add, delete, mine, reorg). + */ + describe('Nullifier index consistency', () => { + // Tx type alias for cleaner type annotations + type MockTx = Awaited>; + + // Helper to create a public tx (forPublic path) with a specific fee + const mockPublicTx = (seed: number, fee: number) => + mockTx(seed, { + maxPriorityFeesPerGas: new GasFees(fee, fee), + numberOfNonRevertiblePublicCallRequests: 1, + }); + + // Helper to set a specific nullifier on a transaction + const setNullifier = (tx: MockTx, index: number, value: Fr) => { + if (tx.data.forPublic) { + tx.data.forPublic.nonRevertibleAccumulatedData.nullifiers[index] = value; + } else if (tx.data.forRollup) { + tx.data.forRollup.end.nullifiers[index] = value; + } + }; + + const getNullifier = (tx: MockTx, index: number): Fr => { + if (tx.data.forPublic) { + return tx.data.forPublic.nonRevertibleAccumulatedData.nullifiers[index]; + } else if (tx.data.forRollup) { + return tx.data.forRollup.end.nullifiers[index]; + } + throw new Error('Transaction has no nullifiers'); + }; + + it('removes nullifier entries when tx is deleted', async () => { + const tx1 = await mockPublicTx(1, 5); + await txPool.addTxs([tx1]); + await txPool.deleteTxs([tx1.getTxHash()]); + + // Add a new tx with the same nullifier - should succeed + const tx2 = await mockPublicTx(2, 1); + setNullifier(tx2, 0, getNullifier(tx1, 0)); + + await txPool.addTxs([tx2]); + const pending = await txPool.getPendingTxHashes(); + expect(pending).toContainEqual(tx2.getTxHash()); + }); + + it('removes nullifier entries when tx is mined', async () => { + const tx1 = await mockPublicTx(1, 5); + await txPool.addTxs([tx1]); + await txPool.markAsMined([tx1.getTxHash()], block1Header); + + // Add a new tx with the same nullifier, it should succeed + // (In practice this would fail world state nullifier check, + // but we're testing pool index consistency) + const tx2 = await mockPublicTx(2, 1); + setNullifier(tx2, 0, getNullifier(tx1, 0)); + + await txPool.addTxs([tx2]); + const pending = await txPool.getPendingTxHashes(); + expect(pending).toContainEqual(tx2.getTxHash()); + }); + + it('restores nullifier entries on reorg (markMinedAsPending)', async () => { + const tx1 = await mockPublicTx(1, 10); + await txPool.addTxs([tx1]); + await txPool.markAsMined([tx1.getTxHash()], block1Header); + await txPool.markMinedAsPending([tx1.getTxHash()], BlockNumber(0)); + + // Now tx1 is pending again - nullifier should be claimed + const tx2 = await mockPublicTx(2, 1); + setNullifier(tx2, 0, getNullifier(tx1, 0)); + + await txPool.addTxs([tx2]); + const pending = await txPool.getPendingTxHashes(); + expect(pending).toContainEqual(tx1.getTxHash()); + expect(pending).not.toContainEqual(tx2.getTxHash()); // tx2 has lower fee, should be rejected + }); + + it('cleans up nullifier index when replacement happens', async () => { + const tx1 = await mockPublicTx(1, 5); + const tx2 = await mockPublicTx(2, 10); + + setNullifier(tx2, 0, getNullifier(tx1, 0)); + + await txPool.addTxs([tx1]); + await txPool.addTxs([tx2]); // Replaces tx1 + + // Now add tx3 with the same nullifier as tx2 but lower fee + // It should be rejected because tx2 owns that nullifier now + const tx3 = await mockPublicTx(3, 3); + setNullifier(tx3, 0, getNullifier(tx2, 0)); + + await txPool.addTxs([tx3]); + const pending = await txPool.getPendingTxHashes(); + expect(pending).toContainEqual(tx2.getTxHash()); + expect(pending).not.toContainEqual(tx3.getTxHash()); + expect(pending.length).toBe(1); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts new file mode 100644 index 000000000000..13b265c126c3 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts @@ -0,0 +1,746 @@ +import { insertIntoSortedArray } from '@aztec/foundation/array'; +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { toArray } from '@aztec/foundation/iterable'; +import { type Logger, createLogger } from '@aztec/foundation/log'; +import type { TypedEventEmitter } from '@aztec/foundation/types'; +import type { AztecAsyncKVStore, AztecAsyncMap, AztecAsyncMultiMap } from '@aztec/kv-store'; +import { AztecAddress } from '@aztec/stdlib/aztec-address'; +import type { MerkleTreeReadOperations, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { ChonkProof } from '@aztec/stdlib/proofs'; +import type { TxAddedToPoolStats } from '@aztec/stdlib/stats'; +import { BlockHeader, Tx, TxHash } from '@aztec/stdlib/tx'; +import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client'; + +import assert from 'assert'; +import EventEmitter from 'node:events'; + +import { ArchiveCache } from '../../msg_validators/tx_validator/archive_cache.js'; +import { PoolInstrumentation, PoolName, type PoolStatsCallback } from '../instrumentation.js'; +import { EvictionManager } from './eviction/eviction_manager.js'; +import { + FeePayerTxInfo, + type PendingTxInfo, + type PreAddPoolAccess, + type TxBlockReference, + type TxPoolOperations, +} from './eviction/eviction_strategy.js'; +import { FeePayerBalanceEvictionRule } from './eviction/fee_payer_balance_eviction_rule.js'; +import { InvalidTxsAfterMiningRule } from './eviction/invalid_txs_after_mining_rule.js'; +import { InvalidTxsAfterReorgRule } from './eviction/invalid_txs_after_reorg_rule.js'; +import { LowPriorityEvictionRule } from './eviction/low_priority_eviction_rule.js'; +import { NullifierConflictPreAddRule } from './eviction/nullifier_conflict_pre_add_rule.js'; +import { getPendingTxPriority } from './priority.js'; +import type { TxPool, TxPoolEvents, TxPoolOptions } from './tx_pool.js'; + +/** + * KV implementation of the Transaction Pool. + */ +export class AztecKVTxPool + extends (EventEmitter as new () => TypedEventEmitter) + implements TxPool, TxPoolOperations +{ + #store: AztecAsyncKVStore; + + /** Our tx pool, stored as a Map, with K: tx hash and V: the transaction. */ + #txs: AztecAsyncMap; + + /** Holds the historical block for each tx */ + #pendingTxHashToHistoricalBlockHeaderHash: AztecAsyncMap; + + /** Index from tx hash to the block number in which they were mined, filtered by mined txs. */ + #minedTxHashToBlock: AztecAsyncMap; + + /** Index from tx priority (stored as hex) to its tx hash, filtered by pending txs. */ + #pendingTxPriorityToHash: AztecAsyncMultiMap; + + /** Map from tx hash to the block number it was originally mined in (for soft-deleted txs). */ + #deletedMinedTxHashes: AztecAsyncMap; + + /** MultiMap from block number to deleted mined tx hashes for efficient cleanup. */ + #blockToDeletedMinedTxHash: AztecAsyncMultiMap; + + #historicalHeaderToTxHash: AztecAsyncMultiMap; + + #feePayerToBalanceEntry: AztecAsyncMultiMap; + + /** Index from nullifier to pending tx hash */ + #pendingNullifierToTxHash: AztecAsyncMap; + + /** In-memory set of txs that should not be evicted from the pool. */ + #nonEvictableTxs: Set; + + /** KV store for archived txs. */ + #archive: AztecAsyncKVStore; + + /** Archived txs map for future lookup. */ + #archivedTxs: AztecAsyncMap; + + /** Indexes of the archived txs by insertion order. */ + #archivedTxIndices: AztecAsyncMap; + + /** Number of txs to archive. */ + #archivedTxLimit: number = 0; + + #evictionManager: EvictionManager; + + #log: Logger; + + #metrics: PoolInstrumentation; + + /** + * Class constructor for KV TxPool. Initiates our transaction pool as an AztecMap. + * @param store - A KV store for live txs in the pool. + * @param archive - A KV store for archived txs. + * @param telemetry - A telemetry client. + * @param archivedTxLimit - The number of txs to archive. + * @param log - A logger. + */ + constructor( + store: AztecAsyncKVStore, + archive: AztecAsyncKVStore, + worldState: WorldStateSynchronizer, + telemetry: TelemetryClient = getTelemetryClient(), + config: TxPoolOptions = {}, + log = createLogger('p2p:tx_pool'), + ) { + super(); + + this.#log = log; + + this.#evictionManager = new EvictionManager(this); + this.#evictionManager.registerRule(new InvalidTxsAfterMiningRule()); + this.#evictionManager.registerRule(new InvalidTxsAfterReorgRule(worldState)); + this.#evictionManager.registerRule(new FeePayerBalanceEvictionRule(worldState)); + this.#evictionManager.registerRule( + new LowPriorityEvictionRule({ + //NOTE: 0 effectively disables low priority eviction + maxPoolSize: config.maxPendingTxCount ?? 0, + }), + ); + this.#evictionManager.registerPreAddRule(new NullifierConflictPreAddRule()); + + this.updateConfig(config); + + this.#txs = store.openMap('txs'); + this.#minedTxHashToBlock = store.openMap('txHashToBlockMined'); + this.#pendingTxPriorityToHash = store.openMultiMap('pendingTxFeeToHash'); + this.#deletedMinedTxHashes = store.openMap('deletedMinedTxHashes'); + this.#blockToDeletedMinedTxHash = store.openMultiMap('blockToDeletedMinedTxHash'); + + this.#pendingTxHashToHistoricalBlockHeaderHash = store.openMap('txHistoricalBlock'); + this.#historicalHeaderToTxHash = store.openMultiMap('historicalHeaderToPendingTxHash'); + this.#feePayerToBalanceEntry = store.openMultiMap('feePayerToBalanceEntry'); + this.#pendingNullifierToTxHash = store.openMap('pendingNullifierToTxHash'); + + this.#nonEvictableTxs = new Set(); + + this.#archivedTxs = archive.openMap('archivedTxs'); + this.#archivedTxIndices = archive.openMap('archivedTxIndices'); + + this.#store = store; + this.#archive = archive; + + this.#metrics = new PoolInstrumentation(telemetry, PoolName.TX_POOL, this.countTxs, () => store.estimateSize()); + } + + private countTxs: PoolStatsCallback = async () => { + const [pending = 0, mined = 0] = await Promise.all([this.getPendingTxCount(), this.getMinedTxCount()]); + + return Promise.resolve({ + itemCount: { + pending, + mined, + }, + }); + }; + + public async isEmpty(): Promise { + for await (const _ of this.#txs.entriesAsync()) { + return false; + } + return true; + } + + /** + * Marks transactions as mined in a block and updates the pool state accordingly. + * Removes the transactions from the pending set and adds them to the mined set. + * Also evicts any transactions that become invalid after the block is mined. + * @param txHashes - Array of transaction hashes that were mined + * @param blockHeader - The header of the block the transactions were mined in + */ + public async markAsMined(txHashes: TxHash[], blockHeader: BlockHeader): Promise { + if (txHashes.length === 0) { + return Promise.resolve(); + } + + const uniqueMinedNullifiers: Fr[] = []; + const uniqueMinedFeePayers: AztecAddress[] = []; + + try { + await this.#store.transactionAsync(async () => { + for (const hash of txHashes) { + const key = hash.toString(); + await this.#minedTxHashToBlock.set(key, blockHeader.globalVariables.blockNumber); + + const tx = await this.getTxByHash(hash); + if (tx) { + const nullifiers = tx.data.getNonEmptyNullifiers(); + + nullifiers.forEach(nullifier => insertIntoSortedArray(uniqueMinedNullifiers, nullifier, Fr.cmp, false)); + insertIntoSortedArray( + uniqueMinedFeePayers, + tx.data.feePayer, + (a, b) => a.toField().cmp(b.toField()), + false, + ); + + await this.removePendingTxIndicesInDbTx(tx, key); + } + + // If this tx was previously soft-deleted, remove it from the deleted sets + if (await this.#deletedMinedTxHashes.hasAsync(key)) { + const originalBlock = await this.#deletedMinedTxHashes.getAsync(key); + await this.#deletedMinedTxHashes.delete(key); + // Remove from block-to-hash mapping + if (originalBlock !== undefined) { + await this.#blockToDeletedMinedTxHash.deleteValue(originalBlock, key); + } + } + } + }); + + await this.#evictionManager.evictAfterNewBlock(blockHeader, uniqueMinedNullifiers, uniqueMinedFeePayers); + + this.#metrics.transactionsRemoved(txHashes.map(hash => hash.toBigInt())); + } catch (err) { + this.#log.warn('Unexpected error when marking txs as mined', { err }); + } + } + + public async markMinedAsPending(txHashes: TxHash[], latestBlock: BlockNumber): Promise { + if (txHashes.length === 0) { + return Promise.resolve(); + } + try { + await this.#store.transactionAsync(async () => { + for (const hash of txHashes) { + const key = hash.toString(); + await this.#minedTxHashToBlock.delete(key); + + // Clear soft-delete metadata if this tx was previously soft-deleted, + // so cleanupDeletedMinedTxs won't later hard-delete it while it's pending + const deletedBlock = await this.#deletedMinedTxHashes.getAsync(key); + if (deletedBlock !== undefined) { + await this.#deletedMinedTxHashes.delete(key); + await this.#blockToDeletedMinedTxHash.deleteValue(deletedBlock, key); + } + + // Rehydrate the tx in the in-memory pending txs mapping + const tx = await this.getTxByHash(hash); + if (tx) { + await this.addPendingTxIndicesInDbTx(tx, key); + } + } + }); + + await this.#evictionManager.evictAfterChainPrune(latestBlock); + } catch (err) { + this.#log.warn('Unexpected error when marking mined txs as pending', { err }); + } + } + + public async getPendingTxHashes(): Promise { + const vals = await toArray(this.#pendingTxPriorityToHash.valuesAsync({ reverse: true })); + return vals.map(TxHash.fromString); + } + + /** + * Checks if a transaction exists in the pool and returns it. + * @param txHash - The generated tx hash. + * @returns The transaction, if found, 'undefined' otherwise. + */ + public async getTxByHash(txHash: TxHash): Promise { + const buffer = await this.#txs.getAsync(txHash.toString()); + return buffer ? Tx.fromBuffer(buffer) : undefined; + } + + async getTxsByHash(txHashes: TxHash[]): Promise<(Tx | undefined)[]> { + const txs = await Promise.all(txHashes.map(txHash => this.#txs.getAsync(txHash.toString()))); + return txs.map(buffer => (buffer ? Tx.fromBuffer(buffer) : undefined)); + } + + async hasTxs(txHashes: TxHash[]): Promise { + return await Promise.all(txHashes.map(txHash => this.#txs.hasAsync(txHash.toString()))); + } + + async hasTx(txHash: TxHash): Promise { + const result = await this.hasTxs([txHash]); + return result[0]; + } + + /** + * Checks if an archived tx exists and returns it. + * @param txHash - The tx hash. + * @returns The transaction metadata, if found, 'undefined' otherwise. + */ + public async getArchivedTxByHash(txHash: TxHash): Promise { + const buffer = await this.#archivedTxs.getAsync(txHash.toString()); + return buffer ? Tx.fromBuffer(buffer) : undefined; + } + + /** + * Adds a list of transactions to the pool. Duplicates are ignored. + * Handles nullifier deduplication: if an incoming tx has a nullifier conflict with + * existing pending txs, it will either replace them (if higher fee) or be rejected. + * @param txs - An array of txs to be added to the pool. + * @returns count of added transactions + */ + public async addTxs(txs: Tx[], opts: { source?: string } = {}): Promise { + if (txs.length === 0) { + return Promise.resolve(0); + } + + const addedTxs: Tx[] = []; + const uniqueFeePayers: AztecAddress[] = []; + const replacedTxHashes: TxHash[] = []; + const hashesAndStats = txs.map(tx => ({ txHash: tx.getTxHash(), txStats: tx.getStats() })); + try { + await this.#store.transactionAsync(async () => { + for (let i = 0; i < txs.length; i++) { + const tx = txs[i]; + const { txHash, txStats } = hashesAndStats[i]; + const key = txHash.toString(); + if (await this.#txs.hasAsync(key)) { + this.#log.debug(`Tx ${key} already exists in the pool`); + continue; + } + + const poolAccess = this.getPreAddPoolAccess(); + const { shouldReject, txHashesToEvict } = await this.#evictionManager.runPreAddRules(tx, poolAccess); + if (shouldReject) { + continue; + } + + for (const txHashToEvict of txHashesToEvict) { + const txToDelete = await this.getTxByHash(txHashToEvict); + if (txToDelete) { + const evictedKey = txHashToEvict.toString(); + await this.deletePendingTxInDbTx(txToDelete, evictedKey); + replacedTxHashes.push(txHashToEvict); + this.#log.verbose(`Evicted tx ${evictedKey} due to higher-fee tx ${key}`); + } + } + + this.#log.verbose(`Adding tx ${key} to pool`, { + eventName: 'tx-added-to-pool', + ...txStats, + } satisfies TxAddedToPoolStats); + + await this.#txs.set(key, tx.toBuffer()); + addedTxs.push(tx); + insertIntoSortedArray(uniqueFeePayers, tx.data.feePayer, (a, b) => a.toField().cmp(b.toField()), false); + + await this.#pendingTxHashToHistoricalBlockHeaderHash.set( + key, + (await tx.data.constants.anchorBlockHeader.hash()).toString(), + ); + + if (!(await this.#minedTxHashToBlock.hasAsync(key))) { + await this.addPendingTxIndicesInDbTx(tx, key); + this.#metrics.recordSize(tx); + } + } + }); + + await this.#evictionManager.evictAfterNewTxs( + addedTxs.map(({ txHash }) => txHash), + uniqueFeePayers, + ); + } catch (err) { + this.#log.warn('Unexpected error when adding txs', { err }); + } + + if (replacedTxHashes.length > 0) { + this.#metrics.transactionsRemoved(replacedTxHashes.map(hash => hash.toBigInt())); + } + + if (addedTxs.length > 0) { + this.#metrics.transactionsAdded(addedTxs); + this.emit('txs-added', { ...opts, txs: addedTxs }); + } + return addedTxs.length; + } + + /** + * Deletes transactions from the pool. Tx hashes that are not present are ignored. + * Mined transactions are soft-deleted with a timestamp, pending transactions are permanently deleted. + * @param txHashes - An array of tx hashes to be deleted from the tx pool. + * @returns Empty promise. + */ + public deleteTxs(txHashes: TxHash[], opts?: { permanently?: boolean }): Promise { + if (txHashes.length === 0) { + return Promise.resolve(); + } + + const deletedTxs: Tx[] = []; + const poolDbTx = this.#store.transactionAsync(async () => { + for (const hash of txHashes) { + const key = hash.toString(); + const tx = await this.getTxByHash(hash); + if (!tx) { + this.#log.trace(`Skipping deletion of missing tx ${key} from pool`); + continue; + } + + const minedBlockNumber = await this.#minedTxHashToBlock.getAsync(key); + const txIsPending = minedBlockNumber === undefined; + if (txIsPending) { + await this.deletePendingTxInDbTx(tx, key); + } else { + await this.deleteMinedTx(key, minedBlockNumber!, opts?.permanently ?? false); + const shouldArchiveTx = this.#archivedTxLimit && !opts?.permanently; + if (shouldArchiveTx) { + deletedTxs.push(tx); + } + } + } + }); + this.#metrics.transactionsRemoved(txHashes.map(hash => hash.toBigInt())); + this.#log.debug(`Deleted ${txHashes.length} txs from pool`, { txHashes }); + + return this.#archivedTxLimit ? poolDbTx.then(() => this.archiveTxs(deletedTxs)) : poolDbTx; + } + + private async deleteMinedTx(txHash: `0x${string}`, minedBlockNumber: BlockNumber, permanently: boolean) { + await this.#minedTxHashToBlock.delete(txHash); + if (permanently) { + this.#log.trace(`Deleting mined tx ${txHash} from pool`); + await this.#txs.delete(txHash); + return; + } + + // Soft-delete mined transactions: remove from mined set but keep in storage + this.#log.trace(`Soft-deleting mined tx ${txHash} from pool`); + await this.#deletedMinedTxHashes.set(txHash, minedBlockNumber); + await this.#blockToDeletedMinedTxHash.set(minedBlockNumber, txHash); + } + + // Assumes being called within a DB transaction + private async deletePendingTxInDbTx(tx: Tx, txHash: `0x${string}`) { + // We always permanently delete pending transactions + this.#log.trace(`Deleting pending tx ${txHash} from pool`); + await this.removePendingTxIndicesInDbTx(tx, txHash); + await this.#txs.delete(txHash); + await this.#pendingTxHashToHistoricalBlockHeaderHash.delete(txHash); + } + + /** + * Gets all the transactions stored in the pool. + * @returns Array of tx objects in the order they were added to the pool. + */ + public async getAllTxs(): Promise { + const vals = await toArray(this.#txs.valuesAsync()); + return vals.map(buffer => Tx.fromBuffer(buffer)); + } + + /** + * Gets the hashes of all transactions currently in the tx pool. + * @returns An array of transaction hashes found in the tx pool. + */ + public async getAllTxHashes(): Promise { + const vals = await toArray(this.#txs.keysAsync()); + return vals.map(x => TxHash.fromString(x)); + } + + public async getPendingTxInfos(): Promise { + const vals = await toArray(this.#pendingTxPriorityToHash.valuesAsync()); + const results = await Promise.all(vals.map(val => this.getPendingTxInfo(TxHash.fromString(val)))); + return results.filter((info): info is PendingTxInfo => info !== undefined); + } + + private async getPendingTxInfo(txHash: TxHash): Promise { + let historicalBlockHash = await this.#pendingTxHashToHistoricalBlockHeaderHash.getAsync(txHash.toString()); + // Not all tx might have this index created. + if (!historicalBlockHash) { + const tx = await this.getTxByHash(txHash); + if (!tx) { + this.#log.warn(`PendingTxInfo:tx ${txHash} not found`); + return undefined; + } + + historicalBlockHash = (await tx.data.constants.anchorBlockHeader.hash()).toString(); + await this.#pendingTxHashToHistoricalBlockHeaderHash.set(txHash.toString(), historicalBlockHash); + } + + return { + txHash, + blockHash: Fr.fromString(historicalBlockHash), + isEvictable: !this.#nonEvictableTxs.has(txHash.toString()), + }; + } + + public async getPendingTxsReferencingBlocks(blockHashes: Fr[]): Promise { + const result: TxBlockReference[] = []; + for (const blockHash of blockHashes) { + const chunk = await toArray(this.#historicalHeaderToTxHash.getValuesAsync(blockHash.toString())); + result.push( + ...chunk.map(txHash => ({ + txHash: TxHash.fromString(txHash), + blockHash, + isEvictable: !this.#nonEvictableTxs.has(txHash), + })), + ); + } + + return result; + } + + public async getPendingFeePayers(): Promise { + const feePayers: AztecAddress[] = []; + for await (const feePayer of this.#feePayerToBalanceEntry.keysAsync()) { + const address = AztecAddress.fromString(feePayer); + insertIntoSortedArray(feePayers, address, (a, b) => a.toField().cmp(b.toField()), false); + } + return feePayers; + } + + public async *getFeePayerTxInfos(feePayer: AztecAddress): AsyncIterable { + for await (const value of this.#feePayerToBalanceEntry.getValuesAsync(feePayer.toString())) { + const info = FeePayerTxInfo.decode(value); + info.isEvictable = !this.#nonEvictableTxs.has(info.txHash.toString()); + yield info; + } + } + + public async getMinedTxHashes(): Promise<[TxHash, BlockNumber][]> { + const vals = await toArray(this.#minedTxHashToBlock.entriesAsync()); + return vals.map(([txHash, blockNumber]) => [TxHash.fromString(txHash), blockNumber]); + } + + public async getPendingTxCount(): Promise { + return (await this.#pendingTxPriorityToHash.sizeAsync()) ?? 0; + } + + public async getMinedTxCount(): Promise { + return (await this.#minedTxHashToBlock.sizeAsync()) ?? 0; + } + + public async getTxStatus(txHash: TxHash): Promise<'pending' | 'mined' | 'deleted' | undefined> { + const key = txHash.toString(); + const [isMined, isKnown, isDeleted] = await Promise.all([ + this.#minedTxHashToBlock.hasAsync(key), + this.#txs.hasAsync(key), + this.#deletedMinedTxHashes.hasAsync(key), + ]); + + if (isDeleted) { + return 'deleted'; + } else if (isMined) { + return 'mined'; + } else if (isKnown) { + return 'pending'; + } else { + return undefined; + } + } + + public updateConfig(cfg: TxPoolOptions): void { + if (typeof cfg.archivedTxLimit === 'number') { + assert(cfg.archivedTxLimit >= 0, 'archivedTxLimit must be greater or equal to 0'); + this.#archivedTxLimit = cfg.archivedTxLimit; + } + + if (this.#evictionManager) { + this.#evictionManager.updateConfig(cfg); + } + } + + public markTxsAsNonEvictable(txHashes: TxHash[]): Promise { + txHashes.forEach(txHash => this.#nonEvictableTxs.add(txHash.toString())); + return Promise.resolve(); + } + + public clearNonEvictableTxs(): Promise { + // Clear the non-evictable set after completing the DB updates above. + // This ensures pinned (non-evictable) txs are protected while we mark mined txs, + // but they won't remain pinned indefinitely across blocks. Note that eviction rules + // (including post-mining invalidation) respect the non-evictable flag while it is set. + this.#nonEvictableTxs.clear(); + return Promise.resolve(); + } + + /** + * Permanently deletes deleted mined transactions from blocks up to and including the specified block number. + * @param blockNumber - Block number threshold. Deleted mined txs from this block or earlier will be permanently deleted. + * @returns The number of transactions permanently deleted. + */ + public async cleanupDeletedMinedTxs(blockNumber: BlockNumber): Promise { + let deletedCount = 0; + await this.#store.transactionAsync(async () => { + const txHashesToDelete: string[] = []; + const blocksToDelete: BlockNumber[] = []; + + // Iterate through all entries and check block numbers + for await (const [block, txHash] of this.#blockToDeletedMinedTxHash.entriesAsync()) { + if (block <= blockNumber) { + // Permanently delete the transaction + await this.#txs.delete(txHash); + await this.#deletedMinedTxHashes.delete(txHash); + txHashesToDelete.push(txHash); + if (!blocksToDelete.includes(block)) { + blocksToDelete.push(block); + } + deletedCount++; + } + } + this.#metrics.transactionsRemoved(txHashesToDelete); + + // Clean up block-to-hash mapping - delete all values for each block + for (const block of blocksToDelete) { + const txHashesForBlock = await toArray(this.#blockToDeletedMinedTxHash.getValuesAsync(block)); + for (const txHash of txHashesForBlock) { + await this.#blockToDeletedMinedTxHash.deleteValue(block, txHash); + } + } + }); + + if (deletedCount > 0) { + this.#log.debug(`Permanently deleted ${deletedCount} deleted mined txs from blocks up to ${blockNumber}`); + } + return deletedCount; + } + + /** + * Creates an ArchiveCache instance. + * @param db - DB for the cache to use + * @returns An ArchiveCache instance + */ + protected createArchiveCache(db: MerkleTreeReadOperations): ArchiveCache { + return new ArchiveCache(db); + } + + /** + * Archives a list of txs for future reference. The number of archived txs is limited by the specified archivedTxLimit. + * Note: Pending txs should not be archived, only finalized txs + * @param txs - The list of transactions to archive. + * @returns Empty promise. + */ + private async archiveTxs(txs: Tx[]): Promise { + if (txs.length === 0) { + return; + } + if (this.#archivedTxLimit === 0) { + return; + } + + try { + const txHashes = await Promise.all(txs.map(tx => tx.getTxHash())); + await this.#archive.transactionAsync(async () => { + // calculate the head and tail indices of the archived txs by insertion order. + let headIdx = + ((await this.#archivedTxIndices.entriesAsync({ limit: 1, reverse: true }).next()).value?.[0] ?? -1) + 1; + let tailIdx = (await this.#archivedTxIndices.entriesAsync({ limit: 1 }).next()).value?.[0] ?? 0; + + for (let i = 0; i < txs.length; i++) { + const tx = txs[i]; + while (headIdx - tailIdx >= this.#archivedTxLimit) { + const txHash = await this.#archivedTxIndices.getAsync(tailIdx); + if (txHash) { + await this.#archivedTxs.delete(txHash); + await this.#archivedTxIndices.delete(tailIdx); + } + tailIdx++; + } + + const archivedTx: Tx = new Tx( + tx.txHash, + tx.data, + ChonkProof.empty(), + tx.contractClassLogFields, + tx.publicFunctionCalldata, + ); + const txHash = txHashes[i].toString(); + await this.#archivedTxs.set(txHash, archivedTx.toBuffer()); + await this.#archivedTxIndices.set(headIdx, txHash); + headIdx++; + } + this.#log.debug(`Archived ${txs.length} txs`, { txHashes }); + this.#log.debug(`Total archived txs: ${headIdx - tailIdx}`); + }); + } catch (error) { + this.#log.error(`Error archiving txs`, { error }); + } + } + + // Assumes being called within a DB transaction + private async addPendingTxIndicesInDbTx(tx: Tx, txHash: string): Promise { + await this.#pendingTxPriorityToHash.set(getPendingTxPriority(tx), txHash); + await this.#historicalHeaderToTxHash.set((await tx.data.constants.anchorBlockHeader.hash()).toString(), txHash); + await this.#feePayerToBalanceEntry.set(tx.data.feePayer.toString(), await FeePayerTxInfo.encode(tx, txHash)); + + // Add nullifier entries for conflict detection + const nullifiers = tx.data.getNonEmptyNullifiers(); + for (const nullifier of nullifiers) { + await this.#pendingNullifierToTxHash.set(nullifier.toString(), txHash); + } + } + + // Assumes being called within a DB transaction + private async removePendingTxIndicesInDbTx(tx: Tx, txHash: string): Promise { + await this.#pendingTxPriorityToHash.deleteValue(getPendingTxPriority(tx), txHash); + await this.#historicalHeaderToTxHash.deleteValue( + (await tx.data.constants.anchorBlockHeader.hash()).toString(), + txHash, + ); + await this.#feePayerToBalanceEntry.deleteValue( + tx.data.feePayer.toString(), + await FeePayerTxInfo.encode(tx, txHash), + ); + + // Remove nullifier entries + const nullifiers = tx.data.getNonEmptyNullifiers(); + for (const nullifier of nullifiers) { + await this.#pendingNullifierToTxHash.delete(nullifier.toString()); + } + } + + /** + * Returns up to `limit` lowest-priority evictable pending tx hashes without hydrating transactions. + * Iterates the priority index in ascending order and skips non-evictable txs. + */ + public async getLowestPriorityEvictable(limit: number): Promise { + const txsToEvict: TxHash[] = []; + if (limit <= 0) { + return txsToEvict; + } + + for await (const txHashStr of this.#pendingTxPriorityToHash.valuesAsync()) { + if (this.#nonEvictableTxs.has(txHashStr)) { + continue; + } + + txsToEvict.push(TxHash.fromString(txHashStr)); + if (txsToEvict.length >= limit) { + break; + } + } + + return txsToEvict; + } + + /** + * Creates a PreAddPoolAccess object for use by pre-add eviction rules. + * Provides read-only access to pool state during addTxs transaction. + */ + private getPreAddPoolAccess(): PreAddPoolAccess { + return { + getTxHashByNullifier: async nullifier => { + const hashStr = await this.#pendingNullifierToTxHash.getAsync(nullifier.toString()); + return hashStr ? TxHash.fromString(hashStr) : undefined; + }, + getPendingTxByHash: this.getTxByHash.bind(this), + getTxPriority: getPendingTxPriority, + }; + } +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.test.ts new file mode 100644 index 000000000000..a90f2c08d8f9 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.test.ts @@ -0,0 +1,266 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { AztecAddress } from '@aztec/stdlib/aztec-address'; +import { BlockHeader, TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { EvictionManager } from './eviction_manager.js'; +import { EvictionEvent, type EvictionRule, type TxPoolOperations } from './eviction_strategy.js'; + +describe('EvictionManager', () => { + let txPool: MockProxy; + let evictionManager: EvictionManager; + let mockRule1: MockProxy; + let mockRule2: MockProxy; + + beforeEach(() => { + txPool = mock(); + evictionManager = new EvictionManager(txPool); + mockRule1 = mock({ name: 'rule1' }); + mockRule2 = mock({ name: 'rule2' }); + }); + + describe('evictAfterNewTxs', () => { + it('calls evict on registered rules with correct context', async () => { + const newTxs = [TxHash.random(), TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1), AztecAddress.fromNumber(2)]; + + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test', + success: true, + }); + + evictionManager.registerRule(mockRule1); + await evictionManager.evictAfterNewTxs(newTxs, feePayers); + + expect(mockRule1.evict).toHaveBeenCalledWith( + { + event: EvictionEvent.TXS_ADDED, + newTxs, + feePayers, + }, + txPool, + ); + }); + + it('calls evict on multiple registered rules', async () => { + const newTxs = [TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1)]; + + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test1', + success: true, + }); + mockRule2.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test2', + success: true, + }); + + evictionManager.registerRule(mockRule1); + evictionManager.registerRule(mockRule2); + await evictionManager.evictAfterNewTxs(newTxs, feePayers); + + expect(mockRule1.evict).toHaveBeenCalledTimes(1); + expect(mockRule2.evict).toHaveBeenCalledTimes(1); + }); + + it('handles empty newTxs array', async () => { + const newTxs: TxHash[] = []; + const feePayers: AztecAddress[] = []; + + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test', + success: true, + }); + + evictionManager.registerRule(mockRule1); + await evictionManager.evictAfterNewTxs(newTxs, feePayers); + + expect(mockRule1.evict).toHaveBeenCalledWith( + { + event: EvictionEvent.TXS_ADDED, + newTxs, + feePayers, + }, + txPool, + ); + }); + }); + + describe('evictAfterNewBlock', () => { + it('calls evict on registered rules with correct context', async () => { + const block = BlockHeader.empty(); + + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test', + success: true, + }); + + evictionManager.registerRule(mockRule1); + const nullifier = Fr.random(); + const feePayer = await AztecAddress.random(); + await evictionManager.evictAfterNewBlock(block, [nullifier], [feePayer]); + + expect(mockRule1.evict).toHaveBeenCalledWith( + { + event: EvictionEvent.BLOCK_MINED, + block, + newNullifiers: [nullifier], + feePayers: [feePayer], + }, + txPool, + ); + }); + + it('handles empty nullifiers and fee payers sets', async () => { + const block = BlockHeader.empty(); + + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test', + success: true, + }); + + evictionManager.registerRule(mockRule1); + await evictionManager.evictAfterNewBlock(block, [], []); + + expect(mockRule1.evict).toHaveBeenCalledWith( + { + event: EvictionEvent.BLOCK_MINED, + block, + newNullifiers: [], + feePayers: [], + }, + txPool, + ); + }); + }); + + describe('evictAfterChainPrune', () => { + it('calls evict on registered rules with correct context', async () => { + mockRule1.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test', + success: true, + }); + + evictionManager.registerRule(mockRule1); + await evictionManager.evictAfterChainPrune(BlockNumber(1)); + + expect(mockRule1.evict).toHaveBeenCalledWith( + { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }, + txPool, + ); + }); + }); + + describe('error handling', () => { + it('continues execution if a rule throws an error', async () => { + const newTxs = [TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1)]; + + mockRule1.evict.mockRejectedValue(new Error('Rule 1 failed')); + mockRule2.evict.mockResolvedValue({ + txsEvicted: [], + reason: 'test2', + success: true, + }); + + evictionManager.registerRule(mockRule1); + evictionManager.registerRule(mockRule2); + + await expect(evictionManager.evictAfterNewTxs(newTxs, feePayers)).resolves.not.toThrow(); + + expect(mockRule1.evict).toHaveBeenCalledTimes(1); + expect(mockRule2.evict).toHaveBeenCalledTimes(1); + }); + }); + + describe('rule execution order', () => { + it('executes rules in registration order', async () => { + const newTxs = [TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1)]; + const callOrder: string[] = []; + + mockRule1.evict.mockImplementation(() => { + callOrder.push('rule1'); + return Promise.resolve({ + txsEvicted: [], + reason: 'test1', + success: true, + }); + }); + + mockRule2.evict.mockImplementation(() => { + callOrder.push('rule2'); + return Promise.resolve({ + txsEvicted: [], + reason: 'test2', + success: true, + }); + }); + + evictionManager.registerRule(mockRule1); + evictionManager.registerRule(mockRule2); + + await evictionManager.evictAfterNewTxs(newTxs, feePayers); + + expect(callOrder).toEqual(['rule1', 'rule2']); + }); + + it('waits for each rule to complete before starting the next', async () => { + const newTxs = [TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1)]; + + mockRule1.evict.mockImplementation(() => { + expect(mockRule2.evict).not.toHaveBeenCalled(); + return Promise.resolve({ + txsEvicted: [], + reason: 'test1', + success: true, + }); + }); + + mockRule2.evict.mockImplementation(() => { + expect(mockRule1.evict).toHaveBeenCalled(); + return Promise.resolve({ + txsEvicted: [], + reason: 'test2', + success: true, + }); + }); + + evictionManager.registerRule(mockRule1); + evictionManager.registerRule(mockRule2); + + await evictionManager.evictAfterNewTxs(newTxs, feePayers); + }); + }); + + describe('no rules registered', () => { + it('handles evictAfterNewTxs with no rules gracefully', async () => { + const newTxs = [TxHash.random()]; + const feePayers = [AztecAddress.fromNumber(1)]; + + await expect(evictionManager.evictAfterNewTxs(newTxs, feePayers)).resolves.not.toThrow(); + }); + + it('handles evictAfterNewBlock with no rules gracefully', async () => { + const block = BlockHeader.empty(); + await expect(evictionManager.evictAfterNewBlock(block, [], [])).resolves.not.toThrow(); + }); + + it('handles evictAfterChainPrune with no rules gracefully', async () => { + await expect(evictionManager.evictAfterChainPrune(BlockNumber(1))).resolves.not.toThrow(); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.ts new file mode 100644 index 000000000000..d484cdbb4a95 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_manager.ts @@ -0,0 +1,132 @@ +import { findIndexInSortedArray, insertIntoSortedArray } from '@aztec/foundation/array'; +import type { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { createLogger } from '@aztec/foundation/log'; +import type { AztecAddress } from '@aztec/stdlib/aztec-address'; +import { BlockHeader, Tx, TxHash } from '@aztec/stdlib/tx'; + +import type { TxPoolOptions } from '../tx_pool.js'; +import { + type EvictionContext, + EvictionEvent, + type EvictionRule, + type PreAddEvictionResult, + type PreAddEvictionRule, + type PreAddPoolAccess, + type TxPoolOperations, +} from './eviction_strategy.js'; + +export class EvictionManager { + private rules: EvictionRule[] = []; + + /** Pre-add eviction rules (run inside addTxs transaction) */ + private preAddRules: PreAddEvictionRule[] = []; + + constructor( + private txPool: TxPoolOperations, + private log = createLogger('p2p:mempool:tx_pool:eviction_manager'), + ) {} + + public async evictAfterNewTxs(newTxs: TxHash[], feePayers: AztecAddress[]): Promise { + const ctx: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs, + feePayers, + }; + await this.runEvictionRules(ctx); + } + + public async evictAfterNewBlock( + block: BlockHeader, + newNullifiers: Fr[], + minedFeePayers: AztecAddress[], + ): Promise { + const ctx: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block, + newNullifiers, + feePayers: minedFeePayers, + }; + + await this.runEvictionRules(ctx); + } + + public async evictAfterChainPrune(blockNumber: BlockNumber): Promise { + const ctx: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber, + }; + await this.runEvictionRules(ctx); + } + + /** + * Runs pre-add eviction rules to determine if an incoming tx should be added + * and which existing txs should be evicted. + * Called from inside the addTxs database transaction for atomicity. + * + * @param tx - The incoming transaction + * @param poolAccess - Read-only access to pool state + * @returns Combined result from all pre-add rules + */ + public async runPreAddRules(tx: Tx, poolAccess: PreAddPoolAccess): Promise { + const allTxHashesToEvict: TxHash[] = []; + const cmpTxHash = (a: TxHash, b: TxHash) => Fr.cmp(a.hash, b.hash); + + for (const rule of this.preAddRules) { + try { + const result = await rule.check(tx, poolAccess); + + if (result.shouldReject) { + return { shouldReject: true, txHashesToEvict: [], reason: result.reason }; + } + + for (const txHashToEvict of result.txHashesToEvict) { + // Only add if not already present (dedup) + if (findIndexInSortedArray(allTxHashesToEvict, txHashToEvict, cmpTxHash) === -1) { + insertIntoSortedArray(allTxHashesToEvict, txHashToEvict, cmpTxHash); + } + } + } catch (err) { + this.log.warn(`Pre-add eviction rule ${rule.name} unexpected error: ${String(err)}`, { + err, + preAddRule: rule.name, + }); + // On error, reject the tx to be safe + return { shouldReject: true, txHashesToEvict: [], reason: `rule error: ${String(err)}` }; + } + } + + return { shouldReject: false, txHashesToEvict: allTxHashesToEvict }; + } + + public registerRule(rule: EvictionRule) { + this.rules.push(rule); + } + + public registerPreAddRule(rule: PreAddEvictionRule) { + this.preAddRules.push(rule); + } + + public updateConfig(config: TxPoolOptions): void { + for (const rule of this.rules) { + rule.updateConfig(config); + } + for (const rule of this.preAddRules) { + rule.updateConfig?.(config); + } + } + + private async runEvictionRules(ctx: EvictionContext): Promise { + for (const rule of this.rules) { + try { + await rule.evict(ctx, this.txPool); + } catch (err) { + this.log.warn(`Eviction rule ${rule.name} unexpected error: ${String(err)}`, { + err, + evictionRule: rule.name, + evictionEvent: ctx.event, + }); + } + } + } +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_strategy.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_strategy.ts new file mode 100644 index 000000000000..b002201ecc9b --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/eviction_strategy.ts @@ -0,0 +1,208 @@ +import type { BlockNumber } from '@aztec/foundation/branded-types'; +import { Buffer32 } from '@aztec/foundation/buffer'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { ProtocolContractAddress } from '@aztec/protocol-contracts'; +import type { AztecAddress } from '@aztec/stdlib/aztec-address'; +import { type BlockHeader, type Tx, TxHash } from '@aztec/stdlib/tx'; + +import { getFeePayerBalanceDelta } from '../../../msg_validators/tx_validator/fee_payer_balance.js'; +import { getTxPriorityFee } from '../priority.js'; +import type { TxPoolOptions } from '../tx_pool.js'; + +export const EvictionEvent = { + TXS_ADDED: 'txs_added', + BLOCK_MINED: 'block_mined', + CHAIN_PRUNED: 'chain_pruned', +} as const; + +type EvictionEvent = (typeof EvictionEvent)[keyof typeof EvictionEvent]; + +export type EvictionContext = + | { + event: typeof EvictionEvent.TXS_ADDED; + newTxs: TxHash[]; + feePayers: AztecAddress[]; + } + | { + event: typeof EvictionEvent.CHAIN_PRUNED; + blockNumber: BlockNumber; + } + | { + event: typeof EvictionEvent.BLOCK_MINED; + block: BlockHeader; + newNullifiers: Fr[]; + feePayers: AztecAddress[]; + }; + +/** + * Result of an eviction operation + */ +export interface EvictionResult { + readonly txsEvicted: TxHash[]; + readonly reason: string; + readonly success: boolean; + readonly error?: Error; +} + +/** + * Information about a pending transaction + */ +export interface PendingTxInfo { + txHash: TxHash; + blockHash: Fr; + isEvictable: boolean; +} + +/** + * Information about a transaction that references a specific block + */ +export interface TxBlockReference { + txHash: TxHash; + blockHash: Fr; + isEvictable: boolean; +} + +/** + * Operations that eviction strategies can perform on the pool + */ +export interface TxPoolOperations { + getTxByHash(txHash: TxHash): Promise; + getPendingTxInfos(): Promise; + getPendingTxsReferencingBlocks(blockHashes: Fr[]): Promise; + getPendingFeePayers(): Promise; + getFeePayerTxInfos(feePayer: AztecAddress): AsyncIterable; + /** Cheap count of current pending transactions. */ + getPendingTxCount(): Promise; + /** + * Returns up to `limit` lowest-priority evictable pending tx hashes. + * Ordering should be from lowest priority upwards. + */ + getLowestPriorityEvictable(limit: number): Promise; + deleteTxs(txHashes: TxHash[], opts?: { permanently?: boolean }): Promise; +} + +/** + * Strategy interface for different eviction behaviors + */ +export interface EvictionRule { + readonly name: string; + + /** + * Performs the eviction logic + */ + evict(context: EvictionContext, txPool: TxPoolOperations): Promise; + + /** + * Updates the configuration for this eviction rule. + * Rules should ignore config options that don't apply to them. + */ + updateConfig(config: TxPoolOptions): void; +} + +/** + * Balance-related information about a transaction for a fee payer. + */ +export class FeePayerTxInfo { + txHash: TxHash; + priority: bigint; + feeLimit: bigint; + claimAmount: bigint; + isEvictable: boolean; + + constructor(fields: { + txHash: TxHash; + priority: bigint; + feeLimit: bigint; + claimAmount: bigint; + isEvictable: boolean; + }) { + this.txHash = fields.txHash; + this.priority = fields.priority; + this.feeLimit = fields.feeLimit; + this.claimAmount = fields.claimAmount; + this.isEvictable = fields.isEvictable; + } + + static async encode(tx: Tx, txHash: string | TxHash): Promise { + const { feeLimit, claimAmount } = await getFeePayerBalanceDelta(tx, ProtocolContractAddress.FeeJuice); + const priority = Buffer32.fromBigInt(getTxPriorityFee(tx)).toBuffer(); + const hashBuffer = (typeof txHash === 'string' ? TxHash.fromString(txHash) : txHash).toBuffer(); + const feeLimitBuffer = Buffer32.fromBigInt(feeLimit).toBuffer(); + const claimAmountBuffer = Buffer32.fromBigInt(claimAmount).toBuffer(); + return Buffer.concat([priority, hashBuffer, feeLimitBuffer, claimAmountBuffer]); + } + + static decode(value: Buffer, isEvictable = true): FeePayerTxInfo { + const priority = Buffer32.fromBuffer(value.subarray(0, Buffer32.SIZE)).toBigInt(); + const hashOffset = Buffer32.SIZE; + const feeLimitOffset = hashOffset + TxHash.SIZE; + const claimOffset = feeLimitOffset + Buffer32.SIZE; + + return new FeePayerTxInfo({ + txHash: TxHash.fromBuffer(value.subarray(hashOffset, feeLimitOffset)), + priority, + feeLimit: Buffer32.fromBuffer(value.subarray(feeLimitOffset, claimOffset)).toBigInt(), + claimAmount: Buffer32.fromBuffer(value.subarray(claimOffset, claimOffset + Buffer32.SIZE)).toBigInt(), + isEvictable, + }); + } +} + +/** + * Read-only access to pool state for pre-add eviction checks. + * Passed to pre-add rules during the addTxs transaction. + */ +export interface PreAddPoolAccess { + /** + * Get the pending tx hash that uses a specific nullifier, if any. + * Returns undefined if no pending tx uses this nullifier. + */ + getTxHashByNullifier(nullifier: Fr): Promise; + + /** + * Get a pending transaction by its hash. + */ + getPendingTxByHash(hash: TxHash): Promise; + + /** + * Get the priority string for a transaction (for fee comparison). + */ + getTxPriority(tx: Tx): string; +} + +/** + * Result of a pre-add eviction check for a single transaction. + */ +export interface PreAddEvictionResult { + /** Whether the incoming tx should be rejected */ + readonly shouldReject: boolean; + /** Sorted array of existing tx hashes that should be evicted if this tx is added */ + readonly txHashesToEvict: TxHash[]; + /** Optional reason for rejection */ + readonly reason?: string; +} + +/** + * Strategy interface for pre-add eviction rules. + * These run inside the addTxs transaction before a tx is added, + * deciding whether to evict existing txs or reject the incoming tx. + */ +export interface PreAddEvictionRule { + readonly name: string; + + /** + * Check if incoming tx should be added and which existing txs to evict. + * Called inside the addTxs database transaction for atomicity. + * + * @param tx - The incoming transaction to check + * @param poolAccess - Read-only access to current pool state + * @returns Result indicating whether to reject and what to evict + */ + check(tx: Tx, poolAccess: PreAddPoolAccess): Promise; + + /** + * Updates the configuration for this rule. + * Rules should ignore config options that don't apply to them. + */ + updateConfig?(config: TxPoolOptions): void; +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.test.ts new file mode 100644 index 000000000000..4448861cb78b --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.test.ts @@ -0,0 +1,600 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { AztecAddress } from '@aztec/stdlib/aztec-address'; +import type { MerkleTreeReadOperations, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { mockTx } from '@aztec/stdlib/testing'; +import { PublicDataTreeLeaf, PublicDataTreeLeafPreimage } from '@aztec/stdlib/trees'; +import { BlockHeader, type Tx, type TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { + type EvictionContext, + EvictionEvent, + type FeePayerTxInfo, + type TxPoolOperations, +} from './eviction_strategy.js'; +import { FeePayerBalanceEvictionRule } from './fee_payer_balance_eviction_rule.js'; + +describe('FeePayerBalanceEvictionRule', () => { + let txPool: MockProxy; + let worldState: MockProxy; + let worldStateSynchronizer: MockProxy; + let rule: FeePayerBalanceEvictionRule; + + const setFeePayerBalance = (balance: bigint) => { + worldState.getPreviousValueIndex.mockResolvedValue({ index: 1n, alreadyPresent: true }); + worldState.getLeafPreimage.mockResolvedValue( + new PublicDataTreeLeafPreimage(new PublicDataTreeLeaf(Fr.ZERO, new Fr(balance)), Fr.ONE, 1n), + ); + }; + + const mockBalanceEntries = (entries: FeePayerTxInfo[]) => { + txPool.getFeePayerTxInfos.mockImplementation(async function* (_feePayer) { + for (const entry of entries) { + yield entry; + } + }); + }; + + const buildBalanceEntries = ( + txHashes: TxHash[], + feeLimit: bigint, + { + claimAmount = 0n, + isEvictable = true, + priority = 0n, + }: { claimAmount?: bigint; isEvictable?: boolean; priority?: bigint | bigint[] } = {}, + ): FeePayerTxInfo[] => { + return txHashes.map((txHash, index) => ({ + txHash, + feeLimit, + claimAmount, + isEvictable, + priority: Array.isArray(priority) ? (priority[index] ?? 0n) : priority, + })); + }; + + const txHashes = (...txs: Tx[]) => txs.map(tx => tx.getTxHash()); + + const mockTxLookup = (...txs: Tx[]) => { + const byHash = new Map(txs.map(tx => [tx.getTxHash().toString(), tx])); + txPool.getTxByHash.mockImplementation(txHash => { + return Promise.resolve(byHash.get(txHash.toString())); + }); + }; + + beforeEach(() => { + txPool = mock(); + txPool.getPendingFeePayers.mockResolvedValue([]); + worldState = mock(); + worldState.getPreviousValueIndex.mockResolvedValue(undefined); + worldState.getLeafPreimage.mockResolvedValue( + new PublicDataTreeLeafPreimage(PublicDataTreeLeaf.empty(), Fr.ONE, 1n), + ); + + worldStateSynchronizer = mock(); + worldStateSynchronizer.getCommitted.mockReturnValue(worldState); + worldStateSynchronizer.getSnapshot.mockReturnValue(worldState); + worldStateSynchronizer.syncImmediate.mockResolvedValue(BlockNumber(1)); + + rule = new FeePayerBalanceEvictionRule(worldStateSynchronizer); + }); + + describe('evict method', () => { + it('returns empty result for CHAIN_PRUNED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.getPendingFeePayers).toHaveBeenCalledTimes(1); + // Ensure syncImmediate is called before accessing the world state snapshot + expect(worldStateSynchronizer.syncImmediate).toHaveBeenCalledWith(BlockNumber(1)); + }); + + it('returns empty result for TXS_ADDED when no fee payers are provided', async () => { + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: [], + feePayers: [], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('evicts txs for all fee payers on CHAIN_PRUNED', async () => { + const feePayer = AztecAddress.fromNumber(42); + const tx1 = await mockTx(1, { feePayer }); + const tx2 = await mockTx(2, { feePayer }); + + mockBalanceEntries(buildBalanceEntries(txHashes(tx1, tx2), 10n, { priority: [2n, 1n] })); + setFeePayerBalance(5n); + txPool.getPendingFeePayers.mockResolvedValue([feePayer]); + + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(2); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx1, tx2))); + expect(txPool.deleteTxs).toHaveBeenCalledWith(expect.arrayContaining(txHashes(tx1, tx2))); + }); + + it('evicts unfunded txs after BLOCK_MINED', async () => { + const feePayer = AztecAddress.fromNumber(7); + const tx1 = await mockTx(1, { feePayer }); + const tx2 = await mockTx(2, { feePayer }); + + mockBalanceEntries(buildBalanceEntries(txHashes(tx1, tx2), 10n, { priority: [2n, 1n] })); + setFeePayerBalance(10n); + + const blockHeader = BlockHeader.empty(); + const context: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block: blockHeader, + newNullifiers: [], + feePayers: [feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(1); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx2))); + expect(result.txsEvicted.map(txHash => txHash.toString())).not.toContain(tx1.getTxHash().toString()); + expect(txPool.deleteTxs).toHaveBeenCalledWith(expect.arrayContaining(txHashes(tx2))); + // Ensure syncImmediate is called with blockNumber and blockHash before accessing the world state snapshot + expect(worldStateSynchronizer.syncImmediate).toHaveBeenCalledWith( + blockHeader.getBlockNumber(), + await blockHeader.hash(), + ); + }); + + it('handles empty fee payer entries after BLOCK_MINED', async () => { + const feePayer = AztecAddress.fromNumber(8); + txPool.getFeePayerTxInfos.mockImplementation(async function* (_feePayer) {}); + + const blockHeader = BlockHeader.empty(); + const context: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block: blockHeader, + newNullifiers: [], + feePayers: [feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('evicts low priority txs when fee payer balance cannot cover total fee limit', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + tx2.data.feePayer = tx1.data.feePayer; + tx3.data.feePayer = tx1.data.feePayer; + + mockTxLookup(tx1, tx2, tx3); + + const feeLimit = 100n; + mockBalanceEntries(buildBalanceEntries(txHashes(tx1, tx2, tx3), feeLimit, { priority: [1n, 3n, 2n] })); + + setFeePayerBalance(feeLimit * 2n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2, tx3), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual(txHashes(tx1)); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx1)); + }); + + it('evaluates multiple fee payers independently', async () => { + const feePayerA = AztecAddress.fromNumber(1); + const feePayerB = AztecAddress.fromNumber(2); + + const tx1 = await mockTx(1, { feePayer: feePayerA }); + const tx2 = await mockTx(2, { feePayer: feePayerA }); + const tx3 = await mockTx(3, { feePayer: feePayerB }); + + mockTxLookup(tx1, tx2, tx3); + + const feeLimit = 100n; + const entriesByPayer = new Map([ + [feePayerA.toString(), buildBalanceEntries(txHashes(tx1, tx2), feeLimit, { priority: [1n, 2n] })], + [feePayerB.toString(), buildBalanceEntries(txHashes(tx3), feeLimit, { priority: 1n })], + ]); + txPool.getFeePayerTxInfos.mockImplementation(async function* (feePayer) { + for (const entry of entriesByPayer.get(feePayer.toString()) ?? []) { + yield entry; + } + }); + + setFeePayerBalance(150n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2, tx3), + feePayers: [feePayerA, feePayerB], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual(txHashes(tx1)); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx1)); + }); + + it('stops evicting once the fee payer balance is satisfied', async () => { + const feePayer = AztecAddress.fromNumber(3); + const tx1 = await mockTx(1, { feePayer }); + const tx2 = await mockTx(2, { feePayer }); + const tx3 = await mockTx(3, { feePayer }); + + mockTxLookup(tx1, tx2, tx3); + + const feeLimit = 100n; + mockBalanceEntries(buildBalanceEntries(txHashes(tx1, tx2, tx3), feeLimit, { priority: [1n, 2n, 3n] })); + + setFeePayerBalance(150n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2, tx3), + feePayers: [feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx1, tx2))); + const deletedTxs = txPool.deleteTxs.mock.calls[0]?.[0] ?? []; + expect(deletedTxs).toHaveLength(2); + expect(deletedTxs).toEqual(expect.arrayContaining(txHashes(tx1, tx2))); + }); + + it('keeps txs when fee payer claims enough balance during setup', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + mockTxLookup(tx1, tx2); + + const feeLimit = 100n; + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), feeLimit, { claimAmount: feeLimit, priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), feeLimit, { priority: 1n }), + ]); + + setFeePayerBalance(feeLimit); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('does not fund later txs with claims from evicted txs', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), 20n, { claimAmount: 10n, priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), 12n, { priority: 1n }), + ]); + + setFeePayerBalance(5n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(2); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx1, tx2))); + const deletedTxs = txPool.deleteTxs.mock.calls[0]?.[0] ?? []; + expect(deletedTxs).toHaveLength(2); + expect(deletedTxs).toEqual(expect.arrayContaining(txHashes(tx1, tx2))); + }); + + it('keeps multiple lower-priority txs funded by higher-priority claims', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + tx2.data.feePayer = tx1.data.feePayer; + tx3.data.feePayer = tx1.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), 1n, { claimAmount: 100n, priority: 3n }), + ...buildBalanceEntries(txHashes(tx2), 30n, { priority: 2n }), + ...buildBalanceEntries(txHashes(tx3), 60n, { priority: 1n }), + ]); + + setFeePayerBalance(0n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2, tx3), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('handles equal priority ties deterministically', async () => { + const txClaim = await mockTx(1); + const txSpend = await mockTx(2); + txSpend.data.feePayer = txClaim.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(txClaim), 10n, { claimAmount: 100n, priority: 1n }), + ...buildBalanceEntries(txHashes(txSpend), 90n, { priority: 1n }), + ]); + + setFeePayerBalance(0n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(txClaim, txSpend), + feePayers: [txClaim.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + const claimFirst = txClaim.getTxHash().toBigInt() >= txSpend.getTxHash().toBigInt(); + if (claimFirst) { + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + } else { + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(1); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(txSpend))); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(txSpend)); + } + }); + + it('evicts all txs when balance is too low', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + tx2.data.feePayer = tx1.data.feePayer; + tx3.data.feePayer = tx1.data.feePayer; + + const feeLimit = 50n; + mockBalanceEntries(buildBalanceEntries(txHashes(tx1, tx2, tx3), feeLimit, { priority: [3n, 2n, 1n] })); + + setFeePayerBalance(0n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2, tx3), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(3); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx1, tx2, tx3))); + const deletedTxs = txPool.deleteTxs.mock.calls[0]?.[0] ?? []; + expect(deletedTxs).toHaveLength(3); + expect(deletedTxs).toEqual(expect.arrayContaining(txHashes(tx1, tx2, tx3))); + }); + + it('evicts later txs when balance is exactly exhausted', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), 10n, { priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), 1n, { priority: 1n }), + ]); + + setFeePayerBalance(10n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(1); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx2))); + expect(result.txsEvicted.map(txHash => txHash.toString())).not.toContain(tx1.getTxHash().toString()); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx2)); + }); + + it('keeps non-evictable txs even when over balance', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), 10n, { isEvictable: false, priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), 20n, { isEvictable: false, priority: 1n }), + ]); + + setFeePayerBalance(0n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'fee_payer_balance', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('evicts only evictable txs when the top tx is non-evictable and unfunded', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), 10n, { isEvictable: false, priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), 1n, { priority: 1n }), + ]); + + setFeePayerBalance(0n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(1); + expect(result.txsEvicted).toEqual(expect.arrayContaining(txHashes(tx2))); + expect(result.txsEvicted.map(txHash => txHash.toString())).not.toContain(tx1.getTxHash().toString()); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx2)); + }); + + it('respects non-evictable txs when fee payer balance is exceeded', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + const feeLimit = 100n; + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), feeLimit, { isEvictable: false, priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), feeLimit, { priority: 1n }), + ]); + + setFeePayerBalance(feeLimit); + + const blockHeader = BlockHeader.empty(); + const context: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block: blockHeader, + newNullifiers: [], + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual(txHashes(tx2)); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx2)); + }); + + it('evicts higher-priority spends that rely on lower-priority claims', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + tx2.data.feePayer = tx1.data.feePayer; + + const feeLimit = 100n; + mockBalanceEntries([ + ...buildBalanceEntries(txHashes(tx1), feeLimit, { priority: 2n }), + ...buildBalanceEntries(txHashes(tx2), 1n, { claimAmount: feeLimit, priority: 1n }), + ]); + + setFeePayerBalance(50n); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1, tx2), + feePayers: [tx1.data.feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual(txHashes(tx1)); + expect(txPool.deleteTxs).toHaveBeenCalledWith(txHashes(tx1)); + }); + + it('returns failure when storage access fails', async () => { + const feePayer = AztecAddress.fromNumber(5); + const tx1 = await mockTx(1, { feePayer }); + + txPool.getTxByHash.mockResolvedValue(tx1); + mockBalanceEntries(buildBalanceEntries(txHashes(tx1), 100n)); + + worldState.getPreviousValueIndex.mockRejectedValueOnce(new Error('db failure')); + + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: txHashes(tx1), + feePayers: [feePayer], + }; + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(false); + expect(result.txsEvicted).toEqual([]); + expect(result.error).toBeDefined(); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts new file mode 100644 index 000000000000..dfefe2142981 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/fee_payer_balance_eviction_rule.ts @@ -0,0 +1,163 @@ +import { createLogger } from '@aztec/foundation/log'; +import { ProtocolContractAddress } from '@aztec/protocol-contracts'; +import { computeFeePayerBalanceStorageSlot } from '@aztec/protocol-contracts/fee-juice'; +import type { AztecAddress } from '@aztec/stdlib/aztec-address'; +import type { WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { DatabasePublicStateSource, type MerkleTreeReadOperations } from '@aztec/stdlib/trees'; +import type { TxHash } from '@aztec/stdlib/tx'; + +import type { TxPoolOptions } from '../tx_pool.js'; +import { + type EvictionContext, + EvictionEvent, + type EvictionResult, + type EvictionRule, + type FeePayerTxInfo, + type TxPoolOperations, +} from './eviction_strategy.js'; + +export class FeePayerBalanceEvictionRule implements EvictionRule { + public readonly name = 'FeePayerBalanceEviction'; + public readonly reason = 'fee_payer_balance'; + + private log = createLogger('p2p:mempool:tx_pool:fee_payer_balance_eviction_rule'); + + constructor(private worldState: WorldStateSynchronizer) {} + + async evict(context: EvictionContext, txPool: TxPoolOperations): Promise { + try { + if (context.event === EvictionEvent.TXS_ADDED) { + return await this.evictForFeePayers(context.feePayers, this.worldState.getCommitted(), txPool); + } + + if (context.event === EvictionEvent.BLOCK_MINED) { + const blockNumber = context.block.getBlockNumber(); + const blockHash = await context.block.hash(); + // Ensure world state is synced to this block before accessing the snapshot. + // This handles the race where a block is added to the archiver + // but the world state hasn't synced it yet. + await this.worldState.syncImmediate(blockNumber, blockHash); + return await this.evictForFeePayers(context.feePayers, this.worldState.getSnapshot(blockNumber), txPool); + } + + // TODO: fix this edge-case + // This can lead to a race condition if we are catching up in the p2p client. + // Let's say we have 3 txs for the same fee payer, which get mined in blocks 1, 2, 3. + // Tx1 consumes fee juice, tx2 increases it, tx3 consumes it again. We see block1 with tx1 first, run this rule, and evict tx3. + // But tx3 was valid (due to tx2) and mined on block3. And we have just removed from the mempool a tx we needed for proving/reexec. + // + // NOTE: this will happen only in case of that lower-priority-fee tx entered in e.g. block 2, and we have higher-priority-fee tx in block 3 + // (simply because that was the timing of these txs). But, in case of higher-priority-fee txs being in block 2, the tx3 won't be evicted + // ----- + // Proposed fix: evict only if node is synched + if (context.event === EvictionEvent.CHAIN_PRUNED) { + // Ensure world state is synced to this block before accessing the snapshot. + await this.worldState.syncImmediate(context.blockNumber); + const feePayers = await txPool.getPendingFeePayers(); + return await this.evictForFeePayers(feePayers, this.worldState.getSnapshot(context.blockNumber), txPool); + } + + return { + reason: this.reason, + success: true, + txsEvicted: [], + }; + } catch (err) { + this.log.error('Failed to evict txs due to fee payer balance', { err }); + return { + reason: this.reason, + success: false, + txsEvicted: [], + error: new Error('Failed to evict txs due to fee payer balance', { cause: err }), + }; + } + } + + updateConfig(_config: TxPoolOptions): void {} + + private async evictForFeePayers( + feePayers: Array, // assumed to be unique + db: MerkleTreeReadOperations, + txPool: TxPoolOperations, + ): Promise { + const publicStateSource = this.createPublicStateSource(db); + + const txsToEvict = ( + await Promise.all(feePayers.map(feePayer => this.getEvictionsForFeePayer(feePayer, publicStateSource, txPool))) + ).flat(); + + if (txsToEvict.length > 0) { + await txPool.deleteTxs(txsToEvict); + } + + return { + reason: this.reason, + success: true, + txsEvicted: txsToEvict, + }; + } + + private async getEvictionsForFeePayer( + feePayer: AztecAddress, + publicStateSource: DatabasePublicStateSource, + txPool: TxPoolOperations, + ): Promise { + const initialBalance = ( + await publicStateSource.storageRead( + ProtocolContractAddress.FeeJuice, + //TODO: cache this LRU-style + await computeFeePayerBalanceStorageSlot(feePayer), + ) + ).toBigInt(); + + const txs: FeePayerTxInfo[] = []; + for await (const entry of txPool.getFeePayerTxInfos(feePayer)) { + txs.push(entry); + } + + if (txs.length === 0) { + return []; + } + + const txsToEvict: TxHash[] = []; + let balance = initialBalance; + let hasNonEvictableOverBalance = false; + + // Evaluate balance in priority order so later claims cannot fund earlier spends. + // This sorts so that higher priority txs come first. + txs.sort((a, b) => { + if (a.priority === b.priority) { + return a.txHash.toBigInt() >= b.txHash.toBigInt() ? -1 : 1; + } + + return a.priority > b.priority ? -1 : 1; + }); + + for (const tx of txs) { + const available = balance + tx.claimAmount; + if (available >= tx.feeLimit) { + balance = available - tx.feeLimit; + continue; + } + + if (tx.isEvictable) { + txsToEvict.push(tx.txHash); + } else { + hasNonEvictableOverBalance = true; + } + } + + if (hasNonEvictableOverBalance) { + this.log.verbose('Fee payer balance cannot be satisfied due to non-evictable txs', { + feePayer: feePayer.toString(), + balance: initialBalance, + }); + } + + return txsToEvict; + } + + private createPublicStateSource(db: MerkleTreeReadOperations): DatabasePublicStateSource { + return new DatabasePublicStateSource(db); + } +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.test.ts new file mode 100644 index 000000000000..f832161a0a5b --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.test.ts @@ -0,0 +1,204 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { mockTx } from '@aztec/stdlib/testing'; +import { BlockHeader, TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { type EvictionContext, EvictionEvent, type PendingTxInfo, type TxPoolOperations } from './eviction_strategy.js'; +import { InvalidTxsAfterMiningRule } from './invalid_txs_after_mining_rule.js'; + +describe('InvalidTxsAfterMiningRule', () => { + let txPool: MockProxy; + let rule: InvalidTxsAfterMiningRule; + + beforeEach(() => { + txPool = mock(); + rule = new InvalidTxsAfterMiningRule(); + }); + + describe('evict method', () => { + describe('non-BLOCK_MINED events', () => { + it('returns empty result for TXS_ADDED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: [], + feePayers: [], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'block_mined_invalid_txs', + success: true, + txsEvicted: [], + }); + }); + + it('returns empty result for CHAIN_PRUNED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'block_mined_invalid_txs', + success: true, + txsEvicted: [], + }); + }); + }); + + describe('BLOCK_MINED events', () => { + let context: EvictionContext; + let blockHeader: BlockHeader; + let newNullifiers: Fr[]; + + beforeEach(() => { + blockHeader = BlockHeader.empty(); + blockHeader.globalVariables.blockNumber = BlockNumber(100); + blockHeader.globalVariables.timestamp = 1000n; + + newNullifiers = [Fr.random(), Fr.random()]; + context = { + event: EvictionEvent.BLOCK_MINED, + block: blockHeader, + newNullifiers, + feePayers: [], + }; + }); + + it('evicts transactions with duplicate nullifiers', async () => { + const tx1 = TxHash.random(); + const tx2 = TxHash.random(); + + // Create real mock transactions with proper structure + const mockTx1 = await mockTx(1, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + const mockTx2 = await mockTx(2, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + + // Mock the nullifiers - tx1 has a duplicate + mockTx1.data.forRollup!.end.nullifiers[0] = newNullifiers[0]; + + const pendingTxs: PendingTxInfo[] = [ + { blockHash: Fr.ZERO, txHash: tx1, isEvictable: true }, + { blockHash: Fr.ZERO, txHash: tx2, isEvictable: true }, + ]; + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + txPool.getTxByHash.mockImplementation(txHash => { + if (txHash.equals(tx1)) { + return Promise.resolve(mockTx1); + } + if (txHash.equals(tx2)) { + return Promise.resolve(mockTx2); + } + return Promise.resolve(undefined); + }); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([tx1]); // Only tx1 has duplicate nullifier + expect(txPool.deleteTxs).toHaveBeenCalledWith([tx1]); + }); + + it('evicts transactions with expired timestamps', async () => { + const tx1 = TxHash.random(); + const tx2 = TxHash.random(); + + const mockTx1 = await mockTx(1, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + const mockTx2 = await mockTx(2, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + + mockTx1.data.expirationTimestamp = 500n; + mockTx2.data.expirationTimestamp = 1500n; + + const pendingTxs: PendingTxInfo[] = [ + { blockHash: Fr.ZERO, txHash: tx1, isEvictable: true }, + { blockHash: Fr.ZERO, txHash: tx2, isEvictable: true }, + ]; + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + txPool.getTxByHash.mockImplementation(txHash => { + if (txHash.equals(tx1)) { + return Promise.resolve(mockTx1); + } + if (txHash.equals(tx2)) { + return Promise.resolve(mockTx2); + } + return Promise.resolve(undefined); + }); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([tx1]); // Only tx1 is expired + expect(txPool.deleteTxs).toHaveBeenCalledWith([tx1]); + }); + + it('respects non-evictable transactions', async () => { + const evictableTx = TxHash.random(); + const nonEvictableTx = TxHash.random(); + + // Create real mock transactions with proper structure + const mockEvictableTx = await mockTx(1, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + const mockNonEvictableTx = await mockTx(2, { + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + + // Both transactions have duplicate nullifiers, but only one is evictable + mockEvictableTx.data.forRollup!.end.nullifiers[0] = newNullifiers[0]; + mockNonEvictableTx.data.forRollup!.end.nullifiers[0] = newNullifiers[0]; + + const pendingTxs: PendingTxInfo[] = [ + { blockHash: Fr.ZERO, txHash: evictableTx, isEvictable: true }, + { blockHash: Fr.ZERO, txHash: nonEvictableTx, isEvictable: false }, + ]; + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + txPool.getTxByHash.mockImplementation(txHash => { + if (txHash.equals(evictableTx)) { + return Promise.resolve(mockEvictableTx); + } + if (txHash.equals(nonEvictableTx)) { + return Promise.resolve(mockNonEvictableTx); + } + return Promise.resolve(undefined); + }); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([evictableTx]); // Only evictable tx is evicted + expect(txPool.deleteTxs).toHaveBeenCalledWith([evictableTx]); + }); + + it('handles empty pending transactions list', async () => { + txPool.getPendingTxInfos.mockResolvedValue([]); + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'block_mined_invalid_txs', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts new file mode 100644 index 000000000000..cc8cf1efd5ba --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_mining_rule.ts @@ -0,0 +1,104 @@ +import { createLogger } from '@aztec/foundation/log'; +import type { TxHash } from '@aztec/stdlib/tx'; + +import type { TxPoolOptions } from '../tx_pool.js'; +import { + type EvictionContext, + EvictionEvent, + type EvictionResult, + type EvictionRule, + type TxPoolOperations, +} from './eviction_strategy.js'; + +/** + * Eviction rule that removes invalid transactions after a block is mined. + * Only triggers on BLOCK_MINED events. + * + * Eviction criteria includes: + * - Transactions with nullifiers that are already included in the mined block + * - Transactions with an expiration timestamp less than or equal to the mined block timestamp + */ +export class InvalidTxsAfterMiningRule implements EvictionRule { + public readonly name = 'InvalidTxsAfterMining'; + + private log = createLogger('p2p:mempool:tx_pool:invalid_txs_after_mining_rule'); + + async evict(context: EvictionContext, txPool: TxPoolOperations): Promise { + if (context.event !== EvictionEvent.BLOCK_MINED) { + return { + reason: 'block_mined_invalid_txs', + success: true, + txsEvicted: [], + }; + } + + if (!context.block || !context.newNullifiers) { + this.log.warn('Invalid context for block mined eviction', { context }); + return { + reason: 'block_mined_invalid_txs', + success: false, + txsEvicted: [], + error: new Error('Invalid block mined context'), + }; + } + + try { + const { timestamp } = context.block.globalVariables; + + const txsToEvict: TxHash[] = []; + const pendingTxs = await txPool.getPendingTxInfos(); + const minedNullifiers = new Set(context.newNullifiers.map(n => n.toString())); + + for (const { txHash, isEvictable } of pendingTxs) { + if (!isEvictable) { + continue; + } + + const tx = await txPool.getTxByHash(txHash); + if (!tx) { + continue; + } + + // Evict pending txs that share nullifiers with mined txs + const txNullifiers = tx.data.getNonEmptyNullifiers(); + if (txNullifiers.some(nullifier => minedNullifiers.has(nullifier.toString()))) { + this.log.verbose(`Evicting tx ${txHash} from pool due to a duplicate nullifier with a mined tx`); + txsToEvict.push(txHash); + continue; + } + + // Evict pending txs with an expiration timestamp less than or equal to the mined block timestamp + const expirationTimestamp = tx.data.expirationTimestamp; + if (expirationTimestamp <= timestamp) { + this.log.verbose( + `Evicting tx ${txHash} from pool due to the tx being expired (expirationTimestamp: ${expirationTimestamp}, mined block timestamp: ${timestamp})`, + ); + txsToEvict.push(txHash); + continue; + } + } + + if (txsToEvict.length > 0) { + await txPool.deleteTxs(txsToEvict); + } + + this.log.debug(`Evicted ${txsToEvict.length} invalid txs after block mined`); + + return { + reason: 'block_mined_invalid_txs', + success: true, + txsEvicted: txsToEvict, + }; + } catch (err) { + this.log.error('Failed to evict invalid transactions after mining', { err }); + return { + reason: 'block_mined_invalid_txs', + success: false, + txsEvicted: [], + error: new Error('Failed to evict invalid txs after mining', { cause: err }), + }; + } + } + + updateConfig(_config: TxPoolOptions): void {} +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.test.ts new file mode 100644 index 000000000000..f8a2fe48c3b6 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.test.ts @@ -0,0 +1,332 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import type { WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import type { MerkleTreeReadOperations } from '@aztec/stdlib/trees'; +import { BlockHeader, TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { + type EvictionContext, + EvictionEvent, + type PendingTxInfo, + type TxBlockReference, + type TxPoolOperations, +} from './eviction_strategy.js'; +import { InvalidTxsAfterReorgRule } from './invalid_txs_after_reorg_rule.js'; + +describe('InvalidTxsAfterReorgRule', () => { + let txPool: MockProxy; + let worldState: MockProxy; + let db: MockProxy; + let rule: InvalidTxsAfterReorgRule; + + beforeEach(() => { + txPool = mock(); + txPool.getPendingTxInfos.mockResolvedValue([]); + + db = mock(); + // default mock implementation - no blocks exist in the tree + db.findLeafIndices.mockImplementation((_, indices) => Promise.resolve(indices.map(_ => undefined))); + + worldState = mock(); + worldState.getSnapshot.mockReturnValue(db); + worldState.syncImmediate.mockResolvedValue(BlockNumber(1)); + + rule = new InvalidTxsAfterReorgRule(worldState); + }); + + describe('evict method', () => { + describe('non-CHAIN_PRUNED events', () => { + it('returns empty result for TXS_ADDED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.TXS_ADDED, + newTxs: [], + feePayers: [], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'reorg_invalid_txs', + success: true, + txsEvicted: [], + }); + }); + + it('returns empty result for BLOCK_MINED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block: BlockHeader.empty(), + newNullifiers: [], + feePayers: [], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'reorg_invalid_txs', + success: true, + txsEvicted: [], + }); + }); + }); + + describe('CHAIN_PRUNED events', () => { + it('handles no pending transactions', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + txPool.getPendingTxInfos.mockResolvedValue([]); + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'reorg_invalid_txs', + success: true, + txsEvicted: [], + }); + + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + }); + + it('evicts all transactions that reference pruned blocks', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const tx1Hash = TxHash.random(); + const tx2Hash = TxHash.random(); + const headerHash1 = Fr.random(); + const headerHash2 = Fr.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: tx1Hash, blockHash: headerHash1, isEvictable: true }, + { txHash: tx2Hash, blockHash: headerHash2, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + // Both txs reference pruned blocks + expect(result.txsEvicted).toContain(tx1Hash); + expect(result.txsEvicted).toContain(tx2Hash); + // Ensure syncImmediate is called before accessing the world state snapshot + expect(worldState.syncImmediate).toHaveBeenCalledWith(BlockNumber(1)); + }); + + it('respects non-evictable transactions', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const evictableTxHash = TxHash.random().toString(); + const nonEvictableTxHash = TxHash.random().toString(); + const headerHash1 = Fr.random(); + const headerHash2 = Fr.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: TxHash.fromString(evictableTxHash), blockHash: headerHash1, isEvictable: true }, + { txHash: TxHash.fromString(nonEvictableTxHash), blockHash: headerHash2, isEvictable: false }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([TxHash.fromString(evictableTxHash)]); // Only evictable tx is evicted + expect(txPool.deleteTxs).toHaveBeenCalledWith([TxHash.fromString(evictableTxHash)]); + }); + + it('handles large number of transactions efficiently', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const largeTxBlockRefs: TxBlockReference[] = []; + + // Create 1000 transactions + for (let i = 0; i < 1000; i++) { + const txHash = TxHash.random(); + const headerHash = Fr.random(); + largeTxBlockRefs.push({ txHash, blockHash: headerHash, isEvictable: true }); + } + + const pendingTxs: PendingTxInfo[] = largeTxBlockRefs.map(ref => ({ + txHash: ref.txHash, + blockHash: ref.blockHash, + isEvictable: ref.isEvictable, + })); + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted.length).toBe(pendingTxs.length); + expect(txPool.deleteTxs).toHaveBeenCalledWith(result.txsEvicted); + }); + + it('handles error from deleteTxs operation', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const txHash = TxHash.random().toString(); + const headerHash = Fr.random(); + const error = new Error('Test error'); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: TxHash.fromString(txHash), blockHash: headerHash, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + txPool.deleteTxs.mockRejectedValue(error); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(false); + expect(result.error?.cause).toBe(error); + }); + }); + + describe('edge cases', () => { + it('evicts transactions with valid header hash format', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const txHash = TxHash.random().toString(); + const headerHash = Fr.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: TxHash.fromString(txHash), blockHash: headerHash, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([TxHash.fromString(txHash)]); + expect(txPool.deleteTxs).toHaveBeenCalledWith([TxHash.fromString(txHash)]); + }); + + it('deduplicates block hashes when multiple txs reference the same block', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const sharedBlockHash = Fr.random(); + const tx1Hash = TxHash.random(); + const tx2Hash = TxHash.random(); + const tx3Hash = TxHash.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: tx1Hash, blockHash: sharedBlockHash, isEvictable: true }, + { txHash: tx2Hash, blockHash: sharedBlockHash, isEvictable: true }, + { txHash: tx3Hash, blockHash: sharedBlockHash, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(3); + expect(result.txsEvicted).toContain(tx1Hash); + expect(result.txsEvicted).toContain(tx2Hash); + expect(result.txsEvicted).toContain(tx3Hash); + expect(db.findLeafIndices).toHaveBeenCalledTimes(1); + expect(db.findLeafIndices).toHaveBeenCalledWith(expect.anything(), [sharedBlockHash]); + }); + + it('only evicts txs referencing pruned blocks, keeps txs referencing valid blocks', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const validBlockHash = Fr.random(); + const prunedBlockHash = Fr.random(); + const tx1Hash = TxHash.random(); + const tx2Hash = TxHash.random(); + const tx3Hash = TxHash.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: tx1Hash, blockHash: validBlockHash, isEvictable: true }, + { txHash: tx2Hash, blockHash: prunedBlockHash, isEvictable: true }, + { txHash: tx3Hash, blockHash: validBlockHash, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + db.findLeafIndices.mockImplementation((_, hashes) => + Promise.resolve((hashes as Fr[]).map(h => (h.equals(validBlockHash) ? 42n : undefined))), + ); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(1); + expect(result.txsEvicted).toContain(tx2Hash); + expect(result.txsEvicted).not.toContain(tx1Hash); + expect(result.txsEvicted).not.toContain(tx3Hash); + }); + + it('handles mix of shared and unique block hashes with some valid and some pruned', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const validSharedHash = Fr.random(); + const prunedSharedHash = Fr.random(); + const prunedUniqueHash = Fr.random(); + + const tx1Hash = TxHash.random(); + const tx2Hash = TxHash.random(); + const tx3Hash = TxHash.random(); + const tx4Hash = TxHash.random(); + const tx5Hash = TxHash.random(); + + const pendingTxs: PendingTxInfo[] = [ + { txHash: tx1Hash, blockHash: validSharedHash, isEvictable: true }, + { txHash: tx2Hash, blockHash: validSharedHash, isEvictable: true }, + { txHash: tx3Hash, blockHash: prunedSharedHash, isEvictable: true }, + { txHash: tx4Hash, blockHash: prunedSharedHash, isEvictable: true }, + { txHash: tx5Hash, blockHash: prunedUniqueHash, isEvictable: true }, + ]; + + txPool.getPendingTxInfos.mockResolvedValue(pendingTxs); + + db.findLeafIndices.mockImplementation((_, hashes) => + Promise.resolve((hashes as Fr[]).map(h => (h.equals(validSharedHash) ? 10n : undefined))), + ); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toHaveLength(3); + expect(result.txsEvicted).toContain(tx3Hash); + expect(result.txsEvicted).toContain(tx4Hash); + expect(result.txsEvicted).toContain(tx5Hash); + expect(result.txsEvicted).not.toContain(tx1Hash); + expect(result.txsEvicted).not.toContain(tx2Hash); + expect(db.findLeafIndices).toHaveBeenCalledTimes(1); + const calledHashes = db.findLeafIndices.mock.calls[0][1] as Fr[]; + expect(calledHashes).toHaveLength(3); + }); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts new file mode 100644 index 000000000000..09acfc630e68 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/invalid_txs_after_reorg_rule.ts @@ -0,0 +1,93 @@ +import { findIndexInSortedArray, insertIntoSortedArray } from '@aztec/foundation/array'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { createLogger } from '@aztec/foundation/log'; +import type { WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { MerkleTreeId } from '@aztec/stdlib/trees'; +import type { TxHash } from '@aztec/stdlib/tx'; + +import type { TxPoolOptions } from '../tx_pool.js'; +import { + type EvictionContext, + EvictionEvent, + type EvictionResult, + type EvictionRule, + type TxPoolOperations, +} from './eviction_strategy.js'; + +/** + * Eviction rule that removes invalid transactions after a blockchain reorganization. + * Only triggers on CHAIN_PRUNED events. + * + * Eviction criteria includes: + * - Transactions that reference pruned block hashes (invalid by definition) + */ +export class InvalidTxsAfterReorgRule implements EvictionRule { + public readonly name = 'InvalidTxsAfterReorg'; + + private log = createLogger('p2p:mempool:tx_pool:invalid_txs_after_reorg_rule'); + + public constructor(private worldState: WorldStateSynchronizer) {} + + async evict(context: EvictionContext, txPool: TxPoolOperations): Promise { + if (context.event !== EvictionEvent.CHAIN_PRUNED) { + return { + reason: 'reorg_invalid_txs', + success: true, + txsEvicted: [], + }; + } + + try { + const candidateTxs = (await txPool.getPendingTxInfos()).filter(({ isEvictable }) => isEvictable); + + // Deduplicate block hashes to reduce redundant DB lookups (many txs may share the same blockHash). + const uniqueBlockHashes: Fr[] = []; + candidateTxs.forEach(({ blockHash }) => { + insertIntoSortedArray(uniqueBlockHashes, blockHash, Fr.cmp, false); + }); + + // Ensure world state is synced to this block before accessing the snapshot. + await this.worldState.syncImmediate(context.blockNumber); + const db = this.worldState.getSnapshot(context.blockNumber); + const blocksFromDb = await db.findLeafIndices(MerkleTreeId.ARCHIVE, uniqueBlockHashes); + + // Identify txs whose blockHash is not found in the archive (pruned) + const txsToEvict: TxHash[] = []; + for (const tx of candidateTxs) { + const idx = findIndexInSortedArray(uniqueBlockHashes, tx.blockHash, Fr.cmp); + const blockPruned = idx === -1 || blocksFromDb[idx] === undefined; + if (blockPruned) { + txsToEvict.push(tx.txHash); + } + } + + if (txsToEvict.length > 0) { + this.log.verbose(`Evicting ${txsToEvict.length} txs from pool due to referencing pruned blocks`); + await txPool.deleteTxs(txsToEvict); + } + + const keptCount = candidateTxs.length - txsToEvict.length; + if (keptCount > 0) { + this.log.verbose(`Kept ${keptCount} txs that did not reference pruned blocks`); + } + + this.log.debug(`Evicted ${txsToEvict.length} invalid txs after reorg`); + + return { + reason: 'reorg_invalid_txs', + success: true, + txsEvicted: txsToEvict, + }; + } catch (err) { + this.log.error('Failed to evict invalid transactions after reorg', { err }); + return { + reason: 'reorg_invalid_txs', + success: false, + txsEvicted: [], + error: new Error('Failed to evict invalid txs after reorg', { cause: err }), + }; + } + } + + updateConfig(_config: TxPoolOptions): void {} +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.test.ts new file mode 100644 index 000000000000..becdc04ac044 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.test.ts @@ -0,0 +1,201 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { BlockHeader, TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { type EvictionContext, EvictionEvent, type TxPoolOperations } from './eviction_strategy.js'; +import { type LowPriorityEvictionConfig, LowPriorityEvictionRule } from './low_priority_eviction_rule.js'; + +describe('LowPriorityEvictionRule', () => { + let txPool: MockProxy; + let rule: LowPriorityEvictionRule; + let config: LowPriorityEvictionConfig; + + beforeEach(() => { + txPool = mock(); + txPool.getPendingTxInfos.mockResolvedValue([]); + txPool.getPendingTxCount.mockResolvedValue(0); + txPool.getLowestPriorityEvictable.mockResolvedValue([]); + + config = { + maxPoolSize: 100, + }; + rule = new LowPriorityEvictionRule(config); + }); + + describe('constructor and configuration', () => { + it('initializes with provided config', () => { + expect(rule.name).toBe('LowPriorityEviction'); + expect(rule.getConfig()).toEqual(config); + }); + + it('updates the config', () => { + rule.updateConfig({ maxPendingTxCount: 200 }); + expect(rule.getConfig()).toEqual({ + maxPoolSize: 200, + }); + }); + }); + + describe('evict method', () => { + describe('non-TXS_ADDED events', () => { + it('returns empty result for BLOCK_MINED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.BLOCK_MINED, + block: BlockHeader.empty(), + newNullifiers: [], + feePayers: [], + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + }); + + it('returns empty result for CHAIN_PRUNED event', async () => { + const context: EvictionContext = { + event: EvictionEvent.CHAIN_PRUNED, + blockNumber: BlockNumber(1), + }; + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + }); + }); + + describe('TXS_ADDED events', () => { + let context: EvictionContext; + + beforeEach(() => { + context = { + event: EvictionEvent.TXS_ADDED, + newTxs: [TxHash.random(), TxHash.random()], + feePayers: [], + }; + }); + + it('returns empty result when maxPoolSize is 0', async () => { + rule.updateConfig({ maxPendingTxCount: 0 }); + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + }); + + it('returns empty result when mempool size is below threshold', async () => { + txPool.getPendingTxCount.mockResolvedValue(Math.floor(config.maxPoolSize / 2)); + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + }); + + it('returns empty result when mempool size equals threshold', async () => { + txPool.getPendingTxCount.mockResolvedValue(config.maxPoolSize); + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + }); + + it('evicts transactions when mempool size exceeds threshold', async () => { + rule.updateConfig({ maxPendingTxCount: 1 }); + + const tx1 = TxHash.random(); + const tx2 = TxHash.random(); + + txPool.getPendingTxCount.mockResolvedValue(3); + txPool.getLowestPriorityEvictable.mockResolvedValue([tx1, tx2]); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([tx1, tx2]); // Should evict enough to get below target + expect(txPool.deleteTxs).toHaveBeenCalledWith([tx1, tx2]); + }); + + it('tracks newly added transactions that were evicted', async () => { + rule.updateConfig({ maxPendingTxCount: 1 }); + + const newTx1 = TxHash.random(); + const newTx2 = TxHash.random(); + const oldTx = TxHash.random(); + + (context as any).newTxs = [newTx1, newTx2]; + + txPool.getPendingTxCount.mockResolvedValue(3); + txPool.getLowestPriorityEvictable.mockResolvedValue([oldTx, newTx1]); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(true); + expect(result.txsEvicted).toEqual([oldTx, newTx1]); + expect(txPool.deleteTxs).toHaveBeenCalledWith([oldTx, newTx1]); + }); + + it('handles all transactions being non-evictable', async () => { + txPool.getPendingTxCount.mockResolvedValue(config.maxPoolSize + 1); + txPool.getLowestPriorityEvictable.mockResolvedValue([]); + + const result = await rule.evict(context, txPool); + + expect(result).toEqual({ + reason: 'low_priority', + success: true, + txsEvicted: [], + }); + expect(txPool.deleteTxs).not.toHaveBeenCalled(); + expect(txPool.getLowestPriorityEvictable).toHaveBeenCalledWith(1); + }); + + it('handles error from txPool operations', async () => { + const error = new Error('Test error'); + txPool.getPendingTxCount.mockRejectedValue(error); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(false); + expect(result.txsEvicted).toEqual([]); + expect(result.error).toBeInstanceOf(Error); + expect(result.error?.message).toContain('Failed to evict low priority txs'); + expect(result.error?.cause).toBe(error); + }); + + it('handles error from deleteTxs operation', async () => { + rule.updateConfig({ maxPendingTxCount: 1 }); + const t1 = TxHash.random(); + const t2 = TxHash.random(); + txPool.getPendingTxCount.mockResolvedValue(2); + txPool.getLowestPriorityEvictable.mockResolvedValue([t1, t2]); + txPool.deleteTxs.mockRejectedValue(new Error('Test error')); + + const result = await rule.evict(context, txPool); + + expect(result.success).toBe(false); + expect(result.txsEvicted).toEqual([]); + expect(result.error?.cause).toEqual(new Error('Test error')); + }); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts new file mode 100644 index 000000000000..e2180dca140c --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/low_priority_eviction_rule.ts @@ -0,0 +1,106 @@ +import { createLogger } from '@aztec/foundation/log'; +import type { TxHash } from '@aztec/stdlib/tx'; + +import type { TxPoolOptions } from '../tx_pool.js'; +import { + type EvictionContext, + EvictionEvent, + type EvictionResult, + type EvictionRule, + type TxPoolOperations, +} from './eviction_strategy.js'; + +export interface LowPriorityEvictionConfig { + /** Maximum number of pending transactions before eviction kicks in */ + maxPoolSize: number; +} + +/** + * Eviction rule that removes low-priority transactions when the number of pending transactions exceeds configured limits. + * Only triggers on TXS_ADDED events and respects non-evictable transactions. + */ +export class LowPriorityEvictionRule implements EvictionRule { + public readonly name = 'LowPriorityEviction'; + + private log = createLogger('p2p:mempool:tx_pool:low_priority_eviction_rule'); + + constructor(private config: LowPriorityEvictionConfig) {} + + public async evict(context: EvictionContext, txPool: TxPoolOperations): Promise { + if (context.event !== EvictionEvent.TXS_ADDED) { + return { + reason: 'low_priority', + success: true, + txsEvicted: [], + }; + } + + if (this.config.maxPoolSize === 0) { + return { + reason: 'low_priority', + success: true, + txsEvicted: [], + }; + } + + try { + const currentTxCount = await txPool.getPendingTxCount(); + const maxCount = this.config.maxPoolSize; + + if (currentTxCount <= maxCount) { + this.log.trace(`Not evicting low priority txs. Pending tx count below limit ${currentTxCount} <= ${maxCount}`); + return { + reason: 'low_priority', + success: true, + txsEvicted: [], + }; + } + + this.log.verbose(`Evicting low priority txs. Pending tx count above limit: ${currentTxCount} > ${maxCount}`); + const numberToEvict = currentTxCount - maxCount; + const txsToEvict: TxHash[] = await txPool.getLowestPriorityEvictable(numberToEvict); + + if (txsToEvict.length > 0) { + await txPool.deleteTxs(txsToEvict); + } + + const numNewTxsEvicted = context.newTxs.filter(newTxHash => + txsToEvict.some(evictedTx => evictedTx.equals(newTxHash)), + ).length; + + this.log.verbose(`Evicted ${txsToEvict.length} low priority txs, including ${numNewTxsEvicted} newly added txs`, { + txsEvicted: txsToEvict, + }); + + return { + reason: 'low_priority', + success: true, + txsEvicted: txsToEvict, + }; + } catch (err) { + this.log.error('Failed to evict low priority transactions', { err }); + return { + reason: 'low_priority', + success: false, + txsEvicted: [], + error: new Error('Failed to evict low priority txs', { cause: err }), + }; + } + } + + /** + * Updates the configuration for this eviction rule + */ + updateConfig(config: TxPoolOptions): void { + if (config.maxPendingTxCount !== undefined) { + this.config.maxPoolSize = config.maxPendingTxCount; + } + } + + /** + * Gets the current configuration + */ + getConfig(): LowPriorityEvictionConfig { + return { ...this.config }; + } +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.test.ts new file mode 100644 index 000000000000..1359210b0bae --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.test.ts @@ -0,0 +1,382 @@ +import { Fr } from '@aztec/foundation/curves/bn254'; +import { GasFees } from '@aztec/stdlib/gas'; +import { mockTx } from '@aztec/stdlib/testing'; +import { type Tx, TxHash } from '@aztec/stdlib/tx'; + +import { type MockProxy, mock } from 'jest-mock-extended'; + +import { getPendingTxPriority } from '../priority.js'; +import type { PreAddPoolAccess } from './eviction_strategy.js'; +import { NullifierConflictPreAddRule } from './nullifier_conflict_pre_add_rule.js'; + +describe('NullifierConflictPreAddRule', () => { + let poolAccess: MockProxy; + let rule: NullifierConflictPreAddRule; + + // Tx type alias for cleaner type annotations + type MockTx = Awaited>; + + // Helper to create a public tx (forPublic path) with a specific fee + const mockPublicTx = (seed: number, fee: number) => + mockTx(seed, { + maxPriorityFeesPerGas: new GasFees(fee, fee), + numberOfNonRevertiblePublicCallRequests: 1, + }); + + // Helper to create a private-only tx (forRollup path) with a specific fee + const mockPrivateTx = (seed: number, fee: number) => + mockTx(seed, { + maxPriorityFeesPerGas: new GasFees(fee, fee), + numberOfNonRevertiblePublicCallRequests: 0, + numberOfRevertiblePublicCallRequests: 0, + }); + + // Helper to set a specific nullifier on a transaction + const setNullifier = (tx: MockTx, index: number, value: Fr) => { + if (tx.data.forPublic) { + tx.data.forPublic.nonRevertibleAccumulatedData.nullifiers[index] = value; + } else if (tx.data.forRollup) { + tx.data.forRollup.end.nullifiers[index] = value; + } + }; + + const getNullifier = (tx: MockTx, index: number): Fr => { + if (tx.data.forPublic) { + return tx.data.forPublic.nonRevertibleAccumulatedData.nullifiers[index]; + } else if (tx.data.forRollup) { + return tx.data.forRollup.end.nullifiers[index]; + } + throw new Error('Transaction has no nullifiers'); + }; + + beforeEach(() => { + poolAccess = mock(); + poolAccess.getTxHashByNullifier.mockResolvedValue(undefined); + poolAccess.getPendingTxByHash.mockResolvedValue(undefined); + poolAccess.getTxPriority.mockImplementation((tx: Tx) => getPendingTxPriority(tx)); + + rule = new NullifierConflictPreAddRule(); + }); + + describe('check method', () => { + describe('no conflicts', () => { + it('accepts tx when no nullifier conflicts exist', async () => { + const tx = await mockPublicTx(1, 5); + + const result = await rule.check(tx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.length).toBe(0); + }); + + it('accepts tx with different nullifiers than existing txs', async () => { + const tx = await mockPublicTx(1, 5); + + // No conflicts - getTxHashesByNullifier returns empty for all nullifiers + const result = await rule.check(tx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.length).toBe(0); + }); + }); + + describe('basic conflict resolution', () => { + it('rejects tx when existing tx has same nullifier with higher fee', async () => { + const existingTx = await mockPublicTx(1, 10); + const incomingTx = await mockPublicTx(2, 5); + + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(true); + expect(result.txHashesToEvict.length).toBe(0); + }); + + it('evicts existing tx when incoming tx has same nullifier with higher fee', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPublicTx(2, 10); + + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash))).toBe(true); + expect(result.txHashesToEvict.length).toBe(1); + }); + + it('rejects tx with equal fee (no replacement on tie)', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPublicTx(2, 5); + + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(true); + expect(result.txHashesToEvict.length).toBe(0); + }); + }); + + describe('forPublic vs forRollup paths', () => { + it('handles nullifier conflicts for private-only txs (forRollup path)', async () => { + const existingTx = await mockPrivateTx(1, 5); + const incomingTx = await mockPrivateTx(2, 10); + + expect(existingTx.data.forRollup).toBeDefined(); + expect(incomingTx.data.forRollup).toBeDefined(); + + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash))).toBe(true); + }); + + it('handles nullifier conflicts between forPublic and forRollup txs', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPrivateTx(2, 10); + + expect(existingTx.data.forPublic).toBeDefined(); + expect(incomingTx.data.forRollup).toBeDefined(); + + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash))).toBe(true); + }); + }); + + describe('partial nullifier overlap', () => { + it('detects conflict when txs share only ONE nullifier', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPublicTx(2, 10); + + // Give both txs second nullifiers, share only first + setNullifier(existingTx, 1, Fr.random()); + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + setNullifier(incomingTx, 1, Fr.random()); + + const existingHash = existingTx.getTxHash(); + + // Only return conflict for the shared nullifier + poolAccess.getTxHashByNullifier.mockImplementation(nullifier => { + if (nullifier.equals(getNullifier(existingTx, 0))) { + return Promise.resolve(existingHash); + } + return Promise.resolve(undefined); + }); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash))).toBe(true); + }); + + it('rejects tx with partial overlap when existing has higher fee', async () => { + const existingTx = await mockPublicTx(1, 10); + const incomingTx = await mockPublicTx(2, 5); + + setNullifier(existingTx, 1, Fr.random()); + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + setNullifier(incomingTx, 1, Fr.random()); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockImplementation(nullifier => { + if (nullifier.equals(getNullifier(existingTx, 0))) { + return Promise.resolve(existingHash); + } + return Promise.resolve(undefined); + }); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(true); + expect(result.txHashesToEvict.length).toBe(0); + }); + }); + + describe('multiple conflicts', () => { + it('evicts multiple txs when incoming tx beats all of them', async () => { + const existingTx1 = await mockPublicTx(1, 3); + const existingTx2 = await mockPublicTx(2, 4); + const incomingTx = await mockPublicTx(3, 10); + + // incoming tx shares nullifiers with both existing txs + setNullifier(incomingTx, 0, getNullifier(existingTx1, 0)); + setNullifier(incomingTx, 1, getNullifier(existingTx2, 0)); + + const existingHash1 = existingTx1.getTxHash(); + const existingHash2 = existingTx2.getTxHash(); + + poolAccess.getTxHashByNullifier.mockImplementation(nullifier => { + if (nullifier.equals(getNullifier(existingTx1, 0))) { + return Promise.resolve(existingHash1); + } + if (nullifier.equals(getNullifier(existingTx2, 0))) { + return Promise.resolve(existingHash2); + } + return Promise.resolve(undefined); + }); + poolAccess.getPendingTxByHash.mockImplementation(hash => { + if (hash.equals(existingHash1)) { + return Promise.resolve(existingTx1); + } + if (hash.equals(existingHash2)) { + return Promise.resolve(existingTx2); + } + return Promise.resolve(undefined); + }); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash1))).toBe(true); + expect(result.txHashesToEvict.some(h => h.equals(existingHash2))).toBe(true); + expect(result.txHashesToEvict.length).toBe(2); + }); + + it('rejects incoming tx if it cannot beat ALL conflicting txs', async () => { + const existingTx1 = await mockPublicTx(1, 3); + const existingTx2 = await mockPublicTx(2, 100); // Higher fee than incoming + const incomingTx = await mockPublicTx(3, 10); + + setNullifier(incomingTx, 0, getNullifier(existingTx1, 0)); + setNullifier(incomingTx, 1, getNullifier(existingTx2, 0)); + + const existingHash1 = existingTx1.getTxHash(); + const existingHash2 = existingTx2.getTxHash(); + + poolAccess.getTxHashByNullifier.mockImplementation(nullifier => { + if (nullifier.equals(getNullifier(existingTx1, 0))) { + return Promise.resolve(existingHash1); + } + if (nullifier.equals(getNullifier(existingTx2, 0))) { + return Promise.resolve(existingHash2); + } + return Promise.resolve(undefined); + }); + poolAccess.getPendingTxByHash.mockImplementation(hash => { + if (hash.equals(existingHash1)) { + return Promise.resolve(existingTx1); + } + if (hash.equals(existingHash2)) { + return Promise.resolve(existingTx2); + } + return Promise.resolve(undefined); + }); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(true); + expect(result.txHashesToEvict.length).toBe(0); // Atomic: no partial evictions + }); + }); + + describe('same tx with multiple shared nullifiers', () => { + it('handles two txs sharing multiple nullifiers', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPublicTx(2, 10); + + // Share both nullifiers + setNullifier(existingTx, 1, Fr.random()); + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + setNullifier(incomingTx, 1, getNullifier(existingTx, 1)); + + const existingHash = existingTx.getTxHash(); + + // Both nullifiers map to the same existing tx + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.some(h => h.equals(existingHash))).toBe(true); + expect(result.txHashesToEvict.length).toBe(1); // Only added once, not duplicated + }); + + it('does not double-count when same tx conflicts on multiple nullifiers', async () => { + const existingTx = await mockPublicTx(1, 5); + const incomingTx = await mockPublicTx(2, 10); + + // Share 3 nullifiers + setNullifier(existingTx, 1, Fr.random()); + setNullifier(existingTx, 2, Fr.random()); + setNullifier(incomingTx, 0, getNullifier(existingTx, 0)); + setNullifier(incomingTx, 1, getNullifier(existingTx, 1)); + setNullifier(incomingTx, 2, getNullifier(existingTx, 2)); + + const existingHash = existingTx.getTxHash(); + + poolAccess.getTxHashByNullifier.mockResolvedValue(existingHash); + poolAccess.getPendingTxByHash.mockResolvedValue(existingTx); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.length).toBe(1); // Existing tx only in array once + }); + }); + + describe('edge cases', () => { + it('skips self-reference (incoming tx hash in conflict list)', async () => { + const tx = await mockPublicTx(1, 5); + const txHash = tx.getTxHash(); + + // Simulate edge case where own hash appears in conflict list + poolAccess.getTxHashByNullifier.mockResolvedValue(txHash); + + const result = await rule.check(tx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.length).toBe(0); + }); + + it('handles missing conflicting tx gracefully', async () => { + const incomingTx = await mockPublicTx(1, 10); + + // Conflict exists in index but tx is not found + poolAccess.getTxHashByNullifier.mockResolvedValue(TxHash.random()); + poolAccess.getPendingTxByHash.mockResolvedValue(undefined); + + const result = await rule.check(incomingTx, poolAccess); + + expect(result.shouldReject).toBe(false); + expect(result.txHashesToEvict.length).toBe(0); + }); + }); + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts new file mode 100644 index 000000000000..1062e4e3c696 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/eviction/nullifier_conflict_pre_add_rule.ts @@ -0,0 +1,75 @@ +import { findIndexInSortedArray, insertIntoSortedArray } from '@aztec/foundation/array'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { createLogger } from '@aztec/foundation/log'; +import { type Tx, TxHash } from '@aztec/stdlib/tx'; + +import type { PreAddEvictionResult, PreAddEvictionRule, PreAddPoolAccess } from './eviction_strategy.js'; + +const cmpTxHash = (a: TxHash, b: TxHash) => Fr.cmp(a.hash, b.hash); + +/** + * Pre-add eviction rule that checks for nullifier conflicts between incoming and existing transactions. + * + * When an incoming tx shares nullifiers with existing pending txs: + * - If the incoming tx has strictly higher priority fee, evict all conflicting txs + * - If any conflicting tx has equal or higher priority fee, reject the incoming tx + * + * This prevents nullifier spam attacks where an attacker floods the mempool with + * transactions spending the same nullifiers. + */ +export class NullifierConflictPreAddRule implements PreAddEvictionRule { + public readonly name = 'NullifierConflictPreAdd'; + + private log = createLogger('p2p:mempool:tx_pool:nullifier_conflict_pre_add_rule'); + + /** + * Check if the incoming transaction conflicts with existing transactions via nullifiers. + * + * @param tx - The incoming transaction + * @param poolAccess - Read-only access to pool state + * @returns Result with rejection status and txs to evict + */ + async check(tx: Tx, poolAccess: PreAddPoolAccess): Promise { + const txHash = tx.getTxHash(); + const nullifiers = tx.data.getNonEmptyNullifiers(); + const txHashesToEvict: TxHash[] = []; + const incomingPriority = poolAccess.getTxPriority(tx); + + for (const nullifier of nullifiers) { + const conflictingHash = await poolAccess.getTxHashByNullifier(nullifier); + + if ( + !conflictingHash || + conflictingHash.equals(txHash) || + findIndexInSortedArray(txHashesToEvict, conflictingHash, cmpTxHash) !== -1 + ) { + continue; + } + + // Get the conflicting tx's priority + const conflictingTx = await poolAccess.getPendingTxByHash(conflictingHash); + if (!conflictingTx) { + continue; + } + + const conflictingPriority = poolAccess.getTxPriority(conflictingTx); + + // If incoming tx has strictly higher priority, mark for eviction + // Otherwise, reject incoming tx (ties go to existing tx) + if (incomingPriority > conflictingPriority) { + insertIntoSortedArray(txHashesToEvict, conflictingHash, cmpTxHash); + } else { + this.log.debug( + `Rejecting tx ${txHash.toString()}: nullifier conflict with ${conflictingHash.toString()} which has higher or equal fee`, + ); + return { + shouldReject: true, + txHashesToEvict: [], + reason: `nullifier conflict with ${conflictingHash.toString()}`, + }; + } + } + + return { shouldReject: false, txHashesToEvict }; + } +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/index.ts b/yarn-project/p2p/src/mem_pools/tx_pool/index.ts new file mode 100644 index 000000000000..fb022657701f --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/index.ts @@ -0,0 +1,2 @@ +export * from './tx_pool.js'; +export * from './aztec_kv_tx_pool.js'; diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts b/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts new file mode 100644 index 000000000000..69635ce4807a --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts @@ -0,0 +1,20 @@ +import { minBigint } from '@aztec/foundation/bigint'; +import { Buffer32 } from '@aztec/foundation/buffer'; +import type { Tx } from '@aztec/stdlib/tx'; + +/** + * Returns a string representing the priority of a tx. + * Txs with a higher priority value are returned first when retrieving pending tx hashes. + * We currently use the sum of the priority fees for the tx for this value, represented as hex. + */ +export function getPendingTxPriority(tx: Tx): string { + return Buffer32.fromBigInt(getTxPriorityFee(tx)).toString(); +} + +/** + * Returns the priority of a tx based on the L2 priority fee only, capped by the max fees per gas. + */ +export function getTxPriorityFee(tx: Tx): bigint { + const { maxPriorityFeesPerGas: priorityFees, maxFeesPerGas } = tx.getGasSettings(); + return minBigint(maxFeesPerGas.feePerL2Gas, priorityFees.feePerL2Gas); +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts new file mode 100644 index 000000000000..44c9ef97b38c --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts @@ -0,0 +1,141 @@ +import type { BlockNumber } from '@aztec/foundation/branded-types'; +import type { TypedEventEmitter } from '@aztec/foundation/types'; +import type { BlockHeader, Tx, TxHash } from '@aztec/stdlib/tx'; + +export type TxPoolOptions = { + maxPendingTxCount?: number; + archivedTxLimit?: number; +}; + +export type TxPoolEvents = { + ['txs-added']: (args: { txs: Tx[]; source?: string }) => void | Promise; +}; + +/** + * Interface of a transaction pool. The pool includes tx requests and is kept up-to-date by a P2P client. + */ +export interface TxPool extends TypedEventEmitter { + /** + * Adds a list of transactions to the pool. Duplicates are ignored. + * @param txs - An array of txs to be added to the pool. + * @returns The number of txs added to the pool. Note if the transaction already exists, it will not be added again. + */ + addTxs(txs: Tx[], opts?: { source?: string }): Promise; + + /** + * Checks if a transaction exists in the pool and returns it. + * @param txHash - The hash of the transaction, used as an ID. + * @returns The transaction, if found, 'undefined' otherwise. + */ + getTxByHash(txHash: TxHash): Promise; + + /** + * Checks if transactions exist in the pool and returns them. + * @param txHashes - The hashes of the transactions + * @returns The transactions, if found, 'undefined' otherwise. + */ + getTxsByHash(txHashes: TxHash[]): Promise<(Tx | undefined)[]>; + + /** + * Checks if transactions exist in the pool + * @param txHashes - The hashes of the transactions to check for + * @returns True or False for each tx hash + */ + hasTxs(txHashes: TxHash[]): Promise; + + /** + * Checks if a transaction exists in the pool + * @param txHash - The hash of the transaction to check for + * @returns True if the transaction exists, false otherwise + */ + hasTx(txHash: TxHash): Promise; + + /** + * Checks if an archived transaction exists in the pool and returns it. + * @param txHash - The hash of the transaction, used as an ID. + * @returns The transaction, if found, 'undefined' otherwise. + */ + getArchivedTxByHash(txHash: TxHash): Promise; + + /** + * Marks the set of txs as mined, as opposed to pending. + * @param txHashes - Hashes of the txs to flag as mined. + * @param blockHeader - The header of the mined block. + */ + markAsMined(txHashes: TxHash[], blockHeader: BlockHeader): Promise; + + /** + * Moves mined txs back to the pending set in the case of a reorg. + * Note: txs not known by this peer will be ignored. + * @param txHashes - Hashes of the txs to flag as pending. + * @param latestBlock - The block number the chain was pruned to. + */ + markMinedAsPending(txHashes: TxHash[], latestBlock: BlockNumber): Promise; + + /** + * Deletes transactions from the pool. Tx hashes that are not present are ignored. + * @param txHashes - An array of tx hashes to be removed from the tx pool. + */ + deleteTxs(txHashes: TxHash[], opts?: { permanently?: boolean }): Promise; + + /** + * Gets all transactions currently in the tx pool. + * @returns An array of transaction objects found in the tx pool. + */ + getAllTxs(): Promise; + + /** + * Gets the hashes of all transactions currently in the tx pool. + * @returns An array of transaction hashes found in the tx pool. + */ + getAllTxHashes(): Promise; + + /** + * Gets the hashes of pending transactions currently in the tx pool sorted by priority (see getPendingTxPriority). + * @returns An array of pending transaction hashes found in the tx pool. + */ + getPendingTxHashes(): Promise; + + /** Returns the number of pending txs in the pool. */ + getPendingTxCount(): Promise; + + /** + * Gets the hashes of mined transactions currently in the tx pool. + * @returns An array of mined transaction hashes found in the tx pool. + */ + getMinedTxHashes(): Promise<[tx: TxHash, blockNumber: BlockNumber][]>; + + /** + * Returns whether the given tx hash is flagged as pending, mined, or deleted. + * @param txHash - Hash of the tx to query. + * @returns Pending, mined, or deleted depending on its status, or undefined if not found. + */ + getTxStatus(txHash: TxHash): Promise<'pending' | 'mined' | 'deleted' | undefined>; + + /** + * Configure the maximum size of the tx pool + * @param maxSizeBytes - The maximum size in bytes of the mempool. Set to undefined to disable it + */ + updateConfig(config: TxPoolOptions): void; + + /** Returns whether the pool is empty. */ + isEmpty(): Promise; + + /** + * Marks transactions as non-evictible in the pool. + * @param txHashes - Hashes of the transactions to mark as non-evictible. + */ + markTxsAsNonEvictable(txHashes: TxHash[]): Promise; + + /** + * Clears collection of non-evictable transactions in the pool + */ + clearNonEvictableTxs(): Promise; + + /** + * Permanently deletes deleted mined transactions from blocks up to and including the specified block number. + * @param blockNumber - Block number threshold. Deleted mined txs from this block or earlier will be permanently deleted. + * @returns The number of transactions permanently deleted. + */ + cleanupDeletedMinedTxs(blockNumber: BlockNumber): Promise; +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_bench.test.ts b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_bench.test.ts new file mode 100644 index 000000000000..a600005c2db1 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_bench.test.ts @@ -0,0 +1,334 @@ +import { GENESIS_BLOCK_HEADER_HASH } from '@aztec/constants'; +import { insertIntoSortedArray, shuffle } from '@aztec/foundation/array'; +import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types'; +import { timesAsync } from '@aztec/foundation/collection'; +import { getDefaultConfig } from '@aztec/foundation/config'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { Timer } from '@aztec/foundation/timer'; +import { AztecLMDBStoreV2, createStore } from '@aztec/kv-store/lmdb-v2'; +import { GENESIS_CHECKPOINT_HEADER_HASH, type L2BlockSource } from '@aztec/stdlib/block'; +import type { L1ToL2MessageSource } from '@aztec/stdlib/messaging'; +import { ChonkProof } from '@aztec/stdlib/proofs'; +import { mockTx } from '@aztec/stdlib/testing'; +import type { TxHash } from '@aztec/stdlib/tx'; +import { ServerWorldStateSynchronizer, worldStateConfigMappings } from '@aztec/world-state'; +import { NativeWorldStateService } from '@aztec/world-state/native'; + +import { jest } from '@jest/globals'; +import { mock } from 'jest-mock-extended'; +import fs, { mkdtemp, rm } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import path from 'node:path'; +import { type RecordableHistogram, createHistogram } from 'node:perf_hooks'; + +import { AztecKVTxPool } from './aztec_kv_tx_pool.js'; +import type { TxPool } from './tx_pool.js'; + +const TEST_TIMEOUT = 150_000; +jest.setTimeout(TEST_TIMEOUT); + +const RUNS = 10; +const batchSizes = [ + // regular gossip + 1, + // batches of txs from block proposals + 4, 8, 20, 40, + // 400 - takes too long +] as const; + +describe('TxPool: Benchmarks', () => { + let pool: TxPool; + let store: AztecLMDBStoreV2; + let dataDirectory: string; + let ws: NativeWorldStateService; + let wsSync: ServerWorldStateSynchronizer; + let dbSizeBytes: Record<(typeof batchSizes)[number], number>; + let addHistogram: Record<(typeof batchSizes)[number], RecordableHistogram>; + let getHistogram: Record<(typeof batchSizes)[number], RecordableHistogram>; + let delHistogram: Record<(typeof batchSizes)[number], RecordableHistogram>; + + beforeAll(() => { + dbSizeBytes = Object.fromEntries(batchSizes.map(size => [size, 0])) as any; + addHistogram = Object.fromEntries(batchSizes.map(size => [size, createHistogram()])) as any; + getHistogram = Object.fromEntries(batchSizes.map(size => [size, createHistogram()])) as any; + delHistogram = Object.fromEntries(batchSizes.map(size => [size, createHistogram()])) as any; + }); + + afterAll(async () => { + if (process.env.BENCH_OUTPUT) { + const data: any[] = []; + for (const size of batchSizes) { + const add = addHistogram[size]; + const get = getHistogram[size]; + const del = delHistogram[size]; + + data.push({ + name: `TxPool/${size} txs/addTxs/dbSize_after_${RUNS}_batches`, + value: dbSizeBytes[size], + unit: 'bytes', + }); + + data.push({ + name: `TxPool/${size} txs/addTxs/avg`, + value: add.mean, + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/addTxs/p50`, + value: add.percentile(50), + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/addTxs/p95`, + value: add.percentile(95), + unit: 'ms', + }); + + data.push({ + name: `TxPool/${size} txs/getTxsByHash/avg`, + value: get.mean, + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/getTxsByHash/p50`, + value: get.percentile(50), + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/getTxsByHash/p95`, + value: get.percentile(95), + unit: 'ms', + }); + + data.push({ + name: `TxPool/${size} txs/deleteTxs/avg`, + value: del.mean, + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/deleteTxs/p50`, + value: del.percentile(50), + unit: 'ms', + }); + data.push({ + name: `TxPool/${size} txs/deleteTxs/p95`, + value: del.percentile(95), + unit: 'ms', + }); + } + + await fs.mkdir(path.dirname(process.env.BENCH_OUTPUT), { recursive: true }); + await fs.writeFile(process.env.BENCH_OUTPUT, JSON.stringify(data, null, 2)); + } else if (process.env.BENCH_OUTPUT_MD) { + await fs.mkdir(path.dirname(process.env.BENCH_OUTPUT_MD), { recursive: true }); + await using f = await fs.open(process.env.BENCH_OUTPUT_MD!, 'w'); + await f.write('|TYPE|SIZE|MIN|AVG|P50|P90|MAX|\n'); + await f.write('|----|----|---|---|---|---|---|\n'); + for (const size of batchSizes) { + const histo = addHistogram[size]; + await f.write( + `|ADD|${size}|${histo.min}|${histo.mean}|${histo.percentile(50)}|${histo.percentile(90)}|${histo.max}|\n`, + ); + } + for (const size of batchSizes) { + const histo = getHistogram[size]; + await f.write( + `|GET|${size}|${histo.min}|${histo.mean}|${histo.percentile(50)}|${histo.percentile(90)}|${histo.max}|\n`, + ); + } + for (const size of batchSizes) { + const histo = delHistogram[size]; + await f.write( + `|DEL|${size}|${histo.min}|${histo.mean}|${histo.percentile(50)}|${histo.percentile(90)}|${histo.max}|\n`, + ); + } + } + }); + + beforeEach(async () => { + dataDirectory = await mkdtemp(path.join(tmpdir(), 'tx-bench-')); + store = await createStore('tx', 1, { + dataDirectory, + dataStoreMapSizeKb: 10 * 1024 * 1024, + }); + + ws = await NativeWorldStateService.tmp(); + const l2 = mock({ + syncImmediate: () => Promise.resolve(), + getProvenBlockNumber: () => Promise.resolve(BlockNumber.ZERO), + getBlockNumber: () => Promise.resolve(BlockNumber.ZERO), + getL2Tips: () => { + const tipId = { + block: { number: BlockNumber.ZERO, hash: GENESIS_BLOCK_HEADER_HASH.toString() }, + checkpoint: { number: CheckpointNumber.ZERO, hash: GENESIS_CHECKPOINT_HEADER_HASH.toString() }, + }; + return Promise.resolve({ + proposed: { number: BlockNumber.ZERO, hash: GENESIS_BLOCK_HEADER_HASH.toString() }, + proposedCheckpoint: tipId, + checkpointed: tipId, + proven: tipId, + finalized: tipId, + }); + }, + }); + wsSync = new ServerWorldStateSynchronizer(ws, l2, getDefaultConfig(worldStateConfigMappings)); + await wsSync.start(); + pool = new AztecKVTxPool(store, store, wsSync); + }); + + afterEach(async () => { + await wsSync.stop(); + await ws.close(); + await store.close(); + await rm(dataDirectory, { recursive: true, maxRetries: 3, retryDelay: 100 }); + }); + + it.each(batchSizes)('add txs in batches of %d', async batchSize => { + for (let i = 0; i < RUNS; i++) { + const txs = await timesAsync(batchSize, seed => mockTx(seed, { chonkProof: ChonkProof.random() })); + const timer = new Timer(); + await pool.addTxs(txs); + addHistogram[batchSize].record(Math.max(1, Math.ceil(timer.ms()))); + } + + const sz = await store.estimateSize(); + dbSizeBytes[batchSize] = sz.physicalFileSize; + }); + + it.each(batchSizes)('get txs in batches of %d', async batchSize => { + const txs = await timesAsync(2 * batchSize, seed => mockTx(seed, { chonkProof: ChonkProof.random() })); + await pool.addTxs(txs); + const allHashes = await Promise.all(txs.map(tx => tx.getTxHash())); + for (let i = 0; i < RUNS; i++) { + shuffle(allHashes); + const hashesToGet = allHashes.slice(0, batchSize); + const timer = new Timer(); + await pool.getTxsByHash(hashesToGet); + getHistogram[batchSize].record(Math.max(1, Math.ceil(timer.ms()))); + } + }); + + it.each(batchSizes)('delete txs in batches of %d', async batchSize => { + const allHashes: TxHash[] = []; + + for (let i = 0; i < RUNS / 2; i++) { + const txs = await timesAsync(batchSize, seed => + mockTx(i * batchSize + seed, { chonkProof: ChonkProof.random() }), + ); + await pool.addTxs(txs); + allHashes.push(...(await Promise.all(txs.map(tx => tx.getTxHash())))); + } + + shuffle(allHashes); + for (let i = 0; i < RUNS / 2; i++) { + const hashesToRemove = allHashes.splice(0, batchSize); + const timer = new Timer(); + await pool.deleteTxs(hashesToRemove); + delHistogram[batchSize].record(Math.max(1, Math.ceil(timer.ms()))); + } + }); +}); + +describe('Fr deduplication: insertIntoSortedArray vs Set', () => { + const BENCH_RUNS = 100; + const elementCounts = [10, 50, 100, 500] as const; + const duplicateRatios = [0, 0.25, 0.5] as const; + + let sortedArrayHistogram: Record<(typeof elementCounts)[number], Record<(typeof duplicateRatios)[number], number[]>>; + let setHistogram: Record<(typeof elementCounts)[number], Record<(typeof duplicateRatios)[number], number[]>>; + + beforeAll(() => { + sortedArrayHistogram = Object.fromEntries( + elementCounts.map(count => [count, Object.fromEntries(duplicateRatios.map(ratio => [ratio, []]))]), + ) as any; + setHistogram = Object.fromEntries( + elementCounts.map(count => [count, Object.fromEntries(duplicateRatios.map(ratio => [ratio, []]))]), + ) as any; + }); + + afterAll(async () => { + if (process.env.BENCH_OUTPUT) { + const data: any[] = []; + for (const count of elementCounts) { + for (const ratio of duplicateRatios) { + const sortedTimes = sortedArrayHistogram[count][ratio]; + const setTimes = setHistogram[count][ratio]; + const sortedAvg = sortedTimes.reduce((a, b) => a + b, 0) / sortedTimes.length; + const setAvg = setTimes.reduce((a, b) => a + b, 0) / setTimes.length; + + data.push({ + name: `FrDedup/${count} elements/${ratio * 100}% duplicates/sortedArray/avg`, + value: sortedAvg, + unit: 'ms', + }); + data.push({ + name: `FrDedup/${count} elements/${ratio * 100}% duplicates/set/avg`, + value: setAvg, + unit: 'ms', + }); + } + } + + await fs.mkdir(path.dirname(process.env.BENCH_OUTPUT), { recursive: true }); + await fs.writeFile(process.env.BENCH_OUTPUT, JSON.stringify(data, null, 2)); + } else if (process.env.BENCH_OUTPUT_MD) { + await fs.mkdir(path.dirname(process.env.BENCH_OUTPUT_MD), { recursive: true }); + await using f = await fs.open(process.env.BENCH_OUTPUT_MD!, 'w'); + await f.write('| Elements | Dup Ratio | SortedArray Avg (ms) | Set Avg (ms) | Winner |\n'); + await f.write('|----------|-----------|----------------------|--------------|--------|\n'); + for (const count of elementCounts) { + for (const ratio of duplicateRatios) { + const sortedTimes = sortedArrayHistogram[count][ratio]; + const setTimes = setHistogram[count][ratio]; + const sortedAvg = sortedTimes.reduce((a, b) => a + b, 0) / sortedTimes.length; + const setAvg = setTimes.reduce((a, b) => a + b, 0) / setTimes.length; + const winner = sortedAvg < setAvg ? 'SortedArray' : 'Set'; + await f.write( + `| ${count.toString().padStart(8)} | ${(ratio * 100).toFixed(0).padStart(7)}% | ${sortedAvg.toFixed(4).padStart(20)} | ${setAvg.toFixed(4).padStart(12)} | ${winner.padStart(6)} |\n`, + ); + } + } + } + }); + + function generateFrValues(count: number, duplicateRatio: number): Fr[] { + const uniqueCount = Math.floor(count * (1 - duplicateRatio)); + const uniqueValues = Array.from({ length: uniqueCount }, () => Fr.random()); + const result = [...uniqueValues]; + + while (result.length < count) { + const randomIndex = Math.floor(Math.random() * uniqueValues.length); + result.push(uniqueValues[randomIndex]); + } + + shuffle(result); + return result; + } + + it.each(elementCounts)('benchmark with %d elements', count => { + for (const duplicateRatio of duplicateRatios) { + for (let run = 0; run < BENCH_RUNS; run++) { + const values = generateFrValues(count, duplicateRatio); + + // Benchmark insertIntoSortedArray approach + const sortedArray: Fr[] = []; + const sortedTimer = new Timer(); + for (const value of values) { + insertIntoSortedArray(sortedArray, value, Fr.cmp, false); + } + sortedArrayHistogram[count][duplicateRatio].push(sortedTimer.ms()); + + // Benchmark Set approach + const set = new Set(); + const setTimer = new Timer(); + for (const value of values) { + const key = value.toString(); + if (!set.has(key)) { + set.add(key); + } + } + setHistogram[count][duplicateRatio].push(setTimer.ms()); + } + } + }); +}); diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts new file mode 100644 index 000000000000..752216460af4 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts @@ -0,0 +1,321 @@ +import { BlockNumber } from '@aztec/foundation/branded-types'; +import { unfreeze } from '@aztec/foundation/types'; +import { GasFees } from '@aztec/stdlib/gas'; +import { mockTx } from '@aztec/stdlib/testing'; +import { BlockHeader, GlobalVariables, type Tx } from '@aztec/stdlib/tx'; + +import type { TxPool } from './tx_pool.js'; + +/** + * Tests a TxPool implementation. + * @param getTxPool - Gets a fresh TxPool + */ +export function describeTxPool(getTxPool: () => TxPool) { + let pool: TxPool; + + const minedBlockHeader = BlockHeader.empty({ + globalVariables: GlobalVariables.empty({ blockNumber: BlockNumber(1), timestamp: 0n }), + }); + + beforeEach(() => { + pool = getTxPool(); + }); + + afterEach(() => { + pool.removeAllListeners('txs-added'); + }); + + it('adds txs to the pool as pending', async () => { + const tx1 = await mockTx(1); + + await pool.addTxs([tx1]); + const poolTx = await pool.getTxByHash(tx1.getTxHash()); + expect(poolTx!.getTxHash()).toEqual(tx1.getTxHash()); + await expect(pool.getTxStatus(tx1.getTxHash())).resolves.toEqual('pending'); + await expect(pool.getPendingTxHashes()).resolves.toEqual([tx1.getTxHash()]); + await expect(pool.getPendingTxCount()).resolves.toEqual(1); + }); + + it('emits txs-added event with new txs', async () => { + const tx1 = await mockTx(1); // existing and pending + const tx2 = await mockTx(2); // mined but not known + const tx3 = await mockTx(3); // brand new + + await pool.addTxs([tx1]); + await pool.markAsMined([tx2.getTxHash()], minedBlockHeader); + + let txsFromEvent: Tx[] | undefined = undefined; + pool.once('txs-added', ({ txs }) => { + txsFromEvent = txs; + }); + + await pool.addTxs([tx1, tx2, tx3]); + expect(txsFromEvent).toBeDefined(); + expect(txsFromEvent).toHaveLength(2); + const eventHashes = txsFromEvent!.map(tx => tx.getTxHash()); + expect(eventHashes).toEqual(expect.arrayContaining([tx2.getTxHash(), tx3.getTxHash()])); + }); + + it('removes txs from the pool', async () => { + const pendingTx = await mockTx(1); + const minedTx = await mockTx(2); + + await pool.addTxs([pendingTx, minedTx]); + await pool.markAsMined([minedTx.getTxHash()], minedBlockHeader); + + // Delete a pending tx - should be permanently deleted + await pool.deleteTxs([pendingTx.getTxHash()]); + await expect(pool.getTxByHash(pendingTx.getTxHash())).resolves.toBeUndefined(); + await expect(pool.getTxStatus(pendingTx.getTxHash())).resolves.toBeUndefined(); + + // Delete a mined tx - should be soft-deleted (still in storage) + await pool.deleteTxs([minedTx.getTxHash()]); + await expect(pool.getTxByHash(minedTx.getTxHash())).resolves.toBeDefined(); + await expect(pool.getTxStatus(minedTx.getTxHash())).resolves.toEqual('deleted'); + await expect(pool.getMinedTxHashes()).resolves.toEqual([]); + + await expect(pool.getPendingTxCount()).resolves.toEqual(0); + }); + + it('marks txs as mined', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + + await pool.addTxs([tx1, tx2]); + await pool.markAsMined([tx1.getTxHash()], minedBlockHeader); + + const retrievedTx = await pool.getTxByHash(tx1.getTxHash()); + expect(retrievedTx?.getTxHash()).toEqual(tx1.getTxHash()); + await expect(pool.getTxStatus(tx1.getTxHash())).resolves.toEqual('mined'); + await expect(pool.getMinedTxHashes()).resolves.toEqual([[tx1.getTxHash(), 1]]); + await expect(pool.getPendingTxHashes()).resolves.toEqual([tx2.getTxHash()]); + await expect(pool.getPendingTxCount()).resolves.toEqual(1); + }); + + it('marks txs as pending after being mined', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + + await pool.addTxs([tx1, tx2]); + await pool.markAsMined([tx1.getTxHash()], minedBlockHeader); + + await pool.markMinedAsPending([tx1.getTxHash()], BlockNumber(1)); + await expect(pool.getMinedTxHashes()).resolves.toEqual([]); + const pending = await pool.getPendingTxHashes(); + expect(pending).toHaveLength(2); + expect(pending).toEqual(expect.arrayContaining([tx1.getTxHash(), tx2.getTxHash()])); + await expect(pool.getPendingTxCount()).resolves.toEqual(2); + }); + + it('only marks txs as pending if they are known', async () => { + const tx1 = await mockTx(1); + // simulate a situation where not all peers have all the txs + const tx2 = await mockTx(2); + const someTxHashThatThisPeerDidNotSee = tx2.getTxHash(); + await pool.addTxs([tx1]); + // this peer knows that tx2 was mined, but it does not have the tx object + await pool.markAsMined([tx1.getTxHash(), someTxHashThatThisPeerDidNotSee], minedBlockHeader); + expect(await pool.getMinedTxHashes()).toEqual( + expect.arrayContaining([ + [tx1.getTxHash(), 1], + [someTxHashThatThisPeerDidNotSee, 1], + ]), + ); + + // reorg: both txs should now become available again + await pool.markMinedAsPending([tx1.getTxHash(), someTxHashThatThisPeerDidNotSee], BlockNumber(1)); + await expect(pool.getMinedTxHashes()).resolves.toEqual([]); + await expect(pool.getPendingTxHashes()).resolves.toEqual([tx1.getTxHash()]); // tx2 is not in the pool + await expect(pool.getPendingTxCount()).resolves.toEqual(1); + }); + + it('returns all transactions in the pool', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + await pool.addTxs([tx1, tx2, tx3]); + + const poolTxs = await pool.getAllTxs(); + expect(poolTxs).toHaveLength(3); + const poolHashes = poolTxs.map(tx => tx.getTxHash()); + expect(poolHashes).toEqual(expect.arrayContaining([tx1.getTxHash(), tx2.getTxHash(), tx3.getTxHash()])); + await expect(pool.getPendingTxCount()).resolves.toEqual(3); + }); + + it('returns all txHashes in the pool', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + await pool.addTxs([tx1, tx2, tx3]); + + const poolTxHashes = await pool.getAllTxHashes(); + const expectedHashes = [tx1, tx2, tx3].map(tx => tx.getTxHash()); + expect(poolTxHashes).toHaveLength(3); + expect(poolTxHashes).toEqual(expect.arrayContaining(expectedHashes)); + await expect(pool.getPendingTxCount()).resolves.toEqual(3); + }); + + it('returns txs by their hash', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + await pool.addTxs([tx1, tx2, tx3]); + + const requestedTxs = await pool.getTxsByHash([tx1.getTxHash(), tx3.getTxHash()]); + expect(requestedTxs).toHaveLength(2); + const requestedHashes = requestedTxs.map(tx => tx!.getTxHash()); + expect(requestedHashes).toEqual(expect.arrayContaining([tx1.getTxHash(), tx3.getTxHash()])); + }); + + it('returns a large number of transactions by their hash', async () => { + const numTxs = 1_000; + const txs = await Promise.all(Array.from({ length: numTxs }, (_, i) => mockTx(i))); + const hashes = txs.map(tx => tx.getTxHash()); + await pool.addTxs(txs); + const requestedTxs = await pool.getTxsByHash(hashes); + expect(requestedTxs).toHaveLength(numTxs); + const requestedHashes = requestedTxs.map(tx => tx!.getTxHash()); + expect(requestedHashes).toEqual(expect.arrayContaining(hashes)); + }); + + it('returns whether or not txs exist', async () => { + const tx1 = await mockTx(1); + const tx2 = await mockTx(2); + const tx3 = await mockTx(3); + + await pool.addTxs([tx1, tx2, tx3]); + + const tx4 = await mockTx(4); + const tx5 = await mockTx(5); + + const availability = await pool.hasTxs([ + tx1.getTxHash(), + tx2.getTxHash(), + tx3.getTxHash(), + tx4.getTxHash(), + tx5.getTxHash(), + ]); + expect(availability).toHaveLength(5); + expect(availability).toEqual(expect.arrayContaining([true, true, true, false, false])); + }); + + it('returns pending tx hashes sorted by priority', async () => { + const withPriorityFee = (tx: Tx, fee: number) => { + const gs = unfreeze(tx.data.constants.txContext.gasSettings); + gs.maxPriorityFeesPerGas = new GasFees(fee, fee); + gs.maxFeesPerGas = new GasFees(fee, fee); + return tx; + }; + + const tx1 = withPriorityFee(await mockTx(0), 1000); + const tx2 = withPriorityFee(await mockTx(1), 100); + const tx3 = withPriorityFee(await mockTx(2), 200); + const tx4 = withPriorityFee(await mockTx(3), 3000); + + await pool.addTxs([tx1, tx2, tx3, tx4]); + + const poolTxHashes = await pool.getPendingTxHashes(); + expect(poolTxHashes).toHaveLength(4); + expect(poolTxHashes).toEqual([tx4, tx1, tx3, tx2].map(tx => tx.getTxHash())); + }); + + describe('soft-delete', () => { + it('soft-deletes mined txs and keeps them in storage', async () => { + const txs = await Promise.all([mockTx(1), mockTx(2), mockTx(3)]); + await pool.addTxs(txs); + + // Mark first tx as mined + await pool.markAsMined([txs[0].getTxHash()], minedBlockHeader); + + // Verify initial state + await expect(pool.getPendingTxCount()).resolves.toBe(2); + await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined(); + await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeDefined(); + + // Delete mined tx - should be soft-deleted + await pool.deleteTxs([txs[0].getTxHash()]); + + // Delete pending tx - should be permanently deleted + await pool.deleteTxs([txs[1].getTxHash()]); + + // Verify mined tx still exists in storage but has 'deleted' status + await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined(); + await expect(pool.getTxStatus(txs[0].getTxHash())).resolves.toEqual('deleted'); + + // Verify pending tx is permanently deleted + await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeUndefined(); + await expect(pool.getTxStatus(txs[1].getTxHash())).resolves.toBeUndefined(); + + // Verify remaining pending count + await expect(pool.getPendingTxCount()).resolves.toBe(1); + + // Verify pending hashes don't include deleted txs + const pendingHashes = await pool.getPendingTxHashes(); + expect(pendingHashes).toHaveLength(1); + expect(pendingHashes.map(h => h.toString())).toContain(txs[2].getTxHash().toString()); + }); + + it('cleans up old deleted mined transactions', async () => { + const txs = await Promise.all([mockTx(1), mockTx(2), mockTx(3)]); + await pool.addTxs(txs); + + // Mark first two as mined in block 1 + await pool.markAsMined([txs[0].getTxHash(), txs[1].getTxHash()], minedBlockHeader); + + // Soft-delete mined transactions + await pool.deleteTxs([txs[0].getTxHash(), txs[1].getTxHash()]); + + // Clean up deleted mined txs from block 1 and earlier + const deletedCount = await pool.cleanupDeletedMinedTxs(BlockNumber(1)); + + // Verify old transactions are permanently deleted + expect(deletedCount).toBe(2); + await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeUndefined(); + await expect(pool.getTxByHash(txs[1].getTxHash())).resolves.toBeUndefined(); + await expect(pool.getTxByHash(txs[2].getTxHash())).resolves.toBeDefined(); + }); + + it('does not clean up recent deleted mined transactions', async () => { + const txs = await Promise.all([mockTx(1), mockTx(2)]); + await pool.addTxs(txs); + + // Mark as mined in block 2 + const laterBlockHeader = BlockHeader.empty({ + globalVariables: GlobalVariables.empty({ blockNumber: BlockNumber(2), timestamp: 0n }), + }); + await pool.markAsMined([txs[0].getTxHash()], laterBlockHeader); + + // Soft-delete a mined transaction + await pool.deleteTxs([txs[0].getTxHash()]); + + // Try to clean up with block 1 (before the mined block) + const deletedCount = await pool.cleanupDeletedMinedTxs(BlockNumber(1)); + + // Verify no transactions were cleaned up + expect(deletedCount).toBe(0); + await expect(pool.getTxByHash(txs[0].getTxHash())).resolves.toBeDefined(); + }); + + it('restores deleted mined tx when it is mined again', async () => { + const tx = await mockTx(1); + await pool.addTxs([tx]); + + // Mark as mined + await pool.markAsMined([tx.getTxHash()], minedBlockHeader); + + // Soft-delete it + await pool.deleteTxs([tx.getTxHash()]); + await expect(pool.getTxStatus(tx.getTxHash())).resolves.toEqual('deleted'); + + // Mark as mined again (e.g., after a reorg) + await pool.markAsMined([tx.getTxHash()], minedBlockHeader); + + // Should be back to mined status + await expect(pool.getTxStatus(tx.getTxHash())).resolves.toEqual('mined'); + await expect(pool.getTxByHash(tx.getTxHash())).resolves.toBeDefined(); + }); + }); +} diff --git a/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.test.ts b/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.test.ts new file mode 100644 index 000000000000..72e8f5c01c9a --- /dev/null +++ b/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.test.ts @@ -0,0 +1,172 @@ +import { Fr } from '@aztec/foundation/curves/bn254'; +import { TxHash } from '@aztec/stdlib/tx'; + +import { MessageTxContext } from './message_tx_context.js'; + +describe('MessageTxContext', () => { + it('serialization of some matches snapshot', () => { + const txHash = new TxHash(new Fr(123)); + const uniqueNoteHashes = [new Fr(4n), new Fr(5n)]; + const firstNullifier = new Fr(6n); + const ctx = new MessageTxContext(txHash, uniqueNoteHashes, firstNullifier); + const serialized = MessageTxContext.toSerializedOption(ctx); + expect(serialized.map(f => f.toString())).toMatchInlineSnapshot( + ` + [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x000000000000000000000000000000000000000000000000000000000000007b", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "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", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000006", + ] + `, + ); + }); + it('serialization of none matches snapshot', () => { + const serialized = MessageTxContext.toSerializedOption(null); + expect(serialized.map(f => f.toString())).toMatchInlineSnapshot( + ` + [ + "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", + "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", + ] + `, + ); + }); + it('serialization length of empty matches', () => { + const txHash = new TxHash(new Fr(123)); + const uniqueNoteHashes = [new Fr(4n), new Fr(5n)]; + const firstNullifier = new Fr(6n); + const ctx = new MessageTxContext(txHash, uniqueNoteHashes, firstNullifier); + expect(ctx.toFields().length).toEqual(MessageTxContext.toEmptyFields().length); + }); +}); diff --git a/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.ts b/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.ts new file mode 100644 index 000000000000..a379e0219f76 --- /dev/null +++ b/yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.ts @@ -0,0 +1,55 @@ +import { MAX_NOTE_HASHES_PER_TX } from '@aztec/constants'; +import { range } from '@aztec/foundation/array'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import type { TxHash } from '@aztec/stdlib/tx'; + +/** + * Intermediate struct used to return resolved message contexts from PXE. The + * `utilityResolveMessageContexts` oracle stores values of this type in a CapsuleArray. + */ +export class MessageTxContext { + constructor( + public txHash: TxHash, + public uniqueNoteHashesInTx: Fr[], + public firstNullifierInTx: Fr, + ) {} + + toFields(): Fr[] { + return [ + this.txHash.hash, + ...serializeBoundedVec(this.uniqueNoteHashesInTx, MAX_NOTE_HASHES_PER_TX), + this.firstNullifierInTx, + ]; + } + + static toEmptyFields(): Fr[] { + const serializationLen = + 1 /* txHash */ + MAX_NOTE_HASHES_PER_TX + 1 /* uniqueNoteHashesInTx BVec */ + 1; /* firstNullifierInTx */ + return range(serializationLen).map(_ => Fr.zero()); + } + + static toSerializedOption(response: MessageTxContext | null): Fr[] { + if (response) { + return [new Fr(1), ...response.toFields()]; + } else { + return [new Fr(0), ...MessageTxContext.toEmptyFields()]; + } + } +} + +/** + * Helper function to serialize a bounded vector according to Noir's BoundedVec format + * @param values - The values to serialize + * @param maxLength - The maximum length of the bounded vector + * @returns The serialized bounded vector as Fr[] + */ +function serializeBoundedVec(values: Fr[], maxLength: number): Fr[] { + if (values.length > maxLength) { + throw new Error(`Attempted to serialize ${values} values into a BoundedVec with max length ${maxLength}`); + } + + const lengthDiff = maxLength - values.length; + const zeroPaddingArray = Array(lengthDiff).fill(Fr.ZERO); + const storage = values.concat(zeroPaddingArray); + return [...storage, new Fr(values.length)]; +} diff --git a/yarn-project/simulator/src/public/cdb_ipc_server.ts b/yarn-project/simulator/src/public/cdb_ipc_server.ts index 7e9d00f81b2f..5ff0363a98e0 100644 --- a/yarn-project/simulator/src/public/cdb_ipc_server.ts +++ b/yarn-project/simulator/src/public/cdb_ipc_server.ts @@ -1,10 +1,30 @@ /** * TypeScript UDS server implementing the CDB IPC protocol. * - * Replaces the C++ aztec-cdb binary. The C++ AVM connects to this server - * via the same socket protocol (4-byte LE length prefix + msgpack). - * Requests are routed to a PublicContractsDB instance. + * Uses GENERATED types and dispatch from the codegen tool. + * The C++ AVM connects to this server via the same socket protocol + * (4-byte LE length prefix + msgpack). */ +import { + type CdbAddContracts, + type CdbAddContractsResponse, + type CdbCommitCheckpoint, + type CdbCommitCheckpointResponse, + type CdbCreateCheckpoint, + type CdbCreateCheckpointResponse, + type CdbGetBytecodeCommitment, + type CdbGetBytecodeCommitmentResponse, + type CdbGetContractClass, + type CdbGetContractClassResponse, + type CdbGetContractInstance, + type CdbGetContractInstanceResponse, + type CdbGetDebugFunctionName, + type CdbGetDebugFunctionNameResponse, + type CdbHandler, + type CdbRevertCheckpoint, + type CdbRevertCheckpointResponse, + cdbDispatch, +} from '@aztec/bb.js/aztec-cdb'; import { Fr } from '@aztec/foundation/curves/bn254'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { FunctionSelector } from '@aztec/stdlib/abi'; @@ -22,15 +42,12 @@ import type { PublicContractsDB } from './public_db_sources.js'; const encoder = new Encoder({ useRecords: false }); const decoder = new Decoder({ useRecords: false }); -/** Convert a Fr/AztecAddress to a 32-byte Buffer. */ +/** Convert a Fr/AztecAddress to a 32-byte Buffer for the wire format. */ function toFieldBuffer(field: Fr | AztecAddress): Buffer { return field.toBuffer(); } -/** - * Serialize a ContractInstanceWithAddress to the format expected by the C++ CDB client. - * Matches the avm2::ContractInstance msgpack schema. - */ +/** Serialize a ContractInstanceWithAddress to the CDB wire format. */ function serializeContractInstance(instance: { salt: Fr; deployer: AztecAddress; @@ -71,10 +88,7 @@ function serializeContractInstance(instance: { }; } -/** - * Serialize a ContractClassPublic to the format expected by the C++ CDB client. - * Matches the avm2::ContractClass msgpack schema. - */ +/** Serialize a ContractClassPublic to the CDB wire format. */ function serializeContractClass(contractClass: { id: Fr; artifactHash: Fr; @@ -91,14 +105,12 @@ function serializeContractClass(contractClass: { /** * TS UDS server implementing the CDB IPC protocol. - * Multiple C++ AVM processes connect as clients. Requests are routed to the - * correct PublicContractsDB instance using the forkId field in each command. + * Uses generated dispatch from the codegen tool. */ export class CdbIpcServer { public readonly socketPath: string; private server: net.Server; private log: Logger; - /** Maps WSDB fork ID → (contracts DB, timestamp) for routing concurrent simulations. */ private forks = new Map(); private connections = new Set(); @@ -106,7 +118,6 @@ export class CdbIpcServer { this.log = createLogger('cdb-ipc-server'); this.socketPath = path.join(os.tmpdir(), `cdb-ts-${process.pid}-${Date.now()}.sock`); - // Clean up stale socket file if (fs.existsSync(this.socketPath)) { fs.unlinkSync(this.socketPath); } @@ -117,19 +128,15 @@ export class CdbIpcServer { }); } - /** Register a PublicContractsDB for a given WSDB fork ID. */ registerFork(forkId: number, contractsDB: PublicContractsDB, timestamp: bigint): void { this.forks.set(forkId, { db: contractsDB, timestamp }); } - /** Unregister a fork's contracts DB (call after simulation completes). */ unregisterFork(forkId: number): void { this.forks.delete(forkId); } - /** Close the server and all active connections. */ close(): Promise { - // Destroy all active client connections so the server can close cleanly. for (const socket of this.connections) { socket.destroy(); } @@ -149,24 +156,97 @@ export class CdbIpcServer { }); } + private getFork(forkId: number): { db: PublicContractsDB; timestamp: bigint } { + const fork = this.forks.get(forkId); + if (!fork) { + throw new Error(`CDB server: no contracts DB registered for forkId ${forkId}`); + } + return fork; + } + + /** + * Build the GENERATED Handler implementation. + * Each method converts between yarn-project domain types and the IPC wire format. + */ + private buildHandler(): CdbHandler { + return { + cdbGetContractInstance: async (cmd: CdbGetContractInstance): Promise => { + const { db, timestamp } = this.getFork(cmd.forkId); + const address = AztecAddress.fromBuffer(Buffer.from(cmd.address)); + const instance = await db.getContractInstance(address, timestamp); + return { instance: instance ? serializeContractInstance(instance) : null } as any; + }, + + cdbGetContractClass: async (cmd: CdbGetContractClass): Promise => { + const { db } = this.getFork(cmd.forkId); + const classId = Fr.fromBuffer(Buffer.from(cmd.classId)); + const contractClass = await db.getContractClass(classId); + return { contractClass: contractClass ? serializeContractClass(contractClass) : null } as any; + }, + + cdbGetBytecodeCommitment: async (cmd: CdbGetBytecodeCommitment): Promise => { + const { db } = this.getFork(cmd.forkId); + const classId = Fr.fromBuffer(Buffer.from(cmd.classId)); + const commitment = await db.getBytecodeCommitment(classId); + return { commitment: commitment ? toFieldBuffer(commitment) : null } as any; + }, + + cdbGetDebugFunctionName: async (cmd: CdbGetDebugFunctionName): Promise => { + const { db } = this.getFork(cmd.forkId); + const address = AztecAddress.fromBuffer(Buffer.from(cmd.address)); + const selectorField = Fr.fromBuffer(Buffer.from(cmd.selector)); + const selector = FunctionSelector.fromFieldOrUndefined(selectorField); + const name = selector ? await db.getDebugFunctionName(address, selector) : undefined; + return { name: name ?? null } as any; + }, + + cdbAddContracts: (cmd: CdbAddContracts): Promise => { + const { db } = this.getFork(cmd.forkId); + const data = ContractDeploymentData.fromPlainObject(cmd.contractDeploymentData); + db.addContracts(data); + return Promise.resolve({} as any); + }, + + cdbCreateCheckpoint: (cmd: CdbCreateCheckpoint): Promise => { + const { db } = this.getFork(cmd.forkId); + db.createCheckpoint(); + return Promise.resolve({} as any); + }, + + cdbCommitCheckpoint: (cmd: CdbCommitCheckpoint): Promise => { + const { db } = this.getFork(cmd.forkId); + db.commitCheckpoint(); + return Promise.resolve({} as any); + }, + + cdbRevertCheckpoint: (cmd: CdbRevertCheckpoint): Promise => { + const { db } = this.getFork(cmd.forkId); + db.revertCheckpoint(); + return Promise.resolve({} as any); + }, + + cdbAddContractClass: () => Promise.resolve({} as any), + cdbAddContractInstance: () => Promise.resolve({} as any), + cdbRegisterFunctionSignatures: () => Promise.resolve({} as any), + cdbGetContractClassIds: () => Promise.resolve({ classIds: [] } as any), + }; + } + private handleConnection(socket: net.Socket) { this.log.debug('C++ AVM connected to CDB server'); this.connections.add(socket); socket.on('close', () => this.connections.delete(socket)); - // State machine for reading length-prefixed messages let readingLength = true; const lengthBuffer = Buffer.alloc(4); let lengthBytesRead = 0; let messageLength = 0; let messageBuffer: Buffer | null = null; let messageBytesRead = 0; - - // Per-connection response chain ensures responses are sent in the same order - // as requests were received, even if dispatch completes out of order. - // This makes the server robust to pipelined requests from the C++ client. let responseChain: Promise = Promise.resolve(); + const handler = this.buildHandler(); + socket.on('data', (chunk: Buffer) => { let offset = 0; @@ -197,15 +277,24 @@ export class CdbIpcServer { lengthBytesRead = 0; messageBuffer = null; - // Start dispatch immediately (allows concurrent processing), - // but chain the response sending to preserve request order. - const dispatchResult = this.dispatchMessage(msg); + // Decode msgpack: [[commandName, payload]] + const parsed = decoder.decode(msg); + const [commandName, payload] = parsed[0]; + + // Handle shutdown inline (not part of generated Handler) + if (commandName === 'CdbShutdown') { + this.sendResponse(socket, 'CdbShutdownResponse', {}); + continue; + } + + // Use GENERATED dispatch function + const dispatchResult = cdbDispatch(handler, commandName, payload ?? {}); const prev = responseChain; responseChain = (async () => { await prev; try { - const [name, payload] = await dispatchResult; - this.sendResponse(socket, name, payload); + const [name, respPayload] = await dispatchResult; + this.sendResponse(socket, name, respPayload); } catch (err: any) { this.log.error(`CDB command error: ${err.message}`, { err }); this.sendResponse(socket, 'CdbErrorResponse', { message: err.message ?? 'Unknown error' }); @@ -222,12 +311,6 @@ export class CdbIpcServer { }); } - private dispatchMessage(data: Buffer): Promise<[string, Record]> { - const parsed = decoder.decode(data); - const [commandName, payload] = parsed[0]; - return this.dispatch(commandName, payload ?? {}); - } - private sendResponse(socket: net.Socket, responseName: string, payload: Record): void { const response = encoder.encode([responseName, payload]); const lengthBuf = Buffer.alloc(4); @@ -235,88 +318,4 @@ export class CdbIpcServer { socket.write(lengthBuf); socket.write(response); } - - /** Look up the contracts DB for a given fork ID, throwing if not registered. */ - private getFork(forkId: number): { db: PublicContractsDB; timestamp: bigint } { - const fork = this.forks.get(forkId); - if (!fork) { - throw new Error(`CDB server: no contracts DB registered for forkId ${forkId}`); - } - return fork; - } - - private async dispatch( - commandName: string, - payload: Record, - ): Promise<[string, Record]> { - // All simulation commands carry a forkId for routing. - const forkId: number = payload.forkId ?? 0; - - switch (commandName) { - case 'CdbGetContractInstance': { - const { db, timestamp } = this.getFork(forkId); - const address = AztecAddress.fromBuffer(payload.address); - const instance = await db.getContractInstance(address, timestamp); - return ['CdbGetContractInstanceResponse', { instance: instance ? serializeContractInstance(instance) : null }]; - } - - case 'CdbGetContractClass': { - const { db } = this.getFork(forkId); - const classId = Fr.fromBuffer(payload.classId); - const contractClass = await db.getContractClass(classId); - return [ - 'CdbGetContractClassResponse', - { contractClass: contractClass ? serializeContractClass(contractClass) : null }, - ]; - } - - case 'CdbGetBytecodeCommitment': { - const { db } = this.getFork(forkId); - const classId = Fr.fromBuffer(payload.classId); - const commitment = await db.getBytecodeCommitment(classId); - return ['CdbGetBytecodeCommitmentResponse', { commitment: commitment ? toFieldBuffer(commitment) : null }]; - } - - case 'CdbGetDebugFunctionName': { - const { db } = this.getFork(forkId); - const address = AztecAddress.fromBuffer(payload.address); - const selectorField = Fr.fromBuffer(payload.selector); - const selector = FunctionSelector.fromFieldOrUndefined(selectorField); - const name = selector ? await db.getDebugFunctionName(address, selector) : undefined; - return ['CdbGetDebugFunctionNameResponse', { name: name ?? null }]; - } - - case 'CdbAddContracts': { - const { db } = this.getFork(forkId); - const contractDeploymentData = ContractDeploymentData.fromPlainObject(payload.contractDeploymentData); - db.addContracts(contractDeploymentData); - return ['CdbAddContractsResponse', {}]; - } - - case 'CdbCreateCheckpoint': { - const { db } = this.getFork(forkId); - db.createCheckpoint(); - return ['CdbCreateCheckpointResponse', {}]; - } - - case 'CdbCommitCheckpoint': { - const { db } = this.getFork(forkId); - db.commitCheckpoint(); - return ['CdbCommitCheckpointResponse', {}]; - } - - case 'CdbRevertCheckpoint': { - const { db } = this.getFork(forkId); - db.revertCheckpoint(); - return ['CdbRevertCheckpointResponse', {}]; - } - - case 'CdbShutdown': { - return ['CdbShutdownResponse', {}]; - } - - default: - throw new Error(`Unknown CDB command: ${commandName}`); - } - } } diff --git a/yarn-project/validator-client/src/block_proposal_handler.ts b/yarn-project/validator-client/src/block_proposal_handler.ts new file mode 100644 index 000000000000..844c8adec1e4 --- /dev/null +++ b/yarn-project/validator-client/src/block_proposal_handler.ts @@ -0,0 +1,632 @@ +import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants'; +import type { EpochCache } from '@aztec/epoch-cache'; +import { BlockNumber, CheckpointNumber, SlotNumber } from '@aztec/foundation/branded-types'; +import { pick } from '@aztec/foundation/collection'; +import { Fr } from '@aztec/foundation/curves/bn254'; +import { TimeoutError } from '@aztec/foundation/error'; +import { createLogger } from '@aztec/foundation/log'; +import { retryUntil } from '@aztec/foundation/retry'; +import { DateProvider, Timer } from '@aztec/foundation/timer'; +import type { P2P, PeerId } from '@aztec/p2p'; +import { BlockProposalValidator } from '@aztec/p2p/msg_validators'; +import type { BlockData, L2Block, L2BlockSink, L2BlockSource } from '@aztec/stdlib/block'; +import { getEpochAtSlot, getTimestampForSlot } from '@aztec/stdlib/epoch-helpers'; +import { Gas } from '@aztec/stdlib/gas'; +import type { ITxProvider, ValidatorClientFullConfig, WorldStateSynchronizer } from '@aztec/stdlib/interfaces/server'; +import { type L1ToL2MessageSource, computeInHashFromL1ToL2Messages } from '@aztec/stdlib/messaging'; +import type { BlockProposal } from '@aztec/stdlib/p2p'; +import { MerkleTreeId } from '@aztec/stdlib/trees'; +import type { CheckpointGlobalVariables, FailedTx, Tx } from '@aztec/stdlib/tx'; +import { + ReExFailedTxsError, + ReExInitialStateMismatchError, + ReExStateMismatchError, + ReExTimeoutError, + TransactionsNotAvailableError, +} from '@aztec/stdlib/validators'; +import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client'; + +import type { FullNodeCheckpointsBuilder } from './checkpoint_builder.js'; +import type { ValidatorMetrics } from './metrics.js'; + +export type BlockProposalValidationFailureReason = + | 'invalid_proposal' + | 'parent_block_not_found' + | 'block_source_not_synced' + | 'parent_block_wrong_slot' + | 'in_hash_mismatch' + | 'global_variables_mismatch' + | 'block_number_already_exists' + | 'txs_not_available' + | 'state_mismatch' + | 'failed_txs' + | 'initial_state_mismatch' + | 'timeout' + | 'unknown_error'; + +type ReexecuteTransactionsResult = { + block: L2Block; + failedTxs: FailedTx[]; + reexecutionTimeMs: number; + totalManaUsed: number; +}; + +export type BlockProposalValidationSuccessResult = { + isValid: true; + blockNumber: BlockNumber; + reexecutionResult?: ReexecuteTransactionsResult; +}; + +export type BlockProposalValidationFailureResult = { + isValid: false; + reason: BlockProposalValidationFailureReason; + blockNumber?: BlockNumber; + reexecutionResult?: ReexecuteTransactionsResult; +}; + +export type BlockProposalValidationResult = BlockProposalValidationSuccessResult | BlockProposalValidationFailureResult; + +type CheckpointComputationResult = + | { checkpointNumber: CheckpointNumber; reason?: undefined } + | { checkpointNumber?: undefined; reason: 'invalid_proposal' | 'global_variables_mismatch' }; + +export class BlockProposalHandler { + public readonly tracer: Tracer; + + constructor( + private checkpointsBuilder: FullNodeCheckpointsBuilder, + private worldState: WorldStateSynchronizer, + private blockSource: L2BlockSource & L2BlockSink, + private l1ToL2MessageSource: L1ToL2MessageSource, + private txProvider: ITxProvider, + private blockProposalValidator: BlockProposalValidator, + private epochCache: EpochCache, + private config: ValidatorClientFullConfig, + private metrics?: ValidatorMetrics, + private dateProvider: DateProvider = new DateProvider(), + telemetry: TelemetryClient = getTelemetryClient(), + private log = createLogger('validator:block-proposal-handler'), + ) { + if (config.fishermanMode) { + this.log = this.log.createChild('[FISHERMAN]'); + } + this.tracer = telemetry.getTracer('BlockProposalHandler'); + } + + register(p2pClient: P2P, shouldReexecute: boolean): BlockProposalHandler { + // Non-validator handler that processes or re-executes for monitoring but does not attest. + // Returns boolean indicating whether the proposal was valid. + const handler = async (proposal: BlockProposal, proposalSender: PeerId): Promise => { + try { + const { slotNumber, blockNumber } = proposal; + const result = await this.handleBlockProposal(proposal, proposalSender, shouldReexecute); + if (result.isValid) { + this.log.info(`Non-validator block proposal ${blockNumber} at slot ${slotNumber} handled`, { + blockNumber: result.blockNumber, + slotNumber, + reexecutionTimeMs: result.reexecutionResult?.reexecutionTimeMs, + totalManaUsed: result.reexecutionResult?.totalManaUsed, + numTxs: result.reexecutionResult?.block?.body?.txEffects?.length ?? 0, + reexecuted: shouldReexecute, + }); + return true; + } else { + this.log.warn( + `Non-validator block proposal ${blockNumber} at slot ${slotNumber} failed processing with ${result.reason}`, + { blockNumber: result.blockNumber, slotNumber, reason: result.reason }, + ); + return false; + } + } catch (error) { + this.log.error('Error processing block proposal in non-validator handler', error); + return false; + } + }; + + p2pClient.registerBlockProposalHandler(handler); + return this; + } + + async handleBlockProposal( + proposal: BlockProposal, + proposalSender: PeerId, + shouldReexecute: boolean, + ): Promise { + const slotNumber = proposal.slotNumber; + const proposer = proposal.getSender(); + const config = this.checkpointsBuilder.getConfig(); + + // Reject proposals with invalid signatures + if (!proposer) { + this.log.warn(`Received proposal with invalid signature for slot ${slotNumber}`); + return { isValid: false, reason: 'invalid_proposal' }; + } + + const proposalInfo = { + ...proposal.toBlockInfo(), + proposer: proposer.toString(), + blockNumber: undefined as BlockNumber | undefined, + checkpointNumber: undefined as CheckpointNumber | undefined, + }; + + this.log.info(`Processing proposal for slot ${slotNumber}`, { + ...proposalInfo, + txHashes: proposal.txHashes.map(t => t.toString()), + }); + + // Check that the proposal is from the current proposer, or the next proposer + // This should have been handled by the p2p layer, but we double check here out of caution + const validationResult = await this.blockProposalValidator.validate(proposal); + if (validationResult.result !== 'accept') { + this.log.warn(`Proposal is not valid, skipping processing`, proposalInfo); + return { isValid: false, reason: 'invalid_proposal' }; + } + + // Ensure the block source is synced before checking for existing blocks, + // since a pending checkpoint prune may remove blocks we'd otherwise find. + // This affects mostly the block_number_already_exists check, since a pending + // checkpoint prune could remove a block that would conflict with this proposal. + // When pipelining is enabled, the proposer builds ahead of L1 submission, so the + // block source won't have synced to the proposed slot yet. Skip the sync wait to + // avoid eating into the attestation window. + if (!this.epochCache.isProposerPipeliningEnabled()) { + const blockSourceSync = await this.waitForBlockSourceSync(slotNumber); + if (!blockSourceSync) { + this.log.warn(`Block source is not synced, skipping processing`, proposalInfo); + return { isValid: false, reason: 'block_source_not_synced' }; + } + } + + // Check that the parent proposal is a block we know, otherwise reexecution would fail. + // If we don't find it immediately, we keep retrying for a while; it may be we still + // need to process other block proposals to get to it. + const parentBlock = await this.getParentBlock(proposal); + if (parentBlock === undefined) { + this.log.warn(`Parent block for proposal not found, skipping processing`, proposalInfo); + return { isValid: false, reason: 'parent_block_not_found' }; + } + + // Check that the parent block's slot is not greater than the proposal's slot. + if (parentBlock !== 'genesis' && parentBlock.header.getSlot() > slotNumber) { + this.log.warn(`Parent block slot is greater than proposal slot, skipping processing`, { + parentBlockSlot: parentBlock.header.getSlot().toString(), + proposalSlot: slotNumber.toString(), + ...proposalInfo, + }); + return { isValid: false, reason: 'parent_block_wrong_slot' }; + } + + // Compute the block number based on the parent block + const blockNumber = + parentBlock === 'genesis' + ? BlockNumber(INITIAL_L2_BLOCK_NUM) + : BlockNumber(parentBlock.header.getBlockNumber() + 1); + proposalInfo.blockNumber = blockNumber; + + // Check that this block number does not exist already + const existingBlock = await this.blockSource.getBlockHeader(blockNumber); + if (existingBlock) { + this.log.warn(`Block number ${blockNumber} already exists, skipping processing`, proposalInfo); + return { isValid: false, blockNumber, reason: 'block_number_already_exists' }; + } + + // Collect txs from the proposal. We start doing this as early as possible, + // and we do it even if we don't plan to re-execute the txs, so that we have them if another node needs them. + const { txs, missingTxs } = await this.txProvider.getTxsForBlockProposal(proposal, blockNumber, { + pinnedPeer: proposalSender, + deadline: this.getReexecutionDeadline(slotNumber, config), + }); + + // If reexecution is disabled, bail. We were just interested in triggering tx collection. + if (!shouldReexecute) { + this.log.info( + `Received valid block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, + proposalInfo, + ); + return { isValid: true, blockNumber }; + } + + // Compute the checkpoint number for this block and validate checkpoint consistency + const checkpointResult = this.computeCheckpointNumber(proposal, parentBlock, proposalInfo); + if (checkpointResult.reason) { + return { isValid: false, blockNumber, reason: checkpointResult.reason }; + } + const checkpointNumber = checkpointResult.checkpointNumber; + proposalInfo.checkpointNumber = checkpointNumber; + + // Check that I have the same set of l1ToL2Messages as the proposal + const l1ToL2Messages = await this.l1ToL2MessageSource.getL1ToL2Messages(checkpointNumber); + const computedInHash = computeInHashFromL1ToL2Messages(l1ToL2Messages); + const proposalInHash = proposal.inHash; + if (!computedInHash.equals(proposalInHash)) { + this.log.warn(`L1 to L2 messages in hash mismatch, skipping processing`, { + proposalInHash: proposalInHash.toString(), + computedInHash: computedInHash.toString(), + ...proposalInfo, + }); + return { isValid: false, blockNumber, reason: 'in_hash_mismatch' }; + } + + // Check that all of the transactions in the proposal are available + if (missingTxs.length > 0) { + this.log.warn(`Missing ${missingTxs.length} txs to process proposal`, { ...proposalInfo, missingTxs }); + return { isValid: false, blockNumber, reason: 'txs_not_available' }; + } + + // Collect the out hashes of all the checkpoints before this one in the same epoch + const epoch = getEpochAtSlot(slotNumber, this.epochCache.getL1Constants()); + const previousCheckpointOutHashes = (await this.blockSource.getCheckpointsDataForEpoch(epoch)) + .filter(c => c.checkpointNumber < checkpointNumber) + .map(c => c.checkpointOutHash); + + // Try re-executing the transactions in the proposal if needed + let reexecutionResult; + try { + this.log.verbose(`Re-executing transactions in the proposal`, proposalInfo); + reexecutionResult = await this.reexecuteTransactions( + proposal, + blockNumber, + checkpointNumber, + txs, + l1ToL2Messages, + previousCheckpointOutHashes, + ); + } catch (error) { + this.log.error(`Error reexecuting txs while processing block proposal`, error, proposalInfo); + const reason = this.getReexecuteFailureReason(error); + return { isValid: false, blockNumber, reason, reexecutionResult }; + } + + // If we succeeded, push this block into the archiver (unless disabled) + if (reexecutionResult?.block && this.config.skipPushProposedBlocksToArchiver === false) { + await this.blockSource.addBlock(reexecutionResult?.block); + } + + this.log.info( + `Successfully re-executed block ${blockNumber} proposal at index ${proposal.indexWithinCheckpoint} on slot ${slotNumber}`, + { ...proposalInfo, ...pick(reexecutionResult, 'reexecutionTimeMs', 'totalManaUsed') }, + ); + + return { isValid: true, blockNumber, reexecutionResult }; + } + + private async getParentBlock(proposal: BlockProposal): Promise<'genesis' | BlockData | undefined> { + const parentArchive = proposal.blockHeader.lastArchive.root; + const slot = proposal.slotNumber; + const config = this.checkpointsBuilder.getConfig(); + const { genesisArchiveRoot } = await this.blockSource.getGenesisValues(); + + if (parentArchive.equals(genesisArchiveRoot)) { + return 'genesis'; + } + + const deadline = this.getReexecutionDeadline(slot, config); + const currentTime = this.dateProvider.now(); + const timeoutDurationMs = deadline.getTime() - currentTime; + + try { + return ( + (await this.blockSource.getBlockDataByArchive(parentArchive)) ?? + (timeoutDurationMs <= 0 + ? undefined + : await retryUntil( + () => this.blockSource.syncImmediate().then(() => this.blockSource.getBlockDataByArchive(parentArchive)), + 'force archiver sync', + timeoutDurationMs / 1000, + 0.5, + )) + ); + } catch (err) { + if (err instanceof TimeoutError) { + this.log.debug(`Timed out getting parent block by archive root`, { parentArchive }); + } else { + this.log.error('Error getting parent block by archive root', err, { parentArchive }); + } + return undefined; + } + } + + private computeCheckpointNumber( + proposal: BlockProposal, + parentBlock: 'genesis' | BlockData, + proposalInfo: object, + ): CheckpointComputationResult { + if (parentBlock === 'genesis') { + // First block is in checkpoint 1 + if (proposal.indexWithinCheckpoint !== 0) { + this.log.warn(`First block proposal has non-zero indexWithinCheckpoint`, proposalInfo); + return { reason: 'invalid_proposal' }; + } + return { checkpointNumber: CheckpointNumber.INITIAL }; + } + + if (proposal.indexWithinCheckpoint === 0) { + // If this is the first block in a new checkpoint, increment the checkpoint number + if (!(proposal.blockHeader.getSlot() > parentBlock.header.getSlot())) { + this.log.warn(`Slot should be greater than parent block slot for first block in checkpoint`, proposalInfo); + return { reason: 'invalid_proposal' }; + } + return { checkpointNumber: CheckpointNumber(parentBlock.checkpointNumber + 1) }; + } + + // Otherwise it should follow the previous block in the same checkpoint + if (proposal.indexWithinCheckpoint !== parentBlock.indexWithinCheckpoint + 1) { + this.log.warn(`Non-sequential indexWithinCheckpoint`, proposalInfo); + return { reason: 'invalid_proposal' }; + } + if (proposal.blockHeader.getSlot() !== parentBlock.header.getSlot()) { + this.log.warn(`Slot should be equal to parent block slot for non-first block in checkpoint`, proposalInfo); + return { reason: 'invalid_proposal' }; + } + + // For non-first blocks in a checkpoint, validate global variables match parent (except blockNumber) + const validationResult = this.validateNonFirstBlockInCheckpoint(proposal, parentBlock, proposalInfo); + if (validationResult) { + return validationResult; + } + + return { checkpointNumber: parentBlock.checkpointNumber }; + } + + /** + * Validates that a non-first block in a checkpoint has consistent global variables with its parent. + * For blocks with indexWithinCheckpoint > 0, all global variables except blockNumber must match the parent. + * @returns A failure result if validation fails, undefined if validation passes + */ + private validateNonFirstBlockInCheckpoint( + proposal: BlockProposal, + parentBlock: BlockData, + proposalInfo: object, + ): CheckpointComputationResult | undefined { + const proposalGlobals = proposal.blockHeader.globalVariables; + const parentGlobals = parentBlock.header.globalVariables; + + // All global variables except blockNumber should match the parent + // blockNumber naturally increments between blocks + if (!proposalGlobals.chainId.equals(parentGlobals.chainId)) { + this.log.warn(`Non-first block in checkpoint has mismatched chainId`, { + ...proposalInfo, + proposalChainId: proposalGlobals.chainId.toString(), + parentChainId: parentGlobals.chainId.toString(), + }); + return { reason: 'global_variables_mismatch' }; + } + + if (!proposalGlobals.version.equals(parentGlobals.version)) { + this.log.warn(`Non-first block in checkpoint has mismatched version`, { + ...proposalInfo, + proposalVersion: proposalGlobals.version.toString(), + parentVersion: parentGlobals.version.toString(), + }); + return { reason: 'global_variables_mismatch' }; + } + + if (proposalGlobals.slotNumber !== parentGlobals.slotNumber) { + this.log.warn(`Non-first block in checkpoint has mismatched slotNumber`, { + ...proposalInfo, + proposalSlotNumber: proposalGlobals.slotNumber, + parentSlotNumber: parentGlobals.slotNumber, + }); + return { reason: 'global_variables_mismatch' }; + } + + if (proposalGlobals.timestamp !== parentGlobals.timestamp) { + this.log.warn(`Non-first block in checkpoint has mismatched timestamp`, { + ...proposalInfo, + proposalTimestamp: proposalGlobals.timestamp.toString(), + parentTimestamp: parentGlobals.timestamp.toString(), + }); + return { reason: 'global_variables_mismatch' }; + } + + if (!proposalGlobals.coinbase.equals(parentGlobals.coinbase)) { + this.log.warn(`Non-first block in checkpoint has mismatched coinbase`, { + ...proposalInfo, + proposalCoinbase: proposalGlobals.coinbase.toString(), + parentCoinbase: parentGlobals.coinbase.toString(), + }); + return { reason: 'global_variables_mismatch' }; + } + + if (!proposalGlobals.feeRecipient.equals(parentGlobals.feeRecipient)) { + this.log.warn(`Non-first block in checkpoint has mismatched feeRecipient`, { + ...proposalInfo, + proposalFeeRecipient: proposalGlobals.feeRecipient.toString(), + parentFeeRecipient: parentGlobals.feeRecipient.toString(), + }); + return { reason: 'global_variables_mismatch' }; + } + + if (!proposalGlobals.gasFees.equals(parentGlobals.gasFees)) { + this.log.warn(`Non-first block in checkpoint has mismatched gasFees`, { + ...proposalInfo, + proposalGasFees: proposalGlobals.gasFees.toInspect(), + parentGasFees: parentGlobals.gasFees.toInspect(), + }); + return { reason: 'global_variables_mismatch' }; + } + + return undefined; + } + + private getReexecutionDeadline(slot: SlotNumber, config: { l1GenesisTime: bigint; slotDuration: number }): Date { + const nextSlotTimestampSeconds = Number(getTimestampForSlot(SlotNumber(slot + 1), config)); + return new Date(nextSlotTimestampSeconds * 1000); + } + + /** Waits for the block source to sync L1 data up to at least the slot before the given one. */ + private async waitForBlockSourceSync(slot: SlotNumber): Promise { + const deadline = this.getReexecutionDeadline(slot, this.checkpointsBuilder.getConfig()); + const timeoutMs = deadline.getTime() - this.dateProvider.now(); + if (slot === 0) { + return true; + } + + // Make a quick check before triggering an archiver sync + const syncedSlot = await this.blockSource.getSyncedL2SlotNumber(); + if (syncedSlot !== undefined && syncedSlot + 1 >= slot) { + return true; + } + + try { + // Trigger an immediate sync of the block source, and wait until it reports being synced to the required slot + return await retryUntil( + async () => { + await this.blockSource.syncImmediate(); + const syncedSlot = await this.blockSource.getSyncedL2SlotNumber(); + return syncedSlot !== undefined && syncedSlot + 1 >= slot; + }, + 'wait for block source sync', + timeoutMs / 1000, + 0.5, + ); + } catch (err) { + if (err instanceof TimeoutError) { + this.log.warn(`Timed out waiting for block source to sync to slot ${slot}`); + return false; + } else { + throw err; + } + } + } + + private getReexecuteFailureReason(err: any): BlockProposalValidationFailureReason { + if (err instanceof TransactionsNotAvailableError) { + return 'txs_not_available'; + } else if (err instanceof ReExInitialStateMismatchError) { + return 'initial_state_mismatch'; + } else if (err instanceof ReExStateMismatchError) { + return 'state_mismatch'; + } else if (err instanceof ReExFailedTxsError) { + return 'failed_txs'; + } else if (err instanceof ReExTimeoutError) { + return 'timeout'; + } else { + return 'unknown_error'; + } + } + + async reexecuteTransactions( + proposal: BlockProposal, + blockNumber: BlockNumber, + checkpointNumber: CheckpointNumber, + txs: Tx[], + l1ToL2Messages: Fr[], + previousCheckpointOutHashes: Fr[], + ): Promise { + const { blockHeader, txHashes } = proposal; + + // If we do not have all of the transactions, then we should fail + if (txs.length !== txHashes.length) { + const foundTxHashes = txs.map(tx => tx.getTxHash()); + const missingTxHashes = txHashes.filter(txHash => !foundTxHashes.includes(txHash)); + throw new TransactionsNotAvailableError(missingTxHashes); + } + + const timer = new Timer(); + const slot = proposal.slotNumber; + const config = this.checkpointsBuilder.getConfig(); + + // Get prior blocks in this checkpoint (same slot before current block) + const allBlocksInSlot = await this.blockSource.getBlocksForSlot(slot); + const priorBlocks = allBlocksInSlot.filter(b => b.number < blockNumber && b.header.getSlot() === slot); + + // Fork before the block to be built + const parentBlockNumber = BlockNumber(blockNumber - 1); + await this.worldState.syncImmediate(parentBlockNumber); + await using fork = await this.worldState.fork(parentBlockNumber); + + // Verify the fork's archive root matches the proposal's expected last archive. + // If they don't match, our world state synced to a different chain and reexecution would fail. + const forkArchiveRoot = new Fr((await fork.getTreeInfo(MerkleTreeId.ARCHIVE)).root); + if (!forkArchiveRoot.equals(proposal.blockHeader.lastArchive.root)) { + throw new ReExInitialStateMismatchError(proposal.blockHeader.lastArchive.root, forkArchiveRoot); + } + + // Build checkpoint constants from proposal (excludes blockNumber which is per-block) + const constants: CheckpointGlobalVariables = { + chainId: new Fr(config.l1ChainId), + version: new Fr(config.rollupVersion), + slotNumber: slot, + timestamp: blockHeader.globalVariables.timestamp, + coinbase: blockHeader.globalVariables.coinbase, + feeRecipient: blockHeader.globalVariables.feeRecipient, + gasFees: blockHeader.globalVariables.gasFees, + }; + + // Create checkpoint builder with prior blocks + const checkpointBuilder = await this.checkpointsBuilder.openCheckpoint( + checkpointNumber, + constants, + 0n, // only takes effect in the following checkpoint. + l1ToL2Messages, + previousCheckpointOutHashes, + fork, + priorBlocks, + this.log.getBindings(), + ); + + // Build the new block + const deadline = this.getReexecutionDeadline(slot, config); + const maxBlockGas = + this.config.validateMaxL2BlockGas !== undefined || this.config.validateMaxDABlockGas !== undefined + ? new Gas(this.config.validateMaxDABlockGas ?? Infinity, this.config.validateMaxL2BlockGas ?? Infinity) + : undefined; + const result = await checkpointBuilder.buildBlock(txs, blockNumber, blockHeader.globalVariables.timestamp, { + isBuildingProposal: false, + minValidTxs: 0, + deadline, + expectedEndState: blockHeader.state, + maxTransactions: this.config.validateMaxTxsPerBlock, + maxBlockGas, + }); + + const { block, failedTxs } = result; + const numFailedTxs = failedTxs.length; + + this.log.verbose(`Block proposal ${blockNumber} at slot ${slot} transaction re-execution complete`, { + numFailedTxs, + numProposalTxs: txHashes.length, + numProcessedTxs: block.body.txEffects.length, + blockNumber, + slot, + }); + + if (numFailedTxs > 0) { + this.metrics?.recordFailedReexecution(proposal); + throw new ReExFailedTxsError(numFailedTxs); + } + + if (block.body.txEffects.length !== txHashes.length) { + this.metrics?.recordFailedReexecution(proposal); + throw new ReExTimeoutError(); + } + + // Throw a ReExStateMismatchError error if state updates do not match + // Compare the full block structure (archive and header) from the built block with the proposal + const archiveMatches = proposal.archive.equals(block.archive.root); + const headerMatches = proposal.blockHeader.equals(block.header); + if (!archiveMatches || !headerMatches) { + this.log.warn(`Re-execution state mismatch for slot ${slot}`, { + expectedArchive: block.archive.root.toString(), + actualArchive: proposal.archive.toString(), + expectedHeader: block.header.toInspect(), + actualHeader: proposal.blockHeader.toInspect(), + }); + this.metrics?.recordFailedReexecution(proposal); + throw new ReExStateMismatchError(proposal.archive, block.archive.root); + } + + const reexecutionTimeMs = timer.ms(); + const totalManaUsed = block.header.totalManaUsed.toNumber() / 1e6; + + this.metrics?.recordReex(reexecutionTimeMs, txs.length, totalManaUsed); + + return { + block, + failedTxs, + reexecutionTimeMs, + totalManaUsed, + }; + } +} diff --git a/yarn-project/world-state/src/native/ipc_world_state_instance.ts b/yarn-project/world-state/src/native/ipc_world_state_instance.ts index db3baaee3173..608cf52c58cc 100644 --- a/yarn-project/world-state/src/native/ipc_world_state_instance.ts +++ b/yarn-project/world-state/src/native/ipc_world_state_instance.ts @@ -61,11 +61,11 @@ function serializeLeafToBytes(leaf: SerializedLeafValue): Uint8Array { // ————— Request conversion helpers ————— -function toWsdbRevision(rev: WorldStateRevision): { forkid: number; blocknumber: number; includeuncommitted: boolean } { +function toWsdbRevision(rev: WorldStateRevision): { forkId: number; blockNumber: number; includeUncommitted: boolean } { return { - forkid: rev.forkId, - blocknumber: Number(rev.blockNumber), - includeuncommitted: rev.includeUncommitted, + forkId: rev.forkId, + blockNumber: Number(rev.blockNumber), + includeUncommitted: rev.includeUncommitted, }; } @@ -120,43 +120,43 @@ function convertStateRef( return result; } -/** Convert Wsdb WorldStateStatusSummary (lowercase) to NAPI format (camelCase). */ +/** Convert Wsdb WorldStateStatusSummary to NAPI format. Wire already uses camelCase. */ function convertStatusSummary(s: WsdbStatusSummary): WorldStateStatusSummary { return { - unfinalizedBlockNumber: s.unfinalizedblocknumber, - finalizedBlockNumber: s.finalizedblocknumber, - oldestHistoricalBlock: s.oldesthistoricalblock, - treesAreSynched: s.treesaresynched, + unfinalizedBlockNumber: s.unfinalizedBlockNumber, + finalizedBlockNumber: s.finalizedBlockNumber, + oldestHistoricalBlock: s.oldestHistoricalBlock, + treesAreSynched: s.treesAreSynched, } as unknown as WorldStateStatusSummary; } function convertDBStats(s: WsdbDBStatsInner): DBStats { return { name: s.name, - numDataItems: s.numdataitems, - totalUsedSize: s.totalusedsize, + numDataItems: s.numDataItems, + totalUsedSize: s.totalUsedSize, } as unknown as DBStats; } function convertTreeDBStats(s: WsdbTreeDBStats): TreeDBStats { return { - mapSize: s.mapsize, - physicalFileSize: s.physicalfilesize, - blocksDBStats: convertDBStats(s.blocksdbstats), - nodesDBStats: convertDBStats(s.nodesdbstats), - leafPreimagesDBStats: convertDBStats(s.leafpreimagesdbstats), - leafIndicesDBStats: convertDBStats(s.leafindicesdbstats), - blockIndicesDBStats: convertDBStats(s.blockindicesdbstats), + mapSize: s.mapSize, + physicalFileSize: s.physicalFileSize, + blocksDBStats: convertDBStats(s.blocksDBStats), + nodesDBStats: convertDBStats(s.nodesDBStats), + leafPreimagesDBStats: convertDBStats(s.leafPreimagesDBStats), + leafIndicesDBStats: convertDBStats(s.leafIndicesDBStats), + blockIndicesDBStats: convertDBStats(s.blockIndicesDBStats), } as unknown as TreeDBStats; } function convertWorldStateDBStats(s: WsdbDBStats): WorldStateDBStats { return { - noteHashTreeStats: convertTreeDBStats(s.notehashtreestats), - messageTreeStats: convertTreeDBStats(s.messagetreestats), - archiveTreeStats: convertTreeDBStats(s.archivetreestats), - publicDataTreeStats: convertTreeDBStats(s.publicdatatreestats), - nullifierTreeStats: convertTreeDBStats(s.nullifiertreestats), + noteHashTreeStats: convertTreeDBStats(s.noteHashTreeStats), + messageTreeStats: convertTreeDBStats(s.messageTreeStats), + archiveTreeStats: convertTreeDBStats(s.archiveTreeStats), + publicDataTreeStats: convertTreeDBStats(s.publicDataTreeStats), + nullifierTreeStats: convertTreeDBStats(s.nullifierTreeStats), } as unknown as WorldStateDBStats; } @@ -165,38 +165,36 @@ function convertTreeMeta(m: WsdbTreeMeta): TreeMeta { name: m.name, depth: m.depth, size: m.size, - committedSize: m.committedsize, + committedSize: m.committedSize, root: m.root, - initialSize: m.initialsize, - initialRoot: m.initialroot, - oldestHistoricBlock: m.oldesthistoricblock, - unfinalizedBlockHeight: m.unfinalizedblockheight, - finalizedBlockHeight: m.finalizedblockheight, + initialSize: m.initialSize, + initialRoot: m.initialRoot, + oldestHistoricBlock: m.oldestHistoricBlock, + unfinalizedBlockHeight: m.unfinalizedBlockHeight, + finalizedBlockHeight: m.finalizedBlockHeight, } as unknown as TreeMeta; } function convertWorldStateMeta(m: WsdbMeta): WorldStateMeta { return { - noteHashTreeMeta: convertTreeMeta(m.notehashtreemeta), - messageTreeMeta: convertTreeMeta(m.messagetreemeta), - archiveTreeMeta: convertTreeMeta(m.archivetreemeta), - publicDataTreeMeta: convertTreeMeta(m.publicdatatreemeta), - nullifierTreeMeta: convertTreeMeta(m.nullifiertreemeta), + noteHashTreeMeta: convertTreeMeta(m.noteHashTreeMeta), + messageTreeMeta: convertTreeMeta(m.messageTreeMeta), + archiveTreeMeta: convertTreeMeta(m.archiveTreeMeta), + publicDataTreeMeta: convertTreeMeta(m.publicDataTreeMeta), + nullifierTreeMeta: convertTreeMeta(m.nullifierTreeMeta), } as unknown as WorldStateMeta; } function convertStatusFull(s: WsdbStatusFull): WorldStateStatusFull { return { summary: convertStatusSummary(s.summary), - dbStats: convertWorldStateDBStats(s.dbstats), + dbStats: convertWorldStateDBStats(s.dbStats), meta: convertWorldStateMeta(s.meta), } as unknown as WorldStateStatusFull; } /** Convert Wsdb SiblingPathAndIndex to NAPI format. */ -function convertSiblingPathAndIndex( - s: WsdbSiblingPathAndIndex | undefined, -): { index: bigint; path: Buffer[] } | undefined { +function convertSiblingPathAndIndex(s: WsdbSiblingPathAndIndex | null): { index: bigint; path: Buffer[] } | undefined { if (!s) { return undefined; } @@ -351,11 +349,11 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.GET_TREE_INFO: { const b = body as WorldStateRequest[WorldStateMessageType.GET_TREE_INFO]; const resp = await this.api.wsdbGetTreeInfo({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), }); return { - treeId: resp.treeid, + treeId: resp.treeId, root: Buffer.from(resp.root), size: resp.size, depth: resp.depth, @@ -380,9 +378,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.GET_LEAF_VALUE: { const b = body as WorldStateRequest[WorldStateMessageType.GET_LEAF_VALUE]; const resp = await this.api.wsdbGetLeafValue({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), - leafindex: Number(b.leafIndex), + leafIndex: Number(b.leafIndex), }); if (!resp.value) { return undefined as WorldStateResponse[T]; @@ -393,9 +391,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.GET_LEAF_PREIMAGE: { const b = body as WorldStateRequest[WorldStateMessageType.GET_LEAF_PREIMAGE]; const resp = await this.api.wsdbGetLeafPreimage({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), - leafindex: Number(b.leafIndex), + leafIndex: Number(b.leafIndex), }); if (!resp.preimage) { return undefined as WorldStateResponse[T]; @@ -406,9 +404,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.GET_SIBLING_PATH: { const b = body as WorldStateRequest[WorldStateMessageType.GET_SIBLING_PATH]; const resp = await this.api.wsdbGetSiblingPath({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), - leafindex: Number(b.leafIndex), + leafIndex: Number(b.leafIndex), }); return resp.path.map(p => Buffer.from(p)) as WorldStateResponse[T]; } @@ -416,12 +414,12 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.GET_BLOCK_NUMBERS_FOR_LEAF_INDICES: { const b = body as WorldStateRequest[WorldStateMessageType.GET_BLOCK_NUMBERS_FOR_LEAF_INDICES]; const resp = await this.api.wsdbGetBlockNumbersForLeafIndices({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), - leafindices: b.leafIndices.map(Number), + leafIndices: b.leafIndices.map(Number), }); return { - blockNumbers: resp.blocknumbers.map(n => (n != null ? BigInt(n) : undefined)), + blockNumbers: resp.blockNumbers.map(n => (n != null ? BigInt(n) : undefined)), } as WorldStateResponse[T]; } @@ -430,10 +428,10 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.FIND_LEAF_INDICES: { const b = body as WorldStateRequest[WorldStateMessageType.FIND_LEAF_INDICES]; const resp = await this.api.wsdbFindLeafIndices({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), leaves: b.leaves.map(serializeLeafToBytes), - startindex: Number(b.startIndex), + startIndex: Number(b.startIndex), }); return { indices: resp.indices.map(n => (n != null ? BigInt(n) : undefined)), @@ -443,12 +441,12 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.FIND_LOW_LEAF: { const b = body as WorldStateRequest[WorldStateMessageType.FIND_LOW_LEAF]; const resp = await this.api.wsdbFindLowLeaf({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), key: new Uint8Array(b.key.toBuffer()), }); return { - alreadyPresent: resp.alreadypresent, + alreadyPresent: resp.alreadyPresent, index: BigInt(resp.index), } as WorldStateResponse[T]; } @@ -456,7 +454,7 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.FIND_SIBLING_PATHS: { const b = body as WorldStateRequest[WorldStateMessageType.FIND_SIBLING_PATHS]; const resp = await this.api.wsdbFindSiblingPaths({ - treeid: b.treeId, + treeId: b.treeId, revision: toWsdbRevision(b.revision), leaves: b.leaves.map(serializeLeafToBytes), }); @@ -470,9 +468,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.APPEND_LEAVES: { const b = body as WorldStateRequest[WorldStateMessageType.APPEND_LEAVES]; await this.api.wsdbAppendLeaves({ - treeid: b.treeId, + treeId: b.treeId, leaves: b.leaves.map(serializeLeafToBytes), - forkid: b.forkId, + forkId: b.forkId, }); return undefined as WorldStateResponse[T]; } @@ -480,10 +478,10 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.BATCH_INSERT: { const b = body as WorldStateRequest[WorldStateMessageType.BATCH_INSERT]; const resp = await this.api.wsdbBatchInsert({ - treeid: b.treeId, + treeId: b.treeId, leaves: b.leaves.map(serializeLeafToBytes), - subtreedepth: b.subtreeDepth, - forkid: b.forkId, + subtreeDepth: b.subtreeDepth, + forkId: b.forkId, }); const decoded = msgpackDecoder.unpack(Buffer.from(resp.result)); return convertUint8ArraysToBuffers(decoded) as WorldStateResponse[T]; @@ -492,9 +490,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.SEQUENTIAL_INSERT: { const b = body as WorldStateRequest[WorldStateMessageType.SEQUENTIAL_INSERT]; const resp = await this.api.wsdbSequentialInsert({ - treeid: b.treeId, + treeId: b.treeId, leaves: b.leaves.map(serializeLeafToBytes), - forkid: b.forkId, + forkId: b.forkId, }); const decoded = msgpackDecoder.unpack(Buffer.from(resp.result)); return convertUint8ArraysToBuffers(decoded) as WorldStateResponse[T]; @@ -503,9 +501,9 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.UPDATE_ARCHIVE: { const b = body as WorldStateRequest[WorldStateMessageType.UPDATE_ARCHIVE]; await this.api.wsdbUpdateArchive({ - blockstateref: blockStateRefToMap(b.blockStateRef as Map) as any, - blockheaderhash: new Uint8Array(b.blockHeaderHash), - forkid: b.forkId, + blockStateRef: blockStateRefToMap(b.blockStateRef as Map) as any, + blockHeaderHash: new Uint8Array(b.blockHeaderHash), + forkId: b.forkId, }); return undefined as WorldStateResponse[T]; } @@ -527,15 +525,15 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.SYNC_BLOCK: { const b = body as WorldStateRequest[WorldStateMessageType.SYNC_BLOCK]; const resp = await this.api.wsdbSyncBlock({ - blocknumber: Number(b.blockNumber), - blockstateref: blockStateRefToMap(b.blockStateRef as Map) as any, - blockheaderhash: new Uint8Array(b.blockHeaderHash.toBuffer()), - paddednotehashes: b.paddedNoteHashes.map(l => new Uint8Array(l as Buffer)), - paddedl1tol2messages: b.paddedL1ToL2Messages.map(l => new Uint8Array(l as Buffer)), - paddednullifiers: b.paddedNullifiers.map(l => ({ + blockNumber: Number(b.blockNumber), + blockStateRef: blockStateRefToMap(b.blockStateRef as Map) as any, + blockHeaderHash: new Uint8Array(b.blockHeaderHash.toBuffer()), + paddedNoteHashes: b.paddedNoteHashes.map(l => new Uint8Array(l as Buffer)), + paddedL1ToL2Messages: b.paddedL1ToL2Messages.map(l => new Uint8Array(l as Buffer)), + paddedNullifiers: b.paddedNullifiers.map(l => ({ nullifier: new Uint8Array((l as { nullifier: Buffer }).nullifier), })), - publicdatawrites: b.publicDataWrites.map(l => ({ + publicDataWrites: b.publicDataWrites.map(l => ({ slot: new Uint8Array((l as { slot: Buffer; value: Buffer }).slot), value: new Uint8Array((l as { slot: Buffer; value: Buffer }).value), })), @@ -549,14 +547,14 @@ export class IpcWorldState implements NativeWorldStateInstance { const b = body as WorldStateRequest[WorldStateMessageType.CREATE_FORK]; const resp = await this.api.wsdbCreateFork({ latest: b.latest, - blocknumber: Number(b.blockNumber), + blockNumber: Number(b.blockNumber), }); - return { forkId: resp.forkid } as WorldStateResponse[T]; + return { forkId: resp.forkId } as WorldStateResponse[T]; } case WorldStateMessageType.DELETE_FORK: { const b = body as WorldStateRequest[WorldStateMessageType.DELETE_FORK]; - await this.api.wsdbDeleteFork({ forkid: b.forkId }); + await this.api.wsdbDeleteFork({ forkId: b.forkId }); return undefined as WorldStateResponse[T]; } @@ -564,19 +562,19 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.FINALIZE_BLOCKS: { const b = body as WorldStateRequest[WorldStateMessageType.FINALIZE_BLOCKS]; - const resp = await this.api.wsdbFinalizeBlocks({ toblocknumber: Number(b.toBlockNumber) }); + const resp = await this.api.wsdbFinalizeBlocks({ toBlockNumber: Number(b.toBlockNumber) }); return convertStatusSummary(resp.status) as WorldStateResponse[T]; } case WorldStateMessageType.UNWIND_BLOCKS: { const b = body as WorldStateRequest[WorldStateMessageType.UNWIND_BLOCKS]; - const resp = await this.api.wsdbUnwindBlocks({ toblocknumber: Number(b.toBlockNumber) }); + const resp = await this.api.wsdbUnwindBlocks({ toBlockNumber: Number(b.toBlockNumber) }); return convertStatusFull(resp.status) as WorldStateResponse[T]; } case WorldStateMessageType.REMOVE_HISTORICAL_BLOCKS: { const b = body as WorldStateRequest[WorldStateMessageType.REMOVE_HISTORICAL_BLOCKS]; - const resp = await this.api.wsdbRemoveHistoricalBlocks({ toblocknumber: Number(b.toBlockNumber) }); + const resp = await this.api.wsdbRemoveHistoricalBlocks({ toBlockNumber: Number(b.toBlockNumber) }); return convertStatusFull(resp.status) as WorldStateResponse[T]; } @@ -591,7 +589,7 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.CREATE_CHECKPOINT: { const b = body as WorldStateRequest[WorldStateMessageType.CREATE_CHECKPOINT]; - await this.api.wsdbCreateCheckpoint({ forkid: b.forkId }); + await this.api.wsdbCreateCheckpoint({ forkId: b.forkId }); const depth = (this.checkpointDepths.get(b.forkId) ?? 0) + 1; this.checkpointDepths.set(b.forkId, depth); return { depth } as WorldStateResponse[T]; @@ -599,7 +597,7 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.COMMIT_CHECKPOINT: { const b = body as WorldStateRequest[WorldStateMessageType.COMMIT_CHECKPOINT]; - await this.api.wsdbCommitCheckpoint({ forkid: b.forkId }); + await this.api.wsdbCommitCheckpoint({ forkId: b.forkId }); const depth = Math.max(0, (this.checkpointDepths.get(b.forkId) ?? 0) - 1); this.checkpointDepths.set(b.forkId, depth); return undefined as WorldStateResponse[T]; @@ -607,7 +605,7 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.REVERT_CHECKPOINT: { const b = body as WorldStateRequest[WorldStateMessageType.REVERT_CHECKPOINT]; - await this.api.wsdbRevertCheckpoint({ forkid: b.forkId }); + await this.api.wsdbRevertCheckpoint({ forkId: b.forkId }); const depth = Math.max(0, (this.checkpointDepths.get(b.forkId) ?? 0) - 1); this.checkpointDepths.set(b.forkId, depth); return undefined as WorldStateResponse[T]; @@ -619,11 +617,11 @@ export class IpcWorldState implements NativeWorldStateInstance { const currentDepth = this.checkpointDepths.get(b.forkId) ?? 0; if (targetDepth === 0) { // Commit everything — use the bulk operation - await this.api.wsdbCommitAllCheckpoints({ forkid: b.forkId }); + await this.api.wsdbCommitAllCheckpoints({ forkId: b.forkId }); } else { // Commit one level at a time down to target depth for (let d = currentDepth; d > targetDepth; d--) { - await this.api.wsdbCommitCheckpoint({ forkid: b.forkId }); + await this.api.wsdbCommitCheckpoint({ forkId: b.forkId }); } } this.checkpointDepths.set(b.forkId, targetDepth); @@ -636,11 +634,11 @@ export class IpcWorldState implements NativeWorldStateInstance { const currentDepth = this.checkpointDepths.get(b.forkId) ?? 0; if (targetDepth === 0) { // Revert everything — use the bulk operation - await this.api.wsdbRevertAllCheckpoints({ forkid: b.forkId }); + await this.api.wsdbRevertAllCheckpoints({ forkId: b.forkId }); } else { // Revert one level at a time down to target depth for (let d = currentDepth; d > targetDepth; d--) { - await this.api.wsdbRevertCheckpoint({ forkid: b.forkId }); + await this.api.wsdbRevertCheckpoint({ forkId: b.forkId }); } } this.checkpointDepths.set(b.forkId, targetDepth); @@ -651,7 +649,7 @@ export class IpcWorldState implements NativeWorldStateInstance { case WorldStateMessageType.COPY_STORES: { const b = body as WorldStateRequest[WorldStateMessageType.COPY_STORES]; - await this.api.wsdbCopyStores({ dstpath: b.dstPath, compact: b.compact }); + await this.api.wsdbCopyStores({ dstPath: b.dstPath, compact: b.compact }); return undefined as WorldStateResponse[T]; }