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

use fixed temp_dir for TP on integration tests #1177

Merged

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Oct 2, 2024

fix #1176

Copy link
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

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

I think this will make all tests run against the same bitcoind instance which I am not sure it is a good idea

@jbesraa
Copy link
Contributor

jbesraa commented Oct 2, 2024

In L92 there is a functionality to use a downloaded bitcoind, maybe try to utilize that?

@plebhash
Copy link
Collaborator Author

plebhash commented Oct 2, 2024

I think this will make all tests run against the same bitcoind instance which I am not sure it is a good idea

I see what you mean

the issue would happen on conf.staticdir = Some(temp_dir.join(".bitcoin"));

I adapted that by making staticdir depend on port

now we just make sure the TP is downloaded 1x, but different tests will use different /tmp/.template-provider/.bitcoin-{port} directories for their state

@plebhash
Copy link
Collaborator Author

plebhash commented Oct 2, 2024

In L92 there is a functionality to use a downloaded bitcoind, maybe try to utilize that?

that is being used here... bitcoin_exe_home is created from temp_dir

@plebhash plebhash force-pushed the fixed-tp-path-integration-tests branch from 9240398 to 80b9dc4 Compare October 2, 2024 15:51
Copy link
Contributor

github-actions bot commented Oct 2, 2024

🐰 Bencher Report

