github.com/annchain/OG@v0.0.9/consensus/term/term.go (about) 1 package term 2 3 import ( 4 "github.com/annchain/OG/common" 5 "github.com/annchain/OG/common/crypto" 6 "github.com/annchain/OG/consensus/dkg" 7 "github.com/annchain/kyber/v3" 8 "github.com/annchain/kyber/v3/pairing/bn256" 9 ) 10 11 type Senator struct { 12 Id int 13 Address common.Address 14 PublicKey crypto.PublicKey 15 BlsPublicKey dkg.PartPub 16 } 17 18 // Term holds all public info about the term. 19 type Term struct { 20 Id uint32 // term id starts from 0 (genesis) 21 PartsNum int // participants number 22 Threshold int // participants number for threshold signature 23 Senators []Senator // all senators to discuss out a signature 24 AllPartPublicKeys []dkg.PartPub // their little public keys 25 PublicKey kyber.Point // the full public key. Only available after collected all others' dkgs 26 ActivateHeight uint64 // when the term is activated. 27 Suite *bn256.Suite // curve. 28 }