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

Store collator fullness in collator_assignment pallet #672

Merged
merged 7 commits into from
Sep 3, 2024

Conversation

tmpolaczyk
Copy link
Collaborator

@tmpolaczyk tmpolaczyk commented Aug 29, 2024

Count number of collators assigned to any chain, divide that by max_collators and store the resulting ratio in pallet storage. In the future, that value will be used together with target_container_chain_fullness to adjust some params that are based on usage.

@tmpolaczyk tmpolaczyk marked this pull request as ready for review August 29, 2024 15:45
@tmpolaczyk tmpolaczyk added B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes labels Aug 29, 2024
Copy link
Contributor

github-actions bot commented Aug 29, 2024

Coverage Report

(master)

@@                        Coverage Diff                        @@
##           master   tomasz-store-collator-fullness     +/-   ##
=================================================================
  Coverage   67.20%                           67.20%   0.00%     
  Files         262                              262             
+ Lines       46899                            46906      +7     
=================================================================
+ Hits        31515                            31519      +4     
+ Misses      15384                            15387      +3     
Files Changed Coverage
/pallets/collator-assignment/src/lib.rs 95.61% (+0.37%) 🔼
/pallets/configuration/src/lib.rs 86.00% (-2.06%) 🔽

Coverage generated Tue Sep 3 09:11:59 UTC 2024

@girazoki
Copy link
Collaborator

NO migration required because we only write data right? (we dont read it)

Copy link
Collaborator

@girazoki girazoki left a comment

Choose a reason for hiding this comment

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

I would approve it with a typescript test :)

Copy link
Collaborator

@girazoki girazoki left a comment

Choose a reason for hiding this comment

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

LGTM

@tmpolaczyk tmpolaczyk merged commit 944c771 into master Sep 3, 2024
37 checks passed
@tmpolaczyk tmpolaczyk deleted the tomasz-store-collator-fullness branch September 3, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit not-breaking Does not need to be mentioned in breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants