-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add docs and details for the differential state archive #7049
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/differential-archive #7049 +/- ##
================================================================
+ Coverage 49.24% 50.26% +1.01%
================================================================
Files 578 602 +24
Lines 37443 40376 +2933
Branches 2168 2206 +38
================================================================
+ Hits 18440 20293 +1853
- Misses 18963 20043 +1080
Partials 40 40 |
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
|
||
**Approach** | ||
|
||
Assume we have following chain represents the state object every slot, with following diff layer configurations `1,2,3,5`. With assumption that we have 8 slots each epoch, The following configuration for layers implies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume we have following chain represents the state object every slot, with following diff layer configurations `1,2,3,5`. With assumption that we have 8 slots each epoch, The following configuration for layers implies: | |
Assume we have the following chain which represents the state object every slot, with following diff layer configurations `1,2,3,5`. With the assumption that we have 8 slots each epoch, the following configuration for layers implies: |
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
|
||
Based on these assumptions and system we decided for the following constants. | ||
|
||
| Name | Value | Description | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also run yarn docs:lint:fix
for prettier to fix this table
|
||
# Understanding Historical Sate Regeneration | ||
|
||
To run a blockchain client and establish consensus we need latest headers and forkchoice data. This operation does not require to historical data, specially after the epochs which are finalized. Storing the full state information for the finalized slots increase the storage requirement a lot and not suitable for running the node for long time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To run a blockchain client and establish consensus we need latest headers and forkchoice data. This operation does not require to historical data, specially after the epochs which are finalized. Storing the full state information for the finalized slots increase the storage requirement a lot and not suitable for running the node for long time. | |
To run a blockchain client and establish consensus we need the latest headers and forkchoice data. This operation does not require to historical data, specially after the epochs are being finalized. Storing the full state information for the finalized slots increase the storage requirement a lot and is not suitable for running the node for long time. |
|
||
**Approach** | ||
|
||
Assume we have following chain represents the state object every slot, with following diff layer configurations `1,2,3,5`. With assumption that we have 8 slots each epoch, The following configuration for layers implies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume we have following chain represents the state object every slot, with following diff layer configurations `1,2,3,5`. With assumption that we have 8 slots each epoch, The following configuration for layers implies: | |
Assuming we have following chain represents the state object every slot, with following diff layer configurations `1,2,3,5`. With assumption that we have 8 slots each epoch, The following configuration for layers implies: |
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
docs/pages/contribution/advanced-topics/historical-state-regen.md
Outdated
Show resolved
Hide resolved
\end{align*} | ||
$$ | ||
|
||
As there are lot of parameters in the system and we don't have accurate values for these so we started few possible estimates. Also as the chain is ever growing data structure the value for `F` is not finite. We decided to do this estimation based on 30 days time period and `mainnet` parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there are lot of parameters in the system and we don't have accurate values for these so we started few possible estimates. Also as the chain is ever growing data structure the value for `F` is not finite. We decided to do this estimation based on 30 days time period and `mainnet` parameters. | |
As there are lot of parameters in the system and we don't have accurate values for these. we started with few possible estimates. Also as the chain is an ever- growing data structure, the value for `F` is not finite. We decided to do this estimation based on 30 days time period and `mainnet` parameters. |
Co-authored-by: twoeths <[email protected]> Co-authored-by: Nico Flaig <[email protected]> Co-authored-by: NC <[email protected]>
Co-authored-by: Nico Flaig <[email protected]>
Closing this PR and moving the docs to the #7005. I felt that reviewing the docs along with the relevant code will be more helpful. |
Motivation
Add docs explaining differential state archive.
Description
Keep the reference docs updated.
Steps to test or reproduce