dag

package
v0.0.0-...-648c852 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

DAG

dag package holds the core DAG-chain production logic. The necessary components to ensure ever-growing DAG of (compact) blocks with availability certification. The DAG doesn't interpret data(batches) anyhow and only ensure they are available locally(through Certifier).

dag/block holds block and block id structure with respective serialization. The block mainly consists of hashes to parent blocks(thus DAG) and batch hashes(thus compact).

dag/quorum contains stake-weighted quorum and actual certificates implementation. Quorum defaults to 2f+(where f is 1/3) fault tolerance. It guarantees every round(height) produces blocks with at least 2f+1 power(by summing stakes of each block producer) and that every block gets at least 2f+1 signatures.

Below u can see the difference between the regular blockchains and DAG-chains in the diagram. The DAG-chain have multiple proposers in per chain height, whereas in regular chains proposers are rotated. In-turn, this provides better censorship resistance, lack of central point of failure and higher data throughput.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertifier

func NewCertifier(pool bapl.BatchPool) rebro.Certifier

func NewHasher

func NewHasher() rebro.Hasher

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

Chain produces everlasting DAG chain of blocks broadcasting them over reliable broadcast.

func NewChain

func NewChain(
	broadcaster rebro.Broadcaster,
	pool bapl.BatchPool,
	includers IncludersFn,
	signerID crypto.PubKey,
) *Chain

func (*Chain) Start

func (c *Chain) Start()

func (*Chain) Stop

func (c *Chain) Stop()

type IncludersFn

type IncludersFn func(round uint64) (*quorum.Includers, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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