Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show relayer log location #890

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/config/set/hub_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"github.com/dymensionxyz/roller/relayer"
"github.com/dymensionxyz/roller/sequencer"
"github.com/dymensionxyz/roller/utils"
config2 "github.com/dymensionxyz/roller/utils/config"
configutils "github.com/dymensionxyz/roller/utils/config"
"github.com/dymensionxyz/roller/utils/config/tomlconfig"
)

func setHubRPC(rlpCfg config2.RollappConfig, value string) error {
func setHubRPC(rlpCfg configutils.RollappConfig, value string) error {
rlpCfg.HubData.RPC_URL = value
if err := tomlconfig.Write(rlpCfg); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/config/set/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/utils"
config2 "github.com/dymensionxyz/roller/utils/config"
configutils "github.com/dymensionxyz/roller/utils/config"
"github.com/dymensionxyz/roller/utils/config/tomlconfig"
)

var keyUpdateFuncs = map[string]func(cfg config2.RollappConfig, value string) error{
var keyUpdateFuncs = map[string]func(cfg configutils.RollappConfig, value string) error{
"rollapp-rpc-port": setRollappRPC,
"lc-gateway-port": setLCGatewayPort,
"lc-rpc-port": setLCRPCPort,
Expand Down
7 changes: 4 additions & 3 deletions cmd/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package migrate
import (
"fmt"

configutils "github.com/dymensionxyz/roller/utils/config"
"github.com/spf13/cobra"

"github.com/dymensionxyz/roller/cmd/utils"
config2 "github.com/dymensionxyz/roller/utils/config"

"github.com/dymensionxyz/roller/utils/config/tomlconfig"
"github.com/dymensionxyz/roller/utils/errorhandling"
"github.com/dymensionxyz/roller/version"
Expand Down Expand Up @@ -50,7 +51,7 @@ func Cmd() *cobra.Command {
return cmd
}

func GetPrevVersionData(rlpCfg config2.RollappConfig) (*VersionData, error) {
func GetPrevVersionData(rlpCfg configutils.RollappConfig) (*VersionData, error) {
rollerPrevVersion := rlpCfg.RollerVersion
var major, minor, patch int
// Special case for the first version of roller, that didn't have a version field.
Expand Down Expand Up @@ -80,7 +81,7 @@ func GetPrevVersionData(rlpCfg config2.RollappConfig) (*VersionData, error) {
}

type VersionMigrator interface {
PerformMigration(rlpCfg config2.RollappConfig) error
PerformMigration(rlpCfg configutils.RollappConfig) error
ShouldMigrate(prevVersion VersionData) bool
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/migrate/v_0_1_12.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/dymensionxyz/roller/data_layer/avail"
"github.com/dymensionxyz/roller/sequencer"
"github.com/dymensionxyz/roller/utils"
config2 "github.com/dymensionxyz/roller/utils/config"
configutils "github.com/dymensionxyz/roller/utils/config"
"github.com/dymensionxyz/roller/utils/config/tomlconfig"
)

Expand All @@ -18,7 +18,7 @@ func (v *VersionMigratorV0112) ShouldMigrate(prevVersion VersionData) bool {
return prevVersion.Major < 1 && prevVersion.Minor < 2 && prevVersion.Patch < 12
}

func (v *VersionMigratorV0112) PerformMigration(rlpCfg config2.RollappConfig) error {
func (v *VersionMigratorV0112) PerformMigration(rlpCfg configutils.RollappConfig) error {
dymintTomlPath := sequencer.GetDymintFilePath(rlpCfg.Home)
if rlpCfg.DA.Backend == "mock" {
rlpCfg.DA.Backend = consts.Local
Expand Down
11 changes: 6 additions & 5 deletions cmd/relayer/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ Consider using 'services' if you want to run a 'systemd' service instead.

if rly.ChannelReady() {
fmt.Println("💈 IBC transfer channel is already established!")
status := fmt.Sprintf("Active src, %s <-> %s, dst", rly.SrcChannel, rly.DstChannel)
status := fmt.Sprintf(
"Active\nrollapp: %s\n<->\nhub: %s",
rly.SrcChannel, rly.DstChannel,
)
err := rly.WriteRelayerStatus(status)
errorhandling.PrettifyErrorIfExists(err)
} else {
pterm.Error.Println("💈 No channels found, ensure you've setup the relayer")
// seq := sequencer.GetInstance(rollappConfig)
// _, err := rly.CreateIBCChannel(override, logFileOption, seq)
// errorhandling.PrettifyErrorIfExists(err)
return
}

Expand All @@ -80,10 +80,11 @@ Consider using 'services' if you want to run a 'systemd' service instead.
)

fmt.Printf(
"💈 The relayer is running successfully on you local machine!\nChannels: src, %s <-> %s, dst",
"💈 The relayer is running successfully on you local machine!\nChannels:\nrollapp: %s\n<->\nhub: %s",
rly.SrcChannel,
rly.DstChannel,
)
fmt.Println("💈 Log file path: ", relayerLogFilePath)

select {}
},
Expand Down
Loading