package tezos-protocol-012-Psithaca

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

An Alpha_context.t is an immutable snapshot of the ledger state at some block height, preserving type-safety and invariants of the ledger state.

Implementation

Alpha_context.t is a wrapper over Raw_context.t, which in turn is a wrapper around Context.t from the Protocol Environment.

Lifetime of an Alpha_context

  • Creation, using prepare or prepare_first_block
  • Modification, using the operations defined in this signature
  • Finalization, using finalize
module type BASIC_DATA = sig ... end
type t
type context = t
module Slot : sig ... end
module Tez : sig ... end
module Period : sig ... end
module Timestamp : sig ... end
module Raw_level : sig ... end
module Cycle : sig ... end
module Round : sig ... end
module Gas : sig ... end

This module implements the gas subsystem of the context.

module Script_string : module type of Script_string_repr

Strings of printable characters

module Script_int : module type of Script_int_repr
module Script_timestamp : sig ... end
module Script : sig ... end
module Constants : sig ... end
module Global_constants_storage : sig ... end
module Cache : sig ... end
module Level : sig ... end
module Fitness : sig ... end
module Nonce : sig ... end
module Seed : sig ... end
module Big_map : sig ... end
module Sapling : sig ... end
module Lazy_storage : sig ... end
module Contract : sig ... end
module Receipt : sig ... end
module Delegate : sig ... end
module Voting_period : sig ... end
module Vote : sig ... end
module Block_payload : sig ... end
module Block_header : sig ... end
module Kind : sig ... end
type 'a consensus_operation_type =
  1. | Endorsement : Kind.endorsement consensus_operation_type
  2. | Preendorsement : Kind.preendorsement consensus_operation_type
type consensus_content = {
  1. slot : Slot.t;
  2. level : Raw_level.t;
  3. round : Round.t;
  4. block_payload_hash : Block_payload_hash.t;
}
type 'kind operation = {
  1. shell : Tezos_protocol_environment_012_Psithaca.Operation.shell_header;
  2. protocol_data : 'kind protocol_data;
}
and 'kind protocol_data = {
  1. contents : 'kind contents_list;
  2. signature : Tezos_protocol_environment_012_Psithaca.Signature.t option;
}
and _ contents_list =
  1. | Single : 'kind contents -> 'kind contents_list
  2. | Cons : 'kind Kind.manager contents * 'rest Kind.manager contents_list -> ('kind * 'rest) Kind.manager contents_list
and _ contents =
  1. | Preendorsement : consensus_content -> Kind.preendorsement contents
  2. | Endorsement : consensus_content -> Kind.endorsement contents
  3. | Seed_nonce_revelation : {
    1. level : Raw_level.t;
    2. nonce : Nonce.t;
    } -> Kind.seed_nonce_revelation contents
  4. | Double_preendorsement_evidence : {
    1. op1 : Kind.preendorsement operation;
    2. op2 : Kind.preendorsement operation;
    } -> Kind.double_preendorsement_evidence contents
  5. | Double_endorsement_evidence : {
    1. op1 : Kind.endorsement operation;
    2. op2 : Kind.endorsement operation;
    } -> Kind.double_endorsement_evidence contents
  6. | Double_baking_evidence : {
    1. bh1 : Block_header.t;
    2. bh2 : Block_header.t;
    } -> Kind.double_baking_evidence contents
  7. | Activate_account : {
    1. id : Tezos_protocol_environment_012_Psithaca.Ed25519.Public_key_hash.t;
    2. activation_code : Blinded_public_key_hash.activation_code;
    } -> Kind.activate_account contents
  8. | Proposals : {
    1. source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
    2. period : int32;
    3. proposals : Tezos_protocol_environment_012_Psithaca.Protocol_hash.t list;
    } -> Kind.proposals contents
  9. | Ballot : {
    1. source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
    2. period : int32;
    3. proposal : Tezos_protocol_environment_012_Psithaca.Protocol_hash.t;
    4. ballot : Vote.ballot;
    } -> Kind.ballot contents
  10. | Failing_noop : string -> Kind.failing_noop contents
  11. | Manager_operation : {
    1. source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
    2. fee : Tez.tez;
    3. counter : counter;
    4. operation : 'kind manager_operation;
    5. gas_limit : Gas.Arith.integral;
    6. storage_limit : Tezos_protocol_environment_012_Psithaca.Z.t;
    } -> 'kind Kind.manager contents
type 'kind internal_operation = {
  1. source : Contract.contract;
  2. operation : 'kind manager_operation;
  3. nonce : int;
}
type packed_manager_operation =
  1. | Manager : 'kind manager_operation -> packed_manager_operation
type packed_contents =
  1. | Contents : 'kind contents -> packed_contents
type packed_contents_list =
  1. | Contents_list : 'kind contents_list -> packed_contents_list
type packed_protocol_data =
  1. | Operation_data : 'kind protocol_data -> packed_protocol_data
type packed_internal_operation =
  1. | Internal_operation : 'kind internal_operation -> packed_internal_operation
val manager_kind : 'kind manager_operation -> 'kind Kind.manager
module Operation : sig ... end
module Stake_distribution : sig ... end
module Commitment : sig ... end
module Bootstrap : sig ... end
module Migration : sig ... end
val reset_internal_nonce : context -> context
val record_internal_nonce : context -> int -> context
val internal_nonce_already_recorded : context -> int -> bool
val description : context Storage_description.t

Finalize an Alpha_context.t, producing a validation_result.

Should only be used by Main.current_context to return a context usable for RPCs

val record_non_consensus_operation_hash : context -> Tezos_protocol_environment_012_Psithaca.Operation_hash.t -> context
module Parameters : sig ... end
module Liquidity_baking : sig ... end
module Ticket_balance : sig ... end

This module re-exports functions from Ticket_storage. See documentation of the functions there.

module First_level_of_tenderbake : sig ... end
module Consensus : sig ... end
module Token : sig ... end

See 'token.mli' for more explanation.

module Fees : sig ... end