Ethereum processor docker tests, barring send

We need the TX publication relay thingy for send to work (though that is the
point the test fails at).
This commit is contained in:
Luke Parker
2024-05-21 00:29:33 -04:00
parent ae8a27b876
commit 11ec9e3535
20 changed files with 305 additions and 91 deletions

View File

@@ -17,6 +17,7 @@ pub fn coordinator(
let longer_reattempts = if network == Network::Dev { "longer-reattempts" } else { "" };
let setup = mimalloc(Os::Debian).to_string() +
&build_serai_service(
"",
network.release(),
&format!("{db} {longer_reattempts}"),
"serai-coordinator",

View File

@@ -137,7 +137,7 @@ WORKDIR /home/{user}
}
}
fn build_serai_service(release: bool, features: &str, package: &str) -> String {
fn build_serai_service(prelude: &str, release: bool, features: &str, package: &str) -> String {
let profile = if release { "release" } else { "debug" };
let profile_flag = if release { "--release" } else { "" };
@@ -159,6 +159,8 @@ RUN apt install -y make protobuf-compiler
# Add the wasm toolchain
RUN rustup target add wasm32-unknown-unknown
{prelude}
# Add files for build
ADD patches /serai/patches
ADD common /serai/common

View File

@@ -13,7 +13,7 @@ pub fn message_queue(
monero_key: <Ristretto as Ciphersuite>::G,
) {
let setup = mimalloc(Os::Debian).to_string() +
&build_serai_service(network.release(), network.db(), "serai-message-queue");
&build_serai_service("", network.release(), network.db(), "serai-message-queue");
let env_vars = [
("COORDINATOR_KEY", hex::encode(coordinator_key.to_bytes())),

View File

@@ -17,6 +17,15 @@ pub fn processor(
) {
let setup = mimalloc(Os::Debian).to_string() +
&build_serai_service(
if coin == "ethereum" {
r#"
RUN cargo install svm-rs
RUN svm install 0.8.25
RUN svm use 0.8.25
"#
} else {
""
},
network.release(),
&format!("binaries {} {coin}", network.db()),
"serai-processor",
@@ -34,7 +43,7 @@ RUN apt install -y ca-certificates
let hostname = format!("serai-{}-{coin}", network.label());
let port = match coin {
"bitcoin" => 8332,
"ethereum" => return, // TODO
"ethereum" => 8545,
"monero" => 18081,
_ => panic!("unrecognized external network"),
};

View File

@@ -11,9 +11,9 @@ pub fn serai(
serai_key: &Zeroizing<<Ristretto as Ciphersuite>::F>,
) {
// Always builds in release for performance reasons
let setup = mimalloc(Os::Debian).to_string() + &build_serai_service(true, "", "serai-node");
let setup = mimalloc(Os::Debian).to_string() + &build_serai_service("", true, "", "serai-node");
let setup_fast_epoch =
mimalloc(Os::Debian).to_string() + &build_serai_service(true, "fast-epoch", "serai-node");
mimalloc(Os::Debian).to_string() + &build_serai_service("", true, "fast-epoch", "serai-node");
let env_vars = [("KEY", hex::encode(serai_key.to_repr()))];
let mut env_vars_str = String::new();