cluster

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeENR

func DecodeENR(enrStr string) (enr.Record, error)

func EncodeENR

func EncodeENR(record enr.Record) (string, error)

func PeerInfoFromENR added in v0.1.1

func PeerInfoFromENR(record enr.Record) (peer.AddrInfo, error)

PeerInfoFromENR derives the libp2p peer ID from the secp256k1 public key encoded in the ENR.

Types

type Manifest

type Manifest struct {
	TSS     crypto.TBLSScheme     `json:"tss"`     // Threshold signature scheme params
	Members []crypto.BLSPubkeyHex `json:"members"` // DV consensus BLS pubkeys
	ENRs    []string              `json:"enrs"`    // Charon peer ENRs
}

Manifest captures the public cryptographic and networking info required to connect to a DV cluster.

func LoadManifest

func LoadManifest(file string) (Manifest, error)

LoadManifest reads the manifest from the given file path.

func NewForT added in v0.1.1

func NewForT(t *testing.T, m, n int) (Manifest, []*ecdsa.PrivateKey, []kyber.Scalar)

NewForT returns a new random cluster manifest with threshold m and size n. It also returns the peer p2p keys and BLS keyshards. Note that the threshold signatures are stubs at this point.

func (*Manifest) ParsedENRs

func (m *Manifest) ParsedENRs() ([]enr.Record, error)

ParsedENRs returns the decoded list of ENRs in a manifest.

func (*Manifest) PeerIDs

func (m *Manifest) PeerIDs() ([]peer.ID, error)

PeerIDs maps ENRs to libp2p peer IDs.

TODO This can be computed at deserialization-time.

func (*Manifest) Pubkey

func (m *Manifest) Pubkey() kyber.Point

Pubkey returns the BLS public key of the distributed validator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL