-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Mikhail Zabaluev <[email protected]>
- Loading branch information
1 parent
bc40426
commit 2b62a93
Showing
38 changed files
with
979 additions
and
143 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,4 @@ | ||
pub mod da_db; | ||
pub mod execution_extension; | ||
pub mod syncing; | ||
pub mod migrations; | ||
pub mod releases; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
|
||
use maptos_execution_util::config::MaptosConfig; | ||
use mcr_settlement_config::Config as McrConfig; | ||
use movement_da_util::config::CelestiaDaLightNodeConfig; | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
pub struct Config { | ||
#[serde(flatten)] | ||
#[serde(default)] | ||
pub execution_config: MaptosConfig, | ||
|
||
#[serde(flatten)] | ||
#[serde(default)] | ||
pub celestia_da_light_node: CelestiaDaLightNodeConfig, | ||
|
||
#[serde(default)] | ||
pub mcr: McrConfig, | ||
|
||
#[serde(default)] | ||
pub da_db: da_db::Config, | ||
|
||
#[serde(default)] | ||
pub execution_extension: execution_extension::Config, | ||
|
||
#[serde(default)] | ||
pub syncing: syncing::Config, | ||
} | ||
|
||
impl Default for Config { | ||
fn default() -> Self { | ||
Self { | ||
execution_config: MaptosConfig::default(), | ||
celestia_da_light_node: CelestiaDaLightNodeConfig::default(), | ||
mcr: McrConfig::default(), | ||
da_db: da_db::Config::default(), | ||
execution_extension: execution_extension::Config::default(), | ||
syncing: syncing::Config::default(), | ||
} | ||
} | ||
} | ||
pub use releases::biarritz_rc1::*; |
24 changes: 24 additions & 0 deletions
24
networks/movement/movement-config/src/migrations/elsa_to_biarritz_rc1/dot_movement.rs
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 @@ | ||
use crate::migrations::elsa_to_biarritz_rc1::{ | ||
ElsaToBiarritzRc1, ElsaToBiarritzRc1Error, MigrateElsaToBiarritzRc1, | ||
}; | ||
use crate::releases::biarritz_rc1::Config; | ||
use dot_movement::DotMovement; | ||
|
||
impl MigrateElsaToBiarritzRc1 for DotMovement { | ||
async fn migrate_elsa_to_biarritz_rc1(&self) -> Result<Config, ElsaToBiarritzRc1Error> { | ||
// get the value | ||
let value = self | ||
.try_load_value() | ||
.await | ||
.map_err(|e| ElsaToBiarritzRc1Error::MigrationFailed(e.into()))?; | ||
|
||
// migrate the value | ||
let migrated_config = ElsaToBiarritzRc1::migrate(value)?; | ||
|
||
// write the migrated value | ||
self.try_overwrite_config_to_json(&migrated_config) | ||
.map_err(|e| ElsaToBiarritzRc1Error::MigrationFailed(e.into()))?; | ||
|
||
Ok(migrated_config) | ||
} | ||
} |
Oops, something went wrong.