diff --git a/RELEASES.md b/RELEASES.md index a7c232d7674b..89d9f4d6c0e5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,58 @@ # Release Notes +## [v1.10.18](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.18) + +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 plugin version is updated to `31` all plugins must update to be compatible. + +### APIs + +- Added `info.acps` API +- Added `supportedACPs` and `objectedACPs` for each peer returned by `info.peers` +- Added `txs` field to `BanffProposalBlock`'s json format +- Renamed metrics related to message handling + - `version` -> `handshake` + - `appRequestFailed` -> `appError` + - `crossChainAppRequestFailed` -> `crossChainAppError` +- Converted p2p SDK metrics to use vectors rather than independent metrics +- Converted client name reported over the p2p network from `avalanche` to `avalanchego` + + +### Configs + +- Added: + - `--acp-support` + - `--acp-object` + - `network` to the X-chain and P-chain configs including: + - `max-validator-set-staleness` + - `target-gossip-size` + - `pull-gossip-poll-size` + - `pull-gossip-frequency` + - `pull-gossip-throttling-period` + - `pull-gossip-throttling-limit` + - `expected-bloom-filter-elements` + - `expected-bloom-filter-false-positive-probability` + - `max-bloom-filter-false-positive-probability` + - `legacy-push-gossip-cache-size` + +### Fixes + +- Fixed `platformvm.SetPreference` to correctly reset the block building timer +- Fixed early bootstrapping termination +- Fixed duplicated transaction initialization in the X-chain and P-chain +- Updated `golang.org/x/exp` dependency to fix downstream compilation errors +- Updated `golang.org/x/crypto` dependency to address `CVE-2023-48795` +- Updated minimum golang version to address `CVE-2023-39326` +- Restricted `GOPROXY` during compilation to avoid `direct` version control fallbacks +- Fixed `merkledb` deletion of the empty key +- Fixed `merkledb` race condition when interacting with invalidated or closed trie views +- Fixed `json.Marshal` for `wallet` transactions + +### What's Changed + +**Full Changelog**: https://github.com/ava-labs/avalanchego/compare/v1.10.17...v1.10.18 + ## [v1.10.17](https://github.com/ava-labs/avalanchego/releases/tag/v1.10.17) 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. diff --git a/utils/sorting_test.go b/utils/sorting_test.go index 019834907686..354c6f659caf 100644 --- a/utils/sorting_test.go +++ b/utils/sorting_test.go @@ -14,14 +14,7 @@ var _ Sortable[sortable] = sortable(0) type sortable int func (s sortable) Compare(other sortable) int { - switch { - case s < other: - return -1 - case s > other: - return 1 - default: - return 0 - } + return Compare(s, other) } func TestSortSliceSortable(t *testing.T) { diff --git a/version/compatibility.json b/version/compatibility.json index d34dfb1a5a28..e975f92c3698 100644 --- a/version/compatibility.json +++ b/version/compatibility.json @@ -1,4 +1,7 @@ { + "31": [ + "v1.10.18" + ], "30": [ "v1.10.15", "v1.10.16", diff --git a/version/constants.go b/version/constants.go index 069868162094..dc148e52b5eb 100644 --- a/version/constants.go +++ b/version/constants.go @@ -15,9 +15,10 @@ import ( const ( Client = "avalanchego" - // RPCChainVMProtocol should be bumped anytime changes are made which require - // the plugin vm to upgrade to latest avalanchego release to be compatible. - RPCChainVMProtocol uint = 30 + // RPCChainVMProtocol should be bumped anytime changes are made which + // require the plugin vm to upgrade to latest avalanchego release to be + // compatible. + RPCChainVMProtocol uint = 31 ) // These are globals that describe network upgrades and node versions @@ -25,7 +26,7 @@ var ( Current = &Semantic{ Major: 1, Minor: 10, - Patch: 17, + Patch: 18, } CurrentApp = &Application{ Name: Client, diff --git a/vms/avm/block/executor/block.go b/vms/avm/block/executor/block.go index 439e7f009d53..7b3d0dce4276 100644 --- a/vms/avm/block/executor/block.go +++ b/vms/avm/block/executor/block.go @@ -290,6 +290,8 @@ func (b *Block) Reject(context.Context) error { } } + b.manager.mempool.RequestBuildBlock() + b.rejected = true return nil } diff --git a/vms/avm/block/executor/block_test.go b/vms/avm/block/executor/block_test.go index da965884ae58..a235377164b9 100644 --- a/vms/avm/block/executor/block_test.go +++ b/vms/avm/block/executor/block_test.go @@ -857,6 +857,7 @@ func TestBlockReject(t *testing.T) { mempool := mempool.NewMockMempool(ctrl) mempool.EXPECT().Add(validTx).Return(nil) // Only add the one that passes verification + mempool.EXPECT().RequestBuildBlock() preferredID := ids.GenerateTestID() mockPreferredState := state.NewMockDiff(ctrl) @@ -916,6 +917,7 @@ func TestBlockReject(t *testing.T) { mempool := mempool.NewMockMempool(ctrl) mempool.EXPECT().Add(tx1).Return(nil) mempool.EXPECT().Add(tx2).Return(nil) + mempool.EXPECT().RequestBuildBlock() preferredID := ids.GenerateTestID() mockPreferredState := state.NewMockDiff(ctrl) diff --git a/vms/avm/network/network.go b/vms/avm/network/network.go index 9057ba1df346..1a6c69b121c3 100644 --- a/vms/avm/network/network.go +++ b/vms/avm/network/network.go @@ -204,8 +204,7 @@ func (n *Network) AppGossip(ctx context.Context, nodeID ids.NodeID, msgBytes []b return nil } - err = n.mempool.Add(tx) - if err == nil { + if err := n.mempool.Add(tx); err == nil { txID := tx.ID() n.txPushGossiper.Add(tx) if err := n.txPushGossiper.Gossip(ctx); err != nil { diff --git a/vms/platformvm/block/executor/verifier.go b/vms/platformvm/block/executor/verifier.go index f16816d81db7..59209b65d8dc 100644 --- a/vms/platformvm/block/executor/verifier.go +++ b/vms/platformvm/block/executor/verifier.go @@ -51,7 +51,8 @@ func (v *verifier) BanffCommitBlock(b *block.BanffCommitBlock) error { } func (v *verifier) BanffProposalBlock(b *block.BanffProposalBlock) error { - if !v.txExecutorBackend.Config.IsDurangoActivated(b.Timestamp()) && len(b.Transactions) != 0 { + nextChainTime := b.Timestamp() + if !v.txExecutorBackend.Config.IsDurangoActivated(nextChainTime) && len(b.Transactions) != 0 { return errBanffProposalBlockWithMultipleTransactions } @@ -66,7 +67,6 @@ func (v *verifier) BanffProposalBlock(b *block.BanffProposalBlock) error { } // Apply the changes, if any, from advancing the chain time. - nextChainTime := b.Timestamp() changes, err := executor.AdvanceTimeTo( v.txExecutorBackend, onDecisionState, @@ -219,7 +219,7 @@ func (v *verifier) ApricotAtomicBlock(b *block.ApricotAtomicBlock) error { atomicExecutor.OnAccept.AddTx(b.Tx, status.Committed) - if err := v.verifyUniqueInputs(b.Parent(), atomicExecutor.Inputs); err != nil { + if err := v.verifyUniqueInputs(parentID, atomicExecutor.Inputs); err != nil { return err }