Skip to content

Conversation

@Georges760
Copy link
Contributor

@Georges760 Georges760 commented Oct 19, 2024

Most of protocol/v2 crates are almost no_std, as listed here.

Having a lib crate that can be no_std or std by the selection of a feature :

#![cfg_attr(not(feature = "std"), no_std)]

or the current implementation :

#![cfg_attr(feature = "no_std", no_std)]

is only usefull if :

  • the crate could use some std related dependency (for instance std::vec::Vec)
  • but we want the crate's user to be able to not have a dependancy on std so we disable the functionalities using std

In some case we can replace the std dep by its alloc equivalent if exists (alloc::vec::Vec) and we can keep the functionality in no_std environement.

Finally, a std binary can use some no_std dependencies, but an no_std binary cannot use any std deps. So making the low level crates all no_std will make them copamtible for every kind of binary (app).

We should use the std feature only if some functionality requires std and not have any no_std equivalent.

As far as I tried all protocol/v2/ crates (libs) can be 100% no_std a,d does not need the std (or no_std) feature to optionally add std dep.

This PR is targeting to get rid of std dep without loosing any functionality or efficiency.

Note: I will make 1 commit per crate to explain what and how I am doing it.
Note2: being no_alloc is another level of complexity for deep embedded system, which is not at all this PR concern.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2024

🐰 Bencher Report

Branch1230/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,073.00📈 view plot
⚠️ NO THRESHOLD
473.00📈 view plot
⚠️ NO THRESHOLD
733.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
37.00
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
8,178.00📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
3,158.00📈 view plot
⚠️ NO THRESHOLD
38.00📈 view plot
⚠️ NO THRESHOLD
138.00
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
6,263.00📈 view plot
⚠️ NO THRESHOLD
1,750.00📈 view plot
⚠️ NO THRESHOLD
2,548.00📈 view plot
⚠️ NO THRESHOLD
22.00📈 view plot
⚠️ NO THRESHOLD
103.00
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
14,694.00📈 view plot
⚠️ NO THRESHOLD
4,694.00📈 view plot
⚠️ NO THRESHOLD
6,754.00📈 view plot
⚠️ NO THRESHOLD
48.00📈 view plot
⚠️ NO THRESHOLD
220.00
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
27,746.00📈 view plot
⚠️ NO THRESHOLD
10,645.00📈 view plot
⚠️ NO THRESHOLD
15,506.00📈 view plot
⚠️ NO THRESHOLD
89.00📈 view plot
⚠️ NO THRESHOLD
337.00
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
4,413.00📈 view plot
⚠️ NO THRESHOLD
1,461.00📈 view plot
⚠️ NO THRESHOLD
2,158.00📈 view plot
⚠️ NO THRESHOLD
10.00📈 view plot
⚠️ NO THRESHOLD
63.00
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
14,024.00📈 view plot
⚠️ NO THRESHOLD
5,064.00📈 view plot
⚠️ NO THRESHOLD
7,324.00📈 view plot
⚠️ NO THRESHOLD
38.00📈 view plot
⚠️ NO THRESHOLD
186.00
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
22,832.00📈 view plot
⚠️ NO THRESHOLD
8,040.00📈 view plot
⚠️ NO THRESHOLD
11,687.00📈 view plot
⚠️ NO THRESHOLD
87.00📈 view plot
⚠️ NO THRESHOLD
306.00
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
4,659.00📈 view plot
⚠️ NO THRESHOLD
1,502.00📈 view plot
⚠️ NO THRESHOLD
2,274.00📈 view plot
⚠️ NO THRESHOLD
15.00📈 view plot
⚠️ NO THRESHOLD
66.00
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
16,134.00📈 view plot
⚠️ NO THRESHOLD
5,963.00📈 view plot
⚠️ NO THRESHOLD
8,659.00📈 view plot
⚠️ NO THRESHOLD
46.00📈 view plot
⚠️ NO THRESHOLD
207.00
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
35,670.00📈 view plot
⚠️ NO THRESHOLD
14,888.00📈 view plot
⚠️ NO THRESHOLD
21,880.00📈 view plot
⚠️ NO THRESHOLD
98.00📈 view plot
⚠️ NO THRESHOLD
380.00
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2024

