@@ -190,37 +190,7 @@ The `Block` class has the following attributes:
190190| block_uuid | UUID | Uniquely identifies the block. |
191191| size | int | Size of the block in bytes. |
192192| data | bytes | The bytes in the block. |
193- | allocated | bitarray | A bit for each byte in the block to indicate whether the byte is allocated. |
194- | consumed | bitarray | A bit for each byte in the block to indicate whether the byte is consumed. |
195-
196- The state of each byte in the block is described by the following Finite State Machine (FSM):
197-
198- ![ Block Finite State Machine (FSM)] ( figures/block-fsm.png )
199-
200- When the block is created, each byte is unallocated.
201-
202- A node can have multiple blocks, organized into pools.
203- A pool is represented by the ` Pool ` class.
204-
205- A node may need to allocate some bytes from a pool for the purpose of allocating an encryption
206- key to encrypt an outgoing message to a signing key to sign an outgoing message.
207- Such an allocation of bytes is represented by the ` Allocation ` class.
208-
209- When allocation is created, one or more blocks are selected to allocate the bytes from.
210- A contiguous sequence of bytes within a block that is assigned to an allocation is called
211- a fragment and represented by the ` Fragment ` class.
212- An allocation may span multiple blocks and hence consist of multiple fragments.
213-
214- Allocating bytes from a block is a two step process.
215-
216- First the bytes are _ allocated_ which means that they are assigned to an allocation.
217-
218- Then the allocated bytes are _ consumed_ which means that the allocated bytes are taken out of
219- the block and erased in the block.
220-
221- A byte which has been allocated but not yet consumed can be deallocated.
222-
223- TODO: CONTINUE FROM HERE
193+ | used | bitarray | A bit for each byte in the block to indicate whether the byte is used (allocated). |
224194
225195### Class ` Fragment `
226196
0 commit comments