diff --git a/Cargo.lock b/Cargo.lock index f58f15e..eea58fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2718,6 +2718,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash 0.7.8", + "serde", ] [[package]] @@ -3857,7 +3858,7 @@ dependencies = [ "near-light-client-rpc", "near-primitives", "pretty_env_logger", - "rand 0.8.5", + "rand 0.7.3", "serde", "sled", "tokio", @@ -3889,7 +3890,7 @@ dependencies = [ "near-primitives", "near-primitives-core", "pretty_env_logger", - "rand 0.8.5", + "rand 0.7.3", "serde", "serde_json", "test-utils", @@ -3912,7 +3913,7 @@ dependencies = [ "near-primitives", "near-primitives-core", "pretty_env_logger", - "rand 0.8.5", + "rand 0.7.3", "serde", "serde_json", "tokio", @@ -4122,7 +4123,7 @@ dependencies = [ "anyhow", "config", "futures", - "hashbrown 0.14.3", + "hashbrown 0.12.3", "hex", "http-cache-reqwest", "jsonrpsee", diff --git a/Dockerfile.operator b/Dockerfile.operator index 9de76f6..7452abf 100644 --- a/Dockerfile.operator +++ b/Dockerfile.operator @@ -22,10 +22,10 @@ RUN apt-get update && apt-get install -y \ RUN cargo new --bin bin/dummy RUN cargo new --lib crates/dummylib RUN cargo new --lib nearx -RUN cargo build --release --bin dummy +RUN cargo build --release --bin dummy --config net.git-fetch-with-cli=true COPY ./ ./ -RUN cargo build --release --bin nearx-operator +RUN cargo build --release --bin nearx-operator --config net.git-fetch-with-cli=true RUN ldd target/release/nearx-operator RUN cp target/release/nearx-operator /near/near-light-client diff --git a/bin/operator/src/engine/mod.rs b/bin/operator/src/engine/mod.rs index 07d6d69..f3679cb 100644 --- a/bin/operator/src/engine/mod.rs +++ b/bin/operator/src/engine/mod.rs @@ -329,6 +329,7 @@ impl Handler for Engine { #[cfg(test)] mod tests { + use near_light_client_primitives::config::BaseConfig; use near_light_client_rpc::TransactionOrReceiptId; use test_utils::fixture; @@ -339,7 +340,8 @@ mod tests { async fn manager() -> Engine { let client = mocks().await; - Engine::new(Arc::new(client)) + + Engine::new(&crate::config::Config::test_config(), Arc::new(client)) } // TODO: move to integration tests diff --git a/bin/operator/src/succinct/mod.rs b/bin/operator/src/succinct/mod.rs index a814c74..326d95a 100644 --- a/bin/operator/src/succinct/mod.rs +++ b/bin/operator/src/succinct/mod.rs @@ -455,6 +455,7 @@ pub mod tests { use self::types::NearX; use super::*; + const VERIFY_AMT: usize = 64; pub struct Stub(Circuit); impl Stub { pub fn selector(&self) -> String { diff --git a/bin/operator/tests/succinct.rs b/bin/operator/tests/succinct.rs index 7d015a6..6acfdeb 100644 --- a/bin/operator/tests/succinct.rs +++ b/bin/operator/tests/succinct.rs @@ -2,7 +2,6 @@ use std::str::FromStr; use near_light_client_rpc::prelude::Itertools; -use near_light_clientx::VERIFY_AMT; use nearx_operator::{ config::Config, succinct::*, types::TransactionOrReceiptIdPrimitive, BaseConfig, }; diff --git a/nearx/src/config.rs b/nearx/src/config.rs index 5219413..af33d82 100644 --- a/nearx/src/config.rs +++ b/nearx/src/config.rs @@ -13,7 +13,7 @@ pub trait Config: std::fmt::Debug + Clone + PartialEq + Sync + Send + 'static { pub struct Testnet; impl const Config for Testnet { const NETWORK: Network = Network::Testnet; - const BPS: usize = 35; // In practice we only see 30-35 + const BPS: usize = 50; // In practice we only see 30-35 const VERIFY_AMT: usize = 64; const VERIFY_BATCH: usize = 4;