dusk-network / dusk-blockchain

Reference implementation of the DUSK Network node, written in Golang
MIT License
102 stars 47 forks source link

Use constant Committee Size #1527

Closed fed-franz closed 1 year ago

fed-franz commented 1 year ago

This PR removes the CommitteeSize() function, which computed the committee size as the minimum between MaxCommitteeSize and the number of available provisioners. As a result, it makes all functions simply use the constant MaxCommitteeSize as the committee size.

The PR also fixes several tests, whose behavior wrongly assumed a correlation between the number of provisioners and the committee size.

Resolves #1520

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 27.54% and project coverage change: -0.26 :warning:

Comparison is base (57c6bbd) 40.18% compared to head (02868cf) 39.92%.

:exclamation: Current head 02868cf differs from pull request most recent head a49e9a9. Consider uploading reports for the commit a49e9a9 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1527 +/- ## ========================================== - Coverage 40.18% 39.92% -0.26% ========================================== Files 147 147 Lines 9651 9773 +122 ========================================== + Hits 3878 3902 +24 - Misses 5144 5239 +95 - Partials 629 632 +3 ``` | [Impacted Files](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) | Coverage Δ | | |---|---|---| | [pkg/config/genesis/config.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvbmZpZy9nZW5lc2lzL2NvbmZpZy5nbw==) | `0.00% <ø> (ø)` | | | [pkg/core/consensus/agreement/checkcert.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvY29uc2Vuc3VzL2FncmVlbWVudC9jaGVja2NlcnQuZ28=) | `7.69% <0.00%> (+0.71%)` | :arrow_up: | | [...nsensus/blockgenerator/candidate/blockgenerator.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvY29uc2Vuc3VzL2Jsb2NrZ2VuZXJhdG9yL2NhbmRpZGF0ZS9ibG9ja2dlbmVyYXRvci5nbw==) | `0.00% <0.00%> (ø)` | | | [...core/consensus/blockgenerator/candidate/genesis.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvY29uc2Vuc3VzL2Jsb2NrZ2VuZXJhdG9yL2NhbmRpZGF0ZS9nZW5lc2lzLmdv) | `0.00% <0.00%> (ø)` | | | [...kg/core/consensus/blockgenerator/candidate/mock.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvY29uc2Vuc3VzL2Jsb2NrZ2VuZXJhdG9yL2NhbmRpZGF0ZS9tb2NrLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/core/consensus/fixtures.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvY29uc2Vuc3VzL2ZpeHR1cmVzLmdv) | `0.00% <0.00%> (ø)` | | | [pkg/core/data/block/block.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvZGF0YS9ibG9jay9ibG9jay5nbw==) | `8.97% <0.00%> (-1.48%)` | :arrow_down: | | [pkg/core/data/block/certificate.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvZGF0YS9ibG9jay9jZXJ0aWZpY2F0ZS5nbw==) | `0.00% <ø> (ø)` | | | [pkg/core/data/block/header.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvZGF0YS9ibG9jay9oZWFkZXIuZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/core/data/ipc/transactions/fixtures.go](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network#diff-cGtnL2NvcmUvZGF0YS9pcGMvdHJhbnNhY3Rpb25zL2ZpeHR1cmVzLmdv) | `13.76% <0.00%> (-0.21%)` | :arrow_down: | | ... and [21 more](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/dusk-network/dusk-blockchain/pull/1527/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dusk-network)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.