|
2 | 2 |
|
3 | 3 | ## Overview
|
4 | 4 |
|
5 |
| -Persistence is a key component of the Block-Node. Although not each and every |
6 |
| -Block-Node will feature persistence, we need to ensure that we have good and |
7 |
| -reliable persistence plugins that can be used by the Block-Node. We support |
8 |
| -local file system persistence for recently received and verified blocks which |
9 |
| -we call `Files Recent Persistence`. Also, complementary to the persistence |
10 |
| -capability itself, we also have the ability to retrieve (read) blocks that have |
11 |
| -been persisted. `Block Provision` is also a key component of the Block-Node. |
| 5 | +Persistence is a key component of the Block-Node. We need to ensure that we have |
| 6 | +good and reliable persistence plugins that can be used by the Block-Node. We |
| 7 | +support local file system persistence for recently received and verified blocks |
| 8 | +which we call `Files Recent Persistence`. Also, complementary to the persistence |
| 9 | +capability itself, we have the ability to retrieve (read) blocks that have been |
| 10 | +persisted. `Block Provision` is another key component of the Block-Node. |
12 | 11 | The `Files Recent Persistence` is however an optional component, meaning that
|
13 | 12 | the system is able to operate without it present and loaded.
|
14 | 13 |
|
15 |
| -This E2E test plan is designed highlighting the key scenarios that need to be |
| 14 | +This E2E test plan is designed to highlight the key scenarios that need to be |
16 | 15 | tested for end results in order to ensure the correctness and proper working of
|
17 | 16 | the `Files Recent Persistence` as well as the complementary `Block Provision`
|
18 | 17 | logic. Essentially, this test plan describes the intended behavior of the
|
19 |
| -`Files Recent Persistence` and the expected results it produces. The tests |
20 |
| -implemented following this plan must assert all these assumptions. |
| 18 | +`Files Recent Persistence` and the expected results it produces. |
21 | 19 |
|
22 | 20 | ## Key Considerations for `Files Recent Persistence`
|
23 | 21 |
|
24 | 22 | - **Path Resolution Logic**: `Files Recent Persistence` relies on path
|
25 | 23 | resolution logic which determines the location of a given block.
|
26 | 24 | - **Trie Data Structure for Path Resolution**: `Files Recent Persistence`
|
27 | 25 | utilizes a trie data structure to resolve paths for blocks. This is done to
|
| 26 | + ensure that the blocks are stored in a structured manner, allowing for |
| 27 | + efficient storage and retrieval. The trie structure is based on the digits of |
| 28 | + the blockNumber, with each directory (tree node) representing the next 3 |
| 29 | + digits of the whole blockNumber, going left to right. |
28 | 30 | - **Files Recent Root Path**: This is the root path (configurable) where all
|
29 | 31 | blocks that have passed verification are stored. Generally, the stored blocks
|
30 | 32 | are relatively short-lived because this storage type is intended for recently
|
31 | 33 | received and verified blocks.
|
32 | 34 | - **Scope**: The `Files Recent Persistence` will accept verified blocks through
|
33 | 35 | the node's messaging system and will store them under its root.
|
34 | 36 | The `Files Recent Persistence` will keep a limited number of blocks in its
|
35 |
| - root path and will then proceed to delete the oldest blocks(rolling history). |
| 37 | + root path and will then proceed to delete the oldest blocks (rolling history). |
36 | 38 | That is the full scope of the `Files Recent Persistence`. While the blocks are
|
37 | 39 | stored and available, they can be queried by other components of the system.
|
38 | 40 | - **Persistence Results**: `Files Recent Persistence` publishes persistence
|
|
0 commit comments