-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
feat: add strategy support for state archives #7170
Conversation
@@ -0,0 +1,163 @@ | |||
import {Logger} from "@lodestar/utils"; |
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.
This file is actually old index.ts
file, with only strategy specific changes.
Performance Report✔️ no performance regression detected Full benchmark results
|
import {RootHex} from "@lodestar/types"; | ||
|
||
export enum ArchiveMode { | ||
Full = "full", |
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.
If you think of a better name for current archiver strategy we use, please suggest.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #7170 +/- ##
============================================
- Coverage 49.21% 49.19% -0.02%
============================================
Files 598 598
Lines 39726 39779 +53
Branches 2093 2097 +4
============================================
+ Hits 19551 19570 +19
- Misses 20135 20169 +34
Partials 40 40 |
import {RootHex} from "@lodestar/types"; | ||
|
||
export enum ArchiveMode { | ||
Full = "full", |
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.
More of a general question, once we have differential archive mode implemented, will there be any advantage to use our current (full) archiving strategy?
If not, we should probably not make it overly generic / switchable
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.
My idea is to get the differential strategy released as experimental first. As I am a bit skeptical about it's memory implication. So during that time user can choose which strategy to use.
packages/beacon-node/src/chain/archiver/strategies/frequencyStateArchiveStrategy.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,46 @@ | |||
import {CheckpointWithHex} from "@lodestar/fork-choice"; | |||
import {Metrics} from "../../metrics/metrics.js"; | |||
import {RootHex} from "@lodestar/types"; |
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.
the new linter does not enforce import order anymore?
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.
There is a caveat related to import order, not yet enabled. #7182
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.
the approach lgtm for the 1st round, dropped some minor comments
Motivation
Make the state-archive process more generic so we can extend in future.
Description
Steps to test or reproduce