diff --git a/cmd/blockchaincmd/deploy.go b/cmd/blockchaincmd/deploy.go index ac8846cd3..c36b612d7 100644 --- a/cmd/blockchaincmd/deploy.go +++ b/cmd/blockchaincmd/deploy.go @@ -985,8 +985,8 @@ func getBLSInfo(publicKey, proofOfPossesion string) (signer.ProofOfPossession, e } // TODO: add deactivation owner? -func ConvertToAvalancheGoSubnetValidator(subnetValidators []models.SubnetValidator) ([]*txs.ConvertSubnetValidator, error) { - bootstrapValidators := []*txs.ConvertSubnetValidator{} +func ConvertToAvalancheGoSubnetValidator(subnetValidators []models.SubnetValidator) ([]*txs.ConvertSubnetToL1Validator, error) { + bootstrapValidators := []*txs.ConvertSubnetToL1Validator{} for _, validator := range subnetValidators { nodeID, err := ids.NodeIDFromString(validator.NodeID) if err != nil { @@ -1000,7 +1000,7 @@ func ConvertToAvalancheGoSubnetValidator(subnetValidators []models.SubnetValidat if err != nil { return nil, fmt.Errorf("failure parsing change owner address: %w", err) } - bootstrapValidator := &txs.ConvertSubnetValidator{ + bootstrapValidator := &txs.ConvertSubnetToL1Validator{ NodeID: nodeID[:], Weight: validator.Weight, Balance: validator.Balance, diff --git a/go.mod b/go.mod index 58db3d56b..7c2ae5873 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,13 @@ go 1.22.8 require ( github.com/ava-labs/apm v1.0.0 - github.com/ava-labs/avalanche-network-runner v1.8.4-0.20241023180457-5189aac811fb - github.com/ava-labs/avalanchego v1.12.0-initial-poc.9 - github.com/ava-labs/awm-relayer v1.4.1-0.20241114185359-5cd5a982832d - github.com/ava-labs/coreth v0.13.8 - github.com/ava-labs/subnet-evm v0.6.11 - github.com/aws/aws-sdk-go-v2 v1.32.4 - github.com/aws/aws-sdk-go-v2/config v1.28.3 + github.com/ava-labs/avalanche-network-runner v1.8.4-0.20241120013844-71784ad023cc + github.com/ava-labs/avalanchego v1.11.13 + github.com/ava-labs/awm-relayer v1.4.1-0.20241119163059-6abfe81abee0 + github.com/ava-labs/coreth v0.13.9-rc.1 + github.com/ava-labs/subnet-evm v0.6.12 + github.com/aws/aws-sdk-go-v2 v1.32.5 + github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/service/ec2 v1.182.0 github.com/chelnak/ysmrr v0.4.0 github.com/docker/docker v27.1.1+incompatible @@ -48,7 +48,7 @@ require ( golang.org/x/sync v0.9.0 golang.org/x/text v0.19.0 google.golang.org/api v0.184.0 - google.golang.org/protobuf v1.35.1 + google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -68,18 +68,18 @@ require ( github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 // indirect github.com/ava-labs/teleporter v1.0.7 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.44 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.46 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect - github.com/aws/smithy-go v1.22.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 // indirect + github.com/aws/smithy-go v1.22.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 diff --git a/go.sum b/go.sum index f3eaa959a..fd4f57e82 100644 --- a/go.sum +++ b/go.sum @@ -83,59 +83,59 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/ava-labs/apm v1.0.0 h1:6FwozH67hEkbWVsOXNZGexBy5KLpNeYucN9zcFUHv+Q= github.com/ava-labs/apm v1.0.0/go.mod h1:TJL7pTlZNvQatsQPsLUtDHApEwVZ/qS7iSNtRFU83mc= -github.com/ava-labs/avalanche-network-runner v1.8.4-0.20241023180457-5189aac811fb h1:Fv5gyTIERypRVxtB4JSNoe16o45P0THySRDfrTuX0Dc= -github.com/ava-labs/avalanche-network-runner v1.8.4-0.20241023180457-5189aac811fb/go.mod h1:ASWB/CKJm8wVZUBp3DY0AV8jTBLCs01kzQz9GGwtzi8= -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/avalanche-network-runner v1.8.4-0.20241120013844-71784ad023cc h1:fd19g51oBgrolLOHJ9aGbJlf8D2lizxtjSINqC71AL8= +github.com/ava-labs/avalanche-network-runner v1.8.4-0.20241120013844-71784ad023cc/go.mod h1:TOfc8r6sxs01mi2mWOYsRcJAbf3x3a4x0uxi8gVThso= +github.com/ava-labs/avalanchego v1.11.13 h1:1lcDZ9ILZgeiv7IwL4TuFTyglgZMr9QBOnpLHX+Qy5k= +github.com/ava-labs/avalanchego v1.11.13/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= +github.com/ava-labs/awm-relayer v1.4.1-0.20241119163059-6abfe81abee0 h1:/dI9oPOYdkdSiUr9byeKz+bZ4onXrBjZQuXqDtPtSuY= +github.com/ava-labs/awm-relayer v1.4.1-0.20241119163059-6abfe81abee0/go.mod h1:cLaEdx57PXwDjebIvKmY7aSGqTivAZLD0vrkXEmISvc= +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/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60 h1:EL66gtXOAwR/4KYBjOV03LTWgkEXvLePribLlJNu4g0= github.com/ava-labs/ledger-avalanche/go v0.0.0-20241009183145-e6f90a8a1a60/go.mod h1:/7qKobTfbzBu7eSTVaXMTr56yTYk4j2Px6/8G+idxHo= -github.com/ava-labs/subnet-evm v0.6.11 h1:XgIAn9ihPyGjrBFD2rXg2H76HFl6htliHabN0fjciaQ= -github.com/ava-labs/subnet-evm v0.6.11/go.mod h1:fP46lzBtiniRfpNH+Qu9BFvSsa02YGkAobxinZ78gDU= +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/teleporter v1.0.7 h1:9H0wTWhgWeA4u6uxi9KngdBu/LOoYsfAmIZhXNzuvf8= github.com/ava-labs/teleporter v1.0.7/go.mod h1:wgCgU6vU5MtP83otpjEin8jL2jrflVBNQCTxVXMx/kU= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= -github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2 v1.32.5 h1:U8vdWJuY7ruAkzaOdD7guwJjD06YSKmnKCJs7s3IkIo= +github.com/aws/aws-sdk-go-v2 v1.32.5/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM= -github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4= +github.com/aws/aws-sdk-go-v2/config v1.28.5 h1:Za41twdCXbuyyWv9LndXxZZv3QhTG1DinqlFsSuvtI0= +github.com/aws/aws-sdk-go-v2/config v1.28.5/go.mod h1:4VsPbHP8JdcdUDmbTVgNL/8w9SqOkM5jyY8ljIxLO3o= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU= -github.com/aws/aws-sdk-go-v2/credentials v1.17.44/go.mod h1:0Lm2YJ8etJdEdw23s+q/9wTpOeo2HhNE97XcRa7T8MA= +github.com/aws/aws-sdk-go-v2/credentials v1.17.46 h1:AU7RcriIo2lXjUfHFnFKYsLCwgbz1E7Mm95ieIRDNUg= +github.com/aws/aws-sdk-go-v2/credentials v1.17.46/go.mod h1:1FmYyLGL08KQXQ6mcTlifyFXfJVCNJTVGuQP4m0d/UA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20 h1:sDSXIrlsFSFJtWKLQS4PUWRvrT580rrnuLydJrCQ/yA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.20/go.mod h1:WZ/c+w0ofps+/OUqMwWgnfrgzZH1DZO1RIkktICsqnY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24 h1:4usbeaes3yJnCFC7kfeyhkdkPtoRYPa/hTmCqMpKpLI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.24/go.mod h1:5CI1JemjVwde8m2WG3cz23qHKPOxbpkq0HaoreEgLIY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24 h1:N1zsICrQglfzaBnrfM0Ys00860C+QFwu6u/5+LomP+o= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.24/go.mod h1:dCn9HbJ8+K31i8IQ8EWmWj0EiIk0+vKiHNMxTTYveAg= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/ec2 v1.182.0 h1:LaeziEhHZ/SJZYBK223QVzl3ucHvA9IP4tQMcxGrc9I= github.com/aws/aws-sdk-go-v2/service/ec2 v1.182.0/go.mod h1:kYXaB4FzyhEJjvrJ84oPnMElLiEAjGxxUunVW2tBSng= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 h1:tHxQi/XHPK0ctd/wdOw0t7Xrc2OxcRCnVzv8lwWPu0c= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4/go.mod h1:4GQbF1vJzG60poZqWatZlhP31y8PGCCVTvIGPdaaYJ0= -github.com/aws/aws-sdk-go-v2/service/kms v1.37.5 h1:5dQJ6Q5QrQOqZxXjSbRXukBqU8Pgu6Ro6Qqtyd8yiz4= -github.com/aws/aws-sdk-go-v2/service/kms v1.37.5/go.mod h1:A9vfQcNHVBCE7ZZN6H+UUJpXtbH26Vv6L7Zhk5nIJAY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwrSbwhECWQoI/g6WM9zqCcSpHDJIWSbMLOu4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 h1:CZImQdb1QbU9sGgJ9IswhVkxAcjkkD1eQTMA1KHWk+E= +github.com/aws/aws-sdk-go-v2/service/kms v1.37.6/go.mod h1:YJDdlK0zsyxVBxGU48AR/Mi8DMrGdc1E3Yij4fNrONA= github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 h1:HJwZwRt2Z2Tdec+m+fPjvdmkq2s9Ra+VR0hjF7V2o40= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.5/go.mod h1:wrMCEwjFPms+V86TCQQeOxQF/If4vT44FGIOFiMC2ck= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6mUdeyC36Ia/QEiIvYdg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5/go.mod h1:ORITg+fyuMoeiQFiVGoqB3OydVTLkClw/ljbblMq6Cc= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 h1:6SZUVRQNvExYlMLbHdlKB48x0fLbc2iVROyaNEwBHbU= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.1/go.mod h1:GqWyYCwLXnlUB1lOAXQyNSPqPLQJvmo8J0DWBzp9mtg= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= +github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -1252,8 +1252,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/mocks/pclient.go b/internal/mocks/pclient.go index 266a32460..0290ae58a 100644 --- a/internal/mocks/pclient.go +++ b/internal/mocks/pclient.go @@ -15,6 +15,8 @@ import ( platformvm "github.com/ava-labs/avalanchego/vms/platformvm" + platformvmapi "github.com/ava-labs/avalanchego/vms/platformvm/api" + rpc "github.com/ava-labs/avalanchego/utils/rpc" secp256k1 "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" @@ -506,6 +508,48 @@ func (_m *PClient) GetHeight(ctx context.Context, options ...rpc.Option) (uint64 return r0, r1 } +// GetL1Validator provides a mock function with given fields: ctx, validationID, options +func (_m *PClient) GetL1Validator(ctx context.Context, validationID ids.ID, options ...rpc.Option) (platformvm.L1Validator, uint64, error) { + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, validationID) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetL1Validator") + } + + var r0 platformvm.L1Validator + var r1 uint64 + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, ids.ID, ...rpc.Option) (platformvm.L1Validator, uint64, error)); ok { + return rf(ctx, validationID, options...) + } + if rf, ok := ret.Get(0).(func(context.Context, ids.ID, ...rpc.Option) platformvm.L1Validator); ok { + r0 = rf(ctx, validationID, options...) + } else { + r0 = ret.Get(0).(platformvm.L1Validator) + } + + if rf, ok := ret.Get(1).(func(context.Context, ids.ID, ...rpc.Option) uint64); ok { + r1 = rf(ctx, validationID, options...) + } else { + r1 = ret.Get(1).(uint64) + } + + if rf, ok := ret.Get(2).(func(context.Context, ids.ID, ...rpc.Option) error); ok { + r2 = rf(ctx, validationID, options...) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + // GetMinStake provides a mock function with given fields: ctx, subnetID, options func (_m *PClient) GetMinStake(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (uint64, uint64, error) { _va := make([]interface{}, len(options)) @@ -548,6 +592,41 @@ func (_m *PClient) GetMinStake(ctx context.Context, subnetID ids.ID, options ... return r0, r1, r2 } +// GetProposedHeight provides a mock function with given fields: ctx, options +func (_m *PClient) GetProposedHeight(ctx context.Context, options ...rpc.Option) (uint64, error) { + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetProposedHeight") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, ...rpc.Option) (uint64, error)); ok { + return rf(ctx, options...) + } + if rf, ok := ret.Get(0).(func(context.Context, ...rpc.Option) uint64); ok { + r0 = rf(ctx, options...) + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func(context.Context, ...rpc.Option) error); ok { + r1 = rf(ctx, options...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetRewardUTXOs provides a mock function with given fields: _a0, _a1, _a2 func (_m *PClient) GetRewardUTXOs(_a0 context.Context, _a1 *api.GetTxArgs, _a2 ...rpc.Option) ([][]byte, error) { _va := make([]interface{}, len(_a2)) @@ -703,48 +782,6 @@ func (_m *PClient) GetSubnet(ctx context.Context, subnetID ids.ID, options ...rp return r0, r1 } -// GetSubnetOnlyValidator provides a mock function with given fields: ctx, validationID, options -func (_m *PClient) GetSubnetOnlyValidator(ctx context.Context, validationID ids.ID, options ...rpc.Option) (platformvm.SubnetOnlyValidator, uint64, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, validationID) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetSubnetOnlyValidator") - } - - var r0 platformvm.SubnetOnlyValidator - var r1 uint64 - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, ids.ID, ...rpc.Option) (platformvm.SubnetOnlyValidator, uint64, error)); ok { - return rf(ctx, validationID, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, ids.ID, ...rpc.Option) platformvm.SubnetOnlyValidator); ok { - r0 = rf(ctx, validationID, options...) - } else { - r0 = ret.Get(0).(platformvm.SubnetOnlyValidator) - } - - if rf, ok := ret.Get(1).(func(context.Context, ids.ID, ...rpc.Option) uint64); ok { - r1 = rf(ctx, validationID, options...) - } else { - r1 = ret.Get(1).(uint64) - } - - if rf, ok := ret.Get(2).(func(context.Context, ids.ID, ...rpc.Option) error); ok { - r2 = rf(ctx, validationID, options...) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - // GetSubnets provides a mock function with given fields: ctx, subnetIDs, options func (_m *PClient) GetSubnets(ctx context.Context, subnetIDs []ids.ID, options ...rpc.Option) ([]platformvm.ClientSubnet, error) { _va := make([]interface{}, len(options)) @@ -982,7 +1019,7 @@ func (_m *PClient) GetUTXOs(ctx context.Context, addrs []ids.ShortID, limit uint } // GetValidatorsAt provides a mock function with given fields: ctx, subnetID, height, options -func (_m *PClient) GetValidatorsAt(ctx context.Context, subnetID ids.ID, height uint64, options ...rpc.Option) (map[ids.NodeID]*validators.GetValidatorOutput, error) { +func (_m *PClient) GetValidatorsAt(ctx context.Context, subnetID ids.ID, height platformvmapi.Height, options ...rpc.Option) (map[ids.NodeID]*validators.GetValidatorOutput, error) { _va := make([]interface{}, len(options)) for _i := range options { _va[_i] = options[_i] @@ -998,10 +1035,10 @@ func (_m *PClient) GetValidatorsAt(ctx context.Context, subnetID ids.ID, height var r0 map[ids.NodeID]*validators.GetValidatorOutput var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ids.ID, uint64, ...rpc.Option) (map[ids.NodeID]*validators.GetValidatorOutput, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, ids.ID, platformvmapi.Height, ...rpc.Option) (map[ids.NodeID]*validators.GetValidatorOutput, error)); ok { return rf(ctx, subnetID, height, options...) } - if rf, ok := ret.Get(0).(func(context.Context, ids.ID, uint64, ...rpc.Option) map[ids.NodeID]*validators.GetValidatorOutput); ok { + if rf, ok := ret.Get(0).(func(context.Context, ids.ID, platformvmapi.Height, ...rpc.Option) map[ids.NodeID]*validators.GetValidatorOutput); ok { r0 = rf(ctx, subnetID, height, options...) } else { if ret.Get(0) != nil { @@ -1009,7 +1046,7 @@ func (_m *PClient) GetValidatorsAt(ctx context.Context, subnetID ids.ID, height } } - if rf, ok := ret.Get(1).(func(context.Context, ids.ID, uint64, ...rpc.Option) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, ids.ID, platformvmapi.Height, ...rpc.Option) error); ok { r1 = rf(ctx, subnetID, height, options...) } else { r1 = ret.Error(1) diff --git a/pkg/subnet/public.go b/pkg/subnet/public.go index d5f2ec243..db25402fb 100644 --- a/pkg/subnet/public.go +++ b/pkg/subnet/public.go @@ -140,7 +140,7 @@ func (*PublicDeployer) createSetSubnetValidatorWeightTx( message *warp.Message, wallet primary.Wallet, ) (*txs.Tx, error) { - unsignedTx, err := wallet.P().Builder().NewSetSubnetValidatorWeightTx( + unsignedTx, err := wallet.P().Builder().NewSetL1ValidatorWeightTx( message.Bytes(), ) if err != nil { @@ -186,7 +186,7 @@ func (*PublicDeployer) createRegisterSubnetValidatorTx( message *warp.Message, wallet primary.Wallet, ) (*txs.Tx, error) { - unsignedTx, err := wallet.P().Builder().NewRegisterSubnetValidatorTx( + unsignedTx, err := wallet.P().Builder().NewRegisterL1ValidatorTx( balance, pop.ProofOfPossession, message.Bytes(), @@ -461,7 +461,7 @@ func (d *PublicDeployer) ConvertL1( subnetID ids.ID, chainID ids.ID, validatorManagerAddress goethereumcommon.Address, - validators []*txs.ConvertSubnetValidator, + validators []*txs.ConvertSubnetToL1Validator, ) (bool, ids.ID, *txs.Tx, []string, error) { ux.Logger.PrintToUser("Now calling ConvertL1 Tx...") @@ -693,11 +693,11 @@ func (d *PublicDeployer) createConvertL1Tx( subnetID ids.ID, chainID ids.ID, address []byte, - validators []*txs.ConvertSubnetValidator, + validators []*txs.ConvertSubnetToL1Validator, wallet primary.Wallet, ) (*txs.Tx, error) { options := d.getMultisigTxOptions(subnetAuthKeys) - unsignedTx, err := wallet.P().Builder().NewConvertSubnetTx( + unsignedTx, err := wallet.P().Builder().NewConvertSubnetToL1Tx( subnetID, chainID, address, diff --git a/pkg/txutils/auth.go b/pkg/txutils/auth.go index 1177d56f6..0c05081fc 100644 --- a/pkg/txutils/auth.go +++ b/pkg/txutils/auth.go @@ -37,7 +37,7 @@ func GetAuthSigners(tx *txs.Tx, controlKeys []string) ([]string, error) { subnetAuth = unsignedTx.SubnetAuth case *txs.TransferSubnetOwnershipTx: subnetAuth = unsignedTx.SubnetAuth - case *txs.ConvertSubnetTx: + case *txs.ConvertSubnetToL1Tx: subnetAuth = unsignedTx.SubnetAuth default: return nil, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx) diff --git a/pkg/txutils/info.go b/pkg/txutils/info.go index c801b7a65..30bdae4da 100644 --- a/pkg/txutils/info.go +++ b/pkg/txutils/info.go @@ -31,7 +31,7 @@ func GetNetwork(tx *txs.Tx) (models.Network, error) { networkID = unsignedTx.NetworkID case *txs.TransferSubnetOwnershipTx: networkID = unsignedTx.NetworkID - case *txs.ConvertSubnetTx: + case *txs.ConvertSubnetToL1Tx: networkID = unsignedTx.NetworkID default: return models.UndefinedNetwork, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx) @@ -60,7 +60,7 @@ func GetSubnetID(tx *txs.Tx) (ids.ID, error) { subnetID = unsignedTx.Subnet case *txs.TransferSubnetOwnershipTx: subnetID = unsignedTx.Subnet - case *txs.ConvertSubnetTx: + case *txs.ConvertSubnetToL1Tx: subnetID = unsignedTx.Subnet default: return ids.Empty, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx) diff --git a/pkg/validatormanager/registration.go b/pkg/validatormanager/registration.go index f4c0a46a7..cb16a2dc1 100644 --- a/pkg/validatormanager/registration.go +++ b/pkg/validatormanager/registration.go @@ -100,7 +100,7 @@ func PoaValidatorManagerGetSubnetValidatorRegistrationMessage( disableOwners warpMessage.PChainOwner, weight uint64, ) (*warp.Message, ids.ID, error) { - addressedCallPayload, err := warpMessage.NewRegisterSubnetValidator( + addressedCallPayload, err := warpMessage.NewRegisterL1Validator( subnetID, nodeID, blsPublicKey, @@ -173,7 +173,7 @@ func PoaValidatorManagerGetPChainSubnetValidatorRegistrationWarpMessage( validationID ids.ID, registered bool, ) (*warp.Message, error) { - addressedCallPayload, err := warpMessage.NewSubnetValidatorRegistration(validationID, registered) + addressedCallPayload, err := warpMessage.NewL1ValidatorRegistration(validationID, registered) if err != nil { return nil, err } @@ -365,9 +365,9 @@ func GetRegistrationMessage( for validationIndex := uint32(0); validationIndex < numBootstrapValidatorsToSearch; validationIndex++ { bootstrapValidationID := subnetID.Append(validationIndex) if bootstrapValidationID == validationID { - justification := platformvm.SubnetValidatorRegistrationJustification{ - Preimage: &platformvm.SubnetValidatorRegistrationJustification_ConvertSubnetTxData{ - ConvertSubnetTxData: &platformvm.SubnetIDIndex{ + justification := platformvm.L1ValidatorRegistrationJustification{ + Preimage: &platformvm.L1ValidatorRegistrationJustification_ConvertSubnetToL1TxData{ + ConvertSubnetToL1TxData: &platformvm.SubnetIDIndex{ SubnetId: subnetID[:], Index: validationIndex, }, @@ -407,12 +407,12 @@ func GetRegistrationMessage( payload := msg.Payload addressedCall, err := warpPayload.ParseAddressedCall(payload) if err == nil { - reg, err := warpMessage.ParseRegisterSubnetValidator(addressedCall.Payload) + reg, err := warpMessage.ParseRegisterL1Validator(addressedCall.Payload) if err == nil { if reg.ValidationID() == validationID { - justification := platformvm.SubnetValidatorRegistrationJustification{ - Preimage: &platformvm.SubnetValidatorRegistrationJustification_RegisterSubnetValidatorMessage{ - RegisterSubnetValidatorMessage: addressedCall.Payload, + justification := platformvm.L1ValidatorRegistrationJustification{ + Preimage: &platformvm.L1ValidatorRegistrationJustification_RegisterL1ValidatorMessage{ + RegisterL1ValidatorMessage: addressedCall.Payload, }, } return proto.Marshal(&justification) diff --git a/pkg/validatormanager/removal.go b/pkg/validatormanager/removal.go index 9595cd834..64768060b 100644 --- a/pkg/validatormanager/removal.go +++ b/pkg/validatormanager/removal.go @@ -53,7 +53,7 @@ func PoaValidatorManagerGetSubnetValidatorWeightMessage( nonce uint64, weight uint64, ) (*warp.Message, error) { - addressedCallPayload, err := warpMessage.NewSubnetValidatorWeight( + addressedCallPayload, err := warpMessage.NewL1ValidatorWeight( validationID, nonce, weight, diff --git a/sdk/blockchain/blockchain.go b/sdk/blockchain/blockchain.go index 8c699aeb4..c7176980d 100644 --- a/sdk/blockchain/blockchain.go +++ b/sdk/blockchain/blockchain.go @@ -134,7 +134,7 @@ type Subnet struct { // BootstrapValidators are bootstrap validators that are included in the ConvertL1Tx call // that made Subnet a sovereign blockchain - BootstrapValidators []*txs.ConvertSubnetValidator + BootstrapValidators []*txs.ConvertSubnetToL1Validator } func (c *Subnet) SetParams(controlKeys []ids.ShortID, subnetAuthKeys []ids.ShortID, threshold uint32) { diff --git a/sdk/validatormanager/validator_manager.go b/sdk/validatormanager/validator_manager.go index 8b481a37d..abdee2e2f 100644 --- a/sdk/validatormanager/validator_manager.go +++ b/sdk/validatormanager/validator_manager.go @@ -116,27 +116,27 @@ func GetPoAPChainSubnetConversionWarpMessage( subnetID ids.ID, managerBlockchainID ids.ID, managerAddress common.Address, - convertSubnetValidators []*txs.ConvertSubnetValidator, + convertSubnetValidators []*txs.ConvertSubnetToL1Validator, ) (*warp.Message, error) { - validators := []warpMessage.SubnetConversionValidatorData{} + validators := []warpMessage.SubnetToL1ConverstionValidatorData{} for _, convertSubnetValidator := range convertSubnetValidators { - validators = append(validators, warpMessage.SubnetConversionValidatorData{ + validators = append(validators, warpMessage.SubnetToL1ConverstionValidatorData{ NodeID: convertSubnetValidator.NodeID[:], BLSPublicKey: convertSubnetValidator.Signer.PublicKey, Weight: convertSubnetValidator.Weight, }) } - subnetConversionData := warpMessage.SubnetConversionData{ + subnetConversionData := warpMessage.SubnetToL1ConversionData{ SubnetID: subnetID, ManagerChainID: managerBlockchainID, ManagerAddress: managerAddress.Bytes(), Validators: validators, } - subnetConversionID, err := warpMessage.SubnetConversionID(subnetConversionData) + subnetConversionID, err := warpMessage.SubnetToL1ConversionID(subnetConversionData) if err != nil { return nil, err } - addressedCallPayload, err := warpMessage.NewSubnetConversion(subnetConversionID) + addressedCallPayload, err := warpMessage.NewSubnetToL1Conversion(subnetConversionID) if err != nil { return nil, err } @@ -177,7 +177,7 @@ func PoAInitializeValidatorsSet( privateKey string, subnetID ids.ID, managerBlockchainID ids.ID, - convertSubnetValidators []*txs.ConvertSubnetValidator, + convertSubnetValidators []*txs.ConvertSubnetToL1Validator, subnetConversionSignedMessage *warp.Message, ) (*types.Transaction, *types.Receipt, error) { type InitialValidator struct { diff --git a/tests/e2e/assets/avalanchego b/tests/e2e/assets/avalanchego index f9a147afb..f3b383798 100755 Binary files a/tests/e2e/assets/avalanchego and b/tests/e2e/assets/avalanchego differ diff --git a/tests/e2e/commands/etna.go b/tests/e2e/commands/etna.go index 3c3bad2ec..f37277de7 100644 --- a/tests/e2e/commands/etna.go +++ b/tests/e2e/commands/etna.go @@ -74,6 +74,7 @@ func CreateLocalEtnaDevnetNode( avalanchegoPath, "--"+constants.SkipUpdateFlag, ) + fmt.Println(cmd) output, err := cmd.CombinedOutput() if err != nil { fmt.Println(cmd.String()) @@ -140,6 +141,7 @@ func DeployEtnaSubnetToCluster( ewoqPChainAddress, "--"+constants.SkipUpdateFlag, ) + fmt.Println(cmd) output, err := cmd.CombinedOutput() fmt.Println(string(output)) if err != nil { @@ -163,6 +165,7 @@ func TrackLocalEtnaSubnet( subnetName, "--"+constants.SkipUpdateFlag, ) + fmt.Println(cmd) output, err := cmd.CombinedOutput() if err != nil { fmt.Println(cmd.String()) @@ -193,6 +196,7 @@ func InitPoaManager( "--genesis-key", "--"+constants.SkipUpdateFlag, ) + fmt.Println(cmd) output, err := cmd.CombinedOutput() if err != nil { fmt.Println(cmd.String()) @@ -228,6 +232,7 @@ func AddEtnaSubnetValidatorToCluster( ewoqPChainAddress, "--"+constants.SkipUpdateFlag, ) + fmt.Println(cmd) output, err := cmd.CombinedOutput() if err != nil { fmt.Println(cmd.String()) diff --git a/tests/e2e/testcases/validatormanager/suite.go b/tests/e2e/testcases/validatormanager/suite.go index 1fe4a35e3..c3ddd42ee 100644 --- a/tests/e2e/testcases/validatormanager/suite.go +++ b/tests/e2e/testcases/validatormanager/suite.go @@ -128,7 +128,7 @@ func destroyLocalNode() { } } -func getBootstrapValidator() ([]*txs.ConvertSubnetValidator, error) { +func getBootstrapValidator() ([]*txs.ConvertSubnetToL1Validator, error) { infoClient := info.NewClient("http://127.0.0.1:9650") ctx, cancel := utils.GetAPILargeContext() defer cancel()