Skip to content
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

[Merged by Bors] - implement pruner for activesets #5169

Closed
wants to merge 5 commits into from

Conversation

dshulyak
Copy link
Contributor

closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).

activesetEpoch types.EpochID
}

func Run(ctx context.Context, p *Pruner, clock *timesync.NodeClock, interval time.Duration) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a method of Pruner?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be, i thought that it is better to remove dependencies from Pruner that can be passed only to Run

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run takes a pruner as an argument, so someone calling it has to instantiate it anyway?

pruner := prune.New(...)
prune.Run(ctx, pruner, ...)
// vs
pruner := prune.New(...)
pruner.Run(ctx, ...)

bors bot pushed a commit that referenced this pull request Oct 19, 2023
merge before that change #5169

we use active sets only to verify eligibilities for ballots in the current epoch. as there is an incentive to create as little ballots as possible. for older ballots we use eligibility counter provided in the reference ballots
@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

bors bot pushed a commit that referenced this pull request Oct 19, 2023
merge before that change #5169

we use active sets only to verify eligibilities for ballots in the current epoch. as there is an incentive to create as little ballots as possible. for older ballots we use eligibility counter provided in the reference ballots
@dshulyak
Copy link
Contributor Author

bors merge

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #5169 (d820073) into develop (82d38ec) will decrease coverage by 0.1%.
Report is 1 commits behind head on develop.
The diff coverage is 64.7%.

❗ Current head d820073 differs from pull request most recent head e51ab13. Consider uploading reports for the commit e51ab13 to get more accurate results

@@            Coverage Diff            @@
##           develop   #5169     +/-   ##
=========================================
- Coverage     77.7%   77.7%   -0.1%     
=========================================
  Files          259     259             
  Lines        30781   30809     +28     
=========================================
+ Hits         23947   23967     +20     
- Misses        5345    5351      +6     
- Partials      1489    1491      +2     
Files Coverage Δ
config/config.go 100.0% <ø> (ø)
config/mainnet.go 96.4% <100.0%> (+<0.1%) ⬆️
node/node.go 67.1% <40.0%> (-0.3%) ⬇️
sql/activesets/activesets.go 81.2% <76.9%> (-2.1%) ⬇️
prune/prune.go 63.7% <63.2%> (+16.4%) ⬆️

... and 4 files with indirect coverage changes

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

bors bot pushed a commit that referenced this pull request Oct 19, 2023
merge before that change #5169

we use active sets only to verify eligibilities for ballots in the current epoch. as there is an incentive to create as little ballots as possible. for older ballots we use eligibility counter provided in the reference ballots
@dshulyak
Copy link
Contributor Author

bors cancel

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 19, 2023
closes: #5114

pruning activesets will significantly reduce space (as of now ~1.5GB / 2.9GB).
@bors
Copy link

bors bot commented Oct 19, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title implement pruner for activesets [Merged by Bors] - implement pruner for activesets Oct 19, 2023
@bors bors bot closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prune or re-encode activesets from previous epochs
2 participants