Skip to content

Conversation

@bleepbloopsify
Copy link
Contributor

git diff origin/main

summary: bumped mina, zk verification jsons

diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml
index fcd3344bf..4e0369677 100644
--- a/.github/actions/build/action.yml
+++ b/.github/actions/build/action.yml
@@ -23,7 +23,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 6dda1b2f8..877de2f82 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 546dc719c..9a98a8cbc 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -63,7 +63,7 @@ jobs:
   Lint-and-Format:
     strategy:
       matrix:
-        node: [20]
+        node: [22]
     if: github.event.pull_request.labels.*.name != 'skip-lint'
     runs-on: ubuntu-latest
 
@@ -277,8 +277,7 @@ jobs:
       - name: Setup Node.JS ${{ matrix.node }}
         uses: actions/setup-node@v4
         with:
-          node-version: 20
-          # TODO matrixing this requires changing branch protection rules
+          node-version: 22
 
       - name: Restore npm cache
         uses: actions/cache@v4
diff --git a/.github/workflows/push_main.yml b/.github/workflows/push_main.yml
index 3c461b76e..b47476d43 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:
@@ -93,7 +93,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 d8b11daa2..04f3dbfbf 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 ffa2ed9a8..6a0c6e2a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,11 @@ This project adheres to
 
 ## [Unreleased](https://github.com/o1-labs/o1js/compare/3453d1e53...HEAD)
 
+### Fixed
+
+- Updated `VerificationKey.toJSON()` to include the verification key hash for
+  compliant encoding. https://github.com/o1-labs/o1js/pull/2332
+
 ## [2.10.0](https://github.com/o1-labs/o1js/compare/114acff...3453d1e53) - 2025-09-27
 
 ### Internal
