-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Incentive-Alignment: Approval Voting #3463
Comments
We want to avoid keeping too many assignments in memory in case finality lags for some reason. It could blow up to gigabytes relatively quickly. We also only need to draw tickets on Rather than having a separate task for each lottery drawing, it would make more sense to have a simple lottery worker task which does nothing but draw tickets. I'd like some more discussion of requirements in the runtime in order to verify tickets - for example, where we keep the historical mapping of included candidate hashes and candidate indices, as well as where we keep historical BABE VRFs. The disputes module already keeps track of the historical candidates, although not their cores, so we can extract that out to the We don't need a separate gossip system, but we should have something like a runtime API for transforming |
I'd consider this text miss-leading:
We're merely proposing to only reward We've three assignment types,
We should reward all three types but we currently verify We've no such concern with As an aside, if we consider the future on-chain approval scheduler gadget again, then there is a "malicious no-show" concern where Eve no-shows so that random honest validators Alice and Bob begin checking, and then Eve completes her check. As Eve makes Alice and Bob waste resources for work for which they'll never be paid, Eve thus forces Alice and Bob to provision more expensive hardware or bandwidth than Eve requires. We doubt this helps Eve much though. In fact, the future on-chain approval scheduler gadget should not slowly accumulate assignments and approval votes on-chain, but instead make one block producer place all assignments and approval votes on-chain simultaneously, meaning Eve then races with block producers and might occasionally loose. We could tweak block production logic to increase the rate at which Eve loses, although doing so sounds ugly. Just fyi, we've not even implemented |
At a formal level, we view this hash as a random oracle and thus as a pseudo-random function family keyed by the output and run on the input.
I think both 1 and 2 should ideally be MMR proofs of recent block headers and bodies, but maybe some reference into the chain state directly too. We'll want the MMR stuff for doing this or the full gadget on a parachain anyways I think. I'll remark that 5 could sign the whole transaction, which we do for assignments, but this is a small optimization and not required. |
Problem Statement
In the current protocol, validators have no incentive to complete the Approval Voting step and advance parachain block finality. This needn't necessarily present an attack surface since we assume that
2f
among3f+1
validators are honest and do not deviate from the consensus protocol, but it could present a mis-alignment of incentives that causes some validators who run on less performant hardware to fall-behind without any incentives to upgrade their hardware. If multiple validators fall subject to this equilibrium, the entire network could incur significant finality lag.Overview
Therefore, we present a simplified lottery scheme that enables validators to incur a benefit for their approval assignment and subsequent approval vote. One particular aspect of the scheme we present below is that validators will only incur an incentive if they are able to issue their approval vote in the
0-th
tranche. The reason for this is two-fold:0-th
tranche, we ensure that the incentive structure is heavily skewed towards preferring to complete Approval Voting as fast as possible, thereby incentivizing validators to run Approval Voting in the most efficient fashion.0-th
tranche there exists an incentive to collude with other validators to present Approval Votes without the work having ever been computed honestly.Background
PendingMessage::Assignment
includes anIndirectAssignmentCert
, which includes a relay_block hash, validator index andAssignmentCert
.In addition, the
AssignmentCert
includes both aVRFOutput
andVRFProof
.When a validator receives a
PendingMessage::Approval
, this includes a signature on theApprovalVote(CandidateHash)
and theSessionIndex
under their ValidatorKey.Both
Assignments
andApprovals
are gossip'd among all validators in the validator network via theApprovalDistribution
subsystem.Construction
Validators keep track of the
VRFOutput
for allPendingMessage::Assignment
s. WhenPendingMessage::Approval
s are received over-the-wire for approvals in the0-th
tranche, the receiving validator can sign the approving validator'sVRFOutput
with their ownVRFKey
to issue anApprovalTicket
.ApprovalTickets
are valid extrinsics that will issue rewards on-chain for both the Voter and the Ticket issuer.Every time another validator receives an
PendingMessage::Assignment
over the wire (inApprovalDistribution
), theIndirectAssignmentCert
is imported into theApprovalVoting
subsystem via theCheckAndImportAssignmentMessage
. The validator should store theIndirectAssignmentCert
for that assignment, i.e. in aHashMap<(SessionIndex, CandidateHash), IndirectAssignmentCert>
. TheApprovalVoting
subsystem should prune entries for these entries as new blocks are finalized.As subsequent
PendingMessage::Approval
s are received over the wire, they are imported into theApprovalVoting
subsystem, upon validating that an approval was issued for the0-th
tranche, theApprovalVoting
subsystem should spawn a task that request a signature on the associatedApprovalAssignment
'sVRFOutput
under their VRF key. When this VRFProof is received, the task concludes and produces anApprovalTicket
.This
ApprovalTicket
defines a method which translates thisApprovalTicket
into an extrinsic which is subsequently gossip'd amongst all validators.A block producer can collate these extrinsics (
From<ApprovalTicket>
), and subsequently include them in their block.The text was updated successfully, but these errors were encountered: