Conversation
Co-authored-by: Meaghan FitzGerald <meag.fitz@avalabs.org> Signed-off-by: sukantoraymond <rsukanto@umich.edu>
felipemadero
left a comment
There was a problem hiding this comment.
probably move the new functions, used both by deploy and convert, to helpers
| partialSync, ok := partialSyncI.(bool) | ||
| if ok { | ||
| avagoConf.PartialSync = partialSync | ||
| if !ok { |
There was a problem hiding this comment.
why is this value not bool? probably we want to fix it on the input json
There was a problem hiding this comment.
lets just leave this as is
| networkoptions.NonLocalSupportedNetworkOptions, | ||
| "", | ||
| ) | ||
| setGlobalNetworkFlags(network) |
There was a problem hiding this comment.
I don't believe this should be needed. Remaining code should use the network object, not the flags.
Can you fix that
There was a problem hiding this comment.
this is needed, otherwise it won't work
There was a problem hiding this comment.
many functions in nodecmd is checking globalNetworkFlags for network
cmd/blockchaincmd/deploy.go
Outdated
| "please create your local node again and call blockchain deploy command again", err) | ||
| } | ||
| } | ||
| if err = HandleUsingLocalMachine(network, blockchainName, deployBalance, availableBalance); err != nil { |
There was a problem hiding this comment.
Can you give this a better name? What is the function doing? Something like StartLocalMachineNode or maybe better
cmd/blockchaincmd/convert.go
Outdated
| return nil | ||
| } | ||
|
|
||
| func InitializeValidatorManager(blockchainName, validatorManagerOwner string, subnetID, blockchainID ids.ID, network models.Network, avaGoBootstrapValidators []*txs.ConvertSubnetToL1Validator, pos bool) (bool, error) { |
There was a problem hiding this comment.
pls split arguments in lines
cmd/blockchaincmd/convert.go
Outdated
| return tracked, nil | ||
| } | ||
|
|
||
| func convertSubnetToL1(bootstrapValidators []models.SubnetValidator, deployer *subnet.PublicDeployer, subnetID, blockchainID ids.ID, network models.Network, chain string, sidecar models.Sidecar, controlKeysList, subnetAuthKeysList []string) ([]*txs.ConvertSubnetToL1Validator, bool, error) { |
* custom validator manager * fix lint * fix lint * fix lint * fix e2e * address comments * address comments * address comments * address errors * address errors
Convert cmd
avalanche blockchain convertconverts a subnet into a sovereign L1Before proceeding:
To check, ssh into each of the nodes and go to
./avalanchego/configs/node.json. Ensure that the fieldtrack-subnetshas value of the Blockchain ID of your blockchain.This can be done through:
Setting up an API node that is tracking the blockchain. The RPC URL will look like
http://API_NODE_IP_ADDRESS:9650/ext/bc/BLOCKCHAIN_ID/rpcOr Make one of the bootstrap validators publicly accessible (http-host: 0.0.0.0), but this is not recommended for security reasons. The RPC URL will look like
http://NODE_IP_ADDRESS:9650/ext/bc/BLOCKCHAIN_ID/rpcUsage (for mult-sig):
./bin/avalanche blockchain convert <subnetName>This command will create a file at specified output destination that contains the partially signed tx. Send this file to be signed by the remaining signers.
The remaining signers can sign this file by calling
avalanche transaction sign --input-tx-filepath <filePath>.Once everyone has signed, commit the tx by calling
avalanche transaction commit --input-tx-filepath <filePath>. The command will return the ConvertToL1 Tx ID.Once this part is complete, call
./bin/avalanche contract initValidatorManager <blockchainName>to initialize validator manager (this part is pending)