package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Types representing results of applying an operation.

These are used internally by Apply, and can be used for experimenting with protocol updates, by clients to print out a summary of the operation at pre-injection simulation and at confirmation time, and by block explorers.

type 'kind operation_metadata = {
  1. contents : 'kind contents_result_list;
}

Result of applying a Operation.t. Follows the same structure.

and packed_operation_metadata =
  1. | Operation_metadata : 'kind operation_metadata -> packed_operation_metadata
  2. | No_operation_metadata : packed_operation_metadata
and 'kind contents_result_list =
  1. | Single_result : 'kind contents_result -> 'kind contents_result_list
  2. | Cons_result : 'kind Alpha_context.Kind.manager contents_result * 'rest Alpha_context.Kind.manager contents_result_list -> ('kind * 'rest) Alpha_context.Kind.manager contents_result_list

Result of applying a Operation.contents_list. Follows the same structure.

and packed_contents_result_list =
  1. | Contents_result_list : 'kind contents_result_list -> packed_contents_result_list
and 'kind contents_result =
  1. | Preattestation_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. delegate : Tezos_protocol_environment_alpha.Signature.public_key_hash;
    3. consensus_key : Tezos_protocol_environment_alpha.Signature.public_key_hash;
    4. consensus_power : int;
    } -> Alpha_context.Kind.preattestation contents_result
  2. | Attestation_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. delegate : Tezos_protocol_environment_alpha.Signature.public_key_hash;
    3. consensus_key : Tezos_protocol_environment_alpha.Signature.public_key_hash;
    4. consensus_power : int;
    } -> Alpha_context.Kind.attestation contents_result
  3. | Seed_nonce_revelation_result : Alpha_context.Receipt.balance_updates -> Alpha_context.Kind.seed_nonce_revelation contents_result
  4. | Vdf_revelation_result : Alpha_context.Receipt.balance_updates -> Alpha_context.Kind.vdf_revelation contents_result
  5. | Double_attestation_evidence_result : {
    1. forbidden_delegate : Tezos_protocol_environment_alpha.Signature.public_key_hash option;
    2. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.double_attestation_evidence contents_result
  6. | Double_preattestation_evidence_result : {
    1. forbidden_delegate : Tezos_protocol_environment_alpha.Signature.public_key_hash option;
    2. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.double_preattestation_evidence contents_result
  7. | Double_baking_evidence_result : {
    1. forbidden_delegate : Tezos_protocol_environment_alpha.Signature.public_key_hash option;
    2. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.double_baking_evidence contents_result
  8. | Activate_account_result : Alpha_context.Receipt.balance_updates -> Alpha_context.Kind.activate_account contents_result
  9. | Proposals_result : Alpha_context.Kind.proposals contents_result
  10. | Ballot_result : Alpha_context.Kind.ballot contents_result
  11. | Drain_delegate_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. allocated_destination_contract : bool;
    } -> Alpha_context.Kind.drain_delegate contents_result
  12. | Manager_operation_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. operation_result : 'kind manager_operation_result;
    3. internal_operation_results : Apply_internal_results.packed_internal_operation_result list;
    } -> 'kind Alpha_context.Kind.manager contents_result

Result of applying an Operation.contents. Follows the same structure.

and packed_contents_result =
  1. | Contents_result : 'kind contents_result -> packed_contents_result
and successful_transaction_result = Apply_internal_results.successful_transaction_result

Result of applying a transaction.

and successful_origination_result = Apply_internal_results.successful_origination_result

Result of applying an origination.

and _ successful_manager_operation_result =
  1. | Reveal_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.reveal successful_manager_operation_result
  2. | Transaction_result : successful_transaction_result -> Alpha_context.Kind.transaction successful_manager_operation_result
  3. | Origination_result : successful_origination_result -> Alpha_context.Kind.origination successful_manager_operation_result
  4. | Delegation_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    2. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.delegation successful_manager_operation_result
  5. | Register_global_constant_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    3. size_of_constant : Tezos_protocol_environment_alpha.Z.t;
    4. global_address : Script_expr_hash.t;
    } -> Alpha_context.Kind.register_global_constant successful_manager_operation_result
  6. | Set_deposits_limit_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.set_deposits_limit successful_manager_operation_result
  7. | Increase_paid_storage_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.increase_paid_storage successful_manager_operation_result
  8. | Update_consensus_key_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.update_consensus_key successful_manager_operation_result
  9. | Transfer_ticket_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. ticket_receipt : Ticket_receipt.t;
    3. consumed_gas : Alpha_context.Gas.Arith.fp;
    4. paid_storage_size_diff : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.transfer_ticket successful_manager_operation_result
  10. | Dal_publish_commitment_result : {
    1. slot_header : Alpha_context.Dal.Slot.Header.t;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.dal_publish_commitment successful_manager_operation_result
  11. | Sc_rollup_originate_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. address : Alpha_context.Sc_rollup.Address.t;
    3. genesis_commitment_hash : Alpha_context.Sc_rollup.Commitment.Hash.t;
    4. consumed_gas : Alpha_context.Gas.Arith.fp;
    5. size : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.sc_rollup_originate successful_manager_operation_result
  12. | Sc_rollup_add_messages_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.sc_rollup_add_messages successful_manager_operation_result
  13. | Sc_rollup_cement_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    2. inbox_level : Alpha_context.Raw_level.t;
    3. commitment_hash : Alpha_context.Sc_rollup.Commitment.Hash.t;
    } -> Alpha_context.Kind.sc_rollup_cement successful_manager_operation_result
  14. | Sc_rollup_publish_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    2. staked_hash : Alpha_context.Sc_rollup.Commitment.Hash.t;
    3. published_at_level : Alpha_context.Raw_level.t;
    4. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.sc_rollup_publish successful_manager_operation_result
  15. | Sc_rollup_refute_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    2. game_status : Alpha_context.Sc_rollup.Game.status;
    3. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.sc_rollup_refute successful_manager_operation_result
  16. | Sc_rollup_timeout_result : {
    1. consumed_gas : Alpha_context.Gas.Arith.fp;
    2. game_status : Alpha_context.Sc_rollup.Game.status;
    3. balance_updates : Alpha_context.Receipt.balance_updates;
    } -> Alpha_context.Kind.sc_rollup_timeout successful_manager_operation_result
  17. | Sc_rollup_execute_outbox_message_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. ticket_receipt : Ticket_receipt.t;
    3. whitelist_update : Alpha_context.Sc_rollup.Whitelist.update option;
    4. consumed_gas : Alpha_context.Gas.Arith.fp;
    5. paid_storage_size_diff : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.sc_rollup_execute_outbox_message successful_manager_operation_result
  18. | Sc_rollup_recover_bond_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    } -> Alpha_context.Kind.sc_rollup_recover_bond successful_manager_operation_result
  19. | Zk_rollup_origination_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. originated_zk_rollup : Alpha_context.Zk_rollup.t;
    3. consumed_gas : Alpha_context.Gas.Arith.fp;
    4. storage_size : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.zk_rollup_origination successful_manager_operation_result
  20. | Zk_rollup_publish_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    3. paid_storage_size_diff : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.zk_rollup_publish successful_manager_operation_result
  21. | Zk_rollup_update_result : {
    1. balance_updates : Alpha_context.Receipt.balance_updates;
    2. consumed_gas : Alpha_context.Gas.Arith.fp;
    3. paid_storage_size_diff : Tezos_protocol_environment_alpha.Z.t;
    } -> Alpha_context.Kind.zk_rollup_update successful_manager_operation_result

