Bor module handles span management on Heimdall. Given Bor chain's current block number
n, current span
span.StartBlock <= n < span.EndBlock, new span is proposed on Heimdall by any validator.
MsgProposeSpan sets the validators’ committee for a given
span and stores a new span into Heimdall state. Here is how this transaction chooses producers out of all validators:
- It creates multiple slots based on validators' power. Example: A with power 10 will have 10 slots, B with power 20 with have 20 slots.
- With all slots,
shufflefunction shuffles them using
seedand selects first
bormodule on Heimdall uses ETH 2.0 shuffle algorithm to choose producers out of all validators. Each span
nuses block hash of Ethereum (ETH 1.0) block
seed. Note that slots based selection allows validators to get selected based on their power. The higher power validator will have a higher probability to get selected. Source: https://github.com/maticnetwork/heimdall/blob/develop/bor/selection.go
Here are the span details that Heimdall uses:
The Bor module contains the following parameters:
|SpanDuration||uint64||100 * SprintDuration|
Span propose tx
Query current span
Query span by id
It prints the result in same format as above.
To print all params
|Get latest span||GET||/bor/latest-span|