Skip to content

Commit

Permalink
Merge branch 'master' into pchain_drop_getTx_from_execution_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 authored Jul 4, 2024
2 parents ec4426c + 0bc4617 commit 0dbabd7
Show file tree
Hide file tree
Showing 115 changed files with 1,172 additions and 746 deletions.
5 changes: 5 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
self-hosted-runner:
labels:
- custom-arm64-focal
- custom-arm64-jammy
- net-outage-sim
8 changes: 4 additions & 4 deletions .github/workflows/build-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create tgz package structure and upload to S3
Expand Down Expand Up @@ -101,14 +101,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create tgz package structure and upload to S3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create zip file
run: 7z a avalanchego-macos-${TAG}.zip build/avalanchego
run: 7z a "avalanchego-macos-${TAG}.zip" build/avalanchego
env:
TAG: ${{ env.TAG }}

Expand All @@ -63,7 +63,7 @@ jobs:
aws-region: us-east-1

- name: Upload file to S3
run: aws s3 cp avalanchego-macos-${{ env.TAG }}.zip s3://${BUCKET}/macos/
run: aws s3 cp avalanchego-macos-${{ env.TAG }}.zip "s3://${BUCKET}/macos/"
env:
BUCKET: ${{ secrets.BUCKET }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-public-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ jobs:
- name: Install aws cli
run: |
sudo apt update
sudo apt-get -y install python3-boto3=${PYTHON3_BOTO3_VERSION}
sudo apt-get -y install python3-boto3="${PYTHON3_BOTO3_VERSION}"
- name: Get the tag
id: get_tag
run: |
if [[ ${{ github.event_name }} == 'push' ]];
then
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
else
echo "TAG=${{ inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ inputs.tag }}" >> "$GITHUB_ENV"
fi
shell: bash

- name: Set whether to skip ami creation in packer
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "Setting SKIP_CREATE_AMI to False"
echo "SKIP_CREATE_AMI=False" >> $GITHUB_ENV
echo "SKIP_CREATE_AMI=False" >> "$GITHUB_ENV"
fi
- name: Configure AWS credentials
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-ubuntu-amd64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create debian package
Expand Down Expand Up @@ -88,14 +88,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Configure AWS credentials
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-ubuntu-arm64-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create debian package
Expand Down Expand Up @@ -96,14 +96,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

- name: Create debian package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-win-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:
if: "${{ github.event.inputs.tag == '' }}"
id: get_tag_from_git
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
shell: bash

- name: Try to get tag from workflow dispatch
if: "${{ github.event.inputs.tag != '' }}"
id: get_tag_from_workflow
run: |
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
echo "TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
shell: bash

# Runs a single command using the runners shell
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set timeout on Windows # Windows UT run slower and need a longer timeout
shell: bash
if: matrix.os == 'windows-2022'
run: echo "TIMEOUT=240s" >> $GITHUB_ENV
run: echo "TIMEOUT=240s" >> "$GITHUB_ENV"
- name: build_test
shell: bash
run: ./scripts/build_test.sh
Expand Down Expand Up @@ -213,6 +213,9 @@ jobs:
- name: Run shellcheck
shell: bash
run: scripts/shellcheck.sh
- name: Run actionlint
shell: bash
run: scripts/actionlint.sh
buf-lint:
name: Protobuf Lint
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_antithesis_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
run: bash -x ./scripts/build_antithesis_images.sh
env:
IMAGE_PREFIX: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}
TAG: ${{ github.events.inputs.image_tag || 'latest' }}
TAG: ${{ github.event.inputs.image_tag || 'latest' }}
TEST_SETUP: avalanchego

- name: Build and push images for xsvm test setup
run: bash -x ./scripts/build_antithesis_images.sh
env:
IMAGE_PREFIX: ${{ env.REGISTRY }}/${{ env.REPOSITORY }}
TAG: ${{ github.events.inputs.image_tag || 'latest' }}
TAG: ${{ github.event.inputs.image_tag || 'latest' }}
TEST_SETUP: xsvm
22 changes: 12 additions & 10 deletions .github/workflows/trigger-antithesis-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ on:
type: string

