-
Notifications
You must be signed in to change notification settings - Fork 0
/
attributes.go
35 lines (28 loc) · 945 Bytes
/
attributes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package orchestration
import "github.com/alphabill-org/alphabill-go-base/types"
const (
PayloadTypeAddVAR = "addVar" // add validator assignment record
)
const DefaultSystemID types.SystemID = 0x00000004
type (
AddVarAttributes struct {
_ struct{} `cbor:",toarray"`
Var ValidatorAssignmentRecord
}
ValidatorAssignmentRecord struct {
_ struct{} `cbor:",toarray"`
EpochNumber uint64
EpochSwitchRoundNumber uint64 // root chain round number
ValidatorAssignment ValidatorAssignment
}
ValidatorAssignment struct {
_ struct{} `cbor:",toarray"`
Validators []ValidatorInfo
QuorumSize uint64 // total amount of staked Alpha required to reach consensus
}
ValidatorInfo struct {
_ struct{} `cbor:",toarray"`
ValidatorID []byte // validator public key used to sign validation messages
Stake uint64 // total amount of staked Alpha by the validator
}
)