stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
224 stars 129 forks source link

Add JDC/S initializers in integration tests #1226

Closed jbesraa closed 6 days ago

jbesraa commented 1 month ago

resolves #1223

github-actions[bot] commented 1 month ago

🐰 Bencher Report

Branch1226/merge
Testbedsv1

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client-submit-serialize📈 view plot
⚠️ NO THRESHOLD
6,613.90
client-submit-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
7,497.90
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
8,129.50
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
980.32
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
755.27
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
⚠️ NO THRESHOLD
248.42
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
⚠️ NO THRESHOLD
157.00
client-sv1-get-submit📈 view plot
⚠️ NO THRESHOLD
6,405.30
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
⚠️ NO THRESHOLD
275.49
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
824.72
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
715.34
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
⚠️ NO THRESHOLD
211.26
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 month ago

🐰 Bencher Report

Branch1226/merge
Testbedsv1

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
get_authorize📈 view plot
⚠️ NO THRESHOLD
8,515.00📈 view plot
⚠️ NO THRESHOLD
3,772.00📈 view plot
⚠️ NO THRESHOLD
5,295.00📈 view plot
⚠️ NO THRESHOLD
7.00📈 view plot
⚠️ NO THRESHOLD
91.00
get_submit📈 view plot
⚠️ NO THRESHOLD
95,430.00📈 view plot
⚠️ NO THRESHOLD
59,522.00📈 view plot
⚠️ NO THRESHOLD
85,510.00📈 view plot
⚠️ NO THRESHOLD
45.00📈 view plot
⚠️ NO THRESHOLD
277.00
get_subscribe📈 view plot
⚠️ NO THRESHOLD
8,034.00📈 view plot
⚠️ NO THRESHOLD
2,848.00📈 view plot
⚠️ NO THRESHOLD
3,984.00📈 view plot
⚠️ NO THRESHOLD
12.00📈 view plot
⚠️ NO THRESHOLD
114.00
serialize_authorize📈 view plot
⚠️ NO THRESHOLD
12,298.00📈 view plot
⚠️ NO THRESHOLD
5,343.00📈 view plot
⚠️ NO THRESHOLD
7,458.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
137.00
serialize_deserialize_authorize📈 view plot
⚠️ NO THRESHOLD
24,897.00📈 view plot
⚠️ NO THRESHOLD
9,920.00📈 view plot
⚠️ NO THRESHOLD
14,017.00📈 view plot
⚠️ NO THRESHOLD
34.00📈 view plot
⚠️ NO THRESHOLD
306.00
serialize_deserialize_handle_authorize📈 view plot
⚠️ NO THRESHOLD
30,435.00📈 view plot
⚠️ NO THRESHOLD
12,097.00📈 view plot
⚠️ NO THRESHOLD
17,140.00📈 view plot
⚠️ NO THRESHOLD
55.00📈 view plot
⚠️ NO THRESHOLD
372.00
serialize_deserialize_handle_submit📈 view plot
⚠️ NO THRESHOLD
126,589.00📈 view plot
⚠️ NO THRESHOLD
73,363.00📈 view plot
⚠️ NO THRESHOLD
105,189.00📈 view plot
⚠️ NO THRESHOLD
115.00📈 view plot
⚠️ NO THRESHOLD
595.00
serialize_deserialize_handle_subscribe📈 view plot
⚠️ NO THRESHOLD
28,017.00📈 view plot
⚠️ NO THRESHOLD
9,666.00📈 view plot
⚠️ NO THRESHOLD
13,677.00📈 view plot
⚠️ NO THRESHOLD
61.00📈 view plot
⚠️ NO THRESHOLD
401.00
serialize_deserialize_submit📈 view plot
⚠️ NO THRESHOLD
115,479.00📈 view plot
⚠️ NO THRESHOLD
68,223.00📈 view plot
⚠️ NO THRESHOLD
97,934.00📈 view plot
⚠️ NO THRESHOLD
65.00📈 view plot
⚠️ NO THRESHOLD
492.00
serialize_deserialize_subscribe📈 view plot
⚠️ NO THRESHOLD
23,439.00📈 view plot
⚠️ NO THRESHOLD
8,225.00📈 view plot
⚠️ NO THRESHOLD
11,589.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
333.00
serialize_submit📈 view plot
⚠️ NO THRESHOLD
99,827.00📈 view plot
⚠️ NO THRESHOLD
61,566.00📈 view plot
⚠️ NO THRESHOLD
88,352.00📈 view plot
⚠️ NO THRESHOLD
48.00📈 view plot
⚠️ NO THRESHOLD
321.00
serialize_subscribe📈 view plot
⚠️ NO THRESHOLD
11,375.00📈 view plot
⚠️ NO THRESHOLD
4,195.00📈 view plot
⚠️ NO THRESHOLD
5,840.00📈 view plot
⚠️ NO THRESHOLD
15.00📈 view plot
⚠️ NO THRESHOLD
156.00
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 month ago

🐰 Bencher Report