jobs:
Run Antithesis Avalanchego Test Setup:
antithesis_avalanchego:
name: Run Antithesis Avalanchego Test Setup
runs-on: ubuntu-latest
steps:
- uses: antithesishq/[email protected]
Expand All @@ -31,12 +32,13 @@ jobs:
username: ${{ secrets.ANTITHESIS_USERNAME }}
password: ${{ secrets.ANTITHESIS_PASSWORD }}
github_token: ${{ secrets.ANTITHESIS_GH_PAT }}
config_image: antithesis-avalanchego-config@${{ github.events.inputs.image_tag }}
images: antithesis-avalanchego-workload@${{ github.events.inputs.image_tag }};antithesis-avalanchego-node@${{ github.events.inputs.image_tag }}
email_recipients: ${{ github.events.inputs.recipients }}
config_image: antithesis-avalanchego-config@${{ github.event.inputs.image_tag || 'latest' }}
images: antithesis-avalanchego-workload@${{ github.event.inputs.image_tag || 'latest' }};antithesis-avalanchego-node@${{ github.event.inputs.image_tag || 'latest' }}
email_recipients: ${{ github.event.inputs.recipients || secrets.ANTITHESIS_RECIPIENTS }}
additional_parameters: |-
custom.duration=${{ github.events.inputs.duration }}
Run Antithesis XSVM Test Setup:
custom.duration=${{ github.event.inputs.duration || '0.5' }}
antithesis_xsvm:
name: Run Antithesis XSVM Test Setup
runs-on: ubuntu-latest
steps:
- uses: antithesishq/[email protected]
Expand All @@ -46,8 +48,8 @@ jobs:
username: ${{ secrets.ANTITHESIS_USERNAME }}
password: ${{ secrets.ANTITHESIS_PASSWORD }}
github_token: ${{ secrets.ANTITHESIS_GH_PAT }}
config_image: antithesis-xsvm-config@${{ github.events.inputs.image_tag }}
images: antithesis-xsvm-workload@${{ github.events.inputs.image_tag }};antithesis-xsvm-node@${{ github.events.inputs.image_tag }}
email_recipients: ${{ github.events.inputs.recipients }}
config_image: antithesis-xsvm-config@${{ github.event.inputs.image_tag || 'latest' }}
images: antithesis-xsvm-workload@${{ github.event.inputs.image_tag || 'latest' }};antithesis-xsvm-node@${{ github.event.inputs.image_tag || 'latest' }}
email_recipients: ${{ github.event.inputs.recipients || secrets.ANTITHESIS_RECIPIENTS }}
additional_parameters: |-
custom.duration=${{ github.events.inputs.duration }}
custom.duration=${{ github.event.inputs.duration || '0.5' }}
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.21.11
- Golang version >= 1.21.12
- gcc
- g++

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.21.11
- [Go](https://golang.org/doc/install) version >= 1.21.12
- [gcc](https://gcc.gnu.org/)
- g++

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

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

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

The plugin version is unchanged at `35` and is compatible with versions `v1.11.3-v1.11.8`.

### APIs

- Updated health metrics to use labels rather than namespaces
- Added consensus poll termination metrics

### Configs

- Added `--version-json` flag to output version information in json format

### Fixes

- Fixed incorrect WARN log that could previously be emitted during start on nodes with slower disks
- Fixed incorrect ERROR log that could previously be emitted if a peer tracking a subnet connects during shutdown
- Fixed ledger dependency on erased commit
- Fixed protobuf dependency to resolve compilation issues in some cases
- Fixed C-chain filename logging

### What's Changed

- Error driven snowflake multi counter by @aaronbuchwald in https://github.com/ava-labs/avalanchego/pull/3092
- [antithesis] Add ci jobs to trigger test runs by @marun in https://github.com/ava-labs/avalanchego/pull/3076
- bump ledger-avalanche dependency to current main branch by @felipemadero in https://github.com/ava-labs/avalanchego/pull/3115
- [antithesis] Fix image publication job by quoting default tag value by @marun in https://github.com/ava-labs/avalanchego/pull/3112
- [e2e] Fix excessively verbose output from virtuous test by @marun in https://github.com/ava-labs/avalanchego/pull/3116
- Remove .Status() from .IsPreferred() by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3111
- Add early termination metrics case by case by @aaronbuchwald in https://github.com/ava-labs/avalanchego/pull/3093
- Update C-chain wallet context by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3118
- Standardize wallet tx acceptance polling by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3110
- [antithesis] Remove assertions incompatible with fault injection by @marun in https://github.com/ava-labs/avalanchego/pull/3104
- Use health labels by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3122
- Remove `Decided` from the `Consensus` interface by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3123
- Remove .Status() from .Accepted() by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3124
- Refactor `event.Blocker` into `job.Scheduler` by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3125
- Remove block lookup from `deliver` by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3130
- [chains/atomic] Remove a nested if statement by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3135
- [vms/platformvm] Minor grammer fixes in `state` struct code comments by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3136
- bump protobuf (fixes some build issues) by @darioush in https://github.com/ava-labs/avalanchego/pull/3142
- Emit version in JSON format for --json-version by @marun in https://github.com/ava-labs/avalanchego/pull/3129
- Repackaged NextBlockTime and GetNextStakerChangeTime by @abi87 in https://github.com/ava-labs/avalanchego/pull/3134
- [vms/platformvm] Cleanup execution config tests by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3137
- [tmpnet] Enable bootstrap of subnets with disjoint validator sets by @marun in https://github.com/ava-labs/avalanchego/pull/3138
- Simplify dependency registration by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3139
- Replace `wasIssued` with `shouldIssueBlock` by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3131
- Remove parent lookup from issue by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3132
- Remove status usage from consensus by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3140
- Fix bootstrapping warn log by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/3156
- chore: fix some comment by @hattizai in https://github.com/ava-labs/avalanchego/pull/3144
- [ci] Add actionlint job by @marun in https://github.com/ava-labs/avalanchego/pull/3160
- check router is closing in requests by @ceyonur in https://github.com/ava-labs/avalanchego/pull/3157
- Use `ids.Empty` instead of `ids.ID{}` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3166
- Replace usage of utils.Err with errors.Join by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/3167

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.11.8...v1.11.9

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

This version is backwards compatible to [v1.11.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.11.0). It is optional, but encouraged.
Expand Down
5 changes: 2 additions & 3 deletions api/server/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
package server

import (
"errors"
"net/http"
"time"

"github.com/prometheus/client_golang/prometheus"

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

type metrics struct {
Expand Down Expand Up @@ -43,7 +42,7 @@ func newMetrics(registerer prometheus.Registerer) (*metrics, error) {
),
}

err := utils.Err(
err := errors.Join(
registerer.Register(m.numProcessing),
registerer.Register(m.numCalls),
registerer.Register(m.totalDuration),
Expand Down
6 changes: 3 additions & 3 deletions cache/metercacher/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package metercacher

import (
"github.com/prometheus/client_golang/prometheus"
"errors"

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

const (
Expand Down Expand Up @@ -78,7 +78,7 @@ func newMetrics(
Help: "fraction of cache filled",
}),
}
return m, utils.Err(
return m, errors.Join(
reg.Register(m.getCount),
reg.Register(m.getTime),
reg.Register(m.putCount),
Expand Down
2 changes: 1 addition & 1 deletion chains/test_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (testManager) StartChainCreator(ChainParameters) error {
}

func (testManager) SubnetID(ids.ID) (ids.ID, error) {
return ids.ID{}, nil
return ids.Empty, nil
}

func (testManager) IsBootstrapped(ids.ID) bool {
Expand Down
Loading

0 comments on commit 0dbabd7

Please sign in to comment.