mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Rename the coins folder to networks (#583)
* Rename the coins folder to networks Ethereum isn't a coin. It's a network. Resolves #357. * More renames of coins -> networks in orchestration * Correct paths in tests/ * cargo fmt
This commit is contained in:
36
orchestration/src/networks/ethereum/consensus/lighthouse.rs
Normal file
36
orchestration/src/networks/ethereum/consensus/lighthouse.rs
Normal file
@@ -0,0 +1,36 @@
|
||||
use crate::Network;
|
||||
|
||||
pub fn lighthouse(network: Network) -> (String, String, String) {
|
||||
assert_ne!(network, Network::Dev);
|
||||
|
||||
#[rustfmt::skip]
|
||||
const DOWNLOAD_LIGHTHOUSE: &str = r#"
|
||||
FROM alpine:latest as lighthouse
|
||||
|
||||
ENV LIGHTHOUSE_VERSION=5.1.3
|
||||
|
||||
RUN apk --no-cache add git gnupg
|
||||
|
||||
# Download lighthouse
|
||||
RUN wget https://github.com/sigp/lighthouse/releases/download/v${LIGHTHOUSE_VERSION}/lighthouse-v${LIGHTHOUSE_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz
|
||||
RUN wget https://github.com/sigp/lighthouse/releases/download/v${LIGHTHOUSE_VERSION}/lighthouse-v${LIGHTHOUSE_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz.asc
|
||||
|
||||
# Verify the signature
|
||||
gpg --keyserver keyserver.ubuntu.com --recv-keys 15E66D941F697E28F49381F426416DC3F30674B0
|
||||
gpg --verify lighthouse-v${LIGHTHOUSE_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz.asc lighthouse-v${LIGHTHOUSE_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz
|
||||
|
||||
# Extract lighthouse
|
||||
RUN tar xvf lighthouse-v${LIGHTHOUSE_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz
|
||||
"#;
|
||||
|
||||
let run_lighthouse = format!(
|
||||
r#"
|
||||
COPY --from=lighthouse --chown=ethereum lighthouse /bin
|
||||
|
||||
ADD /orchestration/{}/networks/ethereum/consensus/lighthouse/run.sh /consensus_layer.sh
|
||||
"#,
|
||||
network.label()
|
||||
);
|
||||
|
||||
(DOWNLOAD_LIGHTHOUSE.to_string(), String::new(), run_lighthouse)
|
||||
}
|
||||
Reference in New Issue
Block a user