Branch1226/merge
Testbedsv2

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
2,087.00📈 view plot
⚠️ NO THRESHOLD
473.00📈 view plot
⚠️ NO THRESHOLD
737.00📈 view plot
⚠️ NO THRESHOLD
4.00📈 view plot
⚠️ NO THRESHOLD
38.00
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
8,204.00📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
3,159.00📈 view plot
⚠️ NO THRESHOLD
36.00📈 view plot
⚠️ NO THRESHOLD
139.00
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
6,289.00📈 view plot
⚠️ NO THRESHOLD
1,750.00📈 view plot
⚠️ NO THRESHOLD
2,549.00📈 view plot
⚠️ NO THRESHOLD
20.00📈 view plot
⚠️ NO THRESHOLD
104.00
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
14,640.00📈 view plot
⚠️ NO THRESHOLD
4,694.00📈 view plot
⚠️ NO THRESHOLD
6,760.00📈 view plot
⚠️ NO THRESHOLD
43.00📈 view plot
⚠️ NO THRESHOLD
219.00
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
27,472.00📈 view plot
⚠️ NO THRESHOLD
10,585.00📈 view plot
⚠️ NO THRESHOLD
15,402.00📈 view plot
⚠️ NO THRESHOLD
83.00📈 view plot
⚠️ NO THRESHOLD
333.00
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
4,387.00📈 view plot
⚠️ NO THRESHOLD
1,461.00📈 view plot
⚠️ NO THRESHOLD
2,157.00📈 view plot
⚠️ NO THRESHOLD
12.00📈 view plot
⚠️ NO THRESHOLD
62.00
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
13,936.00📈 view plot
⚠️ NO THRESHOLD
5,064.00📈 view plot
⚠️ NO THRESHOLD
7,331.00📈 view plot
⚠️ NO THRESHOLD
33.00📈 view plot
⚠️ NO THRESHOLD
184.00
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
22,707.00📈 view plot
⚠️ NO THRESHOLD
8,027.00📈 view plot
⚠️ NO THRESHOLD
11,672.00📈 view plot
⚠️ NO THRESHOLD
79.00📈 view plot
⚠️ NO THRESHOLD
304.00
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
4,677.00📈 view plot
⚠️ NO THRESHOLD
1,502.00📈 view plot
⚠️ NO THRESHOLD
2,277.00📈 view plot
⚠️ NO THRESHOLD
11.00📈 view plot
⚠️ NO THRESHOLD
67.00
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
16,106.00📈 view plot
⚠️ NO THRESHOLD
5,963.00📈 view plot
⚠️ NO THRESHOLD
8,666.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
207.00
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
35,504.00📈 view plot
⚠️ NO THRESHOLD
14,855.00📈 view plot
⚠️ NO THRESHOLD
21,819.00📈 view plot
⚠️ NO THRESHOLD
98.00📈 view plot
⚠️ NO THRESHOLD
377.00
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 month ago

🐰 Bencher Report

Branch1226/merge
Testbedsv2

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
44.93
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
73.41
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
14.65
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
263.69
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,012.20
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
147.40
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
295.29
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
485.48
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
164.91
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
474.25
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,092.60
🐰 View full continuous benchmarking report in Bencher
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 19.30%. Comparing base (8c98647) to head (ee69573). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1226 +/- ## ======================================= Coverage 19.30% 19.30% ======================================= Files 164 164 Lines 10849 10849 ======================================= Hits 2094 2094 Misses 8755 8755 ``` | [Flag](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | Coverage Δ | | |---|---|---| | [binary_codec_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [binary_serde_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `3.65% <ø> (ø)` | | | [binary_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `5.46% <ø> (ø)` | | | [bip32_derivation-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [buffer_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `25.02% <ø> (ø)` | | | [codec_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.01% <ø> (ø)` | | | [common_messages_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.13% <ø> (ø)` | | | [const_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [error_handling-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [framing_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.29% <ø> (ø)` | | | [jd_client-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [jd_server-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `7.79% <ø> (ø)` | | | [job_declaration_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [key-utils-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `2.39% <ø> (ø)` | | | [mining-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `2.49% <ø> (-0.02%)` | :arrow_down: | | [mining_device-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [mining_proxy_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.70% <ø> (ø)` | | | [noise_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `4.35% <ø> (ø)` | | | [pool_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `1.38% <ø> (ø)` | | | [protocols](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `24.72% <ø> (ø)` | | | [roles](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `6.55% <ø> (ø)` | | | [roles_logic_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `8.06% <ø> (ø)` | | | [sv1-mining-device-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [sv2_ffi-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [template_distribution_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `0.00% <ø> (ø)` | | | [translator_sv2-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `9.60% <ø> (ø)` | | | [utils](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `25.13% <ø> (ø)` | | | [v1-coverage](https://app.codecov.io/gh/stratum-mining/stratum/pull/1226/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining) | `2.47% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stratum-mining#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

plebhash commented 1 month ago

I pulled this branch and tried to do some quick experimentation, where my goal was to put a sniffer between JDC and JDS to look into the messages they are exchanging.

Here's my test:

#[tokio::test]
async fn sniff_jdc_jds() {
    let sniffer_addr = common::get_available_address();
    let tp_addr = common::get_available_address();
    let _jdc_addr = common::get_available_address();
    let jds_addr = common::get_available_address();
    let pool_addr = common::get_available_address();
    let _tp = common::start_template_provider(tp_addr.port()).await;
    let _pool = common::start_pool(Some(pool_addr), Some(tp_addr)).await;
    let _jds = common::start_jds(tp_addr).await;
    let sniffer = common::start_sniffer(sniffer_addr, jds_addr).await;
    let _jdc = common::start_jdc(pool_addr, tp_addr, sniffer_addr).await;

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);
}

but when I tried to run it, I got a nasty panic... did I make some mistake on the test above, or is there something wrong with the APIs?

The log line that really stand out is:

Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }

which is coming from common::start_jdc.

anyways, here's the full panic logs:

$ RUST_BACKTRACE=1 cargo t sniff_jdc_jds -- --nocapture
   Compiling integration-test v0.1.0 (/Users/plebhash/develop/stratum/roles/tests-integration)
    Finished test [optimized + debuginfo] target(s) in 0.84s
     Running unittests tests/common/mod.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/integration_test-18118a7d259fdca5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/pool_integration.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21)

running 1 test
thread 'sniff_jdc_jds' panicked at tests-integration/tests/common/sniffer.rs:79:18:
Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
   3: core::result::Result<T,E>::expect
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1034:23
   4: pool_integration::common::sniffer::Sniffer::start::{{closure}}
             at ./tests/common/sniffer.rs:77:13
   5: pool_integration::common::start_sniffer::{{closure}}::{{closure}}
             at ./tests/common/mod.rs:200:31
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
   7: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
   8: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
   9: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  10: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  11: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  12: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  13: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  14: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  15: tokio::runtime::task::harness::poll_future
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  16: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  17: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  18: tokio::runtime::task::LocalNotified<S>::run
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  19: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  20: tokio::runtime::coop::with_budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  21: tokio::runtime::coop::budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  22: tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  23: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  24: tokio::runtime::scheduler::current_thread::Context::run_task
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  26: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  27: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  28: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  29: std::thread::local::LocalKey<T>::try_with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  30: std::thread::local::LocalKey<T>::with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  31: tokio::runtime::context::set_scheduler
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  32: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  33: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  34: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  35: tokio::runtime::context::runtime::enter_runtime
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  36: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  37: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  38: tokio::runtime::runtime::Runtime::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  39: pool_integration::sniff_jdc_jds
             at ./tests/pool_integration.rs:59:5
  40: pool_integration::sniff_jdc_jds::{{closure}}
             at ./tests/pool_integration.rs:43:25
  41: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  42: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'sniff_jdc_jds' panicked at library/std/src/panicking.rs:135:9:
