1
- #![ allow( unused) ]
2
-
3
- use std:: {
4
- cell:: { Ref , RefCell } ,
5
- collections:: VecDeque ,
6
- rc:: Rc ,
7
- str:: FromStr ,
8
- } ;
1
+ use std:: { cell:: RefCell , rc:: Rc } ;
9
2
10
3
use ark_ff:: { BigInteger256 , Zero } ;
11
- use ark_poly:: { EvaluationDomain , Radix2EvaluationDomain } ;
12
4
use kimchi:: proof:: PointEvaluations ;
13
5
use mina_curves:: pasta:: Fq ;
14
6
use mina_hasher:: Fp ;
@@ -18,20 +10,18 @@ use crate::{
18
10
hash_with_kimchi,
19
11
proofs:: {
20
12
constants:: {
21
- make_step_transaction_data, make_step_zkapp_data, StepMergeProof ,
22
- StepZkappOptSignedOptSignedProof , WrapTransactionProof , WrapZkappOptSignedProof ,
23
- WrapZkappProof ,
13
+ make_step_zkapp_data, StepMergeProof , StepZkappOptSignedOptSignedProof ,
14
+ WrapZkappOptSignedProof , WrapZkappProof ,
24
15
} ,
25
- field:: { field , Boolean , CircuitVar , FieldWitness , ToBoolean } ,
26
- merge:: { dlog_plonk_index , generate_merge_proof, MergeParams } ,
16
+ field:: { Boolean , CircuitVar , FieldWitness , ToBoolean } ,
17
+ merge:: { generate_merge_proof, MergeParams } ,
27
18
public_input:: { messages:: MessagesForNextWrapProof , prepared_statement:: DeferredValues } ,
28
19
step:: {
29
20
extract_recursion_challenges, step, InductiveRule , OptFlag , PreviousProofStatement ,
30
21
StepParams , StepProof ,
31
22
} ,
32
- transaction:: { transaction_snark :: CONSTRAINT_CONSTANTS , ReducedMessagesForNextStepProof } ,
23
+ transaction:: ReducedMessagesForNextStepProof ,
33
24
unfinalized:: { AllEvals , EvalsWithPublicInput } ,
34
- util:: sha256_sum,
35
25
verification:: prev_evals_to_p2p,
36
26
verifier_index:: make_zkapp_verifier_index,
37
27
wrap:: { self , WrapParams , WrapProofState , WrapStatement } ,
@@ -45,26 +35,22 @@ use crate::{
45
35
transaction_logic:: {
46
36
local_state:: {
47
37
LocalState , LocalStateEnv , LocalStateSkeleton , StackFrame , StackFrameChecked ,
48
- WithLazyHash ,
49
- } ,
50
- protocol_state:: {
51
- protocol_state_body_view, protocol_state_view, GlobalState , GlobalStateSkeleton ,
52
38
} ,
39
+ protocol_state:: { protocol_state_body_view, GlobalState , GlobalStateSkeleton } ,
53
40
zkapp_command:: {
54
- self , AccountUpdate , AccountUpdateSkeleton , CallForest , ClosedInterval , Control ,
55
- WithHash , ZkAppCommand , ZkAppPreconditions , ACCOUNT_UPDATE_CONS_HASH_PARAM ,
41
+ AccountUpdate , CallForest , Control , WithHash , ZkAppCommand ,
42
+ ACCOUNT_UPDATE_CONS_HASH_PARAM ,
56
43
} ,
57
44
zkapp_statement:: { TransactionCommitment , ZkappStatement } ,
58
45
TransactionFailure ,
59
46
} ,
60
47
} ,
61
48
sparse_ledger:: SparseLedger ,
62
49
zkapps:: {
63
- intefaces:: ZkappApplication ,
64
- snark:: { zkapp_check:: InSnarkCheck , AccountUnhashed , ZkappSnark } ,
50
+ snark:: ZkappSnark ,
65
51
zkapp_logic:: { self , ApplyZkappParams } ,
66
52
} ,
67
- AccountId , ControlTag , MyCow , ToInputs , TokenId , ZkAppAccount ,
53
+ AccountId , ControlTag , ToInputs , TokenId ,
68
54
} ;
69
55
70
56
use self :: group:: SegmentBasic ;
@@ -77,7 +63,7 @@ use super::{
77
63
field:: GroupAffine ,
78
64
numbers:: {
79
65
currency:: { CheckedAmount , CheckedSigned } ,
80
- nat:: { CheckedIndex , CheckedNat , CheckedSlot } ,
66
+ nat:: { CheckedIndex , CheckedSlot } ,
81
67
} ,
82
68
to_field_elements:: ToFieldElements ,
83
69
transaction:: { dummy_constraints, Check , Prover } ,
@@ -213,7 +199,7 @@ mod group {
213
199
// I don't take responsability for this code, see OCaml comments
214
200
// https://github.com/MinaProtocol/mina/blob/78535ae3a73e0e90c5f66155365a934a15535779/src/lib/mina_base/zkapp_command.ml#L1590
215
201
match ( zkapp_commands, stmtss) {
216
- ( ( [ ] | [ [ ] ] ) , [ _ ] ) => {
202
+ ( [ ] | [ [ ] ] , [ _ ] ) => {
217
203
eprintln ! ( "GROUP 1" ) ;
218
204
return ;
219
205
} ,
@@ -285,7 +271,7 @@ mod group {
285
271
group_by_zkapp_command_rev_impl ( zkapp_commands. as_slice ( ) , stmtss. as_slice ( ) , acc) ;
286
272
}
287
273
( [ [ ] , zkapp_command @ [ AccountUpdate { authorization : a1, .. } , AccountUpdate { authorization : Proof ( _) , .. } , ..] , zkapp_commands @ ..] ,
288
- ( [ [ _ ] , stmts @ [ before, after, ..] , stmtss @ ..] )
274
+ [ [ _ ] , stmts @ [ before, after, ..] , stmtss @ ..]
289
275
) => {
290
276
eprintln ! ( "GROUP 9" ) ;
291
277
let stmts = & stmts[ 1 ..] ;
@@ -578,7 +564,7 @@ pub fn zkapp_command_witnesses_exn(
578
564
target : Stack :: empty ( ) ,
579
565
} ;
580
566
581
- let mut w = Vec :: with_capacity ( 32 ) ;
567
+ let w = Vec :: with_capacity ( 32 ) ;
582
568
states. into_iter ( ) . fold ( w, |mut witnesses, s| {
583
569
let ZkappCommandIntermediateState {
584
570
kind,
@@ -681,7 +667,7 @@ pub fn zkapp_command_witnesses_exn(
681
667
zkapp_command1,
682
668
) = v1;
683
669
let (
684
- pending_coinbase_init_stack2 ,
670
+ _pending_coinbase_init_stack2 ,
685
671
pending_coinbase_stack_state2,
686
672
zkapp_command2,
687
673
) = v2;
@@ -817,7 +803,7 @@ pub fn zkapp_command_witnesses_exn(
817
803
full_transaction_commitment,
818
804
excess,
819
805
supply_increase,
820
- ledger,
806
+ ledger : _ ,
821
807
success,
822
808
account_update_index,
823
809
failure_status_tbl,
@@ -851,7 +837,7 @@ pub fn zkapp_command_witnesses_exn(
851
837
full_transaction_commitment,
852
838
excess,
853
839
supply_increase,
854
- ledger,
840
+ ledger : _ ,
855
841
success,
856
842
account_update_index,
857
843
failure_status_tbl,
@@ -1215,7 +1201,7 @@ fn zkapp_main(
1215
1201
} ) ;
1216
1202
1217
1203
let on_true = local. stack_frame . hash ( w) ;
1218
- let local_state_ledger = w. exists_no_check ( match local. success . as_boolean ( ) {
1204
+ let _local_state_ledger = w. exists_no_check ( match local. success . as_boolean ( ) {
1219
1205
Boolean :: True => on_true,
1220
1206
Boolean :: False => statement. target . local_state . stack_frame ,
1221
1207
} ) ;
@@ -1416,7 +1402,7 @@ impl From<&WrapProof> for v2::PicklesProofProofsVerified2ReprStableV2 {
1416
1402
} ,
1417
1403
evals,
1418
1404
ft_eval1,
1419
- prev_challenges,
1405
+ prev_challenges : _ ,
1420
1406
} ,
1421
1407
statement :
1422
1408
WrapStatement {
@@ -1426,6 +1412,8 @@ impl From<&WrapProof> for v2::PicklesProofProofsVerified2ReprStableV2 {
1426
1412
prev_evals,
1427
1413
} = value;
1428
1414
1415
+ assert ! ( lookup. is_none( ) ) ;
1416
+
1429
1417
use mina_p2p_messages:: bigint:: BigInt ;
1430
1418
use mina_p2p_messages:: pseq:: PaddedSeq ;
1431
1419
use std:: array;
@@ -1439,9 +1427,9 @@ impl From<&WrapProof> for v2::PicklesProofProofsVerified2ReprStableV2 {
1439
1427
deferred_values :
1440
1428
DeferredValues {
1441
1429
plonk,
1442
- combined_inner_product,
1443
- b,
1444
- xi,
1430
+ combined_inner_product : _ ,
1431
+ b : _ ,
1432
+ xi : _ ,
1445
1433
bulletproof_challenges,
1446
1434
branch_data,
1447
1435
} ,
@@ -1530,7 +1518,7 @@ impl From<&WrapProof> for v2::PicklesProofProofsVerified2ReprStableV2 {
1530
1518
} ,
1531
1519
messages_for_next_step_proof : {
1532
1520
let ReducedMessagesForNextStepProof {
1533
- app_state,
1521
+ app_state : _ ,
1534
1522
challenge_polynomial_commitments,
1535
1523
old_bulletproof_challenges,
1536
1524
} = messages_for_next_step_proof;
@@ -1733,7 +1721,7 @@ pub fn generate_zkapp_proof(params: ZkappParams) -> LedgerProof {
1733
1721
let mut witnesses_specs_stmts = witnesses_specs_stmts. into_iter ( ) . rev ( ) ;
1734
1722
let ( zkapp_witness, spec, statement) = witnesses_specs_stmts. next ( ) . unwrap ( ) ; // last one
1735
1723
1736
- let mut first_proof = of_zkapp_command_segment (
1724
+ let first_proof = of_zkapp_command_segment (
1737
1725
statement. with_digest ( sok_digest. clone ( ) ) ,
1738
1726
& zkapp_witness,
1739
1727
& spec,
0 commit comments