Skip to content

Commit

Permalink
feat: implement starting collator local node with custom keys (#363)
Browse files Browse the repository at this point in the history
* fix: fix robonomics relay not showing peer and blocks for mainnet

* feat: implement starting collator local node with cutom keys
  • Loading branch information
abhiyana authored Feb 12, 2024
1 parent 06d1540 commit 43c8c25
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/chains/polkadot/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
)

var (
polkadotParachains = []string{"acala", "ajuna", "bifrost", "centrifuge", "clover", "frequency", "kilt", "kylin", "litentry", "manta", "moonbeam", "moonsama", "nodle", "parallel", "pendulum", "phala", "polkadex", "subsocial", "zeitgeist"}
polkadotParachains = []string{"acala", "ajuna", "bifrost", "centrifuge", "clover", "frequency", "kilt", "kylin", "litentry", "manta", "moonbeam", "moonsama", "nodle", "parallel", "pendulum", "phala", "polkadex", "subsocial", "zeitgeist", "robonomics"}
)

var PolkadotCmd = common.NewDiveCommandBuilder().
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/chains/polkadot/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func startExplorer(cli *common.Cli, enclaveCtx *enclaves.EnclaveContext, finalRe
}

isLocalContext, err := cli.Context().IsLocalKurtosisContext()

if err != nil {
return nil, err
}
Expand Down
9 changes: 9 additions & 0 deletions cli/cmd/chains/utils/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,17 @@ func (sc *HardhatServiceConfig) EncodeToString() (string, error) {

// This code is for polkadot config file

type Key struct {
PrivatePhrase string `json:"private_phrase"`
PublicKey string `json:"public_key"`
}

type NodeConfig struct {
Name string `json:"name"`
NodeType string `json:"node_type"`
Prometheus bool `json:"prometheus"`
Ports Ports `json:"ports"`
Key Key `json:"key,omitempty"`
}

type Ports struct {
Expand All @@ -215,13 +221,16 @@ type RelayChainConfig struct {
type ParaNodeConfig struct {
Name string `json:"name"`
Nodes []NodeConfig `json:"nodes"`
SudoKey Key `json:"sudo_key,omitempty"`

}

type PolkadotServiceConfig struct {
ChainType string `json:"chain_type"`
RelayChain RelayChainConfig `json:"relaychain"`
Para []ParaNodeConfig `json:"parachains"`
Explorer bool `json:"explorer"`
WithoutRegistration bool `json:"without_registration"`
}

func (pc *ParaNodeConfig) EncodeToString() (string, error) {
Expand Down

0 comments on commit 43c8c25

Please sign in to comment.