v1alpha1

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ethereum v1alpha1 API group +kubebuilder:object:generate=true +groupName=ethereum.applying.cool

Index

Constants

View Source
const (
	DefaultNodeCPURequest = "2"

	DefaultNodeCPULimit = "3"

	DefaultkNodeMemoryRequest = "4Gi"

	DefaultNodeMemoryLimit = "6Gi"

	DefaultNodeStorageRequest = "100Gi"
)

Node Resources

View Source
const (
	DefaultNetworkID = 1337
	DefaultChainID   = 1337

	//QBFT
	DefaultQBFTEpochLength           = 30000
	DefaultQBFTBlockPeriodSeconds    = 5
	DefaultQBFTRequestTimeoutSeconds = 10

	//Istanbul
	DefaultIstanbulCeil2Nby3Block = 0
	DefaultIstanbulEpoch          = 30000
	DefaultIstanbulPolicy         = 0
	DefaultIstanbulTestQBFTBlock  = 0
)

Genesis

View Source
const (
	DefaultP2PPort     = 30303
	DefaultRPCPort     = 8545
	DefaultWSPort      = 8546
	DefaultGraphQLPort = 8547
	DefaultRLPXPort    = 30303
	DefaultMetricsPort = 9545
)

Node Ports

View Source
const GoQuorumHomeDir = "/home/quorum"

GoQuorumHomeDir is goquorum home directory

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ethereum.applying.cool", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Account

type Account struct {
	// Address is account address
	Address EthereumAddress `json:"address"`

	// Balance is account balance in wei
	Balance string `json:"balance,omitempty"`
}

Account is Ethereum account

func (*Account) DeepCopy

func (in *Account) DeepCopy() *Account

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Account.

func (*Account) DeepCopyInto

func (in *Account) DeepCopyInto(out *Account)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Cluster) DeepCopyObject

func (in *Cluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cluster `json:"items"`
}

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterList) DeepCopyObject

