Skip to content

Commit

Permalink
Chore: Update config for dusk-10 (#164)
Browse files Browse the repository at this point in the history
* update config for dusk-10

* update asset defaults

* default config naming updates

* reorder cometbft genesis file

* space
  • Loading branch information
sambukowski committed Aug 28, 2024
1 parent 78372b0 commit ed9bb95
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 33 deletions.
6 changes: 6 additions & 0 deletions modules/cli/cmd/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package cmd

const (
DefaultDuskNum = "10"
DefaultDawnNum = "0"
)
3 changes: 2 additions & 1 deletion modules/cli/cmd/devrunner/config/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func DefaultBaseConfig(instanceName string) BaseConfig {
return map[string]string{
// conductor
"astria_conductor_celestia_block_time_ms": "1200",
"astria_conductor_no_celestia_auth": "true",
"astria_conductor_celestia_bearer_token": "<JWT Bearer token>",
"astria_conductor_celestia_node_http_url": "http://127.0.0.1:26658",
"astria_conductor_execution_rpc_url": "http://127.0.0.1:50051",
Expand Down Expand Up @@ -59,7 +60,7 @@ func DefaultBaseConfig(instanceName string) BaseConfig {
"astria_composer_pretty_print": "true",
"astria_composer_api_listen_addr": "0.0.0.0:0",
"astria_composer_sequencer_url": "http://127.0.0.1:26657",
"astria_composer_sequencer_chain_id": "astria-dusk-" + duskNum,
"astria_composer_sequencer_chain_id": "astria-dusk-" + cmd.DefaultDuskNum,
"astria_composer_rollups": "astriachain::ws://127.0.0.1:8546",
"astria_composer_private_key_file": filepath.Join(homeDir, ".astria", instanceName, DefaultConfigDirName, "composer_dev_priv_key"),
"astria_composer_sequencer_address_prefix": "astria",
Expand Down
10 changes: 4 additions & 6 deletions modules/cli/cmd/devrunner/config/constants.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package config

const (
duskNum = "9"
dawnNum = "0"
BinariesDirName = "bin"
LogsDirName = "logs"
DataDirName = "data"
Expand All @@ -15,14 +13,14 @@ const (
DefaultNetworksConfigName = "networks-config.toml"
DefaultServiceLogLevel = "info"
DefaultTargetNetwork = "local"
LocalNativeDenom = "nria"
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 = "0.15.0"
AstriaComposerVersion = "0.8.1"
AstriaConductorVersion = "0.19.0"
AstriaSequencerVersion = "0.16.0"
AstriaComposerVersion = "0.8.2"
AstriaConductorVersion = "0.20.0"
)
42 changes: 31 additions & 11 deletions modules/cli/cmd/devrunner/config/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,25 @@
"address": {
"bech32m": "astria1rsxyjrcm255ds9euthjx6yc3vrjt9sxrm9cfgm"
},
"balance": 58446744073709551616
"balance": {
"lo": "5844674407370955161"
}
},
{
"address": {
"bech32m": "astria1xnlvg0rle2u6auane79t4p27g8hxnj36ja960z"
},
"balance": 1000000000000000000
"balance": {
"lo": "1000000000000000000"
}
},
{
"address": {
"bech32m": "astria1vpcfutferpjtwv457r63uwr6hdm8gwr3pxt5ny"
},
"balance": 1000000000000000000
"balance": {
"lo": "1000000000000000000"
}
}
],
"authority_sudo_address": {
Expand All @@ -71,19 +77,33 @@
"bech32m": "astria1xnlvg0rle2u6auane79t4p27g8hxnj36ja960z"
}
],
"ibc_params": {
"ibc_parameters": {
"ibc_enabled": true,
"inbound_ics20_transfers_enabled": true,
"outbound_ics20_transfers_enabled": true
},
"fees": {
"transfer_base_fee": 12,
"sequence_base_fee": 32,
"sequence_byte_cost_multiplier": 1,
"init_bridge_account_base_fee": 48,
"bridge_lock_byte_cost_multiplier": 1,
"bridge_sudo_change_fee": 24,
"ics20_withdrawal_base_fee": 24
"transferBaseFee": {
"lo": "12"
},
"sequenceBaseFee": {
"lo": "32"
},
"sequenceByteCostMultiplier": {
"lo": "1"
},
"initBridgeAccountBaseFee": {
"lo": "48"
},
"bridgeLockByteCostMultiplier": {
"lo": "1"
},
"bridgeSudoChangeFee": {
"lo": "24"
},
"ics20WithdrawalBaseFee": {
"lo": "24"
}
},
"native_asset_base_denomination": "nria",
"allowed_fee_assets": [
Expand Down
17 changes: 9 additions & 8 deletions modules/cli/cmd/devrunner/config/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path/filepath"
"regexp"

"github.com/astriaorg/astria-cli-go/modules/cli/cmd"
log "github.com/sirupsen/logrus"

"github.com/pelletier/go-toml/v2"
Expand Down Expand Up @@ -45,7 +46,7 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs {
SequencerGRPC: "http://127.0.0.1:8080",
SequencerRPC: "http://127.0.0.1:26657",
RollupName: "astria-test-chain-1",
NativeDenom: "nria",
NativeDenom: DefaultLocalNativeDenom,
Services: map[string]ServiceConfig{
"conductor": {
Name: "astria-conductor",
Expand Down Expand Up @@ -78,11 +79,11 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs {
},
},
"dusk": {
SequencerChainId: "astria-dusk-" + duskNum,
SequencerGRPC: "https://grpc.sequencer.dusk-" + duskNum + ".devnet.astria.org/",
SequencerRPC: "https://rpc.sequencer.dusk-" + duskNum + ".devnet.astria.org/",
SequencerChainId: "astria-dusk-" + cmd.DefaultDuskNum,
SequencerGRPC: "https://grpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org/",
SequencerRPC: "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org/",
RollupName: "",
NativeDenom: "nria",
NativeDenom: DefaultLocalNativeDenom,
Services: map[string]ServiceConfig{
"conductor": {
Name: "astria-conductor",
Expand All @@ -101,9 +102,9 @@ func DefaultNetworksConfigs(defaultBinDir string) NetworkConfigs {
},
},
"dawn": {
SequencerChainId: "astria-dawn-" + dawnNum,
SequencerGRPC: "https://grpc.sequencer.dawn-" + dawnNum + ".devnet.astria.org/",
SequencerRPC: "https://rpc.sequencer.dawn-" + dawnNum + ".devnet.astria.org/",
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/",
RollupName: "",
NativeDenom: "ibc/channel0/utia",
Services: map[string]ServiceConfig{
Expand Down
2 changes: 1 addition & 1 deletion modules/cli/cmd/devrunner/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {

flagHandler := cmd.CreateCliFlagHandler(initCmd, cmd.EnvPrefix)
flagHandler.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.")
flagHandler.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")
flagHandler.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")
}

func runInitialization(c *cobra.Command, _ []string) {
Expand Down
4 changes: 2 additions & 2 deletions modules/cli/cmd/devrunner/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ func init() {
resetCmd.AddCommand(resetConfigCmd)
rcfh := cmd.CreateCliFlagHandler(resetConfigCmd, cmd.EnvPrefix)
rcfh.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.")
rcfh.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")
rcfh.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")

resetCmd.AddCommand(resetNetworksCmd)
rnfh := cmd.CreateCliFlagHandler(resetNetworksCmd, cmd.EnvPrefix)
rnfh.BindStringFlag("local-network-name", config.DefaultLocalNetworkName, "Set the local network name for the instance. This is used to set the chain ID in the CometBFT genesis.json file.")
rnfh.BindStringFlag("local-native-denom", config.LocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")
rnfh.BindStringFlag("local-native-denom", config.DefaultLocalNativeDenom, "Set the default denom for the local instance. This is used to set the 'native_asset_base_denomination' and 'allowed_fee_assets' in the CometBFT genesis.json file.")

resetCmd.AddCommand(resetStateCmd)
}
12 changes: 8 additions & 4 deletions modules/cli/cmd/sequencer/constants.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package sequencer

import (
"github.com/astriaorg/astria-cli-go/modules/cli/cmd"
)

const (
DefaultConfigDirName = ".astria"
DefaultAddressPrefix = "astria"
DefaultSequencerURL = "https://rpc.sequencer.dusk-8.devnet.astria.org"
DefaultSequencerChainID = "astria-dusk-8"
DefaultAsset = "nria"
DefaultFeeAsset = "nria"
DefaultSequencerURL = "https://rpc.sequencer.dusk-" + cmd.DefaultDuskNum + ".devnet.astria.org"
DefaultSequencerChainID = "astria-dusk-" + cmd.DefaultDuskNum
DefaultAsset = "ntia"
DefaultFeeAsset = "ntia"
DefaultSequencerNetworksConfigFilename = "sequencer-networks-config.toml"
DefaultTargetNetwork = "dusk"
)

0 comments on commit ed9bb95

Please sign in to comment.