-
Notifications
You must be signed in to change notification settings - Fork 67
A0-3132: Add pallets documentation to metadata #1403
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
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
38a33d7
A0-3132: Add pallets documentation to metadata
Marcin-Radecki b76fcf0
Forgot to bump pallet's versions in Cargo.toml
Marcin-Radecki c00219b
Moved format checks to dedicated workflow. Fixed formatting.
Marcin-Radecki 050dfc6
Review
Marcin-Radecki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # pallet-aleph | ||
|
|
||
| This pallet is the runtime companion of the Aleph finality gadget. | ||
|
|
||
| Currently, it only provides support for changing sessions but in the future | ||
| it will allow reporting equivocation in AlephBFT. | ||
|
|
||
| This pallet relies on an extension of the `AlephSessionApi` Runtime API to handle the finality | ||
| version. The scheduled version change is persisted as `FinalityScheduledVersionChange`. This | ||
| value stores the information about a scheduled finality version change, where `version_incoming` | ||
| is the version to be set and `session` is the session on which the new version will be set. | ||
| A `pallet_session::Session_Manager` checks whether a scheduled version change has moved into | ||
| the past and, if so, records it as the current version represented as `FinalityVersion`, | ||
| and clears `FinalityScheduledVersionChange`. | ||
| It is always possible to reschedule a version change. In order to cancel a scheduled version | ||
| change rather than reschedule it, a new version change should be scheduled with | ||
| `version_incoming` set to the current value of `FinalityVersion`. | ||
|
|
||
| License: Apache 2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # pallet-committee-management | ||
|
|
||
| ## Ban logic | ||
| In case of insufficient validator's uptime, we need to remove such validators from | ||
| the committee, so that the network is as healthy as possible. This is achieved by calculating | ||
| number of _underperformance_ sessions, which means that number of blocks produced by the | ||
| validator is less than some predefined threshold. | ||
| In other words, if a validator: | ||
| * performance in a session is less or equal to a configurable threshold | ||
| `BanConfig::minimal_expected_performance` (from 0 to 100%), and, | ||
| * it happened at least `BanConfig::underperformed_session_count_threshold` times, | ||
| then the validator is considered an underperformer and hence removed (ie _banned out_) from the | ||
| committee. | ||
|
|
||
| ### Thresholds | ||
| There are two ban thresholds described above, see [`BanConfig`]. | ||
|
|
||
| #### Next era vs current era | ||
| Current and next era have distinct thresholds values, as we calculate bans during the start of the new era. | ||
| They follow the same logic as next era committee seats: at the time of planning the first | ||
| session of next the era, next values become current ones. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # pallet-elections | ||
|
|
||
| This pallet manages changes in the committee responsible for producing blocks and establishing consensus. | ||
|
|
||
| ## Terminology | ||
| For definition of session, era, staking see pallet_session and pallet_staking. | ||
| - committee ([`EraValidators`]): Set of nodes that produce and finalize blocks in the session. | ||
| - validator: Node that can become a member of committee (or already is) via rotation. | ||
| - `EraValidators::reserved`: immutable validators, ie they cannot be removed from that list. | ||
| - `EraValidators::non_reserved`: validators that can be banned out from that list. | ||
|
|
||
| ## Elections process | ||
| There are two options for choosing validators during election process governed by ([`Openness`]) storage value: | ||
| - `Permissionless`: choose all validators that bonded enough amount and are not banned. | ||
| - `Permissioned`: choose `EraValidators::reserved` and all `EraValidators::non_reserved` that are not banned. | ||
|
|
||
| License: Apache 2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.