referrerpolicy=no-referrer-when-downgrade

Module unsigned

Source
Expand description

The unsigned pallet

§The unsigned phase, and its miner.

This pallet deals with unsigned submissions. These are backup, “possibly” multi-page submissions from validators.

This pallet has two miners, described in unsigned::miner.

As it stands, a validator can, during the unsigned phase, submit up to unsigned::Config::MinerPages pages. While this can be more than 1, it can likely not be a full, high quality solution. This is because unsigned validator solutions are verified on the fly, all within a single block. The exact value of this parameter should be determined by the benchmarks of a runtime.

We could implement a protocol to allow multi-block, multi-page collaborative submissions from different validators, but it is not trivial. Moreover, recall that the unsigned phase is merely a backup and we should primarily rely on offchain staking miners to fulfill this role during Phase::Signed.

§Future Idea: Multi-Page unsigned submission

the following is the idea of how to implement multi-page unsigned, which we don’t have.

All validators will run their miners and compute the full paginated solution. They submit all pages as individual unsigned transactions to their local tx-pool.

Upon validation, if any page is now present the corresponding transaction is dropped.

At each block, the first page that may be valid is included as a high priority operational transaction. This page is validated on the fly to be correct. Since this transaction is sourced from a validator, we can panic if they submit an invalid transaction.

Then, once the final page is submitted, some extra checks are done, as explained in crate::verifier:

  1. bounds
  2. total score

These checks might still fail. If they do, the solution is dropped. At this point, we don’t know which validator may have submitted a slightly-faulty solution.

In order to prevent this, the transaction validation process always includes a check to ensure all of the previous pages that have been submitted match what the local validator has computed. If they match, the validator knows that they are putting skin in a game that is valid.

If any bad paged are detected, the next validator can bail. This process means:

  • As long as all validators are honest, and run the same miner code, a correct solution is found.
  • As little as one malicious validator can stall the process, but no one is accidentally slashed, and no panic happens.

Alternatively, we can keep track of submitters, and report a slash if it occurs. Or, if the signed process is bullet-proof, we can be okay with the status quo.

Re-exports§

pub use crate::weights::traits::pallet_election_provider_multi_block_unsigned::*;

Modules§

dispatchables
Exports of this pallet Auto-generated docs-only module listing all defined dispatchables for this pallet.
miner
The miner. The miner code for the EPMB pallet.
storage_types
Exports of this pallet Auto-generated docs-only module listing all (public and private) defined storage types for this pallet.

Structs§

Pallet
Exports of this pallet The Pallet struct, the main type that implements traits and standalone functions within the pallet.

Enums§

Call
Exports of this pallet Contains a variant per dispatchable extrinsic that this pallet has.

Traits§

Config
Exports of this pallet Configuration trait of this pallet.

Type Aliases§

ModuleDeprecated
Exports of this pallet Type alias to Pallet, to be used by construct_runtime.