Skip to content

Commit

Permalink
Update versions for v1.11.6 (#3047)
Browse files Browse the repository at this point in the history
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
  • Loading branch information
StephenButtolph and darioush committed May 23, 2024
1 parent c08fdae commit 944d3db
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 57 deletions.
122 changes: 122 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,127 @@
# Release Notes

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

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.5`.

### APIs

- Updated cache metrics:
- `*_cache_put_sum` was replaced with `*_cache_put_time`
- `*_cache_get_sum` was replaced with `*_cache_get_time`
- `*_cache_hit` and `*_cache_miss` were removed and `*_cache_get_count` added a `result` label
- Updated db metrics:
- `*_db_{method}_count` were replaced with `*_db_calls` with a `method` label
- `*_db_{method}_sum` were replaced with `*_db_duration` with a `method` label
- `*_db_{method}_size_count` were deleted
- `*_db_{method}_size_sum` were replaced with `*_db_size` with a `method` label
- Updated p2p message compression metrics:
- `avalanche_network_codec_{type}_{op}_{direction}_time_count` were replaced with `avalanche_network_codec_compressed_count` with `direction`, `op`, and `type` labels
- Updated p2p message metrics:
- `avalanche_network_{op}_{io}` were replaced with `avalanche_network_msgs` with `compressed:"false"`, `io`, and `op` labels
- `avalanche_network_{op}_{io}_bytes` were replaced with `avalanche_network_msgs_bytes` with `io` and `op` labels
- `avalanche_network_{op}_compression_saved_{io}_bytes_sum` were replaced with `avalanche_network_msgs_bytes_saved` with `io` and `op` labels
- `avalanche_network_{op}_compression_saved_{io}_bytes_count` were replaced with `avalanche_network_msgs` with `compressed:"true"`, `io`, and `op` labels
- `avalanche_network_{op}_failed` were replaced with `avalanche_network_msgs_failed_to_send` with an `op` label
- Updated p2p sdk message metrics:
- `*_p2p_{op}_count` were replaced with `*_p2p_msg_count` with an `op` label
- `*_p2p_{op}_time` were replaced with `*_p2p_msg_time` with an `op` label
- Updated consensus message queue metrics:
- `avalanche_{chainID}_handler_unprocessed_msgs_{op}` were replaced with `avalanche_{chainID}_handler_unprocessed_msgs_count` with an `op` label
- `avalanche_{chainID}_handler_async_unprocessed_msgs_{op}` were replaced with `avalanche_{chainID}_handler_unprocessed_msgs_count` with an `op` label
- Updated consensus handler metrics:
- `avalanche_{chainID}_handler_{op}_count` were replaced with `avalanche_{chainID}_handler_messages` with an `op` label
- `avalanche_{chainID}_handler_{op}_msg_handling_count` was deleted
- `avalanche_{chainID}_handler_{op}_msg_handling_sum` were replaced with `avalanche_{chainID}_handler_message_handling_time` with an `op` label
- `avalanche_{chainID}_handler_{op}_sum` were replaced with `avalanche_{chainID}_handler_locking_time`
- Updated consensus sender metrics:
- `avalanche_{chainID}_{op}_failed_benched` were replaced with `avalanche_{chainID}_failed_benched` with an `op` label
- Updated consensus latency metrics:
- `avalanche_{chainID}_lat_{op}_count` were replaced with `avalanche_{chainID}_response_messages` with an `op` label
- `avalanche_{chainID}_lat_{op}_sum` were replaced with `avalanche_{chainID}_response_message_latencies` with an `op` label
- Updated X-chain metrics:
- `avalanche_X_vm_avalanche_{tx}_txs_accepted` were replaced with `avalanche_X_vm_avalanche_txs_accepted` with a `tx` label
- Updated P-chain metrics:
- `avalanche_P_vm_{tx}_txs_accepted` were replaced with `avalanche_P_vm_txs_accepted` with a `tx` label
- `avalanche_P_vm_{blk}_blks_accepted` were replaced with `avalanche_P_vm_blks_accepted` with a `blk` label

### Fixes

- Fixed performance regression while executing blocks in bootstrapping
- Fixed peer connection tracking in the P-chain and C-chain to re-enable tx pull gossip
- Fixed C-chain deadlock while executing blocks in bootstrapping after aborting state sync
- Fixed negative ETA while fetching blocks after aborting state sync
- Fixed C-chain snapshot initialization after state sync
- Fixed panic when running avalanchego in environments with an incorrectly implemented monotonic clock
- Fixed memory corruption when accessing keys and values from released pebbledb iterators
- Fixed prefixdb compaction when specifying a `nil` limit

### What's Changed

- Consolidate record poll by @aaronbuchwald in https://github.com/ava-labs/avalanchego/pull/2970
- Update metercacher to use vectors by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2979
- Reduce p2p sdk metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2980
- Use vectors in message queue metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2985
- Use vectors for p2p message metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2983
- Simplify gossip metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2984
- Use vectors for message handler metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2987
- Use vector in message sender by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2988
- Simplify go version maintenance by @marun in https://github.com/ava-labs/avalanchego/pull/2977
- Use vector for router latency metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2989
- Use vectors for accepted tx and block metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2990
- fix: version application error by @jujube in https://github.com/ava-labs/avalanchego/pull/2995
- Chore: fix some typos. by @hattizai in https://github.com/ava-labs/avalanchego/pull/2993
- Cleanup meterdb metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2991
- Cleanup compression metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2992
- Fix antithesis image publication by @marun in https://github.com/ava-labs/avalanchego/pull/2998
- Remove unused `Metadata` struct by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3001
- prefixdb: fix bug with Compact nil limit by @a1k0n in https://github.com/ava-labs/avalanchego/pull/3000
- Update go version to 1.21.10 by @marun in https://github.com/ava-labs/avalanchego/pull/3004
- vms/txs/mempool: unify avm and platformvm mempool implementations by @lebdron in https://github.com/ava-labs/avalanchego/pull/2994
- Use gauges for time metrics by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3009
- Chore: fix typos. by @cocoyeal in https://github.com/ava-labs/avalanchego/pull/3010
- [antithesis] Refactor existing job to support xsvm test setup by @marun in https://github.com/ava-labs/avalanchego/pull/2976
- chore: fix some function names by @cartnavoy in https://github.com/ava-labs/avalanchego/pull/3015
- Mark nodes as connected to the P-chain networking stack by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/2981
- [antithesis] Ensure images with a prefix are pushed by @marun in https://github.com/ava-labs/avalanchego/pull/3016
- boostrapper: compact blocks before iterating them by @a1k0n in https://github.com/ava-labs/avalanchego/pull/2997
- Remove pre-Durango networking checks by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3018
- Repackaged upgrades times into upgrade package by @abi87 in https://github.com/ava-labs/avalanchego/pull/3019
- Standardize peer logs by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3017
- Fix pebbledb memory corruption by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3020
- [vms/avm] fix linter error in benchmark : Use of weak random number generator by @tsachiherman in https://github.com/ava-labs/avalanchego/pull/3023
- Simplify sampler interface by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3026
- [build] Update linter version by @tsachiherman in https://github.com/ava-labs/avalanchego/pull/3024
- fix broken link. by @cocoyeal in https://github.com/ava-labs/avalanchego/pull/3028
- `gossipping` -> `gossiping` by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3033
- [tmpnet] Ensure tmpnet compatibility with windows by @marun in https://github.com/ava-labs/avalanchego/pull/3002
- Fix negative ETA caused by rollback in vm.SetState by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3036
- [tmpnet] Enable single node networks by @marun in https://github.com/ava-labs/avalanchego/pull/3003
- P-chain - introducing fees calculators by @abi87 in https://github.com/ava-labs/avalanchego/pull/2698
- Change default staking key from RSA 4096 to secp256r1 by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3025
- Fix ACP links by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3037
- Prevent unnecessary bandwidth from activated ACPs by @dhrubabasu in https://github.com/ava-labs/avalanchego/pull/3031
- [antithesis] Add test setup for xsvm by @marun in https://github.com/ava-labs/avalanchego/pull/2982
- [antithesis] Ensure node image is pushed by @marun in https://github.com/ava-labs/avalanchego/pull/3042
- Cleanup fee config passing by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3043
- Fix typo fix by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3044
- Grab iterator at previously executed height by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3045
- Verify signatures during Parse by @StephenButtolph in https://github.com/ava-labs/avalanchego/pull/3046

### New Contributors

- @jujube made their first contribution in https://github.com/ava-labs/avalanchego/pull/2995
- @hattizai made their first contribution in https://github.com/ava-labs/avalanchego/pull/2993
- @a1k0n made their first contribution in https://github.com/ava-labs/avalanchego/pull/3000
- @lebdron made their first contribution in https://github.com/ava-labs/avalanchego/pull/2994
- @cocoyeal made their first contribution in https://github.com/ava-labs/avalanchego/pull/3010
- @cartnavoy made their first contribution in https://github.com/ava-labs/avalanchego/pull/3015
- @tsachiherman made their first contribution in https://github.com/ava-labs/avalanchego/pull/3023

**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.11.5...v1.11.6

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

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
37 changes: 25 additions & 12 deletions database/pebble/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ const (
// pebbleByteOverHead is the number of bytes of constant overhead that
// should be added to a batch size per operation.
pebbleByteOverHead = 8

defaultCacheSize = 512 * units.MiB
)

var (
_ database.Database = (*Database)(nil)

errInvalidOperation = errors.New("invalid operation")

defaultCacheSize = 512 * units.MiB
DefaultConfig = Config{
DefaultConfig = Config{
CacheSize: defaultCacheSize,
BytesPerSync: 512 * units.KiB,
WALBytesPerSync: 0, // Default to no background syncing.
Expand All @@ -53,13 +54,13 @@ type Database struct {
}

type Config struct {
CacheSize int `json:"cacheSize"`
BytesPerSync int `json:"bytesPerSync"`
WALBytesPerSync int `json:"walBytesPerSync"` // 0 means no background syncing
MemTableStopWritesThreshold int `json:"memTableStopWritesThreshold"`
MemTableSize int `json:"memTableSize"`
MaxOpenFiles int `json:"maxOpenFiles"`
MaxConcurrentCompactions int `json:"maxConcurrentCompactions"`
CacheSize int64 `json:"cacheSize"`
BytesPerSync int `json:"bytesPerSync"`
WALBytesPerSync int `json:"walBytesPerSync"` // 0 means no background syncing
MemTableStopWritesThreshold int `json:"memTableStopWritesThreshold"`
MemTableSize uint64 `json:"memTableSize"`
MaxOpenFiles int `json:"maxOpenFiles"`
MaxConcurrentCompactions int `json:"maxConcurrentCompactions"`
}

// TODO: Add metrics
Expand All @@ -72,7 +73,7 @@ func New(file string, configBytes []byte, log logging.Logger, _ string, _ promet
}

opts := &pebble.Options{
Cache: pebble.NewCache(int64(cfg.CacheSize)),
Cache: pebble.NewCache(cfg.CacheSize),
BytesPerSync: cfg.BytesPerSync,
Comparer: pebble.DefaultComparer,
WALBytesPerSync: cfg.WALBytesPerSync,
Expand Down Expand Up @@ -193,7 +194,10 @@ func (db *Database) Compact(start []byte, end []byte) error {
// keys but pebble treats a nil [limit] as a key before all keys in
// Compact. Use the greatest key in the database as the [limit] to get
// the desired behavior.
it := db.pebbleDB.NewIter(&pebble.IterOptions{})
it, err := db.pebbleDB.NewIter(&pebble.IterOptions{})
if err != nil {
return updateError(err)
}

if !it.Last() {
// The database is empty.
Expand Down Expand Up @@ -238,9 +242,18 @@ func (db *Database) NewIteratorWithStartAndPrefix(start, prefix []byte) database
}
}

it, err := db.pebbleDB.NewIter(keyRange(start, prefix))
if err != nil {
return &iter{
db: db,
closed: true,
err: updateError(err),
}
}

iter := &iter{
db: db,
iter: db.pebbleDB.NewIter(keyRange(start, prefix)),
iter: it,
}
db.openIterators.Add(iter)
return iter
Expand Down
29 changes: 16 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ go 1.21.10
require (
github.com/DataDog/zstd v1.5.2
github.com/NYTimes/gziphandler v1.1.1
github.com/ava-labs/coreth v0.13.4-0.20240506124912-82b6c4e91557
github.com/ava-labs/coreth v0.13.4-rc.0
github.com/ava-labs/ledger-avalanche/go v0.0.0-20231102202641-ae2ebdaeac34
github.com/btcsuite/btcd/btcutil v1.1.3
github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06
github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593
github.com/compose-spec/compose-go v1.20.2
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0
github.com/ethereum/go-ethereum v1.13.2
github.com/ethereum/go-ethereum v1.13.8
github.com/google/btree v1.1.2
github.com/google/renameio/v2 v2.0.0
github.com/google/uuid v1.6.0
Expand Down Expand Up @@ -72,37 +72,39 @@ require (
require (
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect
github.com/ethereum/c-kzg-4844 v0.3.1 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/frankban/quicktest v1.14.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
Expand All @@ -115,15 +117,15 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
Expand All @@ -134,8 +136,9 @@ require (
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sanity-io/litter v1.5.1 // indirect
Expand Down
Loading

0 comments on commit 944d3db

Please sign in to comment.