Skip to content

Commit edfd391

Browse files
authored
Merge pull request #2241 from o1-labs/querolita/bump-mina-compatible-20250530
Bump `mina` submodule: fix bindings error about signature kind
2 parents 6b6d8b9 + 19b27cf commit edfd391

File tree

4 files changed

+8
-95
lines changed

4 files changed

+8
-95
lines changed

src/bindings/crypto/bindings/bindings.unit-test.ts

Lines changed: 2 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,13 @@ function option<T, S>(spec: Spec<T, S>): Spec<MlOption<T>, S | undefined> {
106106
};
107107
}
108108

109-
equivalentRecord(Bigint256Bindings, wasm, {
109+
equivalentRecord(Bigint256Bindings as Omit<typeof Bigint256Bindings, "caml_bigint_256_print" | "caml_bigint_256_to_string">, wasm, {
110110
caml_bigint_256_of_numeral: undefined, // TODO
111111
caml_bigint_256_of_decimal_string: { from: [decimalString], to: bigint256 },
112112
caml_bigint_256_num_limbs: { from: [], to: number },
113113
caml_bigint_256_bytes_per_limb: { from: [], to: number },
114114
caml_bigint_256_div: { from: [bigint256, bigint256], to: bigint256 },
115115
caml_bigint_256_compare: { from: [bigint256, bigint256], to: number },
116-
caml_bigint_256_print: undefined, // this would spam the console
117-
caml_bigint_256_to_string: { from: [bigint256], to: decimalString },
118116
caml_bigint_256_test_bit: {
119117
from: [bigint256, numberLessThan(256)],
120118
to: boolean,
@@ -124,97 +122,8 @@ equivalentRecord(Bigint256Bindings, wasm, {
124122
caml_bigint_256_deep_copy: { from: [bigint256], to: bigint256 },
125123
});
126124

127-
equivalentRecord(
128-
FpBindings as Omit<
129-
typeof FpBindings,
130-
| 'caml_pasta_fp_copy'
131-
| 'caml_pasta_fp_mut_add'
132-
| 'caml_pasta_fp_mut_sub'
133-
| 'caml_pasta_fp_mut_mul'
134-
| 'caml_pasta_fp_mut_square'
135-
>,
136-
wasm,
137-
{
138-
caml_pasta_fp_size_in_bits: { from: [], to: number },
139-
caml_pasta_fp_size: { from: [], to: fp },
140-
caml_pasta_fp_add: { from: [fp, fp], to: fp },
141-
caml_pasta_fp_sub: { from: [fp, fp], to: fp },
142-
caml_pasta_fp_negate: { from: [fp], to: fp },
143-
caml_pasta_fp_mul: { from: [fp, fp], to: fp },
144-
caml_pasta_fp_div: { from: [fp, fp], to: fp },
145-
caml_pasta_fp_inv: { from: [fp], to: option(fp) },
146-
caml_pasta_fp_square: { from: [fp], to: fp },
147-
caml_pasta_fp_is_square: { from: [fp], to: boolean },
148-
caml_pasta_fp_sqrt: { from: [fp], to: option(fp) },
149-
caml_pasta_fp_of_int: { from: [uint31], to: fp },
150-
caml_pasta_fp_to_string: { from: [fp], to: decimalString },
151-
caml_pasta_fp_of_string: { from: [decimalString], to: fp },
152-
caml_pasta_fp_print: undefined, // this would spam the console
153-
// these aren't defined in Rust
154-
// caml_pasta_fp_copy: { from: [fp, fp], to: unit },
155-
// caml_pasta_fp_mut_add: { from: [fp, fp], to: unit },
156-
// caml_pasta_fp_mut_sub: { from: [fp, fp], to: unit },
157-
// caml_pasta_fp_mut_mul: { from: [fp, fp], to: unit },
158-
// caml_pasta_fp_mut_square: { from: [fp], to: unit },
159-
caml_pasta_fp_compare: { from: [fp, fp], to: number },
160-
caml_pasta_fp_equal: { from: [fp, fp], to: boolean },
161-
caml_pasta_fp_random: undefined, // random outputs won't match
162-
caml_pasta_fp_rng: undefined, // random outputs won't match
163-
caml_pasta_fp_to_bigint: { from: [fp], to: bigint256 },
164-
caml_pasta_fp_of_bigint: { from: [bigint256], to: fp },
165-
caml_pasta_fp_two_adic_root_of_unity: { from: [], to: fp },
166-
caml_pasta_fp_domain_generator: { from: [numberLessThan(32)], to: fp },
167-
caml_pasta_fp_to_bytes: undefined, // not implemented
168-
caml_pasta_fp_of_bytes: undefined, // not implemented
169-
caml_pasta_fp_deep_copy: { from: [fp], to: fp },
170-
}
171-
);
172125

173-
equivalentRecord(
174-
FqBindings as Omit<
175-
typeof FqBindings,
176-
| 'caml_pasta_fq_copy'
177-
| 'caml_pasta_fq_mut_add'
178-
| 'caml_pasta_fq_mut_sub'
179-
| 'caml_pasta_fq_mut_mul'
180-
| 'caml_pasta_fq_mut_square'
181-
>,
182-
wasm,
183-
{
184-
caml_pasta_fq_size_in_bits: { from: [], to: number },
185-
caml_pasta_fq_size: { from: [], to: fq },
186-
caml_pasta_fq_add: { from: [fq, fq], to: fq },
187-
caml_pasta_fq_sub: { from: [fq, fq], to: fq },
188-
caml_pasta_fq_negate: { from: [fq], to: fq },
189-
caml_pasta_fq_mul: { from: [fq, fq], to: fq },
190-
caml_pasta_fq_div: { from: [fq, fq], to: fq },
191-
caml_pasta_fq_inv: { from: [fq], to: option(fq) },
192-
caml_pasta_fq_square: { from: [fq], to: fq },
193-
caml_pasta_fq_is_square: { from: [fq], to: boolean },
194-
caml_pasta_fq_sqrt: { from: [fq], to: option(fq) },
195-
caml_pasta_fq_of_int: { from: [uint31], to: fq },
196-
caml_pasta_fq_to_string: { from: [fq], to: decimalString },
197-
caml_pasta_fq_of_string: { from: [decimalString], to: fq },
198-
caml_pasta_fq_print: undefined, // this would spam the console
199-
// these aren't defined in Rust
200-
// caml_pasta_fq_copy: { from: [fq, fq], to: unit },
201-
// caml_pasta_fq_mut_add: { from: [fq, fq], to: unit },
202-
// caml_pasta_fq_mut_sub: { from: [fq, fq], to: unit },
203-
// caml_pasta_fq_mut_mul: { from: [fq, fq], to: unit },
204-
// caml_pasta_fq_mut_square: { from: [fq], to: unit },
205-
caml_pasta_fq_compare: { from: [fq, fq], to: number },
206-
caml_pasta_fq_equal: { from: [fq, fq], to: boolean },
207-
caml_pasta_fq_random: undefined, // random outputs won't match
208-
caml_pasta_fq_rng: undefined, // random outputs won't match
209-
caml_pasta_fq_to_bigint: { from: [fq], to: bigint256 },
210-
caml_pasta_fq_of_bigint: { from: [bigint256], to: fq },
211-
caml_pasta_fq_two_adic_root_of_unity: { from: [], to: fq },
212-
caml_pasta_fq_domain_generator: { from: [numberLessThan(32)], to: fq },
213-
caml_pasta_fq_to_bytes: undefined, // not implemented
214-
caml_pasta_fq_of_bytes: undefined, // not implemented
215-
caml_pasta_fq_deep_copy: { from: [fq], to: fq },
216-
}
217-
);
126+
218127

219128
// elliptic curve
220129

src/bindings/ocaml/lib/consistency_test.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Other_impl = Pickles.Impls.Wrap
55
module Field = Impl.Field
66
module Account_update = Mina_base.Account_update
77
module Zkapp_command = Mina_base.Zkapp_command
8+
(*module Signed_command = Mina_base.Signed_command*)
89

910
(* Test - functions that have a ts implementation, exposed for ts-ml consistency tests *)
1011

@@ -339,7 +340,8 @@ module Transaction_hash = struct
339340
}
340341
}
341342
in
342-
let payment = Signed_command.sign kp payload in
343+
let signature_kind = Mina_signature_kind.t_DEPRECATED in
344+
let payment = Signed_command.sign ~signature_kind kp payload in
343345
(payment :> Signed_command.t)
344346
|> Signed_command.to_yojson |> Yojson.Safe.to_string |> Js.string
345347
end

src/bindings/ocaml/lib/local_ledger.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ let check_account_update_signatures zkapp_command =
139139
zkapp_command
140140
in
141141
let tx_commitment = Zkapp_command.commitment zkapp_command in
142+
let signature_kind = Mina_signature_kind.t_DEPRECATED in
142143
let full_tx_commitment =
143144
Zkapp_command.Transaction_commitment.create_complete tx_commitment
144145
~memo_hash:(Mina_base.Signed_command_memo.hash memo)
145146
~fee_payer_hash:
146147
(Zkapp_command.Digest.Account_update.create
148+
~signature_kind
147149
(Account_update.of_fee_payer fee_payer) )
148150
in
149151
let key_to_string = Signature_lib.Public_key.Compressed.to_base58_check in

src/mina

Submodule mina updated 280 files

0 commit comments

Comments
 (0)