Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/msgs-proc-logic'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Jun 6, 2024
2 parents 30e5724 + 7e88155 commit fcd36af
Show file tree
Hide file tree
Showing 89 changed files with 5,032 additions and 2,787 deletions.
306 changes: 204 additions & 102 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ pin-project-lite = "0.2"
pkcs8 = "0.10"
public-ip = "0.2"
quick_cache = "0.4.1"
quinn = { version = "0.11", default-features = false, features = ["runtime-tokio", "rustls"] }
quinn = { version = "0.11", default-features = false, features = [
"runtime-tokio",
"rustls",
] }
rand = "0.8"
rand_pcg = { version = "0.3" }
rcgen = "0.13.1"
Expand Down Expand Up @@ -96,6 +99,9 @@ triomphe = "0.1.11"
weedb = "0.3.1"
x509-parser = "0.15"

# TODO: RIIR
ton_executor = { git = "https://github.com/broxus/ton-labs-executor.git", branch = "shard_acc_executor" }

# local deps
tycho-block-util = { path = "./block-util" }
tycho-collator = { path = "./collator" }
Expand Down
33 changes: 16 additions & 17 deletions cli/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ use everscale_types::models::*;
use everscale_types::prelude::*;
use futures_util::future::BoxFuture;
use tycho_block_util::state::{MinRefMcStateTracker, ShardStateStuff};
use tycho_collator::collator::queue_adapter::MessageQueueAdapterStdImpl;
use tycho_collator::collator::CollatorStdImplFactory;
use tycho_collator::internal_queue::persistent::persistent_state::{
PersistentStateConfig, PersistentStateImplFactory,
};
use tycho_collator::internal_queue::queue::{QueueConfig, QueueFactory, QueueFactoryStdImpl};
use tycho_collator::internal_queue::persistent::persistent_state::PersistentStateImplFactory;
use tycho_collator::internal_queue::queue::{QueueFactory, QueueFactoryStdImpl};
use tycho_collator::internal_queue::session::session_state::SessionStateImplFactory;
use tycho_collator::manager::CollationManager;
use tycho_collator::mempool::{MempoolAdapterFactory, MempoolAdapterStdImpl};
use tycho_collator::mempool::MempoolAdapterStdImpl;
use tycho_collator::queue_adapter::MessageQueueAdapterStdImpl;
use tycho_collator::state_node::{StateNodeAdapter, StateNodeAdapterStdImpl};
use tycho_collator::types::{CollationConfig, ValidatorNetwork};
use tycho_collator::validator::client::retry::BackoffConfig;
Expand Down Expand Up @@ -552,7 +550,9 @@ impl Node {
// TODO: move into config
let collation_config = CollationConfig {
key_pair: self.keypair.clone(),
mc_block_min_interval_ms: 10000,
mc_block_min_interval_ms: 2500,
max_uncommitted_chain_length: 32,
uncommitted_chain_to_import_next_anchor: 8,
max_mc_block_delta_from_bc_to_await_own: 2,
supported_block_version: 50,
supported_capabilities: supported_capabilities(),
Expand All @@ -561,16 +561,9 @@ impl Node {
test_validators_keypairs: vec![],
};

let queue_config = QueueConfig {
persistent_state_config: PersistentStateConfig {
database_url: "db_url".to_string(),
},
};

let shards = vec![ShardIdent::default()];
let shards = vec![];
let session_state_factory = SessionStateImplFactory::new(shards);
let persistent_state_factory =
PersistentStateImplFactory::new(queue_config.persistent_state_config);
let persistent_state_factory = PersistentStateImplFactory::new(self.storage.clone());

let queue_factory = QueueFactoryStdImpl {
session_state_factory,
Expand All @@ -592,14 +585,20 @@ impl Node {
},
// TODO: Move into node config
config: ValidatorConfig {
backoff_config: BackoffConfig {
error_backoff_config: BackoffConfig {
min_delay: Duration::from_millis(50),
max_delay: Duration::from_secs(10),
factor: 2.0,
max_times: usize::MAX,
},
request_timeout: Duration::from_secs(1),
delay_between_requests: Duration::from_millis(50),
request_signatures_backoff_config: BackoffConfig {
min_delay: Duration::from_millis(50),
max_delay: Duration::from_secs(1),
factor: 2.0,
max_times: usize::MAX,
},
},
},
CollatorStdImplFactory,
Expand Down
5 changes: 5 additions & 0 deletions collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ license.workspace = true
anyhow = { workspace = true }
async-trait = { workspace = true }
backon = { workspace = true }
base64 = { workspace = true }
bytes = { workspace = true }
bytesize = { workspace = true }
futures-util = { workspace = true }
Expand All @@ -26,7 +27,9 @@ tokio = { workspace = true, features = ["macros", "rt", "signal"] }
tokio-util = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
ton_executor = { workspace = true }
trait-variant = { workspace = true }

everscale-types = { workspace = true }
everscale-crypto = { workspace = true }

Expand All @@ -49,7 +52,9 @@ tycho-storage = { workspace = true, features = ["test"] }
tycho-util = { workspace = true, features = ["test"] }

[features]
default = []
test = []
block-creator-stats = []

[lints]
workspace = true
Loading

0 comments on commit fcd36af

Please sign in to comment.