Skip to content

Commit

Permalink
chore(ethexe): Add bootnodes, update chain-spec (#4069)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs authored Jul 23, 2024
1 parent 6800e9b commit 10de1f1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
7 changes: 5 additions & 2 deletions ethexe/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ pub struct ChainSpec {

pub fn testnet_config() -> ChainSpec {
ChainSpec {
ethereum_router_address: "0x05069E9045Ca0D2B72840c6A21C7bE588E02089A".to_string(),
bootnodes: vec![],
ethereum_router_address: "0xf90d2956B6F36194fbac181Fb95b2f67274821da".to_string(),
bootnodes: vec![
"/ip4/54.183.94.171/udp/20333/quic-v1/p2p/12D3KooWQ5kJQs2WK5kzmBMShCNidpySDuLjt7aqZoVimdyCPRDz".parse().unwrap(),
"/ip4/54.183.94.171/udp/20334/quic-v1/p2p/12D3KooWAivseD2rweVeS2fyNuVFP1hWZ2gXRtMzrNK1ci4mmoMj".parse().unwrap()
],
}
}

Expand Down
2 changes: 1 addition & 1 deletion ethexe/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl TryFrom<Args> for Config {
};

let chain_spec = match args.chain_spec.as_deref() {
Some("dev") => crate::chain_spec::testnet_config(),
Some("testnet") => crate::chain_spec::testnet_config(),
Some(path) => crate::chain_spec::from_file(path)?,
_ => crate::chain_spec::testnet_config(),
};
Expand Down
15 changes: 9 additions & 6 deletions ethexe/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ services:
ports:
- "20333:20333/udp"
- "9635:9635"
image: gear-tech/gear-egpu:latest
image: gear-tech/gear:latest
environment:
VALIDATOR_KEY: ${VALIDATOR_KEY}
VALIDATOR_PUB_KEY: ${VALIDATOR_PUB_KEY}
RUST_LOG: ethexe=debug
volumes:
- "gear-data-validator:/data"
command: bash -c "ethgpu
command: bash -c "ethexe
-d /data
insert-key ${VALIDATOR_KEY} &&
ethgpu
ethexe
-d /data
--ethereum-rpc ws://54.67.75.1:8546
--ethereum-beacon-rpc https://eth-holesky-beacon.public.blastapi.io
--validator-key ${VALIDATOR_PUB_KEY}"
--validator-key ${VALIDATOR_PUB_KEY}
--prometheus-external"
networks:
testing_net:
ipv4_address: 172.28.1.1
Expand All @@ -40,15 +41,17 @@ services:
RUST_LOG: ethexe=debug
links:
- "node_validator:validator"
command: bash -c "ethgpu -d /data insert-key ${SEQUENCER_KEY}
command: bash -c "ethexe -d /data insert-key ${SEQUENCER_KEY}
&& sleep 1
&& ethgpu
&& ethexe
-d /data
--port 20334
--bootnodes '/ip4/172.28.1.1/udp/20333/quic-v1'
--ethereum-rpc ws://54.67.75.1:8546
--ethereum-beacon-rpc https://eth-holesky-beacon.public.blastapi.io
--sequencer-key ${SEQUENCER_PUB_KEY}"
--prometheus-port 9636
--prometheus-external"
networks:
testing_net:
ipv4_address: 172.28.1.2
Expand Down
8 changes: 4 additions & 4 deletions ethexe/docker/ethexe_builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ FROM --platform=linux/amd64 ubuntu:22.04
MAINTAINER GEAR
LABEL description="This is the 2nd stage: a very small image where we copy the ethexe binary."
ARG PROFILE=release
COPY --from=builder /ethexe/target/$PROFILE/ethgpu /usr/local/bin
COPY --from=builder /ethexe/target/$PROFILE/ethexe /usr/local/bin
RUN apt-get update && apt-get install -y openssl ca-certificates
RUN useradd -m -u 1000 -U -s /bin/sh -d /ethexe ethexe && \
mkdir -p /ethexe/.local/share && \
mkdir /data && \
chown -R ethexe:ethexe /data && \
ln -s /data /ethexe/.local/share/ethexe && \
# Sanity checks
ldd /usr/local/bin/ethgpu && \
/usr/local/bin/ethgpu --version
ldd /usr/local/bin/ethexe && \
/usr/local/bin/ethexe --version

USER root

EXPOSE 20333 9635
CMD ["/usr/local/bin/ethgpu"]
CMD ["/usr/local/bin/ethexe"]

0 comments on commit 10de1f1

Please sign in to comment.