genesis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: AGPL-3.0, ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGenesisPartitionRecordIsNil = errors.New("genesis partition record is nil")
	ErrNodesAreMissing             = errors.New("nodes are missing")
)
View Source
var (
	ErrPartitionNodeIsNil           = errors.New("partition node is nil")
	ErrNodeIdentifierIsEmpty        = errors.New("node identifier is empty")
	ErrSigningPublicKeyIsInvalid    = errors.New("signing public key is invalid")
	ErrEncryptionPublicKeyIsInvalid = errors.New("encryption public key is invalid")
)
View Source
var (
	ErrRootGenesisIsNil   = errors.New("root genesis is nil")
	ErrVerifierIsNil      = errors.New("verifier is nil")
	ErrPartitionsNotFound = errors.New("partitions not found")
)
View Source
var (
	ErrSystemDescriptionIsNil = errors.New("system description record is nil")
	ErrT2TimeoutIsNil         = errors.New("t2 timeout is zero")
)
View Source
var ErrKeyIsNil = errors.New("key is nil")
View Source
var ErrKeysAreMissing = errors.New("partition keys are missing")
View Source
var ErrPartitionGenesisIsNil = errors.New("partition genesis is nil")
View Source
var ErrPartitionRecordIsNil = errors.New("partition record is nil")
View Source
var ErrRootChainEncryptionKeyMissing = errors.New("root encryption public key is missing")
View Source
var ErrValidatorsMissing = errors.New("validators are missing")
View Source
var File_genesis_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type GenesisPartitionRecord

