Skip to content

Commit

Permalink
Merge pull request #30 from mboben/ava-merge-1_9_0-costwo
Browse files Browse the repository at this point in the history
Avalanche merge 1.9.0 costwo Banff times upgrades
  • Loading branch information
mboben authored Jul 2, 2024
2 parents 93fd844 + a49681e commit 207544c
Show file tree
Hide file tree
Showing 1,355 changed files with 39,691 additions and 12,064 deletions.
2 changes: 0 additions & 2 deletions avalanchego/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ linters:
disable-all: true
enable:
- asciicheck
- deadcode
- depguard
- errcheck
- exportloopref
Expand All @@ -37,7 +36,6 @@ linters:
- unconvert
- unparam
- unused
- varcheck
- unconvert
- whitespace
- staticcheck
Expand Down
4 changes: 2 additions & 2 deletions avalanchego/LICENSE.header
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
See the file LICENSE for licensing terms.
Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
See the file LICENSE for licensing terms.
13 changes: 2 additions & 11 deletions avalanchego/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The minimum recommended hardware specification for nodes connected to Mainnet is
- CPU: Equivalent of 8 AWS vCPU
- RAM: 16 GiB
- Storage: 1 TiB
- OS: Ubuntu 18.04/20.04 or macOS >= 10.15 (Catalina)
- OS: Ubuntu 20.04 or macOS >= 12
- Network: Reliable IPv4 or IPv6 network connection, with an open public port.

If you plan to build AvalancheGo from source, you will also need the following software:
Expand Down Expand Up @@ -59,15 +59,6 @@ Install AvalancheGo using an `apt` repository.

If you have already added the APT repository, you do not need to add it again.

To add the repository on Ubuntu 18.04 (Bionic), run:

```sh
sudo su -
wget -O - https://downloads.avax.network/avalanchego.gpg.key | apt-key add -
echo "deb https://downloads.avax.network/apt bionic main" > /etc/apt/sources.list.d/avalanche.list
exit
```

To add the repository on Ubuntu 20.04 (Focal), run:

```sh
Expand Down Expand Up @@ -160,7 +151,7 @@ To regenerate the protobuf go code, run `scripts/protobuf_codegen.sh` from the r

This should only be necessary when upgrading protobuf versions or modifying .proto definition files.

To use this script, you must have [buf](https://docs.buf.build/installation) (v1.4.0), protoc-gen-go (v1.28.0) and protoc-gen-go-grpc (v1.2.0) installed.
To use this script, you must have [buf](https://docs.buf.build/installation) (v1.7.0), protoc-gen-go (v1.28.0) and protoc-gen-go-grpc (v1.2.0) installed.

To install the buf dependencies:

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

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

This upgrade adds support for creating Proof-of-Stake Subnets.

This version is not backwards compatible. The changes in the upgrade go into effect at 12 PM EDT, October 18th 2022 on Mainnet.

**All Mainnet nodes should upgrade before 12 PM EDT, October 18th 2022.**

The supported plugin version is `17`.

### Upgrades

- Activated P2P serialization format change to Protobuf
- Activated non-AVAX `ImportTx`/`ExportTx`s to/from the P-chain
- Activated `Banff*` blocks on the P-chain
- Deactivated `Apricot*` blocks on the P-chain
- Activated `RemoveSubnetValidatorTx`s on the P-chain
- Activated `TransformSubnetTx`s on the P-chain
- Activated `AddPermissionlessValidatorTx`s on the P-chain
- Activated `AddPermissionlessDelegatorTx`s on the P-chain
- Deactivated ANT `ImportTx`/`ExportTx`s on the C-chain
- Deactivated ANT precompiles on the C-chain

### Deprecations

- Ubuntu 18.04 releases are deprecated and will not be provided for `>=v1.9.1`

### Miscellaneous

- Fixed locked input signing in the P-chain wallet
- Removed assertions from the logger interface
- Removed `--assertions-enabled` flag
- Fixed typo in `--bootstrap-max-time-get-ancestors` flag
- Standardized exported P-Chain codec usage
- Improved isolation and execution of the E2E tests
- Updated the linked hashmap implementation to use generics

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

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

### BLS

- Added BLS key file at `--staking-signer-key-file`
- Exposed BLS proof of possession in the `info.getNodeID` API
- Added BLS proof of possession to `AddPermissionlessValidatorTx`s for the Primary Network

The default value of `--staking-signer-key-file` is `~/.avalanchego/staking/signer.key`. If the key file doesn't exist, it will be populated with a new key.

### Networking

- Added P2P proto support to be activated in a future release
- Fixed inbound bandwidth spike after leaving the validation set
- Removed support for `ChitsV2` messages
- Removed `ContainerID`s from `Put` and `PushQuery` messages
- Added `pending_timeouts` metric to track the number of active timeouts a node is tracking
- Fixed overflow in gzip decompression
- Optimized memory usage in `peer.MessageQueue`

### Miscellaneous

- Fixed bootstrapping ETA metric
- Removed unused `unknown_txs_count` metric
- Replaced duplicated code with generic implementations

### Coreth

- Added failure reason to bad block API

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

Please upgrade your node as soon as possible.

The supported plugin version is `16`.

### Fixes

- Fixed stale block reference by evicting blocks upon successful verification

### [Coreth](https://medium.com/avalancheavax/apricot-phase-6-native-asset-call-deprecation-a7b7a77b850a)

- Removed check for Apricot Phase6 incompatible fork to unblock nodes that did not upgrade ahead of the activation time

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

Please upgrade your node as soon as possible.

The supported plugin version is `16`.

### Caching

- Added temporarily invalid block caching to reduce repeated network requests
- Added caching to the proposervm's inner block parsing

### [Coreth](https://medium.com/avalancheavax/apricot-phase-6-native-asset-call-deprecation-a7b7a77b850a)

- Reduced the log level of `BAD BLOCK`s from `ERROR` to `DEBUG`
- Deprecated Native Asset Call

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

Please upgrade your node as soon as possible.

The changes in `v1.8.x` go into effect at 4 PM EDT on September 6th, 2022 on both Fuji and Mainnet. You should upgrade your node before the changes go into effect, otherwise they may experience loss of uptime.

The supported plugin version is `16`.

### [Coreth](https://medium.com/avalancheavax/apricot-phase-6-native-asset-call-deprecation-a7b7a77b850a)

- Fixed live-lock in bootstrapping, after performing state-sync, by properly reporting `database.ErrNotFound` in `GetBlockIDAtHeight` rather than a formatted error
- Increased the log level of `BAD BLOCK`s from `DEBUG` to `ERROR`
- Fixed typo in Chain Config `String` function

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

Please upgrade your node as soon as possible.

The changes in `v1.8.x` go into effect at 4 PM EDT on September 6th, 2022 on both Fuji and Mainnet. You should upgrade your node before the changes go into effect, otherwise they may experience loss of uptime.

The supported plugin version is `16`.

### Miscellaneous

- Reduced the severity of not quickly connecting to bootstrap nodes from `FATAL` to `WARN`

### [Coreth](https://medium.com/avalancheavax/apricot-phase-6-native-asset-call-deprecation-a7b7a77b850a)

- Reduced the log level of `BAD BLOCK`s from `ERROR` to `DEBUG`
- Added Apricot Phase6 to Chain Config `String` function

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

This is a mandatory security upgrade. Please upgrade your node **as soon as possible.**

The changes in the upgrade go into effect at **4 PM EDT on September 6th, 2022** on both Fuji and Mainnet. You should upgrade your node before the changes go into effect, otherwise they may experience loss of uptime.

You may see some extraneous ERROR logs ("BAD BLOCK") on your node after upgrading. These may continue until the Apricot Phase 6 activation (at 4 PM EDT on September 6th).

The supported plugin version is `16`.

### PlatformVM APIs

- Fixed `GetBlock` API when requesting the encoding as `json`
- Changed the json key in `AddSubnetValidatorTx`s from `subnet` to `subnetID`
- Added multiple asset support to `getBalance`
- Updated `PermissionlessValidator`s returned from `getCurrentValidators` and `getPendingValidators` to include `validationRewardOwner` and `delegationRewardOwner`
- Deprecated `rewardOwner` in `PermissionlessValidator`s returned from `getCurrentValidators` and `getPendingValidators`
- Added `subnetID` argument to `getCurrentSupply`
- Added multiple asset support to `getStake`
- Added `subnetID` argument to `getMinStake`

### PlatformVM Structures

- Renamed existing blocks
- `ProposalBlock` -> `ApricotProposalBlock`
- `AbortBlock` -> `ApricotAbortBlock`
- `CommitBlock` -> `ApricotCommitBlock`
- `StandardBlock` -> `ApricotStandardBlock`
- `AtomicBlock` -> `ApricotAtomicBlock`
- Added new block types **to be enabled in a future release**
- `BlueberryProposalBlock`
- Introduces a `Time` field and an unused `Txs` field before the remaining `ApricotProposalBlock` fields
- `BlueberryAbortBlock`
- Introduces a `Time` field before the remaining `ApricotAbortBlock` fields
- `BlueberryCommitBlock`
- Introduces a `Time` field before the remaining `ApricotCommitBlock` fields
- `BlueberryStandardBlock`
- Introduces a `Time` field before the remaining `ApricotStandardBlock` fields
- Added new transaction types **to be enabled in a future release**
- `RemoveSubnetValidatorTx`
- Can be included into `BlueberryStandardBlock`s
- Allows a subnet owner to remove a validator from their subnet
- `TransformSubnetTx`
- Can be included into `BlueberryStandardBlock`s
- Allows a subnet owner to convert their subnet into a permissionless subnet
- `AddPermissionlessValidatorTx`
- Can be included into `BlueberryStandardBlock`s
- Adds a new validator to the requested permissionless subnet
- `AddPermissionlessDelegatorTx`
- Can be included into `BlueberryStandardBlock`s
- Adds a new delegator to the requested permissionless validator on the requested subnet

### PlatformVM Block Building

- Fixed race in `AdvanceTimeTx` creation to avoid unnecessary block construction
- Added `block_formation_logic.md` to describe how blocks are created
- Refactored `BlockBuilder` into `ApricotBlockBuilder`
- Added `BlueberryBlockBuilder`
- Added `OptionBlock` builder visitor
- Refactored `Mempool` issuance and removal logic to use transaction visitors

### PlatformVM Block Execution

- Added support for executing `AddValidatorTx`, `AddDelegatorTx`, and `AddSubnetValidatorTx` inside of a `BlueberryStandardBlock`
- Refactored time advancement into a standard state modification structure
- Refactored `ProposalTxExecutor` to abstract state diff creation
- Standardized upgrade checking rules
- Refactored subnet authorization checking

### Wallet

- Added support for new transaction types in the P-chain wallet
- Fixed fee amounts used in the Primary Network wallet to reduce unnecessary fee burning

### Networking

- Defined `p2p.proto` to be used for future network messages
- Added `--network-tls-key-log-file-unsafe` to support inspecting p2p messages
- Added `avalanche_network_accept_failed` metrics to track networking `Accept` errors

### Miscellaneous

- Removed reserved fields from proto files and renumbered the existing fields
- Added generic dynamically resized ring buffer
- Updated gRPC version to `v1.49.0` to fix non-deterministic errors reported in the `rpcchainvm`
- Removed `--signature-verification-enabled` flag
- Removed dead code
- `ids.QueueSet`
- `timer.Repeater`
- `timer.NewStagedTimer`
- `timer.TimedMeter`

### [Coreth](https://medium.com/avalancheavax/apricot-phase-6-native-asset-call-deprecation-a7b7a77b850a)

- Incorrectly deprecated Native Asset Call
- Migrated to go-ethereum v1.10.23
- Added API to fetch Chain Config

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

This version is backwards compatible to [v1.7.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.0). It is optional, but encouraged. The supported plugin version is `15`.
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/admin/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package admin
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/admin/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package admin
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/admin/service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package admin
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/admin/service_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package admin
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/auth/auth.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package auth
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/auth/auth_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package auth
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/auth/claims.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package auth
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/auth/response.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package auth
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/auth/service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package auth
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/common_args_responses.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package api
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/checker.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/handler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/health.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/health_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/metrics.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
2 changes: 1 addition & 1 deletion avalanchego/api/health/result.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package health
Expand Down
Loading

0 comments on commit 207544c

Please sign in to comment.