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

Refactor felt #143

Merged
merged 20 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
runned udeps and machete
  • Loading branch information
antiyro committed Jun 7, 2024
commit e24c395817a4cf007f8e3f4d8f8b259963ed71a3
444 changes: 21 additions & 423 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion crates/client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
# Deoxys client
mc-db = { workspace = true }
mc-sync = { workspace = true }

# Starknet
blockifier = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/client/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parity-scale-codec = { workspace = true, default-features = true, features = [

# Deoxys crates
mp-block = { workspace = true, features = ["std", "parity-scale-codec"] }
mp-convert = { workspace = true, features = ["std"] }
mp-convert = { workspace = true }
mp-felt = { workspace = true, features = ["std", "serde"] }
mp-transactions = { workspace = true, features = ["std", "serde", "client"] }
mp-types = { workspace = true }
Expand Down
2 changes: 0 additions & 2 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ mp-types = { workspace = true }
primitive-types = { workspace = true }

#Deoxys
deoxys-tui = { optional = true, path = "../tui" }
mc-sync = { workspace = true }
parity-scale-codec = { workspace = true, features = ["derive"] }
reqwest = { workspace = true }
Expand All @@ -62,4 +61,3 @@ tower.workspace = true
[features]
default = []
sound = ["mc-sync/m"]
tui = ["deoxys-tui"]
76 changes: 1 addition & 75 deletions crates/node/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ pub struct ExtendedRunCmd {
#[clap(long)]
pub n_blocks_to_sync: Option<u64>,

/// A flag to run the TUI dashboard
#[cfg(feature = "tui")]
#[clap(long)]
pub tui: bool,

#[clap(long)]
pub backup_every_n_blocks: Option<usize>,

Expand All @@ -129,73 +124,4 @@ pub struct ExtendedRunCmd {

#[clap(long, default_value = "false")]
pub restore_from_latest_backup: bool,
}

pub fn run_node(mut cli: Cli) -> anyhow::Result<()> {
// #[cfg(feature = "tui")]
// {
// deoxys_tui::modify_substrate_sources();
// if cli.run.tui {
// std::thread::spawn(move || {
// tokio::runtime::Runtime::new()
// .unwrap()
// .block_on(async { deoxys_tui::run("/tmp/deoxys").await.unwrap() });
// std::process::exit(0)
// });
// }
// }

// // Assign a random pokemon name at each startup
// cli.run.base.name.get_or_insert_with(|| {
// tokio::runtime::Runtime::new().unwrap().block_on(mc_sync::utility::get_random_pokemon_name()).unwrap_or_else(
// |e| {
// log::warn!("Failed to get random pokemon name: {}", e);
// "deoxys".to_string()
// },
// )
// });

// deoxys_environment(&mut cli.run);

// // If --no-telemetry is not set, set the telemetry endpoints to starknodes.com
// // TODO(merge): telemetry
// // if !cli.run.base.telemetry_params.no_telemetry {
// // cli.run.base.telemetry_params.telemetry_endpoints =
// // vec![("wss://starknodes.com/submit/".to_string(), 0)]; }

// // TODO: verify that the l1_endpoint is valid
// let l1_endpoint = if let Some(url) = cli.run.l1_endpoint {
// url
// } else {
// log::error!("Missing required --l1-endpoint argument. The Online documentation is available here: https://deoxys-docs.kasar.io");
// return Ok(());
// };

// let starting_block = cli.run.starting_block;
// let mut fetch_block_config = cli.run.network.block_fetch_config();
// fetch_block_config.sound = cli.run.sound;
// fetch_block_config.verify = !cli.run.disable_root;
// fetch_block_config.api_key = cli.run.gateway_key.clone();
// fetch_block_config.sync_polling_interval =
// if cli.run.no_sync_polling { None } else { Some(Duration::from_secs(cli.run.sync_polling_interval)) };
// fetch_block_config.n_blocks_to_sync = cli.run.n_blocks_to_sync;
// // unique set of static OnceCell configuration
// set_config(&fetch_block_config);

// let genesis_block = fetch_apply_genesis_block(fetch_block_config.clone()).await.unwrap();

// service::new_full(
// config,
// sealing,
// l1_endpoint,
// fetch_block_config,
// genesis_block,
// starting_block,
// cli.run.backup_every_n_blocks,
// cli.run.backup_dir,
// cli.run.restore_from_latest_backup,
// )

todo!()
// Ok(())
}
}
8 changes: 1 addition & 7 deletions crates/primitives/block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ targets = ["x86_64-unknown-linux-gnu"]
blockifier = { workspace = true }
lazy_static = { workspace = true }
mp-felt = { workspace = true }
mp-transactions = { workspace = true }
serde = { workspace = true, features = ["derive"], optional = true }
serde_json = { workspace = true }
starknet-core = { workspace = true }
Expand All @@ -34,15 +33,10 @@ mp-felt = { workspace = true }

[features]
default = ["std"]
parity-scale-codec = [
"dep:parity-scale-codec",
"mp-felt/parity-scale-codec",
"mp-transactions/parity-scale-codec",
]
parity-scale-codec = ["dep:parity-scale-codec", "mp-felt/parity-scale-codec"]
scale-info = ["dep:scale-info"]
std = [
"mp-felt/std",
"mp-transactions/std",
"serde/std",
# Optionals
"anyhow",
Expand Down
2 changes: 0 additions & 2 deletions crates/primitives/transactions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ indexmap = { workspace = true }
mp-felt = { workspace = true }
starknet-core = { workspace = true }
starknet-crypto = { workspace = true, features = ["alloc"] }
starknet-ff = { workspace = true, features = ["alloc"] }
starknet-types-core = { workspace = true }
starknet_api = { workspace = true }

Expand All @@ -42,7 +41,6 @@ assert_matches = { workspace = true }
[features]
default = ["std"]
std = [
"starknet-ff/std",
"starknet-core/std",
"mp-felt/std",
# Optional
Expand Down
1 change: 0 additions & 1 deletion crates/tui/.gitignore

This file was deleted.

Loading
Loading