1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! All the states of the `BlockAllocator` state machine,
//! over the extent of a Tendermint consensus round
//! block proposal.
//!
//! # States
//!
//! The state machine moves through the following state DAG:
//!
//! 1. [`BuildingProtocolTxBatch`] - the initial state. In this state, we
//! populate a block with protocol txs.
//! 2. [`BuildingNormalTxBatch`] - the second state. In this state, we populate
//! a block with non-protocol txs.
//! 3. [`BuildingProtocolTxBatch`] - we return to this state to fill up any
//! remaining block space if possible.
use AllocFailure;
/// The leader of the current Tendermint round is building
/// a new batch of protocol txs.
///
/// This happens twice, in the first stage, we fill up to 1/2
/// of the block. At the end of allocating user txs, we fill
/// up any remaining space with un-allocated protocol txs.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// Allow block proposals to include user submitted txs.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// Allow block proposals to include wrapper txs.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// The leader of the current Tendermint round is building
/// a new batch of user submitted (non-protocol) transactions.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// Try to allocate a new transaction on a `BlockAllocator` state.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// Represents a state transition in the `BlockAllocator` state machine.
///
/// This trait should not be used directly. Instead, consider using
/// [`NextState`].
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].
/// Convenience extension of [`NextStateImpl`], to transition to a new
/// state with a null transition function.
///
/// For more info, read the module docs of
/// [`crate::shell::block_alloc::states`].