Conversation
|
!ci-build-me |
3195374 to
5fc1159
Compare
|
!ci-build-me |
| >>| Or_error.ok_exn ) | ||
| else return () | ||
| in | ||
| let (`If_this_is_used_it_should_have_a_comment_justifying_it valid_command) = |
There was a problem hiding this comment.
Could we add back (* This is used in the context of a test, and we know that the command is valid *) here?
| let zkapp_cmd = | ||
| Quickcheck.Generator.generate | ||
| (Mina_generators.Zkapp_command_generators.gen_max_cost_zkapp_command_from | ||
| ~n_updates:15 |
There was a problem hiding this comment.
Again, could we derive these values from node config?
| ~size:1 | ||
| ~random:(Splittable_random.State.create Random.State.default) | ||
| in | ||
| Ref.replace nonce_ref Unsigned.UInt32.succ ; |
There was a problem hiding this comment.
Why do we not need to update account_state_tbl here? Also maybe lift advance_nonce to top level so it's reusable both here and in generate_txs?
| in | ||
| advance_nonce () ; res | ||
| in | ||
| let (`If_this_is_used_it_should_have_a_comment_justifying_it |
| ~key:(Signature_lib.Public_key.compress kp.Keypair.public_key) | ||
| ~data:kp.Keypair.private_key ) | ||
| in | ||
| Deferred.List.map rest_txs ~f:(fun block_txs -> |
There was a problem hiding this comment.
The semantic changed a bit, we used to gnerate n_payments payments with n_zkapp_txs max-cost zkapp txns if max cost is set.
Now we're generating n_payments payments with n_zkapp_txs regular zkapp txs and a single max cost zkapp txn.
Is this expected? If so, could you explain a bit?
|
Just a note: it doesn't fix #18730, but still it's nice to have. |
fixes #18730
The
test_submit_to_archive --max-costtool was generating structurally correct but completely fake max-cost zkapp transactions. The account updates claimed to have Proof authorization but carried dummy proofs that would never verify. The deployed zkapp accounts had random VKs from a quickcheck generator, while the max-cost transactions referenced a dummy VK. TLDR, even if the proofs were real, the VKs wouldn't match. The whole thing only worked because staged ledger verification was fully skipped when building blocks.We fixed this by
create_trivial_snappto get a real VK and prover, runningreplace_authorizationsto generate real proofs for each account update, and changingskip_staged_ledger_verificationfromAlltoProofsso blocks are actually validated--verifyflag that callsPickles.Side_loaded.verifyon the proof triples