View & Magic Block

Magic Block

Magic Block is an entity that contains meta information and configuration of the blockchain. It's changed during the view change process where it defines the new Active Set (set of miners/sharders contributing to the generation of the blocks in the blockchain) and the new hyper-parameter of the view change process (T, K, N).

type MagicBlock struct {
	Hash 		       string		   `json:"hash"`
	PreviousMagicBlockHash string              `json:"previous_hash"`
	MagicBlockNumber       int64               `json:"magic_block_number"`
	StartingRound          int64               `json:"starting_round"`
	Miners                 *node.Pool          `json:"miners"`
	Sharders               *node.Pool          `json:"sharders"`
	ShareOrSigns           *GroupSharesOrSigns `json:"share_or_signs"`
	Mpks                   *Mpks               `json:"mpks"`
	T                      int                 `json:"t"`
	K                      int                 `json:"k"`
	N                      int                 `json:"n"`
}

FieldDescription

Hash

SHA256 Hash of the magic block fields concatenated with each other, in Hexadecimal format.

PreviousMagicBlockHash

The hash of the magic block previous to this magic block.

MagicBlockNumber

The order of this magic block.

StartingRound

Round where this magic block started to be used.

Miners

The set of the miners used in generating the blocks.

Sharders

The set of the sharders used in generating the blocks.

ShareOrSigns

Shares and signs are pieces of information used to build the active set during the phases of the view change process.

Mpks

Set of Miner Public Keys.

T

Threshold of signatures to verify a signature.

K

The threshold of signatures needed for the view change to be successful.

N

The maximum number of miners, n.

Last updated