shard

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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