cannot modify the panic hook from a panicking thread
stack backtrace:
   0:        0x1044a3420 - std::backtrace_rs::backtrace::libunwind::trace::h2966c6fbfac9d426
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:        0x1044a3420 - std::backtrace_rs::backtrace::trace_unsynchronized::h8a5f4aefe890b7c5
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x1044a3420 - std::sys_common::backtrace::_print_fmt::h7574dd98fd39c257
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:        0x1044a3420 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h298c9ab285ff3934
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:        0x1044c4a74 - core::fmt::rt::Argument::fmt::hf9661447f7b99899
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:        0x1044c4a74 - core::fmt::write::h4e276abdb6d0c2a1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:        0x10449f90c - std::io::Write::write_fmt::hd421848f5f0bf9d0
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:        0x1044a325c - std::sys_common::backtrace::_print::h09e653c6686dbd70
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:        0x1044a325c - std::sys_common::backtrace::print::hd8bd9ecab1f94b94
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:        0x1044a4d14 - std::panicking::default_hook::{{closure}}::h520eeb743fc98fb4
  10:        0x1044a4a5c - std::panicking::default_hook::ha6550ffe49b63df1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:        0x1044a513c - std::panicking::rust_panic_with_hook::hddb0e884a202de7c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:779:13
  12:        0x1044a5018 - std::panicking::begin_panic_handler::{{closure}}::hd2798398a2fd9077
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:649:13
  13:        0x1044a3888 - std::sys_common::backtrace::__rust_end_short_backtrace::h9201cc364dbb8a23
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  14:        0x1044a4dd8 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  15:        0x1044e5358 - core::panicking::panic_fmt::h4d5168028d4c43c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  16:        0x1044a4528 - std::panicking::set_hook::h7e0b88293aa60115
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:135:9
  17:        0x10406df28 - <pool_integration::common::sniffer::Sniffer as core::ops::drop::Drop>::drop::h4f9b32744e297af4
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:433:9
  18:        0x10406df28 - core::ptr::drop_in_place<pool_integration::common::sniffer::Sniffer>::h4c16a79764da6aa1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ptr/mod.rs:498:1
  19:        0x1040a12f0 - pool_integration::common::sniffer::Sniffer::start::{{closure}}::hb90fde3a39d2eb28
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:71:30
  20:        0x1040a12f0 - pool_integration::common::start_sniffer::{{closure}}::{{closure}}::hd413aa5f6f08a766
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/mod.rs:200:31
  21:        0x1040a12f0 - <core::pin::Pin<P> as core::future::future::Future>::poll::h3a6af33d99c0d7c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
  22:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::{{closure}}::h67416b5194bd8ea1
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
  23:        0x1040825d8 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::had125f885be69651
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
  24:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::h88e399dd156265df
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  25:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::{{closure}}::hff1035ada82c4042
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  26:        0x1040cf4e4 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h194e8a46ba6c134c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  27:        0x1040cf4e4 - std::panicking::try::do_call::hfa059d7bbe5f74da
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  28:        0x1040cf4e4 - std::panicking::try::h5e6f67912e5e74c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  29:        0x1040cf4e4 - std::panic::catch_unwind::h894555e4802d6241
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  30:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::h9c6fc42a8ad4dda3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  31:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll_inner::h5e8ccef60996f844
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  32:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll::hf1d96cc44106cc2d
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  33:        0x1040640d8 - tokio::runtime::task::LocalNotified<S>::run::h910c378ca7799873
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  34:        0x1040640d8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::h7fd3c9a9992df3c0
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  35:        0x1040640d8 - tokio::runtime::coop::with_budget::ha8eea9b55311be09
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  36:        0x1040640d8 - tokio::runtime::coop::budget::h686e5071d2ebf508
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  37:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}::ha17898b3395133c3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  38:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::enter::h244755fd5f4fea9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  39:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::h14b25fb646033519
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  40:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::h9de2cdad3aab94d7
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  41:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}::hb89c57f45d371a75
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  42:        0x1040da7e8 - tokio::runtime::context::scoped::Scoped<T>::set::hcfcdab6918b71f15
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  43:        0x1040bc7f8 - tokio::runtime::context::set_scheduler::{{closure}}::h3aa378b85f754d73
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  44:        0x1040bc7f8 - std::thread::local::LocalKey<T>::try_with::hb8e9a3e2d7975e28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  45:        0x1040bc7f8 - std::thread::local::LocalKey<T>::with::h5e3cce2c79ba2e1c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  46:        0x10406429c - tokio::runtime::context::set_scheduler::h1f5c32157d356ff3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  47:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::enter::hdd9d2a9a4be2cdce
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  48:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h59e72995de799888
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  49:        0x1040bcd54 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}::h5c86b1193a959b3c
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  50:        0x1040bcd54 - tokio::runtime::context::runtime::enter_runtime::h5dc7d9cfd8e2fb9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  51:        0x1040b8878 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::hd4c5ce3ad4989144
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  52:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on_inner::hcb273d97fa3c4752
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  53:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on::h760ebfa37e3fe329
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  54:        0x104072324 - pool_integration::sniff_jdc_jds::h690654147fdeb18f
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:59:5
  55:        0x104072324 - pool_integration::sniff_jdc_jds::{{closure}}::h5ce01b1ba43151ec
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:43:25
  56:        0x104072324 - core::ops::function::FnOnce::call_once::hcfcd9a51a9123644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  57:        0x10412c6bc - core::ops::function::FnOnce::call_once::he7c46f18244e22ba
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  58:        0x10412c6bc - test::__rust_begin_short_backtrace::hf05961ebc6f8d3a3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:628:18
  59:        0x10412b688 - test::run_test_in_process::{{closure}}::h3be023be3e470e24
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:60
  60:        0x10412b688 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h045822bb433f4fa3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  61:        0x10412b688 - std::panicking::try::do_call::he686b452df9e6b8a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  62:        0x10412b688 - std::panicking::try::hc2f6216ead8eae6f
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  63:        0x10412b688 - std::panic::catch_unwind::h02265fe17265fda2
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  64:        0x10412b688 - test::run_test_in_process::h5250a48154d3e8a7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:27
  65:        0x10412b688 - test::run_test::{{closure}}::h26897ddc37b2966c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:574:43
  66:        0x1040fec14 - test::run_test::{{closure}}::h5c8976010d262547
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:602:41
  67:        0x1040fec14 - std::sys_common::backtrace::__rust_begin_short_backtrace::h14e0bf2ff6bde926
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  68:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h41c404ebec5fd0f9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:529:17
  69:        0x104103408 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h9bea6ba67aceee28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  70:        0x104103408 - std::panicking::try::do_call::h681e7ac0e901b900
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  71:        0x104103408 - std::panicking::try::hc0aa288ce3642911
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  72:        0x104103408 - std::panic::catch_unwind::he941ae36032548bf
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  73:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::h03cf06ae2f75ecc3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:528:30
  74:        0x104103408 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9410c0b28133a970
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  75:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he407efbeff8db698
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  76:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h15f2f0818ccedd2c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  77:        0x1044a9d68 - std::sys::unix::thread::Thread::new::thread_start::h9b6324e2391e6ebb
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
  78:        0x18365ef94 - __pthread_joiner_wake
