Skip to content

Commit

Permalink
docker works
Browse files Browse the repository at this point in the history
  • Loading branch information
dndll committed Mar 25, 2024
1 parent 08736e8 commit 20395f2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Dockerfile.operator
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion bin/operator/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ impl Handler<Persist> for Engine {
#[cfg(test)]
mod tests {

use near_light_client_primitives::config::BaseConfig;
use near_light_client_rpc::TransactionOrReceiptId;
use test_utils::fixture;

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions bin/operator/src/succinct/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion bin/operator/tests/succinct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion nearx/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20395f2

Please sign in to comment.