From 56219f6ecef5e41f1b3e9eb43294c48c905881b5 Mon Sep 17 00:00:00 2001 From: Itay Levy Date: Mon, 4 Sep 2023 14:35:35 +0300 Subject: [PATCH 1/2] fixed migration panic when using mock da --- cmd/migrate/v_0_1_12.go | 3 +++ data_layer/damock/damock.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/migrate/v_0_1_12.go b/cmd/migrate/v_0_1_12.go index 2db773c2..741b14d6 100644 --- a/cmd/migrate/v_0_1_12.go +++ b/cmd/migrate/v_0_1_12.go @@ -17,6 +17,9 @@ func (v *VersionMigratorV0112) ShouldMigrate(prevVersion VersionData) bool { func (v *VersionMigratorV0112) PerformMigration(rlpCfg config.RollappConfig) error { dymintTomlPath := sequencer.GetDymintFilePath(rlpCfg.Home) + if rlpCfg.DA == "mock" { + rlpCfg.DA = config.Local + } da := datalayer.NewDAManager(rlpCfg.DA, rlpCfg.Home) sequencerDaConfig := da.GetSequencerDAConfig() if sequencerDaConfig == "" { diff --git a/data_layer/damock/damock.go b/data_layer/damock/damock.go index 4613a3cf..9418fd19 100644 --- a/data_layer/damock/damock.go +++ b/data_layer/damock/damock.go @@ -60,5 +60,5 @@ func (c *DAMock) GetKeyName() string { } func (d *DAMock) GetNetworkName() string { - return "mock" + return "local" } From e9e36ba2544242c7610199faae2c3d1650946a1d Mon Sep 17 00:00:00 2001 From: Itay Levy Date: Mon, 4 Sep 2023 14:40:57 +0300 Subject: [PATCH 2/2] writing new local da config to roller config --- cmd/migrate/v_0_1_12.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/migrate/v_0_1_12.go b/cmd/migrate/v_0_1_12.go index 741b14d6..a28fd1df 100644 --- a/cmd/migrate/v_0_1_12.go +++ b/cmd/migrate/v_0_1_12.go @@ -19,6 +19,7 @@ func (v *VersionMigratorV0112) PerformMigration(rlpCfg config.RollappConfig) err dymintTomlPath := sequencer.GetDymintFilePath(rlpCfg.Home) if rlpCfg.DA == "mock" { rlpCfg.DA = config.Local + return config.WriteConfigToTOML(rlpCfg) } da := datalayer.NewDAManager(rlpCfg.DA, rlpCfg.Home) sequencerDaConfig := da.GetSequencerDAConfig()