-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add command to modify DA light client rpc port (#369)
- Loading branch information
1 parent
74aabfb
commit c082e0d
Showing
18 changed files
with
179 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package set | ||
|
||
import ( | ||
"errors" | ||
"github.com/dymensionxyz/roller/cmd/consts" | ||
"github.com/dymensionxyz/roller/config" | ||
"github.com/dymensionxyz/roller/sequencer" | ||
"github.com/dymensionxyz/roller/utils" | ||
"path/filepath" | ||
) | ||
|
||
func setLCRPC(cfg config.RollappConfig, value string) error { | ||
if err := validatePort(value); err != nil { | ||
return err | ||
} | ||
if cfg.DA != config.Celestia { | ||
return errors.New("setting the LC RPC port is only supported for Celestia") | ||
} | ||
if err := utils.UpdateFieldInToml(filepath.Join(cfg.Home, consts.ConfigDirName.DALightNode, "config.toml"), | ||
"Gateway.Port", value); err != nil { | ||
return err | ||
} | ||
return sequencer.UpdateDymintDAConfig(cfg) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/config/init/goldens/init_with_flags/rollapp/config/dymint.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
aggregator = "true" | ||
batch_submit_max_time = "100s" | ||
block_batch_max_size_bytes = 1500000 | ||
block_batch_size = "500" | ||
block_time = "0.2s" | ||
da_config = "{\"base_url\": \"http://localhost:26659\", \"timeout\": 60000000000, \"gas_prices\":0.1, \"gas_adjustment\": 1.3, \"namespace_id\":\"000000000000ffff\"}" | ||
da_layer = "celestia" | ||
dym_account_name = "hub_sequencer" | ||
empty_blocks_max_time = "10s" | ||
gas_fees = "" | ||
gas_limit = 0 | ||
gas_prices = "0.25udym" | ||
keyring_backend = "test" | ||
keyring_home_dir = "PLACEHOLDER_KEYRING_HOME_DIR" | ||
namespace_id = "000000000000ffff" | ||
node_address = "https://dymension-devnet.rpc.silknodes.io:443" | ||
rollapp_id = "mars_1-1" | ||
settlement_layer = "dymension" | ||
|
||
[instrumentation] | ||
prometheus = true | ||
prometheus_listen_addr = ":2112" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/config/init/goldens/init_without_flags/rollapp/config/dymint.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
aggregator = "true" | ||
batch_submit_max_time = "100s" | ||
block_batch_max_size_bytes = 1500000 | ||
block_batch_size = "500" | ||
block_time = "0.2s" | ||
da_config = "{\"base_url\": \"http://localhost:26659\", \"timeout\": 60000000000, \"gas_prices\":0.1, \"gas_adjustment\": 1.3, \"namespace_id\":\"000000000000ffff\"}" | ||
da_layer = "celestia" | ||
dym_account_name = "hub_sequencer" | ||
empty_blocks_max_time = "10s" | ||
gas_fees = "" | ||
gas_limit = 0 | ||
gas_prices = "0.25udym" | ||
keyring_backend = "test" | ||
keyring_home_dir = "PLACEHOLDER_KEYRING_HOME_DIR" | ||
namespace_id = "000000000000ffff" | ||
node_address = "https://dymension-devnet.rpc.silknodes.io:443" | ||
rollapp_id = "mars_1-1" | ||
settlement_layer = "dymension" | ||
|
||
[instrumentation] | ||
prometheus = true | ||
prometheus_listen_addr = ":2112" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.