From ca6dbfb49b3d444dc3bcd49725be4b25995983a6 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 13:07:14 -0600 Subject: [PATCH 01/17] service bump --- modules/cli/cmd/devrunner/config/constants.go | 6 +++--- modules/cli/cmd/devrunner/config/networks.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index 24cb3a5..853da4b 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -20,7 +20,7 @@ const ( // NOTE - do not include the 'v' at the beginning of the version number CometbftVersion = "0.38.8" - AstriaSequencerVersion = "0.16.0" - AstriaComposerVersion = "0.8.2" - AstriaConductorVersion = "0.20.0" + AstriaSequencerVersion = "0.17.0" + AstriaComposerVersion = "0.8.3" + AstriaConductorVersion = "0.20.1" ) diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index 6b82e79..a72b487 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -103,8 +103,8 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { }, "dawn": { SequencerChainId: "astria-dawn-" + cmd.DefaultDawnNum, - SequencerGRPC: "https://grpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".devnet.astria.org/", - SequencerRPC: "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".devnet.astria.org/", + SequencerGRPC: "https://grpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", + SequencerRPC: "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", RollupName: "", NativeDenom: "ibc/channel0/utia", Services: map[string]ServiceConfig{ From 43787e7669dccf755915ca2375400332e1c77726 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 15:09:06 -0600 Subject: [PATCH 02/17] sequencer config updates --- modules/cli/cmd/sequencer/config.go | 8 ++++---- modules/cli/cmd/sequencer/constants.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/cli/cmd/sequencer/config.go b/modules/cli/cmd/sequencer/config.go index fd88cd8..49e07ac 100644 --- a/modules/cli/cmd/sequencer/config.go +++ b/modules/cli/cmd/sequencer/config.go @@ -38,14 +38,14 @@ func GetSequencerNetworkConfigsPresets() NetworkConfigs { FeeAsset: "nria", }, "dusk": { - SequencerChainId: DefaultSequencerChainID, - SequencerURL: DefaultSequencerURL, + SequencerChainId: "astria-dusk-10", + SequencerURL: "https://rpc.sequencer.astria-dusk-10.devnet.astria.org", Asset: "nria", FeeAsset: "nria", }, "dawn": { - SequencerChainId: "astria-dawn-0", - SequencerURL: "https://rpc.sequencer.dawn-0.devnet.astria.org", + SequencerChainId: DefaultSequencerChainID, + SequencerURL: DefaultSequencerURL, Asset: "ibc/channel0/utia", FeeAsset: "ibc/channel0/utia", }, diff --git a/modules/cli/cmd/sequencer/constants.go b/modules/cli/cmd/sequencer/constants.go index 28cddc7..0974d40 100644 --- a/modules/cli/cmd/sequencer/constants.go +++ b/modules/cli/cmd/sequencer/constants.go @@ -7,8 +7,8 @@ import ( const ( DefaultConfigDirName = ".astria" DefaultAddressPrefix = "astria" - DefaultSequencerURL = "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org" - DefaultSequencerChainID = "astria-dusk-" + cmd.DefaultDuskNum + DefaultSequencerURL = "https://rpc.sequencer.dusk-" + cmd.DefaultDawnNum + ".astria.org" + DefaultSequencerChainID = "dawn-" + cmd.DefaultDawnNum DefaultAsset = "ntia" DefaultFeeAsset = "ntia" DefaultSequencerNetworksConfigFilename = "sequencer-networks-config.toml" From 29086139aa3e59ce476871a8d46b786001e5e51b Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 15:26:04 -0600 Subject: [PATCH 03/17] update cometbft genesis --- modules/cli/cmd/devrunner/config/genesis.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/cli/cmd/devrunner/config/genesis.json b/modules/cli/cmd/devrunner/config/genesis.json index 47a1ff6..ed3103a 100644 --- a/modules/cli/cmd/devrunner/config/genesis.json +++ b/modules/cli/cmd/devrunner/config/genesis.json @@ -35,7 +35,8 @@ "app_hash": "", "app_state": { "address_prefixes": { - "base": "astria" + "base": "astria", + "ibcCompat": "astriacompat" }, "accounts": [ { From 2861059c21457b809e9551cb2b12cf2cf75c9750 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 15:41:56 -0600 Subject: [PATCH 04/17] update urls and chainId --- modules/cli/cmd/sequencer/config.go | 4 ++-- modules/cli/cmd/sequencer/constants.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cli/cmd/sequencer/config.go b/modules/cli/cmd/sequencer/config.go index 49e07ac..220c9e6 100644 --- a/modules/cli/cmd/sequencer/config.go +++ b/modules/cli/cmd/sequencer/config.go @@ -38,8 +38,8 @@ func GetSequencerNetworkConfigsPresets() NetworkConfigs { FeeAsset: "nria", }, "dusk": { - SequencerChainId: "astria-dusk-10", - SequencerURL: "https://rpc.sequencer.astria-dusk-10.devnet.astria.org", + SequencerChainId: "astria-dusk-" + cmd.DefaultDuskNum, + SequencerURL: "https://rpc.sequencer.astria-dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org", Asset: "nria", FeeAsset: "nria", }, diff --git a/modules/cli/cmd/sequencer/constants.go b/modules/cli/cmd/sequencer/constants.go index 0974d40..cd98a84 100644 --- a/modules/cli/cmd/sequencer/constants.go +++ b/modules/cli/cmd/sequencer/constants.go @@ -7,7 +7,7 @@ import ( const ( DefaultConfigDirName = ".astria" DefaultAddressPrefix = "astria" - DefaultSequencerURL = "https://rpc.sequencer.dusk-" + cmd.DefaultDawnNum + ".astria.org" + DefaultSequencerURL = "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org" DefaultSequencerChainID = "dawn-" + cmd.DefaultDawnNum DefaultAsset = "ntia" DefaultFeeAsset = "ntia" From 492864e8424fbdbc9dae7098a590059216fca123 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 16:18:53 -0600 Subject: [PATCH 05/17] add specific local/remote service versions. --- modules/cli/cmd/devrunner/config/constants.go | 10 +++++++--- modules/cli/cmd/devrunner/config/networks.go | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index 853da4b..9408a6e 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -20,7 +20,11 @@ const ( // NOTE - do not include the 'v' at the beginning of the version number CometbftVersion = "0.38.8" - AstriaSequencerVersion = "0.17.0" - AstriaComposerVersion = "0.8.3" - AstriaConductorVersion = "0.20.1" + AstriaSequencerVersion = "0.16.0" + AstriaComposerVersion = "0.8.2" + AstriaConductorVersion = "0.20.0" + + LocalSequencerVersion = "0.17.0" + LocalComposerVersion = "0.8.3" + LocalConductorVersion = "0.20.1" ) diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index a72b487..a70061d 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -52,21 +52,21 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, DownloadURL: KnownBinaries.AstriaConductor.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+LocalConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, DownloadURL: KnownBinaries.AstriaComposer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+LocalComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", Version: "v" + AstriaSequencerVersion, DownloadURL: KnownBinaries.AstriaSequencer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+AstriaSequencerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+LocalSequencerVersion), Args: nil, }, "cometbft": { From 0b96cf6aa7802dd0a03b6fa4a0a235ab9cee1cf5 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 6 Sep 2024 16:49:38 -0600 Subject: [PATCH 06/17] refactor binaries info for dynamic download link creation --- .../config/binaries_config_darwin_amd64.go | 34 +++++++++---------- .../config/binaries_config_darwin_arm64.go | 34 +++++++++---------- .../config/binaries_config_linux_amd64.go | 34 +++++++++---------- modules/cli/cmd/devrunner/config/networks.go | 26 +++++++------- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go index f8058ae..412e218 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go @@ -3,37 +3,37 @@ package config type Binary struct { - Name string - Version string - Url string + UrlPrefix string + UrlMiddle string + UrlSuffix string } -type Binaries struct { +type BinariesInfo struct { CometBFT Binary AstriaSequencer Binary AstriaComposer Binary AstriaConductor Binary } -var KnownBinaries = Binaries{ +var DownloadUrlParts = BinariesInfo{ CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_darwin_amd64.tar.gz", + UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", + UrlMiddle: "/cometbft_", + UrlSuffix: "_darwin_amd64.tar.gz", }, AstriaSequencer: Binary{ - Name: "astria-sequencer", - Version: "v" + AstriaSequencerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/sequencer-v" + AstriaSequencerVersion + "/astria-sequencer-x86_64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + UrlMiddle: "", + UrlSuffix: "/astria-sequencer-x86_64-apple-darwin.tar.gz", }, AstriaComposer: Binary{ - Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/composer-v" + AstriaComposerVersion + "/astria-composer-x86_64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + UrlMiddle: "", + UrlSuffix: "/astria-composer-x86_64-apple-darwin.tar.gz", }, AstriaConductor: Binary{ - Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - Url: "https://github.com/astriaorg/astria/releases/download/conductor-v" + AstriaConductorVersion + "/astria-conductor-x86_64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + UrlMiddle: "", + UrlSuffix: "/astria-conductor-x86_64-apple-darwin.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go index 4510ef1..7c8d91d 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go @@ -3,37 +3,37 @@ package config type Binary struct { - Name string - Version string - Url string + UrlPrefix string + UrlMiddle string + UrlSuffix string } -type Binaries struct { +type BinariesInfo struct { CometBFT Binary AstriaSequencer Binary AstriaComposer Binary AstriaConductor Binary } -var KnownBinaries = Binaries{ +var DownloadUrlParts = BinariesInfo{ CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_darwin_arm64.tar.gz", + UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", + UrlMiddle: "/cometbft_", + UrlSuffix: "_darwin_arm64.tar.gz", }, AstriaSequencer: Binary{ - Name: "astria-sequencer", - Version: "v" + AstriaSequencerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/sequencer-v" + AstriaSequencerVersion + "/astria-sequencer-aarch64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + UrlMiddle: "", + UrlSuffix: "/astria-sequencer-aarch64-apple-darwin.tar.gz", }, AstriaComposer: Binary{ - Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/composer-v" + AstriaComposerVersion + "/astria-composer-aarch64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + UrlMiddle: "", + UrlSuffix: "/astria-composer-aarch64-apple-darwin.tar.gz", }, AstriaConductor: Binary{ - Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - Url: "https://github.com/astriaorg/astria/releases/download/conductor-v" + AstriaConductorVersion + "/astria-conductor-aarch64-apple-darwin.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + UrlMiddle: "", + UrlSuffix: "/astria-conductor-aarch64-apple-darwin.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go index d0e522e..d42ced4 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go @@ -3,37 +3,37 @@ package config type Binary struct { - Name string - Version string - Url string + UrlPrefix string + UrlMiddle string + UrlSuffix string } -type Binaries struct { +type BinariesInfo struct { CometBFT Binary AstriaSequencer Binary AstriaComposer Binary AstriaConductor Binary } -var KnownBinaries = Binaries{ +var DownloadUrlParts = BinariesInfo{ CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_linux_amd64.tar.gz", + UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", + UrlMiddle: "/cometbft_", + UrlSuffix: "_linux_amd64.tar.gz", }, AstriaSequencer: Binary{ - Name: "astria-sequencer", - Version: "v" + AstriaSequencerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/sequencer-v" + AstriaSequencerVersion + "/astria-sequencer-x86_64-unknown-linux-gnu.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + UrlMiddle: "", + UrlSuffix: "/astria-sequencer-x86_64-unknown-linux-gnu.tar.gz", }, AstriaComposer: Binary{ - Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - Url: "https://github.com/astriaorg/astria/releases/download/composer-v" + AstriaComposerVersion + "/astria-composer-x86_64-unknown-linux-gnu.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + UrlMiddle: "", + UrlSuffix: "/astria-composer-x86_64-unknown-linux-gnu.tar.gz", }, AstriaConductor: Binary{ - Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - Url: "https://github.com/astriaorg/astria/releases/download/conductor-v" + AstriaConductorVersion + "/astria-conductor-x86_64-unknown-linux-gnu.tar.gz", + UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + UrlMiddle: "", + UrlSuffix: "/astria-conductor-x86_64-unknown-linux-gnu.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index a70061d..ee232ae 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -50,29 +50,29 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, + Version: "v" + LocalConductorVersion, + DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + LocalConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+LocalConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, + Version: "v" + LocalComposerVersion, + DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + LocalComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+LocalComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", - Version: "v" + AstriaSequencerVersion, - DownloadURL: KnownBinaries.AstriaSequencer.Url, + Version: "v" + LocalSequencerVersion, + DownloadURL: DownloadUrlParts.AstriaSequencer.UrlPrefix + LocalSequencerVersion + DownloadUrlParts.AstriaSequencer.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+LocalSequencerVersion), Args: nil, }, "cometbft": { Name: "cometbft", Version: "v" + CometbftVersion, - DownloadURL: KnownBinaries.CometBFT.Url, + DownloadURL: DownloadUrlParts.CometBFT.UrlPrefix + CometbftVersion + DownloadUrlParts.CometBFT.UrlMiddle + CometbftVersion + DownloadUrlParts.CometBFT.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+CometbftVersion), Args: nil, }, @@ -88,14 +88,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, + DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, + DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, @@ -111,14 +111,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, + DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, + DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, @@ -134,14 +134,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, + DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, + DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, From cfd9e4e8871a6031b66f4df9821e2fc369e7c841 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Tue, 8 Oct 2024 16:42:58 +0200 Subject: [PATCH 07/17] update fee asset --- modules/cli/cmd/devrunner/config/base.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cli/cmd/devrunner/config/base.go b/modules/cli/cmd/devrunner/config/base.go index bfb498a..258ad4c 100644 --- a/modules/cli/cmd/devrunner/config/base.go +++ b/modules/cli/cmd/devrunner/config/base.go @@ -70,7 +70,7 @@ func DefaultBaseConfig(instanceName string) BaseConfig { "astria_composer_no_metrics": "true", "astria_composer_metrics_http_listener_addr": "127.0.0.1:9000", "astria_composer_grpc_addr": "0.0.0.0:0", - "astria_composer_fee_asset": "nria", + "astria_composer_fee_asset": "ntia", // ANSI "no_color": "", From 79710d0a88e4b5bc4dc86e540f1d8bffd15dac45 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Thu, 17 Oct 2024 16:14:16 -0600 Subject: [PATCH 08/17] local versions match with default versions --- modules/cli/cmd/devrunner/config/constants.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index 1d49b9e..f507bac 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -24,7 +24,7 @@ const ( AstriaComposerVersion = "1.0.0-rc.1" AstriaConductorVersion = "1.0.0-rc.1" - LocalSequencerVersion = "0.17.0" - LocalComposerVersion = "0.8.3" - LocalConductorVersion = "0.20.1" + LocalSequencerVersion = "1.0.0-rc.1" + LocalComposerVersion = "1.0.0-rc.1" + LocalConductorVersion = "1.0.0-rc.1" ) From 32766ee7a5372933ee5f386eae39303bec250ce1 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 10:03:14 -0600 Subject: [PATCH 09/17] bump dusk dawn nums, update sequencer config to match --- modules/cli/cmd/constants.go | 4 ++-- modules/cli/cmd/sequencer/config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/cli/cmd/constants.go b/modules/cli/cmd/constants.go index e34deae..70fe116 100644 --- a/modules/cli/cmd/constants.go +++ b/modules/cli/cmd/constants.go @@ -1,6 +1,6 @@ package cmd const ( - DefaultDuskNum = "10" - DefaultDawnNum = "0" + DefaultDuskNum = "11" + DefaultDawnNum = "1" ) diff --git a/modules/cli/cmd/sequencer/config.go b/modules/cli/cmd/sequencer/config.go index 220c9e6..1e08501 100644 --- a/modules/cli/cmd/sequencer/config.go +++ b/modules/cli/cmd/sequencer/config.go @@ -38,8 +38,8 @@ func GetSequencerNetworkConfigsPresets() NetworkConfigs { FeeAsset: "nria", }, "dusk": { - SequencerChainId: "astria-dusk-" + cmd.DefaultDuskNum, - SequencerURL: "https://rpc.sequencer.astria-dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org", + SequencerChainId: "dusk-" + cmd.DefaultDuskNum, + SequencerURL: "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org", Asset: "nria", FeeAsset: "nria", }, From e224c2e80be19c09fe5b3641150adafc9f342709 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 10:20:20 -0600 Subject: [PATCH 10/17] single default target network --- modules/cli/cmd/constants.go | 5 +++-- modules/cli/cmd/devrunner/config/constants.go | 2 +- modules/cli/cmd/devrunner/config/networks.go | 4 ++-- modules/cli/cmd/devrunner/run.go | 2 +- modules/cli/cmd/devrunner/version.go | 2 +- modules/cli/cmd/sequencer/balances.go | 2 +- modules/cli/cmd/sequencer/block.go | 2 +- modules/cli/cmd/sequencer/blockheight.go | 2 +- modules/cli/cmd/sequencer/bridge.go | 4 ++-- modules/cli/cmd/sequencer/constants.go | 1 - modules/cli/cmd/sequencer/ibctransfer.go | 2 +- modules/cli/cmd/sequencer/nonce.go | 2 +- modules/cli/cmd/sequencer/transfer.go | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/cli/cmd/constants.go b/modules/cli/cmd/constants.go index 70fe116..90e3d17 100644 --- a/modules/cli/cmd/constants.go +++ b/modules/cli/cmd/constants.go @@ -1,6 +1,7 @@ package cmd const ( - DefaultDuskNum = "11" - DefaultDawnNum = "1" + DefaultDuskNum = "11" + DefaultDawnNum = "1" + DefaultTargetNetwork = "dawn" ) diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index f507bac..fea2229 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -12,7 +12,6 @@ const ( DefaultLocalNetworkName = "sequencer-test-chain-0" DefaultNetworksConfigName = "networks-config.toml" DefaultServiceLogLevel = "info" - DefaultTargetNetwork = "local" DefaultLocalNativeDenom = "ntia" DefaultTUIConfigName = "tui-config.toml" DefaultHighlightColor = "blue" @@ -24,6 +23,7 @@ const ( AstriaComposerVersion = "1.0.0-rc.1" AstriaConductorVersion = "1.0.0-rc.1" + LocalCometbftVersion = "0.38.8" LocalSequencerVersion = "1.0.0-rc.1" LocalComposerVersion = "1.0.0-rc.1" LocalConductorVersion = "1.0.0-rc.1" diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index fc29f77..58e583d 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -72,8 +72,8 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "cometbft": { Name: "cometbft", Version: "v" + CometbftVersion, - DownloadURL: DownloadUrlParts.CometBFT.UrlPrefix + CometbftVersion + DownloadUrlParts.CometBFT.UrlMiddle + CometbftVersion + DownloadUrlParts.CometBFT.UrlSuffix, - LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+CometbftVersion), + DownloadURL: DownloadUrlParts.CometBFT.UrlPrefix + LocalCometbftVersion + DownloadUrlParts.CometBFT.UrlMiddle + CometbftVersion + DownloadUrlParts.CometBFT.UrlSuffix, + LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+LocalCometbftVersion), Args: nil, }, }, diff --git a/modules/cli/cmd/devrunner/run.go b/modules/cli/cmd/devrunner/run.go index 780ba28..9fd8990 100644 --- a/modules/cli/cmd/devrunner/run.go +++ b/modules/cli/cmd/devrunner/run.go @@ -31,7 +31,7 @@ func init() { flagHandler := cmd.CreateCliFlagHandler(runCmd, cmd.EnvPrefix) flagHandler.BindStringFlag("service-log-level", config.DefaultServiceLogLevel, "Set the log level for services (debug, info, error)") - flagHandler.BindStringFlag("network", config.DefaultTargetNetwork, "Select the network to run the services against. Valid networks are: local, dusk, dawn, mainnet") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Select the network to run the services against. Valid networks are: local, dusk, dawn, mainnet") flagHandler.BindStringFlag("conductor-path", "", "Provide an override path to a specific conductor binary.") flagHandler.BindStringFlag("cometbft-path", "", "Provide an override path to a specific cometbft binary.") flagHandler.BindStringFlag("composer-path", "", "Provide an override path to a specific composer binary.") diff --git a/modules/cli/cmd/devrunner/version.go b/modules/cli/cmd/devrunner/version.go index d94fd35..cba6334 100644 --- a/modules/cli/cmd/devrunner/version.go +++ b/modules/cli/cmd/devrunner/version.go @@ -50,5 +50,5 @@ func init() { devCmd.AddCommand(VersionCmd) flagHandler := cmd.CreateCliFlagHandler(VersionCmd, cmd.EnvPrefix) - flagHandler.BindStringFlag("network", config.DefaultTargetNetwork, "Select the network to print the service versions for.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Select the network to print the service versions for.") } diff --git a/modules/cli/cmd/sequencer/balances.go b/modules/cli/cmd/sequencer/balances.go index 17c0f5a..bc88a3b 100644 --- a/modules/cli/cmd/sequencer/balances.go +++ b/modules/cli/cmd/sequencer/balances.go @@ -24,7 +24,7 @@ func init() { SequencerCmd.AddCommand(balancesCmd) flagHandler := cmd.CreateCliFlagHandler(balancesCmd, cmd.EnvPrefix) - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindStringPFlag("sequencer-url", "u", DefaultSequencerURL, "The URL of the sequencer to retrieve the balance from.") flagHandler.BindBoolFlag("json", false, "Output an account's balances in JSON format.") diff --git a/modules/cli/cmd/sequencer/block.go b/modules/cli/cmd/sequencer/block.go index 8884ea2..dc11ef6 100644 --- a/modules/cli/cmd/sequencer/block.go +++ b/modules/cli/cmd/sequencer/block.go @@ -22,7 +22,7 @@ func init() { SequencerCmd.AddCommand(blockCmd) flagHandler := cmd.CreateCliFlagHandler(blockCmd, cmd.EnvPrefix) - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindStringPFlag("sequencer-url", "u", DefaultSequencerURL, "The URL of the sequencer to retrieve the block from.") flagHandler.BindBoolFlag("json", false, "Output the block in JSON format.") } diff --git a/modules/cli/cmd/sequencer/blockheight.go b/modules/cli/cmd/sequencer/blockheight.go index 3bfadff..b77b717 100644 --- a/modules/cli/cmd/sequencer/blockheight.go +++ b/modules/cli/cmd/sequencer/blockheight.go @@ -19,7 +19,7 @@ func init() { SequencerCmd.AddCommand(blockheightCmd) flagHandler := cmd.CreateCliFlagHandler(blockheightCmd, cmd.EnvPrefix) - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindStringPFlag("sequencer-url", "u", DefaultSequencerURL, "The URL of the sequencer to retrieve the balance from.") flagHandler.BindBoolFlag("json", false, "Output an account's balances in JSON format.") } diff --git a/modules/cli/cmd/sequencer/bridge.go b/modules/cli/cmd/sequencer/bridge.go index 5978808..df834e4 100644 --- a/modules/cli/cmd/sequencer/bridge.go +++ b/modules/cli/cmd/sequencer/bridge.go @@ -178,7 +178,7 @@ func init() { bridgeCmd.AddCommand(bridgeInitCmd) bifh := cmd.CreateCliFlagHandler(bridgeInitCmd, cmd.EnvPrefix) - bifh.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + bifh.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") bifh.BindStringPFlag("sequencer-chain-id", "c", DefaultSequencerChainID, "The chain ID of the sequencer.") bifh.BindStringFlag("asset", DefaultAsset, "The name of the asset we want to bridge.") bifh.BindStringFlag("fee-asset", DefaultFeeAsset, "The name of the asset used for fees.") @@ -198,7 +198,7 @@ func init() { bridgeCmd.AddCommand(bridgeLockCmd) blfh := cmd.CreateCliFlagHandler(bridgeLockCmd, cmd.EnvPrefix) - blfh.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + blfh.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") blfh.BindStringFlag("sequencer-chain-id", DefaultSequencerChainID, "The chain ID of the sequencer.") blfh.BindStringFlag("asset", DefaultAsset, "The asset to be locked and transferred.") blfh.BindStringFlag("fee-asset", DefaultFeeAsset, "The asset used to pay the transaction fee.") diff --git a/modules/cli/cmd/sequencer/constants.go b/modules/cli/cmd/sequencer/constants.go index cd98a84..c661c66 100644 --- a/modules/cli/cmd/sequencer/constants.go +++ b/modules/cli/cmd/sequencer/constants.go @@ -12,5 +12,4 @@ const ( DefaultAsset = "ntia" DefaultFeeAsset = "ntia" DefaultSequencerNetworksConfigFilename = "sequencer-networks-config.toml" - DefaultTargetNetwork = "dusk" ) diff --git a/modules/cli/cmd/sequencer/ibctransfer.go b/modules/cli/cmd/sequencer/ibctransfer.go index 6caa341..7504e73 100644 --- a/modules/cli/cmd/sequencer/ibctransfer.go +++ b/modules/cli/cmd/sequencer/ibctransfer.go @@ -27,7 +27,7 @@ func init() { flagHandler.BindStringFlag("privkey", "", "The private key of the sender.") flagHandler.BindStringFlag("asset", DefaultAsset, "The asset to be transferred.") flagHandler.BindStringFlag("fee-asset", DefaultFeeAsset, "The asset used for paying fees.") - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindBoolFlag("async", false, "If true, the function will return immediately. If false, the function will wait for the transaction to be seen on the network.") ibctransferCmd.MarkFlagsOneRequired("keyfile", "keyring-address", "privkey") diff --git a/modules/cli/cmd/sequencer/nonce.go b/modules/cli/cmd/sequencer/nonce.go index d2bff22..04a2fe7 100644 --- a/modules/cli/cmd/sequencer/nonce.go +++ b/modules/cli/cmd/sequencer/nonce.go @@ -25,7 +25,7 @@ func init() { flagHandler := cmd.CreateCliFlagHandler(nonceCmd, cmd.EnvPrefix) flagHandler.BindStringPFlag("sequencer-url", "u", DefaultSequencerURL, "The URL of the sequencer.") - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindBoolFlag("json", false, "Output in JSON format.") } diff --git a/modules/cli/cmd/sequencer/transfer.go b/modules/cli/cmd/sequencer/transfer.go index d5cdf57..a666034 100644 --- a/modules/cli/cmd/sequencer/transfer.go +++ b/modules/cli/cmd/sequencer/transfer.go @@ -27,7 +27,7 @@ func init() { flagHandler.BindStringFlag("privkey", "", "The private key of the sender.") flagHandler.BindStringFlag("asset", DefaultAsset, "The asset to be transferred.") flagHandler.BindStringFlag("fee-asset", DefaultFeeAsset, "The asset used for paying fees.") - flagHandler.BindStringFlag("network", DefaultTargetNetwork, "Configure the values to target a specific network.") + flagHandler.BindStringFlag("network", cmd.DefaultTargetNetwork, "Configure the values to target a specific network.") flagHandler.BindBoolFlag("async", false, "If true, the function will return immediately. If false, the function will wait for the transaction to be seen on the network.") transferCmd.MarkFlagsOneRequired("keyfile", "keyring-address", "privkey") From 9b45fa688daafe098bbca2e97cc953d72ea5af04 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 11:40:52 -0600 Subject: [PATCH 11/17] add build url funcs --- .../config/binaries_config_darwin_amd64.go | 22 +++++++++---------- .../config/binaries_config_darwin_arm64.go | 22 +++++++++---------- .../config/binaries_config_linux_amd64.go | 22 +++++++++---------- modules/cli/cmd/devrunner/config/constants.go | 2 ++ modules/cli/cmd/devrunner/config/helpers.go | 20 +++++++++++++++++ modules/cli/cmd/devrunner/config/networks.go | 20 ++++++++--------- 6 files changed, 65 insertions(+), 43 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go index 412e218..6f64ead 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go @@ -2,36 +2,36 @@ package config -type Binary struct { +type UrlParts struct { UrlPrefix string UrlMiddle string UrlSuffix string } -type BinariesInfo struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary +type KnownServiceReleaseUrlsParts struct { + CometBFT UrlParts + AstriaSequencer UrlParts + AstriaComposer UrlParts + AstriaConductor UrlParts } -var DownloadUrlParts = BinariesInfo{ - CometBFT: Binary{ +var ServiceUrls = KnownServiceReleaseUrlsParts{ + CometBFT: UrlParts{ UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", UrlMiddle: "/cometbft_", UrlSuffix: "_darwin_amd64.tar.gz", }, - AstriaSequencer: Binary{ + AstriaSequencer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", UrlMiddle: "", UrlSuffix: "/astria-sequencer-x86_64-apple-darwin.tar.gz", }, - AstriaComposer: Binary{ + AstriaComposer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", UrlMiddle: "", UrlSuffix: "/astria-composer-x86_64-apple-darwin.tar.gz", }, - AstriaConductor: Binary{ + AstriaConductor: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", UrlMiddle: "", UrlSuffix: "/astria-conductor-x86_64-apple-darwin.tar.gz", diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go index 7c8d91d..e68f5f0 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go @@ -2,36 +2,36 @@ package config -type Binary struct { +type UrlParts struct { UrlPrefix string UrlMiddle string UrlSuffix string } -type BinariesInfo struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary +type KnownServiceReleaseUrlsParts struct { + CometBFT UrlParts + AstriaSequencer UrlParts + AstriaComposer UrlParts + AstriaConductor UrlParts } -var DownloadUrlParts = BinariesInfo{ - CometBFT: Binary{ +var ServiceUrls = KnownServiceReleaseUrlsParts{ + CometBFT: UrlParts{ UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", UrlMiddle: "/cometbft_", UrlSuffix: "_darwin_arm64.tar.gz", }, - AstriaSequencer: Binary{ + AstriaSequencer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", UrlMiddle: "", UrlSuffix: "/astria-sequencer-aarch64-apple-darwin.tar.gz", }, - AstriaComposer: Binary{ + AstriaComposer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", UrlMiddle: "", UrlSuffix: "/astria-composer-aarch64-apple-darwin.tar.gz", }, - AstriaConductor: Binary{ + AstriaConductor: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", UrlMiddle: "", UrlSuffix: "/astria-conductor-aarch64-apple-darwin.tar.gz", diff --git a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go index d42ced4..a8eaf64 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go @@ -2,36 +2,36 @@ package config -type Binary struct { +type UrlParts struct { UrlPrefix string UrlMiddle string UrlSuffix string } -type BinariesInfo struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary +type KnownServiceReleaseUrlsParts struct { + CometBFT UrlParts + AstriaSequencer UrlParts + AstriaComposer UrlParts + AstriaConductor UrlParts } -var DownloadUrlParts = BinariesInfo{ - CometBFT: Binary{ +var ServiceUrls = KnownServiceReleaseUrlsParts{ + CometBFT: UrlParts{ UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", UrlMiddle: "/cometbft_", UrlSuffix: "_linux_amd64.tar.gz", }, - AstriaSequencer: Binary{ + AstriaSequencer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", UrlMiddle: "", UrlSuffix: "/astria-sequencer-x86_64-unknown-linux-gnu.tar.gz", }, - AstriaComposer: Binary{ + AstriaComposer: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", UrlMiddle: "", UrlSuffix: "/astria-composer-x86_64-unknown-linux-gnu.tar.gz", }, - AstriaConductor: Binary{ + AstriaConductor: UrlParts{ UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", UrlMiddle: "", UrlSuffix: "/astria-conductor-x86_64-unknown-linux-gnu.tar.gz", diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index fea2229..655eca4 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -18,11 +18,13 @@ const ( DefaultBorderColor = "gray" // NOTE - do not include the 'v' at the beginning of the version number + // Service versions matched to live networks CometbftVersion = "0.38.8" AstriaSequencerVersion = "1.0.0-rc.1" AstriaComposerVersion = "1.0.0-rc.1" AstriaConductorVersion = "1.0.0-rc.1" + // Local service versions in case of differences between networks LocalCometbftVersion = "0.38.8" LocalSequencerVersion = "1.0.0-rc.1" LocalComposerVersion = "1.0.0-rc.1" diff --git a/modules/cli/cmd/devrunner/config/helpers.go b/modules/cli/cmd/devrunner/config/helpers.go index 727c437..3c3795a 100644 --- a/modules/cli/cmd/devrunner/config/helpers.go +++ b/modules/cli/cmd/devrunner/config/helpers.go @@ -337,3 +337,23 @@ func GetServiceLogLevelOverrides(serviceLogLevel string) []string { } return serviceLogLevelOverrides } + +// Build the release URLs for the known CometBFT service. +func (ksru *KnownServiceReleaseUrlsParts) BuildCometBftReleaseUrl(version string) string { + return ksru.CometBFT.UrlPrefix + version + ksru.CometBFT.UrlMiddle + version + ksru.CometBFT.UrlSuffix +} + +// Build the release URLs for the known Astria Sequencer service. +func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaSequencerReleaseUrl(version string) string { + return ksru.AstriaSequencer.UrlPrefix + version + ksru.AstriaSequencer.UrlSuffix +} + +// Build the release URLs for the known Astria Composer service. +func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaComposerReleaseUrl(version string) string { + return ksru.AstriaComposer.UrlPrefix + version + ksru.AstriaComposer.UrlSuffix +} + +// Build the release URLs for the known Astria Conductor service. +func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaConductorReleaseUrl(version string) string { + return ksru.AstriaConductor.UrlPrefix + version + ksru.AstriaConductor.UrlSuffix +} diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index 58e583d..b5ce2c0 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -51,28 +51,28 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + LocalConductorVersion, - DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + LocalConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(LocalConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+LocalConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + LocalComposerVersion, - DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + LocalComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(LocalComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+LocalComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", Version: "v" + LocalSequencerVersion, - DownloadURL: DownloadUrlParts.AstriaSequencer.UrlPrefix + LocalSequencerVersion + DownloadUrlParts.AstriaSequencer.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaSequencerReleaseUrl(LocalSequencerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+LocalSequencerVersion), Args: nil, }, "cometbft": { Name: "cometbft", Version: "v" + CometbftVersion, - DownloadURL: DownloadUrlParts.CometBFT.UrlPrefix + LocalCometbftVersion + DownloadUrlParts.CometBFT.UrlMiddle + CometbftVersion + DownloadUrlParts.CometBFT.UrlSuffix, + DownloadURL: ServiceUrls.BuildCometBftReleaseUrl(LocalCometbftVersion), LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+LocalCometbftVersion), Args: nil, }, @@ -88,14 +88,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, @@ -111,14 +111,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, @@ -134,14 +134,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + AstriaConductorVersion, - DownloadURL: DownloadUrlParts.AstriaConductor.UrlPrefix + AstriaConductorVersion + DownloadUrlParts.AstriaConductor.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + AstriaComposerVersion, - DownloadURL: DownloadUrlParts.AstriaComposer.UrlPrefix + AstriaComposerVersion + DownloadUrlParts.AstriaComposer.UrlSuffix, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), Args: nil, }, From d7fbaabdf37f1672b7c32e1eb14186ac29e954b0 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 11:51:09 -0600 Subject: [PATCH 12/17] try increase sleep to prevent ci tests failing --- .github/workflows/lint-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 86e046e..0bbfe0d 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -48,7 +48,7 @@ jobs: # run dev runner and test-integration just run dev init screen -d -m just run dev run - sleep 5 + sleep 15 just test-integration # FIXME - sequencer client tests are empty # - name: Test Go (go-sequencer-client) From 0966d085b66e1c05a1420d75521123c8314afe31 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 11:52:58 -0600 Subject: [PATCH 13/17] Revert "try increase sleep to prevent ci tests failing" This reverts commit d7fbaabdf37f1672b7c32e1eb14186ac29e954b0. --- .github/workflows/lint-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 0bbfe0d..86e046e 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -48,7 +48,7 @@ jobs: # run dev runner and test-integration just run dev init screen -d -m just run dev run - sleep 15 + sleep 5 just test-integration # FIXME - sequencer client tests are empty # - name: Test Go (go-sequencer-client) From 4302946bbd47bd9e56d317377586298986ebd3f1 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 18 Oct 2024 15:07:25 -0600 Subject: [PATCH 14/17] specify local in ci test --- .github/workflows/lint-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 86e046e..15ed937 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -47,7 +47,7 @@ jobs: run: | # run dev runner and test-integration just run dev init - screen -d -m just run dev run + screen -d -m just run dev run --network local sleep 5 just test-integration # FIXME - sequencer client tests are empty From 7898632b793b673f6e7207b383b45f2a2bd33ea1 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Mon, 21 Oct 2024 14:20:35 -0600 Subject: [PATCH 15/17] denom and channel updates --- modules/cli/README.md | 2 +- modules/cli/cmd/devrunner/config/genesis.json | 4 ++-- modules/cli/cmd/devrunner/config/networks.go | 4 ++-- modules/cli/cmd/sequencer/config.go | 16 ++++++++-------- modules/go-sequencer-client/client/signer.go | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/cli/README.md b/modules/cli/README.md index 3c6593f..1d9a7f1 100644 --- a/modules/cli/README.md +++ b/modules/cli/README.md @@ -289,7 +289,7 @@ sequencer_chain_id = 'sequencer-only' sequencer_grpc = 'http://127.0.0.1:8080' sequencer_rpc = 'http://127.0.0.1:26657' rollup_name = 'astria-test-chain' -default_denom = 'nria' +default_denom = 'ntia' [networks.sequencer_only.services] [networks.sequencer_only.services.cometbft] diff --git a/modules/cli/cmd/devrunner/config/genesis.json b/modules/cli/cmd/devrunner/config/genesis.json index e7a1af2..27507df 100644 --- a/modules/cli/cmd/devrunner/config/genesis.json +++ b/modules/cli/cmd/devrunner/config/genesis.json @@ -141,9 +141,9 @@ "multiplier": { "lo": 0 } } }, - "native_asset_base_denomination": "nria", + "native_asset_base_denomination": "ntia", "allowed_fee_assets": [ - "nria" + "ntia" ] } } diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index b5ce2c0..8c8f37f 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -106,7 +106,7 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { SequencerGRPC: "https://grpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", SequencerRPC: "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", RollupName: "", - NativeDenom: "ibc/channel0/utia", + NativeDenom: "ibc/channel-0/utia", Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", @@ -129,7 +129,7 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { SequencerGRPC: "https://grpc.sequencer.astria.org/", SequencerRPC: "https://rpc.sequencer.astria.org/", RollupName: "", - NativeDenom: "ibc/channel0/utia", + NativeDenom: "ibc/channel-0/utia", Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", diff --git a/modules/cli/cmd/sequencer/config.go b/modules/cli/cmd/sequencer/config.go index 1e08501..51a357d 100644 --- a/modules/cli/cmd/sequencer/config.go +++ b/modules/cli/cmd/sequencer/config.go @@ -34,26 +34,26 @@ func GetSequencerNetworkConfigsPresets() NetworkConfigs { "local": { SequencerChainId: "sequencer-test-chain-0", SequencerURL: "http://127.0.0.1:26657", - Asset: "nria", - FeeAsset: "nria", + Asset: "ntia", + FeeAsset: "ntia", }, "dusk": { SequencerChainId: "dusk-" + cmd.DefaultDuskNum, SequencerURL: "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org", - Asset: "nria", - FeeAsset: "nria", + Asset: "ntia", + FeeAsset: "ntia", }, "dawn": { SequencerChainId: DefaultSequencerChainID, SequencerURL: DefaultSequencerURL, - Asset: "ibc/channel0/utia", - FeeAsset: "ibc/channel0/utia", + Asset: "ibc/channel-0/utia", + FeeAsset: "ibc/channel-0/utia", }, "mainnet": { SequencerChainId: "astria", SequencerURL: "https://rpc.sequencer.astria.org/", - Asset: "ibc/channel0/utia", - FeeAsset: "ibc/channel0/utia", + Asset: "ibc/channel-0/utia", + FeeAsset: "ibc/channel-0/utia", }, }, } diff --git a/modules/go-sequencer-client/client/signer.go b/modules/go-sequencer-client/client/signer.go index d6aab83..cc49bd6 100644 --- a/modules/go-sequencer-client/client/signer.go +++ b/modules/go-sequencer-client/client/signer.go @@ -10,7 +10,7 @@ import ( txproto "buf.build/gen/go/astria/protocol-apis/protocolbuffers/go/astria/protocol/transaction/v1" ) -const DefaultAstriaAsset = "nria" +const DefaultAstriaAsset = "ntia" type Signer struct { private ed25519.PrivateKey From 92c4554c2d0398f73b798ffb940dd6d3734423a3 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 1 Nov 2024 12:11:53 -0600 Subject: [PATCH 16/17] add and update service versions --- modules/cli/cmd/devrunner/config/constants.go | 24 ++++--- modules/cli/cmd/devrunner/config/networks.go | 62 +++++++++---------- modules/cli/cmd/devrunner/init.go | 2 +- modules/cli/cmd/devrunner/reset.go | 2 +- modules/cli/cmd/sequencer/config.go | 2 +- 5 files changed, 49 insertions(+), 43 deletions(-) diff --git a/modules/cli/cmd/devrunner/config/constants.go b/modules/cli/cmd/devrunner/config/constants.go index 655eca4..8f539e7 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -19,14 +19,20 @@ const ( // NOTE - do not include the 'v' at the beginning of the version number // Service versions matched to live networks - CometbftVersion = "0.38.8" - AstriaSequencerVersion = "1.0.0-rc.1" - AstriaComposerVersion = "1.0.0-rc.1" - AstriaConductorVersion = "1.0.0-rc.1" + MainnetCometbftVersion = "0.38.11" + MainnetAstriaSequencerVersion = "1.0.0" + MainnetAstriaComposerVersion = "1.0.0" + MainnetAstriaConductorVersion = "1.0.0" - // Local service versions in case of differences between networks - LocalCometbftVersion = "0.38.8" - LocalSequencerVersion = "1.0.0-rc.1" - LocalComposerVersion = "1.0.0-rc.1" - LocalConductorVersion = "1.0.0-rc.1" + // Testnet service versions + TestnetCometbftVersion = "0.38.11" + TestnetSequencerVersion = "1.0.0-rc.2" + TestnetComposerVersion = "1.0.0-rc.2" + TestnetConductorVersion = "1.0.0-rc.2" + + // Devnet service versions + DevnetCometbftVersion = "0.38.11" + DevnetSequencerVersion = "1.0.0-rc.2" + DevnetComposerVersion = "1.0.0-rc.2" + DevnetConductorVersion = "1.0.0-rc.2" ) diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index 8c8f37f..fd763ce 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -50,30 +50,30 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + LocalConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(LocalConductorVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+LocalConductorVersion), + Version: "v" + MainnetAstriaConductorVersion, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + LocalComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(LocalComposerVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+LocalComposerVersion), + Version: "v" + MainnetAstriaComposerVersion, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(MainnetAstriaComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+MainnetAstriaComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", - Version: "v" + LocalSequencerVersion, - DownloadURL: ServiceUrls.BuildAstriaSequencerReleaseUrl(LocalSequencerVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+LocalSequencerVersion), + Version: "v" + MainnetAstriaSequencerVersion, + DownloadURL: ServiceUrls.BuildAstriaSequencerReleaseUrl(MainnetAstriaSequencerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+MainnetAstriaSequencerVersion), Args: nil, }, "cometbft": { Name: "cometbft", - Version: "v" + CometbftVersion, - DownloadURL: ServiceUrls.BuildCometBftReleaseUrl(LocalCometbftVersion), - LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+LocalCometbftVersion), + Version: "v" + MainnetCometbftVersion, + DownloadURL: ServiceUrls.BuildCometBftReleaseUrl(MainnetCometbftVersion), + LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+MainnetCometbftVersion), Args: nil, }, }, @@ -87,22 +87,22 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + DevnetConductorVersion, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(DevnetConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+DevnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + DevnetComposerVersion, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(DevnetComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+DevnetComposerVersion), Args: nil, }, }, }, "dawn": { - SequencerChainId: "astria-dawn-" + cmd.DefaultDawnNum, + SequencerChainId: "dawn-" + cmd.DefaultDawnNum, SequencerGRPC: "https://grpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", SequencerRPC: "https://rpc.sequencer.dawn-" + cmd.DefaultDawnNum + ".astria.org/", RollupName: "", @@ -110,16 +110,16 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + TestnetConductorVersion, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(TestnetConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+TestnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + TestnetComposerVersion, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(TestnetComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+TestnetComposerVersion), Args: nil, }, }, @@ -133,16 +133,16 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(AstriaConductorVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + MainnetAstriaConductorVersion, + DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(AstriaComposerVersion), - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + MainnetAstriaComposerVersion, + DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(MainnetAstriaComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+MainnetAstriaComposerVersion), Args: nil, }, }, diff --git a/modules/cli/cmd/devrunner/init.go b/modules/cli/cmd/devrunner/init.go index 81ee378..c4aba73 100644 --- a/modules/cli/cmd/devrunner/init.go +++ b/modules/cli/cmd/devrunner/init.go @@ -91,7 +91,7 @@ func runInitialization(c *cobra.Command, _ []string) { // create the data directory for cometbft and sequencer dataPath := filepath.Join(instanceDir, config.DataDirName) cmd.CreateDirOrPanic(dataPath) - config.InitCometbft(instanceDir, config.DataDirName, config.BinariesDirName, config.CometbftVersion, config.DefaultConfigDirName) + config.InitCometbft(instanceDir, config.DataDirName, config.BinariesDirName, config.MainnetCometbftVersion, config.DefaultConfigDirName) log.Infof("Initialization of instance \"%s\" completed successfuly.", instance) diff --git a/modules/cli/cmd/devrunner/reset.go b/modules/cli/cmd/devrunner/reset.go index 6c13bed..37589b7 100644 --- a/modules/cli/cmd/devrunner/reset.go +++ b/modules/cli/cmd/devrunner/reset.go @@ -125,7 +125,7 @@ func resetStateCmdHandler(c *cobra.Command, _ []string) { return } cmd.CreateDirOrPanic(dataDir) - config.InitCometbft(instanceDir, config.DataDirName, config.BinariesDirName, config.CometbftVersion, config.DefaultConfigDirName) + config.InitCometbft(instanceDir, config.DataDirName, config.BinariesDirName, config.MainnetCometbftVersion, config.DefaultConfigDirName) log.Infof("Successfully reset state for instance '%s'", instance) } diff --git a/modules/cli/cmd/sequencer/config.go b/modules/cli/cmd/sequencer/config.go index 51a357d..26db22b 100644 --- a/modules/cli/cmd/sequencer/config.go +++ b/modules/cli/cmd/sequencer/config.go @@ -51,7 +51,7 @@ func GetSequencerNetworkConfigsPresets() NetworkConfigs { }, "mainnet": { SequencerChainId: "astria", - SequencerURL: "https://rpc.sequencer.astria.org/", + SequencerURL: "https://rpc.astria.org", Asset: "ibc/channel-0/utia", FeeAsset: "ibc/channel-0/utia", }, From e8a24e6eacf3bbc518af99b9f0f50631fa77132f Mon Sep 17 00:00:00 2001 From: Jesse Snyder Date: Fri, 1 Nov 2024 14:10:44 -0600 Subject: [PATCH 17/17] move binary url related stuff to own binaries.go file --- modules/cli/cmd/devrunner/config/binaries.go | 36 ++++++++++++++ .../config/binaries_config_darwin_amd64.go | 47 +++++++------------ .../config/binaries_config_darwin_arm64.go | 47 +++++++------------ .../config/binaries_config_linux_amd64.go | 47 +++++++------------ modules/cli/cmd/devrunner/config/helpers.go | 20 -------- modules/cli/cmd/devrunner/config/networks.go | 20 ++++---- 6 files changed, 97 insertions(+), 120 deletions(-) create mode 100644 modules/cli/cmd/devrunner/config/binaries.go diff --git a/modules/cli/cmd/devrunner/config/binaries.go b/modules/cli/cmd/devrunner/config/binaries.go new file mode 100644 index 0000000..d0c989f --- /dev/null +++ b/modules/cli/cmd/devrunner/config/binaries.go @@ -0,0 +1,36 @@ +package config + +// Url holds the parts of a URL that point to a release. +type Url struct { + Prefix string + Middle string + Suffix string +} + +// AvailableServiceReleaseUrls holds the parts of the release URLs for known services. +type AvailableServiceReleaseUrls struct { + CometBFT Url + AstriaSequencer Url + AstriaComposer Url + AstriaConductor Url +} + +// CometBftReleaseUrl returns the release URLs for the known CometBFT service. +func (asru *AvailableServiceReleaseUrls) CometBftReleaseUrl(version string) string { + return asru.CometBFT.Prefix + version + asru.CometBFT.Middle + version + asru.CometBFT.Suffix +} + +// AstriaSequencerReleaseUrl returns the release URLs for the known Astria Sequencer service. +func (asru *AvailableServiceReleaseUrls) AstriaSequencerReleaseUrl(version string) string { + return asru.AstriaSequencer.Prefix + version + asru.AstriaSequencer.Suffix +} + +// AstriaComposerReleaseUrl returns the release URLs for the known Astria Composer service. +func (asru *AvailableServiceReleaseUrls) AstriaComposerReleaseUrl(version string) string { + return asru.AstriaComposer.Prefix + version + asru.AstriaComposer.Suffix +} + +// AstriaConductorReleaseUrl returns the release URLs for the known Astria Conductor service. +func (asru *AvailableServiceReleaseUrls) AstriaConductorReleaseUrl(version string) string { + return asru.AstriaConductor.Prefix + version + asru.AstriaConductor.Suffix +} diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go index 6f64ead..35e2a26 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_amd64.go @@ -2,38 +2,25 @@ package config -type UrlParts struct { - UrlPrefix string - UrlMiddle string - UrlSuffix string -} - -type KnownServiceReleaseUrlsParts struct { - CometBFT UrlParts - AstriaSequencer UrlParts - AstriaComposer UrlParts - AstriaConductor UrlParts -} - -var ServiceUrls = KnownServiceReleaseUrlsParts{ - CometBFT: UrlParts{ - UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", - UrlMiddle: "/cometbft_", - UrlSuffix: "_darwin_amd64.tar.gz", +var ServiceUrls = AvailableServiceReleaseUrls{ + CometBFT: Url{ + Prefix: "https://github.com/cometbft/cometbft/releases/download/v", + Middle: "/cometbft_", + Suffix: "_darwin_amd64.tar.gz", }, - AstriaSequencer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", - UrlMiddle: "", - UrlSuffix: "/astria-sequencer-x86_64-apple-darwin.tar.gz", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/astria-sequencer-x86_64-apple-darwin.tar.gz", }, - AstriaComposer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", - UrlMiddle: "", - UrlSuffix: "/astria-composer-x86_64-apple-darwin.tar.gz", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/astria-composer-x86_64-apple-darwin.tar.gz", }, - AstriaConductor: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", - UrlMiddle: "", - UrlSuffix: "/astria-conductor-x86_64-apple-darwin.tar.gz", + AstriaConductor: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + Middle: "", + Suffix: "/astria-conductor-x86_64-apple-darwin.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go index e68f5f0..08acc4a 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_darwin_arm64.go @@ -2,38 +2,25 @@ package config -type UrlParts struct { - UrlPrefix string - UrlMiddle string - UrlSuffix string -} - -type KnownServiceReleaseUrlsParts struct { - CometBFT UrlParts - AstriaSequencer UrlParts - AstriaComposer UrlParts - AstriaConductor UrlParts -} - -var ServiceUrls = KnownServiceReleaseUrlsParts{ - CometBFT: UrlParts{ - UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", - UrlMiddle: "/cometbft_", - UrlSuffix: "_darwin_arm64.tar.gz", +var ServiceUrls = AvailableServiceReleaseUrls{ + CometBFT: Url{ + Prefix: "https://github.com/cometbft/cometbft/releases/download/v", + Middle: "/cometbft_", + Suffix: "_darwin_arm64.tar.gz", }, - AstriaSequencer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", - UrlMiddle: "", - UrlSuffix: "/astria-sequencer-aarch64-apple-darwin.tar.gz", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/astria-sequencer-aarch64-apple-darwin.tar.gz", }, - AstriaComposer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", - UrlMiddle: "", - UrlSuffix: "/astria-composer-aarch64-apple-darwin.tar.gz", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/astria-composer-aarch64-apple-darwin.tar.gz", }, - AstriaConductor: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", - UrlMiddle: "", - UrlSuffix: "/astria-conductor-aarch64-apple-darwin.tar.gz", + AstriaConductor: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + Middle: "", + Suffix: "/astria-conductor-aarch64-apple-darwin.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go index a8eaf64..37c0c31 100644 --- a/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go +++ b/modules/cli/cmd/devrunner/config/binaries_config_linux_amd64.go @@ -2,38 +2,25 @@ package config -type UrlParts struct { - UrlPrefix string - UrlMiddle string - UrlSuffix string -} - -type KnownServiceReleaseUrlsParts struct { - CometBFT UrlParts - AstriaSequencer UrlParts - AstriaComposer UrlParts - AstriaConductor UrlParts -} - -var ServiceUrls = KnownServiceReleaseUrlsParts{ - CometBFT: UrlParts{ - UrlPrefix: "https://github.com/cometbft/cometbft/releases/download/v", - UrlMiddle: "/cometbft_", - UrlSuffix: "_linux_amd64.tar.gz", +var ServiceUrls = AvailableServiceReleaseUrls{ + CometBFT: Url{ + Prefix: "https://github.com/cometbft/cometbft/releases/download/v", + Middle: "/cometbft_", + Suffix: "_linux_amd64.tar.gz", }, - AstriaSequencer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", - UrlMiddle: "", - UrlSuffix: "/astria-sequencer-x86_64-unknown-linux-gnu.tar.gz", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/astria-sequencer-x86_64-unknown-linux-gnu.tar.gz", }, - AstriaComposer: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/composer-v", - UrlMiddle: "", - UrlSuffix: "/astria-composer-x86_64-unknown-linux-gnu.tar.gz", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/astria-composer-x86_64-unknown-linux-gnu.tar.gz", }, - AstriaConductor: UrlParts{ - UrlPrefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", - UrlMiddle: "", - UrlSuffix: "/astria-conductor-x86_64-unknown-linux-gnu.tar.gz", + AstriaConductor: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/conductor-v", + Middle: "", + Suffix: "/astria-conductor-x86_64-unknown-linux-gnu.tar.gz", }, } diff --git a/modules/cli/cmd/devrunner/config/helpers.go b/modules/cli/cmd/devrunner/config/helpers.go index 3c3795a..727c437 100644 --- a/modules/cli/cmd/devrunner/config/helpers.go +++ b/modules/cli/cmd/devrunner/config/helpers.go @@ -337,23 +337,3 @@ func GetServiceLogLevelOverrides(serviceLogLevel string) []string { } return serviceLogLevelOverrides } - -// Build the release URLs for the known CometBFT service. -func (ksru *KnownServiceReleaseUrlsParts) BuildCometBftReleaseUrl(version string) string { - return ksru.CometBFT.UrlPrefix + version + ksru.CometBFT.UrlMiddle + version + ksru.CometBFT.UrlSuffix -} - -// Build the release URLs for the known Astria Sequencer service. -func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaSequencerReleaseUrl(version string) string { - return ksru.AstriaSequencer.UrlPrefix + version + ksru.AstriaSequencer.UrlSuffix -} - -// Build the release URLs for the known Astria Composer service. -func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaComposerReleaseUrl(version string) string { - return ksru.AstriaComposer.UrlPrefix + version + ksru.AstriaComposer.UrlSuffix -} - -// Build the release URLs for the known Astria Conductor service. -func (ksru *KnownServiceReleaseUrlsParts) BuildAstriaConductorReleaseUrl(version string) string { - return ksru.AstriaConductor.UrlPrefix + version + ksru.AstriaConductor.UrlSuffix -} diff --git a/modules/cli/cmd/devrunner/config/networks.go b/modules/cli/cmd/devrunner/config/networks.go index fd763ce..e4bb362 100644 --- a/modules/cli/cmd/devrunner/config/networks.go +++ b/modules/cli/cmd/devrunner/config/networks.go @@ -51,28 +51,28 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + MainnetAstriaConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(MainnetAstriaConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + MainnetAstriaComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(MainnetAstriaComposerVersion), + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(MainnetAstriaComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+MainnetAstriaComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", Version: "v" + MainnetAstriaSequencerVersion, - DownloadURL: ServiceUrls.BuildAstriaSequencerReleaseUrl(MainnetAstriaSequencerVersion), + DownloadURL: ServiceUrls.AstriaSequencerReleaseUrl(MainnetAstriaSequencerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+MainnetAstriaSequencerVersion), Args: nil, }, "cometbft": { Name: "cometbft", Version: "v" + MainnetCometbftVersion, - DownloadURL: ServiceUrls.BuildCometBftReleaseUrl(MainnetCometbftVersion), + DownloadURL: ServiceUrls.CometBftReleaseUrl(MainnetCometbftVersion), LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+MainnetCometbftVersion), Args: nil, }, @@ -88,14 +88,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + DevnetConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(DevnetConductorVersion), + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(DevnetConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+DevnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + DevnetComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(DevnetComposerVersion), + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(DevnetComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+DevnetComposerVersion), Args: nil, }, @@ -111,14 +111,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + TestnetConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(TestnetConductorVersion), + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(TestnetConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+TestnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + TestnetComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(TestnetComposerVersion), + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(TestnetComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+TestnetComposerVersion), Args: nil, }, @@ -134,14 +134,14 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { "conductor": { Name: "astria-conductor", Version: "v" + MainnetAstriaConductorVersion, - DownloadURL: ServiceUrls.BuildAstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(MainnetAstriaConductorVersion), LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", Version: "v" + MainnetAstriaComposerVersion, - DownloadURL: ServiceUrls.BuildAstriaComposerReleaseUrl(MainnetAstriaComposerVersion), + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(MainnetAstriaComposerVersion), LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+MainnetAstriaComposerVersion), Args: nil, },