Skip to content

Commit

Permalink
bump to ava go v1.12.0-fuji
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Nov 21, 2024
1 parent 1bd1eda commit 226937a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 42 deletions.
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/teleporter
go 1.22.8

require (
github.com/ava-labs/avalanchego v1.12.0-initial-poc.9
github.com/ava-labs/avalanchego v1.12.0-fuji
github.com/supranational/blst v0.3.13 // indirect
)

require (
github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d
github.com/ava-labs/subnet-evm v0.6.12-rc.0
github.com/ava-labs/awm-relayer v1.4.1-0.20241121212846-90ad76f595d6
github.com/ava-labs/subnet-evm v0.6.12
github.com/ethereum/go-ethereum v1.13.14
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.35.1
Expand All @@ -26,7 +26,7 @@ require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/ava-labs/coreth v0.13.8 // indirect
github.com/ava-labs/coreth v0.13.9-rc.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // 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 h1:dQhb+KlPoud+AkRV3A0suKCTodlUSzflGcZElESeVKo=
github.com/ava-labs/avalanchego v1.12.0-initial-poc.9/go.mod h1:86tO6F1FT8emclUwdQ2WCwAtAerqjm5A4IbV6XxNUyM=
github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d h1:Sgn2uD8axkyafPty1iY2ZkPVmT2eVoYgJEAPxkYNYqw=
github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d/go.mod h1:xrZ8FX+mC0PBvUL9yTVqmvCIA9rYYfmdDDY9oTTI6n8=
github.com/ava-labs/coreth v0.13.8 h1:f14X3KgwHl9LwzfxlN6S4bbn5VA2rhEsNnHaRLSTo/8=
github.com/ava-labs/coreth v0.13.8/go.mod h1:t3BSv/eQv0AlDPMfEDCMMoD/jq1RkUsbFzQAFg5qBcE=
github.com/ava-labs/subnet-evm v0.6.12-rc.0 h1:I7s4QkUO8bjg+JB/KTwrmDH8Q2mQYVTKF8mFUSDqk+E=
github.com/ava-labs/subnet-evm v0.6.12-rc.0/go.mod h1:Pf122zopW1fELpOsw0PrdX4u6K/4VOWU2p5C3cHsYAs=
github.com/ava-labs/avalanchego v1.12.0-fuji h1:o/GbXrqW9CAXu2jX/a1dZtvFiiSVCWomJZyxF4hCQOA=
github.com/ava-labs/avalanchego v1.12.0-fuji/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0=
github.com/ava-labs/awm-relayer v1.4.1-0.20241121212846-90ad76f595d6 h1:diUjomjOuTFwk3Z2FUxA94PzLZy+6ONfZVuaRhDrtmA=
github.com/ava-labs/awm-relayer v1.4.1-0.20241121212846-90ad76f595d6/go.mod h1:mNQitNat92izhmMF0++6/REQQI3W+h0oRAnLl3bs/6I=
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/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
4 changes: 2 additions & 2 deletions tests/flows/validator-manager/erc20_token_staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) {
)

// Issue a tx to update the validator's weight on the P-Chain
network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
utils.PChainProposerVMWorkaround(network.GetPChainWallet())
utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5)

Expand Down Expand Up @@ -224,7 +224,7 @@ func ERC20TokenStakingManager(network *localnetwork.LocalNetwork) {
Expect(err).Should(BeNil())

// Issue a tx to update the validator's weight on the P-Chain
network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
utils.PChainProposerVMWorkaround(network.GetPChainWallet())
utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5)

Expand Down
4 changes: 2 additions & 2 deletions tests/flows/validator-manager/native_token_staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) {
)

// Issue a tx to update the validator's weight on the P-Chain
network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
utils.PChainProposerVMWorkaround(network.GetPChainWallet())
utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5)

