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

Update mysten infra ptr with new db map #4496

Merged
merged 4 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
69 changes: 35 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sui-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rocksdb = "0.19.0"
serde_with = { version = "1.14.0", features = ["hex"] }
tracing = "0.1.36"
tracing-subscriber = { version = "0.3.15", features = ["time", "registry", "env-filter"] }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e" }
clap = { version = "3.1.17", features = ["derive"] }
prometheus = "0.13.1"
multiaddr = "0.14.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-cluster-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tokio = { version = "1.20.1", features = ["full"] }
tracing = { version = "0.1.36", features = ["log"] }
clap = { version = "3.1.14", features = ["derive"] }
reqwest = { version = "0.11.11", features = ["blocking", "json"] }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e" }
async-trait = "0.1.57"
anyhow = { version = "1.0.58", features = ["backtrace"] }
bcs = "0.1.3"
Expand Down
8 changes: 4 additions & 4 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "70
move-core-types = { git = "https://github.com/move-language/move", rev = "70b34a66473c34ad30d101290b249f2db3c847a2", features = ["address20"] }
move-vm-runtime = { git = "https://github.com/move-language/move", rev = "70b34a66473c34ad30d101290b249f2db3c847a2" }

typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445"}
typed-store-macros = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445"}
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445" }
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e"}
typed-store-macros = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e"}
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e" }

narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "842a611a0a58dd378a904d85f79b4edbbbc7b137", package = "config" }
narwhal-consensus = { git = "https://github.com/MystenLabs/narwhal", rev = "842a611a0a58dd378a904d85f79b4edbbbc7b137", package = "consensus" }
Expand All @@ -69,7 +69,7 @@ move-package = { git = "https://github.com/move-language/move", rev = "70b34a664
serde-reflection = "0.3.6"
serde_yaml = "0.8.26"
pretty_assertions = "1.2.1"
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "7ef7415a4e11cf68fa68ce9db884c46e704e0445" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "d96230a9272c322a7eefac49708aadfff1eed77e" }

test-fuzz = "3.0.4"
test-utils = { path = "../test-utils" }
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-core/src/authority/authority_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use tokio::sync::Notify;
use tokio_retry::strategy::{jitter, ExponentialBackoff};
use tracing::{debug, error, info, trace};
use typed_store::rocks::{DBBatch, DBMap};
use typed_store::traits::{DBMapTableUtil, Map};
use typed_store::traits::Map;

pub type AuthorityStore = SuiDataStore<AuthoritySignInfo>;
pub type GatewayStore = SuiDataStore<EmptySignInfo>;
Expand Down Expand Up @@ -1418,7 +1418,7 @@ impl<T: ModuleResolver> ModuleResolver for ResolverWrapper<T> {
// The primary key type for object storage.
#[serde_as]
#[derive(Eq, PartialEq, Clone, Copy, PartialOrd, Ord, Hash, Serialize, Deserialize, Debug)]
pub(crate) struct ObjectKey(pub ObjectID, pub VersionNumber);
pub struct ObjectKey(pub ObjectID, pub VersionNumber);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this needed to change?

Copy link
Contributor Author

@oxade oxade Sep 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this needed to change?

Without this, we will not be able to dump/debug the DB in external utils as this will leak the private type.


impl ObjectKey {
pub const ZERO: ObjectKey = ObjectKey(ObjectID::ZERO, VersionNumber::MIN);
Expand Down
3 changes: 2 additions & 1 deletion crates/sui-core/src/authority/authority_store_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use sui_storage::default_db_options;
use sui_types::base_types::{ExecutionDigests, SequenceNumber};
use sui_types::batch::{SignedBatch, TxSequenceNumber};
use typed_store::rocks::DBMap;
use typed_store::traits::DBMapTableUtil;
use typed_store::traits::TypedStoreDebug;

use typed_store_macros::DBMapUtils;
#[derive(DBMapUtils)]
pub struct AuthorityStoreTables<S> {
Expand Down
1 change: 0 additions & 1 deletion crates/sui-core/src/authority_active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ use tokio::{
time::timeout,
};
use tracing::{debug, error, info, warn};
use typed_store::traits::DBMapTableUtil;

use crate::{
authority::AuthorityState,
Expand Down
3 changes: 2 additions & 1 deletion crates/sui-core/src/checkpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use sui_types::{
},
};
use tracing::{debug, error, info};
use typed_store::traits::DBMapTableUtil;
use typed_store::traits::TypedStoreDebug;

use typed_store::{
rocks::{DBBatch, DBMap},
Map,
Expand Down
3 changes: 2 additions & 1 deletion crates/sui-core/src/epoch/epoch_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use sui_types::committee::{Committee, EpochId};
use sui_types::error::SuiResult;
use sui_types::messages::{AuthenticatedEpoch, GenesisEpoch};
use typed_store::rocks::DBMap;
use typed_store::traits::DBMapTableUtil;
use typed_store::traits::TypedStoreDebug;

use typed_store::Map;
use typed_store_macros::DBMapUtils;

Expand Down
Loading