From 76bd2c38d3cdadf243514df01e672ab085c17bd8 Mon Sep 17 00:00:00 2001 From: Sam Bukowski Date: Fri, 1 Nov 2024 15:01:01 -0600 Subject: [PATCH] Chore: Update Service Binaries Config (#165) * service bump * sequencer config updates * update cometbft genesis * update urls and chainId * add specific local/remote service versions. * refactor binaries info for dynamic download link creation * update fee asset * local versions match with default versions * bump dusk dawn nums, update sequencer config to match * single default target network * add build url funcs * try increase sleep to prevent ci tests failing * Revert "try increase sleep to prevent ci tests failing" This reverts commit d7fbaabdf37f1672b7c32e1eb14186ac29e954b0. * specify local in ci test * denom and channel updates * add and update service versions * move binary url related stuff to own binaries.go file --------- Co-authored-by: Jesse Snyder --- .github/workflows/lint-and-test.yaml | 2 +- modules/cli/README.md | 2 +- modules/cli/cmd/constants.go | 5 +- modules/cli/cmd/devrunner/config/base.go | 2 +- 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/constants.go | 22 ++++-- modules/cli/cmd/devrunner/config/genesis.json | 4 +- modules/cli/cmd/devrunner/config/networks.go | 70 +++++++++---------- modules/cli/cmd/devrunner/init.go | 2 +- modules/cli/cmd/devrunner/reset.go | 2 +- 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/config.go | 26 +++---- modules/cli/cmd/sequencer/constants.go | 5 +- modules/cli/cmd/sequencer/ibctransfer.go | 2 +- modules/cli/cmd/sequencer/nonce.go | 2 +- modules/cli/cmd/sequencer/transfer.go | 2 +- modules/go-sequencer-client/client/signer.go | 2 +- 25 files changed, 175 insertions(+), 166 deletions(-) create mode 100644 modules/cli/cmd/devrunner/config/binaries.go 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 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/constants.go b/modules/cli/cmd/constants.go index e34deae..90e3d17 100644 --- a/modules/cli/cmd/constants.go +++ b/modules/cli/cmd/constants.go @@ -1,6 +1,7 @@ package cmd const ( - DefaultDuskNum = "10" - DefaultDawnNum = "0" + DefaultDuskNum = "11" + DefaultDawnNum = "1" + DefaultTargetNetwork = "dawn" ) diff --git a/modules/cli/cmd/devrunner/config/base.go b/modules/cli/cmd/devrunner/config/base.go index b345950..86ecfc7 100644 --- a/modules/cli/cmd/devrunner/config/base.go +++ b/modules/cli/cmd/devrunner/config/base.go @@ -73,7 +73,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": "", 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 f8058ae..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 Binary struct { - Name string - Version string - Url string -} - -type Binaries struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary -} - -var KnownBinaries = Binaries{ - CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_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: 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", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/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", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/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", + 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 4510ef1..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 Binary struct { - Name string - Version string - Url string -} - -type Binaries struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary -} - -var KnownBinaries = Binaries{ - CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_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: 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", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/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", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/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", + 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 d0e522e..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 Binary struct { - Name string - Version string - Url string -} - -type Binaries struct { - CometBFT Binary - AstriaSequencer Binary - AstriaComposer Binary - AstriaConductor Binary -} - -var KnownBinaries = Binaries{ - CometBFT: Binary{ - Name: "cometbft", - Version: "v" + CometbftVersion, - Url: "https://github.com/cometbft/cometbft/releases/download/v" + CometbftVersion + "/cometbft_" + CometbftVersion + "_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: 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", + AstriaSequencer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/sequencer-v", + Middle: "", + Suffix: "/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", + AstriaComposer: Url{ + Prefix: "https://github.com/astriaorg/astria/releases/download/composer-v", + Middle: "", + Suffix: "/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", + 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/constants.go b/modules/cli/cmd/devrunner/config/constants.go index 9a8ccc2..8f539e7 100644 --- a/modules/cli/cmd/devrunner/config/constants.go +++ b/modules/cli/cmd/devrunner/config/constants.go @@ -12,15 +12,27 @@ const ( DefaultLocalNetworkName = "sequencer-test-chain-0" DefaultNetworksConfigName = "networks-config.toml" DefaultServiceLogLevel = "info" - DefaultTargetNetwork = "local" DefaultLocalNativeDenom = "ntia" DefaultTUIConfigName = "tui-config.toml" DefaultHighlightColor = "blue" DefaultBorderColor = "gray" // NOTE - do not include the 'v' at the beginning of the version number - CometbftVersion = "0.38.8" - AstriaSequencerVersion = "1.0.0-rc.1" - AstriaComposerVersion = "1.0.0-rc.1" - AstriaConductorVersion = "1.0.0-rc.1" + // Service versions matched to live networks + MainnetCometbftVersion = "0.38.11" + MainnetAstriaSequencerVersion = "1.0.0" + MainnetAstriaComposerVersion = "1.0.0" + MainnetAstriaConductorVersion = "1.0.0" + + // 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/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 029a64c..e4bb362 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" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + MainnetAstriaConductorVersion, + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + MainnetAstriaComposerVersion, + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(MainnetAstriaComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+MainnetAstriaComposerVersion), Args: nil, }, "sequencer": { Name: "astria-sequencer", - Version: "v" + AstriaSequencerVersion, - DownloadURL: KnownBinaries.AstriaSequencer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+AstriaSequencerVersion), + Version: "v" + MainnetAstriaSequencerVersion, + DownloadURL: ServiceUrls.AstriaSequencerReleaseUrl(MainnetAstriaSequencerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-sequencer-v"+MainnetAstriaSequencerVersion), Args: nil, }, "cometbft": { Name: "cometbft", - Version: "v" + CometbftVersion, - DownloadURL: KnownBinaries.CometBFT.Url, - LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+CometbftVersion), + Version: "v" + MainnetCometbftVersion, + DownloadURL: ServiceUrls.CometBftReleaseUrl(MainnetCometbftVersion), + LocalPath: filepath.Join(defaultBinDir, "cometbft-v"+MainnetCometbftVersion), Args: nil, }, }, @@ -87,39 +87,39 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs { Services: map[string]ServiceConfig{ "conductor": { Name: "astria-conductor", - Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + DevnetConductorVersion, + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(DevnetConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+DevnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + DevnetComposerVersion, + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(DevnetComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+DevnetComposerVersion), Args: nil, }, }, }, "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/", + SequencerChainId: "dawn-" + cmd.DefaultDawnNum, + 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", - Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + TestnetConductorVersion, + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(TestnetConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+TestnetConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + TestnetComposerVersion, + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(TestnetComposerVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+TestnetComposerVersion), Args: nil, }, }, @@ -129,20 +129,20 @@ 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", - Version: "v" + AstriaConductorVersion, - DownloadURL: KnownBinaries.AstriaConductor.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+AstriaConductorVersion), + Version: "v" + MainnetAstriaConductorVersion, + DownloadURL: ServiceUrls.AstriaConductorReleaseUrl(MainnetAstriaConductorVersion), + LocalPath: filepath.Join(defaultBinDir, "astria-conductor-v"+MainnetAstriaConductorVersion), Args: nil, }, "composer": { Name: "astria-composer", - Version: "v" + AstriaComposerVersion, - DownloadURL: KnownBinaries.AstriaComposer.Url, - LocalPath: filepath.Join(defaultBinDir, "astria-composer-v"+AstriaComposerVersion), + Version: "v" + MainnetAstriaComposerVersion, + DownloadURL: ServiceUrls.AstriaComposerReleaseUrl(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/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/config.go b/modules/cli/cmd/sequencer/config.go index fd88cd8..26db22b 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: DefaultSequencerChainID, - SequencerURL: DefaultSequencerURL, - Asset: "nria", - FeeAsset: "nria", + SequencerChainId: "dusk-" + cmd.DefaultDuskNum, + SequencerURL: "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org", + Asset: "ntia", + FeeAsset: "ntia", }, "dawn": { - SequencerChainId: "astria-dawn-0", - SequencerURL: "https://rpc.sequencer.dawn-0.devnet.astria.org", - Asset: "ibc/channel0/utia", - FeeAsset: "ibc/channel0/utia", + SequencerChainId: DefaultSequencerChainID, + SequencerURL: DefaultSequencerURL, + 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", + SequencerURL: "https://rpc.astria.org", + Asset: "ibc/channel-0/utia", + FeeAsset: "ibc/channel-0/utia", }, }, } diff --git a/modules/cli/cmd/sequencer/constants.go b/modules/cli/cmd/sequencer/constants.go index 28cddc7..c661c66 100644 --- a/modules/cli/cmd/sequencer/constants.go +++ b/modules/cli/cmd/sequencer/constants.go @@ -7,10 +7,9 @@ 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.dawn-" + cmd.DefaultDawnNum + ".astria.org" + DefaultSequencerChainID = "dawn-" + cmd.DefaultDawnNum 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") 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