diff --git a/src/bin_client/test/test_contracts_opcode.sh b/src/bin_client/test/test_contracts_opcode.sh index 16a943c261078c719bdf241e8f47fb8ba6cbe212..b16872000aa325b8ee0624d7759ce69c1a2a1ee7 100644 --- a/src/bin_client/test/test_contracts_opcode.sh +++ b/src/bin_client/test/test_contracts_opcode.sh @@ -353,7 +353,7 @@ assert_storage_contains split_bytes '{ 0xaa ; 0xbb ; 0xcc ; 0xdd ; 0xee ; 0xff } # Test hash consistency between Michelson and the CLI hash_result=`$client hash data '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))' \ - of type '(pair mutez (pair timestamp int))' | grep Blake2b | sed 's/.*: *//'` + of type '(pair mutez (pair timestamp int))' | grep 'Raw Script-expression-ID-Hash' | sed 's/.*: *//'` assert_storage $contract_op_dir/hash_consistency_checker.tz '0x00' \ '(Pair 22220000000 (Pair "2017-12-13T04:49:00Z" 034))' "$hash_result" diff --git a/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml index a50de501587e7e707e43f72eab909e5f753f9aca..d2c3852952bad99089059b323b78fee82777d76f 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml @@ -245,14 +245,16 @@ let commands () = let hash = Script_expr_hash.hash_bytes [ bytes ] in cctxt#message "Raw packed data: 0x%a@,\ - Hash: %a@,\ - Raw Blake2b hash: 0x%a@,\ + Script-expression-ID-Hash: %a@,\ + Raw Script-expression-ID-Hash: 0x%a@,\ + Ledger Blake2b hash: %s@,\ Raw Sha256 hash: 0x%a@,\ Raw Sha512 hash: 0x%a@,\ Gas remaining: %a" MBytes.pp_hex bytes Script_expr_hash.pp hash MBytes.pp_hex (Script_expr_hash.to_bytes hash) + (Base58.raw_encode Blake2B.(hash_bytes [bytes] |> to_string)) MBytes.pp_hex (Environment.Raw_hashes.sha256 bytes) MBytes.pp_hex (Environment.Raw_hashes.sha512 bytes) Alpha_context.Gas.pp remaining_gas >>= fun () ->