package tezos-baking-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-baking-015-PtLimaPt.tenderbrute/Tenderbrute_015_PtLimaPt/Tenderbrute/index.html
Module Tenderbrute_015_PtLimaPt.Tenderbrute
Source
type delegate_selection =
(Tezos_protocol_015_PtLimaPt.Protocol.Raw_level_repr.t
* (Tezos_protocol_015_PtLimaPt.Protocol.Round_repr.t
* Tezos_crypto.Signature.V0.public_key_hash)
list)
list
The type of desired delegate selection. For each level, and each round, one can provide a public key hash that would be the proposer. All non- specified level and rounds are not constrained.
val bruteforce :
?show_progress:bool ->
?random_seed:int ->
?max:int ->
?parameters:Tezos_client_015_PtLimaPt.Mockup.Protocol_parameters.t ->
?constants_overrides_json:Data_encoding.json ->
?bootstrap_accounts_json:Data_encoding.json ->
delegate_selection ->
Tezos_protocol_015_PtLimaPt.Protocol.State_hash.t option
Tezos_base.TzPervasives.tzresult
Lwt.t
Brute-force an initial seed nonce for the desired delegate selection. When found, the seed nonce is returned as a byte sequence of size 32. If no nonce is necessary to obtain the desired selection, None
is returned (there won't be any brute-forcing then).
Note: When using this function in your tests, take care of saving the nonce once it is found locallty (in this case call check_seed_nonce
to ensure it yields the desired selection) to avoid unnecessary computation (in particular this function should not be called in the CI).
val check_seed :
?parameters:Tezos_client_015_PtLimaPt.Mockup.Protocol_parameters.t ->
?constants_overrides_json:Data_encoding.json ->
?bootstrap_accounts_json:Data_encoding.json ->
seed:Tezos_protocol_015_PtLimaPt.Protocol.State_hash.t option ->
delegate_selection ->
bool Tezos_base.TzPervasives.tzresult Lwt.t
Check that an initial seed nonce yields to the desired delegate selection. See bruteforce
for the arguments.