diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 6005c4b0a9..4a81858dc0 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -66,7 +66,7 @@ runs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: use proof_systems_commit if provided if: ${{ inputs.proof_systems_commit != '' }} diff --git a/.github/actions/live-tests-shared/action.yml b/.github/actions/live-tests-shared/action.yml index 6dda1b2f85..877de2f820 100644 --- a/.github/actions/live-tests-shared/action.yml +++ b/.github/actions/live-tests-shared/action.yml @@ -16,7 +16,7 @@ runs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Build o1js and execute tests env: USE_CUSTOM_LOCAL_NETWORK: 'true' diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 36d9913404..4e05fba4e2 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -130,7 +130,7 @@ jobs: Lint-Format-and-TypoCheck: strategy: matrix: - node: [20] + node: [22] if: github.event.pull_request.labels.*.name != 'skip-lint' runs-on: ubuntu-latest @@ -257,6 +257,10 @@ jobs: cache_id: ${{ secrets.NIX_CACHE_GCP_ID }} nar_secret: ${{ secrets.NIX_CACHE_NAR_SECRET }} gcp_secret: ${{ secrets.NIX_CACHE_GCP_SECRET }} + - name: Setup Node.JS ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: 22 - name: Count tests id: count_tests run: | @@ -329,7 +333,7 @@ jobs: - name: Setup Node.JS ${{ matrix.node }} uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 # TODO matrixing this requires changing branch protection rules - name: Restore npm cache diff --git a/.github/workflows/push_main.yml b/.github/workflows/push_main.yml index c8f658dcc1..eeee10c76b 100644 --- a/.github/workflows/push_main.yml +++ b/.github/workflows/push_main.yml @@ -18,7 +18,7 @@ jobs: Build-Doc: strategy: matrix: - node: [20] + node: [22] if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: @@ -74,7 +74,7 @@ jobs: Pkg-pr-new: strategy: matrix: - node: [20] + node: [22] runs-on: [ubuntu-latest] steps: @@ -118,7 +118,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Build o1js run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8b11daa28..04f3dbfbfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' - name: Configure Git run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 97e553e9ed..4a33f402f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,6 @@ This project adheres to ### Added - ### Changed - Updated Rust nightly version from `2024-06-13` to `2024-09-05` to match the diff --git a/bisect-mina-by-prs.sh b/bisect-mina-by-prs.sh new file mode 100755 index 0000000000..ef46e09541 --- /dev/null +++ b/bisect-mina-by-prs.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +set -e + +advance_prs(){ + count=${1:-1} + + # Navigate to mina submodule + pushd src/mina + + # Get current commit + current_commit=$(git rev-parse HEAD) + + # Get all merge commits that contain "Merge pull request" in chronological order + commit=$(git log --oneline --grep="Merge pull request" compatible --reverse \ + | sed '1,/'"$(git rev-parse --short HEAD)"'/d' \ + | sed -n "$count"'{p;q}' \ + | cut -d' ' -f1 + ) + + # Get the commit message for informative output + commit_msg=$(git log --oneline -1 $commit) + + echo "Updating mina submodule to next PR: $commit_msg" + + # Checkout the next merge commit + git checkout $commit + git reset --hard --recurse-submodules + + # Go back to parent repo and update submodule reference + popd +} + +rebuild(){ + git clean -fdx && \ + nix run .\#generate-bindings --refresh --no-eval-cache && \ + nix develop --refresh --no-eval-cache --command npm ci && \ + nix develop --command npm run build +} + +run_test(){ + nix develop --refresh --no-eval-cache --command \ + npm run test + # Replace with any test that fails +} + + +reset_mina(){ + prev=$(git rev-parse HEAD) + sub_sha=$(git ls-tree $prev src/mina | awk '{print $3}') + git -C src/mina checkout $sub_sha + git -C src/mina reset --hard --recurse-submodules + +} + +check_num_prs(){ + reset_mina + advance_prs "$1" + rebuild && run_test +} + +reset_mina +num_prs=$( \ + git -C src/mina log --oneline --grep="Merge pull request" compatible --reverse \ + | sed '1,/'"$(git -C src/mina rev-parse --short HEAD)"'/d' \ + | wc -l) + +echo $num_prs + +low=0 +high=$num_prs + +while (( low < high -1 )); do + mid=$(( (low + high + 1) / 2 )) + echo Fails $high Passes $low TESTING $mid + if check_num_prs $mid + then + echo "$(git -C src/mina rev-parse HEAD) - Works" >> /tmp/o1js-builds.log + low=$(( mid )) + else + high=$(( mid )) + echo "$(git -C src/mina rev-parse HEAD) - Fails" >> /tmp/o1js-builds.log + fi +done + +reset_mina +advance_prs $low +works=$(git -C src/mina rev-parse HEAD) +reset_mina +advance_prs $high +breaks=$(git -C src/mina rev-parse HEAD) +echo Works at $works +echo Broken at $breaks +echo Broken by $(git -C src/mina log --oneline -1 $breaks) diff --git a/flake.lock b/flake.lock index 5b8fb86428..49836b16b9 100644 --- a/flake.lock +++ b/flake.lock @@ -2,19 +2,15 @@ "nodes": { "describe-dune": { "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs-mina" - ] + "flake-utils": ["flake-utils"], + "nixpkgs": ["mina", "nixpkgs"] }, "locked": { - "lastModified": 1724407960, - "narHash": "sha256-pUKTVMYEtsD1AGlHFTdPourowt+tJ3htKhRu7VALFzc=", + "lastModified": 1742933373, + "narHash": "sha256-sW6ZheQeXe+GULDKLcgRJN4eucP3IXWHz0bHL9KKU1w=", "owner": "o1-labs", "repo": "describe-dune", - "rev": "be828239c05671209e979f9d5c2e3094e3be7a46", + "rev": "ba71baa26329399ca2f1d158f15e7c32bba1d072", "type": "github" }, "original": { @@ -25,14 +21,8 @@ }, "describe-dune_2": { "inputs": { - "flake-utils": [ - "mina", - "utils" - ], - "nixpkgs": [ - "mina", - "nixpkgs" - ] + "flake-utils": ["mina", "utils"], + "nixpkgs": ["mina", "nixpkgs"] }, "locked": { "lastModified": 1742933373, @@ -50,12 +40,8 @@ }, "dune-nix": { "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs-mina" - ] + "flake-utils": ["flake-utils"], + "nixpkgs": ["mina", "nixpkgs"] }, "locked": { "lastModified": 1753462905, @@ -127,11 +113,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -202,10 +188,7 @@ }, "gitignore-nix": { "inputs": { - "nixpkgs": [ - "mina", - "nixpkgs" - ] + "nixpkgs": ["mina", "nixpkgs"] }, "locked": { "lastModified": 1660459072, @@ -224,9 +207,7 @@ "mina": { "inputs": { "describe-dune": "describe-dune_2", - "dune-nix": [ - "dune-nix" - ], + "dune-nix": ["dune-nix"], "flake-buildkite-pipeline": "flake-buildkite-pipeline", "flake-compat": "flake-compat", "flockenzeit": "flockenzeit", @@ -301,10 +282,7 @@ }, "nix-npm-buildPackage": { "inputs": { - "nixpkgs": [ - "mina", - "nixpkgs" - ] + "nixpkgs": ["mina", "nixpkgs"] }, "locked": { "lastModified": 1670813451, @@ -369,22 +347,6 @@ "type": "github" } }, - "nixpkgs-mina": { - "locked": { - "lastModified": 1747635552, - "narHash": "sha256-2wAd20JLiHzcqSt7MGza4hN4rdV/c6Ed/13gN7HZJ9U=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "74b4de8529c4ce6f17b80c97728fddd627097809", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-24.11-small", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-mozilla": { "flake": false, "locked": { @@ -404,11 +366,11 @@ "nixpkgs-mozilla_2": { "flake": false, "locked": { - "lastModified": 1704373101, - "narHash": "sha256-+gi59LRWRQmwROrmE1E2b3mtocwueCQqZ60CwLG+gbg=", + "lastModified": 1744624473, + "narHash": "sha256-S6zT/w5SyAkJ//dYdjbrXgm+6Vkd/k7qqUl4WgZ6jjk=", "owner": "mozilla", "repo": "nixpkgs-mozilla", - "rev": "9b11a87c0cc54e308fa83aac5b4ee1816d5418a2", + "rev": "2292d4b35aa854e312ad2e95c4bb5c293656f21a", "type": "github" }, "original": { @@ -452,11 +414,11 @@ "o1-opam-repository": { "flake": false, "locked": { - "lastModified": 1715294616, - "narHash": "sha256-W2p9Vs8PqpKGvMByxVqpxAljjpEMqNcuNnjMBAAKicI=", + "lastModified": 1749055102, + "narHash": "sha256-JEeAGWyzlWbUoYwav7mpFY/aYuZ/qay7xirnp+2pWGs=", "owner": "o1-labs", "repo": "opam-repository", - "rev": "38d6995e307c82b3c0b3bc86a867213db724d1c5", + "rev": "677657206d9da47987a4eff8087c1f3a258908f3", "type": "github" }, "original": { @@ -470,15 +432,9 @@ "flake-compat": "flake-compat_2", "flake-utils": "flake-utils_3", "mirage-opam-overlays": "mirage-opam-overlays", - "nixpkgs": [ - "mina", - "nixpkgs" - ], + "nixpkgs": ["mina", "nixpkgs"], "opam-overlays": "opam-overlays", - "opam-repository": [ - "mina", - "opam-repository" - ], + "opam-repository": ["mina", "opam-repository"], "opam2json": "opam2json" }, "locked": { @@ -514,26 +470,23 @@ "opam-repository": { "flake": false, "locked": { - "lastModified": 1708601497, - "narHash": "sha256-mDYINTjOiYLN4wT5fGlWTvHFQdWkzY46XUuZWKgmJxY=", + "lastModified": 1750360330, + "narHash": "sha256-sizv8xZ/E/OgsE/ak9Oo+iEuBpzvUs08T0S+yXXzaDs=", "owner": "ocaml", "repo": "opam-repository", - "rev": "90d8c520a4f0b035ac51e267a8b33739c5a78b5a", + "rev": "08d8c16c16dc6b23a5278b06dff0ac6c7a217356", "type": "github" }, "original": { "owner": "ocaml", "repo": "opam-repository", + "rev": "08d8c16c16dc6b23a5278b06dff0ac6c7a217356", "type": "github" } }, "opam2json": { "inputs": { - "nixpkgs": [ - "mina", - "opam-nix", - "nixpkgs" - ] + "nixpkgs": ["mina", "opam-nix", "nixpkgs"] }, "locked": { "lastModified": 1671540003, @@ -555,7 +508,6 @@ "dune-nix": "dune-nix", "flake-utils": "flake-utils", "mina": "mina", - "nixpkgs-mina": "nixpkgs-mina", "nixpkgs-mozilla": "nixpkgs-mozilla_2" } }, diff --git a/flake.nix b/flake.nix index 9f450ad3a1..fdca8db425 100644 --- a/flake.nix +++ b/flake.nix @@ -2,16 +2,15 @@ description = "o1js - TypeScript framework for zk-SNARKs and zkApps"; inputs = { self.submodules = true; - nixpkgs-mina.url = "github:nixos/nixpkgs/nixos-24.11-small"; mina.url = ./src/mina; mina.inputs.dune-nix.follows = "dune-nix"; nixpkgs-mozilla.url = "github:mozilla/nixpkgs-mozilla"; nixpkgs-mozilla.flake = false; describe-dune.url = "github:o1-labs/describe-dune"; - describe-dune.inputs.nixpkgs.follows = "nixpkgs-mina"; + describe-dune.inputs.nixpkgs.follows = "mina/nixpkgs"; describe-dune.inputs.flake-utils.follows = "flake-utils"; dune-nix.url = "github:o1-labs/dune-nix?ref=brian/relative-flakes-fix"; - dune-nix.inputs.nixpkgs.follows = "nixpkgs-mina"; + dune-nix.inputs.nixpkgs.follows = "mina/nixpkgs"; dune-nix.inputs.flake-utils.follows = "flake-utils"; flake-utils.url = "github:numtide/flake-utils"; }; @@ -29,14 +28,16 @@ "nix-cache.minaprotocol.org:D3B1W+V7ND1Fmfii8EhbAbF1JXoe2Ct4N34OKChwk2c=" ]; }; - outputs = { self, nixpkgs-mina, flake-utils, ... }@inputs: + outputs = { self, flake-utils, ... }@inputs: flake-utils.lib.eachDefaultSystem (system: let - pkgs = ((nixpkgs-mina.legacyPackages."${system}".extend - (import inputs.nixpkgs-mozilla)).extend - inputs.mina.overlays.rust).extend - (final: prev: { inherit (nixpkgs-mina.legacyPackages."${system}") - nodePackages nodejs; }); + pkgs = import inputs.mina.inputs.nixpkgs { + inherit system; + overlays = [ + (import inputs.nixpkgs-mozilla) + inputs.mina.overlays.rust + ]; + }; dune-nix = inputs.dune-nix.lib.${system}; describe-dune = inputs.describe-dune.defaultPackage.${system}; dune-description = pkgs.stdenv.mkDerivation { @@ -76,6 +77,8 @@ (builtins.attrNames minaDeps_)); commonOverrides = { DUNE_PROFILE = "dev"; + OCAML_WARN_ERROR = ""; + WARN_ERROR = ""; buildInputs = [ mina.base-libs ] ++ mina.external-libs ++ pkgs.lib.attrVals minaDeps mina.pkgs; }; @@ -101,6 +104,7 @@ }; }; }; + # TODO this should really auto update from mina rust-channel = ((pkgs.rustChannelOf { @@ -128,7 +132,7 @@ }; bindings-pkgs = with pkgs; [ - nodejs + nodejs_22 # Use newer Node.js with better WASM support nodePackages.npm nodePackages.prettier typescript @@ -141,7 +145,7 @@ o1js-npm-deps = pkgs.buildNpmPackage { - name = "o1js"; + name = "o1js-npm-deps"; src = with pkgs.lib.fileset; (toSource { root = ./.; @@ -175,7 +179,7 @@ checkPhase = if pkgs.stdenv.isDarwin then "" else null; text = '' - if [ "$1" = run ] && [ "$2" = nightly-2024-09-05 ] + if [ "$1" = run ] && { [ "$2" = nightly-2024-09-05 ] || [[ "$2" =~ 1.79-x86_64* ]]; } then echo using nix toolchain ${rustup}/bin/rustup run nix "''${@:3}" @@ -233,6 +237,7 @@ KIMCHI_STUBS KIMCHI_STUBS_STATIC_LIB ; + PREBUILT_KIMCHI_BINDINGS_JS_WEB = "${mina.files.src-lib-crypto-kimchi_bindings-js-web}/src/lib/crypto/kimchi_bindings/js/web"; PREBUILT_KIMCHI_BINDINGS_JS_NODE_JS = @@ -240,6 +245,8 @@ EXPORT_TEST_VECTORS = "${test-vectors}/bin/export_test_vectors"; SKIP_MINA_COMMIT = true; JUST_BINDINGS = true; + OCAMLPARAM = "_,w=-67"; + DUNE_BUILD_OPTIONS = "--promote-install-files"; buildInputs = (with pkgs; [ rustupWrapper @@ -272,6 +279,24 @@ popd ''; }; + + o1js = pkgs.buildNpmPackage + { + name = "o1js"; + src = with pkgs.lib.fileset; + (toSource { + root = ./.; + fileset = unions [ + ./. + ]; + }); + npmDepsHash = builtins.readFile ./npmDepsHash; + preBuild = '' + cp -r ${bindings}/* ./src/bindings + ls src/bindings/compiled/ + chmod +w -R src/bindings/compiled + ''; + }; in { formatter = pkgs.nixfmt; @@ -287,6 +312,10 @@ else { packages = [ rustupWrapper mina.base-libs ] ++ bindings-pkgs; + OCAMLPARAM = "_,w=-67"; + DUNE_BUILD_OPTIONS = "--promote-install-files"; + LD_LIBRARY_PATH = "${pkgs.bzip2.out}/lib:$LD_LIBRARY_PATH"; + shellHook = '' RUSTUP_HOME=$(pwd)/.rustup export RUSTUP_HOME @@ -303,6 +332,8 @@ # TODO build from ./ocaml root, not ./. (after fixing a bug in dune-nix) packages = { inherit dune-description bindings; + npm-deps = o1js-npm-deps; + default = o1js; bindings-tar = pkgs.stdenv.mkDerivation { name = "bindings.tar.gz"; src = bindings; @@ -314,7 +345,6 @@ tar czf $out . ''; }; - npm-deps = o1js-npm-deps; }; apps = { update-npm-deps = { diff --git a/src/bindings/crypto/finite-field.ts b/src/bindings/crypto/finite-field.ts index a12cd24ef4..fe8b86f470 100644 --- a/src/bindings/crypto/finite-field.ts +++ b/src/bindings/crypto/finite-field.ts @@ -137,8 +137,8 @@ function fastInverse(x: bigint, p: bigint, n: number, kmax: bigint, twoToMinusKm u = unew >> wn; v = vnew >> wn; - if (u < 0) ((u = -u), (f0n = -f0n), (g0n = -g0n)); - if (v < 0) ((v = -v), (f1n = -f1n), (g1n = -g1n)); + if (u < 0) (u = -u), (f0n = -f0n), (g0n = -g0n); + if (v < 0) (v = -v), (f1n = -f1n), (g1n = -g1n); let rnew = r * f0n + s * g0n; let snew = s * g1n + r * f1n; diff --git a/src/bindings/ocaml/lib/local_ledger.ml b/src/bindings/ocaml/lib/local_ledger.ml index faac56aa42..650fbcf79c 100644 --- a/src/bindings/ocaml/lib/local_ledger.ml +++ b/src/bindings/ocaml/lib/local_ledger.ml @@ -238,6 +238,7 @@ let apply_zkapp_command_transaction l (txn : Zkapp_command.Stable.Latest.t) let ledger = l##.value in let application_result = Transaction_logic.apply_zkapp_command_unchecked + ~signature_kind ~global_slot:network_state.global_slot_since_genesis ~state_view:network_state ~constraint_constants: diff --git a/src/index.ts b/src/index.ts index f9233757f8..3e9a96706e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -152,7 +152,7 @@ namespace Experimental { export type MinaProgramMethodReturn< State extends V2_.StateLayout = 'GenericState', Event = Field[], - Action = Field[] + Action = Field[], > = V2_.MinaProgramMethodReturn; export type StateDefinition = V2_.StateDefinition; export type ZkappCommandAuthorizationEnvironment = V2_.ZkappCommandAuthorizationEnvironment; @@ -160,7 +160,7 @@ namespace Experimental { State extends StateLayout, Event, Action, - MethodPrivateInputs extends { [key: string]: V2_.ProvableTuple } + MethodPrivateInputs extends { [key: string]: V2_.ProvableTuple }, > = V2_.MinaProgram; export type DynamicProvable

