package tezos-protocol-012-Psithaca
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
orprepare_first_block
- Modification, using the operations defined in this signature
- Finalization, using
finalize
module type BASIC_DATA = sig ... end
type context = t
type public_key =
Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t
type public_key_hash =
Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t
type signature = Tezos_protocol_environment_012_Psithaca.Signature.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 =
| Endorsement : Kind.endorsement consensus_operation_type
| Preendorsement : Kind.preendorsement consensus_operation_type
val pp_operation_kind :
Tezos_protocol_environment_012_Psithaca.Format.formatter ->
'kind consensus_operation_type ->
unit
type consensus_content = {
slot : Slot.t;
level : Raw_level.t;
round : Round.t;
block_payload_hash : Block_payload_hash.t;
}
val consensus_content_encoding :
consensus_content Tezos_protocol_environment_012_Psithaca.Data_encoding.t
val pp_consensus_content :
Tezos_protocol_environment_012_Psithaca.Format.formatter ->
consensus_content ->
unit
type 'kind operation = {
shell : Tezos_protocol_environment_012_Psithaca.Operation.shell_header;
protocol_data : 'kind protocol_data;
}
and 'kind protocol_data = {
contents : 'kind contents_list;
signature : Tezos_protocol_environment_012_Psithaca.Signature.t option;
}
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
and _ contents =
| Preendorsement : consensus_content -> Kind.preendorsement contents
| Endorsement : consensus_content -> Kind.endorsement contents
| Seed_nonce_revelation : {
level : Raw_level.t;
nonce : Nonce.t;
} -> 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.t;
bh2 : Block_header.t;
} -> Kind.double_baking_evidence contents
| Activate_account : {
id : Tezos_protocol_environment_012_Psithaca.Ed25519.Public_key_hash.t;
activation_code : Blinded_public_key_hash.activation_code;
} -> Kind.activate_account contents
| Proposals : {
source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
period : int32;
proposals : Tezos_protocol_environment_012_Psithaca.Protocol_hash.t list;
} -> Kind.proposals contents
| Ballot : {
source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
period : int32;
proposal : Tezos_protocol_environment_012_Psithaca.Protocol_hash.t;
ballot : Vote.ballot;
} -> Kind.ballot contents
| Failing_noop : string -> Kind.failing_noop contents
| Manager_operation : {
source : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t;
fee : Tez.tez;
counter : counter;
operation : 'kind manager_operation;
gas_limit : Gas.Arith.integral;
storage_limit : Tezos_protocol_environment_012_Psithaca.Z.t;
} -> 'kind Kind.manager contents
and _ manager_operation =
| Reveal : Tezos_protocol_environment_012_Psithaca.Signature.Public_key.t -> Kind.reveal manager_operation
| Transaction : {
amount : Tez.tez;
parameters : Script.lazy_expr;
entrypoint : string;
destination : Contract.contract;
} -> Kind.transaction manager_operation
| Origination : {
delegate : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t option;
script : Script.t;
credit : Tez.tez;
preorigination : Contract.t option;
} -> Kind.origination manager_operation
| Delegation : Tezos_protocol_environment_012_Psithaca.Signature.Public_key_hash.t option -> Kind.delegation manager_operation
| Register_global_constant : {
value : Script.lazy_expr;
} -> Kind.register_global_constant manager_operation
| Set_deposits_limit : Tez.t option -> Kind.set_deposits_limit manager_operation
and counter = Tezos_protocol_environment_012_Psithaca.Z.t
type 'kind internal_operation = {
source : Contract.contract;
operation : 'kind manager_operation;
nonce : int;
}
type packed_operation = {
shell : Tezos_protocol_environment_012_Psithaca.Operation.shell_header;
protocol_data : packed_protocol_data;
}
type packed_internal_operation =
| 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 prepare_first_block :
Tezos_protocol_environment_012_Psithaca.Context.t ->
typecheck:
(context ->
Script.t ->
((Script.t * Lazy_storage.diffs option) * context)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t) ->
level:Tezos_protocol_environment_012_Psithaca.Int32.t ->
timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
context Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t
Create an Alpha_context.t
from an untyped context (first block in the chain only).
val prepare :
Tezos_protocol_environment_012_Psithaca.Context.t ->
level:Tezos_protocol_environment_012_Psithaca.Int32.t ->
predecessor_timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
timestamp:Tezos_protocol_environment_012_Psithaca.Time.t ->
(context * Receipt.balance_updates * Migration.origination_result list)
Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
Tezos_protocol_environment_012_Psithaca.Lwt.t
Create an Alpha_context.t
from an untyped context.
val fresh_internal_nonce :
context ->
(context * int) Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult
val internal_nonce_already_recorded : context -> int -> bool
val description : context Storage_description.t
val finalize :
?commit_message:string ->
context ->
Fitness.raw ->
Tezos_protocol_environment_012_Psithaca.Updater.validation_result
Finalize an Alpha_context.t
, producing a validation_result
.
val current_context :
context ->
Tezos_protocol_environment_012_Psithaca.Context.t
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
val non_consensus_operations :
context ->
Tezos_protocol_environment_012_Psithaca.Operation_hash.t list
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