thread 'sniff_jdc_jds' panicked at library/core/src/panicking.rs:144:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
error: test failed, to rerun pass `--test pool_integration`

Caused by:
  process didn't exit successfully: `/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21 sniff_jdc_jds --nocapture` (signal: 6, SIGABRT: process abort signal)
jbesraa commented 1 week ago

I pulled this branch and tried to do some quick experimentation, where my goal was to put a sniffer between JDC and JDS to look into the messages they are exchanging.

Here's my test:

#[tokio::test]
async fn sniff_jdc_jds() {
    let sniffer_addr = common::get_available_address();
    let tp_addr = common::get_available_address();
    let _jdc_addr = common::get_available_address();
    let jds_addr = common::get_available_address();
    let pool_addr = common::get_available_address();
    let _tp = common::start_template_provider(tp_addr.port()).await;
    let _pool = common::start_pool(Some(pool_addr), Some(tp_addr)).await;
    let _jds = common::start_jds(tp_addr).await;
    let sniffer = common::start_sniffer(sniffer_addr, jds_addr).await;
    let _jdc = common::start_jdc(pool_addr, tp_addr, sniffer_addr).await;

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);
}

but when I tried to run it, I got a nasty panic... did I make some mistake on the test above, or is there something wrong with the APIs?

The log line that really stand out is:

Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }

which is coming from common::start_jdc.

anyways, here's the full panic logs:

$ RUST_BACKTRACE=1 cargo t sniff_jdc_jds -- --nocapture
   Compiling integration-test v0.1.0 (/Users/plebhash/develop/stratum/roles/tests-integration)
    Finished test [optimized + debuginfo] target(s) in 0.84s
     Running unittests tests/common/mod.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/integration_test-18118a7d259fdca5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/pool_integration.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21)

running 1 test
thread 'sniff_jdc_jds' panicked at tests-integration/tests/common/sniffer.rs:79:18:
Failed to connect to upstream: Os { code: 61, kind: ConnectionRefused, message: "Connection refused" }
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
   3: core::result::Result<T,E>::expect
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1034:23
   4: pool_integration::common::sniffer::Sniffer::start::{{closure}}
             at ./tests/common/sniffer.rs:77:13
   5: pool_integration::common::start_sniffer::{{closure}}::{{closure}}
             at ./tests/common/mod.rs:200:31
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
   7: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
   8: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
   9: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  10: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  11: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  12: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  13: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  14: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  15: tokio::runtime::task::harness::poll_future
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  16: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  17: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  18: tokio::runtime::task::LocalNotified<S>::run
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  19: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  20: tokio::runtime::coop::with_budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  21: tokio::runtime::coop::budget
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  22: tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  23: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  24: tokio::runtime::scheduler::current_thread::Context::run_task
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  26: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  27: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  28: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  29: std::thread::local::LocalKey<T>::try_with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  30: std::thread::local::LocalKey<T>::with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  31: tokio::runtime::context::set_scheduler
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  32: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  33: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  34: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  35: tokio::runtime::context::runtime::enter_runtime
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  36: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  37: tokio::runtime::runtime::Runtime::block_on_inner
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  38: tokio::runtime::runtime::Runtime::block_on
             at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  39: pool_integration::sniff_jdc_jds
             at ./tests/pool_integration.rs:59:5
  40: pool_integration::sniff_jdc_jds::{{closure}}
             at ./tests/pool_integration.rs:43:25
  41: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  42: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'sniff_jdc_jds' panicked at library/std/src/panicking.rs:135:9:
