Skip to content

Commit b58c865

Browse files
authored
Merge pull request #42 from movementlabsxyz/l-monninger/inddexer-db-statekeys-enabled
Shows setting state keys enabled does not work
2 parents 1516d93 + d36b50c commit b58c865

File tree

5 files changed

+12
-50
lines changed

5 files changed

+12
-50
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ either = "1.8.1"
9292
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
9393
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
9494

95-
# maptos-core
95+
# aptos-core
9696
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
9797
aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
9898
aptos-rest-client = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
@@ -101,6 +101,7 @@ aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev =
101101
aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
102102
aptos_schemadb = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
103103
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
104+
aptos-db-indexer = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
104105
# model checking and verification
105106

106107

checks/executor/checks/sketchpad/src/global_storage_includes.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ pub mod test {
44
use migration_executor_preludes::basic::BasicPrelude;
55
use migration_executor_test_global_storage_includes_criterion::GlobalStorageIncludes;
66
use migration_executor_test_types::{
7-
check::{checked_migration, CheckError},
7+
check::checked_migration,
88
criterion::movement_executor::{MovementExecutor, MovementOptExecutor},
99
prelude::PreludeGenerator,
1010
};
1111
use mtma_null_core::config::Config as MtmaNullConfig;
1212

13-
use tracing::info;
14-
1513
#[tokio::test]
1614
#[tracing_test::traced_test]
1715
async fn test_global_storage_includess_null() -> Result<(), anyhow::Error> {
@@ -30,25 +28,13 @@ pub mod test {
3028
let migration = migration_config.build()?;
3129

3230
// run the checked migration
33-
match checked_migration(
31+
checked_migration(
3432
&mut movement_executor,
3533
&prelude,
3634
&migration,
3735
vec![Box::new(GlobalStorageIncludes::new())],
3836
)
39-
.await
40-
{
41-
Ok(_) => {
42-
return Err(anyhow::anyhow!("Migration should have failed"));
43-
}
44-
Err(err) => match err {
45-
CheckError::Criteria(e) => info!("Migration failed as expected: {:?}", e),
46-
e => {
47-
return Err(e.into());
48-
}
49-
},
50-
}
51-
37+
.await?;
5238
Ok(())
5339
}
5440
}

checks/executor/checks/sketchpad/src/global_storage_injective.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ pub mod test {
44
use migration_executor_preludes::basic::BasicPrelude;
55
use migration_executor_test_global_storage_injective_criterion::GlobalStorageInjective;
66
use migration_executor_test_types::{
7-
check::{checked_migration, CheckError},
7+
check::checked_migration,
88
criterion::movement_executor::{MovementExecutor, MovementOptExecutor},
99
prelude::PreludeGenerator,
1010
};
1111
use mtma_null_core::config::Config as MtmaNullConfig;
12-
use tracing::info;
1312

1413
#[tokio::test]
1514
async fn test_global_storage_injective_null() -> Result<(), anyhow::Error> {
@@ -28,24 +27,13 @@ pub mod test {
2827
let migration = migration_config.build()?;
2928

3029
// run the checked migration
31-
match checked_migration(
30+
checked_migration(
3231
&mut movement_executor,
3332
&prelude,
3433
&migration,
3534
vec![Box::new(GlobalStorageInjective::new())],
3635
)
37-
.await
38-
{
39-
Ok(_) => {
40-
return Err(anyhow::anyhow!("Migration should have failed"));
41-
}
42-
Err(err) => match err {
43-
CheckError::Criteria(e) => info!("Migration failed as expected: {:?}", e),
44-
e => {
45-
return Err(e.into());
46-
}
47-
},
48-
}
36+
.await?;
4937

5038
Ok(())
5139
}

checks/executor/checks/sketchpad/src/global_storage_not_empty.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ pub mod test {
44
use migration_executor_preludes::basic::BasicPrelude;
55
use migration_executor_test_global_storage_not_empty_criterion::GlobalStorageNotEmpty;
66
use migration_executor_test_types::{
7-
check::{checked_migration, CheckError},
7+
check::checked_migration,
88
criterion::movement_executor::{MovementExecutor, MovementOptExecutor},
99
prelude::PreludeGenerator,
1010
};
1111
use mtma_null_core::config::Config as MtmaNullConfig;
12-
use tracing::info;
1312

1413
#[tokio::test]
1514
async fn test_global_storage_injective_null() -> Result<(), anyhow::Error> {
@@ -28,24 +27,13 @@ pub mod test {
2827
let migration = migration_config.build()?;
2928

3029
// run the checked migration
31-
match checked_migration(
30+
checked_migration(
3231
&mut movement_executor,
3332
&prelude,
3433
&migration,
3534
vec![Box::new(GlobalStorageNotEmpty::new())],
3635
)
37-
.await
38-
{
39-
Ok(_) => {
40-
return Err(anyhow::anyhow!("Migration should have failed"));
41-
}
42-
Err(err) => match err {
43-
CheckError::Criteria(e) => info!("Migration failed as expected: {:?}", e),
44-
e => {
45-
return Err(e.into());
46-
}
47-
},
48-
}
36+
.await?;
4937

5038
Ok(())
5139
}

migration/core/mtma-null/src/migrate/migrate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ impl Migrationish for Migrate {
6262
unique_id.to_string().split('-').next().unwrap()
6363
));
6464
let src = Path::new(old_db_dir);
65-
let dst = db_dir.join("db");
66-
copy_dir_recursive(src, &dst).map_err(|e| MigrationError::Internal(e.into()))?;
65+
copy_dir_recursive(src, &db_dir).map_err(|e| MigrationError::Internal(e.into()))?;
6766

6867
// Open the aptos db.
6968
let aptos_db = AptosDB::open(

0 commit comments

Comments
 (0)