State Connector Miners as Validators on Flare

Leveraging data-availability provers of underlying chains for consensus on Flare Network

Flare brings together all other networks into a unified composable system so that they can operate with smart contracts, and without levying any changes on how the underlying networks already work today. Therefore, control over the Flare network is proportionally given to those that successfully prove data-availability proofs from underlying chains in the state connector system, which is the key element of creating Flare's unified composable system.

The state connector mining process is an automated reward and penalty game which drives liveness and competition, and it has the property that anyone can keep the process alive with just their laptop.

Validator Rewards

The sender of a successful dataAvailabilityPeriodHash proof submission in the state connector mining process is not rewarded because they succeeded at submitting this proof - it is a necessary, but not sufficient condition for getting rewarded. They are instead rewarded if their submitted value of chainTipHash ultimately becomes an accepted dataAvailabilityPeriodHash proof submission.

https://gitlab.com/flarenetwork/flare/-/blob/eb661bff6fcda1aa497827eae1f86a90e22fda50/src/stateco/StateConnector.sol#L195

// Node checked dataAvailabilityPeriodHash, and it was valid
// Now determine whether to reward or ban the sender of the suggested chainTipHash
// from 'numConfirmations' dataAvailabilityPeriodIndexes ago
if (chains[chainId].finalisedDataAvailabilityPeriodIndex > chains[chainId].numConfirmations) {
bytes32 prevLocationHash = keccak256(abi.encodePacked(
chainId, chains[chainId].finalisedDataAvailabilityPeriodIndex - chains[chainId].numConfirmations));
if (finalisedDataAvailabilityPeriods[prevLocationHash].revealHash == dataAvailabilityPeriodHash) {
// Reward
uint256 currentRewardPeriod = getRewardPeriod();
dataAvailabilityPeriodsMined[finalisedDataAvailabilityPeriods[prevLocationHash].provenBy][currentRewardPeriod]
+= 1;
totalDataAvailabilityPeriodsMined[currentRewardPeriod] += 1;
emit DataAvailabilityPeriodFinalityProved(chainId, ledger, DataAvailabilityPeriodFinalityType.REWARDED,
finalisedDataAvailabilityPeriods[prevLocationHash].provenBy);
} else {
// Temporarily ban
senderBannedUntil[finalisedDataAvailabilityPeriods[prevLocationHash].provenBy] =
block.timestamp + chains[chainId].numConfirmations * chains[chainId].timeDiffExpected;
emit DataAvailabilityPeriodFinalityProved(chainId, ledger, DataAvailabilityPeriodFinalityType.BANNED,
finalisedDataAvailabilityPeriods[prevLocationHash].provenBy);
}
}

For example, at ledger 110 for a dataAvailabilityPeriodHash value of X and a numConfirmations value of 10: if the suggested value of chainTipHash in the winning proof for ledger 100 was also X, then the sender of the proof at ledger 100 is rewarded.

If the sender of a successful proof suggests a value for chainTipHash that is ultimately not accepted, then that sender is automatically banned from proof-submission competition for a finite period of time. The value of chainTipHash is also submitted via a commit and reveal process so that an initial suggestion of a chainTipHash value can't be immediately copied by competitors observing the Flare Network.

Example validators definition based on accumulated chainTipHash proof wins:

{
"validators": [
{
"nodeID": "NodeID-GQ4292fG2RMRWa7RtphPJTYHeMR5YAQPM",
"origin": "ltc",
"weighting": 25
},
{
"nodeID": "NodeID-GMHrauiUPGikdbT4Z65dEBFpfQWKovLy5",
"origin": "doge",
"weighting": 20
},
{
"nodeID": "NodeID-DhdvGK268cNmDPzvh1Vw7rzSmT1tptSUB",
"origin": "xrp",
"weighting": 19
},
{
"nodeID": "NodeID-hBfmpWJ87GSPHUtxthGd2fHsVdaGmkgq",
"origin": "btc",
"weighting": 14
},
{
"nodeID": "NodeID-LtahNtUH9tb4VCZZipLNqkBCxzjpFTdHs",
"origin": "doge",
"weighting": 11
},
{
"nodeID": "NodeID-34KwvqefLeXYPrzcNjc4yMPRpMfE89ppw",
"origin": "btc",
"weighting": 8
},
{
"nodeID": "NodeID-G9CJC4te7FyH1XyMugsRqVYYZBuTreFvd",
"origin": "xrp",
"weighting": 2
},
{
"nodeID": "NodeID-HhAo3hwTn73UB1LxU131gXrs7HMnMxmdE",
"origin": "ltc",
"weighting": 1
}
]
}

The probability of any particular validator VV in the above list being sampled during consensus is then:

weightingVweighting\frac{\texttt{weighting}_V}{\sum{\texttt{weighting}}}

Flare's validator list can be automatically generated by anyone, without relying on a trusted third party, by running the Flare node software which automatically converts present state connector proof mining wins to consensus sampling probability for the winning miners.