package tezos-protocol-013-PtJakart
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Operation_repr/index.html
Module Tezos_raw_protocol_013_PtJakart.Operation_reprSource
Tezos Protocol Implementation - Low level Repr. of Operations
Defines kinds of operations that can be performed on chain:
- preendorsement
- endorsement
- double baking evidence
- double preendorsing evidence
- double endorsing evidence
- seed nonce revelation
- account activation
- proposal (see:
Voting_repr) - ballot (see:
Voting_repr) - failing noop
- manager operation (which in turn has several types):
- revelation
- transaction
- origination
- delegation
- set deposits limitation
- tx rollup origination
- tx rollup batch submission
- tx rollup commit
- tx rollup withdraw
- tx rollup reveal withdrawals
- smart contract rollup origination
Each of them can be encoded as raw bytes. Operations are distinguished at type level using phantom type parameters. packed_operation type allows for unifying them when required, for instance to put them on a single list.
type 'a consensus_operation_type = | Endorsement : Kind.endorsement consensus_operation_type| Preendorsement : Kind.preendorsement consensus_operation_type
val pp_operation_kind :
Tezos_protocol_environment_013_PtJakart.Format.formatter ->
'kind consensus_operation_type ->
unittype consensus_content = {slot : Slot_repr.t;level : Raw_level_repr.t;round : Round_repr.t;block_payload_hash : Block_payload_hash.t;
}val consensus_content_encoding :
consensus_content Tezos_protocol_environment_013_PtJakart.Data_encoding.tval pp_consensus_content :
Tezos_protocol_environment_013_PtJakart.Format.formatter ->
consensus_content ->
unittype consensus_watermark = | Endorsement of Tezos_protocol_environment_013_PtJakart.Chain_id.t| Preendorsement of Tezos_protocol_environment_013_PtJakart.Chain_id.t
val to_watermark :
consensus_watermark ->
Tezos_protocol_environment_013_PtJakart.Signature.watermarkval of_watermark :
Tezos_protocol_environment_013_PtJakart.Signature.watermark ->
consensus_watermark optiontype raw = Tezos_protocol_environment_013_PtJakart.Operation.t = {shell : Tezos_protocol_environment_013_PtJakart.Operation.shell_header;proto : bytes;
}type transaction = {amount : Tez_repr.tez;parameters : Script_repr.lazy_expr;entrypoint : Entrypoint_repr.t;destination : Destination_repr.t;
}type origination = {delegate : Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t option;script : Script_repr.t;credit : Tez_repr.tez;
}type 'kind operation = {shell : Tezos_protocol_environment_013_PtJakart.Operation.shell_header;protocol_data : 'kind protocol_data;
}An operation contains the operation header information in shell and all data related to the operation itself in protocol_data.
and 'kind protocol_data = {contents : 'kind contents_list;signature : Tezos_protocol_environment_013_PtJakart.Signature.t option;
}A protocol_data wraps together a signature for the operation and the contents of the operation itself.
and _ contents_list = | Single : 'kind contents -> 'kind contents_list| Cons : 'kind Kind.manager contents * 'rest Kind.manager contents_list -> ('kind * 'rest) Kind.manager contents_list
A contents_list is a list of contents, the GADT guarantees two invariants:
- the list is not empty, and
- if the list has several elements then it only contains manager operations.
and _ contents = | Preendorsement : consensus_content -> Kind.preendorsement contents| Endorsement : consensus_content -> Kind.endorsement contents| Seed_nonce_revelation : {level : Raw_level_repr.t;nonce : Seed_repr.nonce;
} -> Kind.seed_nonce_revelation contents| Double_preendorsement_evidence : {op1 : Kind.preendorsement operation;op2 : Kind.preendorsement operation;
} -> Kind.double_preendorsement_evidence contents| Double_endorsement_evidence : {op1 : Kind.endorsement operation;op2 : Kind.endorsement operation;
} -> Kind.double_endorsement_evidence contents| Double_baking_evidence : {bh1 : Block_header_repr.t;bh2 : Block_header_repr.t;
} -> Kind.double_baking_evidence contents| Activate_account : {id : Tezos_protocol_environment_013_PtJakart.Ed25519.Public_key_hash.t;activation_code : Blinded_public_key_hash.activation_code;
} -> Kind.activate_account contents| Proposals : {source : Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t;period : int32;proposals : Tezos_protocol_environment_013_PtJakart.Protocol_hash.t list;
} -> Kind.proposals contents| Ballot : {source : Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t;period : int32;proposal : Tezos_protocol_environment_013_PtJakart.Protocol_hash.t;ballot : Vote_repr.ballot;
} -> Kind.ballot contents| Failing_noop : string -> Kind.failing_noop contents| Manager_operation : {source : Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t;fee : Tez_repr.tez;counter : counter;operation : 'kind manager_operation;gas_limit : Gas_limit_repr.Arith.integral;storage_limit : Tezos_protocol_environment_013_PtJakart.Z.t;
} -> 'kind Kind.manager contents
A value of type contents an operation related to whether consensus, governance or contract management.
and _ manager_operation = | Reveal : Tezos_protocol_environment_013_PtJakart.Signature.Public_key.t -> Kind.reveal manager_operation| Transaction : transaction -> Kind.transaction manager_operation| Origination : origination -> Kind.origination manager_operation| Delegation : Tezos_protocol_environment_013_PtJakart.Signature.Public_key_hash.t option -> Kind.delegation manager_operation| Register_global_constant : {value : Script_repr.lazy_expr;
} -> Kind.register_global_constant manager_operation| Set_deposits_limit : Tez_repr.t option -> Kind.set_deposits_limit manager_operation| Tx_rollup_origination : Kind.tx_rollup_origination manager_operation| Tx_rollup_submit_batch : {tx_rollup : Tx_rollup_repr.t;content : string;burn_limit : Tez_repr.t option;
} -> Kind.tx_rollup_submit_batch manager_operation| Tx_rollup_commit : {tx_rollup : Tx_rollup_repr.t;commitment : Tx_rollup_commitment_repr.Full.t;
} -> Kind.tx_rollup_commit manager_operation| Tx_rollup_return_bond : {tx_rollup : Tx_rollup_repr.t;
} -> Kind.tx_rollup_return_bond manager_operation| Tx_rollup_finalize_commitment : {tx_rollup : Tx_rollup_repr.t;
} -> Kind.tx_rollup_finalize_commitment manager_operation| Tx_rollup_remove_commitment : {tx_rollup : Tx_rollup_repr.t;
} -> Kind.tx_rollup_remove_commitment manager_operation| Tx_rollup_rejection : {tx_rollup : Tx_rollup_repr.t;level : Tx_rollup_level_repr.t;message : Tx_rollup_message_repr.t;message_position : int;message_path : Tx_rollup_inbox_repr.Merkle.path;message_result_hash : Tx_rollup_message_result_hash_repr.t;message_result_path : Tx_rollup_commitment_repr.Merkle.path;previous_message_result : Tx_rollup_message_result_repr.t;previous_message_result_path : Tx_rollup_commitment_repr.Merkle.path;proof : Tx_rollup_l2_proof.t;
} -> Kind.tx_rollup_rejection manager_operation| Tx_rollup_dispatch_tickets : {tx_rollup : Tx_rollup_repr.t;(*The rollup from where the tickets are retrieved
*)level : Tx_rollup_level_repr.t;(*The level at which the withdrawal was enabled
*)context_hash : Tezos_protocol_environment_013_PtJakart.Context_hash.t;(*The hash of the l2 context resulting from the execution of the inbox from where this withdrawal was enabled.
*)message_index : int;(*Index of the message in the inbox at
*)levelwhere this withdrawal was enabled.message_result_path : Tx_rollup_commitment_repr.Merkle.path;tickets_info : Tx_rollup_reveal_repr.t list;
} -> Kind.tx_rollup_dispatch_tickets manager_operation(*Transfer_ticketallows an implicit account (the "claimer") to receiveamounttickets, pulled out oftx_rollup, to theentrypointof the smart contractdestination.The ticket must have been addressed to the claimer, who must be the source of this operation. It must have been pulled out at
*)leveland from the message atmessage_index. The ticket is composed ofticketer; ty; contents.| Transfer_ticket : {contents : Script_repr.lazy_expr;(*Contents of the withdrawn ticket
*)ty : Script_repr.lazy_expr;(*Type of the withdrawn ticket's contents
*)ticketer : Contract_repr.t;(*Ticketer of the withdrawn ticket
*)amount : Tezos_protocol_environment_013_PtJakart.Z.t;(*Quantity of the withdrawn ticket. Must match the amount that was enabled.
*)destination : Contract_repr.t;(*The smart contract address that should receive the tickets.
*)entrypoint : Entrypoint_repr.t;(*The entrypoint of the smart contract address that should receive the tickets.
*)
} -> Kind.transfer_ticket manager_operation| Sc_rollup_originate : {kind : Sc_rollup_repr.Kind.t;boot_sector : string;
} -> Kind.sc_rollup_originate manager_operation| Sc_rollup_add_messages : {rollup : Sc_rollup_repr.t;messages : string list;
} -> Kind.sc_rollup_add_messages manager_operation| Sc_rollup_cement : {rollup : Sc_rollup_repr.t;commitment : Sc_rollup_repr.Commitment_hash.t;
} -> Kind.sc_rollup_cement manager_operation| Sc_rollup_publish : {rollup : Sc_rollup_repr.t;commitment : Sc_rollup_repr.Commitment.t;
} -> Kind.sc_rollup_publish manager_operation
A manager_operation describes management and interactions between contracts (whether implicit or smart).
Counters are used as anti-replay protection mechanism in manager operations: each manager account stores a counter and each manager operation declares a value for the counter. When a manager operation is applied, the value of the counter of its manager is checked and incremented.
type packed_manager_operation = | Manager : 'kind manager_operation -> packed_manager_operation
type packed_operation = {shell : Tezos_protocol_environment_013_PtJakart.Operation.shell_header;protocol_data : packed_protocol_data;
}val contents_encoding :
packed_contents Tezos_protocol_environment_013_PtJakart.Data_encoding.tval contents_list_encoding :
packed_contents_list Tezos_protocol_environment_013_PtJakart.Data_encoding.tval protocol_data_encoding :
packed_protocol_data Tezos_protocol_environment_013_PtJakart.Data_encoding.tval unsigned_operation_encoding :
(Tezos_protocol_environment_013_PtJakart.Operation.shell_header
* packed_contents_list)
Tezos_protocol_environment_013_PtJakart.Data_encoding.tval hash_packed :
packed_operation ->
Tezos_protocol_environment_013_PtJakart.Operation_hash.t