-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,758 changed files
with
106,204 additions
and
54,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
# go-flare | ||
|
||
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.1 **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 | ||
go-flare is a modified version of [[email protected]](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.0) and [[email protected]](https://github.com/ava-labs/coreth/releases/tag/v0.12.0), incorporating specific features for Flare and Songbird networks. These features include prioritized contract handling and the invocation of the daemon contract. | ||
|
||
## System Requirements | ||
- go version 1.21.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,5 @@ tests/e2e/e2e.test | |
tests/upgrade/upgrade.test | ||
|
||
vendor | ||
|
||
**/testdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved. | ||
See the file LICENSE for licensing terms. | ||
Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved. | ||
See the file LICENSE for licensing terms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,18 @@ 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 20.04 or macOS >= 12 | ||
- OS: Ubuntu 20.04/22.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: | ||
|
||
- [Go](https://golang.org/doc/install) version >= 1.18.1 | ||
- [Go](https://golang.org/doc/install) version >= 1.19.6 | ||
- [gcc](https://gcc.gnu.org/) | ||
- g++ | ||
|
||
### Native Install | ||
### Building From Source | ||
|
||
#### Clone The Repository | ||
|
||
Clone the AvalancheGo repository: | ||
|
||
|
@@ -35,17 +37,17 @@ git clone [email protected]:ava-labs/avalanchego.git | |
cd avalanchego | ||
``` | ||
|
||
This will clone and checkout to `master` branch. | ||
This will clone and checkout the `master` branch. | ||
|
||
#### Building the Avalanche Executable | ||
#### Building AvalancheGo | ||
|
||
Build Avalanche by running the build script: | ||
Build AvalancheGo by running the build script: | ||
|
||
```sh | ||
./scripts/build.sh | ||
``` | ||
|
||
The output of the script will be the Avalanche binary named `avalanchego`. It is located in the build directory: | ||
The `avalanchego` binary is now in the `build` directory. To run: | ||
|
||
```sh | ||
./build/avalanchego | ||
|
@@ -57,20 +59,20 @@ Install AvalancheGo using an `apt` repository. | |
|
||
#### Adding the APT Repository | ||
|
||
If you have already added the APT repository, you do not need to add it again. | ||
If you already have the APT repository added, you do not need to add it again. | ||
|
||
To add the repository on Ubuntu 20.04 (Focal), run: | ||
To add the repository on Ubuntu, run: | ||
|
||
```sh | ||
sudo su - | ||
wget -O - https://downloads.avax.network/avalanchego.gpg.key | apt-key add - | ||
echo "deb https://downloads.avax.network/apt focal main" > /etc/apt/sources.list.d/avalanche.list | ||
wget -qO - https://downloads.avax.network/avalanchego.gpg.key | tee /etc/apt/trusted.gpg.d/avalanchego.asc | ||
source /etc/os-release && echo "deb https://downloads.avax.network/apt $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/avalanche.list | ||
exit | ||
``` | ||
|
||
#### Installing the Latest Version | ||
|
||
After adding the APT repository, install avalanchego by running: | ||
After adding the APT repository, install `avalanchego` by running: | ||
|
||
```sh | ||
sudo apt update | ||
|
@@ -85,9 +87,9 @@ The Avalanche binary to be executed is named `avalanchego`. | |
|
||
### Docker Install | ||
|
||
Make sure docker is installed on the machine - so commands like `docker run` etc. are available. | ||
Make sure Docker is installed on the machine - so commands like `docker run` etc. are available. | ||
|
||
Building the docker image of latest avalanchego branch can be done by running: | ||
Building the Docker image of latest `avalanchego` branch can be done by running: | ||
|
||
```sh | ||
./scripts/build_image.sh | ||
|
@@ -99,7 +101,7 @@ To check the built image, run: | |
docker image ls | ||
``` | ||
|
||
The image should be tagged as `avaplatform/avalanchego:xxxxxxxx`, where `xxxxxxxx` is the shortened commit of the Avalanche source it was built from. To run the avalanche node, run: | ||
The image should be tagged as `avaplatform/avalanchego:xxxxxxxx`, where `xxxxxxxx` is the shortened commit of the Avalanche source it was built from. To run the Avalanche node, run: | ||
|
||
```sh | ||
docker run -ti -p 9650:9650 -p 9651:9651 avaplatform/avalanchego:xxxxxxxx /avalanchego/build/avalanchego | ||
|
@@ -133,7 +135,7 @@ See [this tutorial.](https://docs.avax.network/build/tutorials/platform/create-a | |
|
||
## Bootstrapping | ||
|
||
A node needs to catch up to the latest network state before it can participate in consensus and serve API calls. This process, called bootstrapping, currently takes several days for a new node connected to Mainnet. | ||
A node needs to catch up to the latest network state before it can participate in consensus and serve API calls. This process (called bootstrapping) currently takes several days for a new node connected to Mainnet. | ||
|
||
A node will not [report healthy](https://docs.avax.network/build/avalanchego-apis/health) until it is done bootstrapping. | ||
|
||
|
@@ -143,15 +145,15 @@ The bottleneck during bootstrapping is typically database IO. Using a more power | |
|
||
## Generating Code | ||
|
||
Avalanchego uses multiple tools to generate efficient and boilerplate code. | ||
AvalancheGo uses multiple tools to generate efficient and boilerplate code. | ||
|
||
### Running protobuf codegen | ||
|
||
To regenerate the protobuf go code, run `scripts/protobuf_codegen.sh` from the root of the repo. | ||
|
||
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.7.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.11.0), protoc-gen-go (v1.28.0) and protoc-gen-go-grpc (v1.2.0) installed. | ||
|
||
To install the buf dependencies: | ||
|
||
|
@@ -186,17 +188,28 @@ docker run -t -i -v $(pwd):/opt/avalanche -w/opt/avalanche avalanche:protobuf_co | |
|
||
### Running mock codegen | ||
|
||
Going forward, AvalancheGo will use [gomock](https://github.com/golang/mock) for mocking in unit tests. | ||
To regenerate the [gomock](https://github.com/golang/mock) code, run `scripts/mock.gen.sh` from the root of the repo. | ||
|
||
Example usage: | ||
This should only be necessary when modifying exported interfaces or after modifying `scripts/mock.mockgen.txt`. | ||
|
||
```sh | ||
mockgen -destination vms/platformvm/state/mock_diff.go -package state github.com/ava-labs/avalanchego/vms/platformvm/state Diff | ||
``` | ||
## Versioning | ||
|
||
### Version Semantics | ||
|
||
AvalancheGo is first and foremost a client for the Avalanche network. The versioning of AvalancheGo follows that of the Avalanche network. | ||
|
||
- `v0.x.x` indicates a development network version. | ||
- `v1.x.x` indicates a production network version. | ||
- `vx.[Upgrade].x` indicates the number of network upgrades that have occurred. | ||
- `vx.x.[Patch]` indicates the number of client upgrades that have occurred since the last network upgrade. | ||
|
||
### Library Compatibility Guarantees | ||
|
||
Because AvalancheGo's version denotes the network version, it is expected that interfaces exported by AvalancheGo's packages may change in `Patch` version updates. | ||
|
||
This makes a mock implementation of the `Diff` interface from `github.com/ava-labs/avalanchego/vms/platformvm/state`and puts it at `vms/platformvm/state/mock_diff.go`. The struct implementing the mock will be in the `state` package. | ||
### API Compatibility Guarantees | ||
|
||
See `gomock` documentation for more information. | ||
APIs exposed when running AvalancheGo will maintain backwards compatibility, unless the functionality is explicitly deprecated and announced when removed. | ||
|
||
## Supported Platforms | ||
|
||
|
@@ -232,4 +245,4 @@ To officially support a new platform, one must satisfy the following requirement | |
|
||
**We and our community welcome responsible disclosures.** | ||
|
||
If you've discovered a security vulnerability, please report it via our [bug bounty program](https://hackenproof.com/avalanche/). Valid reports will be eligible for a reward (terms and conditions apply). | ||
Please refer to our [Security Policy](SECURITY.md) and [Security Advisories](https://github.com/ava-labs/avalanchego/security/advisories). |
Oops, something went wrong.