🐰 Bencher Report

Branch1230/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.06
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
75.36
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
14.67
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
256.91
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
612.34
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
148.15
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
277.25
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
380.26
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
161.96
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
455.68
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
957.41
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2024

🐰 Bencher Report

Branch1230/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,748.30
client-submit-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
7,707.10
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
8,377.50
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
943.45
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
675.37
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
⚠️ NO THRESHOLD
262.34
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
⚠️ NO THRESHOLD
156.57
client-sv1-get-submit📈 view plot
⚠️ NO THRESHOLD
6,451.40
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
⚠️ NO THRESHOLD
289.67
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
812.52
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
607.60
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
⚠️ NO THRESHOLD
222.88
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2024

🐰 Bencher Report

Branch1230/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,304.00📈 view plot
⚠️ NO THRESHOLD
3,663.00📈 view plot
⚠️ NO THRESHOLD
5,114.00📈 view plot
⚠️ NO THRESHOLD
8.00📈 view plot
⚠️ NO THRESHOLD
90.00
get_submit📈 view plot
⚠️ NO THRESHOLD
95,226.00📈 view plot
⚠️ NO THRESHOLD
59,263.00📈 view plot
⚠️ NO THRESHOLD
85,076.00📈 view plot
⚠️ NO THRESHOLD
49.00📈 view plot
⚠️ NO THRESHOLD
283.00
get_subscribe📈 view plot
⚠️ NO THRESHOLD
7,871.00📈 view plot
⚠️ NO THRESHOLD
2,758.00📈 view plot
⚠️ NO THRESHOLD
3,831.00📈 view plot
⚠️ NO THRESHOLD
17.00📈 view plot
⚠️ NO THRESHOLD
113.00
serialize_authorize📈 view plot
⚠️ NO THRESHOLD
12,041.00📈 view plot
⚠️ NO THRESHOLD
5,240.00📈 view plot
⚠️ NO THRESHOLD
7,281.00📈 view plot
⚠️ NO THRESHOLD
14.00📈 view plot
⚠️ NO THRESHOLD
134.00
serialize_deserialize_authorize📈 view plot
⚠️ NO THRESHOLD
24,452.00📈 view plot
⚠️ NO THRESHOLD
9,786.00📈 view plot
⚠️ NO THRESHOLD
13,787.00📈 view plot
⚠️ NO THRESHOLD
40.00📈 view plot
⚠️ NO THRESHOLD
299.00
serialize_deserialize_handle_authorize📈 view plot
⚠️ NO THRESHOLD
30,171.00📈 view plot
⚠️ NO THRESHOLD
11,989.00📈 view plot
⚠️ NO THRESHOLD
16,951.00📈 view plot
⚠️ NO THRESHOLD
61.00📈 view plot
⚠️ NO THRESHOLD
369.00
serialize_deserialize_handle_submit📈 view plot
⚠️ NO THRESHOLD
126,220.00📈 view plot
⚠️ NO THRESHOLD
73,117.00📈 view plot
⚠️ NO THRESHOLD
104,760.00📈 view plot
⚠️ NO THRESHOLD
120.00📈 view plot
⚠️ NO THRESHOLD
596.00
serialize_deserialize_handle_subscribe📈 view plot
⚠️ NO THRESHOLD
27,761.00📈 view plot
⚠️ NO THRESHOLD
9,577.00📈 view plot
⚠️ NO THRESHOLD
13,521.00📈 view plot
⚠️ NO THRESHOLD
69.00📈 view plot
⚠️ NO THRESHOLD
397.00
serialize_deserialize_submit📈 view plot
⚠️ NO THRESHOLD
114,825.00📈 view plot
⚠️ NO THRESHOLD
67,894.00📈 view plot
⚠️ NO THRESHOLD
97,370.00📈 view plot
⚠️ NO THRESHOLD
68.00📈 view plot
⚠️ NO THRESHOLD
489.00
serialize_deserialize_subscribe📈 view plot
⚠️ NO THRESHOLD
23,052.00📈 view plot
⚠️ NO THRESHOLD
8,129.00📈 view plot
⚠️ NO THRESHOLD
11,427.00📈 view plot
⚠️ NO THRESHOLD
43.00📈 view plot
⚠️ NO THRESHOLD
326.00
serialize_submit📈 view plot
⚠️ NO THRESHOLD
99,505.00📈 view plot
⚠️ NO THRESHOLD
61,325.00📈 view plot
⚠️ NO THRESHOLD
87,940.00📈 view plot
⚠️ NO THRESHOLD
52.00📈 view plot
⚠️ NO THRESHOLD
323.00
serialize_subscribe📈 view plot
⚠️ NO THRESHOLD
11,176.00📈 view plot
⚠️ NO THRESHOLD
4,111.00📈 view plot
⚠️ NO THRESHOLD
5,696.00📈 view plot
⚠️ NO THRESHOLD
18.00📈 view plot
⚠️ NO THRESHOLD
154.00
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 25.13%. Comparing base (dee3cae) to head (8cd634b).
Report is 118 commits behind head on main.

