Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
27fee52
cleaned up snowstorm error handling
StephenButtolph Aug 23, 2020
4f260ca
started commented directed.go
StephenButtolph Aug 24, 2020
8336156
Merge branch 'dev' into snowstorm-cleanup
StephenButtolph Aug 24, 2020
33ea747
cleaning up snowstorm issue comments
StephenButtolph Aug 24, 2020
4657d06
changed default subnet to primary network
Aug 24, 2020
30d8b86
PrimaryValidator and DefaultValidator to just Validator
Aug 25, 2020
7d5f98c
renamed files, fixed netwok
Aug 25, 2020
771df57
wip abstracting out snowball from snowstorm
StephenButtolph Aug 25, 2020
2d8fafb
bump coreth version
StephenButtolph Aug 25, 2020
fb28301
v0.6.5 version bump
StephenButtolph Aug 25, 2020
9bcfac7
Merge pull request #326 from StephenButtolph/gas-fix
StephenButtolph Aug 25, 2020
36cfb09
continuing snowstorm cleanup
StephenButtolph Aug 25, 2020
f9abcb7
Fixed verification race condition with the AVM
StephenButtolph Aug 25, 2020
ab782ba
add memo field to X-Chain send API
Aug 25, 2020
904bc60
fixed typo
StephenButtolph Aug 25, 2020
0a1f8d2
Merge branch 'dev' into rename-default-subnet
StephenButtolph Aug 26, 2020
4a5b308
Merge pull request #323 from collincusce/rename-default-subnet
StephenButtolph Aug 26, 2020
d134fff
Merge pull request #330 from ava-labs/add-memo-send-api
StephenButtolph Aug 26, 2020
ae33cd0
Merge pull request #329 from StephenButtolph/avm-verify-race
StephenButtolph Aug 26, 2020
97f6ae1
finished first pass of directed.go
StephenButtolph Aug 26, 2020
53c0d62
made input.go pass tests
StephenButtolph Aug 26, 2020
8029c76
Merge branch 'dev' into snowstorm-cleanup
StephenButtolph Aug 26, 2020
16baeb4
cleaned up some wording
StephenButtolph Aug 26, 2020
2bdd826
Merge branch 'snowstorm-cleanup' of github.com:StephenButtolph/gecko …
StephenButtolph Aug 26, 2020
365649d
Merge pull request #332 from StephenButtolph/snowstorm-cleanup
StephenButtolph Aug 26, 2020
a5e198b
cleaned up repo based on staticcheck
StephenButtolph Aug 26, 2020
e0bb8b7
Merge pull request #333 from StephenButtolph/staticcheck-pass
StephenButtolph Aug 26, 2020
0bfc26c
cleaned up input.go for snowstorm
StephenButtolph Aug 27, 2020
ae6e657
moved duplicated code into snowstorm/common
StephenButtolph Aug 27, 2020
e06aaa0
formatted
StephenButtolph Aug 27, 2020
da06e76
Merge pull request #336 from StephenButtolph/snowstorm-cleanup
StephenButtolph Aug 27, 2020
91c3c32
Added tests for updating the Avalanche frontiers in snowstorm
StephenButtolph Aug 27, 2020
b22a412
Merge pull request #337 from StephenButtolph/snowstorm-frontier-updat…
StephenButtolph Aug 27, 2020
0e2a3f0
lower log level
Aug 27, 2020
d3b049b
WIP. Re-doing how validator lists are persisted in database
Aug 27, 2020
b58ff59
Re-ordered IPC initialization
StephenButtolph Aug 28, 2020
8fd7e5d
Merge pull request #339 from StephenButtolph/init-ipcs
StephenButtolph Aug 28, 2020
496c050
Update CI script to match breaking API name changes
aaronbuchwald Aug 28, 2020
3544aa4
Add command line parameter to set max non staker msgs cap
aaronbuchwald Aug 28, 2020
51fe806
WIP. Builds but crashes while executing bootstrapping
Aug 28, 2020
098767c
Merge branch 'dev' into fix-put-get-validator-list
StephenButtolph Aug 29, 2020
766faf9
cleaned up validator sets
StephenButtolph Aug 29, 2020
a07d7c0
wip
StephenButtolph Aug 29, 2020
8534f00
reverted change in UTXO TxID
StephenButtolph Aug 29, 2020
e0edebd
remove the correct weight from the peer
StephenButtolph Aug 29, 2020
bd94fd9
cleaned up error formatting
StephenButtolph Aug 29, 2020
e42a17d
removed debug logging
StephenButtolph Aug 29, 2020
7ab5595
Remove conflicting travis ci secure variables
aaronbuchwald Aug 28, 2020
637feba
Run only the non-byzantine tests when docker credentials are not present
aaronbuchwald Aug 29, 2020
2aa51e3
Remove unnecessary install of awscli
aaronbuchwald Aug 29, 2020
3b11b6e
cleaned up var usage
StephenButtolph Aug 29, 2020
824190b
removed unused function
StephenButtolph Aug 29, 2020
616487d
started fixing up tests
StephenButtolph Aug 29, 2020
59f2e60
fixing up more tests
StephenButtolph Aug 29, 2020
af9fc40
Cleanup e2e test script
aaronbuchwald Aug 29, 2020
8a1cd53
Separate message throttling from CPU tracking
aaronbuchwald Aug 29, 2020
7531e76
Rename command line parameter setting max number of peer's pending msgs
aaronbuchwald Aug 29, 2020
4ea7152
fixed various bugs + fixeds tests
StephenButtolph Aug 30, 2020
104f33c
Merge branch 'fix-put-get-validator-list' of github.com:ava-labs/geck…
StephenButtolph Aug 30, 2020
998f2b4
minor cleanup
StephenButtolph Aug 30, 2020
8dd7186
Merge pull request #338 from ava-labs/lower-log-level
StephenButtolph Aug 30, 2020
6b8145f
Merge pull request #343 from aaronbuchwald/ds-name-update-ci
StephenButtolph Aug 30, 2020
41df99f
Merge branch 'dev' into fix-put-get-validator-list
StephenButtolph Aug 30, 2020
9635998
Merge pull request #344 from ava-labs/fix-put-get-validator-list
StephenButtolph Aug 30, 2020
392c447
merged
StephenButtolph Aug 30, 2020
6d885f2
cleaned up import
StephenButtolph Aug 30, 2020
5f04f59
Merge pull request #345 from aaronbuchwald/relax-throttler
StephenButtolph Aug 30, 2020
9fb7cf7
updated version handling
StephenButtolph Aug 30, 2020
f373a37
Merge branch 'dev' into patch-version-handling
StephenButtolph Aug 30, 2020
8034843
Merge pull request #348 from ava-labs/patch-version-handling
StephenButtolph Aug 30, 2020
8c03a6b
Merge branch 'dev' into improved-version-handling
StephenButtolph Aug 30, 2020
e8c8b1e
Merge pull request #350 from StephenButtolph/improved-version-handling
StephenButtolph Aug 30, 2020
5343c43
Merge branch 'master' into dev
StephenButtolph Aug 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .ci/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@ GECKO_IMAGE=$(docker image ls --format="{{.Repository}}" | head -n 1)

