beacon: move beacon-chain to geth-sharding repo (#250)

Former-commit-id: 689de6935d724226eb9125d597831d7b274d79c1 [formerly 4e0c0d671c4e6284cd33300231cc0f7aba99d314]
Former-commit-id: c3079b352bc938c12708b81cdc0130909456ea27
This commit is contained in:
Nishant Das
2018-07-12 06:29:31 +08:00
committed by Raul Jordan
parent f5e5287082
commit 620564cd61
7 changed files with 156 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package types
import "github.com/ethereum/go-ethereum/common"
// Header contains the block header fields in beacon chain.
type Header struct {
ParentHash common.Hash // ParentHash is the hash of the parent beacon block.
SkipCount uint64 // SkipCount is the number of skips, this is used for the full PoS mechanism.
RandaoReveal common.Hash // RandaoReveal is used for Randao commitment reveal.
AttestationBitmask []byte // AttestationBitmask is the bit field of who from the attestation committee participated.
AttestationAggregateSig []uint // AttestationAggregateSig is validator's aggregate sig.
ShardAggregateVotes []AggregateVote // ShardAggregateVotes is shard aggregate votes.
MainChainRef common.Hash // MainChainRef is the reference to main chain block.
StateHash []byte // StateHash is the concatenation of crystallized and active state.
Sig []uint // Sig is the signature of the proposer.
}
// AggregateVote contains the fields of aggregate vote in individual shard.
type AggregateVote struct {
ShardID uint16 // Shard ID of the voted shard.
ShardBlockHash common.Hash // ShardBlockHash is the shard block hash of the voted shard.
SignerBitmask []byte // SignerBitmask is the bit mask of every validator that signed.
AggregateSig []uint // AggregateSig is the aggregated signatures of individual shard.
}