package octez-protocol-alpha-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-protocol-alpha-libs.test-helpers/Tezos_alpha_test_helpers/Scenario_bake/index.html
Module Tezos_alpha_test_helpers.Scenario_bake
Source
val apply_end_cycle :
Tezos_alpha_test_helpers.State_account.Cycle.t ->
Block.t ->
Block.t ->
State.t ->
State.t Tezos_base.TzPervasives.tzresult Lwt.t
Applies when baking the last block of a cycle
val apply_new_cycle :
Tezos_alpha_test_helpers.State_account.Cycle.cycle ->
State.t ->
State.t
Applies when baking the first block of a cycle. Technically nothing special happens, but we need to update the unslashable unstakes since it's done lazily
After baking and applying rewards in state
val bake :
?baker:string ->
Scenario_base.t ->
Scenario_base.t Tezos_base.TzPervasives.tzresult Lwt.t
Bake a block, with the given baker and the given operations.
val bake_until_next_cycle :
Scenario_base.t ->
Scenario_base.t Tezos_base.TzPervasives.tzresult Lwt.t
Bake until a cycle is reached, using bake
instead of Block.bake
val bake_until_dawn_of_next_cycle :
Scenario_base.t ->
Scenario_base.t Tezos_base.TzPervasives.tzresult Lwt.t
Bake all the remaining blocks of the current cycle
Bake a single block
val next_block_with_baker :
string ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
Bake a single block with a specific baker
Bake until the end of a cycle
Bake until the end of a cycle
val exec_op :
((Block.t * 'a) ->
(State.t
* Tezos_protocol_alpha.Protocol.Alpha_context.packed_operation list,
Tezos_base.TzPervasives.tztrace)
result
Lwt.t) ->
(Block.t * 'a, Scenario_base.t) Scenario_dsl.scenarios
Executes an operation: f should return a new state and a list of operations, which are then applied
Waiting functions
val wait_cycle_f_es :
(Scenario_base.t ->
Scenario_base.t ->
bool Tezos_base.TzPervasives.tzresult Lwt.t) ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
val wait_cycle_f :
(Scenario_base.t -> Scenario_base.t -> bool) ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
Waits until condition init_t current_t
is fulfilled. It is checked on the first block of every cycle. If it returns false, another cycle is baked, until it succeeds.
val wait_cycle_until :
[< `AI_activation
| `AI_activation_with_votes
| `And of 'a * 'a
| `delegate_parameters_activation
| `right_before_delegate_parameters_activation ] as 'a ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
Wait until we are in a cycle satisfying the given condition. Fails if AI_activation is requested and AI is not set to be activated in the future.
Wait until AI activates. Fails if AI is not set to be activated in the future.
val wait_delegate_parameters_activation :
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
wait delegate_parameters_activation_delay cycles
val wait_n_cycles_f_es :
(Scenario_base.t -> int Tezos_base.TzPervasives.tzresult Lwt.t) ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios
val wait_n_cycles_f :
(Scenario_base.t -> int) ->
(Scenario_base.t, Scenario_base.t) Scenario_dsl.scenarios