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] - setup min activeset weight with data from latest epoch #5171

Closed

Conversation

dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Oct 18, 2023

closes: #5137

  • added a tool that can be used to read db and compute total weight of atxs in the latest epoch
  • activeset weight configured as a sorted array of tuples (epoch, weight). components select latest tuple that match epoch based on timing of usage

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #5171 (26be51e) into develop (21c602e) will increase coverage by 77.6%.
Report is 1 commits behind head on develop.
The diff coverage is 100.0%.

@@            Coverage Diff             @@
##           develop   #5171      +/-   ##
==========================================
+ Coverage         0   77.6%   +77.6%     
==========================================
  Files            0     261     +261     
  Lines            0   30995   +30995     
==========================================
+ Hits             0   24082   +24082     
- Misses           0    5407    +5407     
- Partials         0    1506    +1506     
Files Coverage Δ
config/mainnet.go 96.4% <100.0%> (ø)
config/presets/testnet.go 95.6% <100.0%> (ø)
miner/minweight/minweight.go 100.0% <100.0%> (ø)
miner/proposal_builder.go 95.4% <100.0%> (ø)
node/node.go 65.1% <100.0%> (ø)
proposals/eligibility_validator.go 100.0% <100.0%> (ø)
proposals/handler.go 87.4% <ø> (ø)
tortoise/algorithm.go 71.7% <ø> (ø)

... and 253 files with indirect coverage changes

@dshulyak dshulyak marked this pull request as ready for review October 19, 2023 06:35
@dshulyak dshulyak marked this pull request as draft October 19, 2023 06:36
@dshulyak dshulyak marked this pull request as ready for review October 19, 2023 06:57
@dshulyak dshulyak changed the title setup high enough min set weight setup min activeset weight with data from latest epoch Oct 19, 2023
cmd/activeset/activeset.go Outdated Show resolved Hide resolved
Comment on lines +99 to +104
MinimalActiveSetWeight: []types.EpochMinimalActiveWeight{
{Weight: 1_000_000},
// generated using ./cmd/activeset for publish epoch 6
// it will be used starting from epoch 8, because we will only release it in 7th
{Epoch: 8, Weight: 7_879_129_244},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this list expected to be small? If it's going to have an entry per every epoch, then perhaps using something like a btree would be beneficial (for faster lookup in Select()).

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 is expected to be small. min activeset value is only needed to compute eligibilities in the current epoch. for previous epochs we store a counter. there are two values so that we can update in the middle of the epoch, likely it will be at most 2 in any release

miner/minweight/minweight_test.go Show resolved Hide resolved
@dshulyak
Copy link
Contributor Author

bors merge

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

- added a tool that can be used to read db and compute total weight of atxs in the latest epoch
- activeset weight configured as  a sorted array of tuples (epoch, weight). components select latest tuple that match epoch based on timing of usage
@bors
Copy link

bors bot commented Oct 20, 2023

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

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

- added a tool that can be used to read db and compute total weight of atxs in the latest epoch
- activeset weight configured as  a sorted array of tuples (epoch, weight). components select latest tuple that match epoch based on timing of usage
@bors
Copy link

bors bot commented Oct 20, 2023

Build failed:

  • ci-status

@dshulyak
Copy link
Contributor Author

bors merge

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

- added a tool that can be used to read db and compute total weight of atxs in the latest epoch
- activeset weight configured as  a sorted array of tuples (epoch, weight). components select latest tuple that match epoch based on timing of usage
@bors
Copy link

bors bot commented Oct 20, 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 setup min activeset weight with data from latest epoch [Merged by Bors] - setup min activeset weight with data from latest epoch Oct 20, 2023
@bors bors bot closed this Oct 20, 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.

Smesher with many small proposals/rewards
2 participants