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

Integrate local machine into subnet deploy #2235

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
Merge branch 'node-create-local' into integrate-local-devnet
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
sukantoraymond authored Oct 14, 2024
commit 23a76bc9fe2a22db1cd9d431753201fa2f20e85b
4 changes: 4 additions & 0 deletions cmd/nodecmd/local.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,10 @@
"github.com/ava-labs/avalanche-cli/pkg/utils"
"github.com/ava-labs/avalanche-cli/pkg/ux"
"github.com/ava-labs/avalanche-network-runner/client"
anrutils "github.com/ava-labs/avalanche-network-runner/utils"

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (ubuntu-22.04)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node create\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node devnet\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], ubuntu-latest)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], macos-14)

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used

Check failure on line 21 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanche-network-runner/utils" imported as anrutils and not used
"github.com/ava-labs/avalanchego/ids"

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (ubuntu-22.04)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node create\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node devnet\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], ubuntu-latest)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], macos-14)

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanchego/ids" imported and not used

Check failure on line 22 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanchego/ids" imported and not used
"github.com/ava-labs/avalanchego/utils/logging"
"github.com/ava-labs/avalanchego/utils/set"

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / Golang Unit Tests (ubuntu-22.04)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Error handling\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Root\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node create\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Package Management\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Key\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Network\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Node devnet\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[APM\], ubuntu-latest)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / e2e tests (\[Subnet Compatibility\], macos-14)

"github.com/ava-labs/avalanchego/utils/set" imported and not used

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanchego/utils/set" imported and not used (typecheck)

Check failure on line 24 in cmd/nodecmd/local.go

GitHub Actions / Lint

"github.com/ava-labs/avalanchego/utils/set" imported and not used) (typecheck)
"github.com/spf13/cobra"
)


Unchanged files with check annotations Beta

// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.

Check failure on line 1 in cmd/nodecmd/add_dashboard.go

GitHub Actions / Lint

: # github.com/ava-labs/avalanche-cli/cmd/nodecmd
// See the file LICENSE for licensing terms.
package nodecmd
"time"
"github.com/ava-labs/avalanche-cli/cmd/blockchaincmd"
"github.com/ava-labs/avalanche-cli/cmd/nodecmd"

Check failure on line 13 in cmd/primarycmd/add_validator.go

GitHub Actions / Lint

could not import github.com/ava-labs/avalanche-cli/cmd/nodecmd (-: # github.com/ava-labs/avalanche-cli/cmd/nodecmd
"github.com/ava-labs/avalanche-cli/pkg/application"
"github.com/ava-labs/avalanche-cli/pkg/cobrautils"
"github.com/ava-labs/avalanche-cli/pkg/constants"
"github.com/ava-labs/avalanche-cli/cmd/interchaincmd/tokentransferrercmd"
"github.com/ava-labs/avalanche-cli/cmd/keycmd"
"github.com/ava-labs/avalanche-cli/cmd/networkcmd"
"github.com/ava-labs/avalanche-cli/cmd/nodecmd"

Check failure on line 22 in cmd/root.go

GitHub Actions / Lint

could not import github.com/ava-labs/avalanche-cli/cmd/nodecmd (-: # github.com/ava-labs/avalanche-cli/cmd/nodecmd
"github.com/ava-labs/avalanche-cli/cmd/primarycmd"
"github.com/ava-labs/avalanche-cli/cmd/teleportercmd"
"github.com/ava-labs/avalanche-cli/cmd/transactioncmd"
}
deployer.CleanCacheWallet()
managerAddress := common.HexToAddress(validatormanager.ValidatorContractAddress)
isFullySigned, ConvertL1TxID, tx, remainingSubnetAuthKeys, err := deployer.ConvertL1(

Check warning on line 680 in cmd/blockchaincmd/deploy.go

GitHub Actions / Lint

unexported-naming: the symbol ConvertL1TxID is local, its name should start with a lowercase letter (revive)
controlKeys,
subnetAuthKeys,
subnetID,
// TODO: implement getMinNonce
// getMinNonce gets minNonce associated with the validationID from P-Chain
func getMinNonce(validationID [32]byte) (uint64, error) {

Check warning on line 187 in cmd/blockchaincmd/remove_validator.go

GitHub Actions / Lint

unused-parameter: parameter 'validationID' seems to be unused, consider removing or renaming it as _ (revive)
return 0, nil
}
// TODO: implement getValidationID
// get validation ID for a node from P Chain
func getValidationID(nodeID ids.NodeID) [32]byte {

Check warning on line 193 in cmd/blockchaincmd/remove_validator.go

GitHub Actions / Lint

unused-parameter: parameter 'nodeID' seems to be unused, consider removing or renaming it as _ (revive)
return [32]byte{}
}
// TODO: implement generateWarpMessageRemoveValidator
func generateWarpMessageRemoveValidator(validationID [32]byte, nonce, weight uint64) (warpPlatformVM.Message, error) {

Check warning on line 198 in cmd/blockchaincmd/remove_validator.go

GitHub Actions / Lint

unused-parameter: parameter 'validationID' seems to be unused, consider removing or renaming it as _ (revive)
return warpPlatformVM.Message{}, nil
}
func CallAddValidator(
deployer *subnet.PublicDeployer,
network models.Network,
kc *keychain.Keychain,

Check warning on line 148 in cmd/blockchaincmd/add_validator.go

GitHub Actions / Lint

unused-parameter: parameter 'kc' seems to be unused, consider removing or renaming it as _ (revive)
useLedgerSetting bool,
blockchainName string,
nodeIDStrFormat string,
return nil
}
func generateWarpMessageAddValidator(subnetID ids.ID, nodeID ids.NodeID, weight uint64, blsPublicKey string, expiry uint64) (warpPlatformVM.Message, error) {

Check warning on line 264 in cmd/blockchaincmd/add_validator.go

GitHub Actions / Lint

unused-parameter: parameter 'subnetID' seems to be unused, consider removing or renaming it as _ (revive)
return warpPlatformVM.Message{}, nil
}
You are viewing a condensed version of this merge commit. You can view the full changes here.