Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b36416d
Author: Alberto Benegiamo <[email protected]>
Date:   Wed Dec 6 12:12:11 2023 -0700

    Drop Pending Stakers 1 - introduced ScheduledStaker txs (#2323)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 7df1f3a
Author: Stephen Buttolph <[email protected]>
Date:   Wed Dec 6 13:46:56 2023 -0500

    Restrict GOPROXY (#2434)

commit 21b7ab8
Author: Stephen Buttolph <[email protected]>
Date:   Tue Dec 5 19:43:00 2023 -0500

    Fix platformvm.SetPreference (#2429)

commit ada692a
Author: Stephen Buttolph <[email protected]>
Date:   Tue Dec 5 17:40:03 2023 -0500

    Update minimum golang version to v1.20.12 (#2427)

commit 004a23e
Author: Dhruba Basu <[email protected]>
Date:   Tue Dec 5 12:56:25 2023 -0500

    `vms/platformvm`: Add `decisionTxs` parameter to `NewBanffProposalBlock` (#2411)

    Co-authored-by: Dan Laine <[email protected]>

commit 439dc1e
Author: Alberto Benegiamo <[email protected]>
Date:   Tue Dec 5 10:46:13 2023 -0700

    ProposerVM Extend windows 0 - Cleanup (#2404)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 477157d
Author: Dhruba Basu <[email protected]>
Date:   Tue Dec 5 11:10:56 2023 -0500

    `vms/platformvm`: Cleanup some block tests (#2422)

    Co-authored-by: Dan Laine <[email protected]>

commit b6700c9
Author: Stephen Buttolph <[email protected]>
Date:   Mon Dec 4 22:24:34 2023 -0500

    Update slices dependency to use Compare (#2424)

    Co-authored-by: James Walker <[email protected]>

commit 5d9e482
Author: Dan Laine <[email protected]>
Date:   Mon Dec 4 19:27:29 2023 -0500

    allow user of `build_fuzz.sh` to specify a directory to fuzz in (#2414)

commit 2e32281
Author: Stephen Buttolph <[email protected]>
Date:   Mon Dec 4 18:30:41 2023 -0500

    Fix duplicated bootstrapper engine termination (#2334)

    Signed-off-by: Joshua Kim <[email protected]>
    Co-authored-by: Joshua Kim <[email protected]>

commit b741c19
Author: Dhruba Basu <[email protected]>
Date:   Mon Dec 4 17:49:15 2023 -0500

    `vms/platformvm`: Move `VerifyUniqueInputs` from `verifier` to `backend` (#2410)

commit 6aa20fc
Author: Dhruba Basu <[email protected]>
Date:   Mon Dec 4 17:32:07 2023 -0500

    `vms/platformvm`: Initialize txs in `Transactions` field for `BanffProposalBlock` (#2419)

commit c11accd
Author: Alberto Benegiamo <[email protected]>
Date:   Mon Dec 4 09:16:01 2023 -0700

    Drop Pending Stakers 0 - De-duplicate staking tx verification (#2335)

commit 05ce366
Author: marun <[email protected]>
Date:   Sat Dec 2 13:33:18 2023 -0800

    testing: Update to latest version of ginkgo (#2390)

commit 04af33e
Author: Dhruba Basu <[email protected]>
Date:   Sat Dec 2 16:33:07 2023 -0500

    `vms/platformvm`: Cleanup block builder tests (#2406)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 7623ffd
Author: Stephen Buttolph <[email protected]>
Date:   Fri Dec 1 19:39:15 2023 -0500

    Update versions for v1.10.17 (#2394)

commit be1a2ad
Author: aaronbuchwald <[email protected]>
Date:   Fri Dec 1 13:31:49 2023 -0500

    Add more descriptive formatted error (#2403)

    Co-authored-by: Stephen Buttolph <[email protected]>

commit 9b85141
Author: Dhruba Basu <[email protected]>
Date:   Thu Nov 30 12:42:36 2023 -0800

    `vms/platformvm`: Move `GetRewardUTXOs`, `GetSubnets`, and `GetChains` to `State` interface (#2402)

commit de3b16c
Author: Joshua Kim <[email protected]>
Date:   Thu Nov 30 12:49:53 2023 -0500

    Add `p2p.Network` component (#2283)

    Signed-off-by: Joshua Kim <[email protected]>
    Co-authored-by: Stephen Buttolph <[email protected]>

commit 0ab2046
Author: marun <[email protected]>
Date:   Thu Nov 30 09:18:59 2023 -0800

    Rename `testnet` fixture to `tmpnet` (#2307)

commit 907b34c
Author: Stephen Buttolph <[email protected]>
Date:   Wed Nov 29 21:32:43 2023 -0500

    Update bootstrap IPs (#2396)

commit 96d451d
Author: Stephen Buttolph <[email protected]>
Date:   Wed Nov 29 18:15:47 2023 -0500

    Periodically PullGossip only from connected validators (#2399)

commit 0da5bcc
Author: Dan Laine <[email protected]>
Date:   Wed Nov 29 16:32:16 2023 -0500

    Remove method `CappedList` from `set.Set` (#2395)

Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim committed Dec 6, 2023
1 parent 6eeb030 commit 8866972
Show file tree
Hide file tree
Showing 162 changed files with 2,865 additions and 2,315 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/auto-generated-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- uses: bufbuild/[email protected]
- shell: bash
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- shell: bash
run: scripts/mock.gen.sh
Expand All @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- shell: bash
run: go mod tidy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true

- run: go version
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true

- run: go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-public-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu-amd64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu-arm64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-win-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true

- run: go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Run fuzz tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Run static analysis tests
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test e2e with persistent network
name: Test e2e with existing network

on:
push:
Expand All @@ -15,25 +15,25 @@ permissions:
contents: read

jobs:
test_e2e_persistent:
test_e2e_existing:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Build the avalanchego binary
shell: bash
run: ./scripts/build.sh -r
- name: Run e2e tests with persistent network
- name: Run e2e tests with existing network
shell: bash
run: E2E_SERIAL=1 ./scripts/tests.e2e.persistent.sh
- name: Upload testnet network dir
run: E2E_SERIAL=1 ./scripts/tests.e2e.existing.sh
- name: Upload tmpnet network dir
uses: actions/upload-artifact@v3
if: always()
with:
name: testnet-data
path: ~/.testnetctl/networks/1000
name: tmpnet-data
path: ~/.tmpnet/networks/1000
8 changes: 4 additions & 4 deletions .github/workflows/test.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Build the avalanchego binary
shell: bash
run: ./scripts/build.sh -r
- name: Run e2e tests
shell: bash
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh
- name: Upload testnet network dir
- name: Upload tmpnet network dir
uses: actions/upload-artifact@v3
if: always()
with:
name: testnet-data
path: ~/.testnetctl/networks/1000
name: tmpnet-data
path: ~/.tmpnet/networks/1000
2 changes: 1 addition & 1 deletion .github/workflows/test.unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Set timeout on Windows # Windows UT run slower and need a longer timeout
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.10'
go-version: '~1.20.12'
check-latest: true
- name: Build the avalanchego binary
shell: bash
run: ./scripts/build.sh
- name: Run upgrade tests
shell: bash
# 1.10.7 is the first version compatible with the testnet fixture by
# 1.10.7 is the first version compatible with the ephnet fixture by
# virtue of writing a process context file on node start.
run: ./scripts/tests.upgrade.sh 1.10.7
- name: Upload testnet network dir
- name: Upload ephnet network dir
uses: actions/upload-artifact@v3
if: always()
with:
name: testnet-data
path: ~/.testnetctl/networks/1000
name: ephnet-data
path: ~/.ephnet/networks/1000
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To start developing on AvalancheGo, you'll need a few things installed.

- Golang version >= 1.20.8
- Golang version >= 1.20.12
- gcc
- g++

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# README.md
# go.mod
# ============= Compilation Stage ================
FROM golang:1.20.10-bullseye AS builder
FROM golang:1.20.12-bullseye AS builder

WORKDIR /build
# Copy and download avalanche dependencies using go mod
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The minimum recommended hardware specification for nodes connected to Mainnet is

If you plan to build AvalancheGo from source, you will also need the following software:

- [Go](https://golang.org/doc/install) version >= 1.20.10
- [Go](https://golang.org/doc/install) version >= 1.20.12
- [gcc](https://gcc.gnu.org/)
- g++

Expand Down
72 changes: 72 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
# Release Notes

## [v1.10.17](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.17)

This version is backwards compatible to [v1.10.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.0). It is optional, but encouraged.

The plugin version is unchanged at `30` and is compatible with versions `v1.10.15-v1.10.16`.

### APIs

- Added `avalanche_{chainID}_blks_build_accept_latency` metric
- Added `avalanche_{chainID}_blks_issued{source}` metric with sources:
- `pull_gossip`
- `push_gossip`
- `put_gossip` which is deprecated
- `built`
- `unknown`
- Added `avalanche_{chainID}_issuer_stake_sum` metric
- Added `avalanche_{chainID}_issuer_stake_count` metric

### Configs

- Added:
- `--consensus-frontier-poll-frequency`
- Removed:
- `--consensus-accepted-frontier-gossip-frequency`
- Deprecated:
- `--consensus-accepted-frontier-gossip-validator-size`
- `--consensus-accepted-frontier-gossip-non-validator-size`
- `--consensus-accepted-frontier-gossip-peer-size`
- Updated the default value to 1 to align with the change in default gossip frequency
- `--consensus-on-accept-gossip-validator-size`
- `--consensus-on-accept-gossip-non-validator-size`
- `--consensus-on-accept-gossip-peer-size`

### Fixes

- Fixed `duplicated operation on provided value` error when executing atomic operations after state syncing the C-chain
- Removed useage of atomic trie after commitment
- Fixed atomic trie root overwrite during state sync
- Prevented closure of `stdout` and `stderr` when shutting down the logger

### What's Changed

- Remove Banff check from mempool verifier by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2360
- Document storage growth in readme by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2364
- Add metric for duration between block timestamp and acceptance time by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2366
- `vms/platformvm`: Remove unused `withMetrics` txheap by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2373
- Move peerTracker from x/sync to network/p2p by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/2356
- Logging avoid closing standard outputs by @felipemadero in https://github.com/ava-labs/avalanchego/pull/2372
- `vms/platformvm`: Adjust `Diff.Apply` signature by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2368
- Add bls validator info to genesis by @felipemadero in https://github.com/ava-labs/avalanchego/pull/2371
- Remove `engine.GetVM` by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2374
- `vms/platformvm`: Consolidate `state` pkg mocks by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2370
- Remove common bootstrapper by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2297
- `vms/platformvm`: Move `toEngine` channel to mempool by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2333
- `vms/avm`: Rename `states` pkg to `state` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2381
- Implement generic bimap by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2383
- Unexport RequestID from snowman engine by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2384
- Add metric to track the stake weight of block providers by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2376
- Add block source metrics to monitor gossip by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2386
- Rename `D` to `Durango` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2389
- Replace periodic push accepted gossip with pull preference gossip for block discovery by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2367
- MerkleDB Remove ID from Node to reduce size and removal channel creation. by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/2324
- Remove method `CappedList` from `set.Set` by @danlaine in https://github.com/ava-labs/avalanchego/pull/2395
- Periodically PullGossip only from connected validators by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2399
- Update bootstrap IPs by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2396
- Rename `testnet` fixture to `tmpnet` by @marun in https://github.com/ava-labs/avalanchego/pull/2307
- Add `p2p.Network` component by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/2283
- `vms/platformvm`: Move `GetRewardUTXOs`, `GetSubnets`, and `GetChains` to `State` interface by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/2402
- Add more descriptive formatted error by @aaronbuchwald in https://github.com/ava-labs/avalanchego/pull/2403

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.10.16...v1.10.17

## [v1.10.16](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.16)

This version is backwards compatible to [v1.10.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.0). It is optional, but encouraged.
Expand Down
6 changes: 4 additions & 2 deletions api/metrics/multi_gatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
dto "github.com/prometheus/client_model/go"

"golang.org/x/exp/slices"

"github.com/ava-labs/avalanchego/utils"
)

var (
Expand Down Expand Up @@ -91,7 +93,7 @@ func (g *multiGatherer) Register(namespace string, gatherer prometheus.Gatherer)
}

func sortMetrics(m []*dto.MetricFamily) {
slices.SortFunc(m, func(i, j *dto.MetricFamily) bool {
return *i.Name < *j.Name
slices.SortFunc(m, func(i, j *dto.MetricFamily) int {
return utils.Compare(*i.Name, *j.Name)
})
}
15 changes: 10 additions & 5 deletions chains/atomic/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ package atomic
import (
"bytes"
"errors"
"fmt"

"golang.org/x/exp/slices"

"github.com/ava-labs/avalanchego/database"
"github.com/ava-labs/avalanchego/database/linkeddb"
"github.com/ava-labs/avalanchego/database/prefixdb"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/utils"
"github.com/ava-labs/avalanchego/utils/hashing"
"github.com/ava-labs/avalanchego/utils/set"
)

var errDuplicatedOperation = errors.New("duplicated operation on provided value")
var (
errDuplicatePut = errors.New("duplicate put")
errDuplicateRemove = errors.New("duplicate remove")
)

type dbElement struct {
// Present indicates the value was removed before existing.
Expand Down Expand Up @@ -86,7 +91,7 @@ func (s *state) SetValue(e *Element) error {
}

// This key was written twice, which is invalid
return errDuplicatedOperation
return fmt.Errorf("%w: Key=0x%x Value=0x%x", errDuplicatePut, e.Key, e.Value)
}
if err != database.ErrNotFound {
// An unexpected error occurred, so we should propagate that error
Expand Down Expand Up @@ -160,7 +165,7 @@ func (s *state) RemoveValue(key []byte) error {

// Don't allow the removal of something that was already removed.
if !value.Present {
return errDuplicatedOperation
return fmt.Errorf("%w: Key=0x%x", errDuplicateRemove, key)
}

// Remove [key] from the indexDB for each trait that has indexed this key.
Expand Down Expand Up @@ -203,7 +208,7 @@ func (s *state) getKeys(traits [][]byte, startTrait, startKey []byte, limit int)
lastKey := startKey
// Iterate over the traits in order appending all of the keys that possess
// the given [traits].
utils.SortBytes(traits)
slices.SortFunc(traits, bytes.Compare)
for _, trait := range traits {
switch bytes.Compare(trait, startTrait) {
case -1:
Expand Down
Loading

0 comments on commit 8866972

Please sign in to comment.