Crate-level documentation on finality relays and relayers pallet (#1773)

* started crate-level documentation on relays and relayers pallet

* fixes in finality and parachain finality relay docs

* fix links

* grammar fixes
This commit is contained in:
Svyatoslav Nikolsky
2023-01-18 09:56:30 +03:00
committed by Bastian Köcher
parent 8a4f984a7a
commit b06cd924e9
5 changed files with 135 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
# Bridge Relayers Pallet
The pallet serves as a storage for pending bridge relayer rewards. Any runtime component may register reward
to some relayer for doing some useful job at some messages lane. Later, the relayer may claim its rewards
using the `claim_rewards` call.
The reward payment procedure is abstracted from the pallet code. One of possible implementations, is the
[`PayLaneRewardFromAccount`](../../primitives/relayers/src/lib.rs), which just does a `Currency::transfer`
call to relayer account from the relayer-rewards account, determined by the message lane id.
We have two examples of how this pallet is used in production. Rewards are registered at the target chain to
compensate fees of message delivery transactions (and linked finality delivery calls). At the source chain, rewards
are registered during delivery confirmation transactions. You may find more information about that in the
[Kusama <> Polkadot bridge](../../docs/polkadot-kusama-bridge-overview.md) documentation.
@@ -0,0 +1,10 @@
# Shift Session Manager Pallet
**THIS PALLET IS NOT INTENDED TO BE USED IN PRODUCTION**
The pallet does not provide any calls or runtime storage entries. It only provides implementation of the
`pallet_session::SessionManager`. This implementation, starting from session `3` selects two thirds of initial
validators and changes the set on every session. We are using it at our testnets ([Rialto](../../bin/rialto/) and
[Millau](../../bin/millau/)) to be sure that the set changes every session. On well-known production chains
(like Kusama and Polkadot) the alternative is the set of [nPoS](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html)
pallets, which selects validators, based on their nominations.