shard

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package shard TODO: move it to proper package and folder

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasBitSetAt

func HasBitSetAt(bitField []byte, index uint32) bool

HasBitSetAt return true if the bit at index is 1 in bitField

Types

type BlockBody

type BlockBody struct {
}

BlockBody represents the block body

type BlockHeader

type BlockHeader struct {
	// Slot number
	SlotNumber uint64
	// What shard is it on
	ShardID uint64
	// Parent block hash
	ParentHash chainhash.Hash
	// Beacon chain block
	BeaconChainRef chainhash.Hash
	// Depth of the Merkle tree
	DataTreeDepth uint8
	// Merkle root of data
	DataRoot chainhash.Hash
	// State root (placeholder for now)
	StateRoot chainhash.Hash
	// Attestation (including block signature)
	AttesterBitfield []uint8
	//AggregateSig: ['uint256']
	AggregateSig [][]uint8
}

BlockHeader represents a single shard chain block header.

type Blockchain

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

Blockchain represents a chain of shard blocks.

type Database

type Database interface {
	GetBlockForHash(h chainhash.Hash) (*BlockHeader, error)
}

Database is a very basic interface for pluggable databases.

Jump to

Keyboard shortcuts

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