Skip to content

Commit 6829903

Browse files
committed
env updated
1 parent eabbbcd commit 6829903

File tree

10 files changed

+77
-43
lines changed

10 files changed

+77
-43
lines changed

eigen_offchain/Dockerfile

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1+
# Use Alpine for a musl libc environment (for static linking)
2+
FROM rust:alpine as builder
13

2-
# Use the official Rust image as base
3-
FROM rust:1.81-slim-bullseye
4+
WORKDIR /app
45

5-
# Create a working directory
6-
WORKDIR /usr/src/app
6+
# Install build dependencies
7+
RUN apk add --no-cache musl-dev openssl-dev pkgconfig git build-base
78

8-
# Install required system dependencies
9-
RUN apt-get update && \
10-
apt-get install -y pkg-config libssl-dev && \
11-
rm -rf /var/lib/apt/lists/*
9+
# Copy the entire project
10+
COPY . .
1211

13-
# Copy the Cargo.toml and Cargo.lock files
14-
COPY Cargo.toml ./
12+
# Build with musl for static linking
13+
RUN rustup target add x86_64-unknown-linux-musl
14+
RUN cargo build --release --target x86_64-unknown-linux-musl
1515

16-
# Copy the source code
17-
COPY src/ ./src/
16+
# Use a minimal Alpine image for runtime
17+
FROM alpine:latest
1818

19-
# Build the application
20-
RUN cargo build --release
19+
WORKDIR /app
2120

22-
# Command to run the application
23-
CMD ["cargo", "run", "--release"]
21+
# Install minimal runtime dependencies
22+
RUN apk add --no-cache ca-certificates
23+
24+
# Create logs directory
25+
RUN mkdir -p /app/logs
26+
27+
# Copy the statically linked binary from the builder stage
28+
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/eigen_offchain /app/eigen_offchain
29+
30+
# Run the application with the FetchEvents command
31+
CMD ["/app/eigen_offchain", "fetch-events"]

eigen_offchain/docker-compose.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
version: '3.8'
1+
# Docker Compose configuration
2+
23
services:
3-
eigen-offchain:
4-
build: .
4+
eigenlayer-restaking:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
container_name: eigenlayer-restaking-service
9+
restart: unless-stopped
510
environment:
6-
- HOLESKY_RPC_URL=${HOLESKY_RPC_URL:-https://ethereum-holesky-rpc.publicnode.com}
7-
- CONTRACT_ADDRESS=${CONTRACT_ADDRESS}
8-
- PRIVATE_KEY=${PRIVATE_KEY}
11+
- PRIVATE_KEY=1e91d879daec318b8a5f97fb9b08f9753740196a65c8f9e62fd9e45961eaba8a
12+
- ETHEREUM_RPC_URL=https://ethereum-holesky-rpc.publicnode.com/
13+
- CONTRACT_ADDRESS=0x054b0D625d936ee0B172c73926A1D517Da7d2197
14+
- RUST_LOG=info
15+
volumes:
16+
- ./logs:/app/logs

eigen_offchain/src/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PRIVATE_KEY=1e91d879daec318b8a5f97fb9b08f9753740196a65c8f9e62fd9e45961eaba8a
2+
ETHEREUM_RPC_URL=https://ethereum-holesky-rpc.publicnode.com/
3+
CONTRACT_ADDRESS=0x054b0D625d936ee0B172c73926A1D517Da7d2197
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
PORT=3005
2+
HOST=0.0.0.0
3+
HEARTBEAT=5000
4+
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
5+
CORS_ORIGIN=*
6+
COMMON_RATE_LIMIT_WINDOW_MS=1000
7+
COMMON_RATE_LIMIT_MAX_REQUESTS=10000
8+
PRIVATE_KEY=6d35c1bdf469031cfe3cbaddd57ca69a36835a39c2a6f2cefc17c804851b0635
9+
RUST_LOG=info
10+
SQUARE_NUMBER_DSS_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE
11+
TXN_VERIFIER_ADDRESS=0xCbb651f2F7FEd1264224D20F75BEF371549E71C9
12+
CORE_ADDRESS=0x9bd03768a7DCc129555dE410FF8E85528A4F88b5

karak_offchain/aggregator/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct Config {
2323
pub square_number_dss_address: Address,
2424
pub txn_verifier_address:Address,
2525
pub core_address: Address,
26-
pub block_number_store: String,
26+
// pub block_number_store: String,
2727
pub heartbeat: u64,
2828
}
2929

karak_offchain/aggregator/src/task.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub struct TaskService {
7979
operator_state: Arc<OperatorState>,
8080
square_number_address: Address,
8181
dss_address: Address,
82-
block_number_store: String,
82+
// block_number_store: String,
8383
block_number: u64,
8484
rpc_url: Url,
8585
private_key: alloy::signers::local::PrivateKeySigner,
@@ -93,7 +93,7 @@ impl TaskService {
9393
let contract_manager = ContractManager::new(&config)?;
9494
let square_number_address = config.txn_verifier_address;
9595
let dss_address = config.txn_verifier_address;
96-
let block_number_store = config.block_number_store.clone();
96+
// let block_number_store = config.block_number_store.clone();
9797
info!("operator_state {:?}",operator_state.operators);
9898

9999
// let block_number: u64 = config.load_block_number()?;
@@ -109,7 +109,7 @@ impl TaskService {
109109
square_number_address,
110110
txn_verifier_address,
111111
dss_address,
112-
block_number_store,
112+
// block_number_store,
113113
block_number,
114114
rpc_url,
115115
private_key,

karak_offchain/docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ services:
1717
- COMMON_RATE_LIMIT_WINDOW_MS=1000
1818
- COMMON_RATE_LIMIT_MAX_REQUESTS=10000
1919
- PRIVATE_KEY=6d35c1bdf469031cfe3cbaddd57ca69a36835a39c2a6f2cefc17c804851b0635
20-
- BLOCK_NUMBER_STORE=/app/block-number-store.json
2120
- RUST_LOG=info
2221
- SQUARE_NUMBER_DSS_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE
2322
- TXN_VERIFIER_ADDRESS=0xCbb651f2F7FEd1264224D20F75BEF371549E71C9
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PORT=3006
2+
HOST=0.0.0.0
3+
DOMAIN_URL=http://0.0.0.0:3006
4+
AGGREGATOR_URL=https://karak-aggregator-offchain-latest.onrender.com:3005
5+
HEARTBEAT=5000
6+
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
7+
CORS_ORIGIN=*
8+
COMMON_RATE_LIMIT_WINDOW_MS=1000
9+
COMMON_RATE_LIMIT_MAX_REQUESTS=10000
10+
PRIVATE_KEY=6d35c1bdf469031cfe3cbaddd57ca69a36835a39c2a6f2cefc17c804851b0635
11+
RUST_LOG=info
12+
SQUARE_NUMBER_DSS_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE
13+
TXN_VERIFIER_ADDRESS=0xCbb651f2F7FEd1264224D20F75BEF371549E71C9
14+
CORE_ADDRESS=0x9bd03768a7DCc129555dE410FF8E85528A4F88b5
15+
RUST_BACKTRACE=full
16+
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1 @@
1-
# Docker Compose configuration
2-
3-
services:
4-
symbiotic-restaking:
5-
build:
6-
context: .
7-
dockerfile: Dockerfile
8-
container_name: symbiotic-restaking-service
9-
restart: unless-stopped
10-
environment:
11-
- PRIVATE_KEY=1e91d879daec318b8a5f97fb9b08f9753740196a65c8f9e62fd9e45961eaba8a
12-
- ETHEREUM_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
13-
- CONTRACT_ADDRESS=0x656e79454a277198566412d9bff26f97297633cc
14-
- RUST_LOG=info
15-
volumes:
16-
- ./logs:/app/logs
1+
https://github.com/interstate-labs/avs/tree/main/symbiotic_offchainhttps://github.com/interstate-labs/avs/tree/main/symbiotic_offchainhttps://github.com/interstate-labs/avs/tree/main/symbiotic_offchainhttps://github.com/interstate-labs/avs/tree/main/symbiotic_offchain
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PRIVATE_KEY=1e91d879daec318b8a5f97fb9b08f9753740196a65c8f9e62fd9e45961eaba8a
2+
ETHEREUM_RPC_URL=https://ethereum-holesky-rpc.publicnode.com/
3+
CONTRACT_ADDRESS=0x656e79454a277198566412d9bff26f97297633cc

0 commit comments

Comments
 (0)