Branch1177/merge
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,545.00
(+1.17%)
8,794.41
(97.16%)
📈 view plot
🚷 view threshold
3,772.00
(+0.63%)
3,881.80
(97.17%)
📈 view plot
🚷 view threshold
5,295.00
(+0.72%)
5,440.72
(97.32%)
📈 view plot
🚷 view threshold
6.00
(-14.38%)
11.65
(51.50%)
📈 view plot
🚷 view threshold
92.00
(+2.10%)
95.35
(96.49%)
get_submit📈 view plot
🚷 view threshold
95,518.00
(+0.05%)
96,195.06
(99.30%)
📈 view plot
🚷 view threshold
59,522.00
(+0.09%)
59,796.39
(99.54%)
📈 view plot
🚷 view threshold
85,503.00
(+0.10%)
85,875.26
(99.57%)
📈 view plot
🚷 view threshold
50.00
(+5.51%)
71.11
(70.31%)
📈 view plot
🚷 view threshold
279.00
(-0.57%)
289.77
(96.28%)
get_subscribe📈 view plot
🚷 view threshold
8,068.00
(+0.69%)
8,361.45
(96.49%)
📈 view plot
🚷 view threshold
2,848.00
(+0.40%)
2,963.89
(96.09%)
📈 view plot
🚷 view threshold
3,983.00
(+0.44%)
4,135.85
(96.30%)
📈 view plot
🚷 view threshold
12.00
(-6.57%)
23.14
(51.86%)
📈 view plot
🚷 view threshold
115.00
(+1.06%)
119.62
(96.14%)
serialize_authorize📈 view plot
🚷 view threshold
12,320.00
(+0.51%)
12,636.87
(97.49%)
📈 view plot
🚷 view threshold
5,343.00
(+0.44%)
5,452.80
(97.99%)
📈 view plot
🚷 view threshold
7,460.00
(+0.55%)
7,603.18
(98.12%)
📈 view plot
🚷 view threshold
6.00
(-33.79%)
14.92
(40.21%)
📈 view plot
🚷 view threshold
138.00
(+0.78%)
143.78
(95.98%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,893.00
(+1.12%)
25,156.72
(98.95%)
📈 view plot
🚷 view threshold
9,920.00
(+0.25%)
10,053.19
(98.68%)
📈 view plot
🚷 view threshold
14,018.00
(+0.37%)
14,198.53
(98.73%)
📈 view plot
🚷 view threshold
33.00
(-5.65%)
44.19
(74.68%)
📈 view plot
🚷 view threshold
306.00
(+2.23%)
313.74
(97.53%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,447.00
(+0.59%)
30,730.13
(99.08%)
📈 view plot
🚷 view threshold
12,097.00
(+0.07%)
12,226.35
(98.94%)
📈 view plot
🚷 view threshold
17,137.00
(+0.12%)
17,307.94
(99.01%)
📈 view plot
🚷 view threshold
58.00
(+3.47%)
68.39
(84.80%)
📈 view plot
🚷 view threshold
372.00
(+1.16%)
381.01
(97.64%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,623.00
(+0.13%)
127,175.30
(99.57%)
📈 view plot
🚷 view threshold
73,363.00
(+0.12%)
73,674.05
(99.58%)
📈 view plot
🚷 view threshold
105,188.00
(+0.13%)
105,620.53
(99.59%)
📈 view plot
🚷 view threshold
115.00
(+4.58%)
142.07
(80.95%)
📈 view plot
🚷 view threshold
596.00
(-0.02%)
604.74
(98.55%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
28,041.00
(+1.13%)
28,600.16
(98.04%)
📈 view plot
🚷 view threshold
9,666.00
(+0.20%)
9,780.02
(98.83%)
📈 view plot
🚷 view threshold
13,671.00
(+0.19%)
13,830.76
(98.84%)
📈 view plot
🚷 view threshold
67.00
(+5.06%)
75.89
(88.29%)
📈 view plot
🚷 view threshold
401.00
(+1.98%)
416.43
(96.29%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,491.00
(+0.26%)
115,904.59
(99.64%)
📈 view plot
🚷 view threshold
68,223.00
(+0.20%)
68,475.58
(99.63%)
📈 view plot
🚷 view threshold
97,931.00
(+0.23%)
98,288.00
(99.64%)
📈 view plot
🚷 view threshold
68.00
(+6.52%)
81.69
(83.25%)
📈 view plot
🚷 view threshold
492.00
(+0.33%)
499.44
(98.51%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,427.00
(+1.20%)
24,010.69
(97.57%)
📈 view plot
🚷 view threshold
8,225.00
(+0.29%)
8,335.60
(98.67%)
📈 view plot
🚷 view threshold
11,592.00
(+0.35%)
11,737.90
(98.76%)
📈 view plot
🚷 view threshold
36.00
(-4.26%)
44.39
(81.10%)
📈 view plot
🚷 view threshold
333.00
(+2.15%)
348.23
(95.63%)
serialize_submit📈 view plot
🚷 view threshold
99,907.00
(+0.03%)
100,540.15
(99.37%)
📈 view plot
🚷 view threshold
61,566.00
(+0.09%)
61,845.08
(99.55%)
📈 view plot
🚷 view threshold
88,347.00
(+0.10%)
88,727.33
(99.57%)
📈 view plot
🚷 view threshold
51.00
(+4.80%)
70.27
(72.58%)
📈 view plot
🚷 view threshold
323.00
(-0.60%)
333.34
(96.90%)
serialize_subscribe📈 view plot
🚷 view threshold
11,397.00
(+0.05%)
11,760.29
(96.91%)
📈 view plot
🚷 view threshold
4,195.00
(+0.27%)
4,310.89
(97.31%)
📈 view plot
🚷 view threshold
5,842.00
(+0.34%)
5,992.80
(97.48%)
📈 view plot
🚷 view threshold
12.00
(-11.67%)
22.23
(53.97%)
📈 view plot
🚷 view threshold
157.00
(-0.10%)
164.46
(95.47%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 2, 2024

🐰 Bencher Report

Branch1177/merge
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,917.90
(+0.49%)
7,255.62
(95.35%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,844.90
(-0.57%)
8,393.70
(93.46%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,387.30
(-0.75%)
8,938.56
(93.83%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
912.97
(-0.65%)
977.48
(93.40%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
711.41
(-0.87%)
774.61
(91.84%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
250.98
(+0.56%)
270.21
(92.88%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
158.80
(+0.19%)
169.32
(93.79%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,613.50
(-0.53%)
7,011.66
(94.32%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
275.13
(-1.00%)
290.30
(94.77%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
760.54
(-0.67%)
836.22
(90.95%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
660.50
(+3.90%)
679.89
(97.15%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
209.31
(+0.18%)
234.61
(89.22%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 2, 2024

🐰 Bencher Report

Branch1177/merge
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.68
(+1.99%)
46.43
(98.39%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
84.05
(+10.20%)
96.15
(87.42%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.74
(+0.26%)
14.90
(98.96%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
268.60
(+0.58%)
285.49
(94.08%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
578.53
(-1.44%)
633.15
(91.37%)
client_sv2_open_channel📈 view plot
🚷 view threshold
171.69
(+4.05%)
180.90
(94.91%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
274.69
(+0.16%)
298.68
(91.97%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
375.44
(-0.79%)
415.23
(90.42%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
167.67
(+3.64%)
182.51
(91.87%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
471.52
(+4.82%)
530.02
(88.96%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
1,116.40
(+12.05%)
1,177.07
(94.85%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 2, 2024

🐰 Bencher Report

Branch1177/merge
Testbedsv2
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,141.00
(+3.04%)
2,210.40
(96.86%)
📈 view plot
🚷 view threshold
473.00
(+0.21%)
490.73
(96.39%)
📈 view plot
🚷 view threshold
731.00
(-0.42%)
761.79
(95.96%)
📈 view plot
🚷 view threshold
9.00
(+53.40%)
14.33
(62.80%)
📈 view plot
🚷 view threshold
39.00
(+3.85%)
41.29
(94.45%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,212.00
(+0.14%)
8,349.10
(98.36%)
📈 view plot
🚷 view threshold
2,137.00
(+0.15%)
2,177.88
(98.12%)
📈 view plot
🚷 view threshold
3,157.00
(+0.06%)
3,225.47
(97.88%)
📈 view plot
🚷 view threshold
38.00
(+3.84%)
45.07
(84.32%)
📈 view plot
🚷 view threshold
139.00
(+0.04%)
142.32
(97.66%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,339.00
(+0.95%)
6,415.72
(98.80%)
📈 view plot
🚷 view threshold
1,750.00
(-0.01%)
1,767.95
(98.98%)
📈 view plot
🚷 view threshold
2,544.00
(-0.37%)
2,580.75
(98.58%)
📈 view plot
🚷 view threshold
24.00
(+40.66%)
25.03
(95.89%)
📈 view plot
🚷 view threshold
105.00
(+0.95%)
107.78
(97.42%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,702.00
(-0.30%)
15,052.73
(97.67%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,711.95
(99.62%)
📈 view plot
🚷 view threshold
6,752.00
(-0.08%)
6,783.71
(99.53%)
📈 view plot
🚷 view threshold
50.00
(+12.42%)
55.28
(90.45%)
📈 view plot
🚷 view threshold
220.00
(-0.86%)
230.42
(95.48%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,518.00
(+0.05%)
27,893.11
(98.66%)
📈 view plot
🚷 view threshold
10,585.00
(+0.17%)
10,639.41
(99.49%)
📈 view plot
🚷 view threshold
15,398.00
(+0.14%)
15,481.86
(99.46%)
📈 view plot
🚷 view threshold
86.00
(+5.26%)
90.60
(94.93%)
📈 view plot
🚷 view threshold
334.00
(-0.25%)
345.86
(96.57%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,413.00
(-0.18%)
4,667.98
(94.54%)
📈 view plot
🚷 view threshold
1,461.00
(+0.03%)
1,477.94
(98.85%)
📈 view plot
🚷 view threshold
2,158.00
(+0.03%)
2,186.05
(98.72%)
📈 view plot
🚷 view threshold
10.00
(+3.23%)
18.49
(54.09%)
📈 view plot
🚷 view threshold
63.00
(-0.46%)
69.83
(90.22%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,032.00
(-0.52%)
14,522.38
(96.62%)
📈 view plot
🚷 view threshold
5,064.00
(+0.01%)
5,080.94
(99.67%)
📈 view plot
🚷 view threshold
7,322.00
(-0.02%)
7,353.48
(99.57%)
📈 view plot
🚷 view threshold
40.00
(+13.15%)
43.72
(91.50%)
📈 view plot
🚷 view threshold
186.00
(-1.45%)
200.60
(92.72%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,707.00
(+0.30%)
23,031.97
(98.59%)
📈 view plot
🚷 view threshold
8,027.00
(+0.23%)
8,079.65
(99.35%)
📈 view plot
🚷 view threshold
11,672.00
(+0.18%)
11,756.20
(99.28%)
📈 view plot
🚷 view threshold
79.00
(+7.24%)
85.06
(92.87%)
📈 view plot
🚷 view threshold
304.00
(+0.20%)
314.75
(96.58%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,711.00
(+0.51%)
4,780.14
(98.55%)
📈 view plot
🚷 view threshold
1,502.00
(+0.03%)
1,518.94
(98.88%)
📈 view plot
🚷 view threshold
2,276.00
(-0.07%)
2,304.80
(98.75%)
📈 view plot
🚷 view threshold
11.00
(+20.44%)
15.50
(70.98%)
📈 view plot
🚷 view threshold
68.00
(+0.68%)
70.21
(96.85%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,164.00
(-0.20%)
16,509.16
(97.91%)
📈 view plot
🚷 view threshold
5,963.00
(+0.01%)
5,979.94
(99.72%)
📈 view plot
🚷 view threshold
8,659.00
(-0.02%)
8,692.64
(99.61%)
📈 view plot
🚷 view threshold
45.00
(+8.97%)
54.83
(82.07%)
📈 view plot
🚷 view threshold
208.00
(-0.67%)
217.72
(95.53%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,518.00
(-0.08%)
35,779.17
(99.27%)
📈 view plot
🚷 view threshold
14,855.00
(+0.13%)
14,908.72
(99.64%)
📈 view plot
🚷 view threshold
21,823.00
(+0.14%)
21,912.45
(99.59%)
📈 view plot
🚷 view threshold
93.00
(-1.27%)
115.80
(80.31%)
📈 view plot
🚷 view threshold
378.00
(-0.40%)
385.07
(98.16%)
🐰 View full continuous benchmarking report in Bencher

@plebhash plebhash force-pushed the fixed-tp-path-integration-tests branch from 80b9dc4 to 9d45b03 Compare October 2, 2024 15:58
@jbesraa
Copy link
Contributor

jbesraa commented Oct 2, 2024

Ok now with the static_dir change i think it makes more sense.. will test this tomorrow and review again

Copy link
Contributor

@jbesraa jbesraa left a comment

Choose a reason for hiding this comment

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

Tested this locally, with running multiple tests utilising the TP and all is good. it actually made things slightly faster.

@plebhash plebhash merged commit da77c67 into stratum-mining:main Oct 3, 2024
34 checks passed
@plebhash plebhash deleted the fixed-tp-path-integration-tests branch October 3, 2024 15:17
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 TP is downloaded every time
3 participants