package tezos-baking-015-PtLimaPt
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
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.