cannot modify the panic hook from a panicking thread
stack backtrace:
   0:        0x1044a3420 - std::backtrace_rs::backtrace::libunwind::trace::h2966c6fbfac9d426
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:        0x1044a3420 - std::backtrace_rs::backtrace::trace_unsynchronized::h8a5f4aefe890b7c5
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x1044a3420 - std::sys_common::backtrace::_print_fmt::h7574dd98fd39c257
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:        0x1044a3420 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h298c9ab285ff3934
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:        0x1044c4a74 - core::fmt::rt::Argument::fmt::hf9661447f7b99899
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:        0x1044c4a74 - core::fmt::write::h4e276abdb6d0c2a1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:        0x10449f90c - std::io::Write::write_fmt::hd421848f5f0bf9d0
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:        0x1044a325c - std::sys_common::backtrace::_print::h09e653c6686dbd70
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:        0x1044a325c - std::sys_common::backtrace::print::hd8bd9ecab1f94b94
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:        0x1044a4d14 - std::panicking::default_hook::{{closure}}::h520eeb743fc98fb4
  10:        0x1044a4a5c - std::panicking::default_hook::ha6550ffe49b63df1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:        0x1044a513c - std::panicking::rust_panic_with_hook::hddb0e884a202de7c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:779:13
  12:        0x1044a5018 - std::panicking::begin_panic_handler::{{closure}}::hd2798398a2fd9077
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:649:13
  13:        0x1044a3888 - std::sys_common::backtrace::__rust_end_short_backtrace::h9201cc364dbb8a23
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  14:        0x1044a4dd8 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  15:        0x1044e5358 - core::panicking::panic_fmt::h4d5168028d4c43c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  16:        0x1044a4528 - std::panicking::set_hook::h7e0b88293aa60115
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:135:9
  17:        0x10406df28 - <pool_integration::common::sniffer::Sniffer as core::ops::drop::Drop>::drop::h4f9b32744e297af4
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:433:9
  18:        0x10406df28 - core::ptr::drop_in_place<pool_integration::common::sniffer::Sniffer>::h4c16a79764da6aa1
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ptr/mod.rs:498:1
  19:        0x1040a12f0 - pool_integration::common::sniffer::Sniffer::start::{{closure}}::hb90fde3a39d2eb28
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/sniffer.rs:71:30
  20:        0x1040a12f0 - pool_integration::common::start_sniffer::{{closure}}::{{closure}}::hd413aa5f6f08a766
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/common/mod.rs:200:31
  21:        0x1040a12f0 - <core::pin::Pin<P> as core::future::future::Future>::poll::h3a6af33d99c0d7c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/future/future.rs:125:9
  22:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::{{closure}}::h67416b5194bd8ea1
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:331:17
  23:        0x1040825d8 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::had125f885be69651
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/loom/std/unsafe_cell.rs:16:9
  24:        0x1040825d8 - tokio::runtime::task::core::Core<T,S>::poll::h88e399dd156265df
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/core.rs:320:13
  25:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::{{closure}}::hff1035ada82c4042
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:500:19
  26:        0x1040cf4e4 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h194e8a46ba6c134c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  27:        0x1040cf4e4 - std::panicking::try::do_call::hfa059d7bbe5f74da
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  28:        0x1040cf4e4 - std::panicking::try::h5e6f67912e5e74c7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  29:        0x1040cf4e4 - std::panic::catch_unwind::h894555e4802d6241
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  30:        0x1040cf4e4 - tokio::runtime::task::harness::poll_future::h9c6fc42a8ad4dda3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:488:18
  31:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll_inner::h5e8ccef60996f844
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:209:27
  32:        0x1040cf4e4 - tokio::runtime::task::harness::Harness<T,S>::poll::hf1d96cc44106cc2d
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/harness.rs:154:15
  33:        0x1040640d8 - tokio::runtime::task::LocalNotified<S>::run::h910c378ca7799873
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/task/mod.rs:436:9
  34:        0x1040640d8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::h7fd3c9a9992df3c0
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:737:25
  35:        0x1040640d8 - tokio::runtime::coop::with_budget::ha8eea9b55311be09
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107:5
  36:        0x1040640d8 - tokio::runtime::coop::budget::h686e5071d2ebf508
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73:5
  37:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::{{closure}}::ha17898b3395133c3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:43
  38:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::enter::h244755fd5f4fea9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:423:19
  39:        0x1040640d8 - tokio::runtime::scheduler::current_thread::Context::run_task::h14b25fb646033519
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:359:23
  40:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::h9de2cdad3aab94d7
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:736:35
  41:        0x1040da7e8 - tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}::hb89c57f45d371a75
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:68
  42:        0x1040da7e8 - tokio::runtime::context::scoped::Scoped<T>::set::hcfcdab6918b71f15
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/scoped.rs:40:9
  43:        0x1040bc7f8 - tokio::runtime::context::set_scheduler::{{closure}}::h3aa378b85f754d73
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:26
  44:        0x1040bc7f8 - std::thread::local::LocalKey<T>::try_with::hb8e9a3e2d7975e28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16
  45:        0x1040bc7f8 - std::thread::local::LocalKey<T>::with::h5e3cce2c79ba2e1c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9
  46:        0x10406429c - tokio::runtime::context::set_scheduler::h1f5c32157d356ff3
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context.rs:180:9
  47:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::enter::hdd9d2a9a4be2cdce
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:774:27
  48:        0x10406429c - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h59e72995de799888
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:683:19
  49:        0x1040bcd54 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}::h5c86b1193a959b3c
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:191:28
  50:        0x1040bcd54 - tokio::runtime::context::runtime::enter_runtime::h5dc7d9cfd8e2fb9e
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65:16
  51:        0x1040b8878 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::hd4c5ce3ad4989144
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/current_thread/mod.rs:179:9
  52:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on_inner::hcb273d97fa3c4752
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:361:47
  53:        0x1040b8878 - tokio::runtime::runtime::Runtime::block_on::h760ebfa37e3fe329
                               at /Users/plebhash/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:335:13
  54:        0x104072324 - pool_integration::sniff_jdc_jds::h690654147fdeb18f
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:59:5
  55:        0x104072324 - pool_integration::sniff_jdc_jds::{{closure}}::h5ce01b1ba43151ec
                               at /Users/plebhash/develop/stratum/roles/tests-integration/tests/pool_integration.rs:43:25
  56:        0x104072324 - core::ops::function::FnOnce::call_once::hcfcd9a51a9123644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  57:        0x10412c6bc - core::ops::function::FnOnce::call_once::he7c46f18244e22ba
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  58:        0x10412c6bc - test::__rust_begin_short_backtrace::hf05961ebc6f8d3a3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:628:18
  59:        0x10412b688 - test::run_test_in_process::{{closure}}::h3be023be3e470e24
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:60
  60:        0x10412b688 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h045822bb433f4fa3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  61:        0x10412b688 - std::panicking::try::do_call::he686b452df9e6b8a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  62:        0x10412b688 - std::panicking::try::hc2f6216ead8eae6f
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  63:        0x10412b688 - std::panic::catch_unwind::h02265fe17265fda2
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  64:        0x10412b688 - test::run_test_in_process::h5250a48154d3e8a7
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:651:27
  65:        0x10412b688 - test::run_test::{{closure}}::h26897ddc37b2966c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:574:43
  66:        0x1040fec14 - test::run_test::{{closure}}::h5c8976010d262547
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/test/src/lib.rs:602:41
  67:        0x1040fec14 - std::sys_common::backtrace::__rust_begin_short_backtrace::h14e0bf2ff6bde926
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  68:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h41c404ebec5fd0f9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:529:17
  69:        0x104103408 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h9bea6ba67aceee28
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9
  70:        0x104103408 - std::panicking::try::do_call::h681e7ac0e901b900
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  71:        0x104103408 - std::panicking::try::hc0aa288ce3642911
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  72:        0x104103408 - std::panic::catch_unwind::he941ae36032548bf
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  73:        0x104103408 - std::thread::Builder::spawn_unchecked_::{{closure}}::h03cf06ae2f75ecc3
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:528:30
  74:        0x104103408 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9410c0b28133a970
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  75:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he407efbeff8db698
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  76:        0x1044a9d68 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h15f2f0818ccedd2c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
  77:        0x1044a9d68 - std::sys::unix::thread::Thread::new::thread_start::h9b6324e2391e6ebb
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
  78:        0x18365ef94 - __pthread_joiner_wake
