package tezos-baking-016-PtMumbai
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-baking-016-PtMumbai.tenderbrute/Tenderbrute_016_PtMumbai/Tenderbrute/index.html
Module Tenderbrute_016_PtMumbai.Tenderbrute
Source
type delegate_selection =
(Tezos_protocol_016_PtMumbai.Protocol.Raw_level_repr.t
* (Tezos_protocol_016_PtMumbai.Protocol.Round_repr.t
* Tezos_base.TzPervasives.Signature.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_016_PtMumbai.Mockup.Protocol_parameters.t ->
?constants_overrides_json:Data_encoding.json ->
?bootstrap_accounts_json:Data_encoding.json ->
delegate_selection ->
Tezos_protocol_016_PtMumbai.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_016_PtMumbai.Mockup.Protocol_parameters.t ->
?constants_overrides_json:Data_encoding.json ->
?bootstrap_accounts_json:Data_encoding.json ->
seed:Tezos_protocol_016_PtMumbai.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.