Documentation
¶
Index ¶
- type Chain
- type Config
- type EVMChain
- func (c *EVMChain) Alias() string
- func (c *EVMChain) Height() uint64
- func (c *EVMChain) ID() ids.ID
- func (c *EVMChain) Name() string
- func (c *EVMChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (c *EVMChain) Start(ctx context.Context) error
- func (c *EVMChain) Status() string
- func (c *EVMChain) Stop() error
- type Host
- type Identity
- type PlatformChain
- func (p *PlatformChain) Alias() string
- func (p *PlatformChain) Height() uint64
- func (p *PlatformChain) ID() ids.ID
- func (p *PlatformChain) Name() string
- func (p *PlatformChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (p *PlatformChain) Start(ctx context.Context) error
- func (p *PlatformChain) Status() string
- func (p *PlatformChain) Stop() error
- type QuantumChain
- func (q *QuantumChain) Alias() string
- func (q *QuantumChain) Height() uint64
- func (q *QuantumChain) ID() ids.ID
- func (q *QuantumChain) Name() string
- func (q *QuantumChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (q *QuantumChain) Start(ctx context.Context) error
- func (q *QuantumChain) Status() string
- func (q *QuantumChain) Stop() error
- type XChain
- func (x *XChain) Alias() string
- func (x *XChain) Height() uint64
- func (x *XChain) ID() ids.ID
- func (x *XChain) Name() string
- func (x *XChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (x *XChain) Start(ctx context.Context) error
- func (x *XChain) Status() string
- func (x *XChain) Stop() error
- type ZKChain
- func (z *ZKChain) Alias() string
- func (z *ZKChain) Height() uint64
- func (z *ZKChain) ID() ids.ID
- func (z *ZKChain) Name() string
- func (z *ZKChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (z *ZKChain) Start(ctx context.Context) error
- func (z *ZKChain) Status() string
- func (z *ZKChain) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶ added in v1.37.0
type Chain interface {
ID() ids.ID
Alias() string
Name() string
Status() string
Height() uint64
ServeHTTP(w http.ResponseWriter, r *http.Request)
Start(ctx context.Context) error
Stop() error
}
Chain defines the common interface for all hosted VMs in the node.
type Config ¶ added in v1.37.0
type Config struct {
DataDir string
RPCAddr string
StakeAddr string
NetworkName string
ArchiveRPC string
LightMode bool
ProduceDelay time.Duration
GenesisFile string
}
Config configures the Go node host daemon.
func DefaultConfig ¶ added in v1.37.0
func DefaultConfig() Config
DefaultConfig provides default settings for localnet.
type EVMChain ¶ added in v1.37.0
type EVMChain struct {
// contains filtered or unexported fields
}
func NewEVMChain ¶ added in v1.37.0
type Host ¶ added in v1.37.0
type Host struct {
// contains filtered or unexported fields
}
Host is the unified daemon hosting all 5 chains (P, X, C, Q, Z).
type Identity ¶
type Identity struct {
// TLS is the staking certificate and its private key, presented on every
// dial and every accept.
TLS tls.Certificate
// Cert is the parsed leaf, kept because the node id is derived from its
// exact DER and re-parsing per use would be a second chance to disagree.
Cert *x509.Certificate
// NodeID is RIPEMD160(SHA256(cert DER)) — the derivation in luxfi/ids, not a
// local copy of it.
NodeID ids.NodeID
// Signer holds the BLS staking key. Nil when the node has no signing key,
// which makes it a follower: it reads the network and never votes.
Signer *localsigner.LocalSigner
}
Identity is who this node is on the network: one staking certificate, which names it, and one BLS key, which is how it votes.
The two are not interchangeable and neither substitutes for the other. The certificate is what a peer authenticates the TLS session against and what the node id is derived from; the BLS key is what a validator set holds and what a finality certificate is assembled out of. A node whose certificate is known and whose BLS key is not is a peer that cannot vote, which is a real and intended state — so they are loaded together and kept apart.
func LoadIdentity ¶
LoadIdentity reads a staking directory.
The certificate and its key are required — without them the node has no name and cannot open a session. The BLS key is optional for the reason above.
func (*Identity) PublicKey ¶
PublicKey returns the BLS public key this node votes under, or nil when it holds no signing key.
type PlatformChain ¶ added in v1.37.0
type PlatformChain struct {
// contains filtered or unexported fields
}
func NewPlatformChain ¶ added in v1.37.0
func NewPlatformChain(nodeID ids.NodeID) *PlatformChain
func (*PlatformChain) Alias ¶ added in v1.37.0
func (p *PlatformChain) Alias() string
func (*PlatformChain) Height ¶ added in v1.37.0
func (p *PlatformChain) Height() uint64
func (*PlatformChain) ID ¶ added in v1.37.0
func (p *PlatformChain) ID() ids.ID
func (*PlatformChain) Name ¶ added in v1.37.0
func (p *PlatformChain) Name() string
func (*PlatformChain) ServeHTTP ¶ added in v1.37.0
func (p *PlatformChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*PlatformChain) Start ¶ added in v1.37.0
func (p *PlatformChain) Start(ctx context.Context) error
func (*PlatformChain) Status ¶ added in v1.37.0
func (p *PlatformChain) Status() string
func (*PlatformChain) Stop ¶ added in v1.37.0
func (p *PlatformChain) Stop() error
type QuantumChain ¶ added in v1.37.0
type QuantumChain struct {
// contains filtered or unexported fields
}
func NewQuantumChain ¶ added in v1.37.0
func NewQuantumChain() *QuantumChain
func (*QuantumChain) Alias ¶ added in v1.37.0
func (q *QuantumChain) Alias() string
func (*QuantumChain) Height ¶ added in v1.37.0
func (q *QuantumChain) Height() uint64
func (*QuantumChain) ID ¶ added in v1.37.0
func (q *QuantumChain) ID() ids.ID
func (*QuantumChain) Name ¶ added in v1.37.0
func (q *QuantumChain) Name() string
func (*QuantumChain) ServeHTTP ¶ added in v1.37.0
func (q *QuantumChain) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*QuantumChain) Start ¶ added in v1.37.0
func (q *QuantumChain) Start(ctx context.Context) error
func (*QuantumChain) Status ¶ added in v1.37.0
func (q *QuantumChain) Status() string
func (*QuantumChain) Stop ¶ added in v1.37.0
func (q *QuantumChain) Stop() error
type XChain ¶ added in v1.37.0
type XChain struct {
// contains filtered or unexported fields
}