Skip to content
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

Update deps for services etna release #677

Merged
merged 5 commits into from
Dec 10, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ subnetGenesis_*
vars.sh
NETWORK_READY
.awm-relayer-storage/
.icm-relayer-storage/

# Raw Contract Deployment Transaction
UniversalTeleporterDeployerTransaction.txt
Expand Down
4 changes: 2 additions & 2 deletions contracts/teleporter/registry/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ The steps to do so are as follows:

3. Restart the node to mark the off-chain ICM message as eligible for signing by the validator.

To actually register the new `TeleporterMessenger` version with the registry, the validators must be queried for their signature of the message, the signatures aggregated, and a signed ICM message created to be included in the transaction that calls `addProtocolVersion`. As an example, [AWM Relayer](https://github.com/ava-labs/awm-relayer) provides this functionality. The following steps illustrate how to use AWM Relayer to register the new `TeleporterMessenger` version.
To actually register the new `TeleporterMessenger` version with the registry, the validators must be queried for their signature of the message, the signatures aggregated, and a signed ICM message created to be included in the transaction that calls `addProtocolVersion`. As an example, [ICM Relayer](https://github.com/ava-labs/icm-services) provides this functionality. The following steps illustrate how to use ICM Relayer to register the new `TeleporterMessenger` version.

1. Construct a "manual-warp-messages" entry in the AWM Relayer configuration file, using the following values:
1. Construct a "manual-warp-messages" entry in the ICM Relayer configuration file, using the following values:

a. "unsigned-message-bytes": the hex-encoded unsigned ICM message bytes derived above.

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/ava-labs/icm-contracts
go 1.22.10

require (
github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928
github.com/ava-labs/avalanchego v1.12.1-0.20241210035517-714dfa0c3942
github.com/supranational/blst v0.3.13 // indirect
)

require (
github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260
github.com/ava-labs/subnet-evm v0.6.12
github.com/ava-labs/icm-services v1.4.1-0.20241210044204-a8fbd559ac77
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35
github.com/ethereum/go-ethereum v1.13.14
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.0
Expand Down Expand Up @@ -159,7 +159,7 @@ require (
gonum.org/v1/gonum v0.11.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.68.0 // indirect
google.golang.org/grpc v1.68.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928 h1:th+K+wWgAYL/NsrFJyO+/sThLRdEDE0+I4vgbPLoWQQ=
github.com/ava-labs/avalanchego v1.12.0-initial-poc.9.0.20241122192639-7c3ad181c928/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0=
github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260 h1:VRNzoY1xvXHphcXXmuXMrUFp5Gm/eiipVJMmNV+UN9c=
github.com/ava-labs/awm-relayer v1.4.1-0.20241122202209-75359d908260/go.mod h1:/hrQpd8P3BfShbRoDE1vD1WZXBchu7r8CQPTEb5tWOQ=
github.com/ava-labs/avalanchego v1.12.1-0.20241210035517-714dfa0c3942 h1:eDSWDIaaMHNEAorxQqnA88S39zlgmQ26OKgWn5AaDJ0=
github.com/ava-labs/avalanchego v1.12.1-0.20241210035517-714dfa0c3942/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0=
github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU=
github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo=
github.com/ava-labs/subnet-evm v0.6.12 h1:jL3FmjdFcNfS0qwbehwN6DkAg9y7zexB1riiGBxRsM0=
github.com/ava-labs/subnet-evm v0.6.12/go.mod h1:vffwL4UqAh7ibpWjveUuUhamm3a9w75q92bG5vXdX5k=
github.com/ava-labs/icm-services v1.4.1-0.20241210044204-a8fbd559ac77 h1:n1BXCUoLmDhZ5pKgoZ9Fb8+q4DOCBuLVKzxI/fEP6O0=
github.com/ava-labs/icm-services v1.4.1-0.20241210044204-a8fbd559ac77/go.mod h1:GVuxwUIXHt9vz/knNTWJBjMWJbGwQ4vuEuEtBVHNYCw=
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35 h1:CbXWon0fwGDEDCCiChx2VeIIwO3UML9+8OUTyNwPsxA=
github.com/ava-labs/subnet-evm v0.6.13-0.20241205165027-6c98da796f35/go.mod h1:SfAF4jjYPkezKWShPY/T31WQdD/UHrDyqy0kxA0LE0w=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
Expand Down Expand Up @@ -1022,8 +1022,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0=
google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA=
google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0=
google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ AWM_RELAYER_VERSION=${AWM_RELAYER_VERSION:-'v1.0.0'}
# Don't export them as they're used in the context of other calls
AVALANCHEGO_VERSION=${AVALANCHEGO_VERSION:-$(extract_commit "$(getDepVersion github.com/ava-labs/avalanchego)")}
# Temporarily hardcode the Avalanchego version until outbound networking relaxation is available
AVALANCHEGO_VERSION=v1.12.0-fuji
AVALANCHEGO_VERSION=v1.12.0
GINKGO_VERSION=${GINKGO_VERSION:-$(extract_commit "$(getDepVersion github.com/onsi/ginkgo/v2)")}
SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION:-$(extract_commit "$(getDepVersion github.com/ava-labs/subnet-evm)")}

Expand Down
29 changes: 18 additions & 11 deletions tests/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ import (
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
"github.com/ava-labs/avalanchego/utils/formatting/address"
"github.com/ava-labs/avalanchego/utils/logging"
"github.com/ava-labs/avalanchego/utils/units"
"github.com/ava-labs/avalanchego/vms/platformvm"
"github.com/ava-labs/avalanchego/vms/platformvm/txs"
warpMessage "github.com/ava-labs/avalanchego/vms/platformvm/warp/message"
"github.com/ava-labs/avalanchego/vms/secp256k1fx"
pwallet "github.com/ava-labs/avalanchego/wallet/chain/p/wallet"
"github.com/ava-labs/avalanchego/wallet/subnet/primary"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
proxyadmin "github.com/ava-labs/icm-contracts/abi-bindings/go/ProxyAdmin"
"github.com/ava-labs/icm-contracts/tests/interfaces"
"github.com/ava-labs/icm-contracts/tests/utils"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
"github.com/ava-labs/subnet-evm/ethclient"
subnetEvmTestUtils "github.com/ava-labs/subnet-evm/tests/utils"

Expand All @@ -45,6 +46,7 @@ type LocalNetwork struct {
primaryNetworkValidators []*tmpnet.Node
globalFundedKey *secp256k1.PrivateKey
validatorManagers map[ids.ID]common.Address
logger logging.Logger
}

const (
Expand Down Expand Up @@ -135,9 +137,11 @@ func NewLocalNetwork(

ctx, cancelBootstrap := context.WithCancel(ctx)
defer cancelBootstrap()

logger := logging.NewLogger("tmpnet")
err = tmpnet.BootstrapNewNetwork(
ctx,
os.Stdout,
logger,
network,
"",
avalancheGoBuildPath+"/avalanchego",
Expand All @@ -161,6 +165,7 @@ func NewLocalNetwork(
globalFundedKey: globalFundedKey,
primaryNetworkValidators: primaryNetworkValidators,
validatorManagers: make(map[ids.ID]common.Address),
logger: logger,
}

return localNetwork
Expand Down Expand Up @@ -256,7 +261,7 @@ func (n *LocalNetwork) ConvertSubnet(
for _, node := range n.Network.Nodes {
if node.NodeID == vdr.NodeID {
goLog.Println("Restarting bootstrap node", node.NodeID)
n.Network.RestartNode(ctx, os.Stdout, node)
n.Network.RestartNode(ctx, n.logger, node)
}
}
}
Expand Down Expand Up @@ -284,7 +289,7 @@ func (n *LocalNetwork) AddSubnetValidators(
// Add the node to the network
n.Network.Nodes = append(n.Network.Nodes, node)
}
err := n.Network.StartNodes(context.Background(), os.Stdout, nodes...)
err := n.Network.StartNodes(context.Background(), n.logger, nodes...)
Expect(err).Should(BeNil())

// Update the tmpnet Subnet struct
Expand Down Expand Up @@ -476,7 +481,7 @@ func (n *LocalNetwork) SetChainConfigs(chainConfigs map[string]string) {
// Restart the network to apply the new chain configs
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(60*len(n.Network.Nodes))*time.Second)
defer cancel()
err = n.Network.Restart(ctx, os.Stdout)
err = n.Network.Restart(ctx, n.logger)
Expect(err).Should(BeNil())
}

Expand All @@ -495,12 +500,14 @@ func (n *LocalNetwork) GetPChainWallet() pwallet.Wallet {
for _, l1 := range n.GetL1Infos() {
l1IDs = append(l1IDs, l1.L1ID)
}
wallet, err := primary.MakeWallet(context.Background(), &primary.WalletConfig{
URI: n.GetPrimaryNetworkInfo().NodeURIs[0],
AVAXKeychain: kc,
EthKeychain: kc,
SubnetIDs: l1IDs,
})
wallet, err := primary.MakeWallet(
context.Background(),
n.GetPrimaryNetworkInfo().NodeURIs[0],
kc,
kc,
primary.WalletConfig{
SubnetIDs: l1IDs,
})
Expect(err).Should(BeNil())
return wallet.P()
}
Expand Down
13 changes: 7 additions & 6 deletions tests/utils/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import (
"github.com/ava-labs/avalanchego/utils/set"
"github.com/ava-labs/avalanchego/vms/platformvm/signer"
avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp"
relayerConfig "github.com/ava-labs/awm-relayer/config"
"github.com/ava-labs/awm-relayer/peers"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
sigAggConfig "github.com/ava-labs/awm-relayer/signature-aggregator/config"
"github.com/ava-labs/awm-relayer/signature-aggregator/metrics"
nativeMinter "github.com/ava-labs/icm-contracts/abi-bindings/go/INativeMinter"
"github.com/ava-labs/icm-contracts/tests/interfaces"
gasUtils "github.com/ava-labs/icm-contracts/utils/gas-utils"
relayerConfig "github.com/ava-labs/icm-services/config"
"github.com/ava-labs/icm-services/peers"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
sigAggConfig "github.com/ava-labs/icm-services/signature-aggregator/config"
"github.com/ava-labs/icm-services/signature-aggregator/metrics"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/eth/tracers"
Expand Down Expand Up @@ -561,9 +561,10 @@ func NewSignatureAggregator(apiUri string, l1IDs []ids.ID) *aggregator.Signature
)
Expect(err).Should(BeNil())

networkRegistry := prometheus.NewRegistry()
appRequestNetwork, err := peers.NewNetwork(
logging.Error,
registry,
networkRegistry,
trackedL1s,
nil,
&cfg,
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp"
"github.com/ava-labs/avalanchego/vms/platformvm/warp/payload"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
validatorsetsig "github.com/ava-labs/icm-contracts/abi-bindings/go/governance/ValidatorSetSig"
"github.com/ava-labs/icm-contracts/tests/interfaces"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ethereum/go-ethereum/common"
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/ictt.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"math/big"

"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
erc20tokenhome "github.com/ava-labs/icm-contracts/abi-bindings/go/ictt/TokenHome/ERC20TokenHome"
nativetokenhome "github.com/ava-labs/icm-contracts/abi-bindings/go/ictt/TokenHome/NativeTokenHome"
tokenhome "github.com/ava-labs/icm-contracts/abi-bindings/go/ictt/TokenHome/TokenHome"
Expand All @@ -22,6 +21,7 @@ import (
mockERC20SACR "github.com/ava-labs/icm-contracts/abi-bindings/go/ictt/mocks/MockERC20SendAndCallReceiver"
mockNSACR "github.com/ava-labs/icm-contracts/abi-bindings/go/ictt/mocks/MockNativeSendAndCallReceiver"
"github.com/ava-labs/icm-contracts/tests/interfaces"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ethereum/go-ethereum/common"
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/teleporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/ava-labs/avalanchego/ids"
avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp"
"github.com/ava-labs/avalanchego/vms/platformvm/warp/payload"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
validatorsetsig "github.com/ava-labs/icm-contracts/abi-bindings/go/governance/ValidatorSetSig"
exampleerc20 "github.com/ava-labs/icm-contracts/abi-bindings/go/mocks/ExampleERC20"
teleportermessenger "github.com/ava-labs/icm-contracts/abi-bindings/go/teleporter/TeleporterMessenger"
Expand All @@ -18,6 +17,7 @@ import (
"github.com/ava-labs/icm-contracts/tests/interfaces"
deploymentUtils "github.com/ava-labs/icm-contracts/utils/deployment-utils"
gasUtils "github.com/ava-labs/icm-contracts/utils/gas-utils"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/precompile/contracts/warp"
Expand Down
6 changes: 3 additions & 3 deletions tests/utils/validator_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
warpPayload "github.com/ava-labs/avalanchego/vms/platformvm/warp/payload"
"github.com/ava-labs/avalanchego/vms/secp256k1fx"
pwallet "github.com/ava-labs/avalanchego/wallet/chain/p/wallet"
"github.com/ava-labs/awm-relayer/signature-aggregator/aggregator"
proxyadmin "github.com/ava-labs/icm-contracts/abi-bindings/go/ProxyAdmin"
exampleerc20 "github.com/ava-labs/icm-contracts/abi-bindings/go/mocks/ExampleERC20"
erc20tokenstakingmanager "github.com/ava-labs/icm-contracts/abi-bindings/go/validator-manager/ERC20TokenStakingManager"
Expand All @@ -33,6 +32,7 @@ import (
iposvalidatormanager "github.com/ava-labs/icm-contracts/abi-bindings/go/validator-manager/interfaces/IPoSValidatorManager"
ivalidatormanager "github.com/ava-labs/icm-contracts/abi-bindings/go/validator-manager/interfaces/IValidatorManager"
"github.com/ava-labs/icm-contracts/tests/interfaces"
"github.com/ava-labs/icm-services/signature-aggregator/aggregator"
"github.com/ava-labs/subnet-evm/accounts/abi/bind"
"github.com/ava-labs/subnet-evm/core/types"
"github.com/ava-labs/subnet-evm/precompile/contracts/warp"
Expand Down Expand Up @@ -277,10 +277,10 @@ func InitializeValidatorSet(
nodes []Node,
) []ids.ID {
log.Println("Initializing validator set", "l1", l1Info.L1ID)
initialValidators := make([]warpMessage.SubnetToL1ConverstionValidatorData, len(nodes))
initialValidators := make([]warpMessage.SubnetToL1ConversionValidatorData, len(nodes))
initialValidatorsABI := make([]ivalidatormanager.InitialValidator, len(nodes))
for i, node := range nodes {
initialValidators[i] = warpMessage.SubnetToL1ConverstionValidatorData{
initialValidators[i] = warpMessage.SubnetToL1ConversionValidatorData{
NodeID: node.NodeID.Bytes(),
BLSPublicKey: node.NodePoP.PublicKey,
Weight: nodes[i].Weight,
Expand Down
Loading