2017-11-07 20:38:11 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2018-01-29 04:06:47 +04:00
|
|
|
open Proto_alpha
|
2018-02-11 22:17:39 +04:00
|
|
|
open Alpha_context
|
2018-01-29 04:06:47 +04:00
|
|
|
|
2017-11-07 20:38:11 +04:00
|
|
|
(** Mine a block *)
|
|
|
|
val bake_block:
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2018-02-11 22:17:39 +04:00
|
|
|
Block_services.block ->
|
2017-11-07 20:38:11 +04:00
|
|
|
?force:bool ->
|
|
|
|
?max_priority: int ->
|
|
|
|
?free_baking: bool ->
|
2018-02-01 20:31:08 +04:00
|
|
|
?src_sk:Client_keys.sk_locator ->
|
2017-11-07 20:38:11 +04:00
|
|
|
public_key_hash ->
|
|
|
|
unit tzresult Lwt.t
|
|
|
|
|
|
|
|
(** Endorse a block *)
|
|
|
|
val endorse_block:
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2017-11-07 20:38:11 +04:00
|
|
|
?max_priority:int ->
|
|
|
|
Client_keys.Public_key_hash.t ->
|
|
|
|
unit Error_monad.tzresult Lwt.t
|
|
|
|
|
|
|
|
(** Get the previous cycle of the given cycle *)
|
|
|
|
val get_predecessor_cycle:
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2017-11-07 20:38:11 +04:00
|
|
|
Cycle.t ->
|
|
|
|
Cycle.t Lwt.t
|
|
|
|
|
|
|
|
(** Reveal the nonces used to bake each block in the given list *)
|
|
|
|
val reveal_block_nonces :
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2017-11-07 20:38:11 +04:00
|
|
|
Block_hash.t list ->
|
|
|
|
unit Error_monad.tzresult Lwt.t
|
|
|
|
|
|
|
|
(** Reveal all unrevealed nonces *)
|
|
|
|
val reveal_nonces :
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2017-11-07 20:38:11 +04:00
|
|
|
unit ->
|
|
|
|
unit Error_monad.tzresult Lwt.t
|
|
|
|
|
|
|
|
(** Initialize the baking daemon *)
|
|
|
|
val run_daemon:
|
2018-02-11 22:17:40 +04:00
|
|
|
#Proto_alpha.full_context ->
|
2017-11-07 20:38:11 +04:00
|
|
|
?max_priority:int ->
|
|
|
|
endorsement_delay:int ->
|
2018-01-29 04:06:47 +04:00
|
|
|
('a * public_key_hash) list ->
|
2017-11-07 20:38:11 +04:00
|
|
|
endorsement:bool ->
|
|
|
|
baking:bool ->
|
|
|
|
denunciation:bool ->
|
|
|
|
unit Error_monad.tzresult Lwt.t
|