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

feat(bonsai): Bumped bonsai lib to latest opti #25

Merged
merged 3 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ git # Deoxys Changelog

## Next release

- feat(bonsai): Bumped bonsai lib to latest opti
- refactor(generic): reduced runtime dependence on generics
- fix(sync): Cleaned mc-sync isolating fetch process + added shared SyncStatus
- feat(self-hosted): host our own runner
Expand Down
21 changes: 14 additions & 7 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ pallet-grandpa = { default-features = true, git = "https://github.com/massalabs/
pallet-timestamp = { default-features = true, git = "https://github.com/massalabs/polkadot-sdk", branch = "release-polkadot-v1.3.0-std" }

# Bonsai trie dependencies
bonsai-trie = { default-features = false, git = "https://github.com/antiyro/bonsai-trie.git", branch = "oss" }
bonsai-trie = { default-features = false, git = "https://github.com/antiyro/bonsai-trie.git", branch = "oss", features = [
"std",
] }

# Madara pallets
pallet-starknet = { path = "crates/pallets/starknet", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/client/sync/src/l2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ pub fn verify_l2(
);
log::debug!("state_root: {state_root:?}");
let block_hash = state_update.block_hash.expect("Block hash not found in state update");
log::debug!("update_state_root {} -- block_hash: {block_hash:?}, state_root: {state_root:?}", block_number);
println!("update_state_root {} -- block_hash: {block_hash:?}, state_root: {state_root:?}", block_number);

update_l2(L2StateUpdate {
block_number,
Expand Down
48 changes: 3 additions & 45 deletions crates/node/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,6 @@ use sp_core::H160;
use crate::cli::Cli;
use crate::service;

#[derive(Debug, Clone, clap::Args)]
#[group(multiple = true)]
pub struct L1MessagesParams {
/// Ethereum Provider (Node) Url
#[clap(
long,
value_hint=clap::ValueHint::Url,
conflicts_with="l1_messages_config",
requires="l1_contract_address",
)]
pub provider_url: Option<String>,

/// L1 Contract Address
#[clap(
long,
value_hint=clap::ValueHint::Other,
conflicts_with="l1_messages_config",
requires="provider_url",
)]
pub l1_contract_address: Option<String>,
}

#[derive(Debug, Clone, clap::Args)]
pub struct L1Messages {
/// Path to configuration file for Ethereum Core Contract Events Listener
#[clap(
long,
conflicts_with_all=["provider_url", "l1_contract_address"],
value_hint=clap::ValueHint::FilePath,
)]
pub l1_messages_config: Option<PathBuf>,

#[clap(flatten)]
pub config_params: L1MessagesParams,
}

/// Available Sealing methods.
#[derive(Debug, Copy, Clone, clap::ValueEnum, Default, Serialize, Deserialize)]
pub enum Sealing {
Expand All @@ -72,7 +36,7 @@ impl From<Sealing> for SealingMode {
}
}

/// A possible network type.
/// Starknet network types.
#[derive(Debug, Clone, Copy, clap::ValueEnum)]
pub enum NetworkType {
/// The main network (mainnet).
Expand All @@ -83,9 +47,7 @@ pub enum NetworkType {
Integration,
}

/// Test network is on Sepolia,
/// Goerli is the deprecated test network for StarkNet and it is not supported after the 11th of
/// april 2024.
/// Starknet network configuration.
impl NetworkType {
pub fn uri(&self) -> &'static str {
match self {
Expand Down Expand Up @@ -160,10 +122,6 @@ pub struct ExtendedRunCmd {
#[clap(long)]
pub deoxys: bool,

/// Configuration for L1 Messages (Syncing) Worker
#[clap(flatten)]
pub l1_messages_worker: L1Messages,

/// Disable root verification
#[clap(long)]
pub disable_root: bool,
Expand Down Expand Up @@ -237,7 +195,7 @@ fn deoxys_environment(cmd: &mut ExtendedRunCmd) {
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);
"gimmighoul".to_string()
"deoxys".to_string()
},
)
});
Expand Down
Loading