Expand Down Expand Up @@ -217,7 +217,7 @@ func NativeTokenStakingManager(network *localnetwork.LocalNetwork) {
Expect(err).Should(BeNil())

// Issue a tx to update the validator's weight on the P-Chain
network.GetPChainWallet().IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
network.GetPChainWallet().IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
utils.PChainProposerVMWorkaround(network.GetPChainWallet())
utils.AdvanceProposerVM(ctx, subnetAInfo, fundedKey, 5)

Expand Down
6 changes: 3 additions & 3 deletions tests/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (n *LocalNetwork) ConvertSubnet(
// Construct the convert subnet info
destAddr, err := address.ParseToID(utils.DefaultPChainAddress)
Expect(err).Should(BeNil())
vdrs := make([]*txs.ConvertSubnetValidator, len(tmpnetNodes))
vdrs := make([]*txs.ConvertSubnetToL1Validator, len(tmpnetNodes))
for i, node := range tmpnetNodes {
signer, err := node.GetProofOfPossession()
Expect(err).Should(BeNil())
Expand All @@ -221,7 +221,7 @@ func (n *LocalNetwork) ConvertSubnet(
NodePoP: signer,
Weight: weights[i],
})
vdrs[i] = &txs.ConvertSubnetValidator{
vdrs[i] = &txs.ConvertSubnetToL1Validator{
NodeID: node.NodeID.Bytes(),
Weight: weights[i],
Balance: units.Avax * 100,
Expand All @@ -237,7 +237,7 @@ func (n *LocalNetwork) ConvertSubnet(
}
}
pChainWallet := n.GetPChainWallet()
_, err = pChainWallet.IssueConvertSubnetTx(
_, err = pChainWallet.IssueConvertSubnetToL1Tx(
subnet.SubnetID,
subnet.BlockchainID,
vdrManagerAddress[:],
Expand Down
46 changes: 23 additions & 23 deletions tests/utils/validator_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ func InitializeValidatorSet(
nodes []Node,
) []ids.ID {
log.Println("Initializing validator set")
initialValidators := make([]warpMessage.SubnetConversionValidatorData, len(nodes))
initialValidators := make([]warpMessage.SubnetToL1ConverstionValidatorData, len(nodes))
initialValidatorsABI := make([]ivalidatormanager.InitialValidator, len(nodes))
for i, node := range nodes {
initialValidators[i] = warpMessage.SubnetConversionValidatorData{
initialValidators[i] = warpMessage.SubnetToL1ConverstionValidatorData{
NodeID: node.NodeID.Bytes(),
BLSPublicKey: node.NodePoP.PublicKey,
Weight: nodes[i].Weight,
Expand All @@ -292,7 +292,7 @@ func InitializeValidatorSet(
}
}

subnetConversionData := warpMessage.SubnetConversionData{
subnetConversionData := warpMessage.SubnetToL1ConversionData{
SubnetID: subnetInfo.SubnetID,
ManagerChainID: subnetInfo.BlockchainID,
ManagerAddress: validatorManagerAddress[:],
Expand All @@ -304,7 +304,7 @@ func InitializeValidatorSet(
ValidatorManagerAddress: validatorManagerAddress,
InitialValidators: initialValidatorsABI,
}
subnetConversionID, err := warpMessage.SubnetConversionID(subnetConversionData)
subnetConversionID, err := warpMessage.SubnetToL1ConversionID(subnetConversionData)
Expect(err).Should(BeNil())
subnetConversionSignedMessage := ConstructSubnetConversionMessage(
subnetConversionID,
Expand Down Expand Up @@ -556,7 +556,7 @@ func InitializeAndCompleteNativeValidatorRegistration(
// (Sending to the P-Chain will be skipped for now)
signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator)

_, err = pchainWallet.IssueRegisterSubnetValidatorTx(
_, err = pchainWallet.IssueRegisterL1ValidatorTx(
100*units.Avax,
node.NodePoP.ProofOfPossession,
signedWarpMessage.Bytes(),
Expand Down Expand Up @@ -634,7 +634,7 @@ func InitializeAndCompleteERC20ValidatorRegistration(
// Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain
signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator)

_, err = pchainWallet.IssueRegisterSubnetValidatorTx(
_, err = pchainWallet.IssueRegisterL1ValidatorTx(
100*units.Avax,
node.NodePoP.ProofOfPossession,
signedWarpMessage.Bytes(),
Expand Down Expand Up @@ -702,7 +702,7 @@ func InitializeAndCompletePoAValidatorRegistration(
// Gather subnet-evm Warp signatures for the RegisterSubnetValidatorMessage & relay to the P-Chain
signedWarpMessage := ConstructSignedWarpMessage(ctx, receipt, subnetInfo, pChainInfo, nil, signatureAggregator)

_, err := pchainWallet.IssueRegisterSubnetValidatorTx(
_, err := pchainWallet.IssueRegisterL1ValidatorTx(
100*units.Avax,
node.NodePoP.ProofOfPossession,
signedWarpMessage.Bytes(),
Expand Down Expand Up @@ -1084,7 +1084,7 @@ func InitializeAndCompleteEndInitialPoSValidation(
Expect(err).Should(BeNil())

// Deliver the Warp message to the P-Chain
pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
PChainProposerVMWorkaround(pchainWallet)
AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5)

Expand Down Expand Up @@ -1180,7 +1180,7 @@ func InitializeAndCompleteEndPoSValidation(
Expect(err).Should(BeNil())

// Deliver the Warp message to the P-Chain
pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
PChainProposerVMWorkaround(pchainWallet)
AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5)

Expand Down Expand Up @@ -1259,7 +1259,7 @@ func InitializeAndCompleteEndInitialPoAValidation(
Expect(err).Should(BeNil())

// Deliver the Warp message to the P-Chain
pchainWallet.IssueSetSubnetValidatorWeightTx(signedWarpMessage.Bytes())
pchainWallet.IssueSetL1ValidatorWeightTx(signedWarpMessage.Bytes())
PChainProposerVMWorkaround(pchainWallet)
AdvanceProposerVM(ctx, subnetInfo, fundedKey, 5)

Expand Down Expand Up @@ -1373,9 +1373,9 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator(
networkID uint32,
signatureAggregator *aggregator.SignatureAggregator,
) *avalancheWarp.Message {
justification := platformvm.SubnetValidatorRegistrationJustification{
Preimage: &platformvm.SubnetValidatorRegistrationJustification_ConvertSubnetTxData{
ConvertSubnetTxData: &platformvm.SubnetIDIndex{
justification := platformvm.L1ValidatorRegistrationJustification{
Preimage: &platformvm.L1ValidatorRegistrationJustification_ConvertSubnetToL1TxData{
ConvertSubnetToL1TxData: &platformvm.SubnetIDIndex{
SubnetId: subnet.SubnetID[:],
Index: index,
},
Expand All @@ -1384,7 +1384,7 @@ func ConstructSubnetValidatorRegistrationMessageForInitialValidator(
justificationBytes, err := proto.Marshal(&justification)
Expect(err).Should(BeNil())

registrationPayload, err := warpMessage.NewSubnetValidatorRegistration(validationID, valid)
registrationPayload, err := warpMessage.NewL1ValidatorRegistration(validationID, valid)
Expect(err).Should(BeNil())
registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes())
Expect(err).Should(BeNil())
Expand Down Expand Up @@ -1416,7 +1416,7 @@ func ConstructSubnetValidatorRegistrationMessage(
networkID uint32,
signatureAggregator *aggregator.SignatureAggregator,
) *avalancheWarp.Message {
msg, err := warpMessage.NewRegisterSubnetValidator(
msg, err := warpMessage.NewRegisterL1Validator(
subnet.SubnetID,
node.NodeID,
node.NodePoP.PublicKey,
Expand All @@ -1426,15 +1426,15 @@ func ConstructSubnetValidatorRegistrationMessage(
node.Weight,
)
Expect(err).Should(BeNil())
justification := platformvm.SubnetValidatorRegistrationJustification{
Preimage: &platformvm.SubnetValidatorRegistrationJustification_RegisterSubnetValidatorMessage{
RegisterSubnetValidatorMessage: msg.Bytes(),
justification := platformvm.L1ValidatorRegistrationJustification{
Preimage: &platformvm.L1ValidatorRegistrationJustification_RegisterL1ValidatorMessage{
RegisterL1ValidatorMessage: msg.Bytes(),
},
}
justificationBytes, err := proto.Marshal(&justification)
Expect(err).Should(BeNil())

registrationPayload, err := warpMessage.NewSubnetValidatorRegistration(validationID, valid)
registrationPayload, err := warpMessage.NewL1ValidatorRegistration(validationID, valid)
Expect(err).Should(BeNil())
registrationAddressedCall, err := warpPayload.NewAddressedCall(nil, registrationPayload.Bytes())
Expect(err).Should(BeNil())
Expand Down Expand Up @@ -1465,7 +1465,7 @@ func ConstructSubnetValidatorWeightUpdateMessage(
signatureAggregator *aggregator.SignatureAggregator,
networkID uint32,
) *avalancheWarp.Message {
payload, err := warpMessage.NewSubnetValidatorWeight(validationID, nonce, weight)
payload, err := warpMessage.NewL1ValidatorWeight(validationID, nonce, weight)
Expect(err).Should(BeNil())
updateAddressedCall, err := warpPayload.NewAddressedCall(nil, payload.Bytes())
Expect(err).Should(BeNil())
Expand Down Expand Up @@ -1493,7 +1493,7 @@ func ConstructSubnetConversionMessage(
networkID uint32,
signatureAggregator *aggregator.SignatureAggregator,
) *avalancheWarp.Message {
subnetConversionPayload, err := warpMessage.NewSubnetConversion(subnetConversionID)
subnetConversionPayload, err := warpMessage.NewSubnetToL1Conversion(subnetConversionID)
Expect(err).Should(BeNil())
subnetConversionAddressedCall, err := warpPayload.NewAddressedCall(
nil,
Expand Down Expand Up @@ -1536,7 +1536,7 @@ func ValidateRegisterSubnetValidatorMessage(
var payloadInterface warpMessage.Payload
ver, err := warpMessage.Codec.Unmarshal(msg.Payload, &payloadInterface)
Expect(err).Should(BeNil())
payload, ok := payloadInterface.(*warpMessage.RegisterSubnetValidator)
payload, ok := payloadInterface.(*warpMessage.RegisterL1Validator)
Expect(ok).Should(BeTrue())

Expect(ver).Should(Equal(uint16(warpMessage.CodecVersion)))
Expand All @@ -1558,7 +1558,7 @@ func ValidateSubnetValidatorWeightMessage(
var payloadInterface warpMessage.Payload
ver, err := warpMessage.Codec.Unmarshal(msg.Payload, &payloadInterface)
Expect(err).Should(BeNil())
payload, ok := payloadInterface.(*warpMessage.SubnetValidatorWeight)
payload, ok := payloadInterface.(*warpMessage.L1ValidatorWeight)
Expect(ok).Should(BeTrue())

Expect(ver).Should(Equal(uint16(warpMessage.CodecVersion)))
Expand Down

0 comments on commit 226937a

Please sign in to comment.