mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
elastic subnets
This commit is contained in:
@@ -3,6 +3,7 @@ package network
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ava-labs/avalanche-network-runner/network/node"
|
||||
"github.com/ava-labs/avalanchego/ids"
|
||||
@@ -14,6 +15,24 @@ var (
|
||||
ErrNodeNotFound = errors.New("node not found in network")
|
||||
)
|
||||
|
||||
type ElasticSubnetSpec struct {
|
||||
SubnetID *string
|
||||
AssetName string
|
||||
AssetSymbol string
|
||||
InitialSupply uint64
|
||||
MaxSupply uint64
|
||||
MinConsumptionRate uint64
|
||||
MaxConsumptionRate uint64
|
||||
MinValidatorStake uint64
|
||||
MaxValidatorStake uint64
|
||||
MinStakeDuration time.Duration
|
||||
MaxStakeDuration time.Duration
|
||||
MinDelegationFee uint32
|
||||
MinDelegatorStake uint64
|
||||
MaxValidatorWeightFactor byte
|
||||
UptimeRequirement uint32
|
||||
}
|
||||
|
||||
type SubnetSpec struct {
|
||||
Participants []string
|
||||
SubnetConfig []byte
|
||||
@@ -77,4 +96,6 @@ type Network interface {
|
||||
CreateBlockchains(context.Context, []BlockchainSpec) ([]ids.ID, error)
|
||||
// Create the given numbers of subnets
|
||||
CreateSubnets(context.Context, []SubnetSpec) ([]ids.ID, error)
|
||||
// Transform subnet into elastic subnet
|
||||
TransformSubnet(context.Context, []ElasticSubnetSpec) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user