diff --git a/contrib/kaitai-struct-files/files/alpha__lazy_storage_diff.ksy b/contrib/kaitai-struct-files/files/alpha__lazy_storage_diff.ksy index c33332601a7182213509cf789dca0002ee277f56..ea9b3b3045ec42ad0a78924b9876362d5a3100b6 100644 --- a/contrib/kaitai-struct-files/files/alpha__lazy_storage_diff.ksy +++ b/contrib/kaitai-struct-files/files/alpha__lazy_storage_diff.ksy @@ -341,7 +341,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -356,7 +356,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -509,7 +509,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -560,7 +560,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -707,10 +707,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -721,6 +721,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket bool: 0: false 255: true diff --git a/contrib/kaitai-struct-files/files/alpha__operation.ksy b/contrib/kaitai-struct-files/files/alpha__operation.ksy index 42216b92f4feb7dd3d9378630ababfd9e2389f3f..eec2d802a26eb03a6d86224874f3c12a1ba61131 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation.ksy @@ -1493,7 +1493,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1508,7 +1508,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1661,7 +1661,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1712,7 +1712,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1859,10 +1859,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1873,6 +1873,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation__alpha__contents_or_signature_prefix_tag: 1: seed_nonce_revelation 2: double_attestation_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy b/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy index c47bb86c1ce7d73b1ef21eb7a031fb521099f953..dbdd148d1614247e0883aadaf652d0c6b0f4bf89 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy @@ -1470,7 +1470,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1485,7 +1485,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1638,7 +1638,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1689,7 +1689,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1836,10 +1836,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1850,6 +1850,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation_with_legacy_attestation_name__alpha__contents_tag: 1: seed_nonce_revelation 2: double_endorsement_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy b/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy index 78c6a2afc70375d28b5b195aa7ea1d6c57ba414d..d1519219f49bde9128ffbd357e02f3da96680700 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy @@ -1474,7 +1474,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1489,7 +1489,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1642,7 +1642,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1693,7 +1693,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1840,10 +1840,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1854,6 +1854,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation_with_legacy_attestation_name__alpha__contents_tag: 1: seed_nonce_revelation 2: double_endorsement_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation__internal.ksy b/contrib/kaitai-struct-files/files/alpha__operation__internal.ksy index 3a2da16b43de42e1fbc919e00cc56dacf569dafd..8fa5e3c3e95aada65ecfc4c18b9dd8483e6455b1 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__internal.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__internal.ksy @@ -369,7 +369,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -384,7 +384,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -537,7 +537,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -588,7 +588,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -735,10 +735,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -749,6 +749,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__transaction_destination_tag: 0: implicit 1: originated diff --git a/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy b/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy index 58542eb7c47aa41bf4feb8a86aeabf333675efbd..276da8a10e515069c435c231f43b471f387fba07 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy @@ -1493,7 +1493,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1508,7 +1508,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1661,7 +1661,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1712,7 +1712,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1859,10 +1859,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1873,6 +1873,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation__alpha__contents_or_signature_prefix_tag: 1: seed_nonce_revelation 2: double_attestation_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy b/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy index fda84fff4c4f2b67e4a86b7d3de7407b37562b47..72c102f9810f9c198e8ffdd05e81fdbec845c13e 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy @@ -1481,7 +1481,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1496,7 +1496,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1649,7 +1649,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1700,7 +1700,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1847,10 +1847,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1861,6 +1861,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation_with_legacy_attestation_name__alpha__contents_tag: 1: seed_nonce_revelation 2: double_endorsement_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation_with_attestation.ksy b/contrib/kaitai-struct-files/files/alpha__operation_with_attestation.ksy index 2568df8f21f59d068a928c2c7ac8277d27b059c5..e544c61b7283d40115de4ecb27551d48d7039f9c 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation_with_attestation.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation_with_attestation.ksy @@ -1493,7 +1493,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1508,7 +1508,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1661,7 +1661,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1712,7 +1712,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1859,10 +1859,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1873,6 +1873,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation__alpha__contents_or_signature_prefix_tag: 1: seed_nonce_revelation 2: double_attestation_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__operation_with_attestation__unsigned.ksy b/contrib/kaitai-struct-files/files/alpha__operation_with_attestation__unsigned.ksy index a2f32e036ac9b70b0e26bff00abd3bda9b531660..47716eef6506b44549a77f399d7a9abcd0f0ff3d 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation_with_attestation__unsigned.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation_with_attestation__unsigned.ksy @@ -1481,7 +1481,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -1496,7 +1496,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -1649,7 +1649,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -1700,7 +1700,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -1847,10 +1847,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -1861,6 +1861,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__operation__alpha__contents_tag: 1: seed_nonce_revelation 2: double_attestation_evidence diff --git a/contrib/kaitai-struct-files/files/alpha__script__expr.ksy b/contrib/kaitai-struct-files/files/alpha__script__expr.ksy index d9af959b9fbe7056ed723da2bbd0f5bc5d144cd9..c599d1234d57fd1c76caafe44f3e5ce71376a6be 100644 --- a/contrib/kaitai-struct-files/files/alpha__script__expr.ksy +++ b/contrib/kaitai-struct-files/files/alpha__script__expr.ksy @@ -170,7 +170,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -185,7 +185,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -338,7 +338,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -389,7 +389,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -536,10 +536,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -550,6 +550,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket micheline__alpha__michelson_v1__expression_tag: 0: int 1: string diff --git a/contrib/kaitai-struct-files/files/alpha__script__prim.ksy b/contrib/kaitai-struct-files/files/alpha__script__prim.ksy index b2e15b522375e2a6578ff05f89bd60675bb49aa3..efb1b440d9a2adec77792adf85f2cbe86d8760ce 100644 --- a/contrib/kaitai-struct-files/files/alpha__script__prim.ksy +++ b/contrib/kaitai-struct-files/files/alpha__script__prim.ksy @@ -23,7 +23,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -38,7 +38,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -191,7 +191,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -242,7 +242,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -389,10 +389,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -403,6 +403,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket seq: - id: alpha__michelson__v1__primitives type: alpha__michelson__v1__primitives diff --git a/contrib/kaitai-struct-files/files/alpha__smart_rollup__inbox__message.ksy b/contrib/kaitai-struct-files/files/alpha__smart_rollup__inbox__message.ksy index 9f2c1907da88e9488c475fc91a1f49637b9fcb7f..43cd3631155327c9ddd98e844cac367757c577df 100644 --- a/contrib/kaitai-struct-files/files/alpha__smart_rollup__inbox__message.ksy +++ b/contrib/kaitai-struct-files/files/alpha__smart_rollup__inbox__message.ksy @@ -220,7 +220,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -235,7 +235,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -388,7 +388,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -439,7 +439,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -586,10 +586,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -600,6 +600,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__smart_rollup__inbox__message_tag: 0: internal 1: external diff --git a/contrib/kaitai-struct-files/files/alpha__smart_rollup__outbox__message.ksy b/contrib/kaitai-struct-files/files/alpha__smart_rollup__outbox__message.ksy index a8cefad3cee1b6c85c3e6d3a2e572fcb65d06176..5726928afac97019e18e057d657c848ba69349e6 100644 --- a/contrib/kaitai-struct-files/files/alpha__smart_rollup__outbox__message.ksy +++ b/contrib/kaitai-struct-files/files/alpha__smart_rollup__outbox__message.ksy @@ -283,7 +283,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -298,7 +298,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -451,7 +451,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -502,7 +502,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -649,10 +649,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -663,6 +663,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket alpha__smart_rollup__outbox__message_tag: 0: atomic_transaction_batch 1: atomic_transaction_batch_typed diff --git a/contrib/kaitai-struct-files/files/alpha__smart_rollup__output.ksy b/contrib/kaitai-struct-files/files/alpha__smart_rollup__output.ksy index 6436cc3a74fe24fb60a167f83b5d3b5575e18029..b8df4d08475b6cb1f575ac3cdbd9e84eb120f5cb 100644 --- a/contrib/kaitai-struct-files/files/alpha__smart_rollup__output.ksy +++ b/contrib/kaitai-struct-files/files/alpha__smart_rollup__output.ksy @@ -303,7 +303,7 @@ enums: id: left doc: Left 6: - id: none_0 + id: none doc: None 7: id: pair_1 @@ -318,7 +318,7 @@ enums: id: true doc: True 11: - id: unit_0 + id: unit_1 doc: Unit 12: id: pack @@ -471,7 +471,7 @@ enums: id: nil doc: NIL 62: - id: none + id: none_0 doc: NONE 63: id: not @@ -522,7 +522,7 @@ enums: id: set_delegate doc: SET_DELEGATE 79: - id: unit_1 + id: unit_0 doc: UNIT 80: id: update @@ -669,10 +669,10 @@ enums: id: emit doc: EMIT 152: - id: lambda_rec + id: lambda_rec_0 doc: Lambda_rec 153: - id: lambda_rec_0 + id: lambda_rec doc: LAMBDA_REC 154: id: ticket_0 @@ -683,6 +683,9 @@ enums: 156: id: nat_0 doc: NAT + 157: + id: ticket_1 + doc: Ticket bool: 0: false 255: true diff --git a/src/proto_alpha/lib_benchmark/lib_benchmark_type_inference/mikhailsky_prim.ml b/src/proto_alpha/lib_benchmark/lib_benchmark_type_inference/mikhailsky_prim.ml index 362ec1eb45f2b3b4972ee9425454a1305ac92338..cd6689498404dd2fa05288d8c654f86caec6fba3 100644 --- a/src/proto_alpha/lib_benchmark/lib_benchmark_type_inference/mikhailsky_prim.ml +++ b/src/proto_alpha/lib_benchmark/lib_benchmark_type_inference/mikhailsky_prim.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2021 Nomadic Labs, *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -41,6 +42,7 @@ type prim = | D_Some | D_True | D_Unit + | D_Ticket | I_PACK | I_UNPACK | I_BLAKE2B @@ -378,6 +380,7 @@ let string_of_prim prim = | D_Some -> "D_Some" | D_True -> "D_True" | D_Unit -> "D_Unit" + | D_Ticket -> "D_Ticket" | I_PACK -> "I_PACK" | I_UNPACK -> "I_UNPACK" | I_BLAKE2B -> "I_BLAKE2B" @@ -537,7 +540,7 @@ let kind (x : prim) = match x with | K_parameter | K_storage | K_code -> Keyword_kind | D_Hole | D_False | D_Elt | D_Left | D_None | D_Pair | D_Right | D_Some - | D_True | D_Unit -> + | D_True | D_Unit | D_Ticket -> Data_kind | I_PACK | I_UNPACK | I_BLAKE2B | I_SHA256 | I_SHA512 | I_ABS | I_ADD | I_AMOUNT | I_AND | I_BALANCE | I_CAR | I_CDR | I_CHAIN_ID diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 9345ee7cc1b3ea5ee423d70824ae3a95e156e7b0..5b8462966e39a05304546ae3657141a9c15d8e18 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -5,6 +5,7 @@ (* Copyright (c) 2019-2022 Nomadic Labs *) (* Copyright (c) 2022 TriliTech *) (* Copyright (c) 2022 DaiLambda, Inc. *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -556,6 +557,7 @@ module Script : sig | D_Some | D_True | D_Unit + | D_Ticket | D_Lambda_rec | I_PACK | I_UNPACK diff --git a/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml b/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml index 8c198be16e91493afd538e56476ac9bdc2e6ac2e..17b6a4c6ad83f0302a74681f05495528fabdeb50 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml +++ b/src/proto_alpha/lib_protocol/michelson_v1_primitives.ml @@ -4,6 +4,7 @@ (* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. *) (* Copyright (c) 2020 Metastate AG *) (* Copyright (c) 2022 DaiLambda, Inc. *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -49,6 +50,7 @@ type prim = | D_Some | D_True | D_Unit + | D_Ticket | D_Lambda_rec | I_PACK | I_UNPACK @@ -206,7 +208,7 @@ type namespace = let namespace = function | K_code | K_view | K_parameter | K_storage -> Keyword_namespace | D_Elt | D_False | D_Left | D_None | D_Pair | D_Right | D_Some | D_True - | D_Unit | D_Lambda_rec -> + | D_Unit | D_Lambda_rec | D_Ticket -> Constant_namespace | I_ABS | I_ADD | I_ADDRESS | I_AMOUNT | I_AND | I_APPLY | I_BALANCE | I_BLAKE2B | I_CAR | I_CAST | I_CDR | I_CHAIN_ID | I_CHECK_SIGNATURE @@ -262,6 +264,7 @@ let string_of_prim = function | D_Some -> "Some" | D_True -> "True" | D_Unit -> "Unit" + | D_Ticket -> "Ticket" | D_Lambda_rec -> "Lambda_rec" | I_PACK -> "PACK" | I_UNPACK -> "UNPACK" @@ -423,6 +426,7 @@ let prim_of_string = | "Some" -> return D_Some | "True" -> return D_True | "Unit" -> return D_Unit + | "Ticket" -> return D_Ticket | "Lambda_rec" -> return D_Lambda_rec | "PACK" -> return I_PACK | "UNPACK" -> return I_UNPACK @@ -792,9 +796,11 @@ let prim_encoding = ("LAMBDA_REC", I_LAMBDA_REC); ("TICKET", I_TICKET); ("BYTES", I_BYTES); - ("NAT", I_NAT) + ("NAT", I_NAT); + (* Ticket constructor. *) + ("Ticket", D_Ticket); (* New instructions must be added here, for backward compatibility of the encoding. *) - (* Keep the comment above at the end of the list *); + (* Keep the comment above at the end of the list *) ] let () = diff --git a/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli b/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli index 761631190abad0277bf956b546bdb0afc6f38448..133edfc06799e4abdb5c088d4aa6f0ce6a95e65d 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli +++ b/src/proto_alpha/lib_protocol/michelson_v1_primitives.mli @@ -3,6 +3,7 @@ (* Open Source License *) (* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. *) (* Copyright (c) 2020 Metastate AG *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -61,6 +62,7 @@ type prim = | D_Some | D_True | D_Unit + | D_Ticket | D_Lambda_rec | I_PACK | I_UNPACK diff --git a/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml b/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml index 3bd0d7b13667cdc51a0c41dda59705ecddbe78a5..b6039a4a886f3e573c1a20471443cf0b5ec18b8c 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2022 Trili Tech, *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -76,7 +77,7 @@ let make_transaction ctxt ~parameters_ty ~unparsed_parameters ~destination let+ parameters, ctxt = Script_ir_translator.parse_data ctxt - ~elab_conf:Script_ir_translator_config.(make ~legacy:false ()) + ~elab_conf:Script_ir_translator_config.(make ~legacy:true ()) ~allow_forged:true parameters_ty (Micheline.root unparsed_parameters) diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index 91fcfc55f07c563d038e7c984c5c8b6b03d436a5..b4dea96c30010a0dd4216032332fc5915d4bc89b 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -6,6 +6,7 @@ (* Copyright (c) 2021-2022 Nomadic Labs *) (* Copyright (c) 2022 Trili Tech *) (* Copyright (c) 2022 DaiLambda, Inc. *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -2331,10 +2332,48 @@ let rec parse_data : traced_fail (Invalid_kind (location expr, [Seq_kind], kind expr)) (* Tickets *) | Ticket_t (t, _ty_name), expr -> + (* This local function handles the case of parsing the `Ticket` data constructor. *) + let parse_ticket loc ticketer contents_type contents amount = + (* Ensure that the content type provided in the ticket constructor + matches the ticket type expected by the entrypoint. *) + let*? Ex_ty expected, ctxt = + parse_any_ty ctxt ~stack_depth:(stack_depth + 1) ~legacy contents_type + in + let*? eq, _ctxt = + Gas_monad.run ctxt + @@ + let open Gas_monad.Syntax in + let error_details = Informative loc in + let* Eq = ty_eq ~error_details t expected in + ty_eq ~error_details t expected + in + let*? Eq = eq in + let* {destination; entrypoint = _}, ctxt = + non_terminal_recursion ctxt address_t ticketer + in + let* contents, ctxt = non_terminal_recursion ctxt t contents in + let+ amount, ctxt = non_terminal_recursion ctxt nat_t amount in + ((destination, contents, amount), ctxt) + in if allow_forged then - let*? ty = opened_ticket_type (location expr) t in - let* ({destination; entrypoint = _}, (contents, amount)), ctxt = - non_terminal_recursion ctxt ty expr + let* (destination, contents, amount), ctxt = + match expr with + | Prim + ( loc, + D_Ticket, + [ticketer; contents_type; contents; amount], + _annot ) -> + parse_ticket loc ticketer contents_type contents amount + | Prim (_, D_Pair, _, _) -> + if legacy then + let*? ty = opened_ticket_type (location expr) t in + let+ ({destination; entrypoint = _}, (contents, amount)), ctxt = + non_terminal_recursion ctxt ty expr + in + ((destination, contents, amount), ctxt) + else tzfail @@ unexpected expr [] Constant_namespace [D_Ticket] + | _ -> + tzfail @@ unexpected expr [] Constant_namespace [D_Ticket; D_Pair] in match Ticket_amount.of_n amount with | Some amount -> ( diff --git a/src/proto_alpha/lib_protocol/script_ir_unparser.ml b/src/proto_alpha/lib_protocol/script_ir_unparser.ml index 8ab7dc86632bbd74f3ff2ce9bdfae49c189880ad..4e5a1b2a11a10318bb4faeec61c55532c5f94eef 100644 --- a/src/proto_alpha/lib_protocol/script_ir_unparser.ml +++ b/src/proto_alpha/lib_protocol/script_ir_unparser.ml @@ -563,17 +563,36 @@ module Data_unparser (P : MICHELSON_PARSER) = struct items.elements in (Micheline.Seq (loc, List.rev items), ctxt) - | Ticket_t (t, _), {ticketer; contents; amount} -> - (* ideally we would like to allow a little overhead here because it is only used for unparsing *) - let*? t = P.opened_ticket_type loc t in - let destination : Destination.t = Contract ticketer in - let addr = {destination; entrypoint = Entrypoint.default} in - (unparse_data_rec [@tailcall]) - ctxt - ~stack_depth - mode - t - (addr, (contents, (amount :> Script_int.n Script_int.num))) + | Ticket_t (t, _), {ticketer; contents; amount} -> ( + match mode with + | Optimized_legacy -> + let*? t = P.opened_ticket_type loc t in + let destination : Destination.t = Contract ticketer in + let addr = {destination; entrypoint = Entrypoint.default} in + (unparse_data_rec [@tailcall]) + ctxt + ~stack_depth + mode + t + (addr, (contents, (amount :> Script_int.n Script_int.num))) + | Optimized | Readable -> + let open Lwt_result_syntax in + let destination : Destination.t = Contract ticketer in + let addr = {destination; entrypoint = Entrypoint.default} in + let amount = (amount :> Script_int.n Script_int.num) in + let*? ticketer, ctxt = unparse_address ~loc ctxt mode addr in + let* contents, ctxt = + non_terminal_recursion ctxt mode t contents + in + let*? amount, ctxt = unparse_nat ~loc ctxt amount in + let*? contents_type, ctxt = unparse_ty ~loc ctxt t in + return + ( Prim + ( loc, + D_Ticket, + [ticketer; contents_type; contents; amount], + [] ), + ctxt )) | Set_t (t, _), set -> let+ items, ctxt = List.fold_left_es diff --git a/src/proto_alpha/lib_protocol/test/helpers/test_global_constants.ml b/src/proto_alpha/lib_protocol/test/helpers/test_global_constants.ml index d497a075934ec1a33dfa58f44153acf0f1def69d..c05ae1b804b216f103a2b1433c5ae704ae2cf675 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/test_global_constants.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/test_global_constants.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -85,6 +86,7 @@ module Generators = struct D_Some; D_True; D_Unit; + D_Ticket; I_PACK; I_UNPACK; I_BLAKE2B; diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_direct_spending.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_direct_spending.ml index 045e6f86fd3c089212d406bc3b3aeed2167d9e41..a030994c462fd45e1b089600b3dc1eab7d43ee07 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_direct_spending.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_direct_spending.ml @@ -2,7 +2,7 @@ (* *) (* SPDX-License-Identifier: MIT *) (* Copyright (c) 2023 Nomadic Labs *) -(* Copyright (c) 2023 Marigold *) +(* Copyright (c) 2023-2024 Marigold *) (* *) (*****************************************************************************) @@ -145,7 +145,7 @@ let test_spending ~direct_ticket_spending_enable () = (Destination.Contract implicit) block in - let arg = sf "Pair %S Unit 1" boomerang_str in + let arg = sf "Ticket %S unit Unit 1" boomerang_str in if direct_ticket_spending_enable then let* block = call_contract ~source:implicit ~contract:consumer ~arg block in assert_ticket_balance diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml index f5a6f50d7a3359ae2793eb59026175ddb2ec9d36..69a3271057533fabc566d4d309675a6f21beb4da 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_ticket_scanner.ml @@ -3,6 +3,7 @@ (* Open Source License *) (* Copyright (c) 2021 Trili Tech, *) (* Copyright (c) 2022 Nomadic Labs, *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -285,7 +286,9 @@ let test_tickets_in_unit_ticket () = let open Lwt_result_wrap_syntax in let* ctxt = new_ctxt () in let type_exp = "ticket(unit)" in - let value_exp = {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" Unit 10|} in + let value_exp = + {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" unit Unit 10|} + in let* ex_ticket, ctxt = make_ex_ticket ctxt @@ -317,10 +320,10 @@ let test_tickets_in_list_with_zero_amount () = ~value_exp: {| { - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 3; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "orange" 0; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 3; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "orange" 0; } |} @@ -333,9 +336,9 @@ let test_tickets_in_list () = ~value_exp: {| { - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 3; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 3; } |} ~expected: @@ -353,9 +356,9 @@ let test_tickets_in_pair_with_zero_amount () = ~value_exp: {| Pair - (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1) - (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2) - (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 0) + (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1) + (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2) + (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 0) |} (** Test that all tickets can be extracted from a pair of tickets *) @@ -367,8 +370,8 @@ let test_tickets_in_pair () = ~value_exp: {| Pair - (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1) - (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2) + (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1) + (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2) |} ~expected: [ @@ -384,9 +387,9 @@ let test_tickets_in_map_with_zero_amount () = ~value_exp: {| { - Elt 1 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1); - Elt 2 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2); - Elt 3 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 0); + Elt 1 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1); + Elt 2 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2); + Elt 3 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 0); } |} @@ -399,8 +402,8 @@ let test_tickets_in_map () = ~value_exp: {| { - Elt 1 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1); - Elt 2 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2); + Elt 1 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1); + Elt 2 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2); } |} ~expected: @@ -424,8 +427,8 @@ let test_tickets_in_big_map () = ~value_exp: {| { - Elt 1 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1); - Elt 2 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2); + Elt 1 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1); + Elt 2 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2); } |} @@ -439,9 +442,9 @@ let test_tickets_in_big_map_strict_only () = ~value_exp: {| { - Elt 1 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1); - Elt 2 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 2); - Elt 3 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 3); + Elt 1 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1); + Elt 2 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 2); + Elt 3 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 3); } |} ~expected:[] @@ -462,12 +465,12 @@ let test_tickets_in_list_in_big_map () = {| { Elt 1 { - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1 ; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 1 + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 1 }; Elt 2 { - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 1 ; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "orange" 1 + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 1; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "orange" 1 } } |} @@ -483,12 +486,12 @@ let test_tickets_in_pair_big_map_and_list_strict_only () = {| Pair { - Elt 1 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1); - Elt 2 (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 1) + Elt 1 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1); + Elt 2 (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 1) } { - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 1; - Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "orange" 1 + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 1; + Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "orange" 1 } |} ~expected: @@ -503,7 +506,8 @@ let test_tickets_in_or_left () = ~loc:__LOC__ ~include_lazy:false ~type_exp:"or (ticket string) int" - ~value_exp:{| Left (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1) |} + ~value_exp: + {| Left (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1) |} ~expected:[("KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq", "red", 1)] (** Test that tickets from the left side of an or-expression with zero amount @@ -513,7 +517,8 @@ let test_tickets_in_or_left_with_zero_amount () = ~loc:__LOC__ ~include_lazy:false ~type_exp:"or (ticket string) int" - ~value_exp:{| Left (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 0) |} + ~value_exp: + {| Left (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 0) |} (** Test that tickets can be extracted from the right side of an or-expression. *) let test_tickets_in_or_right () = @@ -521,7 +526,8 @@ let test_tickets_in_or_right () = ~loc:__LOC__ ~include_lazy:false ~type_exp:"or int (ticket string)" - ~value_exp:{| Right (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1) |} + ~value_exp: + {| Right (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1) |} ~expected:[("KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq", "red", 1)] (* @@ -549,9 +555,9 @@ let test_tickets_in_non_empty_big_map_ref () = ~loc:__LOC__ ~pre_populated: [ - (1, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1|}); - (2, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 1|}); - (3, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 1|}); + (1, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1|}); + (2, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 1|}); + (3, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 1|}); ] ~big_map_exp:(Printf.sprintf "%s") [ @@ -573,7 +579,7 @@ let test_tickets_overlay_in_empty_big_map_ref () = ~pre_populated:[] ~big_map_exp: (Printf.sprintf - {|Pair %s { Elt 1 (Some (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1))}|}) + {|Pair %s { Elt 1 (Some (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1))}|}) (** Test tickets from non-empty big-map when passed as a pair of identifier and overrides. The scanned tickets are contained in the context as well as @@ -588,15 +594,15 @@ let test_tickets_overlay_in_non_empty_in_big_map_ref () = ~loc:__LOC__ ~pre_populated: [ - (1, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1|}); - (2, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 1|}); - (3, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "blue" 1|}); + (1, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1|}); + (2, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 1|}); + (3, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "blue" 1|}); ] ~big_map_exp: (Printf.sprintf {| Pair %s - { Elt 4 (Some (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "orange" 1))} + { Elt 4 (Some (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "orange" 1))} |}) (** Test tickets from non-empty big-map when passed as a pair of identifier @@ -610,12 +616,12 @@ let test_tickets_replace_overlay_in_non_empty_in_big_map_ref () = assert_fail_non_empty_overlay_with_big_map_ref ~loc:__LOC__ ~pre_populated: - [(1, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1|})] + [(1, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1|})] ~big_map_exp: (Printf.sprintf {| Pair %s - { Elt 1 (Some (Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "green" 1))} + { Elt 1 (Some (Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "green" 1))} |}) (** Test tickets from non-empty big-map when passed as a pair of identifier @@ -629,7 +635,7 @@ let test_tickets_remove_overlay_in_non_empty_in_big_map_ref () = assert_fail_non_empty_overlay_with_big_map_ref ~loc:__LOC__ ~pre_populated: - [(1, {|Pair "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" "red" 1|})] + [(1, {|Ticket "KT1ThEdxfUcWUwqsdergy3QnbCWGHSUHeHJq" string "red" 1|})] ~big_map_exp:(Printf.sprintf {| Pair %s { Elt 1 None} |}) let tests = diff --git a/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_join.out b/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_join.out index 9b2173a0c4f327ff0d387fc082863437f378cccd..4770d2a5ced8e24c4b3d84f44ed8eee3e06a7767 100644 --- a/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_join.out +++ b/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_join.out @@ -1,42 +1,42 @@ trace - UNPAIR (interp) @ location: 10 - [ (Pair (Pair "[CONTRACT_HASH]" 17 3) None) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 3) None) ] - UNPAIR (entry) @ location: 10 - [ (Pair (Pair "[CONTRACT_HASH]" 17 3) None) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 3) None) ] - log/SWAP (exit) @ location: 10 - [ (Pair "[CONTRACT_HASH]" 17 3) + [ (Ticket "[CONTRACT_HASH]" nat 17 3) None ] - SWAP (entry) @ location: 11 - [ (Pair "[CONTRACT_HASH]" 17 3) + [ (Ticket "[CONTRACT_HASH]" nat 17 3) None ] - log/IF_NONE (exit) @ location: 11 [ None - (Pair "[CONTRACT_HASH]" 17 3) ] + (Ticket "[CONTRACT_HASH]" nat 17 3) ] - IF_NONE (entry) @ location: 12 [ None - (Pair "[CONTRACT_HASH]" 17 3) ] + (Ticket "[CONTRACT_HASH]" nat 17 3) ] - log/[halt] (exit) @ location: 12 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - [halt] (entry) @ location: 24 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - control: KCons - log/SOME (exit) @ location: 12 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - SOME (entry) @ location: 24 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - log/NIL (exit) @ location: 24 - [ (Some (Pair "[CONTRACT_HASH]" 17 3)) ] + [ (Some (Ticket "[CONTRACT_HASH]" nat 17 3)) ] - NIL (entry) @ location: 25 - [ (Some (Pair "[CONTRACT_HASH]" 17 3)) ] + [ (Some (Ticket "[CONTRACT_HASH]" nat 17 3)) ] - log/PAIR (exit) @ location: 25 [ {} - (Some (Pair "[CONTRACT_HASH]" 17 3)) ] + (Some (Ticket "[CONTRACT_HASH]" nat 17 3)) ] - PAIR (entry) @ location: 27 [ {} - (Some (Pair "[CONTRACT_HASH]" 17 3)) ] + (Some (Ticket "[CONTRACT_HASH]" nat 17 3)) ] - log/[halt] (exit) @ location: 27 - [ (Pair {} (Some (Pair "[CONTRACT_HASH]" 17 3))) ] + [ (Pair {} (Some (Ticket "[CONTRACT_HASH]" nat 17 3))) ] - [halt] (entry) @ location: 9 - [ (Pair {} (Some (Pair "[CONTRACT_HASH]" 17 3))) ] + [ (Pair {} (Some (Ticket "[CONTRACT_HASH]" nat 17 3))) ] - control: KNil diff --git a/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_split.out b/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_split.out index ae449fe91b48e6372c56fc00fb9a6dd8fc25b1d5..5e90aa81ca71b874b604a537785dc98e69dd7ada 100644 --- a/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_split.out +++ b/src/proto_alpha/lib_protocol/test/regression/expected/test_logging.ml/ticket_split.out @@ -1,164 +1,164 @@ trace - CAR (interp) @ location: 8 - [ (Pair (Pair "[CONTRACT_HASH]" 17 3) Unit) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 3) Unit) ] - CAR (entry) @ location: 8 - [ (Pair (Pair "[CONTRACT_HASH]" 17 3) Unit) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 3) Unit) ] - log/PUSH (exit) @ location: 8 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - PUSH (entry) @ location: 9 - [ (Pair "[CONTRACT_HASH]" 17 3) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 3) ] - log/SWAP (exit) @ location: 9 [ (Pair 1 2) - (Pair "[CONTRACT_HASH]" 17 3) ] + (Ticket "[CONTRACT_HASH]" nat 17 3) ] - SWAP (entry) @ location: 16 [ (Pair 1 2) - (Pair "[CONTRACT_HASH]" 17 3) ] + (Ticket "[CONTRACT_HASH]" nat 17 3) ] - log/SPLIT_TICKET (exit) @ location: 16 - [ (Pair "[CONTRACT_HASH]" 17 3) + [ (Ticket "[CONTRACT_HASH]" nat 17 3) (Pair 1 2) ] - SPLIT_TICKET (entry) @ location: 17 - [ (Pair "[CONTRACT_HASH]" 17 3) + [ (Ticket "[CONTRACT_HASH]" nat 17 3) (Pair 1 2) ] - log/IF_NONE (exit) @ location: 17 - [ (Some (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2))) ] + [ (Some (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2))) ] - IF_NONE (entry) @ location: 19 - [ (Some (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2))) ] + [ (Some (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2))) ] - log/[halt] (exit) @ location: 19 - [ (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2)) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2)) ] - [halt] (entry) @ location: 25 - [ (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2)) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2)) ] - control: KCons - log/UNPAIR (exit) @ location: 19 - [ (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2)) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2)) ] - UNPAIR (entry) @ location: 25 - [ (Pair (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2)) ] + [ (Pair (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2)) ] - log/READ_TICKET (exit) @ location: 25 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - READ_TICKET (entry) @ location: 26 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/CDR (exit) @ location: 26 [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - CDR (entry) @ location: 28 [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/CDR (exit) @ location: 28 [ (Pair 17 1) - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - CDR (entry) @ location: 29 [ (Pair 17 1) - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/PUSH (exit) @ location: 29 [ 1 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - PUSH (entry) @ location: 30 [ 1 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/COMPARE (exit) @ location: 30 [ 1 1 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - COMPARE (entry) @ location: 35 [ 1 1 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/EQ (exit) @ location: 35 [ 0 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - EQ (entry) @ location: 36 [ 0 - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/IF (exit) @ location: 36 [ True - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - IF (entry) @ location: 37 [ True - (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/[halt] (exit) @ location: 37 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - [halt] (entry) @ location: 43 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - control: KCons - log/DROP (exit) @ location: 37 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - DROP (entry) @ location: 43 - [ (Pair "[CONTRACT_HASH]" 17 1) - (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 1) + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/READ_TICKET (exit) @ location: 43 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - READ_TICKET (entry) @ location: 44 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/CDR (exit) @ location: 44 [ (Pair "[CONTRACT_HASH]" 17 2) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - CDR (entry) @ location: 46 [ (Pair "[CONTRACT_HASH]" 17 2) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/CDR (exit) @ location: 46 [ (Pair 17 2) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - CDR (entry) @ location: 47 [ (Pair 17 2) - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/PUSH (exit) @ location: 47 [ 2 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - PUSH (entry) @ location: 48 [ 2 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/COMPARE (exit) @ location: 48 [ 2 2 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - COMPARE (entry) @ location: 53 [ 2 2 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/EQ (exit) @ location: 53 [ 0 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - EQ (entry) @ location: 54 [ 0 - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/IF (exit) @ location: 54 [ True - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - IF (entry) @ location: 55 [ True - (Pair "[CONTRACT_HASH]" 17 2) ] + (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/[halt] (exit) @ location: 55 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - [halt] (entry) @ location: 61 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - control: KCons - log/DROP (exit) @ location: 55 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - DROP (entry) @ location: 61 - [ (Pair "[CONTRACT_HASH]" 17 2) ] + [ (Ticket "[CONTRACT_HASH]" nat 17 2) ] - log/UNIT (exit) @ location: 61 [ ] - UNIT (entry) @ location: 62 diff --git a/src/proto_alpha/lib_protocol/test/regression/test_logging.ml b/src/proto_alpha/lib_protocol/test/regression/test_logging.ml index af8a498c528604cac8e94c99b98556cf62b4ae6b..647de825435b75b2a0b4a0a52edc130a2a6501e3 100644 --- a/src/proto_alpha/lib_protocol/test/regression/test_logging.ml +++ b/src/proto_alpha/lib_protocol/test/regression/test_logging.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2022 Nomadic Labs, *) +(* Copyright (c) 2024 Marigold, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -378,11 +379,11 @@ let () = ~storage:"{}" "spawn_identities"; transaction - ~parameter:"Pair \"KT1Ln1MPvHDJ1phLL8dNL4jrKF6Q1yQCBG1v\" 17 3" + ~parameter:"Ticket \"KT1Ln1MPvHDJ1phLL8dNL4jrKF6Q1yQCBG1v\" nat 17 3" ~storage:"None" "ticket_join"; transaction - ~parameter:"Pair \"KT1Ln1MPvHDJ1phLL8dNL4jrKF6Q1yQCBG1v\" 17 3" + ~parameter:"Ticket \"KT1Ln1MPvHDJ1phLL8dNL4jrKF6Q1yQCBG1v\" nat 17 3" ~storage:"Unit" "ticket_split"; transaction ~parameter:"5" ~storage:"3" "view_toplevel_lib"; diff --git a/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out b/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out index fb805354308b29ebc6f9e04e8f2a489584367dc3..28377b56fa75f9306a5c71d7bf90692c9030bfb5 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Create and remove tickets.out @@ -58,8 +58,8 @@ Contract memorized as add_clear_tickets. ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "A"' Node is bootstrapped. -Estimated gas: 1751.651 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) +Estimated gas: 1751.443 units (will add 100 for safety) +Estimated storage: 113 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -69,13 +69,13 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.000453 + Fee to the baker: ꜩ0.000454 Expected counter: 1 Gas limit: 1852 - Storage limit: 125 bytes + Storage limit: 133 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000453 - payload fees(the block proposer) ....... +ꜩ0.000453 + [PUBLIC_KEY_HASH] ... -ꜩ0.000454 + payload fees(the block proposer) ....... +ꜩ0.000454 Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] @@ -84,13 +84,13 @@ This sequence of operations was run: Parameter: (Pair 1 "A") This transaction was successfully applied Updated storage: - { Pair 0x01435e1f410af86271d7c8c3c98a8708157a45269200 (Pair "A" 1) } - Storage size: 180 bytes - Paid storage size diff: 105 bytes - Consumed gas: 1752.186 + { Ticket 0x01435e1f410af86271d7c8c3c98a8708157a45269200 string "A" 1 } + Storage size: 188 bytes + Paid storage size diff: 113 bytes + Consumed gas: 1752.012 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 + [PUBLIC_KEY_HASH] ... -ꜩ0.02825 + storage fees ........................... +ꜩ0.02825 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -101,7 +101,7 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint clear --arg Unit Node is bootstrapped. -Estimated gas: 1941.323 units (will add 100 for safety) +Estimated gas: 1941.519 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -127,7 +127,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: {} Storage size: 141 bytes - Consumed gas: 1941.859 + Consumed gas: 1942.055 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -138,7 +138,7 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "B"' Node is bootstrapped. -Estimated gas: 1751.651 units (will add 100 for safety) +Estimated gas: 1751.443 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -164,9 +164,9 @@ This sequence of operations was run: Parameter: (Pair 1 "B") This transaction was successfully applied Updated storage: - { Pair 0x01435e1f410af86271d7c8c3c98a8708157a45269200 (Pair "B" 1) } - Storage size: 180 bytes - Consumed gas: 1752.186 + { Ticket 0x01435e1f410af86271d7c8c3c98a8708157a45269200 string "B" 1 } + Storage size: 188 bytes + Consumed gas: 1751.978 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -177,8 +177,8 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 2 --entrypoint add --arg 'Pair 1 "C"' Node is bootstrapped. -Estimated gas: 2433.661 units (will add 100 for safety) -Estimated storage: 105 bytes added (will add 20 for safety) +Estimated gas: 2433.441 units (will add 100 for safety) +Estimated storage: 113 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -188,13 +188,13 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.000521 + Fee to the baker: ꜩ0.000522 Expected counter: 4 Gas limit: 2534 - Storage limit: 125 bytes + Storage limit: 133 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000521 - payload fees(the block proposer) ....... +ꜩ0.000521 + [PUBLIC_KEY_HASH] ... -ꜩ0.000522 + payload fees(the block proposer) ....... +ꜩ0.000522 Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] @@ -203,14 +203,14 @@ This sequence of operations was run: Parameter: (Pair 1 "C") This transaction was successfully applied Updated storage: - { Pair 0x01435e1f410af86271d7c8c3c98a8708157a45269200 (Pair "C" 1) ; - Pair 0x01435e1f410af86271d7c8c3c98a8708157a45269200 (Pair "B" 1) } - Storage size: 219 bytes - Paid storage size diff: 105 bytes - Consumed gas: 2434.196 + { Ticket 0x01435e1f410af86271d7c8c3c98a8708157a45269200 string "C" 1 ; + Ticket 0x01435e1f410af86271d7c8c3c98a8708157a45269200 string "B" 1 } + Storage size: 235 bytes + Paid storage size diff: 113 bytes + Consumed gas: 2434.010 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.02625 - storage fees ........................... +ꜩ0.02625 + [PUBLIC_KEY_HASH] ... -ꜩ0.02825 + storage fees ........................... +ꜩ0.02825 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Minting then sending tickets to smart-contract rollup should succeed with.out b/tezt/tests/expected/tickets.ml/Alpha- Minting then sending tickets to smart-contract rollup should succeed with.out index 0b5df1b13f4a4434ea2562d15814f5fa694dce00..30abebb16c5919aef13e451089a927d51e3cdb67 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Minting then sending tickets to smart-contract rollup should succeed with.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Minting then sending tickets to smart-contract rollup should succeed with.out @@ -1,7 +1,7 @@ ./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg '"[SMART_ROLLUP_HASH]"' Node is bootstrapped. -Estimated gas: 2784.256 units (will add 100 for safety) +Estimated gas: 2783.794 units (will add 100 for safety) Estimated storage: 132 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -14,7 +14,7 @@ This sequence of operations was run: From: [PUBLIC_KEY_HASH] Fee to the baker: ꜩ0.000584 Expected counter: 3 - Gas limit: 2885 + Gas limit: 2884 Storage limit: 152 bytes Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000584 @@ -28,7 +28,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 197 bytes Paid storage size diff: 132 bytes - Consumed gas: 2674.291 + Consumed gas: 2673.811 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.033 storage fees ........................... +ꜩ0.033 @@ -37,10 +37,10 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [SMART_ROLLUP_HASH] - Parameter: { Pair 0x01f6719dc3bd86b5c531d6551553c467a31a54717800 (Pair "Ticket2" 1) ; - Pair 0x01f6719dc3bd86b5c531d6551553c467a31a54717800 (Pair "Ticket" 1) } + Parameter: { Ticket 0x01f6719dc3bd86b5c531d6551553c467a31a54717800 string "Ticket2" 1 ; + Ticket 0x01f6719dc3bd86b5c531d6551553c467a31a54717800 string "Ticket" 1 } This transaction was successfully applied - Consumed gas: 109.932 + Consumed gas: 109.950 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Overdrafting ticket from implicit accounts must be rejected.out b/tezt/tests/expected/tickets.ml/Alpha- Overdrafting ticket from implicit accounts must be rejected.out index fbda5ce5a18b6e9e029f52dd849e19f02d2ceedf..8486ecaa12806c30877c630c51ca2c3a703fed12 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Overdrafting ticket from implicit accounts must be rejected.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Overdrafting ticket from implicit accounts must be rejected.out @@ -60,7 +60,7 @@ Contract memorized as tickets_send. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -87,7 +87,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -96,7 +96,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets between originated contracts and implicit accounts.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets between originated contracts and implicit accounts.out index 6b8e235c5ded092539f76afb3345197f3c5f1c23..c3defd8407dd94fb032b80e6da1ee1a9e979116a 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets between originated contracts and implicit accounts.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets between originated contracts and implicit accounts.out @@ -163,7 +163,7 @@ Contract memorized as tickets_blackhole. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 3' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -190,7 +190,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -199,7 +199,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 3)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 3) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: @@ -263,8 +263,8 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 1 tickets from bootstrap2 to '[CONTRACT_HASH]' with entrypoint save and contents '"Ticket"' and type string and ticketer '[CONTRACT_HASH]' --burn-cap 1 Node is bootstrapped. -Estimated gas: 3206.843 units (will add 100 for safety) -Estimated storage: 110 bytes added (will add 20 for safety) +Estimated gas: 3206.395 units (will add 100 for safety) +Estimated storage: 118 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -277,7 +277,7 @@ This sequence of operations was run: Fee to the baker: ꜩ0.00063 Expected counter: 1 Gas limit: 3307 - Storage limit: 130 bytes + Storage limit: 138 bytes Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.00063 payload fees(the block proposer) ....... +ꜩ0.00063 @@ -297,7 +297,7 @@ This sequence of operations was run: Content: "Ticket" Account updates: [PUBLIC_KEY_HASH] ... -1 - Consumed gas: 1296.552 + Consumed gas: 1296.312 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -307,16 +307,16 @@ This sequence of operations was run: From: [PUBLIC_KEY_HASH] To: [CONTRACT_HASH] Entrypoint: save - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Updated storage: - { Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1) } - Storage size: 238 bytes - Paid storage size diff: 44 bytes - Consumed gas: 1910.859 + { Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1 } + Storage size: 246 bytes + Paid storage size diff: 52 bytes + Consumed gas: 1910.651 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.011 - storage fees ........................... +ꜩ0.011 + [PUBLIC_KEY_HASH] ... -ꜩ0.013 + storage fees ........................... +ꜩ0.013 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -333,7 +333,7 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint send --arg '"[CONTRACT_HASH]"' Node is bootstrapped. -Estimated gas: 4716.890 units (will add 100 for safety) +Estimated gas: 4716.846 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -360,7 +360,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: {} Storage size: 194 bytes - Consumed gas: 2864.303 + Consumed gas: 2864.259 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -373,7 +373,7 @@ This sequence of operations was run: From: [CONTRACT_HASH] To: [CONTRACT_HASH] Entrypoint: ticket - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Updated storage: Unit Storage size: 51 bytes diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with some Tez along.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with some Tez along.out index ae7d4d6f731b952ff7454fc0ffa7f3a3b215e1ae..7cec27e2a650320f4fe85371ff0e7897e7e144dc 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with some Tez along.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with some Tez along.out @@ -61,7 +61,7 @@ Contract memorized as tickets_send_with_tez. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg '"[PUBLIC_KEY_HASH]"' Node is bootstrapped. -Estimated gas: 1857.132 units (will add 100 for safety) +Estimated gas: 1856.892 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -74,7 +74,7 @@ This sequence of operations was run: From: [PUBLIC_KEY_HASH] Fee to the baker: ꜩ0.00049 Expected counter: 2 - Gas limit: 1958 + Gas limit: 1957 Storage limit: 86 bytes Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.00049 @@ -88,7 +88,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 154 bytes Paid storage size diff: 66 bytes - Consumed gas: 1757.270 + Consumed gas: 1757.030 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -97,7 +97,7 @@ This sequence of operations was run: Amount: ꜩ0.000001 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x017c8454eff9ad796cd8baba365d2592ad1b60efb100 (Pair "Ticket" 1)) + Parameter: (Ticket 0x017c8454eff9ad796cd8baba365d2592ad1b60efb100 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Balance updates: diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with the wrong type must.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with the wrong type must.out index 5d919fc8d60f02746cab5b6cdf0e43ab9fa31fef..8bce47b091d50729215e5e2a7e1d6521d7c2a13a 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with the wrong type must.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts with the wrong type must.out @@ -109,7 +109,7 @@ Contract memorized as tickets_list_blackhole. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg '"[CONTRACT_HASH]"' Node is bootstrapped. -Estimated gas: 4063.855 units (will add 100 for safety) +Estimated gas: 4063.615 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -136,7 +136,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 145 bytes Paid storage size diff: 66 bytes - Consumed gas: 2211.251 + Consumed gas: 2211.011 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -145,7 +145,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [CONTRACT_HASH] - Parameter: { Pair 0x011213b3979289bef70dc1d1a4fb7574f306bf7f2400 (Pair "Ticket" 1) } + Parameter: { Ticket 0x011213b3979289bef70dc1d1a4fb7574f306bf7f2400 string "Ticket" 1 } This transaction was successfully applied Updated storage: Unit Storage size: 42 bytes diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts.out index 4c081c37cc6d3bb2a3ca8399830bbbc244c0a340..5813cffa968b86235c61b380cff71e659bbbb326 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from contracts to implicit accounts.out @@ -60,7 +60,7 @@ Contract memorized as tickets_send. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -87,7 +87,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -96,7 +96,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly (with complex p.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly (with complex p.out index 1a42e9eca0d4707246eabe896634fff81a5ec0ff..279124594081d57f564eb108f03eaf6069c3f1e7 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly (with complex p.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly (with complex p.out @@ -1,8 +1,8 @@ -./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint store --arg 'Pair 99 {Pair "garbage" (Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket1" 1)) ; Pair "garbage" (Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket2" 2))}' +./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint store --arg 'Pair 99 {Pair "garbage" (Ticket "[CONTRACT_HASH]" string "Ticket1" 1) ; Pair "garbage" (Ticket "[CONTRACT_HASH]" string "Ticket2" 2)}' Node is bootstrapped. -Estimated gas: 3992.854 units (will add 100 for safety) -Estimated storage: 222 bytes added (will add 20 for safety) +Estimated gas: 4001.575 units (will add 100 for safety) +Estimated storage: 238 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -12,31 +12,31 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.000798 + Fee to the baker: ꜩ0.000843 Expected counter: 4 - Gas limit: 4093 - Storage limit: 242 bytes + Gas limit: 4102 + Storage limit: 258 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000798 - payload fees(the block proposer) ....... +ꜩ0.000798 + [PUBLIC_KEY_HASH] ... -ꜩ0.000843 + payload fees(the block proposer) ....... +ꜩ0.000843 Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] To: [CONTRACT_HASH] Entrypoint: store Parameter: (Pair 99 - { Pair "garbage" (Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket1" 1)) ; - Pair "garbage" (Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket2" 2)) }) + { Pair "garbage" (Ticket "[CONTRACT_HASH]" string "Ticket1" 1) ; + Pair "garbage" (Ticket "[CONTRACT_HASH]" string "Ticket2" 2) }) This transaction was successfully applied Updated storage: - { Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket2" 2) ; - Pair 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 (Pair "Ticket1" 1) } - Storage size: 287 bytes - Paid storage size diff: 222 bytes - Consumed gas: 3992.821 + { Ticket 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 string "Ticket2" 2 ; + Ticket 0x01b9ce1609aab1100170d2ea4f94e3407244090b1000 string "Ticket1" 1 } + Storage size: 303 bytes + Paid storage size diff: 238 bytes + Consumed gas: 4001.542 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.0555 - storage fees ........................... +ꜩ0.0555 + [PUBLIC_KEY_HASH] ... -ꜩ0.0595 + storage fees ........................... +ꜩ0.0595 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly.out index 76db476257d43896f60143ef0b4e2b034fa4280f..c944db5b80bbc16541257809c298bd2a82804736 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated directly.out @@ -1,8 +1,8 @@ -./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint save --arg 'Pair 0x01fb08747351ab3652f772910c4565880d8df616f800 (Pair "Ticket" 1)' +./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint save --arg 'Ticket "[CONTRACT_HASH]" string "Ticket" 1' Node is bootstrapped. -Estimated gas: 3077.335 units (will add 100 for safety) -Estimated storage: 44 bytes added (will add 20 for safety) +Estimated gas: 3081.696 units (will add 100 for safety) +Estimated storage: 52 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -12,28 +12,28 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.00062 + Fee to the baker: ꜩ0.000643 Expected counter: 4 - Gas limit: 3178 - Storage limit: 64 bytes + Gas limit: 3182 + Storage limit: 72 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.00062 - payload fees(the block proposer) ....... +ꜩ0.00062 + [PUBLIC_KEY_HASH] ... -ꜩ0.000643 + payload fees(the block proposer) ....... +ꜩ0.000643 Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] To: [CONTRACT_HASH] Entrypoint: save - Parameter: (Pair 0x01fb08747351ab3652f772910c4565880d8df616f800 (Pair "Ticket" 1)) + Parameter: (Ticket "[CONTRACT_HASH]" string "Ticket" 1) This transaction was successfully applied Updated storage: - { Pair 0x01fb08747351ab3652f772910c4565880d8df616f800 (Pair "Ticket" 1) } - Storage size: 238 bytes - Paid storage size diff: 44 bytes - Consumed gas: 3077.269 + { Ticket 0x01fb08747351ab3652f772910c4565880d8df616f800 string "Ticket" 1 } + Storage size: 246 bytes + Paid storage size diff: 52 bytes + Consumed gas: 3081.630 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.011 - storage fees ........................... +ꜩ0.011 + [PUBLIC_KEY_HASH] ... -ꜩ0.013 + storage fees ........................... +ꜩ0.013 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using pair constructor f.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using pair constructor f.out new file mode 100644 index 0000000000000000000000000000000000000000..5e642b7ffed4214e509f95d6885df8225002c9d9 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using pair constructor f.out @@ -0,0 +1,21 @@ + +./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint save --arg 'Pair "[CONTRACT_HASH]" (Pair "Ticket" 1)' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 4 + Gas limit: 1040000 + Storage limit: 60000 bytes + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: save + Parameter: (Pair "[CONTRACT_HASH]" (Pair "Ticket" 1)) + This operation FAILED. + +At (unshown) location 0, invalid primitive Pair, only Ticket can be used here. +Fatal error: + transfer simulation failed diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using wrong ticket conte.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using wrong ticket conte.out new file mode 100644 index 0000000000000000000000000000000000000000..cb38d9ef1f51abda6ed8644ad76d2a7afb558023 --- /dev/null +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets from implicit account to originated using wrong ticket conte.out @@ -0,0 +1,22 @@ + +./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint save --arg 'Ticket "[CONTRACT_HASH]" unit "Ticket" 1' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 4 + Gas limit: 1040000 + Storage limit: 60000 bytes + Transaction: + Amount: ꜩ0 + From: [PUBLIC_KEY_HASH] + To: [CONTRACT_HASH] + Entrypoint: save + Parameter: (Ticket "[CONTRACT_HASH]" unit "Ticket" 1) + This operation FAILED. + +At (unshown) location 0, Type string is not compatible with type unit. +At (unshown) location 0, Type string is not compatible with type unit. +Fatal error: + transfer simulation failed diff --git a/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out index 99e39b4293a259015013ca548fd1a08746f1eb62..1c6d6633db15b67275d7ade7b6d887d49b409b4e 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Send tickets in bigmap.out @@ -137,8 +137,8 @@ Contract memorized as send_tickets_in_big_map. ./octez-client --mode mockup --wait none transfer 0 from bootstrap2 to '[CONTRACT_HASH]' --burn-cap 30 --storage-limit 1000000 --arg '"[CONTRACT_HASH]"' Node is bootstrapped. -Estimated gas: 98835.841 units (will add 100 for safety) -Estimated storage: 10767 bytes added (will add 20 for safety) +Estimated gas: 98977.841 units (will add 100 for safety) +Estimated storage: 11567 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -148,13 +148,13 @@ and/or an external block explorer to make sure that it has been included. This sequence of operations was run: Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.01019 + Fee to the baker: ꜩ0.010204 Expected counter: 1 - Gas limit: 98936 - Storage limit: 10787 bytes + Gas limit: 99078 + Storage limit: 11587 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.01019 - payload fees(the block proposer) ....... +ꜩ0.01019 + [PUBLIC_KEY_HASH] ... -ꜩ0.010204 + payload fees(the block proposer) ....... +ꜩ0.010204 Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] @@ -164,109 +164,109 @@ This sequence of operations was run: Updated storage: Unit Updated big_maps: New temp(1) of type (big_map int (ticket string)) - Set temp(1)[22] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[48] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[20] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[67] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[30] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[33] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[42] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[13] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[50] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[84] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[44] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[41] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[4] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[73] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[5] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[28] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[19] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[9] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[86] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[76] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[8] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[97] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[80] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[45] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[87] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[1] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[26] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[38] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[65] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[99] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[69] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[2] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[81] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[82] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[64] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[92] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[90] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[98] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[37] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[66] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[32] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[71] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[51] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[56] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[14] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[12] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[85] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[47] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[74] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[18] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[10] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[35] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[96] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[27] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[77] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[62] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[58] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[25] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[94] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[60] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[7] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[53] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[11] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[17] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[83] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[72] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[6] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[88] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[75] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[3] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[70] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[52] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[95] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[68] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[78] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[23] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[79] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[59] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[100] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[24] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[21] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[49] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[93] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[39] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[63] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[55] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[15] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[16] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[31] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[43] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[29] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[54] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[89] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[36] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[46] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[91] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[61] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[34] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[57] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) - Set temp(1)[40] to (Pair 0x010d30dc625f57274f300abc4af284934bc05fc46c00 (Pair "BLUE" 1)) + Set temp(1)[22] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[48] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[20] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[67] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[30] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[33] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[42] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[13] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[50] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[84] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[44] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[41] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[4] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[73] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[5] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[28] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[19] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[9] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[86] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[76] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[8] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[97] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[80] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[45] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[87] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[1] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[26] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[38] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[65] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[99] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[69] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[2] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[81] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[82] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[64] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[92] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[90] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[98] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[37] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[66] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[32] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[71] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[51] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[56] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[14] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[12] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[85] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[47] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[74] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[18] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[10] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[35] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[96] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[27] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[77] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[62] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[58] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[25] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[94] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[60] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[7] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[53] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[11] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[17] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[83] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[72] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[6] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[88] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[75] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[3] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[70] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[52] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[95] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[68] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[78] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[23] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[79] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[59] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[100] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[24] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[21] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[49] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[93] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[39] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[63] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[55] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[15] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[16] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[31] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[43] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[29] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[54] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[89] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[36] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[46] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[91] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[61] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[34] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[57] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) + Set temp(1)[40] to (Ticket 0x010d30dc625f57274f300abc4af284934bc05fc46c00 string "BLUE" 1) Storage size: 320 bytes Paid storage size diff: 67 bytes - Consumed gas: 49910.055 + Consumed gas: 50076.855 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.01675 storage fees ........................... +ꜩ0.01675 @@ -281,12 +281,12 @@ This sequence of operations was run: Updated big_maps: Clear map(4) Copy temp(1) to map(5) - Storage size: 10783 bytes - Paid storage size diff: 10700 bytes - Consumed gas: 48926.775 + Storage size: 11583 bytes + Paid storage size diff: 11500 bytes + Consumed gas: 48901.975 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ2.675 - storage fees ........................... +ꜩ2.675 + [PUBLIC_KEY_HASH] ... -ꜩ2.875 + storage fees ........................... +ꜩ2.875 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Sending ticket from contract storage to implicit accounts.out b/tezt/tests/expected/tickets.ml/Alpha- Sending ticket from contract storage to implicit accounts.out index aeeee4d4a8761777fbefb208b283bd98312a683c..e5dc81b4b73b0a9cef9214bbfa4de0f679783fdd 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Sending ticket from contract storage to implicit accounts.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Sending ticket from contract storage to implicit accounts.out @@ -119,7 +119,7 @@ Contract memorized as tickets_bag_implicit. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -146,7 +146,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -155,7 +155,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: @@ -171,8 +171,8 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 1 tickets from bootstrap1 to '[CONTRACT_HASH]' with entrypoint save and contents '"Ticket"' and type string and ticketer '[CONTRACT_HASH]' --burn-cap 1 Node is bootstrapped. -Estimated gas: 3176.332 units (will add 100 for safety) -Estimated storage: 44 bytes added (will add 20 for safety) +Estimated gas: 3175.884 units (will add 100 for safety) +Estimated storage: 52 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -184,8 +184,8 @@ This sequence of operations was run: From: [PUBLIC_KEY_HASH] Fee to the baker: ꜩ0.000626 Expected counter: 4 - Gas limit: 3277 - Storage limit: 64 bytes + Gas limit: 3276 + Storage limit: 72 bytes Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000626 payload fees(the block proposer) ....... +ꜩ0.000626 @@ -204,23 +204,23 @@ This sequence of operations was run: Content: "Ticket" Account updates: [PUBLIC_KEY_HASH] ... -1 - Consumed gas: 1266.515 + Consumed gas: 1266.275 Internal operations: Internal Transaction: Amount: ꜩ0 From: [PUBLIC_KEY_HASH] To: [CONTRACT_HASH] Entrypoint: save - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Updated storage: - { Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1) } - Storage size: 227 bytes - Paid storage size diff: 44 bytes - Consumed gas: 1910.352 + { Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1 } + Storage size: 235 bytes + Paid storage size diff: 52 bytes + Consumed gas: 1910.144 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.011 - storage fees ........................... +ꜩ0.011 + [PUBLIC_KEY_HASH] ... -ꜩ0.013 + storage fees ........................... +ꜩ0.013 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -237,7 +237,7 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint send --arg '"[PUBLIC_KEY_HASH]"' Node is bootstrapped. -Estimated gas: 2511.210 units (will add 100 for safety) +Estimated gas: 2511.166 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -264,7 +264,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: {} Storage size: 183 bytes - Consumed gas: 2411.347 + Consumed gas: 2411.303 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -276,7 +276,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: diff --git a/tezt/tests/expected/tickets.ml/Alpha- Sending ticket of wrong type from implicit accounts must be rejected.out b/tezt/tests/expected/tickets.ml/Alpha- Sending ticket of wrong type from implicit accounts must be rejected.out index 24c16086d26f5338a365078a2d1401ba977b1013..85786efa96d0ba35d79c4c589c9076189938d350 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Sending ticket of wrong type from implicit accounts must be rejected.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Sending ticket of wrong type from implicit accounts must be rejected.out @@ -60,7 +60,7 @@ Contract memorized as tickets_send. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -87,7 +87,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -96,7 +96,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: diff --git a/tezt/tests/expected/tickets.ml/Alpha- Sending tickets from storage to smart-contract rollup should succeed with.out b/tezt/tests/expected/tickets.ml/Alpha- Sending tickets from storage to smart-contract rollup should succeed with.out index d916565f422a604dc631a1568dcfc892b11a1996..20e981ffa479e156de1ea10f5b80425a57e1a97a 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Sending tickets from storage to smart-contract rollup should succeed with.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Sending tickets from storage to smart-contract rollup should succeed with.out @@ -1,8 +1,8 @@ ./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint mint Node is bootstrapped. -Estimated gas: 2222.033 units (will add 100 for safety) -Estimated storage: 221 bytes added (will add 20 for safety) +Estimated gas: 2221.617 units (will add 100 for safety) +Estimated storage: 237 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -14,8 +14,8 @@ This sequence of operations was run: From: [PUBLIC_KEY_HASH] Fee to the baker: ꜩ0.000494 Expected counter: 3 - Gas limit: 2323 - Storage limit: 241 bytes + Gas limit: 2322 + Storage limit: 257 bytes Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.000494 payload fees(the block proposer) ....... +ꜩ0.000494 @@ -26,14 +26,14 @@ This sequence of operations was run: Entrypoint: mint This transaction was successfully applied Updated storage: - { Pair 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 (Pair "Ticket2" 1) ; - Pair 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 (Pair "Ticket" 1) } - Storage size: 309 bytes - Paid storage size diff: 221 bytes - Consumed gas: 2222 + { Ticket 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 string "Ticket2" 1 ; + Ticket 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 string "Ticket" 1 } + Storage size: 325 bytes + Paid storage size diff: 237 bytes + Consumed gas: 2221.584 Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.05525 - storage fees ........................... +ꜩ0.05525 + [PUBLIC_KEY_HASH] ... -ꜩ0.05925 + storage fees ........................... +ꜩ0.05925 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -49,7 +49,7 @@ This sequence of operations was run: ./octez-client --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --entrypoint send --arg '"[SMART_ROLLUP_HASH]"' Node is bootstrapped. -Estimated gas: 3141.953 units (will add 100 for safety) +Estimated gas: 3141.491 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -76,7 +76,7 @@ This sequence of operations was run: This transaction was successfully applied Updated storage: {} Storage size: 220 bytes - Consumed gas: 3031.954 + Consumed gas: 3031.474 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string @@ -93,10 +93,10 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [SMART_ROLLUP_HASH] - Parameter: { Pair 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 (Pair "Ticket2" 1) ; - Pair 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 (Pair "Ticket" 1) } + Parameter: { Ticket 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 string "Ticket2" 1 ; + Ticket 0x017a22a4e42f88383dbb327d548e263b53f4f3b91100 string "Ticket" 1 } This transaction was successfully applied - Consumed gas: 109.932 + Consumed gas: 109.950 Ticket updates: Ticketer: [CONTRACT_HASH] Content type: string diff --git a/tezt/tests/expected/tickets.ml/Alpha- Sending tickets to either implicit accounts or originated contracts accep.out b/tezt/tests/expected/tickets.ml/Alpha- Sending tickets to either implicit accounts or originated contracts accep.out index 68e808e16d820e9f70b26ef3a4f2e123be3779be..7cec55ba2c79abe3b64ae415c758598606d1fd59 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Sending tickets to either implicit accounts or originated contracts accep.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Sending tickets to either implicit accounts or originated contracts accep.out @@ -104,7 +104,7 @@ Contract memorized as tickets_blackhole. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -131,7 +131,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -140,7 +140,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: @@ -153,7 +153,7 @@ This sequence of operations was run: ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[CONTRACT_HASH]" 1' Node is bootstrapped. -Estimated gas: 4063.823 units (will add 100 for safety) +Estimated gas: 4063.583 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -180,7 +180,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 2211.236 + Consumed gas: 2210.996 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -189,7 +189,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [CONTRACT_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Updated storage: Unit Storage size: 51 bytes diff --git a/tezt/tests/expected/tickets.ml/Alpha- Sending zero ticket from implicit accounts must be rejected.out b/tezt/tests/expected/tickets.ml/Alpha- Sending zero ticket from implicit accounts must be rejected.out index ca58a93b53c632eff2c213cc9e40e7e6ef7332f1..21c90e982d4445252fc0cf2ca2aa32f7d00620bb 100644 --- a/tezt/tests/expected/tickets.ml/Alpha- Sending zero ticket from implicit accounts must be rejected.out +++ b/tezt/tests/expected/tickets.ml/Alpha- Sending zero ticket from implicit accounts must be rejected.out @@ -60,7 +60,7 @@ Contract memorized as tickets_send. ./octez-client --mode mockup --wait none transfer 0 from bootstrap1 to '[CONTRACT_HASH]' --burn-cap 1 --arg 'Pair "[PUBLIC_KEY_HASH]" 1' Node is bootstrapped. -Estimated gas: 1858.650 units (will add 100 for safety) +Estimated gas: 1858.410 units (will add 100 for safety) Estimated storage: 66 bytes added (will add 20 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -87,7 +87,7 @@ This sequence of operations was run: Updated storage: Unit Storage size: 158 bytes Paid storage size diff: 66 bytes - Consumed gas: 1758.787 + Consumed gas: 1758.547 Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ0.0165 storage fees ........................... +ꜩ0.0165 @@ -96,7 +96,7 @@ This sequence of operations was run: Amount: ꜩ0 From: [CONTRACT_HASH] To: [PUBLIC_KEY_HASH] - Parameter: (Pair 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 (Pair "Ticket" 1)) + Parameter: (Ticket 0x01fca241ad513615858a813a6019c5a5b3977c27dc00 string "Ticket" 1) This transaction was successfully applied Consumed gas: 100.398 Ticket updates: diff --git a/tezt/tests/tickets.ml b/tezt/tests/tickets.ml index 2345c5b9074b668159361d24ecdb7d2eab1a0af6..989f30b5d5d56794ef961d552733469cd25c7894 100644 --- a/tezt/tests/tickets.ml +++ b/tezt/tests/tickets.ml @@ -2,7 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2020 Nomadic Labs *) -(* Copyright (c) 2022 Marigold *) +(* Copyright (c) 2022-2024 Marigold *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -31,8 +31,6 @@ Subject: Regression tests for tickets *) -open Tezos_protocol_alpha.Protocol - let hooks = Tezos_regression.hooks let setup_node protocol ~direct_ticket_spending_enable = @@ -51,17 +49,8 @@ let setup_node protocol ~direct_ticket_spending_enable = return (node, client) (* Return micheline encoding of ticket. *) -let encode_ticket ~ticketer ~content ~amount = - let ticketer_contract = - Result.get_ok (Alpha_context.Contract.of_b58check ticketer) - in - let ticketer_bytes = - Data_encoding.Binary.to_bytes_exn - Alpha_context.Contract.encoding - ticketer_contract - in - let encoded_ticketer = Hex.show (Hex.of_bytes ticketer_bytes) in - sf {|Pair 0x%s (Pair %S %d)|} encoded_ticketer content amount +let encode_string_ticket ~ticketer ~content ~amount = + sf {|Ticket %S string %S %d|} ticketer content amount let test_create_and_remove_tickets = Protocol.register_regression_test @@ -305,7 +294,7 @@ let test_direct_transfer_tickets_from_implicit_account_to_originated = ~giver:Constant.bootstrap1.alias ~receiver:bag ~entrypoint:"save" - ~arg:(encode_ticket ~ticketer ~content:"Ticket" ~amount:1) + ~arg:(encode_string_ticket ~ticketer ~content:"Ticket" ~amount:1) ~hooks client in @@ -330,6 +319,164 @@ let test_direct_transfer_tickets_from_implicit_account_to_originated = in unit +(* Test that it is impossible to transfer a Ticket if the contents_type isn't correct. *) +let test_direct_transfer_tickets_from_implicit_account_to_originated_with_invalid_contents_type_fail + = + Protocol.register_regression_test + ~__FILE__ + ~title: + "Send tickets from implicit account to originated using wrong ticket \ + contents_type fail" + ~tags:["client"; "michelson"; "implicit"; "ticket"; "originated"] + ~supports:(Protocol.From_protocol 19) + @@ fun protocol -> + let* _node, client = + setup_node protocol ~direct_ticket_spending_enable:true + in + (* Deposit tickets to the implicit account. *) + let* _alias, ticketer = + Client.originate_contract_at + ~amount:Tez.zero + ~src:Constant.bootstrap1.alias + ~init:"Unit" + ~burn_cap:Tez.one + client + ["mini_scenarios"; "tickets_send"] + protocol + in + let* () = Client.bake_for_and_wait client in + let* () = + Client.transfer + ~burn_cap:Tez.one + ~amount:Tez.zero + ~giver:Constant.bootstrap1.alias + ~receiver:ticketer + ~arg:(sf "Pair %S 1" Constant.bootstrap1.public_key_hash) + client + in + let* () = Client.bake_for_and_wait client in + (* Assert that the implicit account holds the ticket. *) + let* () = + assert_ticket_balance + ~contract:Constant.bootstrap1.alias + ~ticketer + ~ty:"string" + ~contents:"\"Ticket\"" + ~expected:1 + client + in + (* Originate contract that stores tickets sent to it's "save" entrypoint. *) + let* _alias, bag = + Client.originate_contract_at + ~amount:Tez.zero + ~src:Constant.bootstrap1.alias + ~init:"{}" + ~burn_cap:Tez.one + client + ["mini_scenarios"; "tickets_bag"] + protocol + in + let* () = Client.bake_for_and_wait client in + (* Check that transferring a ticket from implicit to originated using + a ticket constructor that specifies a wrong contents type fails. *) + let encode_wrong_ticket ~ticketer ~content ~amount = + (* Pass [unit] as contents type when the actual contents is string. *) + sf {|Ticket %S unit %S %d|} ticketer content amount + in + let* () = + Process.check_error + ~msg:(rex "Type string is not compatible with type unit") + (Client.spawn_transfer + ~burn_cap:Tez.one + ~amount:Tez.zero + ~giver:Constant.bootstrap1.alias + ~receiver:bag + ~entrypoint:"save" + ~arg:(encode_wrong_ticket ~ticketer ~content:"Ticket" ~amount:1) + ~hooks + client) + in + unit + +(* Test that it is impossible to transfer a Ticket using the legacy Pair representation. *) +let test_direct_transfer_tickets_from_implicit_account_to_originated_using_pair_fail + = + Protocol.register_regression_test + ~__FILE__ + ~title: + "Send tickets from implicit account to originated using pair constructor \ + fail" + ~tags:["client"; "michelson"; "implicit"; "ticket"; "originated"] + ~supports:(Protocol.From_protocol 19) + @@ fun protocol -> + (* Return micheline encoding of ticket using legacy Pair constructor. *) + let encode_pair_ticket ~ticketer ~content ~amount = + sf {|Pair %S (Pair %S %d)|} ticketer content amount + in + let* _node, client = + setup_node protocol ~direct_ticket_spending_enable:true + in + (* Deposit tickets to the implicit account. *) + let* _alias, ticketer = + Client.originate_contract_at + ~amount:Tez.zero + ~src:Constant.bootstrap1.alias + ~init:"Unit" + ~burn_cap:Tez.one + client + ["mini_scenarios"; "tickets_send"] + protocol + in + let* () = Client.bake_for_and_wait client in + let* () = + Client.transfer + ~burn_cap:Tez.one + ~amount:Tez.zero + ~giver:Constant.bootstrap1.alias + ~receiver:ticketer + ~arg:(sf "Pair %S 1" Constant.bootstrap1.public_key_hash) + client + in + let* () = Client.bake_for_and_wait client in + (* Assert that the implicit account holds the ticket. *) + let* () = + assert_ticket_balance + ~contract:Constant.bootstrap1.alias + ~ticketer + ~ty:"string" + ~contents:"\"Ticket\"" + ~expected:1 + client + in + (* Originate contract that stores tickets sent to its "save" entrypoint. *) + let* _alias, bag = + Client.originate_contract_at + ~amount:Tez.zero + ~src:Constant.bootstrap1.alias + ~init:"{}" + ~burn_cap:Tez.one + client + ["mini_scenarios"; "tickets_bag"] + protocol + in + let* () = Client.bake_for_and_wait client in + (* Check that transferring ticket from implicit to originated using the + [Transaction] manager operation with legacy Pair representation fails. *) + let* () = + Process.check_error + ~msg:(rex "invalid primitive Pair, only Ticket can be used here") + (Client.spawn_transfer + ~burn_cap:Tez.one + ~amount:Tez.zero + ~giver:Constant.bootstrap1.alias + ~receiver:bag + ~entrypoint:"save" + ~arg:(encode_pair_ticket ~ticketer ~content:"Ticket" ~amount:1) + ~hooks + client) + in + unit + (* Tests that an implicit account can send a tickets to originated using the [Transfer] manager operation. The parameter of the transfer is made complex to check that the [Transfer] properly @@ -419,11 +566,11 @@ let test_direct_transfer_tickets_from_implicit_account_to_originated_complex = let complex_arg_with_tickets = sf {|Pair 99 {Pair "garbage" (%s) ; Pair "garbage" (%s)}|} - (encode_ticket + (encode_string_ticket ~ticketer ~content:first_ticket_content ~amount:first_ticket_sent) - (encode_ticket + (encode_string_ticket ~ticketer ~content:second_ticket_content ~amount:second_ticket_sent) @@ -1328,5 +1475,9 @@ let register ~protocols = test_send_tickets_to_sc_rollup protocols ; test_send_tickets_from_storage_to_sc_rollup protocols ; test_direct_transfer_tickets_from_implicit_account_to_originated protocols ; + test_direct_transfer_tickets_from_implicit_account_to_originated_using_pair_fail + protocols ; + test_direct_transfer_tickets_from_implicit_account_to_originated_with_invalid_contents_type_fail + protocols ; test_direct_transfer_tickets_from_implicit_account_to_originated_complex protocols