DOCKER_REPO="avaplatform"

echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin

TESTING_CONTROLLER_IMAGE="$DOCKER_REPO/avalanche-e2e-tests_controller:everest-latest"
BYZANTINE_IMAGE="$DOCKER_REPO/gecko-byzantine:everest-latest"

docker pull "$TESTING_CONTROLLER_IMAGE"
docker pull "${BYZANTINE_IMAGE}"


E2E_TESTING_REMOTE="https://github.com/ava-labs/avalanche-testing.git"
E2E_TAG="v0.8.2-dev"
E2E_TAG="v0.8.4-dev"

mkdir -p "$E2E_TEST_HOME"
git clone "$E2E_TESTING_REMOTE" "$E2E_TEST_HOME"
Expand All @@ -26,4 +17,19 @@ git checkout "tags/$E2E_TAG" -b "$E2E_TAG"

go mod edit -replace github.com/ava-labs/gecko="$GECKO_HOME"
bash "./scripts/rebuild_initializer_binary.sh"
./build/avalanche-e2e-tests --gecko-image-name="${GECKO_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" --byzantine-image-name="${BYZANTINE_IMAGE}"


TESTING_CONTROLLER_IMAGE="$DOCKER_REPO/avalanche-testing_controller:everest-dev"
BYZANTINE_IMAGE="$DOCKER_REPO/gecko-byzantine:everest-dev"

