Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interop proxy with multi ups IT #1578

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/mg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ on:
- main

jobs:
interop-proxy-with-multi-ups:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run interop-proxy-with-multi-ups
run: sh ./test/message-generator/test/interop-proxy-with-multi-ups/interop-proxy-with-multi-ups.sh

interop-proxy-with-multi-ups-extended:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -72,7 +64,6 @@ jobs:
runs-on: ubuntu-latest
if: always()
needs: [
interop-proxy-with-multi-ups,
interop-proxy-with-multi-ups-extended,
jds-do-not-fail-on-wrong-tsdatasucc,
jds-receive-solution-while-processing-declared-job,
Expand All @@ -83,8 +74,7 @@ jobs:
steps:
- name: Aggregate Results
run: |
if [ "${{ needs.interop-proxy-with-multi-ups.result }}" != "success" ] ||
[ "${{ needs.interop-proxy-with-multi-ups-extended.result }}" != "success" ] ||
if [ "${{ needs.interop-proxy-with-multi-ups-extended.result }}" != "success" ] ||
[ "${{ needs.jds-do-not-fail-on-wrong-tsdatasucc.result }}" != "success" ] ||
[ "${{ needs.jds-receive-solution-while-processing-declared-job.result }}" != "success" ] ||
[ "${{ needs.pool-sri-test-close-channel.result }}" != "success" ] ||
Expand Down
23 changes: 13 additions & 10 deletions test/integration-tests/lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,20 @@ pub async fn start_mining_device_sv2(
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
}

pub async fn start_mining_sv2_proxy(upstream: SocketAddr) -> SocketAddr {
pub async fn start_mining_sv2_proxy(upstreams: &[SocketAddr]) -> SocketAddr {
use mining_proxy_sv2::{ChannelKind, UpstreamMiningValues};
let upstreams = vec![UpstreamMiningValues {
address: upstream.ip().to_string(),
port: upstream.port(),
pub_key: Secp256k1PublicKey::from_str(
"9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72",
)
.unwrap(),
channel_kind: ChannelKind::Extended,
}];
let upstreams = upstreams
.iter()
.map(|upstream| UpstreamMiningValues {
address: upstream.ip().to_string(),
port: upstream.port(),
pub_key: Secp256k1PublicKey::from_str(
"9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72",
)
.unwrap(),
channel_kind: ChannelKind::Extended,
})
.collect();
let mining_proxy_listening_address = get_available_address();
let config = mining_proxy_sv2::Configuration {
upstreams,
Expand Down
15 changes: 15 additions & 0 deletions test/integration-tests/tests/interop_proxy_with_multi_ups.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use integration_tests_sv2::*;

#[tokio::test]
async fn test_interop_proxy_with_multi_ups() {
start_tracing();
let (_, tp_addr) = start_template_provider(None);
let (_pool_1, pool_addr_1) = start_pool(Some(tp_addr)).await;
let (_pool_2, pool_addr_2) = start_pool(Some(tp_addr)).await;
let mining_proxy_sv2_addr = start_mining_sv2_proxy(&[pool_addr_1, pool_addr_2]).await;
let _ = start_mining_device_sv1(mining_proxy_sv2_addr, false, None).await;
let _ = start_mining_device_sv1(mining_proxy_sv2_addr, false, None).await;

// Need a way to kill pool. And then test if mining_proxy_sv2_addr still binds or not.
// Need a way to kill MD. And then test if mining_proxy_sv2_addr still binds or not.
}

This file was deleted.

This file was deleted.

Loading