drng

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0, BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Pollen defines the instance ID of the Pollen drng committee.
	Pollen = 1

	// XTeam defines the instance ID of the X-Team drng committee.
	XTeam = 1339

	// Community defines the instance ID of the Community drng committee.
	Community = 7438
)
View Source
const PluginName = "DRNG"

PluginName is the name of the DRNG plugin.

Variables

View Source
var ErrParsingCommitteeMember = errors.New("cannot parse committee member")

ErrParsingCommitteeMember is returned for an invalid committee member

View Source
var Parameters = &ParametersDefinition{}

Parameters contains the configuration parameters of the drng plugin.

Functions

func Instance

func Instance() *drng.DRNG

Instance returns the DRNG instance.

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

Types

type ParametersDefinition added in v0.7.4

type ParametersDefinition struct {
	// Pollen contains the configuration parameters of GoShimmer dRNG committee.
	Pollen struct {
		// InstanceID defines the config flag of the DRNG instanceId.
		InstanceID int `name:"instanceId" default:"1" usage:"instance ID of the GoShimmer drng instance"`

		// Threshold defines the config flag of the DRNG threshold.
		Threshold int `default:"3" usage:"BLS threshold of the GoShimmer drng"`

		// DistributedPubKey defines the config flag of the DRNG distributed Public Key.
		DistributedPubKey string `usage:"distributed public key of the GoShimmer committee (hex encoded)"`

		// CommitteeMembers defines the config flag of the DRNG committee members identities.
		CommitteeMembers []string `usage:"list of committee members of the GoShimmer drng"`
	} `name:"pollen"`

	// XTeam contains the configuration parameters of the X-Team dRNG committee.
	XTeam struct {
		// InstanceID defines the config flag of the DRNG instanceId.
		InstanceID int `name:"instanceId" default:"1339" usage:"instance ID of the x-team drng instance"`

		// Threshold defines the config flag of the DRNG threshold.
		Threshold int `default:"3" usage:"BLS threshold of the x-team drng"`

		// DistributedPubKey defines the config flag of the DRNG distributed Public Key.
		DistributedPubKey string `usage:"distributed public key of the x-team committee (hex encoded)"`

		// CommitteeMembers defines the config flag of the DRNG committee members identities.
		CommitteeMembers []string `usage:"list of committee members of the x-team drng"`
	} `name:"xteam"`

	// Custom contains the configuration parameters of the custom dRNG committee.
	Custom struct {
		// InstanceID defines the config flag of the DRNG instanceId.
		InstanceID int `name:"instanceId" default:"9999" usage:"instance ID of the custom drng instance"`

		// Threshold defines the config flag of the DRNG threshold.
		Threshold int `default:"3" usage:"BLS threshold of the custom drng"`

		// DistributedPubKey defines the config flag of the DRNG distributed Public Key.
		DistributedPubKey string `usage:"distributed public key of the custom committee (hex encoded)"`

		// CommitteeMembers defines the config flag of the DRNG committee members identities.
		CommitteeMembers []string `usage:"list of committee members of the custom drng"`
	} `name:"custom"`
}

ParametersDefinition contains the definition of configuration parameters used by the drng plugin.

Jump to

Keyboard shortcuts

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