diff --git a/core/scripts/keystone/src/01_deploy_contracts_cmd.go b/core/scripts/keystone/src/01_deploy_contracts_cmd.go index 179b3cf67ae..2f8357d6c77 100644 --- a/core/scripts/keystone/src/01_deploy_contracts_cmd.go +++ b/core/scripts/keystone/src/01_deploy_contracts_cmd.go @@ -55,7 +55,6 @@ func (g *deployContracts) Run(args []string) { onlySetConfig := fs.Bool("onlysetconfig", false, "set the config on the OCR3 contract without deploying the contracts or funding transmitters") dryRun := fs.Bool("dryrun", false, "dry run, don't actually deploy the contracts and do not fund transmitters") nodeSetsPath := fs.String("nodesets", "", "Custom node sets location") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") artefactsDir := fs.String("artefacts", "", "Custom artefacts directory location") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") @@ -76,15 +75,12 @@ func (g *deployContracts) Run(args []string) { if *nodeSetsPath == "" { *nodeSetsPath = defaultNodeSetsPath } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } os.Setenv("ETH_URL", *ethUrl) os.Setenv("ETH_CHAIN_ID", fmt.Sprintf("%d", *chainID)) os.Setenv("ACCOUNT_KEY", *accountKey) os.Setenv("INSECURE_SKIP_VERIFY", "true") - deploy(*keylessNodeSetsPath, *nodeSetsPath, *ocrConfigFile, *skipFunding, *dryRun, *onlySetConfig, *artefactsDir, *nodeSetSize) + deploy( *nodeSetsPath, *ocrConfigFile, *skipFunding, *dryRun, *onlySetConfig, *artefactsDir, *nodeSetSize) } // deploy does the following: @@ -94,7 +90,6 @@ func (g *deployContracts) Run(args []string) { // 4. Writes the deployed contract addresses to a file // 5. Funds the transmitters func deploy( - keylessNodeSetsPath string, nodeSetsPath string, configFile string, skipFunding bool, @@ -105,7 +100,6 @@ func deploy( ) { env := helpers.SetupEnv(false) ocrConfig := generateOCR3Config( - keylessNodeSetsPath, configFile, env.ChainID, nodeSetsPath, diff --git a/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go b/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go index 75055803932..688e4d073d3 100644 --- a/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go +++ b/core/scripts/keystone/src/02_deploy_jobspecs_cmd.go @@ -26,7 +26,6 @@ func (g *deployJobSpecs) Run(args []string) { p2pPort := fs.Int64("p2pport", 6690, "p2p port") onlyReplay := fs.Bool("onlyreplay", false, "only replay the block from the OCR3 contract setConfig transaction") templatesLocation := fs.String("templates", "", "Custom templates location") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") nodeSetsPath := fs.String("nodesets", "", "Custom node sets location") artefactsDir := fs.String("artefacts", "", "Custom artefacts directory location") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") @@ -48,20 +47,16 @@ func (g *deployJobSpecs) Run(args []string) { if *nodeSetsPath == "" { *nodeSetsPath = defaultNodeSetsPath } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } if *templatesLocation == "" { *templatesLocation = "templates" } - nodes := downloadKeylessNodeSets(*keylessNodeSetsPath, *nodeSetSize).Workflow.Nodes + nodes := downloadNodeSets(*chainID, *nodeSetsPath, *nodeSetSize).Workflow.Nodes deployedContracts, err := LoadDeployedContracts(*artefactsDir) PanicErr(err) jobspecs := genSpecs( *nodeSetsPath, - *keylessNodeSetsPath, *templatesLocation, *chainID, *p2pPort, deployedContracts.OCRContract.Hex(), *nodeSetSize, diff --git a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go index 5d1d25252dc..6076ef9fe06 100644 --- a/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go +++ b/core/scripts/keystone/src/03_deploy_streams_trigger_cmd.go @@ -101,7 +101,6 @@ func (g *deployStreamsTrigger) Run(args []string) { fs := flag.NewFlagSet(g.Name(), flag.ContinueOnError) chainID := fs.Int64("chainid", 1337, "chain id") ocrConfigFile := fs.String("ocrfile", "ocr_config.json", "path to OCR config file") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") nodeSetsPath := fs.String("nodesets", "", "Custom node sets location") force := fs.Bool("force", false, "Force deployment") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") @@ -122,9 +121,6 @@ func (g *deployStreamsTrigger) Run(args []string) { if *nodeSetsPath == "" { *nodeSetsPath = defaultNodeSetsPath } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } os.Setenv("ETH_URL", *ethUrl) os.Setenv("ETH_CHAIN_ID", fmt.Sprintf("%d", *chainID)) @@ -135,7 +131,6 @@ func (g *deployStreamsTrigger) Run(args []string) { setupMercuryV03( env, - *keylessNodeSetsPath, *ocrConfigFile, *chainID, *nodeSetsPath, @@ -145,17 +140,16 @@ func (g *deployStreamsTrigger) Run(args []string) { } // See /core/services/ocr2/plugins/mercury/integration_test.go -func setupMercuryV03(env helpers.Environment, keylessNodeSetsPath string, ocrConfigFilePath string, chainId int64, nodeSetsPath string, nodeSetSize int, force bool) { +func setupMercuryV03(env helpers.Environment, ocrConfigFilePath string, chainId int64, nodeSetsPath string, nodeSetSize int, force bool) { fmt.Printf("Deploying streams trigger for chain %d\n", chainId) fmt.Printf("Using OCR config file: %s\n", ocrConfigFilePath) - fmt.Printf("Using keyless node sets: %s\n", keylessNodeSetsPath) fmt.Printf("Using node sets: %s\n", nodeSetsPath) fmt.Printf("Force: %t\n\n", force) fmt.Printf("Deploying Mercury V0.3 contracts\n") _, _, _, verifier := deployMercuryV03Contracts(env) - nodeSets := downloadNodeSets(keylessNodeSetsPath, chainId, nodeSetsPath, nodeSetSize) + nodeSets := downloadNodeSets(chainId, nodeSetsPath, nodeSetSize) fmt.Printf("Generating OCR3 config\n") ocrConfig := generateMercuryOCR2Config(nodeSets.StreamsTrigger.NodeKeys[1:]) // skip the bootstrap node @@ -187,7 +181,7 @@ func setupMercuryV03(env helpers.Environment, keylessNodeSetsPath string, ocrCon PanicErr(err) fmt.Printf("Deploying OCR2 job specs for feed %s\n", feed.name) - deployOCR2JobSpecsForFeed(nodeSets.StreamsTrigger.NodeKeys, nodeSets.StreamsTrigger.Nodes, verifier, feed, chainId, force) + deployOCR2JobSpecsForFeed(nodeSets.StreamsTrigger, verifier, feed, chainId, force) } fmt.Println("Finished deploying streams trigger") @@ -251,11 +245,11 @@ func deployMercuryV03Contracts(env helpers.Environment) (linkToken *link_token_i return } -func deployOCR2JobSpecsForFeed(nca []NodeKeys, nodes []*NodeWthCreds, verifier *verifierContract.Verifier, feed feed, chainId int64, force bool) { +func deployOCR2JobSpecsForFeed(nodeSet NodeSet, verifier *verifierContract.Verifier, feed feed, chainId int64, force bool) { // we assign the first node as the bootstrap node - for i, n := range nca { + for i, n := range nodeSet.NodeKeys { // parallel arrays - api := newNodeAPI(nodes[i]) + api := newNodeAPI(nodeSet.Nodes[i]) jobSpecName := "" jobSpecStr := "" @@ -276,7 +270,7 @@ func deployOCR2JobSpecsForFeed(nca []NodeKeys, nodes []*NodeWthCreds, verifier * // Prepare data for Mercury V3 Job mercuryData := MercuryV3JobSpecData{ FeedName: fmt.Sprintf("feed-%s", feed.name), - BootstrapHost: fmt.Sprintf("%s@%s:%s", nca[0].P2PPeerID, nodes[0].ServiceName, "6690"), + BootstrapHost: fmt.Sprintf("%s@%s:%s", nodeSet.NodeKeys[0].P2PPeerID, nodeSet.Nodes[0].ServiceName, "6690"), VerifierAddress: verifier.Address().Hex(), Bridge: feed.bridgeName, NodeCSAKey: n.CSAPublicKey, diff --git a/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd.go b/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd.go index 3d984ca9bc8..1159f66722a 100644 --- a/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd.go +++ b/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd.go @@ -157,9 +157,8 @@ func (g *generateCribClusterOverridesPostprovision) Run(args []string) { fs := flag.NewFlagSet(g.Name(), flag.ContinueOnError) chainID := fs.Int64("chainid", 1337, "chain id") outputPath := fs.String("outpath", "-", "the path to output the generated overrides (use '-' for stdout)") - nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") + nodeSetSize := fs.Int("nodeSetSize", 5, "number of noes in a nodeset") nodeSetsPath := fs.String("nodesets", "", "Custom node sets location") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") artefactsDir := fs.String("artefacts", "", "Custom artefacts directory location") err := fs.Parse(args) @@ -174,14 +173,11 @@ func (g *generateCribClusterOverridesPostprovision) Run(args []string) { if *nodeSetsPath == "" { *nodeSetsPath = defaultNodeSetsPath } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } contracts, err := LoadDeployedContracts(*artefactsDir) helpers.PanicErr(err) - chart := generatePostprovisionConfig(keylessNodeSetsPath, chainID, nodeSetsPath, contracts, *nodeSetSize) + chart := generatePostprovisionConfig(*chainID, *nodeSetsPath, *nodeSetSize, contracts) yamlData, err := yaml.Marshal(chart) helpers.PanicErr(err) @@ -195,8 +191,8 @@ func (g *generateCribClusterOverridesPostprovision) Run(args []string) { } } -func generatePostprovisionConfig(keylessNodeSetsPath *string, chainID *int64, nodeSetsPath *string, contracts deployedContracts, nodeSetSize int) Helm { - nodeSets := downloadNodeSets(*keylessNodeSetsPath, *chainID, *nodeSetsPath, nodeSetSize) +func generatePostprovisionConfig(chainID int64, nodeSetsPath string, nodeSetSize int, contracts deployedContracts) Helm { + nodeSets := downloadNodeSets(chainID, nodeSetsPath, nodeSetSize) nodes := make(map[string]Node) nodeNames := []string{} @@ -210,7 +206,7 @@ func generatePostprovisionConfig(keylessNodeSetsPath *string, chainID *int64, no // we assign capabilitiesBootstrapper after we generate overrides so that // we do not include the bootstrapper config to itself overridesToml := generateOverridesToml( - *chainID, + chainID, contracts.CapabilityRegistry.Hex(), "", "", @@ -234,7 +230,7 @@ func generatePostprovisionConfig(keylessNodeSetsPath *string, chainID *int64, no nodeName := fmt.Sprintf("%d-%snode%d", nodeSetIndex, nodeSet.Prefix, i+2) nodeNames = append(nodeNames, nodeName) overridesToml := generateOverridesToml( - *chainID, + chainID, contracts.CapabilityRegistry.Hex(), nodeKey.EthAddress, contracts.ForwarderContract.Hex(), diff --git a/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd_test.go b/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd_test.go index ed822800f5a..85a5e44bd73 100644 --- a/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd_test.go +++ b/core/scripts/keystone/src/03_gen_crib_cluster_overrides_cmd_test.go @@ -11,7 +11,6 @@ import ( func TestGeneratePostprovisionConfig(t *testing.T) { chainID := int64(1337) nodeSetsPath := "./testdata/node_sets.json" - keylessNodeSetsPath := "./testdata/keyless_node_sets.json" contracts := deployedContracts{ OCRContract: [20]byte{0: 1}, @@ -22,7 +21,7 @@ func TestGeneratePostprovisionConfig(t *testing.T) { nodeSetSize := 5 - chart := generatePostprovisionConfig(&keylessNodeSetsPath, &chainID, &nodeSetsPath, contracts, nodeSetSize) + chart := generatePostprovisionConfig(chainID, nodeSetsPath, nodeSetSize, contracts) yamlData, err := yaml.Marshal(chart) if err != nil { diff --git a/core/scripts/keystone/src/04_delete_ocr3_jobs_cmd.go b/core/scripts/keystone/src/04_delete_ocr3_jobs_cmd.go index 347d14a9f89..15c04db30a8 100644 --- a/core/scripts/keystone/src/04_delete_ocr3_jobs_cmd.go +++ b/core/scripts/keystone/src/04_delete_ocr3_jobs_cmd.go @@ -41,7 +41,8 @@ func (g *deleteJobs) Name() string { func (g *deleteJobs) Run(args []string) { fs := flag.NewFlagSet(g.Name(), flag.ContinueOnError) - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") + chainID := fs.Int64("chainid", 1337, "chain id") + nodeSetsPath := fs.String("nodes", "", "Custom node sets location") artefactsDir := fs.String("artefacts", "", "Custom artefacts directory location") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") @@ -54,8 +55,8 @@ func (g *deleteJobs) Run(args []string) { if *artefactsDir == "" { *artefactsDir = defaultArtefactsDir } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath + if *nodeSetsPath == "" { + *nodeSetsPath = defaultNodeSetsPath } deployedContracts, err := LoadDeployedContracts(*artefactsDir) @@ -63,7 +64,7 @@ func (g *deleteJobs) Run(args []string) { fmt.Println("Error loading deployed contracts, skipping:", err) return } - nodes := downloadKeylessNodeSets(*keylessNodeSetsPath, *nodeSetSize).Workflow.Nodes + nodes := downloadNodeSets(*chainID, *nodeSetsPath, *nodeSetSize).Workflow.Nodes for _, node := range nodes { api := newNodeAPI(node) diff --git a/core/scripts/keystone/src/06_deploy_workflows_cmd.go b/core/scripts/keystone/src/06_deploy_workflows_cmd.go index cdaacb308d1..50b579cfcad 100644 --- a/core/scripts/keystone/src/06_deploy_workflows_cmd.go +++ b/core/scripts/keystone/src/06_deploy_workflows_cmd.go @@ -24,20 +24,21 @@ func (g *deployWorkflows) Name() string { func (g *deployWorkflows) Run(args []string) { fs := flag.NewFlagSet(g.Name(), flag.ContinueOnError) + chainID := fs.Int64("chainid", 1337, "chain id") workflowFile := fs.String("workflow", "workflow.yml", "path to workflow file") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") + nodeSets := fs.String("nodes", "", "Custom node sets location") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") err := fs.Parse(args) if err != nil || workflowFile == nil || *workflowFile == "" || nodeSetSize == nil || *nodeSetSize == 0 { fs.Usage() os.Exit(1) } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath + if *nodeSets == "" { + *nodeSets = defaultNodeSetsPath } fmt.Println("Deploying workflows") - nodes := downloadKeylessNodeSets(*keylessNodeSetsPath, *nodeSetSize).Workflow.Nodes + nodes := downloadNodeSets(*chainID, *nodeSets, *nodeSetSize).Workflow.Nodes if _, err = os.Stat(*workflowFile); err != nil { PanicErr(errors.New("toml file does not exist")) diff --git a/core/scripts/keystone/src/06_provision_capabilities_registry.go b/core/scripts/keystone/src/06_provision_capabilities_registry.go index 6ed1b8fa788..c6eaa49b829 100644 --- a/core/scripts/keystone/src/06_provision_capabilities_registry.go +++ b/core/scripts/keystone/src/06_provision_capabilities_registry.go @@ -30,7 +30,6 @@ func (c *provisionCR) Run(args []string) { chainID := fs.Int64("chainid", 1337, "Chain ID of the Ethereum network to deploy to") accountKey := fs.String("accountkey", "", "Private key of the account to deploy from") nodeSetsPath := fs.String("nodesets", "", "Custom node sets location") - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") artefactsDir := fs.String("artefacts", "", "Custom artefacts directory location") nodeSetSize := fs.Int("nodeSetSize", 5, "Number of nodes in a nodeset") @@ -49,9 +48,6 @@ func (c *provisionCR) Run(args []string) { if *nodeSetsPath == "" { *nodeSetsPath = defaultNodeSetsPath } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } os.Setenv("ETH_URL", *ethUrl) os.Setenv("ETH_CHAIN_ID", fmt.Sprintf("%d", *chainID)) @@ -63,7 +59,6 @@ func (c *provisionCR) Run(args []string) { reg := getOrDeployCapabilitiesRegistry(ctx, *artefactsDir, env) nodeSets := downloadNodeSets( - *keylessNodeSetsPath, *chainID, *nodeSetsPath, *nodeSetSize, diff --git a/core/scripts/keystone/src/07_delete_workflows_cmd.go b/core/scripts/keystone/src/07_delete_workflows_cmd.go index 75d80e47fc8..722e647d98e 100644 --- a/core/scripts/keystone/src/07_delete_workflows_cmd.go +++ b/core/scripts/keystone/src/07_delete_workflows_cmd.go @@ -24,7 +24,8 @@ func (g *deleteWorkflows) Name() string { func (g *deleteWorkflows) Run(args []string) { fs := flag.NewFlagSet(g.Name(), flag.ExitOnError) - keylessNodeSetsPath := fs.String("nodes", "", "Custom keyless node sets location") + chainID := fs.Int64("chainid", 1337, "chain id") + nodeSetsPath := fs.String("nodes", "", "Custom node sets location") nodeSetSize := fs.Int("nodeSetSize", 5, "number of nodes in a nodeset") err := fs.Parse(args) @@ -33,11 +34,7 @@ func (g *deleteWorkflows) Run(args []string) { os.Exit(1) } - if *keylessNodeSetsPath == "" { - *keylessNodeSetsPath = defaultKeylessNodeSetsPath - } - - nodes := downloadKeylessNodeSets(*keylessNodeSetsPath, *nodeSetSize).Workflow.Nodes + nodes := downloadNodeSets(*chainID, *nodeSetsPath, *nodeSetSize).Workflow.Nodes for _, node := range nodes { output := &bytes.Buffer{} diff --git a/core/scripts/keystone/src/88_gen_jobspecs.go b/core/scripts/keystone/src/88_gen_jobspecs.go index 025cd05b9f8..3009b6bcac6 100644 --- a/core/scripts/keystone/src/88_gen_jobspecs.go +++ b/core/scripts/keystone/src/88_gen_jobspecs.go @@ -28,14 +28,13 @@ type donHostSpec struct { func genSpecs( nodeSetsPath string, - keylessNodeSetsPath string, templatesDir string, chainID int64, p2pPort int64, ocrConfigContractAddress string, nodeSetSize int, ) donHostSpec { - workflowNodes := downloadNodeSets(keylessNodeSetsPath, chainID, nodeSetsPath, nodeSetSize).Workflow + workflowNodes := downloadNodeSets(chainID, nodeSetsPath, nodeSetSize).Workflow workflowNodeKeys := nodeKeysToKsDeployNodeKeys(workflowNodes.NodeKeys) nodes := workflowNodes.Nodes bootstrapNode := workflowNodeKeys[0] diff --git a/core/scripts/keystone/src/88_gen_jobspecs_test.go b/core/scripts/keystone/src/88_gen_jobspecs_test.go index e632f34bff8..1f76e9692c7 100644 --- a/core/scripts/keystone/src/88_gen_jobspecs_test.go +++ b/core/scripts/keystone/src/88_gen_jobspecs_test.go @@ -27,11 +27,10 @@ func (d *donHostSpec) ToString() string { func TestGenSpecs(t *testing.T) { nodeSetsPath := "./testdata/node_sets.json" - keylessNodeSetsPath := "./testdata/keyless_node_sets.json" chainID := int64(1337) p2pPort := int64(6690) contractAddress := "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" - specs := genSpecs(nodeSetsPath, keylessNodeSetsPath, "../templates", chainID, p2pPort, contractAddress, 4) + specs := genSpecs(nodeSetsPath, "../templates", chainID, p2pPort, contractAddress, 4) snaps.MatchSnapshot(t, specs.ToString()) } diff --git a/core/scripts/keystone/src/88_gen_ocr3_config.go b/core/scripts/keystone/src/88_gen_ocr3_config.go index 459799df786..136607791db 100644 --- a/core/scripts/keystone/src/88_gen_ocr3_config.go +++ b/core/scripts/keystone/src/88_gen_ocr3_config.go @@ -9,10 +9,10 @@ func mustReadConfig(fileName string) (output ksdeploy.TopLevelConfigSource) { return mustReadJSON[ksdeploy.TopLevelConfigSource](fileName) } -func generateOCR3Config(keylessNodeSetsPath string, configFile string, chainID int64, nodeSetsPath string, nodeSetSize int) ksdeploy.Orc2drOracleConfig { +func generateOCR3Config(configFile string, chainID int64, nodeSetsPath string, nodeSetSize int) ksdeploy.Orc2drOracleConfig { topLevelCfg := mustReadConfig(configFile) cfg := topLevelCfg.OracleConfig - nodeSets := downloadNodeSets(keylessNodeSetsPath, chainID, nodeSetsPath, nodeSetSize) + nodeSets := downloadNodeSets(chainID, nodeSetsPath, nodeSetSize) c, err := ksdeploy.GenerateOCR3Config(cfg, nodeKeysToKsDeployNodeKeys(nodeSets.Workflow.NodeKeys[1:])) // skip the bootstrap node helpers.PanicErr(err) return c diff --git a/core/scripts/keystone/src/88_gen_ocr3_config_test.go b/core/scripts/keystone/src/88_gen_ocr3_config_test.go index fee9f2a4953..12f58e6fc87 100644 --- a/core/scripts/keystone/src/88_gen_ocr3_config_test.go +++ b/core/scripts/keystone/src/88_gen_ocr3_config_test.go @@ -10,7 +10,7 @@ import ( func TestGenerateOCR3Config(t *testing.T) { // Generate OCR3 config - config := generateOCR3Config("./testdata/keyless_node_sets.json", "./testdata/SampleConfig.json", 1337, "./testdata/node_sets.json", 4) + config := generateOCR3Config("./testdata/SampleConfig.json", 1337, "./testdata/node_sets.json", 4) matchOffchainConfig := match.Custom("OffchainConfig", func(s any) (any, error) { // coerce the value to a string diff --git a/core/scripts/keystone/src/99_app.go b/core/scripts/keystone/src/99_app.go index adca4d43887..93305c9462f 100644 --- a/core/scripts/keystone/src/99_app.go +++ b/core/scripts/keystone/src/99_app.go @@ -30,7 +30,7 @@ func NewRedialBackoff() backoff.Backoff { } } -func newApp(n *NodeWthCreds, writer io.Writer) (*clcmd.Shell, *cli.App) { +func newApp(n NodeWthCreds, writer io.Writer) (*clcmd.Shell, *cli.App) { client := &clcmd.Shell{ Renderer: clcmd.RendererJSON{Writer: writer}, AppFactory: clcmd.ChainlinkAppFactory{}, @@ -59,7 +59,7 @@ type nodeAPI struct { clientMethod func(*cli.Context) error } -func newNodeAPI(n *NodeWthCreds) *nodeAPI { +func newNodeAPI(n NodeWthCreds) *nodeAPI { output := &bytes.Buffer{} methods, app := newApp(n, output) diff --git a/core/scripts/keystone/src/99_crib_client.go b/core/scripts/keystone/src/99_crib_client.go index fbaadb7487d..0d946805904 100644 --- a/core/scripts/keystone/src/99_crib_client.go +++ b/core/scripts/keystone/src/99_crib_client.go @@ -4,7 +4,7 @@ package src import ( "fmt" - "net/url" + "sort" "strings" ) @@ -12,13 +12,24 @@ type CribClient struct { k8sClient *K8sClient } -type CLNodeCredentials struct { - URL *url.URL - DeploymentName string - ServiceName string - Username string - Password string - NodePassword string +// SimpleURL lets us marshal a URL with only the fields we need. +type SimpleURL struct { + Scheme string `json:"scheme"` + Host string `json:"host"` + Path string `json:"path"` +} + +func (s SimpleURL) String() string { + return fmt.Sprintf("%s://%s%s", s.Scheme, s.Host, s.Path) +} + +type NodeWthCreds struct { + URL SimpleURL + RemoteURL SimpleURL + ServiceName string + APILogin string + APIPassword string + KeystorePassword string } func NewCribClient() *CribClient { @@ -28,36 +39,60 @@ func NewCribClient() *CribClient { } } -func (m *CribClient) GetCLNodeCredentials() ([]CLNodeCredentials, error) { +func (m *CribClient) getCLNodes() ([]NodeWthCreds, error) { fmt.Println("Getting CL node deployments with config maps...") deployments, err := m.k8sClient.GetDeploymentsWithConfigMap() if err != nil { return nil, err } - clNodeCredentials := []CLNodeCredentials{} + nodes := []NodeWthCreds{} for _, deployment := range deployments { apiCredentials := deployment.ConfigMap.Data["apicredentials"] splitCreds := strings.Split(strings.TrimSpace(apiCredentials), "\n") username := splitCreds[0] password := splitCreds[1] - nodePassword := deployment.ConfigMap.Data["node-password"] - url, err := url.Parse("https://" + deployment.Host) + keystorePassword := deployment.ConfigMap.Data["node-password"] + url := SimpleURL{ + Scheme: "https", + Host: deployment.Host, + Path: "", + } if err != nil { return nil, err } - clNodeCredential := CLNodeCredentials{ - URL: url, - ServiceName: deployment.ServiceName, - DeploymentName: deployment.Name, - Username: username, - Password: password, - NodePassword: nodePassword, + node := NodeWthCreds{ + // We dont handle both in-cluster and out-of-cluster deployments + // Hence why both URL and RemoteURL are the same + URL: url, + RemoteURL: url, + ServiceName: deployment.ServiceName, + APILogin: username, + APIPassword: password, + KeystorePassword: keystorePassword, } - clNodeCredentials = append(clNodeCredentials, clNodeCredential) + nodes = append(nodes, node) } - return clNodeCredentials, nil + // Sort nodes by URL + sort.Slice(nodes, func(i, j int) bool { + return nodes[i].URL.Host < nodes[j].URL.Host + }) + + return nodes, nil +} + +// Implements Prompter interface +func (n NodeWthCreds) IsTerminal() bool { + return false +} + +func (n NodeWthCreds) PasswordPrompt(p string) string { + return n.APIPassword +} + +func (n NodeWthCreds) Prompt(p string) string { + return n.APILogin } diff --git a/core/scripts/keystone/src/99_fetch_keys.go b/core/scripts/keystone/src/99_fetch_keys.go index f1033981e74..732578a8dae 100644 --- a/core/scripts/keystone/src/99_fetch_keys.go +++ b/core/scripts/keystone/src/99_fetch_keys.go @@ -15,18 +15,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) -// KeylessNodeSet represents a set of nodes without NodeKeys. -type KeylessNodeSet struct { - Name string - Prefix string - Nodes []*NodeWthCreds -} - // NodeSet represents a set of nodes with associated metadata. -// It embeds KeylessNodeSet and includes NodeKeys. // NodeKeys are indexed by the same order as Nodes. type NodeSet struct { - KeylessNodeSet + Name string + Prefix string + Nodes []NodeWthCreds NodeKeys []NodeKeys } @@ -43,157 +37,55 @@ type NodeSets struct { StreamsTrigger NodeSet } -// downloadKeylessNodeSets downloads the node API credentials or loads them from disk if they already exist. -// It returns a NodeSets struct without NodeKeys. -func downloadKeylessNodeSets(keylessNodeSetPath string, nodeSetSize int) NodeSets { - if _, err := os.Stat(keylessNodeSetPath); err == nil { - fmt.Println("Loading existing keyless nodesets at:", keylessNodeSetPath) - nodeSets := mustReadJSON[NodeSets](keylessNodeSetPath) - +func downloadNodeSets(chainID int64, nodeSetPath string, nodeSetSize int) NodeSets { + if _, err := os.Stat(nodeSetPath); err == nil { + fmt.Println("Loading existing nodesets at:", nodeSetPath) + nodeSets := mustReadJSON[NodeSets](nodeSetPath) return nodeSets } fmt.Println("Connecting to Kubernetes to fetch node credentials...") crib := NewCribClient() - clNodesWithCreds, err := crib.GetCLNodeCredentials() + nodes, err := crib.getCLNodes() PanicErr(err) - nodesList := clNodesWithCredsToNodes(clNodesWithCreds) - if len(nodesList) == 0 { - panic("no nodes found") - } - keylessNodeSets, err := splitNodesIntoNodeSets(nodesList, nodeSetSize) - PanicErr(err) - - mustWriteJSON(keylessNodeSetPath, keylessNodeSets) - - return keylessNodeSets -} - -func downloadNodeSets(keylessNodeSetsPath string, chainID int64, nodeSetPath string, nodeSetSize int) NodeSets { - if _, err := os.Stat(nodeSetPath); err == nil { - fmt.Println("Loading existing nodesets at", nodeSetPath) - nodeSets := mustReadJSON[NodeSets](nodeSetPath) - - return nodeSets - } - - nodeSetsWithoutKeys := downloadKeylessNodeSets(keylessNodeSetsPath, nodeSetSize) - nodeSets := populateNodeKeys(chainID, nodeSetsWithoutKeys) - mustWriteJSON(nodeSetPath, nodeSets) - - return nodeSets -} - -// splitNodesIntoNodeSets splits the nodes into NodeSets for 'workflow' and 'streams-trigger' nodeSets. -func splitNodesIntoNodeSets(nodes []*NodeWthCreds, nodeSetSize int) (NodeSets, error) { totalNodes := len(nodes) + // Workflow and StreamsTrigger nodeSets should have the same number of nodes + // hence we need at least 2 * nodeSetSize nodes requiredNodes := nodeSetSize * 2 if totalNodes < requiredNodes { - return NodeSets{}, fmt.Errorf("not enough nodes to populate both nodeSets: required %d, got %d", requiredNodes, totalNodes) + panic(fmt.Errorf("not enough nodes to populate both nodeSets: required %d, got %d", requiredNodes, totalNodes)) } - return NodeSets{ + nodeSets := NodeSets{ Workflow: NodeSet{ - KeylessNodeSet: KeylessNodeSet{ - Name: WorkflowNodeSetName, - Prefix: WorkflowNodeSetPrefix, - Nodes: nodes[:nodeSetSize], - }, - // NodeKeys will be populated later + Name: WorkflowNodeSetName, + Prefix: WorkflowNodeSetPrefix, + Nodes: nodes[:nodeSetSize], }, StreamsTrigger: NodeSet{ - KeylessNodeSet: KeylessNodeSet{ - Name: StreamsTriggerNodeSetName, - Prefix: StreamsTriggerNodeSetPrefix, - Nodes: nodes[nodeSetSize : nodeSetSize*2], - }, - // NodeKeys will be populated later + Name: StreamsTriggerNodeSetName, + Prefix: StreamsTriggerNodeSetPrefix, + Nodes: nodes[nodeSetSize : nodeSetSize*2], }, - }, nil -} - -// populateNodeKeys fetches and assigns NodeKeys to each NodeSet in NodeSets. -func populateNodeKeys(chainID int64, nodeSetsWithoutKeys NodeSets) NodeSets { - var nodeSets NodeSets - - nodeSets.Workflow = NodeSet{ - KeylessNodeSet: nodeSetsWithoutKeys.Workflow.KeylessNodeSet, } - workflowKeys := mustFetchAllNodeKeys(chainID, nodeSets.Workflow.Nodes) - nodeSets.Workflow.NodeKeys = convertAllKeysToNodeKeys(workflowKeys) - nodeSets.StreamsTrigger = NodeSet{ - KeylessNodeSet: nodeSetsWithoutKeys.StreamsTrigger.KeylessNodeSet, - } - streamsTriggerKeys := mustFetchAllNodeKeys(chainID, nodeSets.StreamsTrigger.Nodes) - nodeSets.StreamsTrigger.NodeKeys = convertAllKeysToNodeKeys(streamsTriggerKeys) + nodeSets.Workflow.NodeKeys = mustFetchNodeKeys(chainID, nodeSets.Workflow.Nodes, true) + nodeSets.StreamsTrigger.NodeKeys = mustFetchNodeKeys(chainID, nodeSets.StreamsTrigger.Nodes, false) + mustWriteJSON(nodeSetPath, nodeSets) return nodeSets } -// gatherAllNodeKeys aggregates all NodeKeys from NodeSets. -func gatherAllNodeKeys(nodeSets NodeSets) []AllNodeKeys { - var allKeys []AllNodeKeys - for _, nodeSet := range []NodeSet{nodeSets.Workflow, nodeSets.StreamsTrigger} { - for _, key := range nodeSet.NodeKeys { - allKeys = append(allKeys, key.toAllNodeKeys()) - } - } - return allKeys -} - -// convertAllKeysToNodeKeys converts AllNodeKeys to NodeKeys. -func convertAllKeysToNodeKeys(allKeys []AllNodeKeys) []NodeKeys { - nodeKeys := []NodeKeys{} - for _, k := range allKeys { - nodeKeys = append(nodeKeys, k.toNodeKeys()) - } - return nodeKeys -} - -func trimmedOCR2KB(ocr2Bndl cmd.OCR2KeyBundlePresenter) OCR2KBTrimmed { - return OCR2KBTrimmed{ - OCR2BundleID: ocr2Bndl.ID, - OCR2ConfigPublicKey: strings.TrimPrefix(ocr2Bndl.ConfigPublicKey, "ocr2cfg_evm_"), - OCR2OnchainPublicKey: strings.TrimPrefix(ocr2Bndl.OnchainPublicKey, "ocr2on_evm_"), - OCR2OffchainPublicKey: strings.TrimPrefix(ocr2Bndl.OffChainPublicKey, "ocr2off_evm_"), - } -} - -func trimmedAptosOCR2KB(ocr2Bndl cmd.OCR2KeyBundlePresenter) OCR2AptosKBTrimmed { - return OCR2AptosKBTrimmed{ - AptosBundleID: ocr2Bndl.ID, - AptosOnchainPublicKey: strings.TrimPrefix(ocr2Bndl.OnchainPublicKey, "ocr2on_aptos_"), - } -} - -type AllNodeKeys struct { - AptosAccount string `json:"AptosAccount"` - OCR2AptosKBs []OCR2AptosKBTrimmed `json:"OCR2AptosKBs"` - EthAddress string `json:"EthAddress"` - P2PPeerID string `json:"P2PPeerID"` // p2p_ - OCR2KBs []OCR2KBTrimmed `json:"OCR2KBs"` - CSAPublicKey string `json:"CSAPublicKey"` -} - -func (a AllNodeKeys) toNodeKeys() NodeKeys { - return NodeKeys{ - AptosAccount: a.AptosAccount, - OCR2AptosKBTrimmed: OCR2AptosKBTrimmed{ - AptosBundleID: a.OCR2AptosKBs[0].AptosBundleID, - AptosOnchainPublicKey: a.OCR2AptosKBs[0].AptosOnchainPublicKey, - }, - OCR2KBTrimmed: OCR2KBTrimmed{ - OCR2BundleID: a.OCR2KBs[0].OCR2BundleID, - OCR2ConfigPublicKey: a.OCR2KBs[0].OCR2ConfigPublicKey, - OCR2OnchainPublicKey: a.OCR2KBs[0].OCR2OnchainPublicKey, - OCR2OffchainPublicKey: a.OCR2KBs[0].OCR2OffchainPublicKey, - }, - EthAddress: a.EthAddress, - P2PPeerID: a.P2PPeerID, - CSAPublicKey: a.CSAPublicKey, - } +// NodeKeys represents the keys for a single node. +// If there are multiple OCR2KBs or OCR2AptosKBs, only the first one is used. +type NodeKeys struct { + AptosAccount string `json:"AptosAccount"` + EthAddress string `json:"EthAddress"` + P2PPeerID string `json:"P2PPeerID"` + CSAPublicKey string `json:"CSAPublicKey"` + OCR2KBTrimmed + OCR2AptosKBTrimmed } // This is an OCR key bundle with the prefixes on each respective key @@ -212,40 +104,8 @@ type OCR2AptosKBTrimmed struct { AptosOnchainPublicKey string `json:"AptosOnchainPublicKey"` // ocr2on_aptos_ } -type NodeKeys struct { - EthAddress string `json:"EthAddress"` - OCR2KBTrimmed - AptosAccount string `json:"AptosAccount"` - OCR2AptosKBTrimmed - P2PPeerID string `json:"P2PPeerID"` - CSAPublicKey string `json:"CSAPublicKey"` -} - -func (n NodeKeys) toAllNodeKeys() AllNodeKeys { - return AllNodeKeys{ - EthAddress: n.EthAddress, - AptosAccount: n.AptosAccount, - P2PPeerID: n.P2PPeerID, - OCR2KBs: []OCR2KBTrimmed{ - { - OCR2BundleID: n.OCR2BundleID, - OCR2ConfigPublicKey: n.OCR2ConfigPublicKey, - OCR2OnchainPublicKey: n.OCR2OnchainPublicKey, - OCR2OffchainPublicKey: n.OCR2OffchainPublicKey, - }, - }, - OCR2AptosKBs: []OCR2AptosKBTrimmed{ - { - AptosBundleID: n.AptosBundleID, - AptosOnchainPublicKey: n.AptosOnchainPublicKey, - }, - }, - CSAPublicKey: n.CSAPublicKey, - } -} - -func mustFetchAllNodeKeys(chainId int64, nodes []*NodeWthCreds) []AllNodeKeys { - allNodeKeys := []AllNodeKeys{} +func mustFetchNodeKeys(chainId int64, nodes []NodeWthCreds, createAptosKeys bool) []NodeKeys { + nodeKeys := []NodeKeys{} for _, n := range nodes { api := newNodeAPI(n) @@ -255,32 +115,10 @@ func mustFetchAllNodeKeys(chainId int64, nodes []*NodeWthCreds) []AllNodeKeys { ethAddress, err := findFirstGoodEthKeyAddress(chainId, *ethKeys) helpers.PanicErr(err) - // Get aptos account key - api.output.Reset() - aKeysClient := cmd.NewAptosKeysClient(api.methods) - err = aKeysClient.ListKeys(&cli.Context{App: api.app}) - helpers.PanicErr(err) - var aptosKeys []presenters.AptosKeyResource - helpers.PanicErr(json.Unmarshal(api.output.Bytes(), &aptosKeys)) - if len(aptosKeys) == 0 { - api.output.Reset() - fmt.Printf("WARN: node has no aptos keys, creating one...\n") - err = aKeysClient.CreateKey(&cli.Context{App: api.app}) - helpers.PanicErr(err) - api.output.Reset() - err = aKeysClient.ListKeys(&cli.Context{App: api.app}) - helpers.PanicErr(err) - helpers.PanicErr(json.Unmarshal(api.output.Bytes(), &aptosKeys)) - api.output.Reset() - } - if len(aptosKeys) != 1 { - // list number of keys - fmt.Printf("Node has %d aptos keys\n", len(aptosKeys)) - PanicErr(errors.New("node must have single aptos key")) + var aptosAccount string + if createAptosKeys { + aptosAccount = getOrCreateAptosKey(api, err) } - fmt.Printf("Node has aptos account %s\n", aptosKeys[0].Account) - aptosAccount := aptosKeys[0].Account - api.output.Reset() // Get p2p key p2pKeys := api.mustExec(api.methods.ListP2PKeys) @@ -294,16 +132,13 @@ func mustFetchAllNodeKeys(chainId int64, nodes []*NodeWthCreds) []AllNodeKeys { bundles := api.mustExec(api.methods.ListOCR2KeyBundles) ocr2Bundles := mustJSON[cmd.OCR2KeyBundlePresenters](bundles) - // We use the same bundle length for each chain since - // we marhshall them together into a single multichain key - // via ocrcommon.MarshalMultichainPublicKey - expectedBundleLen := 2 + expectedBundleLen := 1 // evm key bundles ocr2EvmBundles := getTrimmedEVMOCR2KBs(*ocr2Bundles) evmBundleLen := len(ocr2EvmBundles) if evmBundleLen < expectedBundleLen { - fmt.Printf("WARN: node has %d EVM OCR2 bundles when it should have at least 2, creating bundles...\n", evmBundleLen) + fmt.Printf("WARN: node has %d EVM OCR2 bundles when it should have at least %d, creating bundles...\n", evmBundleLen, expectedBundleLen) for i := evmBundleLen; i < expectedBundleLen; i++ { cBundle := api.withArg("evm").mustExec(api.methods.CreateOCR2KeyBundle) createdBundle := mustJSON[cmd.OCR2KeyBundlePresenter](cBundle) @@ -313,16 +148,9 @@ func mustFetchAllNodeKeys(chainId int64, nodes []*NodeWthCreds) []AllNodeKeys { } // aptos key bundles - ocr2AptosBundles := getTrimmedAptosOCR2KBs(*ocr2Bundles) - aptosBundleLen := len(ocr2AptosBundles) - if aptosBundleLen < expectedBundleLen { - fmt.Printf("WARN: node has %d Aptos OCR2 bundles when it should have at least 2, creating bundles...\n", aptosBundleLen) - for i := aptosBundleLen; i < expectedBundleLen; i++ { - cBundle := api.withArg("aptos").mustExec(api.methods.CreateOCR2KeyBundle) - createdBundle := mustJSON[cmd.OCR2KeyBundlePresenter](cBundle) - fmt.Println("Created OCR2 Aptos key bundle", string(cBundle)) - ocr2AptosBundles = append(ocr2AptosBundles, trimmedAptosOCR2KB(*createdBundle)) - } + var ocr2AptosBundles []OCR2AptosKBTrimmed + if createAptosKeys { + ocr2AptosBundles = createAptosOCR2KB(ocr2Bundles, expectedBundleLen, api) } csaKeys := api.mustExec(api.methods.ListCSAKeys) @@ -330,26 +158,90 @@ func mustFetchAllNodeKeys(chainId int64, nodes []*NodeWthCreds) []AllNodeKeys { csaPubKey, err := findFirstCSAPublicKey(*csaKeyResources) helpers.PanicErr(err) - nodeKeys := AllNodeKeys{ - EthAddress: ethAddress, - AptosAccount: aptosAccount, - P2PPeerID: peerID, - OCR2KBs: ocr2EvmBundles, - OCR2AptosKBs: ocr2AptosBundles, - CSAPublicKey: strings.TrimPrefix(csaPubKey, "csa_"), + // We can handle multiple OCR bundles in the future + // but for now we only support a single bundle per node + keys := NodeKeys{ + OCR2KBTrimmed: ocr2EvmBundles[0], + EthAddress: ethAddress, + AptosAccount: aptosAccount, + P2PPeerID: peerID, + CSAPublicKey: strings.TrimPrefix(csaPubKey, "csa_"), + } + if createAptosKeys { + keys.OCR2AptosKBTrimmed = ocr2AptosBundles[0] } - allNodeKeys = append(allNodeKeys, nodeKeys) + nodeKeys = append(nodeKeys, keys) } - return allNodeKeys + return nodeKeys } -func findFirstCSAPublicKey(csaKeyResources []presenters.CSAKeyResource) (string, error) { - for _, r := range csaKeyResources { - return r.PubKey, nil +func trimmedOCR2KB(ocr2Bndl cmd.OCR2KeyBundlePresenter) OCR2KBTrimmed { + return OCR2KBTrimmed{ + OCR2BundleID: ocr2Bndl.ID, + OCR2ConfigPublicKey: strings.TrimPrefix(ocr2Bndl.ConfigPublicKey, "ocr2cfg_evm_"), + OCR2OnchainPublicKey: strings.TrimPrefix(ocr2Bndl.OnchainPublicKey, "ocr2on_evm_"), + OCR2OffchainPublicKey: strings.TrimPrefix(ocr2Bndl.OffChainPublicKey, "ocr2off_evm_"), } - return "", errors.New("did not find any CSA Key Resources") +} + +func trimmedAptosOCR2KB(ocr2Bndl cmd.OCR2KeyBundlePresenter) OCR2AptosKBTrimmed { + return OCR2AptosKBTrimmed{ + AptosBundleID: ocr2Bndl.ID, + AptosOnchainPublicKey: strings.TrimPrefix(ocr2Bndl.OnchainPublicKey, "ocr2on_aptos_"), + } +} + +func createAptosOCR2KB(ocr2Bundles *cmd.OCR2KeyBundlePresenters, expectedBundleLen int, api *nodeAPI) []OCR2AptosKBTrimmed { + ocr2AptosBundles := getTrimmedAptosOCR2KBs(*ocr2Bundles) + aptosBundleLen := len(ocr2AptosBundles) + + if aptosBundleLen < expectedBundleLen { + fmt.Printf("WARN: node has %d Aptos OCR2 bundles when it should have at least %d, creating bundles...\n", aptosBundleLen, expectedBundleLen) + for i := aptosBundleLen; i < expectedBundleLen; i++ { + cBundle := api.withArg("aptos").mustExec(api.methods.CreateOCR2KeyBundle) + createdBundle := mustJSON[cmd.OCR2KeyBundlePresenter](cBundle) + fmt.Println("Created OCR2 Aptos key bundle", string(cBundle)) + ocr2AptosBundles = append(ocr2AptosBundles, trimmedAptosOCR2KB(*createdBundle)) + } + } + + return ocr2AptosBundles +} + +// getOrCreateAptosKey returns the Aptos account of the node. +// +// If the node has no Aptos keys, it creates one and returns the account. +func getOrCreateAptosKey(api *nodeAPI, err error) string { + api.output.Reset() + aKeysClient := cmd.NewAptosKeysClient(api.methods) + err = aKeysClient.ListKeys(&cli.Context{App: api.app}) + helpers.PanicErr(err) + var aptosKeys []presenters.AptosKeyResource + helpers.PanicErr(json.Unmarshal(api.output.Bytes(), &aptosKeys)) + if len(aptosKeys) == 0 { + api.output.Reset() + fmt.Printf("WARN: node has no aptos keys, creating one...\n") + err = aKeysClient.CreateKey(&cli.Context{App: api.app}) + helpers.PanicErr(err) + api.output.Reset() + err = aKeysClient.ListKeys(&cli.Context{App: api.app}) + helpers.PanicErr(err) + helpers.PanicErr(json.Unmarshal(api.output.Bytes(), &aptosKeys)) + api.output.Reset() + } + + if len(aptosKeys) != 1 { + fmt.Printf("Node has %d aptos keys\n", len(aptosKeys)) + PanicErr(errors.New("node must have single aptos key")) + } + + fmt.Printf("Node has aptos account %s\n", aptosKeys[0].Account) + aptosAccount := aptosKeys[0].Account + api.output.Reset() + + return aptosAccount } func getTrimmedAptosOCR2KBs(ocr2Bundles cmd.OCR2KeyBundlePresenters) []OCR2AptosKBTrimmed { @@ -372,6 +264,13 @@ func getTrimmedEVMOCR2KBs(ocr2Bundles cmd.OCR2KeyBundlePresenters) []OCR2KBTrimm return evmBundles } +func findFirstCSAPublicKey(csaKeyResources []presenters.CSAKeyResource) (string, error) { + for _, r := range csaKeyResources { + return r.PubKey, nil + } + return "", errors.New("did not find any CSA Key Resources") +} + func findFirstGoodEthKeyAddress(chainID int64, ethKeys []presenters.ETHKeyResource) (string, error) { for _, ethKey := range ethKeys { if ethKey.EVMChainID.Equal(ubig.NewI(chainID)) && !ethKey.Disabled { diff --git a/core/scripts/keystone/src/99_files.go b/core/scripts/keystone/src/99_files.go index 460e1f20f70..8a0b4161c8e 100644 --- a/core/scripts/keystone/src/99_files.go +++ b/core/scripts/keystone/src/99_files.go @@ -13,10 +13,8 @@ import ( const ( defaultArtefactsDir = "artefacts" defaultNodeSetsPath = ".cache/node_sets.json" - defaultKeylessNodeSetsPath = ".cache/keyless_node_sets.json" deployedContractsJSON = "deployed_contracts.json" bootstrapSpecTemplate = "bootstrap.toml" - streamsTriggerSpecTemplate = "streams_trigger.toml" oracleSpecTemplate = "oracle.toml" ) diff --git a/core/scripts/keystone/src/99_nodes.go b/core/scripts/keystone/src/99_nodes.go deleted file mode 100644 index de21fe2cf0a..00000000000 --- a/core/scripts/keystone/src/99_nodes.go +++ /dev/null @@ -1,49 +0,0 @@ -package src - -import ( - "net/url" - "sort" -) - -type NodeWthCreds struct { - URL *url.URL - RemoteURL *url.URL - ServiceName string - DeploymentName string - Login string - Password string -} - -func (n NodeWthCreds) IsTerminal() bool { - return false -} - -func (n NodeWthCreds) PasswordPrompt(p string) string { - return n.Password -} - -func (n NodeWthCreds) Prompt(p string) string { - return n.Login -} - -// clNodesWithCredsToNodes converts CLNodeCredentials to a slice of nodes. -func clNodesWithCredsToNodes(clNodesWithCreds []CLNodeCredentials) []*NodeWthCreds { - nodes := []*NodeWthCreds{} - for _, cl := range clNodesWithCreds { - n := NodeWthCreds{ - URL: cl.URL, - RemoteURL: cl.URL, - ServiceName: cl.ServiceName, - DeploymentName: cl.DeploymentName, - Password: cl.Password, - Login: cl.Username, - } - nodes = append(nodes, &n) - } - - // Sort nodes by URL - sort.Slice(nodes, func(i, j int) bool { - return nodes[i].URL.String() < nodes[j].URL.String() - }) - return nodes -} diff --git a/core/scripts/keystone/src/__snapshots__/03_gen_crib_cluster_overrides_cmd_test.snap b/core/scripts/keystone/src/__snapshots__/03_gen_crib_cluster_overrides_cmd_test.snap index 44460ebc373..55cb88a0930 100755 --- a/core/scripts/keystone/src/__snapshots__/03_gen_crib_cluster_overrides_cmd_test.snap +++ b/core/scripts/keystone/src/__snapshots__/03_gen_crib_cluster_overrides_cmd_test.snap @@ -28,7 +28,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -41,7 +41,7 @@ helm: Nodes = [] [EVM.Workflow] - FromAddress = '0xDA964d2Fe39E5aAE9C1226171F207e4C57c85a77' + FromAddress = '0x75cf1355cC4Eb358feaBb9e269a4DAEeB6721DBB' ForwarderAddress = '0x0200000000000000000000000000000000000000' 0-ks-wf-node3: image: ${runtime.images.app} @@ -50,7 +50,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -63,7 +63,7 @@ helm: Nodes = [] [EVM.Workflow] - FromAddress = '0xc8Cf02aF00b435c5F2311B9F158D9b69226116C3' + FromAddress = '0xc6dcE30f492CBD223b9946603192f22D86e783ca' ForwarderAddress = '0x0200000000000000000000000000000000000000' 0-ks-wf-node4: image: ${runtime.images.app} @@ -72,7 +72,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -85,7 +85,7 @@ helm: Nodes = [] [EVM.Workflow] - FromAddress = '0xAbACcde3e1e6916cE46AB2472AB788941f1ce088' + FromAddress = '0x1289d00A6565Afcd6437B09548F6019EF49696d0' ForwarderAddress = '0x0200000000000000000000000000000000000000' 0-ks-wf-node5: image: ${runtime.images.app} @@ -94,7 +94,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -107,7 +107,7 @@ helm: Nodes = [] [EVM.Workflow] - FromAddress = '0xB81D8e06Cf34347D22776D1Db67011aBD43ae07D' + FromAddress = '0x4b92B0aaC39932B7302676F48e78FA91852DC0EE' ForwarderAddress = '0x0200000000000000000000000000000000000000' 1-ks-str-trig-bt-node1: image: ${runtime.images.app} @@ -116,7 +116,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -134,7 +134,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -152,7 +152,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -170,7 +170,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] @@ -188,7 +188,7 @@ helm: [Capabilities.Peering] [Capabilities.Peering.V2] Enabled = true - DefaultBootstrappers = ['12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6691'] + DefaultBootstrappers = ['12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6691'] ListenAddresses = ['0.0.0.0:6691'] [Capabilities.ExternalRegistry] diff --git a/core/scripts/keystone/src/__snapshots__/88_gen_jobspecs_test.snap b/core/scripts/keystone/src/__snapshots__/88_gen_jobspecs_test.snap index 87b635876d4..ab20fb10ae7 100755 --- a/core/scripts/keystone/src/__snapshots__/88_gen_jobspecs_test.snap +++ b/core/scripts/keystone/src/__snapshots__/88_gen_jobspecs_test.snap @@ -19,13 +19,13 @@ type = "offchainreporting2" schemaVersion = 1 name = "Keystone" contractID = "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" -ocrKeyBundleID = "e5c943f6bccc202dfd94ac4727f3263d3fbf90a61210fb36bdab46b8868866bc" +ocrKeyBundleID = "20ccdc97afdf467465590115e3da4e5eb591bf5f43808e81a5d0807cd889b3c7" p2pv2Bootstrappers = [ - "12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6690", + "12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6690", ] relay = "evm" pluginType = "plugin" -transmitterID = "0xDA964d2Fe39E5aAE9C1226171F207e4C57c85a77" +transmitterID = "0x75cf1355cC4Eb358feaBb9e269a4DAEeB6721DBB" [relayConfig] chainID = "1337" @@ -40,8 +40,8 @@ telemetryType = "plugin" [onchainSigningStrategy] strategyName = 'multi-chain' [onchainSigningStrategy.config] -evm = "e5c943f6bccc202dfd94ac4727f3263d3fbf90a61210fb36bdab46b8868866bc" -aptos = "264ab5c3053ced6966e224ba928c2302749c428ddc4878ee3b3e84f812ba19d5" +evm = "20ccdc97afdf467465590115e3da4e5eb591bf5f43808e81a5d0807cd889b3c7" +aptos = "ac364cec9fe7d9ea1035fc511e5b2f30900caa6e65ac0501168005d05129e088" -------------------------------- Oracle 1: @@ -50,13 +50,13 @@ type = "offchainreporting2" schemaVersion = 1 name = "Keystone" contractID = "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" -ocrKeyBundleID = "5682657c3c43cbe56e5b3b0134630987637d4815a0acac7e657c399f500756be" +ocrKeyBundleID = "c734a4bf01aabe8152b7d0df0b18111ce9b3fe1ef1bca1d6a580967c8e4afc2d" p2pv2Bootstrappers = [ - "12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6690", + "12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6690", ] relay = "evm" pluginType = "plugin" -transmitterID = "0xc8Cf02aF00b435c5F2311B9F158D9b69226116C3" +transmitterID = "0xc6dcE30f492CBD223b9946603192f22D86e783ca" [relayConfig] chainID = "1337" @@ -71,8 +71,8 @@ telemetryType = "plugin" [onchainSigningStrategy] strategyName = 'multi-chain' [onchainSigningStrategy.config] -evm = "5682657c3c43cbe56e5b3b0134630987637d4815a0acac7e657c399f500756be" -aptos = "2b6d59d0957e9b6bf821be3fda1976c8d9944bebe6c66f0b0405bf5bf4cca40a" +evm = "c734a4bf01aabe8152b7d0df0b18111ce9b3fe1ef1bca1d6a580967c8e4afc2d" +aptos = "f1dfc3d44ee349b4349f33ce4c0ec3716142e9be3ae3ba9276c616556f6430bb" -------------------------------- Oracle 2: @@ -81,13 +81,13 @@ type = "offchainreporting2" schemaVersion = 1 name = "Keystone" contractID = "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" -ocrKeyBundleID = "ec1f8a0a941474ef0313e61cff67aa622d64cbb079c00abca93672c5caf9438e" +ocrKeyBundleID = "129377e1aea4f628b2a3274e528a131175ace13e7cc062b048a34f5b4cf7b512" p2pv2Bootstrappers = [ - "12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6690", + "12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6690", ] relay = "evm" pluginType = "plugin" -transmitterID = "0xAbACcde3e1e6916cE46AB2472AB788941f1ce088" +transmitterID = "0x1289d00A6565Afcd6437B09548F6019EF49696d0" [relayConfig] chainID = "1337" @@ -102,8 +102,8 @@ telemetryType = "plugin" [onchainSigningStrategy] strategyName = 'multi-chain' [onchainSigningStrategy.config] -evm = "ec1f8a0a941474ef0313e61cff67aa622d64cbb079c00abca93672c5caf9438e" -aptos = "e506f4bc2a7a886534617018b77cccb9e9823545e07c14f3cab04028966c44e7" +evm = "129377e1aea4f628b2a3274e528a131175ace13e7cc062b048a34f5b4cf7b512" +aptos = "2e39d555ec0d1e8795167d72d2a53faa5c537762c144f8a569c601f6bcc95d1d" -------------------------------- Oracle 3: @@ -112,13 +112,13 @@ type = "offchainreporting2" schemaVersion = 1 name = "Keystone" contractID = "0xB29934624cAe3765E33115A9530a13f5aEC7fa8A" -ocrKeyBundleID = "0bdb79dc47a775ff16ff11047505d409d0e83de4f078dca915a4361241a753b4" +ocrKeyBundleID = "053f21bfd2bbdb65261308af2d0be48593229d644d8b9e3e5dbe36f85399ae6c" p2pv2Bootstrappers = [ - "12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW@app-0-ks-wf-bt-node1:6690", + "12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq@app-0-ks-wf-bt-node1:6690", ] relay = "evm" pluginType = "plugin" -transmitterID = "0xB81D8e06Cf34347D22776D1Db67011aBD43ae07D" +transmitterID = "0x4b92B0aaC39932B7302676F48e78FA91852DC0EE" [relayConfig] chainID = "1337" @@ -133,8 +133,8 @@ telemetryType = "plugin" [onchainSigningStrategy] strategyName = 'multi-chain' [onchainSigningStrategy.config] -evm = "0bdb79dc47a775ff16ff11047505d409d0e83de4f078dca915a4361241a753b4" -aptos = "54e51e786ad29fa4d5ea4e9215f7f09d5eb8625a2b9895ac4c1548beb1341e2a" +evm = "053f21bfd2bbdb65261308af2d0be48593229d644d8b9e3e5dbe36f85399ae6c" +aptos = "3de7ab03a5b6b7fcfd196c6101d9302c5e6a5221ebd82b1fd9afa9a6bc9b0445" --- diff --git a/core/scripts/keystone/src/__snapshots__/88_gen_ocr3_config_test.snap b/core/scripts/keystone/src/__snapshots__/88_gen_ocr3_config_test.snap index 3e27f7d6397..76c7b8965d3 100755 --- a/core/scripts/keystone/src/__snapshots__/88_gen_ocr3_config_test.snap +++ b/core/scripts/keystone/src/__snapshots__/88_gen_ocr3_config_test.snap @@ -6,16 +6,16 @@ "OffchainConfigVersion": 30, "OnchainConfig": "0x", "Signers": [ - "0114003a6096c5d2101a6e80831ab7f2487a134add5a6205200065523a44b882753ced0eb96aa34c73c5d43a1c47a59f0542a0cb37346f392f07", - "01140077c2410a03b29fe22171ba322637e1f3f0d6a9390520008e340cc57026d3c8ee171dc972f1ca9ea8f772672245ec8607c48636f0a8a381", - "011400390a4d631cd08f83eacf7a9e4475d2b2a9ccc1c7052000900890fb1e8b55f69699098567bdec761b068cd258d696d4fce60881546001b4", - "011400b19d0be1065fa4a87cc4b817da70bb63a75b2fb30520006e42e0650e3b11aca5c59d04f5f7f5ce0048604abdf09f78c1b91aaf543d90b7" + "011400321bc7af41a634375526006365a31bf32b4cfa7c0520004ca789105da974eec967758ad32b575741d6cb36c1bb3bcfd87b235502cc1753", + "0114005192c43a68efb7a698c0459ff8591a115da128ee052000169008927a60e6c03e99aac6fa268dabaf4d00e117419861d87836211267361b", + "011400ed613636925af2df6ed8332d95028eabcbe95a3f052000ce86b34de67249f92058f69e47961907ebbf8a71c12123f1d2a7cab4874f6365", + "01140053b5bbc0efa2e2d2770029bab5d5a647a260a72b052000f2cb4932d3ce8c10bf67c60d35372a5ff1578255e25c2a119c2dea70e919567a" ], "Transmitters": [ - "0xDA964d2Fe39E5aAE9C1226171F207e4C57c85a77", - "0xc8Cf02aF00b435c5F2311B9F158D9b69226116C3", - "0xAbACcde3e1e6916cE46AB2472AB788941f1ce088", - "0xB81D8e06Cf34347D22776D1Db67011aBD43ae07D" + "0x75cf1355cC4Eb358feaBb9e269a4DAEeB6721DBB", + "0xc6dcE30f492CBD223b9946603192f22D86e783ca", + "0x1289d00A6565Afcd6437B09548F6019EF49696d0", + "0x4b92B0aaC39932B7302676F48e78FA91852DC0EE" ] } --- diff --git a/core/scripts/keystone/src/testdata/keyless_node_sets.json b/core/scripts/keystone/src/testdata/keyless_node_sets.json deleted file mode 100644 index 3e1ae60df03..00000000000 --- a/core/scripts/keystone/src/testdata/keyless_node_sets.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "Workflow": { - "Name": "workflow", - "Prefix": "ks-wf-", - "Nodes": [ - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-0-ks-wf-bt-node1", - "DeploymentName": "app-0-ks-wf-bt-node1-bootstrap", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-0-ks-wf-node2", - "DeploymentName": "app-0-ks-wf-node2", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-0-ks-wf-node3", - "DeploymentName": "app-0-ks-wf-node3", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-0-ks-wf-node4", - "DeploymentName": "app-0-ks-wf-node4", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-0-ks-wf-node5", - "DeploymentName": "app-0-ks-wf-node5", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - } - ], - "NodeKeys": null - }, - "StreamsTrigger": { - "Name": "streams-trigger", - "Prefix": "ks-str-trig-", - "Nodes": [ - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-1-ks-str-trig-bt-node1", - "DeploymentName": "app-1-ks-str-trig-bt-node1", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-1-ks-str-trig-node2", - "DeploymentName": "app-1-ks-str-trig-node2", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-1-ks-str-trig-node3", - "DeploymentName": "app-1-ks-str-trig-node3", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-1-ks-str-trig-node4", - "DeploymentName": "app-1-ks-str-trig-node4", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - }, - { - "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" - }, - "ServiceName": "app-1-ks-str-trig-node5", - "DeploymentName": "app-1-ks-str-trig-node5", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" - } - ], - "NodeKeys": null - } -} diff --git a/core/scripts/keystone/src/testdata/node_sets.json b/core/scripts/keystone/src/testdata/node_sets.json index e9f7be3f6f1..b5502a0ed53 100644 --- a/core/scripts/keystone/src/testdata/node_sets.json +++ b/core/scripts/keystone/src/testdata/node_sets.json @@ -5,225 +5,145 @@ "Nodes": [ { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-bt-node1.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-bt-node1.local", + "path": "" }, "ServiceName": "app-0-ks-wf-bt-node1", - "DeploymentName": "app-0-ks-wf-bt-node1-bootstrap", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node2.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node2.local", + "path": "" }, "ServiceName": "app-0-ks-wf-node2", - "DeploymentName": "app-0-ks-wf-node2", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node3.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node3.local", + "path": "" }, "ServiceName": "app-0-ks-wf-node3", - "DeploymentName": "app-0-ks-wf-node3", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node4.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node4.local", + "path": "" }, "ServiceName": "app-0-ks-wf-node4", - "DeploymentName": "app-0-ks-wf-node4", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node5.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-0-ks-wf-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-0-ks-wf-node5.local", + "path": "" }, "ServiceName": "app-0-ks-wf-node5", - "DeploymentName": "app-0-ks-wf-node5", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" } ], "NodeKeys": [ { - "EthAddress": "0x4cdEf4eaD7C47d804e26dF56aCbf5f7F7E28f912", - "OCR2BundleID": "56f6587a9fd23fb62cedaeeab0fc302dc38c824aae4b7a5da46c850bee281f14", - "OCR2OnchainPublicKey": "59a4e23a84bc7b54179f1028eae1857a425370e1", - "OCR2OffchainPublicKey": "3ac4e8c462d6bef48ea5e19cc00c7510fdaf5f13ca1229092aba2389e8508136", - "OCR2ConfigPublicKey": "82965a3d5175e2643671623ac61eb135a79132586139506319a25608a08dde3d", - "AptosAccount": "1f7a3ac9556d3ee2e11e9700fa5b7e58ef329158bee1dd1e30231a37b6e75fd8", - "AptosBundleID": "728fcde3160c46b394c3612add0206229266f2346f8c802a07cbe4e7026166fb", - "AptosOnchainPublicKey": "83352d71acdd5cc7b65d84d92aa31cdd9d129a5ce49184bcc2d4c7e58114cc56", - "P2PPeerID": "12D3KooWA7vvR9tG8n76xGXuipuXo2hE6Act1zcLxYyQm7ixBuvW", - "CSAPublicKey": "a5024bd1f5ccd546a3c5086fb1544debe51c79a6c301a7c7ac001dbc7621b66f" + "AptosAccount": "38476e214b5c60e642019b38db9f06ce6c5a9bcb987d2bfbbbe750195aa7e964", + "EthAddress": "0x568C859E34F210a23847acE0D4960dB74f359dC4", + "P2PPeerID": "12D3KooWFSmZaLFF1nu3mzxPKj43F89WgVDqkpvwFUHBfMHSqpVq", + "CSAPublicKey": "981d781740ff79bb181a4c70390bd54e936f2d9211f5b20c708205b481a8efcc", + "OCR2BundleID": "782e4d14d0f53071ab7a45b9085eb99beed3350e7ab72d5edd4429169e5c87ef", + "OCR2OnchainPublicKey": "357ddc6c0fc6510ec67edbb9a63819dcb47f1506", + "OCR2OffchainPublicKey": "822488a7e4583eed41e5ab142dd6be721c2cc0f217ceee0912ff2db2a24e404c", + "OCR2ConfigPublicKey": "c92ae7ff9b1cef97bb875917456bc6b83df5f5a76ad00c914869c7068748f31a", + "AptosBundleID": "d4acd2c80860fd1e49363f08426e7e5efa7fcd57356a8aba408732e975d3e9a6", + "AptosOnchainPublicKey": "48b37d91fd2c2c784759021d421e7e6f98078b4343cf8cab378394aa357a49a2" }, { - "EthAddress": "0xDA964d2Fe39E5aAE9C1226171F207e4C57c85a77", - "OCR2BundleID": "e5c943f6bccc202dfd94ac4727f3263d3fbf90a61210fb36bdab46b8868866bc", - "OCR2OnchainPublicKey": "3a6096c5d2101a6e80831ab7f2487a134add5a62", - "OCR2OffchainPublicKey": "ae2af1cc9827047acaf7691aafc2dcfdf0135dcb2b7c01d6d20f91389c4bdbc7", - "OCR2ConfigPublicKey": "3bbb4ad2c4154e4db0d7c6700076780f0c758f55c39afb3c1588834d5278e20a", - "AptosAccount": "fcac44d068bf70bb7fe1949362437f20ddc4cab21d5c79fd7dbf8da67cc842c3", - "AptosBundleID": "264ab5c3053ced6966e224ba928c2302749c428ddc4878ee3b3e84f812ba19d5", - "AptosOnchainPublicKey": "65523a44b882753ced0eb96aa34c73c5d43a1c47a59f0542a0cb37346f392f07", - "P2PPeerID": "12D3KooWQ24qvZZxUyi2HVeEMtoKS59TXEp7HqDUeaQA9WSAq1kA", - "CSAPublicKey": "2963b236ac0e5d9f4ae610019c68e9be87cc2bb24f73aefedaae053dedae420e" + "AptosAccount": "bd4d7e53622621af04a0100db7720508c41f3dd5fe9e97dd57eb9673d82a385d", + "EthAddress": "0x75cf1355cC4Eb358feaBb9e269a4DAEeB6721DBB", + "P2PPeerID": "12D3KooWHhXyDmHB6D1UQosLXmhczw3zxB3DLYBuq9Unb4iCD4Sc", + "CSAPublicKey": "6a4723752c843c8d91e542af5373b3d123eca05b570a6e910f5d2f28737a26f6", + "OCR2BundleID": "20ccdc97afdf467465590115e3da4e5eb591bf5f43808e81a5d0807cd889b3c7", + "OCR2OnchainPublicKey": "321bc7af41a634375526006365a31bf32b4cfa7c", + "OCR2OffchainPublicKey": "a2b7f0b85be445e2c7317bdff74c41acd9c67b5a35cda94ae31da8a9ef886db2", + "OCR2ConfigPublicKey": "faa4cfefb226ae8e86480e019bd5bbd6405c26e22dcea40d2c6f01e583213e21", + "AptosBundleID": "ac364cec9fe7d9ea1035fc511e5b2f30900caa6e65ac0501168005d05129e088", + "AptosOnchainPublicKey": "4ca789105da974eec967758ad32b575741d6cb36c1bb3bcfd87b235502cc1753" }, { - "EthAddress": "0xc8Cf02aF00b435c5F2311B9F158D9b69226116C3", - "OCR2BundleID": "5682657c3c43cbe56e5b3b0134630987637d4815a0acac7e657c399f500756be", - "OCR2OnchainPublicKey": "77c2410a03b29fe22171ba322637e1f3f0d6a939", - "OCR2OffchainPublicKey": "384ace52c3bb03f245090582ad7b8c36c81510fdcb978e74edcdb7917e21cae8", - "OCR2ConfigPublicKey": "692e770af45d5261090143470cb7901e4174cd8e7e4f369c92fd6a1afd947f06", - "AptosAccount": "c96a208a0df76f0a6cf7ea7b046fb398db59c25e4f223165738058c607f90bbc", - "AptosBundleID": "2b6d59d0957e9b6bf821be3fda1976c8d9944bebe6c66f0b0405bf5bf4cca40a", - "AptosOnchainPublicKey": "8e340cc57026d3c8ee171dc972f1ca9ea8f772672245ec8607c48636f0a8a381", - "P2PPeerID": "12D3KooWN2rZhriFQUXK7dXma8VdE3cDBMk9Zs9nGHNUPwkX6g86", - "CSAPublicKey": "bea98fd6e29ad67fe2347a024cb66abde2d8494e1d25255288ae5a8ff7170b2d" + "AptosAccount": "9543634f4a73e4cfb284816b32d7ec6b7ac8d07b841f2c1f714750186cc28a5a", + "EthAddress": "0xc6dcE30f492CBD223b9946603192f22D86e783ca", + "P2PPeerID": "12D3KooWEWK8e627u6S5NuwXTgGLakGpn1vzQjyjp6Regu1pcpFC", + "CSAPublicKey": "a715467dd87ea210d685b82a32f30c781031df00c2c974dc5fad9159a7ba240c", + "OCR2BundleID": "c734a4bf01aabe8152b7d0df0b18111ce9b3fe1ef1bca1d6a580967c8e4afc2d", + "OCR2OnchainPublicKey": "5192c43a68efb7a698c0459ff8591a115da128ee", + "OCR2OffchainPublicKey": "5e68d07f82ea0bf7054560775c2919bc955dd7fa73b2a36391a4dc27cbb18fdb", + "OCR2ConfigPublicKey": "ebd66285a029f443277091bc4b191b13e21a9b806ce379584411277a265c8e5c", + "AptosBundleID": "f1dfc3d44ee349b4349f33ce4c0ec3716142e9be3ae3ba9276c616556f6430bb", + "AptosOnchainPublicKey": "169008927a60e6c03e99aac6fa268dabaf4d00e117419861d87836211267361b" }, { - "EthAddress": "0xAbACcde3e1e6916cE46AB2472AB788941f1ce088", - "OCR2BundleID": "ec1f8a0a941474ef0313e61cff67aa622d64cbb079c00abca93672c5caf9438e", - "OCR2OnchainPublicKey": "390a4d631cd08f83eacf7a9e4475d2b2a9ccc1c7", - "OCR2OffchainPublicKey": "301bcf56866ed58be7df4b9322178ae603ade07716147b952e72e93e03d911eb", - "OCR2ConfigPublicKey": "64723878d960ef35b299b38ea7637efe6c1af7fca1b08150784ceb9a3560ba66", - "AptosAccount": "57e11c444d4c5cf77263087b6fad83eab7fae648ddf4b702e59d95af0b995566", - "AptosBundleID": "e506f4bc2a7a886534617018b77cccb9e9823545e07c14f3cab04028966c44e7", - "AptosOnchainPublicKey": "900890fb1e8b55f69699098567bdec761b068cd258d696d4fce60881546001b4", - "P2PPeerID": "12D3KooWFQ2DRXc6om66PFvzXMsAPmgJdZ6ztgiLCsCHjXwPCcGH", - "CSAPublicKey": "acdada7a0cfde36ba81398b57c21c2f60825ddfa7cfb126ce6eb00d6aef87808" + "AptosAccount": "bcd6fdce3fdcd060fed58fe13be522dc3fb0cff138b0f4f4460392f5e6d88728", + "EthAddress": "0x1289d00A6565Afcd6437B09548F6019EF49696d0", + "P2PPeerID": "12D3KooW9uJ981ocDxTJrPVxMEzPcS14WTJSU1YWH5otcpZSqkUd", + "CSAPublicKey": "9db8641f2067bfdf476e375060a0bd97c21da46d9f54c6ff4f990c6aef882478", + "OCR2BundleID": "129377e1aea4f628b2a3274e528a131175ace13e7cc062b048a34f5b4cf7b512", + "OCR2OnchainPublicKey": "ed613636925af2df6ed8332d95028eabcbe95a3f", + "OCR2OffchainPublicKey": "4eb3e2f1d324804d0adf5169bc187425d3e665c29cddf13bd57ec40ee207ce75", + "OCR2ConfigPublicKey": "effd7d3535e1b6596068085b3e19f9577a536aeacbdeea318cbd870ec678334d", + "AptosBundleID": "2e39d555ec0d1e8795167d72d2a53faa5c537762c144f8a569c601f6bcc95d1d", + "AptosOnchainPublicKey": "ce86b34de67249f92058f69e47961907ebbf8a71c12123f1d2a7cab4874f6365" }, { - "EthAddress": "0xB81D8e06Cf34347D22776D1Db67011aBD43ae07D", - "OCR2BundleID": "0bdb79dc47a775ff16ff11047505d409d0e83de4f078dca915a4361241a753b4", - "OCR2OnchainPublicKey": "b19d0be1065fa4a87cc4b817da70bb63a75b2fb3", - "OCR2OffchainPublicKey": "4f72fdf1dfb6d6b006280d40801e337488f2b0edb1b1b3a3a6a3413250bb29cb", - "OCR2ConfigPublicKey": "e2425039ef3427d07092bd9cfe01db2294387f0cb288170e16b8103c9f7e696e", - "AptosAccount": "3c97423f29c1da05b8354f72e32cf6250dc3e5f5451fb5ceb1b53c16423c388c", - "AptosBundleID": "54e51e786ad29fa4d5ea4e9215f7f09d5eb8625a2b9895ac4c1548beb1341e2a", - "AptosOnchainPublicKey": "6e42e0650e3b11aca5c59d04f5f7f5ce0048604abdf09f78c1b91aaf543d90b7", - "P2PPeerID": "12D3KooWE57dneLdwCigi3oKrCMYhQoCPNKHHSr8Qe4n6hW28UT9", - "CSAPublicKey": "25b7d6cfa17de0524c583fa7b2b7aede4a6a761c2a0ddaa11d3118e72c46a8ea" + "AptosAccount": "6549063d427778024fc4230154753c1a30eac88a7a8eab1d36014a3db48c39b3", + "EthAddress": "0x4b92B0aaC39932B7302676F48e78FA91852DC0EE", + "P2PPeerID": "12D3KooWJJC2KgoP1oih7cky9B1wL12d5CBqWFKpdfQgfujmHGyz", + "CSAPublicKey": "8c8b473cc37664a21d548477cd268013256d1d70cd9a137bdfd99da7612a93e0", + "OCR2BundleID": "053f21bfd2bbdb65261308af2d0be48593229d644d8b9e3e5dbe36f85399ae6c", + "OCR2OnchainPublicKey": "53b5bbc0efa2e2d2770029bab5d5a647a260a72b", + "OCR2OffchainPublicKey": "eac02c66802acd9cd998b9b45c52b5b36837bfb829b2838cade040e0155c774a", + "OCR2ConfigPublicKey": "43b9d0c7cace05fd17426dad4386857025a71eb08205690dff5f76224e9c7f5c", + "AptosBundleID": "3de7ab03a5b6b7fcfd196c6101d9302c5e6a5221ebd82b1fd9afa9a6bc9b0445", + "AptosOnchainPublicKey": "f2cb4932d3ce8c10bf67c60d35372a5ff1578255e25c2a119c2dea70e919567a" } ] }, @@ -233,225 +153,145 @@ "Nodes": [ { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-bt-node1.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-bt-node1.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-bt-node1.local", + "path": "" }, "ServiceName": "app-1-ks-str-trig-bt-node1", - "DeploymentName": "app-1-ks-str-trig-bt-node1", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node2.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node2.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node2.local", + "path": "" }, "ServiceName": "app-1-ks-str-trig-node2", - "DeploymentName": "app-1-ks-str-trig-node2", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node3.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node3.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node3.local", + "path": "" }, "ServiceName": "app-1-ks-str-trig-node3", - "DeploymentName": "app-1-ks-str-trig-node3", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node4.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node4.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node4.local", + "path": "" }, "ServiceName": "app-1-ks-str-trig-node4", - "DeploymentName": "app-1-ks-str-trig-node4", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" }, { "URL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node5.local", + "path": "" }, "RemoteURL": { - "Scheme": "https", - "Opaque": "", - "User": null, - "Host": "crib-local-1-ks-str-trig-node5.local", - "Path": "", - "RawPath": "", - "OmitHost": false, - "ForceQuery": false, - "RawQuery": "", - "Fragment": "", - "RawFragment": "" + "scheme": "https", + "host": "crib-local-1-ks-str-trig-node5.local", + "path": "" }, "ServiceName": "app-1-ks-str-trig-node5", - "DeploymentName": "app-1-ks-str-trig-node5", - "Login": "notreal@fakeemail.ch", - "Password": "fj293fbBnlQ!f9vNs" + "APILogin": "notreal@fakeemail.ch", + "APIPassword": "fj293fbBnlQ!f9vNs", + "KeystorePassword": "T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ" } ], "NodeKeys": [ { - "EthAddress": "0x61560C5b25E4745f0F633D84476c14390FA3DD84", - "OCR2BundleID": "aaca54f8ec36acfc6dafd746c37a4f558fee4c4360b67c9bdf93dda87f54b3b0", - "OCR2OnchainPublicKey": "e74920e7879d72aaef6218f4bae6ff7c8a6aa4ca", - "OCR2OffchainPublicKey": "5d1319480eaa15ff9852db3e39d683d97d6e0383f76c6a4e050da13bab099bf7", - "OCR2ConfigPublicKey": "86547b9f1a068bbe66a23395c2a96920391d460a090f7fa55b71b4584e1dca2d", - "AptosAccount": "8058a1f4fe8f7794db77e6f4a32f3c7e34ce828869b6c8201331398a09f535fc", - "AptosBundleID": "98d3f2c10bf93134cfcbfdb20c3362a19d92847d6a1904402557cadf2cda9e41", - "AptosOnchainPublicKey": "94d634b7a425348560563a8dd480e8014777a91891640098837f2f31429cd019", - "P2PPeerID": "12D3KooWHmKkBDnZQdQfXfseupkHVUExXSXgKMbsvowuWVvHXnET", - "CSAPublicKey": "3bc22ec8afe81fe971d7b997847c48c28387e515bd8b8d58dc66e1b6000d2eba" + "AptosAccount": "", + "EthAddress": "0xCE59C33dc0807F194ba2566e093398dc5e459840", + "P2PPeerID": "12D3KooWGQkR76gPL7Qt1aYYHtPdU65zG4h36efLAERMwudHqGK3", + "CSAPublicKey": "b3dcb60fcf807453c95628a1e7970b077b5e2bbefb0b159841c28dc1776574de", + "OCR2BundleID": "ca2e13222b556f34ae5bc9cea72e6e7ce8221bf76e2d8b3d91505facdbbd71d3", + "OCR2OnchainPublicKey": "a4938b0552e830b45d481cca9893f319259d365c", + "OCR2OffchainPublicKey": "221fe1f972f01da727dbd6842daf4d322f7cab5a7e93816688be7a52f4088b86", + "OCR2ConfigPublicKey": "1af18519dfc5a22db640f1f8095bafaaeb987ab4e3e7ec366dfaa92df9a6ee7b", + "AptosBundleID": "", + "AptosOnchainPublicKey": "" }, { - "EthAddress": "0xc924A1f5eb60e16e2A7eaEF8fF43B81279988507", - "OCR2BundleID": "dec4122398dcc1d168e5299d896bea43e3c2eb6b80b930d811769dbaa6fc5dc3", - "OCR2OnchainPublicKey": "4268941221e692700b811aa677f0109d6b043878", - "OCR2OffchainPublicKey": "038abda618e98e3f9248facbbf0f85aff1da758f667540ad86d4b551a0645d48", - "OCR2ConfigPublicKey": "df035550d38a35782814abe4d4547c9d19b4d531e52365ec98a4bf54e3c5ad50", - "AptosAccount": "aeaf55a2c6fdc03feb4ba267e472218217099906bcdfd060780215f7e403c8ac", - "AptosBundleID": "04f83eb14a0f1d12b9ad718adbad8d6e9a6f98d9038ddc4b0ead5553f46cddc8", - "AptosOnchainPublicKey": "a365d746dee16b72b76546a5d41968f66f3f75b5e50ead59c6de58d7dd18978f", - "P2PPeerID": "12D3KooWRHbaLm4WoyXEKkEdgPU4F3ksam4wfreC9H6eEehRDRzs", - "CSAPublicKey": "d02faacac929d6d73ede56026604ed0d9af6b66631d813c9bfe57f49879b6f66" + "AptosAccount": "", + "EthAddress": "0x898D0206d3b3156b92bD499eDFBAfc476543A21F", + "P2PPeerID": "12D3KooWDN2jTmtrpZMpjFFuQdzxHyUecBE3zPLG4goaWG7H2iDa", + "CSAPublicKey": "bdf13ff3944d59a3e1ea5888f86c0bbfe5eb33e2140188516592bf245d080320", + "OCR2BundleID": "3b5d75124ef0f02efd46c08da4b67d36154eed680d7dafd360d976430fe11a7b", + "OCR2OnchainPublicKey": "3815f48818db64aa8d7b225e229a328826f3d1de", + "OCR2OffchainPublicKey": "ca6f4c20c00fb7af411060cfc226d61d11ce5e3532ebbd15786fe53c32244de3", + "OCR2ConfigPublicKey": "7b4e462c24d9076a8822bd4e2bdbd834fcc7898aabd9862dbcdb7df6686d2b41", + "AptosBundleID": "", + "AptosOnchainPublicKey": "" }, { - "EthAddress": "0x3Ad163A3E6Ae03f93fAAD205833318F5111957f6", - "OCR2BundleID": "2cf78d5374a7c4c37ff899c7d4ec1f587d1c55e19e3f469bc060069d3aceb822", - "OCR2OnchainPublicKey": "5cdc6d251d437eec492abc599089f31b0796a2bf", - "OCR2OffchainPublicKey": "f6212f5e28a197083698137b8990366f2e795dd010ea8f30a4c7ae79dd4c24e8", - "OCR2ConfigPublicKey": "b89aa8ad44f52de2b9c0f5d24454cd851fcd7196e915ca8a881293f2a78f8c44", - "AptosAccount": "fcd7adc2ec9749dfdf2ac823bbd43399e492b98439804aff2bcd20a6ac0e325e", - "AptosBundleID": "ca1b4be024cc334b67abfed3afc3b76c20fb9c3c79ba562765b699e5b3ba6b7f", - "AptosOnchainPublicKey": "5e91147eb11af299ecfe976f2a67fa65cae98fea14c8e970f1bcf7c680d47af8", - "P2PPeerID": "12D3KooWFzdAipMFiMbM5nHu6WnTtnuv3Q9nan9JmQNiRRs4UYVJ", - "CSAPublicKey": "847b14f52f2a2334d865b04e9ded66ef5d93a71d0337c6e1b2aa5dd6ed8a31e9" + "AptosAccount": "", + "EthAddress": "0xb26dD9CD1Fc4Df2F84170960E2a36ed4a5ac6bB7", + "P2PPeerID": "12D3KooWJTedkdgDmkAms4pEKDnXX7CXshkxwEcK6hWki519YEqF", + "CSAPublicKey": "e95ded4fc733eac43292dc24d8630101cf0c3f40c3764233a6321077eacd0b90", + "OCR2BundleID": "742b2a8a90e59aeb8bb35313d4078ef3f950a9e42a157b7ee9e9abd8c7d97d94", + "OCR2OnchainPublicKey": "57b41043e9a2b21329be48ccf72943af20b322ff", + "OCR2OffchainPublicKey": "0d90fc04c4c0439c184a06478ec1fed7cedfb799b303a6d68c046d90f077b5bd", + "OCR2ConfigPublicKey": "a73c070b60c9a175ac34cfd5c6c7884e73b5c8d43417be3f00bc43ac0fb67f39", + "AptosBundleID": "", + "AptosOnchainPublicKey": "" }, { - "EthAddress": "0xe73b2eE90Bf397BbCf48Ff6bE0317F852bEAC62E", - "OCR2BundleID": "3c0408535b0fb8eb86377dc5457c92ca449cdc8f7f7c84102f48ad218777c5bd", - "OCR2OnchainPublicKey": "83f03cd5d5df6057d9fefbdd4566f9ac0af287c3", - "OCR2OffchainPublicKey": "2e8a4828976093301aefdbdd715307d1a5648589045cfb013cf72321821ea691", - "OCR2ConfigPublicKey": "255043622ed54159e827624e02e2c4ec1e9e037b38f54dc7e0ba4de98a3d7d74", - "AptosAccount": "e81914a84ff0c52fbb4afcd8662ada15f0a4b91037b4387767172e033668ca90", - "AptosBundleID": "7047c3f64890a8fcb2393c6b7ab2af11a3c5133812eec661e7616bdc0434a884", - "AptosOnchainPublicKey": "618fc2199f04828bcb935b2f72befa85c0205106d3a02b66049b079bb8d866a8", - "P2PPeerID": "12D3KooWCcDDxc4H5EeUTTN9qDjy78TRHXq6gNo59pPrAFAUkPvr", - "CSAPublicKey": "cc5fd0a2d2ad059df99011cbd23aeafbae369c9c3e6f30cfe64d37a591aafa63" + "AptosAccount": "", + "EthAddress": "0x50b1bB407F0Ecd71416BfA8a1d703F6115112676", + "P2PPeerID": "12D3KooWS1i3x2r34vYCfYrz2ddWUVYtFGNaZvGNNxqzL4Rysd3V", + "CSAPublicKey": "46b50be4d72b03f1601ade056bc754f194d6418283065970d470f6f3243f0705", + "OCR2BundleID": "1232eb7cdb4145ec8b543b76f17fe59c69aa6df31c827a7553aea3a3d340c637", + "OCR2OnchainPublicKey": "dad1e5d6824d7b64df57e9ca3342e4caf66b2c91", + "OCR2OffchainPublicKey": "8a7e9833bf8a55435c82866dbe5f9a9bac63b9a93c8c55664dffe653ab4145a2", + "OCR2ConfigPublicKey": "48ce76ee5ddd8003ebbd10485a092f8bd237f0f855aca8aba5ccac78b593e62d", + "AptosBundleID": "", + "AptosOnchainPublicKey": "" }, { - "EthAddress": "0xA861049e4670Bd8b0E9C447F33b473145c5FC079", - "OCR2BundleID": "08cc4a28589a3fcc0c9bb1a67c09e49c92d1de184b60a11fa505e49ec8a87b00", - "OCR2OnchainPublicKey": "9ee47af6e91a6f55db31246ac3b706d3a3e6e060", - "OCR2OffchainPublicKey": "131f66e2120912ed45e54a752316d110968a78eb5efd9a3e3c1215631804617e", - "OCR2ConfigPublicKey": "dda24126a23ae8e36bbc2d9e37dd6ff9dcea3ec924d6753b066af09811352225", - "AptosAccount": "57eef8994e947c45a65e9e4593e1617c4278833db28d0d3fd007ff8695af5012", - "AptosBundleID": "e67964f9cc347ea16174de40ac1391de7b36963a65fba9e2d86ea586b4dd0eb8", - "AptosOnchainPublicKey": "2cfa138265a1c2a2dca31c5bc5a804a7543dd226d8c288bf6a4ec1c853870963", - "P2PPeerID": "12D3KooWP68a8W3eKN988APsGDNGBTQjZttg3qyAbvqkK6D3NZYu", - "CSAPublicKey": "bcd4c7abd729e6c6931e323796ff2a148991d1062cca18de765602d874de15f9" + "AptosAccount": "", + "EthAddress": "0xa2340108BE2c563bB89462b464aCF3f88cCd1584", + "P2PPeerID": "12D3KooWLZFWAhTejyR7WwwQndgNGGiW3XcGKK6nNtWbhdgCG1rC", + "CSAPublicKey": "0837cd5a8544664eaf04f68347bdba4cb7ac6af34488f0a26c65b03fe223d5af", + "OCR2BundleID": "2fcbac5dd48e995772d85c47d2744b0df7b74b71d17001f283318cae43b96add", + "OCR2OnchainPublicKey": "469d3c0c484c6846be1176920f1cbdc8abb6f638", + "OCR2OffchainPublicKey": "21aa97506b74e3bfcbe6eb87f2a6add07898fecbddbcec2447832dc343395499", + "OCR2ConfigPublicKey": "a6b7e8ca4faf6122165928d82354de3f9334cdb47af058f6a983d11473c21b5f", + "AptosBundleID": "", + "AptosOnchainPublicKey": "" } ] } diff --git a/core/scripts/keystone/templates/streams_trigger.toml b/core/scripts/keystone/templates/streams_trigger.toml deleted file mode 100644 index 370ed64e736..00000000000 --- a/core/scripts/keystone/templates/streams_trigger.toml +++ /dev/null @@ -1,76 +0,0 @@ -name = "MATIC/USD-RefPrice-DFstaging-Premium-ArbitrumSepolia-001 | {{ feed_id }} | verifier_proxy {{ verifier_proxy_id }}" -type = "offchainreporting2" -schemaVersion = 1 -forwardingAllowed = false -maxTaskDuration = "0s" -contractID = "{{ contract_id }}" -relay = "evm" -pluginType = "mercury" -feedID = "{{ feed_id }}" -transmitterID = "{{ transmitter_id }}" -observationSource = """ -// data source 1 -// https://docs.chain.link/data-streams/concepts/liquidity-weighted-prices -// https://github.com/smartcontractkit/ea-framework-js/blob/272846061bd0871da41d844672509aa7b7784d62/src/adapter/lwba.ts#L62 -ds1_payload [type=bridge name="bridge-coinmetrics" timeout="50s" requestData="{\\"data\\":{\\"from\\":\\"MATIC\\",\\"to\\":\\"USD\\"}}"]; -ds1_benchmark [type=jsonparse path="data,mid"]; -ds1_bid [type=jsonparse path="data,bid"]; -ds1_ask [type=jsonparse path="data,ask"]; - -ds1_benchmark_multiply [type=multiply times=1000000000000000000]; -ds1_bid_multiply [type=multiply times=1000000000000000000]; -ds1_ask_multiply [type=multiply times=1000000000000000000]; -// data source 2 -ds2_payload [type=bridge name="bridge-tiingo" timeout="50s" requestData="{\\"data\\":{\\"from\\":\\"MATIC\\",\\"to\\":\\"USD\\"}}"]; -ds2_benchmark [type=jsonparse path="data,mid"]; -ds2_bid [type=jsonparse path="data,bid"]; -ds2_ask [type=jsonparse path="data,ask"]; - -ds2_benchmark_multiply [type=multiply times=1000000000000000000]; -ds2_bid_multiply [type=multiply times=1000000000000000000]; -ds2_ask_multiply [type=multiply times=1000000000000000000]; -// data source 3 -ds3_payload [type=bridge name="bridge-ncfx" timeout="50s" requestData="{\\"data\\":{\\"from\\":\\"MATIC\\",\\"to\\":\\"USD\\"}}"]; -ds3_benchmark [type=jsonparse path="data,mid"]; -ds3_bid [type=jsonparse path="data,bid"]; -ds3_ask [type=jsonparse path="data,ask"]; - -ds3_benchmark_multiply [type=multiply times=1000000000000000000]; -ds3_bid_multiply [type=multiply times=1000000000000000000]; -ds3_ask_multiply [type=multiply times=1000000000000000000]; -// benchmark -ds1_payload -> ds1_benchmark -> ds1_benchmark_multiply -> benchmark_price; -ds2_payload -> ds2_benchmark -> ds2_benchmark_multiply -> benchmark_price; -ds3_payload -> ds3_benchmark -> ds3_benchmark_multiply -> benchmark_price; -// The index is what determines how fields get assigned in a mercury report -// benchmark is always index 0 -// bid is always index 1 -// ask is always index 2 -// See https://github.com/smartcontractkit/chainlink/blob/4d5fc1943bd6a60b49cbc3d263c0aa47dc3cecb7/core/services/relay/evm/mercury/v3/data_source.go#L225 for more info -benchmark_price [type=median allowedFaults=2 index=0]; - -// bid -ds1_payload -> ds1_bid -> ds1_bid_multiply -> bid_price; -ds2_payload -> ds2_bid -> ds2_bid_multiply -> bid_price; -ds3_payload -> ds3_bid -> ds3_bid_multiply -> bid_price; -bid_price [type=median allowedFaults=2 index=1]; - -// ask -ds1_payload -> ds1_ask -> ds1_ask_multiply -> ask_price; -ds2_payload -> ds2_ask -> ds2_ask_multiply -> ask_price; -ds3_payload -> ds3_ask -> ds3_ask_multiply -> ask_price; -ask_price [type=median allowedFaults=2 index=2]; -""" - -[relayConfig] -chainID = "{{ chain_id }}" -enableTriggerCapability = true -fromBlock = "{{ from_block }}" - -[pluginConfig] -linkFeedID = "{{ link_feed_id }}" -nativeFeedID = "{{ native_feed_id }}" -# Dummy pub key -serverPubKey = "11a34b5187b1498c0ccb2e56d5ee8040a03a4955822ed208749b474058fc3f9c" -# We don't need to specify a mercury server URL here since we're using this as a trigger instead -serverURL = "wss://unknown"