github.com/0chain/gosdk@v1.17.11/core/block/magic_block_entity.go (about) 1 package block 2 3 import "time" 4 5 type Node struct { 6 ID string `yaml:"id" json:"id"` 7 Version string `yaml:"version" json:"version"` 8 CreationDate int64 `json:"creation_date"` 9 PublicKey string `yaml:"public_key" json:"public_key"` 10 PrivateKey string `yaml:"private_key" json:"-"` 11 N2NHost string `yaml:"n2n_ip" json:"n2n_host"` 12 Host string `yaml:"public_ip" json:"host"` 13 Port int `yaml:"port" json:"port"` 14 Path string `yaml:"path" json:"path"` 15 Type int `json:"type"` 16 Description string `yaml:"description" json:"description"` 17 SetIndex int `yaml:"set_index" json:"set_index"` 18 Status int `json:"status"` 19 Info Info `json:"info"` 20 } 21 22 type Info struct { 23 BuildTag string `json:"build_tag"` 24 StateMissingNodes int64 `json:"state_missing_nodes"` 25 MinersMedianNetworkTime time.Duration `json:"miners_median_network_time"` 26 AvgBlockTxns int `json:"avg_block_txns"` 27 } 28 29 type NodePool struct { 30 Type int `json:"type"` 31 Nodes map[string]Node `json:"nodes"` 32 } 33 34 type GroupSharesOrSigns struct { 35 Shares map[string]*ShareOrSigns `json:"shares"` 36 } 37 38 type ShareOrSigns struct { 39 ID string `json:"id"` 40 ShareOrSigns map[string]*DKGKeyShare `json:"share_or_sign"` 41 } 42 43 type DKGKeyShare struct { 44 ID string `json:"id"` 45 Message string `json:"message"` 46 Share string `json:"share"` 47 Sign string `json:"sign"` 48 } 49 50 type Mpks struct { 51 Mpks map[string]*MPK 52 } 53 54 type MPK struct { 55 ID string 56 Mpk []string 57 } 58 59 type MagicBlock struct { 60 Hash string `json:"hash"` 61 PreviousMagicBlockHash string `json:"previous_hash"` 62 MagicBlockNumber int64 `json:"magic_block_number"` 63 StartingRound int64 `json:"starting_round"` 64 Miners *NodePool `json:"miners"` //this is the pool of miners participating in the blockchain 65 Sharders *NodePool `json:"sharders"` //this is the pool of sharders participaing in the blockchain 66 ShareOrSigns *GroupSharesOrSigns `json:"share_or_signs"` 67 Mpks *Mpks `json:"mpks"` 68 T int `json:"t"` 69 K int `json:"k"` 70 N int `json:"n"` 71 }