Skip to content

Commit

Permalink
WIP: Merge branch 'p-chainin_meter_fees' into p-chain_units-fees-update
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed May 23, 2024
2 parents b9ca2b7 + 2cd621a commit 6750a6a
Show file tree
Hide file tree
Showing 59 changed files with 899 additions and 1,155 deletions.
18 changes: 9 additions & 9 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,13 @@ The plugin version is updated to `34` all plugins must update to be compatible.

This upgrade consists of the following Avalanche Community Proposals (ACPs):

- [ACP-23](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/23-p-chain-native-transfers.md) P-Chain Native Transfers
- [ACP-24](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/24-shanghai-eips.md) Activate Shanghai EIPs on C-Chain
- [ACP-25](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/25-vm-application-errors.md) Virtual Machine Application Errors
- [ACP-30](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/30-avalanche-warp-x-evm.md) Integrate Avalanche Warp Messaging into the EVM
- [ACP-31](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/31-enable-subnet-ownership-transfer.md) Enable Subnet Ownership Transfer
- [ACP-41](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/41-remove-pending-stakers.md) Remove Pending Stakers
- [ACP-62](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/62-disable-addvalidatortx-and-adddelegatortx.md) Disable AddValidatorTx and AddDelegatorTx
- [ACP-23](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/23-p-chain-native-transfers/README.md) P-Chain Native Transfers
- [ACP-24](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/24-shanghai-eips/README.md) Activate Shanghai EIPs on C-Chain
- [ACP-25](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/25-vm-application-errors/README.md) Virtual Machine Application Errors
- [ACP-30](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/30-avalanche-warp-x-evm/README.md) Integrate Avalanche Warp Messaging into the EVM
- [ACP-31](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/31-enable-subnet-ownership-transfer/README.md) Enable Subnet Ownership Transfer
- [ACP-41](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/41-remove-pending-stakers/README.md) Remove Pending Stakers
- [ACP-62](https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/62-disable-addvalidatortx-and-adddelegatortx/README.md) Disable AddValidatorTx and AddDelegatorTx

The changes in the upgrade go into effect at 11 AM ET (4 PM UTC) on Wednesday, March 6th, 2024 on Mainnet.

Expand Down Expand Up @@ -3018,7 +3018,7 @@ This version is backwards compatible to [v1.7.0](https://github.com/ava-labs/ava

### Networking

- Reduced default peerlist and accepted frontier gossipping
- Reduced default peerlist and accepted frontier gossiping
- Increased the default at-large outbound buffer size to 32 MiB

### Metrics
Expand Down Expand Up @@ -3100,7 +3100,7 @@ This version is backwards compatible to [v1.7.0](https://github.com/ava-labs/ava
- Added `--snow-mixed-query-num-push-vdr` and `--snow-mixed-query-num-push-non-vdr` to allow parameterization of sending push queries
- By default, non-validators now send only pull queries, not push queries.
- By default, validators now send both pull queries and push queries upon inserting a container into consensus. Previously, nodes sent only push queries.
- Added metrics to track the amount of over gossipping of `peerlist` messages
- Added metrics to track the amount of over gossiping of `peerlist` messages
- Added custom message queueing support to outbound `Peer` messages
- Reused `Ping` messages to avoid needless memory allocations

Expand Down
2 changes: 1 addition & 1 deletion api/admin/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Now, calls to the X-Chain can be made to either `/ext/bc/X` or, equivalently, to

Give a blockchain an alias, a different name that can be used any place the blockchain’s ID is used.

:::note Aliasing a chain can also be done via the [Node API](https://docs.avax.network/nodes/configure/avalanchego-config-flags.md#--chain-aliases-file-string).
:::note Aliasing a chain can also be done via the [Node API](/nodes/configure/avalanchego-config-flags.md#--chain-aliases-file-string).
Note that the alias is set for each chain on each node individually. In a multi-node Subnet, the
same alias should be configured on each node to use an alias across a Subnet successfully. Setting
an alias for a chain on one node does not register that alias with other nodes automatically.
Expand Down
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ func getNetworkConfig(
// peers that we support these upgrades.
supportedACPs.Union(constants.ScheduledACPs)

// To decrease unnecessary network traffic, peers will not be notified of
// objection or support of activated ACPs.
supportedACPs.Difference(constants.ActivatedACPs)
objectedACPs.Difference(constants.ActivatedACPs)

config := network.Config{
ThrottlerConfig: network.ThrottlerConfig{
MaxInboundConnsPerSec: maxInboundConnsPerSec,
Expand Down
110 changes: 0 additions & 110 deletions network/certs_test.go

This file was deleted.

22 changes: 17 additions & 5 deletions network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package network
import (
"context"
"crypto"
"crypto/rsa"
"net"
"sync"
"testing"
Expand Down Expand Up @@ -166,13 +165,19 @@ func newTestNetwork(t *testing.T, count int) (*testDialer, []*testListener, []id
)
for i := 0; i < count; i++ {
ip, listener := dialer.NewListener()
nodeID, tlsCert, tlsConfig := getTLS(t, i)

tlsCert, err := staking.NewTLSCert()
require.NoError(t, err)

cert, err := staking.ParseCertificate(tlsCert.Leaf.Raw)
require.NoError(t, err)
nodeID := ids.NodeIDFromCert(cert)

blsKey, err := bls.NewSecretKey()
require.NoError(t, err)

config := defaultConfig
config.TLSConfig = tlsConfig
config.TLSConfig = peer.TLSConfig(*tlsCert, nil)
config.MyNodeID = nodeID
config.MyIPPort = ip
config.TLSKey = tlsCert.PrivateKey.(crypto.Signer)
Expand Down Expand Up @@ -399,7 +404,14 @@ func TestTrackVerifiesSignatures(t *testing.T) {
_, networks, wg := newFullyConnectedTestNetwork(t, []router.InboundHandler{nil})

network := networks[0]
nodeID, tlsCert, _ := getTLS(t, 1)

tlsCert, err := staking.NewTLSCert()
require.NoError(err)

cert, err := staking.ParseCertificate(tlsCert.Leaf.Raw)
require.NoError(err)
nodeID := ids.NodeIDFromCert(cert)

require.NoError(network.config.Validators.AddStaker(constants.PrimaryNetworkID, nodeID, nil, ids.Empty, 1))

stakingCert, err := staking.ParseCertificate(tlsCert.Leaf.Raw)
Expand All @@ -417,7 +429,7 @@ func TestTrackVerifiesSignatures(t *testing.T) {
),
})
// The signature is wrong so this peer tracking info isn't useful.
require.ErrorIs(err, rsa.ErrVerification)
require.ErrorIs(err, staking.ErrECDSAVerificationFailure)

network.peersLock.RLock()
require.Empty(network.trackedIPs)
Expand Down
27 changes: 0 additions & 27 deletions network/test_cert_1.crt

This file was deleted.

27 changes: 0 additions & 27 deletions network/test_cert_2.crt

This file was deleted.

27 changes: 0 additions & 27 deletions network/test_cert_3.crt

This file was deleted.

52 changes: 0 additions & 52 deletions network/test_key_1.key

This file was deleted.

Loading

0 comments on commit 6750a6a

Please sign in to comment.