func (in *ClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterSpec

type ClusterSpec struct {

	// Image is Ethereum node client image
	Image string `json:"image,omitempty"`

	// used to derive ethereum account.
	Mnemonic string `json:"mnemonic"`

	// Genesis is genesis block configuration
	Genesis *Genesis `json:"genesis"`

	// validator is validators of qbft consensus.
	Validator NodeTemplate `json:"validator,omitempty"`

	// member is static nodes.
	Member NodeTemplate `json:"member,omitempty"`

	// node ports
	Ports `json:"ports,omitempty"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterStatus

type ClusterStatus struct {
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Enode

type Enode string

type EthereumAddress

type EthereumAddress string

EthereumAddress is ethereum address +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]{40}$"

type Genesis

type Genesis struct {
	// Accounts is array of accounts to fund or associate with code and storage
	Accounts []Account `json:"accounts,omitempty"`

	// NetworkID is network id
	NetworkID uint `json:"networkId"`

	// ChainID is the the chain ID used in transaction signature to prevent reply attack
	// more details https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
	ChainID uint `json:"chainId"`

	QBFT QBFT `json:"qbft,omitempty"`
}

Genesis is genesis block sepcficition

func (*Genesis) DeepCopy

func (in *Genesis) DeepCopy() *Genesis

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Genesis.

func (*Genesis) DeepCopyInto

func (in *Genesis) DeepCopyInto(out *Genesis)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Genesis) Default

func (g *Genesis) Default()

type Hash

type Hash string

Hash is KECCAK-256 hash +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]{64}$"

type HexString

type HexString string

HexString is String in hexadecial format +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]+$"

type Node

type Node struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeSpec   `json:"spec,omitempty"`
	Status NodeStatus `json:"status,omitempty"`
}

Node is the Schema for the nodes API

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Node) DeepCopyObject

func (in *Node) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Node) Default

func (r *Node) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Node) DefaultNodePorts

func (r *Node) DefaultNodePorts()

func (*Node) DefaultNodeResources

func (r *Node) DefaultNodeResources()

func (*Node) SetupWebhookWithManager

func (r *Node) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Node) ValidateCreate

func (r *Node) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Node) ValidateDelete

func (r *Node) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Node) ValidateUpdate

func (r *Node) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type NodeList

type NodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Node `json:"items"`
}

NodeList contains a list of Node

func (*NodeList) DeepCopy

func (in *NodeList) DeepCopy() *NodeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.

func (*NodeList) DeepCopyInto

func (in *NodeList) DeepCopyInto(out *NodeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeList) DeepCopyObject

func (in *NodeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeSpec

type NodeSpec struct {

	// Image is Ethereum node client image
	Image string `json:"image,omitempty"`

	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`

	// StaticNodes is a set of ethereum nodes to maintain connection to
	// +listType=set
	StaticNodes []Enode `json:"staticNodes,omitempty"`

	// Genesis is genesis block configuration
	Genesis *Genesis `json:"genesis,omitempty"`

	// NodePrivateKeySecretName is the secret name holding node private key
	NodePrivateKeySecretName string `json:"nodePrivateKeySecretName,omitempty"`

	// Miner is whether node is mining/validating blocks or no
	Miner bool `json:"miner,omitempty"`

	// Coinbase is the account to which mining rewards are paid
	Coinbase EthereumAddress `json:"coinbase,omitempty"`

	// Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
	Verbosity uint `json:"verbosity,omitempty"`

	Ports `json:"ports,omitempty"`
}

NodeSpec defines the desired state of Node

func (*NodeSpec) DeepCopy

func (in *NodeSpec) DeepCopy() *NodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.

func (*NodeSpec) DeepCopyInto

func (in *NodeSpec) DeepCopyInto(out *NodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeStatus

type NodeStatus struct {
}

NodeStatus defines the observed state of Node

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeTemplate

type NodeTemplate struct {
	// number of validator
	Number int `json:"number"`

	// Resources is node compute and storage resources
	shared.Resources `json:"resources"`

	// Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
	Verbosity uint `json:"verbosity,omitempty"`
}

func (*NodeTemplate) DeepCopy

func (in *NodeTemplate) DeepCopy() *NodeTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplate.

func (*NodeTemplate) DeepCopyInto

func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeType

type NodeType uint
const (
	NodeTypeValidator NodeType = 0
	NodeTypeMember    NodeType = 1
)

type Ports

type Ports struct {
	// P2PPort is port used for peer to peer communication
	P2PPort uint `json:"p2pPort,omitempty"`

	// RPCPort is HTTP-RPC server listening port
	RPCPort uint `json:"rpcPort,omitempty"`

	// WSPort is the web socket server listening port
	WSPort uint `json:"wsPort,omitempty"`

	// GraphQLPort is the GraphQL server listening port
	GraphQLPort uint `json:"graphqlPort,omitempty"`

	RLPXPort uint `json:"rlpxPort,omitempty"`

	MetricsPort uint `json:"metricsPort,omitempty"`
}

func (*Ports) DeepCopy

func (in *Ports) DeepCopy() *Ports

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ports.

func (*Ports) DeepCopyInto

func (in *Ports) DeepCopyInto(out *Ports)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QBFT

type QBFT struct {
	// Validators are initial ibft2 validators
	// +kubebuilder:validation:MinItems=1
	Validators []EthereumAddress `json:"validators,omitempty"`

	EpochLength           uint64 `json:"epochlength"`           // Number of blocks that should pass before pending validator votes are reset
	BlockPeriodSeconds    uint64 `json:"blockperiodseconds"`    // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds
	RequestTimeoutSeconds uint64 `json:"requesttimeoutseconds"` // Minimum request timeout for each IBFT or QBFT round in milliseconds
}

https://consensys.net/docs/goquorum//en/latest/configure-and-manage/configure/consensus-protocols/qbft/

func (*QBFT) DeepCopy

func (in *QBFT) DeepCopy() *QBFT

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QBFT.

func (*QBFT) DeepCopyInto

func (in *QBFT) DeepCopyInto(out *QBFT)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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