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

Rrp 169 rust auth proto #1190

Closed

Conversation

mlgodskz
Copy link

@mlgodskz mlgodskz commented Oct 8, 2024

  1. Простейший сервер на Rust который получает {"id": 1, "method": "mining.authorize", "params": ["username.worker", "password"]} и отдает {"id":1,"result":true,"error":null} (имитирует общение по Stratum V1 протоколу).
  2. auth_service.rs - для связи с сервером (вынес в отдельный модуль, по хорошему там бы весь движок из этих простыней растащить по модулям, но кто ж этим заниматься будет)))).
  3. И в fn handle_authorize добавил вызов auth_service через хитрый block_in_place() чтобы все это не переписывать на асинхронность (мне пока непонятны трудозатраты на подобное, вроде должно быть быстро, но это неточно, зависит от всего пайплайна). И тут как раз начинаются нюансы, которые еще предстоит исследовать.

Но в целом проброс логики на внешний сервер уже работает, там детали остались. Но сейчас не они главное, главное по архитектуре понять. Нужно еще время.

@mlgodskz mlgodskz closed this Oct 8, 2024
Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1190/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,076.00📈 view plot
⚠️ NO THRESHOLD
476.00📈 view plot
⚠️ NO THRESHOLD
736.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
37.00
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
8,208.00📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
3,158.00📈 view plot
⚠️ NO THRESHOLD
37.00📈 view plot
⚠️ NO THRESHOLD
139.00
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
6,270.00📈 view plot
⚠️ NO THRESHOLD
1,753.00📈 view plot
⚠️ NO THRESHOLD
2,550.00📈 view plot
⚠️ NO THRESHOLD
23.00📈 view plot
⚠️ NO THRESHOLD
103.00
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
14,633.00📈 view plot
⚠️ NO THRESHOLD
4,697.00📈 view plot
⚠️ NO THRESHOLD
6,758.00📈 view plot
⚠️ NO THRESHOLD
49.00📈 view plot
⚠️ NO THRESHOLD
218.00
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
27,453.00📈 view plot
⚠️ NO THRESHOLD
10,588.00📈 view plot
⚠️ NO THRESHOLD
15,403.00📈 view plot
⚠️ NO THRESHOLD
86.00📈 view plot
⚠️ NO THRESHOLD
332.00
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
4,348.00📈 view plot
⚠️ NO THRESHOLD
1,464.00📈 view plot
⚠️ NO THRESHOLD
2,163.00📈 view plot
⚠️ NO THRESHOLD
10.00📈 view plot
⚠️ NO THRESHOLD
61.00
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
13,921.00📈 view plot
⚠️ NO THRESHOLD
5,067.00📈 view plot
⚠️ NO THRESHOLD
7,331.00📈 view plot
⚠️ NO THRESHOLD
37.00📈 view plot
⚠️ NO THRESHOLD
183.00
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
22,680.00📈 view plot
⚠️ NO THRESHOLD
8,030.00📈 view plot
⚠️ NO THRESHOLD
11,675.00📈 view plot
⚠️ NO THRESHOLD
80.00📈 view plot
⚠️ NO THRESHOLD
303.00
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
4,646.00📈 view plot
⚠️ NO THRESHOLD
1,505.00📈 view plot
⚠️ NO THRESHOLD
2,281.00📈 view plot
⚠️ NO THRESHOLD
11.00📈 view plot
⚠️ NO THRESHOLD
66.00
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
16,079.00📈 view plot
⚠️ NO THRESHOLD
5,966.00📈 view plot
⚠️ NO THRESHOLD
8,669.00📈 view plot
⚠️ NO THRESHOLD
40.00📈 view plot
⚠️ NO THRESHOLD
206.00
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
35,453.00📈 view plot
⚠️ NO THRESHOLD
14,858.00📈 view plot
⚠️ NO THRESHOLD
21,828.00📈 view plot
⚠️ NO THRESHOLD
93.00📈 view plot
⚠️ NO THRESHOLD
376.00
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1190/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.68
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
74.87
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
14.74
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
255.82
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
610.11
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
166.41
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
279.93
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
375.93
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
167.53
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
463.38
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,046.40
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1190/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,985.50
client-submit-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
8,022.10
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
8,500.80
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
915.41
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
705.20
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
⚠️ NO THRESHOLD
247.92
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
⚠️ NO THRESHOLD
159.34
client-sv1-get-submit📈 view plot
⚠️ NO THRESHOLD
6,714.00
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
⚠️ NO THRESHOLD
275.35
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
777.77
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
621.52
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
⚠️ NO THRESHOLD
215.42
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1190/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,470.00📈 view plot
⚠️ NO THRESHOLD
3,746.00📈 view plot
⚠️ NO THRESHOLD
5,250.00📈 view plot
⚠️ NO THRESHOLD
7.00📈 view plot
⚠️ NO THRESHOLD
91.00
get_submit📈 view plot
⚠️ NO THRESHOLD
95,403.00📈 view plot
⚠️ NO THRESHOLD
59,439.00📈 view plot
⚠️ NO THRESHOLD
85,363.00📈 view plot
⚠️ NO THRESHOLD
48.00📈 view plot
⚠️ NO THRESHOLD
280.00
get_subscribe📈 view plot
⚠️ NO THRESHOLD
8,063.00📈 view plot
⚠️ NO THRESHOLD
2,841.00📈 view plot
⚠️ NO THRESHOLD
3,968.00📈 view plot
⚠️ NO THRESHOLD
14.00📈 view plot
⚠️ NO THRESHOLD
115.00
serialize_authorize📈 view plot
⚠️ NO THRESHOLD
12,321.00📈 view plot
⚠️ NO THRESHOLD
5,317.00📈 view plot
⚠️ NO THRESHOLD
7,411.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
139.00
serialize_deserialize_authorize📈 view plot
⚠️ NO THRESHOLD
24,807.00📈 view plot
⚠️ NO THRESHOLD
9,868.00📈 view plot
⚠️ NO THRESHOLD
13,927.00📈 view plot
⚠️ NO THRESHOLD
34.00📈 view plot
⚠️ NO THRESHOLD
306.00
serialize_deserialize_handle_authorize📈 view plot
⚠️ NO THRESHOLD
30,500.00📈 view plot
⚠️ NO THRESHOLD
12,071.00📈 view plot
⚠️ NO THRESHOLD
17,090.00📈 view plot
⚠️ NO THRESHOLD
57.00📈 view plot
⚠️ NO THRESHOLD
375.00
serialize_deserialize_handle_submit📈 view plot
⚠️ NO THRESHOLD
126,624.00📈 view plot
⚠️ NO THRESHOLD
73,280.00📈 view plot
⚠️ NO THRESHOLD
105,049.00📈 view plot
⚠️ NO THRESHOLD
108.00📈 view plot
⚠️ NO THRESHOLD
601.00
serialize_deserialize_handle_subscribe📈 view plot
⚠️ NO THRESHOLD
28,138.00📈 view plot
⚠️ NO THRESHOLD
9,659.00📈 view plot
⚠️ NO THRESHOLD
13,653.00📈 view plot
⚠️ NO THRESHOLD
69.00📈 view plot
⚠️ NO THRESHOLD
404.00
serialize_deserialize_submit📈 view plot
⚠️ NO THRESHOLD
115,299.00📈 view plot
⚠️ NO THRESHOLD
68,057.00📈 view plot
⚠️ NO THRESHOLD
97,649.00📈 view plot
⚠️ NO THRESHOLD
65.00📈 view plot
⚠️ NO THRESHOLD
495.00
serialize_deserialize_subscribe📈 view plot
⚠️ NO THRESHOLD
23,515.00📈 view plot
⚠️ NO THRESHOLD
8,211.00📈 view plot
⚠️ NO THRESHOLD
11,560.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
336.00
serialize_submit📈 view plot
⚠️ NO THRESHOLD
99,864.00📈 view plot
⚠️ NO THRESHOLD
61,483.00📈 view plot
⚠️ NO THRESHOLD
88,204.00📈 view plot
⚠️ NO THRESHOLD
50.00📈 view plot
⚠️ NO THRESHOLD
326.00
serialize_subscribe📈 view plot
⚠️ NO THRESHOLD
11,460.00📈 view plot
⚠️ NO THRESHOLD
4,188.00📈 view plot
⚠️ NO THRESHOLD
5,825.00📈 view plot
⚠️ NO THRESHOLD
14.00📈 view plot
⚠️ NO THRESHOLD
159.00
🐰 View full continuous benchmarking report in Bencher

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.

2 participants