Phase::Emergency
] is enabled, as an alternative to calling [Call::set_emergency_election_result
].
Namespace
ElectionProvider::elect
.
This can only be set by T::ForceOrigin
, and only when the phase is Emergency
.
The solution is not checked for any feasibility and is assumed to be trustworthy, as any feasibility check itself can in principle cause the election process to fail (due to memory/weight constrains).
Namespace
MinimumUntrustedScore
.
Dispatch origin must be aligned with T::ForceOrigin
.
This check can be turned off by setting the value to None
.
Namespace
Snapshot
] is present.
Namespace
set_minimum_untrusted_score
.
Namespace
elect
.
Namespace
elect
is called.
Namespace
(score, index)
, where each index
points to a value in SignedSubmissions
.
We never need to process more than a single signed submission at a time. Signed submissions can be quite large, so we’re willing to pay the cost of multiple database accesses to access them one at a time instead of reading and decoding all of them at once.
Namespace
SignedSubmissionIndices.len()
, because that’s a bounded set; past its capacity, it will simply saturate. We can’t just iterate over SignedSubmissionsMap
, because iteration is slow. Instead, we store the value here.
Namespace
SubmissionIndices
, this stores a bounded set of SignedSubmissions
while allowing us to keep only a single one in memory at a time.
Twox note: the key of the map is an auto-incrementing index which users cannot inspect or affect; we shouldn’t need a cryptographically secure hasher.
Namespace
elect
.
Namespace
RoundSnapshot
]
Only exists when [Snapshot
] is present.
Namespace
bool
is true
when a previous solution was ejected to make room for this one.
Namespace
Self::insert_submission
returned an invalid index.
Namespace
SignedSubmissionIndices<T>
is bounded on this value. If you update this value during an election, you must ensure that SignedSubmissionIndices.len()
is less than or equal to the new value. Otherwise, attempts to submit new solutions may cause a runtime panic.
Namespace
Config::MinerConfig
] is being implemented to submit signed solutions (outside of this pallet), then [MinerConfig::solution_weight
] is used to compare against this value.
Namespace