Mavryk_shell.Validator
Mavryk Shell - Main entry point of the validation scheduler.
val create :
Mavryk_store.Store.t ->
Distributed_db.t ->
Mavryk_shell_services.Shell_limits.peer_validator_limits ->
Mavryk_shell_services.Shell_limits.block_validator_limits ->
Block_validator_process.t ->
Mavryk_shell_services.Shell_limits.prevalidator_limits ->
Mavryk_shell_services.Shell_limits.chain_validator_limits ->
start_testchain:bool ->
t Mavryk_base.TzPervasives.tzresult Lwt.t
val shutdown : t -> unit Lwt.t
val activate :
t ->
start_prevalidator:bool ->
validator_process:Block_validator_process.t ->
Mavryk_store.Store.chain_store ->
Chain_validator.t Mavryk_base.TzPervasives.tzresult Lwt.t
Start the validation scheduler of a given chain.
val get_active_chains : t -> Mavryk_base.TzPervasives.Chain_id.t list
val validate_block :
t ->
?force:bool ->
?chain_id:Mavryk_base.TzPervasives.Chain_id.t ->
Mavryk_base.TzPervasives.Bytes.t ->
Mavryk_base.Operation.t list list ->
(Mavryk_base.TzPervasives.Block_hash.t
* unit Mavryk_base.TzPervasives.tzresult Lwt.t)
Mavryk_base.TzPervasives.tzresult
Lwt.t
Force the validation of a block.
val watcher :
t ->
Mavryk_store.Store.Block.t Lwt_stream.t * Lwt_watcher.stopper
Monitor all the valid block (for all activate chains).
val chains_watcher :
t ->
(Mavryk_base.TzPervasives.Chain_id.t * bool) Lwt_stream.t
* Lwt_watcher.stopper
val inject_operation :
t ->
?chain_id:Mavryk_base.TzPervasives.Chain_id.t ->
force:bool ->
Mavryk_base.Operation.t ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
inject_operation t ?chain_id ~force op
notifies the prevalidator worker associated with the chain_id
of a new injected operation. Fails if the branch in op
is not known in the given chain_id
or if no prevalidator is associated with the chain_id
. If no chain_id
is provided, try to recover a chain_id from the branch in the operation data. Fails if no chain_id can be recovered unless force
is set. If force is set, notify all the known prevalidator workers.
val distributed_db : t -> Distributed_db.t