Files with missing lines Patch % Lines
utils/buffer/src/buffer_pool/mod.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    stratum-mining/stratum#1230      +/-   ##
==========================================
+ Coverage   19.30%   25.13%   +5.83%     
==========================================
  Files         164       20     -144     
  Lines       10849     1134    -9715     
==========================================
- Hits         2094      285    -1809     
+ Misses       8755      849    -7906     
Flag Coverage Δ
binary_codec_sv2-coverage ?
binary_serde_sv2-coverage ?
binary_sv2-coverage ?
bip32_derivation-coverage ?
buffer_sv2-coverage ?
codec_sv2-coverage ?
common_messages_sv2-coverage ?
const_sv2-coverage ?
error_handling-coverage ?
framing_sv2-coverage ?
jd_client-coverage ?
jd_server-coverage ?
job_declaration_sv2-coverage ?
key-utils-coverage ?
mining-coverage ?
mining_device-coverage ?
mining_proxy_sv2-coverage ?
noise_sv2-coverage ?
pool_sv2-coverage ?
protocols ?
roles ?
roles_logic_sv2-coverage ?
sv1-mining-device-coverage ?
sv2_ffi-coverage ?
template_distribution_sv2-coverage ?
translator_sv2-coverage ?
utils 25.13% <50.00%> (ø)
v1-coverage ?

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.

@Georges760 Georges760 force-pushed the std_logic branch 3 times, most recently from 03a2dae to fc640a7 Compare October 20, 2024 07:44
@Georges760 Georges760 changed the title std logic enforce no_std for all protocol/v2 crates Oct 28, 2024
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.

While I think the general idea is very welcome, I think addressing https://github.com/stratum-mining/stratum/issues/1200 first would make more sense as it can potentially change how we approach this. I think in #1200 we should aim to provide a logger for std and no std env and then impl Debug manually, which would allow us to remove the debug feature IIUC whats going here

@Georges760
Copy link
Contributor Author

Current binary_codec_sv2 :

  • don't compile without no_std feature (this doesn't mean it is no_std as there is no enforcement => #![cfg_attr(feature = "no_std", no_std)])
  • has no_std feature by default (default = ["no_std"])
  • nowhere (not even in the CI), its default features are disable (--no-default-features)

So it's pseudo std support os broken and unused. We can :

  • remove/clean it, and keep a real no_std crate only
  • debug it, and have a no_std crate by default, with a std feature with the debugged std functionalities

Maybe this can be discussed in #1132 ?

@Georges760
Copy link
Contributor Author

While I think the general idea is very welcome, I think addressing stratum-mining/sv2-apps#16 first would make more sense as it can potentially change how we approach this. I think in stratum-mining/sv2-apps#16 we should aim to provide a logger for std and no std env and then impl Debug manually, which would allow us to remove the debug feature IIUC whats going here

