Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #90 from ava-labs/add-min-delegator-stake-flag
Browse files Browse the repository at this point in the history
Add `--min-delegator-stake` flag
  • Loading branch information
cgcardona authored Dec 30, 2020
2 parents 4674038 + 7f7d563 commit 9f813fb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/startnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func init() {
StartnodeCmd.Flags().IntVar(&flags.SnowQuorumSize, "snow-quorum-size", flags.SnowQuorumSize, "Alpha value to use for required number positive results.")
StartnodeCmd.Flags().IntVar(&flags.SnowVirtuousCommitThreshold, "snow-virtuous-commit-threshold", flags.SnowVirtuousCommitThreshold, "Beta value to use for virtuous transactions.")
StartnodeCmd.Flags().IntVar(&flags.SnowRogueCommitThreshold, "snow-rogue-commit-threshold", flags.SnowRogueCommitThreshold, "Beta value to use for rogue transactions.")
StartnodeCmd.Flags().IntVar(&flags.MinDelegatorStake, "min-delegator-stake", flags.MinDelegatorStake, "The minimum stake, in nAVAX, that can be delegated to a validator of the Primary Network. Defaults to `25000000000` (25 AVAX) on Main Net. Defaults to `5000000` (.005 AVAX) on Test Net.")
StartnodeCmd.Flags().StringVar(&flags.ConsensusShutdownTimeout, "consensus-shutdown-timeout", flags.ConsensusShutdownTimeout, "Timeout before killing an unresponsive chain. Defaults to `5s`")
StartnodeCmd.Flags().StringVar(&flags.ConsensusGossipFrequency, "consensus-gossip-frequency", flags.ConsensusGossipFrequency, "Time between gossiping accepted frontiers. Defaults to `10s`")
StartnodeCmd.Flags().IntVar(&flags.MinDelegationFee, "min-delegation-fee", flags.MinDelegationFee, "The minimum delegation fee that can be charged for delegation on the Primary Network, multiplied by `10,000` . Must be in the range `[0, 1000000]`. Defaults to `20000` (2%) on Main Net.")
Expand Down
1 change: 1 addition & 0 deletions network/startnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ do
--snow-quorum-size=*|\
--snow-virtuous-commit-threshold=*|\
--snow-rogue-commit-threshold=*|\
--min-delegator-stake=*|\
--consensus-shutdown-timeout=*|\
--min-delegation-fee=*|\
--min-validator-stake=*|\
Expand Down
1 change: 1 addition & 0 deletions node/cli_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func FlagsToArgs(flags Flags, basedir string, sepBase bool) ([]string, Metadata)
"--snow-quorum-size=" + strconv.Itoa(flags.SnowQuorumSize),
"--snow-virtuous-commit-threshold=" + strconv.Itoa(flags.SnowVirtuousCommitThreshold),
"--snow-rogue-commit-threshold=" + strconv.Itoa(flags.SnowRogueCommitThreshold),
"--min-delegator-stake=" + strconv.Itoa(flags.MinDelegatorStake),
"--consensus-shutdown-timeout=" + flags.ConsensusShutdownTimeout,
"--consensus-gossip-frequency=" + flags.ConsensusGossipFrequency,
"--min-delegation-fee=" + strconv.Itoa(flags.MinDelegationFee),
Expand Down
3 changes: 3 additions & 0 deletions node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type Flags struct {
SnowQuorumSize int
SnowVirtuousCommitThreshold int
SnowRogueCommitThreshold int
MinDelegatorStake int
ConsensusShutdownTimeout string
ConsensusGossipFrequency string
MinDelegationFee int
Expand Down Expand Up @@ -175,6 +176,7 @@ type FlagsYAML struct {
SnowQuorumSize *int `yaml:"snow-quorum-size,omitempty"`
SnowVirtuousCommitThreshold *int `yaml:"snow-virtuous-commit-threshold,omitempty"`
SnowRogueCommitThreshold *int `yaml:"snow-rogue-commit-threshold,omitempty"`
MinDelegatorStake *int `yaml:"min-delegator-stake,omitempty"`
ConsensusShutdownTimeout *string `yaml:"consensus-shutdown-timeout,omitempty"`
ConsensusGossipFrequency *string `yaml:"consensus-gossip-frequency,omitempty"`
MinDelegationFee *int `yaml:"min-delegation-fee,omitempty"`
Expand Down Expand Up @@ -281,6 +283,7 @@ func DefaultFlags() Flags {
SnowQuorumSize: 2,
SnowVirtuousCommitThreshold: 5,
SnowRogueCommitThreshold: 10,
MinDelegatorStake: 5000000,
ConsensusShutdownTimeout: "5s",
ConsensusGossipFrequency: "10s",
MinDelegationFee: 20000,
Expand Down

0 comments on commit 9f813fb

Please sign in to comment.