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

integration_tests_sv2 docs cleanup #1340

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Jan 9, 2025

builds on top of #1339

closes #1317

@plebhash plebhash force-pushed the integration-test-docs-cleanup branch from c7759e4 to 98938bd Compare January 9, 2025 14:28
Copy link
Contributor

github-actions bot commented Jan 9, 2025

🐰 Bencher Report

Branchintegration-test-docs-cleanup
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,506.10
(-0.75%)
6,933.52
(93.84%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,367.70
(-0.54%)
7,842.95
(93.94%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
7,965.40
(-1.57%)
9,384.36
(84.88%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
842.96
(-2.75%)
943.35
(89.36%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
672.47
(-0.53%)
723.27
(92.98%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
245.55
(-1.72%)
273.72
(89.71%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
158.28
(+0.48%)
165.21
(95.80%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,224.60
(-1.85%)
6,780.09
(91.81%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
278.82
(-1.76%)
336.41
(82.88%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
717.23
(-1.33%)
778.75
(92.10%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
577.42
(-2.16%)
628.88
(91.82%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
204.30
(-0.99%)
226.08
(90.37%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Jan 9, 2025

🐰 Bencher Report

Branchintegration-test-docs-cleanup
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
44.16
(-2.31%)
59.59
(74.11%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
74.66
(-3.37%)
106.71
(69.96%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.69
(+0.18%)
14.73
(99.77%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
263.71
(-0.12%)
288.04
(91.55%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
630.75
(+2.02%)
681.20
(92.59%)
client_sv2_open_channel📈 view plot
🚷 view threshold
169.48
(+2.06%)
179.55
(94.39%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
280.32
(-1.95%)
314.51
(89.13%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
388.43
(+1.41%)
402.99
(96.39%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
159.29
(-0.44%)
171.10
(93.10%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
496.52
(+5.50%)
557.96
(88.99%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
986.54
(-2.17%)
1,218.20
(80.98%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Jan 9, 2025

🐰 Bencher Report

Branchintegration-test-docs-cleanup
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
1e3 x estimated cycles
(Result Δ%)
Upper Boundary
1e3 x estimated cycles
(Limit %)
InstructionsBenchmark Result
1e3 x instructions
(Result Δ%)
Upper Boundary
1e3 x instructions
(Limit %)
L1 AccessesBenchmark Result
1e3 x accesses
(Result Δ%)
Upper Boundary
1e3 x 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.39
(-0.79%)
8.67
(96.71%)
📈 view plot
🚷 view threshold
3.69
(-0.93%)
3.86
(95.53%)
📈 view plot
🚷 view threshold
5.16
(-1.06%)
5.45
(94.68%)
📈 view plot
🚷 view threshold
9.00
(+5.59%)
16.42
(54.80%)
📈 view plot
🚷 view threshold
91.00
(-0.45%)
96.82
(93.99%)
get_submit📈 view plot
🚷 view threshold
95.18
(-0.18%)
95.61
(99.55%)
📈 view plot
🚷 view threshold
59.35
(-0.09%)
59.71
(99.39%)
📈 view plot
🚷 view threshold
85.23
(-0.10%)
85.82
(99.31%)
📈 view plot
🚷 view threshold
45.00
(+0.40%)
60.35
(74.56%)
📈 view plot
🚷 view threshold
278.00
(-0.98%)
291.88
(95.24%)
get_subscribe📈 view plot
🚷 view threshold
7.86
(-1.61%)
8.23
(95.55%)
📈 view plot
🚷 view threshold
2.77
(-1.65%)
2.94
(93.97%)
📈 view plot
🚷 view threshold
3.85
(-1.85%)
4.14
(92.92%)
📈 view plot
🚷 view threshold
12.00
(-4.36%)
20.73
(57.87%)
📈 view plot
🚷 view threshold
113.00
(-1.33%)
117.94
(95.81%)
serialize_authorize📈 view plot
🚷 view threshold
12.10
(-1.25%)
12.51
(96.79%)
📈 view plot
🚷 view threshold
5.27
(-0.59%)
5.43
(97.05%)
📈 view plot
🚷 view threshold
7.33
(-0.65%)
7.60
(96.41%)
📈 view plot
🚷 view threshold
10.00
(-2.66%)
18.89
(52.92%)
📈 view plot
🚷 view threshold
135.00
(-2.14%)
143.35
(94.18%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24.57
(-0.59%)
25.19
(97.54%)
📈 view plot
🚷 view threshold
9.84
(-0.19%)
10.01
(98.28%)
📈 view plot
🚷 view threshold
13.88
(-0.21%)
14.18
(97.90%)
📈 view plot
🚷 view threshold
38.00
(+5.65%)
45.95
(82.70%)
📈 view plot
🚷 view threshold
300.00
(-1.19%)
313.69
(95.64%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30.07
(-0.82%)
30.73
(97.87%)
📈 view plot
🚷 view threshold
12.02
(-0.28%)
12.19
(98.60%)
📈 view plot
🚷 view threshold
17.00
(-0.32%)
17.30
(98.30%)
📈 view plot
🚷 view threshold
59.00
(+5.59%)
67.50
(87.41%)
📈 view plot
🚷 view threshold
365.00
(-1.62%)
379.52
(96.17%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126.19
(-0.21%)
126.79
(99.53%)
📈 view plot
🚷 view threshold
73.20
(-0.06%)
73.53
(99.55%)
📈 view plot
🚷 view threshold
104.92
(-0.08%)
105.51
(99.44%)
📈 view plot
🚷 view threshold
110.00
(+3.02%)
125.90
(87.37%)
📈 view plot
🚷 view threshold
592.00
(-0.97%)
610.67
(96.94%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27.67
(-0.85%)
28.39
(97.49%)
📈 view plot
🚷 view threshold
9.58
(-0.47%)
9.76
(98.20%)
📈 view plot
🚷 view threshold
13.54
(-0.55%)
13.84
(97.83%)
📈 view plot
🚷 view threshold
69.00
(+6.80%)
78.07
(88.38%)
📈 view plot
🚷 view threshold
394.00
(-1.31%)
409.82
(96.14%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115.07
(-0.15%)
115.72
(99.44%)
📈 view plot
🚷 view threshold
68.06
(+0.01%)
68.42
(99.47%)
📈 view plot
🚷 view threshold
97.65
(+0.01%)
98.29
(99.35%)
📈 view plot
🚷 view threshold
67.00
(+2.07%)
87.76
(76.35%)
📈 view plot
🚷 view threshold
488.00
(-1.10%)
505.39
(96.56%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23.10
(-0.94%)
23.82
(97.00%)
📈 view plot
🚷 view threshold
8.14
(-0.51%)
8.32
(97.92%)
📈 view plot
🚷 view threshold
11.45
(-0.57%)
11.75
(97.51%)
📈 view plot
🚷 view threshold
41.00
(+4.98%)
51.15
(80.16%)
📈 view plot
🚷 view threshold
327.00
(-1.40%)
342.50
(95.48%)
serialize_submit📈 view plot
🚷 view threshold
99.57
(-0.22%)
100.09
(99.48%)
📈 view plot
🚷 view threshold
61.41
(-0.07%)
61.73
(99.47%)
📈 view plot
🚷 view threshold
88.08
(-0.08%)
88.65
(99.36%)
📈 view plot
🚷 view threshold
50.00
(+3.66%)
67.07
(74.55%)
📈 view plot
🚷 view threshold
321.00
(-1.36%)
337.65
(95.07%)
serialize_subscribe📈 view plot
🚷 view threshold
11.31
(-0.78%)
11.60
(97.51%)
📈 view plot
🚷 view threshold
4.12
(-1.03%)
4.28
(96.15%)
📈 view plot
🚷 view threshold
5.71
(-1.22%)
6.00
(95.20%)
📈 view plot
🚷 view threshold
14.00
(+0.11%)
24.30
(57.61%)
📈 view plot
🚷 view threshold
158.00
(-0.34%)
164.63
(95.97%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Jan 9, 2025

🐰 Bencher Report

Branchintegration-test-docs-cleanup
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
1e3 x estimated cycles
(Result Δ%)
Upper Boundary
1e3 x 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.13
(+0.67%)
2.24
(95.15%)
📈 view plot
🚷 view threshold
473.00
(-0.13%)
490.59
(96.41%)
📈 view plot
🚷 view threshold
734.00
(-0.27%)
758.98
(96.71%)
📈 view plot
🚷 view threshold
6.00
(+17.97%)
11.60
(51.71%)
📈 view plot
🚷 view threshold
39.00
(+0.85%)
41.73
(93.46%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8.34
(+1.42%)
8.40
(99.30%)
📈 view plot
🚷 view threshold
2,137.00📈 view plot
🚷 view threshold
3,154.00
(-0.15%)
3,167.44
(99.58%)
📈 view plot
🚷 view threshold
37.00
(+3.97%)
41.52
(89.11%)
📈 view plot
🚷 view threshold
143.00
(+2.34%)
144.65
(98.86%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6.38
(+1.21%)
6.45
(98.89%)
📈 view plot
🚷 view threshold
1,750.00
(-0.03%)
1,767.59
(99.00%)
📈 view plot
🚷 view threshold
2,549.00
(-0.11%)
2,575.45
(98.97%)
📈 view plot
🚷 view threshold
17.00
(-0.82%)
24.02
(70.79%)
📈 view plot
🚷 view threshold
107.00
(+2.17%)
108.84
(98.31%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14.85
(+0.84%)
14.94
(99.40%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,711.59
(99.63%)
📈 view plot
🚷 view threshold
6,745.00
(-0.16%)
6,786.73
(99.39%)
📈 view plot
🚷 view threshold
53.00
(+15.69%)
63.30
(83.73%)
📈 view plot
🚷 view threshold
224.00
(+1.26%)
226.21
(99.02%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27.86
(+0.92%)
28.07
(99.26%)
📈 view plot
🚷 view threshold
10,645.00
(+0.35%)
10,699.43
(99.49%)
📈 view plot
🚷 view threshold
15,500.00
(+0.38%)
15,595.29
(99.39%)
📈 view plot
🚷 view threshold
92.00
(+9.74%)
99.30
(92.65%)
📈 view plot
🚷 view threshold
340.00
(+1.32%)
343.30
(99.04%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4.45
(+0.98%)
4.58
(97.02%)
📈 view plot
🚷 view threshold
1,461.00
(-0.04%)
1,478.59
(98.81%)
📈 view plot
🚷 view threshold
2,157.00
(-0.17%)
2,184.74
(98.73%)
📈 view plot
🚷 view threshold
10.00
(+21.90%)
13.98
(71.54%)
📈 view plot
🚷 view threshold
64.00
(+1.71%)
67.79
(94.40%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14.04
(+0.11%)
14.20
(98.83%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,081.59
(99.65%)
📈 view plot
🚷 view threshold
7,321.00
(-0.07%)
7,352.75
(99.57%)
📈 view plot
🚷 view threshold
41.00
(+11.73%)
48.44
(84.64%)
📈 view plot
🚷 view threshold
186.00
(-0.01%)
190.89
(97.44%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22.93
(+0.97%)
23.08
(99.36%)
📈 view plot
🚷 view threshold
8,040.00
(+0.09%)
8,057.64
(99.78%)
📈 view plot
🚷 view threshold
11,685.00
(+0.00%)
11,713.48
(99.76%)
📈 view plot
🚷 view threshold
86.00
(+13.33%)
90.14
(95.41%)
📈 view plot
🚷 view threshold
309.00
(+1.58%)
312.95
(98.74%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4.71
(+0.32%)
4.79
(98.23%)
📈 view plot
🚷 view threshold
1,502.00
(-0.04%)
1,519.59
(98.84%)
📈 view plot
🚷 view threshold
2,277.00
(-0.07%)
2,300.98
(98.96%)
📈 view plot
🚷 view threshold
10.00
(+6.14%)
15.25
(65.56%)
📈 view plot
🚷 view threshold
68.00
(+0.58%)
70.14
(96.95%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16.21
(+0.35%)
16.33
(99.30%)
📈 view plot
🚷 view threshold
5,963.00
(-0.01%)
5,980.59
(99.71%)
📈 view plot
🚷 view threshold
8,654.00
(-0.11%)
8,692.65
(99.56%)
📈 view plot
🚷 view threshold
49.00
(+20.27%)
56.41
(86.86%)
📈 view plot
🚷 view threshold
209.00
(+0.35%)
212.17
(98.50%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35.75
(+0.40%)
35.96
(99.42%)
📈 view plot
🚷 view threshold
14,888.00
(+0.14%)
14,919.71
(99.79%)
📈 view plot
🚷 view threshold
21,868.00
(+0.11%)
21,919.13
(99.77%)
📈 view plot
🚷 view threshold
109.00
(+15.16%)
120.11
(90.75%)
📈 view plot
🚷 view threshold
381.00
(+0.36%)
385.75
(98.77%)
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.14%. Comparing base (a053dc7) to head (b193189).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1340   +/-   ##
=======================================
  Coverage   19.14%   19.14%           
=======================================
  Files         166      166           
  Lines       10987    10987           
=======================================
  Hits         2104     2104           
  Misses       8883     8883           
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.65% <ø> (ø)
binary_sv2-coverage 5.48% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.29% <ø> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 7.79% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.49% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.35% <ø> (ø)
pool_sv2-coverage 2.05% <ø> (ø)
protocols 24.74% <ø> (ø)
roles 6.55% <ø> (ø)
roles_logic_sv2-coverage 8.11% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.60% <ø> (ø)
utils ?
v1-coverage 2.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

this is a misleading name, as this is not really a response, but rather the new message to replace the intercepted one
it's not fully designed and motivation is not clear, we can re-design if needed
we need 2 sniffers to assert the message was correctly replaced and fully delivered over the TCP connection
- improves wording on `Sniffer` docs, as it implied that messages from upstream are always a response, which is not true
- adds some brief docs to `InterceptMessage` struct
- removes links to private items (which generate warnings on `cargo doc`)
@plebhash plebhash force-pushed the integration-test-docs-cleanup branch from 98938bd to b193189 Compare January 9, 2025 16:38
Comment on lines +38 to +40
/// Can be useful for testing purposes, as it allows to assert that the roles have sent specific
/// messages in a specific order and to inspect the messages details.
///
Copy link
Collaborator Author

@plebhash plebhash Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this paragraph was just moved from the bottom to the top, as it feels more like an introduction about Sniffer

it was a bit confusing to read it on the bottom, as it wasn't clear what it was referring to (Sniffer in general vs some internal detail)

Comment on lines -40 to -44
/// between the downstream and upstream roles. The downstream will send its messages to the
/// [`Sniffer`] which will save those in the `messages_from_downstream` aggregator and forward them
/// to the upstream role. When a response is received it is saved in `messages_from_upstream` and
/// forwarded to the downstream role. Both `messages_from_downstream` and `messages_from_upstream`
/// can be accessed as FIFO queues.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was re-rewitten below, as it implies that messages from upstream are always a response, which is not necessarily true

Comment on lines 46 to 49
/// In order to alter the messages sent between the roles, the [`Sniffer::intercept_messages`]
/// field can be used. It will look for the [`InterceptMessage::expected_message_type`] in the
/// specified [`InterceptMessage::direction`] and replace it with
/// [`InterceptMessage::replacement_message`].
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was replaced with a new paragraph about InterceptMessage in the bottom in a more summarized way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

integration-test crate as a development tool for SRI ecosystem
2 participants