diff --git a/dune-project b/dune-project
index 7b17fb2d3..cda95fed5 100644
--- a/dune-project
+++ b/dune-project
@@ -1 +1 @@
-(lang dune 3.3)
+(lang dune 3.1)
diff --git a/flake.lock b/flake.lock
index 187fd34d9..79835d3e2 100644
--- a/flake.lock
+++ b/flake.lock
@@ -133,11 +133,11 @@
     "flake-compat_2": {
       "flake": false,
       "locked": {
-        "lastModified": 1627913399,
-        "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
+        "lastModified": 1747046372,
+        "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
         "owner": "edolstra",
         "repo": "flake-compat",
-        "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
+        "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
         "type": "github"
       },
       "original": {
@@ -180,12 +180,15 @@
       }
     },
     "flake-utils_3": {
+      "inputs": {
+        "systems": "systems_2"
+      },
       "locked": {
-        "lastModified": 1638122382,
-        "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
         "owner": "numtide",
         "repo": "flake-utils",
-        "rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
         "type": "github"
       },
       "original": {
@@ -260,6 +263,7 @@
         "nixpkgs": "nixpkgs_2",
         "nixpkgs-mozilla": "nixpkgs-mozilla",
         "nixpkgs-old": "nixpkgs-old",
+        "nixpkgs-unstable": "nixpkgs-unstable",
         "o1-opam-repository": "o1-opam-repository",
         "opam-nix": "opam-nix",
         "opam-repository": "opam-repository",
@@ -283,11 +287,11 @@
     "mirage-opam-overlays": {
       "flake": false,
       "locked": {
-        "lastModified": 1661959605,
-        "narHash": "sha256-CPTuhYML3F4J58flfp3ZbMNhkRkVFKmBEYBZY5tnQwA=",
+        "lastModified": 1710922379,
+        "narHash": "sha256-j4QREQDUf8oHOX7qg6wAOupgsNQoYlufxoPrgagD+pY=",
         "owner": "dune-universe",
         "repo": "mirage-opam-overlays",
-        "rev": "05f1c1823d891ce4d8adab91f5db3ac51d86dc0b",
+        "rev": "797cb363df3ff763c43c8fbec5cd44de2878757e",
         "type": "github"
       },
       "original": {
@@ -460,6 +464,22 @@
         "type": "github"
       }
     },
+    "nixpkgs-unstable": {
+      "locked": {
+        "lastModified": 1759036355,
+        "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "ref": "nixos-unstable",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "nixpkgs_2": {
       "locked": {
         "lastModified": 1747187171,
@@ -479,11 +499,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": {
@@ -509,11 +529,11 @@
         "opam2json": "opam2json"
       },
       "locked": {
-        "lastModified": 1712645768,
-        "narHash": "sha256-9dUh8nElGtC74Q4gIDV6DM0FKgF1oXh0PUkCxdbp+sg=",
+        "lastModified": 1756988401,
+        "narHash": "sha256-S+zc1RYWZBGKnbrEWbyJ6fGt8ft/9d4BzpigSN2PpqE=",
         "owner": "tweag",
         "repo": "opam-nix",
-        "rev": "464863fba44c7ecc50bd1a2967274482a2c33daf",
+        "rev": "0c9c0e0c058dfb8de56adff612f2c776530f7f1e",
         "type": "github"
       },
       "original": {
@@ -525,11 +545,11 @@
     "opam-overlays": {
       "flake": false,
       "locked": {
-        "lastModified": 1654162756,
-        "narHash": "sha256-RV68fUK+O3zTx61iiHIoS0LvIk0E4voMp+0SwRg6G6c=",
+        "lastModified": 1741116009,
+        "narHash": "sha256-Z0PIW82fHJFvAv/JYpAffnp2DaOjLhsPutqyIrORZd0=",
         "owner": "dune-universe",
         "repo": "opam-overlays",
-        "rev": "c8f6ef0fc5272f254df4a971a47de7848cc1c8a4",
+        "rev": "e031bb64e33bf93be963e9a38b28962e6e14381f",
         "type": "github"
       },
       "original": {
@@ -541,16 +561,17 @@
     "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"
       }
     },
@@ -560,14 +581,15 @@
           "mina",
           "opam-nix",
           "nixpkgs"
-        ]
+        ],
+        "systems": "systems_3"
       },
       "locked": {
-        "lastModified": 1671540003,
-        "narHash": "sha256-5pXfbUfpVABtKbii6aaI2EdAZTjHJ2QntEf0QD2O5AM=",
+        "lastModified": 1749457947,
+        "narHash": "sha256-+QVm+HOYikF3wUhqSIV8qJbE/feSG+p48fgxIosbHS0=",
         "owner": "tweag",
         "repo": "opam2json",
-        "rev": "819d291ea95e271b0e6027679de6abb4d4f7f680",
+        "rev": "0ecd66fc2bfb25d910522c990dd36412259eac1f",
         "type": "github"
       },
       "original": {
@@ -601,6 +623,36 @@
         "type": "github"
       }
     },
+    "systems_2": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
+    "systems_3": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
     "utils": {
       "inputs": {
         "flake-utils": "flake-utils_4"
diff --git a/package.json b/package.json
index 2dc89580b..d97e391ba 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
     "snarky-run": "src/build/run.js"
   },
   "engines": {
-    "node": ">=18.14.0"
+    "node": ">=22.19.5"
   },
   "scripts": {
     "build:dev": "./scripts/build/build-dev.sh",
@@ -71,8 +71,8 @@
     "regression:check-vks": "./scripts/tests/check-vks.sh",
     "regression:dump-perf": "./tests/perf-regression/perf-regression.sh --dump",
     "regression:check-perf": "./tests/perf-regression/perf-regression.sh --check",
-    "format": "prettier --write --ignore-unknown",
-    "format:check": "prettier --check --ignore-unknown",
+    "format": "prettier --write --ignore-unknown --no-error-on-unmatched-pattern",
+    "format:check": "prettier --check --ignore-unknown --no-error-on-unmatched-pattern",
     "format:md": "prettier --config .prettierrc.md.cjs --write '**/*.md'",
     "format:md:check": "prettier --config .prettierrc.md.cjs --check '**/*.md'",
     "clean": "./scripts/clean/clean.sh",
diff --git a/src/bindings/crypto/.gitattributes b/src/bindings/crypto/.gitattributes
new file mode 100644
index 000000000..39a8e7ff4
--- /dev/null
+++ b/src/bindings/crypto/.gitattributes
@@ -0,0 +1 @@
+constants.ts linguist-generated=true
\ No newline at end of file
diff --git a/src/bindings/mina-transaction/gen/.gitattributes b/src/bindings/mina-transaction/gen/.gitattributes
new file mode 100644
index 000000000..4fed26223
--- /dev/null
+++ b/src/bindings/mina-transaction/gen/.gitattributes
@@ -0,0 +1,2 @@
+v1/ linguist-generated=true
+v2/ linguist-generated=true
diff --git a/src/bindings/ocaml/jsoo_exports/dune b/src/bindings/ocaml/jsoo_exports/dune
index 801324c5d..67fd99780 100644
--- a/src/bindings/ocaml/jsoo_exports/dune
+++ b/src/bindings/ocaml/jsoo_exports/dune
@@ -63,12 +63,10 @@
  (name o1js_node)
  (modules o1js_node)
  (modes js)
- (flags (-g))
- (link_flags
-  (-noautolink -g))
+ (link_flags :standard -noautolink -g)
  (js_of_ocaml
-  (flags +toplevel.js +dynlink.js --pretty --source-map)
-  (link_flags --source-map)
+  (flags :standard +toplevel.js +dynlink.js --source-map)
+  (link_flags :standard --source-map)
   (javascript_files overrides.js))
  (libraries o1js_bindings.lib bindings_js.node_backend)
  (link_deps node_js_plonk_wasm.js node_js_plonk_wasm_bg.wasm)
@@ -82,9 +80,9 @@
  (name o1js_web)
  (modules o1js_web)
  (modes js)
- (link_flags (-noautolink))
+ (link_flags :standard -noautolink)
  (js_of_ocaml
-  (flags +toplevel.js +dynlink.js --pretty)
+  (flags :standard +toplevel.js +dynlink.js)
   (javascript_files overrides.js))
  (libraries o1js_bindings.lib bindings_js.web_backend)
  (link_deps web_plonk_wasm.js web_plonk_wasm_bg.wasm)
diff --git a/src/bindings/ocaml/lib/consistency_test.ml b/src/bindings/ocaml/lib/consistency_test.ml
index b407b25d2..fafa14b09 100644
--- a/src/bindings/ocaml/lib/consistency_test.ml
+++ b/src/bindings/ocaml/lib/consistency_test.ml
@@ -289,7 +289,7 @@ module Transaction_hash = struct
       |> Signed_command.of_yojson |> ok_exn
     in
     Mina_transaction.Transaction_hash.(
-      command |> hash_signed_command |> to_base58_check |> Js.string )
+      command |> hash_signed_command |> to_base58_check |> Js.string)
 
   let hash_zkapp_command (command : Js.js_string Js.t) =
     let command : Zkapp_command.Stable.Latest.t =
@@ -297,7 +297,7 @@ module Transaction_hash = struct
       |> Zkapp_command.of_json
     in
     Mina_transaction.Transaction_hash.(
-      command |> hash_zkapp_command |> to_base58_check |> Js.string )
+      command |> hash_zkapp_command |> to_base58_check |> Js.string)
 
   let hash_payment_v1 (command : Js.js_string Js.t) =
     let command : Signed_command.Stable.V1.t =
diff --git a/src/bindings/ocaml/lib/local_ledger.ml b/src/bindings/ocaml/lib/local_ledger.ml
index faac56aa4..085353451 100644
--- a/src/bindings/ocaml/lib/local_ledger.ml
+++ b/src/bindings/ocaml/lib/local_ledger.ml
@@ -237,7 +237,7 @@ let apply_zkapp_command_transaction l (txn : Zkapp_command.Stable.Latest.t)
   check_account_update_signatures txn ;
   let ledger = l##.value in
   let application_result =
-    Transaction_logic.apply_zkapp_command_unchecked
+    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/lib/proof-system/verification-key.ts b/src/lib/proof-system/verification-key.ts
index 26b521d73..f7b985232 100644
--- a/src/lib/proof-system/verification-key.ts
+++ b/src/lib/proof-system/verification-key.ts
@@ -9,8 +9,8 @@ export { VerificationKey };
 
 class VerificationKey extends Struct({
   ...provable({ data: String, hash: Field }),
-  toJSON({ data }: { data: string }) {
-    return data;
+  toJSON({ data, hash }: { data: string; hash: Field }) {
+    return { data, hash: hash.toString() };
   },
 }) {
   static async dummy(): Promise<VerificationKey> {
diff --git a/src/lib/proof-system/verification-key.unit-test.ts b/src/lib/proof-system/verification-key.unit-test.ts
index 24e9cd82c..5b008160d 100644
--- a/src/lib/proof-system/verification-key.unit-test.ts
+++ b/src/lib/proof-system/verification-key.unit-test.ts
@@ -19,3 +19,8 @@ const invalidVerificationKey = new VerificationKey({
 
 let vkIsNotValid = await VerificationKey.checkValidity(invalidVerificationKey);
 assert(vkIsNotValid === false, 'invalid verification key is being accepted as valid');
+
+const jsonVk = VerificationKey.toJSON(generated);
+const decodedVk = VerificationKey.fromJSON(jsonVk);
+let decodedVkIsValid = await VerificationKey.checkValidity(decodedVk);
+assert(decodedVkIsValid === true, 'decoded valid verification key is being rejected as invalid');
diff --git a/src/mina b/src/mina
index 569e99c95..992ac748a 160000
--- a/src/mina
+++ b/src/mina
@@ -1 +1 @@
-Subproject commit 569e99c95834841d64858644c5d80ac7e63d0157
+Subproject commit 992ac748ae16347460bd4d5859b0c8b5ce26e847

This reverts commit a257893.
@bleepbloopsify bleepbloopsify marked this pull request as ready for review October 20, 2025 14:44
@bleepbloopsify bleepbloopsify requested review from a team as code owners October 20, 2025 14:44
@bleepbloopsify bleepbloopsify requested review from 0x471 and Shigoto-dev19 and removed request for a team October 20, 2025 14:44
@bleepbloopsify
Copy link
Contributor Author

weekly develop bump, PTAL

@bleepbloopsify
Copy link
Contributor Author

diff is a little bigger (and will probably continue to grow)

I'd like to use github's diff viewer for this, does anyone know how to get git to show that? right now its showing all the changes the other way (I might be able to open a separate PR just to show the diff each time, going the other way?)

@bleepbloopsify bleepbloopsify merged commit 346479a into develop Oct 23, 2025
25 checks passed
@bleepbloopsify bleepbloopsify deleted the leon/develop-main branch October 23, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants