Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Incentive-Alignment: Approval Voting #3463

@Lldenaurois

Description

@Lldenaurois

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 among 3f+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:

  1. By issuing incentives only for Approval Votes in the 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.
  2. The scheme we present does not apply to later tranches because in any tranche after the 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 an IndirectAssignmentCert, which includes a relay_block hash, validator index and AssignmentCert.

In addition, the AssignmentCert includes both a VRFOutput and VRFProof.

When a validator receives a PendingMessage::Approval, this includes a signature on the ApprovalVote(CandidateHash) and the SessionIndex under their ValidatorKey.

Both Assignments and Approvals are gossip'd among all validators in the validator network via the ApprovalDistribution subsystem.

Construction

Validators keep track of the VRFOutput for all PendingMessage::Assignments. When PendingMessage::Approvals are received over-the-wire for approvals in the 0-th tranche, the receiving validator can sign the approving validator's VRFOutput with their own VRFKey to issue an ApprovalTicket. 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 (in ApprovalDistribution), the IndirectAssignmentCert is imported into the ApprovalVoting subsystem via the CheckAndImportAssignmentMessage. The validator should store the IndirectAssignmentCert for that assignment, i.e. in a HashMap<(SessionIndex, CandidateHash), IndirectAssignmentCert>. The ApprovalVoting subsystem should prune entries for these entries as new blocks are finalized.

As subsequent PendingMessage::Approvals are received over the wire, they are imported into the ApprovalVoting subsystem, upon validating that an approval was issued for the 0-th tranche, the ApprovalVoting subsystem should spawn a task that request a signature on the associated ApprovalAssignment's VRFOutput under their VRF key. When this VRFProof is received, the task concludes and produces an ApprovalTicket.

This ApprovalTicket defines a method which translates this ApprovalTicket 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.

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions