Skip to content

Commit

Permalink
Merge branch 'main' into main-js-tracers-enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mboben committed Nov 22, 2024
2 parents 186d7eb + 6cddc4e commit ab9077c
Show file tree
Hide file tree
Showing 1,360 changed files with 39,989 additions and 12,098 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:

env:
go_version: 1.18.5
go_version: 1.21.8

jobs:
build:
Expand All @@ -29,7 +29,7 @@ jobs:
if: ${{ github.ref_name }} == 'main'
- run: echo "IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/v')

- run: sudo apt-get update -y && sudo apt-get install -y rsync
- name: build
id: build
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
username: ${{ secrets.DOCKER_HUB_UID }}
password: ${{ secrets.DOCKER_HUB_PAT }}

- name: Build and push default image
uses: docker/[email protected]
with:
context: . # Because GH actions are for kids and put protection on everything; https://stackoverflow.com/a/71159809/11276254
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
${{ secrets.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }}
- name: Build image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} \
--tag ${{ secrets.DOCKER_HUB_REPO }}:${{ env.IMAGE_TAG }} \
--file ./Dockerfile \
--output type=image,push=true .
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18 AS build
FROM golang:1.21 AS build

RUN apt-get update -y && \
apt-get install -y rsync
Expand All @@ -14,7 +14,7 @@ WORKDIR /app/avalanchego/

RUN /app/avalanchego/scripts/build.sh

FROM ubuntu@sha256:b25ef49a40b7797937d0d23eca3b0a41701af6757afca23d504d50826f0b37ce
FROM ubuntu:24.10

WORKDIR /app

Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# go-flare

go-flare is a modified version of [[email protected]](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.18) + [[email protected]](https://github.com/ava-labs/coreth/releases/tag/v0.8.16) that incorporates the Flare Time Series Oracle (FTSO) and State Connector.
go-flare is a modified version of [[email protected]](https://github.com/ava-labs/avalanchego/releases/tag/v1.9.0) and [[email protected]](https://github.com/ava-labs/coreth/releases/tag/v0.11.0), incorporating specific features for Flare and Songbird networks. These features include prioritized contract handling and the invocation of the daemon contract.

All nodes should upgrade to the version 1.9.0 **before the following dates**:
- Coston2 network: November 26, 2024 at 12:00:00 UTC
- Flare network: December 17, 2024 at 12:00:00 UTC
- Coston network: January 7, 2025 at 12:00:00 UTC
- Songbird network: January 28, 2025 at 12:00:00 UTC

## System Requirements
- go version 1.18.5
- go version 1.21.8
- gcc, g++ and jq
- CPU: Equivalent of 8 AWS vCPU
- RAM: 16 GiB
- Storage: 1TB
- OS: Ubuntu 18.04/20.04 or macOS >= 10.15 (Catalina)
- Storage: 1TB Flare / 3.5TB Songbird
- OS: Ubuntu 20.04/22.04

## Compilation

Expand Down
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
Loading

0 comments on commit ab9077c

Please sign in to comment.