diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/.DS_Store differ diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index 9ef551aa..00000000 --- a/.cargo/config +++ /dev/null @@ -1,4 +0,0 @@ -paths = ["./"] - -[target.x86_64-unknown-linux-gnu] -rustflags = ["-Clink-arg=-Wl,--allow-multiple-definition"] \ No newline at end of file diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index c795b054..00000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index c595ffb6..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "env": { - "node": true, - "es6": true - }, - "extends": ["eslint:recommended"], - "overrides": [], - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "script" - }, - "globals": { - "process": "readonly", - "__dirname": "readonly", - "before": "readonly", - "it": "readonly", - "describe": "readonly", - "BigInt": "readonly" - }, - "rules": { - "indent": ["error", 4], - "linebreak-style": ["error", "unix"], - "quotes": ["error", "single"], - "semi": ["error", "always"] - } -} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index e15a1bf4..00000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Build and Test - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - components: rustfmt, clippy - - name: Install wasm-pack - run: cargo install wasm-pack - - name: Download circom v2.1.9 (Linux) - run: wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/local/bin/circom && chmod +x /usr/local/bin/circom - - name: Install yarn - run: npm install -g yarn - - name: Install dependencies - run: yarn install --immutable - - name: Install bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - name: Run tests - run: yarn test diff --git a/.gitignore b/.gitignore index a233986d..a2e8931f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,114 +1,9 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -.vscode -build/* -!build/.placeholder - +nfa.json target +/compiler/pkg +/compiler/.yarn -Cargo.lock - -.DS_Store -packages/*/build - -package-lock.json -yarn.lock - -index.node +Prover.toml +prover.toml +inputs.txt +node_modules diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index a7ab2346..00000000 --- a/.prettierrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "tabWidth": 4, - "useTabs": false, - "semi": true, - "singleQuote": true, - "endOfLine": "lf", - "trailingComma": "none", - "bracketSpacing": true, - "arrowParens": "avoid" -} diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..5a40fd96 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,614 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" +dependencies = [ + "clap_builder", + "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "comptime" +version = "0.1.0" +source = "git+https://github.com/jp4g/sparse_array?branch=feat%2Fcomptime-codegen#36d5251606d1044759de79b941b0d5d0600c695d" +dependencies = [ + "hex", + "lazy_static", + "num-bigint", + "num-traits", +] + +[[package]] +name = "concolor-override" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a4925288e39d5923e024781971aab940995fa31bab3ffceebbadfc87591e90" +dependencies = [ + "colorchoice", +] + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "is-terminal" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.172" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "syn" +version = "2.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zk-regex-compiler" +version = "2.0.0-alpha.2" +dependencies = [ + "clap", + "comptime", + "heck 0.5.0", + "regex-automata", + "regex-syntax", + "serde", + "serde-wasm-bindgen", + "serde_json", + "thiserror", + "wasm-bindgen", +] diff --git a/Cargo.toml b/Cargo.toml index 56f1ba08..9e832bd5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,19 @@ [workspace] -members = ["packages/*"] -exclude = ["packages/circom", "test"] +members = ["compiler"] -# [patch."https://github.com/stalwartlabs/mail-builder"] -# mail-builder = { version = "0.2.5", git = "https://github.com/stalwartlabs//mail-builder", tag = "0.2.5" } +[workspace.package] +edition = "2024" -# [patch."https://github.com/stalwartlabs/mail-parser"] -# mail-parser = { version = "0.8", git = "https://github.com/stalwartlabs//mail-parser", tag = "0.8.0" } +[workspace.dependencies] +clap = "4.2.1" +comptime = { git = "https://github.com/jp4g/sparse_array", branch = "feat/comptime-codegen" } +heck = "0.5.0" +regex-automata = "0.4.7" +regex-syntax = "0.8.5" +serde = "1.0.219" +serde_json = "1.0.140" +thiserror = "2.0.12" +serde-wasm-bindgen = "0.6.5" +wasm-bindgen = "0.2.100" + +resolver = "2" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702d..00000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md index b4b4161e..b9c091c7 100644 --- a/README.md +++ b/README.md @@ -1,186 +1,70 @@ -# zk-regex - -A library to compile regex verification in circom. Explained on [our blog post](https://zk.email/blog/zkregex). You can use regex to specify how to parse an email in a ZK Email proof when defining a new patterm on [the ZK Email SDK registry](https://registry.zk.email/). Noir coming soon. - - - -## Introduction - -This library provides a compiler for regex that lets you specify public and private parts, then generates circom circuits that enable you to prove that -- the input string satisfies regular expressions (regexes) specified in the chip. -- the substrings are correctly extracted from the input string according to substring definitions. -- the public parts are public outputs but the private parts are kept private - -This is a Rust adaptation of the Python regex-to-circom work done by [sampriti](https://github.com/sampritipanda/) and [yush_g](https://twitter.com/yush_g), along with [sorasue](https://github.com/SoraSuegami/)'s and [Shreyas](https://github.com/shreyas-londhe) + [Bisht13](https://github.com/Bisht13)'s rewrite in Rust to support more characters. You can play with the old V1 compiler and DFA visualizations via our no-code tool [zkregex.com](https://www.zkregex.com). Note that zkregex.com does NOT support all syntax from the V2, only the highly restricted set of syntax from V1. - -In addition to the original work, this library also supports the following features: -- CLI to dynamically generate regex circuit based on regex arguments -- Extended regex circuit template supporting most regex syntax (see Theory to understand excluded syntax) - - a decomposed regex definition, which is the easiest way to define your regex's public and private parts - -You can define a regex to be proved and its substring patterns to be revealed. -Specifically, there are two ways to define them: -1. (manual way) converting the regex into an equivalent determistic finite automaton (DFA), selecting state transitions for each substring pattern, and writing the transitions in a json file. -2. (automatic way) writing a decomposed version of the regex in a json file with specifying which part of the regex is revealed. -3. (no code way) put the regex into zkregex.com > tool, highlight your chosen part, and copy the generated circuit -While the manual way supports more kinds of regexes than the automatic way, the latter is easier and sufficient for most regexes. - -### Theory - -To understand the theory behind the regex circuit compiler, please checkout [our main explanation post](https://zk.email/blog/zkregex), or [this older blog post](https://katat.me/blog/ZK+Regex). To understand how it ties into the original zk email work, you can also read the brief [original zk-email blog post regex overview](https://blog.aayushg.com/posts/zkemail#regex-deterministic-finite-automata-in-zk). - -The regular expressions supported by our compiler version 2.1.1 are **audited by zksecurity**, and have the following limitations: - -1. Regular expressions where the results differ between greedy and lazy matching (e.g., .+, .+?) are not supported. -2. The beginning anchor ^ must either appear at the beginning of the regular expression or be in the format (|^). Additionally, the section containing this ^ must be non-public (is_public: false). -3. The end anchor $ must appear at the end of the regular expression. -4. Regular expressions that, when converted to DFA (Deterministic Finite Automaton), include transitions to the initial state are not supported (e.g., .*). -5. Regular expressions that, when converted to DFA, have multiple accepting states are not supported. -6. Decomposed regex defintions must alternate public and private states. - -Note that all international characters are supported. - -If you want to use this circuit in practice, we strongly recommend using [AssertZero](https://github.com/zkemail/zk-email-verify/blob/29d5c873161c30ebb98a00efb3a145275d0f0833/packages/circuits/utils/array.circom#L144) on the bytes before and after your match. This is because you likely have shift viaan unconstrained index passed in as the witnesss to represent the start of the regex match. Since that value can be arbitrarily manipulated, you need to manually constrain that there are no extra matches that can be used to exploit the circuit. You can see how we do this in [zk-email here](https://github.com/zkemail/zk-email-verify/blob/29d5c873161c30ebb98a00efb3a145275d0f0833/packages/circuits/email-verifier.circom#L99). - -## How to use - -### Install - -Install yarn v1, or run `yarn set version classic` to set the version. -Also make sure that [`circom`](https://docs.circom.io/getting-started/installation/) is installed. - -Clone the repo and install the dependencies: - -``` -yarn install -``` - -### Compiler CLI - -`zk-regex` is a CLI to compile a user-defined regex to the corresponding regex circuit. -It provides two commands: `raw` and `decomposed` - -#### `zk-regex decomposed -d -c -t -g ` -This command generates a regex circom from a decomposed regex definition. -For example, if you want to verify the regex of `email was meant for @(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z)+.` and reveal alphabets after @, you can define the decomposed regex as follows. -``` -{ - "parts":[ - { - "is_public": false, - "regex_def": "email was meant for @" - }, - { - "is_public": true, - "regex_def": "[a-z]+" - }, - { - "is_public": false, - "regex_def": "." - } - ] -} -``` -Note that the `is_public` field in the second part is true since it is a substring to be revealed. -You can generate its regex circom as follows. -1. Make the above json file at `./simple_regex_decomposed.json`. -2. Run `zk-regex decomposed -d ./simple_regex_decomposed.json -c ./simple_regex.circom -t SimpleRegex -g true`. It outputs a circom file at `./simple_regex.circom` that has a `SimpleRegex` template. - -#### `zk-regex raw -r -s -c -t -g ` -This command generates a regex circom from a raw string of the regex definition and a json file that defines state transitions in DFA to be revealed. -For example, to verify the regex `1=(a|b) (2=(b|c)+ )+d` and reveal its alphabets, -1. Visualize DFA of the regex using [this website](https://zkregex.com). -2. Find state transitions matching with the substrings to be revealed. In this case, they are `2->3` for the alphabets after `1=`, `6->7` and `7->7` for those after `2=`, and `8->9` for `d`. -3. Make a json file at `./simple_regex_substrs.json` that defines the state transitions. For example, - ``` - { - "transitions": [ - [ - [ - 2, - 3 - ] - ], - [ - [ - 6, - 7 - ], - [ - 7, - 7 - ] - ], - [ - [ - 8, - 9 - ] - ] - ] - } - ``` -4. Run `zk-regex raw -r "1=(a|b) (2=(b|c)+ )+d" -s ./simple_regex_substrs.json -c ./simple_regex.circom -t SimpleRegex -g true`. It outputs a circom file at `./simple_regex.circom` that has a `SimpleRegex` template. +# ZK-Regex: Verifiable Regular Expressions in Arithmetic Circuits + +`zk-regex` enables proving regular expression matching within zero-knowledge circuits. It compiles standard regex patterns into circuit-friendly Non-deterministic Finite Automata (NFAs) and generates corresponding circuit code for **[Circom](https://docs.circom.io/)** and **[Noir](https://noir-lang.org/)** proving systems. + +This allows developers to build ZK applications that can verifiably process or validate text based on complex patterns without revealing the text itself. - +## Project Structure -### Circuit Usage -The generated circuit has -- 1 template arguments: - - `msg_bytes`: the number of characters for the input string. -- 1 input signals: - - `msg[msg_bytes]`: the input message to match against -- 1 + (the number of substring patterns) output signals: - - `out`: a bit flag to identify whether the substring of the input string matches with the defined regex. - - `reveal(i)[msg_bytes]`: The masked version of `msg[msg_bytes]`. Each character in `msg[msg_bytes]` is turned to zero in `reveal(i)[msg_bytes]` if it does not belong to the i-th substring pattern. +The project is organized into the following packages: -For more examples in action, please checkout the test cases in the `./packages/circom/circuits/common` folder. +- **`compiler/`**: The core Rust library responsible for parsing regex patterns, building NFAs, and generating circuit code. See [compiler/README.md](./compiler/README.md) for API details and usage. +- **`circom/`**: Contains Circom templates and helper circuits required to use the generated regex verification circuits within a Circom project. See [circom/README.md](./circom/README.md) for integration details. +- **`noir/`**: Contains Noir contracts/libraries required to use the generated regex verification logic within a Noir project. See [noir/README.md](./noir/README.md) for integration details. -### Helper APIs -A package in `./packages/apis` provides nodejs/rust apis helpful to generate inputs of the regex circuits. +## High-Level Workflow -## Development -Welcome any questions, suggestions or PRs! +1. **Define Regex:** Start with your standard regular expression pattern. + ```json + { + "parts": [ + { "Pattern": "(?:\r\n|^)subject:" }, + { "PublicPattern": ["[a-z]+", 128] }, + { "Pattern": "\r\n" } + ] + } + ``` +2. **Compile & Generate Circuit:** Use the `zk-regex-compiler` library to compile the pattern and generate circuit code for your chosen framework (Circom or Noir). -### Testing + ```rust + // Simplified example - see compiler/README.md for full usage + use zk_regex_compiler::{gen_from_raw, ProvingFramework}; + + let parts = Vec::new(); + parts.push(RegexPart::Pattern("(?:\\r\\n|^)subject:".to_string())); + parts.push(RegexPart::PublicPattern(("([a-z]+)".to_string(), 128))); + parts.push(RegexPart::Pattern("\r\n".to_string())); + let decomposed_config = DecomposedRegexConfig { parts }; + + let (nfa, circom_code) = gen_from_decomposed(parts, "MyRegex", ProvingFramework::Circom)?; + // Save or use circom_code + ``` -You will need to have bun installed: +3. **Integrate Circuit:** Include the generated code and the corresponding helper library ([`zk-regex-circom`](./circom/README.md) or [`zk-regex-noir`](./noir/README.md)) in your ZK project. +4. **Generate Inputs:** Use the `zk-regex-compiler`'s [`gen_circuit_inputs`](./compiler/README.md#gen_circuit_inputsnfa-nfagraph-input-str-max_haystack_len-usize-max_match_len-usize-proving_framework-provingframework---resultproverinputs-compilererror) function to prepare the private and public inputs for your prover based on the text you want to match. +5. **Prove & Verify:** Run your ZK proving system using the generated inputs and circuit. The proof demonstrates that the (private) text matches the (public) regex pattern. -```bash -curl -fsSL https://bun.sh/install | bash -``` +## Installation -```bash -yarn test -``` +Installation details depend on which part of the project you need: -## Cite this Work +- **Compiler:** If using the compiler directly in a Rust project, add it to your `Cargo.toml`. See [compiler/README.md](./compiler/README.md). +- **Circom Helpers:** See [circom/README.md](./circom/README.md) for instructions on integrating the Circom templates. +- **Noir Helpers:** See [noir/README.md](./noir/README.md) for instructions on adding the Noir library dependency. -Use this bibtex citation. -``` -@misc{zk-regex, - author = {Gupta, Aayush and Panda, Sampriti and Suegami, Sora}, - title = {zk-regex}, - year = {2022}, - publisher = {GitHub}, - journal = {GitHub repository}, - howpublished = {\url{https://github.com/zkemail/zk-regex/}}, -} -``` +## Contributing - +## License -## Assumptions -Some email providers put not only the sender's email address but also their username to the From field. -ALthough its concrete formats differ among email providers, our FromAddrRegex template assumes that the email address appears at the end of the From field. -If this assumption does not hold, i.e., the username appears after the email address, an adversary can output an arbitrary email address from that template by including a dummy email address in the username. +This project is licensed under the [Specify License Here - e.g., MIT License or Apache 2.0]. diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 4d0aa62f..00000000 --- a/babel.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - presets: [ - ["@babel/preset-env", { targets: { node: "current" } }], - ["@babel/preset-react", { runtime: "automatic" }], - ["jest"], - ], - plugins: ["@babel/plugin-transform-modules-commonjs"], -}; diff --git a/circom/.gitignore b/circom/.gitignore new file mode 100644 index 00000000..a14702c4 --- /dev/null +++ b/circom/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/circom/README.md b/circom/README.md new file mode 100644 index 00000000..3767bdac --- /dev/null +++ b/circom/README.md @@ -0,0 +1,3 @@ +# zk-Regex Circom + +This package provides the necessary Circom templates to integrate regex verification logic generated by the `zk-regex-compiler` into your Circom projects. diff --git a/circom/bun.lock b/circom/bun.lock new file mode 100644 index 00000000..6dacc824 --- /dev/null +++ b/circom/bun.lock @@ -0,0 +1,953 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "circom", + "dependencies": { + "@zk-email/circuits": "6.3.3", + "circomlib": "^2.0.5", + }, + "devDependencies": { + "@types/bun": "latest", + "@types/jest": "^29.5.4", + "chai": "^4.3.7", + "circom_tester": "^0.0.20", + "circomlib": "^2.0.5", + "circomlibjs": "^0.1.2", + "ffjavascript": "^0.3.1", + "jest": "^29.5.0", + "mocha": "^10.2.0", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], + + "@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], + + "@babel/compat-data": ["@babel/compat-data@7.26.8", "", {}, "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ=="], + + "@babel/core": ["@babel/core@7.26.10", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.10", "@babel/helper-compilation-targets": "^7.26.5", "@babel/helper-module-transforms": "^7.26.0", "@babel/helpers": "^7.26.10", "@babel/parser": "^7.26.10", "@babel/template": "^7.26.9", "@babel/traverse": "^7.26.10", "@babel/types": "^7.26.10", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ=="], + + "@babel/generator": ["@babel/generator@7.27.0", "", { "dependencies": { "@babel/parser": "^7.27.0", "@babel/types": "^7.27.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.27.0", "", { "dependencies": { "@babel/compat-data": "^7.26.8", "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.25.9", "", { "dependencies": { "@babel/traverse": "^7.25.9", "@babel/types": "^7.25.9" } }, "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.26.0", "", { "dependencies": { "@babel/helper-module-imports": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9", "@babel/traverse": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.26.5", "", {}, "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.25.9", "", {}, "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.25.9", "", {}, "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], + + "@babel/helpers": ["@babel/helpers@7.27.0", "", { "dependencies": { "@babel/template": "^7.27.0", "@babel/types": "^7.27.0" } }, "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg=="], + + "@babel/parser": ["@babel/parser@7.27.0", "", { "dependencies": { "@babel/types": "^7.27.0" }, "bin": "./bin/babel-parser.js" }, "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg=="], + + "@babel/plugin-syntax-async-generators": ["@babel/plugin-syntax-async-generators@7.8.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw=="], + + "@babel/plugin-syntax-bigint": ["@babel/plugin-syntax-bigint@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg=="], + + "@babel/plugin-syntax-class-properties": ["@babel/plugin-syntax-class-properties@7.12.13", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA=="], + + "@babel/plugin-syntax-class-static-block": ["@babel/plugin-syntax-class-static-block@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw=="], + + "@babel/plugin-syntax-import-attributes": ["@babel/plugin-syntax-import-attributes@7.26.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A=="], + + "@babel/plugin-syntax-import-meta": ["@babel/plugin-syntax-import-meta@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g=="], + + "@babel/plugin-syntax-json-strings": ["@babel/plugin-syntax-json-strings@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA=="], + + "@babel/plugin-syntax-jsx": ["@babel/plugin-syntax-jsx@7.25.9", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA=="], + + "@babel/plugin-syntax-logical-assignment-operators": ["@babel/plugin-syntax-logical-assignment-operators@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig=="], + + "@babel/plugin-syntax-nullish-coalescing-operator": ["@babel/plugin-syntax-nullish-coalescing-operator@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ=="], + + "@babel/plugin-syntax-numeric-separator": ["@babel/plugin-syntax-numeric-separator@7.10.4", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug=="], + + "@babel/plugin-syntax-object-rest-spread": ["@babel/plugin-syntax-object-rest-spread@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA=="], + + "@babel/plugin-syntax-optional-catch-binding": ["@babel/plugin-syntax-optional-catch-binding@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q=="], + + "@babel/plugin-syntax-optional-chaining": ["@babel/plugin-syntax-optional-chaining@7.8.3", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg=="], + + "@babel/plugin-syntax-private-property-in-object": ["@babel/plugin-syntax-private-property-in-object@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg=="], + + "@babel/plugin-syntax-top-level-await": ["@babel/plugin-syntax-top-level-await@7.14.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw=="], + + "@babel/plugin-syntax-typescript": ["@babel/plugin-syntax-typescript@7.25.9", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.25.9" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ=="], + + "@babel/template": ["@babel/template@7.27.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/parser": "^7.27.0", "@babel/types": "^7.27.0" } }, "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA=="], + + "@babel/traverse": ["@babel/traverse@7.27.0", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.27.0", "@babel/parser": "^7.27.0", "@babel/template": "^7.27.0", "@babel/types": "^7.27.0", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA=="], + + "@babel/types": ["@babel/types@7.27.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" } }, "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg=="], + + "@bcoe/v8-coverage": ["@bcoe/v8-coverage@0.2.3", "", {}, "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="], + + "@ethersproject/abi": ["@ethersproject/abi@5.8.0", "", { "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q=="], + + "@ethersproject/abstract-provider": ["@ethersproject/abstract-provider@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/networks": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/web": "^5.8.0" } }, "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg=="], + + "@ethersproject/abstract-signer": ["@ethersproject/abstract-signer@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0" } }, "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA=="], + + "@ethersproject/address": ["@ethersproject/address@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/rlp": "^5.8.0" } }, "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA=="], + + "@ethersproject/base64": ["@ethersproject/base64@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0" } }, "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ=="], + + "@ethersproject/basex": ["@ethersproject/basex@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/properties": "^5.8.0" } }, "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q=="], + + "@ethersproject/bignumber": ["@ethersproject/bignumber@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "bn.js": "^5.2.1" } }, "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA=="], + + "@ethersproject/bytes": ["@ethersproject/bytes@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A=="], + + "@ethersproject/constants": ["@ethersproject/constants@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0" } }, "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg=="], + + "@ethersproject/contracts": ["@ethersproject/contracts@5.8.0", "", { "dependencies": { "@ethersproject/abi": "^5.8.0", "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/transactions": "^5.8.0" } }, "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ=="], + + "@ethersproject/hash": ["@ethersproject/hash@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/base64": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA=="], + + "@ethersproject/hdnode": ["@ethersproject/hdnode@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/basex": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/pbkdf2": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/signing-key": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/wordlists": "^5.8.0" } }, "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA=="], + + "@ethersproject/json-wallets": ["@ethersproject/json-wallets@5.8.0", "", { "dependencies": { "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/hdnode": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/pbkdf2": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "aes-js": "3.0.0", "scrypt-js": "3.0.1" } }, "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w=="], + + "@ethersproject/keccak256": ["@ethersproject/keccak256@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "js-sha3": "0.8.0" } }, "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng=="], + + "@ethersproject/logger": ["@ethersproject/logger@5.8.0", "", {}, "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA=="], + + "@ethersproject/networks": ["@ethersproject/networks@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg=="], + + "@ethersproject/pbkdf2": ["@ethersproject/pbkdf2@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/sha2": "^5.8.0" } }, "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg=="], + + "@ethersproject/properties": ["@ethersproject/properties@5.8.0", "", { "dependencies": { "@ethersproject/logger": "^5.8.0" } }, "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw=="], + + "@ethersproject/providers": ["@ethersproject/providers@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/base64": "^5.8.0", "@ethersproject/basex": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/networks": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/rlp": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/strings": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/web": "^5.8.0", "bech32": "1.1.4", "ws": "8.18.0" } }, "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw=="], + + "@ethersproject/random": ["@ethersproject/random@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A=="], + + "@ethersproject/rlp": ["@ethersproject/rlp@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q=="], + + "@ethersproject/sha2": ["@ethersproject/sha2@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "hash.js": "1.1.7" } }, "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A=="], + + "@ethersproject/signing-key": ["@ethersproject/signing-key@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "bn.js": "^5.2.1", "elliptic": "6.6.1", "hash.js": "1.1.7" } }, "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w=="], + + "@ethersproject/solidity": ["@ethersproject/solidity@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/sha2": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA=="], + + "@ethersproject/strings": ["@ethersproject/strings@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg=="], + + "@ethersproject/transactions": ["@ethersproject/transactions@5.8.0", "", { "dependencies": { "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/rlp": "^5.8.0", "@ethersproject/signing-key": "^5.8.0" } }, "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg=="], + + "@ethersproject/units": ["@ethersproject/units@5.8.0", "", { "dependencies": { "@ethersproject/bignumber": "^5.8.0", "@ethersproject/constants": "^5.8.0", "@ethersproject/logger": "^5.8.0" } }, "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ=="], + + "@ethersproject/wallet": ["@ethersproject/wallet@5.8.0", "", { "dependencies": { "@ethersproject/abstract-provider": "^5.8.0", "@ethersproject/abstract-signer": "^5.8.0", "@ethersproject/address": "^5.8.0", "@ethersproject/bignumber": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/hdnode": "^5.8.0", "@ethersproject/json-wallets": "^5.8.0", "@ethersproject/keccak256": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/random": "^5.8.0", "@ethersproject/signing-key": "^5.8.0", "@ethersproject/transactions": "^5.8.0", "@ethersproject/wordlists": "^5.8.0" } }, "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA=="], + + "@ethersproject/web": ["@ethersproject/web@5.8.0", "", { "dependencies": { "@ethersproject/base64": "^5.8.0", "@ethersproject/bytes": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw=="], + + "@ethersproject/wordlists": ["@ethersproject/wordlists@5.8.0", "", { "dependencies": { "@ethersproject/bytes": "^5.8.0", "@ethersproject/hash": "^5.8.0", "@ethersproject/logger": "^5.8.0", "@ethersproject/properties": "^5.8.0", "@ethersproject/strings": "^5.8.0" } }, "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg=="], + + "@iden3/bigarray": ["@iden3/bigarray@0.0.2", "", {}, "sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g=="], + + "@iden3/binfileutils": ["@iden3/binfileutils@0.0.11", "", { "dependencies": { "fastfile": "0.0.20", "ffjavascript": "^0.2.48" } }, "sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA=="], + + "@istanbuljs/load-nyc-config": ["@istanbuljs/load-nyc-config@1.1.0", "", { "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" } }, "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ=="], + + "@istanbuljs/schema": ["@istanbuljs/schema@0.1.3", "", {}, "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA=="], + + "@jest/console": ["@jest/console@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg=="], + + "@jest/core": ["@jest/core@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/reporters": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.7.0", "jest-config": "^29.7.0", "jest-haste-map": "^29.7.0", "jest-message-util": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-resolve-dependencies": "^29.7.0", "jest-runner": "^29.7.0", "jest-runtime": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"] }, "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg=="], + + "@jest/environment": ["@jest/environment@29.7.0", "", { "dependencies": { "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "jest-mock": "^29.7.0" } }, "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw=="], + + "@jest/expect": ["@jest/expect@29.7.0", "", { "dependencies": { "expect": "^29.7.0", "jest-snapshot": "^29.7.0" } }, "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ=="], + + "@jest/expect-utils": ["@jest/expect-utils@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3" } }, "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA=="], + + "@jest/fake-timers": ["@jest/fake-timers@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ=="], + + "@jest/globals": ["@jest/globals@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/types": "^29.6.3", "jest-mock": "^29.7.0" } }, "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ=="], + + "@jest/reporters": ["@jest/reporters@29.7.0", "", { "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@jest/console": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "jest-worker": "^29.7.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", "v8-to-istanbul": "^9.0.1" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"] }, "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg=="], + + "@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], + + "@jest/source-map": ["@jest/source-map@29.6.3", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw=="], + + "@jest/test-result": ["@jest/test-result@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA=="], + + "@jest/test-sequencer": ["@jest/test-sequencer@29.7.0", "", { "dependencies": { "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "slash": "^3.0.0" } }, "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw=="], + + "@jest/transform": ["@jest/transform@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.2" } }, "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw=="], + + "@jest/types": ["@jest/types@29.6.3", "", { "dependencies": { "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", "@types/yargs": "^17.0.8", "chalk": "^4.0.0" } }, "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.8", "", { "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + + "@sinclair/typebox": ["@sinclair/typebox@0.27.8", "", {}, "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="], + + "@sinonjs/commons": ["@sinonjs/commons@3.0.1", "", { "dependencies": { "type-detect": "4.0.8" } }, "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ=="], + + "@sinonjs/fake-timers": ["@sinonjs/fake-timers@10.3.0", "", { "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA=="], + + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], + + "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], + + "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], + + "@types/babel__traverse": ["@types/babel__traverse@7.20.7", "", { "dependencies": { "@babel/types": "^7.20.7" } }, "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng=="], + + "@types/bun": ["@types/bun@1.2.5", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="], + + "@types/graceful-fs": ["@types/graceful-fs@4.1.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ=="], + + "@types/istanbul-lib-coverage": ["@types/istanbul-lib-coverage@2.0.6", "", {}, "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w=="], + + "@types/istanbul-lib-report": ["@types/istanbul-lib-report@3.0.3", "", { "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA=="], + + "@types/istanbul-reports": ["@types/istanbul-reports@3.0.4", "", { "dependencies": { "@types/istanbul-lib-report": "*" } }, "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ=="], + + "@types/jest": ["@types/jest@29.5.14", "", { "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ=="], + + "@types/node": ["@types/node@22.13.10", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw=="], + + "@types/stack-utils": ["@types/stack-utils@2.0.3", "", {}, "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="], + + "@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="], + + "@types/yargs": ["@types/yargs@17.0.33", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA=="], + + "@types/yargs-parser": ["@types/yargs-parser@21.0.3", "", {}, "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ=="], + + "@zk-email/circuits": ["@zk-email/circuits@6.3.3", "", { "dependencies": { "@zk-email/zk-regex-circom": "^2.3.1", "circomlib": "^2.0.5" } }, "sha512-YwyeMhmyRNausmvIsNB/lLiRgj/qbWTD0ZpSsfW7goQQPkAhRieyImK8ik0g0YVFvPtGsEw2msd4Q+tSVRvKGw=="], + + "@zk-email/zk-regex-circom": ["@zk-email/zk-regex-circom@2.3.2", "", { "dependencies": { "commander": "^11.0.0", "snarkjs": "^0.7.5" } }, "sha512-GXp4Z/93iF54hfJwlWl52HFiqpmLCeSHFc4HlYpxj5EWHQK6ibFQMLUWTJsdA3eh/erjO4UX+HlEIJ/gHhLg9g=="], + + "aes-js": ["aes-js@3.0.0", "", {}, "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw=="], + + "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="], + + "ansi-escapes": ["ansi-escapes@4.3.2", "", { "dependencies": { "type-fest": "^0.21.3" } }, "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ=="], + + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "ansi-styles": ["ansi-styles@5.2.0", "", {}, "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "assertion-error": ["assertion-error@1.1.0", "", {}, "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="], + + "async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="], + + "available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="], + + "b4a": ["b4a@1.6.7", "", {}, "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg=="], + + "babel-jest": ["babel-jest@29.7.0", "", { "dependencies": { "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" } }, "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg=="], + + "babel-plugin-istanbul": ["babel-plugin-istanbul@6.1.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" } }, "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA=="], + + "babel-plugin-jest-hoist": ["babel-plugin-jest-hoist@29.6.3", "", { "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" } }, "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg=="], + + "babel-preset-current-node-syntax": ["babel-preset-current-node-syntax@1.1.0", "", { "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-import-attributes": "^7.24.7", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw=="], + + "babel-preset-jest": ["babel-preset-jest@29.6.3", "", { "dependencies": { "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "bech32": ["bech32@1.1.4", "", {}, "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ=="], + + "bfj": ["bfj@7.1.0", "", { "dependencies": { "bluebird": "^3.7.2", "check-types": "^11.2.3", "hoopy": "^0.1.4", "jsonpath": "^1.1.1", "tryer": "^1.0.1" } }, "sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw=="], + + "binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="], + + "blake-hash": ["blake-hash@2.0.0", "", { "dependencies": { "node-addon-api": "^3.0.0", "node-gyp-build": "^4.2.2", "readable-stream": "^3.6.0" } }, "sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w=="], + + "blake2b": ["blake2b@2.1.4", "", { "dependencies": { "blake2b-wasm": "^2.4.0", "nanoassert": "^2.0.0" } }, "sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A=="], + + "blake2b-wasm": ["blake2b-wasm@2.4.0", "", { "dependencies": { "b4a": "^1.0.1", "nanoassert": "^2.0.0" } }, "sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w=="], + + "bluebird": ["bluebird@3.7.2", "", {}, "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="], + + "bn.js": ["bn.js@5.2.1", "", {}, "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ=="], + + "brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "brorand": ["brorand@1.1.0", "", {}, "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w=="], + + "browser-stdout": ["browser-stdout@1.3.1", "", {}, "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="], + + "browserslist": ["browserslist@4.24.4", "", { "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" } }, "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A=="], + + "bser": ["bser@2.1.1", "", { "dependencies": { "node-int64": "^0.4.0" } }, "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ=="], + + "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + + "bun-types": ["bun-types@1.2.5", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="], + + "call-bind": ["call-bind@1.0.8", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.2" } }, "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww=="], + + "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], + + "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], + + "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], + + "camelcase": ["camelcase@6.3.0", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001713", "", {}, "sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q=="], + + "chai": ["chai@4.5.0", "", { "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.3", "deep-eql": "^4.1.3", "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", "type-detect": "^4.1.0" } }, "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw=="], + + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], + + "check-error": ["check-error@1.0.3", "", { "dependencies": { "get-func-name": "^2.0.2" } }, "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg=="], + + "check-types": ["check-types@11.2.3", "", {}, "sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg=="], + + "chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], + + "ci-info": ["ci-info@3.9.0", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="], + + "circom_runtime": ["circom_runtime@0.1.28", "", { "dependencies": { "ffjavascript": "0.3.1" }, "bin": { "calcwit": "calcwit.js" } }, "sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ=="], + + "circom_tester": ["circom_tester@0.0.20", "", { "dependencies": { "chai": "^4.3.6", "ffjavascript": "^0.2.60", "fnv-plus": "^1.3.1", "r1csfile": "^0.0.47", "snarkjs": "^0.7.0", "tmp-promise": "^3.0.3", "util": "^0.12.5" } }, "sha512-hhtqh3z1+/4RqhbAQxQTzekDvANFNd0M0+D8OdpxM1Ud4yQXoM+1n06AhJ7sULfCUD+LQrmnSjK5GD783KRSxg=="], + + "circomlib": ["circomlib@2.0.5", "", {}, "sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A=="], + + "circomlibjs": ["circomlibjs@0.1.7", "", { "dependencies": { "blake-hash": "^2.0.0", "blake2b": "^2.1.3", "ethers": "^5.5.1", "ffjavascript": "^0.2.45" } }, "sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg=="], + + "cjs-module-lexer": ["cjs-module-lexer@1.4.3", "", {}, "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q=="], + + "cliui": ["cliui@7.0.4", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ=="], + + "co": ["co@4.6.0", "", {}, "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ=="], + + "collect-v8-coverage": ["collect-v8-coverage@1.0.2", "", {}, "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="], + + "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "create-jest": ["create-jest@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-config": "^29.7.0", "jest-util": "^29.7.0", "prompts": "^2.0.1" }, "bin": { "create-jest": "bin/create-jest.js" } }, "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="], + + "decamelize": ["decamelize@4.0.0", "", {}, "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ=="], + + "dedent": ["dedent@1.5.3", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ=="], + + "deep-eql": ["deep-eql@4.1.4", "", { "dependencies": { "type-detect": "^4.0.0" } }, "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg=="], + + "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], + + "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + + "define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="], + + "detect-newline": ["detect-newline@3.1.0", "", {}, "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA=="], + + "diff": ["diff@5.2.0", "", {}, "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A=="], + + "diff-sequences": ["diff-sequences@29.6.3", "", {}, "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q=="], + + "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], + + "ejs": ["ejs@3.1.10", "", { "dependencies": { "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" } }, "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.137", "", {}, "sha512-/QSJaU2JyIuTbbABAo/crOs+SuAZLS+fVVS10PVrIT9hrRkmZl8Hb0xPSkKRUUWHQtYzXHpQUW3Dy5hwMzGZkA=="], + + "elliptic": ["elliptic@6.6.1", "", { "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", "hash.js": "^1.0.0", "hmac-drbg": "^1.0.1", "inherits": "^2.0.4", "minimalistic-assert": "^1.0.1", "minimalistic-crypto-utils": "^1.0.1" } }, "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g=="], + + "emittery": ["emittery@0.13.1", "", {}, "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ=="], + + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "error-ex": ["error-ex@1.3.2", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g=="], + + "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], + + "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], + + "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], + + "escodegen": ["escodegen@1.14.3", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^4.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw=="], + + "esprima": ["esprima@1.2.2", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A=="], + + "estraverse": ["estraverse@4.3.0", "", {}, "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="], + + "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], + + "ethers": ["ethers@5.8.0", "", { "dependencies": { "@ethersproject/abi": "5.8.0", "@ethersproject/abstract-provider": "5.8.0", "@ethersproject/abstract-signer": "5.8.0", "@ethersproject/address": "5.8.0", "@ethersproject/base64": "5.8.0", "@ethersproject/basex": "5.8.0", "@ethersproject/bignumber": "5.8.0", "@ethersproject/bytes": "5.8.0", "@ethersproject/constants": "5.8.0", "@ethersproject/contracts": "5.8.0", "@ethersproject/hash": "5.8.0", "@ethersproject/hdnode": "5.8.0", "@ethersproject/json-wallets": "5.8.0", "@ethersproject/keccak256": "5.8.0", "@ethersproject/logger": "5.8.0", "@ethersproject/networks": "5.8.0", "@ethersproject/pbkdf2": "5.8.0", "@ethersproject/properties": "5.8.0", "@ethersproject/providers": "5.8.0", "@ethersproject/random": "5.8.0", "@ethersproject/rlp": "5.8.0", "@ethersproject/sha2": "5.8.0", "@ethersproject/signing-key": "5.8.0", "@ethersproject/solidity": "5.8.0", "@ethersproject/strings": "5.8.0", "@ethersproject/transactions": "5.8.0", "@ethersproject/units": "5.8.0", "@ethersproject/wallet": "5.8.0", "@ethersproject/web": "5.8.0", "@ethersproject/wordlists": "5.8.0" } }, "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg=="], + + "execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], + + "exit": ["exit@0.1.2", "", {}, "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ=="], + + "expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], + + "fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="], + + "fast-levenshtein": ["fast-levenshtein@2.0.6", "", {}, "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="], + + "fastfile": ["fastfile@0.0.20", "", {}, "sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA=="], + + "fb-watchman": ["fb-watchman@2.0.2", "", { "dependencies": { "bser": "2.1.1" } }, "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA=="], + + "ffjavascript": ["ffjavascript@0.3.1", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "1.2.0" } }, "sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw=="], + + "filelist": ["filelist@1.0.4", "", { "dependencies": { "minimatch": "^5.0.1" } }, "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], + + "flat": ["flat@5.0.2", "", { "bin": { "flat": "cli.js" } }, "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="], + + "fnv-plus": ["fnv-plus@1.3.1", "", {}, "sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw=="], + + "for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="], + + "fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-func-name": ["get-func-name@2.0.2", "", {}, "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ=="], + + "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], + + "get-package-type": ["get-package-type@0.1.0", "", {}, "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q=="], + + "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], + + "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], + + "glob": ["glob@8.1.0", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", "once": "^1.3.0" } }, "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ=="], + + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="], + + "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "has-property-descriptors": ["has-property-descriptors@1.0.2", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="], + + "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], + + "has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="], + + "hash.js": ["hash.js@1.1.7", "", { "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="], + + "hmac-drbg": ["hmac-drbg@1.0.1", "", { "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg=="], + + "hoopy": ["hoopy@0.1.4", "", {}, "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ=="], + + "html-escaper": ["html-escaper@2.0.2", "", {}, "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg=="], + + "human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="], + + "import-local": ["import-local@3.2.0", "", { "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" }, "bin": { "import-local-fixture": "fixtures/cli.js" } }, "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA=="], + + "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="], + + "inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="], + + "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + + "is-arguments": ["is-arguments@1.2.0", "", { "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" } }, "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA=="], + + "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], + + "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + + "is-callable": ["is-callable@1.2.7", "", {}, "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-generator-fn": ["is-generator-fn@2.1.0", "", {}, "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ=="], + + "is-generator-function": ["is-generator-function@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "get-proto": "^1.0.0", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" } }, "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-plain-obj": ["is-plain-obj@2.1.0", "", {}, "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="], + + "is-regex": ["is-regex@1.2.1", "", { "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g=="], + + "is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "is-typed-array": ["is-typed-array@1.1.15", "", { "dependencies": { "which-typed-array": "^1.1.16" } }, "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ=="], + + "is-unicode-supported": ["is-unicode-supported@0.1.0", "", {}, "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "istanbul-lib-coverage": ["istanbul-lib-coverage@3.2.2", "", {}, "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg=="], + + "istanbul-lib-instrument": ["istanbul-lib-instrument@6.0.3", "", { "dependencies": { "@babel/core": "^7.23.9", "@babel/parser": "^7.23.9", "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", "semver": "^7.5.4" } }, "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q=="], + + "istanbul-lib-report": ["istanbul-lib-report@3.0.1", "", { "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw=="], + + "istanbul-lib-source-maps": ["istanbul-lib-source-maps@4.0.1", "", { "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" } }, "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw=="], + + "istanbul-reports": ["istanbul-reports@3.1.7", "", { "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g=="], + + "jake": ["jake@10.9.2", "", { "dependencies": { "async": "^3.2.3", "chalk": "^4.0.2", "filelist": "^1.0.4", "minimatch": "^3.1.2" }, "bin": { "jake": "bin/cli.js" } }, "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA=="], + + "jest": ["jest@29.7.0", "", { "dependencies": { "@jest/core": "^29.7.0", "@jest/types": "^29.6.3", "import-local": "^3.0.2", "jest-cli": "^29.7.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"], "bin": { "jest": "bin/jest.js" } }, "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw=="], + + "jest-changed-files": ["jest-changed-files@29.7.0", "", { "dependencies": { "execa": "^5.0.0", "jest-util": "^29.7.0", "p-limit": "^3.1.0" } }, "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w=="], + + "jest-circus": ["jest-circus@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/expect": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", "jest-each": "^29.7.0", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-runtime": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "p-limit": "^3.1.0", "pretty-format": "^29.7.0", "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw=="], + + "jest-cli": ["jest-cli@29.7.0", "", { "dependencies": { "@jest/core": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "chalk": "^4.0.0", "create-jest": "^29.7.0", "exit": "^0.1.2", "import-local": "^3.0.2", "jest-config": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "yargs": "^17.3.1" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" }, "optionalPeers": ["node-notifier"], "bin": { "jest": "bin/jest.js" } }, "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg=="], + + "jest-config": ["jest-config@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@jest/test-sequencer": "^29.7.0", "@jest/types": "^29.6.3", "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "jest-circus": "^29.7.0", "jest-environment-node": "^29.7.0", "jest-get-type": "^29.6.3", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-runner": "^29.7.0", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "peerDependencies": { "@types/node": "*", "ts-node": ">=9.0.0" }, "optionalPeers": ["@types/node", "ts-node"] }, "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ=="], + + "jest-diff": ["jest-diff@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "diff-sequences": "^29.6.3", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw=="], + + "jest-docblock": ["jest-docblock@29.7.0", "", { "dependencies": { "detect-newline": "^3.0.0" } }, "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g=="], + + "jest-each": ["jest-each@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "chalk": "^4.0.0", "jest-get-type": "^29.6.3", "jest-util": "^29.7.0", "pretty-format": "^29.7.0" } }, "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ=="], + + "jest-environment-node": ["jest-environment-node@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "jest-mock": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw=="], + + "jest-get-type": ["jest-get-type@29.6.3", "", {}, "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw=="], + + "jest-haste-map": ["jest-haste-map@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", "jest-worker": "^29.7.0", "micromatch": "^4.0.4", "walker": "^1.0.8" }, "optionalDependencies": { "fsevents": "^2.3.2" } }, "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA=="], + + "jest-leak-detector": ["jest-leak-detector@29.7.0", "", { "dependencies": { "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw=="], + + "jest-matcher-utils": ["jest-matcher-utils@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g=="], + + "jest-message-util": ["jest-message-util@29.7.0", "", { "dependencies": { "@babel/code-frame": "^7.12.13", "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w=="], + + "jest-mock": ["jest-mock@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "jest-util": "^29.7.0" } }, "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw=="], + + "jest-pnp-resolver": ["jest-pnp-resolver@1.2.3", "", { "peerDependencies": { "jest-resolve": "*" }, "optionalPeers": ["jest-resolve"] }, "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w=="], + + "jest-regex-util": ["jest-regex-util@29.6.3", "", {}, "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg=="], + + "jest-resolve": ["jest-resolve@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", "jest-util": "^29.7.0", "jest-validate": "^29.7.0", "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA=="], + + "jest-resolve-dependencies": ["jest-resolve-dependencies@29.7.0", "", { "dependencies": { "jest-regex-util": "^29.6.3", "jest-snapshot": "^29.7.0" } }, "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA=="], + + "jest-runner": ["jest-runner@29.7.0", "", { "dependencies": { "@jest/console": "^29.7.0", "@jest/environment": "^29.7.0", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.13.1", "graceful-fs": "^4.2.9", "jest-docblock": "^29.7.0", "jest-environment-node": "^29.7.0", "jest-haste-map": "^29.7.0", "jest-leak-detector": "^29.7.0", "jest-message-util": "^29.7.0", "jest-resolve": "^29.7.0", "jest-runtime": "^29.7.0", "jest-util": "^29.7.0", "jest-watcher": "^29.7.0", "jest-worker": "^29.7.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ=="], + + "jest-runtime": ["jest-runtime@29.7.0", "", { "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", "@jest/globals": "^29.7.0", "@jest/source-map": "^29.6.3", "@jest/test-result": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", "jest-haste-map": "^29.7.0", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", "jest-regex-util": "^29.6.3", "jest-resolve": "^29.7.0", "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ=="], + + "jest-snapshot": ["jest-snapshot@29.7.0", "", { "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/types": "^7.3.3", "@jest/expect-utils": "^29.7.0", "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", "expect": "^29.7.0", "graceful-fs": "^4.2.9", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0", "natural-compare": "^1.4.0", "pretty-format": "^29.7.0", "semver": "^7.5.3" } }, "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw=="], + + "jest-util": ["jest-util@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" } }, "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA=="], + + "jest-validate": ["jest-validate@29.7.0", "", { "dependencies": { "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.6.3", "leven": "^3.1.0", "pretty-format": "^29.7.0" } }, "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw=="], + + "jest-watcher": ["jest-watcher@29.7.0", "", { "dependencies": { "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "emittery": "^0.13.1", "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g=="], + + "jest-worker": ["jest-worker@29.7.0", "", { "dependencies": { "@types/node": "*", "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw=="], + + "js-sha3": ["js-sha3@0.8.0", "", {}, "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "json-parse-even-better-errors": ["json-parse-even-better-errors@2.3.1", "", {}, "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="], + + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + + "jsonpath": ["jsonpath@1.1.1", "", { "dependencies": { "esprima": "1.2.2", "static-eval": "2.0.2", "underscore": "1.12.1" } }, "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w=="], + + "kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + + "leven": ["leven@3.1.0", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="], + + "levn": ["levn@0.3.0", "", { "dependencies": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" } }, "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA=="], + + "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], + + "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], + + "log-symbols": ["log-symbols@4.1.0", "", { "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" } }, "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg=="], + + "logplease": ["logplease@1.2.15", "", {}, "sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA=="], + + "loupe": ["loupe@2.3.7", "", { "dependencies": { "get-func-name": "^2.0.1" } }, "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA=="], + + "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "make-dir": ["make-dir@4.0.0", "", { "dependencies": { "semver": "^7.5.3" } }, "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw=="], + + "makeerror": ["makeerror@1.0.12", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="], + + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], + + "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], + + "minimalistic-assert": ["minimalistic-assert@1.0.1", "", {}, "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="], + + "minimalistic-crypto-utils": ["minimalistic-crypto-utils@1.0.1", "", {}, "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg=="], + + "minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="], + + "mocha": ["mocha@10.8.2", "", { "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", "debug": "^4.3.5", "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^8.1.0", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^5.1.6", "ms": "^2.1.3", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", "workerpool": "^6.5.1", "yargs": "^16.2.0", "yargs-parser": "^20.2.9", "yargs-unparser": "^2.0.0" }, "bin": { "mocha": "bin/mocha.js", "_mocha": "bin/_mocha" } }, "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "nanoassert": ["nanoassert@2.0.0", "", {}, "sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA=="], + + "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], + + "node-addon-api": ["node-addon-api@3.2.1", "", {}, "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="], + + "node-gyp-build": ["node-gyp-build@4.8.4", "", { "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ=="], + + "node-int64": ["node-int64@0.4.0", "", {}, "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw=="], + + "node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + + "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], + + "optionator": ["optionator@0.8.3", "", { "dependencies": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", "word-wrap": "~1.2.3" } }, "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA=="], + + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + + "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + + "p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="], + + "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], + + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + + "path-is-absolute": ["path-is-absolute@1.0.1", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + + "pathval": ["pathval@1.1.1", "", {}, "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="], + + "pkg-dir": ["pkg-dir@4.2.0", "", { "dependencies": { "find-up": "^4.0.0" } }, "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ=="], + + "possible-typed-array-names": ["possible-typed-array-names@1.1.0", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="], + + "prelude-ls": ["prelude-ls@1.1.2", "", {}, "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w=="], + + "pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + + "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], + + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], + + "r1csfile": ["r1csfile@0.0.47", "", { "dependencies": { "@iden3/bigarray": "0.0.2", "@iden3/binfileutils": "0.0.11", "fastfile": "0.0.20", "ffjavascript": "0.2.60" } }, "sha512-oI4mAwuh1WwuFg95eJDNDDL8hCaZkwnPuNZrQdLBWvDoRU7EG+L/MOHL7SwPW2Y+ZuYcTLpj3rBkgllBQZN/JA=="], + + "randombytes": ["randombytes@2.1.0", "", { "dependencies": { "safe-buffer": "^5.1.0" } }, "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="], + + "react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], + + "readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="], + + "readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], + + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + + "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], + + "resolve-cwd": ["resolve-cwd@3.0.0", "", { "dependencies": { "resolve-from": "^5.0.0" } }, "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg=="], + + "resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], + + "resolve.exports": ["resolve.exports@2.0.3", "", {}, "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A=="], + + "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + + "safe-regex-test": ["safe-regex-test@1.1.0", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-regex": "^1.2.1" } }, "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw=="], + + "scrypt-js": ["scrypt-js@3.0.1", "", {}, "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA=="], + + "semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="], + + "serialize-javascript": ["serialize-javascript@6.0.2", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g=="], + + "set-function-length": ["set-function-length@1.2.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + + "slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="], + + "snarkjs": ["snarkjs@0.7.5", "", { "dependencies": { "@iden3/binfileutils": "0.0.12", "bfj": "^7.0.2", "blake2b-wasm": "^2.4.0", "circom_runtime": "0.1.28", "ejs": "^3.1.6", "fastfile": "0.0.20", "ffjavascript": "0.3.1", "js-sha3": "^0.8.0", "logplease": "^1.2.15", "r1csfile": "0.0.48" }, "bin": { "snarkjs": "build/cli.cjs" } }, "sha512-h+3c4rXZKLhLuHk4LHydZCk/h5GcNvk5GjVKRRkHmfb6Ntf8gHOA9zea3g656iclRuhqQ3iKDWFgiD9ypLrKiA=="], + + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "source-map-support": ["source-map-support@0.5.13", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w=="], + + "sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="], + + "stack-utils": ["stack-utils@2.0.6", "", { "dependencies": { "escape-string-regexp": "^2.0.0" } }, "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ=="], + + "static-eval": ["static-eval@2.0.2", "", { "dependencies": { "escodegen": "^1.8.1" } }, "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg=="], + + "string-length": ["string-length@4.0.2", "", { "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" } }, "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ=="], + + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="], + + "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "strip-bom": ["strip-bom@4.0.0", "", {}, "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w=="], + + "strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], + + "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + + "supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + + "test-exclude": ["test-exclude@6.0.0", "", { "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" } }, "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w=="], + + "tmp": ["tmp@0.2.3", "", {}, "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w=="], + + "tmp-promise": ["tmp-promise@3.0.3", "", { "dependencies": { "tmp": "^0.2.0" } }, "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ=="], + + "tmpl": ["tmpl@1.0.5", "", {}, "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "tryer": ["tryer@1.0.1", "", {}, "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA=="], + + "type-check": ["type-check@0.3.2", "", { "dependencies": { "prelude-ls": "~1.1.2" } }, "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg=="], + + "type-detect": ["type-detect@4.1.0", "", {}, "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw=="], + + "type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="], + + "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], + + "underscore": ["underscore@1.12.1", "", {}, "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw=="], + + "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], + + "update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], + + "util": ["util@0.12.5", "", { "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", "is-generator-function": "^1.0.7", "is-typed-array": "^1.1.3", "which-typed-array": "^1.1.2" } }, "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA=="], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + + "v8-to-istanbul": ["v8-to-istanbul@9.3.0", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^2.0.0" } }, "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA=="], + + "walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="], + + "wasmbuilder": ["wasmbuilder@0.0.16", "", {}, "sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA=="], + + "wasmcurves": ["wasmcurves@0.2.2", "", { "dependencies": { "wasmbuilder": "0.0.16" } }, "sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ=="], + + "web-worker": ["web-worker@1.2.0", "", {}, "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "which-typed-array": ["which-typed-array@1.1.19", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.4", "for-each": "^0.3.5", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" } }, "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw=="], + + "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], + + "workerpool": ["workerpool@6.5.1", "", {}, "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA=="], + + "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + + "write-file-atomic": ["write-file-atomic@4.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" } }, "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg=="], + + "ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yargs": ["yargs@16.2.0", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="], + + "yargs-parser": ["yargs-parser@20.2.9", "", {}, "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="], + + "yargs-unparser": ["yargs-unparser@2.0.0", "", { "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" } }, "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA=="], + + "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + + "@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "@iden3/binfileutils/ffjavascript": ["ffjavascript@0.2.63", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "1.2.0" } }, "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A=="], + + "@istanbuljs/load-nyc-config/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], + + "@istanbuljs/load-nyc-config/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], + + "@istanbuljs/load-nyc-config/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="], + + "@jest/reporters/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + + "@sinonjs/commons/type-detect": ["type-detect@4.0.8", "", {}, "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="], + + "babel-plugin-istanbul/istanbul-lib-instrument": ["istanbul-lib-instrument@5.2.1", "", { "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" } }, "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg=="], + + "chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "chalk/supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "circom_tester/ffjavascript": ["ffjavascript@0.2.63", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "1.2.0" } }, "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A=="], + + "circomlibjs/ffjavascript": ["ffjavascript@0.2.63", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "1.2.0" } }, "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A=="], + + "elliptic/bn.js": ["bn.js@4.12.1", "", {}, "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg=="], + + "escodegen/esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + + "istanbul-lib-report/supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "jake/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "jest-cli/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], + + "jest-config/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + + "jest-runtime/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + + "pkg-dir/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], + + "r1csfile/ffjavascript": ["ffjavascript@0.2.60", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "^1.2.0" } }, "sha512-T/9bnEL5xAZRDbQoEMf+pM9nrhK+C3JyZNmqiWub26EQorW7Jt+jR54gpqDhceA4Nj0YctPQwYnl8xa52/A26A=="], + + "snarkjs/@iden3/binfileutils": ["@iden3/binfileutils@0.0.12", "", { "dependencies": { "fastfile": "0.0.20", "ffjavascript": "^0.3.0" } }, "sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ=="], + + "snarkjs/r1csfile": ["r1csfile@0.0.48", "", { "dependencies": { "@iden3/bigarray": "0.0.2", "@iden3/binfileutils": "0.0.12", "fastfile": "0.0.20", "ffjavascript": "0.3.0" } }, "sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw=="], + + "stack-utils/escape-string-regexp": ["escape-string-regexp@2.0.0", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="], + + "test-exclude/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + + "test-exclude/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "wrap-ansi/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "@istanbuljs/load-nyc-config/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], + + "@istanbuljs/load-nyc-config/js-yaml/argparse": ["argparse@1.0.10", "", { "dependencies": { "sprintf-js": "~1.0.2" } }, "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="], + + "@istanbuljs/load-nyc-config/js-yaml/esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + + "@jest/reporters/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "babel-plugin-istanbul/istanbul-lib-instrument/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "jake/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "jest-cli/yargs/cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="], + + "jest-cli/yargs/yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], + + "jest-config/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "jest-runtime/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="], + + "pkg-dir/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], + + "snarkjs/r1csfile/ffjavascript": ["ffjavascript@0.3.0", "", { "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", "web-worker": "1.2.0" } }, "sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ=="], + + "test-exclude/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "@istanbuljs/load-nyc-config/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="], + + "@jest/reporters/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "jest-config/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "jest-runtime/glob/minimatch/brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="], + + "pkg-dir/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="], + + "@istanbuljs/load-nyc-config/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="], + + "pkg-dir/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="], + } +} diff --git a/circom/circuits/common/body_hash_graph.json b/circom/circuits/common/body_hash_graph.json new file mode 100644 index 00000000..51260a04 --- /dev/null +++ b/circom/circuits/common/body_hash_graph.json @@ -0,0 +1,3060 @@ +{ + "regex": "(?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+bh=([a-zA-Z0-9+/=]+);", + "nodes": [ + { + "state_id": 0, + "byte_transitions": { + "13": [ + 2 + ], + "100": [ + 4 + ] + }, + "capture_groups": { + "2": [], + "4": [] + } + }, + { + "state_id": 1, + "byte_transitions": { + "13": [ + 2 + ] + }, + "capture_groups": { + "2": [] + } + }, + { + "state_id": 2, + "byte_transitions": { + "10": [ + 3 + ] + }, + "capture_groups": { + "3": [] + } + }, + { + "state_id": 3, + "byte_transitions": { + "100": [ + 4 + ] + }, + "capture_groups": { + "4": [] + } + }, + { + "state_id": 4, + "byte_transitions": { + "107": [ + 5 + ] + }, + "capture_groups": { + "5": [] + } + }, + { + "state_id": 5, + "byte_transitions": { + "105": [ + 6 + ] + }, + "capture_groups": { + "6": [] + } + }, + { + "state_id": 6, + "byte_transitions": { + "109": [ + 7 + ] + }, + "capture_groups": { + "7": [] + } + }, + { + "state_id": 7, + "byte_transitions": { + "45": [ + 8 + ] + }, + "capture_groups": { + "8": [] + } + }, + { + "state_id": 8, + "byte_transitions": { + "115": [ + 9 + ] + }, + "capture_groups": { + "9": [] + } + }, + { + "state_id": 9, + "byte_transitions": { + "105": [ + 10 + ] + }, + "capture_groups": { + "10": [] + } + }, + { + "state_id": 10, + "byte_transitions": { + "103": [ + 11 + ] + }, + "capture_groups": { + "11": [] + } + }, + { + "state_id": 11, + "byte_transitions": { + "110": [ + 12 + ] + }, + "capture_groups": { + "12": [] + } + }, + { + "state_id": 12, + "byte_transitions": { + "97": [ + 13 + ] + }, + "capture_groups": { + "13": [] + } + }, + { + "state_id": 13, + "byte_transitions": { + "116": [ + 14 + ] + }, + "capture_groups": { + "14": [] + } + }, + { + "state_id": 14, + "byte_transitions": { + "117": [ + 15 + ] + }, + "capture_groups": { + "15": [] + } + }, + { + "state_id": 15, + "byte_transitions": { + "114": [ + 16 + ] + }, + "capture_groups": { + "16": [] + } + }, + { + "state_id": 16, + "byte_transitions": { + "101": [ + 17 + ] + }, + "capture_groups": { + "17": [] + } + }, + { + "state_id": 17, + "byte_transitions": { + "58": [ + 18 + ] + }, + "capture_groups": { + "18": [] + } + }, + { + "state_id": 18, + "byte_transitions": { + "97": [ + 19 + ], + "98": [ + 19 + ], + "99": [ + 19 + ], + "100": [ + 19 + ], + "101": [ + 19 + ], + "102": [ + 19 + ], + "103": [ + 19 + ], + "104": [ + 19 + ], + "105": [ + 19 + ], + "106": [ + 19 + ], + "107": [ + 19 + ], + "108": [ + 19 + ], + "109": [ + 19 + ], + "110": [ + 19 + ], + "111": [ + 19 + ], + "112": [ + 19 + ], + "113": [ + 19 + ], + "114": [ + 19 + ], + "115": [ + 19 + ], + "116": [ + 19 + ], + "117": [ + 19 + ], + "118": [ + 19 + ], + "119": [ + 19 + ], + "120": [ + 19 + ], + "121": [ + 19 + ], + "122": [ + 19 + ] + }, + "capture_groups": { + "19": [] + } + }, + { + "state_id": 19, + "byte_transitions": { + "61": [ + 27 + ], + "97": [ + 19 + ], + "98": [ + 19 + ], + "99": [ + 19 + ], + "100": [ + 19 + ], + "101": [ + 19 + ], + "102": [ + 19 + ], + "103": [ + 19 + ], + "104": [ + 19 + ], + "105": [ + 19 + ], + "106": [ + 19 + ], + "107": [ + 19 + ], + "108": [ + 19 + ], + "109": [ + 19 + ], + "110": [ + 19 + ], + "111": [ + 19 + ], + "112": [ + 19 + ], + "113": [ + 19 + ], + "114": [ + 19 + ], + "115": [ + 19 + ], + "116": [ + 19 + ], + "117": [ + 19 + ], + "118": [ + 19 + ], + "119": [ + 19 + ], + "120": [ + 19 + ], + "121": [ + 19 + ], + "122": [ + 19 + ] + }, + "capture_groups": { + "19": [], + "27": [] + } + }, + { + "state_id": 20, + "byte_transitions": { + "128": [ + 28 + ], + "129": [ + 28 + ], + "130": [ + 28 + ], + "131": [ + 28 + ], + "132": [ + 28 + ], + "133": [ + 28 + ], + "134": [ + 28 + ], + "135": [ + 28 + ], + "136": [ + 28 + ], + "137": [ + 28 + ], + "138": [ + 28 + ], + "139": [ + 28 + ], + "140": [ + 28 + ], + "141": [ + 28 + ], + "142": [ + 28 + ], + "143": [ + 28 + ], + "144": [ + 28 + ], + "145": [ + 28 + ], + "146": [ + 28 + ], + "147": [ + 28 + ], + "148": [ + 28 + ], + "149": [ + 28 + ], + "150": [ + 28 + ], + "151": [ + 28 + ], + "152": [ + 28 + ], + "153": [ + 28 + ], + "154": [ + 28 + ], + "155": [ + 28 + ], + "156": [ + 28 + ], + "157": [ + 28 + ], + "158": [ + 28 + ], + "159": [ + 28 + ], + "160": [ + 28 + ], + "161": [ + 28 + ], + "162": [ + 28 + ], + "163": [ + 28 + ], + "164": [ + 28 + ], + "165": [ + 28 + ], + "166": [ + 28 + ], + "167": [ + 28 + ], + "168": [ + 28 + ], + "169": [ + 28 + ], + "170": [ + 28 + ], + "171": [ + 28 + ], + "172": [ + 28 + ], + "173": [ + 28 + ], + "174": [ + 28 + ], + "175": [ + 28 + ], + "176": [ + 28 + ], + "177": [ + 28 + ], + "178": [ + 28 + ], + "179": [ + 28 + ], + "180": [ + 28 + ], + "181": [ + 28 + ], + "182": [ + 28 + ], + "183": [ + 28 + ], + "184": [ + 28 + ], + "185": [ + 28 + ], + "186": [ + 28 + ], + "187": [ + 28 + ], + "188": [ + 28 + ], + "189": [ + 28 + ], + "190": [ + 28 + ], + "191": [ + 28 + ] + }, + "capture_groups": { + "28": [] + } + }, + { + "state_id": 21, + "byte_transitions": { + "160": [ + 20 + ], + "161": [ + 20 + ], + "162": [ + 20 + ], + "163": [ + 20 + ], + "164": [ + 20 + ], + "165": [ + 20 + ], + "166": [ + 20 + ], + "167": [ + 20 + ], + "168": [ + 20 + ], + "169": [ + 20 + ], + "170": [ + 20 + ], + "171": [ + 20 + ], + "172": [ + 20 + ], + "173": [ + 20 + ], + "174": [ + 20 + ], + "175": [ + 20 + ], + "176": [ + 20 + ], + "177": [ + 20 + ], + "178": [ + 20 + ], + "179": [ + 20 + ], + "180": [ + 20 + ], + "181": [ + 20 + ], + "182": [ + 20 + ], + "183": [ + 20 + ], + "184": [ + 20 + ], + "185": [ + 20 + ], + "186": [ + 20 + ], + "187": [ + 20 + ], + "188": [ + 20 + ], + "189": [ + 20 + ], + "190": [ + 20 + ], + "191": [ + 20 + ] + }, + "capture_groups": { + "20": [] + } + }, + { + "state_id": 22, + "byte_transitions": { + "128": [ + 20 + ], + "129": [ + 20 + ], + "130": [ + 20 + ], + "131": [ + 20 + ], + "132": [ + 20 + ], + "133": [ + 20 + ], + "134": [ + 20 + ], + "135": [ + 20 + ], + "136": [ + 20 + ], + "137": [ + 20 + ], + "138": [ + 20 + ], + "139": [ + 20 + ], + "140": [ + 20 + ], + "141": [ + 20 + ], + "142": [ + 20 + ], + "143": [ + 20 + ], + "144": [ + 20 + ], + "145": [ + 20 + ], + "146": [ + 20 + ], + "147": [ + 20 + ], + "148": [ + 20 + ], + "149": [ + 20 + ], + "150": [ + 20 + ], + "151": [ + 20 + ], + "152": [ + 20 + ], + "153": [ + 20 + ], + "154": [ + 20 + ], + "155": [ + 20 + ], + "156": [ + 20 + ], + "157": [ + 20 + ], + "158": [ + 20 + ], + "159": [ + 20 + ], + "160": [ + 20 + ], + "161": [ + 20 + ], + "162": [ + 20 + ], + "163": [ + 20 + ], + "164": [ + 20 + ], + "165": [ + 20 + ], + "166": [ + 20 + ], + "167": [ + 20 + ], + "168": [ + 20 + ], + "169": [ + 20 + ], + "170": [ + 20 + ], + "171": [ + 20 + ], + "172": [ + 20 + ], + "173": [ + 20 + ], + "174": [ + 20 + ], + "175": [ + 20 + ], + "176": [ + 20 + ], + "177": [ + 20 + ], + "178": [ + 20 + ], + "179": [ + 20 + ], + "180": [ + 20 + ], + "181": [ + 20 + ], + "182": [ + 20 + ], + "183": [ + 20 + ], + "184": [ + 20 + ], + "185": [ + 20 + ], + "186": [ + 20 + ], + "187": [ + 20 + ], + "188": [ + 20 + ], + "189": [ + 20 + ], + "190": [ + 20 + ], + "191": [ + 20 + ] + }, + "capture_groups": { + "20": [] + } + }, + { + "state_id": 23, + "byte_transitions": { + "128": [ + 20 + ], + "129": [ + 20 + ], + "130": [ + 20 + ], + "131": [ + 20 + ], + "132": [ + 20 + ], + "133": [ + 20 + ], + "134": [ + 20 + ], + "135": [ + 20 + ], + "136": [ + 20 + ], + "137": [ + 20 + ], + "138": [ + 20 + ], + "139": [ + 20 + ], + "140": [ + 20 + ], + "141": [ + 20 + ], + "142": [ + 20 + ], + "143": [ + 20 + ], + "144": [ + 20 + ], + "145": [ + 20 + ], + "146": [ + 20 + ], + "147": [ + 20 + ], + "148": [ + 20 + ], + "149": [ + 20 + ], + "150": [ + 20 + ], + "151": [ + 20 + ], + "152": [ + 20 + ], + "153": [ + 20 + ], + "154": [ + 20 + ], + "155": [ + 20 + ], + "156": [ + 20 + ], + "157": [ + 20 + ], + "158": [ + 20 + ], + "159": [ + 20 + ] + }, + "capture_groups": { + "20": [] + } + }, + { + "state_id": 24, + "byte_transitions": { + "144": [ + 22 + ], + "145": [ + 22 + ], + "146": [ + 22 + ], + "147": [ + 22 + ], + "148": [ + 22 + ], + "149": [ + 22 + ], + "150": [ + 22 + ], + "151": [ + 22 + ], + "152": [ + 22 + ], + "153": [ + 22 + ], + "154": [ + 22 + ], + "155": [ + 22 + ], + "156": [ + 22 + ], + "157": [ + 22 + ], + "158": [ + 22 + ], + "159": [ + 22 + ], + "160": [ + 22 + ], + "161": [ + 22 + ], + "162": [ + 22 + ], + "163": [ + 22 + ], + "164": [ + 22 + ], + "165": [ + 22 + ], + "166": [ + 22 + ], + "167": [ + 22 + ], + "168": [ + 22 + ], + "169": [ + 22 + ], + "170": [ + 22 + ], + "171": [ + 22 + ], + "172": [ + 22 + ], + "173": [ + 22 + ], + "174": [ + 22 + ], + "175": [ + 22 + ], + "176": [ + 22 + ], + "177": [ + 22 + ], + "178": [ + 22 + ], + "179": [ + 22 + ], + "180": [ + 22 + ], + "181": [ + 22 + ], + "182": [ + 22 + ], + "183": [ + 22 + ], + "184": [ + 22 + ], + "185": [ + 22 + ], + "186": [ + 22 + ], + "187": [ + 22 + ], + "188": [ + 22 + ], + "189": [ + 22 + ], + "190": [ + 22 + ], + "191": [ + 22 + ] + }, + "capture_groups": { + "22": [] + } + }, + { + "state_id": 25, + "byte_transitions": { + "128": [ + 22 + ], + "129": [ + 22 + ], + "130": [ + 22 + ], + "131": [ + 22 + ], + "132": [ + 22 + ], + "133": [ + 22 + ], + "134": [ + 22 + ], + "135": [ + 22 + ], + "136": [ + 22 + ], + "137": [ + 22 + ], + "138": [ + 22 + ], + "139": [ + 22 + ], + "140": [ + 22 + ], + "141": [ + 22 + ], + "142": [ + 22 + ], + "143": [ + 22 + ], + "144": [ + 22 + ], + "145": [ + 22 + ], + "146": [ + 22 + ], + "147": [ + 22 + ], + "148": [ + 22 + ], + "149": [ + 22 + ], + "150": [ + 22 + ], + "151": [ + 22 + ], + "152": [ + 22 + ], + "153": [ + 22 + ], + "154": [ + 22 + ], + "155": [ + 22 + ], + "156": [ + 22 + ], + "157": [ + 22 + ], + "158": [ + 22 + ], + "159": [ + 22 + ], + "160": [ + 22 + ], + "161": [ + 22 + ], + "162": [ + 22 + ], + "163": [ + 22 + ], + "164": [ + 22 + ], + "165": [ + 22 + ], + "166": [ + 22 + ], + "167": [ + 22 + ], + "168": [ + 22 + ], + "169": [ + 22 + ], + "170": [ + 22 + ], + "171": [ + 22 + ], + "172": [ + 22 + ], + "173": [ + 22 + ], + "174": [ + 22 + ], + "175": [ + 22 + ], + "176": [ + 22 + ], + "177": [ + 22 + ], + "178": [ + 22 + ], + "179": [ + 22 + ], + "180": [ + 22 + ], + "181": [ + 22 + ], + "182": [ + 22 + ], + "183": [ + 22 + ], + "184": [ + 22 + ], + "185": [ + 22 + ], + "186": [ + 22 + ], + "187": [ + 22 + ], + "188": [ + 22 + ], + "189": [ + 22 + ], + "190": [ + 22 + ], + "191": [ + 22 + ] + }, + "capture_groups": { + "22": [] + } + }, + { + "state_id": 26, + "byte_transitions": { + "128": [ + 22 + ], + "129": [ + 22 + ], + "130": [ + 22 + ], + "131": [ + 22 + ], + "132": [ + 22 + ], + "133": [ + 22 + ], + "134": [ + 22 + ], + "135": [ + 22 + ], + "136": [ + 22 + ], + "137": [ + 22 + ], + "138": [ + 22 + ], + "139": [ + 22 + ], + "140": [ + 22 + ], + "141": [ + 22 + ], + "142": [ + 22 + ], + "143": [ + 22 + ] + }, + "capture_groups": { + "22": [] + } + }, + { + "state_id": 27, + "byte_transitions": { + "0": [ + 28 + ], + "1": [ + 28 + ], + "2": [ + 28 + ], + "3": [ + 28 + ], + "4": [ + 28 + ], + "5": [ + 28 + ], + "6": [ + 28 + ], + "7": [ + 28 + ], + "8": [ + 28 + ], + "9": [ + 28 + ], + "10": [ + 28 + ], + "11": [ + 28 + ], + "12": [ + 28 + ], + "13": [ + 28 + ], + "14": [ + 28 + ], + "15": [ + 28 + ], + "16": [ + 28 + ], + "17": [ + 28 + ], + "18": [ + 28 + ], + "19": [ + 28 + ], + "20": [ + 28 + ], + "21": [ + 28 + ], + "22": [ + 28 + ], + "23": [ + 28 + ], + "24": [ + 28 + ], + "25": [ + 28 + ], + "26": [ + 28 + ], + "27": [ + 28 + ], + "28": [ + 28 + ], + "29": [ + 28 + ], + "30": [ + 28 + ], + "31": [ + 28 + ], + "32": [ + 28 + ], + "33": [ + 28 + ], + "34": [ + 28 + ], + "35": [ + 28 + ], + "36": [ + 28 + ], + "37": [ + 28 + ], + "38": [ + 28 + ], + "39": [ + 28 + ], + "40": [ + 28 + ], + "41": [ + 28 + ], + "42": [ + 28 + ], + "43": [ + 28 + ], + "44": [ + 28 + ], + "45": [ + 28 + ], + "46": [ + 28 + ], + "47": [ + 28 + ], + "48": [ + 28 + ], + "49": [ + 28 + ], + "50": [ + 28 + ], + "51": [ + 28 + ], + "52": [ + 28 + ], + "53": [ + 28 + ], + "54": [ + 28 + ], + "55": [ + 28 + ], + "56": [ + 28 + ], + "57": [ + 28 + ], + "58": [ + 28 + ], + "60": [ + 28 + ], + "61": [ + 28 + ], + "62": [ + 28 + ], + "63": [ + 28 + ], + "64": [ + 28 + ], + "65": [ + 28 + ], + "66": [ + 28 + ], + "67": [ + 28 + ], + "68": [ + 28 + ], + "69": [ + 28 + ], + "70": [ + 28 + ], + "71": [ + 28 + ], + "72": [ + 28 + ], + "73": [ + 28 + ], + "74": [ + 28 + ], + "75": [ + 28 + ], + "76": [ + 28 + ], + "77": [ + 28 + ], + "78": [ + 28 + ], + "79": [ + 28 + ], + "80": [ + 28 + ], + "81": [ + 28 + ], + "82": [ + 28 + ], + "83": [ + 28 + ], + "84": [ + 28 + ], + "85": [ + 28 + ], + "86": [ + 28 + ], + "87": [ + 28 + ], + "88": [ + 28 + ], + "89": [ + 28 + ], + "90": [ + 28 + ], + "91": [ + 28 + ], + "92": [ + 28 + ], + "93": [ + 28 + ], + "94": [ + 28 + ], + "95": [ + 28 + ], + "96": [ + 28 + ], + "97": [ + 28 + ], + "98": [ + 28 + ], + "99": [ + 28 + ], + "100": [ + 28 + ], + "101": [ + 28 + ], + "102": [ + 28 + ], + "103": [ + 28 + ], + "104": [ + 28 + ], + "105": [ + 28 + ], + "106": [ + 28 + ], + "107": [ + 28 + ], + "108": [ + 28 + ], + "109": [ + 28 + ], + "110": [ + 28 + ], + "111": [ + 28 + ], + "112": [ + 28 + ], + "113": [ + 28 + ], + "114": [ + 28 + ], + "115": [ + 28 + ], + "116": [ + 28 + ], + "117": [ + 28 + ], + "118": [ + 28 + ], + "119": [ + 28 + ], + "120": [ + 28 + ], + "121": [ + 28 + ], + "122": [ + 28 + ], + "123": [ + 28 + ], + "124": [ + 28 + ], + "125": [ + 28 + ], + "126": [ + 28 + ], + "127": [ + 28 + ], + "194": [ + 20 + ], + "195": [ + 20 + ], + "196": [ + 20 + ], + "197": [ + 20 + ], + "198": [ + 20 + ], + "199": [ + 20 + ], + "200": [ + 20 + ], + "201": [ + 20 + ], + "202": [ + 20 + ], + "203": [ + 20 + ], + "204": [ + 20 + ], + "205": [ + 20 + ], + "206": [ + 20 + ], + "207": [ + 20 + ], + "208": [ + 20 + ], + "209": [ + 20 + ], + "210": [ + 20 + ], + "211": [ + 20 + ], + "212": [ + 20 + ], + "213": [ + 20 + ], + "214": [ + 20 + ], + "215": [ + 20 + ], + "216": [ + 20 + ], + "217": [ + 20 + ], + "218": [ + 20 + ], + "219": [ + 20 + ], + "220": [ + 20 + ], + "221": [ + 20 + ], + "222": [ + 20 + ], + "223": [ + 20 + ], + "224": [ + 21 + ], + "225": [ + 22 + ], + "226": [ + 22 + ], + "227": [ + 22 + ], + "228": [ + 22 + ], + "229": [ + 22 + ], + "230": [ + 22 + ], + "231": [ + 22 + ], + "232": [ + 22 + ], + "233": [ + 22 + ], + "234": [ + 22 + ], + "235": [ + 22 + ], + "236": [ + 22 + ], + "237": [ + 23 + ], + "238": [ + 22 + ], + "239": [ + 22 + ], + "240": [ + 24 + ], + "241": [ + 25 + ], + "242": [ + 25 + ], + "243": [ + 25 + ], + "244": [ + 26 + ] + }, + "capture_groups": { + "20": [], + "21": [], + "22": [], + "23": [], + "24": [], + "25": [], + "26": [], + "28": [] + } + }, + { + "state_id": 28, + "byte_transitions": { + "0": [ + 28 + ], + "1": [ + 28 + ], + "2": [ + 28 + ], + "3": [ + 28 + ], + "4": [ + 28 + ], + "5": [ + 28 + ], + "6": [ + 28 + ], + "7": [ + 28 + ], + "8": [ + 28 + ], + "9": [ + 28 + ], + "10": [ + 28 + ], + "11": [ + 28 + ], + "12": [ + 28 + ], + "13": [ + 28 + ], + "14": [ + 28 + ], + "15": [ + 28 + ], + "16": [ + 28 + ], + "17": [ + 28 + ], + "18": [ + 28 + ], + "19": [ + 28 + ], + "20": [ + 28 + ], + "21": [ + 28 + ], + "22": [ + 28 + ], + "23": [ + 28 + ], + "24": [ + 28 + ], + "25": [ + 28 + ], + "26": [ + 28 + ], + "27": [ + 28 + ], + "28": [ + 28 + ], + "29": [ + 28 + ], + "30": [ + 28 + ], + "31": [ + 28 + ], + "32": [ + 28 + ], + "33": [ + 28 + ], + "34": [ + 28 + ], + "35": [ + 28 + ], + "36": [ + 28 + ], + "37": [ + 28 + ], + "38": [ + 28 + ], + "39": [ + 28 + ], + "40": [ + 28 + ], + "41": [ + 28 + ], + "42": [ + 28 + ], + "43": [ + 28 + ], + "44": [ + 28 + ], + "45": [ + 28 + ], + "46": [ + 28 + ], + "47": [ + 28 + ], + "48": [ + 28 + ], + "49": [ + 28 + ], + "50": [ + 28 + ], + "51": [ + 28 + ], + "52": [ + 28 + ], + "53": [ + 28 + ], + "54": [ + 28 + ], + "55": [ + 28 + ], + "56": [ + 28 + ], + "57": [ + 28 + ], + "58": [ + 28 + ], + "59": [ + 29 + ], + "60": [ + 28 + ], + "61": [ + 28 + ], + "62": [ + 28 + ], + "63": [ + 28 + ], + "64": [ + 28 + ], + "65": [ + 28 + ], + "66": [ + 28 + ], + "67": [ + 28 + ], + "68": [ + 28 + ], + "69": [ + 28 + ], + "70": [ + 28 + ], + "71": [ + 28 + ], + "72": [ + 28 + ], + "73": [ + 28 + ], + "74": [ + 28 + ], + "75": [ + 28 + ], + "76": [ + 28 + ], + "77": [ + 28 + ], + "78": [ + 28 + ], + "79": [ + 28 + ], + "80": [ + 28 + ], + "81": [ + 28 + ], + "82": [ + 28 + ], + "83": [ + 28 + ], + "84": [ + 28 + ], + "85": [ + 28 + ], + "86": [ + 28 + ], + "87": [ + 28 + ], + "88": [ + 28 + ], + "89": [ + 28 + ], + "90": [ + 28 + ], + "91": [ + 28 + ], + "92": [ + 28 + ], + "93": [ + 28 + ], + "94": [ + 28 + ], + "95": [ + 28 + ], + "96": [ + 28 + ], + "97": [ + 28 + ], + "98": [ + 28 + ], + "99": [ + 28 + ], + "100": [ + 28 + ], + "101": [ + 28 + ], + "102": [ + 28 + ], + "103": [ + 28 + ], + "104": [ + 28 + ], + "105": [ + 28 + ], + "106": [ + 28 + ], + "107": [ + 28 + ], + "108": [ + 28 + ], + "109": [ + 28 + ], + "110": [ + 28 + ], + "111": [ + 28 + ], + "112": [ + 28 + ], + "113": [ + 28 + ], + "114": [ + 28 + ], + "115": [ + 28 + ], + "116": [ + 28 + ], + "117": [ + 28 + ], + "118": [ + 28 + ], + "119": [ + 28 + ], + "120": [ + 28 + ], + "121": [ + 28 + ], + "122": [ + 28 + ], + "123": [ + 28 + ], + "124": [ + 28 + ], + "125": [ + 28 + ], + "126": [ + 28 + ], + "127": [ + 28 + ], + "194": [ + 20 + ], + "195": [ + 20 + ], + "196": [ + 20 + ], + "197": [ + 20 + ], + "198": [ + 20 + ], + "199": [ + 20 + ], + "200": [ + 20 + ], + "201": [ + 20 + ], + "202": [ + 20 + ], + "203": [ + 20 + ], + "204": [ + 20 + ], + "205": [ + 20 + ], + "206": [ + 20 + ], + "207": [ + 20 + ], + "208": [ + 20 + ], + "209": [ + 20 + ], + "210": [ + 20 + ], + "211": [ + 20 + ], + "212": [ + 20 + ], + "213": [ + 20 + ], + "214": [ + 20 + ], + "215": [ + 20 + ], + "216": [ + 20 + ], + "217": [ + 20 + ], + "218": [ + 20 + ], + "219": [ + 20 + ], + "220": [ + 20 + ], + "221": [ + 20 + ], + "222": [ + 20 + ], + "223": [ + 20 + ], + "224": [ + 21 + ], + "225": [ + 22 + ], + "226": [ + 22 + ], + "227": [ + 22 + ], + "228": [ + 22 + ], + "229": [ + 22 + ], + "230": [ + 22 + ], + "231": [ + 22 + ], + "232": [ + 22 + ], + "233": [ + 22 + ], + "234": [ + 22 + ], + "235": [ + 22 + ], + "236": [ + 22 + ], + "237": [ + 23 + ], + "238": [ + 22 + ], + "239": [ + 22 + ], + "240": [ + 24 + ], + "241": [ + 25 + ], + "242": [ + 25 + ], + "243": [ + 25 + ], + "244": [ + 26 + ] + }, + "capture_groups": { + "20": [], + "21": [], + "22": [], + "23": [], + "24": [], + "25": [], + "26": [], + "28": [], + "29": [] + } + }, + { + "state_id": 29, + "byte_transitions": { + "32": [ + 30 + ] + }, + "capture_groups": { + "30": [] + } + }, + { + "state_id": 30, + "byte_transitions": { + "97": [ + 19 + ], + "98": [ + 19, + 31 + ], + "99": [ + 19 + ], + "100": [ + 19 + ], + "101": [ + 19 + ], + "102": [ + 19 + ], + "103": [ + 19 + ], + "104": [ + 19 + ], + "105": [ + 19 + ], + "106": [ + 19 + ], + "107": [ + 19 + ], + "108": [ + 19 + ], + "109": [ + 19 + ], + "110": [ + 19 + ], + "111": [ + 19 + ], + "112": [ + 19 + ], + "113": [ + 19 + ], + "114": [ + 19 + ], + "115": [ + 19 + ], + "116": [ + 19 + ], + "117": [ + 19 + ], + "118": [ + 19 + ], + "119": [ + 19 + ], + "120": [ + 19 + ], + "121": [ + 19 + ], + "122": [ + 19 + ] + }, + "capture_groups": { + "19": [], + "31": [] + } + }, + { + "state_id": 31, + "byte_transitions": { + "104": [ + 32 + ] + }, + "capture_groups": { + "32": [] + } + }, + { + "state_id": 32, + "byte_transitions": { + "61": [ + 33 + ] + }, + "capture_groups": { + "33": [] + } + }, + { + "state_id": 33, + "byte_transitions": { + "43": [ + 34 + ], + "47": [ + 34 + ], + "48": [ + 34 + ], + "49": [ + 34 + ], + "50": [ + 34 + ], + "51": [ + 34 + ], + "52": [ + 34 + ], + "53": [ + 34 + ], + "54": [ + 34 + ], + "55": [ + 34 + ], + "56": [ + 34 + ], + "57": [ + 34 + ], + "61": [ + 34 + ], + "65": [ + 34 + ], + "66": [ + 34 + ], + "67": [ + 34 + ], + "68": [ + 34 + ], + "69": [ + 34 + ], + "70": [ + 34 + ], + "71": [ + 34 + ], + "72": [ + 34 + ], + "73": [ + 34 + ], + "74": [ + 34 + ], + "75": [ + 34 + ], + "76": [ + 34 + ], + "77": [ + 34 + ], + "78": [ + 34 + ], + "79": [ + 34 + ], + "80": [ + 34 + ], + "81": [ + 34 + ], + "82": [ + 34 + ], + "83": [ + 34 + ], + "84": [ + 34 + ], + "85": [ + 34 + ], + "86": [ + 34 + ], + "87": [ + 34 + ], + "88": [ + 34 + ], + "89": [ + 34 + ], + "90": [ + 34 + ], + "97": [ + 34 + ], + "98": [ + 34 + ], + "99": [ + 34 + ], + "100": [ + 34 + ], + "101": [ + 34 + ], + "102": [ + 34 + ], + "103": [ + 34 + ], + "104": [ + 34 + ], + "105": [ + 34 + ], + "106": [ + 34 + ], + "107": [ + 34 + ], + "108": [ + 34 + ], + "109": [ + 34 + ], + "110": [ + 34 + ], + "111": [ + 34 + ], + "112": [ + 34 + ], + "113": [ + 34 + ], + "114": [ + 34 + ], + "115": [ + 34 + ], + "116": [ + 34 + ], + "117": [ + 34 + ], + "118": [ + 34 + ], + "119": [ + 34 + ], + "120": [ + 34 + ], + "121": [ + 34 + ], + "122": [ + 34 + ] + }, + "capture_groups": { + "34": [ + [ + 1, + false + ], + [ + 1, + true + ] + ] + } + }, + { + "state_id": 34, + "byte_transitions": { + "43": [ + 34 + ], + "47": [ + 34 + ], + "48": [ + 34 + ], + "49": [ + 34 + ], + "50": [ + 34 + ], + "51": [ + 34 + ], + "52": [ + 34 + ], + "53": [ + 34 + ], + "54": [ + 34 + ], + "55": [ + 34 + ], + "56": [ + 34 + ], + "57": [ + 34 + ], + "59": [ + 35 + ], + "61": [ + 34 + ], + "65": [ + 34 + ], + "66": [ + 34 + ], + "67": [ + 34 + ], + "68": [ + 34 + ], + "69": [ + 34 + ], + "70": [ + 34 + ], + "71": [ + 34 + ], + "72": [ + 34 + ], + "73": [ + 34 + ], + "74": [ + 34 + ], + "75": [ + 34 + ], + "76": [ + 34 + ], + "77": [ + 34 + ], + "78": [ + 34 + ], + "79": [ + 34 + ], + "80": [ + 34 + ], + "81": [ + 34 + ], + "82": [ + 34 + ], + "83": [ + 34 + ], + "84": [ + 34 + ], + "85": [ + 34 + ], + "86": [ + 34 + ], + "87": [ + 34 + ], + "88": [ + 34 + ], + "89": [ + 34 + ], + "90": [ + 34 + ], + "97": [ + 34 + ], + "98": [ + 34 + ], + "99": [ + 34 + ], + "100": [ + 34 + ], + "101": [ + 34 + ], + "102": [ + 34 + ], + "103": [ + 34 + ], + "104": [ + 34 + ], + "105": [ + 34 + ], + "106": [ + 34 + ], + "107": [ + 34 + ], + "108": [ + 34 + ], + "109": [ + 34 + ], + "110": [ + 34 + ], + "111": [ + 34 + ], + "112": [ + 34 + ], + "113": [ + 34 + ], + "114": [ + 34 + ], + "115": [ + 34 + ], + "116": [ + 34 + ], + "117": [ + 34 + ], + "118": [ + 34 + ], + "119": [ + 34 + ], + "120": [ + 34 + ], + "121": [ + 34 + ], + "122": [ + 34 + ] + }, + "capture_groups": { + "34": [ + [ + 1, + false + ] + ], + "35": [] + } + }, + { + "state_id": 35, + "byte_transitions": {}, + "capture_groups": {} + } + ], + "start_states": [ + 0, + 1, + 3 + ], + "accept_states": [ + 35 + ], + "num_capture_groups": 1 +} \ No newline at end of file diff --git a/circom/circuits/common/body_hash_regex.circom b/circom/circuits/common/body_hash_regex.circom new file mode 100644 index 00000000..0bc3d5c4 --- /dev/null +++ b/circom/circuits/common/body_hash_regex.circom @@ -0,0 +1,221 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +include "../regex_helpers.circom"; + +// regex: (?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+bh=([a-zA-Z0-9+/=]+); +template BodyHashRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 66; + var startStates[numStartStates] = [0, 1, 3]; + var acceptStates[numAcceptStates] = [35]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] * isWithinPathLengthMinusOne[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[13]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[100]-> 4 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(0, 4, 100, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 1 -[13]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteTransitionWithCapture(1)(1, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[10]-> 3 | Capture Group: [] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 3, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 3 -[100]-> 4 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(3, 4, 100, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 4 -[107]-> 5 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(4, 5, 107, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 5 -[105]-> 6 | Capture Group: [] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(5, 6, 105, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 6 -[109]-> 7 | Capture Group: [] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(6, 7, 109, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 7 -[45]-> 8 | Capture Group: [] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(7, 8, 45, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 8 -[115]-> 9 | Capture Group: [] + isValidTransition[9][i] <== CheckByteTransitionWithCapture(1)(8, 9, 115, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 9 -[105]-> 10 | Capture Group: [] + isValidTransition[10][i] <== CheckByteTransitionWithCapture(1)(9, 10, 105, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 10 -[103]-> 11 | Capture Group: [] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(10, 11, 103, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 11 -[110]-> 12 | Capture Group: [] + isValidTransition[12][i] <== CheckByteTransitionWithCapture(1)(11, 12, 110, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 12 -[97]-> 13 | Capture Group: [] + isValidTransition[13][i] <== CheckByteTransitionWithCapture(1)(12, 13, 97, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 13 -[116]-> 14 | Capture Group: [] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(13, 14, 116, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 14 -[117]-> 15 | Capture Group: [] + isValidTransition[15][i] <== CheckByteTransitionWithCapture(1)(14, 15, 117, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 15 -[114]-> 16 | Capture Group: [] + isValidTransition[16][i] <== CheckByteTransitionWithCapture(1)(15, 16, 114, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 16 -[101]-> 17 | Capture Group: [] + isValidTransition[17][i] <== CheckByteTransitionWithCapture(1)(16, 17, 101, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 17 -[58]-> 18 | Capture Group: [] + isValidTransition[18][i] <== CheckByteTransitionWithCapture(1)(17, 18, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 18 -[97-122]-> 19 | Capture Group: [] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(18, 19, 97, 122, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 19 -[97-122]-> 19 | Capture Group: [] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(19, 19, 97, 122, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 19 -[61]-> 27 | Capture Group: [] + isValidTransition[21][i] <== CheckByteTransitionWithCapture(1)(19, 27, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 20 -[128-191]-> 28 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(20, 28, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 21 -[160-191]-> 20 | Capture Group: [] + isValidTransition[23][i] <== CheckByteRangeTransitionWithCapture(1)(21, 20, 160, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 22 -[128-191]-> 20 | Capture Group: [] + isValidTransition[24][i] <== CheckByteRangeTransitionWithCapture(1)(22, 20, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 23 -[128-159]-> 20 | Capture Group: [] + isValidTransition[25][i] <== CheckByteRangeTransitionWithCapture(1)(23, 20, 128, 159, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 24 -[144-191]-> 22 | Capture Group: [] + isValidTransition[26][i] <== CheckByteRangeTransitionWithCapture(1)(24, 22, 144, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 25 -[128-191]-> 22 | Capture Group: [] + isValidTransition[27][i] <== CheckByteRangeTransitionWithCapture(1)(25, 22, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 26 -[128-143]-> 22 | Capture Group: [] + isValidTransition[28][i] <== CheckByteRangeTransitionWithCapture(1)(26, 22, 128, 143, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 27 -[194-223]-> 20 | Capture Group: [] + isValidTransition[29][i] <== CheckByteRangeTransitionWithCapture(1)(27, 20, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 27 -[224]-> 21 | Capture Group: [] + isValidTransition[30][i] <== CheckByteTransitionWithCapture(1)(27, 21, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 27 -[225-236]-> 22 | Capture Group: [] + isValidTransition[31][i] <== CheckByteRangeTransitionWithCapture(1)(27, 22, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 27 -[238-239]-> 22 | Capture Group: [] + isValidTransition[32][i] <== CheckByteRangeTransitionWithCapture(1)(27, 22, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 33: 27 -[237]-> 23 | Capture Group: [] + isValidTransition[33][i] <== CheckByteTransitionWithCapture(1)(27, 23, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 34: 27 -[240]-> 24 | Capture Group: [] + isValidTransition[34][i] <== CheckByteTransitionWithCapture(1)(27, 24, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 35: 27 -[241-243]-> 25 | Capture Group: [] + isValidTransition[35][i] <== CheckByteRangeTransitionWithCapture(1)(27, 25, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 36: 27 -[244]-> 26 | Capture Group: [] + isValidTransition[36][i] <== CheckByteTransitionWithCapture(1)(27, 26, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 37: 27 -[0-58]-> 28 | Capture Group: [] + isValidTransition[37][i] <== CheckByteRangeTransitionWithCapture(1)(27, 28, 0, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 38: 27 -[60-127]-> 28 | Capture Group: [] + isValidTransition[38][i] <== CheckByteRangeTransitionWithCapture(1)(27, 28, 60, 127, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 39: 28 -[194-223]-> 20 | Capture Group: [] + isValidTransition[39][i] <== CheckByteRangeTransitionWithCapture(1)(28, 20, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 40: 28 -[224]-> 21 | Capture Group: [] + isValidTransition[40][i] <== CheckByteTransitionWithCapture(1)(28, 21, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 41: 28 -[225-236]-> 22 | Capture Group: [] + isValidTransition[41][i] <== CheckByteRangeTransitionWithCapture(1)(28, 22, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 42: 28 -[238-239]-> 22 | Capture Group: [] + isValidTransition[42][i] <== CheckByteRangeTransitionWithCapture(1)(28, 22, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 43: 28 -[237]-> 23 | Capture Group: [] + isValidTransition[43][i] <== CheckByteTransitionWithCapture(1)(28, 23, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 44: 28 -[240]-> 24 | Capture Group: [] + isValidTransition[44][i] <== CheckByteTransitionWithCapture(1)(28, 24, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 45: 28 -[241-243]-> 25 | Capture Group: [] + isValidTransition[45][i] <== CheckByteRangeTransitionWithCapture(1)(28, 25, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 46: 28 -[244]-> 26 | Capture Group: [] + isValidTransition[46][i] <== CheckByteTransitionWithCapture(1)(28, 26, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 47: 28 -[0-58]-> 28 | Capture Group: [] + isValidTransition[47][i] <== CheckByteRangeTransitionWithCapture(1)(28, 28, 0, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 48: 28 -[60-127]-> 28 | Capture Group: [] + isValidTransition[48][i] <== CheckByteRangeTransitionWithCapture(1)(28, 28, 60, 127, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 49: 28 -[59]-> 29 | Capture Group: [] + isValidTransition[49][i] <== CheckByteTransitionWithCapture(1)(28, 29, 59, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 50: 29 -[32]-> 30 | Capture Group: [] + isValidTransition[50][i] <== CheckByteTransitionWithCapture(1)(29, 30, 32, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 51: 30 -[97-122]-> 19 | Capture Group: [] + isValidTransition[51][i] <== CheckByteRangeTransitionWithCapture(1)(30, 19, 97, 122, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 52: 30 -[98]-> 31 | Capture Group: [] + isValidTransition[52][i] <== CheckByteTransitionWithCapture(1)(30, 31, 98, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 53: 31 -[104]-> 32 | Capture Group: [] + isValidTransition[53][i] <== CheckByteTransitionWithCapture(1)(31, 32, 104, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 54: 32 -[61]-> 33 | Capture Group: [] + isValidTransition[54][i] <== CheckByteTransitionWithCapture(1)(32, 33, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 55: 33 -[43]-> 34 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[55][i] <== CheckByteTransitionWithCapture(1)(33, 34, 43, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 56: 33 -[47-57]-> 34 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[56][i] <== CheckByteRangeTransitionWithCapture(1)(33, 34, 47, 57, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 57: 33 -[61]-> 34 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[57][i] <== CheckByteTransitionWithCapture(1)(33, 34, 61, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 58: 33 -[65-90]-> 34 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[58][i] <== CheckByteRangeTransitionWithCapture(1)(33, 34, 65, 90, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 59: 33 -[97-122]-> 34 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[59][i] <== CheckByteRangeTransitionWithCapture(1)(33, 34, 97, 122, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 60: 34 -[43]-> 34 | Capture Group:[ (1, 0)] + isValidTransition[60][i] <== CheckByteTransitionWithCapture(1)(34, 34, 43, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 61: 34 -[47-57]-> 34 | Capture Group:[ (1, 0)] + isValidTransition[61][i] <== CheckByteRangeTransitionWithCapture(1)(34, 34, 47, 57, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 62: 34 -[61]-> 34 | Capture Group:[ (1, 0)] + isValidTransition[62][i] <== CheckByteTransitionWithCapture(1)(34, 34, 61, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 63: 34 -[65-90]-> 34 | Capture Group:[ (1, 0)] + isValidTransition[63][i] <== CheckByteRangeTransitionWithCapture(1)(34, 34, 65, 90, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 64: 34 -[97-122]-> 34 | Capture Group:[ (1, 0)] + isValidTransition[64][i] <== CheckByteRangeTransitionWithCapture(1)(34, 34, 97, 122, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 65: 34 -[59]-> 35 | Capture Group: [] + isValidTransition[65][i] <== CheckByteTransitionWithCapture(1)(34, 35, 59, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[44] <== CaptureSubstring(maxMatchBytes, 44, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/email_addr_graph.json b/circom/circuits/common/email_addr_graph.json new file mode 100644 index 00000000..982618aa --- /dev/null +++ b/circom/circuits/common/email_addr_graph.json @@ -0,0 +1 @@ +{"regex":"([A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+)","nodes":[{"state_id":0,"byte_transitions":{"33":[1],"35":[1],"36":[1],"37":[1],"38":[1],"39":[1],"42":[1],"43":[1],"45":[1],"46":[1],"47":[1],"48":[1],"49":[1],"50":[1],"51":[1],"52":[1],"53":[1],"54":[1],"55":[1],"56":[1],"57":[1],"61":[1],"63":[1],"64":[1],"65":[1],"66":[1],"67":[1],"68":[1],"69":[1],"70":[1],"71":[1],"72":[1],"73":[1],"74":[1],"75":[1],"76":[1],"77":[1],"78":[1],"79":[1],"80":[1],"81":[1],"82":[1],"83":[1],"84":[1],"85":[1],"86":[1],"87":[1],"88":[1],"89":[1],"90":[1],"94":[1],"95":[1],"96":[1],"97":[1],"98":[1],"99":[1],"100":[1],"101":[1],"102":[1],"103":[1],"104":[1],"105":[1],"106":[1],"107":[1],"108":[1],"109":[1],"110":[1],"111":[1],"112":[1],"113":[1],"114":[1],"115":[1],"116":[1],"117":[1],"118":[1],"119":[1],"120":[1],"121":[1],"122":[1],"123":[1],"124":[1],"125":[1],"126":[1]},"epsilon_transitions":[],"capture_groups":{"1":[[1,true]]}},{"state_id":1,"byte_transitions":{"33":[1],"35":[1],"36":[1],"37":[1],"38":[1],"39":[1],"42":[1],"43":[1],"45":[1],"46":[1],"47":[1],"48":[1],"49":[1],"50":[1],"51":[1],"52":[1],"53":[1],"54":[1],"55":[1],"56":[1],"57":[1],"61":[1],"63":[1],"64":[1,2],"65":[1],"66":[1],"67":[1],"68":[1],"69":[1],"70":[1],"71":[1],"72":[1],"73":[1],"74":[1],"75":[1],"76":[1],"77":[1],"78":[1],"79":[1],"80":[1],"81":[1],"82":[1],"83":[1],"84":[1],"85":[1],"86":[1],"87":[1],"88":[1],"89":[1],"90":[1],"94":[1],"95":[1],"96":[1],"97":[1],"98":[1],"99":[1],"100":[1],"101":[1],"102":[1],"103":[1],"104":[1],"105":[1],"106":[1],"107":[1],"108":[1],"109":[1],"110":[1],"111":[1],"112":[1],"113":[1],"114":[1],"115":[1],"116":[1],"117":[1],"118":[1],"119":[1],"120":[1],"121":[1],"122":[1],"123":[1],"124":[1],"125":[1],"126":[1]},"epsilon_transitions":[],"capture_groups":{"1":[],"2":[]}},{"state_id":2,"byte_transitions":{"45":[3],"46":[3],"48":[3],"49":[3],"50":[3],"51":[3],"52":[3],"53":[3],"54":[3],"55":[3],"56":[3],"57":[3],"65":[3],"66":[3],"67":[3],"68":[3],"69":[3],"70":[3],"71":[3],"72":[3],"73":[3],"74":[3],"75":[3],"76":[3],"77":[3],"78":[3],"79":[3],"80":[3],"81":[3],"82":[3],"83":[3],"84":[3],"85":[3],"86":[3],"87":[3],"88":[3],"89":[3],"90":[3],"97":[3],"98":[3],"99":[3],"100":[3],"101":[3],"102":[3],"103":[3],"104":[3],"105":[3],"106":[3],"107":[3],"108":[3],"109":[3],"110":[3],"111":[3],"112":[3],"113":[3],"114":[3],"115":[3],"116":[3],"117":[3],"118":[3],"119":[3],"120":[3],"121":[3],"122":[3]},"epsilon_transitions":[],"capture_groups":{"3":[[1,false]]}},{"state_id":3,"byte_transitions":{"45":[3],"46":[3],"48":[3],"49":[3],"50":[3],"51":[3],"52":[3],"53":[3],"54":[3],"55":[3],"56":[3],"57":[3],"65":[3],"66":[3],"67":[3],"68":[3],"69":[3],"70":[3],"71":[3],"72":[3],"73":[3],"74":[3],"75":[3],"76":[3],"77":[3],"78":[3],"79":[3],"80":[3],"81":[3],"82":[3],"83":[3],"84":[3],"85":[3],"86":[3],"87":[3],"88":[3],"89":[3],"90":[3],"97":[3],"98":[3],"99":[3],"100":[3],"101":[3],"102":[3],"103":[3],"104":[3],"105":[3],"106":[3],"107":[3],"108":[3],"109":[3],"110":[3],"111":[3],"112":[3],"113":[3],"114":[3],"115":[3],"116":[3],"117":[3],"118":[3],"119":[3],"120":[3],"121":[3],"122":[3]},"epsilon_transitions":[],"capture_groups":{"3":[[1,false]]}}],"start_states":[0],"accept_states":[3],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/email_addr_regex.circom b/circom/circuits/common/email_addr_regex.circom new file mode 100644 index 00000000..923895b2 --- /dev/null +++ b/circom/circuits/common/email_addr_regex.circom @@ -0,0 +1,130 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: ([A-Za-z0-9!#$%&\'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+) +template EmailAddrRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 1; + var numAcceptStates = 1; + var numTransitions = 23; + var startStates[numStartStates] = [0]; + var acceptStates[numAcceptStates] = [3]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + signal isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState <== IsEqual()([startStates[0], currStates[0]]); + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[33]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 1, 33, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[35-39]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[1][i] <== CheckByteRangeTransitionWithCapture(1)(0, 1, 35, 39, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 0 -[42-43]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[2][i] <== CheckByteRangeTransitionWithCapture(1)(0, 1, 42, 43, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 0 -[45-57]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[3][i] <== CheckByteRangeTransitionWithCapture(1)(0, 1, 45, 57, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 0 -[61]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(0, 1, 61, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 0 -[63-90]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[5][i] <== CheckByteRangeTransitionWithCapture(1)(0, 1, 63, 90, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 0 -[94-126]-> 1 | Capture Group:[ (1, 1)] + isValidTransition[6][i] <== CheckByteRangeTransitionWithCapture(1)(0, 1, 94, 126, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 1 -[33]-> 1 | Capture Group: [] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(1, 1, 33, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 1 -[35-39]-> 1 | Capture Group: [] + isValidTransition[8][i] <== CheckByteRangeTransitionWithCapture(1)(1, 1, 35, 39, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 1 -[42-43]-> 1 | Capture Group: [] + isValidTransition[9][i] <== CheckByteRangeTransitionWithCapture(1)(1, 1, 42, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 1 -[45-57]-> 1 | Capture Group: [] + isValidTransition[10][i] <== CheckByteRangeTransitionWithCapture(1)(1, 1, 45, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 1 -[61]-> 1 | Capture Group: [] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(1, 1, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 1 -[63-90]-> 1 | Capture Group: [] + isValidTransition[12][i] <== CheckByteRangeTransitionWithCapture(1)(1, 1, 63, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 1 -[94-126]-> 1 | Capture Group: [] + isValidTransition[13][i] <== CheckByteRangeTransitionWithCapture(1)(1, 1, 94, 126, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 1 -[64]-> 2 | Capture Group: [] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(1, 2, 64, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 2 -[45-46]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[15][i] <== CheckByteRangeTransitionWithCapture(1)(2, 3, 45, 46, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 2 -[48-57]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[16][i] <== CheckByteRangeTransitionWithCapture(1)(2, 3, 48, 57, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 2 -[65-90]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(2, 3, 65, 90, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 2 -[97-122]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(2, 3, 97, 122, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 3 -[45-46]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(3, 3, 45, 46, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 3 -[48-57]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(3, 3, 48, 57, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 3 -[65-90]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[21][i] <== CheckByteRangeTransitionWithCapture(1)(3, 3, 65, 90, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 3 -[97-122]-> 3 | Capture Group:[ (1, 0)] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(3, 3, 97, 122, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[320] <== CaptureSubstring(maxMatchBytes, 320, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/email_domain_graph.json b/circom/circuits/common/email_domain_graph.json new file mode 100644 index 00000000..bf9a1dd6 --- /dev/null +++ b/circom/circuits/common/email_domain_graph.json @@ -0,0 +1 @@ +{"regex":"[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./]+@([A-Za-z0-9.\\-@]+)","nodes":[{"state_id":0,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":1,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"64":[3],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[],"3":[]}},{"state_id":3,"byte_transitions":{"45":[4],"46":[4],"48":[4],"49":[4],"50":[4],"51":[4],"52":[4],"53":[4],"54":[4],"55":[4],"56":[4],"57":[4],"64":[4],"65":[4],"66":[4],"67":[4],"68":[4],"69":[4],"70":[4],"71":[4],"72":[4],"73":[4],"74":[4],"75":[4],"76":[4],"77":[4],"78":[4],"79":[4],"80":[4],"81":[4],"82":[4],"83":[4],"84":[4],"85":[4],"86":[4],"87":[4],"88":[4],"89":[4],"90":[4],"97":[4],"98":[4],"99":[4],"100":[4],"101":[4],"102":[4],"103":[4],"104":[4],"105":[4],"106":[4],"107":[4],"108":[4],"109":[4],"110":[4],"111":[4],"112":[4],"113":[4],"114":[4],"115":[4],"116":[4],"117":[4],"118":[4],"119":[4],"120":[4],"121":[4],"122":[4]},"epsilon_transitions":[],"capture_groups":{"4":[[1,false],[1,true]]}},{"state_id":4,"byte_transitions":{"45":[4],"46":[4],"48":[4],"49":[4],"50":[4],"51":[4],"52":[4],"53":[4],"54":[4],"55":[4],"56":[4],"57":[4],"64":[4],"65":[4],"66":[4],"67":[4],"68":[4],"69":[4],"70":[4],"71":[4],"72":[4],"73":[4],"74":[4],"75":[4],"76":[4],"77":[4],"78":[4],"79":[4],"80":[4],"81":[4],"82":[4],"83":[4],"84":[4],"85":[4],"86":[4],"87":[4],"88":[4],"89":[4],"90":[4],"97":[4],"98":[4],"99":[4],"100":[4],"101":[4],"102":[4],"103":[4],"104":[4],"105":[4],"106":[4],"107":[4],"108":[4],"109":[4],"110":[4],"111":[4],"112":[4],"113":[4],"114":[4],"115":[4],"116":[4],"117":[4],"118":[4],"119":[4],"120":[4],"121":[4],"122":[4]},"epsilon_transitions":[],"capture_groups":{"4":[[1,false]]}}],"start_states":[0,1],"accept_states":[4],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/email_domain_regex.circom b/circom/circuits/common/email_domain_regex.circom new file mode 100644 index 00000000..25760993 --- /dev/null +++ b/circom/circuits/common/email_domain_regex.circom @@ -0,0 +1,154 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: [A-Za-z0-9!#$%&\'*+=?\\-\\^_`{|}~./]+@([A-Za-z0-9.\\-@]+) +template EmailDomainRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 2; + var numAcceptStates = 1; + var numTransitions = 33; + var startStates[numStartStates] = [0, 1]; + var acceptStates[numAcceptStates] = [4]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[33]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 33, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[35-39]-> 2 | Capture Group: [] + isValidTransition[1][i] <== CheckByteRangeTransitionWithCapture(1)(0, 2, 35, 39, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 0 -[42-43]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteRangeTransitionWithCapture(1)(0, 2, 42, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 0 -[45-57]-> 2 | Capture Group: [] + isValidTransition[3][i] <== CheckByteRangeTransitionWithCapture(1)(0, 2, 45, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 0 -[61]-> 2 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(0, 2, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 0 -[63]-> 2 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(0, 2, 63, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 0 -[65-90]-> 2 | Capture Group: [] + isValidTransition[6][i] <== CheckByteRangeTransitionWithCapture(1)(0, 2, 65, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 0 -[94-126]-> 2 | Capture Group: [] + isValidTransition[7][i] <== CheckByteRangeTransitionWithCapture(1)(0, 2, 94, 126, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 1 -[33]-> 2 | Capture Group: [] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(1, 2, 33, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 1 -[35-39]-> 2 | Capture Group: [] + isValidTransition[9][i] <== CheckByteRangeTransitionWithCapture(1)(1, 2, 35, 39, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 1 -[42-43]-> 2 | Capture Group: [] + isValidTransition[10][i] <== CheckByteRangeTransitionWithCapture(1)(1, 2, 42, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 1 -[45-57]-> 2 | Capture Group: [] + isValidTransition[11][i] <== CheckByteRangeTransitionWithCapture(1)(1, 2, 45, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 1 -[61]-> 2 | Capture Group: [] + isValidTransition[12][i] <== CheckByteTransitionWithCapture(1)(1, 2, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 1 -[63]-> 2 | Capture Group: [] + isValidTransition[13][i] <== CheckByteTransitionWithCapture(1)(1, 2, 63, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 1 -[65-90]-> 2 | Capture Group: [] + isValidTransition[14][i] <== CheckByteRangeTransitionWithCapture(1)(1, 2, 65, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 1 -[94-126]-> 2 | Capture Group: [] + isValidTransition[15][i] <== CheckByteRangeTransitionWithCapture(1)(1, 2, 94, 126, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 2 -[33]-> 2 | Capture Group: [] + isValidTransition[16][i] <== CheckByteTransitionWithCapture(1)(2, 2, 33, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 2 -[35-39]-> 2 | Capture Group: [] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(2, 2, 35, 39, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 2 -[42-43]-> 2 | Capture Group: [] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(2, 2, 42, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 2 -[45-57]-> 2 | Capture Group: [] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(2, 2, 45, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 2 -[61]-> 2 | Capture Group: [] + isValidTransition[20][i] <== CheckByteTransitionWithCapture(1)(2, 2, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 2 -[63]-> 2 | Capture Group: [] + isValidTransition[21][i] <== CheckByteTransitionWithCapture(1)(2, 2, 63, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 2 -[65-90]-> 2 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(2, 2, 65, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 2 -[94-126]-> 2 | Capture Group: [] + isValidTransition[23][i] <== CheckByteRangeTransitionWithCapture(1)(2, 2, 94, 126, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 2 -[64]-> 3 | Capture Group: [] + isValidTransition[24][i] <== CheckByteTransitionWithCapture(1)(2, 3, 64, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 3 -[45-46]-> 4 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[25][i] <== CheckByteRangeTransitionWithCapture(1)(3, 4, 45, 46, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 3 -[48-57]-> 4 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[26][i] <== CheckByteRangeTransitionWithCapture(1)(3, 4, 48, 57, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 3 -[64-90]-> 4 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[27][i] <== CheckByteRangeTransitionWithCapture(1)(3, 4, 64, 90, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 3 -[97-122]-> 4 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[28][i] <== CheckByteRangeTransitionWithCapture(1)(3, 4, 97, 122, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 4 -[45-46]-> 4 | Capture Group:[ (1, 0)] + isValidTransition[29][i] <== CheckByteRangeTransitionWithCapture(1)(4, 4, 45, 46, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 4 -[48-57]-> 4 | Capture Group:[ (1, 0)] + isValidTransition[30][i] <== CheckByteRangeTransitionWithCapture(1)(4, 4, 48, 57, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 4 -[64-90]-> 4 | Capture Group:[ (1, 0)] + isValidTransition[31][i] <== CheckByteRangeTransitionWithCapture(1)(4, 4, 64, 90, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 4 -[97-122]-> 4 | Capture Group:[ (1, 0)] + isValidTransition[32][i] <== CheckByteRangeTransitionWithCapture(1)(4, 4, 97, 122, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[128] <== CaptureSubstring(maxMatchBytes, 128, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/from_all_graph.json b/circom/circuits/common/from_all_graph.json new file mode 100644 index 00000000..9940cea5 --- /dev/null +++ b/circom/circuits/common/from_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)from:([^\r\n]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"102":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"102":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"114":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"111":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"109":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"58":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"0":[16],"1":[16],"2":[16],"3":[16],"4":[16],"5":[16],"6":[16],"7":[16],"8":[16],"9":[16],"11":[16],"12":[16],"14":[16],"15":[16],"16":[16],"17":[16],"18":[16],"19":[16],"20":[16],"21":[16],"22":[16],"23":[16],"24":[16],"25":[16],"26":[16],"27":[16],"28":[16],"29":[16],"30":[16],"31":[16],"32":[16],"33":[16],"34":[16],"35":[16],"36":[16],"37":[16],"38":[16],"39":[16],"40":[16],"41":[16],"42":[16],"43":[16],"44":[16],"45":[16],"46":[16],"47":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"58":[16],"59":[16],"60":[16],"61":[16],"62":[16],"63":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"91":[16],"92":[16],"93":[16],"94":[16],"95":[16],"96":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16],"123":[16],"124":[16],"125":[16],"126":[16],"127":[16],"194":[9],"195":[9],"196":[9],"197":[9],"198":[9],"199":[9],"200":[9],"201":[9],"202":[9],"203":[9],"204":[9],"205":[9],"206":[9],"207":[9],"208":[9],"209":[9],"210":[9],"211":[9],"212":[9],"213":[9],"214":[9],"215":[9],"216":[9],"217":[9],"218":[9],"219":[9],"220":[9],"221":[9],"222":[9],"223":[9],"224":[10],"225":[11],"226":[11],"227":[11],"228":[11],"229":[11],"230":[11],"231":[11],"232":[11],"233":[11],"234":[11],"235":[11],"236":[11],"237":[12],"238":[11],"239":[11],"240":[13],"241":[14],"242":[14],"243":[14],"244":[15]},"epsilon_transitions":[],"capture_groups":{"9":[[1,true]],"10":[[1,true]],"11":[[1,true]],"12":[[1,true]],"13":[[1,true]],"14":[[1,true]],"15":[[1,true]],"16":[[1,false],[1,true]]}},{"state_id":9,"byte_transitions":{"128":[16],"129":[16],"130":[16],"131":[16],"132":[16],"133":[16],"134":[16],"135":[16],"136":[16],"137":[16],"138":[16],"139":[16],"140":[16],"141":[16],"142":[16],"143":[16],"144":[16],"145":[16],"146":[16],"147":[16],"148":[16],"149":[16],"150":[16],"151":[16],"152":[16],"153":[16],"154":[16],"155":[16],"156":[16],"157":[16],"158":[16],"159":[16],"160":[16],"161":[16],"162":[16],"163":[16],"164":[16],"165":[16],"166":[16],"167":[16],"168":[16],"169":[16],"170":[16],"171":[16],"172":[16],"173":[16],"174":[16],"175":[16],"176":[16],"177":[16],"178":[16],"179":[16],"180":[16],"181":[16],"182":[16],"183":[16],"184":[16],"185":[16],"186":[16],"187":[16],"188":[16],"189":[16],"190":[16],"191":[16]},"epsilon_transitions":[],"capture_groups":{"16":[[1,false]]}},{"state_id":10,"byte_transitions":{"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":11,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":12,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":13,"byte_transitions":{"144":[11],"145":[11],"146":[11],"147":[11],"148":[11],"149":[11],"150":[11],"151":[11],"152":[11],"153":[11],"154":[11],"155":[11],"156":[11],"157":[11],"158":[11],"159":[11],"160":[11],"161":[11],"162":[11],"163":[11],"164":[11],"165":[11],"166":[11],"167":[11],"168":[11],"169":[11],"170":[11],"171":[11],"172":[11],"173":[11],"174":[11],"175":[11],"176":[11],"177":[11],"178":[11],"179":[11],"180":[11],"181":[11],"182":[11],"183":[11],"184":[11],"185":[11],"186":[11],"187":[11],"188":[11],"189":[11],"190":[11],"191":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":14,"byte_transitions":{"128":[11],"129":[11],"130":[11],"131":[11],"132":[11],"133":[11],"134":[11],"135":[11],"136":[11],"137":[11],"138":[11],"139":[11],"140":[11],"141":[11],"142":[11],"143":[11],"144":[11],"145":[11],"146":[11],"147":[11],"148":[11],"149":[11],"150":[11],"151":[11],"152":[11],"153":[11],"154":[11],"155":[11],"156":[11],"157":[11],"158":[11],"159":[11],"160":[11],"161":[11],"162":[11],"163":[11],"164":[11],"165":[11],"166":[11],"167":[11],"168":[11],"169":[11],"170":[11],"171":[11],"172":[11],"173":[11],"174":[11],"175":[11],"176":[11],"177":[11],"178":[11],"179":[11],"180":[11],"181":[11],"182":[11],"183":[11],"184":[11],"185":[11],"186":[11],"187":[11],"188":[11],"189":[11],"190":[11],"191":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":15,"byte_transitions":{"128":[11],"129":[11],"130":[11],"131":[11],"132":[11],"133":[11],"134":[11],"135":[11],"136":[11],"137":[11],"138":[11],"139":[11],"140":[11],"141":[11],"142":[11],"143":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":16,"byte_transitions":{"0":[16],"1":[16],"2":[16],"3":[16],"4":[16],"5":[16],"6":[16],"7":[16],"8":[16],"9":[16],"11":[16],"12":[16],"13":[17],"14":[16],"15":[16],"16":[16],"17":[16],"18":[16],"19":[16],"20":[16],"21":[16],"22":[16],"23":[16],"24":[16],"25":[16],"26":[16],"27":[16],"28":[16],"29":[16],"30":[16],"31":[16],"32":[16],"33":[16],"34":[16],"35":[16],"36":[16],"37":[16],"38":[16],"39":[16],"40":[16],"41":[16],"42":[16],"43":[16],"44":[16],"45":[16],"46":[16],"47":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"58":[16],"59":[16],"60":[16],"61":[16],"62":[16],"63":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"91":[16],"92":[16],"93":[16],"94":[16],"95":[16],"96":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16],"123":[16],"124":[16],"125":[16],"126":[16],"127":[16],"194":[9],"195":[9],"196":[9],"197":[9],"198":[9],"199":[9],"200":[9],"201":[9],"202":[9],"203":[9],"204":[9],"205":[9],"206":[9],"207":[9],"208":[9],"209":[9],"210":[9],"211":[9],"212":[9],"213":[9],"214":[9],"215":[9],"216":[9],"217":[9],"218":[9],"219":[9],"220":[9],"221":[9],"222":[9],"223":[9],"224":[10],"225":[11],"226":[11],"227":[11],"228":[11],"229":[11],"230":[11],"231":[11],"232":[11],"233":[11],"234":[11],"235":[11],"236":[11],"237":[12],"238":[11],"239":[11],"240":[13],"241":[14],"242":[14],"243":[14],"244":[15]},"epsilon_transitions":[],"capture_groups":{"9":[],"10":[],"11":[],"12":[],"13":[],"14":[],"15":[],"16":[[1,false]],"17":[]}},{"state_id":17,"byte_transitions":{"10":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[18],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/from_all_regex.circom b/circom/circuits/common/from_all_regex.circom new file mode 100644 index 00000000..01bb2f43 --- /dev/null +++ b/circom/circuits/common/from_all_regex.circom @@ -0,0 +1,168 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: (?:\r\n|^)from:([^\r\n]+)\r\n +template FromAllRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 40; + var startStates[numStartStates] = [0, 1, 3]; + var acceptStates[numAcceptStates] = [18]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[13]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[102]-> 4 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(0, 4, 102, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 1 -[13]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteTransitionWithCapture(1)(1, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[10]-> 3 | Capture Group: [] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 3, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 3 -[102]-> 4 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(3, 4, 102, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 4 -[114]-> 5 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(4, 5, 114, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 5 -[111]-> 6 | Capture Group: [] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(5, 6, 111, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 6 -[109]-> 7 | Capture Group: [] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(6, 7, 109, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 7 -[58]-> 8 | Capture Group: [] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(7, 8, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 8 -[194-223]-> 9 | Capture Group:[ (1, 1)] + isValidTransition[9][i] <== CheckByteRangeTransitionWithCapture(1)(8, 9, 194, 223, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 8 -[224]-> 10 | Capture Group:[ (1, 1)] + isValidTransition[10][i] <== CheckByteTransitionWithCapture(1)(8, 10, 224, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 8 -[225-236]-> 11 | Capture Group:[ (1, 1)] + isValidTransition[11][i] <== CheckByteRangeTransitionWithCapture(1)(8, 11, 225, 236, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 8 -[238-239]-> 11 | Capture Group:[ (1, 1)] + isValidTransition[12][i] <== CheckByteRangeTransitionWithCapture(1)(8, 11, 238, 239, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 8 -[237]-> 12 | Capture Group:[ (1, 1)] + isValidTransition[13][i] <== CheckByteTransitionWithCapture(1)(8, 12, 237, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 8 -[240]-> 13 | Capture Group:[ (1, 1)] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(8, 13, 240, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 8 -[241-243]-> 14 | Capture Group:[ (1, 1)] + isValidTransition[15][i] <== CheckByteRangeTransitionWithCapture(1)(8, 14, 241, 243, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 8 -[244]-> 15 | Capture Group:[ (1, 1)] + isValidTransition[16][i] <== CheckByteTransitionWithCapture(1)(8, 15, 244, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 8 -[0-9]-> 16 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(8, 16, 0, 9, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 8 -[11-12]-> 16 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(8, 16, 11, 12, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 8 -[14-127]-> 16 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(8, 16, 14, 127, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 9 -[128-191]-> 16 | Capture Group:[ (1, 0)] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(9, 16, 128, 191, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 10 -[160-191]-> 9 | Capture Group: [] + isValidTransition[21][i] <== CheckByteRangeTransitionWithCapture(1)(10, 9, 160, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 11 -[128-191]-> 9 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(11, 9, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 12 -[128-159]-> 9 | Capture Group: [] + isValidTransition[23][i] <== CheckByteRangeTransitionWithCapture(1)(12, 9, 128, 159, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 13 -[144-191]-> 11 | Capture Group: [] + isValidTransition[24][i] <== CheckByteRangeTransitionWithCapture(1)(13, 11, 144, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 14 -[128-191]-> 11 | Capture Group: [] + isValidTransition[25][i] <== CheckByteRangeTransitionWithCapture(1)(14, 11, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 15 -[128-143]-> 11 | Capture Group: [] + isValidTransition[26][i] <== CheckByteRangeTransitionWithCapture(1)(15, 11, 128, 143, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 16 -[194-223]-> 9 | Capture Group: [] + isValidTransition[27][i] <== CheckByteRangeTransitionWithCapture(1)(16, 9, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 16 -[224]-> 10 | Capture Group: [] + isValidTransition[28][i] <== CheckByteTransitionWithCapture(1)(16, 10, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 16 -[225-236]-> 11 | Capture Group: [] + isValidTransition[29][i] <== CheckByteRangeTransitionWithCapture(1)(16, 11, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 16 -[238-239]-> 11 | Capture Group: [] + isValidTransition[30][i] <== CheckByteRangeTransitionWithCapture(1)(16, 11, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 16 -[237]-> 12 | Capture Group: [] + isValidTransition[31][i] <== CheckByteTransitionWithCapture(1)(16, 12, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 16 -[240]-> 13 | Capture Group: [] + isValidTransition[32][i] <== CheckByteTransitionWithCapture(1)(16, 13, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 33: 16 -[241-243]-> 14 | Capture Group: [] + isValidTransition[33][i] <== CheckByteRangeTransitionWithCapture(1)(16, 14, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 34: 16 -[244]-> 15 | Capture Group: [] + isValidTransition[34][i] <== CheckByteTransitionWithCapture(1)(16, 15, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 35: 16 -[0-9]-> 16 | Capture Group:[ (1, 0)] + isValidTransition[35][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 0, 9, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 36: 16 -[11-12]-> 16 | Capture Group:[ (1, 0)] + isValidTransition[36][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 11, 12, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 37: 16 -[14-127]-> 16 | Capture Group:[ (1, 0)] + isValidTransition[37][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 14, 127, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 38: 16 -[13]-> 17 | Capture Group: [] + isValidTransition[38][i] <== CheckByteTransitionWithCapture(1)(16, 17, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 39: 17 -[10]-> 18 | Capture Group: [] + isValidTransition[39][i] <== CheckByteTransitionWithCapture(1)(17, 18, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[64] <== CaptureSubstring(maxMatchBytes, 64, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/message_id_graph.json b/circom/circuits/common/message_id_graph.json new file mode 100644 index 00000000..fac72933 --- /dev/null +++ b/circom/circuits/common/message_id_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)message-id:(<[A-Za-z0-9=@\\.\\+_-]+>)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"109":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"109":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"101":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"115":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"115":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"97":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"103":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"101":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"45":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"105":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":12,"byte_transitions":{"100":[13]},"epsilon_transitions":[],"capture_groups":{"13":[]}},{"state_id":13,"byte_transitions":{"58":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{"60":[15]},"epsilon_transitions":[],"capture_groups":{"15":[[1,true]]}},{"state_id":15,"byte_transitions":{"43":[16],"45":[16],"46":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"61":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"95":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{"43":[16],"45":[16],"46":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"61":[16],"62":[17],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"95":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16]},"epsilon_transitions":[],"capture_groups":{"16":[],"17":[[1,false]]}},{"state_id":17,"byte_transitions":{"13":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{"10":[19]},"epsilon_transitions":[],"capture_groups":{"19":[]}},{"state_id":19,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[19],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/message_id_regex.circom b/circom/circuits/common/message_id_regex.circom new file mode 100644 index 00000000..4aa6dd85 --- /dev/null +++ b/circom/circuits/common/message_id_regex.circom @@ -0,0 +1,154 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: (?:\r\n|^)message-id:(<[A-Za-z0-9=@\\.\\+_-]+>)\r\n +template MessageIdRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 33; + var startStates[numStartStates] = [0, 1, 3]; + var acceptStates[numAcceptStates] = [19]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[13]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[109]-> 4 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(0, 4, 109, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 1 -[13]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteTransitionWithCapture(1)(1, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[10]-> 3 | Capture Group: [] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 3, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 3 -[109]-> 4 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(3, 4, 109, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 4 -[101]-> 5 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(4, 5, 101, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 5 -[115]-> 6 | Capture Group: [] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(5, 6, 115, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 6 -[115]-> 7 | Capture Group: [] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(6, 7, 115, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 7 -[97]-> 8 | Capture Group: [] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(7, 8, 97, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 8 -[103]-> 9 | Capture Group: [] + isValidTransition[9][i] <== CheckByteTransitionWithCapture(1)(8, 9, 103, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 9 -[101]-> 10 | Capture Group: [] + isValidTransition[10][i] <== CheckByteTransitionWithCapture(1)(9, 10, 101, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 10 -[45]-> 11 | Capture Group: [] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(10, 11, 45, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 11 -[105]-> 12 | Capture Group: [] + isValidTransition[12][i] <== CheckByteTransitionWithCapture(1)(11, 12, 105, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 12 -[100]-> 13 | Capture Group: [] + isValidTransition[13][i] <== CheckByteTransitionWithCapture(1)(12, 13, 100, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 13 -[58]-> 14 | Capture Group: [] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(13, 14, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 14 -[60]-> 15 | Capture Group:[ (1, 1)] + isValidTransition[15][i] <== CheckByteTransitionWithCapture(1)(14, 15, 60, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 15 -[43]-> 16 | Capture Group: [] + isValidTransition[16][i] <== CheckByteTransitionWithCapture(1)(15, 16, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 15 -[45-46]-> 16 | Capture Group: [] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(15, 16, 45, 46, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 15 -[48-57]-> 16 | Capture Group: [] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(15, 16, 48, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 15 -[61]-> 16 | Capture Group: [] + isValidTransition[19][i] <== CheckByteTransitionWithCapture(1)(15, 16, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 15 -[64-90]-> 16 | Capture Group: [] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(15, 16, 64, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 15 -[95]-> 16 | Capture Group: [] + isValidTransition[21][i] <== CheckByteTransitionWithCapture(1)(15, 16, 95, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 15 -[97-122]-> 16 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(15, 16, 97, 122, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 16 -[43]-> 16 | Capture Group: [] + isValidTransition[23][i] <== CheckByteTransitionWithCapture(1)(16, 16, 43, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 16 -[45-46]-> 16 | Capture Group: [] + isValidTransition[24][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 45, 46, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 16 -[48-57]-> 16 | Capture Group: [] + isValidTransition[25][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 48, 57, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 16 -[61]-> 16 | Capture Group: [] + isValidTransition[26][i] <== CheckByteTransitionWithCapture(1)(16, 16, 61, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 16 -[64-90]-> 16 | Capture Group: [] + isValidTransition[27][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 64, 90, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 16 -[95]-> 16 | Capture Group: [] + isValidTransition[28][i] <== CheckByteTransitionWithCapture(1)(16, 16, 95, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 16 -[97-122]-> 16 | Capture Group: [] + isValidTransition[29][i] <== CheckByteRangeTransitionWithCapture(1)(16, 16, 97, 122, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 16 -[62]-> 17 | Capture Group:[ (1, 0)] + isValidTransition[30][i] <== CheckByteTransitionWithCapture(1)(16, 17, 62, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 17 -[13]-> 18 | Capture Group: [] + isValidTransition[31][i] <== CheckByteTransitionWithCapture(1)(17, 18, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 18 -[10]-> 19 | Capture Group: [] + isValidTransition[32][i] <== CheckByteTransitionWithCapture(1)(18, 19, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[128] <== CaptureSubstring(maxMatchBytes, 128, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/reversed_bracket_graph.json b/circom/circuits/common/reversed_bracket_graph.json new file mode 100644 index 00000000..6c69f678 --- /dev/null +++ b/circom/circuits/common/reversed_bracket_graph.json @@ -0,0 +1 @@ +{"regex":">([^<>]+)<.*","nodes":[{"state_id":0,"byte_transitions":{"62":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":1,"byte_transitions":{"62":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"0":[10],"1":[10],"2":[10],"3":[10],"4":[10],"5":[10],"6":[10],"7":[10],"8":[10],"9":[10],"10":[10],"11":[10],"12":[10],"13":[10],"14":[10],"15":[10],"16":[10],"17":[10],"18":[10],"19":[10],"20":[10],"21":[10],"22":[10],"23":[10],"24":[10],"25":[10],"26":[10],"27":[10],"28":[10],"29":[10],"30":[10],"31":[10],"32":[10],"33":[10],"34":[10],"35":[10],"36":[10],"37":[10],"38":[10],"39":[10],"40":[10],"41":[10],"42":[10],"43":[10],"44":[10],"45":[10],"46":[10],"47":[10],"48":[10],"49":[10],"50":[10],"51":[10],"52":[10],"53":[10],"54":[10],"55":[10],"56":[10],"57":[10],"58":[10],"59":[10],"61":[10],"63":[10],"64":[10],"65":[10],"66":[10],"67":[10],"68":[10],"69":[10],"70":[10],"71":[10],"72":[10],"73":[10],"74":[10],"75":[10],"76":[10],"77":[10],"78":[10],"79":[10],"80":[10],"81":[10],"82":[10],"83":[10],"84":[10],"85":[10],"86":[10],"87":[10],"88":[10],"89":[10],"90":[10],"91":[10],"92":[10],"93":[10],"94":[10],"95":[10],"96":[10],"97":[10],"98":[10],"99":[10],"100":[10],"101":[10],"102":[10],"103":[10],"104":[10],"105":[10],"106":[10],"107":[10],"108":[10],"109":[10],"110":[10],"111":[10],"112":[10],"113":[10],"114":[10],"115":[10],"116":[10],"117":[10],"118":[10],"119":[10],"120":[10],"121":[10],"122":[10],"123":[10],"124":[10],"125":[10],"126":[10],"127":[10],"194":[3],"195":[3],"196":[3],"197":[3],"198":[3],"199":[3],"200":[3],"201":[3],"202":[3],"203":[3],"204":[3],"205":[3],"206":[3],"207":[3],"208":[3],"209":[3],"210":[3],"211":[3],"212":[3],"213":[3],"214":[3],"215":[3],"216":[3],"217":[3],"218":[3],"219":[3],"220":[3],"221":[3],"222":[3],"223":[3],"224":[4],"225":[5],"226":[5],"227":[5],"228":[5],"229":[5],"230":[5],"231":[5],"232":[5],"233":[5],"234":[5],"235":[5],"236":[5],"237":[6],"238":[5],"239":[5],"240":[7],"241":[8],"242":[8],"243":[8],"244":[9]},"epsilon_transitions":[],"capture_groups":{"3":[[1,true]],"4":[[1,true]],"5":[[1,true]],"6":[[1,true]],"7":[[1,true]],"8":[[1,true]],"9":[[1,true]],"10":[[1,false],[1,true]]}},{"state_id":3,"byte_transitions":{"128":[10],"129":[10],"130":[10],"131":[10],"132":[10],"133":[10],"134":[10],"135":[10],"136":[10],"137":[10],"138":[10],"139":[10],"140":[10],"141":[10],"142":[10],"143":[10],"144":[10],"145":[10],"146":[10],"147":[10],"148":[10],"149":[10],"150":[10],"151":[10],"152":[10],"153":[10],"154":[10],"155":[10],"156":[10],"157":[10],"158":[10],"159":[10],"160":[10],"161":[10],"162":[10],"163":[10],"164":[10],"165":[10],"166":[10],"167":[10],"168":[10],"169":[10],"170":[10],"171":[10],"172":[10],"173":[10],"174":[10],"175":[10],"176":[10],"177":[10],"178":[10],"179":[10],"180":[10],"181":[10],"182":[10],"183":[10],"184":[10],"185":[10],"186":[10],"187":[10],"188":[10],"189":[10],"190":[10],"191":[10]},"epsilon_transitions":[],"capture_groups":{"10":[[1,false]]}},{"state_id":4,"byte_transitions":{"160":[3],"161":[3],"162":[3],"163":[3],"164":[3],"165":[3],"166":[3],"167":[3],"168":[3],"169":[3],"170":[3],"171":[3],"172":[3],"173":[3],"174":[3],"175":[3],"176":[3],"177":[3],"178":[3],"179":[3],"180":[3],"181":[3],"182":[3],"183":[3],"184":[3],"185":[3],"186":[3],"187":[3],"188":[3],"189":[3],"190":[3],"191":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":5,"byte_transitions":{"128":[3],"129":[3],"130":[3],"131":[3],"132":[3],"133":[3],"134":[3],"135":[3],"136":[3],"137":[3],"138":[3],"139":[3],"140":[3],"141":[3],"142":[3],"143":[3],"144":[3],"145":[3],"146":[3],"147":[3],"148":[3],"149":[3],"150":[3],"151":[3],"152":[3],"153":[3],"154":[3],"155":[3],"156":[3],"157":[3],"158":[3],"159":[3],"160":[3],"161":[3],"162":[3],"163":[3],"164":[3],"165":[3],"166":[3],"167":[3],"168":[3],"169":[3],"170":[3],"171":[3],"172":[3],"173":[3],"174":[3],"175":[3],"176":[3],"177":[3],"178":[3],"179":[3],"180":[3],"181":[3],"182":[3],"183":[3],"184":[3],"185":[3],"186":[3],"187":[3],"188":[3],"189":[3],"190":[3],"191":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":6,"byte_transitions":{"128":[3],"129":[3],"130":[3],"131":[3],"132":[3],"133":[3],"134":[3],"135":[3],"136":[3],"137":[3],"138":[3],"139":[3],"140":[3],"141":[3],"142":[3],"143":[3],"144":[3],"145":[3],"146":[3],"147":[3],"148":[3],"149":[3],"150":[3],"151":[3],"152":[3],"153":[3],"154":[3],"155":[3],"156":[3],"157":[3],"158":[3],"159":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":7,"byte_transitions":{"144":[5],"145":[5],"146":[5],"147":[5],"148":[5],"149":[5],"150":[5],"151":[5],"152":[5],"153":[5],"154":[5],"155":[5],"156":[5],"157":[5],"158":[5],"159":[5],"160":[5],"161":[5],"162":[5],"163":[5],"164":[5],"165":[5],"166":[5],"167":[5],"168":[5],"169":[5],"170":[5],"171":[5],"172":[5],"173":[5],"174":[5],"175":[5],"176":[5],"177":[5],"178":[5],"179":[5],"180":[5],"181":[5],"182":[5],"183":[5],"184":[5],"185":[5],"186":[5],"187":[5],"188":[5],"189":[5],"190":[5],"191":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":8,"byte_transitions":{"128":[5],"129":[5],"130":[5],"131":[5],"132":[5],"133":[5],"134":[5],"135":[5],"136":[5],"137":[5],"138":[5],"139":[5],"140":[5],"141":[5],"142":[5],"143":[5],"144":[5],"145":[5],"146":[5],"147":[5],"148":[5],"149":[5],"150":[5],"151":[5],"152":[5],"153":[5],"154":[5],"155":[5],"156":[5],"157":[5],"158":[5],"159":[5],"160":[5],"161":[5],"162":[5],"163":[5],"164":[5],"165":[5],"166":[5],"167":[5],"168":[5],"169":[5],"170":[5],"171":[5],"172":[5],"173":[5],"174":[5],"175":[5],"176":[5],"177":[5],"178":[5],"179":[5],"180":[5],"181":[5],"182":[5],"183":[5],"184":[5],"185":[5],"186":[5],"187":[5],"188":[5],"189":[5],"190":[5],"191":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":9,"byte_transitions":{"128":[5],"129":[5],"130":[5],"131":[5],"132":[5],"133":[5],"134":[5],"135":[5],"136":[5],"137":[5],"138":[5],"139":[5],"140":[5],"141":[5],"142":[5],"143":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":10,"byte_transitions":{"0":[10],"1":[10],"2":[10],"3":[10],"4":[10],"5":[10],"6":[10],"7":[10],"8":[10],"9":[10],"10":[10],"11":[10],"12":[10],"13":[10],"14":[10],"15":[10],"16":[10],"17":[10],"18":[10],"19":[10],"20":[10],"21":[10],"22":[10],"23":[10],"24":[10],"25":[10],"26":[10],"27":[10],"28":[10],"29":[10],"30":[10],"31":[10],"32":[10],"33":[10],"34":[10],"35":[10],"36":[10],"37":[10],"38":[10],"39":[10],"40":[10],"41":[10],"42":[10],"43":[10],"44":[10],"45":[10],"46":[10],"47":[10],"48":[10],"49":[10],"50":[10],"51":[10],"52":[10],"53":[10],"54":[10],"55":[10],"56":[10],"57":[10],"58":[10],"59":[10],"60":[11],"61":[10],"63":[10],"64":[10],"65":[10],"66":[10],"67":[10],"68":[10],"69":[10],"70":[10],"71":[10],"72":[10],"73":[10],"74":[10],"75":[10],"76":[10],"77":[10],"78":[10],"79":[10],"80":[10],"81":[10],"82":[10],"83":[10],"84":[10],"85":[10],"86":[10],"87":[10],"88":[10],"89":[10],"90":[10],"91":[10],"92":[10],"93":[10],"94":[10],"95":[10],"96":[10],"97":[10],"98":[10],"99":[10],"100":[10],"101":[10],"102":[10],"103":[10],"104":[10],"105":[10],"106":[10],"107":[10],"108":[10],"109":[10],"110":[10],"111":[10],"112":[10],"113":[10],"114":[10],"115":[10],"116":[10],"117":[10],"118":[10],"119":[10],"120":[10],"121":[10],"122":[10],"123":[10],"124":[10],"125":[10],"126":[10],"127":[10],"194":[3],"195":[3],"196":[3],"197":[3],"198":[3],"199":[3],"200":[3],"201":[3],"202":[3],"203":[3],"204":[3],"205":[3],"206":[3],"207":[3],"208":[3],"209":[3],"210":[3],"211":[3],"212":[3],"213":[3],"214":[3],"215":[3],"216":[3],"217":[3],"218":[3],"219":[3],"220":[3],"221":[3],"222":[3],"223":[3],"224":[4],"225":[5],"226":[5],"227":[5],"228":[5],"229":[5],"230":[5],"231":[5],"232":[5],"233":[5],"234":[5],"235":[5],"236":[5],"237":[6],"238":[5],"239":[5],"240":[7],"241":[8],"242":[8],"243":[8],"244":[9]},"epsilon_transitions":[],"capture_groups":{"3":[],"4":[],"5":[],"6":[],"7":[],"8":[],"9":[],"10":[[1,false]],"11":[]}},{"state_id":11,"byte_transitions":{"0":[11],"1":[11],"2":[11],"3":[11],"4":[11],"5":[11],"6":[11],"7":[11],"8":[11],"9":[11],"11":[11],"12":[11],"13":[11],"14":[11],"15":[11],"16":[11],"17":[11],"18":[11],"19":[11],"20":[11],"21":[11],"22":[11],"23":[11],"24":[11],"25":[11],"26":[11],"27":[11],"28":[11],"29":[11],"30":[11],"31":[11],"32":[11],"33":[11],"34":[11],"35":[11],"36":[11],"37":[11],"38":[11],"39":[11],"40":[11],"41":[11],"42":[11],"43":[11],"44":[11],"45":[11],"46":[11],"47":[11],"48":[11],"49":[11],"50":[11],"51":[11],"52":[11],"53":[11],"54":[11],"55":[11],"56":[11],"57":[11],"58":[11],"59":[11],"60":[11],"61":[11],"62":[11],"63":[11],"64":[11],"65":[11],"66":[11],"67":[11],"68":[11],"69":[11],"70":[11],"71":[11],"72":[11],"73":[11],"74":[11],"75":[11],"76":[11],"77":[11],"78":[11],"79":[11],"80":[11],"81":[11],"82":[11],"83":[11],"84":[11],"85":[11],"86":[11],"87":[11],"88":[11],"89":[11],"90":[11],"91":[11],"92":[11],"93":[11],"94":[11],"95":[11],"96":[11],"97":[11],"98":[11],"99":[11],"100":[11],"101":[11],"102":[11],"103":[11],"104":[11],"105":[11],"106":[11],"107":[11],"108":[11],"109":[11],"110":[11],"111":[11],"112":[11],"113":[11],"114":[11],"115":[11],"116":[11],"117":[11],"118":[11],"119":[11],"120":[11],"121":[11],"122":[11],"123":[11],"124":[11],"125":[11],"126":[11],"127":[11],"194":[12],"195":[12],"196":[12],"197":[12],"198":[12],"199":[12],"200":[12],"201":[12],"202":[12],"203":[12],"204":[12],"205":[12],"206":[12],"207":[12],"208":[12],"209":[12],"210":[12],"211":[12],"212":[12],"213":[12],"214":[12],"215":[12],"216":[12],"217":[12],"218":[12],"219":[12],"220":[12],"221":[12],"222":[12],"223":[12],"224":[13],"225":[14],"226":[14],"227":[14],"228":[14],"229":[14],"230":[14],"231":[14],"232":[14],"233":[14],"234":[14],"235":[14],"236":[14],"237":[15],"238":[14],"239":[14],"240":[16],"241":[17],"242":[17],"243":[17],"244":[18]},"epsilon_transitions":[],"capture_groups":{"11":[],"12":[],"13":[],"14":[],"15":[],"16":[],"17":[],"18":[]}},{"state_id":12,"byte_transitions":{"128":[11],"129":[11],"130":[11],"131":[11],"132":[11],"133":[11],"134":[11],"135":[11],"136":[11],"137":[11],"138":[11],"139":[11],"140":[11],"141":[11],"142":[11],"143":[11],"144":[11],"145":[11],"146":[11],"147":[11],"148":[11],"149":[11],"150":[11],"151":[11],"152":[11],"153":[11],"154":[11],"155":[11],"156":[11],"157":[11],"158":[11],"159":[11],"160":[11],"161":[11],"162":[11],"163":[11],"164":[11],"165":[11],"166":[11],"167":[11],"168":[11],"169":[11],"170":[11],"171":[11],"172":[11],"173":[11],"174":[11],"175":[11],"176":[11],"177":[11],"178":[11],"179":[11],"180":[11],"181":[11],"182":[11],"183":[11],"184":[11],"185":[11],"186":[11],"187":[11],"188":[11],"189":[11],"190":[11],"191":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":13,"byte_transitions":{"160":[12],"161":[12],"162":[12],"163":[12],"164":[12],"165":[12],"166":[12],"167":[12],"168":[12],"169":[12],"170":[12],"171":[12],"172":[12],"173":[12],"174":[12],"175":[12],"176":[12],"177":[12],"178":[12],"179":[12],"180":[12],"181":[12],"182":[12],"183":[12],"184":[12],"185":[12],"186":[12],"187":[12],"188":[12],"189":[12],"190":[12],"191":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":14,"byte_transitions":{"128":[12],"129":[12],"130":[12],"131":[12],"132":[12],"133":[12],"134":[12],"135":[12],"136":[12],"137":[12],"138":[12],"139":[12],"140":[12],"141":[12],"142":[12],"143":[12],"144":[12],"145":[12],"146":[12],"147":[12],"148":[12],"149":[12],"150":[12],"151":[12],"152":[12],"153":[12],"154":[12],"155":[12],"156":[12],"157":[12],"158":[12],"159":[12],"160":[12],"161":[12],"162":[12],"163":[12],"164":[12],"165":[12],"166":[12],"167":[12],"168":[12],"169":[12],"170":[12],"171":[12],"172":[12],"173":[12],"174":[12],"175":[12],"176":[12],"177":[12],"178":[12],"179":[12],"180":[12],"181":[12],"182":[12],"183":[12],"184":[12],"185":[12],"186":[12],"187":[12],"188":[12],"189":[12],"190":[12],"191":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":15,"byte_transitions":{"128":[12],"129":[12],"130":[12],"131":[12],"132":[12],"133":[12],"134":[12],"135":[12],"136":[12],"137":[12],"138":[12],"139":[12],"140":[12],"141":[12],"142":[12],"143":[12],"144":[12],"145":[12],"146":[12],"147":[12],"148":[12],"149":[12],"150":[12],"151":[12],"152":[12],"153":[12],"154":[12],"155":[12],"156":[12],"157":[12],"158":[12],"159":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":16,"byte_transitions":{"144":[14],"145":[14],"146":[14],"147":[14],"148":[14],"149":[14],"150":[14],"151":[14],"152":[14],"153":[14],"154":[14],"155":[14],"156":[14],"157":[14],"158":[14],"159":[14],"160":[14],"161":[14],"162":[14],"163":[14],"164":[14],"165":[14],"166":[14],"167":[14],"168":[14],"169":[14],"170":[14],"171":[14],"172":[14],"173":[14],"174":[14],"175":[14],"176":[14],"177":[14],"178":[14],"179":[14],"180":[14],"181":[14],"182":[14],"183":[14],"184":[14],"185":[14],"186":[14],"187":[14],"188":[14],"189":[14],"190":[14],"191":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":17,"byte_transitions":{"128":[14],"129":[14],"130":[14],"131":[14],"132":[14],"133":[14],"134":[14],"135":[14],"136":[14],"137":[14],"138":[14],"139":[14],"140":[14],"141":[14],"142":[14],"143":[14],"144":[14],"145":[14],"146":[14],"147":[14],"148":[14],"149":[14],"150":[14],"151":[14],"152":[14],"153":[14],"154":[14],"155":[14],"156":[14],"157":[14],"158":[14],"159":[14],"160":[14],"161":[14],"162":[14],"163":[14],"164":[14],"165":[14],"166":[14],"167":[14],"168":[14],"169":[14],"170":[14],"171":[14],"172":[14],"173":[14],"174":[14],"175":[14],"176":[14],"177":[14],"178":[14],"179":[14],"180":[14],"181":[14],"182":[14],"183":[14],"184":[14],"185":[14],"186":[14],"187":[14],"188":[14],"189":[14],"190":[14],"191":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":18,"byte_transitions":{"128":[14],"129":[14],"130":[14],"131":[14],"132":[14],"133":[14],"134":[14],"135":[14],"136":[14],"137":[14],"138":[14],"139":[14],"140":[14],"141":[14],"142":[14],"143":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}}],"start_states":[0,1],"accept_states":[11],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/reversed_bracket_regex.circom b/circom/circuits/common/reversed_bracket_regex.circom new file mode 100644 index 00000000..8561d5ac --- /dev/null +++ b/circom/circuits/common/reversed_bracket_regex.circom @@ -0,0 +1,186 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: >([^<>]+)<.* +template ReversedBracketRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 2; + var numAcceptStates = 1; + var numTransitions = 49; + var startStates[numStartStates] = [0, 1]; + var acceptStates[numAcceptStates] = [11]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[62]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 62, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 1 -[62]-> 2 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(1, 2, 62, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 2 -[194-223]-> 3 | Capture Group:[ (1, 1)] + isValidTransition[2][i] <== CheckByteRangeTransitionWithCapture(1)(2, 3, 194, 223, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[224]-> 4 | Capture Group:[ (1, 1)] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 4, 224, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 2 -[225-236]-> 5 | Capture Group:[ (1, 1)] + isValidTransition[4][i] <== CheckByteRangeTransitionWithCapture(1)(2, 5, 225, 236, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 2 -[238-239]-> 5 | Capture Group:[ (1, 1)] + isValidTransition[5][i] <== CheckByteRangeTransitionWithCapture(1)(2, 5, 238, 239, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 2 -[237]-> 6 | Capture Group:[ (1, 1)] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(2, 6, 237, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 2 -[240]-> 7 | Capture Group:[ (1, 1)] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(2, 7, 240, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 2 -[241-243]-> 8 | Capture Group:[ (1, 1)] + isValidTransition[8][i] <== CheckByteRangeTransitionWithCapture(1)(2, 8, 241, 243, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 2 -[244]-> 9 | Capture Group:[ (1, 1)] + isValidTransition[9][i] <== CheckByteTransitionWithCapture(1)(2, 9, 244, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 2 -[0-59]-> 10 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[10][i] <== CheckByteRangeTransitionWithCapture(1)(2, 10, 0, 59, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 2 -[61]-> 10 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(2, 10, 61, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 2 -[63-127]-> 10 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[12][i] <== CheckByteRangeTransitionWithCapture(1)(2, 10, 63, 127, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 3 -[128-191]-> 10 | Capture Group:[ (1, 0)] + isValidTransition[13][i] <== CheckByteRangeTransitionWithCapture(1)(3, 10, 128, 191, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 4 -[160-191]-> 3 | Capture Group: [] + isValidTransition[14][i] <== CheckByteRangeTransitionWithCapture(1)(4, 3, 160, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 5 -[128-191]-> 3 | Capture Group: [] + isValidTransition[15][i] <== CheckByteRangeTransitionWithCapture(1)(5, 3, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 6 -[128-159]-> 3 | Capture Group: [] + isValidTransition[16][i] <== CheckByteRangeTransitionWithCapture(1)(6, 3, 128, 159, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 7 -[144-191]-> 5 | Capture Group: [] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(7, 5, 144, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 8 -[128-191]-> 5 | Capture Group: [] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(8, 5, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 9 -[128-143]-> 5 | Capture Group: [] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(9, 5, 128, 143, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 10 -[194-223]-> 3 | Capture Group: [] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(10, 3, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 10 -[224]-> 4 | Capture Group: [] + isValidTransition[21][i] <== CheckByteTransitionWithCapture(1)(10, 4, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 10 -[225-236]-> 5 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(10, 5, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 10 -[238-239]-> 5 | Capture Group: [] + isValidTransition[23][i] <== CheckByteRangeTransitionWithCapture(1)(10, 5, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 10 -[237]-> 6 | Capture Group: [] + isValidTransition[24][i] <== CheckByteTransitionWithCapture(1)(10, 6, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 10 -[240]-> 7 | Capture Group: [] + isValidTransition[25][i] <== CheckByteTransitionWithCapture(1)(10, 7, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 10 -[241-243]-> 8 | Capture Group: [] + isValidTransition[26][i] <== CheckByteRangeTransitionWithCapture(1)(10, 8, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 10 -[244]-> 9 | Capture Group: [] + isValidTransition[27][i] <== CheckByteTransitionWithCapture(1)(10, 9, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 10 -[0-59]-> 10 | Capture Group:[ (1, 0)] + isValidTransition[28][i] <== CheckByteRangeTransitionWithCapture(1)(10, 10, 0, 59, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 10 -[61]-> 10 | Capture Group:[ (1, 0)] + isValidTransition[29][i] <== CheckByteTransitionWithCapture(1)(10, 10, 61, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 10 -[63-127]-> 10 | Capture Group:[ (1, 0)] + isValidTransition[30][i] <== CheckByteRangeTransitionWithCapture(1)(10, 10, 63, 127, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 10 -[60]-> 11 | Capture Group: [] + isValidTransition[31][i] <== CheckByteTransitionWithCapture(1)(10, 11, 60, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 11 -[0-9]-> 11 | Capture Group: [] + isValidTransition[32][i] <== CheckByteRangeTransitionWithCapture(1)(11, 11, 0, 9, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 33: 11 -[11-127]-> 11 | Capture Group: [] + isValidTransition[33][i] <== CheckByteRangeTransitionWithCapture(1)(11, 11, 11, 127, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 34: 11 -[194-223]-> 12 | Capture Group: [] + isValidTransition[34][i] <== CheckByteRangeTransitionWithCapture(1)(11, 12, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 35: 11 -[224]-> 13 | Capture Group: [] + isValidTransition[35][i] <== CheckByteTransitionWithCapture(1)(11, 13, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 36: 11 -[225-236]-> 14 | Capture Group: [] + isValidTransition[36][i] <== CheckByteRangeTransitionWithCapture(1)(11, 14, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 37: 11 -[238-239]-> 14 | Capture Group: [] + isValidTransition[37][i] <== CheckByteRangeTransitionWithCapture(1)(11, 14, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 38: 11 -[237]-> 15 | Capture Group: [] + isValidTransition[38][i] <== CheckByteTransitionWithCapture(1)(11, 15, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 39: 11 -[240]-> 16 | Capture Group: [] + isValidTransition[39][i] <== CheckByteTransitionWithCapture(1)(11, 16, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 40: 11 -[241-243]-> 17 | Capture Group: [] + isValidTransition[40][i] <== CheckByteRangeTransitionWithCapture(1)(11, 17, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 41: 11 -[244]-> 18 | Capture Group: [] + isValidTransition[41][i] <== CheckByteTransitionWithCapture(1)(11, 18, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 42: 12 -[128-191]-> 11 | Capture Group: [] + isValidTransition[42][i] <== CheckByteRangeTransitionWithCapture(1)(12, 11, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 43: 13 -[160-191]-> 12 | Capture Group: [] + isValidTransition[43][i] <== CheckByteRangeTransitionWithCapture(1)(13, 12, 160, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 44: 14 -[128-191]-> 12 | Capture Group: [] + isValidTransition[44][i] <== CheckByteRangeTransitionWithCapture(1)(14, 12, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 45: 15 -[128-159]-> 12 | Capture Group: [] + isValidTransition[45][i] <== CheckByteRangeTransitionWithCapture(1)(15, 12, 128, 159, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 46: 16 -[144-191]-> 14 | Capture Group: [] + isValidTransition[46][i] <== CheckByteRangeTransitionWithCapture(1)(16, 14, 144, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 47: 17 -[128-191]-> 14 | Capture Group: [] + isValidTransition[47][i] <== CheckByteRangeTransitionWithCapture(1)(17, 14, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 48: 18 -[128-143]-> 14 | Capture Group: [] + isValidTransition[48][i] <== CheckByteRangeTransitionWithCapture(1)(18, 14, 128, 143, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[64] <== CaptureSubstring(maxMatchBytes, 64, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/simple_graph.json b/circom/circuits/common/simple_graph.json new file mode 100644 index 00000000..537d5882 --- /dev/null +++ b/circom/circuits/common/simple_graph.json @@ -0,0 +1 @@ +{"regex":"a*b","nodes":[{"state_id":0,"byte_transitions":{"97":[1],"98":[4]},"epsilon_transitions":[],"capture_groups":{"1":[],"4":[]}},{"state_id":1,"byte_transitions":{"97":[1],"98":[4]},"epsilon_transitions":[],"capture_groups":{"1":[],"4":[]}},{"state_id":2,"byte_transitions":{"97":[1]},"epsilon_transitions":[],"capture_groups":{"1":[]}},{"state_id":3,"byte_transitions":{"98":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,2,3],"accept_states":[4],"num_capture_groups":0} \ No newline at end of file diff --git a/circom/circuits/common/simple_regex.circom b/circom/circuits/common/simple_regex.circom new file mode 100644 index 00000000..b6d5c963 --- /dev/null +++ b/circom/circuits/common/simple_regex.circom @@ -0,0 +1,94 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: a*b +template SimpleRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 6; + var startStates[numStartStates] = [0, 2, 3]; + var acceptStates[numAcceptStates] = [4]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[97]-> 1 + isValidTransition[0][i] <== CheckByteTransition()(0, 1, 97, currStates[i], nextStates[i], haystack[i]); + // Transition 1: 0 -[98]-> 4 + isValidTransition[1][i] <== CheckByteTransition()(0, 4, 98, currStates[i], nextStates[i], haystack[i]); + // Transition 2: 1 -[97]-> 1 + isValidTransition[2][i] <== CheckByteTransition()(1, 1, 97, currStates[i], nextStates[i], haystack[i]); + // Transition 3: 1 -[98]-> 4 + isValidTransition[3][i] <== CheckByteTransition()(1, 4, 98, currStates[i], nextStates[i], haystack[i]); + // Transition 4: 2 -[97]-> 1 + isValidTransition[4][i] <== CheckByteTransition()(2, 1, 97, currStates[i], nextStates[i], haystack[i]); + // Transition 5: 3 -[98]-> 4 + isValidTransition[5][i] <== CheckByteTransition()(3, 4, 98, currStates[i], nextStates[i], haystack[i]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + +} diff --git a/circom/circuits/common/subject_all_graph.json b/circom/circuits/common/subject_all_graph.json new file mode 100644 index 00000000..c461f1d7 --- /dev/null +++ b/circom/circuits/common/subject_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)subject:([a-z]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"115":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"115":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"117":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"98":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"106":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"101":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"99":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"116":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"58":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"97":[12],"98":[12],"99":[12],"100":[12],"101":[12],"102":[12],"103":[12],"104":[12],"105":[12],"106":[12],"107":[12],"108":[12],"109":[12],"110":[12],"111":[12],"112":[12],"113":[12],"114":[12],"115":[12],"116":[12],"117":[12],"118":[12],"119":[12],"120":[12],"121":[12],"122":[12]},"epsilon_transitions":[],"capture_groups":{"12":[[1,false],[1,true]]}},{"state_id":12,"byte_transitions":{"13":[13],"97":[12],"98":[12],"99":[12],"100":[12],"101":[12],"102":[12],"103":[12],"104":[12],"105":[12],"106":[12],"107":[12],"108":[12],"109":[12],"110":[12],"111":[12],"112":[12],"113":[12],"114":[12],"115":[12],"116":[12],"117":[12],"118":[12],"119":[12],"120":[12],"121":[12],"122":[12]},"epsilon_transitions":[],"capture_groups":{"12":[[1,false]],"13":[]}},{"state_id":13,"byte_transitions":{"10":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[14],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/subject_all_regex.circom b/circom/circuits/common/subject_all_regex.circom new file mode 100644 index 00000000..35ed7c44 --- /dev/null +++ b/circom/circuits/common/subject_all_regex.circom @@ -0,0 +1,120 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: (?:\r\n|^)subject:([a-z]+)\r\n +template SubjectAllRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 16; + var startStates[numStartStates] = [0, 1, 3]; + var acceptStates[numAcceptStates] = [14]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[13]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[115]-> 4 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(0, 4, 115, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 1 -[13]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteTransitionWithCapture(1)(1, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[10]-> 3 | Capture Group: [] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 3, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 3 -[115]-> 4 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(3, 4, 115, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 4 -[117]-> 5 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(4, 5, 117, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 5 -[98]-> 6 | Capture Group: [] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(5, 6, 98, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 6 -[106]-> 7 | Capture Group: [] + isValidTransition[7][i] <== CheckByteTransitionWithCapture(1)(6, 7, 106, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 7 -[101]-> 8 | Capture Group: [] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(7, 8, 101, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 8 -[99]-> 9 | Capture Group: [] + isValidTransition[9][i] <== CheckByteTransitionWithCapture(1)(8, 9, 99, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 9 -[116]-> 10 | Capture Group: [] + isValidTransition[10][i] <== CheckByteTransitionWithCapture(1)(9, 10, 116, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 10 -[58]-> 11 | Capture Group: [] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(10, 11, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 11 -[97-122]-> 12 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[12][i] <== CheckByteRangeTransitionWithCapture(1)(11, 12, 97, 122, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 12 -[97-122]-> 12 | Capture Group:[ (1, 0)] + isValidTransition[13][i] <== CheckByteRangeTransitionWithCapture(1)(12, 12, 97, 122, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 12 -[13]-> 13 | Capture Group: [] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(12, 13, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 13 -[10]-> 14 | Capture Group: [] + isValidTransition[15][i] <== CheckByteTransitionWithCapture(1)(13, 14, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[64] <== CaptureSubstring(maxMatchBytes, 64, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/common/to_all_graph.json b/circom/circuits/common/to_all_graph.json new file mode 100644 index 00000000..881c6913 --- /dev/null +++ b/circom/circuits/common/to_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)to:([^\r\n]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"116":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"116":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"111":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"58":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"0":[14],"1":[14],"2":[14],"3":[14],"4":[14],"5":[14],"6":[14],"7":[14],"8":[14],"9":[14],"11":[14],"12":[14],"14":[14],"15":[14],"16":[14],"17":[14],"18":[14],"19":[14],"20":[14],"21":[14],"22":[14],"23":[14],"24":[14],"25":[14],"26":[14],"27":[14],"28":[14],"29":[14],"30":[14],"31":[14],"32":[14],"33":[14],"34":[14],"35":[14],"36":[14],"37":[14],"38":[14],"39":[14],"40":[14],"41":[14],"42":[14],"43":[14],"44":[14],"45":[14],"46":[14],"47":[14],"48":[14],"49":[14],"50":[14],"51":[14],"52":[14],"53":[14],"54":[14],"55":[14],"56":[14],"57":[14],"58":[14],"59":[14],"60":[14],"61":[14],"62":[14],"63":[14],"64":[14],"65":[14],"66":[14],"67":[14],"68":[14],"69":[14],"70":[14],"71":[14],"72":[14],"73":[14],"74":[14],"75":[14],"76":[14],"77":[14],"78":[14],"79":[14],"80":[14],"81":[14],"82":[14],"83":[14],"84":[14],"85":[14],"86":[14],"87":[14],"88":[14],"89":[14],"90":[14],"91":[14],"92":[14],"93":[14],"94":[14],"95":[14],"96":[14],"97":[14],"98":[14],"99":[14],"100":[14],"101":[14],"102":[14],"103":[14],"104":[14],"105":[14],"106":[14],"107":[14],"108":[14],"109":[14],"110":[14],"111":[14],"112":[14],"113":[14],"114":[14],"115":[14],"116":[14],"117":[14],"118":[14],"119":[14],"120":[14],"121":[14],"122":[14],"123":[14],"124":[14],"125":[14],"126":[14],"127":[14],"194":[7],"195":[7],"196":[7],"197":[7],"198":[7],"199":[7],"200":[7],"201":[7],"202":[7],"203":[7],"204":[7],"205":[7],"206":[7],"207":[7],"208":[7],"209":[7],"210":[7],"211":[7],"212":[7],"213":[7],"214":[7],"215":[7],"216":[7],"217":[7],"218":[7],"219":[7],"220":[7],"221":[7],"222":[7],"223":[7],"224":[8],"225":[9],"226":[9],"227":[9],"228":[9],"229":[9],"230":[9],"231":[9],"232":[9],"233":[9],"234":[9],"235":[9],"236":[9],"237":[10],"238":[9],"239":[9],"240":[11],"241":[12],"242":[12],"243":[12],"244":[13]},"epsilon_transitions":[],"capture_groups":{"7":[[1,true]],"8":[[1,true]],"9":[[1,true]],"10":[[1,true]],"11":[[1,true]],"12":[[1,true]],"13":[[1,true]],"14":[[1,false],[1,true]]}},{"state_id":7,"byte_transitions":{"128":[14],"129":[14],"130":[14],"131":[14],"132":[14],"133":[14],"134":[14],"135":[14],"136":[14],"137":[14],"138":[14],"139":[14],"140":[14],"141":[14],"142":[14],"143":[14],"144":[14],"145":[14],"146":[14],"147":[14],"148":[14],"149":[14],"150":[14],"151":[14],"152":[14],"153":[14],"154":[14],"155":[14],"156":[14],"157":[14],"158":[14],"159":[14],"160":[14],"161":[14],"162":[14],"163":[14],"164":[14],"165":[14],"166":[14],"167":[14],"168":[14],"169":[14],"170":[14],"171":[14],"172":[14],"173":[14],"174":[14],"175":[14],"176":[14],"177":[14],"178":[14],"179":[14],"180":[14],"181":[14],"182":[14],"183":[14],"184":[14],"185":[14],"186":[14],"187":[14],"188":[14],"189":[14],"190":[14],"191":[14]},"epsilon_transitions":[],"capture_groups":{"14":[[1,false]]}},{"state_id":8,"byte_transitions":{"160":[7],"161":[7],"162":[7],"163":[7],"164":[7],"165":[7],"166":[7],"167":[7],"168":[7],"169":[7],"170":[7],"171":[7],"172":[7],"173":[7],"174":[7],"175":[7],"176":[7],"177":[7],"178":[7],"179":[7],"180":[7],"181":[7],"182":[7],"183":[7],"184":[7],"185":[7],"186":[7],"187":[7],"188":[7],"189":[7],"190":[7],"191":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":9,"byte_transitions":{"128":[7],"129":[7],"130":[7],"131":[7],"132":[7],"133":[7],"134":[7],"135":[7],"136":[7],"137":[7],"138":[7],"139":[7],"140":[7],"141":[7],"142":[7],"143":[7],"144":[7],"145":[7],"146":[7],"147":[7],"148":[7],"149":[7],"150":[7],"151":[7],"152":[7],"153":[7],"154":[7],"155":[7],"156":[7],"157":[7],"158":[7],"159":[7],"160":[7],"161":[7],"162":[7],"163":[7],"164":[7],"165":[7],"166":[7],"167":[7],"168":[7],"169":[7],"170":[7],"171":[7],"172":[7],"173":[7],"174":[7],"175":[7],"176":[7],"177":[7],"178":[7],"179":[7],"180":[7],"181":[7],"182":[7],"183":[7],"184":[7],"185":[7],"186":[7],"187":[7],"188":[7],"189":[7],"190":[7],"191":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":10,"byte_transitions":{"128":[7],"129":[7],"130":[7],"131":[7],"132":[7],"133":[7],"134":[7],"135":[7],"136":[7],"137":[7],"138":[7],"139":[7],"140":[7],"141":[7],"142":[7],"143":[7],"144":[7],"145":[7],"146":[7],"147":[7],"148":[7],"149":[7],"150":[7],"151":[7],"152":[7],"153":[7],"154":[7],"155":[7],"156":[7],"157":[7],"158":[7],"159":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":11,"byte_transitions":{"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":12,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":13,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":14,"byte_transitions":{"0":[14],"1":[14],"2":[14],"3":[14],"4":[14],"5":[14],"6":[14],"7":[14],"8":[14],"9":[14],"11":[14],"12":[14],"13":[15],"14":[14],"15":[14],"16":[14],"17":[14],"18":[14],"19":[14],"20":[14],"21":[14],"22":[14],"23":[14],"24":[14],"25":[14],"26":[14],"27":[14],"28":[14],"29":[14],"30":[14],"31":[14],"32":[14],"33":[14],"34":[14],"35":[14],"36":[14],"37":[14],"38":[14],"39":[14],"40":[14],"41":[14],"42":[14],"43":[14],"44":[14],"45":[14],"46":[14],"47":[14],"48":[14],"49":[14],"50":[14],"51":[14],"52":[14],"53":[14],"54":[14],"55":[14],"56":[14],"57":[14],"58":[14],"59":[14],"60":[14],"61":[14],"62":[14],"63":[14],"64":[14],"65":[14],"66":[14],"67":[14],"68":[14],"69":[14],"70":[14],"71":[14],"72":[14],"73":[14],"74":[14],"75":[14],"76":[14],"77":[14],"78":[14],"79":[14],"80":[14],"81":[14],"82":[14],"83":[14],"84":[14],"85":[14],"86":[14],"87":[14],"88":[14],"89":[14],"90":[14],"91":[14],"92":[14],"93":[14],"94":[14],"95":[14],"96":[14],"97":[14],"98":[14],"99":[14],"100":[14],"101":[14],"102":[14],"103":[14],"104":[14],"105":[14],"106":[14],"107":[14],"108":[14],"109":[14],"110":[14],"111":[14],"112":[14],"113":[14],"114":[14],"115":[14],"116":[14],"117":[14],"118":[14],"119":[14],"120":[14],"121":[14],"122":[14],"123":[14],"124":[14],"125":[14],"126":[14],"127":[14],"194":[7],"195":[7],"196":[7],"197":[7],"198":[7],"199":[7],"200":[7],"201":[7],"202":[7],"203":[7],"204":[7],"205":[7],"206":[7],"207":[7],"208":[7],"209":[7],"210":[7],"211":[7],"212":[7],"213":[7],"214":[7],"215":[7],"216":[7],"217":[7],"218":[7],"219":[7],"220":[7],"221":[7],"222":[7],"223":[7],"224":[8],"225":[9],"226":[9],"227":[9],"228":[9],"229":[9],"230":[9],"231":[9],"232":[9],"233":[9],"234":[9],"235":[9],"236":[9],"237":[10],"238":[9],"239":[9],"240":[11],"241":[12],"242":[12],"243":[12],"244":[13]},"epsilon_transitions":[],"capture_groups":{"7":[],"8":[],"9":[],"10":[],"11":[],"12":[],"13":[],"14":[[1,false]],"15":[]}},{"state_id":15,"byte_transitions":{"10":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[16],"num_capture_groups":1} \ No newline at end of file diff --git a/circom/circuits/common/to_all_regex.circom b/circom/circuits/common/to_all_regex.circom new file mode 100644 index 00000000..3e349e10 --- /dev/null +++ b/circom/circuits/common/to_all_regex.circom @@ -0,0 +1,164 @@ +pragma circom 2.1.5; + +include "circomlib/circuits/comparators.circom"; +include "circomlib/circuits/gates.circom"; +include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; +include "@zk-email/circuits/utils/array.circom"; +include "@zk-email/circuits/utils/regex.circom"; + +// regex: (?:\r\n|^)to:([^\r\n]+)\r\n +template ToAllRegex(maxHaystackBytes, maxMatchBytes) { + signal input inHaystack[maxHaystackBytes]; + signal input matchStart; + signal input matchLength; + + signal input currStates[maxMatchBytes]; + signal input nextStates[maxMatchBytes]; + signal input captureGroup1Id[maxMatchBytes]; + signal input captureGroup1Start[maxMatchBytes]; + signal output isValid; + + var numStartStates = 3; + var numAcceptStates = 1; + var numTransitions = 38; + var startStates[numStartStates] = [0, 1, 3]; + var acceptStates[numAcceptStates] = [16]; + + signal isCurrentState[numTransitions][maxMatchBytes]; + signal isNextState[numTransitions][maxMatchBytes]; + signal isValidTransition[numTransitions][maxMatchBytes]; + signal reachedLastTransition[maxMatchBytes]; + signal isValidRegex[maxMatchBytes]; + signal isValidRegexTemp[maxMatchBytes]; + signal isWithinPathLength[maxMatchBytes]; + signal isWithinPathLengthMinusOne[maxMatchBytes-2]; + signal isTransitionLinked[maxMatchBytes]; + + component isValidStartState; + + signal reachedAcceptState[maxMatchBytes]; + + component isValidTraversal[maxMatchBytes]; + + // Select the haystack from the input + signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength); + + // Check if the first state in the haystack is a valid start state + isValidStartState = MultiOR(numStartStates); + for (var i = 0; i < numStartStates; i++) { + isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]); + } + isValidStartState.out === 1; + + for (var i = 0; i < maxMatchBytes; i++) { + isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]); + + // Check if the traversal is a valid path + if (i < maxMatchBytes-2) { + isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]); + isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]); + isTransitionLinked[i] === isWithinPathLengthMinusOne[i]; + } + + // Transition 0: 0 -[13]-> 2 | Capture Group: [] + isValidTransition[0][i] <== CheckByteTransitionWithCapture(1)(0, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 1: 0 -[116]-> 4 | Capture Group: [] + isValidTransition[1][i] <== CheckByteTransitionWithCapture(1)(0, 4, 116, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 2: 1 -[13]-> 2 | Capture Group: [] + isValidTransition[2][i] <== CheckByteTransitionWithCapture(1)(1, 2, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 3: 2 -[10]-> 3 | Capture Group: [] + isValidTransition[3][i] <== CheckByteTransitionWithCapture(1)(2, 3, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 4: 3 -[116]-> 4 | Capture Group: [] + isValidTransition[4][i] <== CheckByteTransitionWithCapture(1)(3, 4, 116, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 5: 4 -[111]-> 5 | Capture Group: [] + isValidTransition[5][i] <== CheckByteTransitionWithCapture(1)(4, 5, 111, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 6: 5 -[58]-> 6 | Capture Group: [] + isValidTransition[6][i] <== CheckByteTransitionWithCapture(1)(5, 6, 58, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 7: 6 -[194-223]-> 7 | Capture Group:[ (1, 1)] + isValidTransition[7][i] <== CheckByteRangeTransitionWithCapture(1)(6, 7, 194, 223, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 8: 6 -[224]-> 8 | Capture Group:[ (1, 1)] + isValidTransition[8][i] <== CheckByteTransitionWithCapture(1)(6, 8, 224, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 9: 6 -[225-236]-> 9 | Capture Group:[ (1, 1)] + isValidTransition[9][i] <== CheckByteRangeTransitionWithCapture(1)(6, 9, 225, 236, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 10: 6 -[238-239]-> 9 | Capture Group:[ (1, 1)] + isValidTransition[10][i] <== CheckByteRangeTransitionWithCapture(1)(6, 9, 238, 239, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 11: 6 -[237]-> 10 | Capture Group:[ (1, 1)] + isValidTransition[11][i] <== CheckByteTransitionWithCapture(1)(6, 10, 237, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 12: 6 -[240]-> 11 | Capture Group:[ (1, 1)] + isValidTransition[12][i] <== CheckByteTransitionWithCapture(1)(6, 11, 240, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 13: 6 -[241-243]-> 12 | Capture Group:[ (1, 1)] + isValidTransition[13][i] <== CheckByteRangeTransitionWithCapture(1)(6, 12, 241, 243, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 14: 6 -[244]-> 13 | Capture Group:[ (1, 1)] + isValidTransition[14][i] <== CheckByteTransitionWithCapture(1)(6, 13, 244, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 15: 6 -[0-9]-> 14 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[15][i] <== CheckByteRangeTransitionWithCapture(1)(6, 14, 0, 9, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 16: 6 -[11-12]-> 14 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[16][i] <== CheckByteRangeTransitionWithCapture(1)(6, 14, 11, 12, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 17: 6 -[14-127]-> 14 | Capture Group:[ (1, 0), (1, 1)] + isValidTransition[17][i] <== CheckByteRangeTransitionWithCapture(1)(6, 14, 14, 127, [1], [1], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 18: 7 -[128-191]-> 14 | Capture Group:[ (1, 0)] + isValidTransition[18][i] <== CheckByteRangeTransitionWithCapture(1)(7, 14, 128, 191, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 19: 8 -[160-191]-> 7 | Capture Group: [] + isValidTransition[19][i] <== CheckByteRangeTransitionWithCapture(1)(8, 7, 160, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 20: 9 -[128-191]-> 7 | Capture Group: [] + isValidTransition[20][i] <== CheckByteRangeTransitionWithCapture(1)(9, 7, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 21: 10 -[128-159]-> 7 | Capture Group: [] + isValidTransition[21][i] <== CheckByteRangeTransitionWithCapture(1)(10, 7, 128, 159, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 22: 11 -[144-191]-> 9 | Capture Group: [] + isValidTransition[22][i] <== CheckByteRangeTransitionWithCapture(1)(11, 9, 144, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 23: 12 -[128-191]-> 9 | Capture Group: [] + isValidTransition[23][i] <== CheckByteRangeTransitionWithCapture(1)(12, 9, 128, 191, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 24: 13 -[128-143]-> 9 | Capture Group: [] + isValidTransition[24][i] <== CheckByteRangeTransitionWithCapture(1)(13, 9, 128, 143, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 25: 14 -[194-223]-> 7 | Capture Group: [] + isValidTransition[25][i] <== CheckByteRangeTransitionWithCapture(1)(14, 7, 194, 223, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 26: 14 -[224]-> 8 | Capture Group: [] + isValidTransition[26][i] <== CheckByteTransitionWithCapture(1)(14, 8, 224, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 27: 14 -[225-236]-> 9 | Capture Group: [] + isValidTransition[27][i] <== CheckByteRangeTransitionWithCapture(1)(14, 9, 225, 236, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 28: 14 -[238-239]-> 9 | Capture Group: [] + isValidTransition[28][i] <== CheckByteRangeTransitionWithCapture(1)(14, 9, 238, 239, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 29: 14 -[237]-> 10 | Capture Group: [] + isValidTransition[29][i] <== CheckByteTransitionWithCapture(1)(14, 10, 237, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 30: 14 -[240]-> 11 | Capture Group: [] + isValidTransition[30][i] <== CheckByteTransitionWithCapture(1)(14, 11, 240, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 31: 14 -[241-243]-> 12 | Capture Group: [] + isValidTransition[31][i] <== CheckByteRangeTransitionWithCapture(1)(14, 12, 241, 243, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 32: 14 -[244]-> 13 | Capture Group: [] + isValidTransition[32][i] <== CheckByteTransitionWithCapture(1)(14, 13, 244, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 33: 14 -[0-9]-> 14 | Capture Group:[ (1, 0)] + isValidTransition[33][i] <== CheckByteRangeTransitionWithCapture(1)(14, 14, 0, 9, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 34: 14 -[11-12]-> 14 | Capture Group:[ (1, 0)] + isValidTransition[34][i] <== CheckByteRangeTransitionWithCapture(1)(14, 14, 11, 12, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 35: 14 -[14-127]-> 14 | Capture Group:[ (1, 0)] + isValidTransition[35][i] <== CheckByteRangeTransitionWithCapture(1)(14, 14, 14, 127, [1], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 36: 14 -[13]-> 15 | Capture Group: [] + isValidTransition[36][i] <== CheckByteTransitionWithCapture(1)(14, 15, 13, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + // Transition 37: 15 -[10]-> 16 | Capture Group: [] + isValidTransition[37][i] <== CheckByteTransitionWithCapture(1)(15, 16, 10, [0], [0], currStates[i], nextStates[i], haystack[i], [captureGroup1Id[i]], [captureGroup1Start[i]]); + + // Combine all valid transitions for this byte + isValidTraversal[i] = MultiOR(numTransitions); + for (var j = 0; j < numTransitions; j++) { + isValidTraversal[i].in[j] <== isValidTransition[j][i]; + } + isValidTraversal[i].out === isWithinPathLength[i]; + + // Check if any accept state has been reached at the last transition + reachedLastTransition[i] <== IsEqual()([i, matchLength-1]); + reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]); + isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]); + if (i == 0) { + isValidRegex[i] <== isValidRegexTemp[i]; + } else { + isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1]; + } + } + + isValid <== isValidRegex[maxMatchBytes-1]; + + signal input captureGroupStartIndices[1]; + + // Capture Group 1 + signal output capture1[64] <== CaptureSubstring(maxMatchBytes, 64, 1)(captureGroupStartIndices[0], haystack, captureGroup1Id, captureGroup1Start); +} diff --git a/circom/circuits/regex_helpers.circom b/circom/circuits/regex_helpers.circom new file mode 100644 index 00000000..c38bdfb4 --- /dev/null +++ b/circom/circuits/regex_helpers.circom @@ -0,0 +1,166 @@ +pragma circom 2.2.2; + +include "circomlib/circuits/comparators.circom"; + +template MultiOR(n) { + signal input in[n]; + signal output out; + + signal sums[n]; + sums[0] <== in[0]; + for (var i = 1; i < n; i++) { + sums[i] <== sums[i-1] + in[i]; + } + + component is_zero = IsZero(); + is_zero.in <== sums[n-1]; + out <== 1 - is_zero.out; +} + +template CheckByteTransition() { + signal input currState; + signal input nextState; + signal input byte; + + signal input inCurrState; + signal input inNextState; + signal input inByte; + + signal output out; + + signal isCurrentState <== IsEqual()([currState, inCurrState]); + signal isNextState <== IsEqual()([nextState, inNextState]); + signal isByteEqual <== IsEqual()([byte, inByte]); + + out <== MultiAND(3)([isCurrentState, isNextState, isByteEqual]); +} + +template CheckByteRangeTransition() { + signal input currState; + signal input nextState; + signal input byteStart; + signal input byteEnd; + + signal input inCurrState; + signal input inNextState; + signal input inByte; + + signal output out; + + signal isCurrentState <== IsEqual()([currState, inCurrState]); + signal isNextState <== IsEqual()([nextState, inNextState]); + + signal isByteValid[2]; + isByteValid[0] <== GreaterEqThan(8)([inByte, byteStart]); + isByteValid[1] <== LessEqThan(8)([inByte, byteEnd]); + + out <== MultiAND(4)([isCurrentState, isNextState, isByteValid[0], isByteValid[1]]); +} + +template CheckByteTransitionWithCapture(numCaptureGroups) { + signal input currState; + signal input nextState; + signal input byte; + signal input captureGroupId[numCaptureGroups]; + signal input captureGroupStart[numCaptureGroups]; + + signal input inCurrState; + signal input inNextState; + signal input inByte; + signal input inCaptureGroupId[numCaptureGroups]; + signal input inCaptureGroupStart[numCaptureGroups]; + signal output out; + + component isCaptureGroupEqual = MultiAND(numCaptureGroups); + component isCaptureGroupStartEqual = MultiAND(numCaptureGroups); + + for (var i = 0; i < numCaptureGroups; i++) { + isCaptureGroupEqual.in[i] <== IsEqual()([captureGroupId[i], inCaptureGroupId[i]]); + isCaptureGroupStartEqual.in[i] <== IsEqual()([captureGroupStart[i], inCaptureGroupStart[i]]); + } + signal isValidTransition <== CheckByteTransition()(currState, nextState, byte, inCurrState, inNextState, inByte); + + out <== MultiAND(3)([isValidTransition, isCaptureGroupEqual.out, isCaptureGroupStartEqual.out]); +} + +template CheckByteRangeTransitionWithCapture(numCaptureGroups) { + signal input currState; + signal input nextState; + signal input byteStart; + signal input byteEnd; + signal input captureGroupId[numCaptureGroups]; + signal input captureGroupStart[numCaptureGroups]; + + signal input inCurrState; + signal input inNextState; + signal input inByte; + signal input inCaptureGroupId[numCaptureGroups]; + signal input inCaptureGroupStart[numCaptureGroups]; + + signal output out; + + component isCaptureGroupEqual = MultiAND(numCaptureGroups); + component isCaptureGroupStartEqual = MultiAND(numCaptureGroups); + for (var i = 0; i < numCaptureGroups; i++) { + isCaptureGroupEqual.in[i] <== IsEqual()([captureGroupId[i], inCaptureGroupId[i]]); + isCaptureGroupStartEqual.in[i] <== IsEqual()([captureGroupStart[i], inCaptureGroupStart[i]]); + } + signal isValidTransition <== CheckByteRangeTransition()(currState, nextState, byteStart, byteEnd, inCurrState, inNextState, inByte); + + out <== MultiAND(3)([isValidTransition, isCaptureGroupEqual.out, isCaptureGroupStartEqual.out]); +} + +template CaptureSubstring(maxBytes, maxSubstringBytes, captureId) { + signal input startIndex; + signal input haystack[maxBytes]; + signal input captureIds[maxBytes]; + signal input captureStarts[maxBytes]; + + signal output substring[maxSubstringBytes]; + + signal isCapture[maxBytes]; + signal isCaptureStart[maxBytes]; + signal isCaptureEnd[maxBytes]; + + signal isValidCaptureStart[maxBytes]; + signal isValidCaptureStartTemp[maxBytes]; + signal isValidCaptureEnd[maxBytes]; + signal isValidCaptureEndTemp[maxBytes]; + + signal captureMask[maxBytes]; + signal capture[maxBytes]; + + for (var i = 0; i < maxBytes; i++) { + isCapture[i] <== IsEqual()([captureIds[i], captureId]); + } + + for (var i = 0; i < maxBytes; i++) { + isCaptureStart[i] <== IsEqual()([captureStarts[i], 1]); + isValidCaptureStartTemp[i] <== AND()(isCapture[i], isCaptureStart[i]); + if (i == 0) { + isValidCaptureStart[i] <== isValidCaptureStartTemp[i]; + } else { + isValidCaptureStart[i] <== OR()(isValidCaptureStartTemp[i], isValidCaptureStart[i-1]); + } + } + + for (var i = maxBytes - 1; i >= 0; i--) { + isCaptureEnd[i] <== IsEqual()([captureStarts[i], 0]); + isValidCaptureEndTemp[i] <== AND()(isCapture[i], isCaptureEnd[i]); + if (i == maxBytes - 1) { + isValidCaptureEnd[i] <== isValidCaptureEndTemp[i]; + } else { + isValidCaptureEnd[i] <== OR()(isValidCaptureEndTemp[i], isValidCaptureEnd[i+1]); + } + } + + for (var i = 0; i < maxBytes; i++) { + captureMask[i] <== AND()(isValidCaptureStart[i], isValidCaptureEnd[i]); + } + + for (var i = 0; i < maxBytes; i++) { + capture[i] <== haystack[i] * captureMask[i]; + } + + substring <== SelectRegexReveal(maxBytes, maxSubstringBytes)(capture, startIndex); +} diff --git a/circom/circuits/tests/body_hash.test.js b/circom/circuits/tests/body_hash.test.js new file mode 100644 index 00000000..ee7ae4ce --- /dev/null +++ b/circom/circuits/tests/body_hash.test.js @@ -0,0 +1,132 @@ +import circom_tester from "circom_tester"; +import * as path from "path"; +import { readFileSync, writeFileSync } from "fs"; +import compiler, { + genCircuitInputs, + ProvingFramework, +} from "../../../compiler/pkg"; +const option = { + include: path.join(__dirname, "../../node_modules"), +}; +const wasm_tester = circom_tester.wasm; + +jest.setTimeout(600000); +describe("Bodyhash Regex", () => { + let graph; + let circuit; + beforeAll(async () => { + const body_hash_json = readFileSync( + path.join(__dirname, "../../regexes/body_hash.json"), + "utf8" + ); + const output = compiler.genFromDecomposed( + body_hash_json, + "BodyHash", + ProvingFramework.Circom + ); + writeFileSync( + path.join(__dirname, "../common/body_hash_graph.json"), + output.graph + ); + writeFileSync( + path.join(__dirname, "../common/body_hash_regex.circom"), + output.code + ); + + // graph = JSON.parse( + // readFileSync( + // path.join(__dirname, "../common/body_hash_graph.json"), + // "utf8" + // ) + // ); + graph = JSON.parse(output.graph); + circuit = await wasm_tester( + path.join(__dirname, "./circuits/test_body_hash_regex.circom"), + option + ); + }); + + it("bodyhash in the header", async () => { + const signatureField = `dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; + const bodyHash = signatureField.split("; bh=")[1].split(";")[0]; + const { type, ...circuitInputs } = JSON.parse( + genCircuitInputs( + JSON.stringify(graph), + signatureField, + 300, + 299, + ProvingFramework.Circom + ) + ); + let { captureGroupIds, captureGroupStarts, ...rest } = circuitInputs; + let captureGroup1Id = captureGroupIds[0]; + let captureGroup1Start = captureGroupStarts[0]; + rest.captureGroup1Id = captureGroup1Id; + rest.captureGroup1Start = captureGroup1Start; + + const witness = await circuit.calculateWitness(rest); + await circuit.checkConstraints(witness); + expect(1n).toEqual(witness[1]); + const extractedBodyHash = Array.from( + { length: bodyHash.length }, + (_, idx) => String.fromCharCode(Number(witness[2 + idx])) + ).join(""); + expect(bodyHash).toEqual(extractedBodyHash); + }); + + it("bodyhash after new line", async () => { + const signatureField = `\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; + const bodyHash = signatureField.split("; bh=")[1].split(";")[0]; + const { type, ...circuitInputs } = JSON.parse( + genCircuitInputs( + JSON.stringify(graph), + signatureField, + 300, + 299, + ProvingFramework.Circom + ) + ); + let { captureGroupIds, captureGroupStarts, ...rest } = circuitInputs; + let captureGroup1Id = captureGroupIds[0]; + let captureGroup1Start = captureGroupStarts[0]; + rest.captureGroup1Id = captureGroup1Id; + rest.captureGroup1Start = captureGroup1Start; + + const witness = await circuit.calculateWitness(rest); + await circuit.checkConstraints(witness); + expect(1n).toEqual(witness[1]); + const extractedBodyHash = Array.from( + { length: bodyHash.length }, + (_, idx) => String.fromCharCode(Number(witness[2 + idx])) + ).join(""); + expect(bodyHash).toEqual(extractedBodyHash); + }); + + it("bodyhash in the invalid field", async () => { + const signatureField = `\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; + const bodyHash = signatureField.split("; bh=")[1].split(";")[0]; + const { type, ...circuitInputs } = JSON.parse( + genCircuitInputs( + JSON.stringify(graph), + signatureField, + 300, + 299, + ProvingFramework.Circom + ) + ); + let { captureGroupIds, captureGroupStarts, ...rest } = circuitInputs; + let captureGroup1Id = captureGroupIds[0]; + let captureGroup1Start = captureGroupStarts[0]; + rest.captureGroup1Id = captureGroup1Id; + rest.captureGroup1Start = captureGroup1Start; + + rest.inHaystack.splice(2, 0, 116, 111, 58, 32); + rest.inHaystack = rest.inHaystack.slice(0, 1024); + await expect( + (async () => { + const witness = await circuit.calculateWitness(rest); + await circuit.checkConstraints(witness); + })() + ).rejects.toThrow(); + }); +}); diff --git a/circom/circuits/tests/circuits/test_body_hash_regex.circom b/circom/circuits/tests/circuits/test_body_hash_regex.circom new file mode 100644 index 00000000..03163bd4 --- /dev/null +++ b/circom/circuits/tests/circuits/test_body_hash_regex.circom @@ -0,0 +1,5 @@ +pragma circom 2.1.5; + +include "../../common/body_hash_regex.circom"; + +component main = BodyHashRegex(300, 299); \ No newline at end of file diff --git a/circom/index.ts b/circom/index.ts new file mode 100644 index 00000000..f67b2c64 --- /dev/null +++ b/circom/index.ts @@ -0,0 +1 @@ +console.log("Hello via Bun!"); \ No newline at end of file diff --git a/packages/circom/package.json b/circom/package.json similarity index 60% rename from packages/circom/package.json rename to circom/package.json index 157c930d..da851092 100644 --- a/packages/circom/package.json +++ b/circom/package.json @@ -1,30 +1,21 @@ { "name": "@zk-email/zk-regex-circom", - "version": "2.3.2", + "version": "2.2.1-alpha.0", "license": "MIT", "description": "regex verification circuits in circom for common regexes, generated with the compiler in [zk-regex](https://github.com/zkemail/zk-regex/tree/main).", - "contributors": [ - "Javier Su ", - "Kata Choi ", - "Sora Suegami ", - "Yush G ", - "Aditya Bisht " - ], "scripts": { - "test": "jest", - "install": "echo", - "build": "echo", - "upload-binary": "echo" + "test": "jest" }, "dependencies": { - "commander": "^11.0.0", - "snarkjs": "^0.7.5" + "@zk-email/circuits": "6.3.4", + "circomlib": "^2.0.5", + "prettier": "" }, "devDependencies": { + "@types/bun": "latest", "@types/jest": "^29.5.4", "chai": "^4.3.7", "circom_tester": "^0.0.20", - "circomlib": "^2.0.5", "circomlibjs": "^0.1.2", "ffjavascript": "^0.3.1", "jest": "^29.5.0", @@ -36,5 +27,8 @@ "@babel/preset-env" ] ] + }, + "peerDependencies": { + "typescript": "^5" } -} \ No newline at end of file +} diff --git a/circom/regexes/body_hash.json b/circom/regexes/body_hash.json new file mode 100644 index 00000000..6d1ae21b --- /dev/null +++ b/circom/regexes/body_hash.json @@ -0,0 +1,8 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)dkim-signature:" }, + { "Pattern": "(?:[a-z]+=[^;]+; )+bh=" }, + { "PublicPattern": ["[a-zA-Z0-9+/=]+", 44] }, + { "Pattern": ";" } + ] +} diff --git a/circom/regexes/email_addr.json b/circom/regexes/email_addr.json new file mode 100644 index 00000000..428b53e3 --- /dev/null +++ b/circom/regexes/email_addr.json @@ -0,0 +1,10 @@ +{ + "parts": [ + { + "PublicPattern": [ + "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+", + 320 + ] + } + ] +} diff --git a/circom/regexes/email_domain.json b/circom/regexes/email_domain.json new file mode 100644 index 00000000..257798f3 --- /dev/null +++ b/circom/regexes/email_domain.json @@ -0,0 +1,6 @@ +{ + "parts": [ + { "Pattern": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./]+@" }, + { "PublicPattern": ["[A-Za-z0-9.\\-@]+", 128] } + ] +} diff --git a/circom/regexes/from_all.json b/circom/regexes/from_all.json new file mode 100644 index 00000000..45db7abf --- /dev/null +++ b/circom/regexes/from_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)from:" }, + { "PublicPattern": ["[^\r\n]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/circom/regexes/message_id.json b/circom/regexes/message_id.json new file mode 100644 index 00000000..628893e4 --- /dev/null +++ b/circom/regexes/message_id.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)message-id:" }, + { "PublicPattern": ["<[A-Za-z0-9=@\\.\\+_-]+>", 128] }, + { "Pattern": "\r\n" } + ] +} diff --git a/circom/regexes/reversed_bracket.json b/circom/regexes/reversed_bracket.json new file mode 100644 index 00000000..8e0727e3 --- /dev/null +++ b/circom/regexes/reversed_bracket.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": ">" }, + { "PublicPattern": ["[^<>]+", 64] }, + { "Pattern": "<.*" } + ] +} diff --git a/circom/regexes/simple.json b/circom/regexes/simple.json new file mode 100644 index 00000000..d64eacf2 --- /dev/null +++ b/circom/regexes/simple.json @@ -0,0 +1,3 @@ +{ + "parts": [{ "Pattern": "a*b" }] +} diff --git a/circom/regexes/subject_all.json b/circom/regexes/subject_all.json new file mode 100644 index 00000000..8e13d12b --- /dev/null +++ b/circom/regexes/subject_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)subject:" }, + { "PublicPattern": ["[a-z]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/circom/regexes/to_all.json b/circom/regexes/to_all.json new file mode 100644 index 00000000..923f7f8a --- /dev/null +++ b/circom/regexes/to_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)to:" }, + { "PublicPattern": ["[^\r\n]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/circom/scripts/gen_regex.py b/circom/scripts/gen_regex.py new file mode 100644 index 00000000..d5b5fffa --- /dev/null +++ b/circom/scripts/gen_regex.py @@ -0,0 +1,104 @@ +import os +import subprocess +import re + + +def to_pascal_case(text): + """Converts a snake_case or kebab-case string to PascalCase.""" + # Replace hyphens with underscores, then split by underscores + s = re.sub(r"[-_]+", "_", text) + return "".join(word.capitalize() for word in s.split("_")) + + +def main(): + # Corrected project_root calculation + # __file__ is circom/scripts/gen_regex.py + # os.path.dirname(__file__) is circom/scripts/ + # os.path.join(os.path.dirname(__file__), "..", "..") goes up two levels + project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) + + # Adjust these paths if your script's location is different + # relative to the zk-regex project root + compiler_executable = os.path.join(project_root, "target", "release", "zk-regex") + regex_dir = os.path.join(project_root, "circom", "regexes") + output_dir = os.path.join(project_root, "circom", "circuits", "common") + proving_framework = "circom" + + if not os.path.exists(compiler_executable): + print(f"Error: Compiler executable not found at {compiler_executable}") + print( + "Please build the compiler first (e.g., cargo build in the compiler directory)." + ) + return + + if not os.path.isdir(regex_dir): + print(f"Error: Regex directory not found at {regex_dir}") + return + + os.makedirs(output_dir, exist_ok=True) + print(f"Ensured output directory exists: {output_dir}") + + print(f"Scanning for JSON files in: {regex_dir}") + for filename in os.listdir(regex_dir): + if filename.endswith(".json"): + json_file_path = os.path.join(regex_dir, filename) + base_name = os.path.splitext(filename)[0] + + # Convert base_name to PascalCase and append "Regex" + # e.g., "email_address" -> "EmailAddressRegex" + # e.g., "simple" -> "SimpleRegex" + template_name = to_pascal_case(base_name) + + print(f"\nProcessing {filename}...") + print(f" Input JSON: {json_file_path}") + print(f" Template Name: {template_name}") + print(f" Output Directory: {output_dir}") + + command = [ + compiler_executable, + "decomposed", + "-d", + json_file_path, + "-o", + output_dir, + "-t", + template_name, + "-p", + proving_framework, + ] + + try: + print(f" Executing: {' '.join(command)}") + process = subprocess.run( + command, capture_output=True, text=True, check=True + ) + print(" Compiler Output:") + if process.stdout: + for line in process.stdout.strip().split("\n"): + print(f" STDOUT: {line}") + if process.stderr: + for line in process.stderr.strip().split("\n"): + print( + f" STDERR: {line}" + ) # Compiler warnings might go to stderr + print(f" Successfully generated files for {template_name}") + + except subprocess.CalledProcessError as e: + print(f" Error processing {filename}:") + print(f" Return code: {e.returncode}") + if e.stdout: + print(" Stdout:") + for line in e.stdout.strip().split("\n"): + print(f" {line}") + if e.stderr: + print(" Stderr:") + for line in e.stderr.strip().split("\n"): + print(f" {line}") + except Exception as e: + print(f" An unexpected error occurred with {filename}: {e}") + + print("\nScript finished.") + + +if __name__ == "__main__": + main() diff --git a/circom/tsconfig.json b/circom/tsconfig.json new file mode 100644 index 00000000..ab0f0b09 --- /dev/null +++ b/circom/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": ["esnext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +} diff --git a/compiler/Cargo.toml b/compiler/Cargo.toml new file mode 100644 index 00000000..40717022 --- /dev/null +++ b/compiler/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "zk-regex-compiler" +version = "2.0.0-alpha.2" +edition = { workspace = true } + +[[bin]] +name = "zk-regex" +path = "src/bin/zk-regex.rs" + +[lib] +crate-type = ["rlib", "cdylib"] + +[dependencies] +clap = { workspace = true, features = ["derive"] } +comptime = { workspace = true } +heck = { workspace = true } +regex-automata = { workspace = true } +regex-syntax = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +serde-wasm-bindgen = { workspace = true } +thiserror = { workspace = true } +wasm-bindgen = { workspace = true } diff --git a/compiler/README.md b/compiler/README.md new file mode 100644 index 00000000..72f6d4b6 --- /dev/null +++ b/compiler/README.md @@ -0,0 +1,139 @@ +# ZK-Regex Compiler + +This package contains the core Rust library for compiling regular expressions into circuit-friendly Non-deterministic Finite Automata (NFAs) and generating circuit code for Circom and Noir. + +It uses the [`regex-automata`](https://github.com/rust-lang/regex/tree/master/regex-automata) crate to parse regex patterns and construct Thompson NFAs, which are then processed to create structures suitable for arithmetic circuits. + +## Core API + +The main functionalities are exposed through the [`lib.rs`](./src/lib.rs) file: + +- **`compile(pattern: &str) -> Result`** + + - Parses the input regex `pattern` string. + - Builds an internal NFA representation ([`NFAGraph`](./src/types.rs)). + - Returns the `NFAGraph` or a [`CompilerError::RegexCompilation`](./src/error.rs) if the pattern is invalid. + +- **`gen_from_raw(pattern: &str, max_bytes: Option>, template_name: &str, proving_framework: ProvingFramework) -> Result<(NFAGraph, String), CompilerError>`** + + - Compiles a raw regex `pattern` string directly into circuit code. + - `max_bytes`: Optional vector specifying maximum byte lengths for each capture group. If `None`, defaults might be used or capture groups might not be specifically handled (verify this behavior). + - `template_name`: A name used for the main template/contract in the generated code (e.g., Circom template name). + - `proving_framework`: Specifies the target output ([`ProvingFramework::Circom`](./src/types.rs#L23) or [`ProvingFramework::Noir`](./src/types.rs#L23)). + - Returns a tuple containing the compiled [`NFAGraph`](./src/nfa/mod.rs#L32) and the generated circuit code as a `String`, or a [`CompilerError`](./src/error.rs#L5). + +- **`gen_from_decomposed(config: DecomposedRegexConfig, template_name: &str, proving_framework: ProvingFramework) -> Result<(NFAGraph, String), CompilerError>`** + + - Constructs a regex pattern by combining parts defined in the `config` (of type [`DecomposedRegexConfig`](./src/types.rs#L15)). + - Generates circuit code similarly to `gen_from_raw`. + - Useful for building complex regex patterns programmatically. + - Returns a tuple containing the compiled [`NFAGraph`](./src/nfa/mod.rs#L32) and the generated circuit code as a `String`, or a [`CompilerError`](./src/error.rs#L5). + - _(Note: Requires understanding the structure of [`DecomposedRegexConfig`](./src/types.rs#L15))_ + +- **`gen_circuit_inputs(nfa: &NFAGraph, input: &str, max_haystack_len: usize, max_match_len: usize, proving_framework: ProvingFramework) -> Result`** + + - Generates the necessary inputs for the prover based on the compiled [`nfa`](./src/nfa/mod.rs#L32), the `input` string to match against, and circuit constraints. + - `max_haystack_len`: The maximum length of the input string allowed by the circuit. + - `max_match_len`: The maximum length of the regex match allowed by the circuit. + - `proving_framework`: Specifies for which framework ([`Circom`](./src/types.rs#L23) or [`Noir`](./src/types.rs#L23)) the inputs should be formatted. + - Returns a [`ProverInputs`](./src/types.rs#L33) struct (containing formatted public and private inputs) or a [`CompilerError::CircuitInputsGeneration`](./src/error.rs). + - _(Note: Requires understanding the structure of [`ProverInputs`](./src/types.rs#L33) for the specific framework)_ + +## Usage Examples (Rust) + +Add this crate to your `Cargo.toml`: + +```toml +[dependencies] +zk-regex-compiler = { git = "https://github.com/zkemail/zk-regex", package = "compiler" } +``` + +**Example 1: Compile a simple regex to NFA** + +```rust +use zk_regex_compiler::{compile, CompilerError}; + +fn main() -> Result<(), CompilerError> { + let pattern = r"^a+b*$"; + let nfa = compile(pattern)?; + println!("Successfully compiled regex to NFA with {} states.", nfa.states().len()); + // You can now inspect the nfa graph structure + Ok(()) +} +``` + +**Example 2: Generate Circom Code** + +```rust +use zk_regex_compiler::{gen_from_raw, ProvingFramework, CompilerError}; + +fn main() -> Result<(), CompilerError> { + let pattern = r"(a|b){2,3}"; + let template_name = "ABRegex"; + let (nfa, circom_code) = gen_from_raw(pattern, None, template_name, ProvingFramework::Circom)?; + + println!("Generated Circom Code:\n{}", circom_code); + // Save circom_code to a .circom file or use it directly + Ok(()) +} +``` + +**Example 3: Generate Noir Code** + +```rust +use zk_regex_compiler::{gen_from_raw, ProvingFramework, CompilerError}; + +fn main() -> Result<(), CompilerError> { + let pattern = r"\d{3}-\d{3}-\d{4}"; // Example: Phone number + let template_name = "PhoneRegex"; + let (nfa, noir_code) = gen_from_raw(pattern, None, template_name, ProvingFramework::Noir)?; + + println!("Generated Noir Code:\n{}", noir_code); + // Save noir_code to a .nr file or integrate into a Noir project + Ok(()) +} +``` + +**Example 4: Generate Circuit Inputs** + +```rust +use zk_regex_compiler::{compile, gen_circuit_inputs, ProvingFramework, CompilerError}; + +fn main() -> Result<(), CompilerError> { + let pattern = r"abc"; + let nfa = compile(pattern)?; + + let input_str = "test abc test"; + let max_haystack_len = 64; // Must match circuit parameter + let max_match_len = 16; // Must match circuit parameter + + // Generate inputs for Circom + let circom_inputs = gen_circuit_inputs(&nfa, input_str, max_haystack_len, max_match_len, ProvingFramework::Circom)?; + println!("Circom Inputs: {:?}", circom_inputs); // Need to format/serialize ProverInputs + + // Generate inputs for Noir + let noir_inputs = gen_circuit_inputs(&nfa, input_str, max_haystack_len, max_match_len, ProvingFramework::Noir)?; + println!("Noir Inputs: {:?}", noir_inputs); // Need to format/serialize ProverInputs + + Ok(()) +} +``` + +## Error Handling + +The library uses the [`CompilerError`](./src/error.rs) enum to report issues: + +- `RegexCompilation(String)`: An error occurred during regex parsing or NFA construction (from [`regex-automata`](https://github.com/rust-lang/regex/tree/master/regex-automata)). +- `CircuitGeneration(String)`: An error occurred during the generation of Circom or Noir code. +- `CircuitInputsGeneration(String)`: An error occurred while generating prover inputs for a given string. + +Match on the enum variants to handle errors appropriately. + +## Building & Testing + +Navigate to the `compiler/` directory and use standard Cargo commands: + +```bash +cargo build --release +cargo test +``` diff --git a/packages/compiler/package.json b/compiler/package.json similarity index 53% rename from packages/compiler/package.json rename to compiler/package.json index f46506ee..aaac5273 100644 --- a/packages/compiler/package.json +++ b/compiler/package.json @@ -1,26 +1,23 @@ { "name": "@zk-email/zk-regex-compiler", - "version": "2.3.2", + "version": "2.2.0-alpha.3", "description": "A compiler to generate a regex verification circuit in circom from a user-defined regex. Please check [zk-regex](https://github.com/zkemail/zk-regex/tree/main) for the detail.", - "contributors": [ - "Javier Su ", - "Kata Choi ", - "Sora Suegami ", - "Yush G ", - "Aditya Bisht " - ], "repository": { "type": "git", "url": "git+https://github.com/zkemail/zk-regex.git" }, "scripts": { - "build": "cargo build && wasm-pack build --target nodejs --out-dir ./pkg/", + "build": "cargo build && cargo install --path . && wasm-pack build --target nodejs --out-dir ./pkg/", "build-debug": "npm run build --", "build-release": "npm run build -- --release", + "build-web": "cargo build && wasm-pack build --target web --out-dir ./pkg-web/", + "build-web-release": "npm run build-web -- --release", "install": "npm run build-release", "install-debug": "npm run build-debug", "test": "cargo test && wasm-pack test --node", - "upload-binary": "wasm-pack publish -t nodejs" + "upload-binary": "wasm-pack publish -t nodejs", + "upload-binary-web": "wasm-pack publish -t web --out-dir ./pkg-web/", + "upload-binary-web-nightly": "npm run build-web-release && wasm-pack publish-nightly -t web --out-dir ./pkg-web/" }, "license": "MIT" -} \ No newline at end of file +} diff --git a/compiler/src/backend/circom.rs b/compiler/src/backend/circom.rs new file mode 100644 index 00000000..fcea6aed --- /dev/null +++ b/compiler/src/backend/circom.rs @@ -0,0 +1,447 @@ +//! Circom circuit generation for NFAs. +//! +//! This module handles conversion of NFAs to Circom circuits for zero-knowledge proofs. +//! The generated circuits can verify: +//! - String matching against regex patterns +//! - Capture group extraction +//! - Path traversal through the NFA +//! +//! The circuit components include: +//! - State transition validation +//! - Byte range checks +//! - Capture group tracking +//! - Path length verification +//! - Start/accept state validation + +use serde::Serialize; + +use crate::ir::NFAGraph; +use crate::passes::{NFAError, NFAResult}; + +use super::{escape_regex_for_display, generate_circuit_data}; + +#[derive(Serialize)] +pub struct CircomInputs { + #[serde(rename = "inHaystack")] + pub in_haystack: Vec, + #[serde(rename = "matchStart")] + pub match_start: usize, + #[serde(rename = "matchLength")] + pub match_length: usize, + #[serde(rename = "currStates")] + pub curr_states: Vec, + #[serde(rename = "nextStates")] + pub next_states: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "captureGroupIds")] + pub capture_group_ids: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "captureGroupStarts")] + pub capture_group_starts: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "captureGroupStartIndices")] + pub capture_group_start_indices: Option>, +} + +// From implementation moved to shared.rs + +/// Generates complete Circom circuit code for the NFA. +/// +/// # Arguments +/// * `regex_name` - Name of the regex template +/// * `regex_pattern` - Original regex pattern (for documentation) +/// * `max_substring_bytes` - Maximum lengths for capture group substrings +/// +/// # Generated Circuit Features +/// - Input validation for state transitions +/// - Byte range checking +/// - Capture group extraction +/// - Path length verification +/// - Start/accept state validation +/// +pub fn generate_circom_code( + nfa: &NFAGraph, + regex_name: &str, + regex_pattern: &str, + max_substring_bytes: Option>, +) -> NFAResult { + if regex_name.is_empty() { + return Err(NFAError::InvalidInput("Empty regex name".into())); + } + + let (start_states, accept_states, transitions) = generate_circuit_data(nfa)?; + + if nfa.num_capture_groups > 0 { + if let Some(max_bytes) = max_substring_bytes.as_ref() { + if max_bytes.len() != nfa.num_capture_groups { + return Err(NFAError::InvalidCapture(format!( + "Insufficient max_substring_bytes: need {} but got {}", + nfa.num_capture_groups, + max_bytes.len() + ))); + } + for bytes in max_bytes { + if *bytes == 0 { + return Err(NFAError::InvalidCapture( + "max_substring_bytes contains zero length".into(), + )); + } + } + } else { + return Err(NFAError::InvalidCapture( + "max_substring_bytes required for capture groups".into(), + )); + } + } + + let mut code = String::new(); + + code.push_str("pragma circom 2.1.5;\n\n"); + + code.push_str("include \"circomlib/circuits/comparators.circom\";\n"); + code.push_str("include \"circomlib/circuits/gates.circom\";\n"); + code.push_str("include \"@zk-email/circuits/utils/array.circom\";\n"); + code.push_str("include \"@zk-email/circuits/utils/regex.circom\";\n\n"); + code.push_str("include \"@zk-email/zk-regex-circom/circuits/regex_helpers.circom\";\n\n"); + + let display_pattern = escape_regex_for_display(regex_pattern); + code.push_str(format!("// regex: {}\n", display_pattern).as_str()); + code.push_str( + format!( + "template {}Regex(maxHaystackBytes, maxMatchBytes) {{\n", + regex_name + ) + .as_str(), + ); + + code.push_str(" signal input inHaystack[maxHaystackBytes];\n"); + code.push_str(" signal input matchStart;\n"); + code.push_str(" signal input matchLength;\n\n"); + + code.push_str(" signal input currStates[maxMatchBytes];\n"); + code.push_str(" signal input nextStates[maxMatchBytes];\n"); + + // Only add capture group signals if needed + if nfa.num_capture_groups > 0 { + for i in 0..nfa.num_capture_groups { + code.push_str( + format!(" signal input captureGroup{}Id[maxMatchBytes];\n", i + 1).as_str(), + ); + } + for i in 0..nfa.num_capture_groups { + code.push_str( + format!( + " signal input captureGroup{}Start[maxMatchBytes];\n", + i + 1 + ) + .as_str(), + ); + } + } + + code.push_str(" signal output isValid;\n\n"); + + code.push_str(format!(" var numStartStates = {};\n", start_states.len()).as_str()); + code.push_str(format!(" var numAcceptStates = {};\n", accept_states.len()).as_str()); + code.push_str(format!(" var numTransitions = {};\n", transitions.len()).as_str()); + code.push_str( + format!( + " var startStates[numStartStates] = [{}];\n", + start_states + .iter() + .map(|s| s.to_string()) + .collect::>() + .join(", ") + ) + .as_str(), + ); + code.push_str( + format!( + " var acceptStates[numAcceptStates] = [{}];\n\n", + accept_states + .iter() + .map(|s| s.to_string()) + .collect::>() + .join(", ") + ) + .as_str(), + ); + + code.push_str(" signal isCurrentState[numTransitions][maxMatchBytes];\n"); + code.push_str(" signal isNextState[numTransitions][maxMatchBytes];\n"); + code.push_str(" signal isValidTransition[numTransitions][maxMatchBytes];\n"); + code.push_str(" signal reachedLastTransition[maxMatchBytes];\n"); + code.push_str(" signal isValidRegex[maxMatchBytes];\n"); + code.push_str(" signal isValidRegexTemp[maxMatchBytes];\n"); + code.push_str(" signal isWithinPathLength[maxMatchBytes];\n"); + code.push_str(" signal isWithinPathLengthMinusOne[maxMatchBytes-2];\n"); + code.push_str(" signal isTransitionLinked[maxMatchBytes];\n"); + + if start_states.len() > 1 { + code.push_str("\n component isValidStartState;\n"); + } else { + code.push_str("\n signal isValidStartState;\n"); + } + + if accept_states.len() > 1 { + code.push_str("\n component reachedAcceptState[maxMatchBytes];\n"); + } else { + code.push_str("\n signal reachedAcceptState[maxMatchBytes];\n"); + } + + code.push_str("\n component isValidTraversal[maxMatchBytes];\n\n"); + + code.push_str(" // Select the haystack from the input\n"); + code.push_str( + " signal haystack[maxMatchBytes] <== SelectSubArray(maxHaystackBytes, maxMatchBytes)(inHaystack, matchStart, matchLength);\n\n" + ); + + code.push_str(" // Check if the first state in the haystack is a valid start state\n"); + if start_states.len() > 1 { + code.push_str(" isValidStartState = MultiOR(numStartStates);\n"); + code.push_str(" for (var i = 0; i < numStartStates; i++) {\n"); + code.push_str( + " isValidStartState.in[i] <== IsEqual()([startStates[i], currStates[0]]);\n", + ); + code.push_str(" }\n"); + code.push_str(" isValidStartState.out === 1;\n\n"); + } else { + code.push_str(" isValidStartState <== IsEqual()([startStates[0], currStates[0]]);\n\n"); + } + + code.push_str(" for (var i = 0; i < maxMatchBytes; i++) {\n"); + code.push_str( + " isWithinPathLength[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength]);\n\n" + ); + + code.push_str(" // Check if the traversal is a valid path\n"); + code.push_str(" if (i < maxMatchBytes-2) {\n"); + code.push_str( + " isWithinPathLengthMinusOne[i] <== LessThan(log2Ceil(maxMatchBytes))([i, matchLength-1]);\n" + ); + code.push_str( + " isTransitionLinked[i] <== IsEqual()([nextStates[i], currStates[i+1]]);\n", + ); + code.push_str(" isTransitionLinked[i] * isWithinPathLengthMinusOne[i] === isWithinPathLengthMinusOne[i];\n"); + code.push_str(" }\n\n"); + + if nfa.num_capture_groups > 0 { + // Prepare strings for input signal arrays, used in each transition's Circom call + let input_signal_cg_ids_list_str = (1..=nfa.num_capture_groups) + .map(|k| format!("captureGroup{}Id[i]", k)) + .collect::>() + .join(", "); + let input_signal_cg_starts_list_str = (1..=nfa.num_capture_groups) + .map(|k| format!("captureGroup{}Start[i]", k)) + .collect::>() + .join(", "); + + for (transition_idx, (curr_state, start, end, next_state, capture_info)) in + transitions.iter().enumerate() + { + // These vectors store the properties of *this specific transition* + // regarding which capture groups it affects and how. + let mut transition_prop_cg_ids = vec![0; nfa.num_capture_groups]; + let mut transition_prop_cg_starts = vec![0; nfa.num_capture_groups]; + + let capture_details_for_comment = capture_info + .as_ref() + .map(|infos| { + infos + .iter() + .map(|(id, is_start_bool)| { + if *id > 0 && *id <= nfa.num_capture_groups { + transition_prop_cg_ids[*id - 1] = *id; + transition_prop_cg_starts[*id - 1] = *is_start_bool as u8; + } + format!("({}, {})", id, *is_start_bool as u8) + }) + .collect::>() + .join(", ") + }) + .unwrap_or_else(|| "".to_string()); + + let capture_comment_segment = if capture_details_for_comment.is_empty() { + "Capture Group: []".to_string() + } else { + format!("Capture Group:[ {}]", capture_details_for_comment) + }; + + // String representation of this transition's capture group properties + let transition_prop_cg_ids_str = transition_prop_cg_ids + .iter() + .map(ToString::to_string) + .collect::>() + .join(", "); + let transition_prop_cg_starts_str = transition_prop_cg_starts + .iter() + .map(ToString::to_string) + .collect::>() + .join(", "); + + if start == end { + code.push_str( + format!( + " // Transition {}: {} -[{}]-> {} | {}\n", + transition_idx, curr_state, start, next_state, capture_comment_segment + ) + .as_str(), + ); + code.push_str( + format!( + " isValidTransition[{}][i] <== CheckByteTransitionWithCapture({})({}, {}, {}, [{}], [{}], currStates[i], nextStates[i], haystack[i], [{}], [{}]);\n", + transition_idx, + nfa.num_capture_groups, + curr_state, + next_state, + start, + transition_prop_cg_ids_str, + transition_prop_cg_starts_str, + input_signal_cg_ids_list_str, // Array of input signals + input_signal_cg_starts_list_str // Array of input signals + ).as_str() + ); + } else { + code.push_str( + format!( + " // Transition {}: {} -[{}-{}]-> {} | {}\n", + transition_idx, curr_state, start, end, next_state, capture_comment_segment + ) + .as_str(), + ); + code.push_str( + format!( + " isValidTransition[{}][i] <== CheckByteRangeTransitionWithCapture({})({}, {}, {}, {}, [{}], [{}], currStates[i], nextStates[i], haystack[i], [{}], [{}]);\n", + transition_idx, + nfa.num_capture_groups, + curr_state, + next_state, + start, + end, + transition_prop_cg_ids_str, + transition_prop_cg_starts_str, + input_signal_cg_ids_list_str, // Array of input signals + input_signal_cg_starts_list_str // Array of input signals + ).as_str() + ); + } + } + } else { + for (transition_idx, (curr_state, start, end, next_state, _)) in + transitions.iter().enumerate() + { + if start == end { + code.push_str( + format!( + " // Transition {}: {} -[{}]-> {}\n", + transition_idx, curr_state, start, next_state + ) + .as_str(), + ); + code.push_str( + format!( + " isValidTransition[{}][i] <== CheckByteTransition()({}, {}, {}, currStates[i], nextStates[i], haystack[i]);\n", + transition_idx, + curr_state, + next_state, + start + ).as_str() + ); + } else { + code.push_str( + format!( + " // Transition {}: {} -[{}-{}]-> {}\n", + transition_idx, curr_state, start, end, next_state + ) + .as_str(), + ); + code.push_str( + format!( + " isValidTransition[{}][i] <== CheckByteRangeTransition()({}, {}, {}, {}, currStates[i], nextStates[i], haystack[i]);\n", + transition_idx, + curr_state, + next_state, + start, + end + ).as_str() + ); + } + } + } + + code.push_str("\n // Combine all valid transitions for this byte\n"); + code.push_str(" isValidTraversal[i] = MultiOR(numTransitions);\n"); + code.push_str(" for (var j = 0; j < numTransitions; j++) {\n"); + code.push_str(" isValidTraversal[i].in[j] <== isValidTransition[j][i];\n"); + code.push_str(" }\n"); + code.push_str(" isValidTraversal[i].out === isWithinPathLength[i];\n\n"); + + code.push_str(" // Check if any accept state has been reached at the last transition\n"); + code.push_str(" reachedLastTransition[i] <== IsEqual()([i, matchLength-1]);\n"); + + if accept_states.len() > 1 { + code.push_str(" reachedAcceptState[i] = MultiOR(numAcceptStates);\n"); + code.push_str(" for (var j = 0; j < numAcceptStates; j++) {\n"); + code.push_str( + " reachedAcceptState[i].in[j] <== IsEqual()([nextStates[i], acceptStates[j]]);\n" + ); + code.push_str(" }\n"); + code.push_str( + " isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i].out);\n" + ); + } else { + code.push_str( + " reachedAcceptState[i] <== IsEqual()([nextStates[i], acceptStates[0]]);\n", + ); + code.push_str( + " isValidRegexTemp[i] <== AND()(reachedLastTransition[i], reachedAcceptState[i]);\n" + ); + } + + code.push_str(" if (i == 0) {\n"); + code.push_str(" isValidRegex[i] <== isValidRegexTemp[i];\n"); + code.push_str(" } else {\n"); + code.push_str(" isValidRegex[i] <== isValidRegexTemp[i] + isValidRegex[i-1];\n"); + code.push_str(" }\n"); + code.push_str(" }\n\n"); + code.push_str(" isValid <== isValidRegex[maxMatchBytes-1];\n\n"); + + if nfa.num_capture_groups > 0 { + code.push_str( + format!( + " signal input captureGroupStartIndices[{}];\n\n", + nfa.num_capture_groups + ) + .as_str(), + ); + for capture_group_id in 1..=nfa.num_capture_groups { + let max_substring_bytes = + if let Some(max_substring_bytes) = max_substring_bytes.as_ref() { + max_substring_bytes[capture_group_id - 1] + } else { + return Err(NFAError::InvalidCapture(format!( + "Max substring bytes not provided for capture group {}", + capture_group_id + ))); + }; + + code.push_str(format!(" // Capture Group {}\n", capture_group_id).as_str()); + code.push_str( + format!( + " signal output capture{}[{}] <== CaptureSubstring(maxMatchBytes, {}, {})(captureGroupStartIndices[{}], haystack, captureGroup{}Id, captureGroup{}Start);\n", + capture_group_id, + max_substring_bytes, + max_substring_bytes, + capture_group_id, + capture_group_id - 1, + capture_group_id, + capture_group_id + ).as_str() + ); + } + } + + code.push_str("}\n"); + + Ok(code) +} diff --git a/compiler/src/backend/mod.rs b/compiler/src/backend/mod.rs new file mode 100644 index 00000000..8802aade --- /dev/null +++ b/compiler/src/backend/mod.rs @@ -0,0 +1,11 @@ +//! Backend code generation module +//! +//! This module contains the code generators for different proving frameworks. + +pub mod circom; +pub mod noir; +pub mod shared; + +pub use circom::*; +pub use noir::*; +pub use shared::*; diff --git a/compiler/src/backend/noir.rs b/compiler/src/backend/noir.rs new file mode 100644 index 00000000..bc2a1b6c --- /dev/null +++ b/compiler/src/backend/noir.rs @@ -0,0 +1,551 @@ +use comptime::{FieldElement, SparseArray}; +use heck::ToUpperCamelCase; +use serde::Serialize; +use std::collections::BTreeSet; + +use super::{CircuitInputs, escape_regex_for_display, generate_circuit_data}; +use crate::{ + ir::NFAGraph, + passes::{NFAError, NFAResult}, +}; + +#[derive(Serialize)] +pub struct NoirInputs { + pub in_haystack: Vec, + pub match_start: usize, + pub match_length: usize, + pub curr_states: Vec, + pub next_states: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_ids: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_starts: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_start_indices: Option>, +} + +// From implementation moved to shared.rs + +/// Generate Noir code for the NFA +pub fn generate_noir_code( + nfa: &NFAGraph, + regex_name: &str, + regex_pattern: &str, + max_substring_bytes: Option>, +) -> NFAResult { + // get nfa graph data + let (start_states, accept_states, transitions) = generate_circuit_data(nfa)?; + + if nfa.num_capture_groups > 0 { + if let Some(max_bytes) = max_substring_bytes.as_ref() { + if max_bytes.len() != nfa.num_capture_groups { + return Err(NFAError::InvalidCapture(format!( + "Insufficient max_substring_bytes: need {} but got {}", + nfa.num_capture_groups, + max_bytes.len() + ))); + } + for &bytes in max_bytes { + if bytes == 0 { + return Err(NFAError::InvalidCapture( + "max_substring_bytes contains zero length".into(), + )); + } + } + } else { + return Err(NFAError::InvalidCapture( + "max_substring_bytes required for capture groups".into(), + )); + } + } + + let mut code = String::new(); + + // imports + // todo: ability to change import path + if nfa.num_capture_groups > 0 { + code.push_str("use zkregex::utils::{\n"); + code.push_str(" select_subarray,\n"); + code.push_str(" captures::capture_substring,\n"); + code.push_str(" sparse_array::SparseArray,\n"); + code.push_str(" transitions::check_transition_with_captures\n"); + code.push_str("};\n\n"); + } else { + code.push_str("use zkregex::utils::{\n"); + code.push_str(" select_subarray,\n"); + code.push_str(" sparse_array::SparseArray,\n"); + code.push_str(" transitions::check_transition\n"); + code.push_str("};\n\n"); + } + + // codegen the transition lookup table + let transition_array = match max_substring_bytes.as_ref().is_some() { + true => packed_transition_sparse_array(&transitions, nfa.num_capture_groups), + false => transition_sparse_array(&transitions), + }; + code.push_str(&format!( + "global TRANSITION_TABLE: {}\n\n", + transition_array.to_noir_string(None) + )); + + // hardcode max substring capture group lengths + if nfa.num_capture_groups > 0 { + for (index, length) in max_substring_bytes.as_ref().unwrap().iter().enumerate() { + code.push_str(&format!( + "pub global CAPTURE_{}_MAX_LENGTH: u32 = {};\n", + index + 1, + length + )); + } + code.push_str(&format!( + "pub global NUM_CAPTURE_GROUPS: u32 = {};\n", + nfa.num_capture_groups + )); + } + + let display_pattern = escape_regex_for_display(regex_pattern); + + // add check for valid start states + code.push_str(start_state_fn(&start_states).as_str()); + code.push_str(accept_state_fn(&accept_states).as_str()); + + // regex match function doc + code.push_str(&format!("/**\n")); + code.push_str(&format!( + " * {}Regex matching function\n", + regex_name.to_upper_camel_case() + )); + code.push_str(&format!(" * Regex: {}\n", display_pattern)); + code.push_str(&format!( + " * @param in_haystack - The input haystack to search from\n" + )); + code.push_str(&format!( + " * @param match_start - The start index in the haystack for the subarray to match from\n" + )); + code.push_str(&format!( + " * @param match_length - The length of the subarray to extract from haystack\n" + )); + code.push_str( + &format!( + " * @param current_states - The current states of the NFA at each index in the match subarray\n" + ) + ); + code.push_str(&format!( + " * @param next_states - The next states of the NFA at each index in the match subarray\n" + )); + if nfa.num_capture_groups > 0 { + code.push_str( + &format!( + " * @param capture_group__ids - The ids of the capture groups in the match subarray\n" + ) + ); + code.push_str( + &format!( + " * @param capture_group__starts - The start positions of the capture groups in the match subarray\n" + ) + ); + code.push_str( + &format!( + " * @param capture_group_start_indices - The start indices of the capture groups in the match subarray\n" + ) + ); + code.push_str(&format!( + " * @return - tuple of substring captures as dictated by the regular expression\n" + )); + } + code.push_str(&format!(" */\n")); + + code.push_str(&format!( + "pub fn regex_match(\n" + )); + code.push_str(&format!(" in_haystack: [u8; MAX_HAYSTACK_LEN],\n")); + code.push_str(&format!(" match_start: u32,\n")); + code.push_str(&format!(" match_length: u32,\n")); + code.push_str(&format!(" current_states: [Field; MAX_MATCH_LEN],\n")); + code.push_str(&format!(" next_states: [Field; MAX_MATCH_LEN],\n")); + if nfa.num_capture_groups > 0 { + for i in 1..=nfa.num_capture_groups { + code.push_str(&format!( + " capture_group_{}_id: [Field; MAX_MATCH_LEN],\n", + i + )); + } + for i in 1..=nfa.num_capture_groups { + code.push_str(&format!( + " capture_group_{}_start: [Field; MAX_MATCH_LEN],\n", + i + )); + } + code.push_str(&format!( + " capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS],\n" + )); + } + + // define the return type according to existence of / qualities of capture groups + let return_type = if nfa.num_capture_groups > 0 { + let mut substrings = Vec::new(); + for i in 1..=nfa.num_capture_groups { + substrings.push(format!("BoundedVec", i)); + } + format!("-> ({}) ", substrings.join(", ")) + } else { + String::default() + }; + code.push_str(&format!(") {}{{\n", return_type)); + + // resize haystack to MAX_MATCH_LEN + code.push_str(&format!(" // resize haystack \n")); + code.push_str( + &format!( + " let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length);\n\n" + ) + ); + + // check start & range + code.push_str(&format!(" check_start_state(current_states[0]);\n")); + code.push_str(&format!(" for i in 0..MAX_MATCH_LEN-1 {{\n")); + code.push_str(&format!( + " // match length - 1 since current states should be 1 less than next states\n" + )); + code.push_str(&format!( + " let in_range = (i < match_length - 1) as Field;\n" + )); + code.push_str(&format!( + " let matching_states = current_states[i + 1] - next_states[i];\n" + )); + code.push_str(&format!( + " assert(in_range * matching_states == 0, \"Invalid Transition Input\");\n" + )); + code.push_str(&format!(" }}\n")); + + // iterate through the haystack and check transitions + code.push_str(&format!(" let mut reached_end_state = 1;\n")); + code.push_str(&format!(" for i in 0..MAX_MATCH_LEN {{\n")); + if nfa.num_capture_groups > 0 { + let active_ids_str = (1..=nfa.num_capture_groups) + .map(|i| format!("capture_group_{}_id[i]", i)) + .collect::>() + .join(", "); + let active_starts_str = (1..=nfa.num_capture_groups) + .map(|i| format!("capture_group_{}_start[i]", i)) + .collect::>() + .join(", "); + + code.push_str(&format!( + " let active_capture_groups_at_index = [{active_ids_str}];\n" + )); + code.push_str(&format!( + " let active_capture_groups_starts_at_index = [{active_starts_str}];\n" + )); + + // if capture groups exist, perform check that unpacks transition values + code.push_str(&format!(" check_transition_with_captures(\n")); + code.push_str(&format!(" TRANSITION_TABLE,\n")); + code.push_str(&format!(" haystack[i] as Field,\n")); + code.push_str(&format!(" current_states[i],\n")); + code.push_str(&format!(" next_states[i],\n")); + code.push_str(&format!(" active_capture_groups_at_index,\n")); + code.push_str(&format!( + " active_capture_groups_starts_at_index,\n" + )); + code.push_str(&format!(" reached_end_state\n")); + code.push_str(&format!(" );\n")); + } else { + // if no capture groups exist, simple lookup + code.push_str(&format!(" check_transition(\n")); + code.push_str(&format!(" TRANSITION_TABLE,\n")); + code.push_str(&format!(" haystack[i] as Field,\n")); + code.push_str(&format!(" current_states[i],\n")); + code.push_str(&format!(" next_states[i],\n")); + code.push_str(&format!(" reached_end_state\n")); + code.push_str(&format!(" );\n")); + } + + // toggle off constraints/ set match assertion if end state found + code.push_str( + &format!( + " reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field);\n" + ) + ); + code.push_str(&format!(" }}\n")); + code.push_str(&format!( + " assert(reached_end_state == 0, \"Did not reach a valid end state\");\n\n" + )); + + // add substring capture logic if capture groups exist + if nfa.num_capture_groups > 0 { + let mut ids = Vec::new(); + for i in 1..=nfa.num_capture_groups { + code.push_str(&format!(" // Capture Group {}\n", i)); + code.push_str( + &format!( + " let capture_{} = capture_substring::(\n", + i, + i, + i + ) + ); + code.push_str(&format!(" haystack,\n")); + code.push_str(&format!(" capture_group_{}_id,\n", i)); + code.push_str(&format!(" capture_group_{}_start,\n", i)); + code.push_str(&format!( + " capture_group_start_indices[{}] - (match_start as Field),\n", + i - 1 + )); + code.push_str(&format!(" );\n\n")); + ids.push(format!("capture_{}", i)); + } + + // define the return tuple + let return_vec = ids + .iter() + .map(|id| format!("{}", id)) + .collect::>() + .join(", "); + code.push_str(&format!(" ({})\n", return_vec)); + } + + code.push_str(&format!("}}\n\n")); + + Ok(code) +} + +/// Generate Prover.toml from circuit inputs +pub fn to_prover_toml(inputs: &CircuitInputs) -> String { + let mut toml = String::new(); + + // regex match inputs + let haystack = inputs + .in_haystack + .iter() + .map(|num| format!("\"{num}\"")) + .collect::>() + .join(", "); + + toml.push_str(&format!("in_haystack = [{}]\n", haystack)); + toml.push_str(&format!("match_start = \"{}\"\n", inputs.match_start)); + toml.push_str(&format!("match_length = \"{}\"\n", inputs.match_length)); + + let curr_states = inputs + .curr_states + .iter() + .map(|num| format!("\"{num}\"")) + .collect::>() + .join(", "); + toml.push_str(&format!("curr_states = [{}]\n", curr_states)); + + let next_states = inputs + .next_states + .iter() + .map(|num| format!("\"{num}\"")) + .collect::>() + .join(", "); + toml.push_str(&format!("next_states = [{}]\n", next_states)); + + // substring capture inputs + if let Some(outer_ids_vec) = inputs.capture_group_ids.as_ref() { + let outer_starts_vec = inputs + .capture_group_starts + .as_ref() + .expect("capture_group_starts should be Some if capture_group_ids is Some"); + for i in 0..outer_ids_vec.len() { + // Handle capture_group_{i+1}_ids + let ids_for_group = &outer_ids_vec[i]; + let ids_str = ids_for_group + .iter() + .map(|num| format!("\"{}\"", num)) + .collect::>() + .join(", "); + toml.push_str(&format!("capture_group_{}_ids = [{}]\n", i + 1, ids_str)); + + // Handle capture_group_{i+1}_starts + let starts_for_group = &outer_starts_vec[i]; + let starts_str = starts_for_group + .iter() + .map(|num| format!("\"{}\"", num)) + .collect::>() + .join(", "); + toml.push_str(&format!( + "capture_group_{}_starts = [{}]\n", + i + 1, + starts_str + )); + } + } + + // Handle capture_group_start_indices (Option>) - This is a flat list + if let Some(start_indices_vec) = inputs.capture_group_start_indices.as_ref() { + let capture_group_start_indices_str = start_indices_vec + .iter() + .map(|num| format!("\"{}\"", num)) + .collect::>() + .join(", "); + toml.push_str(&format!( + "capture_group_start_indices = [{}]\n", + capture_group_start_indices_str + )); + } + toml +} + +/** + * Forms an expression to determine if any of the start states are matched + * @param start_states - The start states of the NFA + * @returns The expression determining if any of the start states are matched + */ +fn start_state_fn(start_states: &Vec) -> String { + let expression = start_states + .iter() + .map(|state| format!("(start_state - {state})")) + .collect::>() + .join(" * "); + format!( + r#" +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {{state}})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) {{ + let valid_start_state = {expression}; + assert(valid_start_state == 0, "Invalid start state"); +}} + "# + ) +} + +/** + * Forms an expression to determine if any of the accept states are matched + * @param start_states - The accept states of the NFA + * @returns The expression determining if any of the accept states are matched + */ +fn accept_state_fn(accept_states: &Vec) -> String { + let expression = accept_states + .iter() + .map(|state| format!("(next_state - {state})")) + .collect::>() + .join(" * "); + format!( + r#" +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {{state}})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field {{ + // check if the next state is an accept state + let accept_state_reached = {expression}; + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +}} + +"# + ) +} + +/** + * Creates a sparse array for transitions + * @param transitions - The transitions to create the sparse array for + * @returns The sparse array for the transitions + */ +fn transition_sparse_array( + transitions: &Vec<(usize, u8, u8, usize, Option>)>, +) -> SparseArray { + // let r = 256 * transitions.len(); + let r = 257; + let mut entries = Vec::new(); + for (state_idx, start, end, dest, _) in transitions { + let bytes = (*start..=*end).collect::>(); + for byte in bytes { + let key = state_idx + (byte as usize) * r + r * r * dest; + entries.push(FieldElement::from(key)); + } + } + let values = vec![FieldElement::from(1u32); entries.len()]; + // assume max byte = 256 and max transitions = 200 + let max_size = FieldElement::from(transitions.len() + 256 * r + 200 * r * r); + SparseArray::create(&entries, &values, max_size) +} + +/** + * Creates a packed sparse array for transitions. + * The packed 'value' encodes: + * - Bit 0: 1 if this entry represents a valid transition. + * - Bits 1 to N: 'starts_flags'. Bit k (1-indexed in this range) is 1 if capture group k starts here. + * - Bits (N+1) to 2N: 'participations_flags'. Bit (k+N) (1-indexed in this range) is 1 if capture group k is involved. + * (where N = num_capture_groups) + */ +fn packed_transition_sparse_array( + transitions: &Vec<(usize, u8, u8, usize, Option>)>, + num_capture_groups: usize, +) -> SparseArray { + let r = 257; // Multiplier for constructing unique keys + let mut keys = Vec::new(); + let mut values = Vec::new(); + + let mut current_max_state_id_in_transitions = 0; // To track the actual max state ID + + for (state_idx, start_byte, end_byte, dest_state, capture_opt) in transitions { + // Update the actual maximum state ID encountered + current_max_state_id_in_transitions = current_max_state_id_in_transitions + .max(*state_idx) + .max(*dest_state); + + let mut participations_flags = 0u32; + let mut starts_flags = 0u32; + + if let Some(captures) = capture_opt { + for (group_id, is_start) in captures { + // Ensure group_id is 1-indexed and within bounds + if *group_id > 0 && *group_id <= num_capture_groups { + participations_flags |= 1u32 << (*group_id - 1); // Set bit for participation + if *is_start { + starts_flags |= 1u32 << (*group_id - 1); // Set bit for start + } + } + } + } + + // Pack the flags: + // Bit 0: is_valid_transition (always 1 for these entries) + // Next num_capture_groups bits: starts_flags + // Next num_capture_groups bits: participations_flags + let packed_value = + 1u32 | (starts_flags << 1) | (participations_flags << (1 + num_capture_groups)); + + for byte_val in *start_byte..=*end_byte { + let key = *state_idx + (byte_val as usize) * r + *dest_state * r * r; + keys.push(FieldElement::from(key)); + values.push(FieldElement::from(packed_value)); + } + } + + let max_byte_val = 255; // Max value for a u8 + + let derived_max_state_id = current_max_state_id_in_transitions; + + let estimated_max_key_val = + derived_max_state_id + max_byte_val * r + derived_max_state_id * r * r; + let max_size = FieldElement::from(estimated_max_key_val + 1); // +1 because keys can be 0 up to estimated_max_key_val + + SparseArray::create(&keys, &values, max_size) +} diff --git a/compiler/src/backend/shared.rs b/compiler/src/backend/shared.rs new file mode 100644 index 00000000..3aca83ce --- /dev/null +++ b/compiler/src/backend/shared.rs @@ -0,0 +1,247 @@ +//! Shared functions for code generation backends + +use regex_automata::meta::Regex; +use serde::Serialize; +use std::collections::{BTreeMap, BTreeSet}; + +use crate::{ + ProverInputs, ProvingFramework, + ir::NFAGraph, + passes::{NFAError, NFAResult}, +}; + +// Import the specific input types +use super::circom::CircomInputs; +use super::noir::NoirInputs; + +#[derive(Serialize)] +pub struct CircuitInputs { + pub in_haystack: Vec, + pub match_start: usize, + pub match_length: usize, + pub curr_states: Vec, + pub next_states: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_ids: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_starts: Option>>, + #[serde(skip_serializing_if = "Option::is_none")] + pub capture_group_start_indices: Option>, +} + +impl From for CircomInputs { + fn from(inputs: CircuitInputs) -> Self { + CircomInputs { + in_haystack: inputs.in_haystack, + match_start: inputs.match_start, + match_length: inputs.match_length, + curr_states: inputs.curr_states, + next_states: inputs.next_states, + capture_group_ids: inputs.capture_group_ids, + capture_group_starts: inputs.capture_group_starts, + capture_group_start_indices: inputs.capture_group_start_indices, + } + } +} + +impl From for NoirInputs { + fn from(inputs: CircuitInputs) -> Self { + NoirInputs { + in_haystack: inputs.in_haystack, + match_start: inputs.match_start, + match_length: inputs.match_length, + curr_states: inputs.curr_states, + next_states: inputs.next_states, + capture_group_ids: inputs.capture_group_ids, + capture_group_starts: inputs.capture_group_starts, + capture_group_start_indices: inputs.capture_group_start_indices, + } + } +} + +pub fn generate_circuit_data( + nfa: &NFAGraph, +) -> NFAResult<( + Vec, + Vec, + Vec<(usize, u8, u8, usize, Option>)>, +)> { + if nfa.start_states.is_empty() { + return Err(NFAError::Verification("NFA has no start states".into())); + } + if nfa.accept_states.is_empty() { + return Err(NFAError::Verification("NFA has no accept states".into())); + } + + // Use sorted collections for deterministic ordering + let mut start_states: Vec<_> = nfa.start_states.iter().copied().collect(); + start_states.sort_unstable(); + + let mut accept_states: Vec<_> = nfa.accept_states.iter().copied().collect(); + accept_states.sort_unstable(); + + let transitions = nfa.get_transitions_with_capture_info(); + if transitions.is_empty() { + return Err(NFAError::Verification("NFA has no transitions".into())); + } + + // Group and convert to ranges - use BTreeMap for deterministic ordering + let mut range_transitions = Vec::new(); + let mut grouped: BTreeMap<(usize, usize, Option>), Vec> = + BTreeMap::new(); + + for (src, byte, dst, capture) in transitions { + if src >= nfa.nodes.len() || dst >= nfa.nodes.len() { + return Err(NFAError::InvalidStateId(format!( + "State {}->{} out of bounds", + src, dst + ))); + } + grouped.entry((src, dst, capture)).or_default().push(byte); + } + + // Convert to ranges + for ((src, dst, capture), mut bytes) in grouped { + if bytes.is_empty() { + return Err(NFAError::InvalidTransition(format!( + "Found an empty byte list for transition group (src: {}, dst: {}, capture: {:?})", + src, dst, capture + ))); + } + + bytes.sort_unstable(); + let mut start = bytes[0]; + let mut prev = start; + + for &byte in &bytes[1..] { + if byte != prev + 1 { + range_transitions.push((src, start, prev, dst, capture.clone())); + start = byte; + } + prev = byte; + } + range_transitions.push((src, start, prev, dst, capture.clone())); + } + + Ok((start_states, accept_states, range_transitions)) +} + +pub fn generate_circuit_inputs( + nfa: &NFAGraph, + haystack: &str, + max_haystack_len: usize, + max_match_len: usize, + proving_framework: ProvingFramework, +) -> NFAResult { + let haystack_bytes = haystack.as_bytes(); + + if haystack_bytes.len() > max_haystack_len { + return Err(NFAError::InvalidInput(format!( + "Haystack length {} exceeds maximum length {}", + haystack_bytes.len(), + max_haystack_len + ))); + } + + // Generate path traversal + let result = nfa.get_path_to_accept(haystack_bytes)?; + let path = result.path; + let (match_start, match_length) = result.span; + let path_len = path.len(); + + if path_len != match_length { + return Err(NFAError::InvalidInput(format!( + "Path length {} does not equal match length {}", + path_len, match_length + ))); + } + + if path_len > max_match_len { + return Err(NFAError::InvalidInput(format!( + "Path length {} exceeds maximum length {}", + path_len, max_match_len + ))); + } + + // Extract and pad arrays to max_haystack_len + let mut curr_states = path.iter().map(|(curr, _, _, _)| *curr).collect::>(); + let mut next_states = path.iter().map(|(_, next, _, _)| *next).collect::>(); + let mut in_haystack = haystack_bytes.to_vec(); + + // Pad with zeros + curr_states.resize(max_match_len, 0); + next_states.resize(max_match_len, 0); + in_haystack.resize(max_haystack_len, 0); + + // Handle capture groups if they exist + let (capture_group_ids, capture_group_starts, capture_group_start_indices) = + if path.iter().any(|(_, _, _, c)| c.is_some()) { + let mut capture_group_ids: Vec> = + vec![vec![0; max_match_len]; nfa.num_capture_groups]; + let mut capture_group_starts: Vec> = + vec![vec![0; max_match_len]; nfa.num_capture_groups]; + + for step_idx in 0..path_len { + if let Some(capture_set) = &path[step_idx].3 { + for (group_id, is_start) in capture_set.iter() { + if *group_id > 0 && *group_id <= nfa.num_capture_groups { + let group_vector_idx = *group_id - 1; + capture_group_ids[group_vector_idx][step_idx] = *group_id; + capture_group_starts[group_vector_idx][step_idx] = + if *is_start { 1 } else { 0 }; + } + } + } + } + + let re = Regex::new(&nfa.regex).map_err(|e| { + NFAError::RegexCompilation(format!("Failed to compile regex: {}", e)) + })?; + let mut captures = re.create_captures(); + re.captures(&haystack, &mut captures); + + let start_indices = (1..=captures.group_len()) + .filter_map(|i| captures.get_group(i)) + .map(|m| m.start) + .collect(); + + ( + Some(capture_group_ids), + Some(capture_group_starts), + Some(start_indices), + ) + } else { + (None, None, None) + }; + + let inputs = CircuitInputs { + in_haystack, + match_start, + match_length, + curr_states, + next_states, + capture_group_ids, + capture_group_starts, + capture_group_start_indices, + }; + + match proving_framework { + ProvingFramework::Circom => Ok(ProverInputs::Circom(inputs.into())), + ProvingFramework::Noir => Ok(ProverInputs::Noir(inputs.into())), + } +} + +pub fn escape_regex_for_display(pattern: &str) -> String { + pattern + .chars() + .map(|c| match c { + '\\' => "\\\\".to_string(), + '"' => "\\\"".to_string(), + '\n' => "\\n".to_string(), + '\r' => "\\r".to_string(), + '\t' => "\\t".to_string(), + c if c.is_control() => format!("\\x{:02x}", c as u8), + c => c.to_string(), + }) + .collect() +} diff --git a/compiler/src/bin/zk-regex.rs b/compiler/src/bin/zk-regex.rs new file mode 100644 index 00000000..4a873ab3 --- /dev/null +++ b/compiler/src/bin/zk-regex.rs @@ -0,0 +1,225 @@ +use clap::{Parser, Subcommand}; +use std::{fs::File, path::PathBuf, str::FromStr}; +use zk_regex_compiler::{ + CompilerError, DecomposedRegexConfig, NFAGraph, ProvingFramework, gen_circuit_inputs, + gen_from_decomposed, gen_from_raw, save_outputs, validate_cli_template_name, +}; + +#[derive(Parser)] +#[command(about = "ZK Regex Compiler CLI")] +struct Cli { + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +enum Commands { + /// Process a decomposed regex file + Decomposed { + /// Path to the decomposed regex JSON file + #[arg(short, long)] + decomposed_regex_path: PathBuf, + + /// Directory path for output files + #[arg(short, long)] + output_file_path: PathBuf, + + /// Template name in PascalCase (e.g., TimestampRegex) + #[arg(short, long, value_parser = validate_cli_template_name)] + template_name: String, + + /// Proving framework to use (e.g., circom, noir) + #[arg(short, long)] + proving_framework: String, + }, + + /// Process a raw regex string + Raw { + /// Raw regex string + #[arg(short, long)] + raw_regex: String, + + /// Directory path for output files + #[arg(short, long)] + output_file_path: PathBuf, + + /// Template name in PascalCase (e.g., TimestampRegex) + #[arg(short, long, value_parser = validate_cli_template_name)] + template_name: String, + + /// Proving framework to use (e.g., circom, noir) + #[arg(short, long)] + proving_framework: String, + }, + + /// Generate circuit inputs from a cached graph + GenerateCircuitInput { + /// Path to the graph JSON file + #[arg(short, long)] + graph_path: PathBuf, + + /// Input string to match + #[arg(short, long)] + input: String, + + /// Maximum haystack length + #[arg(short = 'l', long)] + max_haystack_len: usize, + + /// Maximum match length + #[arg(short = 'm', long)] + max_match_len: usize, + + /// Output JSON file for circuit inputs + #[arg(short, long)] + output_file_path: PathBuf, + + /// Proving framework to use (e.g., circom, noir) + #[arg(short, long)] + proving_framework: String, + }, +} + +fn main() -> Result<(), Box> { + let cli = Cli::parse(); + + match cli.command { + Commands::Decomposed { + decomposed_regex_path, + output_file_path, + template_name, + proving_framework, + } => { + let config: DecomposedRegexConfig = + serde_json::from_reader(File::open(decomposed_regex_path)?)?; + let proving_framework = ProvingFramework::from_str(&proving_framework)?; + + match gen_from_decomposed(config, &template_name, proving_framework) { + Ok((nfa, code)) => { + save_outputs( + &nfa, + code, + &output_file_path, + &template_name, + &proving_framework.file_extension(), + )?; + } + Err(compiler_err) => { + eprintln!("\n❌ Compilation failed:"); + eprintln!("Error Code: {}", compiler_err.code()); + eprintln!("Message: {}", compiler_err.user_message()); + + if compiler_err.is_recoverable() { + eprintln!("\n💡 This error can be fixed by adjusting your input."); + } else { + eprintln!("\n⚠️ This appears to be an internal compiler issue."); + eprintln!("Please consider reporting this issue if it persists."); + } + + std::process::exit(1); + } + } + } + + Commands::Raw { + raw_regex, + output_file_path, + template_name, + proving_framework, + } => { + let proving_framework = ProvingFramework::from_str(&proving_framework)?; + + match gen_from_raw(&raw_regex, None, &template_name, proving_framework) { + Ok((nfa, code)) => { + save_outputs( + &nfa, + code, + &output_file_path, + &template_name, + &proving_framework.file_extension(), + )?; + } + Err(compiler_err) => { + eprintln!("\n❌ Compilation failed:"); + eprintln!("Error Code: {}", compiler_err.code()); + eprintln!("Message: {}", compiler_err.user_message()); + + if compiler_err.is_recoverable() { + eprintln!("\n💡 This error can be fixed by adjusting your input."); + } else { + eprintln!("\n⚠️ This appears to be an internal compiler issue."); + eprintln!("Please consider reporting this issue if it persists."); + } + + std::process::exit(1); + } + } + } + + Commands::GenerateCircuitInput { + graph_path, + input, + max_haystack_len, + max_match_len, + output_file_path, + proving_framework, + } => { + // Load the cached graph + let graph_json = std::fs::read_to_string(graph_path)?; + + match NFAGraph::from_json(&graph_json) { + Ok(nfa) => { + // Generate circuit inputs + let framework = match proving_framework.as_str() { + "circom" => ProvingFramework::Circom, + "noir" => ProvingFramework::Noir, + _ => { + eprintln!("❌ Invalid proving framework: {}", proving_framework); + eprintln!("Supported frameworks: circom, noir"); + std::process::exit(1); + } + }; + + match gen_circuit_inputs( + &nfa, + &input, + max_haystack_len, + max_match_len, + framework, + ) { + Ok(inputs) => { + let input_json = serde_json::to_string_pretty(&inputs)?; + std::fs::write(&output_file_path, input_json)?; + println!( + "✅ Generated circuit inputs: {}", + output_file_path.display() + ); + } + Err(compiler_err) => { + eprintln!("\n❌ Input generation failed:"); + eprintln!("Error Code: {}", compiler_err.code()); + eprintln!("Message: {}", compiler_err.user_message()); + + if compiler_err.is_recoverable() { + eprintln!( + "\n💡 This error can be fixed by adjusting your input or parameters." + ); + } + + std::process::exit(1); + } + } + } + Err(nfa_err) => { + let compiler_err = CompilerError::from(nfa_err); + eprintln!("\n❌ Failed to load NFA graph:"); + eprintln!("Error Code: {}", compiler_err.code()); + eprintln!("Message: {}", compiler_err.user_message()); + std::process::exit(1); + } + } + } + } + + Ok(()) +} diff --git a/compiler/src/driver.rs b/compiler/src/driver.rs new file mode 100644 index 00000000..2f1348f3 --- /dev/null +++ b/compiler/src/driver.rs @@ -0,0 +1,131 @@ +//! Compilation driver for the ZK-Regex compiler +//! +//! This module orchestrates the compilation pipeline, taking regex patterns +//! through various transformation passes to generate circuit code. + +use crate::{ + error::{CompilerError, CompilerResult}, + ir::NFAGraph, + types::ProvingFramework, +}; + +/// Configuration for the compilation process +#[derive(Debug, Clone)] +pub struct CompilationConfig { + pub template_name: String, + pub proving_framework: ProvingFramework, + pub max_bytes: Option>, + pub optimize: bool, +} + +impl CompilationConfig { + /// Validate the compilation configuration + pub fn validate(&self) -> CompilerResult<()> { + if self.template_name.is_empty() { + return Err(CompilerError::Configuration { + code: crate::error::ErrorCode::E5001, + message: "Template name cannot be empty".to_string(), + parameter: Some("template_name".to_string()), + expected: Some("Non-empty string".to_string()), + suggestion: Some("Provide a valid template name".to_string()), + }); + } + // Check for invalid characters or patterns in template name + if self.template_name.chars().any(|c| c.is_whitespace()) { + return Err(CompilerError::Configuration { + code: crate::error::ErrorCode::E5001, + message: "Template name cannot contain spaces or whitespace characters".to_string(), + parameter: Some("template_name".to_string()), + expected: Some("String without spaces".to_string()), + suggestion: Some("Use underscores or camelCase instead of spaces".to_string()), + }); + } + Ok(()) + } +} + +/// Result of the compilation process +#[derive(Debug)] +pub struct CompilationResult { + pub nfa: NFAGraph, + pub code: String, +} + +/// Main compilation driver +pub struct Driver; + +impl Driver { + /// Compile a regex pattern into circuit code + pub fn compile(pattern: &str, config: CompilationConfig) -> CompilerResult { + // Validate configuration + config.validate()?; + + // Validate regex pattern + if pattern.is_empty() { + return Err(CompilerError::RegexValidation { + code: crate::error::ErrorCode::E1003, + message: "Regex pattern cannot be empty".to_string(), + pattern: Some(pattern.to_string()), + position: None, + suggestion: Some("Provide a non-empty regex pattern".to_string()), + }); + } + + // Build NFA from pattern - this automatically converts NFAError to CompilerError + let nfa = NFAGraph::build(pattern)?; + + // Backend: generate code with better error handling + let code = match config.proving_framework { + ProvingFramework::Circom => { + let max_bytes_clone = config.max_bytes.clone(); + crate::backend::generate_circom_code( + &nfa, + &config.template_name, + pattern, + config.max_bytes, + ) + .map_err(|nfa_err| { + // Convert NFAError to more specific CompilerError for circuit generation + match nfa_err { + crate::passes::NFAError::InvalidCapture(msg) => { + CompilerError::invalid_capture_config( + nfa.num_capture_groups, + max_bytes_clone.as_ref().map(|v| v.len()).unwrap_or(0), + ) + } + crate::passes::NFAError::InvalidInput(msg) => { + CompilerError::circuit_generation_failed("Circom", &msg) + } + other => CompilerError::from(other), + } + })? + } + ProvingFramework::Noir => { + let max_bytes_clone = config.max_bytes.clone(); + crate::backend::generate_noir_code( + &nfa, + &config.template_name, + pattern, + config.max_bytes, + ) + .map_err(|nfa_err| { + // Convert NFAError to more specific CompilerError for circuit generation + match nfa_err { + crate::passes::NFAError::InvalidCapture(msg) => { + CompilerError::invalid_capture_config( + nfa.num_capture_groups, + max_bytes_clone.as_ref().map(|v| v.len()).unwrap_or(0), + ) + } + crate::passes::NFAError::InvalidInput(msg) => { + CompilerError::circuit_generation_failed("Noir", &msg) + } + other => CompilerError::from(other), + } + })? + } + }; + + Ok(CompilationResult { nfa, code }) + } +} diff --git a/compiler/src/error.rs b/compiler/src/error.rs new file mode 100644 index 00000000..1d447e21 --- /dev/null +++ b/compiler/src/error.rs @@ -0,0 +1,324 @@ +//! Comprehensive error handling for the ZK-Regex compiler +//! +//! This module provides structured error types with error codes, context preservation, +//! and actionable error messages for users. + +use std::fmt; +use thiserror::Error; + +/// Error codes for programmatic error handling +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum ErrorCode { + // Regex validation errors (1000-1999) + E1001, // InvalidRegexSyntax + E1002, // UnsupportedRegexFeature + E1003, // EmptyRegexPattern + E1004, // RegexTooComplex + + // NFA construction errors (2000-2999) + E2001, // NFAConstructionFailed + E2002, // InvalidStateTransition + E2003, // EpsilonRemovalFailed + E2004, // StateValidationFailed + + // Circuit generation errors (3000-3999) + E3001, // CircuitGenerationFailed + E3002, // InvalidCaptureGroup + E3003, // MaxBytesExceeded + E3004, // TemplateGenerationFailed + + // Input validation errors (4000-4999) + E4001, // InvalidInputLength + E4002, // InputGenerationFailed + E4003, // NoMatchFound + E4004, // PathTraversalFailed, + + // Configuration errors (5000-5999) + E5001, // InvalidConfiguration + E5002, // UnsupportedFramework + E5003, // MissingParameters + + // Internal errors (9000-9999) + E9001, // SerializationError + E9002, // DeserializationError + E9003, // InternalError +} + +impl fmt::Display for ErrorCode { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ErrorCode::E1001 => write!(f, "E1001"), + ErrorCode::E1002 => write!(f, "E1002"), + ErrorCode::E1003 => write!(f, "E1003"), + ErrorCode::E1004 => write!(f, "E1004"), + ErrorCode::E2001 => write!(f, "E2001"), + ErrorCode::E2002 => write!(f, "E2002"), + ErrorCode::E2003 => write!(f, "E2003"), + ErrorCode::E2004 => write!(f, "E2004"), + ErrorCode::E3001 => write!(f, "E3001"), + ErrorCode::E3002 => write!(f, "E3002"), + ErrorCode::E3003 => write!(f, "E3003"), + ErrorCode::E3004 => write!(f, "E3004"), + ErrorCode::E4001 => write!(f, "E4001"), + ErrorCode::E4002 => write!(f, "E4002"), + ErrorCode::E4003 => write!(f, "E4003"), + ErrorCode::E4004 => write!(f, "E4004"), + ErrorCode::E5001 => write!(f, "E5001"), + ErrorCode::E5002 => write!(f, "E5002"), + ErrorCode::E5003 => write!(f, "E5003"), + ErrorCode::E9001 => write!(f, "E9001"), + ErrorCode::E9002 => write!(f, "E9002"), + ErrorCode::E9003 => write!(f, "E9003"), + } + } +} + +/// Comprehensive error type for the ZK-Regex compiler +#[derive(Error, Debug)] +pub enum CompilerError { + /// Regex pattern validation errors + #[error("{code}: {message}")] + RegexValidation { + code: ErrorCode, + message: String, + pattern: Option, + position: Option, + suggestion: Option, + }, + + /// NFA construction and processing errors + #[error("{code}: {message}")] + NFAConstruction { + code: ErrorCode, + message: String, + state_info: Option, + suggestion: Option, + }, + + /// Circuit generation errors + #[error("{code}: {message}")] + CircuitGeneration { + code: ErrorCode, + message: String, + template_name: Option, + framework: Option, + suggestion: Option, + }, + + /// Input processing and validation errors + #[error("{code}: {message}")] + InputProcessing { + code: ErrorCode, + message: String, + input_info: Option, + limits: Option, + suggestion: Option, + }, + + /// Configuration errors + #[error("{code}: {message}")] + Configuration { + code: ErrorCode, + message: String, + parameter: Option, + expected: Option, + suggestion: Option, + }, + + /// Internal system errors + #[error("{code}: Internal error - {message}")] + Internal { + code: ErrorCode, + message: String, + context: Option, + }, +} + +impl CompilerError { + /// Get the error code for this error + pub fn code(&self) -> ErrorCode { + match self { + CompilerError::RegexValidation { code, .. } => *code, + CompilerError::NFAConstruction { code, .. } => *code, + CompilerError::CircuitGeneration { code, .. } => *code, + CompilerError::InputProcessing { code, .. } => *code, + CompilerError::Configuration { code, .. } => *code, + CompilerError::Internal { code, .. } => *code, + } + } + + /// Get a user-friendly error message with suggestions + pub fn user_message(&self) -> String { + let base_message = match self { + CompilerError::RegexValidation { + message, + pattern, + suggestion, + .. + } => { + let mut msg = message.clone(); + if let Some(pattern) = pattern { + msg.push_str(&format!("\nPattern: '{}'", pattern)); + } + if let Some(suggestion) = suggestion { + msg.push_str(&format!("\nSuggestion: {}", suggestion)); + } + msg + } + CompilerError::NFAConstruction { + message, + suggestion, + .. + } => { + let mut msg = message.clone(); + if let Some(suggestion) = suggestion { + msg.push_str(&format!("\nSuggestion: {}", suggestion)); + } + msg + } + CompilerError::CircuitGeneration { + message, + suggestion, + .. + } => { + let mut msg = message.clone(); + if let Some(suggestion) = suggestion { + msg.push_str(&format!("\nSuggestion: {}", suggestion)); + } + msg + } + CompilerError::InputProcessing { + message, + suggestion, + .. + } => { + let mut msg = message.clone(); + if let Some(suggestion) = suggestion { + msg.push_str(&format!("\nSuggestion: {}", suggestion)); + } + msg + } + CompilerError::Configuration { + message, + suggestion, + .. + } => { + let mut msg = message.clone(); + if let Some(suggestion) = suggestion { + msg.push_str(&format!("\nSuggestion: {}", suggestion)); + } + msg + } + CompilerError::Internal { + message, context, .. + } => { + let mut msg = format!("Internal error: {}", message); + if let Some(context) = context { + msg.push_str(&format!("\nContext: {}", context)); + } + msg.push_str("\nPlease report this issue with your regex pattern."); + msg + } + }; + base_message + } + + /// Check if this error is recoverable + pub fn is_recoverable(&self) -> bool { + matches!( + self, + CompilerError::RegexValidation { .. } + | CompilerError::InputProcessing { .. } + | CompilerError::Configuration { .. } + ) + } +} + +// Convenience constructors +impl CompilerError { + pub fn invalid_regex_syntax(pattern: &str, message: &str, position: Option) -> Self { + CompilerError::RegexValidation { + code: ErrorCode::E1001, + message: message.to_string(), + pattern: Some(pattern.to_string()), + position, + suggestion: Some("Check regex syntax documentation".to_string()), + } + } + + pub fn unsupported_feature(pattern: &str, feature: &str) -> Self { + CompilerError::RegexValidation { + code: ErrorCode::E1002, + message: format!("Unsupported regex feature: {}", feature), + pattern: Some(pattern.to_string()), + position: None, + suggestion: Some(format!("Remove {} from your regex pattern", feature)), + } + } + + pub fn nfa_construction_failed(message: &str) -> Self { + CompilerError::NFAConstruction { + code: ErrorCode::E2001, + message: message.to_string(), + state_info: None, + suggestion: Some("Try simplifying your regex pattern".to_string()), + } + } + + pub fn circuit_generation_failed(framework: &str, message: &str) -> Self { + CompilerError::CircuitGeneration { + code: ErrorCode::E3001, + message: message.to_string(), + template_name: None, + framework: Some(framework.to_string()), + suggestion: Some("Check template name and max_bytes configuration".to_string()), + } + } + + pub fn invalid_capture_config(group_count: usize, provided: usize) -> Self { + CompilerError::CircuitGeneration { + code: ErrorCode::E3002, + message: format!( + "Invalid capture group configuration: need {} max_bytes but got {}", + group_count, provided + ), + template_name: None, + framework: None, + suggestion: Some(format!( + "Provide exactly {} max_bytes values for capture groups", + group_count + )), + } + } + + pub fn input_too_long(actual: usize, max: usize) -> Self { + CompilerError::InputProcessing { + code: ErrorCode::E4001, + message: format!("Input length {} exceeds maximum {}", actual, max), + input_info: Some(format!("actual: {}, max: {}", actual, max)), + limits: Some(format!("max_haystack_len: {}", max)), + suggestion: Some("Increase max_haystack_len or reduce input size".to_string()), + } + } + + pub fn no_match_found(input: &str) -> Self { + CompilerError::InputProcessing { + code: ErrorCode::E4003, + message: "No regex match found in input".to_string(), + input_info: Some(format!("input length: {}", input.len())), + limits: None, + suggestion: Some("Check that your input contains the expected pattern".to_string()), + } + } + + pub fn serialization_error(context: &str, source: &str) -> Self { + CompilerError::Internal { + code: ErrorCode::E9001, + message: format!("Serialization failed: {}", source), + context: Some(context.to_string()), + } + } +} + +/// Result type for compiler operations +pub type CompilerResult = Result; diff --git a/compiler/src/ir/graph.rs b/compiler/src/ir/graph.rs new file mode 100644 index 00000000..63fc75c5 --- /dev/null +++ b/compiler/src/ir/graph.rs @@ -0,0 +1,224 @@ +//! Graph algorithms and operations for NFAs + +use regex_automata::{Input, nfa::thompson::pikevm::PikeVM}; + +use super::NFAGraph; +use crate::passes::{NFAError, NFAResult}; +use std::collections::{BTreeSet, HashMap, HashSet}; + +// Using NFAResult from passes module + +// Each step in the path contains: +// (current_state, next_state, byte, Option>) +pub type PathStep = (usize, usize, u8, Option>); +pub type TraversalPath = Vec; + +pub struct PathWithMatchSpan { + pub path: TraversalPath, + pub span: (usize, usize), // (start, length) +} + +impl NFAGraph { + /// Get all transitions in the form (curr_state, byte, next_state) + pub fn get_all_transitions(&self) -> Vec<(usize, u8, usize)> { + let mut transitions = Vec::new(); + for (state_idx, node) in self.nodes.iter().enumerate() { + for (&byte, destinations) in &node.byte_transitions { + for &next_state in destinations { + transitions.push((state_idx, byte, next_state)); + } + } + } + transitions + } + + /// Get transitions with capture group information + pub fn get_transitions_with_capture_info( + &self, + ) -> Vec<(usize, u8, usize, Option>)> { + let mut transitions = Vec::new(); + for (state_idx, node) in self.nodes.iter().enumerate() { + for (&byte, destinations) in &node.byte_transitions { + for &next_state in destinations { + if let Some(captures_on_next_state) = node.capture_groups.get(&next_state) { + transitions.push(( + state_idx, + byte, + next_state, + Some(captures_on_next_state.clone()), + )); + } else { + // No capture group map entry for this next_state + transitions.push((state_idx, byte, next_state, None)); + }; + } + } + } + transitions + } + + /// Check if a state is reachable from any start state + pub fn is_state_reachable(&self, target: usize) -> bool { + let mut visited = HashSet::new(); + let mut stack: Vec = Vec::new(); + + // Start from all start states + stack.extend(&self.start_states); + + while let Some(state) = stack.pop() { + if state == target { + return true; + } + + if visited.insert(state) { + // Add all states reachable through byte transitions + for destinations in self.nodes[state].byte_transitions.values() { + stack.extend(destinations.iter()); + } + } + } + + false + } + + /// Get all states that can reach accept states + pub fn get_states_reaching_accept(&self) -> HashSet { + let mut reaching_accept = HashSet::new(); + let mut reverse_edges: HashMap> = HashMap::new(); + + // Build reverse graph + for (state_idx, node) in self.nodes.iter().enumerate() { + for destinations in node.byte_transitions.values() { + for &dest in destinations { + reverse_edges.entry(dest).or_default().push(state_idx); + } + } + } + + // Start from accept states + let mut stack: Vec<_> = self.accept_states.iter().copied().collect(); + while let Some(state) = stack.pop() { + if reaching_accept.insert(state) { + if let Some(predecessors) = reverse_edges.get(&state) { + stack.extend(predecessors); + } + } + } + + reaching_accept + } + + /// Verify the NFA's structural integrity + pub fn verify(&self) -> NFAResult<()> { + // Check state indices + for (idx, node) in self.nodes.iter().enumerate() { + if node.state_id != idx { + return Err(NFAError::InvalidStateId(format!( + "State ID mismatch at index {}", + idx + ))); + } + } + + // Check transition validity + for (state_idx, node) in self.nodes.iter().enumerate() { + for destinations in node.byte_transitions.values() { + for &dest in destinations { + if dest >= self.nodes.len() { + return Err(NFAError::InvalidTransition(format!( + "Invalid transition target {} from state {}", + dest, state_idx + ))); + } + } + } + } + + // Check start states validity + for &start in &self.start_states { + if start >= self.nodes.len() { + return Err(NFAError::InvalidStateId(format!( + "Invalid start state {}", + start + ))); + } + } + + // Check accept states validity + for &accept in &self.accept_states { + if accept >= self.nodes.len() { + return Err(NFAError::InvalidStateId(format!( + "Invalid accept state {}", + accept + ))); + } + } + + Ok(()) + } + + /// Get the path to the accept state for a given haystack + pub fn get_path_to_accept(&self, haystack: &[u8]) -> NFAResult { + let vm = PikeVM::new(&self.regex) + .map_err(|e| NFAError::RegexCompilation(format!("Failed to build VM: {}", e)))?; + let mut cache = vm.create_cache(); + let mat = vm + .find(&mut cache, Input::new(haystack)) + .ok_or_else(|| NFAError::NoMatch("No match found".into()))?; + + let matched_bytes = &haystack[mat.range()]; + let mut paths: HashMap = HashMap::new(); + + // Start with all defined start states + for &start_state in &self.start_states { + paths.insert(start_state, Vec::new()); + } + + if paths.is_empty() { + return Err(NFAError::NoMatch( + "No start states defined in the NFA".into(), + )); + } + + for &byte in matched_bytes { + let mut new_paths = HashMap::new(); + + // For each current path + for (state, path) in paths { + // Get all possible transitions for this byte + if let Some(transitions) = self.nodes[state].byte_transitions.get(&byte) { + // Branch out to each possible next state + for &next_state in transitions { + let mut new_path = path.clone(); + let capture = self.nodes[state] + .capture_groups + .get(&next_state) + .and_then(|caps| Some(caps.clone())); + + new_path.push((state, next_state, byte, capture)); + new_paths.insert(next_state, new_path); + } + } + } + + // If no valid transitions found + if new_paths.is_empty() { + return Err(NFAError::NoValidPath("No valid transitions found".into())); + } + + paths = new_paths; + } + + // Find any path that reached an accept state + for (state, path) in paths { + if self.accept_states.contains(&state) { + return Ok(PathWithMatchSpan { + path, + span: (mat.start(), mat.end() - mat.start()), + }); + } + } + + Err(NFAError::NoValidPath("No path reached accept state".into())) + } +} diff --git a/compiler/src/ir/intermediate.rs b/compiler/src/ir/intermediate.rs new file mode 100644 index 00000000..d38a5524 --- /dev/null +++ b/compiler/src/ir/intermediate.rs @@ -0,0 +1,407 @@ +//! Intermediate NFA representation during compilation +//! +//! This module contains the intermediate representation used during the compilation +//! pipeline. The intermediate NFA may contain epsilon transitions and other constructs +//! that need to be processed before generating the final circuit-ready representation. + +use serde::{Deserialize, Serialize}; +use std::collections::{BTreeMap, BTreeSet}; + +use super::nfa::{NFAGraph, NFANode}; +use crate::passes::{NFAError, NFAResult}; + +/// Intermediate NFA node that may contain epsilon transitions +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +pub struct IntermediateNFANode { + /// Unique identifier for this state + pub state_id: usize, + + /// Byte-consuming transitions: byte -> set of target states + pub byte_transitions: BTreeMap>, + + /// Epsilon (non-consuming) transitions to other states + pub epsilon_transitions: BTreeSet, + + /// Capture group information: target_state -> capture_events + pub capture_groups: BTreeMap>, +} + +/// Intermediate NFA representation used during compilation +/// +/// This representation may contain epsilon transitions and other intermediate +/// constructs that need to be processed before circuit generation. +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +pub struct IntermediateNFA { + /// The original regex pattern + pub regex: String, + + /// All states in the intermediate NFA + pub nodes: Vec, + + /// Set of start state indices + pub start_states: BTreeSet, + + /// Set of accept state indices + pub accept_states: BTreeSet, + + /// Number of capture groups in the regex + pub num_capture_groups: usize, +} + +impl IntermediateNFA { + /// Create a new empty intermediate NFA + pub fn new(regex: String) -> Self { + Self { + regex, + nodes: Vec::new(), + start_states: BTreeSet::new(), + accept_states: BTreeSet::new(), + num_capture_groups: 0, + } + } + + /// Validate the structural integrity of the intermediate NFA + pub fn validate(&self) -> NFAResult<()> { + if self.nodes.is_empty() { + return Err(NFAError::EmptyAutomaton( + "No states in intermediate NFA".into(), + )); + } + + if self.start_states.is_empty() { + return Err(NFAError::Verification("No start states defined".into())); + } + + // Validate state IDs are sequential and match indices + for (idx, node) in self.nodes.iter().enumerate() { + if node.state_id != idx { + return Err(NFAError::InvalidStateId(format!( + "State ID {} doesn't match index {} in intermediate NFA", + node.state_id, idx + ))); + } + } + + // Validate transition targets are within bounds + for (state_idx, node) in self.nodes.iter().enumerate() { + // Check byte transitions + for destinations in node.byte_transitions.values() { + for &dest in destinations { + if dest >= self.nodes.len() { + return Err(NFAError::InvalidTransition(format!( + "Byte transition from state {} to invalid state {}", + state_idx, dest + ))); + } + } + } + + // Check epsilon transitions + for &dest in &node.epsilon_transitions { + if dest >= self.nodes.len() { + return Err(NFAError::InvalidTransition(format!( + "Epsilon transition from state {} to invalid state {}", + state_idx, dest + ))); + } + } + } + + Ok(()) + } + + /// Convert the intermediate NFA to a final circuit-ready NFA + /// + /// This process eliminates epsilon transitions and creates a clean + /// final representation suitable for circuit generation. + pub fn finalize(self) -> NFAResult { + // Create a mutable copy for epsilon elimination + let mut intermediate = self; + + // Remove epsilon transitions using the existing algorithm + intermediate.remove_epsilon_transitions()?; + + // Convert to final representation (no epsilon transitions) + let final_nodes: Vec = intermediate + .nodes + .into_iter() + .map(|intermediate_node| NFANode { + state_id: intermediate_node.state_id, + byte_transitions: intermediate_node.byte_transitions, + capture_groups: intermediate_node.capture_groups, + }) + .collect(); + + let final_nfa = NFAGraph { + regex: intermediate.regex, + nodes: final_nodes, + start_states: intermediate.start_states, + accept_states: intermediate.accept_states, + num_capture_groups: intermediate.num_capture_groups, + }; + + // Final validation + final_nfa.verify()?; + + Ok(final_nfa) + } +} + +// Implement epsilon transition removal for intermediate NFA +impl IntermediateNFA { + /// Remove epsilon transitions while preserving language semantics + fn remove_epsilon_transitions(&mut self) -> NFAResult<()> { + // Compute epsilon closures for all states + let closures = self.compute_epsilon_closures()?; + + let mut new_transitions = vec![BTreeMap::new(); self.nodes.len()]; + let mut new_captures = vec![BTreeMap::new(); self.nodes.len()]; + let mut new_start_states = BTreeSet::new(); + let mut new_accept_states = BTreeSet::new(); + + // Track states with byte transitions + let mut has_byte_transitions = vec![false; self.nodes.len()]; + + // Process epsilon closures and create new transitions + for (state, closure) in closures.iter().enumerate() { + // Mark state as accepting if any state in closure is accepting + if closure.is_accept { + new_accept_states.insert(state); + } + + // For each state reachable via epsilon that has byte transitions + for &r_state in &closure.states { + if !self.nodes[r_state].byte_transitions.is_empty() { + has_byte_transitions[r_state] = true; + + // Create direct byte transitions bypassing epsilon transitions + for (&byte, targets) in &self.nodes[r_state].byte_transitions { + for &actual_target in targets { + new_transitions[state] + .entry(byte) + .or_insert_with(BTreeSet::new) + .insert(actual_target); + + // Merge capture group information + let captures_for_transition = new_captures[state] + .entry(actual_target) + .or_insert_with(BTreeSet::new); + + // Add start captures from epsilon path before byte transition + for &(_, (group_id, is_start)) in &closure.captures { + if is_start { + captures_for_transition.insert((group_id, true)); + } + } + + // Add end captures from epsilon path after byte transition + let target_closure = &closures[actual_target]; + for &(_, (group_id, is_start)) in &target_closure.captures { + if !is_start { + captures_for_transition.insert((group_id, false)); + } + } + } + } + } + } + } + + // Handle start states carefully to preserve capture semantics + let original_starts: BTreeSet = self.start_states.iter().copied().collect(); + + for &orig_start in &original_starts { + new_start_states.insert(orig_start); + + // Check if start state's closure has start captures + let has_start_captures = closures + .get(orig_start) + .map(|closure| closure.captures.iter().any(|(_, (_, is_start))| *is_start)) + .unwrap_or(false); + + // Only add alternative start states if no start captures would be bypassed + if !has_start_captures { + if let Some(closure) = closures.get(orig_start) { + for &r_state in &closure.states { + if r_state != orig_start + && r_state < has_byte_transitions.len() + && has_byte_transitions[r_state] + { + new_start_states.insert(r_state); + } + } + } + } + } + + // Apply the changes + self.start_states = new_start_states; + self.accept_states = new_accept_states; + + for (state, (transitions, captures)) in new_transitions + .into_iter() + .zip(new_captures.into_iter()) + .enumerate() + { + self.nodes[state].byte_transitions = transitions; + self.nodes[state].capture_groups = captures; + self.nodes[state].epsilon_transitions.clear(); // Remove all epsilon transitions + } + + // Clean up unreachable states + self.remove_unreachable_states(); + + Ok(()) + } + + /// Compute epsilon closures using the existing algorithm + fn compute_epsilon_closures(&self) -> NFAResult> { + let mut closures = Vec::new(); + for state in 0..self.nodes.len() { + closures.push(self.compute_epsilon_closure(state)?); + } + Ok(closures) + } + + fn compute_epsilon_closure(&self, start: usize) -> NFAResult { + let mut closure = EpsilonClosure { + states: BTreeSet::new(), + captures: BTreeSet::new(), + is_accept: false, + }; + + fn dfs( + nfa: &IntermediateNFA, + state: usize, + closure: &mut EpsilonClosure, + visited: &mut BTreeSet, + ) -> NFAResult<()> { + if !visited.insert(state) { + return Ok(()); + } + + closure.states.insert(state); + + // Collect capture information + for (&capture_state, captures) in &nfa.nodes[state].capture_groups { + for capture in captures { + closure.captures.insert((capture_state, *capture)); + } + } + + // Check if this state is accepting + if nfa.accept_states.contains(&state) { + closure.is_accept = true; + } + + // Follow epsilon transitions + for &next in &nfa.nodes[state].epsilon_transitions { + dfs(nfa, next, closure, visited)?; + } + + Ok(()) + } + + let mut visited = BTreeSet::new(); + dfs(self, start, &mut closure, &mut visited)?; + + Ok(closure) + } + + fn remove_unreachable_states(&mut self) { + // Find reachable states via BFS + let mut reachable = BTreeSet::new(); + let mut queue = Vec::new(); + + // Start from all start states + for &start in &self.start_states { + if reachable.insert(start) { + queue.push(start); + } + } + + // BFS to find all reachable states + while let Some(state) = queue.pop() { + if state < self.nodes.len() { + for targets in self.nodes[state].byte_transitions.values() { + for &target in targets { + if reachable.insert(target) { + queue.push(target); + } + } + } + } + } + + // Remove unreachable states if any exist + if reachable.len() < self.nodes.len() { + self.compact_states(reachable); + } + } + + fn compact_states(&mut self, reachable: BTreeSet) { + // Create mapping from old to new indices + let mut old_to_new = BTreeMap::new(); + let mut new_nodes = Vec::with_capacity(reachable.len()); + + let mut new_idx = 0; + for &old_idx in &reachable { + old_to_new.insert(old_idx, new_idx); + new_idx += 1; + } + + // Create compacted nodes with updated indices + for &old_idx in &reachable { + let mut node = self.nodes[old_idx].clone(); + node.state_id = old_to_new[&old_idx]; + + // Update byte transition targets + let mut new_byte_transitions = BTreeMap::new(); + for (byte, targets) in node.byte_transitions { + let new_targets: BTreeSet = targets + .into_iter() + .filter_map(|target| old_to_new.get(&target).copied()) + .collect(); + + if !new_targets.is_empty() { + new_byte_transitions.insert(byte, new_targets); + } + } + node.byte_transitions = new_byte_transitions; + + // Update capture group targets + let mut new_captures = BTreeMap::new(); + for (target, captures) in node.capture_groups { + if let Some(&new_target) = old_to_new.get(&target) { + new_captures.insert(new_target, captures); + } + } + node.capture_groups = new_captures; + + new_nodes.push(node); + } + + // Update start and accept states + self.start_states = self + .start_states + .iter() + .filter_map(|&state| old_to_new.get(&state).copied()) + .collect(); + + self.accept_states = self + .accept_states + .iter() + .filter_map(|&state| old_to_new.get(&state).copied()) + .collect(); + + self.nodes = new_nodes; + } +} + +/// Epsilon closure computation helper +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +struct EpsilonClosure { + states: BTreeSet, + captures: BTreeSet<(usize, (usize, bool))>, + is_accept: bool, +} diff --git a/compiler/src/ir/mod.rs b/compiler/src/ir/mod.rs new file mode 100644 index 00000000..b73b0236 --- /dev/null +++ b/compiler/src/ir/mod.rs @@ -0,0 +1,17 @@ +//! Intermediate Representation module +//! +//! This module contains the core data structures used throughout the compilation pipeline. +//! +//! The compilation flow is: +//! 1. Parse regex with `regex-automata` -> Thompson NFA +//! 2. Convert to `IntermediateNFA` (may have epsilon transitions) +//! 3. Process and optimize intermediate representation +//! 4. Convert to final `NFAGraph` (no epsilon transitions, circuit-ready) + +pub mod graph; +pub mod intermediate; +pub mod nfa; + +pub use graph::*; +pub use intermediate::*; +pub use nfa::*; diff --git a/compiler/src/ir/nfa.rs b/compiler/src/ir/nfa.rs new file mode 100644 index 00000000..6a0b3f63 --- /dev/null +++ b/compiler/src/ir/nfa.rs @@ -0,0 +1,173 @@ +//! Final NFA representation for circuit generation +//! +//! This module contains the final, circuit-ready NFA representation. +//! All epsilon transitions have been eliminated and the structure is +//! optimized for circuit generation. + +use serde::{Deserialize, Serialize}; +use std::collections::{BTreeMap, BTreeSet}; + +use crate::passes::{NFAError, NFAResult}; + +/// Final NFA node (no epsilon transitions) +/// +/// This represents a state in the final NFA that is ready for circuit generation. +/// All epsilon transitions have been eliminated during the compilation process. +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +pub struct NFANode { + /// Unique identifier for this state + pub state_id: usize, + + /// Byte-consuming transitions: byte -> set of target states + pub byte_transitions: BTreeMap>, + + /// Capture group information: target_state -> capture_events + /// Each capture event is (group_id, is_start_of_group) + pub capture_groups: BTreeMap>, +} + +impl NFANode { + /// Check if this node represents an anchor state (start/end of string) + pub fn is_anchor(&self) -> bool { + // In our representation, anchor information is implicit in the graph structure + // Start states are tracked in NFAGraph.start_states + // Accept states are tracked in NFAGraph.accept_states + false + } +} + +/// Final NFA representation ready for circuit generation +/// +/// This is the final output of the compilation pipeline. It contains no epsilon +/// transitions and is optimized for conversion to arithmetic circuits. +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +pub struct NFAGraph { + /// The original regex pattern + pub regex: String, + + /// All states in the final NFA (no epsilon transitions) + pub nodes: Vec, + + /// Set of start state indices + pub start_states: BTreeSet, + + /// Set of accept state indices + pub accept_states: BTreeSet, + + /// Number of capture groups in the regex + pub num_capture_groups: usize, +} + +impl NFAGraph { + /// Create a new empty NFA graph + pub fn new(regex: String) -> Self { + Self { + regex, + nodes: Vec::new(), + start_states: BTreeSet::new(), + accept_states: BTreeSet::new(), + num_capture_groups: 0, + } + } + + /// Serialize the NFA graph to JSON + pub fn to_json(&self) -> NFAResult { + serde_json::to_string_pretty(self) + .map_err(|e| NFAError::Serialization(format!("Failed to serialize NFA to JSON: {}", e))) + } + + /// Deserialize the NFA graph from JSON + pub fn from_json(json: &str) -> NFAResult { + serde_json::from_str(json).map_err(|e| { + NFAError::Deserialization(format!("Failed to deserialize NFA from JSON: {}", e)) + }) + } + + /// Get the number of states in the NFA + pub fn state_count(&self) -> usize { + self.nodes.len() + } + + /// Get the number of transitions in the NFA + pub fn transition_count(&self) -> usize { + self.nodes + .iter() + .map(|node| { + node.byte_transitions + .values() + .map(|targets| targets.len()) + .sum::() + }) + .sum() + } + + /// Check if the NFA is empty (no states) + pub fn is_empty(&self) -> bool { + self.nodes.is_empty() + } + + /// Get all bytes that can be consumed by this NFA + pub fn alphabet(&self) -> BTreeSet { + self.nodes + .iter() + .flat_map(|node| node.byte_transitions.keys()) + .copied() + .collect() + } + + /// Pretty print the NFA for debugging + pub fn pretty_print(&self) { + println!("\n=== Final NFA Graph ==="); + println!("Regex: {}", self.regex); + println!("States: {}", self.state_count()); + println!("Transitions: {}", self.transition_count()); + println!("Capture Groups: {}", self.num_capture_groups); + println!("Start states: {:?}", self.start_states); + println!("Accept states: {:?}", self.accept_states); + println!("\nState Details:"); + + for (idx, node) in self.nodes.iter().enumerate() { + println!("\nState {}: ", idx); + + if self.start_states.contains(&idx) { + println!(" [START STATE]"); + } + if self.accept_states.contains(&idx) { + println!(" [ACCEPT STATE]"); + } + + // Print byte transitions + if !node.byte_transitions.is_empty() { + println!(" Byte transitions:"); + for (&byte, destinations) in &node.byte_transitions { + let char_repr = if byte.is_ascii_graphic() && byte != b' ' { + format!("'{}'", byte as char) + } else { + format!("0x{:02x}", byte) + }; + println!(" {} -> {:?}", char_repr, destinations); + } + } + + // Print capture groups + if !node.capture_groups.is_empty() { + println!(" Capture groups:"); + for (target, captures) in &node.capture_groups { + for &(group_id, is_start) in captures { + println!( + " -> state {}: group {} {}", + target, + group_id, + if is_start { "start" } else { "end" } + ); + } + } + } + + if node.byte_transitions.is_empty() && node.capture_groups.is_empty() { + println!(" [No transitions]"); + } + } + println!("\n=== End of Graph ===\n"); + } +} diff --git a/compiler/src/lib.rs b/compiler/src/lib.rs new file mode 100644 index 00000000..78edc2bf --- /dev/null +++ b/compiler/src/lib.rs @@ -0,0 +1,202 @@ +//! ZK-Regex Compiler +//! +//! Converts regular expressions into circuit-friendly NFAs for zero-knowledge proofs. +//! Uses Thompson NFAs from regex-automata as an intermediate representation. + +mod backend; +mod driver; +mod error; +mod ir; +mod passes; +mod types; +mod utils; +mod wasm; + +pub use backend::*; +pub use driver::*; +pub use error::*; +pub use ir::*; +pub use passes::*; +pub use types::*; +pub use utils::*; +pub use wasm::*; + +/// Compile a regular expression pattern into a circuit-friendly NFA +/// +/// # Arguments +/// * `pattern` - The regular expression pattern to compile +/// +/// # Returns +/// * `CompilerResult` - The compiled NFA or a structured error with error code +/// +/// # Example +/// ```rust +/// use zk_regex_compiler::compile; +/// +/// let nfa = compile(r"hello \w+").expect("Valid regex"); +/// println!("Compiled NFA with {} states", nfa.state_count()); +/// ``` +pub fn compile(pattern: &str) -> CompilerResult { + NFAGraph::build(pattern).map_err(CompilerError::from) +} + +/// Generate a circuit from a raw regex pattern +/// +/// Takes a regex pattern and generates code for the specified proving framework. +/// +/// # Arguments +/// * `pattern` - The regex pattern to compile +/// * `max_bytes` - Optional maximum byte lengths for capture groups +/// * `template_name` - Name of the generated template (used in Circom) +/// * `proving_framework` - Target proving framework (Circom or Noir) +/// +/// # Returns +/// * `CompilerResult<(NFAGraph, String)>` - The compiled NFA and circuit code +/// +/// # Errors +/// * `E1001` - Invalid regex syntax +/// * `E1002` - Unsupported regex features +/// * `E3002` - Invalid capture group configuration +/// * `E5001` - Invalid configuration parameters +/// +/// # Example +/// ```rust +/// use zk_regex_compiler::{gen_from_raw, ProvingFramework}; +/// +/// let (nfa, code) = gen_from_raw( +/// r"(\w+)@(\w+\.\w+)", +/// Some(vec![20, 30]), +/// "EmailRegex", +/// ProvingFramework::Circom +/// ).expect("Valid email regex"); +/// ``` +pub fn gen_from_raw( + pattern: &str, + max_bytes: Option>, + template_name: &str, + proving_framework: ProvingFramework, +) -> CompilerResult<(NFAGraph, String)> { + let config = CompilationConfig { + template_name: template_name.to_string(), + proving_framework, + max_bytes, + optimize: true, + }; + + let result = Driver::compile(pattern, config)?; + Ok((result.nfa, result.code)) +} + +/// Generate a circuit from a decomposed regex configuration +/// +/// Combines regex parts from a configuration and generates circuit code. +/// +/// # Arguments +/// * `config` - Decomposed regex configuration with pattern parts +/// * `template_name` - Name of the generated template (used in Circom) +/// * `proving_framework` - Target proving framework (Circom or Noir) +/// +/// # Returns +/// * `CompilerResult<(NFAGraph, String)>` - The compiled NFA and circuit code +/// +/// # Example +/// ```rust +/// use zk_regex_compiler::{gen_from_decomposed, DecomposedRegexConfig, RegexPart, ProvingFramework}; +/// +/// let config = DecomposedRegexConfig { +/// parts: vec![ +/// RegexPart::Pattern("prefix:".to_string()), +/// RegexPart::PublicPattern(("\\w+".to_string(), 20)), +/// ] +/// }; +/// let (nfa, code) = gen_from_decomposed(config, "PrefixRegex", ProvingFramework::Noir)?; +/// ``` +pub fn gen_from_decomposed( + config: DecomposedRegexConfig, + template_name: &str, + proving_framework: ProvingFramework, +) -> CompilerResult<(NFAGraph, String)> { + let (combined_pattern, max_bytes) = decomposed_to_composed_regex(&config); + gen_from_raw( + &combined_pattern, + max_bytes, + template_name, + proving_framework, + ) +} + +/// Generate circuit inputs for a regex match +/// +/// Creates prover inputs for verification of a regex match. +/// +/// # Arguments +/// * `nfa` - The compiled NFA graph +/// * `input` - String to match against the regex +/// * `max_haystack_len` - Maximum input string length in the circuit +/// * `max_match_len` - Maximum match length in the circuit +/// * `proving_framework` - Target proving framework (Circom or Noir) +/// +/// # Returns +/// * `CompilerResult` - Framework-specific circuit inputs +/// +/// # Errors +/// * `E4001` - Input length exceeds maximum +/// * `E4003` - No regex match found in input +/// * `E4004` - Path traversal failed +/// +/// # Example +/// ```rust +/// use zk_regex_compiler::{compile, gen_circuit_inputs, ProvingFramework}; +/// +/// let nfa = compile(r"hello (\w+)").expect("Valid regex"); +/// let inputs = gen_circuit_inputs( +/// &nfa, +/// "hello world", +/// 1024, +/// 64, +/// ProvingFramework::Circom +/// ).expect("Valid input"); +/// ``` +pub fn gen_circuit_inputs( + nfa: &NFAGraph, + input: &str, + max_haystack_len: usize, + max_match_len: usize, + proving_framework: ProvingFramework, +) -> CompilerResult { + // Validate input length upfront with specific error + if input.len() > max_haystack_len { + return Err(CompilerError::input_too_long(input.len(), max_haystack_len)); + } + + crate::backend::generate_circuit_inputs( + nfa, + input, + max_haystack_len, + max_match_len, + proving_framework, + ) + .map_err(|nfa_err| { + // Convert NFAError to more specific input processing errors + match nfa_err { + crate::passes::NFAError::NoMatch(_) => CompilerError::no_match_found(input), + crate::passes::NFAError::InvalidInput(msg) => { + if msg.contains("exceeds maximum") { + CompilerError::input_too_long(input.len(), max_haystack_len) + } else { + CompilerError::InputProcessing { + code: ErrorCode::E4002, + message: format!("Input generation failed: {}", msg), + input_info: Some(format!("input_len: {}", input.len())), + limits: Some(format!( + "max_haystack: {}, max_match: {}", + max_haystack_len, max_match_len + )), + suggestion: Some("Check input format and circuit parameters".to_string()), + } + } + } + other => CompilerError::from(other), + } + }) +} diff --git a/compiler/src/passes/builder.rs b/compiler/src/passes/builder.rs new file mode 100644 index 00000000..66ed866f --- /dev/null +++ b/compiler/src/passes/builder.rs @@ -0,0 +1,263 @@ +//! Builder pass to convert Thompson NFA to IntermediateNFA and then to final NFAGraph + +use super::{NFAError, NFAResult}; +use crate::ir::{IntermediateNFA, IntermediateNFANode, NFAGraph}; + +use regex_automata::{ + nfa::thompson::{NFA, State, Transition, pikevm::PikeVM}, + util::primitives::{SmallIndex, StateID}, +}; +use std::collections::{BTreeMap, BTreeSet}; + +impl NFAGraph { + /// Build a final NFA from a regex pattern using a clean compilation pipeline + /// + /// Pipeline: + /// 1. Create Thompson NFA using regex-automata + /// 2. Convert to intermediate representation (with epsilon transitions) + /// 3. Validate intermediate structure + /// 4. Finalize to circuit-ready representation (no epsilon transitions) + /// 5. Final validation + pub fn build(pattern: &str) -> NFAResult { + // Step 1: Create Thompson NFA + let vm = PikeVM::new(pattern) + .map_err(|e| NFAError::RegexCompilation(format!("Failed to create PikeVM: {}", e)))?; + let thompson_nfa = vm.get_nfa(); + + // Step 2: Convert to intermediate representation + let intermediate = IntermediateNFA::from_thompson(pattern, &thompson_nfa)?; + + // Step 3: Validate intermediate structure + intermediate.validate()?; + + // Step 4: Convert to final representation (removes epsilon transitions) + let final_nfa = intermediate.finalize()?; + + Ok(final_nfa) + } +} + +impl IntermediateNFA { + /// Create intermediate NFA from Thompson NFA with safe state handling + pub fn from_thompson(pattern: &str, thompson: &NFA) -> NFAResult { + let start_offset = thompson.start_anchored().as_usize(); + let total_states = thompson.states().len(); + + if start_offset >= total_states { + return Err(NFAError::InvalidStateId( + "Invalid Thompson NFA: start offset exceeds total states".into(), + )); + } + + let logical_state_count = total_states - start_offset; + + let mut intermediate = Self::new(pattern.to_string()); + + // Initialize nodes + intermediate.nodes = (0..logical_state_count) + .map(|id| IntermediateNFANode { + state_id: id, + byte_transitions: BTreeMap::new(), + epsilon_transitions: BTreeSet::new(), + capture_groups: BTreeMap::new(), + }) + .collect(); + + // Process all Thompson states + for logical_id in 0..logical_state_count { + let thompson_id = StateID::new(logical_id + start_offset) + .map_err(|e| NFAError::InvalidStateId(format!("Invalid state ID: {}", e)))?; + + intermediate.process_thompson_state( + &thompson, + thompson_id, + logical_id, + start_offset, + )?; + } + + // Set start state (always 0 in our logical mapping) + intermediate.start_states.insert(0); + + Ok(intermediate) + } + + /// Process a single Thompson state and convert to intermediate representation + fn process_thompson_state( + &mut self, + thompson: &NFA, + thompson_id: StateID, + logical_id: usize, + start_offset: usize, + ) -> NFAResult<()> { + match thompson.state(thompson_id) { + State::Match { .. } => { + self.accept_states.insert(logical_id); + } + State::ByteRange { trans } => { + self.add_byte_range_transition(logical_id, trans, start_offset)?; + } + State::Sparse(sparse) => { + self.add_sparse_transitions(logical_id, &sparse.transitions, start_offset)?; + } + State::Dense(dense) => { + self.add_dense_transitions(logical_id, &dense.transitions, start_offset)?; + } + State::Union { alternates } => { + self.add_union_transitions(logical_id, alternates, start_offset)?; + } + State::BinaryUnion { alt1, alt2 } => { + self.add_binary_union_transitions(logical_id, alt1, alt2, start_offset)?; + } + State::Capture { + next, + group_index, + slot, + .. + } => { + self.add_capture_transition(logical_id, next, group_index, slot, start_offset)?; + self.num_capture_groups = self.num_capture_groups.max(group_index.as_usize()); + } + State::Look { next, .. } => { + self.add_look_transition(logical_id, next, start_offset)?; + } + State::Fail => { + // No transitions needed for fail states + } + } + Ok(()) + } + + // Helper methods for adding different types of transitions + fn add_byte_range_transition( + &mut self, + state_id: usize, + trans: &Transition, + start_offset: usize, + ) -> NFAResult<()> { + let target = self.thompson_to_logical(trans.next.as_usize(), start_offset)?; + + for byte in trans.start..=trans.end { + self.nodes[state_id] + .byte_transitions + .entry(byte) + .or_insert_with(BTreeSet::new) + .insert(target); + } + Ok(()) + } + + fn add_sparse_transitions( + &mut self, + state_id: usize, + transitions: &[Transition], + start_offset: usize, + ) -> NFAResult<()> { + for trans in transitions { + self.add_byte_range_transition(state_id, trans, start_offset)?; + } + Ok(()) + } + + fn add_dense_transitions( + &mut self, + state_id: usize, + transitions: &[StateID], + start_offset: usize, + ) -> NFAResult<()> { + for (byte, &next_id) in transitions.iter().enumerate() { + if next_id != StateID::ZERO { + let target = self.thompson_to_logical(next_id.as_usize(), start_offset)?; + self.nodes[state_id] + .byte_transitions + .entry(byte as u8) + .or_insert_with(BTreeSet::new) + .insert(target); + } + } + Ok(()) + } + + fn add_union_transitions( + &mut self, + state_id: usize, + alternates: &[StateID], + start_offset: usize, + ) -> NFAResult<()> { + for &alt in alternates { + let target = self.thompson_to_logical(alt.as_usize(), start_offset)?; + self.nodes[state_id].epsilon_transitions.insert(target); + } + Ok(()) + } + + fn add_binary_union_transitions( + &mut self, + state_id: usize, + alt1: &StateID, + alt2: &StateID, + start_offset: usize, + ) -> NFAResult<()> { + let target1 = self.thompson_to_logical(alt1.as_usize(), start_offset)?; + let target2 = self.thompson_to_logical(alt2.as_usize(), start_offset)?; + + self.nodes[state_id].epsilon_transitions.insert(target1); + self.nodes[state_id].epsilon_transitions.insert(target2); + Ok(()) + } + + fn add_capture_transition( + &mut self, + state_id: usize, + next: &StateID, + group_index: &SmallIndex, + slot: &SmallIndex, + start_offset: usize, + ) -> NFAResult<()> { + let target = self.thompson_to_logical(next.as_usize(), start_offset)?; + self.nodes[state_id].epsilon_transitions.insert(target); + + let group_id = group_index.as_usize(); + if group_id > 0 { + let is_start = slot.as_usize() % 2 == 0; + self.nodes[state_id] + .capture_groups + .entry(target) + .or_insert_with(BTreeSet::new) + .insert((group_id, is_start)); + } + Ok(()) + } + + fn add_look_transition( + &mut self, + state_id: usize, + next: &StateID, + start_offset: usize, + ) -> NFAResult<()> { + let target = self.thompson_to_logical(next.as_usize(), start_offset)?; + self.nodes[state_id].epsilon_transitions.insert(target); + Ok(()) + } + + /// Convert Thompson state ID to logical state ID + fn thompson_to_logical(&self, thompson_id: usize, start_offset: usize) -> NFAResult { + if thompson_id < start_offset { + return Err(NFAError::InvalidStateId(format!( + "Thompson state {} is before start offset {}", + thompson_id, start_offset + ))); + } + + let logical_id = thompson_id - start_offset; + if logical_id >= self.nodes.len() { + return Err(NFAError::InvalidStateId(format!( + "Logical state {} exceeds node count {}", + logical_id, + self.nodes.len() + ))); + } + + Ok(logical_id) + } +} diff --git a/compiler/src/passes/error.rs b/compiler/src/passes/error.rs new file mode 100644 index 00000000..b9069c3f --- /dev/null +++ b/compiler/src/passes/error.rs @@ -0,0 +1,167 @@ +//! Error types for compiler passes + +use std::num::ParseIntError; +use thiserror::Error; + +/// Error types for NFA operations +#[derive(Error, Debug)] +pub enum NFAError { + // Regex compilation errors + #[error("Failed to compile regex pattern: {0}")] + RegexCompilation(String), + #[error("No match found in input: {0}")] + NoMatch(String), + // State errors + #[error("Invalid state ID: {0}")] + InvalidStateId(String), + #[error("Invalid transition: {0}")] + InvalidTransition(String), + #[error("Empty automaton: {0}")] + EmptyAutomaton(String), + // Graph structure errors + #[error("Graph verification failed: {0}")] + Verification(String), + // Path traversal errors + #[error("No valid path found: {0}")] + NoValidPath(String), + // Input validation errors + #[error("Invalid input: {0}")] + InvalidInput(String), + #[error("Input size exceeded: {0}")] + InputSizeExceeded(String), + // Capture group errors + #[error("Invalid capture group configuration: {0}")] + InvalidCapture(String), + // Template generation errors + #[error("Template generation error: {0}")] + TemplateError(String), + // Serialization errors + #[error("Serialization error: {0}")] + Serialization(String), + #[error("Deserialization error: {0}")] + Deserialization(String), + // Integer parsing errors + #[error("Integer parsing error: {0}")] + ParseIntError(#[from] ParseIntError), +} + +/// Result type for NFA operations +pub type NFAResult = Result; + +// Convert NFAError to CompilerError with proper categorization and context +impl From for crate::error::CompilerError { + fn from(nfa_error: NFAError) -> Self { + use crate::error::{CompilerError, ErrorCode}; + + match nfa_error { + NFAError::RegexCompilation(msg) => CompilerError::nfa_construction_failed(&msg), + + NFAError::InvalidStateId(msg) => CompilerError::NFAConstruction { + code: ErrorCode::E2004, + message: format!("State validation failed: {}", msg), + state_info: Some(msg), + suggestion: Some( + "This indicates an internal compiler issue. Please report this bug." + .to_string(), + ), + }, + + NFAError::InvalidTransition(msg) => CompilerError::NFAConstruction { + code: ErrorCode::E2002, + message: format!("Invalid state transition: {}", msg), + state_info: Some(msg), + suggestion: Some( + "Try simplifying your regex pattern or report this as a bug.".to_string(), + ), + }, + + NFAError::EmptyAutomaton(msg) => CompilerError::NFAConstruction { + code: ErrorCode::E2001, + message: format!("Empty NFA construction: {}", msg), + state_info: None, + suggestion: Some( + "Check that your regex pattern is not empty or malformed.".to_string(), + ), + }, + + NFAError::Verification(msg) => CompilerError::NFAConstruction { + code: ErrorCode::E2004, + message: format!("NFA verification failed: {}", msg), + state_info: Some(msg), + suggestion: Some( + "This indicates a structural issue with the generated NFA.".to_string(), + ), + }, + + NFAError::NoMatch(msg) => CompilerError::InputProcessing { + code: ErrorCode::E4003, + message: format!("No regex match found: {}", msg), + input_info: Some(msg), + limits: None, + suggestion: Some( + "Ensure your input string contains the expected pattern.".to_string(), + ), + }, + + NFAError::NoValidPath(msg) => CompilerError::InputProcessing { + code: ErrorCode::E4004, + message: format!("Path traversal failed: {}", msg), + input_info: Some(msg), + limits: None, + suggestion: Some( + "The input doesn't match the regex pattern correctly.".to_string(), + ), + }, + + NFAError::InvalidInput(msg) => CompilerError::InputProcessing { + code: ErrorCode::E4001, + message: format!("Invalid input: {}", msg), + input_info: Some(msg), + limits: None, + suggestion: Some("Check input format and length constraints.".to_string()), + }, + + NFAError::InputSizeExceeded(msg) => CompilerError::InputProcessing { + code: ErrorCode::E4001, + message: format!("Input size limit exceeded: {}", msg), + input_info: Some(msg), + limits: None, + suggestion: Some( + "Reduce input size or increase max_haystack_len parameter.".to_string(), + ), + }, + + NFAError::InvalidCapture(msg) => CompilerError::CircuitGeneration { + code: ErrorCode::E3002, + message: format!("Invalid capture group configuration: {}", msg), + template_name: None, + framework: None, + suggestion: Some("Check max_bytes parameter for capture groups.".to_string()), + }, + + NFAError::TemplateError(msg) => CompilerError::CircuitGeneration { + code: ErrorCode::E3004, + message: format!("Template generation failed: {}", msg), + template_name: None, + framework: None, + suggestion: Some("Check template name and framework configuration.".to_string()), + }, + + NFAError::Serialization(msg) => { + CompilerError::serialization_error("NFA serialization", &msg) + } + + NFAError::Deserialization(msg) => CompilerError::Internal { + code: ErrorCode::E9002, + message: format!("Deserialization failed: {}", msg), + context: Some("NFA deserialization".to_string()), + }, + + NFAError::ParseIntError(err) => CompilerError::Internal { + code: ErrorCode::E9003, + message: format!("Integer parsing error: {}", err), + context: Some("NFA integer parsing".to_string()), + }, + } + } +} diff --git a/compiler/src/passes/mod.rs b/compiler/src/passes/mod.rs new file mode 100644 index 00000000..61d78d05 --- /dev/null +++ b/compiler/src/passes/mod.rs @@ -0,0 +1,10 @@ +//! Transformation passes for the compiler pipeline +//! +//! This module contains all the transformation passes that convert +//! the input through various intermediate representations. + +mod builder; +mod error; + +pub use builder::*; +pub use error::*; diff --git a/compiler/src/types.rs b/compiler/src/types.rs new file mode 100644 index 00000000..be02dbbd --- /dev/null +++ b/compiler/src/types.rs @@ -0,0 +1,69 @@ +use std::str::FromStr; + +use serde::{Deserialize, Serialize}; +use wasm_bindgen::prelude::*; + +use crate::{circom::CircomInputs, noir::NoirInputs}; + +#[derive(Deserialize)] +pub enum RegexPart { + Pattern(String), + PublicPattern((String, usize)), // (pattern, max_substring_bytes) +} + +#[derive(Deserialize)] +pub struct DecomposedRegexConfig { + pub parts: Vec, +} + +/// Supported proving systems +#[wasm_bindgen] +#[derive(Serialize, Deserialize, Debug, Clone, Copy)] +#[serde(rename_all = "camelCase")] +pub enum ProvingFramework { + Circom, + Noir, + // Future systems: + // Halo2, +} + +/// Input types for different proving systems +#[derive(Serialize)] +#[serde(tag = "type")] +pub enum ProverInputs { + #[serde(rename = "circom")] + Circom(CircomInputs), + #[serde(rename = "noir")] + Noir(NoirInputs), +} + +/// Output from regex compilation +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct RegexOutput { + pub graph: String, + pub code: String, +} + +impl FromStr for ProvingFramework { + type Err = String; + + fn from_str(s: &str) -> Result { + Ok(match s { + "circom" => Self::Circom, + "noir" => Self::Noir, + _ => { + return Err(format!("Invalid proving framework: {}", s)); + } + }) + } +} + +impl ProvingFramework { + pub fn file_extension(&self) -> &str { + match self { + Self::Circom => "circom", + Self::Noir => "nr", + } + } +} diff --git a/compiler/src/utils.rs b/compiler/src/utils.rs new file mode 100644 index 00000000..f757760f --- /dev/null +++ b/compiler/src/utils.rs @@ -0,0 +1,87 @@ +use std::path::PathBuf; + +use heck::{ToPascalCase, ToSnakeCase}; + +use crate::{DecomposedRegexConfig, NFAGraph, RegexPart}; + +/// Combines decomposed regex parts into a single pattern string and extracts capture group lengths. +/// +/// This function iterates through the `parts` field of a `DecomposedRegexConfig`. +/// It concatenates `RegexPart::Pattern` strings directly. For `RegexPart::PublicPattern`, +/// it wraps the pattern string in parentheses `()` to form a capture group and collects +/// the associated maximum byte length (`max_len`). +/// +/// # Arguments +/// +/// * `config` - A reference to the `DecomposedRegexConfig` containing the regex parts. +/// +/// # Returns +/// +/// A tuple `(String, Option>)` where: +/// * The first element is the fully combined regex pattern string. +/// * The second element is `Some(Vec)` containing the max byte lengths if any +/// `PublicPattern` parts were present, or `None` otherwise. +pub fn decomposed_to_composed_regex( + config: &DecomposedRegexConfig, +) -> (String, Option>) { + let mut combined_parts = Vec::new(); + let mut max_bytes: Option> = None; + + for part in &config.parts { + match part { + RegexPart::Pattern(pattern) => { + combined_parts.push(pattern.clone()); + } + RegexPart::PublicPattern((pattern, max_len)) => { + combined_parts.push(format!("({})", pattern)); + max_bytes.get_or_insert_with(Vec::new).push(*max_len); + } + } + } + + let combined_pattern = combined_parts.join(""); + + (combined_pattern, max_bytes) +} + +pub fn validate_cli_template_name(name: &str) -> Result { + // Convert to PascalCase to normalize + let pascal_name = name.to_pascal_case(); + + // Verify it's valid PascalCase + if pascal_name != name { + return Err("Template name must be in PascalCase (e.g., ThisIsATemplate)".into()); + } + + Ok(name.to_string()) +} + +pub fn save_outputs( + nfa: &NFAGraph, + circom_code: String, + output_dir: &PathBuf, + template_name: &str, + file_extension: &str, +) -> Result<(), Box> { + validate_cli_template_name(template_name)?; + + // Create output directory if it doesn't exist + std::fs::create_dir_all(output_dir)?; + + let snake_case_name = template_name.to_snake_case(); + + // Save circuit file + let circuit_path = output_dir.join(format!("{}_regex.{}", snake_case_name, file_extension)); + std::fs::write(&circuit_path, circom_code)?; + + // Save graph JSON + let graph_json = nfa.to_json()?; + let graph_path = output_dir.join(format!("{}_graph.json", snake_case_name)); + std::fs::write(&graph_path, graph_json)?; + + println!("Generated files:"); + println!(" Circuit: {}", circuit_path.display()); + println!(" Graph: {}", graph_path.display()); + + Ok(()) +} diff --git a/compiler/src/wasm.rs b/compiler/src/wasm.rs new file mode 100644 index 00000000..d8d5eae8 --- /dev/null +++ b/compiler/src/wasm.rs @@ -0,0 +1,242 @@ +use crate::{ + DecomposedRegexConfig, ProvingFramework, RegexOutput, + backend::{generate_circom_code, generate_noir_code}, + compile, + error::{CompilerError, CompilerResult, ErrorCode}, + gen_circuit_inputs, + ir::NFAGraph, + utils::decomposed_to_composed_regex, +}; +use thiserror::Error; +use wasm_bindgen::prelude::*; + +/// WASM-specific error type that converts from CompilerError +#[derive(Error, Debug)] +pub enum WasmError { + #[error("Compiler error {code}: {message}")] + CompilerError { code: String, message: String }, +} + +impl From for WasmError { + fn from(err: CompilerError) -> Self { + WasmError::CompilerError { + code: err.code().to_string(), + message: err.user_message(), + } + } +} + +impl From for JsValue { + fn from(err: WasmError) -> Self { + // Return a structured error message that JavaScript can parse + match err { + WasmError::CompilerError { code, message } => { + let error_json = format!( + r#"{{"type": "CompilerError", "code": "{}", "message": "{}"}}"#, + code, + message.replace('"', "\\\"").replace('\n', "\\n") + ); + JsValue::from_str(&error_json) + } + } + } +} + +/// Type-safe wrappers for primitive types +#[derive(Debug, Clone)] +pub struct TemplateName(String); +#[derive(Debug, Clone)] +pub struct RawRegex(String); +#[derive(Debug, Clone)] +pub struct Haystack(String); + +impl From<&str> for TemplateName { + fn from(s: &str) -> Self { + Self(s.to_string()) + } +} + +impl From<&str> for RawRegex { + fn from(s: &str) -> Self { + Self(s.to_string()) + } +} + +impl From<&str> for Haystack { + fn from(s: &str) -> Self { + Self(s.to_string()) + } +} + +/// Generate circuit from decomposed regex configuration +#[wasm_bindgen] +#[allow(non_snake_case)] +#[cfg(target_arch = "wasm32")] +pub fn genFromDecomposed( + decomposedRegexJson: &str, + templateName: &str, + proving_framework: ProvingFramework, +) -> Result { + let result = generate_from_decomposed_internal( + decomposedRegexJson, + templateName.into(), + proving_framework, + ); + + match result { + Ok(output) => serde_wasm_bindgen::to_value(&output).map_err(|e| { + let compiler_err = CompilerError::serialization_error("WASM output", &e.to_string()); + WasmError::from(compiler_err).into() + }), + Err(e) => Err(e.into()), + } +} + +fn generate_from_decomposed_internal( + decomposed_json: &str, + template_name: TemplateName, + proving_framework: ProvingFramework, +) -> Result { + let decomposed_regex: DecomposedRegexConfig = + serde_json::from_str(decomposed_json).map_err(|e| CompilerError::Internal { + code: ErrorCode::E9002, + message: format!("Failed to parse decomposed regex JSON: {}", e), + context: Some("WASM deserialization".to_string()), + })?; + + let (composed_regex, max_substring_bytes) = decomposed_to_composed_regex(&decomposed_regex); + + generate_from_raw_internal( + RawRegex(composed_regex), + max_substring_bytes, + template_name, + proving_framework, + ) +} + +/// Generate circuit from raw regex string +#[wasm_bindgen] +#[allow(non_snake_case)] +#[cfg(target_arch = "wasm32")] +pub fn genFromRaw( + rawRegex: &str, + maxSubstringBytes: Option>, + templateName: &str, + provingFramework: ProvingFramework, +) -> Result { + let result = generate_from_raw_internal( + rawRegex.into(), + maxSubstringBytes, + templateName.into(), + provingFramework, + ); + + match result { + Ok(output) => serde_wasm_bindgen::to_value(&output).map_err(|e| { + let compiler_err = CompilerError::serialization_error("WASM output", &e.to_string()); + WasmError::from(compiler_err).into() + }), + Err(e) => Err(e.into()), + } +} + +fn generate_from_raw_internal( + raw_regex: RawRegex, + max_substring_bytes: Option>, + template_name: TemplateName, + proving_framework: ProvingFramework, +) -> Result { + let nfa = compile(&raw_regex.0)?; + + let graph = nfa + .to_json() + .map_err(|nfa_err| CompilerError::from(nfa_err))?; + + let code = match proving_framework { + ProvingFramework::Circom => { + generate_circom_code( + &nfa, + &template_name.0, + &raw_regex.0, + max_substring_bytes.clone(), + ) + .map_err(|nfa_err| { + // Provide specific error handling for common WASM use cases + match nfa_err { + crate::passes::NFAError::InvalidCapture(_) => { + CompilerError::invalid_capture_config( + nfa.num_capture_groups, + max_substring_bytes.as_ref().map(|v| v.len()).unwrap_or(0), + ) + } + other => CompilerError::from(other), + } + })? + } + ProvingFramework::Noir => generate_noir_code( + &nfa, + &template_name.0, + &raw_regex.0, + max_substring_bytes.clone(), + ) + .map_err(|nfa_err| match nfa_err { + crate::passes::NFAError::InvalidCapture(_) => CompilerError::invalid_capture_config( + nfa.num_capture_groups, + max_substring_bytes.as_ref().map(|v| v.len()).unwrap_or(0), + ), + other => CompilerError::from(other), + })?, + }; + + Ok(RegexOutput { graph, code }) +} + +/// Generate circuit inputs for a regex match +#[wasm_bindgen] +#[allow(non_snake_case)] +#[cfg(target_arch = "wasm32")] +pub fn genCircuitInputs( + regexGraphJson: &str, + haystack: &str, + maxHaystackLength: usize, + maxMatchLength: usize, + provingFramework: ProvingFramework, +) -> Result { + let result = generate_circuit_inputs_internal( + regexGraphJson, + haystack.into(), + maxHaystackLength, + maxMatchLength, + provingFramework, + ); + + match result { + Ok(inputs_json) => Ok(inputs_json), + Err(e) => Err(e.into()), + } +} + +fn generate_circuit_inputs_internal( + graph_json: &str, + haystack: Haystack, + max_haystack_length: usize, + max_match_length: usize, + proving_framework: ProvingFramework, +) -> Result { + let nfa: NFAGraph = serde_json::from_str(graph_json).map_err(|e| CompilerError::Internal { + code: ErrorCode::E9002, + message: format!("Failed to parse NFA graph JSON: {}", e), + context: Some("WASM graph deserialization".to_string()), + })?; + + let inputs = gen_circuit_inputs( + &nfa, + &haystack.0, + max_haystack_length, + max_match_length, + proving_framework, + )?; + + serde_json::to_string(&inputs) + .map_err(|e| CompilerError::serialization_error("Circuit inputs", &e.to_string()).into()) +} diff --git a/compiler/yarn.lock b/compiler/yarn.lock new file mode 100644 index 00000000..eecd35d3 --- /dev/null +++ b/compiler/yarn.lock @@ -0,0 +1,11 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + +"@zk-email/zk-regex-compiler@workspace:.": + version: 0.0.0-use.local + resolution: "@zk-email/zk-regex-compiler@workspace:." + languageName: unknown + linkType: soft diff --git a/noir/Nargo.toml b/noir/Nargo.toml new file mode 100644 index 00000000..75f3c0ee --- /dev/null +++ b/noir/Nargo.toml @@ -0,0 +1,8 @@ +[package] +name = "zkregex" +type = "lib" +authors = [""] +compiler_version = ">=1.0.0" + +[dependencies] +sort = { tag = "v0.2.3", git = "https://github.com/noir-lang/noir_sort" } diff --git a/noir/README.md b/noir/README.md new file mode 100644 index 00000000..eba56879 --- /dev/null +++ b/noir/README.md @@ -0,0 +1,3 @@ +# zk-Regex Noir Library + +This package provides the necessary Noir libraries/contracts and helper functions to integrate regex verification logic generated by the `zk-regex-compiler` into your Noir projects. diff --git a/noir/common/body_hash.json b/noir/common/body_hash.json new file mode 100644 index 00000000..dd468751 --- /dev/null +++ b/noir/common/body_hash.json @@ -0,0 +1,8 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)dkim-signature:" }, + { "Pattern": "(?:[a-z]+=[^;]+; )+bh=" }, + { "PublicPattern": ["[a-zA-Z0-9+/=]+", 128] }, + { "Pattern": ";" } + ] +} diff --git a/noir/common/email_addr.json b/noir/common/email_addr.json new file mode 100644 index 00000000..428b53e3 --- /dev/null +++ b/noir/common/email_addr.json @@ -0,0 +1,10 @@ +{ + "parts": [ + { + "PublicPattern": [ + "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+", + 320 + ] + } + ] +} diff --git a/noir/common/email_domain.json b/noir/common/email_domain.json new file mode 100644 index 00000000..257798f3 --- /dev/null +++ b/noir/common/email_domain.json @@ -0,0 +1,6 @@ +{ + "parts": [ + { "Pattern": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./]+@" }, + { "PublicPattern": ["[A-Za-z0-9.\\-@]+", 128] } + ] +} diff --git a/noir/common/from_all.json b/noir/common/from_all.json new file mode 100644 index 00000000..45db7abf --- /dev/null +++ b/noir/common/from_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)from:" }, + { "PublicPattern": ["[^\r\n]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/noir/common/message_id.json b/noir/common/message_id.json new file mode 100644 index 00000000..628893e4 --- /dev/null +++ b/noir/common/message_id.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)message-id:" }, + { "PublicPattern": ["<[A-Za-z0-9=@\\.\\+_-]+>", 128] }, + { "Pattern": "\r\n" } + ] +} diff --git a/noir/common/sample_haystacks/body_hash.json b/noir/common/sample_haystacks/body_hash.json new file mode 100644 index 00000000..67231d1a --- /dev/null +++ b/noir/common/sample_haystacks/body_hash.json @@ -0,0 +1,9 @@ +{ + "pass": [ + "dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=", + "\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=" + ], + "fail": [ + "\r\nto: dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=" + ] +} diff --git a/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_0.json new file mode 100644 index 00000000..801c4553 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 61, + 49, + 59, + 32, + 97, + 61, + 114, + 115, + 97, + 45, + 115, + 104, + 97, + 50, + 53, + 54, + 59, + 32, + 99, + 61, + 114, + 101, + 108, + 97, + 120, + 101, + 100, + 47, + 114, + 101, + 108, + 97, + 120, + 101, + 100, + 59, + 32, + 100, + 61, + 103, + 109, + 97, + 105, + 108, + 46, + 99, + 111, + 109, + 59, + 32, + 115, + 61, + 50, + 48, + 50, + 51, + 48, + 54, + 48, + 49, + 59, + 32, + 116, + 61, + 49, + 54, + 57, + 52, + 57, + 56, + 57, + 56, + 49, + 50, + 59, + 32, + 120, + 61, + 49, + 54, + 57, + 53, + 53, + 57, + 52, + 54, + 49, + 50, + 59, + 32, + 100, + 97, + 114, + 97, + 61, + 103, + 111, + 111, + 103, + 108, + 101, + 46, + 99, + 111, + 109, + 59, + 32, + 104, + 61, + 116, + 111, + 58, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 109, + 101, + 115, + 115, + 97, + 103, + 101, + 45, + 105, + 100, + 58, + 100, + 97, + 116, + 101, + 58, + 102, + 114, + 111, + 109, + 58, + 109, + 105, + 109, + 101, + 45, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 58, + 102, + 114, + 111, + 109, + 58, + 116, + 111, + 58, + 99, + 99, + 58, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 32, + 58, + 100, + 97, + 116, + 101, + 58, + 109, + 101, + 115, + 115, + 97, + 103, + 101, + 45, + 105, + 100, + 58, + 114, + 101, + 112, + 108, + 121, + 45, + 116, + 111, + 59, + 32, + 98, + 104, + 61, + 66, + 87, + 69, + 84, + 119, + 81, + 57, + 74, + 68, + 82, + 101, + 83, + 52, + 71, + 121, + 82, + 50, + 118, + 50, + 84, + 84, + 82, + 56, + 66, + 112, + 122, + 106, + 57, + 97, + 121, + 117, + 109, + 115, + 87, + 81, + 74, + 51, + 113, + 55, + 118, + 101, + 104, + 115, + 61, + 59, + 32, + 98, + 61, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 264, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 219 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_1.json new file mode 100644 index 00000000..96c0f6da --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/body_hash_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 13, + 10, + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 61, + 49, + 59, + 32, + 97, + 61, + 114, + 115, + 97, + 45, + 115, + 104, + 97, + 50, + 53, + 54, + 59, + 32, + 99, + 61, + 114, + 101, + 108, + 97, + 120, + 101, + 100, + 47, + 114, + 101, + 108, + 97, + 120, + 101, + 100, + 59, + 32, + 100, + 61, + 103, + 109, + 97, + 105, + 108, + 46, + 99, + 111, + 109, + 59, + 32, + 115, + 61, + 50, + 48, + 50, + 51, + 48, + 54, + 48, + 49, + 59, + 32, + 116, + 61, + 49, + 54, + 57, + 52, + 57, + 56, + 57, + 56, + 49, + 50, + 59, + 32, + 120, + 61, + 49, + 54, + 57, + 53, + 53, + 57, + 52, + 54, + 49, + 50, + 59, + 32, + 100, + 97, + 114, + 97, + 61, + 103, + 111, + 111, + 103, + 108, + 101, + 46, + 99, + 111, + 109, + 59, + 32, + 104, + 61, + 116, + 111, + 58, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 109, + 101, + 115, + 115, + 97, + 103, + 101, + 45, + 105, + 100, + 58, + 100, + 97, + 116, + 101, + 58, + 102, + 114, + 111, + 109, + 58, + 109, + 105, + 109, + 101, + 45, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 58, + 102, + 114, + 111, + 109, + 58, + 116, + 111, + 58, + 99, + 99, + 58, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 32, + 58, + 100, + 97, + 116, + 101, + 58, + 109, + 101, + 115, + 115, + 97, + 103, + 101, + 45, + 105, + 100, + 58, + 114, + 101, + 112, + 108, + 121, + 45, + 116, + 111, + 59, + 32, + 98, + 104, + 61, + 66, + 87, + 69, + 84, + 119, + 81, + 57, + 74, + 68, + 82, + 101, + 83, + 52, + 71, + 121, + 82, + 50, + 118, + 50, + 84, + 84, + 82, + 56, + 66, + 112, + 122, + 106, + 57, + 97, + 121, + 117, + 109, + 115, + 87, + 81, + 74, + 51, + 113, + 55, + 118, + 101, + 104, + 115, + 61, + 59, + 32, + 98, + 61, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 266, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 34, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 221 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_0.json new file mode 100644 index 00000000..729d62cd --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 101, + 115, + 116, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 16, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_1.json new file mode 100644 index 00000000..da94364a --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 46, + 110, + 97, + 109, + 101, + 43, + 116, + 97, + 103, + 43, + 115, + 111, + 114, + 116, + 105, + 110, + 103, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 33, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_11.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_11.json new file mode 100644 index 00000000..b8093891 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_11.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 118, + 101, + 114, + 121, + 46, + 117, + 110, + 117, + 115, + 117, + 97, + 108, + 46, + 34, + 64, + 34, + 46, + 117, + 110, + 117, + 115, + 117, + 97, + 108, + 46, + 99, + 111, + 109, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 16, + "match_length": 24, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 16 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_12.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_12.json new file mode 100644 index 00000000..3839c39a --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_12.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 25, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_13.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_13.json new file mode 100644 index 00000000..a96286c8 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_13.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 74, + 111, + 101, + 32, + 83, + 109, + 105, + 116, + 104, + 32, + 60, + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 62, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 11, + "match_length": 17, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 11 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_14.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_14.json new file mode 100644 index 00000000..9ada1f29 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_14.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 46, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 18, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_15.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_15.json new file mode 100644 index 00000000..50ecd15c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_15.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 46, + 46, + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 24, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_16.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_16.json new file mode 100644 index 00000000..36df25d2 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_16.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 32, + 40, + 74, + 111, + 101, + 32, + 83, + 109, + 105, + 116, + 104, + 41, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 17, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_17.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_17.json new file mode 100644 index 00000000..c7e7f9a8 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_17.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 13, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_18.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_18.json new file mode 100644 index 00000000..3924b672 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_18.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 45, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 18, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_19.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_19.json new file mode 100644 index 00000000..0c47d5af --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_19.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 18, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_2.json new file mode 100644 index 00000000..b1df299c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 95, + 110, + 97, + 109, + 101, + 64, + 115, + 117, + 98, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 46, + 117, + 107, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 33, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_20.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_20.json new file mode 100644 index 00000000..2c7d0f38 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_20.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 46, + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 18, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_21.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_21.json new file mode 100644 index 00000000..01502f5b --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_21.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 65, + 98, + 99, + 46, + 46, + 49, + 50, + 51, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 20, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_3.json new file mode 100644 index 00000000..cd40bbf6 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 105, + 114, + 115, + 116, + 110, + 97, + 109, + 101, + 46, + 108, + 97, + 115, + 116, + 110, + 97, + 109, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 30, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_4.json new file mode 100644 index 00000000..6c75a02f --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 45, + 111, + 110, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 21, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_5.json new file mode 100644 index 00000000..07b97fde --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_5.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 95, + 95, + 95, + 95, + 95, + 95, + 95, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 19, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_6.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_6.json new file mode 100644 index 00000000..81ce5bfd --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_6.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 110, + 97, + 109, + 101, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 18, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_7.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_7.json new file mode 100644 index 00000000..82c9b4aa --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_7.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 109, + 117, + 115, + 101, + 117, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 20, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_8.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_8.json new file mode 100644 index 00000000..32db00bf --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_8.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 101, + 109, + 97, + 105, + 108, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 46, + 106, + 112, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 19, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_9.json b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_9.json new file mode 100644 index 00000000..586fad11 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_addr_pass_9.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 105, + 114, + 115, + 116, + 110, + 97, + 109, + 101, + 45, + 108, + 97, + 115, + 116, + 110, + 97, + 109, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 30, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_0.json new file mode 100644 index 00000000..21e5580b --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 118, + 97, + 108, + 105, + 100, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 17, + "curr_states": [ + 0, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 6 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_1.json new file mode 100644 index 00000000..8d16b1a0 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 101, + 115, + 116, + 46, + 117, + 115, + 101, + 114, + 64, + 115, + 117, + 98, + 45, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 46, + 117, + 107, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 34, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 10 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_10.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_10.json new file mode 100644 index 00000000..26d24904 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_10.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 32, + 115, + 112, + 97, + 99, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 5, + "match_length": 17, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 11 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_11.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_11.json new file mode 100644 index 00000000..add18b8c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_11.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 32, + 115, + 112, + 97, + 99, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 11, + "curr_states": [ + 0, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_12.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_12.json new file mode 100644 index 00000000..cb71a43c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_12.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 60, + 105, + 110, + 118, + 97, + 108, + 105, + 100, + 62, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 11, + "curr_states": [ + 0, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_13.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_13.json new file mode 100644 index 00000000..cec7282c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_13.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 32, + 108, + 101, + 97, + 100, + 105, + 110, + 103, + 119, + 104, + 105, + 116, + 101, + 115, + 112, + 97, + 99, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 1, + "match_length": 29, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 19 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_14.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_14.json new file mode 100644 index 00000000..e2b410f5 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_14.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 64, + 116, + 114, + 97, + 105, + 108, + 105, + 110, + 103, + 119, + 104, + 105, + 116, + 101, + 115, + 112, + 97, + 99, + 101, + 46, + 99, + 111, + 109, + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 27, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_2.json new file mode 100644 index 00000000..097b46b5 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 43, + 116, + 97, + 103, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 20, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 9 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_3.json new file mode 100644 index 00000000..f16e191b --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 33, + 35, + 36, + 37, + 38, + 39, + 42, + 43, + 61, + 63, + 94, + 95, + 96, + 123, + 124, + 125, + 126, + 46, + 64, + 119, + 101, + 105, + 114, + 100, + 46, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 36, + "curr_states": [ + 0, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 19 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_4.json new file mode 100644 index 00000000..fc4c42fc --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 64, + 98, + 46, + 99, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 5, + "curr_states": [ + 1, + 2, + 3, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 2 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_5.json new file mode 100644 index 00000000..30c7adb0 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_5.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 110, + 97, + 109, + 101, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 119, + 105, + 116, + 104, + 46, + 97, + 116, + 64, + 115, + 121, + 109, + 98, + 111, + 108, + 46, + 97, + 108, + 108, + 111, + 119, + 101, + 100, + 46, + 98, + 121, + 46, + 114, + 101, + 103, + 101, + 120, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 43, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_6.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_6.json new file mode 100644 index 00000000..8c71f878 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_6.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 117, + 115, + 101, + 114, + 46, + 115, + 108, + 97, + 115, + 104, + 47, + 111, + 107, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 25, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 14 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_7.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_7.json new file mode 100644 index 00000000..b758c084 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_7.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 110, + 111, + 116, + 104, + 101, + 114, + 95, + 117, + 115, + 101, + 114, + 64, + 49, + 50, + 51, + 46, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 99, + 111, + 109, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 27, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 13 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_8.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_8.json new file mode 100644 index 00000000..48903ab4 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_8.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 99, + 111, + 110, + 116, + 97, + 99, + 116, + 64, + 101, + 109, + 97, + 105, + 108, + 45, + 112, + 114, + 111, + 118, + 105, + 100, + 101, + 114, + 46, + 110, + 101, + 116, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 26, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 8 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_9.json b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_9.json new file mode 100644 index 00000000..56fb1193 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/email_domain_pass_9.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 99, + 117, + 115, + 116, + 111, + 109, + 101, + 114, + 46, + 115, + 117, + 112, + 112, + 111, + 114, + 116, + 64, + 111, + 110, + 108, + 105, + 110, + 101, + 45, + 115, + 116, + 111, + 114, + 101, + 46, + 98, + 105, + 122, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 33, + "curr_states": [ + 1, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 3, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 17 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_0.json new file mode 100644 index 00000000..a6f256e2 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 32, + 84, + 101, + 115, + 116, + 32, + 85, + 115, + 101, + 114, + 32, + 60, + 116, + 101, + 115, + 116, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 62, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 36, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_1.json new file mode 100644 index 00000000..392f439b --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 83, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 32, + 72, + 101, + 108, + 108, + 111, + 13, + 10, + 102, + 114, + 111, + 109, + 58, + 115, + 101, + 110, + 100, + 101, + 114, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 99, + 111, + 109, + 13, + 10, + 84, + 111, + 58, + 32, + 114, + 101, + 99, + 105, + 112, + 105, + 101, + 110, + 116, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 99, + 111, + 109, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 14, + "match_length": 26, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 21 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_2.json new file mode 100644 index 00000000..eeefeef0 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 109, + 105, + 110, + 105, + 109, + 97, + 108, + 64, + 97, + 46, + 99, + 111, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 19, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_3.json new file mode 100644 index 00000000..b2c933de --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 13, + 10, + 102, + 114, + 111, + 109, + 58, + 97, + 102, + 116, + 101, + 114, + 95, + 101, + 109, + 112, + 116, + 121, + 95, + 108, + 105, + 110, + 101, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 37, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 7 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_4.json new file mode 100644 index 00000000..7734ff90 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 119, + 111, + 114, + 100, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 11, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_5.json new file mode 100644 index 00000000..271744c3 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_5.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 32, + 78, + 97, + 109, + 101, + 32, + 119, + 105, + 116, + 104, + 32, + 115, + 112, + 97, + 99, + 101, + 115, + 32, + 60, + 115, + 112, + 97, + 99, + 101, + 115, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 62, + 13, + 10, + 65, + 110, + 100, + 32, + 111, + 116, + 104, + 101, + 114, + 32, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 32, + 97, + 102, + 116, + 101, + 114, + 119, + 97, + 114, + 100, + 115, + 46, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 45, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_6.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_6.json new file mode 100644 index 00000000..56ef821d --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_6.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 32, + 108, + 105, + 110, + 101, + 49, + 13, + 10, + 108, + 105, + 110, + 101, + 50, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 13, + "curr_states": [ + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/from_all_pass_7.json b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_7.json new file mode 100644 index 00000000..cd6c7afa --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/from_all_pass_7.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 84, + 104, + 105, + 115, + 32, + 105, + 115, + 32, + 115, + 111, + 109, + 101, + 32, + 116, + 101, + 120, + 116, + 32, + 98, + 101, + 102, + 111, + 114, + 101, + 46, + 13, + 10, + 102, + 114, + 111, + 109, + 58, + 115, + 101, + 110, + 100, + 101, + 114, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 84, + 104, + 105, + 115, + 32, + 105, + 115, + 32, + 115, + 111, + 109, + 101, + 32, + 116, + 101, + 120, + 116, + 32, + 97, + 102, + 116, + 101, + 114, + 46, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 25, + "match_length": 27, + "curr_states": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 32 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_0.json new file mode 100644 index 00000000..655d05ff --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_0.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 1, + "curr_states": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_1.json new file mode 100644 index 00000000..c6112b9b --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_1.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 2, + "curr_states": [ + 2, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_10.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_10.json new file mode 100644 index 00000000..503d3e98 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_10.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 99, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 1, + "match_length": 2, + "curr_states": [ + 2, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_11.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_11.json new file mode 100644 index 00000000..4c4e3def --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_11.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 98, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 1, + "curr_states": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_2.json new file mode 100644 index 00000000..4680fd8c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_2.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 3, + "curr_states": [ + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_3.json new file mode 100644 index 00000000..257e7645 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_3.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 97, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 4, + "curr_states": [ + 2, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_4.json new file mode 100644 index 00000000..4d1808ab --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_4.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 97, + 97, + 97, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 6, + "curr_states": [ + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_5.json new file mode 100644 index 00000000..c1022db4 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_5.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 97, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 22, + "curr_states": [ + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_6.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_6.json new file mode 100644 index 00000000..874e7424 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_6.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 98, + 97, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 1, + "curr_states": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_7.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_7.json new file mode 100644 index 00000000..d5a9fa1c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_7.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 99, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 2, + "match_length": 1, + "curr_states": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_8.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_8.json new file mode 100644 index 00000000..0b27aa31 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_8.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 98, + 98, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 1, + "curr_states": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/simple_pass_9.json b/noir/common/sample_haystacks/circuit_inputs/simple_pass_9.json new file mode 100644 index 00000000..aa67e477 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/simple_pass_9.json @@ -0,0 +1,914 @@ +{ + "type": "noir", + "in_haystack": [ + 97, + 98, + 99, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 2, + "curr_states": [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [], + "capture_group_starts": [], + "capture_group_start_indices": [] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_0.json new file mode 100644 index 00000000..3d445ef5 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 104, + 101, + 108, + 108, + 111, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 15, + "curr_states": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 13, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 8 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_1.json new file mode 100644 index 00000000..2bc453b1 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 32, + 116, + 101, + 115, + 116, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 119, + 111, + 114, + 108, + 100, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 22, + "match_length": 17, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 13, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 32 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_2.json new file mode 100644 index 00000000..3c0af79d --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 13, + 10, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 116, + 101, + 115, + 116, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 16, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 13, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 10 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_3.json new file mode 100644 index 00000000..33ba49e6 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 97, + 98, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 12, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 13, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 8 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_4.json new file mode 100644 index 00000000..29417f70 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/subject_all_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 115, + 111, + 109, + 101, + 32, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 32, + 98, + 101, + 102, + 111, + 114, + 101, + 13, + 10, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 109, + 101, + 101, + 116, + 105, + 110, + 103, + 13, + 10, + 97, + 110, + 100, + 32, + 115, + 111, + 109, + 101, + 32, + 99, + 111, + 110, + 116, + 101, + 110, + 116, + 32, + 97, + 102, + 116, + 101, + 114, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 19, + "match_length": 19, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 13, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 13, + 14, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 29 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/succinct_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/succinct_pass_0.json new file mode 100644 index 00000000..4683d93f --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/succinct_pass_0.json @@ -0,0 +1,2127 @@ +{ + "type": "noir", + "in_haystack": [ + 87, + 101, + 108, + 99, + 111, + 109, + 101, + 32, + 116, + 111, + 32, + 116, + 104, + 101, + 32, + 83, + 117, + 99, + 99, + 105, + 110, + 99, + 116, + 32, + 82, + 101, + 115, + 105, + 100, + 101, + 110, + 99, + 121, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 34, + "curr_states": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 0, + 15 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_0.json new file mode 100644 index 00000000..d902f0cd --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 61, + 49, + 59, + 32, + 97, + 61, + 114, + 115, + 97, + 45, + 115, + 104, + 97, + 50, + 53, + 54, + 59, + 32, + 116, + 61, + 49, + 54, + 55, + 56, + 56, + 56, + 54, + 52, + 48, + 48, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 47, + "curr_states": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 36 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_1.json new file mode 100644 index 00000000..ba7385ea --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 13, + 10, + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 115, + 61, + 115, + 101, + 108, + 101, + 99, + 116, + 111, + 114, + 59, + 32, + 100, + 61, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 59, + 32, + 116, + 61, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 48, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 57, + "curr_states": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 46 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_2.json new file mode 100644 index 00000000..2457fc8a --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 104, + 61, + 102, + 114, + 111, + 109, + 58, + 116, + 111, + 58, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 59, + 32, + 98, + 104, + 61, + 98, + 111, + 100, + 121, + 104, + 97, + 115, + 104, + 59, + 32, + 116, + 61, + 48, + 49, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 52, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 49 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_3.json new file mode 100644 index 00000000..aac5ee73 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 101, + 114, + 115, + 105, + 111, + 110, + 61, + 49, + 59, + 32, + 97, + 110, + 111, + 116, + 104, + 101, + 114, + 61, + 116, + 97, + 103, + 59, + 32, + 109, + 111, + 114, + 101, + 61, + 100, + 97, + 116, + 97, + 59, + 32, + 116, + 61, + 57, + 56, + 55, + 54, + 53, + 59, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 58, + "curr_states": [ + 0, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 27, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 27, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 29, + 30, + 19, + 19, + 19, + 19, + 27, + 28, + 28, + 28, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 52 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_4.json new file mode 100644 index 00000000..ae4b5185 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 61, + 49, + 59, + 32, + 116, + 61, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 48, + 59, + 32, + 101, + 120, + 116, + 114, + 97, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 33, + "curr_states": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 22 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_5.json new file mode 100644 index 00000000..09be9dfb --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/timestamp_pass_5.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 104, + 101, + 97, + 100, + 101, + 114, + 58, + 32, + 118, + 97, + 108, + 117, + 101, + 13, + 10, + 100, + 107, + 105, + 109, + 45, + 115, + 105, + 103, + 110, + 97, + 116, + 117, + 114, + 101, + 58, + 118, + 61, + 49, + 59, + 32, + 116, + 61, + 49, + 51, + 59, + 13, + 10, + 110, + 101, + 120, + 116, + 104, + 101, + 97, + 100, + 101, + 114, + 58, + 32, + 118, + 97, + 108, + 117, + 101, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 13, + "match_length": 27, + "curr_states": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 33, + 34, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 37 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_0.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_0.json new file mode 100644 index 00000000..4b7d65aa --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_0.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 111, + 58, + 114, + 101, + 99, + 105, + 112, + 105, + 101, + 110, + 116, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 26, + "curr_states": [ + 0, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 3 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_1.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_1.json new file mode 100644 index 00000000..0787acd7 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_1.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 102, + 114, + 111, + 109, + 58, + 32, + 115, + 101, + 110, + 100, + 101, + 114, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 116, + 111, + 58, + 97, + 110, + 111, + 116, + 104, + 101, + 114, + 95, + 114, + 101, + 99, + 105, + 112, + 105, + 101, + 110, + 116, + 64, + 100, + 111, + 109, + 97, + 105, + 110, + 46, + 99, + 111, + 13, + 10, + 115, + 117, + 98, + 106, + 101, + 99, + 116, + 58, + 32, + 77, + 101, + 101, + 116, + 105, + 110, + 103, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 24, + "match_length": 34, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 29 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_2.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_2.json new file mode 100644 index 00000000..e8eb50b7 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_2.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 13, + 10, + 116, + 111, + 58, + 117, + 115, + 101, + 114, + 64, + 104, + 111, + 115, + 116, + 46, + 111, + 114, + 103, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 20, + "curr_states": [ + 0, + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 5 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_3.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_3.json new file mode 100644 index 00000000..55ac822c --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_3.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 111, + 58, + 84, + 101, + 115, + 116, + 32, + 85, + 115, + 101, + 114, + 32, + 60, + 116, + 101, + 115, + 116, + 46, + 117, + 115, + 101, + 114, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 110, + 101, + 116, + 62, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 38, + "curr_states": [ + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 3 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_4.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_4.json new file mode 100644 index 00000000..7973f525 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_4.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 111, + 58, + 97, + 98, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 7, + "curr_states": [ + 3, + 4, + 5, + 6, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 3 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_5.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_5.json new file mode 100644 index 00000000..9d5a8332 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_5.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 115, + 111, + 109, + 101, + 32, + 116, + 101, + 120, + 116, + 13, + 10, + 116, + 111, + 58, + 112, + 101, + 114, + 115, + 111, + 110, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 109, + 111, + 114, + 101, + 32, + 116, + 101, + 120, + 116, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 9, + "match_length": 25, + "curr_states": [ + 1, + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 2, + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 14 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_6.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_6.json new file mode 100644 index 00000000..5d3eb32f --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_6.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 111, + 58, + 117, + 115, + 101, + 114, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 110, + 111, + 32, + 110, + 101, + 119, + 108, + 105, + 110, + 101, + 32, + 97, + 102, + 116, + 101, + 114, + 32, + 116, + 104, + 105, + 115, + 32, + 112, + 97, + 114, + 116, + 32, + 111, + 102, + 32, + 116, + 111, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 21, + "curr_states": [ + 0, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 3 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/circuit_inputs/to_all_pass_7.json b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_7.json new file mode 100644 index 00000000..9d410501 --- /dev/null +++ b/noir/common/sample_haystacks/circuit_inputs/to_all_pass_7.json @@ -0,0 +1,1522 @@ +{ + "type": "noir", + "in_haystack": [ + 116, + 111, + 58, + 32, + 108, + 105, + 110, + 101, + 49, + 13, + 10, + 108, + 105, + 110, + 101, + 50, + 64, + 101, + 120, + 97, + 109, + 112, + 108, + 101, + 46, + 99, + 111, + 109, + 13, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "match_start": 0, + "match_length": 11, + "curr_states": [ + 3, + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "next_states": [ + 4, + 5, + 6, + 14, + 14, + 14, + 14, + 14, + 14, + 15, + 16, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "capture_group_ids": [ + [ + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_starts": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ], + "capture_group_start_indices": [ + 3 + ] +} \ No newline at end of file diff --git a/noir/common/sample_haystacks/email_addr.json b/noir/common/sample_haystacks/email_addr.json new file mode 100644 index 00000000..7cc26e73 --- /dev/null +++ b/noir/common/sample_haystacks/email_addr.json @@ -0,0 +1,32 @@ +{ + "pass": [ + "test@example.com", + "user.name+tag+sorting@example.com", + "user_name@subdomain.example.co.uk", + "firstname.lastname@example.com", + "email@example-one.com", + "_______@example.com", + "email@example.name", + "email@example.museum", + "email@example.co.jp", + "firstname-lastname@example.com", + "much.\"more\\ unusual\"@example.com", + "very.unusual.\"@\".unusual.com@example.com", + "email@example@example.com", + "Joe Smith ", + "email.@example.com", + "email..email@example.com", + "email@example.com (Joe Smith)", + "email@example", + "email@-example.com", + "email@example..com", + ".email@example.com", + "Abc..123@example.com" + ], + "fail": [ + "plainaddress", + "#@%^%#$@#$@#.com", + "@example.com", + "email.example.com" + ] +} diff --git a/noir/common/sample_haystacks/email_domain.json b/noir/common/sample_haystacks/email_domain.json new file mode 100644 index 00000000..037a75a5 --- /dev/null +++ b/noir/common/sample_haystacks/email_domain.json @@ -0,0 +1,26 @@ +{ + "pass": [ + "valid@example.com", + "test.user@sub-domain.example.co.uk", + "user+tag@example.com", + "!#$%&'*+=?^_`{|}~.@weird.example.com", + "a@b.c", + "name@domain.with.at@symbol.allowed.by.regex", + "user.slash/ok@example.com", + "another_user@123.domain.com", + "contact@email-provider.net", + "customer.support@online-store.biz", + "user space@example.com", + "user@domain space.com", + "user@domain.com", + " leadingwhitespace@example.com", + "user@trailingwhitespace.com " + ], + "fail": [ + "", + "noatsymbol", + "@example.com", + "user@", + "user@example.com" + ] +} diff --git a/noir/common/sample_haystacks/from_all.json b/noir/common/sample_haystacks/from_all.json new file mode 100644 index 00000000..5eb2053c --- /dev/null +++ b/noir/common/sample_haystacks/from_all.json @@ -0,0 +1,22 @@ +{ + "pass": [ + "from: Test User \r\n", + "Subject: Hello\r\nfrom:sender@domain.com\r\nTo: recipient@domain.com\r\n", + "from:minimal@a.co\r\n", + "\r\nfrom:after_empty_line@example.com\r\n", + "from:word\r\n", + "from: Name with spaces \r\nAnd other content afterwards.", + "from: line1\r\nline2@example.com\r\n", + "This is some text before.\r\nfrom:sender@example.com\r\nThis is some text after." + ], + "fail": [ + "From: Test User \r\n", + "from: Test User ", + "Subject: Hello\r\n from:indented@example.com\r\n", + "Test\r\nnotfrom:sender@domain.com\r\n", + "from:\r\n", + "Hello from: someone\r\n", + "nofromlineatinall", + "from: no_trailing_newline" + ] +} diff --git a/noir/common/sample_haystacks/simple.json b/noir/common/sample_haystacks/simple.json new file mode 100644 index 00000000..c35e3443 --- /dev/null +++ b/noir/common/sample_haystacks/simple.json @@ -0,0 +1,17 @@ +{ + "pass": [ + "b", + "ab", + "aab", + "aaab", + "aaaaab", + "aaaaaaaaaaaaaaaaaaaaab", + "ba", + "acb", + "bb", + "abc", + "cab", + "bab" + ], + "fail": ["a", "aaa", "", " "] +} diff --git a/noir/common/sample_haystacks/subject_all.json b/noir/common/sample_haystacks/subject_all.json new file mode 100644 index 00000000..be279ee5 --- /dev/null +++ b/noir/common/sample_haystacks/subject_all.json @@ -0,0 +1,22 @@ +{ + "pass": [ + "subject:hello\r\n", + "from: test@example.com\r\nsubject:world\r\n", + "\r\nsubject:test\r\n", + "subject:ab\r\n", + "some content before\r\nsubject:meeting\r\nand some content after" + ], + "fail": [ + "Subject:hello\r\n", + "subject:Hello\r\n", + "subject:hello world\r\n", + "subject:hello123\r\n", + "subject:hello", + " subject:indented\r\n", + "subject:\r\n", + "subject: withspace\r\n", + "subject:ends \r\n", + "nosubjectline", + "another line\r\nsubject:noendnewline" + ] +} diff --git a/noir/common/sample_haystacks/succinct.json b/noir/common/sample_haystacks/succinct.json new file mode 100644 index 00000000..65a23948 --- /dev/null +++ b/noir/common/sample_haystacks/succinct.json @@ -0,0 +1,4 @@ +{ + "pass": ["Welcome to the Succinct Residency!"], + "fail": ["Welcome to the Succint Residency!"] +} diff --git a/noir/common/sample_haystacks/timestamp.json b/noir/common/sample_haystacks/timestamp.json new file mode 100644 index 00000000..265c54e9 --- /dev/null +++ b/noir/common/sample_haystacks/timestamp.json @@ -0,0 +1,23 @@ +{ + "pass": [ + "dkim-signature:v=1; a=rsa-sha256; t=1678886400;", + "\r\ndkim-signature:s=selector; d=example.com; t=1234567890;", + "dkim-signature:h=from:to:subject; bh=bodyhash; t=01;", + "dkim-signature:version=1; another=tag; more=data; t=98765;", + "dkim-signature:v=1; t=1234567890; extra", + "header: value\r\ndkim-signature:v=1; t=13;\r\nnextheader: value" + ], + "fail": [ + "DKIM-Signature:v=1; t=1678886400;", + "dkim-signature:t=1678886400;", + "dkim-signature:v=1; t=1678886400", + "dkim-signature:v=1; t=notadigit;", + "dkim-signature:v=1; T=1678886400;", + "dkim-signature:v=1 t=1678886400;", + "dkim-signature:v=; t=1678886400;", + "dkim-signature:v=1; t=;", + " dkim-signature:v=1; t=1678886400;", + "dkim-signature:v=1 t=12345;", + "dkim-signature:v1; t=12345;" + ] +} diff --git a/noir/common/sample_haystacks/to_all.json b/noir/common/sample_haystacks/to_all.json new file mode 100644 index 00000000..8651cc7f --- /dev/null +++ b/noir/common/sample_haystacks/to_all.json @@ -0,0 +1,21 @@ +{ + "pass": [ + "to:recipient@example.com\r\n", + "from: sender@example.com\r\nto:another_recipient@domain.co\r\nsubject: Meeting\r\n", + "\r\nto:user@host.org\r\n", + "to:Test User \r\n", + "to:ab\r\n", + "some text\r\nto:person@example.com\r\nmore text", + "to:user@example.com\r\nno newline after this part of to", + "to: line1\r\nline2@example.com\r\n" + ], + "fail": [ + "To:recipient@example.com\r\n", + "to:recipient@example.com", + "cc: carboncopy@example.com\r\n to:indented@example.com\r\n", + "to:\r\n", + "hello to:someone@example.com\r\n", + "notolinehere", + "to: no_trailing_newline" + ] +} diff --git a/noir/common/simple.json b/noir/common/simple.json new file mode 100644 index 00000000..d64eacf2 --- /dev/null +++ b/noir/common/simple.json @@ -0,0 +1,3 @@ +{ + "parts": [{ "Pattern": "a*b" }] +} diff --git a/noir/common/subject_all.json b/noir/common/subject_all.json new file mode 100644 index 00000000..8e13d12b --- /dev/null +++ b/noir/common/subject_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)subject:" }, + { "PublicPattern": ["[a-z]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/noir/common/succinct.json b/noir/common/succinct.json new file mode 100644 index 00000000..2fee34c2 --- /dev/null +++ b/noir/common/succinct.json @@ -0,0 +1,6 @@ +{ + "parts": [ + { "PublicPattern": ["Welcome to the ", 15] }, + { "PublicPattern": ["Succinct Residency!", 19] } + ] +} diff --git a/noir/common/timestamp.json b/noir/common/timestamp.json new file mode 100644 index 00000000..2d304c78 --- /dev/null +++ b/noir/common/timestamp.json @@ -0,0 +1,8 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)dkim-signature:" }, + { "Pattern": "(?:[a-z]+=[^;]+; )+t=" }, + { "PublicPattern": ["[0-9]+", 10] }, + { "Pattern": ";" } + ] +} diff --git a/noir/common/to_all.json b/noir/common/to_all.json new file mode 100644 index 00000000..923f7f8a --- /dev/null +++ b/noir/common/to_all.json @@ -0,0 +1,7 @@ +{ + "parts": [ + { "Pattern": "(?:\r\n|^)to:" }, + { "PublicPattern": ["[^\r\n]+", 64] }, + { "Pattern": "\r\n" } + ] +} diff --git a/noir/scripts/gen_inputs.py b/noir/scripts/gen_inputs.py new file mode 100644 index 00000000..cdca87e3 --- /dev/null +++ b/noir/scripts/gen_inputs.py @@ -0,0 +1,523 @@ +import os +import shutil +import subprocess +import json +import re +import glob + +# --- Configuration --- +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +PROJECT_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..")) + +DEFAULT_MAX_HAYSTACK_LEN = 300 +DEFAULT_MAX_MATCH_LEN = 300 +SAVE_INPUTS_FOR_SUCCESSFUL_FAIL_CASES = ( + False # Set to True to save inputs for successful fail cases +) + +# --- Directories --- +SAMPLE_HAYSTACKS_DIR = os.path.join(PROJECT_ROOT, "noir", "common", "sample_haystacks") +GRAPHS_DIR = os.path.join(PROJECT_ROOT, "noir", "src", "templates", "graphs") +CIRCUITS_DIR = os.path.join(PROJECT_ROOT, "noir", "src", "templates", "circuits") +CIRCUIT_INPUTS_DIR = os.path.join(SAMPLE_HAYSTACKS_DIR, "circuit_inputs") + + +def check_jq(): + """Checks if jq is installed.""" + try: + subprocess.run( + ["jq", "--version"], + check=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + return True + except (subprocess.CalledProcessError, FileNotFoundError): + return False + + +def generate_circuit_inputs(): + print("Phase 1: Generating circuit inputs...") + unexpected_successes = [] # List to store unexpected successes + + for sample_json_file in glob.glob(os.path.join(SAMPLE_HAYSTACKS_DIR, "*.json")): + if not os.path.isfile(sample_json_file): + print(f"Skipping non-file: {sample_json_file}") + continue + + template_name = os.path.basename(sample_json_file).replace(".json", "") + print(f"Processing sample haystacks for: {template_name}") + + graph_path = os.path.join(GRAPHS_DIR, f"{template_name}_graph.json") + if not os.path.isfile(graph_path): + print( + f" Error: Graph file not found at {graph_path}. Skipping {template_name}." + ) + continue + + try: + with open(sample_json_file, "r") as f: + sample_data = json.load(f) + except json.JSONDecodeError as e: + print( + f" Error: Could not parse JSON from {sample_json_file}: {e}. Skipping." + ) + continue + + # Process "pass" cases + pass_haystacks = sample_data.get("pass", []) + if pass_haystacks: + for index, haystack in enumerate(pass_haystacks): + if not haystack: # Skip empty haystacks + continue + print(f" Generating 'pass' input {index} for {template_name}...") + output_circuit_input_json = os.path.join( + CIRCUIT_INPUTS_DIR, f"{template_name}_pass_{index}.json" + ) + + cmd = [ + "cargo", + "run", + "--quiet", + "--bin", + "zk-regex", + "generate-circuit-input", + "--graph-path", + graph_path, + "--input", + haystack, + "--max-haystack-len", + str(DEFAULT_MAX_HAYSTACK_LEN), + "--max-match-len", + str(DEFAULT_MAX_MATCH_LEN), + "--output-file-path", + output_circuit_input_json, + "--proving-framework", + "noir", + ] + try: + # For pass cases, show cargo output by not capturing stdout/stderr + subprocess.run(cmd, check=True, cwd=PROJECT_ROOT) + print(f" Successfully generated: {output_circuit_input_json}") + except subprocess.CalledProcessError: + print( + f" Error generating input for pass case: {template_name} - pass {index}" + ) + else: + print(f" No 'pass' cases found for {template_name}.") + + # Process "fail" cases + fail_haystacks = sample_data.get("fail", []) + if fail_haystacks: + for index, haystack in enumerate(fail_haystacks): + if not haystack: # Skip empty haystacks + continue + print( + f" Attempting to generate 'fail' input {index} for {template_name} (expected to fail)..." + ) + temp_fail_output = os.path.join( + CIRCUIT_INPUTS_DIR, f"{template_name}_fail_{index}_temp.json" + ) + + cmd = [ + "cargo", + "run", + "--quiet", + "--bin", + "zk-regex", + "generate-circuit-input", + "--graph-path", + graph_path, + "--input", + haystack, + "--max-haystack-len", + str(DEFAULT_MAX_HAYSTACK_LEN), + "--max-match-len", + str(DEFAULT_MAX_MATCH_LEN), + "--output-file-path", + temp_fail_output, + "--proving-framework", + "noir", + ] + # Suppress output for fail cases, check return code + process = subprocess.run( + cmd, capture_output=True, text=True, cwd=PROJECT_ROOT + ) + + if process.returncode != 0: + print( + f" Input generation failed as expected for: {template_name} - fail {index}" + ) + if os.path.exists(temp_fail_output): + os.remove(temp_fail_output) + else: + warning_message = f" Warning: Input generation SUCCEEDED for 'fail' case: {template_name} - fail {index}." + print(warning_message) + unexpected_successes.append( + f' - Template: {template_name}, Fail Case Index: {index}, Haystack: "{haystack}"' + ) + if SAVE_INPUTS_FOR_SUCCESSFUL_FAIL_CASES: + final_fail_output_name = os.path.join( + CIRCUIT_INPUTS_DIR, + f"{template_name}_fail_{index}_unexpected_success.json", + ) + shutil.move(temp_fail_output, final_fail_output_name) + print(f" Input saved to {final_fail_output_name}") + else: + if os.path.exists(temp_fail_output): + os.remove(temp_fail_output) + else: + print(f" No 'fail' cases found for {template_name}.") + print("---") + return unexpected_successes # Return the list + + +def add_tests_to_noir_circuits(): + print("Phase 2: Adding tests to Noir circuits...") + for circuit_nr_file in glob.glob(os.path.join(CIRCUITS_DIR, "*_regex.nr")): + if not os.path.isfile(circuit_nr_file): + print(f"Skipping non-file: {circuit_nr_file}") + continue + + template_name = os.path.basename(circuit_nr_file).replace("_regex.nr", "") + print(f"Processing circuit: {circuit_nr_file} (template: {template_name})") + + try: + with open(circuit_nr_file, "r") as f: + circuit_content_lines = f.readlines() + except IOError as e: + print(f" Error reading {circuit_nr_file}: {e}. Skipping.") + continue + + # Replace "use zkregex::" with "use crate::" + imports_modified = False + for i, line in enumerate(circuit_content_lines): + if line.strip().startswith("use zkregex::"): + circuit_content_lines[i] = line.replace( + "use zkregex::", "use crate::", 1 + ) + imports_modified = True + + if imports_modified: + print(f" Updated 'use zkregex::' to 'use crate::' in {circuit_nr_file}.") + + # Remove existing #[cfg(test)] mod tests { ... } block + mod_tests_removed = False + mod_tests_start_index = -1 + for i, line in enumerate(circuit_content_lines): + if ( + line.strip().startswith("#[cfg(test)]") + and "mod tests" + in circuit_content_lines[ + i + 1 if i + 1 < len(circuit_content_lines) else i + ].strip() + ): # check next line for mod tests { + # A bit more robust check for typical formatting + if "mod tests" in circuit_content_lines[ + i + 1 + ].strip() and circuit_content_lines[i + 1].strip().endswith("{"): + mod_tests_start_index = i + break + elif line.strip().startswith( + "#[cfg(test)] mod tests" + ): # Handles cases where it's on one line + mod_tests_start_index = i + break + + if mod_tests_start_index != -1: + brace_count = 0 + mod_tests_end_index = -1 + # Determine the start of the block for brace counting + block_start_line_index = mod_tests_start_index + # Find the opening brace '{' + for i in range(mod_tests_start_index, len(circuit_content_lines)): + if "{" in circuit_content_lines[i]: + block_start_line_index = i + break + + for i in range(block_start_line_index, len(circuit_content_lines)): + brace_count += circuit_content_lines[i].count("{") + brace_count -= circuit_content_lines[i].count("}") + if ( + brace_count == 0 and i >= block_start_line_index + ): # Ensure we've at least processed the line with the first { + # Check if the line where brace_count becomes 0 actually contained the first '{' of the mod tests + # This is to handle cases like `mod tests {}` on a single line correctly. + first_brace_on_this_line = ( + True + if circuit_content_lines[i].count("{") > 0 + and i == block_start_line_index + else False + ) + if not ( + first_brace_on_this_line + and circuit_content_lines[i].count("{") + > circuit_content_lines[i].count("}") + ): + mod_tests_end_index = i + break + + if mod_tests_end_index != -1: + del circuit_content_lines[ + mod_tests_start_index : mod_tests_end_index + 1 + ] + mod_tests_removed = True + print(f" Removed existing 'mod tests {{ ... }}' block.") + else: + print( + f" Warning: Found start of 'mod tests' but not its end. Manual check advised." + ) + + circuit_content_str = "".join( + circuit_content_lines + ) # Rebuild after potential removal + + lines_to_append_to_file = [] + globals_added_this_run = False + + # Check and prepare MAX_HAYSTACK_LEN and MAX_MATCH_LEN if not present globally + if not re.search( + r"^global MAX_HAYSTACK_LEN: u32\s*=\s*\d+;", + circuit_content_str, + re.MULTILINE, + ): + lines_to_append_to_file.append( + f"global MAX_HAYSTACK_LEN: u32 = {DEFAULT_MAX_HAYSTACK_LEN};\n" + ) + globals_added_this_run = True + print(f" Prepared global MAX_HAYSTACK_LEN = {DEFAULT_MAX_HAYSTACK_LEN}.") + if not re.search( + r"^global MAX_MATCH_LEN: u32\s*=\s*\d+;", circuit_content_str, re.MULTILINE + ): + lines_to_append_to_file.append( + f"global MAX_MATCH_LEN: u32 = {DEFAULT_MAX_MATCH_LEN};\n" + ) + globals_added_this_run = True + print(f" Prepared global MAX_MATCH_LEN = {DEFAULT_MAX_MATCH_LEN}.") + + if ( + globals_added_this_run and lines_to_append_to_file + ): # Add a newline after globals if they were added + lines_to_append_to_file.append("\n") + + num_capture_groups_in_circuit = 0 + num_cg_match = re.search( + r"pub global NUM_CAPTURE_GROUPS: u32\s*=\s*(\d+);", circuit_content_str + ) + if num_cg_match: + num_capture_groups_in_circuit = int(num_cg_match.group(1)) + + pass_input_json_pattern = os.path.join( + CIRCUIT_INPUTS_DIR, f"{template_name}_pass_*.json" + ) + pass_input_json_files = glob.glob(pass_input_json_pattern) + + if ( + not pass_input_json_files + and not globals_added_this_run + and not imports_modified + and not mod_tests_removed + ): + print( + f" No pass case circuit inputs found for {template_name} and no other changes. No tests added or file modified." + ) + continue + + new_tests_generated_this_run = False + for input_json_file in pass_input_json_files: + index_match = re.search( + rf"{template_name}_pass_(\d+)\.json$", input_json_file + ) + if not index_match: + continue + index = index_match.group(1) + test_fn_name = f"test_{template_name}_pass_{index}" + + # Check against the potentially modified circuit_content_str + current_full_content = "".join(circuit_content_lines) + "".join( + lines_to_append_to_file + ) + if f"fn {test_fn_name}()" in current_full_content: + print( + f" Test function {test_fn_name} already exists or is pending. Skipping." + ) + continue + + print(f" Generating test function: {test_fn_name}") + new_tests_generated_this_run = True + + try: + with open(input_json_file, "r") as f: + input_data = json.load(f) + except (json.JSONDecodeError, IOError) as e: + print( + f" Error reading or parsing input JSON {input_json_file}: {e}. Skipping this test." + ) + continue + + in_haystack_val_list = [str(x) for x in input_data.get("in_haystack", [])] + in_haystack_val = ", ".join(in_haystack_val_list) + match_start_val = input_data.get("match_start", 0) + match_length_val = input_data.get("match_length", 0) + curr_states_val = ", ".join(map(str, input_data.get("curr_states", []))) + next_states_val = ", ".join(map(str, input_data.get("next_states", []))) + + test_fn_content_list = [ + f"#[test]", + f"fn {test_fn_name}() {{", + f" let in_haystack: [u8; MAX_HAYSTACK_LEN] = [{in_haystack_val}];", + f" let match_start: u32 = {match_start_val};", + f" let match_length: u32 = {match_length_val};", + f" let current_states: [Field; MAX_MATCH_LEN] = [{curr_states_val}];", + f" let next_states: [Field; MAX_MATCH_LEN] = [{next_states_val}];", + ] + + call_params = [ + "in_haystack", + "match_start", + "match_length", + "current_states", + "next_states", + ] + + if num_capture_groups_in_circuit > 0: + cg_start_indices = ", ".join( + map( + str, + input_data.get( + "capture_group_start_indices", + [0] * num_capture_groups_in_circuit, + ), + ) + ) + test_fn_content_list.append( + f" let capture_group_start_indices_val: [Field; NUM_CAPTURE_GROUPS] = [{cg_start_indices}];" + ) + + cg_id_param_names = [] + cg_start_param_names = [] + for cg_idx in range(1, num_capture_groups_in_circuit + 1): + cg_ids_list = input_data.get("capture_group_ids", []) + cg_starts_list = input_data.get("capture_group_starts", []) + current_cg_ids_val = "" + if len(cg_ids_list) >= cg_idx: + current_cg_ids_val = ", ".join( + map(str, cg_ids_list[cg_idx - 1]) + ) + current_cg_starts_val = "" + if len(cg_starts_list) >= cg_idx: + current_cg_starts_val = ", ".join( + map(str, cg_starts_list[cg_idx - 1]) + ) + test_fn_content_list.append( + f" let capture_group_{cg_idx}_id: [Field; MAX_MATCH_LEN] = [{current_cg_ids_val}];" + ) + test_fn_content_list.append( + f" let capture_group_{cg_idx}_start: [Field; MAX_MATCH_LEN] = [{current_cg_starts_val}];" + ) + cg_id_param_names.append(f"capture_group_{cg_idx}_id") + cg_start_param_names.append(f"capture_group_{cg_idx}_start") + + call_params.extend(cg_id_param_names) + call_params.extend(cg_start_param_names) + call_params.append("capture_group_start_indices_val") + + call_params_str = ", ".join(call_params) + regex_match_call_base = ( + f"regex_match::({call_params_str})" + ) + + if num_capture_groups_in_circuit == 1: + capture_vars = "capture_1" + test_fn_content_list.append( + f" let {capture_vars} = {regex_match_call_base};" + ) + elif num_capture_groups_in_circuit > 1: + capture_vars_list = [ + f"capture_{i}" for i in range(1, num_capture_groups_in_circuit + 1) + ] + capture_vars = f"({', '.join(capture_vars_list)})" + test_fn_content_list.append( + f" let {capture_vars} = {regex_match_call_base};" + ) + else: + test_fn_content_list.append(f" {regex_match_call_base};") + + test_fn_content_list.append("}") + lines_to_append_to_file.extend( + [line + "\n" for line in test_fn_content_list] + ) + lines_to_append_to_file.append( + "\n" + ) # Add a blank line after each test function + + # Determine if any actual code changes were made or are pending + made_actual_changes = ( + imports_modified + or mod_tests_removed + or globals_added_this_run + or new_tests_generated_this_run + ) + + if ( + lines_to_append_to_file or made_actual_changes + ): # Check if there's anything to append or if prior modifications happened + # Append new lines to original content + circuit_content_lines.extend(lines_to_append_to_file) + try: + with open(circuit_nr_file, "w") as f: + f.writelines(circuit_content_lines) + print(f" Successfully updated {circuit_nr_file}.") + except IOError as e: + print(f" Error writing updated tests to {circuit_nr_file}: {e}") + else: + print( + f" No new tests were added and no modifications made to {circuit_nr_file}." + ) + print("---") + + +def main(): + os.chdir(PROJECT_ROOT) + print(f"Changed working directory to: {os.getcwd()}") + + if ( + not check_jq() + ): # Though jq is not directly used by Python, the script logic implies its earlier necessity + print( + "jq could not be found. While this Python script doesn't directly use jq for parsing," + ) + print( + "the overall workflow might depend on it for other parts if not fully migrated." + ) + # exit(1) # You might still want to exit if other parts of your system rely on jq + + os.makedirs(CIRCUIT_INPUTS_DIR, exist_ok=True) + + print("Starting input generation and test scaffolding...") + print(f"Sample haystacks source: {SAMPLE_HAYSTACKS_DIR}") + print(f"Graphs source: {GRAPHS_DIR}") + print(f"Circuit inputs destination: {CIRCUIT_INPUTS_DIR}") + print(f"Noir circuits to update: {CIRCUITS_DIR}") + print("---") + + unexpected_fail_successes = generate_circuit_inputs() + add_tests_to_noir_circuits() + + if unexpected_fail_successes: + print("\n--- SUMMARY OF UNEXPECTED SUCCESSES FOR 'FAIL' CASES ---") + print( + "The following 'fail' cases unexpectedly resulted in successful input generation:" + ) + for item in unexpected_fail_successes: + print(item) + print( + "Please review these cases to ensure the regex and test data are correct." + ) + print("---") + + print("Script finished.") + + +if __name__ == "__main__": + main() diff --git a/noir/scripts/gen_regex.py b/noir/scripts/gen_regex.py new file mode 100644 index 00000000..5d3d13e8 --- /dev/null +++ b/noir/scripts/gen_regex.py @@ -0,0 +1,170 @@ +import os +import shutil +import subprocess +import re + +# --- Configuration --- +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +PROJECT_ROOT = os.path.abspath( + os.path.join(SCRIPT_DIR, "..", "..") +) # Navigate to project root + +# --- Directories --- +NOIR_COMMON_DIR = os.path.join(PROJECT_ROOT, "noir", "common") +CIRCUITS_DIR = os.path.join(PROJECT_ROOT, "noir", "src", "templates", "circuits") +GRAPHS_DIR = os.path.join(PROJECT_ROOT, "noir", "src", "templates", "graphs") +TEMP_OUTPUT_DIR = os.path.join(PROJECT_ROOT, "noir", "src", "templates", "temp_gen") + + +def to_snake_case(name): + """Converts PascalCase or camelCase to snake_case.""" + s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name) + return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower() + + +def generate_files(regex_json_path): + template_name = os.path.basename(regex_json_path).replace(".json", "") + + # The bash script uses Perl for PascalCase. + # Python equivalent for simple 'a_b_c' -> 'ABC' or 'a-b-c' -> 'ABC' + # If the original template_name from the file is already PascalCase or suitable, + # this conversion might be simpler or unnecessary depending on compiler needs. + # For now, mimicing the idea of ensuring some form of non-snake_case for the compiler. + # A common Python way for "PascalCase" from "snake_case" or "kebab-case": + parts = re.split("_|-", template_name) + template_name_pascal = "".join(word.capitalize() for word in parts) + # If template_name was already PascalCase (e.g. "EmailDomain"), the above would make it "Emaildomain" + # So, let's refine this to be closer to the `perl -pe 's/(^|_)(.)/\U$2/g'` + # which effectively capitalizes after each underscore and the start. + # If `template_name` is `email_domain`, `template_name_pascal` should be `EmailDomain` + # If `template_name` is `emaildomain`, `template_name_pascal` should be `Emaildomain` (this is common) + # The perl `\U$2` uppercases the matched character. + + # Let's use a more direct PascalCase conversion logic if input is snake_case + if "_" in template_name: + template_name_pascal = "".join( + word.capitalize() for word in template_name.split("_") + ) + elif "-" in template_name: # Handle kebab-case as well + template_name_pascal = "".join( + word.capitalize() for word in template_name.split("-") + ) + else: # Assume it might be single word or already camel/pascal + template_name_pascal = ( + template_name[0].upper() + template_name[1:] + if len(template_name) > 1 + else template_name.upper() + ) + + print( + f"Processing {template_name} (from {regex_json_path}), using template name for compiler: {template_name_pascal}" + ) + + print(f"Generating files for {template_name_pascal}...") + try: + # Note: subprocess.run with shell=True can be a security risk if parts of the command are from untrusted input. + # Here, paths and names are derived from controlled sources, but it's good practice to be aware. + # Using a list of arguments is safer. + cmd = [ + "cargo", + "run", + "--bin", + "zk-regex", + "decomposed", + "--decomposed-regex-path", + regex_json_path, + "--output-file-path", + TEMP_OUTPUT_DIR, + "--template-name", + template_name_pascal, + "--proving-framework", + "noir", + ] + # To see output, remove capture_output=True, text=True + # process = subprocess.run(cmd, check=True, capture_output=True, text=True, cwd=PROJECT_ROOT) + process = subprocess.run( + cmd, check=True, cwd=PROJECT_ROOT + ) # Show output from cargo + print(f" Cargo command executed successfully for {template_name_pascal}.") + + except subprocess.CalledProcessError as e: + print(f" Error running cargo for {template_name_pascal}: {e}") + # print(f" Stdout: {e.stdout}") + # print(f" Stderr: {e.stderr}") + return # Skip moving files if generation failed + + # Determine the base name the compiler likely used for output files. + # The compiler is expected to convert the --template-name (PascalCase) to snake_case. + compiled_file_base_name = to_snake_case(template_name_pascal) + + generated_regex_nr_source = os.path.join( + TEMP_OUTPUT_DIR, f"{compiled_file_base_name}_regex.nr" + ) + generated_graph_json_source = os.path.join( + TEMP_OUTPUT_DIR, f"{compiled_file_base_name}_graph.json" + ) + + # Target files should use the original template_name from the .json file (which is already snake_case or simple) + target_regex_nr = os.path.join(CIRCUITS_DIR, f"{template_name}_regex.nr") + target_graph_json = os.path.join(GRAPHS_DIR, f"{template_name}_graph.json") + + # Move the generated regex.nr file + if os.path.exists(generated_regex_nr_source): + shutil.move(generated_regex_nr_source, target_regex_nr) + print(f"Moved {generated_regex_nr_source} to {target_regex_nr}") + else: + print(f"Error: Generated regex file {generated_regex_nr_source} not found!") + print(f"Attempted base name for compiler output: {compiled_file_base_name}") + + # Move the generated graph.json file + if os.path.exists(generated_graph_json_source): + shutil.move(generated_graph_json_source, target_graph_json) + print(f"Moved {generated_graph_json_source} to {target_graph_json}") + else: + print(f"Warning: Generated graph file {generated_graph_json_source} not found.") + print(f"Attempted base name for compiler output: {compiled_file_base_name}") + print("---") + + +def main(): + # Change current working directory to project root + os.chdir(PROJECT_ROOT) + print(f"Changed working directory to: {os.getcwd()}") + + if not os.path.isdir(NOIR_COMMON_DIR): + print(f"Error: Directory {NOIR_COMMON_DIR} not found.") + exit(1) + + os.makedirs(CIRCUITS_DIR, exist_ok=True) + os.makedirs(GRAPHS_DIR, exist_ok=True) + os.makedirs(TEMP_OUTPUT_DIR, exist_ok=True) + + print(f"Target circuits directory: {CIRCUITS_DIR}") + print(f"Target graphs directory: {GRAPHS_DIR}") + + for filename in os.listdir(NOIR_COMMON_DIR): + if filename.endswith(".json"): + regex_json_file = os.path.join(NOIR_COMMON_DIR, filename) + if os.path.isfile(regex_json_file): + generate_files(regex_json_file) + + # Clean up temporary directory + if os.path.isdir(TEMP_OUTPUT_DIR): + print(f"Cleaning up temporary directory: {TEMP_OUTPUT_DIR}") + # shutil.rmtree is powerful, ensure TEMP_OUTPUT_DIR is correct. + if ( + TEMP_OUTPUT_DIR + and TEMP_OUTPUT_DIR != "/" + and os.path.basename(TEMP_OUTPUT_DIR) == "temp_gen" + ): + shutil.rmtree(TEMP_OUTPUT_DIR) + else: + print( + f"Error: TEMP_OUTPUT_DIR ('{TEMP_OUTPUT_DIR}') is not set safely or not as expected. Aborting cleanup." + ) + + print("Script finished.") + + +if __name__ == "__main__": + main() diff --git a/noir/src/lib.nr b/noir/src/lib.nr new file mode 100644 index 00000000..30690ce1 --- /dev/null +++ b/noir/src/lib.nr @@ -0,0 +1,2 @@ +pub mod utils; +pub mod templates; diff --git a/noir/src/templates/circuits/body_hash_regex.nr b/noir/src/templates/circuits/body_hash_regex.nr new file mode 100644 index 00000000..185230be --- /dev/null +++ b/noir/src/templates/circuits/body_hash_regex.nr @@ -0,0 +1,147 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<910, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00046c68, 0x00046c6b, 0x00057574, 0x00067574, 0x00077b7a, 0x00083d3c, 0x00098584, 0x000a7d7c, 0x000b7d7c, 0x000c8685, 0x000d7b7a, 0x000e908f, 0x000f9392, 0x00109291, 0x00118786, 0x00125e5d, 0x00138786, 0x00138787, 0x00138792, 0x00138887, 0x00138888, 0x00138893, 0x00138988, 0x00138989, 0x00138994, 0x00138a89, 0x00138a8a, 0x00138a95, 0x00138b8a, 0x00138b8b, 0x00138b96, 0x00138c8b, 0x00138c8c, 0x00138c97, 0x00138d8c, 0x00138d8d, 0x00138d98, 0x00138e8d, 0x00138e8e, 0x00138e99, 0x00138f8e, 0x00138f8f, 0x00138f9a, 0x0013908f, 0x00139090, 0x0013909b, 0x00139190, 0x00139191, 0x0013919c, 0x00139291, 0x00139292, 0x0013929d, 0x00139392, 0x00139393, 0x0013939e, 0x00139493, 0x00139494, 0x0013949f, 0x00139594, 0x00139595, 0x001395a0, 0x00139695, 0x00139696, 0x001396a1, 0x00139796, 0x00139797, 0x001397a2, 0x00139897, 0x00139898, 0x001398a3, 0x00139998, 0x00139999, 0x001399a4, 0x00139a99, 0x00139a9a, 0x00139aa5, 0x00139b9a, 0x00139b9b, 0x00139ba6, 0x00139c9b, 0x00139c9c, 0x00139ca7, 0x00139d9c, 0x00139d9d, 0x00139da8, 0x00139e9d, 0x00139e9e, 0x00139ea9, 0x00139f9e, 0x00139f9f, 0x00139faa, 0x0013a09f, 0x0013a0a0, 0x0013a0ab, 0x0014a8aa, 0x0014a8ab, 0x0014a9ab, 0x0014a9ac, 0x0014aaac, 0x0014aaad, 0x0014abad, 0x0014abae, 0x0014acae, 0x0014acaf, 0x0014adaf, 0x0014adb0, 0x0014aeb0, 0x0014aeb1, 0x0014afb1, 0x0014afb2, 0x0014b0b2, 0x0014b0b3, 0x0014b1b3, 0x0014b1b4, 0x0014b2b4, 0x0014b2b5, 0x0014b3b5, 0x0014b3b6, 0x0014b4b6, 0x0014b4b7, 0x0014b5b7, 0x0014b5b8, 0x0014b6b8, 0x0014b6b9, 0x0014b7b9, 0x0014b7ba, 0x0014b8ba, 0x0014b8bb, 0x0014b9bb, 0x0014b9bc, 0x0014babc, 0x0014babd, 0x0014bbbd, 0x0014bbbe, 0x0014bcbe, 0x0014bcbf, 0x0014bdbf, 0x0014bdc0, 0x0014bec0, 0x0014bec1, 0x0014bfc1, 0x0014bfc2, 0x0014c0c2, 0x0014c0c3, 0x0014c1c3, 0x0014c1c4, 0x0014c2c4, 0x0014c2c5, 0x0014c3c5, 0x0014c3c6, 0x0014c4c6, 0x0014c4c7, 0x0014c5c7, 0x0014c5c8, 0x0014c6c8, 0x0014c6c9, 0x0014c7c9, 0x0014c7ca, 0x0014c8c9, 0x0014c8ca, 0x0014c9ca, 0x0014c9cb, 0x0014cacb, 0x0014cacc, 0x0014cbcc, 0x0014cbcd, 0x0014cccd, 0x0014ccce, 0x0014cdce, 0x0014cdcf, 0x0014cecf, 0x0014ced0, 0x0014cfd0, 0x0014cfd1, 0x0014d0d1, 0x0014d0d2, 0x0014d1d2, 0x0014d1d3, 0x0014d2d3, 0x0014d2d4, 0x0014d3d4, 0x0014d3d5, 0x0014d4d5, 0x0014d4d6, 0x0014d5d6, 0x0014d5d7, 0x0014d6d7, 0x0014d6d8, 0x0014d7d8, 0x0014d7d9, 0x0014d8d9, 0x0014d8da, 0x0014d9da, 0x0014d9db, 0x0014dadb, 0x0014dadc, 0x0014dbdc, 0x0014dbdd, 0x0014dcdd, 0x0014dcde, 0x0014ddde, 0x0014dddf, 0x0014dedf, 0x0014dee0, 0x0014dfe0, 0x0014dfe1, 0x0014e0e1, 0x0014e0e2, 0x0014e1e2, 0x0014e1e3, 0x0014e2e3, 0x0014e2e4, 0x0014e3e4, 0x0014e3e5, 0x0014e4e5, 0x0014e4e6, 0x0014e5e6, 0x0014e5e7, 0x0014e6e7, 0x0014e6e8, 0x0014e7e8, 0x0014e7e9, 0x0014eaf1, 0x0014eaf2, 0x0014ebf2, 0x0014ebf3, 0x0014ecf3, 0x0014ecf4, 0x0014edf4, 0x0014edf5, 0x0014eef5, 0x0014eef6, 0x0014eff6, 0x0014eff7, 0x0014f0f7, 0x0014f0f8, 0x0014f1f8, 0x0014f1f9, 0x0014f2f9, 0x0014f2fa, 0x0014f3fa, 0x0014f3fb, 0x0014f4fb, 0x0014f4fc, 0x0014f5fc, 0x0014f5fd, 0x0014f6fd, 0x0014f6fe, 0x0014f7fe, 0x0014f7ff, 0x0014f8ff, 0x0014f900, 0x0014fa00, 0x0014fa01, 0x0014fb01, 0x0014fb02, 0x0014fc02, 0x0014fc03, 0x0014fd03, 0x0014fd04, 0x0014fe04, 0x0014fe05, 0x0014ff05, 0x0014ff06, 0x00150006, 0x00150007, 0x00150107, 0x00150108, 0x00150208, 0x00150209, 0x00150309, 0x0015030a, 0x0015040a, 0x0015040b, 0x0015050b, 0x0015050c, 0x0015060c, 0x0015060d, 0x0015070d, 0x0015070e, 0x0015080e, 0x0015080f, 0x00160b10, 0x00160b11, 0x0016acaf, 0x0016acb0, 0x0016adb0, 0x0016adb1, 0x0016aeb1, 0x0016aeb2, 0x0016afb2, 0x0016afb3, 0x0016b0b3, 0x0016b0b4, 0x0016b1b4, 0x0016b1b5, 0x0016b2b5, 0x0016b2b6, 0x0016b3b6, 0x0016b3b7, 0x0016b4b7, 0x0016b4b8, 0x0016b5b8, 0x0016b5b9, 0x0016b6b9, 0x0016b6ba, 0x0016b7ba, 0x0016b7bb, 0x0016b8bb, 0x0016b8bc, 0x0016b9bc, 0x0016b9bd, 0x0016babd, 0x0016babe, 0x0016bbbe, 0x0016bbbf, 0x0016bcbe, 0x0016bcbf, 0x0016bdbf, 0x0016bdc0, 0x0016bec0, 0x0016bec1, 0x0016bfc1, 0x0016bfc2, 0x0016c0c2, 0x0016c0c3, 0x0016c1c3, 0x0016c1c4, 0x0016c2c4, 0x0016c2c5, 0x0016c3c5, 0x0016c3c6, 0x0016c4c6, 0x0016c4c7, 0x0016c5c7, 0x0016c5c8, 0x0016c6c8, 0x0016c6c9, 0x0016c7c9, 0x0016c7ca, 0x0016c8ca, 0x0016c8cb, 0x0016c9cb, 0x0016c9cc, 0x0016cacc, 0x0016cacd, 0x0016cbcd, 0x0016cbce, 0x0016ccce, 0x0016cccf, 0x0016cdcf, 0x0016cdd0, 0x0016ced0, 0x0016ced1, 0x0016cfd1, 0x0016cfd2, 0x0016d0d2, 0x0016d0d3, 0x0016d1d3, 0x0016d1d4, 0x0016d2d4, 0x0016d2d5, 0x0016d3d5, 0x0016d3d6, 0x0016d4d6, 0x0016d4d7, 0x0016d5d7, 0x0016d5d8, 0x0016d6d8, 0x0016d6d9, 0x0016d7d9, 0x0016d7da, 0x0016d8da, 0x0016d8db, 0x0016d9db, 0x0016d9dc, 0x0016dadc, 0x0016dadd, 0x0016dbdd, 0x0016dbde, 0x0016dcde, 0x0016dcdf, 0x0016dddf, 0x0016dde0, 0x0016dee0, 0x0016dee1, 0x0016dfe1, 0x0016dfe2, 0x0016e0e2, 0x0016e0e3, 0x0016e1e3, 0x0016e1e4, 0x0016e2e4, 0x0016e2e5, 0x0016e3e5, 0x0016e3e6, 0x0016e4e6, 0x0016e4e7, 0x0016e5e7, 0x0016e5e8, 0x0016e6e8, 0x0016e6e9, 0x0016e7e9, 0x0016e7ea, 0x0016e8ea, 0x0016e8eb, 0x0016e9eb, 0x0016e9ec, 0x0016eaec, 0x0016eaed, 0x0016ebed, 0x0016ebee, 0x00170e12, 0x00170e13, 0x00170f13, 0x00170f14, 0x00171014, 0x00171015, 0x00171115, 0x00171116, 0x00171216, 0x00171217, 0x00171317, 0x00171318, 0x00171418, 0x00171419, 0x00171519, 0x0017151a, 0x0017161a, 0x0017161b, 0x0017171b, 0x0017171c, 0x0017181c, 0x0017181d, 0x0017191d, 0x0017191e, 0x00171b1f, 0x00171b20, 0x00171c20, 0x00171c21, 0x00181c1f, 0x00181c20, 0x00192123, 0x00192124, 0x001a2425, 0x001a2426, 0x001a2526, 0x001a2527, 0x001a2627, 0x001a2628, 0x001b2929, 0x001b292a, 0x001b736b, 0x001c3837, 0x001c3838, 0x001c3938, 0x001c3939, 0x001c3a39, 0x001c3a3a, 0x001c3b3a, 0x001c3b3b, 0x001c3c3b, 0x001c3c3c, 0x001c3d3c, 0x001c3d3d, 0x001c3e3d, 0x001c3e3e, 0x001c3f3e, 0x001c3f3f, 0x001c403f, 0x001c4040, 0x001c4140, 0x001c4141, 0x001c4241, 0x001c4242, 0x001c4342, 0x001c4343, 0x001c4443, 0x001c4444, 0x001c4544, 0x001c4545, 0x001c4645, 0x001c4646, 0x001c4746, 0x001c4747, 0x001c4847, 0x001c4848, 0x001c4948, 0x001c4949, 0x001c4a49, 0x001c4a4a, 0x001c4b4a, 0x001c4b4b, 0x001c4c4b, 0x001c4c4c, 0x001c4d4c, 0x001c4d4d, 0x001c4e4d, 0x001c4e4e, 0x001c4f4e, 0x001c4f4f, 0x001c504f, 0x001c5050, 0x001c5150, 0x001c5151, 0x001c5251, 0x001c5252, 0x001c5352, 0x001c5353, 0x001c5453, 0x001c5454, 0x001c5554, 0x001c5555, 0x001c5655, 0x001c5656, 0x001c5756, 0x001c5757, 0x001c5857, 0x001c5858, 0x001c5958, 0x001c5959, 0x001c5a59, 0x001c5a5a, 0x001c5b5a, 0x001c5b5b, 0x001c5c5b, 0x001c5c5c, 0x001c5d5c, 0x001c5d5d, 0x001c5e5d, 0x001c5e5e, 0x001c5f5e, 0x001c5f5f, 0x001c605f, 0x001c6060, 0x001c6160, 0x001c6161, 0x001c6261, 0x001c6262, 0x001c6362, 0x001c6363, 0x001c6463, 0x001c6464, 0x001c6564, 0x001c6565, 0x001c6665, 0x001c6666, 0x001c6766, 0x001c6767, 0x001c6867, 0x001c6868, 0x001c6968, 0x001c6969, 0x001c6a69, 0x001c6a6a, 0x001c6b6a, 0x001c6b6b, 0x001c6c6b, 0x001c6c6c, 0x001c6d6c, 0x001c6d6d, 0x001c6e6d, 0x001c6e6e, 0x001c6f6e, 0x001c6f6f, 0x001c706f, 0x001c7070, 0x001c7170, 0x001c7171, 0x001c7271, 0x001c7272, 0x001c7473, 0x001c7474, 0x001c7574, 0x001c7575, 0x001c7675, 0x001c7676, 0x001c7776, 0x001c7777, 0x001c7877, 0x001c7878, 0x001c7978, 0x001c7979, 0x001c7a79, 0x001c7a7a, 0x001c7b7a, 0x001c7b7b, 0x001c7c7b, 0x001c7c7c, 0x001c7d7c, 0x001c7d7d, 0x001c7e7d, 0x001c7e7e, 0x001c7f7e, 0x001c7f7f, 0x001c807f, 0x001c8080, 0x001c8180, 0x001c8181, 0x001c8281, 0x001c8282, 0x001c8382, 0x001c8383, 0x001c8483, 0x001c8484, 0x001c8584, 0x001c8585, 0x001c8685, 0x001c8686, 0x001c8786, 0x001c8787, 0x001c8887, 0x001c8888, 0x001c8988, 0x001c8989, 0x001c8a89, 0x001c8a8a, 0x001c8b8a, 0x001c8b8b, 0x001c8c8b, 0x001c8c8c, 0x001c8d8c, 0x001c8d8d, 0x001c8e8d, 0x001c8e8e, 0x001c8f8e, 0x001c8f8f, 0x001c908f, 0x001c9090, 0x001c9190, 0x001c9191, 0x001c9291, 0x001c9292, 0x001c9392, 0x001c9393, 0x001c9493, 0x001c9494, 0x001c9594, 0x001c9595, 0x001c9695, 0x001c9696, 0x001c9796, 0x001c9797, 0x001c9897, 0x001c9898, 0x001c9998, 0x001c9999, 0x001c9a99, 0x001c9a9a, 0x001c9b9a, 0x001c9b9b, 0x001c9c9b, 0x001c9c9c, 0x001c9d9c, 0x001c9d9d, 0x001c9e9d, 0x001c9e9e, 0x001c9f9e, 0x001c9f9f, 0x001ca09f, 0x001ca0a0, 0x001ca1a0, 0x001ca1a1, 0x001ca2a1, 0x001ca2a2, 0x001ca3a2, 0x001ca3a3, 0x001ca4a3, 0x001ca4a4, 0x001ca5a4, 0x001ca5a5, 0x001ca6a5, 0x001ca6a6, 0x001ca7a6, 0x001ca7a7, 0x001ca8a7, 0x001ca8a8, 0x001ca9a8, 0x001ca9a9, 0x001caaa9, 0x001caaaa, 0x001cabaa, 0x001cabab, 0x001cacab, 0x001cacac, 0x001cadac, 0x001cadad, 0x001caead, 0x001caeae, 0x001cafae, 0x001cafaf, 0x001cb0af, 0x001cb0b0, 0x001cb1b0, 0x001cb1b1, 0x001cb2b1, 0x001cb2b2, 0x001cb3b2, 0x001cb3b3, 0x001cb4b3, 0x001cb4b4, 0x001cb5b4, 0x001cb5b5, 0x001cb6b5, 0x001cb6b6, 0x001cb7b6, 0x001cb7b7, 0x001cb8b0, 0x001cb9b1, 0x001cbab2, 0x001cbbb3, 0x001cbcb4, 0x001cbdb5, 0x001cbeb6, 0x001cbfb7, 0x001cc0b8, 0x001cc1b9, 0x001cc2ba, 0x001cc3bb, 0x001cc4bc, 0x001cc5bd, 0x001cc6be, 0x001cc7bf, 0x001cc8c0, 0x001cc9c1, 0x001ccac2, 0x001ccbc3, 0x001cccc4, 0x001ccdc5, 0x001ccec6, 0x001ccfc7, 0x001cd0c8, 0x001cd1c9, 0x001cd2ca, 0x001cd3cb, 0x001cd4cc, 0x001cd5cd, 0x001cd6ce, 0x001cd7cf, 0x001cd8d0, 0x001cd9d1, 0x001cdad2, 0x001cdbd3, 0x001cdcd4, 0x001cddd5, 0x001cded6, 0x001cdfd7, 0x001ce0d8, 0x001ce1d9, 0x001ce2da, 0x001ce3db, 0x001ce4dc, 0x001ce5dd, 0x001ce6de, 0x001ce7df, 0x001ce8e0, 0x001ce9e1, 0x001ceae2, 0x001cebe3, 0x001cece4, 0x001cede5, 0x001ceee6, 0x001cefe7, 0x001cf0e8, 0x001cf1e9, 0x001cf2ea, 0x001cf3eb, 0x001cf4ec, 0x001cf5ed, 0x001cf6ee, 0x001cf7ef, 0x001d7574, 0x001e5c5b, 0x001fa09f, 0x0020a8a7, 0x00217f7e, 0x00226f6e, 0x00226f6f, 0x00227372, 0x00227373, 0x00227473, 0x00227474, 0x00227574, 0x00227575, 0x00227675, 0x00227676, 0x00227776, 0x00227777, 0x00227877, 0x00227878, 0x00227978, 0x00227979, 0x00227a79, 0x00227a7a, 0x00227b7a, 0x00227b7b, 0x00227c7b, 0x00227c7c, 0x00227d7c, 0x00227d7d, 0x00228180, 0x00228181, 0x00228584, 0x00228585, 0x00228685, 0x00228686, 0x00228786, 0x00228787, 0x00228887, 0x00228888, 0x00228988, 0x00228989, 0x00228a89, 0x00228a8a, 0x00228b8a, 0x00228b8b, 0x00228c8b, 0x00228c8c, 0x00228d8c, 0x00228d8d, 0x00228e8d, 0x00228e8e, 0x00228f8e, 0x00228f8f, 0x0022908f, 0x00229090, 0x00229190, 0x00229191, 0x00229291, 0x00229292, 0x00229392, 0x00229393, 0x00229493, 0x00229494, 0x00229594, 0x00229595, 0x00229695, 0x00229696, 0x00229796, 0x00229797, 0x00229897, 0x00229898, 0x00229998, 0x00229999, 0x00229a99, 0x00229a9a, 0x00229b9a, 0x00229b9b, 0x00229c9b, 0x00229c9c, 0x00229d9c, 0x00229d9d, 0x00229e9d, 0x00229e9e, 0x0022a5a4, 0x0022a5a5, 0x0022a6a5, 0x0022a6a6, 0x0022a7a6, 0x0022a7a7, 0x0022a8a7, 0x0022a8a8, 0x0022a9a8, 0x0022a9a9, 0x0022aaa9, 0x0022aaaa, 0x0022abaa, 0x0022abab, 0x0022acab, 0x0022acac, 0x0022adac, 0x0022adad, 0x0022aead, 0x0022aeae, 0x0022afae, 0x0022afaf, 0x0022b0af, 0x0022b0b0, 0x0022b1b0, 0x0022b1b1, 0x0022b2b1, 0x0022b2b2, 0x0022b3b2, 0x0022b3b3, 0x0022b4b3, 0x0022b4b4, 0x0022b5b4, 0x0022b5b5, 0x0022b6b5, 0x0022b6b6, 0x0022b7b6, 0x0022b7b7, 0x0022b8b7, 0x0022b8b8, 0x0022b9b8, 0x0022b9b9, 0x0022bab9, 0x0022baba, 0x0022bbba, 0x0022bbbb, 0x0022bcbb, 0x0022bcbc, 0x0022bdbc, 0x0022bdbd, 0x0022bebd, 0x0022bebe, 0x00238180, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 128; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 35); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * BodyHashRegex matching function + * Regex: (?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+bh=([a-zA-Z0-9+/=]+); + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_body_hash_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [13, 10, 100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 61, 49, 59, 32, 97, 61, 114, 115, 97, 45, 115, 104, 97, 50, 53, 54, 59, 32, 99, 61, 114, 101, 108, 97, 120, 101, 100, 47, 114, 101, 108, 97, 120, 101, 100, 59, 32, 100, 61, 103, 109, 97, 105, 108, 46, 99, 111, 109, 59, 32, 115, 61, 50, 48, 50, 51, 48, 54, 48, 49, 59, 32, 116, 61, 49, 54, 57, 52, 57, 56, 57, 56, 49, 50, 59, 32, 120, 61, 49, 54, 57, 53, 53, 57, 52, 54, 49, 50, 59, 32, 100, 97, 114, 97, 61, 103, 111, 111, 103, 108, 101, 46, 99, 111, 109, 59, 32, 104, 61, 116, 111, 58, 115, 117, 98, 106, 101, 99, 116, 58, 109, 101, 115, 115, 97, 103, 101, 45, 105, 100, 58, 100, 97, 116, 101, 58, 102, 114, 111, 109, 58, 109, 105, 109, 101, 45, 118, 101, 114, 115, 105, 111, 110, 58, 102, 114, 111, 109, 58, 116, 111, 58, 99, 99, 58, 115, 117, 98, 106, 101, 99, 116, 32, 58, 100, 97, 116, 101, 58, 109, 101, 115, 115, 97, 103, 101, 45, 105, 100, 58, 114, 101, 112, 108, 121, 45, 116, 111, 59, 32, 98, 104, 61, 66, 87, 69, 84, 119, 81, 57, 74, 68, 82, 101, 83, 52, 71, 121, 82, 50, 118, 50, 84, 84, 82, 56, 66, 112, 122, 106, 57, 97, 121, 117, 109, 115, 87, 81, 74, 51, 113, 55, 118, 101, 104, 115, 61, 59, 32, 98, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 266; + let current_states: [Field; MAX_MATCH_LEN] = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 19, 19, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let next_states: [Field; MAX_MATCH_LEN] = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 19, 19, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_group_start_indices_val: [Field; NUM_CAPTURE_GROUPS] = [221]; + let capture_group_1_id: [Field; MAX_MATCH_LE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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_body_hash_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 61, 49, 59, 32, 97, 61, 114, 115, 97, 45, 115, 104, 97, 50, 53, 54, 59, 32, 99, 61, 114, 101, 108, 97, 120, 101, 100, 47, 114, 101, 108, 97, 120, 101, 100, 59, 32, 100, 61, 103, 109, 97, 105, 108, 46, 99, 111, 109, 59, 32, 115, 61, 50, 48, 50, 51, 48, 54, 48, 49, 59, 32, 116, 61, 49, 54, 57, 52, 57, 56, 57, 56, 49, 50, 59, 32, 120, 61, 49, 54, 57, 53, 53, 57, 52, 54, 49, 50, 59, 32, 100, 97, 114, 97, 61, 103, 111, 111, 103, 108, 101, 46, 99, 111, 109, 59, 32, 104, 61, 116, 111, 58, 115, 117, 98, 106, 101, 99, 116, 58, 109, 101, 115, 115, 97, 103, 101, 45, 105, 100, 58, 100, 97, 116, 101, 58, 102, 114, 111, 109, 58, 109, 105, 109, 101, 45, 118, 101, 114, 115, 105, 111, 110, 58, 102, 114, 111, 109, 58, 116, 111, 58, 99, 99, 58, 115, 117, 98, 106, 101, 99, 116, 32, 58, 100, 97, 116, 101, 58, 109, 101, 115, 115, 97, 103, 101, 45, 105, 100, 58, 114, 101, 112, 108, 121, 45, 116, 111, 59, 32, 98, 104, 61, 66, 87, 69, 84, 119, 81, 57, 74, 68, 82, 101, 83, 52, 71, 121, 82, 50, 118, 50, 84, 84, 82, 56, 66, 112, 122, 106, 57, 97, 121, 117, 109, 115, 87, 81, 74, 51, 113, 55, 118, 101, 104, 115, 61, 59, 32, 98, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 264; + let current_states: [Field; MAX_MATCH_LEN] = [0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 19, 19, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let next_states: [Field; MAX_MATCH_LEN] = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 19, 19, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_group_start_indices_val: [Field; NUM_CAPTURE_GROUPS] = [219]; + let capture_group_1_id: [Field; MAX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/email_addr_regex.nr b/noir/src/templates/circuits/email_addr_regex.nr new file mode 100644 index 00000000..08cf2fc7 --- /dev/null +++ b/noir/src/templates/circuits/email_addr_regex.nr @@ -0,0 +1,394 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<295, Field> = SparseArray { + keys: [0x00000000, 0x00012322, 0x00012323, 0x00012524, 0x00012525, 0x00012625, 0x00012626, 0x00012726, 0x00012727, 0x00012827, 0x00012828, 0x00012928, 0x00012929, 0x00012c2b, 0x00012c2c, 0x00012d2c, 0x00012d2d, 0x00012f2e, 0x00012f2f, 0x0001302f, 0x00013030, 0x00013130, 0x00013131, 0x00013231, 0x00013232, 0x00013332, 0x00013333, 0x00013433, 0x00013434, 0x00013534, 0x00013535, 0x00013635, 0x00013636, 0x00013736, 0x00013737, 0x00013837, 0x00013838, 0x00013938, 0x00013939, 0x00013a39, 0x00013a3a, 0x00013b3a, 0x00013b3b, 0x00013f3e, 0x00013f3f, 0x00014140, 0x00014141, 0x00014241, 0x00014242, 0x00014342, 0x00014343, 0x00014443, 0x00014444, 0x00014544, 0x00014545, 0x00014645, 0x00014646, 0x00014746, 0x00014747, 0x00014847, 0x00014848, 0x00014948, 0x00014949, 0x00014a49, 0x00014a4a, 0x00014b4a, 0x00014b4b, 0x00014c4b, 0x00014c4c, 0x00014d4c, 0x00014d4d, 0x00014e4d, 0x00014e4e, 0x00014f4e, 0x00014f4f, 0x0001504f, 0x00015050, 0x00015150, 0x00015151, 0x00015251, 0x00015252, 0x00015352, 0x00015353, 0x00015453, 0x00015454, 0x00015554, 0x00015555, 0x00015655, 0x00015656, 0x00015756, 0x00015757, 0x00015857, 0x00015858, 0x00015958, 0x00015959, 0x00015a59, 0x00015a5a, 0x00015b5a, 0x00015b5b, 0x00015c5b, 0x00015c5c, 0x0001605f, 0x00016060, 0x00016160, 0x00016161, 0x00016261, 0x00016262, 0x00016362, 0x00016363, 0x00016463, 0x00016464, 0x00016564, 0x00016565, 0x00016665, 0x00016666, 0x00016766, 0x00016767, 0x00016867, 0x00016868, 0x00016968, 0x00016969, 0x00016a69, 0x00016a6a, 0x00016b6a, 0x00016b6b, 0x00016c6b, 0x00016c6c, 0x00016d6c, 0x00016d6d, 0x00016e6d, 0x00016e6e, 0x00016f6e, 0x00016f6f, 0x0001706f, 0x00017070, 0x00017170, 0x00017171, 0x00017271, 0x00017272, 0x00017372, 0x00017373, 0x00017473, 0x00017474, 0x00017574, 0x00017575, 0x00017675, 0x00017676, 0x00017776, 0x00017777, 0x00017877, 0x00017878, 0x00017978, 0x00017979, 0x00017a79, 0x00017a7a, 0x00017b7a, 0x00017b7b, 0x00017c7b, 0x00017c7c, 0x00017d7c, 0x00017d7d, 0x00017e7d, 0x00017e7e, 0x00017f7e, 0x00017f7f, 0x0001807f, 0x00018080, 0x00024443, 0x00033332, 0x00033333, 0x00033433, 0x00033434, 0x00033635, 0x00033636, 0x00033736, 0x00033737, 0x00033837, 0x00033838, 0x00033938, 0x00033939, 0x00033a39, 0x00033a3a, 0x00033b3a, 0x00033b3b, 0x00033c3b, 0x00033c3c, 0x00033d3c, 0x00033d3d, 0x00033e3d, 0x00033e3e, 0x00033f3e, 0x00033f3f, 0x00034746, 0x00034747, 0x00034847, 0x00034848, 0x00034948, 0x00034949, 0x00034a49, 0x00034a4a, 0x00034b4a, 0x00034b4b, 0x00034c4b, 0x00034c4c, 0x00034d4c, 0x00034d4d, 0x00034e4d, 0x00034e4e, 0x00034f4e, 0x00034f4f, 0x0003504f, 0x00035050, 0x00035150, 0x00035151, 0x00035251, 0x00035252, 0x00035352, 0x00035353, 0x00035453, 0x00035454, 0x00035554, 0x00035555, 0x00035655, 0x00035656, 0x00035756, 0x00035757, 0x00035857, 0x00035858, 0x00035958, 0x00035959, 0x00035a59, 0x00035a5a, 0x00035b5a, 0x00035b5b, 0x00035c5b, 0x00035c5c, 0x00035d5c, 0x00035d5d, 0x00035e5d, 0x00035e5e, 0x00035f5e, 0x00035f5f, 0x0003605f, 0x00036060, 0x00036766, 0x00036767, 0x00036867, 0x00036868, 0x00036968, 0x00036969, 0x00036a69, 0x00036a6a, 0x00036b6a, 0x00036b6b, 0x00036c6b, 0x00036c6c, 0x00036d6c, 0x00036d6d, 0x00036e6d, 0x00036e6e, 0x00036f6e, 0x00036f6f, 0x0003706f, 0x00037070, 0x00037170, 0x00037171, 0x00037271, 0x00037272, 0x00037372, 0x00037373, 0x00037473, 0x00037474, 0x00037574, 0x00037575, 0x00037675, 0x00037676, 0x00037776, 0x00037777, 0x00037877, 0x00037878, 0x00037978, 0x00037979, 0x00037a79, 0x00037a7a, 0x00037b7a, 0x00037b7b, 0x00037c7b, 0x00037c7c, 0x00037d7c, 0x00037d7d, 0x00037e7d, 0x00037e7e, 0x00037f7e, 0x00037f7f, 0x0003807f, 0x00038080, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000001, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 320; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 3); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * EmailAddrRegex matching function + * Regex: ([A-Za-z0-9!#$%&\'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+) + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_email_addr_pass_11() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [118, 101, 114, 121, 46, 117, 110, 117, 115, 117, 97, 108, 46, 34, 64, 34, 46, 117, 110, 117, 115, 117, 97, 108, 46, 99, 111, 109, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_7() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 109, 117, 115, 101, 117, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_6() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 110, 97, 109, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 46, 110, 97, 109, 101, 43, 116, 97, 103, 43, 115, 111, 114, 116, 105, 110, 103, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_21() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [65, 98, 99, 46, 46, 49, 50, 51, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_17() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_16() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 32, 40, 74, 111, 101, 32, 83, 109, 105, 116, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_20() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [46, 101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 101, 115, 116, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_19() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 105, 114, 115, 116, 110, 97, 109, 101, 46, 108, 97, 115, 116, 110, 97, 109, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_15() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 46, 46, 101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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ture_group_1_start: [Field; MAX_MATCH_LEN] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_14() { + let in_haystack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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 95, 110, 97, 109, 101, 64, 115, 117, 98, 100, 111, 109, 97, 105, 110, 46, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 46, 117, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_18() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 45, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_13() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [74, 111, 101, 32, 83, 109, 105, 116, 104, 32, 60, 101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 11; + let match_length: u32 = 17; + let current_states: [Field; MAX_MATCH_LEN]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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_9() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 105, 114, 115, 116, 110, 97, 109, 101, 45, 108, 97, 115, 116, 110, 97, 109, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [95, 95, 95, 95, 95, 95, 95, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_4() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 45, 111, 110, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_8() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 46, 106, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_addr_pass_12() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [101, 109, 97, 105, 108, 64, 101, 120, 97, 109, 112, 108, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/email_domain_regex.nr b/noir/src/templates/circuits/email_domain_regex.nr new file mode 100644 index 00000000..63be7d25 --- /dev/null +++ b/noir/src/templates/circuits/email_domain_regex.nr @@ -0,0 +1,316 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<377, Field> = SparseArray { + keys: [0x00000000, 0x00022523, 0x00022524, 0x00022525, 0x00022725, 0x00022726, 0x00022727, 0x00022826, 0x00022827, 0x00022828, 0x00022927, 0x00022928, 0x00022929, 0x00022a28, 0x00022a29, 0x00022a2a, 0x00022b29, 0x00022b2a, 0x00022b2b, 0x00022e2c, 0x00022e2d, 0x00022e2e, 0x00022f2d, 0x00022f2e, 0x00022f2f, 0x0002312f, 0x00023130, 0x00023131, 0x00023230, 0x00023231, 0x00023232, 0x00023331, 0x00023332, 0x00023333, 0x00023432, 0x00023433, 0x00023434, 0x00023533, 0x00023534, 0x00023535, 0x00023634, 0x00023635, 0x00023636, 0x00023735, 0x00023736, 0x00023737, 0x00023836, 0x00023837, 0x00023838, 0x00023937, 0x00023938, 0x00023939, 0x00023a38, 0x00023a39, 0x00023a3a, 0x00023b39, 0x00023b3a, 0x00023b3b, 0x00023c3a, 0x00023c3b, 0x00023c3c, 0x00023d3b, 0x00023d3c, 0x00023d3d, 0x0002413f, 0x00024140, 0x00024141, 0x00024341, 0x00024342, 0x00024343, 0x00024543, 0x00024544, 0x00024545, 0x00024644, 0x00024645, 0x00024646, 0x00024745, 0x00024746, 0x00024747, 0x00024846, 0x00024847, 0x00024848, 0x00024947, 0x00024948, 0x00024949, 0x00024a48, 0x00024a49, 0x00024a4a, 0x00024b49, 0x00024b4a, 0x00024b4b, 0x00024c4a, 0x00024c4b, 0x00024c4c, 0x00024d4b, 0x00024d4c, 0x00024d4d, 0x00024e4c, 0x00024e4d, 0x00024e4e, 0x00024f4d, 0x00024f4e, 0x00024f4f, 0x0002504e, 0x0002504f, 0x00025050, 0x0002514f, 0x00025150, 0x00025151, 0x00025250, 0x00025251, 0x00025252, 0x00025351, 0x00025352, 0x00025353, 0x00025452, 0x00025453, 0x00025454, 0x00025553, 0x00025554, 0x00025555, 0x00025654, 0x00025655, 0x00025656, 0x00025755, 0x00025756, 0x00025757, 0x00025856, 0x00025857, 0x00025858, 0x00025957, 0x00025958, 0x00025959, 0x00025a58, 0x00025a59, 0x00025a5a, 0x00025b59, 0x00025b5a, 0x00025b5b, 0x00025c5a, 0x00025c5b, 0x00025c5c, 0x00025d5b, 0x00025d5c, 0x00025d5d, 0x00025e5c, 0x00025e5d, 0x00025e5e, 0x00026260, 0x00026261, 0x00026262, 0x00026361, 0x00026362, 0x00026363, 0x00026462, 0x00026463, 0x00026464, 0x00026563, 0x00026564, 0x00026565, 0x00026664, 0x00026665, 0x00026666, 0x00026765, 0x00026766, 0x00026767, 0x00026866, 0x00026867, 0x00026868, 0x00026967, 0x00026968, 0x00026969, 0x00026a68, 0x00026a69, 0x00026a6a, 0x00026b69, 0x00026b6a, 0x00026b6b, 0x00026c6a, 0x00026c6b, 0x00026c6c, 0x00026d6b, 0x00026d6c, 0x00026d6d, 0x00026e6c, 0x00026e6d, 0x00026e6e, 0x00026f6d, 0x00026f6e, 0x00026f6f, 0x0002706e, 0x0002706f, 0x00027070, 0x0002716f, 0x00027170, 0x00027171, 0x00027270, 0x00027271, 0x00027272, 0x00027371, 0x00027372, 0x00027373, 0x00027472, 0x00027473, 0x00027474, 0x00027573, 0x00027574, 0x00027575, 0x00027674, 0x00027675, 0x00027676, 0x00027775, 0x00027776, 0x00027777, 0x00027876, 0x00027877, 0x00027878, 0x00027977, 0x00027978, 0x00027979, 0x00027a78, 0x00027a79, 0x00027a7a, 0x00027b79, 0x00027b7a, 0x00027b7b, 0x00027c7a, 0x00027c7b, 0x00027c7c, 0x00027d7b, 0x00027d7c, 0x00027d7d, 0x00027e7c, 0x00027e7d, 0x00027e7e, 0x00027f7d, 0x00027f7e, 0x00027f7f, 0x0002807e, 0x0002807f, 0x00028080, 0x0002817f, 0x00028180, 0x00028181, 0x00028280, 0x00028281, 0x00028282, 0x00034645, 0x00043534, 0x00043535, 0x00043635, 0x00043636, 0x00043837, 0x00043838, 0x00043938, 0x00043939, 0x00043a39, 0x00043a3a, 0x00043b3a, 0x00043b3b, 0x00043c3b, 0x00043c3c, 0x00043d3c, 0x00043d3d, 0x00043e3d, 0x00043e3e, 0x00043f3e, 0x00043f3f, 0x0004403f, 0x00044040, 0x00044140, 0x00044141, 0x00044847, 0x00044848, 0x00044948, 0x00044949, 0x00044a49, 0x00044a4a, 0x00044b4a, 0x00044b4b, 0x00044c4b, 0x00044c4c, 0x00044d4c, 0x00044d4d, 0x00044e4d, 0x00044e4e, 0x00044f4e, 0x00044f4f, 0x0004504f, 0x00045050, 0x00045150, 0x00045151, 0x00045251, 0x00045252, 0x00045352, 0x00045353, 0x00045453, 0x00045454, 0x00045554, 0x00045555, 0x00045655, 0x00045656, 0x00045756, 0x00045757, 0x00045857, 0x00045858, 0x00045958, 0x00045959, 0x00045a59, 0x00045a5a, 0x00045b5a, 0x00045b5b, 0x00045c5b, 0x00045c5c, 0x00045d5c, 0x00045d5d, 0x00045e5d, 0x00045e5e, 0x00045f5e, 0x00045f5f, 0x0004605f, 0x00046060, 0x00046160, 0x00046161, 0x00046261, 0x00046262, 0x00046968, 0x00046969, 0x00046a69, 0x00046a6a, 0x00046b6a, 0x00046b6b, 0x00046c6b, 0x00046c6c, 0x00046d6c, 0x00046d6d, 0x00046e6d, 0x00046e6e, 0x00046f6e, 0x00046f6f, 0x0004706f, 0x00047070, 0x00047170, 0x00047171, 0x00047271, 0x00047272, 0x00047372, 0x00047373, 0x00047473, 0x00047474, 0x00047574, 0x00047575, 0x00047675, 0x00047676, 0x00047776, 0x00047777, 0x00047877, 0x00047878, 0x00047978, 0x00047979, 0x00047a79, 0x00047a7a, 0x00047b7a, 0x00047b7b, 0x00047c7b, 0x00047c7c, 0x00047d7c, 0x00047d7d, 0x00047e7d, 0x00047e7e, 0x00047f7e, 0x00047f7f, 0x0004807f, 0x00048080, 0x00048180, 0x00048181, 0x00048281, 0x00048282, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 128; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 4); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * EmailDomainRegex matching function + * Regex: [A-Za-z0-9!#$%&\'*+=?\\-\\^_`{|}~./]+@([A-Za-z0-9.\\-@]+) + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_email_domain_pass_9() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [99, 117, 115, 116, 111, 109, 101, 114, 46, 115, 117, 112, 112, 111, 114, 116, 64, 111, 110, 108, 105, 110, 101, 45, 115, 116, 111, 114, 101, 46, 98, 105, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_14() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 64, 116, 114, 97, 105, 108, 105, 110, 103, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 46, 99, 111, 109, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [110, 97, 109, 101, 64, 100, 111, 109, 97, 105, 110, 46, 119, 105, 116, 104, 46, 97, 116, 64, 115, 121, 109, 98, 111, 108, 46, 97, 108, 108, 111, 119, 101, 100, 46, 98, 121, 46, 114, 101, 103, 101, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 43; + let current_states: [Field; MAX_MATCH_LEN] = [1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_4() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [97, 64, 98, 46, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_8() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [99, 111, 110, 116, 97, 99, 116, 64, 101, 109, 97, 105, 108, 45, 112, 114, 111, 118, 105, 100, 101, 114, 46, 110, 101, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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_start: [Field; MAX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_12() { + let in_haystack: [u8;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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [33, 35, 36, 37, 38, 39, 42, 43, 61, 63, 94, 95, 96, 123, 124, 125, 126, 46, 64, 119, 101, 105, 114, 100, 46, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 43, 116, 97, 103, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_group_1_start: [Field; MAX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_13() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [32, 108, 101, 97, 100, 105, 110, 103, 119, 104, 105, 116, 101, 115, 112, 97, 99, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 1; + let match_length: u32 = 29; + let current_states: [Field; MAX_MATCH_LEN] = [1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 101, 115, 116, 46, 117, 115, 101, 114, 64, 115, 117, 98, 45, 100, 111, 109, 97, 105, 110, 46, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 46, 117, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_10() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 32, 115, 112, 97, 99, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_11() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 64, 100, 111, 109, 97, 105, 110, 32, 115, 112, 97, 99, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [118, 97, 108, 105, 100, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_7() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [97, 110, 111, 116, 104, 101, 114, 95, 117, 115, 101, 114, 64, 49, 50, 51, 46, 100, 111, 109, 97, 105, 110, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_email_domain_pass_6() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [117, 115, 101, 114, 46, 115, 108, 97, 115, 104, 47, 111, 107, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/from_all_regex.nr b/noir/src/templates/circuits/from_all_regex.nr new file mode 100644 index 00000000..3f17a00f --- /dev/null +++ b/noir/src/templates/circuits/from_all_regex.nr @@ -0,0 +1,225 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<685, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00046e6a, 0x00046e6d, 0x00057c7b, 0x00067b7a, 0x00077b7a, 0x00084a49, 0x00099294, 0x00099295, 0x00099395, 0x00099396, 0x00099496, 0x00099497, 0x00099597, 0x00099598, 0x00099698, 0x00099699, 0x00099799, 0x0009979a, 0x0009989a, 0x0009989b, 0x0009999b, 0x0009999c, 0x00099a9c, 0x00099a9d, 0x00099b9d, 0x00099b9e, 0x00099c9e, 0x00099c9f, 0x00099d9f, 0x00099da0, 0x00099ea0, 0x00099ea1, 0x00099fa1, 0x00099fa2, 0x0009a0a2, 0x0009a0a3, 0x0009a1a3, 0x0009a1a4, 0x0009a2a4, 0x0009a2a5, 0x0009a3a5, 0x0009a3a6, 0x0009a4a6, 0x0009a4a7, 0x0009a5a7, 0x0009a5a8, 0x0009a6a8, 0x0009a6a9, 0x0009a7a9, 0x0009a7aa, 0x0009a8aa, 0x0009a8ab, 0x0009a9ab, 0x0009a9ac, 0x0009aaac, 0x0009aaad, 0x0009abad, 0x0009abae, 0x0009acae, 0x0009acaf, 0x0009adaf, 0x0009adb0, 0x0009aeb0, 0x0009aeb1, 0x0009afb1, 0x0009afb2, 0x0009b0b2, 0x0009b0b3, 0x0009b1b3, 0x0009b1b4, 0x0009b2b3, 0x0009b2b4, 0x0009b3b4, 0x0009b3b5, 0x0009b4b5, 0x0009b4b6, 0x0009b5b6, 0x0009b5b7, 0x0009b6b7, 0x0009b6b8, 0x0009b7b8, 0x0009b7b9, 0x0009b8b9, 0x0009b8ba, 0x0009b9ba, 0x0009b9bb, 0x0009babb, 0x0009babc, 0x0009bbbc, 0x0009bbbd, 0x0009bcbd, 0x0009bcbe, 0x0009bdbe, 0x0009bdbf, 0x0009bebf, 0x0009bec0, 0x0009bfc0, 0x0009bfc1, 0x0009c0c1, 0x0009c0c2, 0x0009c1c2, 0x0009c1c3, 0x0009c2c3, 0x0009c2c4, 0x0009c3c4, 0x0009c3c5, 0x0009c4c5, 0x0009c4c6, 0x0009c5c6, 0x0009c5c7, 0x0009c6c7, 0x0009c6c8, 0x0009c7c8, 0x0009c7c9, 0x0009c8c9, 0x0009c8ca, 0x0009c9ca, 0x0009c9cb, 0x0009cacb, 0x0009cacc, 0x0009cbcc, 0x0009cbcd, 0x0009cccd, 0x0009ccce, 0x0009cdce, 0x0009cdcf, 0x0009cecf, 0x0009ced0, 0x0009cfd0, 0x0009cfd1, 0x0009d0d1, 0x0009d0d2, 0x0009d1d2, 0x0009d1d3, 0x0009d4d3, 0x0009d4db, 0x0009d5d4, 0x0009d5dc, 0x0009d6d5, 0x0009d6dd, 0x0009d7d6, 0x0009d7de, 0x0009d8d7, 0x0009d8df, 0x0009d9d8, 0x0009d9e0, 0x0009dad9, 0x0009dae1, 0x0009dbda, 0x0009dbe2, 0x0009dcdb, 0x0009dce3, 0x0009dddc, 0x0009dde4, 0x0009dedd, 0x0009dee5, 0x0009dfde, 0x0009dfe6, 0x0009e0df, 0x0009e0e7, 0x0009e1e0, 0x0009e1e8, 0x0009e2e1, 0x0009e2e9, 0x0009e3e2, 0x0009e3ea, 0x0009e4e3, 0x0009e4eb, 0x0009e5e4, 0x0009e5ec, 0x0009e6e5, 0x0009e6ed, 0x0009e7e6, 0x0009e7ee, 0x0009e8e7, 0x0009e8ef, 0x0009e9e8, 0x0009e9f0, 0x0009eae9, 0x0009eaf1, 0x0009ebea, 0x0009ebf2, 0x0009eceb, 0x0009ecf3, 0x0009edec, 0x0009edf4, 0x0009eeed, 0x0009eef5, 0x0009efee, 0x0009eff6, 0x0009f0ef, 0x0009f0f7, 0x0009f1f0, 0x0009f1f8, 0x000af4f2, 0x000af4fa, 0x000b9699, 0x000b969a, 0x000b979a, 0x000b979b, 0x000b989b, 0x000b989c, 0x000b999c, 0x000b999d, 0x000b9a9d, 0x000b9a9e, 0x000b9b9e, 0x000b9b9f, 0x000b9c9f, 0x000b9ca0, 0x000b9da0, 0x000b9da1, 0x000b9ea1, 0x000b9ea2, 0x000b9fa2, 0x000b9fa3, 0x000ba0a3, 0x000ba0a4, 0x000ba1a4, 0x000ba1a5, 0x000ba2a5, 0x000ba2a6, 0x000ba3a6, 0x000ba3a7, 0x000ba4a7, 0x000ba4a8, 0x000ba5a8, 0x000ba5a9, 0x000ba6a8, 0x000ba6a9, 0x000ba7a9, 0x000ba7aa, 0x000ba8aa, 0x000ba8ab, 0x000ba9ab, 0x000ba9ac, 0x000baaac, 0x000baaad, 0x000babad, 0x000babae, 0x000bacae, 0x000bacaf, 0x000badaf, 0x000badb0, 0x000baeb0, 0x000baeb1, 0x000bafb1, 0x000bafb2, 0x000bb0b2, 0x000bb0b3, 0x000bb1b3, 0x000bb1b4, 0x000bb2b4, 0x000bb2b5, 0x000bb3b5, 0x000bb3b6, 0x000bb4b6, 0x000bb4b7, 0x000bb5b7, 0x000bb5b8, 0x000bb6b8, 0x000bb6b9, 0x000bb7b9, 0x000bb7ba, 0x000bb8ba, 0x000bb8bb, 0x000bb9bb, 0x000bb9bc, 0x000bbabc, 0x000bbabd, 0x000bbbbd, 0x000bbbbe, 0x000bbcbe, 0x000bbcbf, 0x000bbdbf, 0x000bbdc0, 0x000bbec0, 0x000bbec1, 0x000bbfc1, 0x000bbfc2, 0x000bc0c2, 0x000bc0c3, 0x000bc1c3, 0x000bc1c4, 0x000bc2c4, 0x000bc2c5, 0x000bc3c5, 0x000bc3c6, 0x000bc4c6, 0x000bc4c7, 0x000bc5c7, 0x000bc5c8, 0x000bc6c8, 0x000bc6c9, 0x000bc7c9, 0x000bc7ca, 0x000bc8ca, 0x000bc8cb, 0x000bc9cb, 0x000bc9cc, 0x000bcacc, 0x000bcacd, 0x000bcbcd, 0x000bcbce, 0x000bccce, 0x000bcccf, 0x000bcdcf, 0x000bcdd0, 0x000bced0, 0x000bced1, 0x000bcfd1, 0x000bcfd2, 0x000bd0d2, 0x000bd0d3, 0x000bd1d3, 0x000bd1d4, 0x000bd2d4, 0x000bd2d5, 0x000bd3d5, 0x000bd3d6, 0x000bd4d6, 0x000bd4d7, 0x000bd5d7, 0x000bd5d8, 0x000bf7f4, 0x000bf7fc, 0x000bf8f5, 0x000bf8fd, 0x000bf9f6, 0x000bf9fe, 0x000bfaf7, 0x000bfaff, 0x000bfbf8, 0x000bfc00, 0x000bfcf9, 0x000bfd01, 0x000bfdfa, 0x000bfe02, 0x000bfefb, 0x000bff03, 0x000bfffc, 0x000c0004, 0x000c00fd, 0x000c0105, 0x000c01fe, 0x000c0206, 0x000c02ff, 0x000c0307, 0x000c0501, 0x000c0509, 0x000c0602, 0x000c060a, 0x000d0601, 0x000d0609, 0x000e0b05, 0x000e0b0d, 0x000f0e07, 0x000f0e0f, 0x000f0f08, 0x000f0f10, 0x000f1009, 0x000f1011, 0x0010130b, 0x00101313, 0x00102018, 0x00102020, 0x00102119, 0x00102121, 0x0010221a, 0x00102222, 0x0010231b, 0x00102323, 0x0010241c, 0x00102424, 0x0010251d, 0x00102525, 0x0010261e, 0x00102626, 0x0010271f, 0x00102727, 0x00102820, 0x00102828, 0x00102921, 0x00102929, 0x00102b23, 0x00102b2b, 0x00102c24, 0x00102c2c, 0x00102e26, 0x00102e2e, 0x00102f27, 0x00102f2f, 0x00103028, 0x00103030, 0x00103129, 0x00103131, 0x0010322a, 0x00103232, 0x0010332b, 0x00103333, 0x0010342c, 0x00103434, 0x0010352d, 0x00103535, 0x0010362e, 0x00103636, 0x0010372f, 0x00103737, 0x00103830, 0x00103838, 0x00103931, 0x00103939, 0x00103a32, 0x00103a3a, 0x00103b33, 0x00103b3b, 0x00103c34, 0x00103c3c, 0x00103d35, 0x00103d3d, 0x00103e36, 0x00103e3e, 0x00103f37, 0x00103f3f, 0x00104038, 0x00104040, 0x00104139, 0x00104141, 0x0010423a, 0x00104242, 0x0010433b, 0x00104343, 0x0010443c, 0x00104444, 0x0010453d, 0x00104545, 0x0010463e, 0x00104646, 0x0010473f, 0x00104747, 0x00104840, 0x00104848, 0x00104941, 0x00104949, 0x00104a42, 0x00104a4a, 0x00104b43, 0x00104b4b, 0x00104c44, 0x00104c4c, 0x00104d45, 0x00104d4d, 0x00104e46, 0x00104e4e, 0x00104f47, 0x00104f4f, 0x00105048, 0x00105050, 0x00105149, 0x00105151, 0x0010524a, 0x00105252, 0x0010534b, 0x00105353, 0x0010544c, 0x00105454, 0x0010554d, 0x00105555, 0x0010564e, 0x00105656, 0x0010574f, 0x00105757, 0x00105850, 0x00105858, 0x00105951, 0x00105959, 0x00105a52, 0x00105a5a, 0x00105b53, 0x00105b5b, 0x00105c54, 0x00105c5c, 0x00105d55, 0x00105d5d, 0x00105e56, 0x00105e5e, 0x00105f57, 0x00105f5f, 0x00106058, 0x00106060, 0x00106159, 0x00106161, 0x0010625a, 0x00106262, 0x0010635b, 0x00106363, 0x0010645c, 0x00106464, 0x0010655d, 0x00106565, 0x0010665e, 0x00106666, 0x0010675f, 0x00106767, 0x00106860, 0x00106868, 0x00106961, 0x00106969, 0x00106a62, 0x00106a6a, 0x00106b63, 0x00106b6b, 0x00106c64, 0x00106c6c, 0x00106d65, 0x00106d6d, 0x00106e66, 0x00106e6e, 0x00106f67, 0x00106f6f, 0x00107068, 0x00107070, 0x00107169, 0x00107171, 0x0010726a, 0x00107272, 0x0010736b, 0x00107373, 0x0010746c, 0x00107474, 0x0010756d, 0x00107575, 0x0010766e, 0x00107676, 0x0010776f, 0x00107777, 0x00107870, 0x00107878, 0x00107971, 0x00107979, 0x00107a72, 0x00107a7a, 0x00107b73, 0x00107b7b, 0x00107c74, 0x00107c7c, 0x00107d75, 0x00107d7d, 0x00107e76, 0x00107e7e, 0x00107f77, 0x00107f7f, 0x00108078, 0x00108080, 0x00108179, 0x00108181, 0x0010827a, 0x00108282, 0x0010837b, 0x00108383, 0x0010847c, 0x00108484, 0x0010857d, 0x00108585, 0x0010867e, 0x00108686, 0x0010877f, 0x00108787, 0x00108880, 0x00108888, 0x00108981, 0x00108989, 0x00108a82, 0x00108a8a, 0x00108b83, 0x00108b8b, 0x00108c84, 0x00108c8c, 0x00108d85, 0x00108d8d, 0x00108e86, 0x00108e8e, 0x00108f87, 0x00108f8f, 0x00109088, 0x00109090, 0x00109189, 0x00109191, 0x0010928a, 0x00109292, 0x0010938b, 0x00109393, 0x0010948c, 0x00109494, 0x0010958d, 0x00109595, 0x0010968e, 0x00109696, 0x0010978f, 0x00109797, 0x00109890, 0x00109898, 0x00109991, 0x00109999, 0x00109a92, 0x00109a9a, 0x00109b93, 0x00109b9b, 0x00109c94, 0x00109c9c, 0x00109d95, 0x00109d9d, 0x00109e96, 0x00109e9e, 0x00109f97, 0x00109f9f, 0x0010a099, 0x0010a19a, 0x0010a29b, 0x0010a39c, 0x0010a49d, 0x0010a59e, 0x0010a69f, 0x0010a7a0, 0x0010a8a1, 0x0010a9a2, 0x0010aaa3, 0x0010aba4, 0x0010aca5, 0x0010ada6, 0x0010aea7, 0x0010afa8, 0x0010b0a9, 0x0010b1aa, 0x0010b2ab, 0x0010b3ac, 0x0010b4ad, 0x0010b5ae, 0x0010b6af, 0x0010b7b0, 0x0010b8b1, 0x0010b9b2, 0x0010bab3, 0x0010bbb4, 0x0010bcb5, 0x0010bdb6, 0x0010beb7, 0x0010bfb8, 0x0010c0b9, 0x0010c1ba, 0x0010c2bb, 0x0010c3bc, 0x0010c4bd, 0x0010c5be, 0x0010c6bf, 0x0010c7c0, 0x0010c8c1, 0x0010c9c2, 0x0010cac3, 0x0010cbc4, 0x0010ccc5, 0x0010cdc6, 0x0010cec7, 0x0010cfc8, 0x0010d0c9, 0x0010d1ca, 0x0010d2cb, 0x0010d3cc, 0x0010d4cd, 0x0010d5ce, 0x0010d6cf, 0x0010d7d0, 0x0010d8d1, 0x0010d9d2, 0x0010dad3, 0x0010dbd4, 0x0010dcd5, 0x0010ddd6, 0x0010ded7, 0x0010dfd8, 0x00112f2e, 0x00122e2d, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000001, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 64; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 18); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * FromAllRegex matching function + * Regex: (?:\r\n|^)from:([^\r\n]+)\r\n + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_from_all_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 32, 78, 97, 109, 101, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115, 32, 60, 115, 112, 97, 99, 101, 115, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 62, 13, 10, 65, 110, 100, 32, 111, 116, 104, 101, 114, 32, 99, 111, 110, 116, 101, 110, 116, 32, 97, 102, 116, 101, 114, 119, 97, 114, 100, 115, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_group_1_start: [Field; MAX_MATCH_LEN] = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_4() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 119, 111, 114, 100, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 11; + let current_states: [Field; MAX_MATCH_LEN] = [0, 4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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [13, 10, 102, 114, 111, 109, 58, 97, 102, 116, 101, 114, 95, 101, 109, 112, 116, 121, 95, 108, 105, 110, 101, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 109, 105, 110, 105, 109, 97, 108, 64, 97, 46, 99, 111, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [83, 117, 98, 106, 101, 99, 116, 58, 32, 72, 101, 108, 108, 111, 13, 10, 102, 114, 111, 109, 58, 115, 101, 110, 100, 101, 114, 64, 100, 111, 109, 97, 105, 110, 46, 99, 111, 109, 13, 10, 84, 111, 58, 32, 114, 101, 99, 105, 112, 105, 101, 110, 116, 64, 100, 111, 109, 97, 105, 110, 46, 99, 111, 109, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 32, 84, 101, 115, 116, 32, 85, 115, 101, 114, 32, 60, 116, 101, 115, 116, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 62, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_7() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [84, 104, 105, 115, 32, 105, 115, 32, 115, 111, 109, 101, 32, 116, 101, 120, 116, 32, 98, 101, 102, 111, 114, 101, 46, 13, 10, 102, 114, 111, 109, 58, 115, 101, 110, 100, 101, 114, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 84, 104, 105, 115, 32, 105, 115, 32, 115, 111, 109, 101, 32, 116, 101, 120, 116, 32, 97, 102, 116, 101, 114, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_from_all_pass_6() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 32, 108, 105, 110, 101, 49, 13, 10, 108, 105, 110, 101, 50, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/message_id_regex.nr b/noir/src/templates/circuits/message_id_regex.nr new file mode 100644 index 00000000..a1c22d09 --- /dev/null +++ b/noir/src/templates/circuits/message_id_regex.nr @@ -0,0 +1,121 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<155, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00047571, 0x00047574, 0x00056f6e, 0x00067f7e, 0x00078180, 0x00087170, 0x00097978, 0x000a7978, 0x000b4342, 0x000c8180, 0x000d7e7d, 0x000e5655, 0x000f5a59, 0x00104b4a, 0x00104b4b, 0x00104d4c, 0x00104d4d, 0x00104e4d, 0x00104e4e, 0x0010504f, 0x00105050, 0x00105150, 0x00105151, 0x00105251, 0x00105252, 0x00105352, 0x00105353, 0x00105453, 0x00105454, 0x00105554, 0x00105555, 0x00105655, 0x00105656, 0x00105756, 0x00105757, 0x00105857, 0x00105858, 0x00105958, 0x00105959, 0x00105d5c, 0x00105d5d, 0x0010605f, 0x00106060, 0x00106160, 0x00106161, 0x00106261, 0x00106262, 0x00106362, 0x00106363, 0x00106463, 0x00106464, 0x00106564, 0x00106565, 0x00106665, 0x00106666, 0x00106766, 0x00106767, 0x00106867, 0x00106868, 0x00106968, 0x00106969, 0x00106a69, 0x00106a6a, 0x00106b6a, 0x00106b6b, 0x00106c6b, 0x00106c6c, 0x00106d6c, 0x00106d6d, 0x00106e6d, 0x00106e6e, 0x00106f6e, 0x00106f6f, 0x0010706f, 0x00107070, 0x00107170, 0x00107171, 0x00107271, 0x00107272, 0x00107372, 0x00107373, 0x00107473, 0x00107474, 0x00107574, 0x00107575, 0x00107675, 0x00107676, 0x00107776, 0x00107777, 0x00107877, 0x00107878, 0x00107978, 0x00107979, 0x00107a79, 0x00107a7a, 0x00107f7e, 0x00107f7f, 0x00108180, 0x00108181, 0x00108281, 0x00108282, 0x00108382, 0x00108383, 0x00108483, 0x00108484, 0x00108584, 0x00108585, 0x00108685, 0x00108686, 0x00108786, 0x00108787, 0x00108887, 0x00108888, 0x00108988, 0x00108989, 0x00108a89, 0x00108a8a, 0x00108b8a, 0x00108b8b, 0x00108c8b, 0x00108c8c, 0x00108d8c, 0x00108d8d, 0x00108e8d, 0x00108e8e, 0x00108f8e, 0x00108f8f, 0x0010908f, 0x00109090, 0x00109190, 0x00109191, 0x00109291, 0x00109292, 0x00109392, 0x00109393, 0x00109493, 0x00109494, 0x00109594, 0x00109595, 0x00109695, 0x00109696, 0x00109796, 0x00109797, 0x00109897, 0x00109898, 0x00109998, 0x00109999, 0x00109a99, 0x00109a9a, 0x0011605f, 0x00123130, 0x0013302f, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000005, 0x00000001, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 128; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 19); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * MessageIdRegex matching function + * Regex: (?:\r\n|^)message-id:(<[A-Za-z0-9=@\\.\\+_-]+>)\r\n + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + diff --git a/noir/src/templates/circuits/mod.nr b/noir/src/templates/circuits/mod.nr new file mode 100644 index 00000000..386ec1de --- /dev/null +++ b/noir/src/templates/circuits/mod.nr @@ -0,0 +1,10 @@ +pub mod body_hash_regex; +pub mod email_addr_regex; +pub mod email_domain_regex; +pub mod from_all_regex; +pub mod message_id_regex; +pub mod simple_regex; +pub mod subject_all_regex; +pub mod succinct_regex; +pub mod timestamp_regex; +pub mod to_all_regex; diff --git a/noir/src/templates/circuits/simple_regex.nr b/noir/src/templates/circuits/simple_regex.nr new file mode 100644 index 00000000..dfe3658f --- /dev/null +++ b/noir/src/templates/circuits/simple_regex.nr @@ -0,0 +1,218 @@ +use crate::utils::{ + select_subarray, + sparse_array::SparseArray, + transitions::check_transition +}; + +global TRANSITION_TABLE: SparseArray<6, Field> = SparseArray { + keys: [0x00000000, 0x00016362, 0x00016363, 0x00016364, 0x00046a66, 0x00046a67, 0x00046a69, 0x00ca91cd], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000000], + maximum: 0x00ca91cd +}; + + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 2) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 4); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * SimpleRegex matching function + * Regex: a*b + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], +) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + check_transition( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_simple_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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]; + let next_states: [Field; MAX_MATCH_LEN] = [1, 1, 1, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + regex_match::(in_haystack, match_start, match_length, current_states, next_states); +} + +#[test] +fn test_simple_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [97, 97, 97, 98, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + regex_match::(in_haystack, match_start, match_length, current_states, next_states); +} + diff --git a/noir/src/templates/circuits/subject_all_regex.nr b/noir/src/templates/circuits/subject_all_regex.nr new file mode 100644 index 00000000..7ed87b93 --- /dev/null +++ b/noir/src/templates/circuits/subject_all_regex.nr @@ -0,0 +1,186 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<66, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00047b77, 0x00047b7a, 0x00057f7e, 0x00066e6d, 0x00077877, 0x00087574, 0x00097574, 0x000a8887, 0x000b504f, 0x000c7978, 0x000c7979, 0x000c7a79, 0x000c7a7a, 0x000c7b7a, 0x000c7b7b, 0x000c7c7b, 0x000c7c7c, 0x000c7d7c, 0x000c7d7d, 0x000c7e7d, 0x000c7e7e, 0x000c7f7e, 0x000c7f7f, 0x000c807f, 0x000c8080, 0x000c8180, 0x000c8181, 0x000c8281, 0x000c8282, 0x000c8382, 0x000c8383, 0x000c8483, 0x000c8484, 0x000c8584, 0x000c8585, 0x000c8685, 0x000c8686, 0x000c8786, 0x000c8787, 0x000c8887, 0x000c8888, 0x000c8988, 0x000c8989, 0x000c8a89, 0x000c8a8a, 0x000c8b8a, 0x000c8b8b, 0x000c8c8b, 0x000c8c8c, 0x000c8d8c, 0x000c8d8d, 0x000c8e8d, 0x000c8e8e, 0x000c8f8e, 0x000c8f8f, 0x000c908f, 0x000c9090, 0x000c9190, 0x000c9191, 0x000c9291, 0x000c9292, 0x000d2726, 0x000e2625, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000001, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 64; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 14); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * SubjectAllRegex matching function + * Regex: (?:\r\n|^)subject:([a-z]+)\r\n + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_subject_all_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 32, 116, 101, 115, 116, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 115, 117, 98, 106, 101, 99, 116, 58, 119, 111, 114, 108, 100, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_subject_all_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [115, 117, 98, 106, 101, 99, 116, 58, 104, 101, 108, 108, 111, 13, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_subject_all_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [115, 117, 98, 106, 101, 99, 116, 58, 97, 98, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_subject_all_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [13, 10, 115, 117, 98, 106, 101, 99, 116, 58, 116, 101, 115, 116, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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AX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_subject_all_pass_4() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [115, 111, 109, 101, 32, 99, 111, 110, 116, 101, 110, 116, 32, 98, 101, 102, 111, 114, 101, 13, 10, 115, 117, 98, 106, 101, 99, 116, 58, 109, 101, 101, 116, 105, 110, 103, 13, 10, 97, 110, 100, 32, 115, 111, 109, 101, 32, 99, 111, 110, 116, 101, 110, 116, 32, 97, 102, 116, 101, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 19; + let match_length: u32 = 19; + let current_states: [Field; MAX_MATCH_LEN] = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 13, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/succinct_regex.nr b/noir/src/templates/circuits/succinct_regex.nr new file mode 100644 index 00000000..76044989 --- /dev/null +++ b/noir/src/templates/circuits/succinct_regex.nr @@ -0,0 +1,147 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<34, Field> = SparseArray { + keys: [0x00000000, 0x00015958, 0x00026968, 0x00037271, 0x00046b6a, 0x00057978, 0x00067978, 0x00077372, 0x0008302f, 0x00098685, 0x000a8382, 0x000b3635, 0x000c8c8b, 0x000d8281, 0x000e8180, 0x000f3e3d, 0x00107372, 0x00119796, 0x00128786, 0x00138988, 0x00149190, 0x00159897, 0x00168f8e, 0x0017a2a1, 0x0018504f, 0x00198483, 0x001a9998, 0x001ba9a8, 0x001ca1a0, 0x001d9e9d, 0x001ea1a0, 0x001facab, 0x0020a3a2, 0x0021bbba, 0x00226564, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x0000000b, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000009, 0x00000015, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000011, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 15; +pub global CAPTURE_2_MAX_LENGTH: u32 = 19; +pub global NUM_CAPTURE_GROUPS: u32 = 2; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 34); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * SuccinctRegex matching function + * Regex: (Welcome to the )(Succinct Residency!) + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_2_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_2_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec, BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i], capture_group_2_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i], capture_group_2_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + // Capture Group 2 + let capture_2 = capture_substring::( + haystack, + capture_group_2_id, + capture_group_2_start, + capture_group_start_indices[1] - (match_start as Field), + ); + + (capture_1, capture_2) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_succinct_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [87, 101, 108, 99, 111, 109, 101, 32, 116, 111, 32, 116, 104, 101, 32, 83, 117, 99, 99, 105, 110, 99, 116, 32, 82, 101, 115, 105, 100, 101, 110, 99, 121, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let (capture_1, capture_2) = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_2_id, capture_group_1_start, capture_group_2_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/timestamp_regex.nr b/noir/src/templates/circuits/timestamp_regex.nr new file mode 100644 index 00000000..ae0da116 --- /dev/null +++ b/noir/src/templates/circuits/timestamp_regex.nr @@ -0,0 +1,199 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<799, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00046c68, 0x00046c6b, 0x00057574, 0x00067574, 0x00077b7a, 0x00083d3c, 0x00098584, 0x000a7d7c, 0x000b7d7c, 0x000c8685, 0x000d7b7a, 0x000e908f, 0x000f9392, 0x00109291, 0x00118786, 0x00125e5d, 0x00138786, 0x00138787, 0x00138792, 0x00138887, 0x00138888, 0x00138893, 0x00138988, 0x00138989, 0x00138994, 0x00138a89, 0x00138a8a, 0x00138a95, 0x00138b8a, 0x00138b8b, 0x00138b96, 0x00138c8b, 0x00138c8c, 0x00138c97, 0x00138d8c, 0x00138d8d, 0x00138d98, 0x00138e8d, 0x00138e8e, 0x00138e99, 0x00138f8e, 0x00138f8f, 0x00138f9a, 0x0013908f, 0x00139090, 0x0013909b, 0x00139190, 0x00139191, 0x0013919c, 0x00139291, 0x00139292, 0x0013929d, 0x00139392, 0x00139393, 0x0013939e, 0x00139493, 0x00139494, 0x0013949f, 0x00139594, 0x00139595, 0x001395a0, 0x00139695, 0x00139696, 0x001396a1, 0x00139796, 0x00139797, 0x001397a2, 0x00139897, 0x00139898, 0x001398a3, 0x00139998, 0x00139999, 0x001399a4, 0x00139a99, 0x00139a9a, 0x00139aa5, 0x00139b9a, 0x00139b9b, 0x00139ba6, 0x00139c9b, 0x00139c9c, 0x00139ca7, 0x00139d9c, 0x00139d9d, 0x00139da8, 0x00139e9d, 0x00139e9e, 0x00139ea9, 0x00139f9e, 0x00139f9f, 0x00139faa, 0x0013a09f, 0x0013a0a0, 0x0013a0ab, 0x0014a8aa, 0x0014a8ab, 0x0014a9ab, 0x0014a9ac, 0x0014aaac, 0x0014aaad, 0x0014abad, 0x0014abae, 0x0014acae, 0x0014acaf, 0x0014adaf, 0x0014adb0, 0x0014aeb0, 0x0014aeb1, 0x0014afb1, 0x0014afb2, 0x0014b0b2, 0x0014b0b3, 0x0014b1b3, 0x0014b1b4, 0x0014b2b4, 0x0014b2b5, 0x0014b3b5, 0x0014b3b6, 0x0014b4b6, 0x0014b4b7, 0x0014b5b7, 0x0014b5b8, 0x0014b6b8, 0x0014b6b9, 0x0014b7b9, 0x0014b7ba, 0x0014b8ba, 0x0014b8bb, 0x0014b9bb, 0x0014b9bc, 0x0014babc, 0x0014babd, 0x0014bbbd, 0x0014bbbe, 0x0014bcbe, 0x0014bcbf, 0x0014bdbf, 0x0014bdc0, 0x0014bec0, 0x0014bec1, 0x0014bfc1, 0x0014bfc2, 0x0014c0c2, 0x0014c0c3, 0x0014c1c3, 0x0014c1c4, 0x0014c2c4, 0x0014c2c5, 0x0014c3c5, 0x0014c3c6, 0x0014c4c6, 0x0014c4c7, 0x0014c5c7, 0x0014c5c8, 0x0014c6c8, 0x0014c6c9, 0x0014c7c9, 0x0014c7ca, 0x0014c8c9, 0x0014c8ca, 0x0014c9ca, 0x0014c9cb, 0x0014cacb, 0x0014cacc, 0x0014cbcc, 0x0014cbcd, 0x0014cccd, 0x0014ccce, 0x0014cdce, 0x0014cdcf, 0x0014cecf, 0x0014ced0, 0x0014cfd0, 0x0014cfd1, 0x0014d0d1, 0x0014d0d2, 0x0014d1d2, 0x0014d1d3, 0x0014d2d3, 0x0014d2d4, 0x0014d3d4, 0x0014d3d5, 0x0014d4d5, 0x0014d4d6, 0x0014d5d6, 0x0014d5d7, 0x0014d6d7, 0x0014d6d8, 0x0014d7d8, 0x0014d7d9, 0x0014d8d9, 0x0014d8da, 0x0014d9da, 0x0014d9db, 0x0014dadb, 0x0014dadc, 0x0014dbdc, 0x0014dbdd, 0x0014dcdd, 0x0014dcde, 0x0014ddde, 0x0014dddf, 0x0014dedf, 0x0014dee0, 0x0014dfe0, 0x0014dfe1, 0x0014e0e1, 0x0014e0e2, 0x0014e1e2, 0x0014e1e3, 0x0014e2e3, 0x0014e2e4, 0x0014e3e4, 0x0014e3e5, 0x0014e4e5, 0x0014e4e6, 0x0014e5e6, 0x0014e5e7, 0x0014e6e7, 0x0014e6e8, 0x0014e7e8, 0x0014e7e9, 0x0014eaf1, 0x0014eaf2, 0x0014ebf2, 0x0014ebf3, 0x0014ecf3, 0x0014ecf4, 0x0014edf4, 0x0014edf5, 0x0014eef5, 0x0014eef6, 0x0014eff6, 0x0014eff7, 0x0014f0f7, 0x0014f0f8, 0x0014f1f8, 0x0014f1f9, 0x0014f2f9, 0x0014f2fa, 0x0014f3fa, 0x0014f3fb, 0x0014f4fb, 0x0014f4fc, 0x0014f5fc, 0x0014f5fd, 0x0014f6fd, 0x0014f6fe, 0x0014f7fe, 0x0014f7ff, 0x0014f8ff, 0x0014f900, 0x0014fa00, 0x0014fa01, 0x0014fb01, 0x0014fb02, 0x0014fc02, 0x0014fc03, 0x0014fd03, 0x0014fd04, 0x0014fe04, 0x0014fe05, 0x0014ff05, 0x0014ff06, 0x00150006, 0x00150007, 0x00150107, 0x00150108, 0x00150208, 0x00150209, 0x00150309, 0x0015030a, 0x0015040a, 0x0015040b, 0x0015050b, 0x0015050c, 0x0015060c, 0x0015060d, 0x0015070d, 0x0015070e, 0x0015080e, 0x0015080f, 0x00160b10, 0x00160b11, 0x0016acaf, 0x0016acb0, 0x0016adb0, 0x0016adb1, 0x0016aeb1, 0x0016aeb2, 0x0016afb2, 0x0016afb3, 0x0016b0b3, 0x0016b0b4, 0x0016b1b4, 0x0016b1b5, 0x0016b2b5, 0x0016b2b6, 0x0016b3b6, 0x0016b3b7, 0x0016b4b7, 0x0016b4b8, 0x0016b5b8, 0x0016b5b9, 0x0016b6b9, 0x0016b6ba, 0x0016b7ba, 0x0016b7bb, 0x0016b8bb, 0x0016b8bc, 0x0016b9bc, 0x0016b9bd, 0x0016babd, 0x0016babe, 0x0016bbbe, 0x0016bbbf, 0x0016bcbe, 0x0016bcbf, 0x0016bdbf, 0x0016bdc0, 0x0016bec0, 0x0016bec1, 0x0016bfc1, 0x0016bfc2, 0x0016c0c2, 0x0016c0c3, 0x0016c1c3, 0x0016c1c4, 0x0016c2c4, 0x0016c2c5, 0x0016c3c5, 0x0016c3c6, 0x0016c4c6, 0x0016c4c7, 0x0016c5c7, 0x0016c5c8, 0x0016c6c8, 0x0016c6c9, 0x0016c7c9, 0x0016c7ca, 0x0016c8ca, 0x0016c8cb, 0x0016c9cb, 0x0016c9cc, 0x0016cacc, 0x0016cacd, 0x0016cbcd, 0x0016cbce, 0x0016ccce, 0x0016cccf, 0x0016cdcf, 0x0016cdd0, 0x0016ced0, 0x0016ced1, 0x0016cfd1, 0x0016cfd2, 0x0016d0d2, 0x0016d0d3, 0x0016d1d3, 0x0016d1d4, 0x0016d2d4, 0x0016d2d5, 0x0016d3d5, 0x0016d3d6, 0x0016d4d6, 0x0016d4d7, 0x0016d5d7, 0x0016d5d8, 0x0016d6d8, 0x0016d6d9, 0x0016d7d9, 0x0016d7da, 0x0016d8da, 0x0016d8db, 0x0016d9db, 0x0016d9dc, 0x0016dadc, 0x0016dadd, 0x0016dbdd, 0x0016dbde, 0x0016dcde, 0x0016dcdf, 0x0016dddf, 0x0016dde0, 0x0016dee0, 0x0016dee1, 0x0016dfe1, 0x0016dfe2, 0x0016e0e2, 0x0016e0e3, 0x0016e1e3, 0x0016e1e4, 0x0016e2e4, 0x0016e2e5, 0x0016e3e5, 0x0016e3e6, 0x0016e4e6, 0x0016e4e7, 0x0016e5e7, 0x0016e5e8, 0x0016e6e8, 0x0016e6e9, 0x0016e7e9, 0x0016e7ea, 0x0016e8ea, 0x0016e8eb, 0x0016e9eb, 0x0016e9ec, 0x0016eaec, 0x0016eaed, 0x0016ebed, 0x0016ebee, 0x00170e12, 0x00170e13, 0x00170f13, 0x00170f14, 0x00171014, 0x00171015, 0x00171115, 0x00171116, 0x00171216, 0x00171217, 0x00171317, 0x00171318, 0x00171418, 0x00171419, 0x00171519, 0x0017151a, 0x0017161a, 0x0017161b, 0x0017171b, 0x0017171c, 0x0017181c, 0x0017181d, 0x0017191d, 0x0017191e, 0x00171b1f, 0x00171b20, 0x00171c20, 0x00171c21, 0x00181c1f, 0x00181c20, 0x00192123, 0x00192124, 0x001a2425, 0x001a2426, 0x001a2526, 0x001a2527, 0x001a2627, 0x001a2628, 0x001b2929, 0x001b292a, 0x001b736b, 0x001c3837, 0x001c3838, 0x001c3938, 0x001c3939, 0x001c3a39, 0x001c3a3a, 0x001c3b3a, 0x001c3b3b, 0x001c3c3b, 0x001c3c3c, 0x001c3d3c, 0x001c3d3d, 0x001c3e3d, 0x001c3e3e, 0x001c3f3e, 0x001c3f3f, 0x001c403f, 0x001c4040, 0x001c4140, 0x001c4141, 0x001c4241, 0x001c4242, 0x001c4342, 0x001c4343, 0x001c4443, 0x001c4444, 0x001c4544, 0x001c4545, 0x001c4645, 0x001c4646, 0x001c4746, 0x001c4747, 0x001c4847, 0x001c4848, 0x001c4948, 0x001c4949, 0x001c4a49, 0x001c4a4a, 0x001c4b4a, 0x001c4b4b, 0x001c4c4b, 0x001c4c4c, 0x001c4d4c, 0x001c4d4d, 0x001c4e4d, 0x001c4e4e, 0x001c4f4e, 0x001c4f4f, 0x001c504f, 0x001c5050, 0x001c5150, 0x001c5151, 0x001c5251, 0x001c5252, 0x001c5352, 0x001c5353, 0x001c5453, 0x001c5454, 0x001c5554, 0x001c5555, 0x001c5655, 0x001c5656, 0x001c5756, 0x001c5757, 0x001c5857, 0x001c5858, 0x001c5958, 0x001c5959, 0x001c5a59, 0x001c5a5a, 0x001c5b5a, 0x001c5b5b, 0x001c5c5b, 0x001c5c5c, 0x001c5d5c, 0x001c5d5d, 0x001c5e5d, 0x001c5e5e, 0x001c5f5e, 0x001c5f5f, 0x001c605f, 0x001c6060, 0x001c6160, 0x001c6161, 0x001c6261, 0x001c6262, 0x001c6362, 0x001c6363, 0x001c6463, 0x001c6464, 0x001c6564, 0x001c6565, 0x001c6665, 0x001c6666, 0x001c6766, 0x001c6767, 0x001c6867, 0x001c6868, 0x001c6968, 0x001c6969, 0x001c6a69, 0x001c6a6a, 0x001c6b6a, 0x001c6b6b, 0x001c6c6b, 0x001c6c6c, 0x001c6d6c, 0x001c6d6d, 0x001c6e6d, 0x001c6e6e, 0x001c6f6e, 0x001c6f6f, 0x001c706f, 0x001c7070, 0x001c7170, 0x001c7171, 0x001c7271, 0x001c7272, 0x001c7473, 0x001c7474, 0x001c7574, 0x001c7575, 0x001c7675, 0x001c7676, 0x001c7776, 0x001c7777, 0x001c7877, 0x001c7878, 0x001c7978, 0x001c7979, 0x001c7a79, 0x001c7a7a, 0x001c7b7a, 0x001c7b7b, 0x001c7c7b, 0x001c7c7c, 0x001c7d7c, 0x001c7d7d, 0x001c7e7d, 0x001c7e7e, 0x001c7f7e, 0x001c7f7f, 0x001c807f, 0x001c8080, 0x001c8180, 0x001c8181, 0x001c8281, 0x001c8282, 0x001c8382, 0x001c8383, 0x001c8483, 0x001c8484, 0x001c8584, 0x001c8585, 0x001c8685, 0x001c8686, 0x001c8786, 0x001c8787, 0x001c8887, 0x001c8888, 0x001c8988, 0x001c8989, 0x001c8a89, 0x001c8a8a, 0x001c8b8a, 0x001c8b8b, 0x001c8c8b, 0x001c8c8c, 0x001c8d8c, 0x001c8d8d, 0x001c8e8d, 0x001c8e8e, 0x001c8f8e, 0x001c8f8f, 0x001c908f, 0x001c9090, 0x001c9190, 0x001c9191, 0x001c9291, 0x001c9292, 0x001c9392, 0x001c9393, 0x001c9493, 0x001c9494, 0x001c9594, 0x001c9595, 0x001c9695, 0x001c9696, 0x001c9796, 0x001c9797, 0x001c9897, 0x001c9898, 0x001c9998, 0x001c9999, 0x001c9a99, 0x001c9a9a, 0x001c9b9a, 0x001c9b9b, 0x001c9c9b, 0x001c9c9c, 0x001c9d9c, 0x001c9d9d, 0x001c9e9d, 0x001c9e9e, 0x001c9f9e, 0x001c9f9f, 0x001ca09f, 0x001ca0a0, 0x001ca1a0, 0x001ca1a1, 0x001ca2a1, 0x001ca2a2, 0x001ca3a2, 0x001ca3a3, 0x001ca4a3, 0x001ca4a4, 0x001ca5a4, 0x001ca5a5, 0x001ca6a5, 0x001ca6a6, 0x001ca7a6, 0x001ca7a7, 0x001ca8a7, 0x001ca8a8, 0x001ca9a8, 0x001ca9a9, 0x001caaa9, 0x001caaaa, 0x001cabaa, 0x001cabab, 0x001cacab, 0x001cacac, 0x001cadac, 0x001cadad, 0x001caead, 0x001caeae, 0x001cafae, 0x001cafaf, 0x001cb0af, 0x001cb0b0, 0x001cb1b0, 0x001cb1b1, 0x001cb2b1, 0x001cb2b2, 0x001cb3b2, 0x001cb3b3, 0x001cb4b3, 0x001cb4b4, 0x001cb5b4, 0x001cb5b5, 0x001cb6b5, 0x001cb6b6, 0x001cb7b6, 0x001cb7b7, 0x001cb8b0, 0x001cb9b1, 0x001cbab2, 0x001cbbb3, 0x001cbcb4, 0x001cbdb5, 0x001cbeb6, 0x001cbfb7, 0x001cc0b8, 0x001cc1b9, 0x001cc2ba, 0x001cc3bb, 0x001cc4bc, 0x001cc5bd, 0x001cc6be, 0x001cc7bf, 0x001cc8c0, 0x001cc9c1, 0x001ccac2, 0x001ccbc3, 0x001cccc4, 0x001ccdc5, 0x001ccec6, 0x001ccfc7, 0x001cd0c8, 0x001cd1c9, 0x001cd2ca, 0x001cd3cb, 0x001cd4cc, 0x001cd5cd, 0x001cd6ce, 0x001cd7cf, 0x001cd8d0, 0x001cd9d1, 0x001cdad2, 0x001cdbd3, 0x001cdcd4, 0x001cddd5, 0x001cded6, 0x001cdfd7, 0x001ce0d8, 0x001ce1d9, 0x001ce2da, 0x001ce3db, 0x001ce4dc, 0x001ce5dd, 0x001ce6de, 0x001ce7df, 0x001ce8e0, 0x001ce9e1, 0x001ceae2, 0x001cebe3, 0x001cece4, 0x001cede5, 0x001ceee6, 0x001cefe7, 0x001cf0e8, 0x001cf1e9, 0x001cf2ea, 0x001cf3eb, 0x001cf4ec, 0x001cf5ed, 0x001cf6ee, 0x001cf7ef, 0x001d7574, 0x001e5c5b, 0x001fb2b1, 0x00207d7c, 0x00217271, 0x00217272, 0x00217372, 0x00217373, 0x00217473, 0x00217474, 0x00217574, 0x00217575, 0x00217675, 0x00217676, 0x00217776, 0x00217777, 0x00217877, 0x00217878, 0x00217978, 0x00217979, 0x00217a79, 0x00217a7a, 0x00217b7a, 0x00217b7b, 0x00227f7e, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 10; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 34); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * TimestampRegex matching function + * Regex: (?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+t=([0-9]+); + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + + (capture_1) +} + +global MAX_HAYSTACK_LEN: u32 = 300; +global MAX_MATCH_LEN: u32 = 300; + +#[test] +fn test_timestamp_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 61, 49, 59, 32, 97, 61, 114, 115, 97, 45, 115, 104, 97, 50, 53, 54, 59, 32, 116, 61, 49, 54, 55, 56, 56, 56, 54, 52, 48, 48, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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AX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_timestamp_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [13, 10, 100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 115, 61, 115, 101, 108, 101, 99, 116, 111, 114, 59, 32, 100, 61, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 59, 32, 116, 61, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 57; + let current_states: [Field; MAX_MATCH_LEN] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let next_states: [Field; MAX_MATCH_LEN] = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 19, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 33, 33, 33, 33, 33, 33, 33, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_timestamp_pass_4() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 61, 49, 59, 32, 116, 61, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 59, 32, 101, 120, 116, 114, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_timestamp_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [104, 101, 97, 100, 101, 114, 58, 32, 118, 97, 108, 117, 101, 13, 10, 100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 61, 49, 59, 32, 116, 61, 49, 51, 59, 13, 10, 110, 101, 120, 116, 104, 101, 97, 100, 101, 114, 58, 32, 118, 97, 108, 117, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_group_1_start: [Field; MAX_MATCH_LEN] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_timestamp_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 104, 61, 102, 114, 111, 109, 58, 116, 111, 58, 115, 117, 98, 106, 101, 99, 116, 59, 32, 98, 104, 61, 98, 111, 100, 121, 104, 97, 115, 104, 59, 32, 116, 61, 48, 49, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 52; + let current_states: [Field; MAX_MATCH_LEN] = [0, 4, 5, 6,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_timestamp_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 118, 101, 114, 115, 105, 111, 110, 61, 49, 59, 32, 97, 110, 111, 116, 104, 101, 114, 61, 116, 97, 103, 59, 32, 109, 111, 114, 101, 61, 100, 97, 116, 97, 59, 32, 116, 61, 57, 56, 55, 54, 53, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 58; + let current_states: [Field; MAX_MATCH_LEN] = [0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 27, 28, 29, 30, 19, 19, 19, 19, 19, 19, 19, 27, 28, 28, 28, 29, 30, 19, 19, 19, 19, 27, 28, 28, 28, 28, 29, 30, 31, 32, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/circuits/to_all_regex.nr b/noir/src/templates/circuits/to_all_regex.nr new file mode 100644 index 00000000..bfbf1f05 --- /dev/null +++ b/noir/src/templates/circuits/to_all_regex.nr @@ -0,0 +1,225 @@ +use crate::utils::{ + select_subarray, + captures::capture_substring, + sparse_array::SparseArray, + transitions::check_transition_with_captures +}; + +global TRANSITION_TABLE: SparseArray<683, Field> = SparseArray { + keys: [0x00000000, 0x0002110f, 0x00021110, 0x0003100f, 0x00047c78, 0x00047c7b, 0x00057978, 0x00064645, 0x00078e90, 0x00078e91, 0x00078f91, 0x00078f92, 0x00079092, 0x00079093, 0x00079193, 0x00079194, 0x00079294, 0x00079295, 0x00079395, 0x00079396, 0x00079496, 0x00079497, 0x00079597, 0x00079598, 0x00079698, 0x00079699, 0x00079799, 0x0007979a, 0x0007989a, 0x0007989b, 0x0007999b, 0x0007999c, 0x00079a9c, 0x00079a9d, 0x00079b9d, 0x00079b9e, 0x00079c9e, 0x00079c9f, 0x00079d9f, 0x00079da0, 0x00079ea0, 0x00079ea1, 0x00079fa1, 0x00079fa2, 0x0007a0a2, 0x0007a0a3, 0x0007a1a3, 0x0007a1a4, 0x0007a2a4, 0x0007a2a5, 0x0007a3a5, 0x0007a3a6, 0x0007a4a6, 0x0007a4a7, 0x0007a5a7, 0x0007a5a8, 0x0007a6a8, 0x0007a6a9, 0x0007a7a9, 0x0007a7aa, 0x0007a8aa, 0x0007a8ab, 0x0007a9ab, 0x0007a9ac, 0x0007aaac, 0x0007aaad, 0x0007abad, 0x0007abae, 0x0007acae, 0x0007acaf, 0x0007adaf, 0x0007adb0, 0x0007aeaf, 0x0007aeb0, 0x0007afb0, 0x0007afb1, 0x0007b0b1, 0x0007b0b2, 0x0007b1b2, 0x0007b1b3, 0x0007b2b3, 0x0007b2b4, 0x0007b3b4, 0x0007b3b5, 0x0007b4b5, 0x0007b4b6, 0x0007b5b6, 0x0007b5b7, 0x0007b6b7, 0x0007b6b8, 0x0007b7b8, 0x0007b7b9, 0x0007b8b9, 0x0007b8ba, 0x0007b9ba, 0x0007b9bb, 0x0007babb, 0x0007babc, 0x0007bbbc, 0x0007bbbd, 0x0007bcbd, 0x0007bcbe, 0x0007bdbe, 0x0007bdbf, 0x0007bebf, 0x0007bec0, 0x0007bfc0, 0x0007bfc1, 0x0007c0c1, 0x0007c0c2, 0x0007c1c2, 0x0007c1c3, 0x0007c2c3, 0x0007c2c4, 0x0007c3c4, 0x0007c3c5, 0x0007c4c5, 0x0007c4c6, 0x0007c5c6, 0x0007c5c7, 0x0007c6c7, 0x0007c6c8, 0x0007c7c8, 0x0007c7c9, 0x0007c8c9, 0x0007c8ca, 0x0007c9ca, 0x0007c9cb, 0x0007cacb, 0x0007cacc, 0x0007cbcc, 0x0007cbcd, 0x0007cccd, 0x0007ccce, 0x0007cdce, 0x0007cdcf, 0x0007d0cf, 0x0007d0d7, 0x0007d1d0, 0x0007d1d8, 0x0007d2d1, 0x0007d2d9, 0x0007d3d2, 0x0007d3da, 0x0007d4d3, 0x0007d4db, 0x0007d5d4, 0x0007d5dc, 0x0007d6d5, 0x0007d6dd, 0x0007d7d6, 0x0007d7de, 0x0007d8d7, 0x0007d8df, 0x0007d9d8, 0x0007d9e0, 0x0007dad9, 0x0007dae1, 0x0007dbda, 0x0007dbe2, 0x0007dcdb, 0x0007dce3, 0x0007dddc, 0x0007dde4, 0x0007dedd, 0x0007dee5, 0x0007dfde, 0x0007dfe6, 0x0007e0df, 0x0007e0e7, 0x0007e1e0, 0x0007e1e8, 0x0007e2e1, 0x0007e2e9, 0x0007e3e2, 0x0007e3ea, 0x0007e4e3, 0x0007e4eb, 0x0007e5e4, 0x0007e5ec, 0x0007e6e5, 0x0007e6ed, 0x0007e7e6, 0x0007e7ee, 0x0007e8e7, 0x0007e8ef, 0x0007e9e8, 0x0007e9f0, 0x0007eae9, 0x0007eaf1, 0x0007ebea, 0x0007ebf2, 0x0007eceb, 0x0007ecf3, 0x0007edec, 0x0007edf4, 0x0008f0ee, 0x0008f0f6, 0x00099295, 0x00099296, 0x00099396, 0x00099397, 0x00099497, 0x00099498, 0x00099598, 0x00099599, 0x00099699, 0x0009969a, 0x0009979a, 0x0009979b, 0x0009989b, 0x0009989c, 0x0009999c, 0x0009999d, 0x00099a9d, 0x00099a9e, 0x00099b9e, 0x00099b9f, 0x00099c9f, 0x00099ca0, 0x00099da0, 0x00099da1, 0x00099ea1, 0x00099ea2, 0x00099fa2, 0x00099fa3, 0x0009a0a3, 0x0009a0a4, 0x0009a1a4, 0x0009a1a5, 0x0009a2a4, 0x0009a2a5, 0x0009a3a5, 0x0009a3a6, 0x0009a4a6, 0x0009a4a7, 0x0009a5a7, 0x0009a5a8, 0x0009a6a8, 0x0009a6a9, 0x0009a7a9, 0x0009a7aa, 0x0009a8aa, 0x0009a8ab, 0x0009a9ab, 0x0009a9ac, 0x0009aaac, 0x0009aaad, 0x0009abad, 0x0009abae, 0x0009acae, 0x0009acaf, 0x0009adaf, 0x0009adb0, 0x0009aeb0, 0x0009aeb1, 0x0009afb1, 0x0009afb2, 0x0009b0b2, 0x0009b0b3, 0x0009b1b3, 0x0009b1b4, 0x0009b2b4, 0x0009b2b5, 0x0009b3b5, 0x0009b3b6, 0x0009b4b6, 0x0009b4b7, 0x0009b5b7, 0x0009b5b8, 0x0009b6b8, 0x0009b6b9, 0x0009b7b9, 0x0009b7ba, 0x0009b8ba, 0x0009b8bb, 0x0009b9bb, 0x0009b9bc, 0x0009babc, 0x0009babd, 0x0009bbbd, 0x0009bbbe, 0x0009bcbe, 0x0009bcbf, 0x0009bdbf, 0x0009bdc0, 0x0009bec0, 0x0009bec1, 0x0009bfc1, 0x0009bfc2, 0x0009c0c2, 0x0009c0c3, 0x0009c1c3, 0x0009c1c4, 0x0009c2c4, 0x0009c2c5, 0x0009c3c5, 0x0009c3c6, 0x0009c4c6, 0x0009c4c7, 0x0009c5c7, 0x0009c5c8, 0x0009c6c8, 0x0009c6c9, 0x0009c7c9, 0x0009c7ca, 0x0009c8ca, 0x0009c8cb, 0x0009c9cb, 0x0009c9cc, 0x0009cacc, 0x0009cacd, 0x0009cbcd, 0x0009cbce, 0x0009ccce, 0x0009cccf, 0x0009cdcf, 0x0009cdd0, 0x0009ced0, 0x0009ced1, 0x0009cfd1, 0x0009cfd2, 0x0009d0d2, 0x0009d0d3, 0x0009d1d3, 0x0009d1d4, 0x0009f3f0, 0x0009f3f8, 0x0009f4f1, 0x0009f4f9, 0x0009f5f2, 0x0009f5fa, 0x0009f6f3, 0x0009f6fb, 0x0009f7f4, 0x0009f7fc, 0x0009f8f5, 0x0009f8fd, 0x0009f9f6, 0x0009f9fe, 0x0009faf7, 0x0009faff, 0x0009fbf8, 0x0009fc00, 0x0009fcf9, 0x0009fd01, 0x0009fdfa, 0x0009fe02, 0x0009fefb, 0x0009ff03, 0x000a00fd, 0x000a0105, 0x000a01fe, 0x000a0206, 0x000b01fd, 0x000b0205, 0x000c0701, 0x000c0709, 0x000d0a03, 0x000d0a0b, 0x000d0b04, 0x000d0b0c, 0x000d0c05, 0x000d0c0d, 0x000e0f07, 0x000e0f0f, 0x000e1c14, 0x000e1c1c, 0x000e1d15, 0x000e1d1d, 0x000e1e16, 0x000e1e1e, 0x000e1f17, 0x000e1f1f, 0x000e2018, 0x000e2020, 0x000e2119, 0x000e2121, 0x000e221a, 0x000e2222, 0x000e231b, 0x000e2323, 0x000e241c, 0x000e2424, 0x000e251d, 0x000e2525, 0x000e271f, 0x000e2727, 0x000e2820, 0x000e2828, 0x000e2a22, 0x000e2a2a, 0x000e2b23, 0x000e2b2b, 0x000e2c24, 0x000e2c2c, 0x000e2d25, 0x000e2d2d, 0x000e2e26, 0x000e2e2e, 0x000e2f27, 0x000e2f2f, 0x000e3028, 0x000e3030, 0x000e3129, 0x000e3131, 0x000e322a, 0x000e3232, 0x000e332b, 0x000e3333, 0x000e342c, 0x000e3434, 0x000e352d, 0x000e3535, 0x000e362e, 0x000e3636, 0x000e372f, 0x000e3737, 0x000e3830, 0x000e3838, 0x000e3931, 0x000e3939, 0x000e3a32, 0x000e3a3a, 0x000e3b33, 0x000e3b3b, 0x000e3c34, 0x000e3c3c, 0x000e3d35, 0x000e3d3d, 0x000e3e36, 0x000e3e3e, 0x000e3f37, 0x000e3f3f, 0x000e4038, 0x000e4040, 0x000e4139, 0x000e4141, 0x000e423a, 0x000e4242, 0x000e433b, 0x000e4343, 0x000e443c, 0x000e4444, 0x000e453d, 0x000e4545, 0x000e463e, 0x000e4646, 0x000e473f, 0x000e4747, 0x000e4840, 0x000e4848, 0x000e4941, 0x000e4949, 0x000e4a42, 0x000e4a4a, 0x000e4b43, 0x000e4b4b, 0x000e4c44, 0x000e4c4c, 0x000e4d45, 0x000e4d4d, 0x000e4e46, 0x000e4e4e, 0x000e4f47, 0x000e4f4f, 0x000e5048, 0x000e5050, 0x000e5149, 0x000e5151, 0x000e524a, 0x000e5252, 0x000e534b, 0x000e5353, 0x000e544c, 0x000e5454, 0x000e554d, 0x000e5555, 0x000e564e, 0x000e5656, 0x000e574f, 0x000e5757, 0x000e5850, 0x000e5858, 0x000e5951, 0x000e5959, 0x000e5a52, 0x000e5a5a, 0x000e5b53, 0x000e5b5b, 0x000e5c54, 0x000e5c5c, 0x000e5d55, 0x000e5d5d, 0x000e5e56, 0x000e5e5e, 0x000e5f57, 0x000e5f5f, 0x000e6058, 0x000e6060, 0x000e6159, 0x000e6161, 0x000e625a, 0x000e6262, 0x000e635b, 0x000e6363, 0x000e645c, 0x000e6464, 0x000e655d, 0x000e6565, 0x000e665e, 0x000e6666, 0x000e675f, 0x000e6767, 0x000e6860, 0x000e6868, 0x000e6961, 0x000e6969, 0x000e6a62, 0x000e6a6a, 0x000e6b63, 0x000e6b6b, 0x000e6c64, 0x000e6c6c, 0x000e6d65, 0x000e6d6d, 0x000e6e66, 0x000e6e6e, 0x000e6f67, 0x000e6f6f, 0x000e7068, 0x000e7070, 0x000e7169, 0x000e7171, 0x000e726a, 0x000e7272, 0x000e736b, 0x000e7373, 0x000e746c, 0x000e7474, 0x000e756d, 0x000e7575, 0x000e766e, 0x000e7676, 0x000e776f, 0x000e7777, 0x000e7870, 0x000e7878, 0x000e7971, 0x000e7979, 0x000e7a72, 0x000e7a7a, 0x000e7b73, 0x000e7b7b, 0x000e7c74, 0x000e7c7c, 0x000e7d75, 0x000e7d7d, 0x000e7e76, 0x000e7e7e, 0x000e7f77, 0x000e7f7f, 0x000e8078, 0x000e8080, 0x000e8179, 0x000e8181, 0x000e827a, 0x000e8282, 0x000e837b, 0x000e8383, 0x000e847c, 0x000e8484, 0x000e857d, 0x000e8585, 0x000e867e, 0x000e8686, 0x000e877f, 0x000e8787, 0x000e8880, 0x000e8888, 0x000e8981, 0x000e8989, 0x000e8a82, 0x000e8a8a, 0x000e8b83, 0x000e8b8b, 0x000e8c84, 0x000e8c8c, 0x000e8d85, 0x000e8d8d, 0x000e8e86, 0x000e8e8e, 0x000e8f87, 0x000e8f8f, 0x000e9088, 0x000e9090, 0x000e9189, 0x000e9191, 0x000e928a, 0x000e9292, 0x000e938b, 0x000e9393, 0x000e948c, 0x000e9494, 0x000e958d, 0x000e9595, 0x000e968e, 0x000e9696, 0x000e978f, 0x000e9797, 0x000e9890, 0x000e9898, 0x000e9991, 0x000e9999, 0x000e9a92, 0x000e9a9a, 0x000e9b93, 0x000e9b9b, 0x000e9c95, 0x000e9d96, 0x000e9e97, 0x000e9f98, 0x000ea099, 0x000ea19a, 0x000ea29b, 0x000ea39c, 0x000ea49d, 0x000ea59e, 0x000ea69f, 0x000ea7a0, 0x000ea8a1, 0x000ea9a2, 0x000eaaa3, 0x000eaba4, 0x000eaca5, 0x000eada6, 0x000eaea7, 0x000eafa8, 0x000eb0a9, 0x000eb1aa, 0x000eb2ab, 0x000eb3ac, 0x000eb4ad, 0x000eb5ae, 0x000eb6af, 0x000eb7b0, 0x000eb8b1, 0x000eb9b2, 0x000ebab3, 0x000ebbb4, 0x000ebcb5, 0x000ebdb6, 0x000ebeb7, 0x000ebfb8, 0x000ec0b9, 0x000ec1ba, 0x000ec2bb, 0x000ec3bc, 0x000ec4bd, 0x000ec5be, 0x000ec6bf, 0x000ec7c0, 0x000ec8c1, 0x000ec9c2, 0x000ecac3, 0x000ecbc4, 0x000eccc5, 0x000ecdc6, 0x000ecec7, 0x000ecfc8, 0x000ed0c9, 0x000ed1ca, 0x000ed2cb, 0x000ed3cc, 0x000ed4cd, 0x000ed5ce, 0x000ed6cf, 0x000ed7d0, 0x000ed8d1, 0x000ed9d2, 0x000edad3, 0x000edbd4, 0x000f2b2a, 0x00102a29, 0x00c98f8d], + values: [0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000001, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000007, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000005, 0x00000001, 0x00000001, 0x00000000], + maximum: 0x00c98f8d +}; + +pub global CAPTURE_1_MAX_LENGTH: u32 = 64; +pub global NUM_CAPTURE_GROUPS: u32 = 1; + +/** + * Constrains a start state to be valid + * @dev start states are hardcoded in this function - "(start_state - {state})" for each start + * example: `(start_state - 0) * (start_state - 1) * (start_state - 2)` means 0, 1, or 2 + * are valid first states + * + * @param start_state - The start state of the NFA + */ +fn check_start_state(start_state: Field) { + let valid_start_state = (start_state - 0) * (start_state - 1) * (start_state - 3); + assert(valid_start_state == 0, "Invalid start state"); +} + +/** + * Constrains the recognition of accept_state being reached. If an aceppt state is reached, + * ensures asserted traversal path is valid + * @dev accept states are hardcoded in this function - "(next_state - {state})" for each accept + * example: `(next_state - 19) * (next_state - 20) * (next_state - 21)` means 19, 20, or 21 + * are valid accept states + * + * @param next_state - The asserted next state of the NFA + * @param haystack_index - The index being operated on in the haystack + * @param asserted_match_length - The asserted traversal path length + * @return - 0 if accept_state is reached, nonzero otherwise + */ +fn check_accept_state( + next_state: Field, + haystack_index: Field, + asserted_match_length: Field +) -> Field { + // check if the next state is an accept state + let accept_state_reached = (next_state - 16); + let accept_state_reached_bool = (accept_state_reached == 0) as Field; + + // check if the haystack index is the asserted match length + // should equal 1 since haystack_index should be 1 less than asserted_match)length + let asserted_path_traversed = (asserted_match_length - haystack_index == 1) as Field; + + (1 - (accept_state_reached_bool * asserted_path_traversed)) +} + +/** + * ToAllRegex matching function + * Regex: (?:\r\n|^)to:([^\r\n]+)\r\n + * @param in_haystack - The input haystack to search from + * @param match_start - The start index in the haystack for the subarray to match from + * @param match_length - The length of the subarray to extract from haystack + * @param current_states - The current states of the NFA at each index in the match subarray + * @param next_states - The next states of the NFA at each index in the match subarray + * @param capture_group__ids - The ids of the capture groups in the match subarray + * @param capture_group__starts - The start positions of the capture groups in the match subarray + * @param capture_group_start_indices - The start indices of the capture groups in the match subarray + * @return - tuple of substring captures as dictated by the regular expression + */ +pub fn regex_match( + in_haystack: [u8; MAX_HAYSTACK_LEN], + match_start: u32, + match_length: u32, + current_states: [Field; MAX_MATCH_LEN], + next_states: [Field; MAX_MATCH_LEN], + capture_group_1_id: [Field; MAX_MATCH_LEN], + capture_group_1_start: [Field; MAX_MATCH_LEN], + capture_group_start_indices: [Field; NUM_CAPTURE_GROUPS], +) -> (BoundedVec) { + // resize haystack + let haystack: [u8; MAX_MATCH_LEN] = select_subarray::(in_haystack, match_start, match_length); + + check_start_state(current_states[0]); + for i in 0..MAX_MATCH_LEN-1 { + // match length - 1 since current states should be 1 less than next states + let in_range = (i < match_length - 1) as Field; + let matching_states = current_states[i + 1] - next_states[i]; + assert(in_range * matching_states == 0, "Invalid Transition Input"); + } + let mut reached_end_state = 1; + for i in 0..MAX_MATCH_LEN { + let active_capture_groups_at_index = [capture_group_1_id[i]]; + let active_capture_groups_starts_at_index = [capture_group_1_start[i]]; + check_transition_with_captures( + TRANSITION_TABLE, + haystack[i] as Field, + current_states[i], + next_states[i], + active_capture_groups_at_index, + active_capture_groups_starts_at_index, + reached_end_state + ); + reached_end_state = reached_end_state * check_accept_state(next_states[i], i as Field, match_length as Field); + } + assert(reached_end_state == 0, "Did not reach a valid end state"); + + // Capture Group 1 + let capture_1 = capture_substring::( + haystack, + capture_group_1_id, + capture_group_1_start, + capture_group_start_indices[0] - (match_start as Field), + ); + +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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_5() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [115, 111, 109, 101, 32, 116, 101, 120, 116, 13, 10, 116, 111, 58, 112, 101, 114, 115, 111, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 109, 111, 114, 101, 32, 116, 101, 120, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_2() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [13, 10, 116, 111, 58, 117, 115, 101, 114, 64, 104, 111, 115, 116, 46, 111, 114, 103, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_3() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 111, 58, 84, 101, 115, 116, 32, 85, 115, 101, 114, 32, 60, 116, 101, 115, 116, 46, 117, 115, 101, 114, 64, 101, 120, 97, 109, 112, 108, 101, 46, 110, 101, 116, 62, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let match_start: u32 = 0; + let match_length: u32 = 38; + let current_states: [Field; MAX_MATCH_LEN] = [3, 4, 5, 6, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let next_states: [Field; MAX_MATCH_LEN] = [4, 5, 6, 14, 14, 14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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_0() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 111, 58, 114, 101, 99, 105, 112, 105, 101, 110, 116, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_1() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [102, 114, 111, 109, 58, 32, 115, 101, 110, 100, 101, 114, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 116, 111, 58, 97, 110, 111, 116, 104, 101, 114, 95, 114, 101, 99, 105, 112, 105, 101, 110, 116, 64, 100, 111, 109, 97, 105, 110, 46, 99, 111, 13, 10, 115, 117, 98, 106, 101, 99, 116, 58, 32, 77, 101, 101, 116, 105, 110, 103, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_6() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 111, 58, 117, 115, 101, 114, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 110, 111, 32, 110, 101, 119, 108, 105, 110, 101, 32, 97, 102, 116, 101, 114, 32, 116, 104, 105, 115, 32, 112, 97, 114, 116, 32, 111, 102, 32, 116, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + +#[test] +fn test_to_all_pass_7() { + let in_haystack: [u8; MAX_HAYSTACK_LEN] = [116, 111, 58, 32, 108, 105, 110, 101, 49, 13, 10, 108, 105, 110, 101, 50, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + let capture_1 = regex_match::(in_haystack, match_start, match_length, current_states, next_states, capture_group_1_id, capture_group_1_start, capture_group_start_indices_val); +} + diff --git a/noir/src/templates/graphs/body_hash_graph.json b/noir/src/templates/graphs/body_hash_graph.json new file mode 100644 index 00000000..b9456dbc --- /dev/null +++ b/noir/src/templates/graphs/body_hash_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+bh=([a-zA-Z0-9+/=]+);","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"100":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"100":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"107":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"105":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"109":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"45":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"115":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"105":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"103":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"110":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":12,"byte_transitions":{"97":[13]},"epsilon_transitions":[],"capture_groups":{"13":[]}},{"state_id":13,"byte_transitions":{"116":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{"117":[15]},"epsilon_transitions":[],"capture_groups":{"15":[]}},{"state_id":15,"byte_transitions":{"114":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{"101":[17]},"epsilon_transitions":[],"capture_groups":{"17":[]}},{"state_id":17,"byte_transitions":{"58":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{"97":[19],"98":[19],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[]}},{"state_id":19,"byte_transitions":{"61":[27],"97":[19],"98":[19],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[],"27":[]}},{"state_id":20,"byte_transitions":{"128":[28],"129":[28],"130":[28],"131":[28],"132":[28],"133":[28],"134":[28],"135":[28],"136":[28],"137":[28],"138":[28],"139":[28],"140":[28],"141":[28],"142":[28],"143":[28],"144":[28],"145":[28],"146":[28],"147":[28],"148":[28],"149":[28],"150":[28],"151":[28],"152":[28],"153":[28],"154":[28],"155":[28],"156":[28],"157":[28],"158":[28],"159":[28],"160":[28],"161":[28],"162":[28],"163":[28],"164":[28],"165":[28],"166":[28],"167":[28],"168":[28],"169":[28],"170":[28],"171":[28],"172":[28],"173":[28],"174":[28],"175":[28],"176":[28],"177":[28],"178":[28],"179":[28],"180":[28],"181":[28],"182":[28],"183":[28],"184":[28],"185":[28],"186":[28],"187":[28],"188":[28],"189":[28],"190":[28],"191":[28]},"epsilon_transitions":[],"capture_groups":{"28":[]}},{"state_id":21,"byte_transitions":{"160":[20],"161":[20],"162":[20],"163":[20],"164":[20],"165":[20],"166":[20],"167":[20],"168":[20],"169":[20],"170":[20],"171":[20],"172":[20],"173":[20],"174":[20],"175":[20],"176":[20],"177":[20],"178":[20],"179":[20],"180":[20],"181":[20],"182":[20],"183":[20],"184":[20],"185":[20],"186":[20],"187":[20],"188":[20],"189":[20],"190":[20],"191":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":22,"byte_transitions":{"128":[20],"129":[20],"130":[20],"131":[20],"132":[20],"133":[20],"134":[20],"135":[20],"136":[20],"137":[20],"138":[20],"139":[20],"140":[20],"141":[20],"142":[20],"143":[20],"144":[20],"145":[20],"146":[20],"147":[20],"148":[20],"149":[20],"150":[20],"151":[20],"152":[20],"153":[20],"154":[20],"155":[20],"156":[20],"157":[20],"158":[20],"159":[20],"160":[20],"161":[20],"162":[20],"163":[20],"164":[20],"165":[20],"166":[20],"167":[20],"168":[20],"169":[20],"170":[20],"171":[20],"172":[20],"173":[20],"174":[20],"175":[20],"176":[20],"177":[20],"178":[20],"179":[20],"180":[20],"181":[20],"182":[20],"183":[20],"184":[20],"185":[20],"186":[20],"187":[20],"188":[20],"189":[20],"190":[20],"191":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":23,"byte_transitions":{"128":[20],"129":[20],"130":[20],"131":[20],"132":[20],"133":[20],"134":[20],"135":[20],"136":[20],"137":[20],"138":[20],"139":[20],"140":[20],"141":[20],"142":[20],"143":[20],"144":[20],"145":[20],"146":[20],"147":[20],"148":[20],"149":[20],"150":[20],"151":[20],"152":[20],"153":[20],"154":[20],"155":[20],"156":[20],"157":[20],"158":[20],"159":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":24,"byte_transitions":{"144":[22],"145":[22],"146":[22],"147":[22],"148":[22],"149":[22],"150":[22],"151":[22],"152":[22],"153":[22],"154":[22],"155":[22],"156":[22],"157":[22],"158":[22],"159":[22],"160":[22],"161":[22],"162":[22],"163":[22],"164":[22],"165":[22],"166":[22],"167":[22],"168":[22],"169":[22],"170":[22],"171":[22],"172":[22],"173":[22],"174":[22],"175":[22],"176":[22],"177":[22],"178":[22],"179":[22],"180":[22],"181":[22],"182":[22],"183":[22],"184":[22],"185":[22],"186":[22],"187":[22],"188":[22],"189":[22],"190":[22],"191":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":25,"byte_transitions":{"128":[22],"129":[22],"130":[22],"131":[22],"132":[22],"133":[22],"134":[22],"135":[22],"136":[22],"137":[22],"138":[22],"139":[22],"140":[22],"141":[22],"142":[22],"143":[22],"144":[22],"145":[22],"146":[22],"147":[22],"148":[22],"149":[22],"150":[22],"151":[22],"152":[22],"153":[22],"154":[22],"155":[22],"156":[22],"157":[22],"158":[22],"159":[22],"160":[22],"161":[22],"162":[22],"163":[22],"164":[22],"165":[22],"166":[22],"167":[22],"168":[22],"169":[22],"170":[22],"171":[22],"172":[22],"173":[22],"174":[22],"175":[22],"176":[22],"177":[22],"178":[22],"179":[22],"180":[22],"181":[22],"182":[22],"183":[22],"184":[22],"185":[22],"186":[22],"187":[22],"188":[22],"189":[22],"190":[22],"191":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":26,"byte_transitions":{"128":[22],"129":[22],"130":[22],"131":[22],"132":[22],"133":[22],"134":[22],"135":[22],"136":[22],"137":[22],"138":[22],"139":[22],"140":[22],"141":[22],"142":[22],"143":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":27,"byte_transitions":{"0":[28],"1":[28],"2":[28],"3":[28],"4":[28],"5":[28],"6":[28],"7":[28],"8":[28],"9":[28],"10":[28],"11":[28],"12":[28],"13":[28],"14":[28],"15":[28],"16":[28],"17":[28],"18":[28],"19":[28],"20":[28],"21":[28],"22":[28],"23":[28],"24":[28],"25":[28],"26":[28],"27":[28],"28":[28],"29":[28],"30":[28],"31":[28],"32":[28],"33":[28],"34":[28],"35":[28],"36":[28],"37":[28],"38":[28],"39":[28],"40":[28],"41":[28],"42":[28],"43":[28],"44":[28],"45":[28],"46":[28],"47":[28],"48":[28],"49":[28],"50":[28],"51":[28],"52":[28],"53":[28],"54":[28],"55":[28],"56":[28],"57":[28],"58":[28],"60":[28],"61":[28],"62":[28],"63":[28],"64":[28],"65":[28],"66":[28],"67":[28],"68":[28],"69":[28],"70":[28],"71":[28],"72":[28],"73":[28],"74":[28],"75":[28],"76":[28],"77":[28],"78":[28],"79":[28],"80":[28],"81":[28],"82":[28],"83":[28],"84":[28],"85":[28],"86":[28],"87":[28],"88":[28],"89":[28],"90":[28],"91":[28],"92":[28],"93":[28],"94":[28],"95":[28],"96":[28],"97":[28],"98":[28],"99":[28],"100":[28],"101":[28],"102":[28],"103":[28],"104":[28],"105":[28],"106":[28],"107":[28],"108":[28],"109":[28],"110":[28],"111":[28],"112":[28],"113":[28],"114":[28],"115":[28],"116":[28],"117":[28],"118":[28],"119":[28],"120":[28],"121":[28],"122":[28],"123":[28],"124":[28],"125":[28],"126":[28],"127":[28],"194":[20],"195":[20],"196":[20],"197":[20],"198":[20],"199":[20],"200":[20],"201":[20],"202":[20],"203":[20],"204":[20],"205":[20],"206":[20],"207":[20],"208":[20],"209":[20],"210":[20],"211":[20],"212":[20],"213":[20],"214":[20],"215":[20],"216":[20],"217":[20],"218":[20],"219":[20],"220":[20],"221":[20],"222":[20],"223":[20],"224":[21],"225":[22],"226":[22],"227":[22],"228":[22],"229":[22],"230":[22],"231":[22],"232":[22],"233":[22],"234":[22],"235":[22],"236":[22],"237":[23],"238":[22],"239":[22],"240":[24],"241":[25],"242":[25],"243":[25],"244":[26]},"epsilon_transitions":[],"capture_groups":{"20":[],"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"28":[]}},{"state_id":28,"byte_transitions":{"0":[28],"1":[28],"2":[28],"3":[28],"4":[28],"5":[28],"6":[28],"7":[28],"8":[28],"9":[28],"10":[28],"11":[28],"12":[28],"13":[28],"14":[28],"15":[28],"16":[28],"17":[28],"18":[28],"19":[28],"20":[28],"21":[28],"22":[28],"23":[28],"24":[28],"25":[28],"26":[28],"27":[28],"28":[28],"29":[28],"30":[28],"31":[28],"32":[28],"33":[28],"34":[28],"35":[28],"36":[28],"37":[28],"38":[28],"39":[28],"40":[28],"41":[28],"42":[28],"43":[28],"44":[28],"45":[28],"46":[28],"47":[28],"48":[28],"49":[28],"50":[28],"51":[28],"52":[28],"53":[28],"54":[28],"55":[28],"56":[28],"57":[28],"58":[28],"59":[29],"60":[28],"61":[28],"62":[28],"63":[28],"64":[28],"65":[28],"66":[28],"67":[28],"68":[28],"69":[28],"70":[28],"71":[28],"72":[28],"73":[28],"74":[28],"75":[28],"76":[28],"77":[28],"78":[28],"79":[28],"80":[28],"81":[28],"82":[28],"83":[28],"84":[28],"85":[28],"86":[28],"87":[28],"88":[28],"89":[28],"90":[28],"91":[28],"92":[28],"93":[28],"94":[28],"95":[28],"96":[28],"97":[28],"98":[28],"99":[28],"100":[28],"101":[28],"102":[28],"103":[28],"104":[28],"105":[28],"106":[28],"107":[28],"108":[28],"109":[28],"110":[28],"111":[28],"112":[28],"113":[28],"114":[28],"115":[28],"116":[28],"117":[28],"118":[28],"119":[28],"120":[28],"121":[28],"122":[28],"123":[28],"124":[28],"125":[28],"126":[28],"127":[28],"194":[20],"195":[20],"196":[20],"197":[20],"198":[20],"199":[20],"200":[20],"201":[20],"202":[20],"203":[20],"204":[20],"205":[20],"206":[20],"207":[20],"208":[20],"209":[20],"210":[20],"211":[20],"212":[20],"213":[20],"214":[20],"215":[20],"216":[20],"217":[20],"218":[20],"219":[20],"220":[20],"221":[20],"222":[20],"223":[20],"224":[21],"225":[22],"226":[22],"227":[22],"228":[22],"229":[22],"230":[22],"231":[22],"232":[22],"233":[22],"234":[22],"235":[22],"236":[22],"237":[23],"238":[22],"239":[22],"240":[24],"241":[25],"242":[25],"243":[25],"244":[26]},"epsilon_transitions":[],"capture_groups":{"20":[],"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"28":[],"29":[]}},{"state_id":29,"byte_transitions":{"32":[30]},"epsilon_transitions":[],"capture_groups":{"30":[]}},{"state_id":30,"byte_transitions":{"97":[19],"98":[19,31],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[],"31":[]}},{"state_id":31,"byte_transitions":{"104":[32]},"epsilon_transitions":[],"capture_groups":{"32":[]}},{"state_id":32,"byte_transitions":{"61":[33]},"epsilon_transitions":[],"capture_groups":{"33":[]}},{"state_id":33,"byte_transitions":{"43":[34],"47":[34],"48":[34],"49":[34],"50":[34],"51":[34],"52":[34],"53":[34],"54":[34],"55":[34],"56":[34],"57":[34],"61":[34],"65":[34],"66":[34],"67":[34],"68":[34],"69":[34],"70":[34],"71":[34],"72":[34],"73":[34],"74":[34],"75":[34],"76":[34],"77":[34],"78":[34],"79":[34],"80":[34],"81":[34],"82":[34],"83":[34],"84":[34],"85":[34],"86":[34],"87":[34],"88":[34],"89":[34],"90":[34],"97":[34],"98":[34],"99":[34],"100":[34],"101":[34],"102":[34],"103":[34],"104":[34],"105":[34],"106":[34],"107":[34],"108":[34],"109":[34],"110":[34],"111":[34],"112":[34],"113":[34],"114":[34],"115":[34],"116":[34],"117":[34],"118":[34],"119":[34],"120":[34],"121":[34],"122":[34]},"epsilon_transitions":[],"capture_groups":{"34":[[1,false],[1,true]]}},{"state_id":34,"byte_transitions":{"43":[34],"47":[34],"48":[34],"49":[34],"50":[34],"51":[34],"52":[34],"53":[34],"54":[34],"55":[34],"56":[34],"57":[34],"59":[35],"61":[34],"65":[34],"66":[34],"67":[34],"68":[34],"69":[34],"70":[34],"71":[34],"72":[34],"73":[34],"74":[34],"75":[34],"76":[34],"77":[34],"78":[34],"79":[34],"80":[34],"81":[34],"82":[34],"83":[34],"84":[34],"85":[34],"86":[34],"87":[34],"88":[34],"89":[34],"90":[34],"97":[34],"98":[34],"99":[34],"100":[34],"101":[34],"102":[34],"103":[34],"104":[34],"105":[34],"106":[34],"107":[34],"108":[34],"109":[34],"110":[34],"111":[34],"112":[34],"113":[34],"114":[34],"115":[34],"116":[34],"117":[34],"118":[34],"119":[34],"120":[34],"121":[34],"122":[34]},"epsilon_transitions":[],"capture_groups":{"34":[[1,false]],"35":[]}},{"state_id":35,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[35],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/email_addr_graph.json b/noir/src/templates/graphs/email_addr_graph.json new file mode 100644 index 00000000..982618aa --- /dev/null +++ b/noir/src/templates/graphs/email_addr_graph.json @@ -0,0 +1 @@ +{"regex":"([A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+)","nodes":[{"state_id":0,"byte_transitions":{"33":[1],"35":[1],"36":[1],"37":[1],"38":[1],"39":[1],"42":[1],"43":[1],"45":[1],"46":[1],"47":[1],"48":[1],"49":[1],"50":[1],"51":[1],"52":[1],"53":[1],"54":[1],"55":[1],"56":[1],"57":[1],"61":[1],"63":[1],"64":[1],"65":[1],"66":[1],"67":[1],"68":[1],"69":[1],"70":[1],"71":[1],"72":[1],"73":[1],"74":[1],"75":[1],"76":[1],"77":[1],"78":[1],"79":[1],"80":[1],"81":[1],"82":[1],"83":[1],"84":[1],"85":[1],"86":[1],"87":[1],"88":[1],"89":[1],"90":[1],"94":[1],"95":[1],"96":[1],"97":[1],"98":[1],"99":[1],"100":[1],"101":[1],"102":[1],"103":[1],"104":[1],"105":[1],"106":[1],"107":[1],"108":[1],"109":[1],"110":[1],"111":[1],"112":[1],"113":[1],"114":[1],"115":[1],"116":[1],"117":[1],"118":[1],"119":[1],"120":[1],"121":[1],"122":[1],"123":[1],"124":[1],"125":[1],"126":[1]},"epsilon_transitions":[],"capture_groups":{"1":[[1,true]]}},{"state_id":1,"byte_transitions":{"33":[1],"35":[1],"36":[1],"37":[1],"38":[1],"39":[1],"42":[1],"43":[1],"45":[1],"46":[1],"47":[1],"48":[1],"49":[1],"50":[1],"51":[1],"52":[1],"53":[1],"54":[1],"55":[1],"56":[1],"57":[1],"61":[1],"63":[1],"64":[1,2],"65":[1],"66":[1],"67":[1],"68":[1],"69":[1],"70":[1],"71":[1],"72":[1],"73":[1],"74":[1],"75":[1],"76":[1],"77":[1],"78":[1],"79":[1],"80":[1],"81":[1],"82":[1],"83":[1],"84":[1],"85":[1],"86":[1],"87":[1],"88":[1],"89":[1],"90":[1],"94":[1],"95":[1],"96":[1],"97":[1],"98":[1],"99":[1],"100":[1],"101":[1],"102":[1],"103":[1],"104":[1],"105":[1],"106":[1],"107":[1],"108":[1],"109":[1],"110":[1],"111":[1],"112":[1],"113":[1],"114":[1],"115":[1],"116":[1],"117":[1],"118":[1],"119":[1],"120":[1],"121":[1],"122":[1],"123":[1],"124":[1],"125":[1],"126":[1]},"epsilon_transitions":[],"capture_groups":{"1":[],"2":[]}},{"state_id":2,"byte_transitions":{"45":[3],"46":[3],"48":[3],"49":[3],"50":[3],"51":[3],"52":[3],"53":[3],"54":[3],"55":[3],"56":[3],"57":[3],"65":[3],"66":[3],"67":[3],"68":[3],"69":[3],"70":[3],"71":[3],"72":[3],"73":[3],"74":[3],"75":[3],"76":[3],"77":[3],"78":[3],"79":[3],"80":[3],"81":[3],"82":[3],"83":[3],"84":[3],"85":[3],"86":[3],"87":[3],"88":[3],"89":[3],"90":[3],"97":[3],"98":[3],"99":[3],"100":[3],"101":[3],"102":[3],"103":[3],"104":[3],"105":[3],"106":[3],"107":[3],"108":[3],"109":[3],"110":[3],"111":[3],"112":[3],"113":[3],"114":[3],"115":[3],"116":[3],"117":[3],"118":[3],"119":[3],"120":[3],"121":[3],"122":[3]},"epsilon_transitions":[],"capture_groups":{"3":[[1,false]]}},{"state_id":3,"byte_transitions":{"45":[3],"46":[3],"48":[3],"49":[3],"50":[3],"51":[3],"52":[3],"53":[3],"54":[3],"55":[3],"56":[3],"57":[3],"65":[3],"66":[3],"67":[3],"68":[3],"69":[3],"70":[3],"71":[3],"72":[3],"73":[3],"74":[3],"75":[3],"76":[3],"77":[3],"78":[3],"79":[3],"80":[3],"81":[3],"82":[3],"83":[3],"84":[3],"85":[3],"86":[3],"87":[3],"88":[3],"89":[3],"90":[3],"97":[3],"98":[3],"99":[3],"100":[3],"101":[3],"102":[3],"103":[3],"104":[3],"105":[3],"106":[3],"107":[3],"108":[3],"109":[3],"110":[3],"111":[3],"112":[3],"113":[3],"114":[3],"115":[3],"116":[3],"117":[3],"118":[3],"119":[3],"120":[3],"121":[3],"122":[3]},"epsilon_transitions":[],"capture_groups":{"3":[[1,false]]}}],"start_states":[0],"accept_states":[3],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/email_domain_graph.json b/noir/src/templates/graphs/email_domain_graph.json new file mode 100644 index 00000000..bf9a1dd6 --- /dev/null +++ b/noir/src/templates/graphs/email_domain_graph.json @@ -0,0 +1 @@ +{"regex":"[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./]+@([A-Za-z0-9.\\-@]+)","nodes":[{"state_id":0,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":1,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"33":[2],"35":[2],"36":[2],"37":[2],"38":[2],"39":[2],"42":[2],"43":[2],"45":[2],"46":[2],"47":[2],"48":[2],"49":[2],"50":[2],"51":[2],"52":[2],"53":[2],"54":[2],"55":[2],"56":[2],"57":[2],"61":[2],"63":[2],"64":[3],"65":[2],"66":[2],"67":[2],"68":[2],"69":[2],"70":[2],"71":[2],"72":[2],"73":[2],"74":[2],"75":[2],"76":[2],"77":[2],"78":[2],"79":[2],"80":[2],"81":[2],"82":[2],"83":[2],"84":[2],"85":[2],"86":[2],"87":[2],"88":[2],"89":[2],"90":[2],"94":[2],"95":[2],"96":[2],"97":[2],"98":[2],"99":[2],"100":[2],"101":[2],"102":[2],"103":[2],"104":[2],"105":[2],"106":[2],"107":[2],"108":[2],"109":[2],"110":[2],"111":[2],"112":[2],"113":[2],"114":[2],"115":[2],"116":[2],"117":[2],"118":[2],"119":[2],"120":[2],"121":[2],"122":[2],"123":[2],"124":[2],"125":[2],"126":[2]},"epsilon_transitions":[],"capture_groups":{"2":[],"3":[]}},{"state_id":3,"byte_transitions":{"45":[4],"46":[4],"48":[4],"49":[4],"50":[4],"51":[4],"52":[4],"53":[4],"54":[4],"55":[4],"56":[4],"57":[4],"64":[4],"65":[4],"66":[4],"67":[4],"68":[4],"69":[4],"70":[4],"71":[4],"72":[4],"73":[4],"74":[4],"75":[4],"76":[4],"77":[4],"78":[4],"79":[4],"80":[4],"81":[4],"82":[4],"83":[4],"84":[4],"85":[4],"86":[4],"87":[4],"88":[4],"89":[4],"90":[4],"97":[4],"98":[4],"99":[4],"100":[4],"101":[4],"102":[4],"103":[4],"104":[4],"105":[4],"106":[4],"107":[4],"108":[4],"109":[4],"110":[4],"111":[4],"112":[4],"113":[4],"114":[4],"115":[4],"116":[4],"117":[4],"118":[4],"119":[4],"120":[4],"121":[4],"122":[4]},"epsilon_transitions":[],"capture_groups":{"4":[[1,false],[1,true]]}},{"state_id":4,"byte_transitions":{"45":[4],"46":[4],"48":[4],"49":[4],"50":[4],"51":[4],"52":[4],"53":[4],"54":[4],"55":[4],"56":[4],"57":[4],"64":[4],"65":[4],"66":[4],"67":[4],"68":[4],"69":[4],"70":[4],"71":[4],"72":[4],"73":[4],"74":[4],"75":[4],"76":[4],"77":[4],"78":[4],"79":[4],"80":[4],"81":[4],"82":[4],"83":[4],"84":[4],"85":[4],"86":[4],"87":[4],"88":[4],"89":[4],"90":[4],"97":[4],"98":[4],"99":[4],"100":[4],"101":[4],"102":[4],"103":[4],"104":[4],"105":[4],"106":[4],"107":[4],"108":[4],"109":[4],"110":[4],"111":[4],"112":[4],"113":[4],"114":[4],"115":[4],"116":[4],"117":[4],"118":[4],"119":[4],"120":[4],"121":[4],"122":[4]},"epsilon_transitions":[],"capture_groups":{"4":[[1,false]]}}],"start_states":[0,1],"accept_states":[4],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/from_all_graph.json b/noir/src/templates/graphs/from_all_graph.json new file mode 100644 index 00000000..9940cea5 --- /dev/null +++ b/noir/src/templates/graphs/from_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)from:([^\r\n]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"102":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"102":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"114":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"111":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"109":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"58":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"0":[16],"1":[16],"2":[16],"3":[16],"4":[16],"5":[16],"6":[16],"7":[16],"8":[16],"9":[16],"11":[16],"12":[16],"14":[16],"15":[16],"16":[16],"17":[16],"18":[16],"19":[16],"20":[16],"21":[16],"22":[16],"23":[16],"24":[16],"25":[16],"26":[16],"27":[16],"28":[16],"29":[16],"30":[16],"31":[16],"32":[16],"33":[16],"34":[16],"35":[16],"36":[16],"37":[16],"38":[16],"39":[16],"40":[16],"41":[16],"42":[16],"43":[16],"44":[16],"45":[16],"46":[16],"47":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"58":[16],"59":[16],"60":[16],"61":[16],"62":[16],"63":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"91":[16],"92":[16],"93":[16],"94":[16],"95":[16],"96":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16],"123":[16],"124":[16],"125":[16],"126":[16],"127":[16],"194":[9],"195":[9],"196":[9],"197":[9],"198":[9],"199":[9],"200":[9],"201":[9],"202":[9],"203":[9],"204":[9],"205":[9],"206":[9],"207":[9],"208":[9],"209":[9],"210":[9],"211":[9],"212":[9],"213":[9],"214":[9],"215":[9],"216":[9],"217":[9],"218":[9],"219":[9],"220":[9],"221":[9],"222":[9],"223":[9],"224":[10],"225":[11],"226":[11],"227":[11],"228":[11],"229":[11],"230":[11],"231":[11],"232":[11],"233":[11],"234":[11],"235":[11],"236":[11],"237":[12],"238":[11],"239":[11],"240":[13],"241":[14],"242":[14],"243":[14],"244":[15]},"epsilon_transitions":[],"capture_groups":{"9":[[1,true]],"10":[[1,true]],"11":[[1,true]],"12":[[1,true]],"13":[[1,true]],"14":[[1,true]],"15":[[1,true]],"16":[[1,false],[1,true]]}},{"state_id":9,"byte_transitions":{"128":[16],"129":[16],"130":[16],"131":[16],"132":[16],"133":[16],"134":[16],"135":[16],"136":[16],"137":[16],"138":[16],"139":[16],"140":[16],"141":[16],"142":[16],"143":[16],"144":[16],"145":[16],"146":[16],"147":[16],"148":[16],"149":[16],"150":[16],"151":[16],"152":[16],"153":[16],"154":[16],"155":[16],"156":[16],"157":[16],"158":[16],"159":[16],"160":[16],"161":[16],"162":[16],"163":[16],"164":[16],"165":[16],"166":[16],"167":[16],"168":[16],"169":[16],"170":[16],"171":[16],"172":[16],"173":[16],"174":[16],"175":[16],"176":[16],"177":[16],"178":[16],"179":[16],"180":[16],"181":[16],"182":[16],"183":[16],"184":[16],"185":[16],"186":[16],"187":[16],"188":[16],"189":[16],"190":[16],"191":[16]},"epsilon_transitions":[],"capture_groups":{"16":[[1,false]]}},{"state_id":10,"byte_transitions":{"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":11,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":12,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":13,"byte_transitions":{"144":[11],"145":[11],"146":[11],"147":[11],"148":[11],"149":[11],"150":[11],"151":[11],"152":[11],"153":[11],"154":[11],"155":[11],"156":[11],"157":[11],"158":[11],"159":[11],"160":[11],"161":[11],"162":[11],"163":[11],"164":[11],"165":[11],"166":[11],"167":[11],"168":[11],"169":[11],"170":[11],"171":[11],"172":[11],"173":[11],"174":[11],"175":[11],"176":[11],"177":[11],"178":[11],"179":[11],"180":[11],"181":[11],"182":[11],"183":[11],"184":[11],"185":[11],"186":[11],"187":[11],"188":[11],"189":[11],"190":[11],"191":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":14,"byte_transitions":{"128":[11],"129":[11],"130":[11],"131":[11],"132":[11],"133":[11],"134":[11],"135":[11],"136":[11],"137":[11],"138":[11],"139":[11],"140":[11],"141":[11],"142":[11],"143":[11],"144":[11],"145":[11],"146":[11],"147":[11],"148":[11],"149":[11],"150":[11],"151":[11],"152":[11],"153":[11],"154":[11],"155":[11],"156":[11],"157":[11],"158":[11],"159":[11],"160":[11],"161":[11],"162":[11],"163":[11],"164":[11],"165":[11],"166":[11],"167":[11],"168":[11],"169":[11],"170":[11],"171":[11],"172":[11],"173":[11],"174":[11],"175":[11],"176":[11],"177":[11],"178":[11],"179":[11],"180":[11],"181":[11],"182":[11],"183":[11],"184":[11],"185":[11],"186":[11],"187":[11],"188":[11],"189":[11],"190":[11],"191":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":15,"byte_transitions":{"128":[11],"129":[11],"130":[11],"131":[11],"132":[11],"133":[11],"134":[11],"135":[11],"136":[11],"137":[11],"138":[11],"139":[11],"140":[11],"141":[11],"142":[11],"143":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":16,"byte_transitions":{"0":[16],"1":[16],"2":[16],"3":[16],"4":[16],"5":[16],"6":[16],"7":[16],"8":[16],"9":[16],"11":[16],"12":[16],"13":[17],"14":[16],"15":[16],"16":[16],"17":[16],"18":[16],"19":[16],"20":[16],"21":[16],"22":[16],"23":[16],"24":[16],"25":[16],"26":[16],"27":[16],"28":[16],"29":[16],"30":[16],"31":[16],"32":[16],"33":[16],"34":[16],"35":[16],"36":[16],"37":[16],"38":[16],"39":[16],"40":[16],"41":[16],"42":[16],"43":[16],"44":[16],"45":[16],"46":[16],"47":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"58":[16],"59":[16],"60":[16],"61":[16],"62":[16],"63":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"91":[16],"92":[16],"93":[16],"94":[16],"95":[16],"96":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16],"123":[16],"124":[16],"125":[16],"126":[16],"127":[16],"194":[9],"195":[9],"196":[9],"197":[9],"198":[9],"199":[9],"200":[9],"201":[9],"202":[9],"203":[9],"204":[9],"205":[9],"206":[9],"207":[9],"208":[9],"209":[9],"210":[9],"211":[9],"212":[9],"213":[9],"214":[9],"215":[9],"216":[9],"217":[9],"218":[9],"219":[9],"220":[9],"221":[9],"222":[9],"223":[9],"224":[10],"225":[11],"226":[11],"227":[11],"228":[11],"229":[11],"230":[11],"231":[11],"232":[11],"233":[11],"234":[11],"235":[11],"236":[11],"237":[12],"238":[11],"239":[11],"240":[13],"241":[14],"242":[14],"243":[14],"244":[15]},"epsilon_transitions":[],"capture_groups":{"9":[],"10":[],"11":[],"12":[],"13":[],"14":[],"15":[],"16":[[1,false]],"17":[]}},{"state_id":17,"byte_transitions":{"10":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[18],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/message_id_graph.json b/noir/src/templates/graphs/message_id_graph.json new file mode 100644 index 00000000..fac72933 --- /dev/null +++ b/noir/src/templates/graphs/message_id_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)message-id:(<[A-Za-z0-9=@\\.\\+_-]+>)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"109":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"109":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"101":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"115":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"115":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"97":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"103":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"101":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"45":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"105":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":12,"byte_transitions":{"100":[13]},"epsilon_transitions":[],"capture_groups":{"13":[]}},{"state_id":13,"byte_transitions":{"58":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{"60":[15]},"epsilon_transitions":[],"capture_groups":{"15":[[1,true]]}},{"state_id":15,"byte_transitions":{"43":[16],"45":[16],"46":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"61":[16],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"95":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{"43":[16],"45":[16],"46":[16],"48":[16],"49":[16],"50":[16],"51":[16],"52":[16],"53":[16],"54":[16],"55":[16],"56":[16],"57":[16],"61":[16],"62":[17],"64":[16],"65":[16],"66":[16],"67":[16],"68":[16],"69":[16],"70":[16],"71":[16],"72":[16],"73":[16],"74":[16],"75":[16],"76":[16],"77":[16],"78":[16],"79":[16],"80":[16],"81":[16],"82":[16],"83":[16],"84":[16],"85":[16],"86":[16],"87":[16],"88":[16],"89":[16],"90":[16],"95":[16],"97":[16],"98":[16],"99":[16],"100":[16],"101":[16],"102":[16],"103":[16],"104":[16],"105":[16],"106":[16],"107":[16],"108":[16],"109":[16],"110":[16],"111":[16],"112":[16],"113":[16],"114":[16],"115":[16],"116":[16],"117":[16],"118":[16],"119":[16],"120":[16],"121":[16],"122":[16]},"epsilon_transitions":[],"capture_groups":{"16":[],"17":[[1,false]]}},{"state_id":17,"byte_transitions":{"13":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{"10":[19]},"epsilon_transitions":[],"capture_groups":{"19":[]}},{"state_id":19,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[19],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/simple_graph.json b/noir/src/templates/graphs/simple_graph.json new file mode 100644 index 00000000..537d5882 --- /dev/null +++ b/noir/src/templates/graphs/simple_graph.json @@ -0,0 +1 @@ +{"regex":"a*b","nodes":[{"state_id":0,"byte_transitions":{"97":[1],"98":[4]},"epsilon_transitions":[],"capture_groups":{"1":[],"4":[]}},{"state_id":1,"byte_transitions":{"97":[1],"98":[4]},"epsilon_transitions":[],"capture_groups":{"1":[],"4":[]}},{"state_id":2,"byte_transitions":{"97":[1]},"epsilon_transitions":[],"capture_groups":{"1":[]}},{"state_id":3,"byte_transitions":{"98":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,2,3],"accept_states":[4],"num_capture_groups":0} \ No newline at end of file diff --git a/noir/src/templates/graphs/subject_all_graph.json b/noir/src/templates/graphs/subject_all_graph.json new file mode 100644 index 00000000..c461f1d7 --- /dev/null +++ b/noir/src/templates/graphs/subject_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)subject:([a-z]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"115":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"115":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"117":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"98":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"106":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"101":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"99":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"116":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"58":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"97":[12],"98":[12],"99":[12],"100":[12],"101":[12],"102":[12],"103":[12],"104":[12],"105":[12],"106":[12],"107":[12],"108":[12],"109":[12],"110":[12],"111":[12],"112":[12],"113":[12],"114":[12],"115":[12],"116":[12],"117":[12],"118":[12],"119":[12],"120":[12],"121":[12],"122":[12]},"epsilon_transitions":[],"capture_groups":{"12":[[1,false],[1,true]]}},{"state_id":12,"byte_transitions":{"13":[13],"97":[12],"98":[12],"99":[12],"100":[12],"101":[12],"102":[12],"103":[12],"104":[12],"105":[12],"106":[12],"107":[12],"108":[12],"109":[12],"110":[12],"111":[12],"112":[12],"113":[12],"114":[12],"115":[12],"116":[12],"117":[12],"118":[12],"119":[12],"120":[12],"121":[12],"122":[12]},"epsilon_transitions":[],"capture_groups":{"12":[[1,false]],"13":[]}},{"state_id":13,"byte_transitions":{"10":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[14],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/succinct_graph.json b/noir/src/templates/graphs/succinct_graph.json new file mode 100644 index 00000000..688c41d3 --- /dev/null +++ b/noir/src/templates/graphs/succinct_graph.json @@ -0,0 +1 @@ +{"regex":"(Welcome to the )(Succinct Residency!)","nodes":[{"state_id":0,"byte_transitions":{"87":[1]},"epsilon_transitions":[],"capture_groups":{"1":[[1,true]]}},{"state_id":1,"byte_transitions":{"101":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"108":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"99":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"111":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"109":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"101":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"32":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"116":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"111":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"32":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"116":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":12,"byte_transitions":{"104":[13]},"epsilon_transitions":[],"capture_groups":{"13":[]}},{"state_id":13,"byte_transitions":{"101":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{"32":[15]},"epsilon_transitions":[],"capture_groups":{"15":[[1,false]]}},{"state_id":15,"byte_transitions":{"83":[16]},"epsilon_transitions":[],"capture_groups":{"16":[[2,true]]}},{"state_id":16,"byte_transitions":{"117":[17]},"epsilon_transitions":[],"capture_groups":{"17":[]}},{"state_id":17,"byte_transitions":{"99":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{"99":[19]},"epsilon_transitions":[],"capture_groups":{"19":[]}},{"state_id":19,"byte_transitions":{"105":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":20,"byte_transitions":{"110":[21]},"epsilon_transitions":[],"capture_groups":{"21":[]}},{"state_id":21,"byte_transitions":{"99":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":22,"byte_transitions":{"116":[23]},"epsilon_transitions":[],"capture_groups":{"23":[]}},{"state_id":23,"byte_transitions":{"32":[24]},"epsilon_transitions":[],"capture_groups":{"24":[]}},{"state_id":24,"byte_transitions":{"82":[25]},"epsilon_transitions":[],"capture_groups":{"25":[]}},{"state_id":25,"byte_transitions":{"101":[26]},"epsilon_transitions":[],"capture_groups":{"26":[]}},{"state_id":26,"byte_transitions":{"115":[27]},"epsilon_transitions":[],"capture_groups":{"27":[]}},{"state_id":27,"byte_transitions":{"105":[28]},"epsilon_transitions":[],"capture_groups":{"28":[]}},{"state_id":28,"byte_transitions":{"100":[29]},"epsilon_transitions":[],"capture_groups":{"29":[]}},{"state_id":29,"byte_transitions":{"101":[30]},"epsilon_transitions":[],"capture_groups":{"30":[]}},{"state_id":30,"byte_transitions":{"110":[31]},"epsilon_transitions":[],"capture_groups":{"31":[]}},{"state_id":31,"byte_transitions":{"99":[32]},"epsilon_transitions":[],"capture_groups":{"32":[]}},{"state_id":32,"byte_transitions":{"121":[33]},"epsilon_transitions":[],"capture_groups":{"33":[]}},{"state_id":33,"byte_transitions":{"33":[34]},"epsilon_transitions":[],"capture_groups":{"34":[[2,false]]}},{"state_id":34,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0],"accept_states":[34],"num_capture_groups":2} \ No newline at end of file diff --git a/noir/src/templates/graphs/timestamp_graph.json b/noir/src/templates/graphs/timestamp_graph.json new file mode 100644 index 00000000..0b20a20b --- /dev/null +++ b/noir/src/templates/graphs/timestamp_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)dkim-signature:(?:[a-z]+=[^;]+; )+t=([0-9]+);","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"100":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"100":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"107":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"105":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"109":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":7,"byte_transitions":{"45":[8]},"epsilon_transitions":[],"capture_groups":{"8":[]}},{"state_id":8,"byte_transitions":{"115":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":9,"byte_transitions":{"105":[10]},"epsilon_transitions":[],"capture_groups":{"10":[]}},{"state_id":10,"byte_transitions":{"103":[11]},"epsilon_transitions":[],"capture_groups":{"11":[]}},{"state_id":11,"byte_transitions":{"110":[12]},"epsilon_transitions":[],"capture_groups":{"12":[]}},{"state_id":12,"byte_transitions":{"97":[13]},"epsilon_transitions":[],"capture_groups":{"13":[]}},{"state_id":13,"byte_transitions":{"116":[14]},"epsilon_transitions":[],"capture_groups":{"14":[]}},{"state_id":14,"byte_transitions":{"117":[15]},"epsilon_transitions":[],"capture_groups":{"15":[]}},{"state_id":15,"byte_transitions":{"114":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{"101":[17]},"epsilon_transitions":[],"capture_groups":{"17":[]}},{"state_id":17,"byte_transitions":{"58":[18]},"epsilon_transitions":[],"capture_groups":{"18":[]}},{"state_id":18,"byte_transitions":{"97":[19],"98":[19],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[]}},{"state_id":19,"byte_transitions":{"61":[27],"97":[19],"98":[19],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[],"27":[]}},{"state_id":20,"byte_transitions":{"128":[28],"129":[28],"130":[28],"131":[28],"132":[28],"133":[28],"134":[28],"135":[28],"136":[28],"137":[28],"138":[28],"139":[28],"140":[28],"141":[28],"142":[28],"143":[28],"144":[28],"145":[28],"146":[28],"147":[28],"148":[28],"149":[28],"150":[28],"151":[28],"152":[28],"153":[28],"154":[28],"155":[28],"156":[28],"157":[28],"158":[28],"159":[28],"160":[28],"161":[28],"162":[28],"163":[28],"164":[28],"165":[28],"166":[28],"167":[28],"168":[28],"169":[28],"170":[28],"171":[28],"172":[28],"173":[28],"174":[28],"175":[28],"176":[28],"177":[28],"178":[28],"179":[28],"180":[28],"181":[28],"182":[28],"183":[28],"184":[28],"185":[28],"186":[28],"187":[28],"188":[28],"189":[28],"190":[28],"191":[28]},"epsilon_transitions":[],"capture_groups":{"28":[]}},{"state_id":21,"byte_transitions":{"160":[20],"161":[20],"162":[20],"163":[20],"164":[20],"165":[20],"166":[20],"167":[20],"168":[20],"169":[20],"170":[20],"171":[20],"172":[20],"173":[20],"174":[20],"175":[20],"176":[20],"177":[20],"178":[20],"179":[20],"180":[20],"181":[20],"182":[20],"183":[20],"184":[20],"185":[20],"186":[20],"187":[20],"188":[20],"189":[20],"190":[20],"191":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":22,"byte_transitions":{"128":[20],"129":[20],"130":[20],"131":[20],"132":[20],"133":[20],"134":[20],"135":[20],"136":[20],"137":[20],"138":[20],"139":[20],"140":[20],"141":[20],"142":[20],"143":[20],"144":[20],"145":[20],"146":[20],"147":[20],"148":[20],"149":[20],"150":[20],"151":[20],"152":[20],"153":[20],"154":[20],"155":[20],"156":[20],"157":[20],"158":[20],"159":[20],"160":[20],"161":[20],"162":[20],"163":[20],"164":[20],"165":[20],"166":[20],"167":[20],"168":[20],"169":[20],"170":[20],"171":[20],"172":[20],"173":[20],"174":[20],"175":[20],"176":[20],"177":[20],"178":[20],"179":[20],"180":[20],"181":[20],"182":[20],"183":[20],"184":[20],"185":[20],"186":[20],"187":[20],"188":[20],"189":[20],"190":[20],"191":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":23,"byte_transitions":{"128":[20],"129":[20],"130":[20],"131":[20],"132":[20],"133":[20],"134":[20],"135":[20],"136":[20],"137":[20],"138":[20],"139":[20],"140":[20],"141":[20],"142":[20],"143":[20],"144":[20],"145":[20],"146":[20],"147":[20],"148":[20],"149":[20],"150":[20],"151":[20],"152":[20],"153":[20],"154":[20],"155":[20],"156":[20],"157":[20],"158":[20],"159":[20]},"epsilon_transitions":[],"capture_groups":{"20":[]}},{"state_id":24,"byte_transitions":{"144":[22],"145":[22],"146":[22],"147":[22],"148":[22],"149":[22],"150":[22],"151":[22],"152":[22],"153":[22],"154":[22],"155":[22],"156":[22],"157":[22],"158":[22],"159":[22],"160":[22],"161":[22],"162":[22],"163":[22],"164":[22],"165":[22],"166":[22],"167":[22],"168":[22],"169":[22],"170":[22],"171":[22],"172":[22],"173":[22],"174":[22],"175":[22],"176":[22],"177":[22],"178":[22],"179":[22],"180":[22],"181":[22],"182":[22],"183":[22],"184":[22],"185":[22],"186":[22],"187":[22],"188":[22],"189":[22],"190":[22],"191":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":25,"byte_transitions":{"128":[22],"129":[22],"130":[22],"131":[22],"132":[22],"133":[22],"134":[22],"135":[22],"136":[22],"137":[22],"138":[22],"139":[22],"140":[22],"141":[22],"142":[22],"143":[22],"144":[22],"145":[22],"146":[22],"147":[22],"148":[22],"149":[22],"150":[22],"151":[22],"152":[22],"153":[22],"154":[22],"155":[22],"156":[22],"157":[22],"158":[22],"159":[22],"160":[22],"161":[22],"162":[22],"163":[22],"164":[22],"165":[22],"166":[22],"167":[22],"168":[22],"169":[22],"170":[22],"171":[22],"172":[22],"173":[22],"174":[22],"175":[22],"176":[22],"177":[22],"178":[22],"179":[22],"180":[22],"181":[22],"182":[22],"183":[22],"184":[22],"185":[22],"186":[22],"187":[22],"188":[22],"189":[22],"190":[22],"191":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":26,"byte_transitions":{"128":[22],"129":[22],"130":[22],"131":[22],"132":[22],"133":[22],"134":[22],"135":[22],"136":[22],"137":[22],"138":[22],"139":[22],"140":[22],"141":[22],"142":[22],"143":[22]},"epsilon_transitions":[],"capture_groups":{"22":[]}},{"state_id":27,"byte_transitions":{"0":[28],"1":[28],"2":[28],"3":[28],"4":[28],"5":[28],"6":[28],"7":[28],"8":[28],"9":[28],"10":[28],"11":[28],"12":[28],"13":[28],"14":[28],"15":[28],"16":[28],"17":[28],"18":[28],"19":[28],"20":[28],"21":[28],"22":[28],"23":[28],"24":[28],"25":[28],"26":[28],"27":[28],"28":[28],"29":[28],"30":[28],"31":[28],"32":[28],"33":[28],"34":[28],"35":[28],"36":[28],"37":[28],"38":[28],"39":[28],"40":[28],"41":[28],"42":[28],"43":[28],"44":[28],"45":[28],"46":[28],"47":[28],"48":[28],"49":[28],"50":[28],"51":[28],"52":[28],"53":[28],"54":[28],"55":[28],"56":[28],"57":[28],"58":[28],"60":[28],"61":[28],"62":[28],"63":[28],"64":[28],"65":[28],"66":[28],"67":[28],"68":[28],"69":[28],"70":[28],"71":[28],"72":[28],"73":[28],"74":[28],"75":[28],"76":[28],"77":[28],"78":[28],"79":[28],"80":[28],"81":[28],"82":[28],"83":[28],"84":[28],"85":[28],"86":[28],"87":[28],"88":[28],"89":[28],"90":[28],"91":[28],"92":[28],"93":[28],"94":[28],"95":[28],"96":[28],"97":[28],"98":[28],"99":[28],"100":[28],"101":[28],"102":[28],"103":[28],"104":[28],"105":[28],"106":[28],"107":[28],"108":[28],"109":[28],"110":[28],"111":[28],"112":[28],"113":[28],"114":[28],"115":[28],"116":[28],"117":[28],"118":[28],"119":[28],"120":[28],"121":[28],"122":[28],"123":[28],"124":[28],"125":[28],"126":[28],"127":[28],"194":[20],"195":[20],"196":[20],"197":[20],"198":[20],"199":[20],"200":[20],"201":[20],"202":[20],"203":[20],"204":[20],"205":[20],"206":[20],"207":[20],"208":[20],"209":[20],"210":[20],"211":[20],"212":[20],"213":[20],"214":[20],"215":[20],"216":[20],"217":[20],"218":[20],"219":[20],"220":[20],"221":[20],"222":[20],"223":[20],"224":[21],"225":[22],"226":[22],"227":[22],"228":[22],"229":[22],"230":[22],"231":[22],"232":[22],"233":[22],"234":[22],"235":[22],"236":[22],"237":[23],"238":[22],"239":[22],"240":[24],"241":[25],"242":[25],"243":[25],"244":[26]},"epsilon_transitions":[],"capture_groups":{"20":[],"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"28":[]}},{"state_id":28,"byte_transitions":{"0":[28],"1":[28],"2":[28],"3":[28],"4":[28],"5":[28],"6":[28],"7":[28],"8":[28],"9":[28],"10":[28],"11":[28],"12":[28],"13":[28],"14":[28],"15":[28],"16":[28],"17":[28],"18":[28],"19":[28],"20":[28],"21":[28],"22":[28],"23":[28],"24":[28],"25":[28],"26":[28],"27":[28],"28":[28],"29":[28],"30":[28],"31":[28],"32":[28],"33":[28],"34":[28],"35":[28],"36":[28],"37":[28],"38":[28],"39":[28],"40":[28],"41":[28],"42":[28],"43":[28],"44":[28],"45":[28],"46":[28],"47":[28],"48":[28],"49":[28],"50":[28],"51":[28],"52":[28],"53":[28],"54":[28],"55":[28],"56":[28],"57":[28],"58":[28],"59":[29],"60":[28],"61":[28],"62":[28],"63":[28],"64":[28],"65":[28],"66":[28],"67":[28],"68":[28],"69":[28],"70":[28],"71":[28],"72":[28],"73":[28],"74":[28],"75":[28],"76":[28],"77":[28],"78":[28],"79":[28],"80":[28],"81":[28],"82":[28],"83":[28],"84":[28],"85":[28],"86":[28],"87":[28],"88":[28],"89":[28],"90":[28],"91":[28],"92":[28],"93":[28],"94":[28],"95":[28],"96":[28],"97":[28],"98":[28],"99":[28],"100":[28],"101":[28],"102":[28],"103":[28],"104":[28],"105":[28],"106":[28],"107":[28],"108":[28],"109":[28],"110":[28],"111":[28],"112":[28],"113":[28],"114":[28],"115":[28],"116":[28],"117":[28],"118":[28],"119":[28],"120":[28],"121":[28],"122":[28],"123":[28],"124":[28],"125":[28],"126":[28],"127":[28],"194":[20],"195":[20],"196":[20],"197":[20],"198":[20],"199":[20],"200":[20],"201":[20],"202":[20],"203":[20],"204":[20],"205":[20],"206":[20],"207":[20],"208":[20],"209":[20],"210":[20],"211":[20],"212":[20],"213":[20],"214":[20],"215":[20],"216":[20],"217":[20],"218":[20],"219":[20],"220":[20],"221":[20],"222":[20],"223":[20],"224":[21],"225":[22],"226":[22],"227":[22],"228":[22],"229":[22],"230":[22],"231":[22],"232":[22],"233":[22],"234":[22],"235":[22],"236":[22],"237":[23],"238":[22],"239":[22],"240":[24],"241":[25],"242":[25],"243":[25],"244":[26]},"epsilon_transitions":[],"capture_groups":{"20":[],"21":[],"22":[],"23":[],"24":[],"25":[],"26":[],"28":[],"29":[]}},{"state_id":29,"byte_transitions":{"32":[30]},"epsilon_transitions":[],"capture_groups":{"30":[]}},{"state_id":30,"byte_transitions":{"97":[19],"98":[19],"99":[19],"100":[19],"101":[19],"102":[19],"103":[19],"104":[19],"105":[19],"106":[19],"107":[19],"108":[19],"109":[19],"110":[19],"111":[19],"112":[19],"113":[19],"114":[19],"115":[19],"116":[19,31],"117":[19],"118":[19],"119":[19],"120":[19],"121":[19],"122":[19]},"epsilon_transitions":[],"capture_groups":{"19":[],"31":[]}},{"state_id":31,"byte_transitions":{"61":[32]},"epsilon_transitions":[],"capture_groups":{"32":[]}},{"state_id":32,"byte_transitions":{"48":[33],"49":[33],"50":[33],"51":[33],"52":[33],"53":[33],"54":[33],"55":[33],"56":[33],"57":[33]},"epsilon_transitions":[],"capture_groups":{"33":[[1,false],[1,true]]}},{"state_id":33,"byte_transitions":{"48":[33],"49":[33],"50":[33],"51":[33],"52":[33],"53":[33],"54":[33],"55":[33],"56":[33],"57":[33],"59":[34]},"epsilon_transitions":[],"capture_groups":{"33":[[1,false]],"34":[]}},{"state_id":34,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[34],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/graphs/to_all_graph.json b/noir/src/templates/graphs/to_all_graph.json new file mode 100644 index 00000000..881c6913 --- /dev/null +++ b/noir/src/templates/graphs/to_all_graph.json @@ -0,0 +1 @@ +{"regex":"(?:\r\n|^)to:([^\r\n]+)\r\n","nodes":[{"state_id":0,"byte_transitions":{"13":[2],"116":[4]},"epsilon_transitions":[],"capture_groups":{"2":[],"4":[]}},{"state_id":1,"byte_transitions":{"13":[2]},"epsilon_transitions":[],"capture_groups":{"2":[]}},{"state_id":2,"byte_transitions":{"10":[3]},"epsilon_transitions":[],"capture_groups":{"3":[]}},{"state_id":3,"byte_transitions":{"116":[4]},"epsilon_transitions":[],"capture_groups":{"4":[]}},{"state_id":4,"byte_transitions":{"111":[5]},"epsilon_transitions":[],"capture_groups":{"5":[]}},{"state_id":5,"byte_transitions":{"58":[6]},"epsilon_transitions":[],"capture_groups":{"6":[]}},{"state_id":6,"byte_transitions":{"0":[14],"1":[14],"2":[14],"3":[14],"4":[14],"5":[14],"6":[14],"7":[14],"8":[14],"9":[14],"11":[14],"12":[14],"14":[14],"15":[14],"16":[14],"17":[14],"18":[14],"19":[14],"20":[14],"21":[14],"22":[14],"23":[14],"24":[14],"25":[14],"26":[14],"27":[14],"28":[14],"29":[14],"30":[14],"31":[14],"32":[14],"33":[14],"34":[14],"35":[14],"36":[14],"37":[14],"38":[14],"39":[14],"40":[14],"41":[14],"42":[14],"43":[14],"44":[14],"45":[14],"46":[14],"47":[14],"48":[14],"49":[14],"50":[14],"51":[14],"52":[14],"53":[14],"54":[14],"55":[14],"56":[14],"57":[14],"58":[14],"59":[14],"60":[14],"61":[14],"62":[14],"63":[14],"64":[14],"65":[14],"66":[14],"67":[14],"68":[14],"69":[14],"70":[14],"71":[14],"72":[14],"73":[14],"74":[14],"75":[14],"76":[14],"77":[14],"78":[14],"79":[14],"80":[14],"81":[14],"82":[14],"83":[14],"84":[14],"85":[14],"86":[14],"87":[14],"88":[14],"89":[14],"90":[14],"91":[14],"92":[14],"93":[14],"94":[14],"95":[14],"96":[14],"97":[14],"98":[14],"99":[14],"100":[14],"101":[14],"102":[14],"103":[14],"104":[14],"105":[14],"106":[14],"107":[14],"108":[14],"109":[14],"110":[14],"111":[14],"112":[14],"113":[14],"114":[14],"115":[14],"116":[14],"117":[14],"118":[14],"119":[14],"120":[14],"121":[14],"122":[14],"123":[14],"124":[14],"125":[14],"126":[14],"127":[14],"194":[7],"195":[7],"196":[7],"197":[7],"198":[7],"199":[7],"200":[7],"201":[7],"202":[7],"203":[7],"204":[7],"205":[7],"206":[7],"207":[7],"208":[7],"209":[7],"210":[7],"211":[7],"212":[7],"213":[7],"214":[7],"215":[7],"216":[7],"217":[7],"218":[7],"219":[7],"220":[7],"221":[7],"222":[7],"223":[7],"224":[8],"225":[9],"226":[9],"227":[9],"228":[9],"229":[9],"230":[9],"231":[9],"232":[9],"233":[9],"234":[9],"235":[9],"236":[9],"237":[10],"238":[9],"239":[9],"240":[11],"241":[12],"242":[12],"243":[12],"244":[13]},"epsilon_transitions":[],"capture_groups":{"7":[[1,true]],"8":[[1,true]],"9":[[1,true]],"10":[[1,true]],"11":[[1,true]],"12":[[1,true]],"13":[[1,true]],"14":[[1,false],[1,true]]}},{"state_id":7,"byte_transitions":{"128":[14],"129":[14],"130":[14],"131":[14],"132":[14],"133":[14],"134":[14],"135":[14],"136":[14],"137":[14],"138":[14],"139":[14],"140":[14],"141":[14],"142":[14],"143":[14],"144":[14],"145":[14],"146":[14],"147":[14],"148":[14],"149":[14],"150":[14],"151":[14],"152":[14],"153":[14],"154":[14],"155":[14],"156":[14],"157":[14],"158":[14],"159":[14],"160":[14],"161":[14],"162":[14],"163":[14],"164":[14],"165":[14],"166":[14],"167":[14],"168":[14],"169":[14],"170":[14],"171":[14],"172":[14],"173":[14],"174":[14],"175":[14],"176":[14],"177":[14],"178":[14],"179":[14],"180":[14],"181":[14],"182":[14],"183":[14],"184":[14],"185":[14],"186":[14],"187":[14],"188":[14],"189":[14],"190":[14],"191":[14]},"epsilon_transitions":[],"capture_groups":{"14":[[1,false]]}},{"state_id":8,"byte_transitions":{"160":[7],"161":[7],"162":[7],"163":[7],"164":[7],"165":[7],"166":[7],"167":[7],"168":[7],"169":[7],"170":[7],"171":[7],"172":[7],"173":[7],"174":[7],"175":[7],"176":[7],"177":[7],"178":[7],"179":[7],"180":[7],"181":[7],"182":[7],"183":[7],"184":[7],"185":[7],"186":[7],"187":[7],"188":[7],"189":[7],"190":[7],"191":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":9,"byte_transitions":{"128":[7],"129":[7],"130":[7],"131":[7],"132":[7],"133":[7],"134":[7],"135":[7],"136":[7],"137":[7],"138":[7],"139":[7],"140":[7],"141":[7],"142":[7],"143":[7],"144":[7],"145":[7],"146":[7],"147":[7],"148":[7],"149":[7],"150":[7],"151":[7],"152":[7],"153":[7],"154":[7],"155":[7],"156":[7],"157":[7],"158":[7],"159":[7],"160":[7],"161":[7],"162":[7],"163":[7],"164":[7],"165":[7],"166":[7],"167":[7],"168":[7],"169":[7],"170":[7],"171":[7],"172":[7],"173":[7],"174":[7],"175":[7],"176":[7],"177":[7],"178":[7],"179":[7],"180":[7],"181":[7],"182":[7],"183":[7],"184":[7],"185":[7],"186":[7],"187":[7],"188":[7],"189":[7],"190":[7],"191":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":10,"byte_transitions":{"128":[7],"129":[7],"130":[7],"131":[7],"132":[7],"133":[7],"134":[7],"135":[7],"136":[7],"137":[7],"138":[7],"139":[7],"140":[7],"141":[7],"142":[7],"143":[7],"144":[7],"145":[7],"146":[7],"147":[7],"148":[7],"149":[7],"150":[7],"151":[7],"152":[7],"153":[7],"154":[7],"155":[7],"156":[7],"157":[7],"158":[7],"159":[7]},"epsilon_transitions":[],"capture_groups":{"7":[]}},{"state_id":11,"byte_transitions":{"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":12,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9],"144":[9],"145":[9],"146":[9],"147":[9],"148":[9],"149":[9],"150":[9],"151":[9],"152":[9],"153":[9],"154":[9],"155":[9],"156":[9],"157":[9],"158":[9],"159":[9],"160":[9],"161":[9],"162":[9],"163":[9],"164":[9],"165":[9],"166":[9],"167":[9],"168":[9],"169":[9],"170":[9],"171":[9],"172":[9],"173":[9],"174":[9],"175":[9],"176":[9],"177":[9],"178":[9],"179":[9],"180":[9],"181":[9],"182":[9],"183":[9],"184":[9],"185":[9],"186":[9],"187":[9],"188":[9],"189":[9],"190":[9],"191":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":13,"byte_transitions":{"128":[9],"129":[9],"130":[9],"131":[9],"132":[9],"133":[9],"134":[9],"135":[9],"136":[9],"137":[9],"138":[9],"139":[9],"140":[9],"141":[9],"142":[9],"143":[9]},"epsilon_transitions":[],"capture_groups":{"9":[]}},{"state_id":14,"byte_transitions":{"0":[14],"1":[14],"2":[14],"3":[14],"4":[14],"5":[14],"6":[14],"7":[14],"8":[14],"9":[14],"11":[14],"12":[14],"13":[15],"14":[14],"15":[14],"16":[14],"17":[14],"18":[14],"19":[14],"20":[14],"21":[14],"22":[14],"23":[14],"24":[14],"25":[14],"26":[14],"27":[14],"28":[14],"29":[14],"30":[14],"31":[14],"32":[14],"33":[14],"34":[14],"35":[14],"36":[14],"37":[14],"38":[14],"39":[14],"40":[14],"41":[14],"42":[14],"43":[14],"44":[14],"45":[14],"46":[14],"47":[14],"48":[14],"49":[14],"50":[14],"51":[14],"52":[14],"53":[14],"54":[14],"55":[14],"56":[14],"57":[14],"58":[14],"59":[14],"60":[14],"61":[14],"62":[14],"63":[14],"64":[14],"65":[14],"66":[14],"67":[14],"68":[14],"69":[14],"70":[14],"71":[14],"72":[14],"73":[14],"74":[14],"75":[14],"76":[14],"77":[14],"78":[14],"79":[14],"80":[14],"81":[14],"82":[14],"83":[14],"84":[14],"85":[14],"86":[14],"87":[14],"88":[14],"89":[14],"90":[14],"91":[14],"92":[14],"93":[14],"94":[14],"95":[14],"96":[14],"97":[14],"98":[14],"99":[14],"100":[14],"101":[14],"102":[14],"103":[14],"104":[14],"105":[14],"106":[14],"107":[14],"108":[14],"109":[14],"110":[14],"111":[14],"112":[14],"113":[14],"114":[14],"115":[14],"116":[14],"117":[14],"118":[14],"119":[14],"120":[14],"121":[14],"122":[14],"123":[14],"124":[14],"125":[14],"126":[14],"127":[14],"194":[7],"195":[7],"196":[7],"197":[7],"198":[7],"199":[7],"200":[7],"201":[7],"202":[7],"203":[7],"204":[7],"205":[7],"206":[7],"207":[7],"208":[7],"209":[7],"210":[7],"211":[7],"212":[7],"213":[7],"214":[7],"215":[7],"216":[7],"217":[7],"218":[7],"219":[7],"220":[7],"221":[7],"222":[7],"223":[7],"224":[8],"225":[9],"226":[9],"227":[9],"228":[9],"229":[9],"230":[9],"231":[9],"232":[9],"233":[9],"234":[9],"235":[9],"236":[9],"237":[10],"238":[9],"239":[9],"240":[11],"241":[12],"242":[12],"243":[12],"244":[13]},"epsilon_transitions":[],"capture_groups":{"7":[],"8":[],"9":[],"10":[],"11":[],"12":[],"13":[],"14":[[1,false]],"15":[]}},{"state_id":15,"byte_transitions":{"10":[16]},"epsilon_transitions":[],"capture_groups":{"16":[]}},{"state_id":16,"byte_transitions":{},"epsilon_transitions":[],"capture_groups":{}}],"start_states":[0,1,3],"accept_states":[16],"num_capture_groups":1} \ No newline at end of file diff --git a/noir/src/templates/mod.nr b/noir/src/templates/mod.nr new file mode 100644 index 00000000..a8daf292 --- /dev/null +++ b/noir/src/templates/mod.nr @@ -0,0 +1 @@ +mod circuits; diff --git a/noir/src/utils/captures.nr b/noir/src/utils/captures.nr new file mode 100644 index 00000000..d1b340ea --- /dev/null +++ b/noir/src/utils/captures.nr @@ -0,0 +1,261 @@ +/// NOTE ON HOW `capture_ids` and `capture_starts` WORK +/// Example input: +/// +/// haystack = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +/// capture_ids = [0, 0, 0, X, 0, 0, 0, X, 0, 0] +/// capture_starts = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0] +/// +/// In transition logic with captures, we constrain byte / current state / next state looks up to a +/// certain packed value. This packed value contains (valid, start_capture_group, capture_group_id). +/// `capture_ids` (6 bit number indicating capture group) and `capture_starts` (binary indicating +/// start of capture group) are constrained to be correct here, so the integrity is already constrained. +/// +/// There can be multiple transitions of non-deterministic paths between the start and end of a capture. +/// For `capture_ids`, we will put the id of the capture group at the index where the capture starts and +/// the index where the capture ends (in example @ index 3 and 7). Meanwhile, we will set a boolean +/// at index 3 for `capture_starts`. This is enough information to determine the start and end of the +/// capture group X (X could be 1, 63, etc): +/// +/// capture_ids[3] == X && capture_starts[3] == 1 indicates start +/// capture_ids[7] == X && capture_starts[7] == 0 indicates end +/// +/// The process of capturing is as follows: +/// 1. Build a bitmask `is_capture` for capture ID X, creating a new array where 1 is only set if +/// the `capture_id` value matches the expected capture group id (done by `build_is_capture`): +/// +/// capture_ids = [0, 0, 0, X, 0, 0, 0, X, 0, 0] +/// is_capture = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0] +/// +/// 2. Build a bitmask `is_capture_start` - this mask looks for `is_capture[i]` to be 1 and +/// `capture_starts[i]` to be 1. All values before this is found should be masked to 0, and all values +/// from this index to the end should be masked to 1 (done by `build_capture_start_end_mask`): +/// +/// is_capture = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0] +/// capture_starts = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0] +/// is_capture_start = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1] +/// +/// 3. Build a bitmask `is_capture_end` - this mask looks for `is_capture[i]` to be 1 and +/// `capture_starts[i]` to be 0. This check looks backwards, starting at the last index and iterates +/// backwards. All values after this is found should be masked to 0, and all values from this index +/// to the start should be masked to 1 (done by `build_capture_start_end_mask`): +/// +/// is_capture = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0] +/// capture_starts = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0] +/// is_capture_end = [1, 1, 1, 1, 1, 1, 1, 1, 0, 0] +/// +/// 4. With `is_capture_start` and `is_capture_end`, we can take the intersection of the two masks +/// to build a final mask `capture_mask` which is constrained to reveal the exact substring we +/// want to capture (done by `__build_capture_mask`): +/// +/// is_capture_start = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1] +/// is_capture_end = [1, 1, 1, 1, 1, 1, 1, 1, 0, 0] +/// capture_mask = [0, 0, 0, 1, 1, 1, 1, 1, 0, 0] +/// +/// 5. Finally, we can use the `capture_mask` to extract the substring from the haystack. This process +/// is relatively straightforward and will not be explained in depth + +/** + * Captures a substring from a haystack + * + * @param MAX_MATCH_LENGTH: The maximum length of the match + * @param MAX_SUBSTRING_LENGTH: The maximum length of the captured substring + * @param CAPTURE_GROUP: the id of the capture group to match for + * + * @param haystack - The haystack of bytes to capture the substring from + * @param capture_ids - The capture group ids for the haystack (only set at start and end indices) + * @ + * + */ +pub fn capture_substring( + haystack: [u8; MAX_MATCH_LENGTH], + capture_ids: [Field; MAX_MATCH_LENGTH], + capture_starts: [Field; MAX_MATCH_LENGTH], + capture_start_index: Field, +) -> BoundedVec { + let is_capture = build_is_capture::(capture_ids); + + let (is_capture_start, is_capture_end) = + build_capture_start_end_mask(is_capture, capture_starts); + + // Safety: capture_mask is not constrained. + let capture_mask = unsafe { __build_capture_mask(is_capture_start, is_capture_end) }; + + for i in 0..MAX_MATCH_LENGTH { + let expected_mask = is_capture_start[i] * is_capture_end[i]; + assert(capture_mask[i] == expected_mask, "Invalid Capture Mask"); + } + + substring_from_mask(haystack, capture_mask, capture_start_index) +} + +fn build_is_capture( + capture_ids: [Field; MAX_MATCH_LENGTH], +) -> [Field; MAX_MATCH_LENGTH] { + // Safety: capture_ids is not constrained. + let is_capture = unsafe { __build_is_capture::(capture_ids) }; + + for i in 0..MAX_MATCH_LENGTH { + // check is_capture is binary + is_capture[i].assert_max_bit_size::<1>(); + // check if the capture group is targeted at index + let index_selector = (capture_ids[i] == CAPTURE_GROUP) as Field; + // if the index is part of the capture group, check mask + assert(index_selector * (is_capture[i] - 1) == 0, "Invalid Capture Group Mask"); + } + + is_capture +} + +fn substring_from_mask( + haystack: [u8; MAX_HAYSTACK_LEN], + mask: [Field; MAX_HAYSTACK_LEN], + start_index: Field, +) -> BoundedVec { + // Safety: substring is not constrained. + let substring = unsafe { __substring_from_mask(haystack, mask, start_index) }; + + let start_index_is_zero = (start_index == 0) as Field; + let start_index_to_check = (start_index - (1 - start_index_is_zero)) as u32; + let preceding_mask_value = mask[start_index_to_check]; + let preceding_mask_check = + start_index_is_zero + ((1 - start_index_is_zero) * (1 - preceding_mask_value)); + assert( + preceding_mask_check == 1, + "Invalid substring start index: preceding mask value is not 0", + ); + + let mut length = 0; + for i in 0..MAX_MATCH_LEN { + let index = start_index as u32 + i; + if index < MAX_HAYSTACK_LEN { + let mask_value = mask[index]; + let haystack_value = haystack[index] as Field; + let substring_value = substring.get_unchecked(i) as Field; + assert(mask_value * haystack_value == substring_value, "Invalid substring extraction"); + length += mask_value; + } + } + assert(length != 0, "Invalid substring length"); + assert(substring.len() as Field == length, "Invalid substring length"); + + let end_index_plus_1 = start_index + length; + let end_index_is_max = (end_index_plus_1 == MAX_HAYSTACK_LEN as Field) as Field; + let end_index_to_check = ( + ((1 - end_index_is_max) * end_index_plus_1) + end_index_is_max * (end_index_plus_1 - 1) + ) as u32; + let following_mask_value = mask[end_index_to_check]; + let following_mask_check = + end_index_is_max + ((1 - end_index_is_max) * (1 - following_mask_value)); + assert(following_mask_check == 1, "Invalid substring end index: proceding mask value is not 0"); + + assert( + mask[end_index_to_check - 1] == 1, + "Invalid substring end index: end index mask value is not 1", + ); + + substring +} + +fn build_capture_start_end_mask( + is_capture: [Field; MAX_MATCH_LENGTH], + capture_starts: [Field; MAX_MATCH_LENGTH], +) -> ([Field; MAX_MATCH_LENGTH], [Field; MAX_MATCH_LENGTH]) { + // Safety: start and end masks are not constrained. + let (start_mask, end_mask) = + unsafe { __build_capture_start_end_mask(is_capture, capture_starts) }; + + let is_capture_start_temp = (capture_starts[0] - 1 == 0) as Field; + let expected_start_mask = ((is_capture[0] * is_capture_start_temp) == 1) as Field; + assert(start_mask[0] == expected_start_mask, "Invalid Capture Start Mask"); + + let is_capture_end_temp = (capture_starts[MAX_MATCH_LENGTH - 1] == 0) as Field; + let expected_end_mask = (is_capture[MAX_MATCH_LENGTH - 1] * is_capture_end_temp == 1) as Field; + assert(end_mask[MAX_MATCH_LENGTH - 1] == expected_end_mask, "Invalid Capture End Mask"); + + for i in 1..MAX_MATCH_LENGTH { + let is_capture_start_temp = (capture_starts[i] - 1 == 0) as Field; + let is_capture_start_valid_temp = ((is_capture[i] * is_capture_start_temp) == 1) as Field; + let expected_start_mask = + (1 - (1 - is_capture_start_valid_temp) * (1 - start_mask[i - 1]) == 1) as Field; + assert(start_mask[i] == expected_start_mask, "Invalid Capture Start Mask"); + + let j = MAX_MATCH_LENGTH - 1 - i; + let is_capture_end_temp = (capture_starts[j] == 0) as Field; + let is_capture_end_valid_temp = (is_capture[j] * is_capture_end_temp == 1) as Field; + let expected_end_mask = + (1 - (1 - is_capture_end_valid_temp) * (1 - end_mask[j + 1]) == 1) as Field; + assert(end_mask[j] == expected_end_mask, "Invalid Capture End Mask"); + } + (start_mask, end_mask) +} + +unconstrained fn __build_is_capture( + capture_ids: [Field; MAX_MATCH_LENGTH], +) -> [Field; MAX_MATCH_LENGTH] { + let mut is_capture = [0; MAX_MATCH_LENGTH]; + for i in 0..MAX_MATCH_LENGTH { + is_capture[i] = (capture_ids[i] == CAPTURE_GROUP) as Field; + } + is_capture +} + +unconstrained fn __build_capture_mask( + capture_start_mask: [Field; MAX_MATCH_LENGTH], + capture_end_mask: [Field; MAX_MATCH_LENGTH], +) -> [Field; MAX_MATCH_LENGTH] { + let mut capture_mask = [0; MAX_MATCH_LENGTH]; + for i in 0..MAX_MATCH_LENGTH { + capture_mask[i] = capture_start_mask[i] * capture_end_mask[i]; + } + + capture_mask +} + +unconstrained fn __build_capture_start_end_mask( + is_capture: [Field; MAX_MATCH_LENGTH], + capture_starts: [Field; MAX_MATCH_LENGTH], +) -> ([Field; MAX_MATCH_LENGTH], [Field; MAX_MATCH_LENGTH]) { + let mut capture_start_mask = [0; MAX_MATCH_LENGTH]; + let mut capture_end_mask = [0; MAX_MATCH_LENGTH]; + + let is_capture_start_temp = (capture_starts[0] - 1 == 0) as Field; + capture_start_mask[0] = ((is_capture[0] * is_capture_start_temp) == 1) as Field; + + let is_capture_end_temp = (capture_starts[MAX_MATCH_LENGTH - 1] == 0) as Field; + capture_end_mask[MAX_MATCH_LENGTH - 1] = + (is_capture[MAX_MATCH_LENGTH - 1] * is_capture_end_temp == 1) as Field; + + for i in 1..MAX_MATCH_LENGTH { + let is_capture_start_temp = (capture_starts[i] - 1 == 0) as Field; + let is_capture_start_valid_temp = ((is_capture[i] * is_capture_start_temp) == 1) as Field; + capture_start_mask[i] = + (1 - (1 - is_capture_start_valid_temp) * (1 - capture_start_mask[i - 1]) == 1) as Field; + + let j = MAX_MATCH_LENGTH - 1 - i; + let is_capture_end_temp = (capture_starts[j] == 0) as Field; + let is_capture_end_valid_temp = (is_capture[j] * is_capture_end_temp == 1) as Field; + capture_end_mask[j] = + (1 - (1 - is_capture_end_valid_temp) * (1 - capture_end_mask[j + 1]) == 1) as Field; + } + (capture_start_mask, capture_end_mask) +} + +unconstrained fn __substring_from_mask( + haystack: [u8; MAX_HAYSTACK_LEN], + mask: [Field; MAX_HAYSTACK_LEN], + start_index: Field, +) -> BoundedVec { + let mut substring = BoundedVec::new(); + for i in 0..MAX_MATCH_LEN { + let index = start_index as u32 + i; + if index < MAX_HAYSTACK_LEN { + let mask_value = mask[index]; + if mask_value == 1 { + substring.push(haystack[index]); + } + } else { + break; + } + } + substring +} diff --git a/noir/src/utils/mod.nr b/noir/src/utils/mod.nr new file mode 100644 index 00000000..52740a7c --- /dev/null +++ b/noir/src/utils/mod.nr @@ -0,0 +1,42 @@ +pub mod sparse_array; +pub mod transitions; +pub mod captures; + +pub fn select_subarray( + input: [u8; MAX_ARRAY_LEN], + start_index: u32, + length: u32, +) -> [u8; MAX_SUBARRAY_LEN] { + assert(MAX_SUBARRAY_LEN <= MAX_ARRAY_LEN, "Subarray length exceeds array length"); + + // Safety: `__select_subarray` is unconstrained and unsafe + let mut subarray = unsafe { __select_subarray(input, start_index, length) }; + assert(start_index + length <= MAX_ARRAY_LEN, "Subarray out of bounds"); + + for i in 0..MAX_SUBARRAY_LEN { + let shifted_index = i + start_index; + let is_in_range = (i < length) as u32; + let index = is_in_range * shifted_index; + + let byte = input[index]; + let masked = byte * is_in_range as u8; + + assert(masked == subarray[i], "Subarray: mismatch between input and output"); + } + + subarray +} + +unconstrained fn __select_subarray( + input: [u8; MAX_HAYSTACK_LEN], + start_index: u32, + length: u32, +) -> [u8; MAX_MATCH_LEN] { + let mut subarray = [0; MAX_MATCH_LEN]; + for i in 0..MAX_MATCH_LEN { + if i < length { + subarray[i] = input[i + start_index]; + } + } + subarray +} diff --git a/noir/src/utils/sparse_array.nr b/noir/src/utils/sparse_array.nr new file mode 100644 index 00000000..d8fbbc80 --- /dev/null +++ b/noir/src/utils/sparse_array.nr @@ -0,0 +1,141 @@ +use sort::sort_advanced; + +unconstrained fn __sort_field_as_u32(lhs: Field, rhs: Field) -> bool { + // lhs.lt(rhs) + lhs as u32 <= rhs as u32 +} +pub struct SparseArray { + pub keys: [Field; N + 2], + pub values: [T; N + 3], + pub maximum: Field, // can be up to 2^32 +} + +fn assert_sorted(lhs: Field, rhs: Field) { + let result = (rhs - lhs - 1); + result.assert_max_bit_size::<32>(); +} + +/// Note: excisting SparseArray impl has a small bug, local impl until fixed +pub impl SparseArray +where + T: std::default::Default, +{ + + /** + * @brief construct a SparseArray + **/ + pub fn create(_keys: [Field; N], _values: [T; N], size: Field) -> Self { + let _maximum = size - 1; + let mut r: Self = + SparseArray { keys: [0; N + 2], values: [T::default(); N + 3], maximum: _maximum }; + + // for any valid index, we want to ensure the following is satified: + // self.keys[X] <= index <= self.keys[X+1] + // this requires us to sort hte keys, and insert a startpoint and endpoint + let sorted_keys = sort_advanced(_keys, __sort_field_as_u32, assert_sorted); + + // insert start and endpoints + r.keys[0] = 0; + for i in 0..N { + r.keys[i + 1] = sorted_keys.sorted[i]; + } + r.keys[N + 1] = _maximum; + + // populate values based on the sorted keys + // note: self.keys[i] maps to self.values[i+1] + // self.values[0] does not map to any key. we use it to store the default empty value, + // which is returned when `get(idx)` is called and `idx` does not exist in `self.keys` + for i in 0..N { + // if (sorted_keys.sorted[i] == 0x0d) + // { + // let x = sorted_keys.sort_indices[i]; + // let y = _values[sorted_keys.sort_indices[i]]; + // println(f"i = {i}, sort indices = {x}, value? = {y}"); + // assert(x == -1); + // } + // THIS IS THE BUG: the commented line was the original line + r.values[(sorted_keys.sort_indices[i] + 2) as u32] = _values[i]; + // r.values[i + 2] = _values[sorted_keys.sort_indices[i]]; + } + // insert values that map to our key start and endpoints + // if _keys[0] = 0 then values[0] must equal _values[0], so some conditional logic is required + // (same for _keys[N-1]) + let mut initial_value = T::default(); + if (_keys[0] == 0) { + initial_value = _values[0]; + } + let mut final_value = T::default(); + if (_keys[N - 1] == _maximum) { + final_value = _values[N - 1]; + } + r.values[1] = initial_value; + r.values[N + 2] = final_value; + + // perform boundary checks! + // the maximum size of the sparse array is 2^32 + // we need to check that every element in `self.keys` is less than 2^32 + // because `self.keys` is sorted, we can simply validate that + // sorted_keys.sorted[0] < 2^32 + // sorted_keys.sorted[N-1] < maximum + sorted_keys.sorted[0].assert_max_bit_size::<32>(); + _maximum.assert_max_bit_size::<32>(); + (_maximum - sorted_keys.sorted[N - 1]).assert_max_bit_size::<32>(); + r + } + + /** + * @brief determine whether `target` is present in `self.keys` + * @details if `found == false`, `self.keys[found_index] < target < self.keys[found_index + 1]` + **/ + unconstrained fn search_for_key(self, target: Field) -> (Field, Field) { + let mut found = false; + let mut found_index = 0; + let mut previous_less_than_or_equal_to_target = false; + for i in 0..N + 2 { + // if target = 0xffffffff we need to be able to add 1 here, so use u64 + let current_less_than_or_equal_to_target = self.keys[i] as u64 <= target as u64; + if (self.keys[i] == target) { + found = true; + found_index = i as Field; + break; + } + if (previous_less_than_or_equal_to_target & !current_less_than_or_equal_to_target) { + found_index = i as Field - 1; + break; + } + previous_less_than_or_equal_to_target = current_less_than_or_equal_to_target; + } + (found as Field, found_index) + } + + /** + * @brief return element `idx` from the sparse array + * @details cost is 14.5 gates per lookup + **/ + pub fn get(self, idx: Field) -> T { + // Safety: found and found_index are unconstrained. + let (found, found_index) = unsafe { self.search_for_key(idx) }; + // bool check. 0.25 gates cheaper than a raw `bool` type. need to fix at some point + assert(found * found == found); + + // OK! So we have the following cases to check + // 1. if `found` then `self.keys[found_index] == idx` + // 2. if `!found` then `self.keys[found_index] < idx < self.keys[found_index + 1] + // how do we simplify these checks? + // case 1 can be converted to `self.keys[found_index] <= idx <= self.keys[found_index] + // case 2 can be modified to `self.keys[found_index] + 1 <= idx <= self.keys[found_index + 1] - 1 + // combine the two into the following single statement: + // `self.keys[found_index] + 1 - found <= idx <= self.keys[found_index + 1 - found] - 1 + found + let lhs = self.keys[found_index as u32]; + let rhs = self.keys[(found_index + 1 - found) as u32]; + let lhs_condition = idx - lhs - 1 + found; + let rhs_condition = rhs - 1 + found - idx; + lhs_condition.assert_max_bit_size::<32>(); + rhs_condition.assert_max_bit_size::<32>(); + + // self.keys[i] maps to self.values[i+1] + // however...if we did not find a non-sparse entry, we want to return self.values[0] (the default value) + let value_index = (found_index + 1) * found; + self.values[value_index as u32] + } +} \ No newline at end of file diff --git a/noir/src/utils/transitions.nr b/noir/src/utils/transitions.nr new file mode 100644 index 00000000..4f28209c --- /dev/null +++ b/noir/src/utils/transitions.nr @@ -0,0 +1,143 @@ +use crate::utils::sparse_array::SparseArray; + +// separators for accessing values from byte/curr_state/next_state key in sparse array +global R: u32 = 257; +global R_SQUARED: u32 = R * R; + +/** + * Constrains a regex transition without captures to be valid + * + * @param table - a table (SHOULD BE COMPTIME) that defines valid regex state transitions + * @param haystack_byte - the current byte in the haystack being processed in the regex match + * @param current_state - the current state of the regex automata + * @param next_state - the next state of the regex automata + * @param reached_end_state - a boolean that can toggle off the constraint if end state has already been reached + */ +pub fn check_transition( + table: SparseArray, + haystack_byte: Field, + current_state: Field, + next_state: Field, + reached_end_state: Field, +) { + let key = current_state + haystack_byte as Field * R as Field + next_state * R_SQUARED as Field; + let transition_condition = table.get(key) - 1; + let matched_condition = transition_condition * reached_end_state; + assert(matched_condition == 0, "Invalid Transition"); +} + +/** + * Constrains a regex transition with captures to be valid + * + * @param table - a table (SHOULD BE COMPTIME) that defines valid regex state transitions + * @param haystack_byte - the current byte in the haystack being processed in the regex match + * @param current_state - the current state of the regex automata + * @param next_state - the next state of the regex automata + * @param capture_group - the capture group id for the current state (id set at start and end states of capture group only) + * @param capture_start - boolean indicated if the current state is the start of a capture group defined by capture_group + * @param reached_end_state - a boolean that can toggle off the constraint if end state has already been reached + */ +pub fn check_transition_with_captures( + table: SparseArray, + haystack_byte: Field, + current_state: Field, + next_state: Field, + capture_participations: [Field; NUM_CAPTURE_GROUPS], + capture_starts: [Field; NUM_CAPTURE_GROUPS], + reached_end_state: Field, +) { + let key = current_state + haystack_byte as Field * R as Field + next_state * R_SQUARED as Field; + + let (is_valid, capture_starts_from_table, capture_participations_from_table) = + unpack_sparse_value::(key, table); + + let mut error_accumulator: Field = 1 - is_valid; + let base_weight: Field = 3; + let mut current_power_of_base: Field = base_weight; + for i in 0..NUM_CAPTURE_GROUPS { + let capture_participations_is_set = (capture_participations[i] != 0) as Field; + let capture_starts_is_set = (capture_starts[i] != 0) as Field; + + let participation_difference = + capture_participations_is_set - capture_participations_from_table[i]; + error_accumulator += participation_difference * current_power_of_base; + current_power_of_base = current_power_of_base * base_weight; + + let start_difference = capture_starts_is_set - capture_starts_from_table[i]; + error_accumulator += start_difference * current_power_of_base; + current_power_of_base = current_power_of_base * base_weight; + } + let matched_condition = error_accumulator * reached_end_state; + assert(matched_condition == 0, "Invalid Transition or Capture State Mismatch"); +} + +/** + * Unpacks a transition lookup value + * @dev 8 bit packed (0: valid transition, 1: start of capture group, 2-8: capture group id) + * + * @return (valid, start_capture_group, capture_group_id) + */ +fn unpack_sparse_value( + key: Field, + table: SparseArray, +) -> (Field, [Field; NUM_CAPTURE_GROUPS], [Field; NUM_CAPTURE_GROUPS]) { + // get packed value from lookup table + let value = table.get(key); + std::as_witness(value); + + // Safety: These values need to be unconstrained + let (is_valid, is_capture_starts, capture_participations) = + unsafe { __unpack_sparse_value(value) }; + + let mut recomposed_value = is_valid; + for i in 0..NUM_CAPTURE_GROUPS { + let start_bit_value = (1 << (i + 1) as u8) as Field; + recomposed_value += is_capture_starts[i] * start_bit_value; + } + for i in 0..NUM_CAPTURE_GROUPS { + let participation_bit_position = (i + NUM_CAPTURE_GROUPS + 1) as u8; + let participation_bit_value = (1 << participation_bit_position) as Field; + recomposed_value += capture_participations[i] * participation_bit_value; + } + assert(recomposed_value == value, "Invalid Table Unpacking"); + + // constrain size of values + is_valid.assert_max_bit_size::<1>(); + for i in 0..NUM_CAPTURE_GROUPS { + is_capture_starts[i].assert_max_bit_size::<1>(); + capture_participations[i].assert_max_bit_size::<1>(); + } + + // return the unpacked values + (is_valid, is_capture_starts, capture_participations) +} + +/** + * Helper function to unpack a transition lookup value + * @dev SHOULD ONLY BE CALLED BY `unpack_sparse_value` + * + * @param value - a byte packed with the values + * @return (valid, start_capture_group, capture_group_id) + */ +unconstrained fn __unpack_sparse_value( + value: Field, +) -> (Field, [Field; NUM_CAPTURE_GROUPS], [Field; NUM_CAPTURE_GROUPS]) { + let x = value as u64; + let is_valid = (x & 1) as Field; + + let mut masks = [0; 2 * NUM_CAPTURE_GROUPS]; + let mut is_capture_starts = [0; NUM_CAPTURE_GROUPS]; + let mut capture_participations = [0; NUM_CAPTURE_GROUPS]; + + for i in 0..2 * NUM_CAPTURE_GROUPS { + masks[i] = (1 << (i + 1) as u8); + } + + for i in 0..NUM_CAPTURE_GROUPS { + is_capture_starts[i] = ((x & masks[i]) >> (i + 1) as u8) as Field; + capture_participations[i] = + ((x & masks[NUM_CAPTURE_GROUPS + i]) >> (i + NUM_CAPTURE_GROUPS + 1) as u8) as Field; + } + + (is_valid, is_capture_starts, capture_participations) +} diff --git a/package.json b/package.json deleted file mode 100644 index cf9d72c7..00000000 --- a/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@zk-email/zk-regex", - "version": "2.3.2", - "private": true, - "description": "zk regex circuit for content attestation", - "main": "pkg/zk_regex_compiler_bg.wasm", - "workspaces": [ - "packages/*" - ], - "contributors": [ - "Sora Suegami ", - "Yush G ", - "Javier Su ", - "Kata Choi ", - "Aditya Bisht " - ], - "scripts": { - "install": "yarn workspaces -pt run install", - "build": "yarn workspaces -pt run build", - "postinstall": "cargo install --path ./packages/compiler", - "test": "yarn workspaces -pt run test", - "upload-binary": "yarn workspaces -pt run upload-binary" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/zk-email-verify/zk-regex.git" - }, - "keywords": [ - "circom", - "circuit", - "regex", - "zk", - "attestation" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/zk-email-verify/zk-regex/issues" - }, - "homepage": "https://github.com/zk-email-verify/zk-regex#readme", - "devDependencies": { - "@babel/core": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.15", - "@babel/preset-env": "^7.22.2", - "@babel/preset-react": "^7.22.0", - "@types/jest": "^29.5.4", - "babel-jest": "^29.5.0", - "babel-preset-jest": "^29.5.0", - "jest": "^29.5.0", - "prettier": "^3.0.0", - "prettier-plugin-solidity": "^1.1.3" - }, - "engines": { - "yarn": "^1.22.0" - } -} \ No newline at end of file diff --git a/packages/apis/.gitignore b/packages/apis/.gitignore deleted file mode 100644 index 6d41026b..00000000 --- a/packages/apis/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -target -**/node_modules -**/.DS_Store -npm-debug.log* diff --git a/packages/apis/Cargo.toml b/packages/apis/Cargo.toml deleted file mode 100644 index cbe9633e..00000000 --- a/packages/apis/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -name = "zk-regex-apis" -version = "2.3.2" -license = "MIT" -edition = "2018" -authors = [ - "Javier Su ", - "Kata Choi ", - "Sora Suegami ", - "Yush G ", - "Aditya Bisht ", -] - -[lib] -crate-type = ["rlib", "cdylib"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -# zk-regex-compiler = { path = "../compiler", default-features = false } -serde = { version = "1.0.159", features = ["derive"] } -fancy-regex = "0.13.0" -itertools = "0.13.0" -thiserror = "1.0.40" -serde_json = "1.0.95" -wasm-bindgen = "0.2" -serde-wasm-bindgen = "0.6.5" -js-sys = "0.3.69" -wasm-bindgen-test = "0.3.42" -console_error_panic_hook = "0.1.7" diff --git a/packages/apis/README.md b/packages/apis/README.md deleted file mode 100644 index 57a0bc05..00000000 --- a/packages/apis/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# zk-regex-apis - -Helpful nodejs/Rust APIs in [zk-regex](https://github.com/zkemail/zk-regex/tree/main). - -## Installing zk-regex-apis - -Installing zk-regex-apis requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). - -You can install the project with npm. In the project directory, run: - -```sh -$ npm install -``` - -This fully installs the project, including installing any dependencies and running the build. - -## Building zk-regex-apis - -If you have already installed the project and only want to run the build, run: - -```sh -$ npm run build -``` - -## Compiling zk-regex-apis to wasm - -### For web usage -Install `wasm-pack` if not already installed - -```sh -cargo install wasm-pack -``` - -Compile the web package - -```sh -wasm-pack build --target nodejs -``` - -Pack the package (optional) - -```sh -wasm-pack build --target nodejs -cd pkg -npm pkg set type='module' -wasm-pack pack -``` - -The output package file will be `packages/compiler/pkg/zk-regex-apis-1.1.1.tgz` - -### For tests - -```sh -wasm-pack test --node -``` - -## Available Scripts - -In the project directory, you can run: - -### `npm install` - -Installs the project, including running `npm run build`. - -### `npm build` - -Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm build` and `npm build-*` commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): - -``` -npm run build -- --feature=beetle -``` - -#### `npm build-debug` - -Alias for `npm build`. - -#### `npm build-release` - -Same as [`npm build`](#npm-build) but, builds the module with the [`release`](https://doc.rust-lang.org/cargo/reference/profiles.html#release) profile. Release builds will compile slower, but run faster. - -### `npm test` - -Runs the unit tests by calling `wasm-pack test --node`. - -## Project Layout - -The directory structure of this project is: - -``` -zk-regex-compiler/ -├── Cargo.toml -├── README.md -├── package.json -├── src/ -| └── lib.rs -└── target/ -``` - -### Cargo.toml - -The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. - -### README.md - -This file. - -### package.json - -The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. - -### src/ - -The directory tree containing the Rust source code for the project. - -### src/lib.rs - -The Rust library's main module. - -### target/ - -Binary artifacts generated by the Rust build. diff --git a/packages/apis/package.json b/packages/apis/package.json deleted file mode 100644 index a20dcfc3..00000000 --- a/packages/apis/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@zk-email/zk-regex-apis", - "version": "2.3.2", - "description": "apis compatible with [zk-regex](https://github.com/zkemail/zk-regex/tree/main).", - "contributors": [ - "Javier Su ", - "Kata Choi ", - "Sora Suegami ", - "Yush G ", - "Aditya Bisht " - ], - "repository": { - "type": "git", - "url": "git+https://github.com/zkemail/zk-regex.git" - }, - "scripts": { - "build": "wasm-pack build --target nodejs --out-dir ./pkg/", - "build-debug": "npm run build --", - "build-release": "npm run build --", - "install": "npm run build-debug", - "install-release": "npm run build-release", - "test": "cargo test && wasm-pack test --node && bun test", - "test-js": "jest", - "upload-binary": "wasm-pack publish -t nodejs" - }, - "license": "MIT", - "devDependencies": { - "@types/jest": "^29.5.13", - "jest": "^29.7.0" - } -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/body_hash.json b/packages/apis/src/decomposed_defs/body_hash.json deleted file mode 100644 index 354421e6..00000000 --- a/packages/apis/src/decomposed_defs/body_hash.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)dkim-signature:" - }, - { - "is_public": false, - "regex_def": "([a-z]+=[^;]+; )+bh=" - }, - { - "is_public": true, - "regex_def": "[a-zA-Z0-9+/=]+" - }, - { - "is_public": false, - "regex_def": ";" - } - ] -} diff --git a/packages/apis/src/decomposed_defs/email_addr.json b/packages/apis/src/decomposed_defs/email_addr.json deleted file mode 100644 index 2b45be14..00000000 --- a/packages/apis/src/decomposed_defs/email_addr.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/email_domain.json b/packages/apis/src/decomposed_defs/email_domain.json deleted file mode 100644 index 7051e3ab..00000000 --- a/packages/apis/src/decomposed_defs/email_domain.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./]+@" - }, - { - "is_public": true, - "regex_def": "[A-Za-z0-9.\\-@]+" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/from_addr.json b/packages/apis/src/decomposed_defs/from_addr.json deleted file mode 100644 index 67532574..00000000 --- a/packages/apis/src/decomposed_defs/from_addr.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)from:" - }, - { - "is_public": false, - "regex_def": "([^\r\n]+<)?" - }, - { - "is_public": true, - "regex_def": "[^<>]+" - }, - { - "is_public": false, - "regex_def": ">?\r\n" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/from_all.json b/packages/apis/src/decomposed_defs/from_all.json deleted file mode 100644 index a38aa7e6..00000000 --- a/packages/apis/src/decomposed_defs/from_all.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)from:" - }, - { - "is_public": true, - "regex_def": "[^\r\n]+" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/message_id.json b/packages/apis/src/decomposed_defs/message_id.json deleted file mode 100644 index b9d12277..00000000 --- a/packages/apis/src/decomposed_defs/message_id.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)message-id:" - }, - { - "is_public": true, - "regex_def": "<[A-Za-z0-9=@\\.\\+_-]+>" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} diff --git a/packages/apis/src/decomposed_defs/subject_all.json b/packages/apis/src/decomposed_defs/subject_all.json deleted file mode 100644 index 9b544475..00000000 --- a/packages/apis/src/decomposed_defs/subject_all.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)subject:" - }, - { - "is_public": true, - "regex_def": "[^\r\n]+" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} diff --git a/packages/apis/src/decomposed_defs/timestamp.json b/packages/apis/src/decomposed_defs/timestamp.json deleted file mode 100644 index a3c945b3..00000000 --- a/packages/apis/src/decomposed_defs/timestamp.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)dkim-signature:" - }, - { - "is_public": false, - "regex_def": "([a-z]+=[^;]+; )+t=" - }, - { - "is_public": true, - "regex_def": "[0-9]+" - }, - { - "is_public": false, - "regex_def": ";" - } - ] -} diff --git a/packages/apis/src/decomposed_defs/to_addr.json b/packages/apis/src/decomposed_defs/to_addr.json deleted file mode 100644 index 394a26be..00000000 --- a/packages/apis/src/decomposed_defs/to_addr.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)to:" - }, - { - "is_public": false, - "regex_def": "([^\r\n]+<)?" - }, - { - "is_public": true, - "regex_def": "[^<>]+" - }, - { - "is_public": false, - "regex_def": ">?\r\n" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/decomposed_defs/to_all.json b/packages/apis/src/decomposed_defs/to_all.json deleted file mode 100644 index 76be9fdb..00000000 --- a/packages/apis/src/decomposed_defs/to_all.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)to:" - }, - { - "is_public": true, - "regex_def": "[^\r\n]+" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} \ No newline at end of file diff --git a/packages/apis/src/extract_substrs.rs b/packages/apis/src/extract_substrs.rs deleted file mode 100644 index f975e5ee..00000000 --- a/packages/apis/src/extract_substrs.rs +++ /dev/null @@ -1,435 +0,0 @@ -use fancy_regex::Regex; -use serde::{Deserialize, Serialize}; -use thiserror::Error; - -/// A configuration of decomposed regexes. -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DecomposedRegexConfig { - pub parts: Vec, -} - -/// Decomposed regex part. -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct RegexPartConfig { - /// A flag indicating whether the substring matching with `regex_def` should be exposed. - #[serde(alias = "isPublic")] - pub is_public: bool, - /// A regex string. - #[serde(alias = "regexDef")] - pub regex_def: String, -} - -/// Error definitions of the compiler. -#[derive(Error, Debug)] -pub enum ExtractSubstrssError { - // #[error("The max length is {} but the input length is {}",.0,.1)] - // InvalidInputLen(usize, usize), - #[error("Substring of the entire regex {} is not found given input_str",.0)] - SubstringOfEntireNotFound(Regex), - #[error("Substring of {} is not found in given input_str",.0)] - SubstringNotFound(Regex, String), - #[error(transparent)] - RegexError(#[from] fancy_regex::Error), - #[error("Invalid regex in parts, index {part_index}: '{regex_def}' - {error}")] - InvalidRegexPart { - part_index: usize, - regex_def: String, - error: fancy_regex::Error, - }, -} - -pub fn extract_substr_idxes( - input_str: &str, - regex_config: &DecomposedRegexConfig, - reveal_private: bool, -) -> Result, ExtractSubstrssError> { - // Validate each regex part individually, to throw better errors - for (i, part) in regex_config.parts.iter().enumerate() { - Regex::new(&part.regex_def).map_err(|e| ExtractSubstrssError::InvalidRegexPart { - part_index: i, - regex_def: part.regex_def.clone(), - error: e, - })?; - } - - // Construct the full regex pattern with groups for each part - let mut entire_regex_str = String::new(); - for (_, part) in regex_config.parts.iter().enumerate() { - let adjusted_regex_def = part.regex_def.replace("(", "(?:"); - entire_regex_str += &format!("({})", adjusted_regex_def); - } - - // Compile the entire regex - // This should be impossible to fail, since we tested the seperate regex parts before. - let entire_regex = Regex::new(&entire_regex_str).unwrap(); - - // Find the match for the entire regex - let entire_captures = entire_regex - .captures(input_str) - .map_err(|_| ExtractSubstrssError::SubstringOfEntireNotFound(entire_regex.clone()))? - .ok_or_else(|| ExtractSubstrssError::SubstringOfEntireNotFound(entire_regex.clone()))?; - - let mut public_idxes = vec![]; - - // Iterate over each part to extract the relevant indices - for (i, part) in regex_config.parts.iter().enumerate() { - if part.is_public || reveal_private { - if let Some(matched) = entire_captures.get(i + 1) { - // Capture group indices are 1-based - public_idxes.push((matched.start(), matched.end())); - } - } - } - - Ok(public_idxes) -} - -pub fn extract_substr( - input_str: &str, - regex_config: &DecomposedRegexConfig, - reveal_private: bool, -) -> Result, ExtractSubstrssError> { - let substr_idxes = extract_substr_idxes(input_str, regex_config, reveal_private)?; - - let result: Vec = substr_idxes - .iter() - .map(|&(start, end)| input_str[start..end].to_string()) - .collect(); - - Ok(result) -} - -pub fn extract_email_addr_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/email_addr.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_email_domain_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/email_domain.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -// pub fn extract_email_addr_with_name_idxes( -// input_str: &str, -// ) -> Result, ExtractSubstrssError> { -// let regex_config = include_str!("./decomposed_defs/email_addr_with_name.json"); -// extract_substr_idxes(input_str, &serde_json::from_str(regex_config).unwrap()) -// } - -pub fn extract_from_all_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/from_all.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_from_addr_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/from_addr.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_to_all_idxes(input_str: &str) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/to_all.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_to_addr_idxes(input_str: &str) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/to_addr.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_subject_all_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/subject_all.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_body_hash_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/body_hash.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_timestamp_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/timestamp.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -pub fn extract_message_id_idxes( - input_str: &str, -) -> Result, ExtractSubstrssError> { - let regex_config = include_str!("./decomposed_defs/message_id.json"); - extract_substr_idxes( - input_str, - &serde_json::from_str(regex_config).unwrap(), - false, - ) -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_email_domain_valid() { - let input_str = "suegamisora@gmail.com"; - let idxes = extract_email_domain_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(12, 21)]); - } - - #[test] - fn test_email_addr_in_subject_valid() { - let input_str = "This is sent for suegamisora@gmail.com"; - let idxes = extract_email_addr_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(17, 38)]); - } - - // #[test] - // fn test_email_addr_with_name_valid1() { - // let input_str = "from:dummy@a.com "; - // let idxes = extract_email_addr_with_name_idxes(input_str).unwrap(); - // assert_eq!(idxes, vec![(18, 39)]); - // } - - // #[test] - // fn test_email_addr_with_name_valid2() { - // // "末神 奏宙" has 13 bytes. - // let input_str = "from:\"末神 奏宙\" "; - // let idxes = extract_email_addr_with_name_idxes(input_str).unwrap(); - // assert_eq!(idxes, vec![(22, 43)]); - // } - - #[test] - fn test_email_from_all_valid() { - let input_str = "from:dummy@a.com \r\n"; - let idxes = extract_from_all_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(5, 40)]); - } - - #[test] - fn test_email_from_addr_valid() { - let input_str = "from:dummy@a.com \r\n"; - let idxes = extract_from_addr_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(18, 39)]); - } - - #[test] - fn test_code_in_email_address_valid() { - let code_regex = DecomposedRegexConfig { - // max_byte_size: 1024, - parts: vec![ - RegexPartConfig { - is_public: false, - regex_def: "ACCOUNTKEY.0x".to_string(), - // max_size: 7, - // solidity: None - }, - RegexPartConfig { - is_public: true, - regex_def: "(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)+".to_string(), - // max_size: 6, - // solidity: None - }, - ], - }; - let input_str = "sepolia+ACCOUNTKEY.0xabc123@sendeth.org"; - let idxes = extract_substr_idxes(input_str, &code_regex, false).unwrap(); - assert_eq!(idxes, vec![(21, 27)]); - } - - #[test] - fn test_error_handling() { - let code_regex = DecomposedRegexConfig { - // max_byte_size: 1024, - parts: vec![ - RegexPartConfig { - is_public: false, - regex_def: "Hello ".to_string(), - }, - RegexPartConfig { - is_public: true, - regex_def: "[^,+".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "!".to_string(), - }, - ], - }; - let input_str = "Hello Mamba!"; - let result = extract_substr_idxes(input_str, &code_regex, false); - assert!(result.is_err()); - assert_eq!( - "Invalid regex in parts, index 1: '[^,+' - Parsing error at position 4: Invalid character class", - result.unwrap_err().to_string() - ); - } - - #[test] - fn test_body_hash_valid() { - let input_str = "dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b="; - let idxes = extract_body_hash_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(219, 263)]); - } - - #[test] - fn test_timestamp_valid() { - let input_str = "dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b="; - let idxes = extract_timestamp_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(80, 90)]); - } - - #[test] - fn test_message_id_valid() { - let input_str = - "message-id:\r\n"; - let idxes = extract_message_id_idxes(input_str).unwrap(); - assert_eq!(idxes, vec![(11, 79)]); - } - - #[test] - fn test_dot_plus_valid() { - let code_regex = DecomposedRegexConfig { - parts: vec![ - RegexPartConfig { - is_public: false, - regex_def: "a".to_string(), - }, - RegexPartConfig { - is_public: true, - regex_def: ".+?".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "b".to_string(), - }, - ], - }; - let input_str = "azb"; - let idxes = extract_substr_idxes(input_str, &code_regex, false).unwrap(); - assert_eq!(idxes, vec![(1, 2)]); - } - - #[test] - fn test_dot_question_valid() { - let code_regex = DecomposedRegexConfig { - parts: vec![ - RegexPartConfig { - is_public: true, - regex_def: ".??".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "b".to_string(), - }, - ], - }; - let input_str = "b"; - let idxes = extract_substr_idxes(input_str, &code_regex, false).unwrap(); - assert_eq!(idxes, vec![(0, 0)]); - } - - #[test] - fn extract_str_hide_private() { - let code_regex = DecomposedRegexConfig { - parts: vec![ - RegexPartConfig { - is_public: true, - regex_def: "Hello ".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "guys!".to_string(), - }, - ], - }; - let input_str = "some email: Hello guys! Best, ZK Email"; - let strs = extract_substr(input_str, &code_regex, false).unwrap(); - assert_eq!(strs, vec!["Hello ".to_string()]); - } - - #[test] - fn extract_str_show_private() { - let code_regex = DecomposedRegexConfig { - parts: vec![ - RegexPartConfig { - is_public: true, - regex_def: "Hello ".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "guys!".to_string(), - }, - ], - }; - let input_str = "some email: Hello guys! Best, ZK Email"; - let strs = extract_substr(input_str, &code_regex, true).unwrap(); - assert_eq!(strs, vec!["Hello ".to_string(), "guys!".to_string()]); - } - - #[test] - fn extract_str_empty_vec_all_private() { - let code_regex = DecomposedRegexConfig { - parts: vec![ - RegexPartConfig { - is_public: false, - regex_def: "Hello ".to_string(), - }, - RegexPartConfig { - is_public: false, - regex_def: "guys!".to_string(), - }, - ], - }; - let input_str = "some email: Hello guys! Best, ZK Email"; - let strs = extract_substr(input_str, &code_regex, false).unwrap(); - let empty_vec: Vec = Vec::new(); - assert_eq!(strs, empty_vec); - } -} diff --git a/packages/apis/src/lib.rs b/packages/apis/src/lib.rs deleted file mode 100644 index 420fb0e2..00000000 --- a/packages/apis/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod extract_substrs; -pub mod padding; -#[cfg(target_arch = "wasm32")] -mod wasm; -#[cfg(target_arch = "wasm32")] -pub use crate::wasm::*; diff --git a/packages/apis/src/padding.rs b/packages/apis/src/padding.rs deleted file mode 100644 index f399ecee..00000000 --- a/packages/apis/src/padding.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub fn pad_string(str: &str, padded_bytes_size: usize) -> Vec { - let mut padded_bytes = str.as_bytes().to_vec(); - padded_bytes.append(&mut vec![0; padded_bytes_size - padded_bytes.len()]); - padded_bytes -} diff --git a/packages/apis/src/wasm.rs b/packages/apis/src/wasm.rs deleted file mode 100644 index 5d31cf8e..00000000 --- a/packages/apis/src/wasm.rs +++ /dev/null @@ -1,179 +0,0 @@ -use crate::extract_substrs::*; -use crate::*; -use console_error_panic_hook; -use js_sys::Array; -use serde_json::Value; -use std::panic; -use wasm_bindgen::prelude::*; - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn padString(str: &str, paddedBytesSize: usize) -> Array { - let padded_bytes = padding::pad_string(str, paddedBytesSize); - - let arr = Array::new_with_length(padded_bytes.len() as u32); - for (i, byte) in padded_bytes.iter().enumerate() { - arr.set(i as u32, JsValue::from(*byte)); - } - - arr -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractSubstrIdxes( - inputStr: &str, - regexConfig: JsValue, - reveal_private: bool, -) -> Result { - let regex_config = parse_js_regex_config(regexConfig)?; - - let idxes = extract_substrs::extract_substr_idxes(inputStr, ®ex_config, reveal_private) - .map_err(|e| { - println!("e: {:?}", e); - let error_msg = format!("Failed to extract indxes: {}", e); - JsValue::from_str(&error_msg) - })?; - - let arr = Array::new_with_length(idxes.len() as u32); - for (i, idx) in idxes.iter().enumerate() { - let js_arr = Array::new_with_length(2); - js_arr.set(0, JsValue::from(idx.0 as u32)); - js_arr.set(1, JsValue::from(idx.1 as u32)); - arr.set(i as u32, JsValue::from(js_arr)); - } - - Ok(arr) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractSubstr( - inputStr: &str, - regexConfig: JsValue, - reveal_private: bool, -) -> Result { - let regex_config = parse_js_regex_config(regexConfig)?; - - let result_strs = extract_substrs::extract_substr(inputStr, ®ex_config, reveal_private) - .map_err(|e| { - println!("e: {:?}", e); - let error_msg = format!("Failed to extract strings: {}", e); - JsValue::from_str(&error_msg) - })?; - - let js_array = Array::new_with_length(result_strs.len() as u32); - for (i, s) in result_strs.into_iter().enumerate() { - js_array.set(i as u32, JsValue::from_str(&s)); - } - - Ok(js_array) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractEmailAddrIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/email_addr.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractEmailDomainIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/email_domain.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -// #[wasm_bindgen] -// #[allow(non_snake_case)] -// pub fn extractEmailAddrWithNameIdxes(inputStr: &str) -> Array { -// let regex_config = include_str!("./decomposed_defs/email_addr_with_name.json"); -// extractSubstrIdxes(inputStr, JsValue::from_str(regex_config)) -// } - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractFromAllIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/from_all.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractFromAddrIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/from_addr.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractToAllIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/to_all.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractToAddrIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/to_addr.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractSubjectAllIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/subject_all.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractBodyHashIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/body_hash.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractTimestampIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/timestamp.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn extractMessageIdIdxes(inputStr: &str) -> Result { - let regex_config = include_str!("./decomposed_defs/message_id.json"); - extractSubstrIdxes(inputStr, JsValue::from_str(regex_config), false) -} - -// Accepts regexConfig either as string or js object -fn parse_js_regex_config(regex_config: JsValue) -> Result { - // Checks if regexConfig is passed as string or object - // As string - let parsed_config: DecomposedRegexConfig = if regex_config.is_string() { - let config_str = regex_config.as_string().unwrap(); - serde_json::from_str(&config_str).map_err(|e| { - let error_msg = format!("Failed to parse JSON string: {}", e); - JsValue::from_str(&error_msg) - })? - // As object - } else { - serde_wasm_bindgen::from_value(regex_config).map_err(|e| { - let error_msg = simplify_error(&e); - JsValue::from_str(&error_msg) - })? - }; - - Ok(parsed_config) -} - -fn simplify_error(e: &serde_wasm_bindgen::Error) -> String { - let error_string = e.to_string(); - if let Some(json_error) = serde_json::from_str::(&error_string).ok() { - if let Some(message) = json_error["message"].as_str() { - return message.to_string(); - } - } - error_string -} diff --git a/packages/apis/tests/airbnb_eml.ts b/packages/apis/tests/airbnb_eml.ts deleted file mode 100644 index 64e68bdd..00000000 --- a/packages/apis/tests/airbnb_eml.ts +++ /dev/null @@ -1,1146 +0,0 @@ -export default `Delivered-To: dimitridumonet@gmail.com -Received: by 2002:a0c:fecd:0:b0:6c3:6081:347f with SMTP id z13csp81193qvs; - Thu, 10 Oct 2024 16:19:45 -0700 (PDT) -X-Google-Smtp-Source: AGHT+IEd0XrzNnTswxWNTmEZgIArn+BlrkDF1vp1CyMewhYGmJAj19KVofiC8WRBHgTjYX7aQ6Cc -X-Received: by 2002:a05:6214:3b86:b0:6cb:e662:c59a with SMTP id 6a1803df08f44-6cbeff36cf0mr10369186d6.11.1728602385043; - Thu, 10 Oct 2024 16:19:45 -0700 (PDT) -ARC-Seal: i=1; a=rsa-sha256; t=1728602385; cv=none; - d=google.com; s=arc-20240605; - b=E0qFuaOfdPQc+Ld1vLPYWAZYD+jbI5AzUeQ/wL7UcJv1SSr0Pl4Ku+LBuzDOG+Gai+ - Pfn9ZHwXjMEFk/nZJw9RiXP3/c8y+0oi5dx4ojupMriS3WzsGB3r/T5+tLz7HDiMP8Zk - f7zRkqEeCIY0OUJU/QMfxAdRmCUmE9TsqnKJ7e+Pf4Y1sIHwo0eoEGz0afHsizoaPOTJ - KtUB0VYLLC/JmaPnpUZcD/biZRQgCsaL0XPLBvIK/URHnZniPM/hgB/9nQ24lJVX9/ZP - tRT8yxnlmHDcfiauoSzVmBwC9Gh6+JFXoNC0mOkK1t7/RhPlSpPVj1RzhJHEwH+JPTn4 - EkvQ== -ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; - h=to:priority:importance:bimi-selector:reply-to:subject:message-id - :mime-version:from:date:dkim-signature:dkim-signature; - bh=qRjFxOyp02fNtl8fsqa9P9TfXf+KOCimKHiS6d8XZa8=; - fh=wfDbold4LZmvpOGNo2jQk0a98jfSD+kr9vmhclYezSA=; - b=ghyFgwCF/FyqVXrbUiiuPSa3Zu4yHwcLH6VIB/duhMOfiI3VTyV4QIduL41MfNnbg+ - gMe5x1JrkHdevne5zP1JRtR6cUPiyW2Rah6tXNsmxRPOJr2oqgq3SAorXRkLTX3VRoe9 - wv51uWUNGaVmfSS6mLmtmADlISwaV8Q47cusyUOnowVtvcAO3BtNnfMNUsR/eblplWiH - VkuRbS61kqnnh8jL8Xj4LUj4lYvfhUPvwY6gGv2MET6OZu5+mdsr69RJ42mOIezZuDqy - ZntooVCjbBCmRMKC3GzYq/tCJGtA5/EtGnd3PdZI+A0P/Z+WnTpH+HZZmgy0+XG/U38m - GeWw==; - dara=google.com -ARC-Authentication-Results: i=1; mx.google.com; - dkim=pass header.i=@email.airbnb.com header.s=s20150428 header.b=i5GLT4zT; - dkim=pass header.i=@sendgrid.info header.s=smtpapi header.b=D3G4ED+y; - spf=pass (google.com: domain of bounces+168748-181c-dimitridumonet=gmail.com@email.airbnb.com designates 50.31.32.157 as permitted sender) smtp.mailfrom="bounces+168748-181c-dimitridumonet=gmail.com@email.airbnb.com"; - dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=airbnb.com -Return-Path: -Received: from o11.email.airbnb.com (o11.email.airbnb.com. [50.31.32.157]) - by mx.google.com with ESMTPS id 6a1803df08f44-6cbe85e049asi24990216d6.161.2024.10.10.16.19.44 - for - (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); - Thu, 10 Oct 2024 16:19:45 -0700 (PDT) -Received-SPF: pass (google.com: domain of bounces+168748-181c-dimitridumonet=gmail.com@email.airbnb.com designates 50.31.32.157 as permitted sender) client-ip=50.31.32.157; -Authentication-Results: mx.google.com; - dkim=pass header.i=@email.airbnb.com header.s=s20150428 header.b=i5GLT4zT; - dkim=pass header.i=@sendgrid.info header.s=smtpapi header.b=D3G4ED+y; - spf=pass (google.com: domain of bounces+168748-181c-dimitridumonet=gmail.com@email.airbnb.com designates 50.31.32.157 as permitted sender) smtp.mailfrom="bounces+168748-181c-dimitridumonet=gmail.com@email.airbnb.com"; - dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=airbnb.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=email.airbnb.com; - h=content-type:from:mime-version:subject:reply-to:x-feedback-id:to:cc: - content-type:from:subject:to; - s=s20150428; bh=qRjFxOyp02fNtl8fsqa9P9TfXf+KOCimKHiS6d8XZa8=; - b=i5GLT4zTtTTSt901iUHFaQ9de9Ai4d01FdDK4MVZ3NsL7h8mN7IBr2iIpmv6AM0Q2Cok - 3hGxRysyIAF7fQ3qR1/drVCuzh0v5AQPu2tf3hbPv/+BCHLiD4sVt9iPY3FBbo/UnFNEqz - 0UjR4IfLboxLkdHv5/cSmEovnKoj0RX5k= -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.info; - h=content-type:from:mime-version:subject:reply-to:x-feedback-id:to:cc: - content-type:from:subject:to; - s=smtpapi; bh=qRjFxOyp02fNtl8fsqa9P9TfXf+KOCimKHiS6d8XZa8=; - b=D3G4ED+yMdDJd90YTuhqvFdCDTfCU/cjAxBmB2MdDA9YquweURwttkoHraS02sYUznUK - pg15OmQzP4WbAB2PRJAtSNF28FrZJOxs68ss7tEVAcF9YqHaYj6F5j/sMCZunhnr1aBJfY - MMr8i8FPie9OlpKFcCG4y4VX0DtjHzBQ8= -Received: by recvd-fdb77b5cb-l2cqh with SMTP id recvd-fdb77b5cb-l2cqh-1-67086110-34 - 2024-10-10 23:19:44.63636295 +0000 UTC m=+2438527.951122372 -Received: from MTY4NzQ4 (unknown) - by geopod-ismtpd-20 (SG) with HTTP - id ozjDOM3PS6WltaTtjuJFaA - Thu, 10 Oct 2024 23:19:44.626 +0000 (UTC) -Content-Type: multipart/alternative; boundary=49a8ec9b277e6a96e7373b3e4727df74d25ab6158dd0a8fb1221118a1304 -Date: Thu, 10 Oct 2024 23:19:44 +0000 (UTC) -From: Airbnb -Mime-Version: 1.0 -Message-ID: -Subject: RE: Reservation at Luxurious 5B/3BA home Nob Hill! for 22 September - 2024 - 22 October 2024 -Reply-To: "Isabella (Airbnb)" - <4of5lutm2rzokajdtd2j25ek6whsg045r01d@reply.airbnb.com> -X-Priority: 1 -X-Category: message -X-Strategy: push_and_email_and_web_push -X-rpcampaign: airbnb20241010152328760092722452715530303223890373903 -X-Locale: en-GB -X-Message-Package-UUID: 7e892d74-33f4-ebf8-ef9a-cba7f9c2c579 -BIMI-Selector: v=BIMI1; s=belov2; -X-User-ID: 467606067 -X-MSMail-Priority: High -Return-Path: express@airbnb.com -Importance: high -Priority: Urgent -X-Template: homes_messaging/new_message -X-Feedback-ID: 168748:SG -X-SG-EID: - =?us-ascii?Q?u001=2E373TPjtMqGbzwgRnUiLO4aQplIiW+Q7azdMrDCU1iICBGcf7GI8fS8Yas?= - =?us-ascii?Q?=2FrvZ5srvc=2FUg+Y3QtuuZu8t9IoQj8U67X=2Ftferm?= - =?us-ascii?Q?GqR0cRkWsdIQdo0l4Ezae3j01oY06yQrm91GBfs?= - =?us-ascii?Q?5cx=2FNZOz3bvJt7R7OpkA=2FGLSMdeFwqzm9dhpSx8?= - =?us-ascii?Q?YqLodw=2FoFKqS178kFLThUhL1OMuR7EJqMudXl81?= - =?us-ascii?Q?Z1ab7TzKTs=2F1Ok7Pkf8CSI=3D?= -X-SG-ID: - =?us-ascii?Q?u001=2ESdBcvi+Evd=2FbQef8eZF3BqZ9cHLZlaQH8LGBOs0K2+F024wgXfxgfZf8o?= - =?us-ascii?Q?wozgZzIDr0SWjqkz0Hzl15He+3JiV4qiZ3NftmN?= - =?us-ascii?Q?AQKXfQpNpidNvJalNic6JYjllxfNAmK52O3GlhD?= - =?us-ascii?Q?FOjjI2YBmc2SQ5GYtyJGmycybZOQvvNcazI85yt?= - =?us-ascii?Q?mPQq+Hz8fniF9EjPeVlfxQ0CoVMew0o+IUL9q46?= - =?us-ascii?Q?+hi7Q+9jQAOPMZV=2FIZ4e3JazWnV58Av2FlUBtP0?= - =?us-ascii?Q?yA=2F5kfOMtemfJB+3OWwPtttyQF8gCtEFp3cmd6m?= - =?us-ascii?Q?39i+4FRprLKQypcH6HFCAg0WHbhyiK=2Fa+8ZWE5i?= - =?us-ascii?Q?OTyPI3ajl5gFGwtrbgYnMTHOAERzqQMstiK3=2F=2F0?= - =?us-ascii?Q?EpJEOMxvs8rkjoxbWnvEWjQMiJSyk+=2F2q6FDbow?= - =?us-ascii?Q?s=2FGRpDmfjJeaiTN0jI8QLdDkHCWdfuPY5jnt8Xv?= - =?us-ascii?Q?pX8cfwsbZpmoZflQ8PrIjcd=2FkxK7Gf4e5krU4Md?= - =?us-ascii?Q?nzRx3=2FxRRYLEzocKrzMv=2FP1hpAC+RN7GKeKaosl?= - =?us-ascii?Q?PD7zzN0jSqkzXnN1CKlcNYEygz0tPE=3D?= -To: dimitridumonet@gmail.com -X-Entity-ID: u001.xNm+654l4yZx3FKLl1hq6g== - ---49a8ec9b277e6a96e7373b3e4727df74d25ab6158dd0a8fb1221118a1304 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; charset=iso-8859-1 -Mime-Version: 1.0 - -%opentrack% - -https://www.airbnb.co.uk/?c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzYWdl&= -euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579 - -RE: RESERVATION AT LUXURIOUS 5B/3BA HOME NOB HILL! FOR 22 -SEPTEMBER 2024 - 22 OCTOBER 2024 - -For your protection and safety, always communicate through -Airbnb -[https://www.airbnb.co.uk/help/article/209?c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5n= -L25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579]. - - Isabella - =20 - Hello guys! I need to let you know that the owner has - scheduled a FaceTime tour with a long term group this - Saturday at 1:30pm. - I apologize for the inconvenience and - Thank you for the cooperation. - -Reply -[https://www.airbnb.co.uk/messaging/thread/1919382305?thread_type=3Dhome_bo= -oking&c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzYWdl&euid=3D7e892d74-33f4= --ebf8-ef9a-cba7f9c2c579] - -Respond to Isabella by replying directly to this email. - -https://www.airbnb.co.uk/rooms/1193537369002070065?c=3D.pi80.pkaG9tZXNfbWVz= -c2FnaW5nL25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579 - -RESERVATION DETAILS - -Luxurious 5B/3BA home Nob Hill! - -Rental unit - Entire home/flat hosted by Isabella - -GUESTS - -10 guests - - CHECK-IN CHECKOUT - =20 -Sunday Tuesday - =20 -22 September 2024 22 October 2024 - - https://www.airbnb.co.uk/external_link?c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL= -25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579&url=3Dhttps%3A%= -2F%2Fwww.facebook.com%2Fairbnb https://www.airbnb.co.uk/external_link?c= -=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-e= -f9a-cba7f9c2c579&url=3Dhttps%3A%2F%2Fwww.instagram.com%2Fairbnb https://w= -ww.airbnb.co.uk/external_link?c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzY= -Wdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579&url=3Dhttps%3A%2F%2Ftwitter= -.com%2FAirbnb - -Airbnb Ireland UC - -8 Hanover Quay - -Dublin 2, Ireland - -Get the Airbnb app - -https://www.airbnb.co.uk/external_link?c=3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25l= -d19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579&url=3Dhttps%3A%2F%= -2Fairbnb.sng.link%2FA6f9up%2Fdvs6%3F_smtype%3D3%26pcid%3D.pi80.pkaG9tZXNfbW= -Vzc2FnaW5nL25ld19tZXNzYWdl https://www.airbnb.co.uk/external_link?c=3D.pi= -80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cb= -a7f9c2c579&url=3Dhttps%3A%2F%2Fairbnb.sng.link%2FA6f9up%2Fqh0lc%3Fid%3Dcom.= -airbnb.android%26pcid%3D.pi80.pkaG9tZXNfbWVzc2FnaW5nL25ld19tZXNzYWdl =20 - -Update your email preferences -[https://www.airbnb.co.uk/account-settings/notifications?c=3D.pi80.pkaG9tZX= -NfbWVzc2FnaW5nL25ld19tZXNzYWdl&euid=3D7e892d74-33f4-ebf8-ef9a-cba7f9c2c579] -to choose which emails you get or unsubscribe -[https://www.airbnb.co.uk/account-settings/email-unsubscribe?email_type=3Df= -alse&mac=3DQJmdxe1CU5PXPvaEGjcsQ6TT5b4%3D&token=] -from this type of email. - -=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ---49a8ec9b277e6a96e7373b3e4727df74d25ab6158dd0a8fb1221118a1304 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/html; charset=iso-8859-1 -Mime-Version: 1.0 - -
3D""
<= -/tbody>
3D"Airbnb"

RE: Reservation at Luxurious 5B/3BA home Nob Hill! for 22 September= - 2024 - 22 October 2024

For= - your protection and safety, always communicate through Airbnb.

= -
3D"Isabella"

Isabella= -

= -

Hello guys! I need to let you know that the owner has scheduled a FaceT= -ime tour with a long term group this Saturday at 1:30pm.
I apologize for= - the inconvenience and
Thank you for the cooperation.

= -
<= -tr class=3D"_16pg94n" style=3D"margin: 0px !important;">
= -

Respond to Isabella by replying di= -rectly to this email.

Reservation details

<= -/div>

Luxurious 5B/3BA home Nob Hill!

= -

Rental unit - Entire home/flat hosted by Isabella

= -

Guests

10 guests

Check-In

Sunday

22 September 2024

Tuesday

Checkout

22 = -October 2024

= -<= -/tbody>
3D"Airbnb"3D"Twitter"<= -/td>
3D"Facebook"
<= -/tr>
<= -td class>

Airbnb Ireland UC

8 Hanover Quay

= -Dublin 2, Ireland

Get the Air= -bnb app

= -
= -3D"App3D"Google
= -

Update your email preferences to choose which emails you get= - or unsubscribe from this type of email.

= -
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = -=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ---49a8ec9b277e6a96e7373b3e4727df74d25ab6158dd0a8fb1221118a1304-- -`; diff --git a/packages/apis/tests/extract_substr.test.js b/packages/apis/tests/extract_substr.test.js deleted file mode 100644 index 2f7991ef..00000000 --- a/packages/apis/tests/extract_substr.test.js +++ /dev/null @@ -1,172 +0,0 @@ -import { extractSubstrIdxes, extractSubstr } from '../pkg/zk_regex_apis'; -import airbnbEml from './airbnb_eml'; - -describe('Extract substr test suite', async () => { - // Wait for wasm to initialize - await new Promise(r => setTimeout(r, 300)); - test('Should extract indicies from object input', () => { - const parts = { - parts: [ - { - isPublic: true, - regexDef: 'Hello' - } - ] - }; - const result = extractSubstrIdxes(airbnbEml, parts, false); - expect(result.length).toBe(1); - expect(result[0].length).toBe(2); - }); - - test('Should extract indicies from object input, hide private', () => { - const parts = { - parts: [ - { - isPublic: true, - regexDef: 'Hello ' - }, - { - isPublic: false, - regexDef: 'guys!' - } - ] - }; - const result = extractSubstrIdxes(airbnbEml, parts, false); - expect(result.length).toBe(1); - expect(result[0].length).toBe(2); - }); - - test('Should extract indicies from object input, reveal private', () => { - const parts = { - parts: [ - { - isPublic: true, - regexDef: 'Hello ' - }, - { - isPublic: false, - regexDef: 'guys!' - } - ] - }; - const result = extractSubstrIdxes(airbnbEml, parts, true); - expect(result.length).toBe(2); - expect(result[0].length).toBe(2); - expect(result[1].length).toBe(2); - }); - - test('Should extract indicies from stringified input', () => { - const parts = { - parts: [ - { - isPublic: false, - regexDef: 'Hello' - } - ] - }; - const result = extractSubstrIdxes( - airbnbEml, - JSON.stringify(parts), - true - ); - expect(result.length).toBe(1); - expect(result[0].length).toBe(2); - }); - - test('Should throw helpful js error on wrong object input', () => { - const parts = { - wrong: 'input' - }; - try { - extractSubstrIdxes(airbnbEml, parts, false); - } catch (err) { - expect(err).toBe('Error: missing field `parts`'); - return; - } - throw new Error('Did not catch wrong input'); - }); - - test('Should throw helpful js error on wrong stringified input', () => { - const parts = { - wrong: 'input' - }; - try { - extractSubstrIdxes(airbnbEml, JSON.stringify(parts), false); - } catch (err) { - const includesErr = err.includes( - 'Failed to parse JSON string: missing field `parts`' - ); - expect(includesErr).toBe(true); - return; - } - throw new Error('Did not catch wrong input'); - }); - - test('Should throw helpful js error on wrong object input 2', () => { - const parts = { - parts: [ - { - isPublic: false - } - ] - }; - try { - extractSubstrIdxes(airbnbEml, parts, false); - } catch (err) { - expect(err).toBe('Error: missing field `regex_def`'); - return; - } - throw new Error('Did not catch wrong input'); - }); - - test('Should throw helpful js error on no found result', () => { - const parts = { - parts: [ - { - isPublic: true, - regexDef: 'Hello' - }, - { - isPublic: false, - regexDef: 'yall!' - } - ] - }; - try { - extractSubstrIdxes(airbnbEml, parts, false); - } catch (err) { - const includes = err.includes( - 'Failed to extract indxes: Substring of the entire regex (Hello)(yall!) is not found given input_str' - ); - expect(includes).toBe(true); - return; - } - throw new Error('Did not throw an error'); - }); - - test('extractSubstr should return actual matched string', () => { - const parts = { - parts: [ - { - isPublic: true, - regexDef: 'Hello' - } - ] - }; - const strs = extractSubstr(airbnbEml, parts, false); - expect(strs[0]).toBe('Hello'); - }); - - test('extractSubstr should return an empty array on all private fields', () => { - const parts = { - parts: [ - { - isPublic: false, - regexDef: 'Hello' - } - ] - }; - const strs = extractSubstr(airbnbEml, parts, false); - expect(strs.length).toBe(0); - }); -}); diff --git a/packages/circom/README.md b/packages/circom/README.md deleted file mode 100644 index eb9bffbb..00000000 --- a/packages/circom/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# zk-regex-circom - -Circom circuits for regex verification in [zk-regex](https://github.com/zkemail/zk-regex/tree/main). -This package contains circom circuits and decomposed regex definitions for common regexes in `./circuits/common` folder. - -## Note -Our `email_domain_regex.circom` circuit cannot capture an email address that contains "@" in the name part before the domain part, e.g., "alice@gmail.com@dummy.com", due to limitation of our circuit construction. For example, when "alice@gmail.com@dummy.com" is given, that circuit outputs not "dummy.com" but "gmail.com@dummy.com" as an exposed substring for the domain. However, an adversary cannot exploit this feature to expose a fake domain since the true domain at the end will also be revealed along with it. \ No newline at end of file diff --git a/packages/circom/circuits/common/body_hash.json b/packages/circom/circuits/common/body_hash.json deleted file mode 100644 index 354421e6..00000000 --- a/packages/circom/circuits/common/body_hash.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)dkim-signature:" - }, - { - "is_public": false, - "regex_def": "([a-z]+=[^;]+; )+bh=" - }, - { - "is_public": true, - "regex_def": "[a-zA-Z0-9+/=]+" - }, - { - "is_public": false, - "regex_def": ";" - } - ] -} diff --git a/packages/circom/circuits/common/body_hash_regex.circom b/packages/circom/circuits/common/body_hash_regex.circom deleted file mode 100644 index abe3b275..00000000 --- a/packages/circom/circuits/common/body_hash_regex.circom +++ /dev/null @@ -1,844 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\r\n|^)dkim-signature:([a-z]+=[^;]+; )+bh=[a-zA-Z0-9+/=]+; -template BodyHashRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[90][num_bytes]; - component lt[24][num_bytes]; - component and[76][num_bytes]; - component multi_or[19][num_bytes]; - signal states[num_bytes+1][35]; - signal states_tmp[num_bytes+1][35]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 35; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(34); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 13; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - and[1][i].b <== eq[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 10; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[2][i].out; - states_tmp[i+1][2] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 100; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[3][i].out; - states[i+1][3] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 107; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - states[i+1][4] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 105; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[5][i].out; - states[i+1][5] <== and[5][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 109; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[6][i].out; - states[i+1][6] <== and[6][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 45; - and[7][i] = AND(); - and[7][i].a <== states[i][6]; - and[7][i].b <== eq[7][i].out; - states[i+1][7] <== and[7][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 115; - and[8][i] = AND(); - and[8][i].a <== states[i][7]; - and[8][i].b <== eq[8][i].out; - states[i+1][8] <== and[8][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][8]; - and[9][i].b <== eq[5][i].out; - states[i+1][9] <== and[9][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 103; - and[10][i] = AND(); - and[10][i].a <== states[i][9]; - and[10][i].b <== eq[9][i].out; - states[i+1][10] <== and[10][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 110; - and[11][i] = AND(); - and[11][i].a <== states[i][10]; - and[11][i].b <== eq[10][i].out; - states[i+1][11] <== and[11][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 97; - and[12][i] = AND(); - and[12][i].a <== states[i][11]; - and[12][i].b <== eq[11][i].out; - states[i+1][12] <== and[12][i].out; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 116; - and[13][i] = AND(); - and[13][i].a <== states[i][12]; - and[13][i].b <== eq[12][i].out; - states[i+1][13] <== and[13][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 117; - and[14][i] = AND(); - and[14][i].a <== states[i][13]; - and[14][i].b <== eq[13][i].out; - states[i+1][14] <== and[14][i].out; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 114; - and[15][i] = AND(); - and[15][i].a <== states[i][14]; - and[15][i].b <== eq[14][i].out; - states[i+1][15] <== and[15][i].out; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 101; - and[16][i] = AND(); - and[16][i].a <== states[i][15]; - and[16][i].b <== eq[15][i].out; - states[i+1][16] <== and[16][i].out; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 58; - and[17][i] = AND(); - and[17][i].a <== states[i][16]; - and[17][i].b <== eq[16][i].out; - states[i+1][17] <== and[17][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 97; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 122; - and[18][i] = AND(); - and[18][i].a <== lt[0][i].out; - and[18][i].b <== lt[1][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][17]; - and[19][i].b <== and[18][i].out; - and[20][i] = AND(); - and[20][i].a <== states[i][18]; - and[20][i].b <== and[18][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 99; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 122; - and[21][i] = AND(); - and[21][i].a <== lt[2][i].out; - and[21][i].b <== lt[3][i].out; - and[22][i] = AND(); - and[22][i].a <== states[i][29]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[21][i].out; - multi_or[0][i].in[1] <== eq[11][i].out; - and[22][i].b <== multi_or[0][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 105; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 122; - and[23][i] = AND(); - and[23][i].a <== lt[4][i].out; - and[23][i].b <== lt[5][i].out; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 98; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 99; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 102; - and[24][i] = AND(); - and[24][i].a <== states[i][30]; - multi_or[1][i] = MultiOR(8); - multi_or[1][i].in[0] <== and[23][i].out; - multi_or[1][i].in[1] <== eq[11][i].out; - multi_or[1][i].in[2] <== eq[17][i].out; - multi_or[1][i].in[3] <== eq[18][i].out; - multi_or[1][i].in[4] <== eq[3][i].out; - multi_or[1][i].in[5] <== eq[15][i].out; - multi_or[1][i].in[6] <== eq[19][i].out; - multi_or[1][i].in[7] <== eq[9][i].out; - and[24][i].b <== multi_or[1][i].out; - and[25][i] = AND(); - and[25][i].a <== states[i][31]; - and[25][i].b <== and[18][i].out; - multi_or[2][i] = MultiOR(5); - multi_or[2][i].in[0] <== and[19][i].out; - multi_or[2][i].in[1] <== and[20][i].out; - multi_or[2][i].in[2] <== and[22][i].out; - multi_or[2][i].in[3] <== and[24][i].out; - multi_or[2][i].in[4] <== and[25][i].out; - states[i+1][18] <== multi_or[2][i].out; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 61; - and[26][i] = AND(); - and[26][i].a <== states[i][18]; - and[26][i].b <== eq[20][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][30]; - and[27][i].b <== eq[20][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[26][i].out; - multi_or[3][i].in[1] <== and[27][i].out; - states[i+1][19] <== multi_or[3][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 1; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 58; - and[28][i] = AND(); - and[28][i].a <== lt[6][i].out; - and[28][i].b <== lt[7][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 60; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 127; - and[29][i] = AND(); - and[29][i].a <== lt[8][i].out; - and[29][i].b <== lt[9][i].out; - and[30][i] = AND(); - and[30][i].a <== states[i][19]; - multi_or[4][i] = MultiOR(2); - multi_or[4][i].in[0] <== and[28][i].out; - multi_or[4][i].in[1] <== and[29][i].out; - and[30][i].b <== multi_or[4][i].out; - and[31][i] = AND(); - and[31][i].a <== states[i][20]; - and[31][i].b <== multi_or[4][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 191; - and[32][i] = AND(); - and[32][i].a <== lt[10][i].out; - and[32][i].b <== lt[11][i].out; - and[33][i] = AND(); - and[33][i].a <== states[i][21]; - and[33][i].b <== and[32][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 1; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 42; - and[34][i] = AND(); - and[34][i].a <== lt[12][i].out; - and[34][i].b <== lt[13][i].out; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 44; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 46; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 60; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 62; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 63; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 64; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 91; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 92; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 93; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 94; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 95; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 96; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 123; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 124; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 125; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 126; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 127; - and[35][i] = AND(); - and[35][i].a <== states[i][32]; - multi_or[5][i] = MultiOR(20); - multi_or[5][i].in[0] <== and[34][i].out; - multi_or[5][i].in[1] <== eq[21][i].out; - multi_or[5][i].in[2] <== eq[7][i].out; - multi_or[5][i].in[3] <== eq[22][i].out; - multi_or[5][i].in[4] <== eq[16][i].out; - multi_or[5][i].in[5] <== eq[23][i].out; - multi_or[5][i].in[6] <== eq[24][i].out; - multi_or[5][i].in[7] <== eq[25][i].out; - multi_or[5][i].in[8] <== eq[26][i].out; - multi_or[5][i].in[9] <== eq[27][i].out; - multi_or[5][i].in[10] <== eq[28][i].out; - multi_or[5][i].in[11] <== eq[29][i].out; - multi_or[5][i].in[12] <== eq[30][i].out; - multi_or[5][i].in[13] <== eq[31][i].out; - multi_or[5][i].in[14] <== eq[32][i].out; - multi_or[5][i].in[15] <== eq[33][i].out; - multi_or[5][i].in[16] <== eq[34][i].out; - multi_or[5][i].in[17] <== eq[35][i].out; - multi_or[5][i].in[18] <== eq[36][i].out; - multi_or[5][i].in[19] <== eq[37][i].out; - and[35][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(4); - multi_or[6][i].in[0] <== and[30][i].out; - multi_or[6][i].in[1] <== and[31][i].out; - multi_or[6][i].in[2] <== and[33][i].out; - multi_or[6][i].in[3] <== and[35][i].out; - states[i+1][20] <== multi_or[6][i].out; - lt[14][i] = LessEqThan(8); - lt[14][i].in[0] <== 194; - lt[14][i].in[1] <== in[i]; - lt[15][i] = LessEqThan(8); - lt[15][i].in[0] <== in[i]; - lt[15][i].in[1] <== 223; - and[36][i] = AND(); - and[36][i].a <== lt[14][i].out; - and[36][i].b <== lt[15][i].out; - and[37][i] = AND(); - and[37][i].a <== states[i][19]; - and[37][i].b <== and[36][i].out; - and[38][i] = AND(); - and[38][i].a <== states[i][20]; - and[38][i].b <== and[36][i].out; - lt[16][i] = LessEqThan(8); - lt[16][i].in[0] <== 160; - lt[16][i].in[1] <== in[i]; - lt[17][i] = LessEqThan(8); - lt[17][i].in[0] <== in[i]; - lt[17][i].in[1] <== 191; - and[39][i] = AND(); - and[39][i].a <== lt[16][i].out; - and[39][i].b <== lt[17][i].out; - and[40][i] = AND(); - and[40][i].a <== states[i][22]; - and[40][i].b <== and[39][i].out; - and[41][i] = AND(); - and[41][i].a <== states[i][23]; - and[41][i].b <== and[32][i].out; - lt[18][i] = LessEqThan(8); - lt[18][i].in[0] <== 128; - lt[18][i].in[1] <== in[i]; - lt[19][i] = LessEqThan(8); - lt[19][i].in[0] <== in[i]; - lt[19][i].in[1] <== 159; - and[42][i] = AND(); - and[42][i].a <== lt[18][i].out; - and[42][i].b <== lt[19][i].out; - and[43][i] = AND(); - and[43][i].a <== states[i][24]; - and[43][i].b <== and[42][i].out; - and[44][i] = AND(); - and[44][i].a <== states[i][32]; - and[44][i].b <== and[36][i].out; - multi_or[7][i] = MultiOR(6); - multi_or[7][i].in[0] <== and[37][i].out; - multi_or[7][i].in[1] <== and[38][i].out; - multi_or[7][i].in[2] <== and[40][i].out; - multi_or[7][i].in[3] <== and[41][i].out; - multi_or[7][i].in[4] <== and[43][i].out; - multi_or[7][i].in[5] <== and[44][i].out; - states[i+1][21] <== multi_or[7][i].out; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 224; - and[45][i] = AND(); - and[45][i].a <== states[i][19]; - and[45][i].b <== eq[38][i].out; - and[46][i] = AND(); - and[46][i].a <== states[i][20]; - and[46][i].b <== eq[38][i].out; - and[47][i] = AND(); - and[47][i].a <== states[i][32]; - and[47][i].b <== eq[38][i].out; - multi_or[8][i] = MultiOR(3); - multi_or[8][i].in[0] <== and[45][i].out; - multi_or[8][i].in[1] <== and[46][i].out; - multi_or[8][i].in[2] <== and[47][i].out; - states[i+1][22] <== multi_or[8][i].out; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 225; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 226; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 227; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 228; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 229; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 230; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 231; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 232; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 233; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 234; - eq[49][i] = IsEqual(); - eq[49][i].in[0] <== in[i]; - eq[49][i].in[1] <== 235; - eq[50][i] = IsEqual(); - eq[50][i].in[0] <== in[i]; - eq[50][i].in[1] <== 236; - eq[51][i] = IsEqual(); - eq[51][i].in[0] <== in[i]; - eq[51][i].in[1] <== 238; - eq[52][i] = IsEqual(); - eq[52][i].in[0] <== in[i]; - eq[52][i].in[1] <== 239; - and[48][i] = AND(); - and[48][i].a <== states[i][19]; - multi_or[9][i] = MultiOR(14); - multi_or[9][i].in[0] <== eq[39][i].out; - multi_or[9][i].in[1] <== eq[40][i].out; - multi_or[9][i].in[2] <== eq[41][i].out; - multi_or[9][i].in[3] <== eq[42][i].out; - multi_or[9][i].in[4] <== eq[43][i].out; - multi_or[9][i].in[5] <== eq[44][i].out; - multi_or[9][i].in[6] <== eq[45][i].out; - multi_or[9][i].in[7] <== eq[46][i].out; - multi_or[9][i].in[8] <== eq[47][i].out; - multi_or[9][i].in[9] <== eq[48][i].out; - multi_or[9][i].in[10] <== eq[49][i].out; - multi_or[9][i].in[11] <== eq[50][i].out; - multi_or[9][i].in[12] <== eq[51][i].out; - multi_or[9][i].in[13] <== eq[52][i].out; - and[48][i].b <== multi_or[9][i].out; - and[49][i] = AND(); - and[49][i].a <== states[i][20]; - and[49][i].b <== multi_or[9][i].out; - lt[20][i] = LessEqThan(8); - lt[20][i].in[0] <== 144; - lt[20][i].in[1] <== in[i]; - lt[21][i] = LessEqThan(8); - lt[21][i].in[0] <== in[i]; - lt[21][i].in[1] <== 191; - and[50][i] = AND(); - and[50][i].a <== lt[20][i].out; - and[50][i].b <== lt[21][i].out; - and[51][i] = AND(); - and[51][i].a <== states[i][25]; - and[51][i].b <== and[50][i].out; - and[52][i] = AND(); - and[52][i].a <== states[i][26]; - and[52][i].b <== and[32][i].out; - eq[53][i] = IsEqual(); - eq[53][i].in[0] <== in[i]; - eq[53][i].in[1] <== 128; - eq[54][i] = IsEqual(); - eq[54][i].in[0] <== in[i]; - eq[54][i].in[1] <== 129; - eq[55][i] = IsEqual(); - eq[55][i].in[0] <== in[i]; - eq[55][i].in[1] <== 130; - eq[56][i] = IsEqual(); - eq[56][i].in[0] <== in[i]; - eq[56][i].in[1] <== 131; - eq[57][i] = IsEqual(); - eq[57][i].in[0] <== in[i]; - eq[57][i].in[1] <== 132; - eq[58][i] = IsEqual(); - eq[58][i].in[0] <== in[i]; - eq[58][i].in[1] <== 133; - eq[59][i] = IsEqual(); - eq[59][i].in[0] <== in[i]; - eq[59][i].in[1] <== 134; - eq[60][i] = IsEqual(); - eq[60][i].in[0] <== in[i]; - eq[60][i].in[1] <== 135; - eq[61][i] = IsEqual(); - eq[61][i].in[0] <== in[i]; - eq[61][i].in[1] <== 136; - eq[62][i] = IsEqual(); - eq[62][i].in[0] <== in[i]; - eq[62][i].in[1] <== 137; - eq[63][i] = IsEqual(); - eq[63][i].in[0] <== in[i]; - eq[63][i].in[1] <== 138; - eq[64][i] = IsEqual(); - eq[64][i].in[0] <== in[i]; - eq[64][i].in[1] <== 139; - eq[65][i] = IsEqual(); - eq[65][i].in[0] <== in[i]; - eq[65][i].in[1] <== 140; - eq[66][i] = IsEqual(); - eq[66][i].in[0] <== in[i]; - eq[66][i].in[1] <== 141; - eq[67][i] = IsEqual(); - eq[67][i].in[0] <== in[i]; - eq[67][i].in[1] <== 142; - eq[68][i] = IsEqual(); - eq[68][i].in[0] <== in[i]; - eq[68][i].in[1] <== 143; - and[53][i] = AND(); - and[53][i].a <== states[i][27]; - multi_or[10][i] = MultiOR(16); - multi_or[10][i].in[0] <== eq[53][i].out; - multi_or[10][i].in[1] <== eq[54][i].out; - multi_or[10][i].in[2] <== eq[55][i].out; - multi_or[10][i].in[3] <== eq[56][i].out; - multi_or[10][i].in[4] <== eq[57][i].out; - multi_or[10][i].in[5] <== eq[58][i].out; - multi_or[10][i].in[6] <== eq[59][i].out; - multi_or[10][i].in[7] <== eq[60][i].out; - multi_or[10][i].in[8] <== eq[61][i].out; - multi_or[10][i].in[9] <== eq[62][i].out; - multi_or[10][i].in[10] <== eq[63][i].out; - multi_or[10][i].in[11] <== eq[64][i].out; - multi_or[10][i].in[12] <== eq[65][i].out; - multi_or[10][i].in[13] <== eq[66][i].out; - multi_or[10][i].in[14] <== eq[67][i].out; - multi_or[10][i].in[15] <== eq[68][i].out; - and[53][i].b <== multi_or[10][i].out; - and[54][i] = AND(); - and[54][i].a <== states[i][32]; - and[54][i].b <== multi_or[9][i].out; - multi_or[11][i] = MultiOR(6); - multi_or[11][i].in[0] <== and[48][i].out; - multi_or[11][i].in[1] <== and[49][i].out; - multi_or[11][i].in[2] <== and[51][i].out; - multi_or[11][i].in[3] <== and[52][i].out; - multi_or[11][i].in[4] <== and[53][i].out; - multi_or[11][i].in[5] <== and[54][i].out; - states[i+1][23] <== multi_or[11][i].out; - eq[69][i] = IsEqual(); - eq[69][i].in[0] <== in[i]; - eq[69][i].in[1] <== 237; - and[55][i] = AND(); - and[55][i].a <== states[i][19]; - and[55][i].b <== eq[69][i].out; - and[56][i] = AND(); - and[56][i].a <== states[i][20]; - and[56][i].b <== eq[69][i].out; - and[57][i] = AND(); - and[57][i].a <== states[i][32]; - and[57][i].b <== eq[69][i].out; - multi_or[12][i] = MultiOR(3); - multi_or[12][i].in[0] <== and[55][i].out; - multi_or[12][i].in[1] <== and[56][i].out; - multi_or[12][i].in[2] <== and[57][i].out; - states[i+1][24] <== multi_or[12][i].out; - eq[70][i] = IsEqual(); - eq[70][i].in[0] <== in[i]; - eq[70][i].in[1] <== 240; - and[58][i] = AND(); - and[58][i].a <== states[i][19]; - and[58][i].b <== eq[70][i].out; - and[59][i] = AND(); - and[59][i].a <== states[i][20]; - and[59][i].b <== eq[70][i].out; - and[60][i] = AND(); - and[60][i].a <== states[i][32]; - and[60][i].b <== eq[70][i].out; - multi_or[13][i] = MultiOR(3); - multi_or[13][i].in[0] <== and[58][i].out; - multi_or[13][i].in[1] <== and[59][i].out; - multi_or[13][i].in[2] <== and[60][i].out; - states[i+1][25] <== multi_or[13][i].out; - eq[71][i] = IsEqual(); - eq[71][i].in[0] <== in[i]; - eq[71][i].in[1] <== 241; - eq[72][i] = IsEqual(); - eq[72][i].in[0] <== in[i]; - eq[72][i].in[1] <== 242; - eq[73][i] = IsEqual(); - eq[73][i].in[0] <== in[i]; - eq[73][i].in[1] <== 243; - and[61][i] = AND(); - and[61][i].a <== states[i][19]; - multi_or[14][i] = MultiOR(3); - multi_or[14][i].in[0] <== eq[71][i].out; - multi_or[14][i].in[1] <== eq[72][i].out; - multi_or[14][i].in[2] <== eq[73][i].out; - and[61][i].b <== multi_or[14][i].out; - and[62][i] = AND(); - and[62][i].a <== states[i][20]; - and[62][i].b <== multi_or[14][i].out; - and[63][i] = AND(); - and[63][i].a <== states[i][32]; - and[63][i].b <== multi_or[14][i].out; - multi_or[15][i] = MultiOR(3); - multi_or[15][i].in[0] <== and[61][i].out; - multi_or[15][i].in[1] <== and[62][i].out; - multi_or[15][i].in[2] <== and[63][i].out; - states[i+1][26] <== multi_or[15][i].out; - eq[74][i] = IsEqual(); - eq[74][i].in[0] <== in[i]; - eq[74][i].in[1] <== 244; - and[64][i] = AND(); - and[64][i].a <== states[i][19]; - and[64][i].b <== eq[74][i].out; - and[65][i] = AND(); - and[65][i].a <== states[i][20]; - and[65][i].b <== eq[74][i].out; - and[66][i] = AND(); - and[66][i].a <== states[i][32]; - and[66][i].b <== eq[74][i].out; - multi_or[16][i] = MultiOR(3); - multi_or[16][i].in[0] <== and[64][i].out; - multi_or[16][i].in[1] <== and[65][i].out; - multi_or[16][i].in[2] <== and[66][i].out; - states[i+1][27] <== multi_or[16][i].out; - eq[75][i] = IsEqual(); - eq[75][i].in[0] <== in[i]; - eq[75][i].in[1] <== 59; - and[67][i] = AND(); - and[67][i].a <== states[i][20]; - and[67][i].b <== eq[75][i].out; - states[i+1][28] <== and[67][i].out; - eq[76][i] = IsEqual(); - eq[76][i].in[0] <== in[i]; - eq[76][i].in[1] <== 32; - and[68][i] = AND(); - and[68][i].a <== states[i][28]; - and[68][i].b <== eq[76][i].out; - states[i+1][29] <== and[68][i].out; - and[69][i] = AND(); - and[69][i].a <== states[i][29]; - and[69][i].b <== eq[17][i].out; - states[i+1][30] <== and[69][i].out; - eq[77][i] = IsEqual(); - eq[77][i].in[0] <== in[i]; - eq[77][i].in[1] <== 104; - and[70][i] = AND(); - and[70][i].a <== states[i][30]; - and[70][i].b <== eq[77][i].out; - states[i+1][31] <== and[70][i].out; - and[71][i] = AND(); - and[71][i].a <== states[i][31]; - and[71][i].b <== eq[20][i].out; - states[i+1][32] <== and[71][i].out; - lt[22][i] = LessEqThan(8); - lt[22][i].in[0] <== 65; - lt[22][i].in[1] <== in[i]; - lt[23][i] = LessEqThan(8); - lt[23][i].in[0] <== in[i]; - lt[23][i].in[1] <== 90; - and[72][i] = AND(); - and[72][i].a <== lt[22][i].out; - and[72][i].b <== lt[23][i].out; - eq[78][i] = IsEqual(); - eq[78][i].in[0] <== in[i]; - eq[78][i].in[1] <== 43; - eq[79][i] = IsEqual(); - eq[79][i].in[0] <== in[i]; - eq[79][i].in[1] <== 47; - eq[80][i] = IsEqual(); - eq[80][i].in[0] <== in[i]; - eq[80][i].in[1] <== 48; - eq[81][i] = IsEqual(); - eq[81][i].in[0] <== in[i]; - eq[81][i].in[1] <== 49; - eq[82][i] = IsEqual(); - eq[82][i].in[0] <== in[i]; - eq[82][i].in[1] <== 50; - eq[83][i] = IsEqual(); - eq[83][i].in[0] <== in[i]; - eq[83][i].in[1] <== 51; - eq[84][i] = IsEqual(); - eq[84][i].in[0] <== in[i]; - eq[84][i].in[1] <== 52; - eq[85][i] = IsEqual(); - eq[85][i].in[0] <== in[i]; - eq[85][i].in[1] <== 53; - eq[86][i] = IsEqual(); - eq[86][i].in[0] <== in[i]; - eq[86][i].in[1] <== 54; - eq[87][i] = IsEqual(); - eq[87][i].in[0] <== in[i]; - eq[87][i].in[1] <== 55; - eq[88][i] = IsEqual(); - eq[88][i].in[0] <== in[i]; - eq[88][i].in[1] <== 56; - eq[89][i] = IsEqual(); - eq[89][i].in[0] <== in[i]; - eq[89][i].in[1] <== 57; - and[73][i] = AND(); - and[73][i].a <== states[i][32]; - multi_or[17][i] = MultiOR(15); - multi_or[17][i].in[0] <== and[72][i].out; - multi_or[17][i].in[1] <== and[18][i].out; - multi_or[17][i].in[2] <== eq[78][i].out; - multi_or[17][i].in[3] <== eq[79][i].out; - multi_or[17][i].in[4] <== eq[80][i].out; - multi_or[17][i].in[5] <== eq[81][i].out; - multi_or[17][i].in[6] <== eq[82][i].out; - multi_or[17][i].in[7] <== eq[83][i].out; - multi_or[17][i].in[8] <== eq[84][i].out; - multi_or[17][i].in[9] <== eq[85][i].out; - multi_or[17][i].in[10] <== eq[86][i].out; - multi_or[17][i].in[11] <== eq[87][i].out; - multi_or[17][i].in[12] <== eq[88][i].out; - multi_or[17][i].in[13] <== eq[89][i].out; - multi_or[17][i].in[14] <== eq[20][i].out; - and[73][i].b <== multi_or[17][i].out; - and[74][i] = AND(); - and[74][i].a <== states[i][33]; - and[74][i].b <== multi_or[17][i].out; - multi_or[18][i] = MultiOR(2); - multi_or[18][i].in[0] <== and[73][i].out; - multi_or[18][i].in[1] <== and[74][i].out; - states[i+1][33] <== multi_or[18][i].out; - and[75][i] = AND(); - and[75][i].a <== states[i][33]; - and[75][i].b <== eq[75][i].out; - states[i+1][34] <== and[75][i].out; - from_zero_enabled[i] <== MultiNOR(34)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20], states[i+1][21], states[i+1][22], states[i+1][23], states[i+1][24], states[i+1][25], states[i+1][26], states[i+1][27], states[i+1][28], states[i+1][29], states[i+1][30], states[i+1][31], states[i+1][32], states[i+1][33], states[i+1][34]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - state_changed[i].in[18] <== states[i+1][19]; - state_changed[i].in[19] <== states[i+1][20]; - state_changed[i].in[20] <== states[i+1][21]; - state_changed[i].in[21] <== states[i+1][22]; - state_changed[i].in[22] <== states[i+1][23]; - state_changed[i].in[23] <== states[i+1][24]; - state_changed[i].in[24] <== states[i+1][25]; - state_changed[i].in[25] <== states[i+1][26]; - state_changed[i].in[26] <== states[i+1][27]; - state_changed[i].in[27] <== states[i+1][28]; - state_changed[i].in[28] <== states[i+1][29]; - state_changed[i].in[29] <== states[i+1][30]; - state_changed[i].in[30] <== states[i+1][31]; - state_changed[i].in[31] <== states[i+1][32]; - state_changed[i].in[32] <== states[i+1][33]; - state_changed[i].in[33] <== states[i+1][34]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][34]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][34] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][34], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(32, 33), (33, 33)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(32, 33), (33, 33)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][32]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][33]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][33], prev_states0[1][i] * states[i+2][33]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/email_addr.json b/packages/circom/circuits/common/email_addr.json deleted file mode 100644 index 2b45be14..00000000 --- a/packages/circom/circuits/common/email_addr.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "[A-Za-z0-9!#$%&'*+=?\\-\\^_`{|}~./@]+@[A-Za-z0-9.\\-]+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/circuits/common/email_addr_regex.circom b/packages/circom/circuits/common/email_addr_regex.circom deleted file mode 100644 index 4f4f0bae..00000000 --- a/packages/circom/circuits/common/email_addr_regex.circom +++ /dev/null @@ -1,331 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: [A-Za-z0-9!#$%&'*+=?\-\^_`{|}~./@]+@[A-Za-z0-9.\-]+ -template EmailAddrRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[31][num_bytes]; - component lt[8][num_bytes]; - component and[13][num_bytes]; - component multi_or[7][num_bytes]; - signal states[num_bytes+1][4]; - signal states_tmp[num_bytes+1][4]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 4; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(3); - states[i][0] <== 1; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 63; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 90; - and[0][i] = AND(); - and[0][i].a <== lt[0][i].out; - and[0][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 94; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 126; - and[1][i] = AND(); - and[1][i].a <== lt[2][i].out; - and[1][i].b <== lt[3][i].out; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 33; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 35; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 36; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 37; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 38; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 39; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 42; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 43; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 45; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 46; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 47; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 48; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 49; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 50; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 51; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 52; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 53; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 54; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 55; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 56; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 57; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 61; - and[2][i] = AND(); - and[2][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(24); - multi_or[0][i].in[0] <== and[0][i].out; - multi_or[0][i].in[1] <== and[1][i].out; - multi_or[0][i].in[2] <== eq[0][i].out; - multi_or[0][i].in[3] <== eq[1][i].out; - multi_or[0][i].in[4] <== eq[2][i].out; - multi_or[0][i].in[5] <== eq[3][i].out; - multi_or[0][i].in[6] <== eq[4][i].out; - multi_or[0][i].in[7] <== eq[5][i].out; - multi_or[0][i].in[8] <== eq[6][i].out; - multi_or[0][i].in[9] <== eq[7][i].out; - multi_or[0][i].in[10] <== eq[8][i].out; - multi_or[0][i].in[11] <== eq[9][i].out; - multi_or[0][i].in[12] <== eq[10][i].out; - multi_or[0][i].in[13] <== eq[11][i].out; - multi_or[0][i].in[14] <== eq[12][i].out; - multi_or[0][i].in[15] <== eq[13][i].out; - multi_or[0][i].in[16] <== eq[14][i].out; - multi_or[0][i].in[17] <== eq[15][i].out; - multi_or[0][i].in[18] <== eq[16][i].out; - multi_or[0][i].in[19] <== eq[17][i].out; - multi_or[0][i].in[20] <== eq[18][i].out; - multi_or[0][i].in[21] <== eq[19][i].out; - multi_or[0][i].in[22] <== eq[20][i].out; - multi_or[0][i].in[23] <== eq[21][i].out; - and[2][i].b <== multi_or[0][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 65; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 90; - and[3][i] = AND(); - and[3][i].a <== lt[4][i].out; - and[3][i].b <== lt[5][i].out; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 63; - and[4][i] = AND(); - and[4][i].a <== states[i][1]; - multi_or[1][i] = MultiOR(25); - multi_or[1][i].in[0] <== and[3][i].out; - multi_or[1][i].in[1] <== and[1][i].out; - multi_or[1][i].in[2] <== eq[0][i].out; - multi_or[1][i].in[3] <== eq[1][i].out; - multi_or[1][i].in[4] <== eq[2][i].out; - multi_or[1][i].in[5] <== eq[3][i].out; - multi_or[1][i].in[6] <== eq[4][i].out; - multi_or[1][i].in[7] <== eq[5][i].out; - multi_or[1][i].in[8] <== eq[6][i].out; - multi_or[1][i].in[9] <== eq[7][i].out; - multi_or[1][i].in[10] <== eq[8][i].out; - multi_or[1][i].in[11] <== eq[9][i].out; - multi_or[1][i].in[12] <== eq[10][i].out; - multi_or[1][i].in[13] <== eq[11][i].out; - multi_or[1][i].in[14] <== eq[12][i].out; - multi_or[1][i].in[15] <== eq[13][i].out; - multi_or[1][i].in[16] <== eq[14][i].out; - multi_or[1][i].in[17] <== eq[15][i].out; - multi_or[1][i].in[18] <== eq[16][i].out; - multi_or[1][i].in[19] <== eq[17][i].out; - multi_or[1][i].in[20] <== eq[18][i].out; - multi_or[1][i].in[21] <== eq[19][i].out; - multi_or[1][i].in[22] <== eq[20][i].out; - multi_or[1][i].in[23] <== eq[21][i].out; - multi_or[1][i].in[24] <== eq[22][i].out; - and[4][i].b <== multi_or[1][i].out; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 94; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 95; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 96; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 123; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 124; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 125; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 126; - and[5][i] = AND(); - and[5][i].a <== states[i][2]; - multi_or[2][i] = MultiOR(18); - multi_or[2][i].in[0] <== eq[0][i].out; - multi_or[2][i].in[1] <== eq[1][i].out; - multi_or[2][i].in[2] <== eq[2][i].out; - multi_or[2][i].in[3] <== eq[3][i].out; - multi_or[2][i].in[4] <== eq[4][i].out; - multi_or[2][i].in[5] <== eq[5][i].out; - multi_or[2][i].in[6] <== eq[6][i].out; - multi_or[2][i].in[7] <== eq[7][i].out; - multi_or[2][i].in[8] <== eq[10][i].out; - multi_or[2][i].in[9] <== eq[21][i].out; - multi_or[2][i].in[10] <== eq[22][i].out; - multi_or[2][i].in[11] <== eq[23][i].out; - multi_or[2][i].in[12] <== eq[24][i].out; - multi_or[2][i].in[13] <== eq[25][i].out; - multi_or[2][i].in[14] <== eq[26][i].out; - multi_or[2][i].in[15] <== eq[27][i].out; - multi_or[2][i].in[16] <== eq[28][i].out; - multi_or[2][i].in[17] <== eq[29][i].out; - and[5][i].b <== multi_or[2][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][3]; - and[6][i].b <== multi_or[2][i].out; - multi_or[3][i] = MultiOR(3); - multi_or[3][i].in[0] <== and[4][i].out; - multi_or[3][i].in[1] <== and[5][i].out; - multi_or[3][i].in[2] <== and[6][i].out; - states_tmp[i+1][1] <== multi_or[3][i].out; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 64; - and[7][i] = AND(); - and[7][i].a <== states[i][1]; - and[7][i].b <== eq[30][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][2]; - and[8][i].b <== eq[30][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][3]; - and[9][i].b <== eq[30][i].out; - multi_or[4][i] = MultiOR(3); - multi_or[4][i].in[0] <== and[7][i].out; - multi_or[4][i].in[1] <== and[8][i].out; - multi_or[4][i].in[2] <== and[9][i].out; - states[i+1][2] <== multi_or[4][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 97; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 122; - and[10][i] = AND(); - and[10][i].a <== lt[6][i].out; - and[10][i].b <== lt[7][i].out; - and[11][i] = AND(); - and[11][i].a <== states[i][2]; - multi_or[5][i] = MultiOR(14); - multi_or[5][i].in[0] <== and[3][i].out; - multi_or[5][i].in[1] <== and[10][i].out; - multi_or[5][i].in[2] <== eq[8][i].out; - multi_or[5][i].in[3] <== eq[9][i].out; - multi_or[5][i].in[4] <== eq[11][i].out; - multi_or[5][i].in[5] <== eq[12][i].out; - multi_or[5][i].in[6] <== eq[13][i].out; - multi_or[5][i].in[7] <== eq[14][i].out; - multi_or[5][i].in[8] <== eq[15][i].out; - multi_or[5][i].in[9] <== eq[16][i].out; - multi_or[5][i].in[10] <== eq[17][i].out; - multi_or[5][i].in[11] <== eq[18][i].out; - multi_or[5][i].in[12] <== eq[19][i].out; - multi_or[5][i].in[13] <== eq[20][i].out; - and[11][i].b <== multi_or[5][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][3]; - and[12][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(2); - multi_or[6][i].in[0] <== and[11][i].out; - multi_or[6][i].in[1] <== and[12][i].out; - states[i+1][3] <== multi_or[6][i].out; - from_zero_enabled[i] <== MultiNOR(3)([states_tmp[i+1][1], states[i+1][2], states[i+1][3]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[2][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][3]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][3] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][3], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)}] - signal prev_states0[9][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - is_substr0[i] <== MultiOR(9)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][1], prev_states0[2][i] * states[i+2][2], prev_states0[3][i] * states[i+2][1], prev_states0[4][i] * states[i+2][2], prev_states0[5][i] * states[i+2][3], prev_states0[6][i] * states[i+2][1], prev_states0[7][i] * states[i+2][2], prev_states0[8][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/email_addr_with_name_regex.circom b/packages/circom/circuits/common/email_addr_with_name_regex.circom deleted file mode 100644 index 94302f80..00000000 --- a/packages/circom/circuits/common/email_addr_with_name_regex.circom +++ /dev/null @@ -1,20 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; -include "./reversed_bracket_regex.circom"; - -template EmailAddrWithNameRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - signal output reveal0[msg_bytes]; - - signal reversed_msg[msg_bytes]; - signal reversed_reveal0[msg_bytes]; - for(var i=0; i" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} diff --git a/packages/circom/circuits/common/message_id_regex.circom b/packages/circom/circuits/common/message_id_regex.circom deleted file mode 100644 index 705d7775..00000000 --- a/packages/circom/circuits/common/message_id_regex.circom +++ /dev/null @@ -1,288 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\r\n|^)message-id:<[A-Za-z0-9=@\.\+_-]+>\r\n -template MessageIdRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[28][num_bytes]; - component lt[4][num_bytes]; - component and[22][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][19]; - signal states_tmp[num_bytes+1][19]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 19; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(18); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 13; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - and[1][i].b <== eq[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 10; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[2][i].out; - states_tmp[i+1][2] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 109; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[3][i].out; - states[i+1][3] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 101; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - states[i+1][4] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 115; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[5][i].out; - states[i+1][5] <== and[5][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[5][i].out; - states[i+1][6] <== and[6][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 97; - and[7][i] = AND(); - and[7][i].a <== states[i][6]; - and[7][i].b <== eq[6][i].out; - states[i+1][7] <== and[7][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 103; - and[8][i] = AND(); - and[8][i].a <== states[i][7]; - and[8][i].b <== eq[7][i].out; - states[i+1][8] <== and[8][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][8]; - and[9][i].b <== eq[4][i].out; - states[i+1][9] <== and[9][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 45; - and[10][i] = AND(); - and[10][i].a <== states[i][9]; - and[10][i].b <== eq[8][i].out; - states[i+1][10] <== and[10][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 105; - and[11][i] = AND(); - and[11][i].a <== states[i][10]; - and[11][i].b <== eq[9][i].out; - states[i+1][11] <== and[11][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 100; - and[12][i] = AND(); - and[12][i].a <== states[i][11]; - and[12][i].b <== eq[10][i].out; - states[i+1][12] <== and[12][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 58; - and[13][i] = AND(); - and[13][i].a <== states[i][12]; - and[13][i].b <== eq[11][i].out; - states[i+1][13] <== and[13][i].out; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 60; - and[14][i] = AND(); - and[14][i].a <== states[i][13]; - and[14][i].b <== eq[12][i].out; - states[i+1][14] <== and[14][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 64; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 90; - and[15][i] = AND(); - and[15][i].a <== lt[0][i].out; - and[15][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 97; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 122; - and[16][i] = AND(); - and[16][i].a <== lt[2][i].out; - and[16][i].b <== lt[3][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 43; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 46; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 48; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 49; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 50; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 51; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 52; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 53; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 54; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 55; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 56; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 57; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 61; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 95; - and[17][i] = AND(); - and[17][i].a <== states[i][14]; - multi_or[0][i] = MultiOR(17); - multi_or[0][i].in[0] <== and[15][i].out; - multi_or[0][i].in[1] <== and[16][i].out; - multi_or[0][i].in[2] <== eq[13][i].out; - multi_or[0][i].in[3] <== eq[8][i].out; - multi_or[0][i].in[4] <== eq[14][i].out; - multi_or[0][i].in[5] <== eq[15][i].out; - multi_or[0][i].in[6] <== eq[16][i].out; - multi_or[0][i].in[7] <== eq[17][i].out; - multi_or[0][i].in[8] <== eq[18][i].out; - multi_or[0][i].in[9] <== eq[19][i].out; - multi_or[0][i].in[10] <== eq[20][i].out; - multi_or[0][i].in[11] <== eq[21][i].out; - multi_or[0][i].in[12] <== eq[22][i].out; - multi_or[0][i].in[13] <== eq[23][i].out; - multi_or[0][i].in[14] <== eq[24][i].out; - multi_or[0][i].in[15] <== eq[25][i].out; - multi_or[0][i].in[16] <== eq[26][i].out; - and[17][i].b <== multi_or[0][i].out; - and[18][i] = AND(); - and[18][i].a <== states[i][15]; - and[18][i].b <== multi_or[0][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[17][i].out; - multi_or[1][i].in[1] <== and[18][i].out; - states[i+1][15] <== multi_or[1][i].out; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 62; - and[19][i] = AND(); - and[19][i].a <== states[i][15]; - and[19][i].b <== eq[27][i].out; - states[i+1][16] <== and[19][i].out; - and[20][i] = AND(); - and[20][i].a <== states[i][16]; - and[20][i].b <== eq[0][i].out; - states[i+1][17] <== and[20][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][17]; - and[21][i].b <== eq[2][i].out; - states[i+1][18] <== and[21][i].out; - from_zero_enabled[i] <== MultiNOR(18)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][18]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][18] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][18], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(13, 14), (14, 15), (15, 15), (15, 16)}] - signal prev_states0[4][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(13, 14), (14, 15), (15, 15), (15, 16)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][13]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][14]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][15]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][15]; - is_substr0[i] <== MultiOR(4)([prev_states0[0][i] * states[i+2][14], prev_states0[1][i] * states[i+2][15], prev_states0[2][i] * states[i+2][15], prev_states0[3][i] * states[i+2][16]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/reversed_bracket.json b/packages/circom/circuits/common/reversed_bracket.json deleted file mode 100644 index 55ffaaba..00000000 --- a/packages/circom/circuits/common/reversed_bracket.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": ">" - }, - { - "is_public": true, - "regex_def": "[^<>]+" - }, - { - "is_public": false, - "regex_def": "<.*" - } - ] -} \ No newline at end of file diff --git a/packages/circom/circuits/common/reversed_bracket_regex.circom b/packages/circom/circuits/common/reversed_bracket_regex.circom deleted file mode 100644 index 648a6e11..00000000 --- a/packages/circom/circuits/common/reversed_bracket_regex.circom +++ /dev/null @@ -1,556 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: >[^<>]+<.* -template ReversedBracketRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[49][num_bytes]; - component lt[16][num_bytes]; - component and[48][num_bytes]; - component multi_or[16][num_bytes]; - signal states[num_bytes+1][18]; - signal states_tmp[num_bytes+1][18]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 18; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(17); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 62; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 1; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 59; - and[1][i] = AND(); - and[1][i].a <== lt[0][i].out; - and[1][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 63; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 127; - and[2][i] = AND(); - and[2][i].a <== lt[2][i].out; - and[2][i].b <== lt[3][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 61; - and[3][i] = AND(); - and[3][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(3); - multi_or[0][i].in[0] <== and[1][i].out; - multi_or[0][i].in[1] <== and[2][i].out; - multi_or[0][i].in[2] <== eq[1][i].out; - and[3][i].b <== multi_or[0][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][2]; - and[4][i].b <== multi_or[0][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 128; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 191; - and[5][i] = AND(); - and[5][i].a <== lt[4][i].out; - and[5][i].b <== lt[5][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][3]; - and[6][i].b <== and[5][i].out; - multi_or[1][i] = MultiOR(3); - multi_or[1][i].in[0] <== and[3][i].out; - multi_or[1][i].in[1] <== and[4][i].out; - multi_or[1][i].in[2] <== and[6][i].out; - states[i+1][2] <== multi_or[1][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 194; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 223; - and[7][i] = AND(); - and[7][i].a <== lt[6][i].out; - and[7][i].b <== lt[7][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][1]; - and[8][i].b <== and[7][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][2]; - and[9][i].b <== and[7][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 160; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 191; - and[10][i] = AND(); - and[10][i].a <== lt[8][i].out; - and[10][i].b <== lt[9][i].out; - and[11][i] = AND(); - and[11][i].a <== states[i][4]; - and[11][i].b <== and[10][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][5]; - and[12][i].b <== and[5][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 159; - and[13][i] = AND(); - and[13][i].a <== lt[10][i].out; - and[13][i].b <== lt[11][i].out; - and[14][i] = AND(); - and[14][i].a <== states[i][6]; - and[14][i].b <== and[13][i].out; - multi_or[2][i] = MultiOR(5); - multi_or[2][i].in[0] <== and[8][i].out; - multi_or[2][i].in[1] <== and[9][i].out; - multi_or[2][i].in[2] <== and[11][i].out; - multi_or[2][i].in[3] <== and[12][i].out; - multi_or[2][i].in[4] <== and[14][i].out; - states[i+1][3] <== multi_or[2][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 224; - and[15][i] = AND(); - and[15][i].a <== states[i][1]; - and[15][i].b <== eq[2][i].out; - and[16][i] = AND(); - and[16][i].a <== states[i][2]; - and[16][i].b <== eq[2][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[15][i].out; - multi_or[3][i].in[1] <== and[16][i].out; - states[i+1][4] <== multi_or[3][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 225; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 226; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 227; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 228; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 229; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 230; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 231; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 232; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 233; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 234; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 235; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 236; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 238; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 239; - and[17][i] = AND(); - and[17][i].a <== states[i][1]; - multi_or[4][i] = MultiOR(14); - multi_or[4][i].in[0] <== eq[3][i].out; - multi_or[4][i].in[1] <== eq[4][i].out; - multi_or[4][i].in[2] <== eq[5][i].out; - multi_or[4][i].in[3] <== eq[6][i].out; - multi_or[4][i].in[4] <== eq[7][i].out; - multi_or[4][i].in[5] <== eq[8][i].out; - multi_or[4][i].in[6] <== eq[9][i].out; - multi_or[4][i].in[7] <== eq[10][i].out; - multi_or[4][i].in[8] <== eq[11][i].out; - multi_or[4][i].in[9] <== eq[12][i].out; - multi_or[4][i].in[10] <== eq[13][i].out; - multi_or[4][i].in[11] <== eq[14][i].out; - multi_or[4][i].in[12] <== eq[15][i].out; - multi_or[4][i].in[13] <== eq[16][i].out; - and[17][i].b <== multi_or[4][i].out; - and[18][i] = AND(); - and[18][i].a <== states[i][2]; - and[18][i].b <== multi_or[4][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 144; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 191; - and[19][i] = AND(); - and[19][i].a <== lt[12][i].out; - and[19][i].b <== lt[13][i].out; - and[20][i] = AND(); - and[20][i].a <== states[i][7]; - and[20][i].b <== and[19][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][8]; - and[21][i].b <== and[5][i].out; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 128; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 129; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 130; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 131; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 132; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 133; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 134; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 135; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 136; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 137; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 138; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 139; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 140; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 141; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 142; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 143; - and[22][i] = AND(); - and[22][i].a <== states[i][9]; - multi_or[5][i] = MultiOR(16); - multi_or[5][i].in[0] <== eq[17][i].out; - multi_or[5][i].in[1] <== eq[18][i].out; - multi_or[5][i].in[2] <== eq[19][i].out; - multi_or[5][i].in[3] <== eq[20][i].out; - multi_or[5][i].in[4] <== eq[21][i].out; - multi_or[5][i].in[5] <== eq[22][i].out; - multi_or[5][i].in[6] <== eq[23][i].out; - multi_or[5][i].in[7] <== eq[24][i].out; - multi_or[5][i].in[8] <== eq[25][i].out; - multi_or[5][i].in[9] <== eq[26][i].out; - multi_or[5][i].in[10] <== eq[27][i].out; - multi_or[5][i].in[11] <== eq[28][i].out; - multi_or[5][i].in[12] <== eq[29][i].out; - multi_or[5][i].in[13] <== eq[30][i].out; - multi_or[5][i].in[14] <== eq[31][i].out; - multi_or[5][i].in[15] <== eq[32][i].out; - and[22][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(5); - multi_or[6][i].in[0] <== and[17][i].out; - multi_or[6][i].in[1] <== and[18][i].out; - multi_or[6][i].in[2] <== and[20][i].out; - multi_or[6][i].in[3] <== and[21][i].out; - multi_or[6][i].in[4] <== and[22][i].out; - states[i+1][5] <== multi_or[6][i].out; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 237; - and[23][i] = AND(); - and[23][i].a <== states[i][1]; - and[23][i].b <== eq[33][i].out; - and[24][i] = AND(); - and[24][i].a <== states[i][2]; - and[24][i].b <== eq[33][i].out; - multi_or[7][i] = MultiOR(2); - multi_or[7][i].in[0] <== and[23][i].out; - multi_or[7][i].in[1] <== and[24][i].out; - states[i+1][6] <== multi_or[7][i].out; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 240; - and[25][i] = AND(); - and[25][i].a <== states[i][1]; - and[25][i].b <== eq[34][i].out; - and[26][i] = AND(); - and[26][i].a <== states[i][2]; - and[26][i].b <== eq[34][i].out; - multi_or[8][i] = MultiOR(2); - multi_or[8][i].in[0] <== and[25][i].out; - multi_or[8][i].in[1] <== and[26][i].out; - states[i+1][7] <== multi_or[8][i].out; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 241; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 242; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 243; - and[27][i] = AND(); - and[27][i].a <== states[i][1]; - multi_or[9][i] = MultiOR(3); - multi_or[9][i].in[0] <== eq[35][i].out; - multi_or[9][i].in[1] <== eq[36][i].out; - multi_or[9][i].in[2] <== eq[37][i].out; - and[27][i].b <== multi_or[9][i].out; - and[28][i] = AND(); - and[28][i].a <== states[i][2]; - and[28][i].b <== multi_or[9][i].out; - multi_or[10][i] = MultiOR(2); - multi_or[10][i].in[0] <== and[27][i].out; - multi_or[10][i].in[1] <== and[28][i].out; - states[i+1][8] <== multi_or[10][i].out; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 244; - and[29][i] = AND(); - and[29][i].a <== states[i][1]; - and[29][i].b <== eq[38][i].out; - and[30][i] = AND(); - and[30][i].a <== states[i][2]; - and[30][i].b <== eq[38][i].out; - multi_or[11][i] = MultiOR(2); - multi_or[11][i].in[0] <== and[29][i].out; - multi_or[11][i].in[1] <== and[30][i].out; - states[i+1][9] <== multi_or[11][i].out; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 60; - and[31][i] = AND(); - and[31][i].a <== states[i][2]; - and[31][i].b <== eq[39][i].out; - lt[14][i] = LessEqThan(8); - lt[14][i].in[0] <== 11; - lt[14][i].in[1] <== in[i]; - lt[15][i] = LessEqThan(8); - lt[15][i].in[0] <== in[i]; - lt[15][i].in[1] <== 127; - and[32][i] = AND(); - and[32][i].a <== lt[14][i].out; - and[32][i].b <== lt[15][i].out; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 1; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 2; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 3; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 4; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 5; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 6; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 7; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 8; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 9; - and[33][i] = AND(); - and[33][i].a <== states[i][10]; - multi_or[12][i] = MultiOR(10); - multi_or[12][i].in[0] <== and[32][i].out; - multi_or[12][i].in[1] <== eq[40][i].out; - multi_or[12][i].in[2] <== eq[41][i].out; - multi_or[12][i].in[3] <== eq[42][i].out; - multi_or[12][i].in[4] <== eq[43][i].out; - multi_or[12][i].in[5] <== eq[44][i].out; - multi_or[12][i].in[6] <== eq[45][i].out; - multi_or[12][i].in[7] <== eq[46][i].out; - multi_or[12][i].in[8] <== eq[47][i].out; - multi_or[12][i].in[9] <== eq[48][i].out; - and[33][i].b <== multi_or[12][i].out; - and[34][i] = AND(); - and[34][i].a <== states[i][11]; - and[34][i].b <== and[5][i].out; - multi_or[13][i] = MultiOR(3); - multi_or[13][i].in[0] <== and[31][i].out; - multi_or[13][i].in[1] <== and[33][i].out; - multi_or[13][i].in[2] <== and[34][i].out; - states[i+1][10] <== multi_or[13][i].out; - and[35][i] = AND(); - and[35][i].a <== states[i][10]; - and[35][i].b <== and[7][i].out; - and[36][i] = AND(); - and[36][i].a <== states[i][12]; - and[36][i].b <== and[10][i].out; - and[37][i] = AND(); - and[37][i].a <== states[i][13]; - and[37][i].b <== and[5][i].out; - and[38][i] = AND(); - and[38][i].a <== states[i][14]; - and[38][i].b <== and[13][i].out; - multi_or[14][i] = MultiOR(4); - multi_or[14][i].in[0] <== and[35][i].out; - multi_or[14][i].in[1] <== and[36][i].out; - multi_or[14][i].in[2] <== and[37][i].out; - multi_or[14][i].in[3] <== and[38][i].out; - states[i+1][11] <== multi_or[14][i].out; - and[39][i] = AND(); - and[39][i].a <== states[i][10]; - and[39][i].b <== eq[2][i].out; - states[i+1][12] <== and[39][i].out; - and[40][i] = AND(); - and[40][i].a <== states[i][10]; - and[40][i].b <== multi_or[4][i].out; - and[41][i] = AND(); - and[41][i].a <== states[i][15]; - and[41][i].b <== and[19][i].out; - and[42][i] = AND(); - and[42][i].a <== states[i][16]; - and[42][i].b <== and[5][i].out; - and[43][i] = AND(); - and[43][i].a <== states[i][17]; - and[43][i].b <== multi_or[5][i].out; - multi_or[15][i] = MultiOR(4); - multi_or[15][i].in[0] <== and[40][i].out; - multi_or[15][i].in[1] <== and[41][i].out; - multi_or[15][i].in[2] <== and[42][i].out; - multi_or[15][i].in[3] <== and[43][i].out; - states[i+1][13] <== multi_or[15][i].out; - and[44][i] = AND(); - and[44][i].a <== states[i][10]; - and[44][i].b <== eq[33][i].out; - states[i+1][14] <== and[44][i].out; - and[45][i] = AND(); - and[45][i].a <== states[i][10]; - and[45][i].b <== eq[34][i].out; - states[i+1][15] <== and[45][i].out; - and[46][i] = AND(); - and[46][i].a <== states[i][10]; - and[46][i].b <== multi_or[9][i].out; - states[i+1][16] <== and[46][i].out; - and[47][i] = AND(); - and[47][i].a <== states[i][10]; - and[47][i].b <== eq[38][i].out; - states[i+1][17] <== and[47][i].out; - from_zero_enabled[i] <== MultiNOR(17)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][10]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][10] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][10], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 2), (4, 3), (5, 3), (6, 3), (7, 5), (8, 5), (9, 5)}] - signal prev_states0[23][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 2), (4, 3), (5, 3), (6, 3), (7, 5), (8, 5), (9, 5)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[15][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[16][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[17][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[18][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[19][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[20][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[21][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - prev_states0[22][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][9]; - is_substr0[i] <== MultiOR(23)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][3], prev_states0[2][i] * states[i+2][4], prev_states0[3][i] * states[i+2][5], prev_states0[4][i] * states[i+2][6], prev_states0[5][i] * states[i+2][7], prev_states0[6][i] * states[i+2][8], prev_states0[7][i] * states[i+2][9], prev_states0[8][i] * states[i+2][2], prev_states0[9][i] * states[i+2][3], prev_states0[10][i] * states[i+2][4], prev_states0[11][i] * states[i+2][5], prev_states0[12][i] * states[i+2][6], prev_states0[13][i] * states[i+2][7], prev_states0[14][i] * states[i+2][8], prev_states0[15][i] * states[i+2][9], prev_states0[16][i] * states[i+2][2], prev_states0[17][i] * states[i+2][3], prev_states0[18][i] * states[i+2][3], prev_states0[19][i] * states[i+2][3], prev_states0[20][i] * states[i+2][5], prev_states0[21][i] * states[i+2][5], prev_states0[22][i] * states[i+2][5]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/reversed_email_addr_with_name_regex.circom b/packages/circom/circuits/common/reversed_email_addr_with_name_regex.circom deleted file mode 100644 index 809ef2ce..00000000 --- a/packages/circom/circuits/common/reversed_email_addr_with_name_regex.circom +++ /dev/null @@ -1,566 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: >[a-zA-Z0-9.\-]+@[A-Za-z0-9!#$%&'*+=?\-\^_`{|}~./@]+<.* -template ReversedEmailAddrWithNameRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in[i+1] <== msg[i]; - } - - component eq[71][num_bytes]; - component lt[20][num_bytes]; - component and[32][num_bytes]; - component multi_or[11][num_bytes]; - signal states[num_bytes+1][13]; - signal states_tmp[num_bytes+1][13]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 13; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(12); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 62; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 65; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 90; - and[1][i] = AND(); - and[1][i].a <== lt[0][i].out; - and[1][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 97; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 122; - and[2][i] = AND(); - and[2][i].a <== lt[2][i].out; - and[2][i].b <== lt[3][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 45; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 46; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 48; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 49; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 50; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 51; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 52; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 53; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 54; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 55; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 56; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 57; - and[3][i] = AND(); - and[3][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(14); - multi_or[0][i].in[0] <== and[1][i].out; - multi_or[0][i].in[1] <== and[2][i].out; - multi_or[0][i].in[2] <== eq[1][i].out; - multi_or[0][i].in[3] <== eq[2][i].out; - multi_or[0][i].in[4] <== eq[3][i].out; - multi_or[0][i].in[5] <== eq[4][i].out; - multi_or[0][i].in[6] <== eq[5][i].out; - multi_or[0][i].in[7] <== eq[6][i].out; - multi_or[0][i].in[8] <== eq[7][i].out; - multi_or[0][i].in[9] <== eq[8][i].out; - multi_or[0][i].in[10] <== eq[9][i].out; - multi_or[0][i].in[11] <== eq[10][i].out; - multi_or[0][i].in[12] <== eq[11][i].out; - multi_or[0][i].in[13] <== eq[12][i].out; - and[3][i].b <== multi_or[0][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][2]; - and[4][i].b <== multi_or[0][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[3][i].out; - multi_or[1][i].in[1] <== and[4][i].out; - states[i+1][2] <== multi_or[1][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 64; - and[5][i] = AND(); - and[5][i].a <== states[i][2]; - and[5][i].b <== eq[13][i].out; - states[i+1][3] <== and[5][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 63; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 90; - and[6][i] = AND(); - and[6][i].a <== lt[4][i].out; - and[6][i].b <== lt[5][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 94; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 126; - and[7][i] = AND(); - and[7][i].a <== lt[6][i].out; - and[7][i].b <== lt[7][i].out; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 33; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 35; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 36; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 37; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 38; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 39; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 42; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 43; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 47; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 61; - and[8][i] = AND(); - and[8][i].a <== states[i][3]; - multi_or[2][i] = MultiOR(24); - multi_or[2][i].in[0] <== and[6][i].out; - multi_or[2][i].in[1] <== and[7][i].out; - multi_or[2][i].in[2] <== eq[14][i].out; - multi_or[2][i].in[3] <== eq[15][i].out; - multi_or[2][i].in[4] <== eq[16][i].out; - multi_or[2][i].in[5] <== eq[17][i].out; - multi_or[2][i].in[6] <== eq[18][i].out; - multi_or[2][i].in[7] <== eq[19][i].out; - multi_or[2][i].in[8] <== eq[20][i].out; - multi_or[2][i].in[9] <== eq[21][i].out; - multi_or[2][i].in[10] <== eq[1][i].out; - multi_or[2][i].in[11] <== eq[2][i].out; - multi_or[2][i].in[12] <== eq[22][i].out; - multi_or[2][i].in[13] <== eq[3][i].out; - multi_or[2][i].in[14] <== eq[4][i].out; - multi_or[2][i].in[15] <== eq[5][i].out; - multi_or[2][i].in[16] <== eq[6][i].out; - multi_or[2][i].in[17] <== eq[7][i].out; - multi_or[2][i].in[18] <== eq[8][i].out; - multi_or[2][i].in[19] <== eq[9][i].out; - multi_or[2][i].in[20] <== eq[10][i].out; - multi_or[2][i].in[21] <== eq[11][i].out; - multi_or[2][i].in[22] <== eq[12][i].out; - multi_or[2][i].in[23] <== eq[23][i].out; - and[8][i].b <== multi_or[2][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][4]; - and[9][i].b <== multi_or[2][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[8][i].out; - multi_or[3][i].in[1] <== and[9][i].out; - states[i+1][4] <== multi_or[3][i].out; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 60; - and[10][i] = AND(); - and[10][i].a <== states[i][4]; - and[10][i].b <== eq[24][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 11; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 127; - and[11][i] = AND(); - and[11][i].a <== lt[8][i].out; - and[11][i].b <== lt[9][i].out; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 1; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 2; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 3; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 4; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 5; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 6; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 7; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 8; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 9; - and[12][i] = AND(); - and[12][i].a <== states[i][5]; - multi_or[4][i] = MultiOR(10); - multi_or[4][i].in[0] <== and[11][i].out; - multi_or[4][i].in[1] <== eq[25][i].out; - multi_or[4][i].in[2] <== eq[26][i].out; - multi_or[4][i].in[3] <== eq[27][i].out; - multi_or[4][i].in[4] <== eq[28][i].out; - multi_or[4][i].in[5] <== eq[29][i].out; - multi_or[4][i].in[6] <== eq[30][i].out; - multi_or[4][i].in[7] <== eq[31][i].out; - multi_or[4][i].in[8] <== eq[32][i].out; - multi_or[4][i].in[9] <== eq[33][i].out; - and[12][i].b <== multi_or[4][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 191; - and[13][i] = AND(); - and[13][i].a <== lt[10][i].out; - and[13][i].b <== lt[11][i].out; - and[14][i] = AND(); - and[14][i].a <== states[i][6]; - and[14][i].b <== and[13][i].out; - multi_or[5][i] = MultiOR(3); - multi_or[5][i].in[0] <== and[10][i].out; - multi_or[5][i].in[1] <== and[12][i].out; - multi_or[5][i].in[2] <== and[14][i].out; - states[i+1][5] <== multi_or[5][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 194; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 223; - and[15][i] = AND(); - and[15][i].a <== lt[12][i].out; - and[15][i].b <== lt[13][i].out; - and[16][i] = AND(); - and[16][i].a <== states[i][5]; - and[16][i].b <== and[15][i].out; - lt[14][i] = LessEqThan(8); - lt[14][i].in[0] <== 160; - lt[14][i].in[1] <== in[i]; - lt[15][i] = LessEqThan(8); - lt[15][i].in[0] <== in[i]; - lt[15][i].in[1] <== 191; - and[17][i] = AND(); - and[17][i].a <== lt[14][i].out; - and[17][i].b <== lt[15][i].out; - and[18][i] = AND(); - and[18][i].a <== states[i][7]; - and[18][i].b <== and[17][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][8]; - and[19][i].b <== and[13][i].out; - lt[16][i] = LessEqThan(8); - lt[16][i].in[0] <== 128; - lt[16][i].in[1] <== in[i]; - lt[17][i] = LessEqThan(8); - lt[17][i].in[0] <== in[i]; - lt[17][i].in[1] <== 159; - and[20][i] = AND(); - and[20][i].a <== lt[16][i].out; - and[20][i].b <== lt[17][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][9]; - and[21][i].b <== and[20][i].out; - multi_or[6][i] = MultiOR(4); - multi_or[6][i].in[0] <== and[16][i].out; - multi_or[6][i].in[1] <== and[18][i].out; - multi_or[6][i].in[2] <== and[19][i].out; - multi_or[6][i].in[3] <== and[21][i].out; - states[i+1][6] <== multi_or[6][i].out; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 224; - and[22][i] = AND(); - and[22][i].a <== states[i][5]; - and[22][i].b <== eq[34][i].out; - states[i+1][7] <== and[22][i].out; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 225; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 226; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 227; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 228; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 229; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 230; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 231; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 232; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 233; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 234; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 235; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 236; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 238; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 239; - and[23][i] = AND(); - and[23][i].a <== states[i][5]; - multi_or[7][i] = MultiOR(14); - multi_or[7][i].in[0] <== eq[35][i].out; - multi_or[7][i].in[1] <== eq[36][i].out; - multi_or[7][i].in[2] <== eq[37][i].out; - multi_or[7][i].in[3] <== eq[38][i].out; - multi_or[7][i].in[4] <== eq[39][i].out; - multi_or[7][i].in[5] <== eq[40][i].out; - multi_or[7][i].in[6] <== eq[41][i].out; - multi_or[7][i].in[7] <== eq[42][i].out; - multi_or[7][i].in[8] <== eq[43][i].out; - multi_or[7][i].in[9] <== eq[44][i].out; - multi_or[7][i].in[10] <== eq[45][i].out; - multi_or[7][i].in[11] <== eq[46][i].out; - multi_or[7][i].in[12] <== eq[47][i].out; - multi_or[7][i].in[13] <== eq[48][i].out; - and[23][i].b <== multi_or[7][i].out; - lt[18][i] = LessEqThan(8); - lt[18][i].in[0] <== 144; - lt[18][i].in[1] <== in[i]; - lt[19][i] = LessEqThan(8); - lt[19][i].in[0] <== in[i]; - lt[19][i].in[1] <== 191; - and[24][i] = AND(); - and[24][i].a <== lt[18][i].out; - and[24][i].b <== lt[19][i].out; - and[25][i] = AND(); - and[25][i].a <== states[i][10]; - and[25][i].b <== and[24][i].out; - and[26][i] = AND(); - and[26][i].a <== states[i][11]; - and[26][i].b <== and[13][i].out; - eq[49][i] = IsEqual(); - eq[49][i].in[0] <== in[i]; - eq[49][i].in[1] <== 128; - eq[50][i] = IsEqual(); - eq[50][i].in[0] <== in[i]; - eq[50][i].in[1] <== 129; - eq[51][i] = IsEqual(); - eq[51][i].in[0] <== in[i]; - eq[51][i].in[1] <== 130; - eq[52][i] = IsEqual(); - eq[52][i].in[0] <== in[i]; - eq[52][i].in[1] <== 131; - eq[53][i] = IsEqual(); - eq[53][i].in[0] <== in[i]; - eq[53][i].in[1] <== 132; - eq[54][i] = IsEqual(); - eq[54][i].in[0] <== in[i]; - eq[54][i].in[1] <== 133; - eq[55][i] = IsEqual(); - eq[55][i].in[0] <== in[i]; - eq[55][i].in[1] <== 134; - eq[56][i] = IsEqual(); - eq[56][i].in[0] <== in[i]; - eq[56][i].in[1] <== 135; - eq[57][i] = IsEqual(); - eq[57][i].in[0] <== in[i]; - eq[57][i].in[1] <== 136; - eq[58][i] = IsEqual(); - eq[58][i].in[0] <== in[i]; - eq[58][i].in[1] <== 137; - eq[59][i] = IsEqual(); - eq[59][i].in[0] <== in[i]; - eq[59][i].in[1] <== 138; - eq[60][i] = IsEqual(); - eq[60][i].in[0] <== in[i]; - eq[60][i].in[1] <== 139; - eq[61][i] = IsEqual(); - eq[61][i].in[0] <== in[i]; - eq[61][i].in[1] <== 140; - eq[62][i] = IsEqual(); - eq[62][i].in[0] <== in[i]; - eq[62][i].in[1] <== 141; - eq[63][i] = IsEqual(); - eq[63][i].in[0] <== in[i]; - eq[63][i].in[1] <== 142; - eq[64][i] = IsEqual(); - eq[64][i].in[0] <== in[i]; - eq[64][i].in[1] <== 143; - and[27][i] = AND(); - and[27][i].a <== states[i][12]; - multi_or[8][i] = MultiOR(16); - multi_or[8][i].in[0] <== eq[49][i].out; - multi_or[8][i].in[1] <== eq[50][i].out; - multi_or[8][i].in[2] <== eq[51][i].out; - multi_or[8][i].in[3] <== eq[52][i].out; - multi_or[8][i].in[4] <== eq[53][i].out; - multi_or[8][i].in[5] <== eq[54][i].out; - multi_or[8][i].in[6] <== eq[55][i].out; - multi_or[8][i].in[7] <== eq[56][i].out; - multi_or[8][i].in[8] <== eq[57][i].out; - multi_or[8][i].in[9] <== eq[58][i].out; - multi_or[8][i].in[10] <== eq[59][i].out; - multi_or[8][i].in[11] <== eq[60][i].out; - multi_or[8][i].in[12] <== eq[61][i].out; - multi_or[8][i].in[13] <== eq[62][i].out; - multi_or[8][i].in[14] <== eq[63][i].out; - multi_or[8][i].in[15] <== eq[64][i].out; - and[27][i].b <== multi_or[8][i].out; - multi_or[9][i] = MultiOR(4); - multi_or[9][i].in[0] <== and[23][i].out; - multi_or[9][i].in[1] <== and[25][i].out; - multi_or[9][i].in[2] <== and[26][i].out; - multi_or[9][i].in[3] <== and[27][i].out; - states[i+1][8] <== multi_or[9][i].out; - eq[65][i] = IsEqual(); - eq[65][i].in[0] <== in[i]; - eq[65][i].in[1] <== 237; - and[28][i] = AND(); - and[28][i].a <== states[i][5]; - and[28][i].b <== eq[65][i].out; - states[i+1][9] <== and[28][i].out; - eq[66][i] = IsEqual(); - eq[66][i].in[0] <== in[i]; - eq[66][i].in[1] <== 240; - and[29][i] = AND(); - and[29][i].a <== states[i][5]; - and[29][i].b <== eq[66][i].out; - states[i+1][10] <== and[29][i].out; - eq[67][i] = IsEqual(); - eq[67][i].in[0] <== in[i]; - eq[67][i].in[1] <== 241; - eq[68][i] = IsEqual(); - eq[68][i].in[0] <== in[i]; - eq[68][i].in[1] <== 242; - eq[69][i] = IsEqual(); - eq[69][i].in[0] <== in[i]; - eq[69][i].in[1] <== 243; - and[30][i] = AND(); - and[30][i].a <== states[i][5]; - multi_or[10][i] = MultiOR(3); - multi_or[10][i].in[0] <== eq[67][i].out; - multi_or[10][i].in[1] <== eq[68][i].out; - multi_or[10][i].in[2] <== eq[69][i].out; - and[30][i].b <== multi_or[10][i].out; - states[i+1][11] <== and[30][i].out; - eq[70][i] = IsEqual(); - eq[70][i].in[0] <== in[i]; - eq[70][i].in[1] <== 244; - and[31][i] = AND(); - and[31][i].a <== states[i][5]; - and[31][i].b <== eq[70][i].out; - states[i+1][12] <== and[31][i].out; - from_zero_enabled[i] <== MultiNOR(12)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][5]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][5] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][5], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (2, 2), (2, 3), (3, 4), (4, 4)}] - signal prev_states0[5][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (2, 2), (2, 3), (3, 4), (4, 4)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - is_substr0[i] <== MultiOR(5)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3], prev_states0[3][i] * states[i+2][4], prev_states0[4][i] * states[i+2][4]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/subject_all.json b/packages/circom/circuits/common/subject_all.json deleted file mode 100644 index 9b544475..00000000 --- a/packages/circom/circuits/common/subject_all.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)subject:" - }, - { - "is_public": true, - "regex_def": "[^\r\n]+" - }, - { - "is_public": false, - "regex_def": "\r\n" - } - ] -} diff --git a/packages/circom/circuits/common/subject_all_regex.circom b/packages/circom/circuits/common/subject_all_regex.circom deleted file mode 100644 index a98c8dda..00000000 --- a/packages/circom/circuits/common/subject_all_regex.circom +++ /dev/null @@ -1,547 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\r\n|^)subject:[^\r\n]+\r\n -template SubjectAllRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[59][num_bytes]; - component lt[12][num_bytes]; - component and[42][num_bytes]; - component multi_or[12][num_bytes]; - signal states[num_bytes+1][21]; - signal states_tmp[num_bytes+1][21]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 21; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(20); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 13; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - and[1][i].b <== eq[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 10; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[2][i].out; - states_tmp[i+1][2] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 115; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[3][i].out; - states[i+1][3] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 117; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - states[i+1][4] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 98; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[5][i].out; - states[i+1][5] <== and[5][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 106; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[6][i].out; - states[i+1][6] <== and[6][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 101; - and[7][i] = AND(); - and[7][i].a <== states[i][6]; - and[7][i].b <== eq[7][i].out; - states[i+1][7] <== and[7][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 99; - and[8][i] = AND(); - and[8][i].a <== states[i][7]; - and[8][i].b <== eq[8][i].out; - states[i+1][8] <== and[8][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 116; - and[9][i] = AND(); - and[9][i].a <== states[i][8]; - and[9][i].b <== eq[9][i].out; - states[i+1][9] <== and[9][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 58; - and[10][i] = AND(); - and[10][i].a <== states[i][9]; - and[10][i].b <== eq[10][i].out; - states[i+1][10] <== and[10][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 14; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 127; - and[11][i] = AND(); - and[11][i].a <== lt[0][i].out; - and[11][i].b <== lt[1][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 1; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 2; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 3; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 4; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 5; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 6; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 7; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 8; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 9; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 11; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 12; - and[12][i] = AND(); - and[12][i].a <== states[i][10]; - multi_or[0][i] = MultiOR(12); - multi_or[0][i].in[0] <== and[11][i].out; - multi_or[0][i].in[1] <== eq[11][i].out; - multi_or[0][i].in[2] <== eq[12][i].out; - multi_or[0][i].in[3] <== eq[13][i].out; - multi_or[0][i].in[4] <== eq[14][i].out; - multi_or[0][i].in[5] <== eq[15][i].out; - multi_or[0][i].in[6] <== eq[16][i].out; - multi_or[0][i].in[7] <== eq[17][i].out; - multi_or[0][i].in[8] <== eq[18][i].out; - multi_or[0][i].in[9] <== eq[19][i].out; - multi_or[0][i].in[10] <== eq[20][i].out; - multi_or[0][i].in[11] <== eq[21][i].out; - and[12][i].b <== multi_or[0][i].out; - and[13][i] = AND(); - and[13][i].a <== states[i][11]; - and[13][i].b <== multi_or[0][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 128; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 191; - and[14][i] = AND(); - and[14][i].a <== lt[2][i].out; - and[14][i].b <== lt[3][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][12]; - and[15][i].b <== and[14][i].out; - multi_or[1][i] = MultiOR(3); - multi_or[1][i].in[0] <== and[12][i].out; - multi_or[1][i].in[1] <== and[13][i].out; - multi_or[1][i].in[2] <== and[15][i].out; - states[i+1][11] <== multi_or[1][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 194; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 223; - and[16][i] = AND(); - and[16][i].a <== lt[4][i].out; - and[16][i].b <== lt[5][i].out; - and[17][i] = AND(); - and[17][i].a <== states[i][10]; - and[17][i].b <== and[16][i].out; - and[18][i] = AND(); - and[18][i].a <== states[i][11]; - and[18][i].b <== and[16][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 160; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 191; - and[19][i] = AND(); - and[19][i].a <== lt[6][i].out; - and[19][i].b <== lt[7][i].out; - and[20][i] = AND(); - and[20][i].a <== states[i][13]; - and[20][i].b <== and[19][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][14]; - and[21][i].b <== and[14][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 128; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 159; - and[22][i] = AND(); - and[22][i].a <== lt[8][i].out; - and[22][i].b <== lt[9][i].out; - and[23][i] = AND(); - and[23][i].a <== states[i][15]; - and[23][i].b <== and[22][i].out; - multi_or[2][i] = MultiOR(5); - multi_or[2][i].in[0] <== and[17][i].out; - multi_or[2][i].in[1] <== and[18][i].out; - multi_or[2][i].in[2] <== and[20][i].out; - multi_or[2][i].in[3] <== and[21][i].out; - multi_or[2][i].in[4] <== and[23][i].out; - states[i+1][12] <== multi_or[2][i].out; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 224; - and[24][i] = AND(); - and[24][i].a <== states[i][10]; - and[24][i].b <== eq[22][i].out; - and[25][i] = AND(); - and[25][i].a <== states[i][11]; - and[25][i].b <== eq[22][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[24][i].out; - multi_or[3][i].in[1] <== and[25][i].out; - states[i+1][13] <== multi_or[3][i].out; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 225; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 226; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 227; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 228; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 229; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 230; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 231; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 232; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 233; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 234; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 235; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 236; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 238; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 239; - and[26][i] = AND(); - and[26][i].a <== states[i][10]; - multi_or[4][i] = MultiOR(14); - multi_or[4][i].in[0] <== eq[23][i].out; - multi_or[4][i].in[1] <== eq[24][i].out; - multi_or[4][i].in[2] <== eq[25][i].out; - multi_or[4][i].in[3] <== eq[26][i].out; - multi_or[4][i].in[4] <== eq[27][i].out; - multi_or[4][i].in[5] <== eq[28][i].out; - multi_or[4][i].in[6] <== eq[29][i].out; - multi_or[4][i].in[7] <== eq[30][i].out; - multi_or[4][i].in[8] <== eq[31][i].out; - multi_or[4][i].in[9] <== eq[32][i].out; - multi_or[4][i].in[10] <== eq[33][i].out; - multi_or[4][i].in[11] <== eq[34][i].out; - multi_or[4][i].in[12] <== eq[35][i].out; - multi_or[4][i].in[13] <== eq[36][i].out; - and[26][i].b <== multi_or[4][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][11]; - and[27][i].b <== multi_or[4][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 144; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 191; - and[28][i] = AND(); - and[28][i].a <== lt[10][i].out; - and[28][i].b <== lt[11][i].out; - and[29][i] = AND(); - and[29][i].a <== states[i][16]; - and[29][i].b <== and[28][i].out; - and[30][i] = AND(); - and[30][i].a <== states[i][17]; - and[30][i].b <== and[14][i].out; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 128; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 129; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 130; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 131; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 132; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 133; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 134; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 135; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 136; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 137; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 138; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 139; - eq[49][i] = IsEqual(); - eq[49][i].in[0] <== in[i]; - eq[49][i].in[1] <== 140; - eq[50][i] = IsEqual(); - eq[50][i].in[0] <== in[i]; - eq[50][i].in[1] <== 141; - eq[51][i] = IsEqual(); - eq[51][i].in[0] <== in[i]; - eq[51][i].in[1] <== 142; - eq[52][i] = IsEqual(); - eq[52][i].in[0] <== in[i]; - eq[52][i].in[1] <== 143; - and[31][i] = AND(); - and[31][i].a <== states[i][18]; - multi_or[5][i] = MultiOR(16); - multi_or[5][i].in[0] <== eq[37][i].out; - multi_or[5][i].in[1] <== eq[38][i].out; - multi_or[5][i].in[2] <== eq[39][i].out; - multi_or[5][i].in[3] <== eq[40][i].out; - multi_or[5][i].in[4] <== eq[41][i].out; - multi_or[5][i].in[5] <== eq[42][i].out; - multi_or[5][i].in[6] <== eq[43][i].out; - multi_or[5][i].in[7] <== eq[44][i].out; - multi_or[5][i].in[8] <== eq[45][i].out; - multi_or[5][i].in[9] <== eq[46][i].out; - multi_or[5][i].in[10] <== eq[47][i].out; - multi_or[5][i].in[11] <== eq[48][i].out; - multi_or[5][i].in[12] <== eq[49][i].out; - multi_or[5][i].in[13] <== eq[50][i].out; - multi_or[5][i].in[14] <== eq[51][i].out; - multi_or[5][i].in[15] <== eq[52][i].out; - and[31][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(5); - multi_or[6][i].in[0] <== and[26][i].out; - multi_or[6][i].in[1] <== and[27][i].out; - multi_or[6][i].in[2] <== and[29][i].out; - multi_or[6][i].in[3] <== and[30][i].out; - multi_or[6][i].in[4] <== and[31][i].out; - states[i+1][14] <== multi_or[6][i].out; - eq[53][i] = IsEqual(); - eq[53][i].in[0] <== in[i]; - eq[53][i].in[1] <== 237; - and[32][i] = AND(); - and[32][i].a <== states[i][10]; - and[32][i].b <== eq[53][i].out; - and[33][i] = AND(); - and[33][i].a <== states[i][11]; - and[33][i].b <== eq[53][i].out; - multi_or[7][i] = MultiOR(2); - multi_or[7][i].in[0] <== and[32][i].out; - multi_or[7][i].in[1] <== and[33][i].out; - states[i+1][15] <== multi_or[7][i].out; - eq[54][i] = IsEqual(); - eq[54][i].in[0] <== in[i]; - eq[54][i].in[1] <== 240; - and[34][i] = AND(); - and[34][i].a <== states[i][10]; - and[34][i].b <== eq[54][i].out; - and[35][i] = AND(); - and[35][i].a <== states[i][11]; - and[35][i].b <== eq[54][i].out; - multi_or[8][i] = MultiOR(2); - multi_or[8][i].in[0] <== and[34][i].out; - multi_or[8][i].in[1] <== and[35][i].out; - states[i+1][16] <== multi_or[8][i].out; - eq[55][i] = IsEqual(); - eq[55][i].in[0] <== in[i]; - eq[55][i].in[1] <== 241; - eq[56][i] = IsEqual(); - eq[56][i].in[0] <== in[i]; - eq[56][i].in[1] <== 242; - eq[57][i] = IsEqual(); - eq[57][i].in[0] <== in[i]; - eq[57][i].in[1] <== 243; - and[36][i] = AND(); - and[36][i].a <== states[i][10]; - multi_or[9][i] = MultiOR(3); - multi_or[9][i].in[0] <== eq[55][i].out; - multi_or[9][i].in[1] <== eq[56][i].out; - multi_or[9][i].in[2] <== eq[57][i].out; - and[36][i].b <== multi_or[9][i].out; - and[37][i] = AND(); - and[37][i].a <== states[i][11]; - and[37][i].b <== multi_or[9][i].out; - multi_or[10][i] = MultiOR(2); - multi_or[10][i].in[0] <== and[36][i].out; - multi_or[10][i].in[1] <== and[37][i].out; - states[i+1][17] <== multi_or[10][i].out; - eq[58][i] = IsEqual(); - eq[58][i].in[0] <== in[i]; - eq[58][i].in[1] <== 244; - and[38][i] = AND(); - and[38][i].a <== states[i][10]; - and[38][i].b <== eq[58][i].out; - and[39][i] = AND(); - and[39][i].a <== states[i][11]; - and[39][i].b <== eq[58][i].out; - multi_or[11][i] = MultiOR(2); - multi_or[11][i].in[0] <== and[38][i].out; - multi_or[11][i].in[1] <== and[39][i].out; - states[i+1][18] <== multi_or[11][i].out; - and[40][i] = AND(); - and[40][i].a <== states[i][11]; - and[40][i].b <== eq[0][i].out; - states[i+1][19] <== and[40][i].out; - and[41][i] = AND(); - and[41][i].a <== states[i][19]; - and[41][i].b <== eq[2][i].out; - states[i+1][20] <== and[41][i].out; - from_zero_enabled[i] <== MultiNOR(20)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - state_changed[i].in[18] <== states[i+1][19]; - state_changed[i].in[19] <== states[i+1][20]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][20]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][20] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][20], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(10, 11), (10, 12), (10, 13), (10, 14), (10, 15), (10, 16), (10, 17), (10, 18), (11, 11), (11, 12), (11, 13), (11, 14), (11, 15), (11, 16), (11, 17), (11, 18), (12, 11), (13, 12), (14, 12), (15, 12), (16, 14), (17, 14), (18, 14)}] - signal prev_states0[23][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(10, 11), (10, 12), (10, 13), (10, 14), (10, 15), (10, 16), (10, 17), (10, 18), (11, 11), (11, 12), (11, 13), (11, 14), (11, 15), (11, 16), (11, 17), (11, 18), (12, 11), (13, 12), (14, 12), (15, 12), (16, 14), (17, 14), (18, 14)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[15][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][11]; - prev_states0[16][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][12]; - prev_states0[17][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][13]; - prev_states0[18][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][14]; - prev_states0[19][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][15]; - prev_states0[20][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][16]; - prev_states0[21][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][17]; - prev_states0[22][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][18]; - is_substr0[i] <== MultiOR(23)([prev_states0[0][i] * states[i+2][11], prev_states0[1][i] * states[i+2][12], prev_states0[2][i] * states[i+2][13], prev_states0[3][i] * states[i+2][14], prev_states0[4][i] * states[i+2][15], prev_states0[5][i] * states[i+2][16], prev_states0[6][i] * states[i+2][17], prev_states0[7][i] * states[i+2][18], prev_states0[8][i] * states[i+2][11], prev_states0[9][i] * states[i+2][12], prev_states0[10][i] * states[i+2][13], prev_states0[11][i] * states[i+2][14], prev_states0[12][i] * states[i+2][15], prev_states0[13][i] * states[i+2][16], prev_states0[14][i] * states[i+2][17], prev_states0[15][i] * states[i+2][18], prev_states0[16][i] * states[i+2][11], prev_states0[17][i] * states[i+2][12], prev_states0[18][i] * states[i+2][12], prev_states0[19][i] * states[i+2][12], prev_states0[20][i] * states[i+2][14], prev_states0[21][i] * states[i+2][14], prev_states0[22][i] * states[i+2][14]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/timestamp.json b/packages/circom/circuits/common/timestamp.json deleted file mode 100644 index a3c945b3..00000000 --- a/packages/circom/circuits/common/timestamp.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\r\n|^)dkim-signature:" - }, - { - "is_public": false, - "regex_def": "([a-z]+=[^;]+; )+t=" - }, - { - "is_public": true, - "regex_def": "[0-9]+" - }, - { - "is_public": false, - "regex_def": ";" - } - ] -} diff --git a/packages/circom/circuits/common/timestamp_regex.circom b/packages/circom/circuits/common/timestamp_regex.circom deleted file mode 100644 index c8817fad..00000000 --- a/packages/circom/circuits/common/timestamp_regex.circom +++ /dev/null @@ -1,731 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\r\n|^)dkim-signature:([a-z]+=[^;]+; )+t=[0-9]+; -template TimestampRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[72][num_bytes]; - component lt[20][num_bytes]; - component and[71][num_bytes]; - component multi_or[17][num_bytes]; - signal states[num_bytes+1][34]; - signal states_tmp[num_bytes+1][34]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 34; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(33); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 13; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - and[1][i].b <== eq[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 10; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[2][i].out; - states_tmp[i+1][2] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 100; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[3][i].out; - states[i+1][3] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 107; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - states[i+1][4] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 105; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[5][i].out; - states[i+1][5] <== and[5][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 109; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[6][i].out; - states[i+1][6] <== and[6][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 45; - and[7][i] = AND(); - and[7][i].a <== states[i][6]; - and[7][i].b <== eq[7][i].out; - states[i+1][7] <== and[7][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 115; - and[8][i] = AND(); - and[8][i].a <== states[i][7]; - and[8][i].b <== eq[8][i].out; - states[i+1][8] <== and[8][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][8]; - and[9][i].b <== eq[5][i].out; - states[i+1][9] <== and[9][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 103; - and[10][i] = AND(); - and[10][i].a <== states[i][9]; - and[10][i].b <== eq[9][i].out; - states[i+1][10] <== and[10][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 110; - and[11][i] = AND(); - and[11][i].a <== states[i][10]; - and[11][i].b <== eq[10][i].out; - states[i+1][11] <== and[11][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 97; - and[12][i] = AND(); - and[12][i].a <== states[i][11]; - and[12][i].b <== eq[11][i].out; - states[i+1][12] <== and[12][i].out; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 116; - and[13][i] = AND(); - and[13][i].a <== states[i][12]; - and[13][i].b <== eq[12][i].out; - states[i+1][13] <== and[13][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 117; - and[14][i] = AND(); - and[14][i].a <== states[i][13]; - and[14][i].b <== eq[13][i].out; - states[i+1][14] <== and[14][i].out; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 114; - and[15][i] = AND(); - and[15][i].a <== states[i][14]; - and[15][i].b <== eq[14][i].out; - states[i+1][15] <== and[15][i].out; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 101; - and[16][i] = AND(); - and[16][i].a <== states[i][15]; - and[16][i].b <== eq[15][i].out; - states[i+1][16] <== and[16][i].out; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 58; - and[17][i] = AND(); - and[17][i].a <== states[i][16]; - and[17][i].b <== eq[16][i].out; - states[i+1][17] <== and[17][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 97; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 122; - and[18][i] = AND(); - and[18][i].a <== lt[0][i].out; - and[18][i].b <== lt[1][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][17]; - and[19][i].b <== and[18][i].out; - and[20][i] = AND(); - and[20][i].a <== states[i][18]; - and[20][i].b <== and[18][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 97; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 115; - and[21][i] = AND(); - and[21][i].a <== lt[2][i].out; - and[21][i].b <== lt[3][i].out; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 118; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 119; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 120; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 121; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 122; - and[22][i] = AND(); - and[22][i].a <== states[i][29]; - multi_or[0][i] = MultiOR(7); - multi_or[0][i].in[0] <== and[21][i].out; - multi_or[0][i].in[1] <== eq[13][i].out; - multi_or[0][i].in[2] <== eq[17][i].out; - multi_or[0][i].in[3] <== eq[18][i].out; - multi_or[0][i].in[4] <== eq[19][i].out; - multi_or[0][i].in[5] <== eq[20][i].out; - multi_or[0][i].in[6] <== eq[21][i].out; - and[22][i].b <== multi_or[0][i].out; - and[23][i] = AND(); - and[23][i].a <== states[i][30]; - and[23][i].b <== and[18][i].out; - multi_or[1][i] = MultiOR(4); - multi_or[1][i].in[0] <== and[19][i].out; - multi_or[1][i].in[1] <== and[20][i].out; - multi_or[1][i].in[2] <== and[22][i].out; - multi_or[1][i].in[3] <== and[23][i].out; - states[i+1][18] <== multi_or[1][i].out; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 61; - and[24][i] = AND(); - and[24][i].a <== states[i][18]; - and[24][i].b <== eq[22][i].out; - states[i+1][19] <== and[24][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 1; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 58; - and[25][i] = AND(); - and[25][i].a <== lt[4][i].out; - and[25][i].b <== lt[5][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 60; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 127; - and[26][i] = AND(); - and[26][i].a <== lt[6][i].out; - and[26][i].b <== lt[7][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][19]; - multi_or[2][i] = MultiOR(2); - multi_or[2][i].in[0] <== and[25][i].out; - multi_or[2][i].in[1] <== and[26][i].out; - and[27][i].b <== multi_or[2][i].out; - and[28][i] = AND(); - and[28][i].a <== states[i][20]; - and[28][i].b <== multi_or[2][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 128; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 191; - and[29][i] = AND(); - and[29][i].a <== lt[8][i].out; - and[29][i].b <== lt[9][i].out; - and[30][i] = AND(); - and[30][i].a <== states[i][21]; - and[30][i].b <== and[29][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 1; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 47; - and[31][i] = AND(); - and[31][i].a <== lt[10][i].out; - and[31][i].b <== lt[11][i].out; - and[32][i] = AND(); - and[32][i].a <== states[i][31]; - multi_or[3][i] = MultiOR(3); - multi_or[3][i].in[0] <== and[31][i].out; - multi_or[3][i].in[1] <== and[26][i].out; - multi_or[3][i].in[2] <== eq[16][i].out; - and[32][i].b <== multi_or[3][i].out; - multi_or[4][i] = MultiOR(4); - multi_or[4][i].in[0] <== and[27][i].out; - multi_or[4][i].in[1] <== and[28][i].out; - multi_or[4][i].in[2] <== and[30][i].out; - multi_or[4][i].in[3] <== and[32][i].out; - states[i+1][20] <== multi_or[4][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 194; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 223; - and[33][i] = AND(); - and[33][i].a <== lt[12][i].out; - and[33][i].b <== lt[13][i].out; - and[34][i] = AND(); - and[34][i].a <== states[i][19]; - and[34][i].b <== and[33][i].out; - and[35][i] = AND(); - and[35][i].a <== states[i][20]; - and[35][i].b <== and[33][i].out; - lt[14][i] = LessEqThan(8); - lt[14][i].in[0] <== 160; - lt[14][i].in[1] <== in[i]; - lt[15][i] = LessEqThan(8); - lt[15][i].in[0] <== in[i]; - lt[15][i].in[1] <== 191; - and[36][i] = AND(); - and[36][i].a <== lt[14][i].out; - and[36][i].b <== lt[15][i].out; - and[37][i] = AND(); - and[37][i].a <== states[i][22]; - and[37][i].b <== and[36][i].out; - and[38][i] = AND(); - and[38][i].a <== states[i][23]; - and[38][i].b <== and[29][i].out; - lt[16][i] = LessEqThan(8); - lt[16][i].in[0] <== 128; - lt[16][i].in[1] <== in[i]; - lt[17][i] = LessEqThan(8); - lt[17][i].in[0] <== in[i]; - lt[17][i].in[1] <== 159; - and[39][i] = AND(); - and[39][i].a <== lt[16][i].out; - and[39][i].b <== lt[17][i].out; - and[40][i] = AND(); - and[40][i].a <== states[i][24]; - and[40][i].b <== and[39][i].out; - and[41][i] = AND(); - and[41][i].a <== states[i][31]; - and[41][i].b <== and[33][i].out; - multi_or[5][i] = MultiOR(6); - multi_or[5][i].in[0] <== and[34][i].out; - multi_or[5][i].in[1] <== and[35][i].out; - multi_or[5][i].in[2] <== and[37][i].out; - multi_or[5][i].in[3] <== and[38][i].out; - multi_or[5][i].in[4] <== and[40][i].out; - multi_or[5][i].in[5] <== and[41][i].out; - states[i+1][21] <== multi_or[5][i].out; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 224; - and[42][i] = AND(); - and[42][i].a <== states[i][19]; - and[42][i].b <== eq[23][i].out; - and[43][i] = AND(); - and[43][i].a <== states[i][20]; - and[43][i].b <== eq[23][i].out; - and[44][i] = AND(); - and[44][i].a <== states[i][31]; - and[44][i].b <== eq[23][i].out; - multi_or[6][i] = MultiOR(3); - multi_or[6][i].in[0] <== and[42][i].out; - multi_or[6][i].in[1] <== and[43][i].out; - multi_or[6][i].in[2] <== and[44][i].out; - states[i+1][22] <== multi_or[6][i].out; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 225; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 226; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 227; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 228; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 229; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 230; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 231; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 232; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 233; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 234; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 235; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 236; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 238; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 239; - and[45][i] = AND(); - and[45][i].a <== states[i][19]; - multi_or[7][i] = MultiOR(14); - multi_or[7][i].in[0] <== eq[24][i].out; - multi_or[7][i].in[1] <== eq[25][i].out; - multi_or[7][i].in[2] <== eq[26][i].out; - multi_or[7][i].in[3] <== eq[27][i].out; - multi_or[7][i].in[4] <== eq[28][i].out; - multi_or[7][i].in[5] <== eq[29][i].out; - multi_or[7][i].in[6] <== eq[30][i].out; - multi_or[7][i].in[7] <== eq[31][i].out; - multi_or[7][i].in[8] <== eq[32][i].out; - multi_or[7][i].in[9] <== eq[33][i].out; - multi_or[7][i].in[10] <== eq[34][i].out; - multi_or[7][i].in[11] <== eq[35][i].out; - multi_or[7][i].in[12] <== eq[36][i].out; - multi_or[7][i].in[13] <== eq[37][i].out; - and[45][i].b <== multi_or[7][i].out; - and[46][i] = AND(); - and[46][i].a <== states[i][20]; - and[46][i].b <== multi_or[7][i].out; - lt[18][i] = LessEqThan(8); - lt[18][i].in[0] <== 144; - lt[18][i].in[1] <== in[i]; - lt[19][i] = LessEqThan(8); - lt[19][i].in[0] <== in[i]; - lt[19][i].in[1] <== 191; - and[47][i] = AND(); - and[47][i].a <== lt[18][i].out; - and[47][i].b <== lt[19][i].out; - and[48][i] = AND(); - and[48][i].a <== states[i][25]; - and[48][i].b <== and[47][i].out; - and[49][i] = AND(); - and[49][i].a <== states[i][26]; - and[49][i].b <== and[29][i].out; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 128; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 129; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 130; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 131; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 132; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 133; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 134; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 135; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 136; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 137; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 138; - eq[49][i] = IsEqual(); - eq[49][i].in[0] <== in[i]; - eq[49][i].in[1] <== 139; - eq[50][i] = IsEqual(); - eq[50][i].in[0] <== in[i]; - eq[50][i].in[1] <== 140; - eq[51][i] = IsEqual(); - eq[51][i].in[0] <== in[i]; - eq[51][i].in[1] <== 141; - eq[52][i] = IsEqual(); - eq[52][i].in[0] <== in[i]; - eq[52][i].in[1] <== 142; - eq[53][i] = IsEqual(); - eq[53][i].in[0] <== in[i]; - eq[53][i].in[1] <== 143; - and[50][i] = AND(); - and[50][i].a <== states[i][27]; - multi_or[8][i] = MultiOR(16); - multi_or[8][i].in[0] <== eq[38][i].out; - multi_or[8][i].in[1] <== eq[39][i].out; - multi_or[8][i].in[2] <== eq[40][i].out; - multi_or[8][i].in[3] <== eq[41][i].out; - multi_or[8][i].in[4] <== eq[42][i].out; - multi_or[8][i].in[5] <== eq[43][i].out; - multi_or[8][i].in[6] <== eq[44][i].out; - multi_or[8][i].in[7] <== eq[45][i].out; - multi_or[8][i].in[8] <== eq[46][i].out; - multi_or[8][i].in[9] <== eq[47][i].out; - multi_or[8][i].in[10] <== eq[48][i].out; - multi_or[8][i].in[11] <== eq[49][i].out; - multi_or[8][i].in[12] <== eq[50][i].out; - multi_or[8][i].in[13] <== eq[51][i].out; - multi_or[8][i].in[14] <== eq[52][i].out; - multi_or[8][i].in[15] <== eq[53][i].out; - and[50][i].b <== multi_or[8][i].out; - and[51][i] = AND(); - and[51][i].a <== states[i][31]; - and[51][i].b <== multi_or[7][i].out; - multi_or[9][i] = MultiOR(6); - multi_or[9][i].in[0] <== and[45][i].out; - multi_or[9][i].in[1] <== and[46][i].out; - multi_or[9][i].in[2] <== and[48][i].out; - multi_or[9][i].in[3] <== and[49][i].out; - multi_or[9][i].in[4] <== and[50][i].out; - multi_or[9][i].in[5] <== and[51][i].out; - states[i+1][23] <== multi_or[9][i].out; - eq[54][i] = IsEqual(); - eq[54][i].in[0] <== in[i]; - eq[54][i].in[1] <== 237; - and[52][i] = AND(); - and[52][i].a <== states[i][19]; - and[52][i].b <== eq[54][i].out; - and[53][i] = AND(); - and[53][i].a <== states[i][20]; - and[53][i].b <== eq[54][i].out; - and[54][i] = AND(); - and[54][i].a <== states[i][31]; - and[54][i].b <== eq[54][i].out; - multi_or[10][i] = MultiOR(3); - multi_or[10][i].in[0] <== and[52][i].out; - multi_or[10][i].in[1] <== and[53][i].out; - multi_or[10][i].in[2] <== and[54][i].out; - states[i+1][24] <== multi_or[10][i].out; - eq[55][i] = IsEqual(); - eq[55][i].in[0] <== in[i]; - eq[55][i].in[1] <== 240; - and[55][i] = AND(); - and[55][i].a <== states[i][19]; - and[55][i].b <== eq[55][i].out; - and[56][i] = AND(); - and[56][i].a <== states[i][20]; - and[56][i].b <== eq[55][i].out; - and[57][i] = AND(); - and[57][i].a <== states[i][31]; - and[57][i].b <== eq[55][i].out; - multi_or[11][i] = MultiOR(3); - multi_or[11][i].in[0] <== and[55][i].out; - multi_or[11][i].in[1] <== and[56][i].out; - multi_or[11][i].in[2] <== and[57][i].out; - states[i+1][25] <== multi_or[11][i].out; - eq[56][i] = IsEqual(); - eq[56][i].in[0] <== in[i]; - eq[56][i].in[1] <== 241; - eq[57][i] = IsEqual(); - eq[57][i].in[0] <== in[i]; - eq[57][i].in[1] <== 242; - eq[58][i] = IsEqual(); - eq[58][i].in[0] <== in[i]; - eq[58][i].in[1] <== 243; - and[58][i] = AND(); - and[58][i].a <== states[i][19]; - multi_or[12][i] = MultiOR(3); - multi_or[12][i].in[0] <== eq[56][i].out; - multi_or[12][i].in[1] <== eq[57][i].out; - multi_or[12][i].in[2] <== eq[58][i].out; - and[58][i].b <== multi_or[12][i].out; - and[59][i] = AND(); - and[59][i].a <== states[i][20]; - and[59][i].b <== multi_or[12][i].out; - and[60][i] = AND(); - and[60][i].a <== states[i][31]; - and[60][i].b <== multi_or[12][i].out; - multi_or[13][i] = MultiOR(3); - multi_or[13][i].in[0] <== and[58][i].out; - multi_or[13][i].in[1] <== and[59][i].out; - multi_or[13][i].in[2] <== and[60][i].out; - states[i+1][26] <== multi_or[13][i].out; - eq[59][i] = IsEqual(); - eq[59][i].in[0] <== in[i]; - eq[59][i].in[1] <== 244; - and[61][i] = AND(); - and[61][i].a <== states[i][19]; - and[61][i].b <== eq[59][i].out; - and[62][i] = AND(); - and[62][i].a <== states[i][20]; - and[62][i].b <== eq[59][i].out; - and[63][i] = AND(); - and[63][i].a <== states[i][31]; - and[63][i].b <== eq[59][i].out; - multi_or[14][i] = MultiOR(3); - multi_or[14][i].in[0] <== and[61][i].out; - multi_or[14][i].in[1] <== and[62][i].out; - multi_or[14][i].in[2] <== and[63][i].out; - states[i+1][27] <== multi_or[14][i].out; - eq[60][i] = IsEqual(); - eq[60][i].in[0] <== in[i]; - eq[60][i].in[1] <== 59; - and[64][i] = AND(); - and[64][i].a <== states[i][20]; - and[64][i].b <== eq[60][i].out; - states[i+1][28] <== and[64][i].out; - eq[61][i] = IsEqual(); - eq[61][i].in[0] <== in[i]; - eq[61][i].in[1] <== 32; - and[65][i] = AND(); - and[65][i].a <== states[i][28]; - and[65][i].b <== eq[61][i].out; - states[i+1][29] <== and[65][i].out; - and[66][i] = AND(); - and[66][i].a <== states[i][29]; - and[66][i].b <== eq[12][i].out; - states[i+1][30] <== and[66][i].out; - and[67][i] = AND(); - and[67][i].a <== states[i][30]; - and[67][i].b <== eq[22][i].out; - states[i+1][31] <== and[67][i].out; - eq[62][i] = IsEqual(); - eq[62][i].in[0] <== in[i]; - eq[62][i].in[1] <== 48; - eq[63][i] = IsEqual(); - eq[63][i].in[0] <== in[i]; - eq[63][i].in[1] <== 49; - eq[64][i] = IsEqual(); - eq[64][i].in[0] <== in[i]; - eq[64][i].in[1] <== 50; - eq[65][i] = IsEqual(); - eq[65][i].in[0] <== in[i]; - eq[65][i].in[1] <== 51; - eq[66][i] = IsEqual(); - eq[66][i].in[0] <== in[i]; - eq[66][i].in[1] <== 52; - eq[67][i] = IsEqual(); - eq[67][i].in[0] <== in[i]; - eq[67][i].in[1] <== 53; - eq[68][i] = IsEqual(); - eq[68][i].in[0] <== in[i]; - eq[68][i].in[1] <== 54; - eq[69][i] = IsEqual(); - eq[69][i].in[0] <== in[i]; - eq[69][i].in[1] <== 55; - eq[70][i] = IsEqual(); - eq[70][i].in[0] <== in[i]; - eq[70][i].in[1] <== 56; - eq[71][i] = IsEqual(); - eq[71][i].in[0] <== in[i]; - eq[71][i].in[1] <== 57; - and[68][i] = AND(); - and[68][i].a <== states[i][31]; - multi_or[15][i] = MultiOR(10); - multi_or[15][i].in[0] <== eq[62][i].out; - multi_or[15][i].in[1] <== eq[63][i].out; - multi_or[15][i].in[2] <== eq[64][i].out; - multi_or[15][i].in[3] <== eq[65][i].out; - multi_or[15][i].in[4] <== eq[66][i].out; - multi_or[15][i].in[5] <== eq[67][i].out; - multi_or[15][i].in[6] <== eq[68][i].out; - multi_or[15][i].in[7] <== eq[69][i].out; - multi_or[15][i].in[8] <== eq[70][i].out; - multi_or[15][i].in[9] <== eq[71][i].out; - and[68][i].b <== multi_or[15][i].out; - and[69][i] = AND(); - and[69][i].a <== states[i][32]; - and[69][i].b <== multi_or[15][i].out; - multi_or[16][i] = MultiOR(2); - multi_or[16][i].in[0] <== and[68][i].out; - multi_or[16][i].in[1] <== and[69][i].out; - states[i+1][32] <== multi_or[16][i].out; - and[70][i] = AND(); - and[70][i].a <== states[i][32]; - and[70][i].b <== eq[60][i].out; - states[i+1][33] <== and[70][i].out; - from_zero_enabled[i] <== MultiNOR(33)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20], states[i+1][21], states[i+1][22], states[i+1][23], states[i+1][24], states[i+1][25], states[i+1][26], states[i+1][27], states[i+1][28], states[i+1][29], states[i+1][30], states[i+1][31], states[i+1][32], states[i+1][33]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - state_changed[i].in[18] <== states[i+1][19]; - state_changed[i].in[19] <== states[i+1][20]; - state_changed[i].in[20] <== states[i+1][21]; - state_changed[i].in[21] <== states[i+1][22]; - state_changed[i].in[22] <== states[i+1][23]; - state_changed[i].in[23] <== states[i+1][24]; - state_changed[i].in[24] <== states[i+1][25]; - state_changed[i].in[25] <== states[i+1][26]; - state_changed[i].in[26] <== states[i+1][27]; - state_changed[i].in[27] <== states[i+1][28]; - state_changed[i].in[28] <== states[i+1][29]; - state_changed[i].in[29] <== states[i+1][30]; - state_changed[i].in[30] <== states[i+1][31]; - state_changed[i].in[31] <== states[i+1][32]; - state_changed[i].in[32] <== states[i+1][33]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][33]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][33] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][33], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(31, 32), (32, 32)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(31, 32), (32, 32)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][31]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][32]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][32], prev_states0[1][i] * states[i+2][32]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/circuits/common/to_addr_regex.circom b/packages/circom/circuits/common/to_addr_regex.circom deleted file mode 100644 index dbbaed63..00000000 --- a/packages/circom/circuits/common/to_addr_regex.circom +++ /dev/null @@ -1,31 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; -include "@zk-email/zk-regex-circom/circuits/common/to_all_regex.circom"; -include "@zk-email/zk-regex-circom/circuits/common/email_addr_regex.circom"; -include "@zk-email/zk-regex-circom/circuits/common/email_addr_with_name_regex.circom"; - - -template ToAddrRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - signal output reveal0[msg_bytes]; - - signal toOut; - signal toReveal[msg_bytes]; - (toOut, toReveal) <== ToAllRegex(msg_bytes)(msg); - toOut === 1; - - signal emailNameOut; - signal emailNameReveal[msg_bytes]; - (emailNameOut, emailNameReveal) <== EmailAddrWithNameRegex(msg_bytes)(toReveal); - - signal emailAddrOut; - signal emailAddrReveal[msg_bytes]; - (emailAddrOut, emailAddrReveal) <== EmailAddrRegex(msg_bytes)(toReveal); - - out <== MultiOR(2)([emailNameOut, emailAddrOut]); - for(var i=0; i=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@babel/code-frame@7.26.2: - resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 - dev: true - - /@babel/compat-data@7.26.5: - resolution: {integrity: sha512-XvcZi1KWf88RVbF9wn8MN6tYFloU5qX8KjuF3E1PVBmJ9eypXfs4GRiJwLuTZL0iSnJUKn1BFPa5BPZZJyFzPg==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/core@7.26.7: - resolution: {integrity: sha512-SRijHmF0PSPgLIBYlWnG0hyeJLwXE2CgpsXaMOrtt2yp9/86ALw6oUlj9KYuZ0JN07T4eBMVIW4li/9S1j2BGA==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.5 - '@babel/helper-compilation-targets': 7.26.5 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.7) - '@babel/helpers': 7.26.7 - '@babel/parser': 7.26.7 - '@babel/template': 7.25.9 - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 - convert-source-map: 2.0.0 - debug: 4.4.0(supports-color@8.1.1) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/generator@7.26.5: - resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - '@jridgewell/gen-mapping': 0.3.8 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.1.0 - dev: true - - /@babel/helper-compilation-targets@7.26.5: - resolution: {integrity: sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.26.5 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.4 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: true - - /@babel/helper-module-imports@7.25.9: - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.26.7 - '@babel/types': 7.26.7 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-module-transforms@7.26.0(@babel/core@7.26.7): - resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.26.7 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-plugin-utils@7.26.5: - resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-string-parser@7.25.9: - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-identifier@7.25.9: - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.25.9: - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helpers@7.26.7: - resolution: {integrity: sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.7 - dev: true - - /@babel/parser@7.26.7: - resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.26.7 - dev: true - - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.26.7): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.26.7): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.26.7): - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.7): - resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.26.7): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.7): - resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.26.7): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.26.7): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.26.7): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.26.7): - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.26.7): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.7): - resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - dev: true - - /@babel/template@7.25.9: - resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - dev: true - - /@babel/traverse@7.26.7: - resolution: {integrity: sha512-1x1sgeyRLC3r5fQOM0/xtQKsYjyxmFjaOrLJNtZ81inNjyJHGIolTULPiSc/2qe1/qfpFLisLQYFnnZl7QoedA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.5 - '@babel/parser': 7.26.7 - '@babel/template': 7.25.9 - '@babel/types': 7.26.7 - debug: 4.4.0(supports-color@8.1.1) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/types@7.26.7: - resolution: {integrity: sha512-t8kDRGrKXyp6+tjUh7hw2RLyclsW4TRoRvRHtSyAX9Bb5ldlFh+90YAYY6awRXrlB4G5G2izNeGySpATlFzmOg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - dev: true - - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true - - /@ethersproject/abi@5.7.0: - resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - dev: true - - /@ethersproject/abstract-provider@5.7.0: - resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - dev: true - - /@ethersproject/abstract-signer@5.7.0: - resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - dev: true - - /@ethersproject/address@5.7.0: - resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/rlp': 5.7.0 - dev: true - - /@ethersproject/base64@5.7.0: - resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} - dependencies: - '@ethersproject/bytes': 5.7.0 - dev: true - - /@ethersproject/basex@5.7.0: - resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/properties': 5.7.0 - dev: true - - /@ethersproject/bignumber@5.7.0: - resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - bn.js: 5.2.1 - dev: true - - /@ethersproject/bytes@5.7.0: - resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} - dependencies: - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/constants@5.7.0: - resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} - dependencies: - '@ethersproject/bignumber': 5.7.0 - dev: true - - /@ethersproject/contracts@5.7.0: - resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/transactions': 5.7.0 - dev: true - - /@ethersproject/hash@5.7.0: - resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - dev: true - - /@ethersproject/hdnode@5.7.0: - resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/wordlists': 5.7.0 - dev: true - - /@ethersproject/json-wallets@5.7.0: - resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} - dependencies: - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - aes-js: 3.0.0 - scrypt-js: 3.0.1 - dev: true - - /@ethersproject/keccak256@5.7.0: - resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} - dependencies: - '@ethersproject/bytes': 5.7.0 - js-sha3: 0.8.0 - dev: true - - /@ethersproject/logger@5.7.0: - resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} - dev: true - - /@ethersproject/networks@5.7.1: - resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} - dependencies: - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/pbkdf2@5.7.0: - resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/sha2': 5.7.0 - dev: true - - /@ethersproject/properties@5.7.0: - resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} - dependencies: - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/providers@5.7.2: - resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - bech32: 1.1.4 - ws: 7.4.6 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - - /@ethersproject/random@5.7.0: - resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/rlp@5.7.0: - resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/sha2@5.7.0: - resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - hash.js: 1.1.7 - dev: true - - /@ethersproject/signing-key@5.7.0: - resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - bn.js: 5.2.1 - elliptic: 6.5.4 - hash.js: 1.1.7 - dev: true - - /@ethersproject/solidity@5.7.0: - resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - dev: true - - /@ethersproject/strings@5.7.0: - resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/transactions@5.7.0: - resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} - dependencies: - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - dev: true - - /@ethersproject/units@5.7.0: - resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} - dependencies: - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/logger': 5.7.0 - dev: true - - /@ethersproject/wallet@5.7.0: - resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/wordlists': 5.7.0 - dev: true - - /@ethersproject/web@5.7.1: - resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} - dependencies: - '@ethersproject/base64': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - dev: true - - /@ethersproject/wordlists@5.7.0: - resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/strings': 5.7.0 - dev: true - - /@iden3/bigarray@0.0.2: - resolution: {integrity: sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==} - - /@iden3/binfileutils@0.0.11: - resolution: {integrity: sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA==} - dependencies: - fastfile: 0.0.20 - ffjavascript: 0.2.63 - dev: true - - /@iden3/binfileutils@0.0.12: - resolution: {integrity: sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ==} - dependencies: - fastfile: 0.0.20 - ffjavascript: 0.3.1 - - /@istanbuljs/load-nyc-config@1.1.0: - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - dev: true - - /@istanbuljs/schema@0.1.3: - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - dev: true - - /@jest/console@29.7.0: - resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - dev: true - - /@jest/core@29.7.0: - resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.13.0) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /@jest/environment@29.7.0: - resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - jest-mock: 29.7.0 - dev: true - - /@jest/expect-utils@29.7.0: - resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.6.3 - dev: true - - /@jest/expect@29.7.0: - resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - expect: 29.7.0 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/fake-timers@29.7.0: - resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.13.0 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-util: 29.7.0 - dev: true - - /@jest/globals@29.7.0: - resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/types': 29.6.3 - jest-mock: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/reporters@29.7.0: - resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.13.0 - chalk: 4.1.2 - collect-v8-coverage: 1.0.2 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 6.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.7 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - jest-worker: 29.7.0 - slash: 3.0.0 - string-length: 4.0.2 - strip-ansi: 6.0.1 - v8-to-istanbul: 9.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/schemas@29.6.3: - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.27.8 - dev: true - - /@jest/source-map@29.6.3: - resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - callsites: 3.1.0 - graceful-fs: 4.2.11 - dev: true - - /@jest/test-result@29.7.0: - resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.7.0 - '@jest/types': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - collect-v8-coverage: 1.0.2 - dev: true - - /@jest/test-sequencer@29.7.0: - resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.7.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - slash: 3.0.0 - dev: true - - /@jest/transform@29.7.0: - resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/core': 7.26.7 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 - convert-source-map: 2.0.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - micromatch: 4.0.8 - pirates: 4.0.6 - slash: 3.0.0 - write-file-atomic: 4.0.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/types@29.6.3: - resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 3.0.4 - '@types/node': 22.13.0 - '@types/yargs': 17.0.33 - chalk: 4.1.2 - dev: true - - /@jridgewell/gen-mapping@0.3.8: - resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@jridgewell/resolve-uri@3.1.2: - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.2.1: - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec@1.5.0: - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - dev: true - - /@jridgewell/trace-mapping@0.3.25: - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - dev: true - - /@sinclair/typebox@0.27.8: - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true - - /@sinonjs/commons@3.0.1: - resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} - dependencies: - type-detect: 4.0.8 - dev: true - - /@sinonjs/fake-timers@10.3.0: - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - dependencies: - '@sinonjs/commons': 3.0.1 - dev: true - - /@types/babel__core@7.20.5: - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - '@types/babel__generator': 7.6.8 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.6 - dev: true - - /@types/babel__generator@7.6.8: - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} - dependencies: - '@babel/types': 7.26.7 - dev: true - - /@types/babel__template@7.4.4: - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - dependencies: - '@babel/parser': 7.26.7 - '@babel/types': 7.26.7 - dev: true - - /@types/babel__traverse@7.20.6: - resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - dependencies: - '@babel/types': 7.26.7 - dev: true - - /@types/graceful-fs@4.1.9: - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} - dependencies: - '@types/node': 22.13.0 - dev: true - - /@types/istanbul-lib-coverage@2.0.6: - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - dev: true - - /@types/istanbul-lib-report@3.0.3: - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - dev: true - - /@types/istanbul-reports@3.0.4: - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - dependencies: - '@types/istanbul-lib-report': 3.0.3 - dev: true - - /@types/jest@29.5.14: - resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - dependencies: - expect: 29.7.0 - pretty-format: 29.7.0 - dev: true - - /@types/node@22.13.0: - resolution: {integrity: sha512-ClIbNe36lawluuvq3+YYhnIN2CELi+6q8NpnM7PYp4hBn/TatfboPgVSm2rwKRfnV2M+Ty9GWDFI64KEe+kysA==} - dependencies: - undici-types: 6.20.0 - dev: true - - /@types/stack-utils@2.0.3: - resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} - dev: true - - /@types/yargs-parser@21.0.3: - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - dev: true - - /@types/yargs@17.0.33: - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - dependencies: - '@types/yargs-parser': 21.0.3 - dev: true - - /aes-js@3.0.0: - resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} - dev: true - - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true - - /ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.21.3 - dev: true - - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - - /ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - dev: true - - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - - /async@3.2.6: - resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - - /available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} - dependencies: - possible-typed-array-names: 1.0.0 - dev: true - - /b4a@1.6.7: - resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} - - /babel-jest@29.7.0(@babel/core@7.26.7): - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.8.0 - dependencies: - '@babel/core': 7.26.7 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.26.7) - chalk: 4.1.2 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} - dependencies: - '@babel/helper-plugin-utils': 7.26.5 - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-instrument: 5.2.1 - test-exclude: 6.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.7 - '@types/babel__core': 7.20.5 - '@types/babel__traverse': 7.20.6 - dev: true - - /babel-preset-current-node-syntax@1.1.0(@babel/core@7.26.7): - resolution: {integrity: sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.26.7 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.26.7) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.26.7) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.26.7) - '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.7) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.7) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.26.7) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.26.7) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.26.7) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.26.7) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.26.7) - dev: true - - /babel-preset-jest@29.6.3(@babel/core@7.26.7): - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.26.7 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.7) - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - /bech32@1.1.4: - resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} - dev: true - - /bfj@7.1.0: - resolution: {integrity: sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw==} - engines: {node: '>= 8.0.0'} - dependencies: - bluebird: 3.7.2 - check-types: 11.2.3 - hoopy: 0.1.4 - jsonpath: 1.1.1 - tryer: 1.0.1 - - /binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - dev: true - - /blake-hash@2.0.0: - resolution: {integrity: sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==} - engines: {node: '>= 10'} - requiresBuild: true - dependencies: - node-addon-api: 3.2.1 - node-gyp-build: 4.8.4 - readable-stream: 3.6.2 - dev: true - - /blake2b-wasm@2.4.0: - resolution: {integrity: sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==} - dependencies: - b4a: 1.6.7 - nanoassert: 2.0.0 - - /blake2b@2.1.4: - resolution: {integrity: sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A==} - dependencies: - blake2b-wasm: 2.4.0 - nanoassert: 2.0.0 - dev: true - - /bluebird@3.7.2: - resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} - - /bn.js@4.12.1: - resolution: {integrity: sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==} - dev: true - - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - - /braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.1.1 - dev: true - - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - dev: true - - /browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true - - /browserslist@4.24.4: - resolution: {integrity: sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001696 - electron-to-chromium: 1.5.90 - node-releases: 2.0.19 - update-browserslist-db: 1.1.2(browserslist@4.24.4) - dev: true - - /bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - dependencies: - node-int64: 0.4.0 - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - - /call-bind-apply-helpers@1.0.1: - resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==} - engines: {node: '>= 0.4'} - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - dev: true - - /call-bind@1.0.8: - resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} - engines: {node: '>= 0.4'} - dependencies: - call-bind-apply-helpers: 1.0.1 - es-define-property: 1.0.1 - get-intrinsic: 1.2.7 - set-function-length: 1.2.2 - dev: true - - /call-bound@1.0.3: - resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind-apply-helpers: 1.0.1 - get-intrinsic: 1.2.7 - dev: true - - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true - - /camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true - - /caniuse-lite@1.0.30001696: - resolution: {integrity: sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==} - dev: true - - /chai@4.5.0: - resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} - engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.4 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.1.0 - dev: true - - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - /char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} - dev: true - - /check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - dependencies: - get-func-name: 2.0.2 - dev: true - - /check-types@11.2.3: - resolution: {integrity: sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==} - - /chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - dev: true - - /circom_runtime@0.1.28: - resolution: {integrity: sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ==} - hasBin: true - dependencies: - ffjavascript: 0.3.1 - - /circom_tester@0.0.20: - resolution: {integrity: sha512-hhtqh3z1+/4RqhbAQxQTzekDvANFNd0M0+D8OdpxM1Ud4yQXoM+1n06AhJ7sULfCUD+LQrmnSjK5GD783KRSxg==} - dependencies: - chai: 4.5.0 - ffjavascript: 0.2.63 - fnv-plus: 1.3.1 - r1csfile: 0.0.47 - snarkjs: 0.7.5 - tmp-promise: 3.0.3 - util: 0.12.5 - dev: true - - /circomlib@2.0.5: - resolution: {integrity: sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A==} - dev: true - - /circomlibjs@0.1.7: - resolution: {integrity: sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg==} - dependencies: - blake-hash: 2.0.0 - blake2b: 2.1.4 - ethers: 5.7.2 - ffjavascript: 0.2.63 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - - /cjs-module-lexer@1.4.3: - resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} - dev: true - - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: true - - /collect-v8-coverage@1.0.2: - resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} - dev: true - - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - /commander@11.1.0: - resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} - engines: {node: '>=16'} - dev: false - - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: true - - /create-jest@29.7.0: - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.13.0) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true - - /debug@4.4.0(supports-color@8.1.1): - resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - supports-color: 8.1.1 - dev: true - - /decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - dev: true - - /dedent@1.5.3: - resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - dev: true - - /deep-eql@4.1.4: - resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} - engines: {node: '>=6'} - dependencies: - type-detect: 4.1.0 - dev: true - - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - /deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - dev: true - - /define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - dependencies: - es-define-property: 1.0.1 - es-errors: 1.3.0 - gopd: 1.2.0 - dev: true - - /detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - dev: true - - /diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} - engines: {node: '>=0.3.1'} - dev: true - - /dunder-proto@1.0.1: - resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} - engines: {node: '>= 0.4'} - dependencies: - call-bind-apply-helpers: 1.0.1 - es-errors: 1.3.0 - gopd: 1.2.0 - dev: true - - /ejs@3.1.10: - resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} - engines: {node: '>=0.10.0'} - hasBin: true - dependencies: - jake: 10.9.2 - - /electron-to-chromium@1.5.90: - resolution: {integrity: sha512-C3PN4aydfW91Natdyd449Kw+BzhLmof6tzy5W1pFC5SpQxVXT+oyiyOG9AgYYSN9OdA/ik3YkCrpwqI8ug5Tug==} - dev: true - - /elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - dependencies: - bn.js: 4.12.1 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - - /emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} - dev: true - - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /es-define-property@1.0.1: - resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} - engines: {node: '>= 0.4'} - dev: true - - /es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - dev: true - - /es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} - engines: {node: '>= 0.4'} - dependencies: - es-errors: 1.3.0 - dev: true - - /escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /escodegen@1.14.3: - resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==} - engines: {node: '>=4.0'} - hasBin: true - dependencies: - esprima: 4.0.1 - estraverse: 4.3.0 - esutils: 2.0.3 - optionator: 0.8.3 - optionalDependencies: - source-map: 0.6.1 - - /esprima@1.2.2: - resolution: {integrity: sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==} - engines: {node: '>=0.4.0'} - hasBin: true - - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - - /ethers@5.7.2: - resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/contracts': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/providers': 5.7.2 - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/solidity': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/units': 5.7.0 - '@ethersproject/wallet': 5.7.0 - '@ethersproject/web': 5.7.1 - '@ethersproject/wordlists': 5.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - - /execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - dependencies: - cross-spawn: 7.0.6 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - dev: true - - /exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - dev: true - - /expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - dev: true - - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - /fastfile@0.0.20: - resolution: {integrity: sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA==} - - /fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - dependencies: - bser: 2.1.1 - dev: true - - /ffjavascript@0.2.60: - resolution: {integrity: sha512-T/9bnEL5xAZRDbQoEMf+pM9nrhK+C3JyZNmqiWub26EQorW7Jt+jR54gpqDhceA4Nj0YctPQwYnl8xa52/A26A==} - dependencies: - wasmbuilder: 0.0.16 - wasmcurves: 0.2.2 - web-worker: 1.5.0 - dev: true - - /ffjavascript@0.2.63: - resolution: {integrity: sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A==} - dependencies: - wasmbuilder: 0.0.16 - wasmcurves: 0.2.2 - web-worker: 1.2.0 - dev: true - - /ffjavascript@0.3.0: - resolution: {integrity: sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ==} - dependencies: - wasmbuilder: 0.0.16 - wasmcurves: 0.2.2 - web-worker: 1.2.0 - - /ffjavascript@0.3.1: - resolution: {integrity: sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw==} - dependencies: - wasmbuilder: 0.0.16 - wasmcurves: 0.2.2 - web-worker: 1.2.0 - - /filelist@1.0.4: - resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} - dependencies: - minimatch: 5.1.6 - - /fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true - - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true - - /fnv-plus@1.3.1: - resolution: {integrity: sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw==} - dev: true - - /for-each@0.3.4: - resolution: {integrity: sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==} - engines: {node: '>= 0.4'} - dependencies: - is-callable: 1.2.7 - dev: true - - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: true - - /gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: true - - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - dev: true - - /get-intrinsic@1.2.7: - resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind-apply-helpers: 1.0.1 - es-define-property: 1.0.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - function-bind: 1.1.2 - get-proto: 1.0.1 - gopd: 1.2.0 - has-symbols: 1.1.0 - hasown: 2.0.2 - math-intrinsics: 1.1.0 - dev: true - - /get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - dev: true - - /get-proto@1.0.1: - resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} - engines: {node: '>= 0.4'} - dependencies: - dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 - dev: true - - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - dev: true - - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - dev: true - - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true - - /gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} - engines: {node: '>= 0.4'} - dev: true - - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true - - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - /has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - dependencies: - es-define-property: 1.0.1 - dev: true - - /has-symbols@1.1.0: - resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} - engines: {node: '>= 0.4'} - dev: true - - /has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.1.0 - dev: true - - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - - /hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - dependencies: - function-bind: 1.1.2 - dev: true - - /he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: true - - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - - /hoopy@0.1.4: - resolution: {integrity: sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==} - engines: {node: '>= 6.0.0'} - - /html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - dev: true - - /human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - dev: true - - /import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true - dependencies: - pkg-dir: 4.2.0 - resolve-cwd: 3.0.0 - dev: true - - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /is-arguments@1.2.0: - resolution: {integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==} - engines: {node: '>= 0.4'} - dependencies: - call-bound: 1.0.3 - has-tostringtag: 1.0.2 - dev: true - - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.3.0 - dev: true - - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: true - - /is-core-module@2.16.1: - resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} - engines: {node: '>= 0.4'} - dependencies: - hasown: 2.0.2 - dev: true - - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - dev: true - - /is-generator-function@1.1.0: - resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bound: 1.0.3 - get-proto: 1.0.1 - has-tostringtag: 1.0.2 - safe-regex-test: 1.1.0 - dev: true - - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true - - /is-regex@1.2.1: - resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} - engines: {node: '>= 0.4'} - dependencies: - call-bound: 1.0.3 - gopd: 1.2.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - dev: true - - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - dev: true - - /is-typed-array@1.1.15: - resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} - engines: {node: '>= 0.4'} - dependencies: - which-typed-array: 1.1.18 - dev: true - - /is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - dev: true - - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true - - /istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} - dev: true - - /istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} - dependencies: - '@babel/core': 7.26.7 - '@babel/parser': 7.26.7 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} - dependencies: - '@babel/core': 7.26.7 - '@babel/parser': 7.26.7 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.2 - semver: 7.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} - dependencies: - istanbul-lib-coverage: 3.2.2 - make-dir: 4.0.0 - supports-color: 7.2.0 - dev: true - - /istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - dependencies: - debug: 4.4.0(supports-color@8.1.1) - istanbul-lib-coverage: 3.2.2 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-reports@3.1.7: - resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} - engines: {node: '>=8'} - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.1 - dev: true - - /jake@10.9.2: - resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - async: 3.2.6 - chalk: 4.1.2 - filelist: 1.0.4 - minimatch: 3.1.2 - - /jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - execa: 5.1.1 - jest-util: 29.7.0 - p-limit: 3.1.0 - dev: true - - /jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - chalk: 4.1.2 - co: 4.6.0 - dedent: 1.5.3 - is-generator-fn: 2.1.0 - jest-each: 29.7.0 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - p-limit: 3.1.0 - pretty-format: 29.7.0 - pure-rand: 6.1.0 - slash: 3.0.0 - stack-utils: 2.0.6 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - - /jest-cli@29.7.0: - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0 - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.13.0) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /jest-config@29.7.0(@types/node@22.13.0): - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.26.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - babel-jest: 29.7.0(@babel/core@7.26.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - - /jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - detect-newline: 3.1.0 - dev: true - - /jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - jest-get-type: 29.6.3 - jest-util: 29.7.0 - pretty-format: 29.7.0 - dev: true - - /jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - jest-mock: 29.7.0 - jest-util: 29.7.0 - dev: true - - /jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/graceful-fs': 4.1.9 - '@types/node': 22.13.0 - anymatch: 3.1.3 - fb-watchman: 2.0.2 - graceful-fs: 4.2.11 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - jest-worker: 29.7.0 - micromatch: 4.0.8 - walker: 1.0.8 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.26.2 - '@jest/types': 29.6.3 - '@types/stack-utils': 2.0.3 - chalk: 4.1.2 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.6 - dev: true - - /jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - jest-util: 29.7.0 - dev: true - - /jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true - dependencies: - jest-resolve: 29.7.0 - dev: true - - /jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-regex-util: 29.6.3 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) - jest-util: 29.7.0 - jest-validate: 29.7.0 - resolve: 1.22.10 - resolve.exports: 2.0.3 - slash: 3.0.0 - dev: true - - /jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.7.0 - '@jest/environment': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - chalk: 4.1.2 - emittery: 0.13.1 - graceful-fs: 4.2.11 - jest-docblock: 29.7.0 - jest-environment-node: 29.7.0 - jest-haste-map: 29.7.0 - jest-leak-detector: 29.7.0 - jest-message-util: 29.7.0 - jest-resolve: 29.7.0 - jest-runtime: 29.7.0 - jest-util: 29.7.0 - jest-watcher: 29.7.0 - jest-worker: 29.7.0 - p-limit: 3.1.0 - source-map-support: 0.5.13 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/globals': 29.7.0 - '@jest/source-map': 29.6.3 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - chalk: 4.1.2 - cjs-module-lexer: 1.4.3 - collect-v8-coverage: 1.0.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - strip-bom: 4.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/core': 7.26.7 - '@babel/generator': 7.26.5 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.7) - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.7) - '@babel/types': 7.26.7 - '@jest/expect-utils': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.1.0(@babel/core@7.26.7) - chalk: 4.1.2 - expect: 29.7.0 - graceful-fs: 4.2.11 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - natural-compare: 1.4.0 - pretty-format: 29.7.0 - semver: 7.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - chalk: 4.1.2 - ci-info: 3.9.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - dev: true - - /jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - camelcase: 6.3.0 - chalk: 4.1.2 - jest-get-type: 29.6.3 - leven: 3.1.0 - pretty-format: 29.7.0 - dev: true - - /jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.13.0 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - emittery: 0.13.1 - jest-util: 29.7.0 - string-length: 4.0.2 - dev: true - - /jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@types/node': 22.13.0 - jest-util: 29.7.0 - merge-stream: 2.0.0 - supports-color: 8.1.1 - dev: true - - /jest@29.7.0: - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.7.0 - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} - - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} - hasBin: true - dev: true - - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - - /json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - dev: true - - /jsonpath@1.1.1: - resolution: {integrity: sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==} - dependencies: - esprima: 1.2.2 - static-eval: 2.0.2 - underscore: 1.12.1 - - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true - - /leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - dev: true - - /levn@0.3.0: - resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: true - - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - dev: true - - /logplease@1.2.15: - resolution: {integrity: sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA==} - - /loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} - dependencies: - get-func-name: 2.0.2 - dev: true - - /lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - dependencies: - yallist: 3.1.1 - dev: true - - /make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} - dependencies: - semver: 7.7.0 - dev: true - - /makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - dependencies: - tmpl: 1.0.5 - dev: true - - /math-intrinsics@1.1.0: - resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} - engines: {node: '>= 0.4'} - dev: true - - /merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - dev: true - - /micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - dev: true - - /mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - dev: true - - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: true - - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - - /mocha@10.8.2: - resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} - engines: {node: '>= 14.0.0'} - hasBin: true - dependencies: - ansi-colors: 4.1.3 - browser-stdout: 1.3.1 - chokidar: 3.6.0 - debug: 4.4.0(supports-color@8.1.1) - diff: 5.2.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.1.6 - ms: 2.1.3 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.5.1 - yargs: 16.2.0 - yargs-parser: 20.2.9 - yargs-unparser: 2.0.0 - dev: true - - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /nanoassert@2.0.0: - resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} - - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true - - /node-addon-api@3.2.1: - resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} - dev: true - - /node-gyp-build@4.8.4: - resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} - hasBin: true - dev: true - - /node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - dev: true - - /node-releases@2.0.19: - resolution: {integrity: sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==} - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} - dependencies: - path-key: 3.1.1 - dev: true - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - dependencies: - mimic-fn: 2.1.0 - dev: true - - /optionator@0.8.3: - resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - word-wrap: 1.2.5 - - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - dev: true - - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: true - - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true - - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.26.2 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true - - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true - - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - - /picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - dev: true - - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - dev: true - - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - dev: true - - /possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - dev: true - - /prelude-ls@1.1.2: - resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} - engines: {node: '>= 0.8.0'} - - /pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.3.1 - dev: true - - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - - /pure-rand@6.1.0: - resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - dev: true - - /r1csfile@0.0.47: - resolution: {integrity: sha512-oI4mAwuh1WwuFg95eJDNDDL8hCaZkwnPuNZrQdLBWvDoRU7EG+L/MOHL7SwPW2Y+ZuYcTLpj3rBkgllBQZN/JA==} - dependencies: - '@iden3/bigarray': 0.0.2 - '@iden3/binfileutils': 0.0.11 - fastfile: 0.0.20 - ffjavascript: 0.2.60 - dev: true - - /r1csfile@0.0.48: - resolution: {integrity: sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw==} - dependencies: - '@iden3/bigarray': 0.0.2 - '@iden3/binfileutils': 0.0.12 - fastfile: 0.0.20 - ffjavascript: 0.3.0 - - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - dev: true - - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: true - - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - dependencies: - resolve-from: 5.0.0 - dev: true - - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true - - /resolve.exports@2.0.3: - resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} - engines: {node: '>=10'} - dev: true - - /resolve@1.22.10: - resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} - engines: {node: '>= 0.4'} - hasBin: true - dependencies: - is-core-module: 2.16.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /safe-regex-test@1.1.0: - resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} - engines: {node: '>= 0.4'} - dependencies: - call-bound: 1.0.3 - es-errors: 1.3.0 - is-regex: 1.2.1 - dev: true - - /scrypt-js@3.0.1: - resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - dev: true - - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: true - - /semver@7.7.0: - resolution: {integrity: sha512-DrfFnPzblFmNrIZzg5RzHegbiRWg7KMR7btwi2yjHwx06zsUbO5g613sVwEV7FTwmzJu+Io0lJe2GJ3LxqpvBQ==} - engines: {node: '>=10'} - hasBin: true - dev: true - - /serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - dependencies: - randombytes: 2.1.0 - dev: true - - /set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.7 - gopd: 1.2.0 - has-property-descriptors: 1.0.2 - dev: true - - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - dependencies: - shebang-regex: 3.0.0 - dev: true - - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true - - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true - - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: true - - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true - - /snarkjs@0.7.5: - resolution: {integrity: sha512-h+3c4rXZKLhLuHk4LHydZCk/h5GcNvk5GjVKRRkHmfb6Ntf8gHOA9zea3g656iclRuhqQ3iKDWFgiD9ypLrKiA==} - hasBin: true - dependencies: - '@iden3/binfileutils': 0.0.12 - bfj: 7.1.0 - blake2b-wasm: 2.4.0 - circom_runtime: 0.1.28 - ejs: 3.1.10 - fastfile: 0.0.20 - ffjavascript: 0.3.1 - js-sha3: 0.8.0 - logplease: 1.2.15 - r1csfile: 0.0.48 - - /source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - - /stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - - /static-eval@2.0.2: - resolution: {integrity: sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==} - dependencies: - escodegen: 1.14.3 - - /string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} - dependencies: - char-regex: 1.0.2 - strip-ansi: 6.0.1 - dev: true - - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - dev: true - - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - dev: true - - /strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - dev: true - - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - - /supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - dependencies: - has-flag: 4.0.0 - dev: true - - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - dev: true - - /tmp-promise@3.0.3: - resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} - dependencies: - tmp: 0.2.3 - dev: true - - /tmp@0.2.3: - resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} - engines: {node: '>=14.14'} - dev: true - - /tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - dev: true - - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /tryer@1.0.1: - resolution: {integrity: sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==} - - /type-check@0.3.2: - resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.1.2 - - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true - - /type-detect@4.1.0: - resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} - engines: {node: '>=4'} - dev: true - - /type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - dev: true - - /underscore@1.12.1: - resolution: {integrity: sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==} - - /undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - dev: true - - /update-browserslist-db@1.1.2(browserslist@4.24.4): - resolution: {integrity: sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.24.4 - escalade: 3.2.0 - picocolors: 1.1.1 - dev: true - - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true - - /util@0.12.5: - resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - dependencies: - inherits: 2.0.4 - is-arguments: 1.2.0 - is-generator-function: 1.1.0 - is-typed-array: 1.1.15 - which-typed-array: 1.1.18 - dev: true - - /v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 - dev: true - - /walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - dependencies: - makeerror: 1.0.12 - dev: true - - /wasmbuilder@0.0.16: - resolution: {integrity: sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA==} - - /wasmcurves@0.2.2: - resolution: {integrity: sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ==} - dependencies: - wasmbuilder: 0.0.16 - - /web-worker@1.2.0: - resolution: {integrity: sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==} - - /web-worker@1.5.0: - resolution: {integrity: sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==} - dev: true - - /which-typed-array@1.1.18: - resolution: {integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.8 - call-bound: 1.0.3 - for-each: 0.3.4 - gopd: 1.2.0 - has-tostringtag: 1.0.2 - dev: true - - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - /workerpool@6.5.1: - resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} - dev: true - - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - imurmurhash: 0.1.4 - signal-exit: 3.0.7 - dev: true - - /ws@7.4.6: - resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true - - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: true - - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true - - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - - /yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - dev: true - - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true diff --git a/packages/circom/tests/asterisk.test.js b/packages/circom/tests/asterisk.test.js deleted file mode 100644 index fe7d1024..00000000 --- a/packages/circom/tests/asterisk.test.js +++ /dev/null @@ -1,632 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Asterisk Regex', () => { - let circuit1; - let circuit2; - let circuit3; - // let circuit4; - // let circuit5; - // let circuit6; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/asterisk1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/asterisk1.json'), - 'utf8' - ), - 'Asterisk1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_asterisk1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/asterisk2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/asterisk2.json'), - 'utf8' - ), - 'Asterisk2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_asterisk2_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/asterisk3_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/asterisk3.json'), - 'utf8' - ), - 'Asterisk3Regex' - ) - ); - circuit3 = await wasm_tester( - path.join(__dirname, './circuits/test_asterisk3_regex.circom'), - option - ); - - // writeFileSync( - // path.join(__dirname, "./circuits/asterisk4_regex.circom"), - // compiler.genFromDecomposed( - // readFileSync( - // path.join(__dirname, "./circuits/asterisk4.json"), - // "utf8" - // ), - // "Asterisk4Regex" - // ) - // ); - // circuit4 = await wasm_tester( - // path.join(__dirname, "./circuits/test_asterisk4_regex.circom"), - // option - // ); - - // writeFileSync( - // path.join(__dirname, "./circuits/asterisk5_regex.circom"), - // compiler.genFromDecomposed( - // readFileSync( - // path.join(__dirname, "./circuits/asterisk5.json"), - // "utf8" - // ), - // "Asterisk5Regex" - // ) - // ); - // circuit5 = await wasm_tester( - // path.join(__dirname, "./circuits/test_asterisk5_regex.circom"), - // option - // ); - - // writeFileSync( - // path.join(__dirname, "./circuits/asterisk6_regex.circom"), - // compiler.genFromDecomposed( - // readFileSync( - // path.join(__dirname, "./circuits/asterisk6.json"), - // "utf8" - // ), - // "Asterisk6Regex" - // ) - // ); - // circuit6 = await wasm_tester( - // path.join(__dirname, "./circuits/test_asterisk6_regex.circom"), - // option - // ); - }); - - it('asterisk1 valid case 1', async () => { - const inputStr = `xb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk1 valid case 2', async () => { - const inputStr = `xab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk1 valid case 3', async () => { - const inputStr = `xaab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk1 valid case 4', async () => { - const inputStr = `710xab98`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk1 invalid case 1', async () => { - const inputStr = `xaaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('asterisk1 invalid case 2', async () => { - const inputStr = `aaabx`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('asterisk2 valid case 1', async () => { - const inputStr = `aaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk2 valid case 2', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk2 valid case 3', async () => { - const inputStr = `abbba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk2 valid case 4', async () => { - const inputStr = `717abb9`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk2 invalid case 1', async () => { - const inputStr = `bbb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('asterisk2 invalid case 2', async () => { - const inputStr = `19bd7`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('asterisk3 valid case 1', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk3 valid case 2', async () => { - const inputStr = `xaxxyxby`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/asterisk3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('asterisk3 invalid case 1', async () => { - const inputStr = `axyxyyyx`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('asterisk3 invalid case 2', async () => { - const inputStr = `xyyxxyba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - // it("asterisk4 valid case 1", async () => { - // const inputStr = `b099`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit4.calculateWitness(circuitInputs); - // await circuit4.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk4.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("asterisk4 invalid case 1", async () => { - // const inputStr = `192ue2iw`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit4.calculateWitness(circuitInputs); - // await circuit4.checkConstraints(witness); - // expect(0n).toEqual(witness[1]); - // for (let idx = 0; idx < 8; ++idx) { - // expect(0n).toEqual(witness[2 + idx]); - // } - // }); - - // it("asterisk5 valid case 1", async () => { - // const inputStr = `a`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk5.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("asterisk5 valid case 2", async () => { - // const inputStr = `218aaaa2`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk5.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("asterisk5 invalid case 1", async () => { - // const inputStr = `bbbbcccc`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(0n).toEqual(witness[1]); - // for (let idx = 0; idx < 8; ++idx) { - // expect(0n).toEqual(witness[2 + idx]); - // } - // }); - - // it("asterisk6 valid case 1", async () => { - // const inputStr = ``; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit6.calculateWitness(circuitInputs); - // await circuit6.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk6.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("asterisk6 valid case 2", async () => { - // const inputStr = `a`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit6.calculateWitness(circuitInputs); - // await circuit6.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk6.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("asterisk6 valid case 3", async () => { - // const inputStr = `1921 abw`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit6.calculateWitness(circuitInputs); - // await circuit6.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/asterisk6.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); -}); diff --git a/packages/circom/tests/body_hash_regex.test.js b/packages/circom/tests/body_hash_regex.test.js deleted file mode 100644 index 957076f3..00000000 --- a/packages/circom/tests/body_hash_regex.test.js +++ /dev/null @@ -1,114 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Bodyhash Regex', () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, '../circuits/common/body_hash.json'), - 'utf8' - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - 'BodyHashRegex' - ); - writeFileSync( - path.join(__dirname, '../circuits/common/body_hash_regex.circom'), - circom - ); - - circuit = await wasm_tester( - path.join(__dirname, './circuits/test_body_hash_regex.circom'), - option - ); - }); - - it('bodyhash in the header', async () => { - const signatureField = `dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - signatureField, - readFileSync( - path.join(__dirname, '../circuits/common/body_hash.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('bodyhash after new line', async () => { - const signatureField = `\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - signatureField, - readFileSync( - path.join(__dirname, '../circuits/common/body_hash.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('bodyhash in the invalid field', async () => { - const signatureField = `\r\nto: dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 1024; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('invalid bodyhash with 255', async () => { - const signatureField = `dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - let paddedStr = apis.padString(signatureField, 1022); - paddedStr.unshift(49); - paddedStr.unshift(255); - const circuitInputs = { - msg: paddedStr - }; - async function failFn() { - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - } - await expect(failFn).rejects.toThrow(); - }); -}); diff --git a/packages/circom/tests/caret.test.js b/packages/circom/tests/caret.test.js deleted file mode 100644 index 600b9ed8..00000000 --- a/packages/circom/tests/caret.test.js +++ /dev/null @@ -1,572 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Caret Regex', () => { - let circuit1; - let circuit2; - let circuit3; - let circuit4; - let circuit5; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/caret1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/caret1.json'), - 'utf8' - ), - 'Caret1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_caret1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/caret2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/caret2.json'), - 'utf8' - ), - 'Caret2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_caret2_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/caret3_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/caret3.json'), - 'utf8' - ), - 'Caret3Regex' - ) - ); - circuit3 = await wasm_tester( - path.join(__dirname, './circuits/test_caret3_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/caret4_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/caret4.json'), - 'utf8' - ), - 'Caret4Regex' - ) - ); - circuit4 = await wasm_tester( - path.join(__dirname, './circuits/test_caret4_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/caret5_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/caret5.json'), - 'utf8' - ), - 'Caret5Regex' - ) - ); - circuit5 = await wasm_tester( - path.join(__dirname, './circuits/test_caret5_regex.circom'), - option - ); - }); - - it('caret1 valid case 1', async () => { - const inputStr = `a`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret1 valid case 2', async () => { - const inputStr = `abnjknda`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret1 invalid case 1', async () => { - const inputStr = `ba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret1 invalid case 2', async () => { - const inputStr = `bav`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret2 valid case 1', async () => { - const inputStr = `abc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret2 valid case 2', async () => { - const inputStr = `bca`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret2 valid case 3', async () => { - const inputStr = `cab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret2 invalid case 1', async () => { - const inputStr = `7abc9mna`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret3 valid case 1', async () => { - const inputStr = `bb817267`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret3 valid case 2', async () => { - const inputStr = `818abbb9`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret3 invalid case 1', async () => { - const inputStr = `81b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret4 valid case 1', async () => { - const inputStr = `xabaaabb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret4.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret4 valid case 2', async () => { - const inputStr = `xbaab82a`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret4.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret4 valid case 3', async () => { - const inputStr = `7w1\nxabb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret4.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret4 valid case 4', async () => { - const inputStr = `7w\nxbbb9`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret4.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret4 invalid case 1', async () => { - const inputStr = `7w1nxaba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret4 invalid case 2', async () => { - const inputStr = `abba\nx`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret5 valid case 1', async () => { - const inputStr = `xdefabc1`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret5.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret5 valid case 2', async () => { - const inputStr = `9\nx9eabc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/caret5.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('caret5 invalid case 1', async () => { - const inputStr = `xabc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret5 invalid case 2', async () => { - const inputStr = `1\ndef`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret5 invalid case 3', async () => { - const inputStr = `a8abc8`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('caret5 invalid case 4', async () => { - const inputStr = `71\na81ma`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit5.calculateWitness(circuitInputs); - await circuit5.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/circuits/asterisk1.json b/packages/circom/tests/circuits/asterisk1.json deleted file mode 100644 index 474215e0..00000000 --- a/packages/circom/tests/circuits/asterisk1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "x" - }, - { - "is_public": true, - "regex_def": "a*" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/asterisk1_regex.circom b/packages/circom/tests/circuits/asterisk1_regex.circom deleted file mode 100644 index 82da03ee..00000000 --- a/packages/circom/tests/circuits/asterisk1_regex.circom +++ /dev/null @@ -1,85 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: xa*b -template Asterisk1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[3][num_bytes]; - component and[3][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 120; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 97; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states_tmp[i+1][1] <== and[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[2][i].out; - states[i+1][2] <== and[2][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 1)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 1)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][1]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/asterisk2.json b/packages/circom/tests/circuits/asterisk2.json deleted file mode 100644 index 45ecec77..00000000 --- a/packages/circom/tests/circuits/asterisk2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a" - }, - { - "is_public": true, - "regex_def": "b*" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/asterisk2_regex.circom b/packages/circom/tests/circuits/asterisk2_regex.circom deleted file mode 100644 index 30e09c2c..00000000 --- a/packages/circom/tests/circuits/asterisk2_regex.circom +++ /dev/null @@ -1,77 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: ab* -template Asterisk2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[2][num_bytes]; - signal states[num_bytes+1][2]; - signal states_tmp[num_bytes+1][2]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 2; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(1); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states_tmp[i+1][1] <== and[1][i].out; - from_zero_enabled[i] <== MultiNOR(1)([states_tmp[i+1][1]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][1]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][1] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][1], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 1)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 1)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][1]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/asterisk3.json b/packages/circom/tests/circuits/asterisk3.json deleted file mode 100644 index 6406baec..00000000 --- a/packages/circom/tests/circuits/asterisk3.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a" - }, - { - "is_public": true, - "regex_def": "(x|y)*" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/asterisk3_regex.circom b/packages/circom/tests/circuits/asterisk3_regex.circom deleted file mode 100644 index 68fbc828..00000000 --- a/packages/circom/tests/circuits/asterisk3_regex.circom +++ /dev/null @@ -1,92 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a(x|y)*b -template Asterisk3Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[4][num_bytes]; - component and[3][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 120; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 121; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[1][i].out; - multi_or[0][i].in[1] <== eq[2][i].out; - and[1][i].b <== multi_or[0][i].out; - states_tmp[i+1][1] <== and[1][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[3][i].out; - states[i+1][2] <== and[2][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 1)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 1)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][1]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret1.json b/packages/circom/tests/circuits/caret1.json deleted file mode 100644 index 758524a2..00000000 --- a/packages/circom/tests/circuits/caret1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "^a" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret1_regex.circom b/packages/circom/tests/circuits/caret1_regex.circom deleted file mode 100644 index adbc7408..00000000 --- a/packages/circom/tests/circuits/caret1_regex.circom +++ /dev/null @@ -1,79 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: ^a -template Caret1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[2][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 97; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret2.json b/packages/circom/tests/circuits/caret2.json deleted file mode 100644 index 38c744fd..00000000 --- a/packages/circom/tests/circuits/caret2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "^(a|b|c)" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret2_regex.circom b/packages/circom/tests/circuits/caret2_regex.circom deleted file mode 100644 index a7f481f7..00000000 --- a/packages/circom/tests/circuits/caret2_regex.circom +++ /dev/null @@ -1,90 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: ^(a|b|c) -template Caret2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[4][num_bytes]; - component and[2][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 97; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 98; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 99; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(3); - multi_or[0][i].in[0] <== eq[1][i].out; - multi_or[0][i].in[1] <== eq[2][i].out; - multi_or[0][i].in[2] <== eq[3][i].out; - and[1][i].b <== multi_or[0][i].out; - states[i+1][2] <== and[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret3.json b/packages/circom/tests/circuits/caret3.json deleted file mode 100644 index 8d1c6e62..00000000 --- a/packages/circom/tests/circuits/caret3.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(^|a)" - }, - { - "is_public": true, - "regex_def": "b+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret3_regex.circom b/packages/circom/tests/circuits/caret3_regex.circom deleted file mode 100644 index c901c5ed..00000000 --- a/packages/circom/tests/circuits/caret3_regex.circom +++ /dev/null @@ -1,93 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (^|a)b+ -template Caret3Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[3][num_bytes]; - component and[3][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[0][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - and[0][i].b <== multi_or[0][i].out; - states_tmp[i+1][1] <== 0; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[2][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== eq[2][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[1][i].out; - multi_or[1][i].in[1] <== and[2][i].out; - states[i+1][2] <== multi_or[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (2, 2)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (2, 2)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret4.json b/packages/circom/tests/circuits/caret4.json deleted file mode 100644 index a8d097f1..00000000 --- a/packages/circom/tests/circuits/caret4.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\n|^)x" - }, - { - "is_public": true, - "regex_def": "(a|b)+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret4_regex.circom b/packages/circom/tests/circuits/caret4_regex.circom deleted file mode 100644 index 8bb1cbf6..00000000 --- a/packages/circom/tests/circuits/caret4_regex.circom +++ /dev/null @@ -1,107 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\n|^)x(a|b)+ -template Caret4Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[5][num_bytes]; - component and[4][num_bytes]; - component multi_or[3][num_bytes]; - signal states[num_bytes+1][4]; - signal states_tmp[num_bytes+1][4]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 4; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(3); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 10; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[0][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - and[0][i].b <== multi_or[0][i].out; - states_tmp[i+1][1] <== 0; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 120; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[2][i].out; - states[i+1][2] <== and[1][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 97; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== eq[3][i].out; - multi_or[1][i].in[1] <== eq[4][i].out; - and[2][i].b <== multi_or[1][i].out; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== multi_or[1][i].out; - multi_or[2][i] = MultiOR(2); - multi_or[2][i].in[0] <== and[2][i].out; - multi_or[2][i].in[1] <== and[3][i].out; - states[i+1][3] <== multi_or[2][i].out; - from_zero_enabled[i] <== MultiNOR(3)([states_tmp[i+1][1], states[i+1][2], states[i+1][3]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][3]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][3] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][3], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3), (3, 3)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3), (3, 3)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][3], prev_states0[1][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret5.json b/packages/circom/tests/circuits/caret5.json deleted file mode 100644 index 6d186271..00000000 --- a/packages/circom/tests/circuits/caret5.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\n|^)x" - }, - { - "is_public": true, - "regex_def": "[^abc]+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/caret5_regex.circom b/packages/circom/tests/circuits/caret5_regex.circom deleted file mode 100644 index e8d6a851..00000000 --- a/packages/circom/tests/circuits/caret5_regex.circom +++ /dev/null @@ -1,438 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\n|^)x[^abc]+ -template Caret5Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[40][num_bytes]; - component lt[14][num_bytes]; - component and[32][num_bytes]; - component multi_or[13][num_bytes]; - signal states[num_bytes+1][11]; - signal states_tmp[num_bytes+1][11]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 11; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(10); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 10; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[0][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - and[0][i].b <== multi_or[0][i].out; - states_tmp[i+1][1] <== 0; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 120; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[2][i].out; - states[i+1][2] <== and[1][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 1; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 96; - and[2][i] = AND(); - and[2][i].a <== lt[0][i].out; - and[2][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 100; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 127; - and[3][i] = AND(); - and[3][i].a <== lt[2][i].out; - and[3][i].b <== lt[3][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][2]; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[2][i].out; - multi_or[1][i].in[1] <== and[3][i].out; - and[4][i].b <== multi_or[1][i].out; - and[5][i] = AND(); - and[5][i].a <== states[i][3]; - and[5][i].b <== multi_or[1][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 128; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 191; - and[6][i] = AND(); - and[6][i].a <== lt[4][i].out; - and[6][i].b <== lt[5][i].out; - and[7][i] = AND(); - and[7][i].a <== states[i][4]; - and[7][i].b <== and[6][i].out; - multi_or[2][i] = MultiOR(3); - multi_or[2][i].in[0] <== and[4][i].out; - multi_or[2][i].in[1] <== and[5][i].out; - multi_or[2][i].in[2] <== and[7][i].out; - states[i+1][3] <== multi_or[2][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 194; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 223; - and[8][i] = AND(); - and[8][i].a <== lt[6][i].out; - and[8][i].b <== lt[7][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][2]; - and[9][i].b <== and[8][i].out; - and[10][i] = AND(); - and[10][i].a <== states[i][3]; - and[10][i].b <== and[8][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 160; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 191; - and[11][i] = AND(); - and[11][i].a <== lt[8][i].out; - and[11][i].b <== lt[9][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][5]; - and[12][i].b <== and[11][i].out; - and[13][i] = AND(); - and[13][i].a <== states[i][6]; - and[13][i].b <== and[6][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 159; - and[14][i] = AND(); - and[14][i].a <== lt[10][i].out; - and[14][i].b <== lt[11][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][7]; - and[15][i].b <== and[14][i].out; - multi_or[3][i] = MultiOR(5); - multi_or[3][i].in[0] <== and[9][i].out; - multi_or[3][i].in[1] <== and[10][i].out; - multi_or[3][i].in[2] <== and[12][i].out; - multi_or[3][i].in[3] <== and[13][i].out; - multi_or[3][i].in[4] <== and[15][i].out; - states[i+1][4] <== multi_or[3][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 224; - and[16][i] = AND(); - and[16][i].a <== states[i][2]; - and[16][i].b <== eq[3][i].out; - and[17][i] = AND(); - and[17][i].a <== states[i][3]; - and[17][i].b <== eq[3][i].out; - multi_or[4][i] = MultiOR(2); - multi_or[4][i].in[0] <== and[16][i].out; - multi_or[4][i].in[1] <== and[17][i].out; - states[i+1][5] <== multi_or[4][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 225; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 226; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 227; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 228; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 229; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 230; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 231; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 232; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 233; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 234; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 235; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 236; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 238; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 239; - and[18][i] = AND(); - and[18][i].a <== states[i][2]; - multi_or[5][i] = MultiOR(14); - multi_or[5][i].in[0] <== eq[4][i].out; - multi_or[5][i].in[1] <== eq[5][i].out; - multi_or[5][i].in[2] <== eq[6][i].out; - multi_or[5][i].in[3] <== eq[7][i].out; - multi_or[5][i].in[4] <== eq[8][i].out; - multi_or[5][i].in[5] <== eq[9][i].out; - multi_or[5][i].in[6] <== eq[10][i].out; - multi_or[5][i].in[7] <== eq[11][i].out; - multi_or[5][i].in[8] <== eq[12][i].out; - multi_or[5][i].in[9] <== eq[13][i].out; - multi_or[5][i].in[10] <== eq[14][i].out; - multi_or[5][i].in[11] <== eq[15][i].out; - multi_or[5][i].in[12] <== eq[16][i].out; - multi_or[5][i].in[13] <== eq[17][i].out; - and[18][i].b <== multi_or[5][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][3]; - and[19][i].b <== multi_or[5][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 144; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 191; - and[20][i] = AND(); - and[20][i].a <== lt[12][i].out; - and[20][i].b <== lt[13][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][8]; - and[21][i].b <== and[20][i].out; - and[22][i] = AND(); - and[22][i].a <== states[i][9]; - and[22][i].b <== and[6][i].out; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 128; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 129; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 130; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 131; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 132; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 133; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 134; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 135; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 136; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 137; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 138; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 139; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 140; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 141; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 142; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 143; - and[23][i] = AND(); - and[23][i].a <== states[i][10]; - multi_or[6][i] = MultiOR(16); - multi_or[6][i].in[0] <== eq[18][i].out; - multi_or[6][i].in[1] <== eq[19][i].out; - multi_or[6][i].in[2] <== eq[20][i].out; - multi_or[6][i].in[3] <== eq[21][i].out; - multi_or[6][i].in[4] <== eq[22][i].out; - multi_or[6][i].in[5] <== eq[23][i].out; - multi_or[6][i].in[6] <== eq[24][i].out; - multi_or[6][i].in[7] <== eq[25][i].out; - multi_or[6][i].in[8] <== eq[26][i].out; - multi_or[6][i].in[9] <== eq[27][i].out; - multi_or[6][i].in[10] <== eq[28][i].out; - multi_or[6][i].in[11] <== eq[29][i].out; - multi_or[6][i].in[12] <== eq[30][i].out; - multi_or[6][i].in[13] <== eq[31][i].out; - multi_or[6][i].in[14] <== eq[32][i].out; - multi_or[6][i].in[15] <== eq[33][i].out; - and[23][i].b <== multi_or[6][i].out; - multi_or[7][i] = MultiOR(5); - multi_or[7][i].in[0] <== and[18][i].out; - multi_or[7][i].in[1] <== and[19][i].out; - multi_or[7][i].in[2] <== and[21][i].out; - multi_or[7][i].in[3] <== and[22][i].out; - multi_or[7][i].in[4] <== and[23][i].out; - states[i+1][6] <== multi_or[7][i].out; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 237; - and[24][i] = AND(); - and[24][i].a <== states[i][2]; - and[24][i].b <== eq[34][i].out; - and[25][i] = AND(); - and[25][i].a <== states[i][3]; - and[25][i].b <== eq[34][i].out; - multi_or[8][i] = MultiOR(2); - multi_or[8][i].in[0] <== and[24][i].out; - multi_or[8][i].in[1] <== and[25][i].out; - states[i+1][7] <== multi_or[8][i].out; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 240; - and[26][i] = AND(); - and[26][i].a <== states[i][2]; - and[26][i].b <== eq[35][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][3]; - and[27][i].b <== eq[35][i].out; - multi_or[9][i] = MultiOR(2); - multi_or[9][i].in[0] <== and[26][i].out; - multi_or[9][i].in[1] <== and[27][i].out; - states[i+1][8] <== multi_or[9][i].out; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 241; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 242; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 243; - and[28][i] = AND(); - and[28][i].a <== states[i][2]; - multi_or[10][i] = MultiOR(3); - multi_or[10][i].in[0] <== eq[36][i].out; - multi_or[10][i].in[1] <== eq[37][i].out; - multi_or[10][i].in[2] <== eq[38][i].out; - and[28][i].b <== multi_or[10][i].out; - and[29][i] = AND(); - and[29][i].a <== states[i][3]; - and[29][i].b <== multi_or[10][i].out; - multi_or[11][i] = MultiOR(2); - multi_or[11][i].in[0] <== and[28][i].out; - multi_or[11][i].in[1] <== and[29][i].out; - states[i+1][9] <== multi_or[11][i].out; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 244; - and[30][i] = AND(); - and[30][i].a <== states[i][2]; - and[30][i].b <== eq[39][i].out; - and[31][i] = AND(); - and[31][i].a <== states[i][3]; - and[31][i].b <== eq[39][i].out; - multi_or[12][i] = MultiOR(2); - multi_or[12][i].in[0] <== and[30][i].out; - multi_or[12][i].in[1] <== and[31][i].out; - states[i+1][10] <== multi_or[12][i].out; - from_zero_enabled[i] <== MultiNOR(10)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][3]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][3] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][3], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 3), (5, 4), (6, 4), (7, 4), (8, 6), (9, 6), (10, 6)}] - signal prev_states0[23][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 3), (5, 4), (6, 4), (7, 4), (8, 6), (9, 6), (10, 6)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[15][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[16][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[17][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[18][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[19][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[20][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - prev_states0[21][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][9]; - prev_states0[22][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - is_substr0[i] <== MultiOR(23)([prev_states0[0][i] * states[i+2][3], prev_states0[1][i] * states[i+2][4], prev_states0[2][i] * states[i+2][5], prev_states0[3][i] * states[i+2][6], prev_states0[4][i] * states[i+2][7], prev_states0[5][i] * states[i+2][8], prev_states0[6][i] * states[i+2][9], prev_states0[7][i] * states[i+2][10], prev_states0[8][i] * states[i+2][3], prev_states0[9][i] * states[i+2][4], prev_states0[10][i] * states[i+2][5], prev_states0[11][i] * states[i+2][6], prev_states0[12][i] * states[i+2][7], prev_states0[13][i] * states[i+2][8], prev_states0[14][i] * states[i+2][9], prev_states0[15][i] * states[i+2][10], prev_states0[16][i] * states[i+2][3], prev_states0[17][i] * states[i+2][4], prev_states0[18][i] * states[i+2][4], prev_states0[19][i] * states[i+2][4], prev_states0[20][i] * states[i+2][6], prev_states0[21][i] * states[i+2][6], prev_states0[22][i] * states[i+2][6]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dollar1.json b/packages/circom/tests/circuits/dollar1.json deleted file mode 100644 index 6b1546c7..00000000 --- a/packages/circom/tests/circuits/dollar1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "a[bc]$" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dollar1_regex.circom b/packages/circom/tests/circuits/dollar1_regex.circom deleted file mode 100644 index a7861910..00000000 --- a/packages/circom/tests/circuits/dollar1_regex.circom +++ /dev/null @@ -1,96 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a[bc]$ -template Dollar1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[3][num_bytes]; - component and[2][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - signal padding_start[num_bytes+1]; - padding_start[0] <== 0; - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - padding_start[i+1] <== IsNotZeroAcc()(padding_start[i], in[i]); - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 99; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[1][i].out; - multi_or[0][i].in[1] <== eq[2][i].out; - and[1][i].b <== multi_or[0][i].out; - states[i+1][2] <== and[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - signal end_anchor_check[num_bytes+1][2]; - end_anchor_check[0][1] <== 0; - for (var i = 0; i < num_bytes; i++) { - end_anchor_check[i+1][0] <== IsEqual()([i, padding_start[num_bytes]]); - end_anchor_check[i+1][1] <== end_anchor_check[i][1] + states[i][2] * end_anchor_check[i+1][0]; - } - out <== is_accepted.out * end_anchor_check[num_bytes][1]; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 2)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 2)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dollar2.json b/packages/circom/tests/circuits/dollar2.json deleted file mode 100644 index 0b5adb32..00000000 --- a/packages/circom/tests/circuits/dollar2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "(\n|^)x" - }, - { - "is_public": true, - "regex_def": "a[bc]$" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dollar2_regex.circom b/packages/circom/tests/circuits/dollar2_regex.circom deleted file mode 100644 index f46c3f46..00000000 --- a/packages/circom/tests/circuits/dollar2_regex.circom +++ /dev/null @@ -1,118 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (\n|^)xa[bc]$ -template Dollar2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[6][num_bytes]; - component and[4][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][5]; - signal states_tmp[num_bytes+1][5]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - signal padding_start[num_bytes+1]; - padding_start[0] <== 0; - for (var i = 1; i < 5; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(4); - states[i][0] <== 1; - padding_start[i+1] <== IsNotZeroAcc()(padding_start[i], in[i]); - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 10; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 255; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[0][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - and[0][i].b <== multi_or[0][i].out; - states_tmp[i+1][1] <== 0; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 120; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[2][i].out; - states[i+1][2] <== and[1][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 97; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== eq[3][i].out; - states[i+1][3] <== and[2][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 98; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 99; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== eq[4][i].out; - multi_or[1][i].in[1] <== eq[5][i].out; - and[3][i].b <== multi_or[1][i].out; - states[i+1][4] <== and[3][i].out; - from_zero_enabled[i] <== MultiNOR(4)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][4]; - } - signal end_anchor_check[num_bytes+1][2]; - end_anchor_check[0][1] <== 0; - for (var i = 0; i < num_bytes; i++) { - end_anchor_check[i+1][0] <== IsEqual()([i, padding_start[num_bytes]]); - end_anchor_check[i+1][1] <== end_anchor_check[i][1] + states[i][4] * end_anchor_check[i+1][0]; - } - out <== is_accepted.out * end_anchor_check[num_bytes][1]; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][4] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][4], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3), (3, 4)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3), (3, 4)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][3], prev_states0[1][i] * states[i+2][4]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dot1.json b/packages/circom/tests/circuits/dot1.json deleted file mode 100644 index c4116760..00000000 --- a/packages/circom/tests/circuits/dot1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "." - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dot1_regex.circom b/packages/circom/tests/circuits/dot1_regex.circom deleted file mode 100644 index 9e0f7eda..00000000 --- a/packages/circom/tests/circuits/dot1_regex.circom +++ /dev/null @@ -1,394 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: . -template Dot1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[46][num_bytes]; - component lt[12][num_bytes]; - component and[21][num_bytes]; - component multi_or[6][num_bytes]; - signal states[num_bytes+1][9]; - signal states_tmp[num_bytes+1][9]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 9; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(8); - states[i][0] <== 1; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 11; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 127; - and[0][i] = AND(); - and[0][i].a <== lt[0][i].out; - and[0][i].b <== lt[1][i].out; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 1; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 2; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 3; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 4; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 5; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 6; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 7; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 8; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 9; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(10); - multi_or[0][i].in[0] <== and[0][i].out; - multi_or[0][i].in[1] <== eq[0][i].out; - multi_or[0][i].in[2] <== eq[1][i].out; - multi_or[0][i].in[3] <== eq[2][i].out; - multi_or[0][i].in[4] <== eq[3][i].out; - multi_or[0][i].in[5] <== eq[4][i].out; - multi_or[0][i].in[6] <== eq[5][i].out; - multi_or[0][i].in[7] <== eq[6][i].out; - multi_or[0][i].in[8] <== eq[7][i].out; - multi_or[0][i].in[9] <== eq[8][i].out; - and[1][i].b <== multi_or[0][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 128; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 191; - and[2][i] = AND(); - and[2][i].a <== lt[2][i].out; - and[2][i].b <== lt[3][i].out; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== and[2][i].out; - states_tmp[i+1][1] <== and[3][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 194; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 223; - and[4][i] = AND(); - and[4][i].a <== lt[4][i].out; - and[4][i].b <== lt[5][i].out; - and[5][i] = AND(); - and[5][i].a <== states[i][0]; - and[5][i].b <== and[4][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 160; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 191; - and[6][i] = AND(); - and[6][i].a <== lt[6][i].out; - and[6][i].b <== lt[7][i].out; - and[7][i] = AND(); - and[7][i].a <== states[i][3]; - and[7][i].b <== and[6][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][4]; - and[8][i].b <== and[2][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 128; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 159; - and[9][i] = AND(); - and[9][i].a <== lt[8][i].out; - and[9][i].b <== lt[9][i].out; - and[10][i] = AND(); - and[10][i].a <== states[i][5]; - and[10][i].b <== and[9][i].out; - multi_or[1][i] = MultiOR(3); - multi_or[1][i].in[0] <== and[7][i].out; - multi_or[1][i].in[1] <== and[8][i].out; - multi_or[1][i].in[2] <== and[10][i].out; - states_tmp[i+1][2] <== multi_or[1][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 224; - and[11][i] = AND(); - and[11][i].a <== states[i][0]; - and[11][i].b <== eq[9][i].out; - states_tmp[i+1][3] <== 0; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 225; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 226; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 227; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 228; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 229; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 230; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 231; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 232; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 233; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 234; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 235; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 236; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 238; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 239; - and[12][i] = AND(); - and[12][i].a <== states[i][0]; - multi_or[2][i] = MultiOR(14); - multi_or[2][i].in[0] <== eq[10][i].out; - multi_or[2][i].in[1] <== eq[11][i].out; - multi_or[2][i].in[2] <== eq[12][i].out; - multi_or[2][i].in[3] <== eq[13][i].out; - multi_or[2][i].in[4] <== eq[14][i].out; - multi_or[2][i].in[5] <== eq[15][i].out; - multi_or[2][i].in[6] <== eq[16][i].out; - multi_or[2][i].in[7] <== eq[17][i].out; - multi_or[2][i].in[8] <== eq[18][i].out; - multi_or[2][i].in[9] <== eq[19][i].out; - multi_or[2][i].in[10] <== eq[20][i].out; - multi_or[2][i].in[11] <== eq[21][i].out; - multi_or[2][i].in[12] <== eq[22][i].out; - multi_or[2][i].in[13] <== eq[23][i].out; - and[12][i].b <== multi_or[2][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 144; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 191; - and[13][i] = AND(); - and[13][i].a <== lt[10][i].out; - and[13][i].b <== lt[11][i].out; - and[14][i] = AND(); - and[14][i].a <== states[i][6]; - and[14][i].b <== and[13][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][7]; - and[15][i].b <== and[2][i].out; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 128; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 129; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 130; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 131; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 132; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 133; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 134; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 135; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 136; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 137; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 138; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 139; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 140; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 141; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 142; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 143; - and[16][i] = AND(); - and[16][i].a <== states[i][8]; - multi_or[3][i] = MultiOR(16); - multi_or[3][i].in[0] <== eq[24][i].out; - multi_or[3][i].in[1] <== eq[25][i].out; - multi_or[3][i].in[2] <== eq[26][i].out; - multi_or[3][i].in[3] <== eq[27][i].out; - multi_or[3][i].in[4] <== eq[28][i].out; - multi_or[3][i].in[5] <== eq[29][i].out; - multi_or[3][i].in[6] <== eq[30][i].out; - multi_or[3][i].in[7] <== eq[31][i].out; - multi_or[3][i].in[8] <== eq[32][i].out; - multi_or[3][i].in[9] <== eq[33][i].out; - multi_or[3][i].in[10] <== eq[34][i].out; - multi_or[3][i].in[11] <== eq[35][i].out; - multi_or[3][i].in[12] <== eq[36][i].out; - multi_or[3][i].in[13] <== eq[37][i].out; - multi_or[3][i].in[14] <== eq[38][i].out; - multi_or[3][i].in[15] <== eq[39][i].out; - and[16][i].b <== multi_or[3][i].out; - multi_or[4][i] = MultiOR(3); - multi_or[4][i].in[0] <== and[14][i].out; - multi_or[4][i].in[1] <== and[15][i].out; - multi_or[4][i].in[2] <== and[16][i].out; - states_tmp[i+1][4] <== multi_or[4][i].out; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 237; - and[17][i] = AND(); - and[17][i].a <== states[i][0]; - and[17][i].b <== eq[40][i].out; - states_tmp[i+1][5] <== 0; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 240; - and[18][i] = AND(); - and[18][i].a <== states[i][0]; - and[18][i].b <== eq[41][i].out; - states_tmp[i+1][6] <== 0; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 241; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 242; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 243; - and[19][i] = AND(); - and[19][i].a <== states[i][0]; - multi_or[5][i] = MultiOR(3); - multi_or[5][i].in[0] <== eq[42][i].out; - multi_or[5][i].in[1] <== eq[43][i].out; - multi_or[5][i].in[2] <== eq[44][i].out; - and[19][i].b <== multi_or[5][i].out; - states_tmp[i+1][7] <== 0; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 244; - and[20][i] = AND(); - and[20][i].a <== states[i][0]; - and[20][i].b <== eq[45][i].out; - states_tmp[i+1][8] <== 0; - from_zero_enabled[i] <== MultiNOR(8)([states_tmp[i+1][1], states_tmp[i+1][2], states_tmp[i+1][3], states_tmp[i+1][4], states_tmp[i+1][5], states_tmp[i+1][6], states_tmp[i+1][7], states_tmp[i+1][8]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[1][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[5][i].out]); - states[i+1][3] <== MultiOR(2)([states_tmp[i+1][3], from_zero_enabled[i] * and[11][i].out]); - states[i+1][4] <== MultiOR(2)([states_tmp[i+1][4], from_zero_enabled[i] * and[12][i].out]); - states[i+1][5] <== MultiOR(2)([states_tmp[i+1][5], from_zero_enabled[i] * and[17][i].out]); - states[i+1][6] <== MultiOR(2)([states_tmp[i+1][6], from_zero_enabled[i] * and[18][i].out]); - states[i+1][7] <== MultiOR(2)([states_tmp[i+1][7], from_zero_enabled[i] * and[19][i].out]); - states[i+1][8] <== MultiOR(2)([states_tmp[i+1][8], from_zero_enabled[i] * and[20][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][1]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][1] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][1], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (2, 1), (3, 2), (4, 2), (5, 2), (6, 4), (7, 4), (8, 4)}] - signal prev_states0[15][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (2, 1), (3, 2), (4, 2), (5, 2), (6, 4), (7, 4), (8, 4)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[2][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[3][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[4][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[5][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[6][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[7][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - is_substr0[i] <== MultiOR(15)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3], prev_states0[3][i] * states[i+2][4], prev_states0[4][i] * states[i+2][5], prev_states0[5][i] * states[i+2][6], prev_states0[6][i] * states[i+2][7], prev_states0[7][i] * states[i+2][8], prev_states0[8][i] * states[i+2][1], prev_states0[9][i] * states[i+2][2], prev_states0[10][i] * states[i+2][2], prev_states0[11][i] * states[i+2][2], prev_states0[12][i] * states[i+2][4], prev_states0[13][i] * states[i+2][4], prev_states0[14][i] * states[i+2][4]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dot2.json b/packages/circom/tests/circuits/dot2.json deleted file mode 100644 index 89fb77db..00000000 --- a/packages/circom/tests/circuits/dot2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a" - }, - { - "is_public": true, - "regex_def": "." - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/dot2_regex.circom b/packages/circom/tests/circuits/dot2_regex.circom deleted file mode 100644 index 49ef1a13..00000000 --- a/packages/circom/tests/circuits/dot2_regex.circom +++ /dev/null @@ -1,408 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a.b -template Dot2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[48][num_bytes]; - component lt[12][num_bytes]; - component and[23][num_bytes]; - component multi_or[7][num_bytes]; - signal states[num_bytes+1][11]; - signal states_tmp[num_bytes+1][11]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 11; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(10); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 11; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 127; - and[1][i] = AND(); - and[1][i].a <== lt[0][i].out; - and[1][i].b <== lt[1][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 1; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 2; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 3; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 4; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 5; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 6; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 7; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 8; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 9; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(10); - multi_or[0][i].in[0] <== and[1][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - multi_or[0][i].in[2] <== eq[2][i].out; - multi_or[0][i].in[3] <== eq[3][i].out; - multi_or[0][i].in[4] <== eq[4][i].out; - multi_or[0][i].in[5] <== eq[5][i].out; - multi_or[0][i].in[6] <== eq[6][i].out; - multi_or[0][i].in[7] <== eq[7][i].out; - multi_or[0][i].in[8] <== eq[8][i].out; - multi_or[0][i].in[9] <== eq[9][i].out; - and[2][i].b <== multi_or[0][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 128; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 191; - and[3][i] = AND(); - and[3][i].a <== lt[2][i].out; - and[3][i].b <== lt[3][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== and[3][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[2][i].out; - multi_or[1][i].in[1] <== and[4][i].out; - states[i+1][2] <== multi_or[1][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 194; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 223; - and[5][i] = AND(); - and[5][i].a <== lt[4][i].out; - and[5][i].b <== lt[5][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][1]; - and[6][i].b <== and[5][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 160; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 191; - and[7][i] = AND(); - and[7][i].a <== lt[6][i].out; - and[7][i].b <== lt[7][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][4]; - and[8][i].b <== and[7][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][5]; - and[9][i].b <== and[3][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 128; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 159; - and[10][i] = AND(); - and[10][i].a <== lt[8][i].out; - and[10][i].b <== lt[9][i].out; - and[11][i] = AND(); - and[11][i].a <== states[i][6]; - and[11][i].b <== and[10][i].out; - multi_or[2][i] = MultiOR(4); - multi_or[2][i].in[0] <== and[6][i].out; - multi_or[2][i].in[1] <== and[8][i].out; - multi_or[2][i].in[2] <== and[9][i].out; - multi_or[2][i].in[3] <== and[11][i].out; - states[i+1][3] <== multi_or[2][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 224; - and[12][i] = AND(); - and[12][i].a <== states[i][1]; - and[12][i].b <== eq[10][i].out; - states[i+1][4] <== and[12][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 225; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 226; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 227; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 228; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 229; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 230; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 231; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 232; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 233; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 234; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 235; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 236; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 238; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 239; - and[13][i] = AND(); - and[13][i].a <== states[i][1]; - multi_or[3][i] = MultiOR(14); - multi_or[3][i].in[0] <== eq[11][i].out; - multi_or[3][i].in[1] <== eq[12][i].out; - multi_or[3][i].in[2] <== eq[13][i].out; - multi_or[3][i].in[3] <== eq[14][i].out; - multi_or[3][i].in[4] <== eq[15][i].out; - multi_or[3][i].in[5] <== eq[16][i].out; - multi_or[3][i].in[6] <== eq[17][i].out; - multi_or[3][i].in[7] <== eq[18][i].out; - multi_or[3][i].in[8] <== eq[19][i].out; - multi_or[3][i].in[9] <== eq[20][i].out; - multi_or[3][i].in[10] <== eq[21][i].out; - multi_or[3][i].in[11] <== eq[22][i].out; - multi_or[3][i].in[12] <== eq[23][i].out; - multi_or[3][i].in[13] <== eq[24][i].out; - and[13][i].b <== multi_or[3][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 144; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 191; - and[14][i] = AND(); - and[14][i].a <== lt[10][i].out; - and[14][i].b <== lt[11][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][7]; - and[15][i].b <== and[14][i].out; - and[16][i] = AND(); - and[16][i].a <== states[i][8]; - and[16][i].b <== and[3][i].out; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 128; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 129; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 130; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 131; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 132; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 133; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 134; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 135; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 136; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 137; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 138; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 139; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 140; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 141; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 142; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 143; - and[17][i] = AND(); - and[17][i].a <== states[i][9]; - multi_or[4][i] = MultiOR(16); - multi_or[4][i].in[0] <== eq[25][i].out; - multi_or[4][i].in[1] <== eq[26][i].out; - multi_or[4][i].in[2] <== eq[27][i].out; - multi_or[4][i].in[3] <== eq[28][i].out; - multi_or[4][i].in[4] <== eq[29][i].out; - multi_or[4][i].in[5] <== eq[30][i].out; - multi_or[4][i].in[6] <== eq[31][i].out; - multi_or[4][i].in[7] <== eq[32][i].out; - multi_or[4][i].in[8] <== eq[33][i].out; - multi_or[4][i].in[9] <== eq[34][i].out; - multi_or[4][i].in[10] <== eq[35][i].out; - multi_or[4][i].in[11] <== eq[36][i].out; - multi_or[4][i].in[12] <== eq[37][i].out; - multi_or[4][i].in[13] <== eq[38][i].out; - multi_or[4][i].in[14] <== eq[39][i].out; - multi_or[4][i].in[15] <== eq[40][i].out; - and[17][i].b <== multi_or[4][i].out; - multi_or[5][i] = MultiOR(4); - multi_or[5][i].in[0] <== and[13][i].out; - multi_or[5][i].in[1] <== and[15][i].out; - multi_or[5][i].in[2] <== and[16][i].out; - multi_or[5][i].in[3] <== and[17][i].out; - states[i+1][5] <== multi_or[5][i].out; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 237; - and[18][i] = AND(); - and[18][i].a <== states[i][1]; - and[18][i].b <== eq[41][i].out; - states[i+1][6] <== and[18][i].out; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 240; - and[19][i] = AND(); - and[19][i].a <== states[i][1]; - and[19][i].b <== eq[42][i].out; - states[i+1][7] <== and[19][i].out; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 241; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 242; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 243; - and[20][i] = AND(); - and[20][i].a <== states[i][1]; - multi_or[6][i] = MultiOR(3); - multi_or[6][i].in[0] <== eq[43][i].out; - multi_or[6][i].in[1] <== eq[44][i].out; - multi_or[6][i].in[2] <== eq[45][i].out; - and[20][i].b <== multi_or[6][i].out; - states[i+1][8] <== and[20][i].out; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 244; - and[21][i] = AND(); - and[21][i].a <== states[i][1]; - and[21][i].b <== eq[46][i].out; - states[i+1][9] <== and[21][i].out; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 98; - and[22][i] = AND(); - and[22][i].a <== states[i][2]; - and[22][i].b <== eq[47][i].out; - states[i+1][10] <== and[22][i].out; - from_zero_enabled[i] <== MultiNOR(10)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][10]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][10] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][10], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (3, 2), (4, 3), (5, 3), (6, 3), (7, 5), (8, 5), (9, 5)}] - signal prev_states0[15][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (3, 2), (4, 3), (5, 3), (6, 3), (7, 5), (8, 5), (9, 5)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][9]; - is_substr0[i] <== MultiOR(15)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][3], prev_states0[2][i] * states[i+2][4], prev_states0[3][i] * states[i+2][5], prev_states0[4][i] * states[i+2][6], prev_states0[5][i] * states[i+2][7], prev_states0[6][i] * states[i+2][8], prev_states0[7][i] * states[i+2][9], prev_states0[8][i] * states[i+2][2], prev_states0[9][i] * states[i+2][3], prev_states0[10][i] * states[i+2][3], prev_states0[11][i] * states[i+2][3], prev_states0[12][i] * states[i+2][5], prev_states0[13][i] * states[i+2][5], prev_states0[14][i] * states[i+2][5]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/international_chars_decomposed.circom b/packages/circom/tests/circuits/international_chars_decomposed.circom deleted file mode 100644 index c1cfeb7a..00000000 --- a/packages/circom/tests/circuits/international_chars_decomposed.circom +++ /dev/null @@ -1,922 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: Latin-Extension=[¡-ƿ]+ Greek=[Ͱ-Ͽ]+ Cyrillic=[Ѐ-ӿ]+ Arabic=[؀-ۿ]+ Devanagari=[ऀ-ॿ]+ Hiragana&Katakana=[ぁ-ヿ]+ -template InternationalCharsDecomposed(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[67][num_bytes]; - component lt[6][num_bytes]; - component and[103][num_bytes]; - component multi_or[18][num_bytes]; - signal states[num_bytes+1][90]; - signal states_tmp[num_bytes+1][90]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 90; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(89); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 76; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 97; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 116; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== eq[2][i].out; - states[i+1][3] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 105; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== eq[3][i].out; - states[i+1][4] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 110; - and[4][i] = AND(); - and[4][i].a <== states[i][4]; - and[4][i].b <== eq[4][i].out; - states[i+1][5] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 45; - and[5][i] = AND(); - and[5][i].a <== states[i][5]; - and[5][i].b <== eq[5][i].out; - states[i+1][6] <== and[5][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 69; - and[6][i] = AND(); - and[6][i].a <== states[i][6]; - and[6][i].b <== eq[6][i].out; - states[i+1][7] <== and[6][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 120; - and[7][i] = AND(); - and[7][i].a <== states[i][7]; - and[7][i].b <== eq[7][i].out; - states[i+1][8] <== and[7][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][8]; - and[8][i].b <== eq[2][i].out; - states[i+1][9] <== and[8][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 101; - and[9][i] = AND(); - and[9][i].a <== states[i][9]; - and[9][i].b <== eq[8][i].out; - states[i+1][10] <== and[9][i].out; - and[10][i] = AND(); - and[10][i].a <== states[i][10]; - and[10][i].b <== eq[4][i].out; - states[i+1][11] <== and[10][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 115; - and[11][i] = AND(); - and[11][i].a <== states[i][11]; - and[11][i].b <== eq[9][i].out; - states[i+1][12] <== and[11][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][12]; - and[12][i].b <== eq[3][i].out; - states[i+1][13] <== and[12][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 111; - and[13][i] = AND(); - and[13][i].a <== states[i][13]; - and[13][i].b <== eq[10][i].out; - states[i+1][14] <== and[13][i].out; - and[14][i] = AND(); - and[14][i].a <== states[i][14]; - and[14][i].b <== eq[4][i].out; - states[i+1][15] <== and[14][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 61; - and[15][i] = AND(); - and[15][i].a <== states[i][15]; - and[15][i].b <== eq[11][i].out; - states[i+1][16] <== and[15][i].out; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 194; - and[16][i] = AND(); - and[16][i].a <== states[i][16]; - and[16][i].b <== eq[12][i].out; - and[17][i] = AND(); - and[17][i].a <== states[i][19]; - and[17][i].b <== eq[12][i].out; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[16][i].out; - multi_or[0][i].in[1] <== and[17][i].out; - states[i+1][17] <== multi_or[0][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 195; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 196; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 197; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 198; - and[18][i] = AND(); - and[18][i].a <== states[i][16]; - multi_or[1][i] = MultiOR(4); - multi_or[1][i].in[0] <== eq[13][i].out; - multi_or[1][i].in[1] <== eq[14][i].out; - multi_or[1][i].in[2] <== eq[15][i].out; - multi_or[1][i].in[3] <== eq[16][i].out; - and[18][i].b <== multi_or[1][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][19]; - and[19][i].b <== multi_or[1][i].out; - multi_or[2][i] = MultiOR(2); - multi_or[2][i].in[0] <== and[18][i].out; - multi_or[2][i].in[1] <== and[19][i].out; - states[i+1][18] <== multi_or[2][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 161; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 191; - and[20][i] = AND(); - and[20][i].a <== lt[0][i].out; - and[20][i].b <== lt[1][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][17]; - and[21][i].b <== and[20][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 128; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 191; - and[22][i] = AND(); - and[22][i].a <== lt[2][i].out; - and[22][i].b <== lt[3][i].out; - and[23][i] = AND(); - and[23][i].a <== states[i][18]; - and[23][i].b <== and[22][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[21][i].out; - multi_or[3][i].in[1] <== and[23][i].out; - states[i+1][19] <== multi_or[3][i].out; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 32; - and[24][i] = AND(); - and[24][i].a <== states[i][19]; - and[24][i].b <== eq[17][i].out; - states[i+1][20] <== and[24][i].out; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 71; - and[25][i] = AND(); - and[25][i].a <== states[i][20]; - and[25][i].b <== eq[18][i].out; - states[i+1][21] <== and[25][i].out; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 114; - and[26][i] = AND(); - and[26][i].a <== states[i][21]; - and[26][i].b <== eq[19][i].out; - states[i+1][22] <== and[26][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][22]; - and[27][i].b <== eq[8][i].out; - states[i+1][23] <== and[27][i].out; - and[28][i] = AND(); - and[28][i].a <== states[i][23]; - and[28][i].b <== eq[8][i].out; - states[i+1][24] <== and[28][i].out; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 107; - and[29][i] = AND(); - and[29][i].a <== states[i][24]; - and[29][i].b <== eq[20][i].out; - states[i+1][25] <== and[29][i].out; - and[30][i] = AND(); - and[30][i].a <== states[i][25]; - and[30][i].b <== eq[11][i].out; - states[i+1][26] <== and[30][i].out; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 205; - and[31][i] = AND(); - and[31][i].a <== states[i][26]; - and[31][i].b <== eq[21][i].out; - and[32][i] = AND(); - and[32][i].a <== states[i][29]; - and[32][i].b <== eq[21][i].out; - multi_or[4][i] = MultiOR(2); - multi_or[4][i].in[0] <== and[31][i].out; - multi_or[4][i].in[1] <== and[32][i].out; - states[i+1][27] <== multi_or[4][i].out; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 206; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 207; - and[33][i] = AND(); - and[33][i].a <== states[i][26]; - multi_or[5][i] = MultiOR(2); - multi_or[5][i].in[0] <== eq[22][i].out; - multi_or[5][i].in[1] <== eq[23][i].out; - and[33][i].b <== multi_or[5][i].out; - and[34][i] = AND(); - and[34][i].a <== states[i][29]; - and[34][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(2); - multi_or[6][i].in[0] <== and[33][i].out; - multi_or[6][i].in[1] <== and[34][i].out; - states[i+1][28] <== multi_or[6][i].out; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 176; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 177; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 178; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 179; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 180; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 181; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 182; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 183; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 184; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 185; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 186; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 187; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 188; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 189; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 190; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 191; - and[35][i] = AND(); - and[35][i].a <== states[i][27]; - multi_or[7][i] = MultiOR(16); - multi_or[7][i].in[0] <== eq[24][i].out; - multi_or[7][i].in[1] <== eq[25][i].out; - multi_or[7][i].in[2] <== eq[26][i].out; - multi_or[7][i].in[3] <== eq[27][i].out; - multi_or[7][i].in[4] <== eq[28][i].out; - multi_or[7][i].in[5] <== eq[29][i].out; - multi_or[7][i].in[6] <== eq[30][i].out; - multi_or[7][i].in[7] <== eq[31][i].out; - multi_or[7][i].in[8] <== eq[32][i].out; - multi_or[7][i].in[9] <== eq[33][i].out; - multi_or[7][i].in[10] <== eq[34][i].out; - multi_or[7][i].in[11] <== eq[35][i].out; - multi_or[7][i].in[12] <== eq[36][i].out; - multi_or[7][i].in[13] <== eq[37][i].out; - multi_or[7][i].in[14] <== eq[38][i].out; - multi_or[7][i].in[15] <== eq[39][i].out; - and[35][i].b <== multi_or[7][i].out; - and[36][i] = AND(); - and[36][i].a <== states[i][28]; - and[36][i].b <== and[22][i].out; - multi_or[8][i] = MultiOR(2); - multi_or[8][i].in[0] <== and[35][i].out; - multi_or[8][i].in[1] <== and[36][i].out; - states[i+1][29] <== multi_or[8][i].out; - and[37][i] = AND(); - and[37][i].a <== states[i][29]; - and[37][i].b <== eq[17][i].out; - states[i+1][30] <== and[37][i].out; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 67; - and[38][i] = AND(); - and[38][i].a <== states[i][30]; - and[38][i].b <== eq[40][i].out; - states[i+1][31] <== and[38][i].out; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 121; - and[39][i] = AND(); - and[39][i].a <== states[i][31]; - and[39][i].b <== eq[41][i].out; - states[i+1][32] <== and[39][i].out; - and[40][i] = AND(); - and[40][i].a <== states[i][32]; - and[40][i].b <== eq[19][i].out; - states[i+1][33] <== and[40][i].out; - and[41][i] = AND(); - and[41][i].a <== states[i][33]; - and[41][i].b <== eq[3][i].out; - states[i+1][34] <== and[41][i].out; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 108; - and[42][i] = AND(); - and[42][i].a <== states[i][34]; - and[42][i].b <== eq[42][i].out; - states[i+1][35] <== and[42][i].out; - and[43][i] = AND(); - and[43][i].a <== states[i][35]; - and[43][i].b <== eq[42][i].out; - states[i+1][36] <== and[43][i].out; - and[44][i] = AND(); - and[44][i].a <== states[i][36]; - and[44][i].b <== eq[3][i].out; - states[i+1][37] <== and[44][i].out; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 99; - and[45][i] = AND(); - and[45][i].a <== states[i][37]; - and[45][i].b <== eq[43][i].out; - states[i+1][38] <== and[45][i].out; - and[46][i] = AND(); - and[46][i].a <== states[i][38]; - and[46][i].b <== eq[11][i].out; - states[i+1][39] <== and[46][i].out; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 208; - eq[45][i] = IsEqual(); - eq[45][i].in[0] <== in[i]; - eq[45][i].in[1] <== 209; - eq[46][i] = IsEqual(); - eq[46][i].in[0] <== in[i]; - eq[46][i].in[1] <== 210; - eq[47][i] = IsEqual(); - eq[47][i].in[0] <== in[i]; - eq[47][i].in[1] <== 211; - and[47][i] = AND(); - and[47][i].a <== states[i][39]; - multi_or[9][i] = MultiOR(4); - multi_or[9][i].in[0] <== eq[44][i].out; - multi_or[9][i].in[1] <== eq[45][i].out; - multi_or[9][i].in[2] <== eq[46][i].out; - multi_or[9][i].in[3] <== eq[47][i].out; - and[47][i].b <== multi_or[9][i].out; - and[48][i] = AND(); - and[48][i].a <== states[i][41]; - and[48][i].b <== multi_or[9][i].out; - multi_or[10][i] = MultiOR(2); - multi_or[10][i].in[0] <== and[47][i].out; - multi_or[10][i].in[1] <== and[48][i].out; - states[i+1][40] <== multi_or[10][i].out; - and[49][i] = AND(); - and[49][i].a <== states[i][40]; - and[49][i].b <== and[22][i].out; - states[i+1][41] <== and[49][i].out; - and[50][i] = AND(); - and[50][i].a <== states[i][41]; - and[50][i].b <== eq[17][i].out; - states[i+1][42] <== and[50][i].out; - eq[48][i] = IsEqual(); - eq[48][i].in[0] <== in[i]; - eq[48][i].in[1] <== 65; - and[51][i] = AND(); - and[51][i].a <== states[i][42]; - and[51][i].b <== eq[48][i].out; - states[i+1][43] <== and[51][i].out; - and[52][i] = AND(); - and[52][i].a <== states[i][43]; - and[52][i].b <== eq[19][i].out; - states[i+1][44] <== and[52][i].out; - and[53][i] = AND(); - and[53][i].a <== states[i][44]; - and[53][i].b <== eq[1][i].out; - states[i+1][45] <== and[53][i].out; - eq[49][i] = IsEqual(); - eq[49][i].in[0] <== in[i]; - eq[49][i].in[1] <== 98; - and[54][i] = AND(); - and[54][i].a <== states[i][45]; - and[54][i].b <== eq[49][i].out; - states[i+1][46] <== and[54][i].out; - and[55][i] = AND(); - and[55][i].a <== states[i][46]; - and[55][i].b <== eq[3][i].out; - states[i+1][47] <== and[55][i].out; - and[56][i] = AND(); - and[56][i].a <== states[i][47]; - and[56][i].b <== eq[43][i].out; - states[i+1][48] <== and[56][i].out; - and[57][i] = AND(); - and[57][i].a <== states[i][48]; - and[57][i].b <== eq[11][i].out; - states[i+1][49] <== and[57][i].out; - eq[50][i] = IsEqual(); - eq[50][i].in[0] <== in[i]; - eq[50][i].in[1] <== 216; - eq[51][i] = IsEqual(); - eq[51][i].in[0] <== in[i]; - eq[51][i].in[1] <== 217; - eq[52][i] = IsEqual(); - eq[52][i].in[0] <== in[i]; - eq[52][i].in[1] <== 218; - eq[53][i] = IsEqual(); - eq[53][i].in[0] <== in[i]; - eq[53][i].in[1] <== 219; - and[58][i] = AND(); - and[58][i].a <== states[i][49]; - multi_or[11][i] = MultiOR(4); - multi_or[11][i].in[0] <== eq[50][i].out; - multi_or[11][i].in[1] <== eq[51][i].out; - multi_or[11][i].in[2] <== eq[52][i].out; - multi_or[11][i].in[3] <== eq[53][i].out; - and[58][i].b <== multi_or[11][i].out; - and[59][i] = AND(); - and[59][i].a <== states[i][51]; - and[59][i].b <== multi_or[11][i].out; - multi_or[12][i] = MultiOR(2); - multi_or[12][i].in[0] <== and[58][i].out; - multi_or[12][i].in[1] <== and[59][i].out; - states[i+1][50] <== multi_or[12][i].out; - and[60][i] = AND(); - and[60][i].a <== states[i][50]; - and[60][i].b <== and[22][i].out; - states[i+1][51] <== and[60][i].out; - and[61][i] = AND(); - and[61][i].a <== states[i][51]; - and[61][i].b <== eq[17][i].out; - states[i+1][52] <== and[61][i].out; - eq[54][i] = IsEqual(); - eq[54][i].in[0] <== in[i]; - eq[54][i].in[1] <== 68; - and[62][i] = AND(); - and[62][i].a <== states[i][52]; - and[62][i].b <== eq[54][i].out; - states[i+1][53] <== and[62][i].out; - and[63][i] = AND(); - and[63][i].a <== states[i][53]; - and[63][i].b <== eq[8][i].out; - states[i+1][54] <== and[63][i].out; - eq[55][i] = IsEqual(); - eq[55][i].in[0] <== in[i]; - eq[55][i].in[1] <== 118; - and[64][i] = AND(); - and[64][i].a <== states[i][54]; - and[64][i].b <== eq[55][i].out; - states[i+1][55] <== and[64][i].out; - and[65][i] = AND(); - and[65][i].a <== states[i][55]; - and[65][i].b <== eq[1][i].out; - states[i+1][56] <== and[65][i].out; - and[66][i] = AND(); - and[66][i].a <== states[i][56]; - and[66][i].b <== eq[4][i].out; - states[i+1][57] <== and[66][i].out; - and[67][i] = AND(); - and[67][i].a <== states[i][57]; - and[67][i].b <== eq[1][i].out; - states[i+1][58] <== and[67][i].out; - eq[56][i] = IsEqual(); - eq[56][i].in[0] <== in[i]; - eq[56][i].in[1] <== 103; - and[68][i] = AND(); - and[68][i].a <== states[i][58]; - and[68][i].b <== eq[56][i].out; - states[i+1][59] <== and[68][i].out; - and[69][i] = AND(); - and[69][i].a <== states[i][59]; - and[69][i].b <== eq[1][i].out; - states[i+1][60] <== and[69][i].out; - and[70][i] = AND(); - and[70][i].a <== states[i][60]; - and[70][i].b <== eq[19][i].out; - states[i+1][61] <== and[70][i].out; - and[71][i] = AND(); - and[71][i].a <== states[i][61]; - and[71][i].b <== eq[3][i].out; - states[i+1][62] <== and[71][i].out; - and[72][i] = AND(); - and[72][i].a <== states[i][62]; - and[72][i].b <== eq[11][i].out; - states[i+1][63] <== and[72][i].out; - eq[57][i] = IsEqual(); - eq[57][i].in[0] <== in[i]; - eq[57][i].in[1] <== 224; - and[73][i] = AND(); - and[73][i].a <== states[i][63]; - and[73][i].b <== eq[57][i].out; - and[74][i] = AND(); - and[74][i].a <== states[i][66]; - and[74][i].b <== eq[57][i].out; - multi_or[13][i] = MultiOR(2); - multi_or[13][i].in[0] <== and[73][i].out; - multi_or[13][i].in[1] <== and[74][i].out; - states[i+1][64] <== multi_or[13][i].out; - eq[58][i] = IsEqual(); - eq[58][i].in[0] <== in[i]; - eq[58][i].in[1] <== 164; - eq[59][i] = IsEqual(); - eq[59][i].in[0] <== in[i]; - eq[59][i].in[1] <== 165; - and[75][i] = AND(); - and[75][i].a <== states[i][64]; - multi_or[14][i] = MultiOR(2); - multi_or[14][i].in[0] <== eq[58][i].out; - multi_or[14][i].in[1] <== eq[59][i].out; - and[75][i].b <== multi_or[14][i].out; - states[i+1][65] <== and[75][i].out; - and[76][i] = AND(); - and[76][i].a <== states[i][65]; - and[76][i].b <== and[22][i].out; - states[i+1][66] <== and[76][i].out; - and[77][i] = AND(); - and[77][i].a <== states[i][66]; - and[77][i].b <== eq[17][i].out; - states[i+1][67] <== and[77][i].out; - eq[60][i] = IsEqual(); - eq[60][i].in[0] <== in[i]; - eq[60][i].in[1] <== 72; - and[78][i] = AND(); - and[78][i].a <== states[i][67]; - and[78][i].b <== eq[60][i].out; - states[i+1][68] <== and[78][i].out; - and[79][i] = AND(); - and[79][i].a <== states[i][68]; - and[79][i].b <== eq[3][i].out; - states[i+1][69] <== and[79][i].out; - and[80][i] = AND(); - and[80][i].a <== states[i][69]; - and[80][i].b <== eq[19][i].out; - states[i+1][70] <== and[80][i].out; - and[81][i] = AND(); - and[81][i].a <== states[i][70]; - and[81][i].b <== eq[1][i].out; - states[i+1][71] <== and[81][i].out; - and[82][i] = AND(); - and[82][i].a <== states[i][71]; - and[82][i].b <== eq[56][i].out; - states[i+1][72] <== and[82][i].out; - and[83][i] = AND(); - and[83][i].a <== states[i][72]; - and[83][i].b <== eq[1][i].out; - states[i+1][73] <== and[83][i].out; - and[84][i] = AND(); - and[84][i].a <== states[i][73]; - and[84][i].b <== eq[4][i].out; - states[i+1][74] <== and[84][i].out; - and[85][i] = AND(); - and[85][i].a <== states[i][74]; - and[85][i].b <== eq[1][i].out; - states[i+1][75] <== and[85][i].out; - eq[61][i] = IsEqual(); - eq[61][i].in[0] <== in[i]; - eq[61][i].in[1] <== 38; - and[86][i] = AND(); - and[86][i].a <== states[i][75]; - and[86][i].b <== eq[61][i].out; - states[i+1][76] <== and[86][i].out; - eq[62][i] = IsEqual(); - eq[62][i].in[0] <== in[i]; - eq[62][i].in[1] <== 75; - and[87][i] = AND(); - and[87][i].a <== states[i][76]; - and[87][i].b <== eq[62][i].out; - states[i+1][77] <== and[87][i].out; - and[88][i] = AND(); - and[88][i].a <== states[i][77]; - and[88][i].b <== eq[1][i].out; - states[i+1][78] <== and[88][i].out; - and[89][i] = AND(); - and[89][i].a <== states[i][78]; - and[89][i].b <== eq[2][i].out; - states[i+1][79] <== and[89][i].out; - and[90][i] = AND(); - and[90][i].a <== states[i][79]; - and[90][i].b <== eq[1][i].out; - states[i+1][80] <== and[90][i].out; - and[91][i] = AND(); - and[91][i].a <== states[i][80]; - and[91][i].b <== eq[20][i].out; - states[i+1][81] <== and[91][i].out; - and[92][i] = AND(); - and[92][i].a <== states[i][81]; - and[92][i].b <== eq[1][i].out; - states[i+1][82] <== and[92][i].out; - and[93][i] = AND(); - and[93][i].a <== states[i][82]; - and[93][i].b <== eq[4][i].out; - states[i+1][83] <== and[93][i].out; - and[94][i] = AND(); - and[94][i].a <== states[i][83]; - and[94][i].b <== eq[1][i].out; - states[i+1][84] <== and[94][i].out; - and[95][i] = AND(); - and[95][i].a <== states[i][84]; - and[95][i].b <== eq[11][i].out; - states[i+1][85] <== and[95][i].out; - eq[63][i] = IsEqual(); - eq[63][i].in[0] <== in[i]; - eq[63][i].in[1] <== 227; - and[96][i] = AND(); - and[96][i].a <== states[i][85]; - and[96][i].b <== eq[63][i].out; - and[97][i] = AND(); - and[97][i].a <== states[i][89]; - and[97][i].b <== eq[63][i].out; - multi_or[15][i] = MultiOR(2); - multi_or[15][i].in[0] <== and[96][i].out; - multi_or[15][i].in[1] <== and[97][i].out; - states[i+1][86] <== multi_or[15][i].out; - eq[64][i] = IsEqual(); - eq[64][i].in[0] <== in[i]; - eq[64][i].in[1] <== 129; - and[98][i] = AND(); - and[98][i].a <== states[i][86]; - and[98][i].b <== eq[64][i].out; - states[i+1][87] <== and[98][i].out; - eq[65][i] = IsEqual(); - eq[65][i].in[0] <== in[i]; - eq[65][i].in[1] <== 130; - eq[66][i] = IsEqual(); - eq[66][i].in[0] <== in[i]; - eq[66][i].in[1] <== 131; - and[99][i] = AND(); - and[99][i].a <== states[i][86]; - multi_or[16][i] = MultiOR(2); - multi_or[16][i].in[0] <== eq[65][i].out; - multi_or[16][i].in[1] <== eq[66][i].out; - and[99][i].b <== multi_or[16][i].out; - states[i+1][88] <== and[99][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 129; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 191; - and[100][i] = AND(); - and[100][i].a <== lt[4][i].out; - and[100][i].b <== lt[5][i].out; - and[101][i] = AND(); - and[101][i].a <== states[i][87]; - and[101][i].b <== and[100][i].out; - and[102][i] = AND(); - and[102][i].a <== states[i][88]; - and[102][i].b <== and[22][i].out; - multi_or[17][i] = MultiOR(2); - multi_or[17][i].in[0] <== and[101][i].out; - multi_or[17][i].in[1] <== and[102][i].out; - states[i+1][89] <== multi_or[17][i].out; - from_zero_enabled[i] <== MultiNOR(89)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20], states[i+1][21], states[i+1][22], states[i+1][23], states[i+1][24], states[i+1][25], states[i+1][26], states[i+1][27], states[i+1][28], states[i+1][29], states[i+1][30], states[i+1][31], states[i+1][32], states[i+1][33], states[i+1][34], states[i+1][35], states[i+1][36], states[i+1][37], states[i+1][38], states[i+1][39], states[i+1][40], states[i+1][41], states[i+1][42], states[i+1][43], states[i+1][44], states[i+1][45], states[i+1][46], states[i+1][47], states[i+1][48], states[i+1][49], states[i+1][50], states[i+1][51], states[i+1][52], states[i+1][53], states[i+1][54], states[i+1][55], states[i+1][56], states[i+1][57], states[i+1][58], states[i+1][59], states[i+1][60], states[i+1][61], states[i+1][62], states[i+1][63], states[i+1][64], states[i+1][65], states[i+1][66], states[i+1][67], states[i+1][68], states[i+1][69], states[i+1][70], states[i+1][71], states[i+1][72], states[i+1][73], states[i+1][74], states[i+1][75], states[i+1][76], states[i+1][77], states[i+1][78], states[i+1][79], states[i+1][80], states[i+1][81], states[i+1][82], states[i+1][83], states[i+1][84], states[i+1][85], states[i+1][86], states[i+1][87], states[i+1][88], states[i+1][89]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - state_changed[i].in[18] <== states[i+1][19]; - state_changed[i].in[19] <== states[i+1][20]; - state_changed[i].in[20] <== states[i+1][21]; - state_changed[i].in[21] <== states[i+1][22]; - state_changed[i].in[22] <== states[i+1][23]; - state_changed[i].in[23] <== states[i+1][24]; - state_changed[i].in[24] <== states[i+1][25]; - state_changed[i].in[25] <== states[i+1][26]; - state_changed[i].in[26] <== states[i+1][27]; - state_changed[i].in[27] <== states[i+1][28]; - state_changed[i].in[28] <== states[i+1][29]; - state_changed[i].in[29] <== states[i+1][30]; - state_changed[i].in[30] <== states[i+1][31]; - state_changed[i].in[31] <== states[i+1][32]; - state_changed[i].in[32] <== states[i+1][33]; - state_changed[i].in[33] <== states[i+1][34]; - state_changed[i].in[34] <== states[i+1][35]; - state_changed[i].in[35] <== states[i+1][36]; - state_changed[i].in[36] <== states[i+1][37]; - state_changed[i].in[37] <== states[i+1][38]; - state_changed[i].in[38] <== states[i+1][39]; - state_changed[i].in[39] <== states[i+1][40]; - state_changed[i].in[40] <== states[i+1][41]; - state_changed[i].in[41] <== states[i+1][42]; - state_changed[i].in[42] <== states[i+1][43]; - state_changed[i].in[43] <== states[i+1][44]; - state_changed[i].in[44] <== states[i+1][45]; - state_changed[i].in[45] <== states[i+1][46]; - state_changed[i].in[46] <== states[i+1][47]; - state_changed[i].in[47] <== states[i+1][48]; - state_changed[i].in[48] <== states[i+1][49]; - state_changed[i].in[49] <== states[i+1][50]; - state_changed[i].in[50] <== states[i+1][51]; - state_changed[i].in[51] <== states[i+1][52]; - state_changed[i].in[52] <== states[i+1][53]; - state_changed[i].in[53] <== states[i+1][54]; - state_changed[i].in[54] <== states[i+1][55]; - state_changed[i].in[55] <== states[i+1][56]; - state_changed[i].in[56] <== states[i+1][57]; - state_changed[i].in[57] <== states[i+1][58]; - state_changed[i].in[58] <== states[i+1][59]; - state_changed[i].in[59] <== states[i+1][60]; - state_changed[i].in[60] <== states[i+1][61]; - state_changed[i].in[61] <== states[i+1][62]; - state_changed[i].in[62] <== states[i+1][63]; - state_changed[i].in[63] <== states[i+1][64]; - state_changed[i].in[64] <== states[i+1][65]; - state_changed[i].in[65] <== states[i+1][66]; - state_changed[i].in[66] <== states[i+1][67]; - state_changed[i].in[67] <== states[i+1][68]; - state_changed[i].in[68] <== states[i+1][69]; - state_changed[i].in[69] <== states[i+1][70]; - state_changed[i].in[70] <== states[i+1][71]; - state_changed[i].in[71] <== states[i+1][72]; - state_changed[i].in[72] <== states[i+1][73]; - state_changed[i].in[73] <== states[i+1][74]; - state_changed[i].in[74] <== states[i+1][75]; - state_changed[i].in[75] <== states[i+1][76]; - state_changed[i].in[76] <== states[i+1][77]; - state_changed[i].in[77] <== states[i+1][78]; - state_changed[i].in[78] <== states[i+1][79]; - state_changed[i].in[79] <== states[i+1][80]; - state_changed[i].in[80] <== states[i+1][81]; - state_changed[i].in[81] <== states[i+1][82]; - state_changed[i].in[82] <== states[i+1][83]; - state_changed[i].in[83] <== states[i+1][84]; - state_changed[i].in[84] <== states[i+1][85]; - state_changed[i].in[85] <== states[i+1][86]; - state_changed[i].in[86] <== states[i+1][87]; - state_changed[i].in[87] <== states[i+1][88]; - state_changed[i].in[88] <== states[i+1][89]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][89]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][89] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][89], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(16, 17), (16, 18), (17, 19), (18, 19), (19, 17), (19, 18)}, {(26, 27), (26, 28), (27, 29), (28, 29), (29, 27), (29, 28)}, {(39, 40), (40, 41), (41, 40)}, {(49, 50), (50, 51), (51, 50)}, {(63, 64), (64, 65), (65, 66), (66, 64)}, {(85, 86), (86, 87), (86, 88), (87, 89), (88, 89), (89, 86)}] - signal prev_states0[6][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(16, 17), (16, 18), (17, 19), (18, 19), (19, 17), (19, 18)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][16]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][16]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][17]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][18]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][19]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][19]; - is_substr0[i] <== MultiOR(6)([prev_states0[0][i] * states[i+2][17], prev_states0[1][i] * states[i+2][18], prev_states0[2][i] * states[i+2][19], prev_states0[3][i] * states[i+2][19], prev_states0[4][i] * states[i+2][17], prev_states0[5][i] * states[i+2][18]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } - signal prev_states1[6][msg_bytes]; - signal is_substr1[msg_bytes]; - signal is_reveal1[msg_bytes]; - signal output reveal1[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 1-th substring transitions: [(26, 27), (26, 28), (27, 29), (28, 29), (29, 27), (29, 28)] - prev_states1[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][26]; - prev_states1[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][26]; - prev_states1[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][27]; - prev_states1[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][28]; - prev_states1[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][29]; - prev_states1[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][29]; - is_substr1[i] <== MultiOR(6)([prev_states1[0][i] * states[i+2][27], prev_states1[1][i] * states[i+2][28], prev_states1[2][i] * states[i+2][29], prev_states1[3][i] * states[i+2][29], prev_states1[4][i] * states[i+2][27], prev_states1[5][i] * states[i+2][28]]); - is_reveal1[i] <== MultiAND(3)([out, is_substr1[i], is_consecutive[i][2]]); - reveal1[i] <== in[i+1] * is_reveal1[i]; - } - signal prev_states2[3][msg_bytes]; - signal is_substr2[msg_bytes]; - signal is_reveal2[msg_bytes]; - signal output reveal2[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 2-th substring transitions: [(39, 40), (40, 41), (41, 40)] - prev_states2[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][39]; - prev_states2[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][40]; - prev_states2[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][41]; - is_substr2[i] <== MultiOR(3)([prev_states2[0][i] * states[i+2][40], prev_states2[1][i] * states[i+2][41], prev_states2[2][i] * states[i+2][40]]); - is_reveal2[i] <== MultiAND(3)([out, is_substr2[i], is_consecutive[i][2]]); - reveal2[i] <== in[i+1] * is_reveal2[i]; - } - signal prev_states3[3][msg_bytes]; - signal is_substr3[msg_bytes]; - signal is_reveal3[msg_bytes]; - signal output reveal3[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 3-th substring transitions: [(49, 50), (50, 51), (51, 50)] - prev_states3[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][49]; - prev_states3[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][50]; - prev_states3[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][51]; - is_substr3[i] <== MultiOR(3)([prev_states3[0][i] * states[i+2][50], prev_states3[1][i] * states[i+2][51], prev_states3[2][i] * states[i+2][50]]); - is_reveal3[i] <== MultiAND(3)([out, is_substr3[i], is_consecutive[i][2]]); - reveal3[i] <== in[i+1] * is_reveal3[i]; - } - signal prev_states4[4][msg_bytes]; - signal is_substr4[msg_bytes]; - signal is_reveal4[msg_bytes]; - signal output reveal4[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 4-th substring transitions: [(63, 64), (64, 65), (65, 66), (66, 64)] - prev_states4[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][63]; - prev_states4[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][64]; - prev_states4[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][65]; - prev_states4[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][66]; - is_substr4[i] <== MultiOR(4)([prev_states4[0][i] * states[i+2][64], prev_states4[1][i] * states[i+2][65], prev_states4[2][i] * states[i+2][66], prev_states4[3][i] * states[i+2][64]]); - is_reveal4[i] <== MultiAND(3)([out, is_substr4[i], is_consecutive[i][2]]); - reveal4[i] <== in[i+1] * is_reveal4[i]; - } - signal prev_states5[6][msg_bytes]; - signal is_substr5[msg_bytes]; - signal is_reveal5[msg_bytes]; - signal output reveal5[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 5-th substring transitions: [(85, 86), (86, 87), (86, 88), (87, 89), (88, 89), (89, 86)] - prev_states5[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][85]; - prev_states5[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][86]; - prev_states5[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][86]; - prev_states5[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][87]; - prev_states5[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][88]; - prev_states5[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][89]; - is_substr5[i] <== MultiOR(6)([prev_states5[0][i] * states[i+2][86], prev_states5[1][i] * states[i+2][87], prev_states5[2][i] * states[i+2][88], prev_states5[3][i] * states[i+2][89], prev_states5[4][i] * states[i+2][89], prev_states5[5][i] * states[i+2][86]]); - is_reveal5[i] <== MultiAND(3)([out, is_substr5[i], is_consecutive[i][2]]); - reveal5[i] <== in[i+1] * is_reveal5[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/international_chars_decomposed.json b/packages/circom/tests/circuits/international_chars_decomposed.json deleted file mode 100644 index 45590e65..00000000 --- a/packages/circom/tests/circuits/international_chars_decomposed.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "Latin-Extension=" - }, - { - "is_public": true, - "regex_def": "[¡-ƿ]+" - }, - { - "is_public": false, - "regex_def": " Greek=" - }, - { - "is_public": true, - "regex_def": "[Ͱ-Ͽ]+" - }, - { - "is_public": false, - "regex_def": " Cyrillic=" - }, - { - "is_public": true, - "regex_def": "[Ѐ-ӿ]+" - }, - { - "is_public": false, - "regex_def": " Arabic=" - }, - { - "is_public": true, - "regex_def": "[؀-ۿ]+" - }, - { - "is_public": false, - "regex_def": " Devanagari=" - }, - { - "is_public": true, - "regex_def": "[ऀ-ॿ]+" - }, - { - "is_public": false, - "regex_def": " Hiragana&Katakana=" - }, - { - "is_public": true, - "regex_def": "[ぁ-ヿ]+" - } - ] -} diff --git a/packages/circom/tests/circuits/invitation_code_with_prefix.json b/packages/circom/tests/circuits/invitation_code_with_prefix.json deleted file mode 100644 index e92abb45..00000000 --- a/packages/circom/tests/circuits/invitation_code_with_prefix.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "( )?(c|C)ode( )?(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/invitation_code_with_prefix_regex.circom b/packages/circom/tests/circuits/invitation_code_with_prefix_regex.circom deleted file mode 100644 index a461f21d..00000000 --- a/packages/circom/tests/circuits/invitation_code_with_prefix_regex.circom +++ /dev/null @@ -1,199 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: ( )?(c|C)ode( )?(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f)+ -template InvitationCodeWithPrefixRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[19][num_bytes]; - component and[10][num_bytes]; - component multi_or[3][num_bytes]; - signal states[num_bytes+1][8]; - signal states_tmp[num_bytes+1][8]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 8; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(7); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 32; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 67; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 99; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[1][i].out; - multi_or[0][i].in[1] <== eq[2][i].out; - and[1][i].b <== multi_or[0][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== multi_or[0][i].out; - states_tmp[i+1][2] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 111; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[3][i].out; - states[i+1][3] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 100; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - states[i+1][4] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 101; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[5][i].out; - states[i+1][5] <== and[5][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[0][i].out; - states[i+1][6] <== and[6][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 48; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 49; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 50; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 51; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 52; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 53; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 54; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 55; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 56; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 57; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 97; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 98; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 102; - and[7][i] = AND(); - and[7][i].a <== states[i][5]; - multi_or[1][i] = MultiOR(16); - multi_or[1][i].in[0] <== eq[6][i].out; - multi_or[1][i].in[1] <== eq[7][i].out; - multi_or[1][i].in[2] <== eq[8][i].out; - multi_or[1][i].in[3] <== eq[9][i].out; - multi_or[1][i].in[4] <== eq[10][i].out; - multi_or[1][i].in[5] <== eq[11][i].out; - multi_or[1][i].in[6] <== eq[12][i].out; - multi_or[1][i].in[7] <== eq[13][i].out; - multi_or[1][i].in[8] <== eq[14][i].out; - multi_or[1][i].in[9] <== eq[15][i].out; - multi_or[1][i].in[10] <== eq[16][i].out; - multi_or[1][i].in[11] <== eq[17][i].out; - multi_or[1][i].in[12] <== eq[2][i].out; - multi_or[1][i].in[13] <== eq[4][i].out; - multi_or[1][i].in[14] <== eq[5][i].out; - multi_or[1][i].in[15] <== eq[18][i].out; - and[7][i].b <== multi_or[1][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][6]; - and[8][i].b <== multi_or[1][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][7]; - and[9][i].b <== multi_or[1][i].out; - multi_or[2][i] = MultiOR(3); - multi_or[2][i].in[0] <== and[7][i].out; - multi_or[2][i].in[1] <== and[8][i].out; - multi_or[2][i].in[2] <== and[9][i].out; - states[i+1][7] <== multi_or[2][i].out; - from_zero_enabled[i] <== MultiNOR(7)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][7]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][7] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][7], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (0, 2), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (5, 7), (6, 7), (7, 7)}] - signal prev_states0[10][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (0, 2), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (5, 7), (6, 7), (7, 7)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - is_substr0[i] <== MultiOR(10)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][2], prev_states0[3][i] * states[i+2][3], prev_states0[4][i] * states[i+2][4], prev_states0[5][i] * states[i+2][5], prev_states0[6][i] * states[i+2][6], prev_states0[7][i] * states[i+2][7], prev_states0[8][i] * states[i+2][7], prev_states0[9][i] * states[i+2][7]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/negate1.json b/packages/circom/tests/circuits/negate1.json deleted file mode 100644 index 264b7688..00000000 --- a/packages/circom/tests/circuits/negate1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a:" - }, - { - "is_public": true, - "regex_def": "[^abcdefghijklmnopqrstuvwxyz\\.]+" - }, - { - "is_public": false, - "regex_def": "\\." - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/negate1_regex.circom b/packages/circom/tests/circuits/negate1_regex.circom deleted file mode 100644 index 78371181..00000000 --- a/packages/circom/tests/circuits/negate1_regex.circom +++ /dev/null @@ -1,460 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a:[^abcdefghijklmnopqrstuvwxyz\.]+\. -template Negate1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[45][num_bytes]; - component lt[14][num_bytes]; - component and[33][num_bytes]; - component multi_or[12][num_bytes]; - signal states[num_bytes+1][12]; - signal states_tmp[num_bytes+1][12]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 12; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(11); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 58; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 1; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 45; - and[2][i] = AND(); - and[2][i].a <== lt[0][i].out; - and[2][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 47; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 96; - and[3][i] = AND(); - and[3][i].a <== lt[2][i].out; - and[3][i].b <== lt[3][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 123; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 124; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 125; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 126; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 127; - and[4][i] = AND(); - and[4][i].a <== states[i][2]; - multi_or[0][i] = MultiOR(7); - multi_or[0][i].in[0] <== and[2][i].out; - multi_or[0][i].in[1] <== and[3][i].out; - multi_or[0][i].in[2] <== eq[2][i].out; - multi_or[0][i].in[3] <== eq[3][i].out; - multi_or[0][i].in[4] <== eq[4][i].out; - multi_or[0][i].in[5] <== eq[5][i].out; - multi_or[0][i].in[6] <== eq[6][i].out; - and[4][i].b <== multi_or[0][i].out; - and[5][i] = AND(); - and[5][i].a <== states[i][3]; - and[5][i].b <== multi_or[0][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 128; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 191; - and[6][i] = AND(); - and[6][i].a <== lt[4][i].out; - and[6][i].b <== lt[5][i].out; - and[7][i] = AND(); - and[7][i].a <== states[i][4]; - and[7][i].b <== and[6][i].out; - multi_or[1][i] = MultiOR(3); - multi_or[1][i].in[0] <== and[4][i].out; - multi_or[1][i].in[1] <== and[5][i].out; - multi_or[1][i].in[2] <== and[7][i].out; - states[i+1][3] <== multi_or[1][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 194; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 223; - and[8][i] = AND(); - and[8][i].a <== lt[6][i].out; - and[8][i].b <== lt[7][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][2]; - and[9][i].b <== and[8][i].out; - and[10][i] = AND(); - and[10][i].a <== states[i][3]; - and[10][i].b <== and[8][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 160; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 191; - and[11][i] = AND(); - and[11][i].a <== lt[8][i].out; - and[11][i].b <== lt[9][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][5]; - and[12][i].b <== and[11][i].out; - and[13][i] = AND(); - and[13][i].a <== states[i][6]; - and[13][i].b <== and[6][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 159; - and[14][i] = AND(); - and[14][i].a <== lt[10][i].out; - and[14][i].b <== lt[11][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][7]; - and[15][i].b <== and[14][i].out; - multi_or[2][i] = MultiOR(5); - multi_or[2][i].in[0] <== and[9][i].out; - multi_or[2][i].in[1] <== and[10][i].out; - multi_or[2][i].in[2] <== and[12][i].out; - multi_or[2][i].in[3] <== and[13][i].out; - multi_or[2][i].in[4] <== and[15][i].out; - states[i+1][4] <== multi_or[2][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 224; - and[16][i] = AND(); - and[16][i].a <== states[i][2]; - and[16][i].b <== eq[7][i].out; - and[17][i] = AND(); - and[17][i].a <== states[i][3]; - and[17][i].b <== eq[7][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[16][i].out; - multi_or[3][i].in[1] <== and[17][i].out; - states[i+1][5] <== multi_or[3][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 225; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 226; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 227; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 228; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 229; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 230; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 231; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 232; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 233; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 234; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 235; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 236; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 238; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 239; - and[18][i] = AND(); - and[18][i].a <== states[i][2]; - multi_or[4][i] = MultiOR(14); - multi_or[4][i].in[0] <== eq[8][i].out; - multi_or[4][i].in[1] <== eq[9][i].out; - multi_or[4][i].in[2] <== eq[10][i].out; - multi_or[4][i].in[3] <== eq[11][i].out; - multi_or[4][i].in[4] <== eq[12][i].out; - multi_or[4][i].in[5] <== eq[13][i].out; - multi_or[4][i].in[6] <== eq[14][i].out; - multi_or[4][i].in[7] <== eq[15][i].out; - multi_or[4][i].in[8] <== eq[16][i].out; - multi_or[4][i].in[9] <== eq[17][i].out; - multi_or[4][i].in[10] <== eq[18][i].out; - multi_or[4][i].in[11] <== eq[19][i].out; - multi_or[4][i].in[12] <== eq[20][i].out; - multi_or[4][i].in[13] <== eq[21][i].out; - and[18][i].b <== multi_or[4][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][3]; - and[19][i].b <== multi_or[4][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 144; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 191; - and[20][i] = AND(); - and[20][i].a <== lt[12][i].out; - and[20][i].b <== lt[13][i].out; - and[21][i] = AND(); - and[21][i].a <== states[i][8]; - and[21][i].b <== and[20][i].out; - and[22][i] = AND(); - and[22][i].a <== states[i][9]; - and[22][i].b <== and[6][i].out; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 128; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 129; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 130; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 131; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 132; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 133; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 134; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 135; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 136; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 137; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 138; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 139; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 140; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 141; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 142; - eq[37][i] = IsEqual(); - eq[37][i].in[0] <== in[i]; - eq[37][i].in[1] <== 143; - and[23][i] = AND(); - and[23][i].a <== states[i][10]; - multi_or[5][i] = MultiOR(16); - multi_or[5][i].in[0] <== eq[22][i].out; - multi_or[5][i].in[1] <== eq[23][i].out; - multi_or[5][i].in[2] <== eq[24][i].out; - multi_or[5][i].in[3] <== eq[25][i].out; - multi_or[5][i].in[4] <== eq[26][i].out; - multi_or[5][i].in[5] <== eq[27][i].out; - multi_or[5][i].in[6] <== eq[28][i].out; - multi_or[5][i].in[7] <== eq[29][i].out; - multi_or[5][i].in[8] <== eq[30][i].out; - multi_or[5][i].in[9] <== eq[31][i].out; - multi_or[5][i].in[10] <== eq[32][i].out; - multi_or[5][i].in[11] <== eq[33][i].out; - multi_or[5][i].in[12] <== eq[34][i].out; - multi_or[5][i].in[13] <== eq[35][i].out; - multi_or[5][i].in[14] <== eq[36][i].out; - multi_or[5][i].in[15] <== eq[37][i].out; - and[23][i].b <== multi_or[5][i].out; - multi_or[6][i] = MultiOR(5); - multi_or[6][i].in[0] <== and[18][i].out; - multi_or[6][i].in[1] <== and[19][i].out; - multi_or[6][i].in[2] <== and[21][i].out; - multi_or[6][i].in[3] <== and[22][i].out; - multi_or[6][i].in[4] <== and[23][i].out; - states[i+1][6] <== multi_or[6][i].out; - eq[38][i] = IsEqual(); - eq[38][i].in[0] <== in[i]; - eq[38][i].in[1] <== 237; - and[24][i] = AND(); - and[24][i].a <== states[i][2]; - and[24][i].b <== eq[38][i].out; - and[25][i] = AND(); - and[25][i].a <== states[i][3]; - and[25][i].b <== eq[38][i].out; - multi_or[7][i] = MultiOR(2); - multi_or[7][i].in[0] <== and[24][i].out; - multi_or[7][i].in[1] <== and[25][i].out; - states[i+1][7] <== multi_or[7][i].out; - eq[39][i] = IsEqual(); - eq[39][i].in[0] <== in[i]; - eq[39][i].in[1] <== 240; - and[26][i] = AND(); - and[26][i].a <== states[i][2]; - and[26][i].b <== eq[39][i].out; - and[27][i] = AND(); - and[27][i].a <== states[i][3]; - and[27][i].b <== eq[39][i].out; - multi_or[8][i] = MultiOR(2); - multi_or[8][i].in[0] <== and[26][i].out; - multi_or[8][i].in[1] <== and[27][i].out; - states[i+1][8] <== multi_or[8][i].out; - eq[40][i] = IsEqual(); - eq[40][i].in[0] <== in[i]; - eq[40][i].in[1] <== 241; - eq[41][i] = IsEqual(); - eq[41][i].in[0] <== in[i]; - eq[41][i].in[1] <== 242; - eq[42][i] = IsEqual(); - eq[42][i].in[0] <== in[i]; - eq[42][i].in[1] <== 243; - and[28][i] = AND(); - and[28][i].a <== states[i][2]; - multi_or[9][i] = MultiOR(3); - multi_or[9][i].in[0] <== eq[40][i].out; - multi_or[9][i].in[1] <== eq[41][i].out; - multi_or[9][i].in[2] <== eq[42][i].out; - and[28][i].b <== multi_or[9][i].out; - and[29][i] = AND(); - and[29][i].a <== states[i][3]; - and[29][i].b <== multi_or[9][i].out; - multi_or[10][i] = MultiOR(2); - multi_or[10][i].in[0] <== and[28][i].out; - multi_or[10][i].in[1] <== and[29][i].out; - states[i+1][9] <== multi_or[10][i].out; - eq[43][i] = IsEqual(); - eq[43][i].in[0] <== in[i]; - eq[43][i].in[1] <== 244; - and[30][i] = AND(); - and[30][i].a <== states[i][2]; - and[30][i].b <== eq[43][i].out; - and[31][i] = AND(); - and[31][i].a <== states[i][3]; - and[31][i].b <== eq[43][i].out; - multi_or[11][i] = MultiOR(2); - multi_or[11][i].in[0] <== and[30][i].out; - multi_or[11][i].in[1] <== and[31][i].out; - states[i+1][10] <== multi_or[11][i].out; - eq[44][i] = IsEqual(); - eq[44][i].in[0] <== in[i]; - eq[44][i].in[1] <== 46; - and[32][i] = AND(); - and[32][i].a <== states[i][3]; - and[32][i].b <== eq[44][i].out; - states[i+1][11] <== and[32][i].out; - from_zero_enabled[i] <== MultiNOR(11)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][11]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][11] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][11], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 3), (5, 4), (6, 4), (7, 4), (8, 6), (9, 6), (10, 6)}] - signal prev_states0[23][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (2, 10), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (4, 3), (5, 4), (6, 4), (7, 4), (8, 6), (9, 6), (10, 6)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[7][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[15][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[16][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[17][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[18][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[19][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[20][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - prev_states0[21][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][9]; - prev_states0[22][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][10]; - is_substr0[i] <== MultiOR(23)([prev_states0[0][i] * states[i+2][3], prev_states0[1][i] * states[i+2][4], prev_states0[2][i] * states[i+2][5], prev_states0[3][i] * states[i+2][6], prev_states0[4][i] * states[i+2][7], prev_states0[5][i] * states[i+2][8], prev_states0[6][i] * states[i+2][9], prev_states0[7][i] * states[i+2][10], prev_states0[8][i] * states[i+2][3], prev_states0[9][i] * states[i+2][4], prev_states0[10][i] * states[i+2][5], prev_states0[11][i] * states[i+2][6], prev_states0[12][i] * states[i+2][7], prev_states0[13][i] * states[i+2][8], prev_states0[14][i] * states[i+2][9], prev_states0[15][i] * states[i+2][10], prev_states0[16][i] * states[i+2][3], prev_states0[17][i] * states[i+2][4], prev_states0[18][i] * states[i+2][4], prev_states0[19][i] * states[i+2][4], prev_states0[20][i] * states[i+2][6], prev_states0[21][i] * states[i+2][6], prev_states0[22][i] * states[i+2][6]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/negate2.json b/packages/circom/tests/circuits/negate2.json deleted file mode 100644 index 136b611e..00000000 --- a/packages/circom/tests/circuits/negate2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "[^ab]" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/negate2_regex.circom b/packages/circom/tests/circuits/negate2_regex.circom deleted file mode 100644 index 732eeaba..00000000 --- a/packages/circom/tests/circuits/negate2_regex.circom +++ /dev/null @@ -1,368 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: [^ab] -template Negate2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[37][num_bytes]; - component lt[14][num_bytes]; - component and[22][num_bytes]; - component multi_or[6][num_bytes]; - signal states[num_bytes+1][9]; - signal states_tmp[num_bytes+1][9]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 9; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(8); - states[i][0] <== 1; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 1; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 96; - and[0][i] = AND(); - and[0][i].a <== lt[0][i].out; - and[0][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 99; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 127; - and[1][i] = AND(); - and[1][i].a <== lt[2][i].out; - and[1][i].b <== lt[3][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][0]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[0][i].out; - multi_or[0][i].in[1] <== and[1][i].out; - and[2][i].b <== multi_or[0][i].out; - lt[4][i] = LessEqThan(8); - lt[4][i].in[0] <== 128; - lt[4][i].in[1] <== in[i]; - lt[5][i] = LessEqThan(8); - lt[5][i].in[0] <== in[i]; - lt[5][i].in[1] <== 191; - and[3][i] = AND(); - and[3][i].a <== lt[4][i].out; - and[3][i].b <== lt[5][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][2]; - and[4][i].b <== and[3][i].out; - states_tmp[i+1][1] <== and[4][i].out; - lt[6][i] = LessEqThan(8); - lt[6][i].in[0] <== 194; - lt[6][i].in[1] <== in[i]; - lt[7][i] = LessEqThan(8); - lt[7][i].in[0] <== in[i]; - lt[7][i].in[1] <== 223; - and[5][i] = AND(); - and[5][i].a <== lt[6][i].out; - and[5][i].b <== lt[7][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][0]; - and[6][i].b <== and[5][i].out; - lt[8][i] = LessEqThan(8); - lt[8][i].in[0] <== 160; - lt[8][i].in[1] <== in[i]; - lt[9][i] = LessEqThan(8); - lt[9][i].in[0] <== in[i]; - lt[9][i].in[1] <== 191; - and[7][i] = AND(); - and[7][i].a <== lt[8][i].out; - and[7][i].b <== lt[9][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][3]; - and[8][i].b <== and[7][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][4]; - and[9][i].b <== and[3][i].out; - lt[10][i] = LessEqThan(8); - lt[10][i].in[0] <== 128; - lt[10][i].in[1] <== in[i]; - lt[11][i] = LessEqThan(8); - lt[11][i].in[0] <== in[i]; - lt[11][i].in[1] <== 159; - and[10][i] = AND(); - and[10][i].a <== lt[10][i].out; - and[10][i].b <== lt[11][i].out; - and[11][i] = AND(); - and[11][i].a <== states[i][5]; - and[11][i].b <== and[10][i].out; - multi_or[1][i] = MultiOR(3); - multi_or[1][i].in[0] <== and[8][i].out; - multi_or[1][i].in[1] <== and[9][i].out; - multi_or[1][i].in[2] <== and[11][i].out; - states_tmp[i+1][2] <== multi_or[1][i].out; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 224; - and[12][i] = AND(); - and[12][i].a <== states[i][0]; - and[12][i].b <== eq[0][i].out; - states_tmp[i+1][3] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 225; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 226; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 227; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 228; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 229; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 230; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 231; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 232; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 233; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 234; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 235; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 236; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 238; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 239; - and[13][i] = AND(); - and[13][i].a <== states[i][0]; - multi_or[2][i] = MultiOR(14); - multi_or[2][i].in[0] <== eq[1][i].out; - multi_or[2][i].in[1] <== eq[2][i].out; - multi_or[2][i].in[2] <== eq[3][i].out; - multi_or[2][i].in[3] <== eq[4][i].out; - multi_or[2][i].in[4] <== eq[5][i].out; - multi_or[2][i].in[5] <== eq[6][i].out; - multi_or[2][i].in[6] <== eq[7][i].out; - multi_or[2][i].in[7] <== eq[8][i].out; - multi_or[2][i].in[8] <== eq[9][i].out; - multi_or[2][i].in[9] <== eq[10][i].out; - multi_or[2][i].in[10] <== eq[11][i].out; - multi_or[2][i].in[11] <== eq[12][i].out; - multi_or[2][i].in[12] <== eq[13][i].out; - multi_or[2][i].in[13] <== eq[14][i].out; - and[13][i].b <== multi_or[2][i].out; - lt[12][i] = LessEqThan(8); - lt[12][i].in[0] <== 144; - lt[12][i].in[1] <== in[i]; - lt[13][i] = LessEqThan(8); - lt[13][i].in[0] <== in[i]; - lt[13][i].in[1] <== 191; - and[14][i] = AND(); - and[14][i].a <== lt[12][i].out; - and[14][i].b <== lt[13][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][6]; - and[15][i].b <== and[14][i].out; - and[16][i] = AND(); - and[16][i].a <== states[i][7]; - and[16][i].b <== and[3][i].out; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 128; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 129; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 130; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 131; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 132; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 133; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 134; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 135; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 136; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 137; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 138; - eq[26][i] = IsEqual(); - eq[26][i].in[0] <== in[i]; - eq[26][i].in[1] <== 139; - eq[27][i] = IsEqual(); - eq[27][i].in[0] <== in[i]; - eq[27][i].in[1] <== 140; - eq[28][i] = IsEqual(); - eq[28][i].in[0] <== in[i]; - eq[28][i].in[1] <== 141; - eq[29][i] = IsEqual(); - eq[29][i].in[0] <== in[i]; - eq[29][i].in[1] <== 142; - eq[30][i] = IsEqual(); - eq[30][i].in[0] <== in[i]; - eq[30][i].in[1] <== 143; - and[17][i] = AND(); - and[17][i].a <== states[i][8]; - multi_or[3][i] = MultiOR(16); - multi_or[3][i].in[0] <== eq[15][i].out; - multi_or[3][i].in[1] <== eq[16][i].out; - multi_or[3][i].in[2] <== eq[17][i].out; - multi_or[3][i].in[3] <== eq[18][i].out; - multi_or[3][i].in[4] <== eq[19][i].out; - multi_or[3][i].in[5] <== eq[20][i].out; - multi_or[3][i].in[6] <== eq[21][i].out; - multi_or[3][i].in[7] <== eq[22][i].out; - multi_or[3][i].in[8] <== eq[23][i].out; - multi_or[3][i].in[9] <== eq[24][i].out; - multi_or[3][i].in[10] <== eq[25][i].out; - multi_or[3][i].in[11] <== eq[26][i].out; - multi_or[3][i].in[12] <== eq[27][i].out; - multi_or[3][i].in[13] <== eq[28][i].out; - multi_or[3][i].in[14] <== eq[29][i].out; - multi_or[3][i].in[15] <== eq[30][i].out; - and[17][i].b <== multi_or[3][i].out; - multi_or[4][i] = MultiOR(3); - multi_or[4][i].in[0] <== and[15][i].out; - multi_or[4][i].in[1] <== and[16][i].out; - multi_or[4][i].in[2] <== and[17][i].out; - states_tmp[i+1][4] <== multi_or[4][i].out; - eq[31][i] = IsEqual(); - eq[31][i].in[0] <== in[i]; - eq[31][i].in[1] <== 237; - and[18][i] = AND(); - and[18][i].a <== states[i][0]; - and[18][i].b <== eq[31][i].out; - states_tmp[i+1][5] <== 0; - eq[32][i] = IsEqual(); - eq[32][i].in[0] <== in[i]; - eq[32][i].in[1] <== 240; - and[19][i] = AND(); - and[19][i].a <== states[i][0]; - and[19][i].b <== eq[32][i].out; - states_tmp[i+1][6] <== 0; - eq[33][i] = IsEqual(); - eq[33][i].in[0] <== in[i]; - eq[33][i].in[1] <== 241; - eq[34][i] = IsEqual(); - eq[34][i].in[0] <== in[i]; - eq[34][i].in[1] <== 242; - eq[35][i] = IsEqual(); - eq[35][i].in[0] <== in[i]; - eq[35][i].in[1] <== 243; - and[20][i] = AND(); - and[20][i].a <== states[i][0]; - multi_or[5][i] = MultiOR(3); - multi_or[5][i].in[0] <== eq[33][i].out; - multi_or[5][i].in[1] <== eq[34][i].out; - multi_or[5][i].in[2] <== eq[35][i].out; - and[20][i].b <== multi_or[5][i].out; - states_tmp[i+1][7] <== 0; - eq[36][i] = IsEqual(); - eq[36][i].in[0] <== in[i]; - eq[36][i].in[1] <== 244; - and[21][i] = AND(); - and[21][i].a <== states[i][0]; - and[21][i].b <== eq[36][i].out; - states_tmp[i+1][8] <== 0; - from_zero_enabled[i] <== MultiNOR(8)([states_tmp[i+1][1], states_tmp[i+1][2], states_tmp[i+1][3], states_tmp[i+1][4], states_tmp[i+1][5], states_tmp[i+1][6], states_tmp[i+1][7], states_tmp[i+1][8]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[2][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[6][i].out]); - states[i+1][3] <== MultiOR(2)([states_tmp[i+1][3], from_zero_enabled[i] * and[12][i].out]); - states[i+1][4] <== MultiOR(2)([states_tmp[i+1][4], from_zero_enabled[i] * and[13][i].out]); - states[i+1][5] <== MultiOR(2)([states_tmp[i+1][5], from_zero_enabled[i] * and[18][i].out]); - states[i+1][6] <== MultiOR(2)([states_tmp[i+1][6], from_zero_enabled[i] * and[19][i].out]); - states[i+1][7] <== MultiOR(2)([states_tmp[i+1][7], from_zero_enabled[i] * and[20][i].out]); - states[i+1][8] <== MultiOR(2)([states_tmp[i+1][8], from_zero_enabled[i] * and[21][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][1]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][1] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][1], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (2, 1), (3, 2), (4, 2), (5, 2), (6, 4), (7, 4), (8, 4)}] - signal prev_states0[15][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (2, 1), (3, 2), (4, 2), (5, 2), (6, 4), (7, 4), (8, 4)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[2][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[3][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[4][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[5][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[6][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[7][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[8][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[9][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[10][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - prev_states0[11][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][5]; - prev_states0[12][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states0[13][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - prev_states0[14][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - is_substr0[i] <== MultiOR(15)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3], prev_states0[3][i] * states[i+2][4], prev_states0[4][i] * states[i+2][5], prev_states0[5][i] * states[i+2][6], prev_states0[6][i] * states[i+2][7], prev_states0[7][i] * states[i+2][8], prev_states0[8][i] * states[i+2][1], prev_states0[9][i] * states[i+2][2], prev_states0[10][i] * states[i+2][2], prev_states0[11][i] * states[i+2][2], prev_states0[12][i] * states[i+2][4], prev_states0[13][i] * states[i+2][4], prev_states0[14][i] * states[i+2][4]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus1.json b/packages/circom/tests/circuits/plus1.json deleted file mode 100644 index bf9e1e74..00000000 --- a/packages/circom/tests/circuits/plus1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "a+" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus1_regex.circom b/packages/circom/tests/circuits/plus1_regex.circom deleted file mode 100644 index 5538ee6f..00000000 --- a/packages/circom/tests/circuits/plus1_regex.circom +++ /dev/null @@ -1,83 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a+b -template Plus1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[3][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== and[1][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[1][i].out; - states[i+1][2] <== and[2][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 1)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 1)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][1]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus2.json b/packages/circom/tests/circuits/plus2.json deleted file mode 100644 index 0b6a2518..00000000 --- a/packages/circom/tests/circuits/plus2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a" - }, - { - "is_public": true, - "regex_def": "(b|c)+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus2_regex.circom b/packages/circom/tests/circuits/plus2_regex.circom deleted file mode 100644 index 0061f032..00000000 --- a/packages/circom/tests/circuits/plus2_regex.circom +++ /dev/null @@ -1,93 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a(b|c)+ -template Plus2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[3][num_bytes]; - component and[3][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 99; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[1][i].out; - multi_or[0][i].in[1] <== eq[2][i].out; - and[1][i].b <== multi_or[0][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== multi_or[0][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[1][i].out; - multi_or[1][i].in[1] <== and[2][i].out; - states[i+1][2] <== multi_or[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (2, 2)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (2, 2)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus3.json b/packages/circom/tests/circuits/plus3.json deleted file mode 100644 index c1b168b6..00000000 --- a/packages/circom/tests/circuits/plus3.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "a" - }, - { - "is_public": true, - "regex_def": "(bc)+" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus3_regex.circom b/packages/circom/tests/circuits/plus3_regex.circom deleted file mode 100644 index 70a7accd..00000000 --- a/packages/circom/tests/circuits/plus3_regex.circom +++ /dev/null @@ -1,96 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a(bc)+ -template Plus3Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[3][num_bytes]; - component and[4][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][4]; - signal states_tmp[num_bytes+1][4]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 4; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(3); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][3]; - and[2][i].b <== eq[1][i].out; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[1][i].out; - multi_or[0][i].in[1] <== and[2][i].out; - states[i+1][2] <== multi_or[0][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 99; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[2][i].out; - states[i+1][3] <== and[3][i].out; - from_zero_enabled[i] <== MultiNOR(3)([states_tmp[i+1][1], states[i+1][2], states[i+1][3]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][3]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][3] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][3], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(1, 2), (2, 3), (3, 2)}] - signal prev_states0[3][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(1, 2), (2, 3), (3, 2)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - is_substr0[i] <== MultiOR(3)([prev_states0[0][i] * states[i+2][2], prev_states0[1][i] * states[i+2][3], prev_states0[2][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus4.json b/packages/circom/tests/circuits/plus4.json deleted file mode 100644 index e1c9e26b..00000000 --- a/packages/circom/tests/circuits/plus4.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "(12|345)+" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/plus4_regex.circom b/packages/circom/tests/circuits/plus4_regex.circom deleted file mode 100644 index 69779606..00000000 --- a/packages/circom/tests/circuits/plus4_regex.circom +++ /dev/null @@ -1,126 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (12|345)+b -template Plus4Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[6][num_bytes]; - component and[8][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][6]; - signal states_tmp[num_bytes+1][6]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 6; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(5); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 49; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - and[1][i] = AND(); - and[1][i].a <== states[i][3]; - and[1][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== and[1][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 51; - and[2][i] = AND(); - and[2][i].a <== states[i][0]; - and[2][i].b <== eq[1][i].out; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== eq[1][i].out; - states_tmp[i+1][2] <== and[3][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 50; - and[4][i] = AND(); - and[4][i].a <== states[i][1]; - and[4][i].b <== eq[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 53; - and[5][i] = AND(); - and[5][i].a <== states[i][4]; - and[5][i].b <== eq[3][i].out; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[4][i].out; - multi_or[0][i].in[1] <== and[5][i].out; - states[i+1][3] <== multi_or[0][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 52; - and[6][i] = AND(); - and[6][i].a <== states[i][2]; - and[6][i].b <== eq[4][i].out; - states[i+1][4] <== and[6][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 98; - and[7][i] = AND(); - and[7][i].a <== states[i][3]; - and[7][i].b <== eq[5][i].out; - states[i+1][5] <== and[7][i].out; - from_zero_enabled[i] <== MultiNOR(5)([states_tmp[i+1][1], states_tmp[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[2][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][5]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][5] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][5], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (0, 2), (1, 3), (2, 4), (3, 1), (3, 2), (4, 3)}] - signal prev_states0[7][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (0, 2), (1, 3), (2, 4), (3, 1), (3, 2), (4, 3)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[5][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - prev_states0[6][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][4]; - is_substr0[i] <== MultiOR(7)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3], prev_states0[3][i] * states[i+2][4], prev_states0[4][i] * states[i+2][1], prev_states0[5][i] * states[i+2][2], prev_states0[6][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question1.json b/packages/circom/tests/circuits/question1.json deleted file mode 100644 index 2858b1d5..00000000 --- a/packages/circom/tests/circuits/question1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "a?" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question1_regex.circom b/packages/circom/tests/circuits/question1_regex.circom deleted file mode 100644 index 1c822e42..00000000 --- a/packages/circom/tests/circuits/question1_regex.circom +++ /dev/null @@ -1,83 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a?b -template Question1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[3][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][0]; - and[1][i].b <== eq[1][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[1][i].out; - states_tmp[i+1][2] <== and[2][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states_tmp[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - states[i+1][2] <== MultiOR(2)([states_tmp[i+1][2], from_zero_enabled[i] * and[1][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][1]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question2.json b/packages/circom/tests/circuits/question2.json deleted file mode 100644 index a027a05e..00000000 --- a/packages/circom/tests/circuits/question2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "(1x?2)+" - }, - { - "is_public": false, - "regex_def": "b" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question2_regex.circom b/packages/circom/tests/circuits/question2_regex.circom deleted file mode 100644 index 0cbf7b8e..00000000 --- a/packages/circom/tests/circuits/question2_regex.circom +++ /dev/null @@ -1,109 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: (1x?2)+b -template Question2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[4][num_bytes]; - component and[6][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][5]; - signal states_tmp[num_bytes+1][5]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 5; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(4); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 49; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - and[1][i] = AND(); - and[1][i].a <== states[i][2]; - and[1][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== and[1][i].out; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 50; - and[2][i] = AND(); - and[2][i].a <== states[i][1]; - and[2][i].b <== eq[1][i].out; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== eq[1][i].out; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== and[2][i].out; - multi_or[0][i].in[1] <== and[3][i].out; - states[i+1][2] <== multi_or[0][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 120; - and[4][i] = AND(); - and[4][i].a <== states[i][1]; - and[4][i].b <== eq[2][i].out; - states[i+1][3] <== and[4][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 98; - and[5][i] = AND(); - and[5][i].a <== states[i][2]; - and[5][i].b <== eq[3][i].out; - states[i+1][4] <== and[5][i].out; - from_zero_enabled[i] <== MultiNOR(4)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][4]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][4] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][4], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 2), (1, 3), (2, 1), (3, 2)}] - signal prev_states0[5][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 2), (1, 3), (2, 1), (3, 2)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[3][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - prev_states0[4][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][3]; - is_substr0[i] <== MultiOR(5)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3], prev_states0[3][i] * states[i+2][1], prev_states0[4][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question3.json b/packages/circom/tests/circuits/question3.json deleted file mode 100644 index 60c37ec7..00000000 --- a/packages/circom/tests/circuits/question3.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "12" - }, - { - "is_public": true, - "regex_def": "(a|b)?" - }, - { - "is_public": false, - "regex_def": "c" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/question3_regex.circom b/packages/circom/tests/circuits/question3_regex.circom deleted file mode 100644 index ef9528c4..00000000 --- a/packages/circom/tests/circuits/question3_regex.circom +++ /dev/null @@ -1,108 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: 12(a|b)?c -template Question3Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[5][num_bytes]; - component and[5][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][5]; - signal states_tmp[num_bytes+1][5]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 5; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(4); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 49; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 50; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 97; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[2][i].out; - multi_or[0][i].in[1] <== eq[3][i].out; - and[2][i].b <== multi_or[0][i].out; - states[i+1][3] <== and[2][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 99; - and[3][i] = AND(); - and[3][i].a <== states[i][2]; - and[3][i].b <== eq[4][i].out; - and[4][i] = AND(); - and[4][i].a <== states[i][3]; - and[4][i].b <== eq[4][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[3][i].out; - multi_or[1][i].in[1] <== and[4][i].out; - states[i+1][4] <== multi_or[1][i].out; - from_zero_enabled[i] <== MultiNOR(4)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][4]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][4] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][4], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/reveal_check1.json b/packages/circom/tests/circuits/reveal_check1.json deleted file mode 100644 index fb97dab8..00000000 --- a/packages/circom/tests/circuits/reveal_check1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "aba" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/reveal_check1_regex.circom b/packages/circom/tests/circuits/reveal_check1_regex.circom deleted file mode 100644 index d8956283..00000000 --- a/packages/circom/tests/circuits/reveal_check1_regex.circom +++ /dev/null @@ -1,86 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: aba -template RevealCheck1Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[3][num_bytes]; - signal states[num_bytes+1][4]; - signal states_tmp[num_bytes+1][4]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 4; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(3); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== eq[0][i].out; - states[i+1][3] <== and[2][i].out; - from_zero_enabled[i] <== MultiNOR(3)([states_tmp[i+1][1], states[i+1][2], states[i+1][3]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][3]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][3] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][3], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 2), (2, 3)}] - signal prev_states0[3][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 2), (2, 3)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - prev_states0[2][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - is_substr0[i] <== MultiOR(3)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2], prev_states0[2][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/reveal_check2.json b/packages/circom/tests/circuits/reveal_check2.json deleted file mode 100644 index 971730a7..00000000 --- a/packages/circom/tests/circuits/reveal_check2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parts": [ - { - "is_public": true, - "regex_def": "a[ab]" - } - ] -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/reveal_check2_regex.circom b/packages/circom/tests/circuits/reveal_check2_regex.circom deleted file mode 100644 index 15cc8b2e..00000000 --- a/packages/circom/tests/circuits/reveal_check2_regex.circom +++ /dev/null @@ -1,84 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: a[ab] -template RevealCheck2Regex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[2][num_bytes]; - component and[2][num_bytes]; - component multi_or[1][num_bytes]; - signal states[num_bytes+1][3]; - signal states_tmp[num_bytes+1][3]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 3; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(2); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 97; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 98; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[0][i].out; - multi_or[0][i].in[1] <== eq[1][i].out; - and[1][i].b <== multi_or[0][i].out; - states[i+1][2] <== and[1][i].out; - from_zero_enabled[i] <== MultiNOR(2)([states_tmp[i+1][1], states[i+1][2]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][2]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][2] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][2], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(0, 1), (1, 2)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(0, 1), (1, 2)] - prev_states0[0][i] <== from_zero_enabled[i+1] * states[i+1][0]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][1]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][1], prev_states0[1][i] * states[i+2][2]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/simple_regex.circom b/packages/circom/tests/circuits/simple_regex.circom deleted file mode 100644 index b4329ab8..00000000 --- a/packages/circom/tests/circuits/simple_regex.circom +++ /dev/null @@ -1,174 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: 1=(a|b) (2=(b|c)+ )+d -template SimpleRegex(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[8][num_bytes]; - component and[11][num_bytes]; - component multi_or[4][num_bytes]; - signal states[num_bytes+1][10]; - signal states_tmp[num_bytes+1][10]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 10; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(9); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 49; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 61; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 97; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 98; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - multi_or[0][i] = MultiOR(2); - multi_or[0][i].in[0] <== eq[2][i].out; - multi_or[0][i].in[1] <== eq[3][i].out; - and[2][i].b <== multi_or[0][i].out; - states[i+1][3] <== and[2][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 32; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== eq[4][i].out; - states[i+1][4] <== and[3][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 50; - and[4][i] = AND(); - and[4][i].a <== states[i][4]; - and[4][i].b <== eq[5][i].out; - and[5][i] = AND(); - and[5][i].a <== states[i][8]; - and[5][i].b <== eq[5][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[4][i].out; - multi_or[1][i].in[1] <== and[5][i].out; - states[i+1][5] <== multi_or[1][i].out; - and[6][i] = AND(); - and[6][i].a <== states[i][5]; - and[6][i].b <== eq[1][i].out; - states[i+1][6] <== and[6][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 99; - and[7][i] = AND(); - and[7][i].a <== states[i][6]; - multi_or[2][i] = MultiOR(2); - multi_or[2][i].in[0] <== eq[3][i].out; - multi_or[2][i].in[1] <== eq[6][i].out; - and[7][i].b <== multi_or[2][i].out; - and[8][i] = AND(); - and[8][i].a <== states[i][7]; - and[8][i].b <== multi_or[2][i].out; - multi_or[3][i] = MultiOR(2); - multi_or[3][i].in[0] <== and[7][i].out; - multi_or[3][i].in[1] <== and[8][i].out; - states[i+1][7] <== multi_or[3][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][7]; - and[9][i].b <== eq[4][i].out; - states[i+1][8] <== and[9][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 100; - and[10][i] = AND(); - and[10][i].a <== states[i][8]; - and[10][i].b <== eq[7][i].out; - states[i+1][9] <== and[10][i].out; - from_zero_enabled[i] <== MultiNOR(9)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][9]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][9] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][9], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(2, 3)}, {(6, 7), (7, 7)}, {(8, 9)}] - signal prev_states0[1][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(2, 3)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][2]; - is_substr0[i] <== MultiOR(1)([prev_states0[0][i] * states[i+2][3]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } - signal prev_states1[2][msg_bytes]; - signal is_substr1[msg_bytes]; - signal is_reveal1[msg_bytes]; - signal output reveal1[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 1-th substring transitions: [(6, 7), (7, 7)] - prev_states1[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][6]; - prev_states1[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][7]; - is_substr1[i] <== MultiOR(2)([prev_states1[0][i] * states[i+2][7], prev_states1[1][i] * states[i+2][7]]); - is_reveal1[i] <== MultiAND(3)([out, is_substr1[i], is_consecutive[i][2]]); - reveal1[i] <== in[i+1] * is_reveal1[i]; - } - signal prev_states2[1][msg_bytes]; - signal is_substr2[msg_bytes]; - signal is_reveal2[msg_bytes]; - signal output reveal2[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 2-th substring transitions: [(8, 9)] - prev_states2[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][8]; - is_substr2[i] <== MultiOR(1)([prev_states2[0][i] * states[i+2][9]]); - is_reveal2[i] <== MultiAND(3)([out, is_substr2[i], is_consecutive[i][2]]); - reveal2[i] <== in[i+1] * is_reveal2[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/simple_regex_decomposed.circom b/packages/circom/tests/circuits/simple_regex_decomposed.circom deleted file mode 100644 index 35ad0b63..00000000 --- a/packages/circom/tests/circuits/simple_regex_decomposed.circom +++ /dev/null @@ -1,297 +0,0 @@ -pragma circom 2.1.5; - -include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom"; - -// regex: email was meant for @[a-zA-Z0-9_]+\. -template SimpleRegexDecomposed(msg_bytes) { - signal input msg[msg_bytes]; - signal output out; - - var num_bytes = msg_bytes+1; - signal in[num_bytes]; - signal in_range_checks[msg_bytes]; - in[0]<==255; - for (var i = 0; i < msg_bytes; i++) { - in_range_checks[i] <== LessThan(8)([msg[i], 255]); - in_range_checks[i] === 1; - in[i+1] <== msg[i]; - } - - component eq[26][num_bytes]; - component lt[4][num_bytes]; - component and[26][num_bytes]; - component multi_or[2][num_bytes]; - signal states[num_bytes+1][24]; - signal states_tmp[num_bytes+1][24]; - signal from_zero_enabled[num_bytes+1]; - from_zero_enabled[num_bytes] <== 0; - component state_changed[num_bytes]; - - for (var i = 1; i < 24; i++) { - states[0][i] <== 0; - } - - for (var i = 0; i < num_bytes; i++) { - state_changed[i] = MultiOR(23); - states[i][0] <== 1; - eq[0][i] = IsEqual(); - eq[0][i].in[0] <== in[i]; - eq[0][i].in[1] <== 101; - and[0][i] = AND(); - and[0][i].a <== states[i][0]; - and[0][i].b <== eq[0][i].out; - states_tmp[i+1][1] <== 0; - eq[1][i] = IsEqual(); - eq[1][i].in[0] <== in[i]; - eq[1][i].in[1] <== 109; - and[1][i] = AND(); - and[1][i].a <== states[i][1]; - and[1][i].b <== eq[1][i].out; - states[i+1][2] <== and[1][i].out; - eq[2][i] = IsEqual(); - eq[2][i].in[0] <== in[i]; - eq[2][i].in[1] <== 97; - and[2][i] = AND(); - and[2][i].a <== states[i][2]; - and[2][i].b <== eq[2][i].out; - states[i+1][3] <== and[2][i].out; - eq[3][i] = IsEqual(); - eq[3][i].in[0] <== in[i]; - eq[3][i].in[1] <== 105; - and[3][i] = AND(); - and[3][i].a <== states[i][3]; - and[3][i].b <== eq[3][i].out; - states[i+1][4] <== and[3][i].out; - eq[4][i] = IsEqual(); - eq[4][i].in[0] <== in[i]; - eq[4][i].in[1] <== 108; - and[4][i] = AND(); - and[4][i].a <== states[i][4]; - and[4][i].b <== eq[4][i].out; - states[i+1][5] <== and[4][i].out; - eq[5][i] = IsEqual(); - eq[5][i].in[0] <== in[i]; - eq[5][i].in[1] <== 32; - and[5][i] = AND(); - and[5][i].a <== states[i][5]; - and[5][i].b <== eq[5][i].out; - states[i+1][6] <== and[5][i].out; - eq[6][i] = IsEqual(); - eq[6][i].in[0] <== in[i]; - eq[6][i].in[1] <== 119; - and[6][i] = AND(); - and[6][i].a <== states[i][6]; - and[6][i].b <== eq[6][i].out; - states[i+1][7] <== and[6][i].out; - and[7][i] = AND(); - and[7][i].a <== states[i][7]; - and[7][i].b <== eq[2][i].out; - states[i+1][8] <== and[7][i].out; - eq[7][i] = IsEqual(); - eq[7][i].in[0] <== in[i]; - eq[7][i].in[1] <== 115; - and[8][i] = AND(); - and[8][i].a <== states[i][8]; - and[8][i].b <== eq[7][i].out; - states[i+1][9] <== and[8][i].out; - and[9][i] = AND(); - and[9][i].a <== states[i][9]; - and[9][i].b <== eq[5][i].out; - states[i+1][10] <== and[9][i].out; - and[10][i] = AND(); - and[10][i].a <== states[i][10]; - and[10][i].b <== eq[1][i].out; - states[i+1][11] <== and[10][i].out; - and[11][i] = AND(); - and[11][i].a <== states[i][11]; - and[11][i].b <== eq[0][i].out; - states[i+1][12] <== and[11][i].out; - and[12][i] = AND(); - and[12][i].a <== states[i][12]; - and[12][i].b <== eq[2][i].out; - states[i+1][13] <== and[12][i].out; - eq[8][i] = IsEqual(); - eq[8][i].in[0] <== in[i]; - eq[8][i].in[1] <== 110; - and[13][i] = AND(); - and[13][i].a <== states[i][13]; - and[13][i].b <== eq[8][i].out; - states[i+1][14] <== and[13][i].out; - eq[9][i] = IsEqual(); - eq[9][i].in[0] <== in[i]; - eq[9][i].in[1] <== 116; - and[14][i] = AND(); - and[14][i].a <== states[i][14]; - and[14][i].b <== eq[9][i].out; - states[i+1][15] <== and[14][i].out; - and[15][i] = AND(); - and[15][i].a <== states[i][15]; - and[15][i].b <== eq[5][i].out; - states[i+1][16] <== and[15][i].out; - eq[10][i] = IsEqual(); - eq[10][i].in[0] <== in[i]; - eq[10][i].in[1] <== 102; - and[16][i] = AND(); - and[16][i].a <== states[i][16]; - and[16][i].b <== eq[10][i].out; - states[i+1][17] <== and[16][i].out; - eq[11][i] = IsEqual(); - eq[11][i].in[0] <== in[i]; - eq[11][i].in[1] <== 111; - and[17][i] = AND(); - and[17][i].a <== states[i][17]; - and[17][i].b <== eq[11][i].out; - states[i+1][18] <== and[17][i].out; - eq[12][i] = IsEqual(); - eq[12][i].in[0] <== in[i]; - eq[12][i].in[1] <== 114; - and[18][i] = AND(); - and[18][i].a <== states[i][18]; - and[18][i].b <== eq[12][i].out; - states[i+1][19] <== and[18][i].out; - and[19][i] = AND(); - and[19][i].a <== states[i][19]; - and[19][i].b <== eq[5][i].out; - states[i+1][20] <== and[19][i].out; - eq[13][i] = IsEqual(); - eq[13][i].in[0] <== in[i]; - eq[13][i].in[1] <== 64; - and[20][i] = AND(); - and[20][i].a <== states[i][20]; - and[20][i].b <== eq[13][i].out; - states[i+1][21] <== and[20][i].out; - lt[0][i] = LessEqThan(8); - lt[0][i].in[0] <== 65; - lt[0][i].in[1] <== in[i]; - lt[1][i] = LessEqThan(8); - lt[1][i].in[0] <== in[i]; - lt[1][i].in[1] <== 90; - and[21][i] = AND(); - and[21][i].a <== lt[0][i].out; - and[21][i].b <== lt[1][i].out; - lt[2][i] = LessEqThan(8); - lt[2][i].in[0] <== 97; - lt[2][i].in[1] <== in[i]; - lt[3][i] = LessEqThan(8); - lt[3][i].in[0] <== in[i]; - lt[3][i].in[1] <== 122; - and[22][i] = AND(); - and[22][i].a <== lt[2][i].out; - and[22][i].b <== lt[3][i].out; - eq[14][i] = IsEqual(); - eq[14][i].in[0] <== in[i]; - eq[14][i].in[1] <== 48; - eq[15][i] = IsEqual(); - eq[15][i].in[0] <== in[i]; - eq[15][i].in[1] <== 49; - eq[16][i] = IsEqual(); - eq[16][i].in[0] <== in[i]; - eq[16][i].in[1] <== 50; - eq[17][i] = IsEqual(); - eq[17][i].in[0] <== in[i]; - eq[17][i].in[1] <== 51; - eq[18][i] = IsEqual(); - eq[18][i].in[0] <== in[i]; - eq[18][i].in[1] <== 52; - eq[19][i] = IsEqual(); - eq[19][i].in[0] <== in[i]; - eq[19][i].in[1] <== 53; - eq[20][i] = IsEqual(); - eq[20][i].in[0] <== in[i]; - eq[20][i].in[1] <== 54; - eq[21][i] = IsEqual(); - eq[21][i].in[0] <== in[i]; - eq[21][i].in[1] <== 55; - eq[22][i] = IsEqual(); - eq[22][i].in[0] <== in[i]; - eq[22][i].in[1] <== 56; - eq[23][i] = IsEqual(); - eq[23][i].in[0] <== in[i]; - eq[23][i].in[1] <== 57; - eq[24][i] = IsEqual(); - eq[24][i].in[0] <== in[i]; - eq[24][i].in[1] <== 95; - and[23][i] = AND(); - and[23][i].a <== states[i][21]; - multi_or[0][i] = MultiOR(13); - multi_or[0][i].in[0] <== and[21][i].out; - multi_or[0][i].in[1] <== and[22][i].out; - multi_or[0][i].in[2] <== eq[14][i].out; - multi_or[0][i].in[3] <== eq[15][i].out; - multi_or[0][i].in[4] <== eq[16][i].out; - multi_or[0][i].in[5] <== eq[17][i].out; - multi_or[0][i].in[6] <== eq[18][i].out; - multi_or[0][i].in[7] <== eq[19][i].out; - multi_or[0][i].in[8] <== eq[20][i].out; - multi_or[0][i].in[9] <== eq[21][i].out; - multi_or[0][i].in[10] <== eq[22][i].out; - multi_or[0][i].in[11] <== eq[23][i].out; - multi_or[0][i].in[12] <== eq[24][i].out; - and[23][i].b <== multi_or[0][i].out; - and[24][i] = AND(); - and[24][i].a <== states[i][22]; - and[24][i].b <== multi_or[0][i].out; - multi_or[1][i] = MultiOR(2); - multi_or[1][i].in[0] <== and[23][i].out; - multi_or[1][i].in[1] <== and[24][i].out; - states[i+1][22] <== multi_or[1][i].out; - eq[25][i] = IsEqual(); - eq[25][i].in[0] <== in[i]; - eq[25][i].in[1] <== 46; - and[25][i] = AND(); - and[25][i].a <== states[i][22]; - and[25][i].b <== eq[25][i].out; - states[i+1][23] <== and[25][i].out; - from_zero_enabled[i] <== MultiNOR(23)([states_tmp[i+1][1], states[i+1][2], states[i+1][3], states[i+1][4], states[i+1][5], states[i+1][6], states[i+1][7], states[i+1][8], states[i+1][9], states[i+1][10], states[i+1][11], states[i+1][12], states[i+1][13], states[i+1][14], states[i+1][15], states[i+1][16], states[i+1][17], states[i+1][18], states[i+1][19], states[i+1][20], states[i+1][21], states[i+1][22], states[i+1][23]]); - states[i+1][1] <== MultiOR(2)([states_tmp[i+1][1], from_zero_enabled[i] * and[0][i].out]); - state_changed[i].in[0] <== states[i+1][1]; - state_changed[i].in[1] <== states[i+1][2]; - state_changed[i].in[2] <== states[i+1][3]; - state_changed[i].in[3] <== states[i+1][4]; - state_changed[i].in[4] <== states[i+1][5]; - state_changed[i].in[5] <== states[i+1][6]; - state_changed[i].in[6] <== states[i+1][7]; - state_changed[i].in[7] <== states[i+1][8]; - state_changed[i].in[8] <== states[i+1][9]; - state_changed[i].in[9] <== states[i+1][10]; - state_changed[i].in[10] <== states[i+1][11]; - state_changed[i].in[11] <== states[i+1][12]; - state_changed[i].in[12] <== states[i+1][13]; - state_changed[i].in[13] <== states[i+1][14]; - state_changed[i].in[14] <== states[i+1][15]; - state_changed[i].in[15] <== states[i+1][16]; - state_changed[i].in[16] <== states[i+1][17]; - state_changed[i].in[17] <== states[i+1][18]; - state_changed[i].in[18] <== states[i+1][19]; - state_changed[i].in[19] <== states[i+1][20]; - state_changed[i].in[20] <== states[i+1][21]; - state_changed[i].in[21] <== states[i+1][22]; - state_changed[i].in[22] <== states[i+1][23]; - } - - component is_accepted = MultiOR(num_bytes+1); - for (var i = 0; i <= num_bytes; i++) { - is_accepted.in[i] <== states[i][23]; - } - out <== is_accepted.out; - signal is_consecutive[msg_bytes+1][3]; - is_consecutive[msg_bytes][2] <== 0; - for (var i = 0; i < msg_bytes; i++) { - is_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][23] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2]; - is_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0]; - is_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][23], is_consecutive[msg_bytes-1-i][1]]); - } - // substrings calculated: [{(21, 22), (22, 22)}] - signal prev_states0[2][msg_bytes]; - signal is_substr0[msg_bytes]; - signal is_reveal0[msg_bytes]; - signal output reveal0[msg_bytes]; - for (var i = 0; i < msg_bytes; i++) { - // the 0-th substring transitions: [(21, 22), (22, 22)] - prev_states0[0][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][21]; - prev_states0[1][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][22]; - is_substr0[i] <== MultiOR(2)([prev_states0[0][i] * states[i+2][22], prev_states0[1][i] * states[i+2][22]]); - is_reveal0[i] <== MultiAND(3)([out, is_substr0[i], is_consecutive[i][2]]); - reveal0[i] <== in[i+1] * is_reveal0[i]; - } -} \ No newline at end of file diff --git a/packages/circom/tests/circuits/simple_regex_decomposed.json b/packages/circom/tests/circuits/simple_regex_decomposed.json deleted file mode 100644 index 25def2ed..00000000 --- a/packages/circom/tests/circuits/simple_regex_decomposed.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parts": [ - { - "is_public": false, - "regex_def": "email was meant for @" - }, - { - "is_public": true, - "regex_def": "[a-zA-Z0-9_]+" - }, - { - "is_public": false, - "regex_def": "\\." - } - ] -} diff --git a/packages/circom/tests/circuits/simple_regex_substrs.json b/packages/circom/tests/circuits/simple_regex_substrs.json deleted file mode 100644 index 980669b9..00000000 --- a/packages/circom/tests/circuits/simple_regex_substrs.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "transitions": [ - [[2, 3]], - [ - [6, 7], - [7, 7] - ], - [[8, 9]] - ] -} diff --git a/packages/circom/tests/circuits/test_asterisk1_regex.circom b/packages/circom/tests/circuits/test_asterisk1_regex.circom deleted file mode 100644 index 0a64229f..00000000 --- a/packages/circom/tests/circuits/test_asterisk1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./asterisk1_regex.circom"; - -component main = Asterisk1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_asterisk2_regex.circom b/packages/circom/tests/circuits/test_asterisk2_regex.circom deleted file mode 100644 index 3cea3c87..00000000 --- a/packages/circom/tests/circuits/test_asterisk2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./asterisk2_regex.circom"; - -component main = Asterisk2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_asterisk3_regex.circom b/packages/circom/tests/circuits/test_asterisk3_regex.circom deleted file mode 100644 index 04a8085f..00000000 --- a/packages/circom/tests/circuits/test_asterisk3_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./asterisk3_regex.circom"; - -component main = Asterisk3Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_body_hash_regex.circom b/packages/circom/tests/circuits/test_body_hash_regex.circom deleted file mode 100644 index 3cd41703..00000000 --- a/packages/circom/tests/circuits/test_body_hash_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/body_hash_regex.circom"; - -component main = BodyHashRegex(1024); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_caret1_regex.circom b/packages/circom/tests/circuits/test_caret1_regex.circom deleted file mode 100644 index c9dda7d1..00000000 --- a/packages/circom/tests/circuits/test_caret1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./caret1_regex.circom"; - -component main = Caret1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_caret2_regex.circom b/packages/circom/tests/circuits/test_caret2_regex.circom deleted file mode 100644 index c3e5eac7..00000000 --- a/packages/circom/tests/circuits/test_caret2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./caret2_regex.circom"; - -component main = Caret2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_caret3_regex.circom b/packages/circom/tests/circuits/test_caret3_regex.circom deleted file mode 100644 index 2bfb8ab1..00000000 --- a/packages/circom/tests/circuits/test_caret3_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./caret3_regex.circom"; - -component main = Caret3Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_caret4_regex.circom b/packages/circom/tests/circuits/test_caret4_regex.circom deleted file mode 100644 index 19e68c74..00000000 --- a/packages/circom/tests/circuits/test_caret4_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./caret4_regex.circom"; - -component main = Caret4Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_caret5_regex.circom b/packages/circom/tests/circuits/test_caret5_regex.circom deleted file mode 100644 index 72f3e42c..00000000 --- a/packages/circom/tests/circuits/test_caret5_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./caret5_regex.circom"; - -component main = Caret5Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_dollar1_regex.circom b/packages/circom/tests/circuits/test_dollar1_regex.circom deleted file mode 100644 index 985cbf08..00000000 --- a/packages/circom/tests/circuits/test_dollar1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./dollar1_regex.circom"; - -component main = Dollar1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_dollar2_regex.circom b/packages/circom/tests/circuits/test_dollar2_regex.circom deleted file mode 100644 index d343837e..00000000 --- a/packages/circom/tests/circuits/test_dollar2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./dollar2_regex.circom"; - -component main = Dollar2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_dot1_regex.circom b/packages/circom/tests/circuits/test_dot1_regex.circom deleted file mode 100644 index ab0b2b37..00000000 --- a/packages/circom/tests/circuits/test_dot1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./dot1_regex.circom"; - -component main = Dot1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_dot2_regex.circom b/packages/circom/tests/circuits/test_dot2_regex.circom deleted file mode 100644 index 80e98691..00000000 --- a/packages/circom/tests/circuits/test_dot2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./dot2_regex.circom"; - -component main = Dot2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_email_addr_regex.circom b/packages/circom/tests/circuits/test_email_addr_regex.circom deleted file mode 100644 index d429dd0c..00000000 --- a/packages/circom/tests/circuits/test_email_addr_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/email_addr_regex.circom"; - -component main = EmailAddrRegex(256); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_email_domain_regex.circom b/packages/circom/tests/circuits/test_email_domain_regex.circom deleted file mode 100644 index 6232772f..00000000 --- a/packages/circom/tests/circuits/test_email_domain_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/email_domain_regex.circom"; - -component main = EmailDomainRegex(256); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_from_addr_regex.circom b/packages/circom/tests/circuits/test_from_addr_regex.circom deleted file mode 100644 index ea9f5f0f..00000000 --- a/packages/circom/tests/circuits/test_from_addr_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/from_addr_regex.circom"; - -component main = FromAddrRegex(1024); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_international_chars_decomposed.circom b/packages/circom/tests/circuits/test_international_chars_decomposed.circom deleted file mode 100644 index f20725ca..00000000 --- a/packages/circom/tests/circuits/test_international_chars_decomposed.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./international_chars_decomposed.circom"; -// Latin-Extension=[¡-ƿ]+ Greek=[Ͱ-Ͽ]+ Cyrillic=[Ѐ-ӿ]+ Arabic=[؀-ۿ]+ Devanagari=[ऀ-ॿ]+ Hiragana&Katakana=[ぁ-ヿ]+ -component main = InternationalCharsDecomposed(128); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_invitation_code_with_prefix_regex.circom b/packages/circom/tests/circuits/test_invitation_code_with_prefix_regex.circom deleted file mode 100644 index 664f80df..00000000 --- a/packages/circom/tests/circuits/test_invitation_code_with_prefix_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./invitation_code_with_prefix_regex.circom"; - -component main = InvitationCodeWithPrefixRegex(256); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_message_id_regex.circom b/packages/circom/tests/circuits/test_message_id_regex.circom deleted file mode 100644 index e7215f7a..00000000 --- a/packages/circom/tests/circuits/test_message_id_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/message_id_regex.circom"; - -component main = MessageIdRegex(256); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_negate1_regex.circom b/packages/circom/tests/circuits/test_negate1_regex.circom deleted file mode 100644 index 22529765..00000000 --- a/packages/circom/tests/circuits/test_negate1_regex.circom +++ /dev/null @@ -1,4 +0,0 @@ -pragma circom 2.1.5; - -include "./negate1_regex.circom"; -component main = Negate1Regex(64); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_negate2_regex.circom b/packages/circom/tests/circuits/test_negate2_regex.circom deleted file mode 100644 index e46f725b..00000000 --- a/packages/circom/tests/circuits/test_negate2_regex.circom +++ /dev/null @@ -1,4 +0,0 @@ -pragma circom 2.1.5; - -include "./negate2_regex.circom"; -component main = Negate2Regex(64); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_plus1_regex.circom b/packages/circom/tests/circuits/test_plus1_regex.circom deleted file mode 100644 index d1693d4d..00000000 --- a/packages/circom/tests/circuits/test_plus1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./plus1_regex.circom"; - -component main = Plus1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_plus2_regex.circom b/packages/circom/tests/circuits/test_plus2_regex.circom deleted file mode 100644 index 69131346..00000000 --- a/packages/circom/tests/circuits/test_plus2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./plus2_regex.circom"; - -component main = Plus2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_plus3_regex.circom b/packages/circom/tests/circuits/test_plus3_regex.circom deleted file mode 100644 index 1384c8dc..00000000 --- a/packages/circom/tests/circuits/test_plus3_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./plus3_regex.circom"; - -component main = Plus3Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_plus4_regex.circom b/packages/circom/tests/circuits/test_plus4_regex.circom deleted file mode 100644 index af44e914..00000000 --- a/packages/circom/tests/circuits/test_plus4_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./plus4_regex.circom"; - -component main = Plus4Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_question1_regex.circom b/packages/circom/tests/circuits/test_question1_regex.circom deleted file mode 100644 index 4947d97c..00000000 --- a/packages/circom/tests/circuits/test_question1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./question1_regex.circom"; - -component main = Question1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_question2_regex.circom b/packages/circom/tests/circuits/test_question2_regex.circom deleted file mode 100644 index f6a0a09c..00000000 --- a/packages/circom/tests/circuits/test_question2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./question2_regex.circom"; - -component main = Question2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_question3_regex.circom b/packages/circom/tests/circuits/test_question3_regex.circom deleted file mode 100644 index 97e65323..00000000 --- a/packages/circom/tests/circuits/test_question3_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./question3_regex.circom"; - -component main = Question3Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_reveal_check1_regex.circom b/packages/circom/tests/circuits/test_reveal_check1_regex.circom deleted file mode 100644 index ee249390..00000000 --- a/packages/circom/tests/circuits/test_reveal_check1_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./reveal_check1_regex.circom"; - -component main = RevealCheck1Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_reveal_check2_regex.circom b/packages/circom/tests/circuits/test_reveal_check2_regex.circom deleted file mode 100644 index eacba457..00000000 --- a/packages/circom/tests/circuits/test_reveal_check2_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./reveal_check2_regex.circom"; - -component main = RevealCheck2Regex(8); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_simple_regex.circom b/packages/circom/tests/circuits/test_simple_regex.circom deleted file mode 100644 index e5563e1d..00000000 --- a/packages/circom/tests/circuits/test_simple_regex.circom +++ /dev/null @@ -1,4 +0,0 @@ -pragma circom 2.1.5; -include "./simple_regex.circom"; -// 1=(a|b) (2=(b|c)+ )+d -component main = SimpleRegex(64); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_simple_regex_decomposed.circom b/packages/circom/tests/circuits/test_simple_regex_decomposed.circom deleted file mode 100644 index 6f1f3b36..00000000 --- a/packages/circom/tests/circuits/test_simple_regex_decomposed.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "./simple_regex_decomposed.circom"; -// email was meant for @[a-zA-Z0-9_]+\. -component main = SimpleRegexDecomposed(64); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_subject_all_regex.circom b/packages/circom/tests/circuits/test_subject_all_regex.circom deleted file mode 100644 index e544739c..00000000 --- a/packages/circom/tests/circuits/test_subject_all_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/subject_all_regex.circom"; - -component main = SubjectAllRegex(256); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_timestamp_regex.circom b/packages/circom/tests/circuits/test_timestamp_regex.circom deleted file mode 100644 index 9b063ff0..00000000 --- a/packages/circom/tests/circuits/test_timestamp_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/timestamp_regex.circom"; - -component main = TimestampRegex(1024); \ No newline at end of file diff --git a/packages/circom/tests/circuits/test_to_addr_regex.circom b/packages/circom/tests/circuits/test_to_addr_regex.circom deleted file mode 100644 index 6f6343f5..00000000 --- a/packages/circom/tests/circuits/test_to_addr_regex.circom +++ /dev/null @@ -1,5 +0,0 @@ -pragma circom 2.1.5; - -include "../../circuits/common/to_addr_regex.circom"; - -component main = ToAddrRegex(1024); \ No newline at end of file diff --git a/packages/circom/tests/dollar.test.js b/packages/circom/tests/dollar.test.js deleted file mode 100644 index 76d008b3..00000000 --- a/packages/circom/tests/dollar.test.js +++ /dev/null @@ -1,194 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Caret Regex', () => { - let circuit1; - let circuit2; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/dollar1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/dollar1.json'), - 'utf8' - ), - 'Dollar1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_dollar1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/dollar2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/dollar2.json'), - 'utf8' - ), - 'Dollar2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_dollar2_regex.circom'), - option - ); - }); - - it('dollar1 valid case 1', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/dollar1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('dollar1 invalid case 1', async () => { - const inputStr = `abg`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('dollar1 invalid case 2', async () => { - const inputStr = `18abcg`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('dollar2 valid case 1', async () => { - const inputStr = `xab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/dollar2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('dollar2 valid case 2', async () => { - const inputStr = `ak\nxab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/dollar2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('dollar2 invalid case 1', async () => { - const inputStr = `abg`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('dollar2 invalid case 2', async () => { - const inputStr = `\nabg`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('dollar2 invalid case 2', async () => { - const inputStr = `\nabg`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/dot.test.js b/packages/circom/tests/dot.test.js deleted file mode 100644 index f5b7914f..00000000 --- a/packages/circom/tests/dot.test.js +++ /dev/null @@ -1,170 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Dot Regex', () => { - let circuit1; - let circuit2; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/dot1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/dot1.json'), - 'utf8' - ), - 'Dot1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_dot1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/dot2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/dot2.json'), - 'utf8' - ), - 'Dot2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_dot2_regex.circom'), - option - ); - }); - - it('dot1 valid case 1', async () => { - const inputStr = `a`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/dot1.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - // it("dot1 valid case 2", async () => { - // const inputStr = `aaaa`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit1.calculateWitness(circuitInputs); - // await circuit1.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/dot1.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - it('dot2 valid case 1', async () => { - const inputStr = `a6b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/dot2.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - // it("dot2 valid case 2", async () => { - // const inputStr = `aa6b`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit2.calculateWitness(circuitInputs); - // await circuit2.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/dot2.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - it('dot2 invalid case 1', async () => { - const inputStr = `819nc8b8`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('dot2 invalid case 2', async () => { - const inputStr = `78aa6cc8`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/email_addr.test.js b/packages/circom/tests/email_addr.test.js deleted file mode 100644 index a1189301..00000000 --- a/packages/circom/tests/email_addr.test.js +++ /dev/null @@ -1,114 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Email Address Regex", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/email_addr.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "EmailAddrRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/email_addr_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_email_addr_regex.circom"), - option - ); - }); - - it("only an email address", async () => { - const emailAddr = "suegamisora@gmail.com"; - const paddedStr = apis.padString(emailAddr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailAddrIdxes(emailAddr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("with a prefix", async () => { - const prefix = "subject:"; - const emailAddr = "suegamisora@gmail.com"; - const string = prefix + emailAddr; - const paddedStr = apis.padString(string, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailAddrIdxes(string)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("@ inside the name part", async () => { - const prefix = "subject:"; - const emailAddr = "suegamisora@gmail.com@dummy.com"; - const string = prefix + emailAddr; - const paddedStr = apis.padString(string, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailAddrIdxes(string)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("starts from @", async () => { - const prefix = "subject:"; - const emailAddr = "@gmail.com@dummy.com"; - const string = prefix + emailAddr; - const paddedStr = apis.padString(string, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailAddrIdxes(string)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); -}); diff --git a/packages/circom/tests/email_domain.test.js b/packages/circom/tests/email_domain.test.js deleted file mode 100644 index 0c336126..00000000 --- a/packages/circom/tests/email_domain.test.js +++ /dev/null @@ -1,91 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Email Domain Regex", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/email_domain.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "EmailDomainRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/email_domain_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_email_domain_regex.circom"), - option - ); - }); - - it("test a regex of an email domain", async () => { - const emailAddr = "suegamisora@gmail.com"; - const paddedStr = apis.padString(emailAddr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailDomainIdxes(emailAddr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("@ inside the name part", async () => { - const emailAddr = "suegamisora@gmail.com@dummy.com"; - const paddedStr = apis.padString(emailAddr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailDomainIdxes(emailAddr)[0]; - expect("gmail.com@dummy.com").toEqual(emailAddr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("starts from @", async () => { - const emailAddr = "@gmail.com@dummy.com"; - const paddedStr = apis.padString(emailAddr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractEmailDomainIdxes(emailAddr)[0]; - expect("dummy.com").toEqual(emailAddr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); -}); diff --git a/packages/circom/tests/from_addr.test.js b/packages/circom/tests/from_addr.test.js deleted file mode 100644 index 36c81179..00000000 --- a/packages/circom/tests/from_addr.test.js +++ /dev/null @@ -1,371 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe("From Addr Regex", () => { - let circuit; - beforeAll(async () => { - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/from_all.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "FromAllRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/from_all_regex.circom"), - circom - ); - } - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/reversed_bracket.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "ReversedBracketRegex" - ); - writeFileSync( - path.join( - __dirname, - "../circuits/common/reversed_bracket_regex.circom" - ), - circom - ); - } - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/email_addr.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "EmailAddrRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/email_addr_regex.circom"), - circom - ); - } - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_from_addr_regex.circom"), - option - ); - }); - - it("from field from beginning case 1", async () => { - const fromStr = "from:suegamisora@gmail.com\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field from beginning case 2", async () => { - const fromStr = "from:Sora Suegami \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field from beginning case 3 (email address as a name)", async () => { - const fromStr = "from:dummy@example.com\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field from beginning case 4 (non-English string is used as a name)", async () => { - const fromStr = 'from: "末神奏宙" \r\n'; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field after new line case 1", async () => { - const fromStr = "dummy\r\nfrom:suegamisora@gmail.com\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field after new line case 2", async () => { - const fromStr = "dummy\r\nfrom:Sora Suegami \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field after new line case 3 (email address as a name)", async () => { - const fromStr = - "dummy\r\nfrom:dummy@example.com\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field after new line case 4 (non-English string is used as a name)", async () => { - const fromStr = 'dummy\r\nfrom: "末神奏宙" \r\n'; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field in the invalid field", async () => { - const fromStr = "\r\nto:from:Sora Suegami \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - async function failFn() { - await circuit.calculateWitness(circuitInputs); - } - await expect(failFn).rejects.toThrow(); - }); - - it('invalid from field with 255', async () => { - const fromStr = `from:Sora Suegami \r\n`; - let paddedStr = apis.padString(fromStr, 1022); - paddedStr.unshift(49); - paddedStr.unshift(255); - const circuitInputs = { - msg: paddedStr - }; - async function failFn() { - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - } - await expect(failFn).rejects.toThrow(); - }); - - it("from field containing @ in the name part", async () => { - const fromStr = "from:Sora Suegami \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect("suegamisora@gmail.com@dummy.com").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field starting from @", async () => { - const fromStr = "from:Sora Suegami <@gmail.com@dummy.com>\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect("@gmail.com@dummy.com").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field with double <> 1", async () => { - const fromStr = "from:\"Some name \" \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect("attacker@outlook.com").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - - it("from field with double <> 2", async () => { - const fromStr = "from:\"Some name \" < attacker@outlook.com>\r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect(" attacker@outlook.com").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - - it("from field with double <> 3", async () => { - const fromStr = "from:\"Some name \" \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log((witness[1])); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect("attacker@outlook.com ").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - // if (witness[2 + idx] !== 0n) { - // console.log('idx:', idx, 'witness:', witness[2 + idx]); - // } - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("from field with triple <>", async () => { - const fromStr = "from:\"Some name >\" \r\n"; - const paddedStr = apis.padString(fromStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractFromAddrIdxes(fromStr)[0]; - expect("attacker@outlook.com").toEqual(fromStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); -}); diff --git a/packages/circom/tests/international_chars.test.js b/packages/circom/tests/international_chars.test.js deleted file mode 100644 index d6972ca6..00000000 --- a/packages/circom/tests/international_chars.test.js +++ /dev/null @@ -1,66 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(300000); -describe("Simple Regex Decomposed", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "./circuits/international_chars_decomposed.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "InternationalCharsDecomposed" - ); - writeFileSync( - path.join(__dirname, "./circuits/international_chars_decomposed.circom"), - circom - ); - circuit = await wasm_tester( - path.join( - __dirname, - "./circuits/test_international_chars_decomposed.circom" - ), - option - ); - }); - - it("case 1", async () => { - const input = - "Latin-Extension=Ʃƣƙ Greek=ϕω Cyrillic=иЩ Arabic=أبت Devanagari=आदित्य Hiragana&Katakana=なツ"; - const paddedStr = apis.padString(input, 128); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [ - [16, 17, 18, 19, 20, 21], - [29, 30, 31, 32], - [43, 44, 45, 46], - [55, 56, 57, 58, 59, 60, 61, 62], - [75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92], - [112, 113, 114, 115, 116, 117], - ]; - for (let substr_idx = 0; substr_idx < 6; ++substr_idx) { - for (let idx = 0; idx < 128; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 128 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 128 * substr_idx + idx]); - } - } - } - }); -}); diff --git a/packages/circom/tests/invitation_code.test.js b/packages/circom/tests/invitation_code.test.js deleted file mode 100644 index ec4fc8fd..00000000 --- a/packages/circom/tests/invitation_code.test.js +++ /dev/null @@ -1,61 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(300000); -describe("Invitation Code Decomposed (taken from ether-email-auth)", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "./circuits/invitation_code_with_prefix.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "InvitationCodeWithPrefixRegex" - ); - writeFileSync( - path.join(__dirname, "./circuits/invitation_code_with_prefix_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join( - __dirname, - "./circuits/test_invitation_code_with_prefix_regex.circom" - ), - option - ); - }); - - it("case 1", async () => { - const input = - "Re: Accept guardian request for 0x04884491560f38342C56E26BDD0fEAbb68E2d2FC Code 01eb9b204cc24c3baee11accc37d253a9c53e92b1a2cc07763475c135d575b76"; - const paddedStr = apis.padString(input, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [ - [74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143], - ]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 256; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 256 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 256 * substr_idx + idx]); - } - } - } - }); -}); diff --git a/packages/circom/tests/message_id_regex.test.js b/packages/circom/tests/message_id_regex.test.js deleted file mode 100644 index 3c992a6e..00000000 --- a/packages/circom/tests/message_id_regex.test.js +++ /dev/null @@ -1,85 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Message Id Regex", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/message_id.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "MessageIdRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/message_id_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_message_id_regex.circom"), - option - ); - }); - - it("message id from beginning", async () => { - const messageIdStr = `message-id:\r\n`; - const paddedStr = apis.padString(messageIdStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractMessageIdIdxes(messageIdStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("message id after new line", async () => { - const messageIdStr = - "dummy\r\nmessage-id:\r\n"; - const paddedStr = apis.padString(messageIdStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractMessageIdIdxes(messageIdStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("invalid message id", async () => { - const messageIdStr = `to:message-id:\r\n`; - const paddedStr = apis.padString(messageIdStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 256; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/negate_regex.test.js b/packages/circom/tests/negate_regex.test.js deleted file mode 100644 index ccef68f5..00000000 --- a/packages/circom/tests/negate_regex.test.js +++ /dev/null @@ -1,170 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Negate Regex", () => { - let circuit1; - let circuit2; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, "./circuits/negate1_regex.circom"), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, "./circuits/negate1.json"), - "utf8" - ), - "Negate1Regex" - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, "./circuits/test_negate1_regex.circom"), - option - ); - writeFileSync( - path.join(__dirname, "./circuits/negate2_regex.circom"), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, "./circuits/negate2.json"), - "utf8" - ), - "Negate2Regex" - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, "./circuits/test_negate2_regex.circom"), - option - ); - }); - - it("case 1 with regex 1", async () => { - const input = "a: ABCDEFG XYZ."; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 2 with regex 1", async () => { - const input = "a: CRIPTOGRAFíA."; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 3 with regex 1", async () => { - const input = "a: あいう."; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2, 3, 4, 5, 6, 7, 8, 9, 10, 11]]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 4 with regex 1", async () => { - const input = "a: التشفير."; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 1 with regex 2", async () => { - const input = "abdefia"; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [2,3,4,5]; - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx.includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("invalid case 1 with regex 2", async () => { - const input = "a"; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 64; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/plus.test.js b/packages/circom/tests/plus.test.js deleted file mode 100644 index 6a37047a..00000000 --- a/packages/circom/tests/plus.test.js +++ /dev/null @@ -1,626 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Plus Regex', () => { - let circuit1; - let circuit2; - let circuit3; - let circuit4; - // let circuit5; - // let circuit6; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/plus1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/plus1.json'), - 'utf8' - ), - 'Plus1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_plus1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/plus2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/plus2.json'), - 'utf8' - ), - 'Plus2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_plus2_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/plus3_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/plus3.json'), - 'utf8' - ), - 'Plus3Regex' - ) - ); - circuit3 = await wasm_tester( - path.join(__dirname, './circuits/test_plus3_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/plus4_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/plus4.json'), - 'utf8' - ), - 'Plus4Regex' - ) - ); - circuit4 = await wasm_tester( - path.join(__dirname, './circuits/test_plus4_regex.circom'), - option - ); - - // writeFileSync( - // path.join(__dirname, "./circuits/plus5_regex.circom"), - // compiler.genFromDecomposed( - // readFileSync( - // path.join(__dirname, "./circuits/plus5.json"), - // "utf8" - // ), - // "Plus5Regex" - // ) - // ); - // circuit5 = await wasm_tester( - // path.join(__dirname, "./circuits/test_plus5_regex.circom"), - // option - // ); - - // writeFileSync( - // path.join(__dirname, "./circuits/plus6_regex.circom"), - // compiler.genFromDecomposed( - // readFileSync( - // path.join(__dirname, "./circuits/plus6.json"), - // "utf8" - // ), - // "Plus6Regex" - // ) - // ); - // circuit6 = await wasm_tester( - // path.join(__dirname, "./circuits/test_plus6_regex.circom"), - // option - // ); - }); - - it('plus1 valid case 1', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus1.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus1 valid case 2', async () => { - const inputStr = `aaaab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus1.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus1 valid case 3', async () => { - const inputStr = `7aab89ac`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus1.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus1 invalid case 1', async () => { - const inputStr = `b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus1 invalid case 2', async () => { - const inputStr = `aacaadae`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus1 invalid case 3', async () => { - const inputStr = `aaaaaaaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus2 valid case 1', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus2.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus2 valid case 2', async () => { - const inputStr = `ac`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus2.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus2 valid case 3', async () => { - const inputStr = `abccbbcc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus2.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus2 valid case 4', async () => { - const inputStr = `7abbcaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus2.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus2 invalid case 1', async () => { - const inputStr = `adefghij`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus3 valid case 1', async () => { - const inputStr = `abcbcbc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus3.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus3 valid case 2', async () => { - const inputStr = `acbabcbc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus3.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus3 valid case 3', async () => { - const inputStr = `abccbcbb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus3.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus3 invalid case 1', async () => { - const inputStr = `abab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus4 valid case 1', async () => { - const inputStr = `1234512b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus4.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus4 valid case 2', async () => { - const inputStr = `2134512b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync(path.join(__dirname, './circuits/plus4.json'), 'utf8'), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('plus4 invalid case 1', async () => { - const inputStr = `1234b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('plus4 invalid case 2', async () => { - const inputStr = `34512`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit4.calculateWitness(circuitInputs); - await circuit4.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - // it("plus5 valid case 1", async () => { - // const inputStr = `aa`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/plus5.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("plus5 valid case 2", async () => { - // const inputStr = `aaaababb`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/plus5.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("plus5 valid case 3", async () => { - // const inputStr = `bbcw2cab`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/plus5.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("plus5 invalid case 1", async () => { - // const inputStr = `872jdiua`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(0n).toEqual(witness[1]); - // for (let idx = 0; idx < 8; ++idx) { - // expect(0n).toEqual(witness[2 + idx]); - // } - // }); - - // it("plus5 invalid case 2", async () => { - // const inputStr = `872jdiu7`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit5.calculateWitness(circuitInputs); - // await circuit5.checkConstraints(witness); - // expect(0n).toEqual(witness[1]); - // for (let idx = 0; idx < 8; ++idx) { - // expect(0n).toEqual(witness[2 + idx]); - // } - // }); - - // it("plus6 valid case 1", async () => { - // const inputStr = `aaaabbbb`; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit6.calculateWitness(circuitInputs); - // await circuit6.checkConstraints(witness); - // expect(1n).toEqual(witness[1]); - // const prefixIdxes = apis.extractSubstrIdxes( - // inputStr, - // readFileSync( - // path.join(__dirname, "./circuits/plus6.json"), - // "utf8" - // ),false - // )[0]; - // for (let idx = 0; idx < 8; ++idx) { - // if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - // expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - // } else { - // expect(0n).toEqual(witness[2 + idx]); - // } - // } - // }); - - // it("plus6 invalid case 1", async () => { - // const inputStr = ``; - // const paddedStr = apis.padString(inputStr, 8); - // const circuitInputs = { - // msg: paddedStr, - // }; - // const witness = await circuit6.calculateWitness(circuitInputs); - // await circuit6.checkConstraints(witness); - // expect(0n).toEqual(witness[1]); - // for (let idx = 0; idx < 8; ++idx) { - // expect(0n).toEqual(witness[2 + idx]); - // } - // }); -}); diff --git a/packages/circom/tests/question.test.js b/packages/circom/tests/question.test.js deleted file mode 100644 index 0a5170ec..00000000 --- a/packages/circom/tests/question.test.js +++ /dev/null @@ -1,394 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Question Regex', () => { - let circuit1; - let circuit2; - let circuit3; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/question1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/question1.json'), - 'utf8' - ), - 'Question1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_question1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/question2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/question2.json'), - 'utf8' - ), - 'Question2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_question2_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/question3_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/question3.json'), - 'utf8' - ), - 'Question3Regex' - ) - ); - circuit3 = await wasm_tester( - path.join(__dirname, './circuits/test_question3_regex.circom'), - option - ); - }); - - it('question1 valid case 1', async () => { - const inputStr = `b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question1 valid case 2', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question1 valid case 3', async () => { - const inputStr = `199aabb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question1.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question1 invalid case 1', async () => { - const inputStr = `aaaaaaaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question1 invalid case 2', async () => { - const inputStr = `cccccccc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question2 valid case 1', async () => { - const inputStr = `12b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question2 valid case 2', async () => { - const inputStr = `11x2bb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question2.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question2 invalid case 1', async () => { - const inputStr = `1x2`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question2 invalid case 2', async () => { - const inputStr = `1xb`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question3 valid case 1', async () => { - const inputStr = `12c`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question3 valid case 2', async () => { - const inputStr = `12ac`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question3 valid case 2', async () => { - const inputStr = `12bc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question3 valid case 4', async () => { - const inputStr = `12a12bc1`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/question3.json'), - 'utf8' - ), - false - )[0]; - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('question3 invalid case 1', async () => { - const inputStr = `1ac`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question3 invalid case 2', async () => { - const inputStr = `12abc`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('question3 invalid case 3', async () => { - const inputStr = `12a12b`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit3.calculateWitness(circuitInputs); - await circuit3.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/reveal_check.test.js b/packages/circom/tests/reveal_check.test.js deleted file mode 100644 index 3ae46035..00000000 --- a/packages/circom/tests/reveal_check.test.js +++ /dev/null @@ -1,251 +0,0 @@ -import circom_tester from 'circom_tester'; -import * as path from 'path'; -import { readFileSync, writeFileSync } from 'fs'; -import apis from '../../apis/pkg'; -import compiler from '../../compiler/pkg'; -const option = { - include: path.join(__dirname, '../../../node_modules') -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe('Revealed Chars Check', () => { - let circuit1; - let circuit2; - beforeAll(async () => { - writeFileSync( - path.join(__dirname, './circuits/reveal_check1_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/reveal_check1.json'), - 'utf8' - ), - 'RevealCheck1Regex' - ) - ); - circuit1 = await wasm_tester( - path.join(__dirname, './circuits/test_reveal_check1_regex.circom'), - option - ); - - writeFileSync( - path.join(__dirname, './circuits/reveal_check2_regex.circom'), - compiler.genFromDecomposed( - readFileSync( - path.join(__dirname, './circuits/reveal_check2.json'), - 'utf8' - ), - 'RevealCheck2Regex' - ) - ); - circuit2 = await wasm_tester( - path.join(__dirname, './circuits/test_reveal_check2_regex.circom'), - option - ); - }); - - it('reveal check1 valid case 1', async () => { - const inputStr = `aba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/reveal_check1.json'), - 'utf8' - ), - false - )[0]; - expect(prefixIdxes).toEqual([0, 3]); - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('reveal check1 valid case 2', async () => { - const inputStr = `7abaab9`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/reveal_check1.json'), - 'utf8' - ), - false - )[0]; - expect(prefixIdxes).toEqual([1, 4]); - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('reveal check1 invalid case 1', async () => { - const inputStr = `aca`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('reveal check1 invalid case 2', async () => { - const inputStr = `aaa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit1.calculateWitness(circuitInputs); - await circuit1.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('reveal check2 valid case 1', async () => { - const inputStr = `aa`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/reveal_check2.json'), - 'utf8' - ), - false - )[0]; - expect(prefixIdxes).toEqual([0, 2]); - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('reveal check2 valid case 2', async () => { - const inputStr = `ab`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/reveal_check2.json'), - 'utf8' - ), - false - )[0]; - expect(prefixIdxes).toEqual([0, 2]); - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('reveal check2 valid case 3', async () => { - const inputStr = `aba`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubstrIdxes( - inputStr, - readFileSync( - path.join(__dirname, './circuits/reveal_check2.json'), - 'utf8' - ), - false - )[0]; - expect(prefixIdxes).toEqual([0, 2]); - for (let idx = 0; idx < 8; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it('reveal check2 invalid case 1', async () => { - const inputStr = `ac`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('reveal check2 invalid case 2', async () => { - const inputStr = `bad`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('reveal check2 invalid case 3', async () => { - const inputStr = `bad`; - const paddedStr = apis.padString(inputStr, 8); - const circuitInputs = { - msg: paddedStr - }; - const witness = await circuit2.calculateWitness(circuitInputs); - await circuit2.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 8; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/simple_regex.test.js b/packages/circom/tests/simple_regex.test.js deleted file mode 100644 index 8b9d89e1..00000000 --- a/packages/circom/tests/simple_regex.test.js +++ /dev/null @@ -1,107 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Simple Regex", () => { - let circuit; - beforeAll(async () => { - const substrs_json = readFileSync( - path.join(__dirname, "./circuits/simple_regex_substrs.json"), - "utf8" - ); - const circom = compiler.genFromRaw( - "1=(a|b) (2=(b|c)+ )+d", - substrs_json, - "SimpleRegex" - ); - writeFileSync( - path.join(__dirname, "./circuits/simple_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_simple_regex.circom"), - option - ); - }); - - it("case 1", async () => { - const input = "1=a 2=b d"; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2], [6], [8]]; - for (let substr_idx = 0; substr_idx < 3; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 2", async () => { - const input = "1=a 2=b 2=bc 2=c d"; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[2], [6, 10, 11, 15], [17]]; - for (let substr_idx = 0; substr_idx < 3; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); - - it("case 3", async () => { - const input = "1=a 2=b 2=bc 2=c da 1=a 2=cb 2=c 2=b dd"; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [ - [2, 22], - [6, 10, 11, 15, 26, 27, 31, 35], - [17, 37], - ]; - for (let substr_idx = 0; substr_idx < 3; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); -}); diff --git a/packages/circom/tests/simple_regex_decomposed.test.js b/packages/circom/tests/simple_regex_decomposed.test.js deleted file mode 100644 index ce0fb817..00000000 --- a/packages/circom/tests/simple_regex_decomposed.test.js +++ /dev/null @@ -1,55 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Simple Regex Decomposed", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "./circuits/simple_regex_decomposed.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "SimpleRegexDecomposed" - ); - writeFileSync( - path.join(__dirname, "./circuits/simple_regex_decomposed.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_simple_regex_decomposed.circom"), - option - ); - }); - - it("case 1", async () => { - const input = "email was meant for @zkRegex."; - const paddedStr = apis.padString(input, 64); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const revealedIdx = [[21, 22, 23, 24, 25, 26, 27]]; - for (let substr_idx = 0; substr_idx < 1; ++substr_idx) { - for (let idx = 0; idx < 64; ++idx) { - if (revealedIdx[substr_idx].includes(idx)) { - expect(BigInt(paddedStr[idx])).toEqual( - witness[2 + 64 * substr_idx + idx] - ); - } else { - expect(0n).toEqual(witness[2 + 64 * substr_idx + idx]); - } - } - } - }); -}); diff --git a/packages/circom/tests/subject_all.test.js b/packages/circom/tests/subject_all.test.js deleted file mode 100644 index 0c82cd7b..00000000 --- a/packages/circom/tests/subject_all.test.js +++ /dev/null @@ -1,118 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(120000); -describe("Subject All Regex", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/subject_all.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "SubjectAllRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/subject_all_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_subject_all_regex.circom"), - option - ); - }); - - it("subject from beginning", async () => { - const subjectStr = "subject:This is a test.\r\n"; - const paddedStr = apis.padString(subjectStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubjectAllIdxes(subjectStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("subject after new line", async () => { - const subjectStr = "dummy\r\nsubject:This is a test.\r\n"; - const paddedStr = apis.padString(subjectStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubjectAllIdxes(subjectStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("subject from beginning and non-English case", async () => { - const subjectStr = "subject:これはテストです。\r\n"; - const paddedStr = apis.padString(subjectStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractSubjectAllIdxes(subjectStr)[0]; - for (let idx = 0; idx < 256; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("subject in the invalid field", async () => { - const subjectStr = "\r\nto:subject:This is a subject in To field.\r\n"; - const paddedStr = apis.padString(subjectStr, 256); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 256; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); - - it('invalid subject field with 255', async () => { - const subjectStr = `subject:This is a subject in To field.\r\n`; - let paddedStr = apis.padString(subjectStr, 1022); - paddedStr.unshift(49); - paddedStr.unshift(255); - const circuitInputs = { - msg: paddedStr - }; - async function failFn() { - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - } - await expect(failFn).rejects.toThrow(); - }); -}); diff --git a/packages/circom/tests/timestamp.test.js b/packages/circom/tests/timestamp.test.js deleted file mode 100644 index dd022e8c..00000000 --- a/packages/circom/tests/timestamp.test.js +++ /dev/null @@ -1,85 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe("Timestamp Regex", () => { - let circuit; - beforeAll(async () => { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/timestamp.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "TimestampRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/timestamp_regex.circom"), - circom - ); - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_timestamp_regex.circom"), - option - ); - }); - - it("timestamp in the header", async () => { - const signatureField = `dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractTimestampIdxes(signatureField)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("timestamp after new line", async () => { - const signatureField = `\r\ndkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractTimestampIdxes(signatureField)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - - it("invalid timestamp", async () => { - const signatureField = `to:dkim-signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694989812; x=1695594612; dara=google.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BWETwQ9JDReS4GyR2v2TTR8Bpzj9ayumsWQJ3q7vehs=; b=`; - const paddedStr = apis.padString(signatureField, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(0n).toEqual(witness[1]); - for (let idx = 0; idx < 1024; ++idx) { - expect(0n).toEqual(witness[2 + idx]); - } - }); -}); diff --git a/packages/circom/tests/to_addr.test.js b/packages/circom/tests/to_addr.test.js deleted file mode 100644 index c6b9cc64..00000000 --- a/packages/circom/tests/to_addr.test.js +++ /dev/null @@ -1,374 +0,0 @@ -import circom_tester from "circom_tester"; -import * as path from "path"; -import { readFileSync, writeFileSync } from "fs"; -import apis from "../../apis/pkg"; -import compiler from "../../compiler/pkg"; -const option = { - include: path.join(__dirname, "../../../node_modules"), -}; -const wasm_tester = circom_tester.wasm; - -jest.setTimeout(600000); -describe("To Addr Regex", () => { - let circuit; - beforeAll(async () => { - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/to_all.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "ToAllRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/to_all_regex.circom"), - circom - ); - } - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/reversed_bracket.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "ReversedBracketRegex" - ); - writeFileSync( - path.join( - __dirname, - "../circuits/common/reversed_bracket_regex.circom" - ), - circom - ); - } - { - const email_addr_json = readFileSync( - path.join(__dirname, "../circuits/common/email_addr.json"), - "utf8" - ); - const circom = compiler.genFromDecomposed( - email_addr_json, - "EmailAddrRegex" - ); - writeFileSync( - path.join(__dirname, "../circuits/common/email_addr_regex.circom"), - circom - ); - } - circuit = await wasm_tester( - path.join(__dirname, "./circuits/test_to_addr_regex.circom"), - option - ); - }); - - it("to field from beginning case 1", async () => { - const toStr = "to:adityabisht@gmail.com\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field from beginning case 2", async () => { - const toStr = "to:Aditya Bisht \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field from beginning case 3 (email address as a name)", async () => { - const toStr = "to:dummy@example.com\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field from beginning case 4 (non-English string is used as a name)", async () => { - const toStr = 'to: "末神奏宙" \r\n'; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field after new line case 1", async () => { - const toStr = "dummy\r\nto:adityabisht@gmail.com\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field after new line case 2", async () => { - const toStr = "dummy\r\nto:Sora Suegami \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field after new line case 3 (email address as a name)", async () => { - const toStr = "dummy\r\nto:dummy@example.com\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field after new line case 4 (non-English string is used as a name)", async () => { - const toStr = 'dummy\r\nto: "末神奏宙" \r\n'; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field in the invalid field", async () => { - const toStr = "subject:to:adityabisht@gmail.com\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - async function failFn() { - await circuit.calculateWitness(circuitInputs); - } - await expect(failFn).rejects.toThrow(); - }); - - it('invalid to field with 255', async () => { - const toStr = `to:adityabisht@gmail.com\r\n`; - let paddedStr = apis.padString(toStr, 1022); - paddedStr.unshift(49); - paddedStr.unshift(255); - const circuitInputs = { - msg: paddedStr - }; - async function failFn() { - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - } - await expect(failFn).rejects.toThrow(); - }); - - it("to field containing @ in the name part", async () => { - const toStr = "to:Aditya Bisht \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect("adityabisht@gmail.com@dummy.com").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field starting from @", async () => { - const toStr = "to:Aditya Bisht <@gmail.com@dummy.com>\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect("@gmail.com@dummy.com").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field with double <> 1", async () => { - const toStr = "to:\"Some name \" \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect("attacker@outlook.com").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - - it("to field with double <> 2", async () => { - const toStr = "to:\"Some name \" < attacker@outlook.com>\r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log((witness[1])); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect(" attacker@outlook.com").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - // if (witness[2 + idx] !== 0n) { - // console.log('idx:', idx, 'witness:', witness[2 + idx]); - // } - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - - it("to field with double <> 3", async () => { - const toStr = "to:\"Some name \" \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - // console.log((witness[1])); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect("attacker@outlook.com ").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - // if (witness[2 + idx] !== 0n) { - // console.log('idx:', idx, 'witness:', witness[2 + idx]); - // } - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); - - it("to field with triple <>", async () => { - const toStr = "to:\"Some name >\" \r\n"; - const paddedStr = apis.padString(toStr, 1024); - const circuitInputs = { - msg: paddedStr, - }; - const witness = await circuit.calculateWitness(circuitInputs); - await circuit.checkConstraints(witness); - expect(1n).toEqual(witness[1]); - const prefixIdxes = apis.extractToAddrIdxes(toStr)[0]; - expect("attacker@outlook.com").toEqual(toStr.slice(prefixIdxes[0], prefixIdxes[1])); - for (let idx = 0; idx < 1024; ++idx) { - if (idx >= prefixIdxes[0] && idx < prefixIdxes[1]) { - expect(BigInt(paddedStr[idx])).toEqual(witness[2 + idx]); - } else { - expect(0n).toEqual(witness[2 + idx]); - } - } - }); -}); diff --git a/packages/compiler/Cargo.toml b/packages/compiler/Cargo.toml deleted file mode 100644 index c51224b2..00000000 --- a/packages/compiler/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -name = "zk-regex-compiler" -version = "2.3.2" -authors = [ - "Javier Su ", - "Kata Choi ", - "Sora Suegami ", - "Yush G ", - "Aditya Bisht ", -] -license = "MIT" -edition = "2018" - -[[bin]] -name = "zk-regex" -path = "src/bin/compiler.rs" - -[lib] -crate-type = ["rlib", "cdylib"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tabbycat = { version = "0.1", features = ["attributes"], optional = true } -fancy-regex = "=0.13.0" -petgraph = "0.6.3" -graph-cycles = "0.1.0" -thiserror = "1.0.40" -serde_json = "1.0.95" -serde = { version = "1.0.159", features = ["derive"] } -itertools = "0.13.0" -clap = { version = "=4.2.1", features = ["derive"] } -ahash = "=0.8.11" -regex-automata = "=0.4.7" -regex = "=1.10.6" -getrandom = { version = "0.2", features = ["js"] } -wasm-bindgen = "0.2" -serde-wasm-bindgen = "0.6.5" -console_error_panic_hook = "0.1.7" diff --git a/packages/compiler/README.md b/packages/compiler/README.md deleted file mode 100644 index 30c055bf..00000000 --- a/packages/compiler/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# zk-regex-compiler - -A compiler CLI in [zk-regex](https://github.com/zkemail/zk-regex/tree/main). - -## Installing zk-regex-compiler - -You can install the project with npm. In the project directory, run: - -```sh -$ npm install -``` - -This fully installs the project, including installing any dependencies and running the build. - -## Building zk-regex-compiler - -If you have already installed the project and only want to run the build, run: - -```sh -$ npm run build -``` - -## Compiling zk-regex-compiler to wasm - -### For web usage -Install `wasm-pack` if not already installed - -```sh -cargo install wasm-pack -``` - -Compile the web package - -```sh -wasm-pack build --target nodejs -``` - -Pack the package (optional) - -```sh -wasm-pack build --target nodejs -cd pkg -npm pkg set type='module' -wasm-pack pack -``` - -The output package file will be `packages/compiler/pkg/zk-regex-compiler-1.1.1.tgz` - -### For tests - -```sh -wasm-pack test --node -``` - -## CLI Usage -Please see "Compiler CLI" section in [zk-regex](https://github.com/zkemail/zk-regex/tree/main). - -## Available Scripts - -In the project directory, you can run: - -### `npm install` - -Installs the project, including running `npm run build`. - -### `npm build` - -Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm build` and `npm build-*` commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): - -``` -npm run build -- --feature=beetle -``` - -#### `npm build-debug` - -Alias for `npm build`. - -#### `npm build-release` - -Same as [`npm build`](#npm-build) but, builds the module with the [`release`](https://doc.rust-lang.org/cargo/reference/profiles.html#release) profile. Release builds will compile slower, but run faster. - -### `npm test` - -Runs the unit tests by calling `wasm-pack test --node`. - -## Project Layout - -The directory structure of this project is: - -``` -zk-regex-compiler/ -├── Cargo.toml -├── README.md -├── package.json -├── src/ -| └── lib.rs -└── target/ -``` - -### Cargo.toml - -The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. - -### README.md - -This file. - -### package.json - -The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. - -### src/ - -The directory tree containing the Rust source code for the project. - -### src/lib.rs - -The Rust library's main module. - -### target/ - -Binary artifacts generated by the Rust build. - -## Regex Limitations -The regular expressions supported by our compiler have the following limitations: - -- Regular expressions where the results differ between greedy and lazy matching (e.g., .+, .+?) are **not** supported. -- The beginning anchor ^ must either appear at the beginning of the regular expression or be in the format (|^). Additionally, the section containing this ^ must be non-public (`is_public: false`). -- The end anchor $ must appear at the end of the regular expression. -- Regular expressions that, when converted to DFA (Deterministic Finite Automaton), include transitions to the initial state are **not** supported (e.g., .*). -- Regular expressions that, when converted to DFA, have multiple accepting states are **not** supported. diff --git a/packages/compiler/src/bin/compiler.rs b/packages/compiler/src/bin/compiler.rs deleted file mode 100644 index ba53749b..00000000 --- a/packages/compiler/src/bin/compiler.rs +++ /dev/null @@ -1,140 +0,0 @@ -//! ZK Regex Compiler CLI -//! -//! This binary provides a command-line interface for the ZK Regex Compiler. -//! It supports two main commands: `Decomposed` for working with decomposed regex files, -//! and `Raw` for working with raw regex strings. -//! -//! # Usage -//! -//! ## Decomposed Command -//! Process a decomposed regex file: -//! -//! ``` -//! zk-regex decomposed --decomposed-regex-path [OPTIONS] -//! ``` -//! -//! Options: -//! - `-d, --decomposed-regex-path `: Path to the decomposed regex JSON file (required) -//! - `-h, --halo2-dir-path `: Directory path for Halo2 output -//! - `-c, --circom-file-path `: File path for Circom output -//! - `-t, --template-name `: Template name -//! - `-g, --gen-substrs`: Generate substrings -//! -//! Example: -//! ``` -//! zk-regex decomposed -d regex.json -h ./halo2_output -c ./circom_output.circom -t MyTemplate -g true -//! ``` -//! -//! ## Raw Command -//! Process a raw regex string: -//! -//! ``` -//! zk-regex raw --raw-regex [OPTIONS] -//! ``` -//! -//! Options: -//! - `-r, --raw-regex `: Raw regex string (required) -//! - `-s, --substrs-json-path `: Path to substrings JSON file -//! - `-h, --halo2-dir-path `: Directory path for Halo2 output -//! - `-c, --circom-file-path `: File path for Circom output -//! - `-t, --template-name `: Template name -//! - `-g, --gen-substrs`: Generate substrings -//! -//! Example: -//! ``` -//! zk-regex raw -r "a*b+c?" -s substrings.json -h ./halo2_output -c ./circom_output.circom -t MyTemplate -g true -//! ``` - -use clap::{Parser, Subcommand}; -use zk_regex_compiler::{gen_from_decomposed, gen_from_raw}; - -#[derive(Parser, Debug, Clone)] -#[command(author, version, about, long_about = None)] -struct Cli { - #[command(subcommand)] - pub command: Commands, -} - -#[derive(Debug, Subcommand, Clone)] -enum Commands { - Decomposed { - #[arg(short, long)] - decomposed_regex_path: String, - #[arg(short, long)] - halo2_dir_path: Option, - #[arg(short, long)] - circom_file_path: Option, - #[arg(short, long)] - template_name: Option, - #[arg(short, long)] - gen_substrs: Option, - }, - Raw { - #[arg(short, long)] - raw_regex: String, - #[arg(short, long)] - substrs_json_path: Option, - #[arg(short, long)] - halo2_dir_path: Option, - #[arg(short, long)] - circom_file_path: Option, - #[arg(short, long)] - template_name: Option, - #[arg(short, long)] - gen_substrs: Option, - }, -} - -fn main() { - let cli = Cli::parse(); - match cli.command { - Commands::Decomposed { .. } => process_decomposed(cli), - Commands::Raw { .. } => process_raw(cli), - } -} - -fn process_decomposed(cli: Cli) { - if let Commands::Decomposed { - decomposed_regex_path, - halo2_dir_path, - circom_file_path, - template_name, - gen_substrs, - } = cli.command - { - if let Err(e) = gen_from_decomposed( - &decomposed_regex_path, - halo2_dir_path.as_deref(), - circom_file_path.as_deref(), - template_name.as_deref(), - gen_substrs, - ) { - eprintln!("Error: {}", e); - std::process::exit(1); - } - } -} - -fn process_raw(cli: Cli) { - if let Commands::Raw { - raw_regex, - substrs_json_path, - halo2_dir_path, - circom_file_path, - template_name, - gen_substrs, - } = cli.command - { - if let Err(e) = gen_from_raw( - &raw_regex, - substrs_json_path.as_deref(), - halo2_dir_path.as_deref(), - circom_file_path.as_deref(), - template_name.as_deref(), - gen_substrs, - ) { - eprintln!("Error: {}", e); - std::process::exit(1); - } - } -} diff --git a/packages/compiler/src/circom.rs b/packages/compiler/src/circom.rs deleted file mode 100644 index f7d319fa..00000000 --- a/packages/compiler/src/circom.rs +++ /dev/null @@ -1,1014 +0,0 @@ -use crate::{ - errors::CompilerError, - regex::get_accepted_state, - structs::{DFAGraph, RegexAndDFA}, -}; -use std::{ - collections::{BTreeMap, BTreeSet}, - fs::File, - io::Write, - path::Path, -}; - -/// Builds a reverse graph from a DFA graph and collects accept nodes. -/// -/// This function creates a reverse graph where the direction of edges is inverted, -/// and collects all accepting states. -/// -/// # Arguments -/// -/// * `state_len` - The number of states in the DFA. -/// * `dfa_graph` - A reference to the original DFA graph. -/// -/// # Returns -/// -/// A Result tuple containing: -/// * The reverse graph as a `BTreeMap>>`. -/// * A `BTreeSet` of accepting state IDs. -/// -/// # Errors -/// -/// Returns a `CompilerError::AcceptNodesError` if no accepting states are found. -fn build_reverse_graph( - state_len: usize, - dfa_graph: &DFAGraph, -) -> Result<(BTreeMap>>, BTreeSet), CompilerError> { - let mut rev_graph = BTreeMap::>>::new(); - let mut accept_nodes = BTreeSet::::new(); - - for i in 0..state_len { - rev_graph.insert(i, BTreeMap::new()); - } - - for (i, node) in dfa_graph.states.iter().enumerate() { - for (k, v) in &node.transitions { - let chars: Vec = v.iter().cloned().collect(); - rev_graph.get_mut(k).unwrap().insert(i, chars); - } - - if node.state_type == "accept" { - accept_nodes.insert(i); - } - } - - if accept_nodes.is_empty() { - return Err(CompilerError::AcceptNodesError( - "Accept node must exist".to_string(), - )); - } - - Ok((rev_graph, accept_nodes)) -} - -/// Optimizes character ranges by grouping consecutive characters and identifying individual characters. -/// -/// This function takes a slice of u8 values (representing ASCII characters) and groups them into -/// ranges where possible, while also identifying individual characters that don't fit into ranges. -/// -/// # Arguments -/// -/// * `k` - A slice of u8 values representing ASCII characters. -/// -/// # Returns -/// -/// A tuple containing: -/// * A Vec of (u8, u8) tuples representing optimized character ranges (min, max). -/// * A BTreeSet of u8 values representing individual characters not included in ranges. -/// -/// # Note -/// -/// Ranges are only created for sequences of 16 or more consecutive characters. -fn optimize_char_ranges(k: &[u8]) -> (Vec<(u8, u8)>, BTreeSet) { - let mut min_maxes = vec![]; - let mut vals = k.iter().cloned().collect::>(); - - if k.is_empty() { - return (min_maxes, vals); - } - - let mut cur_min = k[0]; - let mut cur_max = k[0]; - - for &val in &k[1..] { - if cur_max == val { - continue; - } else if cur_max + 1 == val { - cur_max = val; - } else { - if cur_max - cur_min >= 16 { - min_maxes.push((cur_min, cur_max)); - } - cur_min = val; - cur_max = val; - } - } - - if cur_max - cur_min >= 16 { - min_maxes.push((cur_min, cur_max)); - } - - for (min, max) in &min_maxes { - for code in *min..=*max { - vals.remove(&code); - } - } - - (min_maxes, vals) -} - -/// Adds a range check for character comparisons in the Circom circuit. -/// -/// This function either reuses an existing range check or creates a new one, -/// adding the necessary Circom code lines and updating the relevant counters. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `range_checks` - A mutable reference to a 2D Vec storing existing range checks. -/// * `eq_outputs` - A mutable reference to a Vec storing equality check outputs. -/// * `min` - The minimum value of the range. -/// * `max` - The maximum value of the range. -/// * `lt_i` - A mutable reference to the current LessThan component index. -/// * `and_i` - A mutable reference to the current AND component index. -fn add_range_check( - lines: &mut Vec, - range_checks: &mut Vec>>, - eq_outputs: &mut Vec<(&str, usize)>, - min: u8, - max: u8, - lt_i: &mut usize, - and_i: &mut usize, -) { - if let Some((_, and_i)) = range_checks[min as usize][max as usize] { - eq_outputs.push(("and", and_i)); - } else { - lines.push(format!("\t\tlt[{}][i] = LessEqThan(8);", *lt_i)); - lines.push(format!("\t\tlt[{}][i].in[0] <== {};", *lt_i, min)); - lines.push(format!("\t\tlt[{}][i].in[1] <== in[i];", *lt_i)); - lines.push(format!("\t\tlt[{}][i] = LessEqThan(8);", *lt_i + 1)); - lines.push(format!("\t\tlt[{}][i].in[0] <== in[i];", *lt_i + 1)); - lines.push(format!("\t\tlt[{}][i].in[1] <== {};", *lt_i + 1, max)); - lines.push(format!("\t\tand[{}][i] = AND();", *and_i)); - lines.push(format!( - "\t\tand[{}][i].a <== lt[{}][i].out;", - *and_i, *lt_i - )); - lines.push(format!( - "\t\tand[{}][i].b <== lt[{}][i].out;", - *and_i, - *lt_i + 1 - )); - - eq_outputs.push(("and", *and_i)); - range_checks[min as usize][max as usize] = Some((*lt_i, *and_i)); - *lt_i += 2; - *and_i += 1; - } -} - -/// Adds an equality check for a specific character code in the Circom circuit. -/// -/// This function either reuses an existing equality check or creates a new one, -/// adding the necessary Circom code lines and updating the relevant counter. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `eq_checks` - A mutable reference to a Vec storing existing equality checks. -/// * `code` - The ASCII code of the character to check for equality. -/// * `eq_i` - A mutable reference to the current equality component index. -/// -/// # Returns -/// -/// The index of the equality check component used or created. -fn add_eq_check( - lines: &mut Vec, - eq_checks: &mut Vec>, - code: u8, - eq_i: &mut usize, -) -> usize { - if let Some(index) = eq_checks[code as usize] { - index - } else { - lines.push(format!("\t\teq[{}][i] = IsEqual();", *eq_i)); - lines.push(format!("\t\teq[{}][i].in[0] <== in[i];", *eq_i)); - lines.push(format!("\t\teq[{}][i].in[1] <== {};", *eq_i, code)); - eq_checks[code as usize] = Some(*eq_i); - let result = *eq_i; - *eq_i += 1; - result - } -} - -/// Adds a state transition to the Circom circuit. -/// -/// This function creates an AND gate for the state transition and handles the -/// equality outputs, potentially creating a MultiOR gate if necessary. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `zero_starting_and_idxes` - A mutable reference to a BTreeMap storing AND indices for zero-starting states. -/// * `i` - The current state index. -/// * `prev_i` - The previous state index. -/// * `eq_outputs` - A Vec of tuples containing equality output types and indices. -/// * `and_i` - A mutable reference to the current AND gate index. -/// * `multi_or_checks1` - A mutable reference to a BTreeMap storing MultiOR checks. -/// * `multi_or_i` - A mutable reference to the current MultiOR gate index. -fn add_state_transition( - lines: &mut Vec, - zero_starting_and_idxes: &mut BTreeMap>, - i: usize, - prev_i: usize, - eq_outputs: Vec<(&str, usize)>, - and_i: &mut usize, - multi_or_checks1: &mut BTreeMap, - multi_or_i: &mut usize, -) { - lines.push(format!("\t\tand[{}][i] = AND();", and_i)); - lines.push(format!( - "\t\tand[{}][i].a <== states[i][{}];", - and_i, prev_i - )); - - if eq_outputs.len() == 1 { - lines.push(format!( - "\t\tand[{}][i].b <== {}[{}][i].out;", - and_i, eq_outputs[0].0, eq_outputs[0].1 - )); - if prev_i == 0 { - zero_starting_and_idxes.get_mut(&i).unwrap().push(*and_i); - } - } else if eq_outputs.len() > 1 { - let eq_outputs_key = serde_json::to_string(&eq_outputs).unwrap(); - if let Some(&multi_or_index) = multi_or_checks1.get(&eq_outputs_key) { - lines.push(format!( - "\t\tand[{}][i].b <== multi_or[{}][i].out;", - and_i, multi_or_index - )); - } else { - lines.push(format!( - "\t\tmulti_or[{}][i] = MultiOR({});", - *multi_or_i, - eq_outputs.len() - )); - for (output_i, (eq_type, eq_i)) in eq_outputs.iter().enumerate() { - lines.push(format!( - "\t\tmulti_or[{}][i].in[{}] <== {}[{}][i].out;", - *multi_or_i, output_i, eq_type, eq_i - )); - } - lines.push(format!( - "\t\tand[{}][i].b <== multi_or[{}][i].out;", - *and_i, *multi_or_i - )); - multi_or_checks1.insert(eq_outputs_key, *multi_or_i); - *multi_or_i += 1; - } - if prev_i == 0 { - zero_starting_and_idxes.get_mut(&i).unwrap().push(*and_i); - } - } - - *and_i += 1; -} - -/// Helper function to add a MultiOR gate to the Circom circuit. -fn add_multi_or_gate( - lines: &mut Vec, - outputs: &[usize], - multi_or_i: &mut usize, - i: usize, - state_var: &str, -) { - lines.push(format!( - "\t\tmulti_or[{multi_or_i}][i] = MultiOR({});", - outputs.len() - )); - for (output_i, and_i) in outputs.iter().enumerate() { - lines.push(format!( - "\t\tmulti_or[{multi_or_i}][i].in[{output_i}] <== and[{and_i}][i].out;" - )); - } - lines.push(format!( - "\t\t{state_var}[i+1][{i}] <== multi_or[{multi_or_i}][i].out;" - )); -} - -/// Adds a state update to the Circom circuit. -/// -/// This function handles the update of state variables, potentially creating -/// a MultiOR gate if there are multiple outputs to combine. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `i` - The current state index. -/// * `outputs` - A Vec of output indices to be combined. -/// * `zero_starting_states` - A mutable reference to a Vec of zero-starting state indices. -/// * `multi_or_checks2` - A mutable reference to a BTreeMap storing MultiOR checks. -/// * `multi_or_i` - A mutable reference to the current MultiOR gate index. -fn add_state_update( - lines: &mut Vec, - i: usize, - outputs: Vec, - zero_starting_states: &[usize], - multi_or_checks2: &mut BTreeMap, - multi_or_i: &mut usize, -) { - let is_zero_starting = zero_starting_states.contains(&i); - let state_var = if is_zero_starting { - "states_tmp" - } else { - "states" - }; - - match outputs.len() { - 0 => lines.push(format!("\t\t{state_var}[i+1][{i}] <== 0;")), - 1 => lines.push(format!( - "\t\t{state_var}[i+1][{i}] <== and[{}][i].out;", - outputs[0] - )), - _ => { - let outputs_key = serde_json::to_string(&outputs).expect("Failed to serialize outputs"); - if let Some(&multi_or_index) = multi_or_checks2.get(&outputs_key) { - lines.push(format!( - "\t\t{state_var}[i+1][{i}] <== multi_or[{multi_or_index}][i].out;" - )); - } else { - add_multi_or_gate(lines, &outputs, multi_or_i, i, state_var); - multi_or_checks2.insert(outputs_key, *multi_or_i); - *multi_or_i += 1; - } - } - } -} - -/// Adds the 'from_zero_enabled' logic to the Circom circuit. -/// -/// This function creates a MultiNOR gate that checks if all non-zero states are inactive, -/// which indicates that the current state is the initial (zero) state. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `state_len` - The total number of states in the DFA. -/// * `zero_starting_states` - A reference to a Vec of indices of zero-starting states. -fn add_from_zero_enabled( - lines: &mut Vec, - state_len: usize, - zero_starting_states: &Vec, -) { - lines.push(format!( - "\t\tfrom_zero_enabled[i] <== MultiNOR({})([{}]);", - state_len - 1, - (1..state_len) - .map(|i| (if zero_starting_states.contains(&i) { - format!("states_tmp[i+1][{}]", i) - } else { - format!("states[i+1][{}]", i) - })) - .collect::>() - .join(", ") - )); -} - -/// Adds updates for zero-starting states to the Circom circuit. -/// -/// This function creates MultiOR gates for each zero-starting state, -/// combining the temporary state with the AND outputs of transitions -/// from the zero state, gated by the 'from_zero_enabled' signal. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `zero_starting_and_idxes` - A reference to a BTreeMap mapping state indices to their corresponding AND gate indices. -fn add_zero_starting_state_updates( - lines: &mut Vec, - zero_starting_and_idxes: &BTreeMap>, -) { - for (i, vec) in zero_starting_and_idxes { - if vec.is_empty() { - continue; - } - lines.push(format!( - "\t\tstates[i+1][{}] <== MultiOR({})([states_tmp[i+1][{}], {}]);", - i, - vec.len() + 1, - i, - vec.iter() - .map(|and_i| format!("from_zero_enabled[i] * and[{}][i].out", and_i)) - .collect::>() - .join(", ") - )); - } -} - -/// Adds state change detection logic to the Circom circuit. -/// -/// This function creates inputs for the state_changed component, -/// which detects changes in non-zero states between consecutive steps. -/// -/// # Arguments -/// -/// * `lines` - A mutable reference to a Vec of Strings containing Circom code lines. -/// * `state_len` - The total number of states in the DFA. -fn add_state_changed_updates(lines: &mut Vec, state_len: usize) { - for i in 1..state_len { - lines.push(format!( - "\t\tstate_changed[i].in[{}] <== states[i+1][{}];", - i - 1, - i - )); - } -} - -/// Generates the state transition logic for the Circom circuit. -/// -/// This function creates the core logic for state transitions in the DFA, -/// including range checks, equality checks, and multi-OR operations. -/// -/// # Arguments -/// -/// * `rev_graph` - A reference to the reverse graph of the DFA. -/// * `state_len` - The total number of states in the DFA. -/// * `end_anchor` - A boolean indicating whether an end anchor is present. -/// -/// # Returns -/// -/// A tuple containing: -/// * The number of equality checks used. -/// * The number of less-than checks used. -/// * The number of AND gates used. -/// * The number of multi-OR gates used. -/// * A Vec of Strings containing the generated Circom code lines. -fn generate_state_transition_logic( - rev_graph: &BTreeMap>>, - state_len: usize, - end_anchor: bool, -) -> (usize, usize, usize, usize, Vec) { - let mut eq_i = 0; - let mut lt_i = 0; - let mut and_i = 0; - let mut multi_or_i = 0; - - let mut range_checks = vec![vec![None; 256]; 256]; - let mut eq_checks = vec![None; 256]; - let mut multi_or_checks1 = BTreeMap::::new(); - let mut multi_or_checks2 = BTreeMap::::new(); - let mut zero_starting_states = vec![]; - let mut zero_starting_and_idxes = BTreeMap::>::new(); - - let mut lines = vec![]; - - lines.push("\tfor (var i = 0; i < num_bytes; i++) {".to_string()); - lines.push(format!( - "\t\tstate_changed[i] = MultiOR({});", - state_len - 1 - )); - lines.push("\t\tstates[i][0] <== 1;".to_string()); - - if end_anchor { - lines.push( - "\t\tpadding_start[i+1] <== IsNotZeroAcc()(padding_start[i], in[i]);".to_string(), - ); - } - - for i in 1..state_len { - let mut outputs = vec![]; - zero_starting_and_idxes.insert(i, vec![]); - - for (prev_i, chars) in rev_graph.get(&i).unwrap_or(&BTreeMap::new()) { - if *prev_i == 0 { - zero_starting_states.push(i); - } - let mut k = chars.clone(); - k.retain(|&x| x != 0); - k.sort(); - - let mut eq_outputs = vec![]; - - let (min_maxes, individual_chars) = optimize_char_ranges(&k); - - for (min, max) in min_maxes { - add_range_check( - &mut lines, - &mut range_checks, - &mut eq_outputs, - min, - max, - &mut lt_i, - &mut and_i, - ); - } - - for &code in &individual_chars { - let eq_index = add_eq_check(&mut lines, &mut eq_checks, code, &mut eq_i); - eq_outputs.push(("eq", eq_index)); - } - - add_state_transition( - &mut lines, - &mut zero_starting_and_idxes, - i, - *prev_i, - eq_outputs, - &mut and_i, - &mut multi_or_checks1, - &mut multi_or_i, - ); - - if *prev_i != 0 { - outputs.push(and_i - 1); - } - } - - add_state_update( - &mut lines, - i, - outputs, - &mut zero_starting_states, - &mut multi_or_checks2, - &mut multi_or_i, - ); - } - - add_from_zero_enabled(&mut lines, state_len, &zero_starting_states); - add_zero_starting_state_updates(&mut lines, &zero_starting_and_idxes); - add_state_changed_updates(&mut lines, state_len); - - lines.push("\t}".to_string()); - - (eq_i, lt_i, and_i, multi_or_i, lines) -} - -/// Generates the declarations for the Circom circuit. -/// -/// This function creates the initial declarations and setup for the Circom template, -/// including pragma, includes, input/output signals, and component declarations. -/// -/// # Arguments -/// -/// * `template_name` - The name of the Circom template. -/// * `regex_str` - The regular expression string. -/// * `state_len` - The total number of states in the DFA. -/// * `eq_i` - The number of equality components. -/// * `lt_i` - The number of less-than components. -/// * `and_i` - The number of AND components. -/// * `multi_or_i` - The number of multi-OR components. -/// * `end_anchor` - A boolean indicating whether an end anchor is present. -/// -/// # Returns -/// -/// A Vec of Strings containing the generated Circom declarations. -fn generate_declarations( - template_name: &str, - regex_str: &str, - state_len: usize, - eq_i: usize, - lt_i: usize, - and_i: usize, - multi_or_i: usize, - end_anchor: bool, -) -> Vec { - let mut declarations = vec![ - "pragma circom 2.1.5;\n".to_string(), - "include \"@zk-email/zk-regex-circom/circuits/regex_helpers.circom\";\n".to_string(), - format!( - "// regex: {}", - regex_str.replace('\n', "\\n").replace('\r', "\\r") - ), - format!("template {}(msg_bytes) {{", template_name), - "\tsignal input msg[msg_bytes];".to_string(), - "\tsignal output out;".to_string(), - "".to_string(), - "\tvar num_bytes = msg_bytes+1;".to_string(), - "\tsignal in[num_bytes];".to_string(), - "\tsignal in_range_checks[msg_bytes];".to_string(), - "\tin[0]<==255;".to_string(), - "\tfor (var i = 0; i < msg_bytes; i++) {".to_string(), - "\t\tin_range_checks[i] <== LessThan(8)([msg[i], 255]);".to_string(), - "\t\tin_range_checks[i] === 1;".to_string(), - "\t\tin[i+1] <== msg[i];".to_string(), - "\t}".to_string(), - "".to_string(), - ]; - - if eq_i > 0 { - declarations.push(format!("\tcomponent eq[{}][num_bytes];", eq_i)); - } - - if lt_i > 0 { - declarations.push(format!("\tcomponent lt[{}][num_bytes];", lt_i)); - } - - if and_i > 0 { - declarations.push(format!("\tcomponent and[{}][num_bytes];", and_i)); - } - - if multi_or_i > 0 { - declarations.push(format!("\tcomponent multi_or[{}][num_bytes];", multi_or_i)); - } - - declarations.extend([ - format!("\tsignal states[num_bytes+1][{state_len}];"), - format!("\tsignal states_tmp[num_bytes+1][{state_len}];"), - "\tsignal from_zero_enabled[num_bytes+1];".to_string(), - "\tfrom_zero_enabled[num_bytes] <== 0;".to_string(), - "\tcomponent state_changed[num_bytes];".to_string(), - "".to_string(), - ]); - - if end_anchor { - declarations.extend([ - "\tsignal padding_start[num_bytes+1];".to_string(), - "\tpadding_start[0] <== 0;".to_string(), - ]); - } - - declarations -} - -/// Generates the initialization code for the Circom circuit. -/// -/// This function creates the code to initialize all states except the first one to 0. -/// -/// # Arguments -/// -/// * `state_len` - The total number of states in the DFA. -/// -/// # Returns -/// -/// A Vec of Strings containing the generated initialization code. -fn generate_init_code(state_len: usize) -> Vec { - vec![ - format!("\tfor (var i = 1; i < {state_len}; i++) {{"), - "\t\tstates[0][i] <== 0;".to_string(), - "\t}".to_string(), - "".to_string(), - ] -} - -/// Generates the acceptance logic for the Circom circuit. -/// -/// This function creates the code to check if the DFA has reached an accepting state, -/// and handles the end anchor logic if present. -/// -/// # Arguments -/// -/// * `accept_nodes` - A BTreeSet of accepting state indices. -/// * `end_anchor` - A boolean indicating whether an end anchor is present. -/// -/// # Returns -/// -/// A Result Vec of Strings containing the generated acceptance logic code. -/// -/// Returns error if there are no accept nodes or if there is more than one accept node. -fn generate_accept_logic( - accept_nodes: BTreeSet, - end_anchor: bool, -) -> Result, CompilerError> { - let mut accept_lines = vec![]; - - if accept_nodes.is_empty() { - return Err(CompilerError::AcceptNodesError( - "Accept node must exist".to_string(), - )); - } - - if accept_nodes.len() != 1 { - return Err(CompilerError::AcceptNodesError( - "The size of accept nodes must be one".to_string(), - )); - } - - let accept_node = *accept_nodes.iter().next().unwrap(); - - accept_lines.push("".to_string()); - accept_lines.push("\tcomponent is_accepted = MultiOR(num_bytes+1);".to_string()); - accept_lines.push("\tfor (var i = 0; i <= num_bytes; i++) {".to_string()); - accept_lines.push(format!( - "\t\tis_accepted.in[i] <== states[i][{}];", - accept_node - )); - accept_lines.push("\t}".to_string()); - - if end_anchor { - accept_lines.push("\tsignal end_anchor_check[num_bytes+1][2];".to_string()); - accept_lines.push("\tend_anchor_check[0][1] <== 0;".to_string()); - accept_lines.push("\tfor (var i = 0; i < num_bytes; i++) {".to_string()); - accept_lines.push( - "\t\tend_anchor_check[i+1][0] <== IsEqual()([i, padding_start[num_bytes]]);" - .to_string(), - ); - accept_lines.push( - format!("\t\tend_anchor_check[i+1][1] <== end_anchor_check[i][1] + states[i][{}] * end_anchor_check[i+1][0];", accept_node) - ); - accept_lines.push("\t}".to_string()); - accept_lines - .push("\tout <== is_accepted.out * end_anchor_check[num_bytes][1];".to_string()); - } else { - accept_lines.push("\tout <== is_accepted.out;".to_string()); - } - - Ok(accept_lines) -} - -/// Generates the complete Circom circuit as a string. -/// -/// This function orchestrates the generation of all parts of the Circom circuit, -/// including declarations, initialization code, state transition logic, and acceptance logic. -/// -/// # Arguments -/// -/// * `dfa_graph` - A reference to the DFA graph. -/// * `template_name` - The name of the Circom template. -/// * `regex_str` - The regular expression string. -/// * `end_anchor` - A boolean indicating whether an end anchor is present. -/// -/// # Returns -/// -/// A String containing the complete Circom circuit code. -fn gen_circom_allstr( - dfa_graph: &DFAGraph, - template_name: &str, - regex_str: &str, - end_anchor: bool, -) -> Result { - let state_len = dfa_graph.states.len(); - - let (rev_graph, accept_nodes) = build_reverse_graph(state_len, dfa_graph)?; - - let (eq_i, lt_i, and_i, multi_or_i, lines) = - generate_state_transition_logic(&rev_graph, state_len, end_anchor); - - let declarations = generate_declarations( - template_name, - regex_str, - state_len, - eq_i, - lt_i, - and_i, - multi_or_i, - end_anchor, - ); - - let init_code = generate_init_code(state_len); - - let accept_lines = generate_accept_logic(accept_nodes, end_anchor)?; - - let final_code = [declarations, init_code, lines, accept_lines].concat(); - - Ok(final_code.join("\n")) -} - -/// Writes the consecutive logic for the Circom circuit. -/// -/// This function generates the logic to check for consecutive accepted states. -/// -/// # Arguments -/// -/// * `accepted_state` - The index of the accepted state. -/// -/// # Returns -/// -/// A String containing the generated Circom code for consecutive logic. -fn write_consecutive_logic(accepted_state: usize) -> String { - let mut logic = String::new(); - logic += "\n"; - logic += "\tsignal is_consecutive[msg_bytes+1][3];\n"; - logic += "\tis_consecutive[msg_bytes][2] <== 0;\n"; - logic += "\tfor (var i = 0; i < msg_bytes; i++) {\n"; - logic += &format!( - "\t\tis_consecutive[msg_bytes-1-i][0] <== states[num_bytes-i][{accepted_state}] * (1 - is_consecutive[msg_bytes-i][2]) + is_consecutive[msg_bytes-i][2];\n" - ); - logic += - "\t\tis_consecutive[msg_bytes-1-i][1] <== state_changed[msg_bytes-i].out * is_consecutive[msg_bytes-1-i][0];\n"; - logic += &format!( - "\t\tis_consecutive[msg_bytes-1-i][2] <== ORAnd()([(1 - from_zero_enabled[msg_bytes-i+1]), states[num_bytes-i][{accepted_state}], is_consecutive[msg_bytes-1-i][1]]);\n" - ); - logic += "\t}\n"; - logic -} - -/// Writes the previous states logic for the Circom circuit. -/// -/// This function generates the logic to compute previous states based on transitions. -/// -/// # Arguments -/// -/// * `idx` - The index of the current substring. -/// * `ranges` - A slice of references to tuples representing state transitions. -/// -/// # Returns -/// -/// A String containing the generated Circom code for previous states. -fn write_prev_states(idx: usize, ranges: &[&(usize, usize)]) -> String { - let mut prev_states = String::new(); - for (trans_idx, &(cur, _)) in ranges.iter().enumerate() { - if *cur == 0 { - prev_states += &format!( - "\t\tprev_states{idx}[{trans_idx}][i] <== from_zero_enabled[i+1] * states[i+1][{cur}];\n" - ); - } else { - prev_states += &format!( - "\t\tprev_states{idx}[{trans_idx}][i] <== (1 - from_zero_enabled[i+1]) * states[i+1][{cur}];\n" - ); - } - } - prev_states -} - -/// Writes the substring logic for the Circom circuit. -/// -/// This function generates the logic to compute if a substring is present. -/// -/// # Arguments -/// -/// * `idx` - The index of the current substring. -/// * `ranges` - A slice of references to tuples representing state transitions. -/// -/// # Returns -/// -/// A String containing the generated Circom code for substring logic. -fn write_is_substr(idx: usize, ranges: &[&(usize, usize)]) -> String { - let multi_or_inputs = ranges - .iter() - .enumerate() - .map(|(trans_idx, (_, next))| { - format!("prev_states{idx}[{trans_idx}][i] * states[i+2][{next}]") - }) - .collect::>() - .join(", "); - - format!( - "\t\tis_substr{idx}[i] <== MultiOR({})([{multi_or_inputs}]);\n", - ranges.len() - ) -} - -/// Writes the reveal logic for the Circom circuit. -/// -/// This function generates the logic to reveal a substring if it's present and consecutive. -/// -/// # Arguments -/// -/// * `idx` - The index of the current substring. -/// -/// # Returns -/// -/// A String containing the generated Circom code for reveal logic. -fn write_is_reveal_and_reveal(idx: usize) -> String { - let mut reveal = String::new(); - reveal += &format!( - "\t\tis_reveal{idx}[i] <== MultiAND(3)([out, is_substr{idx}[i], is_consecutive[i][2]]);\n" - ); - reveal += &format!("\t\treveal{idx}[i] <== in[i+1] * is_reveal{idx}[i];\n"); - reveal -} - -/// Writes the complete substring logic for the Circom circuit. -/// -/// This function combines all substring-related logic into a single block. -/// -/// # Arguments -/// -/// * `idx` - The index of the current substring. -/// * `ranges` - A slice of tuples representing state transitions. -/// -/// # Returns -/// -/// A String containing the generated Circom code for the complete substring logic. -fn write_substr_logic(idx: usize, ranges: &[(usize, usize)]) -> String { - let mut logic = String::new(); - logic += &format!("\tsignal prev_states{idx}[{}][msg_bytes];\n", ranges.len()); - logic += &format!("\tsignal is_substr{idx}[msg_bytes];\n"); - logic += &format!("\tsignal is_reveal{idx}[msg_bytes];\n"); - logic += &format!("\tsignal output reveal{idx}[msg_bytes];\n"); - logic += "\tfor (var i = 0; i < msg_bytes; i++) {\n"; - - let sorted_ranges = sort_ranges(ranges); - logic += &format!( - "\t\t // the {idx}-th substring transitions: {:?}\n", - sorted_ranges - ); - - logic += &write_prev_states(idx, &sorted_ranges); - logic += &write_is_substr(idx, &sorted_ranges); - logic += &write_is_reveal_and_reveal(idx); - - logic += "\t}\n"; - logic -} - -/// Sorts the ranges of state transitions. -/// -/// # Arguments -/// -/// * `ranges` - A slice of tuples representing state transitions. -/// -/// # Returns -/// -/// A Vec of references to the sorted ranges. -fn sort_ranges(ranges: &[(usize, usize)]) -> Vec<&(usize, usize)> { - let mut sorted = ranges.iter().collect::>(); - sorted.sort_by(|a, b| a.0.cmp(&b.0).then(a.1.cmp(&b.1))); - sorted -} - -/// Adds substring constraints to the Circom circuit. -/// -/// This function generates the logic for substring matching and consecutive state tracking. -/// -/// # Arguments -/// -/// * `regex_dfa` - A reference to the RegexAndDFA struct containing the DFA and substring information. -/// -/// # Returns -/// -/// A Result containing the generated Circom code as a String, or a CompilerError. -fn add_substrs_constraints(regex_dfa: &RegexAndDFA) -> Result { - let accepted_state = - get_accepted_state(®ex_dfa.dfa).ok_or(CompilerError::NoAcceptedState)?; - let mut circom = String::new(); - - circom += &write_consecutive_logic(accepted_state); - - circom += &format!( - "\t// substrings calculated: {:?}\n", - regex_dfa.substrings.substring_ranges - ); - - for (idx, ranges) in regex_dfa.substrings.substring_ranges.iter().enumerate() { - circom += &write_substr_logic(idx, &ranges.iter().copied().collect::>()); - } - - circom += "}"; - Ok(circom) -} - -/// Generates a Circom template file for the given regex and DFA. -/// -/// This function creates a Circom file containing the circuit logic for the regex matcher. -/// -/// # Arguments -/// -/// * `regex_and_dfa` - A reference to the RegexAndDFA struct containing the regex and DFA information. -/// * `circom_path` - The path where the generated Circom file should be saved. -/// * `template_name` - The name of the Circom template. -/// * `gen_substrs` - A boolean indicating whether to generate substring constraints. -/// -/// # Returns -/// -/// A Result indicating success or a CompilerError. -pub(crate) fn gen_circom_template( - regex_and_dfa: &RegexAndDFA, - circom_path: &Path, - template_name: &str, - gen_substrs: bool, -) -> Result<(), CompilerError> { - let circom = gen_circom_allstr( - ®ex_and_dfa.dfa, - template_name, - ®ex_and_dfa.regex_pattern, - regex_and_dfa.has_end_anchor, - )?; - - let mut file = File::create(circom_path)?; - file.write_all(circom.as_bytes())?; - - if gen_substrs { - let substrs = add_substrs_constraints(regex_and_dfa)?; - file.write_all(substrs.as_bytes())?; - } - - file.flush()?; - Ok(()) -} - -/// Generates a Circom circuit as a string for the given regex and DFA. -/// -/// This function creates a string containing the Circom circuit logic for the regex matcher. -/// -/// # Arguments -/// -/// * `regex_and_dfa` - A reference to the RegexAndDFA struct containing the regex and DFA information. -/// * `template_name` - The name of the Circom template. -/// -/// # Returns -/// -/// A Result containing the generated Circom code as a String, or a CompilerError. -pub(crate) fn gen_circom_string( - regex_and_dfa: &RegexAndDFA, - template_name: &str, -) -> Result { - let circom = gen_circom_allstr( - ®ex_and_dfa.dfa, - template_name, - ®ex_and_dfa.regex_pattern, - regex_and_dfa.has_end_anchor, - )?; - let substrs = add_substrs_constraints(regex_and_dfa)?; - let result = circom + &substrs; - Ok(result) -} diff --git a/packages/compiler/src/dfa_tests.json b/packages/compiler/src/dfa_tests.json deleted file mode 100644 index 056ebc7b..00000000 --- a/packages/compiler/src/dfa_tests.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", - "pass": ["user@example.com", "john.doe123@sub.domain.co.uk"], - "fail": ["@example.com", "user@.com", "user@com", "user@example.c"] - }, - { - "regex": "^\\d{3}-\\d{3}-\\d{4}$", - "pass": ["123-456-7890", "000-000-0000"], - "fail": ["123-45-6789", "12-345-6789", "123-456-789", "abc-def-ghij"] - }, - { - "regex": "^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$", - "pass": [ - "http://example.com", - "https://sub.domain.co.uk/page", - "www.example.com" - ], - "fail": ["htp://invalid", "http://.com", "https://example."] - }, - { - "regex": "^[0-9]{5}(-[0-9]{4})?$", - "pass": ["12345", "12345-6789"], - "fail": ["1234", "123456", "12345-", "12345-67890"] - }, - { - "regex": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$", - "pass": ["#123abc", "#FFF", "#000000"], - "fail": ["123abc", "#GGGGGG", "#FFG", "#F0F0F0F"] - }, - { - "regex": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$", - "pass": ["00:00", "23:59", "1:23", "12:34"], - "fail": ["24:00", "12:60", "1:2", "00:0"] - }, - { - "regex": "^[a-zA-Z]{2,}\\s[a-zA-Z]{1,}'?-?[a-zA-Z]{2,}\\s?([a-zA-Z]{1,})?$", - "pass": ["John Doe", "Mary Jane", "Robert O'Neill", "Sarah Jane-Smith"], - "fail": ["J D", "John", "John Doe", "12John Doe"] - } -] diff --git a/packages/compiler/src/errors.rs b/packages/compiler/src/errors.rs deleted file mode 100644 index bd785b76..00000000 --- a/packages/compiler/src/errors.rs +++ /dev/null @@ -1,29 +0,0 @@ -use thiserror::Error; - -#[derive(Error, Debug)] -pub enum CompilerError { - #[error("Failed to open file: {0}")] - FileOpenError(#[from] std::io::Error), - #[error("Failed to parse JSON: {0}")] - JsonParseError(#[from] serde_json::Error), - #[error("{0}")] - GenericError(String), - #[error( - "Failed to build DFA for regex: \"{regex}\", please check your regex. Error: {source}" - )] - BuildError { - regex: String, - #[source] - source: regex_automata::dfa::dense::BuildError, - }, - #[error("Error in Regex: {0}")] - RegexError(#[from] regex::Error), - #[error("Parse Error: {0}")] - ParseError(String), - #[error("Graph Error: {0}")] - GraphError(String), - #[error("No accepted state found in DFA")] - NoAcceptedState, - #[error("Accept Nodes Error: {0}")] - AcceptNodesError(String), -} diff --git a/packages/compiler/src/halo2.rs b/packages/compiler/src/halo2.rs deleted file mode 100644 index d8e20481..00000000 --- a/packages/compiler/src/halo2.rs +++ /dev/null @@ -1,96 +0,0 @@ -use crate::{ - errors::CompilerError, - regex::{get_accepted_state, get_max_state}, - structs::RegexAndDFA, -}; -use std::{ - fs::File, - io::{BufWriter, Write}, - path::PathBuf, -}; - -/// Converts a RegexAndDFA structure to a text representation of the DFA. -/// -/// # Arguments -/// -/// * `regex_and_dfa` - A reference to the RegexAndDFA structure. -/// -/// # Returns -/// -/// A String containing the text representation of the DFA. -fn dfa_to_regex_def_text(regex_and_dfa: &RegexAndDFA) -> String { - let accepted_state = get_accepted_state(®ex_and_dfa.dfa).unwrap(); - let max_state = get_max_state(®ex_and_dfa.dfa); - let mut text = format!("0\n{}\n{}\n", accepted_state, max_state); - - for (i, state) in regex_and_dfa.dfa.states.iter().enumerate() { - for (next_state, chars) in state.transitions.iter() { - for &char in chars { - text += &format!("{} {} {}\n", i, next_state, char as u8); - } - } - } - text -} - -/// Generates Halo2 tables from a RegexAndDFA structure. -/// -/// # Arguments -/// -/// * `regex_and_dfa` - A reference to the RegexAndDFA structure. -/// * `allstr_file_path` - The path where the main DFA definition will be written. -/// * `substr_file_paths` - A slice of paths where substring definitions will be written. -/// * `gen_substrs` - A boolean indicating whether to generate substring files. -/// -/// # Returns -/// -/// A Result indicating success or containing a CompilerError. -pub(crate) fn gen_halo2_tables( - regex_and_dfa: &RegexAndDFA, - allstr_file_path: &PathBuf, - substr_file_paths: &[PathBuf], - gen_substrs: bool, -) -> Result<(), CompilerError> { - let regex_text = dfa_to_regex_def_text(regex_and_dfa); - std::fs::write(allstr_file_path, regex_text)?; - - if !gen_substrs { - return Ok(()); - } - - for (idx, defs) in regex_and_dfa.substrings.substring_ranges.iter().enumerate() { - let mut writer = BufWriter::new(File::create(&substr_file_paths[idx])?); - let (starts, ends) = ®ex_and_dfa - .substrings - .substring_boundaries - .as_ref() - .unwrap()[idx]; - - writeln!( - writer, - "{}", - starts - .iter() - .map(ToString::to_string) - .collect::>() - .join(" ") - )?; - writeln!( - writer, - "{}", - ends.iter() - .map(ToString::to_string) - .collect::>() - .join(" ") - )?; - - let mut sorted_defs: Vec<_> = defs.iter().collect(); - sorted_defs.sort_unstable_by_key(|&(start, end)| (*start, *end)); - - for &(cur, next) in &sorted_defs { - writeln!(writer, "{} {}", cur, next)?; - } - } - - Ok(()) -} diff --git a/packages/compiler/src/lib.rs b/packages/compiler/src/lib.rs deleted file mode 100644 index 2767c52e..00000000 --- a/packages/compiler/src/lib.rs +++ /dev/null @@ -1,220 +0,0 @@ -mod circom; -mod errors; -mod halo2; -mod regex; -mod structs; -mod wasm; - -use circom::gen_circom_template; -use errors::CompilerError; -use halo2::gen_halo2_tables; -use itertools::Itertools; -use regex::{create_regex_and_dfa_from_str_and_defs, get_regex_and_dfa}; -use std::{fs::File, path::PathBuf}; -use structs::{RegexAndDFA, SubstringDefinitionsJson}; - -pub use structs::{DecomposedRegexConfig, RegexPartConfig}; - -/// Loads substring definitions from a JSON file or creates a default one. -/// -/// # Arguments -/// -/// * `substrs_json_path` - An optional path to the JSON file containing substring definitions. -/// -/// # Returns -/// -/// A `Result` containing either the loaded `SubstringDefinitionsJson` or a `CompilerError`. -fn load_substring_definitions_json( - substrs_json_path: Option<&str>, -) -> Result { - match substrs_json_path { - Some(path) => { - let file = File::open(path)?; - serde_json::from_reader(file).map_err(CompilerError::JsonParseError) - } - None => Ok(SubstringDefinitionsJson { - transitions: vec![vec![]], - }), - } -} - -/// Generates output files for Halo2 and Circom based on the provided regex and DFA. -/// -/// # Arguments -/// -/// * `regex_and_dfa` - The `RegexAndDFA` struct containing the regex pattern and DFA. -/// * `halo2_dir_path` - An optional path to the directory for Halo2 output files. -/// * `circom_file_path` - An optional path to the Circom output file. -/// * `circom_template_name` - An optional name for the Circom template. -/// * `num_public_parts` - The number of public parts in the regex. -/// * `gen_substrs` - A boolean indicating whether to generate substrings. -/// -/// # Returns -/// -/// A `Result` indicating success or a `CompilerError`. -fn generate_outputs( - regex_and_dfa: &RegexAndDFA, - halo2_dir_path: Option<&str>, - circom_file_path: Option<&str>, - circom_template_name: Option<&str>, - num_public_parts: usize, - gen_substrs: bool, -) -> Result<(), CompilerError> { - if let Some(halo2_dir_path) = halo2_dir_path { - let halo2_dir_path = PathBuf::from(halo2_dir_path); - let allstr_file_path = halo2_dir_path.join("allstr.txt"); - let substr_file_paths = (0..num_public_parts) - .map(|idx| halo2_dir_path.join(format!("substr_{}.txt", idx))) - .collect_vec(); - - gen_halo2_tables( - regex_and_dfa, - &allstr_file_path, - &substr_file_paths, - gen_substrs, - )?; - } - - if let Some(circom_file_path) = circom_file_path { - let circom_file_path = PathBuf::from(circom_file_path); - let circom_template_name = circom_template_name - .expect("circom template name must be specified if circom file path is specified"); - - gen_circom_template( - regex_and_dfa, - &circom_file_path, - &circom_template_name, - gen_substrs, - )?; - } - - Ok(()) -} - -/// Generates outputs from a decomposed regex configuration file. -/// -/// # Arguments -/// -/// * `decomposed_regex_path` - The path to the decomposed regex configuration file. -/// * `halo2_dir_path` - An optional path to the directory for Halo2 output files. -/// * `circom_file_path` - An optional path to the Circom output file. -/// * `circom_template_name` - An optional name for the Circom template. -/// * `gen_substrs` - An optional boolean indicating whether to generate substrings. -/// -/// # Returns -/// -/// A `Result` indicating success or a `CompilerError`. -pub fn gen_from_decomposed( - decomposed_regex_path: &str, - halo2_dir_path: Option<&str>, - circom_file_path: Option<&str>, - circom_template_name: Option<&str>, - gen_substrs: Option, -) -> Result<(), CompilerError> { - let mut decomposed_regex_config: DecomposedRegexConfig = - serde_json::from_reader(File::open(decomposed_regex_path)?)?; - let gen_substrs = gen_substrs.unwrap_or(false); - - let regex_and_dfa = get_regex_and_dfa(&mut decomposed_regex_config)?; - - let num_public_parts = decomposed_regex_config - .parts - .iter() - .filter(|part| part.is_public) - .count(); - - generate_outputs( - ®ex_and_dfa, - halo2_dir_path, - circom_file_path, - circom_template_name, - num_public_parts, - gen_substrs, - )?; - - Ok(()) -} - -/// Generates outputs from a raw regex string and optional substring definitions. -/// -/// # Arguments -/// -/// * `raw_regex` - The raw regex string. -/// * `substrs_json_path` - An optional path to the JSON file containing substring definitions. -/// * `halo2_dir_path` - An optional path to the directory for Halo2 output files. -/// * `circom_file_path` - An optional path to the Circom output file. -/// * `template_name` - An optional name for the Circom template. -/// * `gen_substrs` - An optional boolean indicating whether to generate substrings. -/// -/// # Returns -/// -/// A `Result` indicating success or a `CompilerError`. -pub fn gen_from_raw( - raw_regex: &str, - substrs_json_path: Option<&str>, - halo2_dir_path: Option<&str>, - circom_file_path: Option<&str>, - template_name: Option<&str>, - gen_substrs: Option, -) -> Result<(), CompilerError> { - let substrs_defs_json = load_substring_definitions_json(substrs_json_path)?; - let num_public_parts = substrs_defs_json.transitions.len(); - - let regex_and_dfa = create_regex_and_dfa_from_str_and_defs(raw_regex, substrs_defs_json)?; - - let gen_substrs = gen_substrs.unwrap_or(true); - - generate_outputs( - ®ex_and_dfa, - halo2_dir_path, - circom_file_path, - template_name, - num_public_parts, - gen_substrs, - )?; - - Ok(()) -} - -/// Generates Circom output from a decomposed regex configuration. -/// -/// # Arguments -/// -/// * `decomposed_regex` - A mutable reference to the `DecomposedRegexConfig` containing the regex parts. -/// * `circom_file_path` - An optional path to the Circom output file. -/// * `circom_template_name` - An optional name for the Circom template. -/// * `gen_substrs` - An optional boolean indicating whether to generate substrings. -/// -/// # Returns -/// -/// A `Result` indicating success or a `CompilerError`. -pub fn gen_circom_from_decomposed_regex( - decomposed_regex: &mut DecomposedRegexConfig, - circom_file_path: Option<&str>, - circom_template_name: Option<&str>, - gen_substrs: Option, -) -> Result<(), CompilerError> { - let gen_substrs = gen_substrs.unwrap_or(false); - - let regex_and_dfa = get_regex_and_dfa(decomposed_regex)?; - - let num_public_parts = decomposed_regex - .parts - .iter() - .filter(|part| part.is_public) - .count(); - - generate_outputs( - ®ex_and_dfa, - None, - circom_file_path, - circom_template_name, - num_public_parts, - gen_substrs, - )?; - - Ok(()) -} - -#[cfg(target_arch = "wasm32")] -pub use crate::wasm::*; diff --git a/packages/compiler/src/regex.rs b/packages/compiler/src/regex.rs deleted file mode 100644 index d3571b46..00000000 --- a/packages/compiler/src/regex.rs +++ /dev/null @@ -1,1186 +0,0 @@ -use crate::{ - errors::CompilerError, - structs::{ - DFAGraph, DFAGraphInfo, DFAStateInfo, DFAStateNode, RegexAndDFA, RegexPartConfig, - SubstringDefinitions, SubstringDefinitionsJson, - }, - DecomposedRegexConfig, -}; -use regex::Regex; -use regex_automata::dfa::{ - dense::{Config, DFA}, - StartKind, -}; -use std::{ - collections::{BTreeMap, BTreeSet, VecDeque}, - num::ParseIntError, -}; - -/// Creates a DFA configuration with specific settings. -/// -/// # Returns -/// -/// A `Config` object with minimization, anchored start, no byte classes, and acceleration enabled. -fn create_dfa_config() -> Config { - DFA::config() - .minimize(true) - .start_kind(StartKind::Anchored) - .byte_classes(false) - .accelerate(true) -} - -/// Finds the index of the first caret (^) in a regex string that is not inside parentheses. -/// -/// # Arguments -/// -/// * `regex` - A string slice containing the regex pattern. -/// -/// # Returns -/// -/// An `Option` containing the index of the caret if found, or `None` if not found. -fn find_caret_index(regex: &str) -> Option { - let regex_bytes = regex.as_bytes(); - let mut is_in_parenthesis = false; - let mut caret_found = false; - let mut idx = 0; - - while idx < regex_bytes.len() { - match regex_bytes[idx] { - b'\\' => { - idx += 2; - } - b'(' => { - is_in_parenthesis = true; - idx += 1; - } - b'[' => { - idx += 2; - } - b')' => { - debug_assert!(is_in_parenthesis, "Unmatched parenthesis"); - is_in_parenthesis = false; - idx += 1; - if caret_found { - break; - } - } - b'^' => { - caret_found = true; - idx += 1; - if !is_in_parenthesis { - break; - } - } - _ => { - idx += 1; - } - } - } - - if caret_found { - Some(idx) - } else { - None - } -} - -/// Processes the caret (^) in a regex, splitting it into two parts if necessary. -/// -/// # Arguments -/// -/// * `decomposed_regex` - A mutable reference to a `DecomposedRegexConfig`. -/// -/// # Returns -/// -/// A `Result` containing an `Option` with the caret position, or a `CompilerError`. -fn process_caret_in_regex( - decomposed_regex: &mut DecomposedRegexConfig, -) -> Result, CompilerError> { - let caret_position = find_caret_index(&decomposed_regex.parts[0].regex_def); - - if let Some(index) = caret_position { - let caret_regex = decomposed_regex.parts[0].regex_def[0..index].to_string(); - decomposed_regex.parts.push_front(RegexPartConfig { - is_public: false, - regex_def: caret_regex, - }); - decomposed_regex.parts[1].regex_def = - decomposed_regex.parts[1].regex_def[index..].to_string(); - } - - Ok(caret_position) -} - -/// Validates the end anchor ($) in a regex part. -/// -/// # Arguments -/// -/// * `decomposed_regex` - A reference to a `DecomposedRegexConfig`. -/// * `idx` - The index of the current regex part. -/// * `regex` - A reference to the current `RegexPartConfig`. -/// -/// # Returns -/// -/// A `Result` containing a boolean indicating if the part has a valid end anchor, or a `CompilerError`. -fn validate_end_anchor( - decomposed_regex: &DecomposedRegexConfig, - idx: usize, - regex: &RegexPartConfig, -) -> Result { - let is_last_part = idx == decomposed_regex.parts.len() - 1; - let ends_with_dollar = regex.regex_def.ends_with('$'); - - if ends_with_dollar && !is_last_part { - return Err(CompilerError::GenericError( - "Invalid regex, $ can only be at the end of the regex".to_string(), - )); - } - - Ok(is_last_part && ends_with_dollar) -} - -/// Parses DFA states from a string output and populates a `DFAGraphInfo` structure. -/// -/// # Arguments -/// -/// * `output` - A string slice containing the DFA state information. -/// * `dfa_info` - A mutable reference to a `DFAGraphInfo` to be populated with parsed states. -/// -/// # Returns -/// -/// A `Result` containing `()` if parsing is successful, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Uses regex to match state definitions and transitions in the input string. -/// - Iterates over state matches, creating `DFAStateInfo` objects for each state. -/// - Parses transitions for each state and adds them to the state's edges. -/// - Populates `dfa_info.states` with the parsed states. -fn parse_states(output: &str, dfa_info: &mut DFAGraphInfo) -> Result<(), CompilerError> { - let state_re = Regex::new(r"\*?(\d+): ((.+?) => (\d+),?)+")?; - let transition_re = Regex::new( - r"\s+[^=]+\s*=>\s*(\d+)+\s*|\s+=+\s*=>\s*(\d+)+|\s+=-[^=]+=>\s*\s*(\d+)+\s*|\s+[^=]+-=\s*=>\s*(\d+)+\s*", - )?; - - for captures in state_re.captures_iter(output) { - let src = captures[1] - .parse::() - .map_err(|_| CompilerError::ParseError("Failed to parse state ID".to_string()))?; - - let mut state = DFAStateInfo { - source: src, - typ: if captures[0].starts_with('*') { - "accept".to_string() - } else { - String::new() - }, - edges: BTreeMap::new(), - }; - - for transition in transition_re.captures_iter(&captures[0]) { - parse_transition(&mut state, &transition[0])?; - } - - dfa_info.states.push(state); - } - - Ok(()) -} - -/// Parses a single transition from a string and adds it to the DFA state. -/// -/// # Arguments -/// -/// * `state` - A mutable reference to the `DFAStateInfo` to which the transition will be added. -/// * `transition` - A string slice containing the transition information. -/// -/// # Returns -/// -/// A `Result` containing `()` if parsing is successful, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Splits the transition string into source and destination parts. -/// - Processes the source string to handle special character cases. -/// - Parses the destination as a usize. -/// - Adds the parsed transition to the state's edges. -fn parse_transition(state: &mut DFAStateInfo, transition: &str) -> Result<(), CompilerError> { - let parts: Vec<&str> = transition.split("=>").collect(); - if parts.len() != 2 { - return Err(CompilerError::ParseError( - "Invalid transition format".to_string(), - )); - } - - let mut src = parts[0].trim().to_string(); - if src.len() > 2 && src.chars().nth(2) == Some('\\') && src.chars().nth(3) != Some('x') { - src = format!("{}{}", &src[0..2], &src[3..]); - } - - let dst = parts[1] - .trim() - .parse::() - .map_err(|_| CompilerError::ParseError("Failed to parse destination state".to_string()))?; - - state.edges.insert(src, dst); - Ok(()) -} - -/// Processes EOI (End of Input) transitions in the DFA graph. -/// -/// Removes EOI transitions and marks their source states as accept states. -fn handle_eoi_transitions(dfa_info: &mut DFAGraphInfo) { - for state in &mut dfa_info.states { - if let Some(_) = state.edges.get("EOI") { - state.typ = String::from("accept"); - state.edges.remove("EOI"); - } - } -} - -/// Finds the start state in the DFA output string. -/// -/// # Arguments -/// -/// * `output` - A string slice containing the DFA output. -/// -/// # Returns -/// -/// A `Result` containing the start state ID as `usize`, or a `CompilerError` if not found. -fn find_start_state(output: &str) -> Result { - let start_state_re = Regex::new(r"START-GROUP\(anchored\)[\s*\w*\=>]*Text => (\d+)")?; - start_state_re - .captures(output) - .and_then(|cap| cap[1].parse::().ok()) - .ok_or_else(|| CompilerError::ParseError("Failed to find start state".to_string())) -} - -/// Sorts and renames states in a DFA graph, starting from a given start state. -/// -/// # Arguments -/// -/// * `dfa_info` - A reference to the original `DFAGraphInfo`. -/// * `start_state` - The ID of the start state. -/// -/// # Returns -/// -/// A new `DFAGraphInfo` with sorted and renamed states. -/// -/// # Function Behavior -/// -/// 1. Performs a Breadth-First Search (BFS) to sort states, starting from the start state. -/// 2. Creates a mapping of old state IDs to new state IDs. -/// 3. Renames states and updates their edges according to the new mapping. -fn sort_and_rename_states(dfa_info: &DFAGraphInfo, start_state: usize) -> DFAGraphInfo { - let mut sorted_states = Vec::new(); - let mut visited = BTreeSet::new(); - let mut queue = VecDeque::from([start_state]); - - // BFS to sort states - while let Some(state_id) = queue.pop_front() { - if visited.insert(state_id) { - if let Some(state) = dfa_info.states.iter().find(|s| s.source == state_id) { - sorted_states.push(state.clone()); - queue.extend(state.edges.values().filter(|&dst| !visited.contains(dst))); - } - } - } - - // Create mapping of old state IDs to new state IDs - let state_map: BTreeMap<_, _> = sorted_states - .iter() - .enumerate() - .map(|(new_id, state)| (state.source, new_id)) - .collect(); - - // Rename states and update edges - let renamed_states = sorted_states - .into_iter() - .enumerate() - .map(|(new_id, mut state)| { - state.source = new_id; - for dst in state.edges.values_mut() { - *dst = *state_map.get(dst).unwrap_or(dst); - } - state - }) - .collect(); - - DFAGraphInfo { - states: renamed_states, - } -} - -/// Creates a mapping of special character representations to their ASCII values. -/// -/// # Returns -/// -/// A `BTreeMap` where keys are string representations of special characters, -/// and values are their corresponding ASCII byte values. -fn create_special_char_mappings() -> BTreeMap<&'static str, u8> { - [ - ("\\n", 10), - ("\\r", 13), - ("\\t", 9), - ("\\v", 11), - ("\\f", 12), - ("\\0", 0), - ("\\\"", 34), - ("\\'", 39), - ("\\\\", 92), - ("' '", 32), - ] - .iter() - .cloned() - .collect() -} - -/// Processes a range edge in the DFA graph, adding all characters in the range to the edge set. -/// -/// # Arguments -/// -/// * `key` - The string representation of the range transition (e.g., "a-z"). -/// * `value` - The destination state ID. -/// * `edges` - A mutable reference to the map of edges. -/// * `special_char_mappings` - A reference to the special character mappings. -/// * `re` - A reference to the compiled Regex for parsing ranges. -/// -/// # Returns -/// -/// A `Result` containing `()` if successful, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Extracts start and end characters of the range using the provided regex. -/// - Parses start and end characters to their byte values. -/// - Adds all characters in the range to the edge set for the given destination state. -fn process_range_edge( - key: &str, - value: usize, - edges: &mut BTreeMap>, - special_char_mappings: &BTreeMap<&str, u8>, - re: &Regex, -) -> Result<(), CompilerError> { - let capture = re - .captures(key) - .ok_or_else(|| CompilerError::ParseError("Failed to capture range".to_string()))?; - let start_index = parse_char(&capture[1], special_char_mappings)?; - let end_index = parse_char(&capture[2], special_char_mappings)?; - let char_range: Vec = (start_index..=end_index).collect(); - - edges - .entry(value) - .or_insert_with(BTreeSet::new) - .extend(char_range); - Ok(()) -} - -/// Processes a single character edge in the DFA graph. -/// -/// # Arguments -/// -/// * `key` - The string representation of the character. -/// * `value` - The destination state ID. -/// * `edges` - A mutable reference to the map of edges. -/// * `special_char_mappings` - A reference to the special character mappings. -/// -/// # Returns -/// -/// A `Result` containing `()` if successful, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Parses the character to its byte value. -/// - Adds the byte to the edge set for the given destination state. -fn process_single_edge( - key: &str, - value: usize, - edges: &mut BTreeMap>, - special_char_mappings: &BTreeMap<&str, u8>, -) -> Result<(), CompilerError> { - let index = parse_char(key, special_char_mappings)?; - edges - .entry(value) - .or_insert_with(BTreeSet::new) - .insert(index); - Ok(()) -} - -/// Processes an edge in the DFA graph, handling both range and single character transitions. -/// -/// # Arguments -/// -/// * `key` - The string representation of the transition. -/// * `value` - The destination state ID. -/// * `edges` - A mutable reference to the map of edges. -/// * `special_char_mappings` - A reference to the special character mappings. -/// -/// # Returns -/// -/// A `Result` containing `()` if successful, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Checks if the key represents a range (e.g., "a-z") or a single character. -/// - Delegates to `process_range_edge` or `process_single_edge` accordingly. -fn process_edge( - key: &str, - value: usize, - edges: &mut BTreeMap>, - special_char_mappings: &BTreeMap<&str, u8>, -) -> Result<(), CompilerError> { - let re = Regex::new(r"(.+)-(.+)")?; - if re.is_match(key) { - process_range_edge(key, value, edges, special_char_mappings, &re)?; - } else { - process_single_edge(key, value, edges, special_char_mappings)?; - } - Ok(()) -} - -/// Parses a character representation into its corresponding byte value. -/// -/// # Arguments -/// -/// * `s` - The string representation of the character. -/// * `special_char_mappings` - A reference to the special character mappings. -/// -/// # Returns -/// -/// A `Result` containing the parsed byte value, or a `CompilerError` if parsing fails. -/// -/// # Function Behavior -/// -/// - Handles hexadecimal representations (e.g., "\x41"). -/// - Looks up special characters in the provided mappings. -/// - Converts single-character strings to their byte value. -/// - Returns an error for invalid inputs. -fn parse_char(s: &str, special_char_mappings: &BTreeMap<&str, u8>) -> Result { - if s.starts_with("\\x") { - u8::from_str_radix(&s[2..], 16) - .map_err(|e: ParseIntError| CompilerError::ParseError(e.to_string())) - } else if let Some(&value) = special_char_mappings.get(s) { - Ok(value) - } else if s.len() == 1 { - Ok(s.as_bytes()[0]) - } else { - Err(CompilerError::ParseError(format!( - "Invalid character: {}", - s - ))) - } -} - -/// Processes all edges for a state in the DFA graph. -/// -/// # Arguments -/// -/// * `state_edges` - A reference to a map of edge labels to destination state IDs. -/// -/// # Returns -/// -/// A `Result` containing a map of destination state IDs to sets of byte values, -/// or a `CompilerError` if processing fails. -/// -/// # Function Behavior -/// -/// - Creates special character mappings. -/// - Iterates over all edges, processing each one. -/// - Handles the special case of space character representation. -fn process_state_edges( - state_edges: &BTreeMap, -) -> Result>, CompilerError> { - let mut edges = BTreeMap::new(); - let special_char_mappings = create_special_char_mappings(); - - for (key, value) in state_edges { - let key = if key == "' '" { " " } else { key }; - process_edge(key, *value, &mut edges, &special_char_mappings)?; - } - - Ok(edges) -} - -/// Converts a DFA (Deterministic Finite Automaton) to a DFAGraph structure. -/// -/// # Arguments -/// -/// * `dfa` - The DFA to convert. -/// -/// # Returns -/// -/// A `Result` containing the converted `DFAGraph`, or a `CompilerError` if conversion fails. -/// -/// # Function Behavior -/// -/// 1. Converts the DFA to a string representation. -/// 2. Parses states from the string representation. -/// 3. Handles EOI (End of Input) transitions. -/// 4. Finds the start state and sorts/renames states accordingly. -/// 5. Processes edges for each state and constructs the final graph. -fn convert_dfa_to_graph(dfa: DFA>) -> Result { - let dfa_str = format!("{:?}", dfa); - - let mut dfa_info = DFAGraphInfo { states: Vec::new() }; - - parse_states(&dfa_str, &mut dfa_info)?; - - handle_eoi_transitions(&mut dfa_info); - - let start_state = find_start_state(&dfa_str)?; - dfa_info = sort_and_rename_states(&mut dfa_info, start_state); - - let mut graph = DFAGraph { states: Vec::new() }; - for state in &dfa_info.states { - let edges = process_state_edges(&state.edges)?; - graph.states.push(DFAStateNode { - state_type: state.typ.clone(), - state_id: state.source, - transitions: edges, - }); - } - - Ok(graph) -} - -/// Modifies the DFA graph to handle the caret (^) anchor at the start of a regex. -/// -/// # Arguments -/// -/// * `graph` - A mutable reference to the DFAGraph to be modified. -/// -/// # Returns -/// -/// A `Result` containing `()` if successful, or a `CompilerError` if modification fails. -/// -/// # Function Behavior -/// -/// 1. Clears the state type of the start state. -/// 2. Finds the accept state in the graph. -/// 3. Adds a transition from the start state to the accept state with byte value 255. -fn modify_graph_for_caret(graph: &mut DFAGraph) -> Result<(), CompilerError> { - if let Some(start_state) = graph.states.get_mut(0) { - start_state.state_type.clear(); - } else { - return Err(CompilerError::GraphError( - "Start state not found".to_string(), - )); - } - - let accepted_state = graph - .states - .iter() - .find(|state| state.state_type == "accept") - .ok_or_else(|| CompilerError::GraphError("Accept state not found".to_string()))? - .clone(); - - if let Some(start_state) = graph.states.get_mut(0) { - start_state - .transitions - .entry(accepted_state.state_id) - .or_insert_with(BTreeSet::new) - .insert(255u8); - } - - Ok(()) -} - -/// Creates a simple DFA graph for the caret (^) anchor. -/// -/// # Returns -/// -/// A `DFAGraph` with two states: -/// 1. Start state (id: 0) with a transition to the accept state on byte 255. -/// 2. Accept state (id: 1) with no outgoing transitions. -fn create_simple_caret_graph() -> DFAGraph { - DFAGraph { - states: vec![ - DFAStateNode { - state_type: String::new(), - state_id: 0, - transitions: BTreeMap::from([(1, BTreeSet::from([255u8]))]), - }, - DFAStateNode { - state_type: "accept".to_string(), - state_id: 1, - transitions: BTreeMap::new(), - }, - ], - } -} - -/// Handles the caret (^) anchor in a regex by modifying the DFA graph accordingly. -/// -/// # Arguments -/// -/// * `idx` - The index of the current regex part. -/// * `caret_position` - The position of the caret in the regex, if present. -/// * `regex` - The current regex part configuration. -/// * `graph` - The DFA graph to be modified. -/// -/// # Returns -/// -/// A `Result` containing `()` if successful, or a `CompilerError` if modification fails. -/// -/// # Function Behavior -/// -/// - If it's the first regex part and a caret is present: -/// - Creates a simple caret graph if the regex is just "^". -/// - Otherwise, modifies the existing graph to handle the caret. -fn handle_caret_regex( - idx: usize, - caret_position: Option, - regex: &RegexPartConfig, - graph: &mut DFAGraph, -) -> Result<(), CompilerError> { - if idx == 0 && caret_position.is_some() { - if regex.regex_def == "^" { - *graph = create_simple_caret_graph(); - } else { - modify_graph_for_caret(graph)?; - } - } - Ok(()) -} - -/// Renames the states in a DFA graph, offsetting their IDs by a given base value. -/// -/// # Arguments -/// -/// * `dfa_graph` - The original DFA graph. -/// * `base` - The base offset for new state IDs. -/// -/// # Returns -/// -/// A new `DFAGraph` with renamed states. -/// -/// # Function Behavior -/// -/// 1. Creates a mapping of old state IDs to new state IDs. -/// 2. Constructs a new graph with updated state IDs and transitions. -/// 3. Preserves other properties of each state. -fn rename_states(dfa_graph: &DFAGraph, base: usize) -> DFAGraph { - let state_id_mapping: BTreeMap<_, _> = dfa_graph - .states - .iter() - .enumerate() - .map(|(i, state)| (state.state_id, i + base)) - .collect(); - - DFAGraph { - states: dfa_graph - .states - .iter() - .enumerate() - .map(|(i, state)| DFAStateNode { - state_id: i + base, - transitions: state - .transitions - .iter() - .map(|(key, value)| { - ( - *state_id_mapping.get(key).expect("State not found"), - value.clone(), - ) - }) - .collect(), - ..state.clone() - }) - .collect(), - } -} - -/// Collects accepting states from a DFA graph and their state IDs. -/// -/// # Arguments -/// -/// * `net_dfa` - A reference to the DFA graph. -/// -/// # Returns -/// -/// A tuple containing: -/// 1. A vector of references to accepting DFAStateNodes. -/// 2. A BTreeSet of state IDs of the accepting states. -fn collect_accepting_states(net_dfa: &DFAGraph) -> (Vec<&DFAStateNode>, BTreeSet) { - let mut accepting_states = Vec::new(); - let mut substring_starts = BTreeSet::new(); - - for state in &net_dfa.states { - if state.state_type == "accept" { - accepting_states.push(state); - substring_starts.insert(state.state_id); - } - } - - (accepting_states, substring_starts) -} - -/// Collects all edges in the DFA graph. -/// -/// # Arguments -/// -/// * `graph` - A reference to the DFAGraph. -/// -/// # Returns -/// -/// A `BTreeSet` containing tuples of (from_state, to_state) representing all edges in the graph. -fn collect_public_edges(graph: &DFAGraph) -> BTreeSet<(usize, usize)> { - graph - .states - .iter() - .flat_map(|state| { - state - .transitions - .keys() - .map(move |&key| (state.state_id, key)) - }) - .collect() -} - -/// Collects the state IDs of all accepting states in the DFA graph. -/// -/// # Arguments -/// -/// * `graph` - A reference to the DFAGraph. -/// -/// # Returns -/// -/// A `BTreeSet` containing the state IDs of all accepting states. -fn collect_substr_ends(graph: &DFAGraph) -> BTreeSet { - graph - .states - .iter() - .filter(|state| state.state_type == "accept") - .map(|state| state.state_id) - .collect() -} - -/// Updates the public edges of a DFA graph when merging multiple DFAs. -/// -/// This function modifies the set of public edges by replacing edges connected -/// to the maximum state index with edges connected to accepting states. -/// -/// # Arguments -/// -/// * `public_edges` - A mutable reference to a BTreeSet of (from, to) state pairs representing public edges. -/// * `max_state_index` - The maximum state index in the current DFA before merging. -/// * `accepting_states` - A slice of references to DFAStateNode representing accepting states. -/// -/// # Notes -/// -/// This function assumes that `max_state_index` represents a boundary between -/// two DFAs being merged, and updates edges accordingly. -fn update_public_edges( - public_edges: &mut BTreeSet<(usize, usize)>, - max_state_index: usize, - accepting_states: &[&DFAStateNode], -) { - if max_state_index == 0 { - return; - } - - let edges_to_update: Vec<_> = public_edges - .iter() - .filter(|&&(from, to)| (from == max_state_index || to == max_state_index)) - .cloned() - .collect(); - - for (from, to) in edges_to_update { - public_edges.remove(&(from, to)); - - if from == max_state_index && to == max_state_index { - for &accept_from in accepting_states { - for &accept_to in accepting_states { - public_edges.insert((accept_from.state_id, accept_to.state_id)); - } - } - } else if from == max_state_index { - for &accept_state in accepting_states { - public_edges.insert((accept_state.state_id, to)); - } - } else if to == max_state_index { - for &accept_state in accepting_states { - public_edges.insert((from, accept_state.state_id)); - } - } - } -} - -/// Processes a public regex part and updates the DFA graph accordingly. -/// -/// # Arguments -/// -/// * `regex` - A reference to the RegexPartConfig being processed. -/// * `net_dfa` - A reference to the cumulative DFAGraph built so far. -/// * `graph` - A reference to the DFAGraph for the current regex part. -/// * `previous_max_state_id` - The maximum state ID from the previous DFA. -/// -/// # Returns -/// -/// A tuple containing: -/// 1. A BTreeSet of public edges (as pairs of state IDs). -/// 2. A tuple of BTreeSets representing substring starts and ends. -fn process_public_regex( - regex: &RegexPartConfig, - net_dfa: &DFAGraph, - graph: &DFAGraph, - previous_max_state_id: usize, -) -> (BTreeSet<(usize, usize)>, (BTreeSet, BTreeSet)) { - if !regex.is_public { - return (BTreeSet::new(), (BTreeSet::new(), BTreeSet::new())); - } - - let (accepting_states, substring_starts) = collect_accepting_states(net_dfa); - let mut public_edges = collect_public_edges(graph); - let substring_ends = collect_substr_ends(graph); - - update_public_edges(&mut public_edges, previous_max_state_id, &accepting_states); - - (public_edges, (substring_starts, substring_ends)) -} - -/// Merges the edges from a source state into a target state, removing conflicting edges. -/// -/// # Arguments -/// -/// * `target_state` - A mutable reference to the DFAStateNode receiving the merged edges. -/// * `source_state` - A reference to the DFAStateNode providing the edges to be merged. -fn merge_edges(target_state: &mut DFAStateNode, source_state: &DFAStateNode) { - for (k, v) in &source_state.transitions { - for edge_value in v { - target_state.transitions.values_mut().for_each(|values| { - values.retain(|val| val != edge_value); - }); - } - target_state.transitions.insert(*k, v.clone()); - } -} - -/// Updates the state type of a target state based on the source state. -/// -/// # Arguments -/// -/// * `target_state` - A mutable reference to the DFAStateNode being updated. -/// * `source_state` - A reference to the DFAStateNode providing the new state type. -fn update_state_type(target_state: &mut DFAStateNode, source_state: &DFAStateNode) { - target_state.state_type.clear(); - if source_state.state_type == "accept" { - target_state.state_type = "accept".to_string(); - } -} - -/// Processes an accept state by merging edges and updating its state type. -/// -/// # Arguments -/// -/// * `accept_state` - A mutable reference to the accepting DFAStateNode being processed. -/// * `start_state` - A reference to the start DFAStateNode of the graph being merged. -fn process_accept_state(accept_state: &mut DFAStateNode, start_state: &DFAStateNode) { - merge_edges(accept_state, start_state); - update_state_type(accept_state, start_state); -} - -/// Adds a new DFA graph to an existing net DFA graph. -/// -/// # Arguments -/// -/// * `net_dfa` - A reference to the existing DFAGraph. -/// * `graph` - A reference to the new DFAGraph being added. -/// -/// # Returns -/// -/// A new DFAGraph that combines the existing net DFA and the new graph. -/// -/// # Panics -/// -/// Panics if the new graph has no states. -fn add_dfa(net_dfa: &DFAGraph, graph: &DFAGraph) -> DFAGraph { - if net_dfa.states.is_empty() { - return graph.clone(); - } - - let mut new_dfa = net_dfa.clone(); - let start_state = graph.states.first().expect("Graph has no states"); - - new_dfa - .states - .iter_mut() - .filter(|state| state.state_type == "accept") - .for_each(|state| process_accept_state(state, start_state)); - - new_dfa.states.extend( - graph - .states - .iter() - .filter(|state| state.state_id != start_state.state_id) - .cloned(), - ); - - new_dfa -} - -/// Constructs a RegexAndDFA structure from a decomposed regex configuration. -/// -/// This function processes each part of the decomposed regex, builds individual DFAs, -/// and combines them into a single DFA graph. It also handles special cases like -/// caret (^) and end anchor ($) in the regex. -/// -/// # Arguments -/// -/// * `decomposed_regex` - A mutable reference to a DecomposedRegexConfig. -/// -/// # Returns -/// -/// A Result containing a RegexAndDFA structure if successful, or a CompilerError if an error occurs. -pub(crate) fn get_regex_and_dfa( - decomposed_regex: &mut DecomposedRegexConfig, -) -> Result { - let mut net_dfa_graph = DFAGraph { states: Vec::new() }; - let mut substring_ranges_array = Vec::new(); - let mut substring_boundaries_array = Vec::new(); - - let config = create_dfa_config(); - - let caret_position = process_caret_in_regex(decomposed_regex)?; - - let mut end_anchor = false; - - for (i, regex) in decomposed_regex.parts.iter().enumerate() { - end_anchor = validate_end_anchor(decomposed_regex, i, regex)?; - - let dfa = DFA::builder() - .configure(config.clone()) - .build(&format!(r"^({})$", regex.regex_def.as_str())) - .map_err(|err| CompilerError::BuildError { - regex: regex.regex_def.clone(), - source: err, - })?; - - let mut dfa_graph = convert_dfa_to_graph(dfa)?; - - handle_caret_regex(i, caret_position, regex, &mut dfa_graph)?; - - let max_state_index = net_dfa_graph - .states - .iter() - .map(|state| state.state_id) - .max() - .unwrap_or(0); - - dfa_graph = rename_states(&dfa_graph, max_state_index); - - if regex.is_public { - let (public_edges, (substr_starts, substr_ends)) = - process_public_regex(regex, &net_dfa_graph, &dfa_graph, max_state_index); - substring_ranges_array.push(public_edges); - substring_boundaries_array.push((substr_starts, substr_ends)); - } - - net_dfa_graph = add_dfa(&net_dfa_graph, &dfa_graph); - } - - let regex_str = decomposed_regex - .parts - .iter() - .map(|regex| regex.regex_def.as_str()) - .collect::(); - - Ok(RegexAndDFA { - regex_pattern: regex_str, - dfa: net_dfa_graph, - has_end_anchor: end_anchor, - substrings: SubstringDefinitions { - substring_ranges: substring_ranges_array, - substring_boundaries: Some(substring_boundaries_array), - }, - }) -} - -/// Creates a DFA graph from a regex string. -/// -/// # Arguments -/// -/// * `regex` - A string slice containing the regex pattern. -/// -/// # Returns -/// -/// A `Result` containing a `DFAGraph` or a `CompilerError`. -fn create_dfa_graph_from_regex(regex: &str) -> Result { - let config = DFA::config() - .minimize(true) - .start_kind(StartKind::Anchored) - .byte_classes(false) - .accelerate(true); - - let dfa = DFA::builder() - .configure(config) - .build(&format!(r"^{}$", regex)) - .map_err(|e| CompilerError::BuildError { - regex: regex.to_string(), - source: e, - })?; - - convert_dfa_to_graph(dfa) -} - -/// Checks if a given string matches the regex pattern represented by the DFAGraph. -/// -/// # Arguments -/// -/// * `graph` - A reference to the DFAGraph obtained from the regex. -/// * `input` - The string to check against the regex pattern. -/// -/// # Returns -/// -/// A boolean indicating whether the input string matches the regex pattern. -fn match_string_with_dfa_graph(graph: &DFAGraph, input: &str) -> bool { - let mut current_state = 0; - - for &byte in input.as_bytes() { - let current_node = &graph.states[current_state]; - - let mut next_state = None; - for (&state, char_set) in ¤t_node.transitions { - if char_set.contains(&byte) { - next_state = Some(state); - break; - } - } - - match next_state { - Some(state) => { - current_state = state; - } - None => { - return false; - } // No valid transition found, input doesn't match - } - } - - // Check if the final state is an accepting state - graph.states[current_state].state_type == "accept" -} - -/// Creates a `RegexAndDFA` from a regex string and substring definitions. -/// -/// # Arguments -/// -/// * `regex_str` - A string slice containing the regex pattern. -/// * `substrs_defs_json` - A `SubstringDefinitionsJson` object. -/// -/// # Returns -/// -/// A `Result` containing a `RegexAndDFA` or a `CompilerError`. -pub(crate) fn create_regex_and_dfa_from_str_and_defs( - regex_str: &str, - substrs_defs_json: SubstringDefinitionsJson, -) -> Result { - let dfa = create_dfa_graph_from_regex(regex_str)?; - - let substring_ranges = substrs_defs_json - .transitions - .into_iter() - .map(|transitions| { - transitions - .into_iter() - .collect::>() - }) - .collect(); - - let substrings = SubstringDefinitions { - substring_ranges, - substring_boundaries: None, - }; - - Ok(RegexAndDFA { - regex_pattern: regex_str.to_string(), - dfa, - has_end_anchor: regex_str.ends_with('$'), - substrings, - }) -} - -/// Gets the index of the accepted state in a DFA graph. -/// -/// # Arguments -/// -/// * `dfa` - A reference to a `DFAGraph`. -/// -/// # Returns -/// -/// An `Option` containing the index of the accepted state, if found. -pub(crate) fn get_accepted_state(dfa: &DFAGraph) -> Option { - dfa.states - .iter() - .position(|state| state.state_type == "accept") -} - -/// Gets the maximum state ID in a DFA graph. -/// -/// # Arguments -/// -/// * `dfa` - A reference to a `DFAGraph`. -/// -/// # Returns -/// -/// A `usize` representing the maximum state ID. -pub(crate) fn get_max_state(dfa: &DFAGraph) -> usize { - dfa.states - .iter() - .map(|state| state.state_id) - .max() - .unwrap_or_default() -} - -mod dfa_test { - use crate::regex::{create_dfa_graph_from_regex, match_string_with_dfa_graph}; - use serde::{Deserialize, Serialize}; - use std::{env, fs::File, io::BufReader, path::PathBuf}; - - #[derive(Debug, Deserialize, Serialize)] - struct RegexTestCase { - pub regex: String, - pub pass: Vec, - pub fail: Vec, - } - - #[test] - fn test_dfa_graph() { - let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - path.push("src/dfa_tests.json"); - let file = File::open(path).expect("Failed to open test cases file"); - let reader = BufReader::new(file); - let test_cases: Vec = - serde_json::from_reader(reader).expect("Failed to parse JSON"); - - for case in test_cases { - let dfa_graph = match create_dfa_graph_from_regex(&case.regex) { - Ok(graph) => graph, - Err(e) => { - panic!( - "Failed to create DFA graph for regex '{}': {:?}", - case.regex, e - ); - } - }; - - for pass_case in case.pass { - assert!( - match_string_with_dfa_graph(&dfa_graph, &pass_case), - "Positive case failed for regex '{}': '{}'", - case.regex, - pass_case - ); - } - - for fail_case in case.fail { - assert!( - !match_string_with_dfa_graph(&dfa_graph, &fail_case), - "Negative case failed for regex '{}': '{}'", - case.regex, - fail_case - ); - } - } - } -} diff --git a/packages/compiler/src/structs.rs b/packages/compiler/src/structs.rs deleted file mode 100644 index 2fcdc78f..00000000 --- a/packages/compiler/src/structs.rs +++ /dev/null @@ -1,56 +0,0 @@ -use serde::{Deserialize, Serialize}; -use std::collections::{BTreeMap, BTreeSet, VecDeque}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct RegexPartConfig { - pub is_public: bool, - pub regex_def: String, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DecomposedRegexConfig { - pub parts: VecDeque, -} - -#[derive(Debug, Clone)] -pub struct DFAStateInfo { - pub typ: String, - pub source: usize, - pub edges: BTreeMap, -} - -#[derive(Debug)] -pub struct DFAGraphInfo { - pub states: Vec, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DFAStateNode { - pub state_type: String, - pub state_id: usize, - pub transitions: BTreeMap>, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct DFAGraph { - pub states: Vec, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct SubstringDefinitions { - pub substring_ranges: Vec>, - pub substring_boundaries: Option, BTreeSet)>>, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct RegexAndDFA { - pub regex_pattern: String, - pub dfa: DFAGraph, - pub has_end_anchor: bool, - pub substrings: SubstringDefinitions, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct SubstringDefinitionsJson { - pub transitions: Vec>, -} diff --git a/packages/compiler/src/wasm.rs b/packages/compiler/src/wasm.rs deleted file mode 100644 index 97ed29f1..00000000 --- a/packages/compiler/src/wasm.rs +++ /dev/null @@ -1,61 +0,0 @@ -use crate::*; -use console_error_panic_hook; -use serde_wasm_bindgen::from_value; -use std::panic; -use wasm_bindgen::prelude::*; - -use self::circom::gen_circom_string; - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn genFromDecomposed( - decomposedRegexJson: &str, - circomTemplateName: &str, -) -> Result { - let mut decomposed_regex_config: DecomposedRegexConfig = - serde_json::from_str(decomposedRegexJson).map_err(|e| { - JsValue::from_str(&format!("failed to parse decomposed_regex json: {}", e)) - })?; - - let regex_and_dfa = get_regex_and_dfa(&mut decomposed_regex_config).map_err(|e| { - JsValue::from_str(&format!( - "failed to convert the decomposed regex to dfa: {}", - e - )) - })?; - - gen_circom_string(®ex_and_dfa, circomTemplateName) - .map_err(|e| JsValue::from_str(&format!("Failed to generate Circom string: {}", e))) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn genFromRaw(rawRegex: &str, substrsJson: &str, circomTemplateName: &str) -> String { - let substrs_defs_json: SubstringDefinitionsJson = - serde_json::from_str(substrsJson).expect("failed to parse substrs json"); - let regex_and_dfa = create_regex_and_dfa_from_str_and_defs(rawRegex, substrs_defs_json) - .expect("failed to convert the raw regex and state transitions to dfa"); - gen_circom_string(®ex_and_dfa, circomTemplateName).expect("failed to generate circom") -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn genRegexAndDfa(decomposedRegex: JsValue) -> JsValue { - let mut decomposed_regex_config: DecomposedRegexConfig = - from_value(decomposedRegex).expect("failed to parse decomposed regex"); - let regex_and_dfa = get_regex_and_dfa(&mut decomposed_regex_config) - .expect("failed to convert the decomposed regex to dfa"); - let dfa_val_str = - serde_json::to_string(®ex_and_dfa).expect("failed to convert the dfa to json"); - JsValue::from_str(&dfa_val_str) -} - -#[wasm_bindgen] -#[allow(non_snake_case)] -pub fn genCircom(decomposedRegex: JsValue, circomTemplateName: &str) -> String { - let mut decomposed_regex_config: DecomposedRegexConfig = - from_value(decomposedRegex).expect("failed to parse decomposed regex"); - let regex_and_dfa = get_regex_and_dfa(&mut decomposed_regex_config) - .expect("failed to convert the decomposed regex to dfa"); - gen_circom_string(®ex_and_dfa, circomTemplateName).expect("failed to generate circom") -} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..79818d18 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4237 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" + integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== + dependencies: + "@babel/helper-validator-identifier" "^7.27.1" + js-tokens "^4.0.0" + picocolors "^1.1.1" + +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.27.2": + version "7.27.5" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz#7d0658ec1a8420fc866d1df1b03bea0e79934c82" + integrity sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.22.5", "@babel/core@^7.23.9": + version "7.27.4" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz#cc1fc55d0ce140a1828d1dd2a2eba285adbfb3ce" + integrity sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.27.3" + "@babel/helpers" "^7.27.4" + "@babel/parser" "^7.27.4" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.27.4" + "@babel/types" "^7.27.3" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.27.3", "@babel/generator@^7.7.2": + version "7.27.5" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz#3eb01866b345ba261b04911020cbe22dd4be8c8c" + integrity sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw== + dependencies: + "@babel/parser" "^7.27.5" + "@babel/types" "^7.27.3" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + +"@babel/helper-annotate-as-pure@^7.27.1": + version "7.27.3" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz#f31fd86b915fc4daf1f3ac6976c59be7084ed9c5" + integrity sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg== + dependencies: + "@babel/types" "^7.27.3" + +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.27.1", "@babel/helper-compilation-targets@^7.27.2": + version "7.27.2" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== + dependencies: + "@babel/compat-data" "^7.27.2" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz#5bee4262a6ea5ddc852d0806199eb17ca3de9281" + integrity sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-member-expression-to-functions" "^7.27.1" + "@babel/helper-optimise-call-expression" "^7.27.1" + "@babel/helper-replace-supers" "^7.27.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1" + "@babel/traverse" "^7.27.1" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz#05b0882d97ba1d4d03519e4bce615d70afa18c53" + integrity sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + regexpu-core "^6.2.0" + semver "^6.3.1" + +"@babel/helper-define-polyfill-provider@^0.6.3", "@babel/helper-define-polyfill-provider@^0.6.4": + version "0.6.4" + resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.4.tgz#15e8746368bfa671785f5926ff74b3064c291fab" + integrity sha512-jljfR1rGnXXNWnmQg2K3+bvhkxB51Rl32QRaOTuwwjviGrHzIbSc8+x9CpraDtbT7mfyjXObULP4w/adunNwAw== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + +"@babel/helper-member-expression-to-functions@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz#ea1211276be93e798ce19037da6f06fbb994fa44" + integrity sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA== + dependencies: + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helper-module-imports@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" + integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== + dependencies: + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helper-module-transforms@^7.27.1", "@babel/helper-module-transforms@^7.27.3": + version "7.27.3" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz#db0bbcfba5802f9ef7870705a7ef8788508ede02" + integrity sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg== + dependencies: + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + "@babel/traverse" "^7.27.3" + +"@babel/helper-optimise-call-expression@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz#c65221b61a643f3e62705e5dd2b5f115e35f9200" + integrity sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw== + dependencies: + "@babel/types" "^7.27.1" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" + integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== + +"@babel/helper-remap-async-to-generator@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz#4601d5c7ce2eb2aea58328d43725523fcd362ce6" + integrity sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-wrap-function" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/helper-replace-supers@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz#b1ed2d634ce3bdb730e4b52de30f8cccfd692bc0" + integrity sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.27.1" + "@babel/helper-optimise-call-expression" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/helper-skip-transparent-expression-wrappers@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz#62bb91b3abba8c7f1fec0252d9dbea11b3ee7a56" + integrity sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg== + dependencies: + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + +"@babel/helper-validator-identifier@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" + integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== + +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + +"@babel/helper-wrap-function@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz#b88285009c31427af318d4fe37651cd62a142409" + integrity sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ== + dependencies: + "@babel/template" "^7.27.1" + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helpers@^7.27.4": + version "7.27.6" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz#6456fed15b2cb669d2d1fabe84b66b34991d812c" + integrity sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug== + dependencies: + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.6" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.27.4", "@babel/parser@^7.27.5": + version "7.27.5" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz#ed22f871f110aa285a6fd934a0efed621d118826" + integrity sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg== + dependencies: + "@babel/types" "^7.27.3" + +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz#61dd8a8e61f7eb568268d1b5f129da3eee364bf9" + integrity sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/plugin-bugfix-safari-class-field-initializer-scope@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.27.1.tgz#43f70a6d7efd52370eefbdf55ae03d91b293856d" + integrity sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz#beb623bd573b8b6f3047bd04c32506adc3e58a72" + integrity sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz#e134a5479eb2ba9c02714e8c1ebf1ec9076124fd" + integrity sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1" + "@babel/plugin-transform-optional-chaining" "^7.27.1" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.27.1.tgz#bb1c25af34d75115ce229a1de7fa44bf8f955670" + integrity sha512-6BpaYGDavZqkI6yT+KSPdpZFfpnd68UKXbcjI9pJ13pvHhPrCKWOOLp+ysvMeA+DxnhuPpgIaRpxRxo5A9t5jw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.13": + version "7.12.13" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-assertions@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz#88894aefd2b03b5ee6ad1562a7c8e1587496aecd" + integrity sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-import-attributes@^7.24.7", "@babel/plugin-syntax-import-attributes@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" + integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.27.1", "@babel/plugin-syntax-jsx@^7.7.2": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" + integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" + integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-arrow-functions@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz#6e2061067ba3ab0266d834a9f94811196f2aba9a" + integrity sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-async-generator-functions@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.27.1.tgz#ca433df983d68e1375398e7ca71bf2a4f6fd89d7" + integrity sha512-eST9RrwlpaoJBDHShc+DS2SG4ATTi2MYNb4OxYkf3n+7eb49LWpnS+HSpVfW4x927qQwgk8A2hGNVaajAEw0EA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-remap-async-to-generator" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/plugin-transform-async-to-generator@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz#9a93893b9379b39466c74474f55af03de78c66e7" + integrity sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA== + dependencies: + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-remap-async-to-generator" "^7.27.1" + +"@babel/plugin-transform-block-scoped-functions@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz#558a9d6e24cf72802dd3b62a4b51e0d62c0f57f9" + integrity sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-block-scoping@^7.27.1": + version "7.27.5" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.27.5.tgz#98c37485d815533623d992fd149af3e7b3140157" + integrity sha512-JF6uE2s67f0y2RZcm2kpAUEbD50vH62TyWVebxwHAlbSdM49VqPz8t4a1uIjp4NIOIZ4xzLfjY5emt/RCyC7TQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-class-properties@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz#dd40a6a370dfd49d32362ae206ddaf2bb082a925" + integrity sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-class-static-block@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz#7e920d5625b25bbccd3061aefbcc05805ed56ce4" + integrity sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-classes@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.27.1.tgz#03bb04bea2c7b2f711f0db7304a8da46a85cced4" + integrity sha512-7iLhfFAubmpeJe/Wo2TVuDrykh/zlWXLzPNdL0Jqn/Xu8R3QQ8h9ff8FQoISZOsw74/HFqFI7NX63HN7QFIHKA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-compilation-targets" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-replace-supers" "^7.27.1" + "@babel/traverse" "^7.27.1" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz#81662e78bf5e734a97982c2b7f0a793288ef3caa" + integrity sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/template" "^7.27.1" + +"@babel/plugin-transform-destructuring@^7.27.1", "@babel/plugin-transform-destructuring@^7.27.3": + version "7.27.3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.27.3.tgz#3cc8299ed798d9a909f8d66ddeb40849ec32e3b0" + integrity sha512-s4Jrok82JpiaIprtY2nHsYmrThKvvwgHwjgd7UMiYhZaN0asdXNLr0y+NjTfkA7SyQE5i2Fb7eawUOZmLvyqOA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-dotall-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz#aa6821de864c528b1fecf286f0a174e38e826f4d" + integrity sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-duplicate-keys@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz#f1fbf628ece18e12e7b32b175940e68358f546d1" + integrity sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.27.1.tgz#5043854ca620a94149372e69030ff8cb6a9eb0ec" + integrity sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-dynamic-import@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz#4c78f35552ac0e06aa1f6e3c573d67695e8af5a4" + integrity sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-exponentiation-operator@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz#fc497b12d8277e559747f5a3ed868dd8064f83e1" + integrity sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-export-namespace-from@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz#71ca69d3471edd6daa711cf4dfc3400415df9c23" + integrity sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-for-of@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz#bc24f7080e9ff721b63a70ac7b2564ca15b6c40a" + integrity sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1" + +"@babel/plugin-transform-function-name@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz#4d0bf307720e4dce6d7c30fcb1fd6ca77bdeb3a7" + integrity sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ== + dependencies: + "@babel/helper-compilation-targets" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/plugin-transform-json-strings@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz#a2e0ce6ef256376bd527f290da023983527a4f4c" + integrity sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-literals@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz#baaefa4d10a1d4206f9dcdda50d7d5827bb70b24" + integrity sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-logical-assignment-operators@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz#890cb20e0270e0e5bebe3f025b434841c32d5baa" + integrity sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-member-expression-literals@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz#37b88ba594d852418e99536f5612f795f23aeaf9" + integrity sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-modules-amd@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz#a4145f9d87c2291fe2d05f994b65dba4e3e7196f" + integrity sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA== + dependencies: + "@babel/helper-module-transforms" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-modules-commonjs@^7.22.15", "@babel/plugin-transform-modules-commonjs@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz#8e44ed37c2787ecc23bdc367f49977476614e832" + integrity sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw== + dependencies: + "@babel/helper-module-transforms" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-modules-systemjs@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz#00e05b61863070d0f3292a00126c16c0e024c4ed" + integrity sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA== + dependencies: + "@babel/helper-module-transforms" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + "@babel/traverse" "^7.27.1" + +"@babel/plugin-transform-modules-umd@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz#63f2cf4f6dc15debc12f694e44714863d34cd334" + integrity sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w== + dependencies: + "@babel/helper-module-transforms" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz#f32b8f7818d8fc0cc46ee20a8ef75f071af976e1" + integrity sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-new-target@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz#259c43939728cad1706ac17351b7e6a7bea1abeb" + integrity sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-nullish-coalescing-operator@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz#4f9d3153bf6782d73dd42785a9d22d03197bc91d" + integrity sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-numeric-separator@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz#614e0b15cc800e5997dadd9bd6ea524ed6c819c6" + integrity sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-object-rest-spread@^7.27.2": + version "7.27.3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.27.3.tgz#ce130aa73fef828bc3e3e835f9bc6144be3eb1c0" + integrity sha512-7ZZtznF9g4l2JCImCo5LNKFHB5eXnN39lLtLY5Tg+VkR0jwOt7TBciMckuiQIOIW7L5tkQOCh3bVGYeXgMx52Q== + dependencies: + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/plugin-transform-destructuring" "^7.27.3" + "@babel/plugin-transform-parameters" "^7.27.1" + +"@babel/plugin-transform-object-super@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz#1c932cd27bf3874c43a5cac4f43ebf970c9871b5" + integrity sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-replace-supers" "^7.27.1" + +"@babel/plugin-transform-optional-catch-binding@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz#84c7341ebde35ccd36b137e9e45866825072a30c" + integrity sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-optional-chaining@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz#874ce3c4f06b7780592e946026eb76a32830454f" + integrity sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1" + +"@babel/plugin-transform-parameters@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.1.tgz#80334b54b9b1ac5244155a0c8304a187a618d5a7" + integrity sha512-018KRk76HWKeZ5l4oTj2zPpSh+NbGdt0st5S6x0pga6HgrjBOJb24mMDHorFopOOd6YHkLgOZ+zaCjZGPO4aKg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-private-methods@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz#fdacbab1c5ed81ec70dfdbb8b213d65da148b6af" + integrity sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-private-property-in-object@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz#4dbbef283b5b2f01a21e81e299f76e35f900fb11" + integrity sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-create-class-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-property-literals@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz#07eafd618800591e88073a0af1b940d9a42c6424" + integrity sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-react-display-name@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.27.1.tgz#43af31362d71f7848cfac0cbc212882b1a16e80f" + integrity sha512-p9+Vl3yuHPmkirRrg021XiP+EETmPMQTLr6Ayjj85RLNEbb3Eya/4VI0vAdzQG9SEAl2Lnt7fy5lZyMzjYoZQQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-react-jsx-development@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.27.1.tgz#47ff95940e20a3a70e68ad3d4fcb657b647f6c98" + integrity sha512-ykDdF5yI4f1WrAolLqeF3hmYU12j9ntLQl/AOG1HAS21jxyg1Q0/J/tpREuYLfatGdGmXp/3yS0ZA76kOlVq9Q== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.27.1" + +"@babel/plugin-transform-react-jsx@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.27.1.tgz#1023bc94b78b0a2d68c82b5e96aed573bcfb9db0" + integrity sha512-2KH4LWGSrJIkVf5tSiBFYuXDAoWRq2MMwgivCf+93dd0GQi8RXLjKA/0EvRnVV5G0hrHczsquXuD01L8s6dmBw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/plugin-syntax-jsx" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/plugin-transform-react-pure-annotations@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.27.1.tgz#339f1ce355eae242e0649f232b1c68907c02e879" + integrity sha512-JfuinvDOsD9FVMTHpzA/pBLisxpv1aSf+OIV8lgH3MuWrks19R27e6a6DipIg4aX1Zm9Wpb04p8wljfKrVSnPA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-regenerator@^7.27.1": + version "7.27.5" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.27.5.tgz#0c01f4e0e4cced15f68ee14b9c76dac9813850c7" + integrity sha512-uhB8yHerfe3MWnuLAhEbeQ4afVoqv8BQsPqrTv7e/jZ9y00kJL6l9a/f4OWaKxotmjzewfEyXE1vgDJenkQ2/Q== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-regexp-modifiers@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.27.1.tgz#df9ba5577c974e3f1449888b70b76169998a6d09" + integrity sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-reserved-words@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz#40fba4878ccbd1c56605a4479a3a891ac0274bb4" + integrity sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-shorthand-properties@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz#532abdacdec87bfee1e0ef8e2fcdee543fe32b90" + integrity sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-spread@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz#1a264d5fc12750918f50e3fe3e24e437178abb08" + integrity sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1" + +"@babel/plugin-transform-sticky-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz#18984935d9d2296843a491d78a014939f7dcd280" + integrity sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-template-literals@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz#1a0eb35d8bb3e6efc06c9fd40eb0bcef548328b8" + integrity sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-typeof-symbol@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz#70e966bb492e03509cf37eafa6dcc3051f844369" + integrity sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-unicode-escapes@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz#3e3143f8438aef842de28816ece58780190cf806" + integrity sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-unicode-property-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz#bdfe2d3170c78c5691a3c3be934c8c0087525956" + integrity sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-unicode-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz#25948f5c395db15f609028e370667ed8bae9af97" + integrity sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/plugin-transform-unicode-sets-regex@^7.27.1": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz#6ab706d10f801b5c72da8bb2548561fa04193cd1" + integrity sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.27.1" + "@babel/helper-plugin-utils" "^7.27.1" + +"@babel/preset-env@^7.22.2": + version "7.27.2" + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.27.2.tgz#106e6bfad92b591b1f6f76fd4cf13b7725a7bf9a" + integrity sha512-Ma4zSuYSlGNRlCLO+EAzLnCmJK2vdstgv+n7aUP+/IKZrOfWHOJVdSJtuub8RzHTj3ahD37k5OKJWvzf16TQyQ== + dependencies: + "@babel/compat-data" "^7.27.2" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-validator-option" "^7.27.1" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.27.1" + "@babel/plugin-bugfix-safari-class-field-initializer-scope" "^7.27.1" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.27.1" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.27.1" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.27.1" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-import-assertions" "^7.27.1" + "@babel/plugin-syntax-import-attributes" "^7.27.1" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.27.1" + "@babel/plugin-transform-async-generator-functions" "^7.27.1" + "@babel/plugin-transform-async-to-generator" "^7.27.1" + "@babel/plugin-transform-block-scoped-functions" "^7.27.1" + "@babel/plugin-transform-block-scoping" "^7.27.1" + "@babel/plugin-transform-class-properties" "^7.27.1" + "@babel/plugin-transform-class-static-block" "^7.27.1" + "@babel/plugin-transform-classes" "^7.27.1" + "@babel/plugin-transform-computed-properties" "^7.27.1" + "@babel/plugin-transform-destructuring" "^7.27.1" + "@babel/plugin-transform-dotall-regex" "^7.27.1" + "@babel/plugin-transform-duplicate-keys" "^7.27.1" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex" "^7.27.1" + "@babel/plugin-transform-dynamic-import" "^7.27.1" + "@babel/plugin-transform-exponentiation-operator" "^7.27.1" + "@babel/plugin-transform-export-namespace-from" "^7.27.1" + "@babel/plugin-transform-for-of" "^7.27.1" + "@babel/plugin-transform-function-name" "^7.27.1" + "@babel/plugin-transform-json-strings" "^7.27.1" + "@babel/plugin-transform-literals" "^7.27.1" + "@babel/plugin-transform-logical-assignment-operators" "^7.27.1" + "@babel/plugin-transform-member-expression-literals" "^7.27.1" + "@babel/plugin-transform-modules-amd" "^7.27.1" + "@babel/plugin-transform-modules-commonjs" "^7.27.1" + "@babel/plugin-transform-modules-systemjs" "^7.27.1" + "@babel/plugin-transform-modules-umd" "^7.27.1" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.27.1" + "@babel/plugin-transform-new-target" "^7.27.1" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.27.1" + "@babel/plugin-transform-numeric-separator" "^7.27.1" + "@babel/plugin-transform-object-rest-spread" "^7.27.2" + "@babel/plugin-transform-object-super" "^7.27.1" + "@babel/plugin-transform-optional-catch-binding" "^7.27.1" + "@babel/plugin-transform-optional-chaining" "^7.27.1" + "@babel/plugin-transform-parameters" "^7.27.1" + "@babel/plugin-transform-private-methods" "^7.27.1" + "@babel/plugin-transform-private-property-in-object" "^7.27.1" + "@babel/plugin-transform-property-literals" "^7.27.1" + "@babel/plugin-transform-regenerator" "^7.27.1" + "@babel/plugin-transform-regexp-modifiers" "^7.27.1" + "@babel/plugin-transform-reserved-words" "^7.27.1" + "@babel/plugin-transform-shorthand-properties" "^7.27.1" + "@babel/plugin-transform-spread" "^7.27.1" + "@babel/plugin-transform-sticky-regex" "^7.27.1" + "@babel/plugin-transform-template-literals" "^7.27.1" + "@babel/plugin-transform-typeof-symbol" "^7.27.1" + "@babel/plugin-transform-unicode-escapes" "^7.27.1" + "@babel/plugin-transform-unicode-property-regex" "^7.27.1" + "@babel/plugin-transform-unicode-regex" "^7.27.1" + "@babel/plugin-transform-unicode-sets-regex" "^7.27.1" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.10" + babel-plugin-polyfill-corejs3 "^0.11.0" + babel-plugin-polyfill-regenerator "^0.6.1" + core-js-compat "^3.40.0" + semver "^6.3.1" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-react@^7.22.0": + version "7.27.1" + resolved "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.27.1.tgz#86ea0a5ca3984663f744be2fd26cb6747c3fd0ec" + integrity sha512-oJHWh2gLhU9dW9HHr42q0cI0/iHHXTLGe39qvpAZZzagHy0MzYLCnCVV0symeRvzmjHyVU7mw2K06E6u/JwbhA== + dependencies: + "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-validator-option" "^7.27.1" + "@babel/plugin-transform-react-display-name" "^7.27.1" + "@babel/plugin-transform-react-jsx" "^7.27.1" + "@babel/plugin-transform-react-jsx-development" "^7.27.1" + "@babel/plugin-transform-react-pure-annotations" "^7.27.1" + +"@babel/template@^7.27.1", "@babel/template@^7.27.2", "@babel/template@^7.3.3": + version "7.27.2" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" + integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/parser" "^7.27.2" + "@babel/types" "^7.27.1" + +"@babel/traverse@^7.27.1", "@babel/traverse@^7.27.3", "@babel/traverse@^7.27.4": + version "7.27.4" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz#b0045ac7023c8472c3d35effd7cc9ebd638da6ea" + integrity sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/parser" "^7.27.4" + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.3" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.27.6", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.27.6" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz#a434ca7add514d4e646c80f7375c0aa2befc5535" + integrity sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@ethersproject/abi@5.8.0", "@ethersproject/abi@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz#e79bb51940ac35fe6f3262d7fe2cdb25ad5f07d9" + integrity sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q== + dependencies: + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/hash" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/abstract-provider@5.8.0", "@ethersproject/abstract-provider@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz#7581f9be601afa1d02b95d26b9d9840926a35b0c" + integrity sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/networks" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + "@ethersproject/web" "^5.8.0" + +"@ethersproject/abstract-signer@5.8.0", "@ethersproject/abstract-signer@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz#8d7417e95e4094c1797a9762e6789c7356db0754" + integrity sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA== + dependencies: + "@ethersproject/abstract-provider" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + +"@ethersproject/address@5.8.0", "@ethersproject/address@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz#3007a2c352eee566ad745dca1dbbebdb50a6a983" + integrity sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/rlp" "^5.8.0" + +"@ethersproject/base64@5.8.0", "@ethersproject/base64@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz#61c669c648f6e6aad002c228465d52ac93ee83eb" + integrity sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ== + dependencies: + "@ethersproject/bytes" "^5.8.0" + +"@ethersproject/basex@5.8.0", "@ethersproject/basex@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz#1d279a90c4be84d1c1139114a1f844869e57d03a" + integrity sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + +"@ethersproject/bignumber@5.8.0", "@ethersproject/bignumber@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz#c381d178f9eeb370923d389284efa19f69efa5d7" + integrity sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.8.0", "@ethersproject/bytes@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz#9074820e1cac7507a34372cadeb035461463be34" + integrity sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/constants@5.8.0", "@ethersproject/constants@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz#12f31c2f4317b113a4c19de94e50933648c90704" + integrity sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + +"@ethersproject/contracts@5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz#243a38a2e4aa3e757215ea64e276f8a8c9d8ed73" + integrity sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ== + dependencies: + "@ethersproject/abi" "^5.8.0" + "@ethersproject/abstract-provider" "^5.8.0" + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + +"@ethersproject/hash@5.8.0", "@ethersproject/hash@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz#b8893d4629b7f8462a90102572f8cd65a0192b4c" + integrity sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA== + dependencies: + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/base64" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/hdnode@5.8.0", "@ethersproject/hdnode@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz#a51ae2a50bcd48ef6fd108c64cbae5e6ff34a761" + integrity sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA== + dependencies: + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/basex" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/pbkdf2" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/sha2" "^5.8.0" + "@ethersproject/signing-key" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + "@ethersproject/wordlists" "^5.8.0" + +"@ethersproject/json-wallets@5.8.0", "@ethersproject/json-wallets@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz#d18de0a4cf0f185f232eb3c17d5e0744d97eb8c9" + integrity sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w== + dependencies: + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/hdnode" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/pbkdf2" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/random" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.8.0", "@ethersproject/keccak256@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz#d2123a379567faf2d75d2aaea074ffd4df349e6a" + integrity sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng== + dependencies: + "@ethersproject/bytes" "^5.8.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.8.0", "@ethersproject/logger@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz#f0232968a4f87d29623a0481690a2732662713d6" + integrity sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA== + +"@ethersproject/networks@5.8.0", "@ethersproject/networks@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz#8b4517a3139380cba9fb00b63ffad0a979671fde" + integrity sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/pbkdf2@5.8.0", "@ethersproject/pbkdf2@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz#cd2621130e5dd51f6a0172e63a6e4a0c0a0ec37e" + integrity sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/sha2" "^5.8.0" + +"@ethersproject/properties@5.8.0", "@ethersproject/properties@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz#405a8affb6311a49a91dabd96aeeae24f477020e" + integrity sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw== + dependencies: + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/providers@5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz#6c2ae354f7f96ee150439f7de06236928bc04cb4" + integrity sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw== + dependencies: + "@ethersproject/abstract-provider" "^5.8.0" + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/base64" "^5.8.0" + "@ethersproject/basex" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/hash" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/networks" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/random" "^5.8.0" + "@ethersproject/rlp" "^5.8.0" + "@ethersproject/sha2" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + "@ethersproject/web" "^5.8.0" + bech32 "1.1.4" + ws "8.18.0" + +"@ethersproject/random@5.8.0", "@ethersproject/random@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz#1bced04d49449f37c6437c701735a1a022f0057a" + integrity sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/rlp@5.8.0", "@ethersproject/rlp@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz#5a0d49f61bc53e051532a5179472779141451de5" + integrity sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/sha2@5.8.0", "@ethersproject/sha2@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz#8954a613bb78dac9b46829c0a95de561ef74e5e1" + integrity sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.8.0", "@ethersproject/signing-key@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz#9797e02c717b68239c6349394ea85febf8893119" + integrity sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + bn.js "^5.2.1" + elliptic "6.6.1" + hash.js "1.1.7" + +"@ethersproject/solidity@5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz#429bb9fcf5521307a9448d7358c26b93695379b9" + integrity sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/sha2" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/strings@5.8.0", "@ethersproject/strings@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz#ad79fafbf0bd272d9765603215ac74fd7953908f" + integrity sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/transactions@5.8.0", "@ethersproject/transactions@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz#1e518822403abc99def5a043d1c6f6fe0007e46b" + integrity sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg== + dependencies: + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/rlp" "^5.8.0" + "@ethersproject/signing-key" "^5.8.0" + +"@ethersproject/units@5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz#c12f34ba7c3a2de0e9fa0ed0ee32f3e46c5c2c6a" + integrity sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ== + dependencies: + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/constants" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + +"@ethersproject/wallet@5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz#49c300d10872e6986d953e8310dc33d440da8127" + integrity sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA== + dependencies: + "@ethersproject/abstract-provider" "^5.8.0" + "@ethersproject/abstract-signer" "^5.8.0" + "@ethersproject/address" "^5.8.0" + "@ethersproject/bignumber" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/hash" "^5.8.0" + "@ethersproject/hdnode" "^5.8.0" + "@ethersproject/json-wallets" "^5.8.0" + "@ethersproject/keccak256" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/random" "^5.8.0" + "@ethersproject/signing-key" "^5.8.0" + "@ethersproject/transactions" "^5.8.0" + "@ethersproject/wordlists" "^5.8.0" + +"@ethersproject/web@5.8.0", "@ethersproject/web@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz#3e54badc0013b7a801463a7008a87988efce8a37" + integrity sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw== + dependencies: + "@ethersproject/base64" "^5.8.0" + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@ethersproject/wordlists@5.8.0", "@ethersproject/wordlists@^5.8.0": + version "5.8.0" + resolved "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz#7a5654ee8d1bb1f4dbe43f91d217356d650ad821" + integrity sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg== + dependencies: + "@ethersproject/bytes" "^5.8.0" + "@ethersproject/hash" "^5.8.0" + "@ethersproject/logger" "^5.8.0" + "@ethersproject/properties" "^5.8.0" + "@ethersproject/strings" "^5.8.0" + +"@iden3/bigarray@0.0.2": + version "0.0.2" + resolved "https://registry.npmjs.org/@iden3/bigarray/-/bigarray-0.0.2.tgz#6fc4ba5be18daf8a26ee393f2fb62b80d98c05e9" + integrity sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g== + +"@iden3/binfileutils@0.0.11": + version "0.0.11" + resolved "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.11.tgz#9ffbbcc1279f2b2182bb6dcff4eee8a5b2167911" + integrity sha512-LylnJoZ0CTdgErnKY8OxohvW4K+p6UHD3sxt+3P9AmMyBQjYR4IpoqoYZZ+9aMj89cmCQ21UvdhndAx04er3NA== + dependencies: + fastfile "0.0.20" + ffjavascript "^0.2.48" + +"@iden3/binfileutils@0.0.12": + version "0.0.12" + resolved "https://registry.npmjs.org/@iden3/binfileutils/-/binfileutils-0.0.12.tgz#3772552f57551814ff606fa68ea1e0ef52795ce3" + integrity sha512-naAmzuDufRIcoNfQ1d99d7hGHufLA3wZSibtr4dMe6ZeiOPV1KwOZWTJ1YVz4HbaWlpDuzVU72dS4ATQS4PXBQ== + dependencies: + fastfile "0.0.20" + ffjavascript "^0.3.0" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.8" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + +"@solidity-parser/parser@^0.20.1": + version "0.20.1" + resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.1.tgz#88efee3e0946a4856ed10355017692db9c259ff4" + integrity sha512-58I2sRpzaQUN+jJmWbHfbWf9AKfzqCI8JAdFB0vbyY+u8tBRcuTt9LxzasvR0LGQpcRv97eyV7l61FQ3Ib7zVw== + +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.27.0" + resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.7" + resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz#968cdc2366ec3da159f61166428ee40f370e56c2" + integrity sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng== + dependencies: + "@babel/types" "^7.20.7" + +"@types/graceful-fs@^4.1.3": + version "4.1.9" + resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@^29.5.13", "@types/jest@^29.5.4": + version "29.5.14" + resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" + integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/node@*": + version "24.0.0" + resolved "https://registry.npmjs.org/@types/node/-/node-24.0.0.tgz#14a278ce74dd33993f2c4e5dd614760728c0fba8" + integrity sha512-yZQa2zm87aRVcqDyH5+4Hv9KYgSdgwX1rFnGvpbzMaC7YAljmhBET93TPiTd3ObwTL+gSpIzPKg5BqVxdCvxKg== + dependencies: + undici-types "~7.8.0" + +"@types/stack-utils@^2.0.0": + version "2.0.3" + resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.8": + version "17.0.33" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3, anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +async@^3.2.3: + version "3.2.6" + resolved "https://registry.npmjs.org/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + +b4a@^1.0.1: + version "1.6.7" + resolved "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4" + integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg== + +babel-jest@^29.5.0, babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-plugin-polyfill-corejs2@^0.4.10: + version "0.4.13" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.13.tgz#7d445f0e0607ebc8fb6b01d7e8fb02069b91dd8b" + integrity sha512-3sX/eOms8kd3q2KZ6DAhKPc0dgm525Gqq5NtWKZ7QYYZEv57OQ54KtblzJzH1lQF/eQxO8KjWGIK9IPUJNus5g== + dependencies: + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.4" + semver "^6.3.1" + +babel-plugin-polyfill-corejs3@^0.11.0: + version "0.11.1" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.11.1.tgz#4e4e182f1bb37c7ba62e2af81d8dd09df31344f6" + integrity sha512-yGCqvBT4rwMczo28xkH/noxJ6MZ4nJfkVYdoDaC/utLtWrXxv27HVrzAeSbqR8SxDsp46n0YF47EbHoixy6rXQ== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.3" + core-js-compat "^3.40.0" + +babel-plugin-polyfill-regenerator@^0.6.1: + version "0.6.4" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.4.tgz#428c615d3c177292a22b4f93ed99e358d7906a9b" + integrity sha512-7gD3pRadPrbjhjLyxebmx/WrFYcuSjZ0XbdUujQMZ/fcE9oeewk2U/7PCvez84UeuK3oSjmPZ0Ch0dlupQvGzw== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.6.4" + +babel-preset-current-node-syntax@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30" + integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" + +babel-preset-jest@^29.5.0, babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +bfj@^7.0.2: + version "7.1.0" + resolved "https://registry.npmjs.org/bfj/-/bfj-7.1.0.tgz#c5177d522103f9040e1b12980fe8c38cf41d3f8b" + integrity sha512-I6MMLkn+anzNdCUp9hMRyui1HaNEUCco50lxbvNS4+EyXg8lN3nJ48PjPWtbH8UVS9CuMoaKE9U2V3l29DaRQw== + dependencies: + bluebird "^3.7.2" + check-types "^11.2.3" + hoopy "^0.1.4" + jsonpath "^1.1.1" + tryer "^1.0.1" + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +blake-hash@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/blake-hash/-/blake-hash-2.0.0.tgz#af184dce641951126d05b7d1c3de3224f538d66e" + integrity sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w== + dependencies: + node-addon-api "^3.0.0" + node-gyp-build "^4.2.2" + readable-stream "^3.6.0" + +blake2b-wasm@^2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz#9115649111edbbd87eb24ce7c04b427e4e2be5be" + integrity sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w== + dependencies: + b4a "^1.0.1" + nanoassert "^2.0.0" + +blake2b@^2.1.3: + version "2.1.4" + resolved "https://registry.npmjs.org/blake2b/-/blake2b-2.1.4.tgz#817d278526ddb4cd673bfb1af16d1ad61e393ba3" + integrity sha512-AyBuuJNI64gIvwx13qiICz6H6hpmjvYS5DGkG6jbXMOT8Z3WUJ3V1X0FlhIoT1b/5JtHE3ki+xjtMvu1nn+t9A== + dependencies: + blake2b-wasm "^2.4.0" + nanoassert "^2.0.0" + +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@^4.11.9: + version "4.12.2" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz#3d8fed6796c24e177737f7cc5172ee04ef39ec99" + integrity sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw== + +bn.js@^5.2.1: + version "5.2.2" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" + integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-stdout@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.24.0, browserslist@^4.25.0: + version "4.25.0" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz#986aa9c6d87916885da2b50d8eb577ac8d133b2c" + integrity sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA== + dependencies: + caniuse-lite "^1.0.30001718" + electron-to-chromium "^1.5.160" + node-releases "^2.0.19" + update-browserslist-db "^1.1.3" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" + integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== + dependencies: + call-bind-apply-helpers "^1.0.2" + get-intrinsic "^1.3.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0, camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001718: + version "1.0.30001721" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz#36b90cd96901f8c98dd6698bf5c8af7d4c6872d7" + integrity sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ== + +chai@^4.3.6, chai@^4.3.7: + version "4.5.0" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.1.0" + +chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +check-types@^11.2.3: + version "11.2.3" + resolved "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz#1ffdf68faae4e941fce252840b1787b8edc93b71" + integrity sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg== + +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +circom_runtime@0.1.28: + version "0.1.28" + resolved "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.28.tgz#4ea4606956eeac4499f71f65354f45b54faa93fe" + integrity sha512-ACagpQ7zBRLKDl5xRZ4KpmYIcZDUjOiNRuxvXLqhnnlLSVY1Dbvh73TI853nqoR0oEbihtWmMSjgc5f+pXf/jQ== + dependencies: + ffjavascript "0.3.1" + +circom_tester@^0.0.20: + version "0.0.20" + resolved "https://registry.npmjs.org/circom_tester/-/circom_tester-0.0.20.tgz#066227923594c722169646c685e72ba6e1b85939" + integrity sha512-hhtqh3z1+/4RqhbAQxQTzekDvANFNd0M0+D8OdpxM1Ud4yQXoM+1n06AhJ7sULfCUD+LQrmnSjK5GD783KRSxg== + dependencies: + chai "^4.3.6" + ffjavascript "^0.2.60" + fnv-plus "^1.3.1" + r1csfile "^0.0.47" + snarkjs "^0.7.0" + tmp-promise "^3.0.3" + util "^0.12.5" + +circomlib@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/circomlib/-/circomlib-2.0.5.tgz#183c703e53ed7d011811842dbeeeb9819f4cc1d6" + integrity sha512-O7NQ8OS+J4eshBuoy36z/TwQU0YHw8W3zxZcs4hVwpEll3e4hDm3mgkIPqItN8FDeLEKZFK3YeT/+k8TiLF3/A== + +circomlibjs@^0.1.2: + version "0.1.7" + resolved "https://registry.npmjs.org/circomlibjs/-/circomlibjs-0.1.7.tgz#9f5a7d9a23323744b11ee456b05b0cd81f48b554" + integrity sha512-GRAUoAlKAsiiTa+PA725G9RmEmJJRc8tRFxw/zKktUxlQISGznT4hH4ESvW8FNTsrGg/nNd06sGP/Wlx0LUHVg== + dependencies: + blake-hash "^2.0.0" + blake2b "^2.1.3" + ethers "^5.5.1" + ffjavascript "^0.2.45" + +cjs-module-lexer@^1.0.0: + version "1.4.3" + resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" + integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^11.0.0: + version "11.1.0" + resolved "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" + integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +core-js-compat@^3.40.0: + version "3.43.0" + resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.43.0.tgz#055587369c458795ef316f65e0aabb808fb15840" + integrity sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA== + dependencies: + browserslist "^4.25.0" + +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + +cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.5: + version "4.4.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" + integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== + dependencies: + ms "^2.1.3" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +dedent@^1.0.0: + version "1.6.0" + resolved "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" + integrity sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA== + +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +ejs@^3.1.6: + version "3.1.10" + resolved "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +electron-to-chromium@^1.5.160: + version "1.5.166" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz#3fff386ed473cc2169dbe2d3ace9592262601114" + integrity sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw== + +elliptic@6.6.1: + version "6.6.1" + resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06" + integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +escalade@^3.1.1, escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^1.8.1: + version "1.14.3" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz#76a0fd66fcfe154fd292667dc264019750b1657b" + integrity sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A== + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +ethers@^5.5.1: + version "5.8.0" + resolved "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz#97858dc4d4c74afce83ea7562fe9493cedb4d377" + integrity sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg== + dependencies: + "@ethersproject/abi" "5.8.0" + "@ethersproject/abstract-provider" "5.8.0" + "@ethersproject/abstract-signer" "5.8.0" + "@ethersproject/address" "5.8.0" + "@ethersproject/base64" "5.8.0" + "@ethersproject/basex" "5.8.0" + "@ethersproject/bignumber" "5.8.0" + "@ethersproject/bytes" "5.8.0" + "@ethersproject/constants" "5.8.0" + "@ethersproject/contracts" "5.8.0" + "@ethersproject/hash" "5.8.0" + "@ethersproject/hdnode" "5.8.0" + "@ethersproject/json-wallets" "5.8.0" + "@ethersproject/keccak256" "5.8.0" + "@ethersproject/logger" "5.8.0" + "@ethersproject/networks" "5.8.0" + "@ethersproject/pbkdf2" "5.8.0" + "@ethersproject/properties" "5.8.0" + "@ethersproject/providers" "5.8.0" + "@ethersproject/random" "5.8.0" + "@ethersproject/rlp" "5.8.0" + "@ethersproject/sha2" "5.8.0" + "@ethersproject/signing-key" "5.8.0" + "@ethersproject/solidity" "5.8.0" + "@ethersproject/strings" "5.8.0" + "@ethersproject/transactions" "5.8.0" + "@ethersproject/units" "5.8.0" + "@ethersproject/wallet" "5.8.0" + "@ethersproject/web" "5.8.0" + "@ethersproject/wordlists" "5.8.0" + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + dependencies: + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + +fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastfile@0.0.20: + version "0.0.20" + resolved "https://registry.npmjs.org/fastfile/-/fastfile-0.0.20.tgz#794a143d58cfda2e24c298e5ef619c748c8a1879" + integrity sha512-r5ZDbgImvVWCP0lA/cGNgQcZqR+aYdFx3u+CtJqUE510pBUVGMn4ulL/iRTI4tACTYsNJ736uzFxEBXesPAktA== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +ffjavascript@0.2.60: + version "0.2.60" + resolved "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.60.tgz#4d8ae613d6bf4e98b3cc29ba10c626f5853854cf" + integrity sha512-T/9bnEL5xAZRDbQoEMf+pM9nrhK+C3JyZNmqiWub26EQorW7Jt+jR54gpqDhceA4Nj0YctPQwYnl8xa52/A26A== + dependencies: + wasmbuilder "0.0.16" + wasmcurves "0.2.2" + web-worker "^1.2.0" + +ffjavascript@0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.0.tgz#442cd8fbb1ee4cbb1be9d26fd7b2951a1ea45d6a" + integrity sha512-l7sR5kmU3gRwDy8g0Z2tYBXy5ttmafRPFOqY7S6af5cq51JqJWt5eQ/lSR/rs2wQNbDYaYlQr5O+OSUf/oMLoQ== + dependencies: + wasmbuilder "0.0.16" + wasmcurves "0.2.2" + web-worker "1.2.0" + +ffjavascript@0.3.1, ffjavascript@^0.3.0, ffjavascript@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.3.1.tgz#3761bbb3f4a67b58a94a463080272bf6b5877b03" + integrity sha512-4PbK1WYodQtuF47D4pRI5KUg3Q392vuP5WjE1THSnceHdXwU3ijaoS0OqxTzLknCtz4Z2TtABzkBdBdMn3B/Aw== + dependencies: + wasmbuilder "0.0.16" + wasmcurves "0.2.2" + web-worker "1.2.0" + +ffjavascript@^0.2.45, ffjavascript@^0.2.48, ffjavascript@^0.2.60: + version "0.2.63" + resolved "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.63.tgz#0c1216a1f123dc9181df69e144473704d2f115eb" + integrity sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A== + dependencies: + wasmbuilder "0.0.16" + wasmcurves "0.2.2" + web-worker "1.2.0" + +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fnv-plus@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/fnv-plus/-/fnv-plus-1.3.1.tgz#c34cb4572565434acb08ba257e4044ce2b006d67" + integrity sha512-Gz1EvfOneuFfk4yG458dJ3TLJ7gV19q3OM/vVvvHf7eT02Hm1DleB4edsia6ahbKgAYxO9gvyQ1ioWZR+a00Yw== + +for-each@^0.3.5: + version "0.3.5" + resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz#d650688027826920feeb0af747ee7b9421a41d47" + integrity sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg== + dependencies: + is-callable "^1.2.7" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2, fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +get-intrinsic@^1.2.4, get-intrinsic@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-proto@^1.0.0, get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +gopd@^1.0.1, gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +he@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoopy@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" + integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +import-local@^3.0.2: + version "3.2.0" + resolved "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arguments@^1.0.4: + version "1.2.0" + resolved "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz#ad58c6aecf563b78ef2bf04df540da8f5d7d8e1b" + integrity sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA== + dependencies: + call-bound "^1.0.2" + has-tostringtag "^1.0.2" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.16.0: + version "2.16.1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" + integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== + dependencies: + hasown "^2.0.2" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-generator-function@^1.0.7: + version "1.1.0" + resolved "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz#bf3eeda931201394f57b5dba2800f91a238309ca" + integrity sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ== + dependencies: + call-bound "^1.0.3" + get-proto "^1.0.0" + has-tostringtag "^1.0.2" + safe-regex-test "^1.1.0" + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-regex@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz#76d70a3ed10ef9be48eb577887d74205bf0cad22" + integrity sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g== + dependencies: + call-bound "^1.0.2" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-typed-array@^1.1.3: + version "1.1.15" + resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b" + integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ== + dependencies: + which-typed-array "^1.1.16" + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.7" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jake@^10.8.5: + version "10.9.2" + resolved "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f" + integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA== + dependencies: + async "^3.2.3" + chalk "^4.0.2" + filelist "^1.0.4" + minimatch "^3.1.2" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@^29.5.0, jest@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== + dependencies: + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +jsesc@~3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" + integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonpath@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz#0ca1ed8fb65bb3309248cc9d5466d12d5b0b9901" + integrity sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w== + dependencies: + esprima "1.2.2" + static-eval "2.0.2" + underscore "1.12.1" + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== + +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +logplease@^1.2.15: + version "1.2.15" + resolved "https://registry.npmjs.org/logplease/-/logplease-1.2.15.tgz#3da442e93751a5992cc19010a826b08d0293c48a" + integrity sha512-jLlHnlsPSJjpwUfcNyUxXCl33AYg2cHhIf9QhGL2T4iPT0XPB+xP1LRKFPgIg1M/sg9kAJvy94w9CzBNrfnstA== + +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.4: + version "4.0.8" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1, minimatch@^5.1.6: + version "5.1.6" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +mocha@^10.2.0: + version "10.8.2" + resolved "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz#8d8342d016ed411b12a429eb731b825f961afb96" + integrity sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" + +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoassert@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz#a05f86de6c7a51618038a620f88878ed1e490c09" + integrity sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-addon-api@^3.0.0: + version "3.2.1" + resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + +node-gyp-build@^4.2.2: + version "4.8.4" + resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8" + integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.19: + version "2.0.19" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.7" + resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +possible-typed-array-names@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" + integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +prettier-plugin-solidity@^1.1.3: + version "1.4.3" + resolved "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.3.tgz#73f8adeb0214fb3db1c2d59023b39e079be69019" + integrity sha512-Mrr/iiR9f9IaeGRMZY2ApumXcn/C5Gs3S7B7hWB3gigBFML06C0yEyW86oLp0eqiA0qg+46FaChgLPJCj/pIlg== + dependencies: + "@solidity-parser/parser" "^0.20.1" + semver "^7.7.1" + +prettier@^3.0.0: + version "3.5.3" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5" + integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== + +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + +r1csfile@0.0.48: + version "0.0.48" + resolved "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.48.tgz#a317fc75407a9da92631666c75bdfc13f0a7835a" + integrity sha512-kHRkKUJNaor31l05f2+RFzvcH5XSa7OfEfd/l4hzjte6NL6fjRkSMfZ4BjySW9wmfdwPOtq3mXurzPvPGEf5Tw== + dependencies: + "@iden3/bigarray" "0.0.2" + "@iden3/binfileutils" "0.0.12" + fastfile "0.0.20" + ffjavascript "0.3.0" + +r1csfile@^0.0.47: + version "0.0.47" + resolved "https://registry.npmjs.org/r1csfile/-/r1csfile-0.0.47.tgz#ed95a0dc8e910e9c070253906f7a31bd8c5333c8" + integrity sha512-oI4mAwuh1WwuFg95eJDNDDL8hCaZkwnPuNZrQdLBWvDoRU7EG+L/MOHL7SwPW2Y+ZuYcTLpj3rBkgllBQZN/JA== + dependencies: + "@iden3/bigarray" "0.0.2" + "@iden3/binfileutils" "0.0.11" + fastfile "0.0.20" + ffjavascript "0.2.60" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerate-unicode-properties@^10.2.0: + version "10.2.0" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz#626e39df8c372338ea9b8028d1f99dc3fd9c3db0" + integrity sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA== + dependencies: + regenerate "^1.4.2" + +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regexpu-core@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz#0e5190d79e542bf294955dccabae04d3c7d53826" + integrity sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^10.2.0" + regjsgen "^0.8.0" + regjsparser "^0.12.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.1.0" + +regjsgen@^0.8.0: + version "0.8.0" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz#df23ff26e0c5b300a6470cad160a9d090c3a37ab" + integrity sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q== + +regjsparser@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz#0e846df6c6530586429377de56e0475583b088dc" + integrity sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ== + dependencies: + jsesc "~3.0.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.3" + resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" + integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== + +resolve@^1.14.2, resolve@^1.20.0: + version "1.22.10" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" + integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== + dependencies: + is-core-module "^2.16.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex-test@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz#7f87dfb67a3150782eaaf18583ff5d1711ac10c1" + integrity sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw== + dependencies: + call-bound "^1.0.2" + es-errors "^1.3.0" + is-regex "^1.2.1" + +scrypt-js@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.3, semver@^7.5.4, semver@^7.7.1: + version "7.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" + integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== + +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +set-function-length@^1.2.2: + version "1.2.2" + resolved "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +snarkjs@^0.7.0, snarkjs@^0.7.5: + version "0.7.5" + resolved "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.5.tgz#334d83b61468bdffbbf922b20734ca47be50b8ab" + integrity sha512-h+3c4rXZKLhLuHk4LHydZCk/h5GcNvk5GjVKRRkHmfb6Ntf8gHOA9zea3g656iclRuhqQ3iKDWFgiD9ypLrKiA== + dependencies: + "@iden3/binfileutils" "0.0.12" + bfj "^7.0.2" + blake2b-wasm "^2.4.0" + circom_runtime "0.1.28" + ejs "^3.1.6" + fastfile "0.0.20" + ffjavascript "0.3.1" + js-sha3 "^0.8.0" + logplease "^1.2.15" + r1csfile "0.0.48" + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +static-eval@2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz#2d1759306b1befa688938454c546b7871f806a42" + integrity sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg== + dependencies: + escodegen "^1.8.1" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0, supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +tmp-promise@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" + integrity sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ== + dependencies: + tmp "^0.2.0" + +tmp@^0.2.0: + version "0.2.3" + resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tryer@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" + integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +underscore@1.12.1: + version "1.12.1" + resolved "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== + +undici-types@~7.8.0: + version "7.8.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294" + integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw== + +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2" + integrity sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg== + +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + +unicode-match-property-value-ecmascript@^2.1.0: + version "2.2.0" + resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz#a0401aee72714598f739b68b104e4fe3a0cb3c71" + integrity sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg== + +unicode-property-aliases-ecmascript@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" + integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== + +update-browserslist-db@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" + integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +util@^0.12.5: + version "0.12.5" + resolved "https://registry.npmjs.org/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +wasmbuilder@0.0.16: + version "0.0.16" + resolved "https://registry.npmjs.org/wasmbuilder/-/wasmbuilder-0.0.16.tgz#f34c1f2c047d2f6e1065cbfec5603988f16d8549" + integrity sha512-Qx3lEFqaVvp1cEYW7Bfi+ebRJrOiwz2Ieu7ZG2l7YyeSJIok/reEQCQCuicj/Y32ITIJuGIM9xZQppGx5LrQdA== + +wasmcurves@0.2.2: + version "0.2.2" + resolved "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.2.2.tgz#ca444f6a6f6e2a5cbe6629d98ff478a62b4ccb2b" + integrity sha512-JRY908NkmKjFl4ytnTu5ED6AwPD+8VJ9oc94kdq7h5bIwbj0L4TDJ69mG+2aLs2SoCmGfqIesMWTEJjtYsoQXQ== + dependencies: + wasmbuilder "0.0.16" + +web-worker@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da" + integrity sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA== + +web-worker@^1.2.0: + version "1.5.0" + resolved "https://registry.npmjs.org/web-worker/-/web-worker-1.5.0.tgz#71b2b0fbcc4293e8f0aa4f6b8a3ffebff733dcc5" + integrity sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw== + +which-typed-array@^1.1.16, which-typed-array@^1.1.2: + version "1.1.19" + resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz#df03842e870b6b88e117524a4b364b6fc689f956" + integrity sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + for-each "^0.3.5" + get-proto "^1.0.1" + gopd "^1.2.0" + has-tostringtag "^1.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.5" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +ws@8.18.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^20.2.2, yargs-parser@^20.2.9: + version "20.2.9" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs-unparser@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==