Skip to content

Commit fe3a55f

Browse files
committed
Update developer docs
1 parent 241f624 commit fe3a55f

20 files changed

Lines changed: 33 additions & 33 deletions

docs/developer-guide.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/figures/block-fsm.png

-36.5 KB
Binary file not shown.
-1 Bytes
Loading

docs/figures/convert-powerpoint-to-png

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@ mv figures-7.png trusted-relay-node.png
2828
mv figures-8.png message-signing.png
2929
mv figures-9.png ladder-diagram-startup.png
3030
mv figures-10.png ladder-diagram-get-key.png
31-
mv figures-11.png block-fsm.png
32-
mv figures-12.png psrd-management-classes.png
31+
mv figures-11.png psrd-management-classes.png

docs/figures/figures-13.png

-61.2 KB
Binary file not shown.

docs/figures/figures.pdf

-54.3 KB
Binary file not shown.

docs/figures/figures.pptx

-11.1 KB
Binary file not shown.
-1 Bytes
Loading
-1 Bytes
Loading
-1 Bytes
Loading

0 commit comments

Comments
 (0)