Skip to content

Commit

Permalink
Fix eth and solana deployment in tilt devnet
Browse files Browse the repository at this point in the history
Change-Id: Iee032e92373c56d876e6fc1626b0f1af54046834
  • Loading branch information
hendrikhofstadt committed Jun 22, 2021
1 parent c1d0f16 commit 22373b9
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5

RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
RUN rustup default nightly
RUN rustup component add rustfmt

WORKDIR /usr/src/solana
Expand All @@ -11,5 +12,5 @@ ADD proto /usr/src/proto

RUN --mount=type=cache,target=/usr/local/cargo,from=rust,source=/usr/local/cargo \
--mount=type=cache,target=target \
cargo build --package=agent --package=cli --release && \
cp target/release/agent target/release/cli /usr/local/bin
cargo build --manifest-path ./bridge/Cargo.toml --package client --release && \
cp bridge/target/release/client /usr/local/bin
1 change: 1 addition & 0 deletions devnet/eth-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spec:
- --deterministic
- --time="1970-01-01T00:00:00+00:00"
- --host=0.0.0.0
- --port=7545
ports:
- containerPort: 8545
name: rpc
Expand Down
2 changes: 1 addition & 1 deletion devnet/solana-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- /root/.local/share/solana/install/active_release/bin/solana-test-validator
- --bpf-program
- Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o
- /opt/solana/deps/spl_bridge.so
- /opt/solana/deps/bridge.so
- --log
ports:
- containerPort: 8001
Expand Down
12 changes: 5 additions & 7 deletions solana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@ RUN rustup component add rustfmt

WORKDIR /usr/src/bridge

RUN sh -c "$(curl -sSfL https://release.solana.com/v1.5.5/install)"
RUN sh -c "$(curl -sSfL https://release.solana.com/edge/install)"

ENV PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
ENV RUST_LOG="solana_runtime::system_instruction_processor=trace,solana_runtime::message_processor=trace,solana_bpf_loader=debug,solana_rbpf=debug"

COPY bridge bridge
COPY bridge/agent agent
COPY bridge/cli cli
COPY Cargo.toml .
COPY Cargo.lock .
COPY modules modules
COPY solitaire solitaire

RUN --mount=type=cache,target=/usr/local,from=rust,source=/usr/local \
--mount=type=cache,target=/root/.cache \
--mount=type=cache,target=bridge/target \
--mount=type=cache,target=target \
--mount=type=cache,target=bin,from=rust,source=bin \
cargo build-bpf --manifest-path "bridge/Cargo.toml" && \
cargo build-bpf --manifest-path "bridge/program/Cargo.toml" && \
mkdir -p /opt/solana/deps && \
cp target/deploy/spl_bridge.so /opt/solana/deps/spl_bridge.so
cp bridge/target/deploy/bridge.so /opt/solana/deps/bridge.so
34 changes: 17 additions & 17 deletions solana/bridge/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 solana/bridge/client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "anchor-bridge-client"
name = "client"
version = "0.1.0"
authors = ["Stan Drozd <stan@nexantic.com>"]
edition = "2018"

[dependencies]
anyhow = "1.0.40"
borsh = "0.8.1"
bridge = {path = "../program", features = ["no-idl", "no-entrypoint"]}
bridge = {path = "../program", features = ["no-idl", "no-entrypoint", "client"]}
clap = "3.0.0-beta.2"
rand = "0.7.3"
shellexpand = "2.1.0"
Expand Down

0 comments on commit 22373b9

Please sign in to comment.