Result of applying an external manager_operation_content.

and packed_successful_manager_operation_result =
  1. | Successful_manager_result : 'kind successful_manager_operation_result -> packed_successful_manager_operation_result

Serializer for packed_operation_result.

val operation_metadata_encoding_with_legacy_attestation_name : packed_operation_metadata Tezos_protocol_environment_alpha.Data_encoding.t

Operation metadata encoding that accepts legacy attestation name : `endorsement` (and preendorsement, double_<op>_evidence) in JSON

https://gitlab.com/tezos/tezos/-/issues/5531

This encoding is temporary and should be removed when the protocol no longer accepts JSON endorsements kinds

val operation_data_and_metadata_encoding_with_legacy_attestation_name : (Alpha_context.Operation.packed_protocol_data * packed_operation_metadata) Tezos_protocol_environment_alpha.Data_encoding.t

Operation data and metadata encoding that accepts legacy attestation name : `endorsement` (and preendorsement, double_<op>_evidence) in JSON

https://gitlab.com/tezos/tezos/-/issues/5531

This encoding is temporary and should be removed when the protocol no longer accepts JSON endorsements kinds

type packed_contents_and_result_list =
  1. | Contents_and_result_list : 'kind contents_and_result_list -> packed_contents_and_result_list
val contents_and_result_list_encoding_with_legacy_attestation_name : packed_contents_and_result_list Tezos_protocol_environment_alpha.Data_encoding.t
val pack_contents_list : 'kind Alpha_context.contents_list -> 'kind contents_result_list -> 'kind contents_and_result_list
val unpack_contents_list : 'kind contents_and_result_list -> 'kind Alpha_context.contents_list * 'kind contents_result_list
type ('a, 'b) eq =
  1. | Eq : ('a, 'a) eq
val kind_equal_list : 'kind Alpha_context.contents_list -> 'kind2 contents_result_list -> ('kind, 'kind2) eq option
type block_metadata = {
  1. proposer : Alpha_context.Consensus_key.t;
  2. baker : Alpha_context.Consensus_key.t;
  3. level_info : Alpha_context.Level.t;
  4. voting_period_info : Alpha_context.Voting_period.info;
  5. nonce_hash : Nonce_hash.t option;
  6. consumed_gas : Alpha_context.Gas.Arith.fp;
  7. deactivated : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t list;
  8. balance_updates : Alpha_context.Receipt.balance_updates;
  9. liquidity_baking_toggle_ema : Alpha_context.Per_block_votes.Liquidity_baking_toggle_EMA.t;
  10. adaptive_issuance_vote_ema : Alpha_context.Per_block_votes.Adaptive_issuance_launch_EMA.t;
  11. adaptive_issuance_launch_cycle : Alpha_context.Cycle.t option;
  12. implicit_operations_results : packed_successful_manager_operation_result list;
  13. dal_attestation : Alpha_context.Dal.Attestation.t;
}
val block_metadata_encoding_with_legacy_attestation_name : block_metadata Tezos_protocol_environment_alpha.Data_encoding.encoding
OCaml

Innovation. Community. Security.