tracing has a std feature enabled by default, this means it actually add std dep to the crate that use it without disabling default features : sv1_api, binary_sv2, codec_sv2 and roles_logic_sv2 (the 4 crates listed in stratum-mining/sv2-apps#16). 2 of this 4 crates are targeted by this PR (binary_sv2 and codec_sv2) and in order for them to become no_std, I will have to no-default-features tracing, and enable std in tracing using a local feature too. This can be done before or after stratum-mining/sv2-apps#16 without problem.

If I do it before stratum-mining/sv2-apps#16, when stratum-mining/sv2-apps#16 will remove tracing with the custom logger, the std feature will be available (and can be removed if not used after all).
If stratum-mining/sv2-apps#16 should be done before, then we can limit this PR to crates not depending on binary_sv2 and codec_sv2, and wait to see what the new logger will propose for no_std support.

@Georges760 Georges760 changed the title enforce no_std for all protocol/v2 crates enforce no_std for all? protocol/v2 crates Oct 28, 2024
@jbesraa
Copy link
Contributor

jbesraa commented Oct 28, 2024

While I think the general idea is very welcome, I think addressing stratum-mining/sv2-apps#16 first would make more sense as it can potentially change how we approach this. I think in stratum-mining/sv2-apps#16 we should aim to provide a logger for std and no std env and then impl Debug manually, which would allow us to remove the debug feature IIUC whats going here

tracing has a std feature enabled by default, this means it actually add std dep to the crate that use it without disabling default features : sv1_api, binary_sv2, codec_sv2 and roles_logic_sv2 (the 4 crates listed in stratum-mining/sv2-apps#16). 2 of this 4 crates are targeted by this PR (binary_sv2 and codec_sv2) and in order for them to become no_std, I will have to no-default-features tracing, and enable std in tracing using a local feature too. This can be done before or after stratum-mining/sv2-apps#16 without problem.

If I do it before stratum-mining/sv2-apps#16, when stratum-mining/sv2-apps#16 will remove tracing with the custom logger, the std feature will be available (and can be removed if not used after all). If stratum-mining/sv2-apps#16 should be done before, then we can limit this PR to crates not depending on binary_sv2 and codec_sv2, and wait to see what the new logger will propose for no_std support.

Yea I think stratum-mining/sv2-apps#16 shouldn't necessarily be about removing tracing crate, but generalizing how we use the logger
and mainly enabling a logger in a non-std env. Making everything non-std by default would make it a bit tricky to debug the crates generally.
With that said, If stratum-mining/sv2-apps#16 will require too much time and would block this for too long, I am happy for this to get in anyway.

@Georges760 Georges760 force-pushed the std_logic branch 3 times, most recently from dfb23fe to 8ef9d5e Compare October 28, 2024 14:10
@Georges760
Copy link
Contributor Author

Actual binary_sv2 without default feature (core) and with with_serde feature, test is broken.

This PR is not fixing this.

CI does not see it because does not test it.

@Georges760
Copy link
Contributor Author

Actual framing_sv2 with with_serde feature, test is broken.

This PR is not fixing this.

CI does not see it because does not test it.

@plebhash
Copy link
Member

@Georges760 please note that we're aiming to deprecate with_serde feature soon.

I cannot give you a precise timeline but Q1 2025 would be my rough guess.

I wonder if that would make this process simpler?

@Georges760
Copy link
Contributor Author

@Georges760 please note that we're aiming to deprecate with_serde feature soon.

I cannot give you a precise timeline but Q1 2025 would be my rough guess.

I wonder if that would make this process simpler?

It make sense, as it is already broken in binary_sv2 and framing_sv2 as stated above.

So I understand the official/only codec way will be the "core" option ? Good

@Georges760
Copy link
Contributor Author

noise_sv2 has its own PR #1238.
codec_sv2 is dependant on both noise_sv2 and all the crates of this PR.

So I stop here for this PR and open for reviews.
I think it is in good shape to fullfil the OP goal.

@Georges760 Georges760 deleted the std_logic branch December 11, 2024 17:08
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 16, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 16, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 16, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 17, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
plebhash added a commit to plebhash/stratum that referenced this pull request Dec 18, 2024
@plebhash plebhash added the version-bump version bump for release management label Dec 18, 2024
@plebhash plebhash changed the title enforce no_std for all? protocol/v2 crates enforce no_std for some protocol/v2 crates Dec 20, 2024
@Georges760 Georges760 mentioned this pull request Dec 20, 2024
AkulovOleg added a commit to nomium-org/stratum that referenced this pull request Jan 14, 2025
* tp_authority_public_key update

* lock version for cargo semver-checks

* Use shorter relative path

.. and fix some styling inconsistency

* Rewrite docs in `common_messages_sv2` ..

As part of the effort to improve Stratum V2 protocols docs, this commit
aims to improves and make the documentation more comprehensive and
accessible for contributors and end users alike.

* Add README.md ..

Use the template README used across the different Stratum V2 protocol
crates to `common_messages_sv2` crate.

* modify sv2.h to make it consistent with comments changes

* Use shorter relative path

* Add README file

* Improve Job Declaration Documentation

* Add README file

* Use shorter paths

* Improve `Template Distribution` subprotocol docs

* modify sv2.h to make it consistent with comments changes

* add binary-sv2 docs

* add binary-sv2 readme.md

* add binary-sv2 custom trait example

* add binary-sv2 no-serde derive-codec docs

* add binary-sv2 no-serde derive-codec readme

* add binary-sv2 no-serde codec readme

* add binary-sv2 no-serde codec docs

* update sv2.h for binary_sv2 docs

* change doc test in derive_codec

* Minor warning and error grammar and typo fixes

* bump jdc

* Slice docs

* Buffer docs

* Lib WriteError, Write, Buffer docs

* Back buffer pool docs

* Front buffer pool docs

* InnerMemory buffer pool docs

* PoolMode docs

* BufferPool docs

* Top buffer_pool mod docs

* Buffer pool examples

* Top level crate docs + clean up

* Update README

* Sniffer::wait_for_message_type

* fix unwrap on sv1-mining-device tcp connection..

Update roles/test-utils/mining-device-sv1/src/client.rs

Co-authored-by: jbesraa <[email protected]>

* remove redundant Drop implementation from ITF TemplateProvider

* Add `translator_sv2` test

* use macos-14 as  macos runner

* disable MG tproxy CI

* Have JDS ping local mempool less frequently

Otherwise Bitcoin Core -debug=rpc logging becomes too noisy.

* Use shorter paths

* Add README mining subprotocol

* Rewrite mining subprotocol docs

* Create a lib for `mining-sv2-proxy`

* Add `mining-sv2-proxy` initializer

* lock semver-checks to 37 while replacing MSRV with stable

* bump serde_v2 major to 2.0.0..

since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230

* bump binary_sv2 for serde_sv2 dependency..

since we bumpbed serde_sv2 to 2.0.0

* bump sv2_ffi for serde_sv2 dependency..

since we bumpted serde_sv2 to 2.0.0

* bump roles/Cargo.lock..

since we bumped serde_sv2 and binary_sv2

* bump const_sv2 major to 3.0.0..

since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update serde_v2 as a follow up to stratum-mining#1230

* bump noise_sv2 for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump framing_sv2 for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump codec_sv2 for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump subprotocols for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump sv2_ffi for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump roles_logic_sv2 for const_sv2 dependency..

since we bumpbed const_sv2 to 3.0.0

* bump roles due to const_sv2 bump to 3.0.0

* bump framing_sv2 major to 3.0.0..

since v37, cargo semver-checks enforces that removal of features are breaking changes

therefore we need to update framing_v2 as a follow up to stratum-mining#1230

* bump codec_sv2 for framing_sv2 dependency..

since we bumped framing_sv2 to 3.0.0

* bump framing_sv2 dendency version on roles_logic_sv2..

crate version has already been bumped before release. no need to bump again

* bump roles due to framing_sv2 bump

* bump benches due to framing_sv2 bump

* bump message_generator_sv2 due to const_sv2

* change macos-14 to macos-13

* bump buffer_sv2..

as a follow up to stratum-mining#1230

* bump buffer_sv2 dep on roles/Cargo.lock

* bump buffer_sv2 dep on utils/Cargo.lock

* bump derive_codec_sv2..

as a consequence of stratum-mining#1231

* bump derive_codec_sv2 dep on roles/Cargo.lock

* Add framing sv2 frame and handshake frame ex

* /// -> // for private types+fns

* framing mod doc cmts + clean

* Add framing README

* add codecov.yml to remove ci error

* feat: update println! and eprintln! to info using tracing cargo.

* Wait for `NewTemplate` message to arrive instead

of failing if it is not there yet when we first check

* ci: bump TP to 0.1.13

* test: increase TP log timestamp precision

Also log rpc calls.

* `common_messages_sv2` `job_declaration_sv2` `mining_sv2` `template_distribution_sv2`: remove the `no_std` feature and make them `#![no_std]` as they never use `std` anywhere.

- bump their MAJOR version because of feature removal
- bump the dependant crates PATCH version
- updates docs

* fix: clarify logging

* remove readme field from Cargo.toml of crates that dont have a README.md

* add release-libs.sh

* release-libs.yaml use 1.75.0 toolchain

* remove readme field from Cargo.toml of crates that dont have a README.md

* avoid publishing protocols crates with all-features..

publishing with all-features is overengineering:
- no_std is being deprecated
- with_serde will be deprecated soon
- for crates with relevant features, we specifically list them for publishing

* min_ntime fix to use the one sent by TP

* header_timestamp_value_assertion_in_new_extended_mining_job test addition

* bump PATCH after timestamp-bug fix (stratum-mining#1324)

* update lockfile after roles_logic patch

* Test Pool role behavior if bad `coinbase_output`..

is provided

* Remove bad pool config MG test

* Move sniffer test to a separate file

* Derive Clone+Debug for `JobDeclaratorClient`

* Derive Clone+Debug for `JobDeclaratorServer`

* Align all integration test start_* ..

functions return signature

* Make Sniffer::drop output more verbose

* Add README.md to integration-tests

* Move integration tests to separate GH action

* Rename integration tests crate..

it's important to have a descriptive name for when this is published to crates.io

* Modularize integration tests APIs..

into the following modules:
- lib: with general purpose functions (e.g.: starters)
- sniffer
- template_provider

* Remove redundant `TestPoolSv2`..

this struct is redundant and no other roles follow this pattern
we can do the initialization inside `start_pool`

* Fix variable naming on `wait_for_client`..

the `SocketAddr` is not a client, but the socket where we will listen to
also, `listner` is a typo

* Rename sniffer channel variables..

the original naming was confusing copypasta

* Create `utils.rs` in `tests-integration`

..to hold utility functions used internaly only.

* noise_sv2: keep current (std) API unchanged, add a no_std compliant API with `*_with_rng` and `*_with_now`

* generate cargo lock

---------

Co-authored-by: GitGab19 <[email protected]>
Co-authored-by: plebhash <[email protected]>
Co-authored-by: plebhash <[email protected]>
Co-authored-by: jbesraa <[email protected]>
Co-authored-by: bit-aloo <[email protected]>
Co-authored-by: Gabriele Vernetti <[email protected]>
Co-authored-by: Pavlenex <[email protected]>
Co-authored-by: RJ Rybarczyk <[email protected]>
Co-authored-by: Sjors Provoost <[email protected]>
Co-authored-by: devworlds <[email protected]>
Co-authored-by: Georges Palauqui <[email protected]>
Co-authored-by: Gary Krause <[email protected]>
Co-authored-by: Oleg Akulov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocols Lowest level protocol logic version-bump version bump for release management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants