Skip to content

Commit

Permalink
Merge pull request #15129 from MinaProtocol/fix/use-legacy-receipt-ch…
Browse files Browse the repository at this point in the history
…ain-hash-develop

use random_oracle.legacy.salt for receipt_chain_hash.empty
  • Loading branch information
ghost-not-in-the-shell authored Feb 15, 2024
2 parents e5b9d46 + 106c095 commit 0c9eea0
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 16 deletions.
5 changes: 5 additions & 0 deletions buildkite/src/Command/ReplayerTest.dhall
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
let B = ../External/Buildkite.dhall

let Prelude = ../External/Prelude.dhall

let Command = ./Base.dhall
let Docker = ./Docker/Type.dhall
let Size = ./Size.dhall

let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type

let Cmd = ../Lib/Cmds.dhall in

{ step = \(dependsOn : List Command.TaggedKey.Type) ->
Expand All @@ -14,6 +18,7 @@ let Cmd = ../Lib/Cmds.dhall in
],
label = "Replayer test",
key = "replayer-test",
soft_fail = Some (B/SoftFail.Boolean True),
target = Size.Large,
depends_on = dependsOn
}
Expand Down
4 changes: 4 additions & 0 deletions scripts/compare-replayer-and-fork-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cat $1 | jq '.genesis_ledger.accounts | .[] | {pk: .pk, balance: .balance, delegate: .delegate, receipt_chain_hash: .receipt_chain_hash, voting_for: .voting_for, nonce: (.nonce // "0")}' > replayer_output.json
cat $2 | jq '.ledger.accounts | .[] | {pk: .pk, balance: .balance, delegate: .delegate, receipt_chain_hash: .receipt_chain_hash, voting_for: .voting_for, nonce: (.nonce // "0")}' > fork_output.json

diff replayer_output.json fork_output.json
2 changes: 1 addition & 1 deletion src/app/print_blockchain_snark_vk/blockchain_snark_vk.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/crypto/snarky_tests/snarky_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ module Protocol_circuits = struct

let transaction () : unit =
let expected1 = "b8879f677f622a1d86648030701f43e1" in
let expected2 = "a58d09e2904bad2e3f983b3f9b0cf78f" in
let expected2 = "c17f6cef52fc6c73d389c0128e41a924" in
let digest =
Transaction_snark.constraint_system_digests ~constraint_constants ()
in
Expand Down
2 changes: 1 addition & 1 deletion src/lib/hash_prefixes/hash_prefixes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let signature_mainnet = create "MinaSignatureMainnet"

let signature_other chain_name = create (chain_name ^ "Signature")

let receipt_chain_user_command = create "MinaReceiptUC"
let receipt_chain_user_command = create "CodaReceiptUC"

(* leaving this one with "Coda", to preserve the existing hashes *)
let receipt_chain_zkapp = create "CodaReceiptZkapp"
Expand Down
3 changes: 1 addition & 2 deletions src/lib/mina_base/receipt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ module Chain_hash = struct

let equal = Stable.Latest.equal

let empty =
of_hash (Hash_prefix_create.salt "CodaReceiptEmpty" |> Random_oracle.digest)
let empty = of_hash Random_oracle.Legacy.(salt "CodaReceiptEmpty" |> digest)

let cons_signed_command_payload (e : Signed_command_elt.t) (t : t) =
let open Random_oracle.Legacy in
Expand Down
2 changes: 1 addition & 1 deletion src/lib/transaction_snark/test/app_state/proof_cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/transaction_snark/test/delegate/proof_cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/transaction_snark/test/fee_payer/proof_cache.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/transaction_snark/test/voting_for/proof_cache.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/transaction_snark/test/zkapp_uri/proof_cache.json

Large diffs are not rendered by default.

0 comments on commit 0c9eea0

Please sign in to comment.