docker pull "$TESTING_CONTROLLER_IMAGE"

# If Docker Credentials are not available skip the Byzantine Tests
if [[ ${#DOCKER_USERNAME} == 0 ]]; then
echo "Skipping Byzantine Tests because Docker Credentials were not present."
./build/avalanche-testing --gecko-image-name="${GECKO_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}"
else
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin
docker pull "${BYZANTINE_IMAGE}"
./build/avalanche-testing --gecko-image-name="${GECKO_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" --byzantine-image-name="${BYZANTINE_IMAGE}"
fi
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ env:
- E2E_TEST_HOME=$GOPATH/src/github.com/ava-labs/avalanche-testing/
- COMMIT=${TRAVIS_COMMIT::8}
- DOCKERHUB_REPO=avaplatform/gecko
- secure: "L/A9+re0NEKP6EV6H9RcTGiDhX3WMvsiWrkRKDYKqnviqbjY30RK6EM4vvjrM4Lrw2QwsO3YKgnku3+zioE/TxEZFkpkbjNUXru0nYBrWAg1TKVsDXnYaIZkHUejfryST3E8N7F4Hx6zCtGEO0sEdUeKuT+MNUIuHezHooTgGzDjMogm70EWMFjQHc7VucTJu7dWU1RBPjovWQ0q9qflrtCpbrvXFIiihQQ1PQha1Q2C4wLakKuLbhhSafue90Mnyss0blaPHy/tyewcASJu4vsGTKRBn0DzttlkNTwuD6+nKrbmJY0ohunnkVFzYjrZAw1gyN+DCDb/lPbz4ZDItKPwrIUPEtL5xuUOrxUZPUh+0io3Q2d6rjaqkdGjd1KQXzbnW1mn0BxX3d3b2UpIqhBn9umYYjHBKnMuoRiTK33b7U9+LF3K84+tEvVDCPeHs/mw6Inp5jGRSravnM6yPQ6feGzogs4+3EMzZXxnkngKFKCsnd67Oe9xfV9amOU2aQAx4jaAwlPjEpBEkUa8YKx3lPznvmUk1QsNCUbLjdSl5JBaXojLJoiuPbj29hp4S5AXXgn+3Hvwk3ndcFCxi6/l1W9mjYSOtFqg3EAUdF4EgnA/ykQg9ZokkoKY0+qgOzG2bKOAYuCDWeGr7P1apToh00ccsQXL81nVPiq7uDw="
- secure: "zfTm7tJBYiPYrli76d4Ep6Lc2TJQ8Xv//+7OoqTA/aIf6YJDHe05f2GFTWAHG2iOIix/yjwHYwnhyIW66eWPb+Ujejnmh4eXlYZFufX9J5jUpDpbFu/+ybOLgE1Tmr0je0ycneSMe/NAaS74nWU1wnP34/cEE4sYL7TJyhwbeEtgz3cbSWwkpdvHFbXCjSOA196jdIYYUwsnqU9yycAG+2WUSk3DHHzzdtMrh/UOH2r1VFyp5US0zmbW90WkWX+o3TIlzZJgTUGQRNnWKq95Mrh1EQotxgL6CJ8NkfY4bVAGAhusPjdjscJsHxfY93WRMH64TzPYYp0zdibatH0ztyhnZPXVKqv+AIIVTEW+xWv5V18kTQAd1uBW103NFacbgXhIGWtbFcN9g1+ws29HROMclYs7ci6+72Qnq0eL55huqSyFx6+InhYwn+LfJmaBcGW4wx1umdp505M0obZ4ghlyn6b0pDYmqsu1XyBC3mjUTFbwlQmWE2Fize4L5o+DdH4ZDc9japF9ntxIMvO+b3nOicr7tplY2AGp61bB89o3dUAFlN5mDaEJotiAuFk5mo244rY1FjSzyGiKkA3M9TkTIbgcbN098hOJoMCYybH7yqiPwNnZiFvUuYjHuC5D1kIYBWuqqO0iVcbIZn0rV2jyzbVFlhFVk2clTZGhkrY="
before_install:
- pip install --user awscli # need awscli to access byz-gecko images
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then .ci/before_install_linux.sh; fi

install:
Expand Down
8 changes: 3 additions & 5 deletions api/info/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"github.com/ava-labs/gecko/utils/json"
"github.com/ava-labs/gecko/utils/logging"
"github.com/ava-labs/gecko/version"

cjson "github.com/ava-labs/gecko/utils/json"
)

// Info is the API service for unprivileged info on a node
Expand All @@ -36,7 +34,7 @@ type Info struct {
// NewService returns a new admin API service
func NewService(log logging.Logger, version version.Version, nodeID ids.ShortID, networkID uint32, chainManager chains.Manager, peers network.Network, txFee uint64) (*common.HTTPHandler, error) {
newServer := rpc.NewServer()
codec := cjson.NewCodec()
codec := json.NewCodec()
newServer.RegisterCodec(codec, "application/json")
newServer.RegisterCodec(codec, "application/json;charset=UTF-8")
if err := newServer.RegisterService(&Info{
Expand Down Expand Up @@ -81,14 +79,14 @@ func (service *Info) GetNodeID(_ *http.Request, _ *struct{}, reply *GetNodeIDRep

// GetNetworkIDReply are the results from calling GetNetworkID
type GetNetworkIDReply struct {
NetworkID cjson.Uint32 `json:"networkID"`
NetworkID json.Uint32 `json:"networkID"`
}

// GetNetworkID returns the network ID this node is running on
func (service *Info) GetNetworkID(_ *http.Request, _ *struct{}, reply *GetNetworkIDReply) error {
service.log.Info("Info: GetNetworkID called")

reply.NetworkID = cjson.Uint32(service.networkID)
reply.NetworkID = json.Uint32(service.networkID)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion api/keystore/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const (
var (
errEmptyUsername = errors.New("username can't be the empty string")
errUserPassMaxLength = fmt.Errorf("CreateUser call rejected due to username or password exceeding maximum length of %d chars", maxUserPassLen)
errWeakPassword = errors.New("Failed to create user as the given password is too weak")
errWeakPassword = errors.New("failed to create user as the given password is too weak")
)

// KeyValuePair ...
Expand Down
8 changes: 4 additions & 4 deletions chains/awaiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ func NewAwaiter(vdrs validators.Set, reqWeight uint64, connected func()) network
}

func (a *awaitConnected) Connected(vdrID ids.ShortID) bool {
vdr, ok := a.vdrs.Get(vdrID)
weight, ok := a.vdrs.GetWeight(vdrID)
if !ok {
return false
}
weight, err := math.Add64(vdr.Weight(), a.weight)
weight, err := math.Add64(weight, a.weight)
a.weight = weight
// If the error is non-nil, then an overflow error has occurred such that
// the required weight was surpassed. As per network.Handler interface,
Expand All @@ -46,14 +46,14 @@ func (a *awaitConnected) Connected(vdrID ids.ShortID) bool {
}

func (a *awaitConnected) Disconnected(vdrID ids.ShortID) bool {
if vdr, ok := a.vdrs.Get(vdrID); ok {
if weight, ok := a.vdrs.GetWeight(vdrID); ok {
// TODO: Account for weight changes in a more robust manner.

// Sub64 should rarely error since only validators that have added their
// weight can become disconnected. Because it is possible that there are
// changes to the validators set, we utilize that Sub64 returns 0 on
// error.
a.weight, _ = math.Sub64(a.weight, vdr.Weight())
a.weight, _ = math.Sub64(a.weight, weight)
}
return false
}
6 changes: 3 additions & 3 deletions chains/awaiter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ func TestAwaiter(t *testing.T) {
vdrID3 := ids.NewShortID([20]byte{3})

s := validators.NewSet()
s.Add(validators.NewValidator(vdrID0, 1))
s.Add(validators.NewValidator(vdrID1, 1))
s.Add(validators.NewValidator(vdrID3, 1))
s.AddWeight(vdrID0, 1)
s.AddWeight(vdrID1, 1)
s.AddWeight(vdrID3, 1)

called := make(chan struct{}, 1)
aw := NewAwaiter(s, 3, func() {
Expand Down
58 changes: 32 additions & 26 deletions chains/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ type manager struct {

stakingEnabled bool // True iff the network has staking enabled
stakerMsgPortion, stakerCPUPortion float64
maxNonStakerPendingMsgs uint32
log logging.Logger
logFactory logging.Factory
vmManager vms.Manager // Manage mappings from vm ID --> vm
Expand Down Expand Up @@ -152,6 +153,7 @@ type manager struct {
// TODO: Make this function take less arguments
func New(
stakingEnabled bool,
maxNonStakerPendingMsgs uint,
stakerMsgPortion,
stakerCPUPortion float64,
log logging.Logger,
Expand Down Expand Up @@ -186,29 +188,30 @@ func New(
rtr.Initialize(log, &timeoutManager, gossipFrequency, shutdownTimeout)

m := &manager{
stakingEnabled: stakingEnabled,
stakerMsgPortion: stakerMsgPortion,
stakerCPUPortion: stakerCPUPortion,
log: log,
logFactory: logFactory,
vmManager: vmManager,
decisionEvents: decisionEvents,
consensusEvents: consensusEvents,
db: db,
chainRouter: rtr,
net: net,
timeoutManager: &timeoutManager,
consensusParams: consensusParams,
validators: validators,
nodeID: nodeID,
networkID: networkID,
server: server,
keystore: keystore,
atomicMemory: atomicMemory,
avaxAssetID: avaxAssetID,
xChainID: xChainID,
criticalChains: criticalChains,
chains: make(map[[32]byte]*router.Handler),
stakingEnabled: stakingEnabled,
maxNonStakerPendingMsgs: uint32(maxNonStakerPendingMsgs),
stakerMsgPortion: stakerMsgPortion,
stakerCPUPortion: stakerCPUPortion,
log: log,
logFactory: logFactory,
vmManager: vmManager,
decisionEvents: decisionEvents,
consensusEvents: consensusEvents,
db: db,
chainRouter: rtr,
net: net,
timeoutManager: &timeoutManager,
consensusParams: consensusParams,
validators: validators,
nodeID: nodeID,
networkID: networkID,
server: server,
keystore: keystore,
atomicMemory: atomicMemory,
avaxAssetID: avaxAssetID,
xChainID: xChainID,
criticalChains: criticalChains,
chains: make(map[[32]byte]*router.Handler),
}
m.Initialize()
return m, nil
Expand Down Expand Up @@ -238,7 +241,8 @@ func (m *manager) ForceCreateChain(chainParams ChainParameters) {
// Assert that there isn't already a chain with an alias in [chain].Aliases
// (Recall that the string repr. of a chain's ID is also an alias for a chain)
if alias, isRepeat := m.isChainWithAlias(chainParams.ID.String()); isRepeat {
m.log.Error("there is already a chain with alias '%s'. Chain not created.", alias)
m.log.Debug("there is already a chain with alias '%s'. Chain not created.",
alias)
return
}

Expand Down Expand Up @@ -342,9 +346,9 @@ func (m *manager) buildChain(chainParams ChainParameters) (*chain, error) {
var validators validators.Set // Validators validating this blockchain
var ok bool
if m.stakingEnabled {
validators, ok = m.validators.GetValidatorSet(chainParams.SubnetID)
validators, ok = m.validators.GetValidators(chainParams.SubnetID)
} else { // Staking is disabled. Every peer validates every subnet.
validators, ok = m.validators.GetValidatorSet(constants.DefaultSubnetID)
validators, ok = m.validators.GetValidators(constants.PrimaryNetworkID)
}
if !ok {
return nil, fmt.Errorf("couldn't get validator set of subnet with ID %s. The subnet may not exist", chainParams.SubnetID)
Expand Down Expand Up @@ -510,6 +514,7 @@ func (m *manager) createAvalancheChain(
validators,
msgChan,
defaultChannelSize,
m.maxNonStakerPendingMsgs,
m.stakerMsgPortion,
m.stakerCPUPortion,
fmt.Sprintf("%s_handler", consensusParams.Namespace),
Expand Down Expand Up @@ -588,6 +593,7 @@ func (m *manager) createSnowmanChain(
validators,
msgChan,
defaultChannelSize,
m.maxNonStakerPendingMsgs,
m.stakerMsgPortion,
m.stakerCPUPortion,
fmt.Sprintf("%s_handler", consensusParams.Namespace),
Expand Down
6 changes: 3 additions & 3 deletions genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func FromConfig(config *Config) ([]byte, ids.ID, error) {
weight := json.Uint64(20 * units.KiloAvax)
destAddr := config.FundedAddresses[i%len(config.FundedAddresses)]
platformvmArgs.Validators = append(platformvmArgs.Validators,
platformvm.FormattedAPIDefaultSubnetValidator{
platformvm.FormattedAPIPrimaryValidator{
FormattedAPIValidator: platformvm.FormattedAPIValidator{
StartTime: json.Uint64(genesisTime.Unix()),
EndTime: json.Uint64(endStakingTime.Unix()),
Expand All @@ -135,7 +135,7 @@ func FromConfig(config *Config) ([]byte, ids.ID, error) {
platformvmArgs.Chains = []platformvm.APIChain{
{
GenesisData: avmReply.Bytes,
SubnetID: constants.DefaultSubnetID,
SubnetID: constants.PrimaryNetworkID,
VMID: avm.ID,
FxIDs: []ids.ID{
secp256k1fx.ID,
Expand All @@ -146,7 +146,7 @@ func FromConfig(config *Config) ([]byte, ids.ID, error) {
},
{
GenesisData: formatting.CB58{Bytes: config.EVMBytes},
SubnetID: constants.DefaultSubnetID,
SubnetID: constants.PrimaryNetworkID,
VMID: EVMID,
Name: "C-Chain",
},
Expand Down
6 changes: 3 additions & 3 deletions genesis/network_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ func NetworkID(networkName string) (uint32, error) {

if id, err := strconv.ParseUint(networkName, 10, 0); err == nil {
if id > math.MaxUint32 {
return 0, fmt.Errorf("NetworkID %s not in [0, 2^32)", networkName)
return 0, fmt.Errorf("networkID %s not in [0, 2^32)", networkName)
}
return uint32(id), nil
}
if constants.ValidNetworkName.MatchString(networkName) {
if id, err := strconv.Atoi(networkName[8:]); err == nil {
if id > math.MaxUint32 {
return 0, fmt.Errorf("NetworkID %s not in [0, 2^32)", networkName)
return 0, fmt.Errorf("networkID %s not in [0, 2^32)", networkName)
}
return uint32(id), nil
}
}

return 0, fmt.Errorf("Failed to parse %s as a network name", networkName)
return 0, fmt.Errorf("failed to parse %s as a network name", networkName)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/AppsFlyer/go-sundheit v0.2.0
github.com/allegro/bigcache v1.2.1 // indirect
github.com/aristanetworks/goarista v0.0.0-20200812190859-4cb0e71f3c0e // indirect
github.com/ava-labs/coreth v0.2.12-rc.1 // indirect
github.com/ava-labs/coreth v0.2.13 // indirect
github.com/ava-labs/go-ethereum v1.9.3
github.com/btcsuite/btcutil v1.0.2
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200627015759-01fd2de07837
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/aristanetworks/goarista v0.0.0-20200609010056-95bcf8053598/go.mod h1:
github.com/aristanetworks/goarista v0.0.0-20200812190859-4cb0e71f3c0e h1:tkEt0le4Lv5+VmcxZPIVSrP8LVPLhndIm/BOP7iPh/w=
github.com/aristanetworks/goarista v0.0.0-20200812190859-4cb0e71f3c0e/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE=
github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc=
github.com/ava-labs/coreth v0.2.12-rc.1 h1:BUUu+89KwsAFZpdcim8PGkc11P54BQhvRaB9XzX63F8=
github.com/ava-labs/coreth v0.2.12-rc.1/go.mod h1:ZwQ7rzHvQLorZsMoUm2FDWmLwOvDDoNzB+EEp2NhWyI=
github.com/ava-labs/coreth v0.2.13 h1:MaTf6Mbhfh2Ou5MpYmMqohCOtg3ZQgbDXTeEzcCiMb8=
github.com/ava-labs/coreth v0.2.13/go.mod h1:ZwQ7rzHvQLorZsMoUm2FDWmLwOvDDoNzB+EEp2NhWyI=
github.com/ava-labs/gecko v0.6.1-rc.1/go.mod h1:TT6uA1BETZpVMR0xiFtE8I5Mv4DULlS+lAL3xuYKnpA=
github.com/ava-labs/go-ethereum v1.9.3 h1:GmnMZ/dlvVAPFmWBzEpRJX49pUAymPfoASLNRJqR0AY=
github.com/ava-labs/go-ethereum v1.9.3/go.mod h1:a+agc6fXfZFsPZCylA3ry4Y8CLCqLKg3Rc23NXZ9aw8=
Expand Down
2 changes: 1 addition & 1 deletion ids/bag.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (b *Bag) Len() int { return b.size }

// List returns a list of all ids that have been added.
func (b *Bag) List() []ID {
idList := make([]ID, len(b.counts), len(b.counts))
idList := make([]ID, len(b.counts))
i := 0
for id := range b.counts {
idList[i] = NewID(id)
Expand Down
2 changes: 1 addition & 1 deletion ids/short_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (ids ShortSet) CappedList(size int) []ShortID {

// List converts this set into a list
func (ids ShortSet) List() []ShortID {
idList := make([]ShortID, len(ids), len(ids))
idList := make([]ShortID, len(ids))
i := 0
for id := range ids {
idList[i] = NewShortID(id)
Expand Down
5 changes: 0 additions & 5 deletions ipcs/eventsocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import (
"github.com/ava-labs/gecko/utils/wrappers"
)

type chainEventDipatcher struct {
chainID ids.ID
events *triggers.EventDispatcher
}

// EventSockets is a set of named eventSockets
type EventSockets struct {
consensusSocket *eventSocket
Expand Down
11 changes: 6 additions & 5 deletions main/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

const (
dbVersion = "v0.6.1"
dbVersion = "v0.7.0"
)

// Results of parsing the CLI
Expand Down Expand Up @@ -166,8 +166,8 @@ func init() {
// AVAX fees:
fs.Uint64Var(&Config.TxFee, "tx-fee", units.MilliAvax, "Transaction fee, in nAVAX")

// Minimum stake, in nAVAX, required to validate the Default Subnet
fs.Uint64Var(&Config.MinStake, "min-stake", 5*units.MilliAvax, "Minimum stake, in nAVAX, required to validate the Default Subnet")
// Minimum stake, in nAVAX, required to validate the primary network
fs.Uint64Var(&Config.MinStake, "min-stake", 5*units.MilliAvax, "Minimum stake, in nAVAX, required to validate the primary network")

// Assertions:
fs.BoolVar(&loggingConfig.Assertions, "assertions-enabled", true, "Turn on assertion execution")
Expand Down Expand Up @@ -202,6 +202,7 @@ func init() {
fs.Uint64Var(&Config.DisabledStakingWeight, "staking-disabled-weight", 1, "Weight to provide to each peer when staking is disabled")

// Throttling:
fs.UintVar(&Config.MaxNonStakerPendingMsgs, "max-non-staker-pending-msgs", 3, "Maximum number of messages a non-staker is allowed to have pending.")
fs.Float64Var(&Config.StakerMsgPortion, "staker-msg-reserved", 0.2, "Reserve a portion of the chain message queue's space for stakers.")
fs.Float64Var(&Config.StakerCPUPortion, "staker-cpu-reserved", 0.2, "Reserve a portion of the chain's CPU time for stakers.")

Expand Down Expand Up @@ -298,7 +299,7 @@ func init() {
}

if ip == nil {
errs.Add(fmt.Errorf("Invalid IP Address %s", *consensusIP))
errs.Add(fmt.Errorf("invalid IP Address %s", *consensusIP))
return
}

Expand Down Expand Up @@ -362,7 +363,7 @@ func init() {
}
}
if len(Config.BootstrapPeers) != i {
errs.Add(fmt.Errorf("More bootstrap IPs, %d, provided than bootstrap IDs, %d", len(Config.BootstrapPeers), i))
errs.Add(fmt.Errorf("more bootstrap IPs, %d, provided than bootstrap IDs, %d", len(Config.BootstrapPeers), i))
return
}
} else {
Expand Down
Loading