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 #181 from ava-labs/dev
Browse files Browse the repository at this point in the history
v1.1.9-rc
  • Loading branch information
cgcardona authored Jul 29, 2021
2 parents 2f03f47 + a210fee commit ac3ff96
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
3 changes: 1 addition & 2 deletions cmd/startnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ func init() {

StartnodeCmd.Flags().StringVar(&flags.ConfigFile, "config-file", flags.ConfigFile, "Config file specifies a JSON file to configure a node instead of specifying arguments via the command line. Command line arguments will override any options set in the config file.")

StartnodeCmd.Flags().IntVar(&flags.ConnMeterMaxConns, "conn-meter-max-conns", flags.ConnMeterMaxConns, "Upgrade at most `conn-meter-max-conns` connections from a given IP per `conn-meter-reset-duration`. If `conn-meter-reset-duration` is 0, incoming connections are not rate-limited.")
StartnodeCmd.Flags().StringVar(&flags.ConnMeterResetDuration, "conn-meter-reset-duration", flags.ConnMeterResetDuration, "Upgrade at most `conn-meter-max-conns` connections from a given IP per `conn-meter-reset-duration`. If `conn-meter-reset-duration` is 0, incoming connections are not rate-limited.")
StartnodeCmd.Flags().BoolVar(&flags.NetworkCompressionEnabled, "network-compression-enabled", flags.NetworkCompressionEnabled, "If true, compress Put, PushQuery, PeerList and Multiput messages sent to peers that support compression")

StartnodeCmd.Flags().StringVar(&flags.IPCSChainIDs, "ipcs-chain-ids", flags.IPCSChainIDs, "Comma separated list of chain ids to connect to. There is no default value.")
StartnodeCmd.Flags().StringVar(&flags.IPCSPath, "ipcs-path", flags.IPCSPath, "The directory (Unix) or named pipe prefix (Windows) for IPC sockets. Defaults to /tmp.")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/AlecAivazis/survey/v2 v2.2.9
github.com/ava-labs/avalanchego v1.4.9
github.com/ava-labs/avalanchego v1.4.11
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
github.com/gorilla/mux v1.8.0
github.com/gorilla/rpc v1.2.0
Expand Down
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ github.com/ava-labs/avalanchego v1.4.7 h1:zOOASBb1pa5Wr8XO9XeKBoq/T1p1Rh1sVtDnr/
github.com/ava-labs/avalanchego v1.4.7/go.mod h1:EHvzd2TTrGTZtFjz6ytKE8jZZZTsNU3WufLWPNwCpAE=
github.com/ava-labs/avalanchego v1.4.9 h1:umUiDkLbKnt3yncRvEtVbMP098JLWLubyNqIKPm/IVM=
github.com/ava-labs/avalanchego v1.4.9/go.mod h1:YJeNvyrpE6PuIbLVVt+p0klHNupZYPJMs5pI1hcP4Po=
github.com/ava-labs/avalanchego v1.4.11 h1:bPj+Zj19owlGDfC4FiZ5oQj6v5xhg41qPRd7JYZG8ws=
github.com/ava-labs/avalanchego v1.4.11/go.mod h1:aleAWKvMQ/mblB4dXWWvlbq8787TmwR7+3WizYtogTM=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -121,6 +123,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -248,6 +251,7 @@ github.com/kr/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ=
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/linxGnu/grocksdb v1.6.34/go.mod h1:/+iSQrn7Izt6kFhHBQvcE6FkklsKXa8hc35pFyFDrDw=
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
Expand Down Expand Up @@ -656,6 +660,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
3 changes: 1 addition & 2 deletions network/startnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ do
--api-health-enabled=*|\
--config-file=*|\
--api-info-enabled=*|\
--conn-meter-max-conns=*|\
--conn-meter-reset-duration=*|\
--network-compression-enabled=*|\
--ipcs-chain-ids=*|\
--ipcs-path=*|\
--log-display-level=*|\
Expand Down
3 changes: 1 addition & 2 deletions node/cli_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ func FlagsToArgs(flags Flags, basedir string, sepBase bool) ([]string, Metadata)
"--api-health-enabled=" + strconv.FormatBool(flags.APIHealthEnabled),
"--config-file=" + flags.ConfigFile,
"--api-info-enabled=" + strconv.FormatBool(flags.APIInfoEnabled),
"--conn-meter-max-conns=" + strconv.Itoa(flags.ConnMeterMaxConns),
"--conn-meter-reset-duration=" + flags.ConnMeterResetDuration,
"--network-compression-enabled=" + strconv.FormatBool(flags.NetworkCompressionEnabled),
"--ipcs-chain-ids=" + flags.IPCSChainIDs,
"--ipcs-path=" + flags.IPCSPath,
"--fd-limit=" + strconv.Itoa(flags.FDLimit),
Expand Down
13 changes: 4 additions & 9 deletions node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ type Flags struct {
// Config
ConfigFile string

// Connection
ConnMeterMaxConns int
ConnMeterResetDuration string

// IPCS
IPCSChainIDs string
IPCSPath string
Expand All @@ -125,7 +121,7 @@ type Flags struct {
BenchlistPeerSummaryEnabled bool
BenchlistDuration string

// Network Timeout
// Network
NetworkInitialTimeout string
NetworkMinimumTimeout string
NetworkMaximumTimeout string
Expand All @@ -136,6 +132,7 @@ type Flags struct {
NetworkHealthMinConnPeers int
NetworkTimeoutCoefficient int
NetworkTimeoutHalflife string
NetworkCompressionEnabled bool

// Peer List Gossiping
NetworkPeerListGossipFrequency string
Expand Down Expand Up @@ -239,8 +236,7 @@ type FlagsYAML struct {
APIHealthEnabled *bool `yaml:"api-health-enabled,omitempty"`
ConfigFile *string `yaml:"config-file,omitempty"`
APIInfoEnabled *bool `yaml:"api-info-enabled,omitempty"`
ConnMeterMaxConns *int `yaml:"conn-meter-max-conns,omitempty"`
ConnMeterResetDuration *string `yaml:"conn-meter-reset-duration,omitempty"`
NetworkCompressionEnabled *bool `yaml:"network-compression-enabled,omitempty"`
IPCSChainIDs *string `yaml:"ipcs-chain-ids,omitempty"`
IPCSPath *string `yaml:"ipcs-path,omitempty"`
FDLimit *int `yaml:"fd-limit,omitempty"`
Expand Down Expand Up @@ -364,8 +360,7 @@ func DefaultFlags() Flags {
ConfigFile: "",
WhitelistedSubnets: "",
APIInfoEnabled: true,
ConnMeterMaxConns: 5,
ConnMeterResetDuration: "",
NetworkCompressionEnabled: true,
IPCSChainIDs: "",
IPCSPath: "/tmp",
FDLimit: 32768,
Expand Down

0 comments on commit ac3ff96

Please sign in to comment.