type GenesisPartitionRecord struct {
	Nodes                   []*PartitionNode                 `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Certificate             *certificates.UnicityCertificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"`
	SystemDescriptionRecord *SystemDescriptionRecord         `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GenesisPartitionRecord) Descriptor deprecated

func (*GenesisPartitionRecord) Descriptor() ([]byte, []int)

Deprecated: Use GenesisPartitionRecord.ProtoReflect.Descriptor instead.

func (*GenesisPartitionRecord) GetCertificate

func (*GenesisPartitionRecord) GetNodes

func (x *GenesisPartitionRecord) GetNodes() []*PartitionNode

func (*GenesisPartitionRecord) GetSystemDescriptionRecord

func (x *GenesisPartitionRecord) GetSystemDescriptionRecord() *SystemDescriptionRecord

func (*GenesisPartitionRecord) GetSystemIdentifierString

func (x *GenesisPartitionRecord) GetSystemIdentifierString() string

func (*GenesisPartitionRecord) IsValid

func (x *GenesisPartitionRecord) IsValid(verifier crypto.Verifier, hashAlgorithm gocrypto.Hash) error

func (*GenesisPartitionRecord) ProtoMessage

func (*GenesisPartitionRecord) ProtoMessage()

func (*GenesisPartitionRecord) ProtoReflect

func (x *GenesisPartitionRecord) ProtoReflect() protoreflect.Message

func (*GenesisPartitionRecord) Reset

func (x *GenesisPartitionRecord) Reset()

func (*GenesisPartitionRecord) String

func (x *GenesisPartitionRecord) String() string

type MoneyPartitionParams

type MoneyPartitionParams struct {
	InitialBillValue   uint64 `protobuf:"varint,1,opt,name=initial_bill_value,json=initialBillValue,proto3" json:"initial_bill_value,omitempty"`
	DcMoneySupplyValue uint64 `protobuf:"varint,2,opt,name=dc_money_supply_value,json=dcMoneySupplyValue,proto3" json:"dc_money_supply_value,omitempty"`
	// contains filtered or unexported fields
}

func (*MoneyPartitionParams) Descriptor deprecated

func (*MoneyPartitionParams) Descriptor() ([]byte, []int)

Deprecated: Use MoneyPartitionParams.ProtoReflect.Descriptor instead.

func (*MoneyPartitionParams) GetDcMoneySupplyValue

func (x *MoneyPartitionParams) GetDcMoneySupplyValue() uint64

func (*MoneyPartitionParams) GetInitialBillValue

func (x *MoneyPartitionParams) GetInitialBillValue() uint64

func (*MoneyPartitionParams) ProtoMessage

func (*MoneyPartitionParams) ProtoMessage()

func (*MoneyPartitionParams) ProtoReflect

func (x *MoneyPartitionParams) ProtoReflect() protoreflect.Message

func (*MoneyPartitionParams) Reset

func (x *MoneyPartitionParams) Reset()

func (*MoneyPartitionParams) String

func (x *MoneyPartitionParams) String() string

type PartitionGenesis

type PartitionGenesis struct {
	SystemDescriptionRecord *SystemDescriptionRecord         `` /* 132-byte string literal not displayed */
	Certificate             *certificates.UnicityCertificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"`
	TrustBase               []byte                           `protobuf:"bytes,3,opt,name=trust_base,json=trustBase,proto3" json:"trust_base,omitempty"`
	EncryptionKey           []byte                           `protobuf:"bytes,4,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"`
	Keys                    []*PublicKeyInfo                 `protobuf:"bytes,5,rep,name=keys,proto3" json:"keys,omitempty"`
	Params                  *anypb.Any                       `protobuf:"bytes,6,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*PartitionGenesis) Descriptor deprecated

func (*PartitionGenesis) Descriptor() ([]byte, []int)

Deprecated: Use PartitionGenesis.ProtoReflect.Descriptor instead.

func (*PartitionGenesis) GetCertificate

func (x *PartitionGenesis) GetCertificate() *certificates.UnicityCertificate

func (*PartitionGenesis) GetEncryptionKey

func (x *PartitionGenesis) GetEncryptionKey() []byte

func (*PartitionGenesis) GetKeys

func (x *PartitionGenesis) GetKeys() []*PublicKeyInfo

func (*PartitionGenesis) GetParams

func (x *PartitionGenesis) GetParams() *anypb.Any

func (*PartitionGenesis) GetSystemDescriptionRecord

func (x *PartitionGenesis) GetSystemDescriptionRecord() *SystemDescriptionRecord

func (*PartitionGenesis) GetTrustBase

func (x *PartitionGenesis) GetTrustBase() []byte

func (*PartitionGenesis) IsValid

func (x *PartitionGenesis) IsValid(verifier crypto.Verifier, hashAlgorithm gocrypto.Hash) error

func (*PartitionGenesis) ProtoMessage

func (*PartitionGenesis) ProtoMessage()

func (*PartitionGenesis) ProtoReflect

func (x *PartitionGenesis) ProtoReflect() protoreflect.Message

func (*PartitionGenesis) Reset

func (x *PartitionGenesis) Reset()

func (*PartitionGenesis) String

func (x *PartitionGenesis) String() string

type PartitionNode

type PartitionNode struct {
	NodeIdentifier            string                                   `protobuf:"bytes,1,opt,name=node_identifier,json=nodeIdentifier,proto3" json:"node_identifier,omitempty"`
	SigningPublicKey          []byte                                   `protobuf:"bytes,2,opt,name=signing_public_key,json=signingPublicKey,proto3" json:"signing_public_key,omitempty"`
	EncryptionPublicKey       []byte                                   `protobuf:"bytes,3,opt,name=encryption_public_key,json=encryptionPublicKey,proto3" json:"encryption_public_key,omitempty"`
	BlockCertificationRequest *certification.BlockCertificationRequest `` /* 138-byte string literal not displayed */
	T2Timeout                 uint32                                   `protobuf:"varint,5,opt,name=t2timeout,proto3" json:"t2timeout,omitempty"`
	Params                    *anypb.Any                               `protobuf:"bytes,6,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*PartitionNode) Descriptor deprecated

func (*PartitionNode) Descriptor() ([]byte, []int)

Deprecated: Use PartitionNode.ProtoReflect.Descriptor instead.

func (*PartitionNode) GetBlockCertificationRequest

func (x *PartitionNode) GetBlockCertificationRequest() *certification.BlockCertificationRequest

func (*PartitionNode) GetEncryptionPublicKey

func (x *PartitionNode) GetEncryptionPublicKey() []byte

func (*PartitionNode) GetNodeIdentifier

func (x *PartitionNode) GetNodeIdentifier() string

func (*PartitionNode) GetParams

func (x *PartitionNode) GetParams() *anypb.Any

func (*PartitionNode) GetSigningPublicKey

func (x *PartitionNode) GetSigningPublicKey() []byte

func (*PartitionNode) GetT2Timeout

func (x *PartitionNode) GetT2Timeout() uint32

func (*PartitionNode) IsValid

func (x *PartitionNode) IsValid() error

func (*PartitionNode) ProtoMessage

func (*PartitionNode) ProtoMessage()

func (*PartitionNode) ProtoReflect

func (x *PartitionNode) ProtoReflect() protoreflect.Message

func (*PartitionNode) Reset

func (x *PartitionNode) Reset()

func (*PartitionNode) String

func (x *PartitionNode) String() string

type PartitionRecord

type PartitionRecord struct {
	SystemDescriptionRecord *SystemDescriptionRecord `` /* 132-byte string literal not displayed */
	Validators              []*PartitionNode         `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"`
	// contains filtered or unexported fields
}

func (*PartitionRecord) Descriptor deprecated

func (*PartitionRecord) Descriptor() ([]byte, []int)

Deprecated: Use PartitionRecord.ProtoReflect.Descriptor instead.

func (*PartitionRecord) GetPartitionNode

func (x *PartitionRecord) GetPartitionNode(id string) *PartitionNode

func (*PartitionRecord) GetSystemDescriptionRecord

func (x *PartitionRecord) GetSystemDescriptionRecord() *SystemDescriptionRecord

func (*PartitionRecord) GetSystemIdentifier

func (x *PartitionRecord) GetSystemIdentifier() []byte

func (*PartitionRecord) GetSystemIdentifierString

func (x *PartitionRecord) GetSystemIdentifierString() string

func (*PartitionRecord) GetValidators

func (x *PartitionRecord) GetValidators() []*PartitionNode

func (*PartitionRecord) IsValid

func (x *PartitionRecord) IsValid() error

func (*PartitionRecord) ProtoMessage

func (*PartitionRecord) ProtoMessage()

func (*PartitionRecord) ProtoReflect

func (x *PartitionRecord) ProtoReflect() protoreflect.Message

func (*PartitionRecord) Reset

func (x *PartitionRecord) Reset()

func (*PartitionRecord) String

func (x *PartitionRecord) String() string

type PublicKeyInfo

type PublicKeyInfo struct {
	NodeIdentifier      string `protobuf:"bytes,1,opt,name=node_identifier,json=nodeIdentifier,proto3" json:"node_identifier,omitempty"`
	SigningPublicKey    []byte `protobuf:"bytes,2,opt,name=signing_public_key,json=signingPublicKey,proto3" json:"signing_public_key,omitempty"`
	EncryptionPublicKey []byte `protobuf:"bytes,3,opt,name=encryption_public_key,json=encryptionPublicKey,proto3" json:"encryption_public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKeyInfo) Descriptor deprecated

func (*PublicKeyInfo) Descriptor() ([]byte, []int)

Deprecated: Use PublicKeyInfo.ProtoReflect.Descriptor instead.

func (*PublicKeyInfo) GetEncryptionPublicKey

func (x *PublicKeyInfo) GetEncryptionPublicKey() []byte

func (*PublicKeyInfo) GetNodeIdentifier

func (x *PublicKeyInfo) GetNodeIdentifier() string

func (*PublicKeyInfo) GetSigningPublicKey

func (x *PublicKeyInfo) GetSigningPublicKey() []byte

func (*PublicKeyInfo) ProtoMessage

func (*PublicKeyInfo) ProtoMessage()

func (*PublicKeyInfo) ProtoReflect

func (x *PublicKeyInfo) ProtoReflect() protoreflect.Message

func (*PublicKeyInfo) Reset

func (x *PublicKeyInfo) Reset()

func (*PublicKeyInfo) String

func (x *PublicKeyInfo) String() string

type RootGenesis

type RootGenesis struct {
	Partitions []*GenesisPartitionRecord `protobuf:"bytes,1,rep,name=partitions,proto3" json:"partitions,omitempty"`
	// root chain public key
	TrustBase     []byte `protobuf:"bytes,2,opt,name=trust_base,json=trustBase,proto3" json:"trust_base,omitempty"`
	HashAlgorithm uint32 `protobuf:"varint,3,opt,name=hash_algorithm,json=hashAlgorithm,proto3" json:"hash_algorithm,omitempty"`
	// contains filtered or unexported fields
}

func (*RootGenesis) Descriptor deprecated

func (*RootGenesis) Descriptor() ([]byte, []int)

Deprecated: Use RootGenesis.ProtoReflect.Descriptor instead.

func (*RootGenesis) GetHashAlgorithm

func (x *RootGenesis) GetHashAlgorithm() uint32

func (*RootGenesis) GetPartitionRecords

func (x *RootGenesis) GetPartitionRecords() []*PartitionRecord

func (*RootGenesis) GetPartitions

func (x *RootGenesis) GetPartitions() []*GenesisPartitionRecord

func (*RootGenesis) GetRoundHash

func (x *RootGenesis) GetRoundHash() []byte

func (*RootGenesis) GetRoundNumber

func (x *RootGenesis) GetRoundNumber() uint64

func (*RootGenesis) GetTrustBase

func (x *RootGenesis) GetTrustBase() []byte

func (*RootGenesis) IsValid

func (x *RootGenesis) IsValid(verifier crypto.Verifier) error

func (*RootGenesis) ProtoMessage

func (*RootGenesis) ProtoMessage()

func (*RootGenesis) ProtoReflect

func (x *RootGenesis) ProtoReflect() protoreflect.Message

func (*RootGenesis) Reset

func (x *RootGenesis) Reset()

func (*RootGenesis) String

func (x *RootGenesis) String() string

type SystemDescriptionRecord

type SystemDescriptionRecord struct {
	SystemIdentifier []byte `protobuf:"bytes,1,opt,name=system_identifier,json=systemIdentifier,proto3" json:"system_identifier,omitempty"`
	T2Timeout        uint32 `protobuf:"varint,2,opt,name=t2timeout,proto3" json:"t2timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*SystemDescriptionRecord) AddToHasher

func (x *SystemDescriptionRecord) AddToHasher(hasher hash.Hash)

func (*SystemDescriptionRecord) Descriptor deprecated

func (*SystemDescriptionRecord) Descriptor() ([]byte, []int)

Deprecated: Use SystemDescriptionRecord.ProtoReflect.Descriptor instead.

func (*SystemDescriptionRecord) GetSystemIdentifier

func (x *SystemDescriptionRecord) GetSystemIdentifier() []byte

func (*SystemDescriptionRecord) GetSystemIdentifierString

func (x *SystemDescriptionRecord) GetSystemIdentifierString() string

func (*SystemDescriptionRecord) GetT2Timeout

func (x *SystemDescriptionRecord) GetT2Timeout() uint32

func (*SystemDescriptionRecord) Hash

func (x *SystemDescriptionRecord) Hash(hashAlgorithm gocrypto.Hash) []byte

func (*SystemDescriptionRecord) IsValid

func (x *SystemDescriptionRecord) IsValid() error

func (*SystemDescriptionRecord) ProtoMessage

func (*SystemDescriptionRecord) ProtoMessage()

func (*SystemDescriptionRecord) ProtoReflect

func (x *SystemDescriptionRecord) ProtoReflect() protoreflect.Message

func (*SystemDescriptionRecord) Reset

func (x *SystemDescriptionRecord) Reset()

func (*SystemDescriptionRecord) String

func (x *SystemDescriptionRecord) String() string

Jump to

Keyboard shortcuts

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