blockgenerator

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 2 Imported by: 0

README

Block Generator

This package implements a full block generator component, to be used by participants of the blind-bid protocol in the SBA* consensus. It is internally made up of two distinct components, a score generator, and a candidate generator.

Abstract

Block Generator is the first of the two full-node types eligible to participate in the consensus (the other being the Provisioner). To become a Block Generator, a full-node has to submit a Bid Transaction. The Block Generator is eligible to participate in one phase - the block generation where the Block Generators participates in a non-interactive lottery to be able to forge a candidate block.

Blind Bid Algorithm

The block generation makes use of bulletproof-based zero-knowledge cryptography in order to prove the correct computation of a score associated with a block candidate which gets validated and selected by Provisioners during the score selection phase carried out by the selection package.

Procedure

The Blind Bid algorithm is outlined in the following steps

  1. A universal counter N is maintained for all bidding transactions in the lifetime.
  2. Seed S is computed and broadcasted.
  3. Bidder selects secret K.
  4. Bidder sends a bidding transaction with data M = H(K).
  5. For every bidding transaction with d coins and data M an entry X = H(d,M,N) is added to T. Then N is increased.
  6. Potential bidder computes Y =H(S,X), score Q=F(d,Y), and identifier Z =H(S,M).
  7. Bidder selects a bid root RT and broadcasts proof π = Π(Z, RT, Q, S; K, d, N).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockGenerator

type BlockGenerator interface {
	// contains filtered or unexported methods
}

BlockGenerator ...

func Mock

func Mock(e *consensus.Emitter, inert bool) BlockGenerator

Mock the block generator. If inert is true, no block will be generated (this simulates the score not reaching the threshold).

func New

New creates a new BlockGenerator.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL