Skip to content

Commit

Permalink
simulators/portal/history/rpc-compat: add portal network history rpc-…
Browse files Browse the repository at this point in the history
…compat simulator (ethereum#978)
  • Loading branch information
KolbyML authored and Eikix committed Mar 1, 2024
1 parent 45fb071 commit b68424d
Show file tree
Hide file tree
Showing 5 changed files with 672 additions and 0 deletions.
Empty file modified .circleci/rust-simulators.sh
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ workspace
.idea/
# build output
/hive

# build output for rust simulators files
simulators/**/Cargo.lock
simulators/**/target
14 changes: 14 additions & 0 deletions simulators/portal/history/rpc-compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "rpc-compat"
version = "0.1.0"
authors = ["Ognyan Genev <[email protected]>", "Kolby ML (Moroz Liebl) <[email protected]>"]
edition = "2021"

[dependencies]
ethportal-api = { git = "https://github.com/ethereum/trin", rev = "2a32224e3c2b0b80bc37c1b692c33016371f197a" }
hivesim = { git = "https://github.com/ethereum/portal-hive", rev = "8ff1e3d3c941dd00d56dacd777a5dfb71edf402f" }
futures = "0.3.25"
serde_json = "1.0.87"
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
tokio = { version = "1", features = ["full"] }
24 changes: 24 additions & 0 deletions simulators/portal/history/rpc-compat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM rust:1.71.1 AS builder

# create a new empty shell project
RUN USER=root cargo new --bin rpc-compat
WORKDIR /rpc-compat

# copy over manifests and source to build image
COPY Cargo.toml ./Cargo.toml
COPY src ./src

# build for release
RUN cargo build --release

# final base
FROM ubuntu:22.04

RUN apt update && apt install wget -y

# copy build artifacts from build stage
COPY --from=builder /rpc-compat/target/release/rpc-compat .

ENV RUST_LOG=debug

ENTRYPOINT ["./rpc-compat"]
Loading

0 comments on commit b68424d

Please sign in to comment.