thread 'sniff_jdc_jds' panicked at library/core/src/panicking.rs:144:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
error: test failed, to rerun pass `--test pool_integration`

Caused by:
  process didn't exit successfully: `/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21 sniff_jdc_jds --nocapture` (signal: 6, SIGABRT: process abort signal)

You should use the values returned from start_jdc/s and not the ones in the tests. start_jdc returns the address it is listening on and same with start_jds.

jbesraa commented 1 week ago

@plebhash This is ready for review

github-actions[bot] commented 1 week ago

🐰 Bencher Report

Branch2024-10-18-jds/c-test-starters
Testbedsv2

🚨 2 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
client_sv2_mining_message_submit_standard_serialize_deserializeEstimated Cycles
estimated cycles
📈 plot
🚨 alert (🔔)
🚷 threshold
27,848.00
(+1.16%)
27,765.01
(100.30%)
client_sv2_mining_message_submit_standard_serialize_deserializeL1 Accesses
accesses
📈 plot
🚨 alert (🔔)
🚷 threshold
15,503.00
(+0.70%)
15,498.89
(100.03%)
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
2,069.00
(-1.14%)
2,205.68
(93.80%)
📈 view plot
🚷 view threshold
473.00
(-0.05%)
488.63
(96.80%)
📈 view plot
🚷 view threshold
734.00
(-0.24%)
757.57
(96.89%)
📈 view plot
🚷 view threshold
8.00
(+46.29%)
14.19
(56.37%)
📈 view plot
🚷 view threshold
37.00
(-2.61%)
41.16
(89.89%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,204.00
(-0.01%)
8,287.71
(98.99%)
📈 view plot
🚷 view threshold
2,137.00
(-0.03%)
2,143.08
(99.72%)
📈 view plot
🚷 view threshold
3,159.00
(-0.06%)
3,170.58
(99.63%)
📈 view plot
🚷 view threshold
36.00
(+1.23%)
42.21
(85.29%)
📈 view plot
🚷 view threshold
139.00
(-0.02%)
140.92
(98.64%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,289.00
(+0.17%)
6,388.99
(98.43%)
📈 view plot
🚷 view threshold
1,750.00
(-0.05%)
1,767.00
(99.04%)
📈 view plot
🚷 view threshold
2,549.00
(-0.18%)
2,575.88
(98.96%)
📈 view plot
🚷 view threshold
20.00
(+17.70%)
24.66
(81.12%)
📈 view plot
🚷 view threshold
104.00
(0.00%)
107.03
(97.17%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,804.00
(+0.50%)
14,963.13
(98.94%)
📈 view plot
🚷 view threshold
4,694.00
(-0.02%)
4,711.00
(99.64%)
📈 view plot
🚷 view threshold
6,749.00
(-0.14%)
6,782.46
(99.51%)
📈 view plot
🚷 view threshold
50.00
(+14.82%)
53.59
(93.29%)
📈 view plot
🚷 view threshold
223.00
(+0.66%)
227.64
(97.96%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚨 view alert (🔔)
🚷 view threshold
27,848.00
(+1.16%)
27,765.01
(100.30%)
📈 view plot
🚷 view threshold
10,645.00
(+0.61%)
10,645.64
(99.99%)
📈 view plot
🚨 view alert (🔔)
🚷 view threshold
15,503.00
(+0.70%)
15,498.89
(100.03%)
📈 view plot
🚷 view threshold
89.00
(+9.31%)
90.20
(98.67%)
📈 view plot
🚷 view threshold
340.00
(+1.48%)
341.43
(99.58%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,375.00
(-0.48%)
4,608.72
(94.93%)
📈 view plot
🚷 view threshold
1,461.00
(-0.02%)
1,476.63
(98.94%)
📈 view plot
🚷 view threshold
2,160.00
(+0.01%)
2,184.93
(98.86%)
📈 view plot
🚷 view threshold
9.00
(+0.61%)
17.58
(51.19%)
📈 view plot
🚷 view threshold
62.00
(-1.00%)
68.30
(90.78%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,012.00
(-0.33%)
14,439.89
(97.04%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,079.63
(99.69%)
📈 view plot
🚷 view threshold
7,327.00
(+0.02%)
7,352.63
(99.65%)
📈 view plot
🚷 view threshold
35.00
(-0.31%)
43.30
(80.83%)
📈 view plot
🚷 view threshold
186.00
(-0.72%)
198.32
(93.79%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,820.00
(+0.70%)
22,901.09
(99.65%)
📈 view plot
🚷 view threshold
8,040.00
(+0.25%)
8,074.46
(99.57%)
📈 view plot
🚷 view threshold
11,690.00
(+0.20%)
11,754.29
(99.45%)
📈 view plot
🚷 view threshold
84.00
(+12.89%)
85.38
(98.39%)
📈 view plot
🚷 view threshold
306.00
(+0.82%)
311.54
(98.22%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,647.00
(-0.79%)
4,772.48
(97.37%)
📈 view plot
🚷 view threshold
1,502.00
(-0.02%)
1,517.63
(98.97%)
📈 view plot
🚷 view threshold
2,277.00
(-0.07%)
2,299.33
(99.03%)
📈 view plot
🚷 view threshold
12.00
(+28.00%)
15.93
(75.34%)
📈 view plot
🚷 view threshold
66.00
(-2.05%)
69.82
(94.53%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,156.00
(-0.10%)
16,461.72
(98.14%)
📈 view plot
🚷 view threshold
5,963.00
(-0.00%)
5,978.63
(99.74%)
📈 view plot
🚷 view threshold
8,661.00
(-0.03%)
8,692.24
(99.64%)
📈 view plot
🚷 view threshold
43.00
(+7.58%)
53.43
(80.48%)
📈 view plot
🚷 view threshold
208.00
(-0.39%)
216.37
(96.13%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,688.00
(+0.39%)
35,747.58
(99.83%)
📈 view plot
🚷 view threshold
14,888.00
(+0.27%)
14,907.31
(99.87%)
📈 view plot
🚷 view threshold
21,883.00
(+0.32%)
21,919.60
(99.83%)
📈 view plot
🚷 view threshold
94.00
(+1.36%)
113.77
(82.62%)
📈 view plot
🚷 view threshold
381.00
(+0.46%)
384.61
(99.06%)
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 week ago

🐰 Bencher Report

Branch2024-10-18-jds/c-test-starters
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,379.00
(-0.90%)
8,831.84
(94.87%)
📈 view plot
🚷 view threshold
3,689.00
(-1.54%)
3,893.99
(94.74%)
📈 view plot
🚷 view threshold
5,159.00
(-1.81%)
5,465.35
(94.39%)
📈 view plot
🚷 view threshold
7.00
(-2.61%)
12.98
(53.92%)
📈 view plot
🚷 view threshold
91.00
(+0.63%)
96.20
(94.60%)
get_submit📈 view plot
🚷 view threshold
95,407.00
(-0.01%)
95,989.23
(99.39%)
📈 view plot
🚷 view threshold
59,346.00
(-0.19%)
59,712.58
(99.39%)
📈 view plot
🚷 view threshold
85,222.00
(-0.21%)
85,785.58
(99.34%)
📈 view plot
🚷 view threshold
42.00
(-6.65%)
64.00
(65.63%)
📈 view plot
🚷 view threshold
285.00
(+1.84%)
289.41
(98.48%)
get_subscribe📈 view plot
🚷 view threshold
7,872.00
(-1.75%)
8,389.82
(93.83%)
📈 view plot
🚷 view threshold
2,765.00
(-2.39%)
2,973.72
(92.98%)
📈 view plot
🚷 view threshold
3,847.00
(-2.84%)
4,158.25
(92.51%)
📈 view plot
🚷 view threshold
14.00
(+16.59%)
20.81
(67.29%)
📈 view plot
🚷 view threshold
113.00
(-0.95%)
120.16
(94.04%)
serialize_authorize📈 view plot
🚷 view threshold
12,210.00
(-0.51%)
12,656.09
(96.48%)
📈 view plot
🚷 view threshold
5,266.00
(-0.98%)
5,463.60
(96.38%)
📈 view plot
🚷 view threshold
7,325.00
(-1.23%)
7,626.41
(96.05%)
📈 view plot
🚷 view threshold
11.00
(+20.86%)
15.95
(68.95%)
📈 view plot
🚷 view threshold
138.00
(+0.40%)
143.65
(96.07%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,340.00
(-1.38%)
25,285.49
(96.26%)
📈 view plot
🚷 view threshold
9,838.00
(-0.52%)
10,058.43
(97.81%)
📈 view plot
🚷 view threshold
13,890.00
(-0.51%)
14,215.84
(97.71%)
📈 view plot
🚷 view threshold
32.00
(-7.98%)
44.38
(72.10%)
📈 view plot
🚷 view threshold
294.00
(-2.43%)
315.70
(93.13%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,068.00
(-0.82%)
30,792.22
(97.65%)
📈 view plot
🚷 view threshold
12,015.00
(-0.54%)
12,228.94
(98.25%)
📈 view plot
🚷 view threshold
17,003.00
(-0.61%)
17,325.06
(98.14%)
📈 view plot
🚷 view threshold
58.00
(+4.05%)
68.32
(84.89%)
📈 view plot
🚷 view threshold
365.00
(-1.21%)
381.81
(95.60%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,369.00
(-0.07%)
127,084.23
(99.44%)
📈 view plot
🚷 view threshold
73,200.00
(-0.11%)
73,598.29
(99.46%)
📈 view plot
🚷 view threshold
104,914.00
(-0.13%)
105,548.02
(99.40%)
📈 view plot
🚷 view threshold
105.00
(-1.95%)
133.33
(78.75%)
📈 view plot
🚷 view threshold
598.00
(+0.30%)
605.55
(98.75%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,468.00
(-1.29%)
28,648.15
(95.88%)
📈 view plot
🚷 view threshold
9,584.00
(-0.65%)
9,792.35
(97.87%)
📈 view plot
🚷 view threshold
13,543.00
(-0.74%)
13,854.84
(97.75%)
📈 view plot
🚷 view threshold
69.00
(+8.66%)
76.13
(90.64%)
📈 view plot
🚷 view threshold
388.00
(-2.05%)
417.17
(93.01%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,117.00
(-0.09%)
115,931.39
(99.30%)
📈 view plot
🚷 view threshold
68,060.00
(-0.06%)
68,438.01
(99.45%)
📈 view plot
🚷 view threshold
97,657.00
(-0.07%)
98,268.99
(99.38%)
📈 view plot
🚷 view threshold
62.00
(-1.16%)
78.26
(79.22%)
📈 view plot
🚷 view threshold
490.00
(-0.20%)
499.68
(98.06%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
22,842.00
(-1.73%)
24,074.08
(94.88%)
📈 view plot
🚷 view threshold
8,143.00
(-0.71%)
8,348.97
(97.53%)
📈 view plot
🚷 view threshold
11,467.00
(-0.74%)
11,761.97
(97.49%)
📈 view plot
🚷 view threshold
35.00
(-6.18%)
44.67
(78.35%)
📈 view plot
🚷 view threshold
320.00
(-2.65%)
348.95
(91.70%)
serialize_submit📈 view plot
🚷 view threshold
99,796.00
(-0.04%)
100,388.36
(99.41%)
📈 view plot
🚷 view threshold
61,408.00
(-0.15%)
61,751.00
(99.44%)
📈 view plot
🚷 view threshold
88,081.00
(-0.19%)
88,624.36
(99.39%)
📈 view plot
🚷 view threshold
47.00
(+0.33%)
64.70
(72.64%)
📈 view plot
🚷 view threshold
328.00
(+1.08%)
334.07
(98.18%)
serialize_subscribe📈 view plot
🚷 view threshold
11,317.00
(-0.68%)
11,770.28
(96.15%)
📈 view plot
🚷 view threshold
4,118.00
(-1.49%)
4,319.19
(95.34%)
📈 view plot
🚷 view threshold
5,707.00
(-1.88%)
6,013.38
(94.91%)
📈 view plot
🚷 view threshold
16.00
(+24.50%)
20.67
(77.40%)
📈 view plot
🚷 view threshold
158.00
(+0.30%)
164.16
(96.25%)
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 week ago

🐰 Bencher Report

Branch2024-10-18-jds/c-test-starters
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
45.05
(+0.86%)
47.60
(94.66%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
72.83
(-3.26%)
86.47
(84.23%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.66
(-0.03%)
14.71
(99.61%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
274.38
(+2.42%)
320.01
(85.74%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
636.91
(+5.97%)
743.20
(85.70%)
client_sv2_open_channel📈 view plot
🚷 view threshold
147.45
(-0.09%)
157.93
(93.36%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
283.17
(-0.59%)
318.22
(88.99%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
409.36
(+7.62%)
454.42
(90.08%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
161.93
(+0.29%)
176.71
(91.64%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
470.63
(+0.92%)
574.70
(81.89%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
994.46
(+2.23%)
1,078.62
(92.20%)
🐰 View full continuous benchmarking report in Bencher
github-actions[bot] commented 1 week ago

🐰 Bencher Report

Branch2024-10-18-jds/c-test-starters
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client-submit-serialize📈 view plot
🚷 view threshold
6,793.50
(+1.06%)
7,137.49
(95.18%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,773.80
(+1.56%)
8,065.93
(96.38%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,284.10
(+0.97%)
8,643.82
(95.84%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
895.32
(+2.35%)
952.59
(93.99%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
696.97
(+3.25%)
746.95
(93.31%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
244.20
(-1.72%)
265.15
(92.10%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
155.83
(-1.02%)
165.15
(94.35%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,608.80
(+1.40%)
7,249.72
(91.16%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
286.37
(+2.67%)
304.84
(93.94%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
736.76
(+0.45%)
800.33
(92.06%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
600.95
(+0.61%)
629.94
(95.40%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
205.83
(-0.68%)
226.24
(90.98%)
🐰 View full continuous benchmarking report in Bencher
plebhash commented 1 week ago

aha! finally got this to work:

#[tokio::test]
async fn sniff_jdc_jds() {
    let sniffer_addr = common::get_available_address();
    let tp_addr = common::get_available_address();
    let pool_addr = common::get_available_address();
    let _tp = common::start_template_provider(tp_addr.port()).await;
    let _pool = common::start_pool(Some(pool_addr), Some(tp_addr)).await;
    let jds_addr = common::start_jds(tp_addr).await;
    let sniffer = common::start_sniffer(sniffer_addr, jds_addr).await;
    let _jdc_addr = common::start_jdc(pool_addr, tp_addr, sniffer_addr).await;

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);

    let d = sniffer.next_downstream_message();
    let u = sniffer.next_upstream_message();

    println!("d: {:?}", d);
    println!("u: {:?}", u);
}
$ cargo t sniff_jdc_jds -- --nocapture
   Compiling integration-test v0.1.0 (/Users/plebhash/develop/stratum/roles/tests-integration)
    Finished test [optimized + debuginfo] target(s) in 0.80s
     Running unittests tests/common/mod.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/integration_test-18118a7d259fdca5)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/pool_integration.rs (/Users/plebhash/develop/stratum/roles/target/debug/deps/pool_integration-4f8fa2ba684ccd21)

running 1 test
d: Some((0, Common(SetupConnection(SetupConnection { protocol: JobDeclarationProtocol, min_version: 2, max_version: 2, flags: 1, endpoint_host: Owned([49, 50, 55, 46, 48, 46, 48, 46, 49]), endpoint_port: 62897, vendor: Owned([]), hardware_version: Owned([]), firmware: Owned([]), device_id: Owned([]) }))))
u: Some((1, Common(SetupConnectionSuccess(SetupConnectionSuccess { used_version: 2, flags: 1 }))))
d: Some((80, JobDeclaration(AllocateMiningJobToken(AllocateMiningJobToken { user_identifier: Owned([116, 111, 100, 111]), request_id: 0 }))))
u: Some((81, JobDeclaration(AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([1, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true }))))
d: Some((80, JobDeclaration(AllocateMiningJobToken(AllocateMiningJobToken { user_identifier: Owned([116, 111, 100, 111]), request_id: 1 }))))
u: Some((81, JobDeclaration(AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 1, mining_job_token: Owned([2, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true }))))
test sniff_jdc_jds ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 6.89s
plebhash commented 1 week ago

@jbesraa one comment based on your answer:

You should use the values returned from start_jdc/s and not the ones in the tests. start_jdc returns the address it is listening on and same with start_jds.

this is still related to https://github.com/stratum-mining/stratum/issues/1234, more specifically on fragmentation of return types

if the starters only return SocketAddr, the user doesn't have any variable to represent the role object within the context of the test itself

I'll approve the PR and let @jbesraa decide if we fix it on this PR or on a separate one, but in case we don't do it here it's important not to forget about these details and tackle them sooner rather than later

plebhash commented 1 week ago

LGTM. Why have you had to create all those new config structs? How was it working before?

I believe this is just to have convenient input parameters for ProxyConfig::new()

btw this struct has a bad name, it's probably copypasta from some old proxy implementation, but this should be called JdcConfig

not sure we want to fix that on this PR, but worth point out anyways

jbesraa commented 6 days ago

@jbesraa one comment based on your answer:

You should use the values returned from start_jdc/s and not the ones in the tests. start_jdc returns the address it is listening on and same with start_jds.

this is still related to #1234, more specifically on fragmentation of return types

if the starters only return SocketAddr, the user doesn't have any variable to represent the role object within the context of the test itself

I'll approve the PR and let @jbesraa decide if we fix it on this PR or on a separate one, but in case we don't do it here it's important not to forget about these details and tackle them sooner rather than later

Yea I think for now returning the listening address seems kinda ok. With the Sniffer we will also return the actual object as we need to assert with it, maybe we will need others as well but I think lets do it once we actually need that. ATM I can see that we mostly need the listening addresses.

jbesraa commented 6 days ago

LGTM. Why have you had to create all those new config structs? How was it working before?

I believe this is just to have convenient input parameters for ProxyConfig::new()

btw this struct has a bad name, it's probably copypasta from some old proxy implementation, but this should be called JdcConfig

not sure we want to fix that on this PR, but worth point out anyways

Yea this one is extremely annoying but I didn't wanna start changing the roles at this points.. I do think we should do it sooner than later though. Tracked here https://github.com/stratum-mining/stratum/issues/1260