= V2_.DynamicProvable

; } @@ -212,7 +212,7 @@ namespace Experimental { export class BatchReducer< ActionType extends Actionable, BatchSize extends number = number, - Action = InferProvable + Action = InferProvable, > extends BatchReducer_.BatchReducer {} /** diff --git a/src/lib/proof-system/zkfunction.ts b/src/lib/proof-system/zkfunction.ts index ea4d729c7c..3c44ec4ba3 100644 --- a/src/lib/proof-system/zkfunction.ts +++ b/src/lib/proof-system/zkfunction.ts @@ -31,7 +31,7 @@ type ZkFunctionConfig = { type MainType< PublicInput, - PrivateInputs extends Tuple + PrivateInputs extends Tuple, > = PublicInput extends undefined ? (...args: TupleToInstances) => void : (publicInput: InferProvable, ...args: TupleToInstances) => void; @@ -41,12 +41,10 @@ type InferMainType = MainType< Config['privateInputTypes'] >; -type ProveMethodType = Get< - Config, - 'publicInputType' -> extends undefined - ? (...args: PrivateInputs) => Promise - : (publicInput: PublicInput, ...args: PrivateInputs) => Promise; +type ProveMethodType = + Get extends undefined + ? (...args: PrivateInputs) => Promise + : (publicInput: PublicInput, ...args: PrivateInputs) => Promise; function ZkFunction( config: Config & { diff --git a/src/lib/proof-system/zkprogram.ts b/src/lib/proof-system/zkprogram.ts index 3ca3ba52e1..df1c64dfca 100644 --- a/src/lib/proof-system/zkprogram.ts +++ b/src/lib/proof-system/zkprogram.ts @@ -225,7 +225,7 @@ type InferMethodType = { */ function ZkProgram< Config extends ConfigBaseType, - _ extends unknown = unknown // weird hack that makes methods infer correctly when their inputs are not annotated + _ extends unknown = unknown, // weird hack that makes methods infer correctly when their inputs are not annotated >( config: Config & { name: string; @@ -603,7 +603,7 @@ type ZkProgram< auxiliaryOutput?: ProvableType; }; }; - } + }, > = ReturnType>; /** @@ -1059,7 +1059,7 @@ function toFieldAndAuxConsts(type: Provable, value: T) { ZkProgram.Proof = function < PublicInputType extends FlexibleProvable, - PublicOutputType extends FlexibleProvable + PublicOutputType extends FlexibleProvable, >(program: { name: string; publicInputType: PublicInputType; @@ -1111,11 +1111,12 @@ function Prover() { // helper types -type Infer = T extends Subclass - ? InstanceType - : T extends ProvableType - ? InferProvableType - : never; +type Infer = + T extends Subclass + ? InstanceType + : T extends ProvableType + ? InferProvableType + : never; type TupleToInstances = { [I in keyof T]: Infer; @@ -1133,13 +1134,13 @@ type MethodReturnType = PublicOutput extends void auxiliaryOutput: AuxiliaryOutput; } : AuxiliaryOutput extends undefined - ? { - publicOutput: PublicOutput; - } - : { - publicOutput: PublicOutput; - auxiliaryOutput: AuxiliaryOutput; - }; + ? { + publicOutput: PublicOutput; + } + : { + publicOutput: PublicOutput; + auxiliaryOutput: AuxiliaryOutput; + }; type Method< PublicInput, @@ -1147,7 +1148,7 @@ type Method< MethodSignature extends { privateInputs: Tuple; auxiliaryOutput?: ProvableType; - } + }, > = PublicInput extends undefined ? { method( @@ -1176,7 +1177,7 @@ type RegularProver< PublicInputType, PublicOutput, Args extends Tuple, - AuxiliaryOutput + AuxiliaryOutput, > = ( publicInput: From, ...args: TupleFrom @@ -1190,7 +1191,7 @@ type Prover< PublicInputType, PublicOutput, Args extends Tuple, - AuxiliaryOutput + AuxiliaryOutput, > = PublicInput extends undefined ? (...args: TupleFrom) => Promise<{ proof: Proof; @@ -1210,8 +1211,8 @@ type ProvableOrVoid = A extends undefined ? typeof Void : ToProvable; type InferProvableOrUndefined = A extends undefined ? undefined : A extends ProvableType - ? InferProvable - : InferProvable | undefined; + ? InferProvable + : InferProvable | undefined; type InferProvableOrVoid = A extends undefined ? void : InferProvable; type UnwrapPromise

= P extends Promise ? T : never; diff --git a/src/lib/util/types.ts b/src/lib/util/types.ts index 00c56bebef..47f6fc1533 100644 --- a/src/lib/util/types.ts +++ b/src/lib/util/types.ts @@ -10,7 +10,7 @@ type AnyTuple = Tuple; type TupleMap, B> = [ ...{ [i in keyof T]: B; - } + }, ]; const Tuple = { diff --git a/src/mina b/src/mina index 990fb36011..07b51671df 160000 --- a/src/mina +++ b/src/mina @@ -1 +1 @@ -Subproject commit 990fb36011269d308dcca664e4cfae3b0c04eab9 +Subproject commit 07b51671dfe2b2617895ac40b9713dec34fd2dbe diff --git a/src/mina-signer/src/signature.unit-test.ts b/src/mina-signer/src/signature.unit-test.ts index 7c1bd306e5..869fdee68a 100644 --- a/src/mina-signer/src/signature.unit-test.ts +++ b/src/mina-signer/src/signature.unit-test.ts @@ -75,7 +75,7 @@ let privateKeys = [ 19152183577529784585604205414612388832924448123778079866321952213819564835523n, 20617898261860919949586898353988281719931035849127590497832022423723702051831n, 28948022309329048855892746252171976963363056481941560715954676764349967630337n, // the keys below this line (including) are larger than p smaller than q - 28948022309329048855892746252171976963363056481941570345257461873688122665643n, // where p is the modulus of the base field + 28948022309329048855892746252171976963363056481941570345257461873688122665643n, // where p is the modulus of the base field 28948022309329048855892746252171976963363056481941579974560246983026277700950n, // and q is the modulus of the scalar field 28948022309329048855892746252171976963363056481941589603863032092364432736257n, 28948022309329048855892746252171976963363056481941599233165817201702587771563n,