Skip to content

Cache BLS Keys #1445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/buf-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.11.0
- uses: bufbuild/buf-setup-action@v1.19.0
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/buf-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: buf-push

on:
push:
tags:
- "*"
branches:
- master
- dev
paths:
- "proto/**"

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-push-action@v1
with:
input: "proto"
buf_token: ${{ secrets.BUF_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
25 changes: 25 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run fuzz tests

on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
fuzz:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
ref: 'dev'
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.19.6'
check-latest: true
- name: Run fuzz tests
shell: bash
run: ./scripts/build_fuzz.sh 30 # Run each fuzz test 30 seconds
28 changes: 28 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '0 0 * * 0' # Run every day at midnight UTC on Sunday
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
# Overall configuration
operations-per-run: 100

# PR configuration
days-before-pr-stale: 30
stale-pr-message: 'This PR has become stale because it has been open for 30 days with no activity. Adding the `lifecycle/frozen` label will cause this PR to ignore lifecycle events.'
days-before-pr-close: -1
stale-pr-label: lifecycle/stale
exempt-pr-labels: lifecycle/frozen
close-pr-label: lifecycle/rotten

# Issue configuration
days-before-issue-stale: 60
stale-issue-message: 'This issue has become stale because it has been open 60 days with no activity. Adding the `lifecycle/frozen` label will cause this issue to ignore lifecycle events.'
days-before-issue-close: -1
stale-issue-label: lifecycle/stale
exempt-issue-labels: lifecycle/frozen
close-issue-label: lifecycle/rotten
7 changes: 3 additions & 4 deletions .github/workflows/test.upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- name: Build the avalanchego binary
shell: bash
run: ./scripts/build.sh
# TODO: re-activate this test after there is a compatible tag to use
# - name: Run upgrade tests
# shell: bash
# run: scripts/tests.upgrade.sh 1.9.0 ./build/avalanchego
- name: Run upgrade tests
shell: bash
run: scripts/tests.upgrade.sh 1.10.1 ./build/avalanchego
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ linters:
# - lll

linters-settings:
goimports:
local-prefixes: github.com/ava-labs/avalanchego
depguard:
list-type: blacklist
packages-with-error-message:
Expand All @@ -67,6 +69,9 @@ linters-settings:
forbid:
- 'require\.Error$(# ErrorIs should be used instead)?'
- 'require\.ErrorContains$(# ErrorIs should be used instead)?'
- 'require\.EqualValues$(# Equal should be used instead)?'
- 'require\.NotEqualValues$(# NotEqual should be used instead)?'
- '^(t|b|tb|f)\.(Fatal|Fatalf|Error|Errorf)$(# the require library should be used instead)?'
exclude_godoc_examples: false
# https://golangci-lint.run/usage/linters#gosec
gosec:
Expand Down
2 changes: 0 additions & 2 deletions LICENSE.header

This file was deleted.

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

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

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 supported plugin version is `26`.

**Users must specify the `--allowed-hosts-flag` to receive inbound API traffic from non-local hosts.**

### APIs

- Added health metrics based on tags
- `avalanche_health_checks_failing{tag="TAG"}`
- `avalanche_liveness_checks_failing{tag="TAG"}`
- `avalanche_readiness_checks_failing{tag="TAG"}`
- Removed P-chain VM percent connected metrics
- `avalanche_P_vm_percent_connected`
- `avalanche_P_vm_percent_connected_subnet{subnetID="SUBNETID"}`
- Added percent connected metrics by chain
- `avalanche_{ChainID}_percent_connected`
- Removed `avalanche_network_send_queue_portion_full` metric

### Configs

- Added `--http-allowed-hosts` with a default value of `localhost`
- Removed `--snow-mixed-query-num-push-vdr`
- Removed `--snow-mixed-query-num-push-non-vdr`
- Removed `minPercentConnectedStakeHealthy` from the subnet config

### Fixes

- Fixed `platformvm.GetValidatorSet` returning incorrect BLS public keys
- Fixed IPv6 literal binding with `--http-host`
- Fixed P2P message log format

### What's Changed

- `x/sync` -- Add proto for P2P messages by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/1472
- Bump Protobuf and tooling and add section to proto docs outlining buf publishing by @hexfusion in https://github.com/ava-labs/avalanchego/pull/1552
- Minor pchain UTs cleanup by @abi87 in https://github.com/ava-labs/avalanchego/pull/1554
- Add ping uptimes test by @ceyonur in https://github.com/ava-labs/avalanchego/pull/1550
- Add workflow to mark stale issues and PRs by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/1443
- Enforce inlining functions with a single error return in `require.NoError` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1500
- `x/sync` / `x/merkledb` -- add `SyncableDB` interface by @danlaine in https://github.com/ava-labs/avalanchego/pull/1555
- Rename beacon to boostrapper, define bootstrappers in JSON file for cross-language compatiblity by @gyuho in https://github.com/ava-labs/avalanchego/pull/1439
- add P-chain height indexing by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1447
- Add P-chain `GetBlockByHeight` API method by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1448
- `x/sync` -- use for sending Range Proofs by @danlaine in https://github.com/ava-labs/avalanchego/pull/1537
- Add test to ensure that database packing produces sorted values by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1560
- Randomize unit test execution order to identify unwanted dependency by @marun in https://github.com/ava-labs/avalanchego/pull/1565
- use `http.Error` instead of separately writing error code and message by @danlaine in https://github.com/ava-labs/avalanchego/pull/1564
- Adding allowed http hosts flag by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/1566
- `x/sync` -- Use proto for sending Change Proofs by @danlaine in https://github.com/ava-labs/avalanchego/pull/1541
- Only send `PushQuery` messages after building the block by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/1428
- Rename APIAllowedOrigins to HTTPAllowedOrigins by @joshua-kim in https://github.com/ava-labs/avalanchego/pull/1567
- Add GetBalance examples for the P-chain and X-chain wallets by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1569
- Reduce number of test iterations by @danlaine in https://github.com/ava-labs/avalanchego/pull/1568
- Re-add upgrade tests by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1410
- Remove lists from Chits messages by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1412
- Add more X-chain tests by @coffeeavax in https://github.com/ava-labs/avalanchego/pull/1487
- fix typo by @meaghanfitzgerald in https://github.com/ava-labs/avalanchego/pull/1570
- Reduce the number of test health checks by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1571
- Fix proposervm.GetAncestors test flake by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1572
- Remove list from AcceptedFrontier message by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1578
- Remove version db from merkle db by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/1534
- `MerkleDB` -- add eviction batch size config by @danlaine in https://github.com/ava-labs/avalanchego/pull/1586
- `MerkleDB` -- fix `onEvictCache.Flush` by @danlaine in https://github.com/ava-labs/avalanchego/pull/1589
- Revert P-Chain height index by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1591
- `x/sync` -- Add `SyncableDB` proto by @danlaine in https://github.com/ava-labs/avalanchego/pull/1559
- Clarify break on error during ancestors lookup by @hexfusion in https://github.com/ava-labs/avalanchego/pull/1580
- Add buf-push github workflow by @hexfusion in https://github.com/ava-labs/avalanchego/pull/1556
- Pchain bls key diff fix by @abi87 in https://github.com/ava-labs/avalanchego/pull/1584
- Cleanup fx interface compliance by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1599
- Improve metrics error msging by @anusha-ctrl in https://github.com/ava-labs/avalanchego/pull/1598
- Separate health checks by tags by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1579
- Separate subnet stake connected health and metrics from P-chain by @ceyonur in https://github.com/ava-labs/avalanchego/pull/1358
- Merkle db iterator by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/1533
- Fix unreadable message errors by @morrisettjohn in https://github.com/ava-labs/avalanchego/pull/1585
- Log unexpected errors during GetValidatorSet by @hexfusion in https://github.com/ava-labs/avalanchego/pull/1592
- `merkleDB` -- add inner heap type to syncWorkHeap by @danlaine in https://github.com/ava-labs/avalanchego/pull/1582
- `sync` -- explain algorithm in readme by @danlaine in https://github.com/ava-labs/avalanchego/pull/1600
- Rename license header file to avoid unintended license indexing by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1608
- `merkledb` and `sync` -- use time based rand seed by @danlaine in https://github.com/ava-labs/avalanchego/pull/1607
- add `local-prefixes` setting for `goimports` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1612
- snow/engine/snowman: instantiate voter after issuer by @gyuho in https://github.com/ava-labs/avalanchego/pull/1610
- Update CodeQL to v2 by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1616
- Remove old networking metric by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1619
- Fix --http-host flag to support IPv6 by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1620

### New Contributors

- @marun made their first contribution in https://github.com/ava-labs/avalanchego/pull/1565
- @meaghanfitzgerald made their first contribution in https://github.com/ava-labs/avalanchego/pull/1570
- @anusha-ctrl made their first contribution in https://github.com/ava-labs/avalanchego/pull/1598
- @morrisettjohn made their first contribution in https://github.com/ava-labs/avalanchego/pull/1585

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.10.2...v1.10.3

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

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 supported plugin version is `26`.

### APIs

- Significantly improved the performance of `platform.getStake`
- Added `portion_filled` metric for all metered caches
- Added resource metrics by process
- `avalanche_system_resources_num_cpu_cycles`
- `avalanche_system_resources_num_disk_read_bytes`
- `avalanche_system_resources_num_disk_reads`
- `avalanche_system_resources_num_disk_write_bytes`
- `avalanche_system_resources_num_disk_writes`

### Configs

- Deprecated `--genesis` in favor of `--genesis-file`
- Deprecated `--genesis-content` in favor of `--genesis-file-content`
- Deprecated `--inbound-connection-throttling-cooldown` in favor of `--network-inbound-connection-throttling-cooldown`
- Deprecated `--inbound-connection-throttling-max-conns-per-sec` in favor of `--network-inbound-connection-throttling-max-conns-per-sec`
- Deprecated `--outbound-connection-throttling-rps` in favor of `--network-outbound-connection-throttling-rps`
- Deprecated `--outbound-connection-timeout` in favor of `--network-outbound-connection-timeout`
- Deprecated `--staking-enabled` in favor of `--sybil-protection-enabled`
- Deprecated `--staking-disabled-weight` in favor of `--sybil-protection-disabled-weight`
- Deprecated `--consensus-gossip-frequency` in favor of `--consensus-accepted-frontier-gossip-frequency`

### Fixes

- Fixed `--network-compression-type` to correctly honor the requested compression type, rather than always using gzip
- Fixed CPU metrics on macos

### What's Changed

- use `require` library functions in tests by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1451
- style nits in vm clients by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1449
- utils/logging: add "Enabled" method to remove redundant verbo logs by @gyuho in https://github.com/ava-labs/avalanchego/pull/1461
- ban `require.EqualValues` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1457
- chains: do not hold write subnetsLock in health checks by @gyuho in https://github.com/ava-labs/avalanchego/pull/1460
- remove zstd check by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1459
- use `require.IsType` for type assertions in tests by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1458
- vms/platformvm/service: nits (preallocate address slice, error msg) by @gyuho in https://github.com/ava-labs/avalanchego/pull/1477
- ban `require.NotEqualValues` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1470
- use `require` in `api` and `utils/password` packages by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1471
- use "golang.org/x/term" as "golang.org/x/crypto/ssh/terminal" is deprecated by @gyuho in https://github.com/ava-labs/avalanchego/pull/1464
- chains: move "msgChan" closer to the first use (readability) by @gyuho in https://github.com/ava-labs/avalanchego/pull/1484
- ban function params for `require.ErrorIs` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1486
- standardize imports by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1466
- fix license header test by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1492
- use blank identifier for interface compliance by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1493
- codec: remove "SetMaxSize" from "Manager", remove unnecessary lock by @gyuho in https://github.com/ava-labs/avalanchego/pull/1481
- config: disallow "ThrottlerConfig.MaxRecheckDelay" < 1 ms by @gyuho in https://github.com/ava-labs/avalanchego/pull/1435
- ban `require.Equal` when testing for `0` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1495
- Clean up MerkleDVB Sync Close lock by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/1469
- MerkleDB Cleanup by @dboehm-avalabs in https://github.com/ava-labs/avalanchego/pull/1465
- Remove comment referencing old IP based tracking by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1509
- ban usage of `require.Len` when testing for length `0` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1496
- ban usage of `require.Equal` when testing for length by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1497
- ban usage of `nil` in require functions by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/1498
- Sized LRU cache by @abi87 in https://github.com/ava-labs/avalanchego/pull/1517
- engine/snowman: clean up some comments in "bubbleVotes" unit tests by @gyuho in https://github.com/ava-labs/avalanchego/pull/1444
- snow/networking/sender: add missing verbo check by @gyuho in https://github.com/ava-labs/avalanchego/pull/1504
- Delete duplicate test var definitions by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1518
- utils/bag: print generic type for bag elements by @gyuho in https://github.com/ava-labs/avalanchego/pull/1507
- Fix incorrect test refactor by @abi87 in https://github.com/ava-labs/avalanchego/pull/1526
- Pchain validators repackaging by @abi87 in https://github.com/ava-labs/avalanchego/pull/1284
- Config overhaul by @ceyonur in https://github.com/ava-labs/avalanchego/pull/1370
- rename enabled staking to sybil protection enabled by @ceyonur in https://github.com/ava-labs/avalanchego/pull/1441
- Fix network compression type flag usage by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1532
- Deprecate uptimes in pong message by @ceyonur in https://github.com/ava-labs/avalanchego/pull/1362
- Add CPU cycles and number of disk read/write metrics by pid by @coffeeavax in https://github.com/ava-labs/avalanchego/pull/1334
- Fetch process resource stats as best-effort by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1543
- Add serialization tests for transactions added in Banff by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1513
- Log chain shutdown duration by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/1545
- add interface for MerkleDB by @danlaine in https://github.com/ava-labs/avalanchego/pull/1519

### New Contributors

- @gyuho made their first contribution in https://github.com/ava-labs/avalanchego/pull/1461
- @coffeeavax made their first contribution in https://github.com/ava-labs/avalanchego/pull/1334

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.10.1...v1.10.2

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

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 supported plugin version is `26`.
Expand Down
Loading