Staged_ledger
module Ledger = Mina_ledger.Ledger
module Scan_state : sig ... end
module Pre_diff_info : Pre_diff_info.S
module Staged_ledger_error : sig ... end
val scan_state : t -> Scan_state.t
val pending_coinbase_collection : t -> Mina_base.Pending_coinbase.t
val create_exn :
constraint_constants:Genesis_constants.Constraint_constants.t ->
ledger:Ledger.t ->
t
val of_scan_state_and_ledger :
logger:Logger.t ->
constraint_constants:Genesis_constants.Constraint_constants.t ->
verifier:Verifier.t ->
snarked_registers:Mina_state.Registers.Value.t ->
ledger:Ledger.t ->
scan_state:Scan_state.t ->
pending_coinbase_collection:Mina_base.Pending_coinbase.t ->
get_state:
( Mina_base.State_hash.t ->
Mina_state.Protocol_state.value Core_kernel.Or_error.t ) ->
t Async_kernel.Deferred.Or_error.t
val of_scan_state_and_ledger_unchecked :
constraint_constants:Genesis_constants.Constraint_constants.t ->
snarked_registers:Mina_state.Registers.Value.t ->
ledger:Ledger.t ->
scan_state:Scan_state.t ->
pending_coinbase_collection:Mina_base.Pending_coinbase.t ->
t Async_kernel.Deferred.Or_error.t
val proof_txns_with_state_hashes :
t ->
(Mina_transaction.Transaction.t Mina_base.With_status.t
* Mina_base.State_hash.t)
Mina_stdlib.Nonempty_list.t
option
val hash : t -> Mina_base.Staged_ledger_hash.t
val apply :
?skip_verification:[ `Proofs | `All ] ->
constraint_constants:Genesis_constants.Constraint_constants.t ->
t ->
Staged_ledger_diff.t ->
logger:Logger.t ->
verifier:Verifier.t ->
current_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
state_and_body_hash:(Mina_base.State_hash.t * Mina_base.State_body_hash.t) ->
coinbase_receiver:Signature_lib.Public_key.Compressed.t ->
supercharge_coinbase:bool ->
( [ `Hash_after_applying of Mina_base.Staged_ledger_hash.t ]
* [ `Ledger_proof of
(Ledger_proof.t
* (Mina_transaction.Transaction.t Mina_base.With_status.t
* Mina_base.State_hash.t)
list)
option ]
* [ `Staged_ledger of t ]
* [ `Pending_coinbase_update of bool * Mina_base.Pending_coinbase.Update.t ],
Staged_ledger_error.t )
Async_kernel.Deferred.Result.t
val apply_diff_unchecked :
constraint_constants:Genesis_constants.Constraint_constants.t ->
t ->
Staged_ledger_diff.With_valid_signatures_and_proofs.t ->
logger:Logger.t ->
current_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
state_and_body_hash:(Mina_base.State_hash.t * Mina_base.State_body_hash.t) ->
coinbase_receiver:Signature_lib.Public_key.Compressed.t ->
supercharge_coinbase:bool ->
( [ `Hash_after_applying of Mina_base.Staged_ledger_hash.t ]
* [ `Ledger_proof of
(Ledger_proof.t
* (Mina_transaction.Transaction.t Mina_base.With_status.t
* Mina_base.State_hash.t)
list)
option ]
* [ `Staged_ledger of t ]
* [ `Pending_coinbase_update of bool * Mina_base.Pending_coinbase.Update.t ],
Staged_ledger_error.t )
Async_kernel.Deferred.Result.t
val current_ledger_proof : t -> Ledger_proof.t option
val create_diff :
constraint_constants:Genesis_constants.Constraint_constants.t ->
?log_block_creation:bool ->
t ->
coinbase_receiver:Signature_lib.Public_key.Compressed.t ->
logger:Logger.t ->
current_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t ->
transactions_by_fee:Mina_base.User_command.Valid.t Core_kernel.Sequence.t ->
get_completed_work:
( Transaction_snark_work.Statement.t ->
Transaction_snark_work.Checked.t option ) ->
supercharge_coinbase:bool ->
( Staged_ledger_diff.With_valid_signatures_and_proofs.t
* (Mina_base.User_command.Valid.t * Core_kernel.Error.t) list,
Pre_diff_info.Error.t )
Core_kernel.Result.t
val can_apply_supercharged_coinbase_exn :
winner:Signature_lib.Public_key.Compressed.t ->
epoch_ledger:Mina_ledger.Sparse_ledger.t ->
global_slot:Mina_numbers.Global_slot.t ->
bool
val of_scan_state_pending_coinbases_and_snarked_ledger :
logger:Logger.t ->
constraint_constants:Genesis_constants.Constraint_constants.t ->
verifier:Verifier.t ->
scan_state:Scan_state.t ->
snarked_ledger:Ledger.t ->
snarked_local_state:Mina_state.Local_state.t ->
expected_merkle_root:Mina_base.Ledger_hash.t ->
pending_coinbases:Mina_base.Pending_coinbase.t ->
get_state:
( Mina_base.State_hash.t ->
Mina_state.Protocol_state.value Core_kernel.Or_error.t ) ->
t Core_kernel.Or_error.t Async_kernel.Deferred.t
val of_scan_state_pending_coinbases_and_snarked_ledger_unchecked :
constraint_constants:Genesis_constants.Constraint_constants.t ->
scan_state:Scan_state.t ->
snarked_ledger:Ledger.t ->
snarked_local_state:Mina_state.Local_state.t ->
expected_merkle_root:Mina_base.Ledger_hash.t ->
pending_coinbases:Mina_base.Pending_coinbase.t ->
get_state:
( Mina_base.State_hash.t ->
Mina_state.Protocol_state.value Core_kernel.Or_error.t ) ->
t Core_kernel.Or_error.t Async_kernel.Deferred.t
val all_work_pairs :
t ->
get_state:
( Mina_base.State_hash.t ->
Mina_state.Protocol_state.value Core_kernel.Or_error.t ) ->
( Transaction_witness.t, Ledger_proof.t ) Snark_work_lib.Work.Single.Spec.t
One_or_two.t
list
Core_kernel.Or_error.t
val all_work_statements_exn : t -> Transaction_snark_work.Statement.t list
val check_commands :
Ledger.t ->
verifier:Verifier.t ->
Mina_base.User_command.t list ->
( Mina_base.User_command.Valid.t list, Verifier.Failure.t )
Core_kernel.Result.t
Async_kernel.Deferred.Or_error.t
val latest_block_accounts_created :
t ->
previous_block_state_hash:Mina_base.State_hash.t ->
Mina_base.Account_id.t list
account ids created in the latest block, taken from the new_accounts in the latest and next-to-latest trees of the scan state