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

Log Bitcoin target as hex, align targets #961

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

Sjors
Copy link
Collaborator

@Sjors Sjors commented Jun 7, 2024

Make it easier to compare:

  • Bitcoin target
  • upstream target (if any)
  • hash

The Bitcoin target was previously rendered as { head: 0, tail: ... }, render it as hex instead.

Add spaces to align all three.

Before:

2024-06-07T18:01:37.745967Z DEBUG roles_logic_sv2::handlers::mining: Received SubmitSharesExtended message
2024-06-07T18:01:37.745979Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Checking target for share Extended(SubmitSharesExtended { channel_id: 1, sequence_number: 0, job_id: 1, nonce: 2355753102, ntime: 1717783221, version: 757661696, extranonce: Owned([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]) })
2024-06-07T18:01:37.746007Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Bitcoin target: Target { head: 0, tail: 2409966232598499819520 }
2024-06-07T18:01:37.746013Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Upstream target: "0000000000000000000000000000000000000000000000000000000000000000"
2024-06-07T18:01:37.746020Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Hash: "0000000000100d4e3ed6db809dc40125d673486ffc6fc28c2210bad04c660eb9"

After:

2024-06-07T18:50:31.163609Z DEBUG roles_logic_sv2::handlers::mining: Received SubmitSharesExtended message
2024-06-07T18:50:31.163620Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Checking target for share Extended(SubmitSharesExtended { channel_id: 1, sequence_number: 0, job_id: 23, nonce: 39263235, ntime: 1717786207, version: 977739776, extranonce: Owned([0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0]) })
2024-06-07T18:50:31.163648Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Bitcoin target : "0000000000000082a50000000000000000000000000000000000000000000000"
2024-06-07T18:50:31.163654Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Upstream target: "0000000000000000000000000000000000000000000000000000000000000000"
2024-06-07T18:50:31.163658Z DEBUG roles_logic_sv2::channel_logic::channel_factory: Hash           : "0000000000039c94e6f71a73861bb797c4343f550863f3b512c52670ca3b93cb"

The Rust code could probably be made prettier...

Copy link
Contributor

github-actions bot commented Jun 7, 2024

🐰Bencher

ReportFri, June 7, 2024 at 19:35:58 UTC
ProjectStratum v2 (SRI)
Branch2024/06/log-target
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)44.40 (-0.34%)45.24 (98.16%)
client_sv2_handle_message_mining✅ (view plot)74.49 (+2.17%)80.45 (92.59%)
client_sv2_mining_message_submit_standard✅ (view plot)14.63 (-0.16%)14.69 (99.57%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)249.22 (-5.59%)283.97 (87.76%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)614.13 (+3.29%)628.54 (97.71%)
client_sv2_open_channel✅ (view plot)163.81 (-1.11%)171.34 (95.60%)
client_sv2_open_channel_serialize✅ (view plot)282.42 (-0.34%)293.12 (96.35%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)372.20 (-1.72%)424.73 (87.63%)
client_sv2_setup_connection✅ (view plot)168.17 (+2.37%)175.07 (96.06%)
client_sv2_setup_connection_serialize✅ (view plot)471.83 (-0.69%)505.08 (93.42%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)954.55 (-1.55%)1,037.52 (92.00%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented Jun 7, 2024

🐰Bencher

ReportFri, June 7, 2024 at 19:35:59 UTC
ProjectStratum v2 (SRI)
Branch961/merge
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)7,142.60 (+2.76%)7,345.17 (97.24%)
client-submit-serialize-deserialize✅ (view plot)8,006.00 (+1.71%)8,334.18 (96.06%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8,573.40 (+1.67%)8,832.93 (97.06%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)887.91 (-1.13%)926.13 (95.87%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)684.28 (-1.76%)717.64 (95.35%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize✅ (view plot)244.84 (-1.34%)255.37 (95.88%)
client-sv1-get-authorize/client-sv1-get-authorize✅ (view plot)156.95 (-0.14%)162.40 (96.65%)
client-sv1-get-submit✅ (view plot)6,931.80 (+3.21%)7,144.83 (97.02%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)279.92 (+0.45%)291.13 (96.15%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)752.37 (+0.69%)775.91 (96.97%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize✅ (view plot)610.33 (-0.63%)637.21 (95.78%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)210.10 (+1.54%)220.11 (95.45%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented Jun 7, 2024

🐰Bencher

ReportFri, June 7, 2024 at 19:35:57 UTC
ProjectStratum v2 (SRI)
Branch2024/06/log-target
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
get_authorize✅ (view plot)8,406.00 (-0.33%)8,722.14 (96.38%)✅ (view plot)3,746.00 (+0.14%)3,856.60 (97.13%)✅ (view plot)5,251.00 (+0.10%)5,403.49 (97.18%)✅ (view plot)8.00 (+0.69%)10.43 (76.68%)✅ (view plot)89.00 (-1.05%)93.87 (94.82%)
get_submit✅ (view plot)95,511.00 (-0.05%)96,145.33 (99.34%)✅ (view plot)59,439.00 (-0.05%)59,780.04 (99.43%)✅ (view plot)85,351.00 (-0.06%)85,838.34 (99.43%)✅ (view plot)58.00 (+4.69%)62.48 (92.82%)✅ (view plot)282.00 (-0.04%)287.74 (98.01%)
get_subscribe✅ (view plot)7,977.00 (-0.02%)8,273.87 (96.41%)✅ (view plot)2,841.00 (+0.38%)2,941.14 (96.60%)✅ (view plot)3,967.00 (+0.32%)4,101.16 (96.73%)✅ (view plot)18.00 (+10.12%)19.78 (91.00%)✅ (view plot)112.00 (-0.58%)116.96 (95.76%)
serialize_authorize✅ (view plot)12,163.00 (-0.34%)12,501.20 (97.29%)✅ (view plot)5,317.00 (+0.10%)5,427.60 (97.96%)✅ (view plot)7,413.00 (+0.06%)7,566.82 (97.97%)✅ (view plot)12.00 (+10.92%)13.45 (89.20%)✅ (view plot)134.00 (-1.09%)140.13 (95.62%)
serialize_deserialize_authorize✅ (view plot)24,438.00 (-0.12%)24,704.36 (98.92%)✅ (view plot)9,898.00 (-0.03%)10,027.39 (98.71%)✅ (view plot)13,958.00 (-0.07%)14,152.69 (98.62%)✅ (view plot)38.00 (+3.47%)41.57 (91.42%)✅ (view plot)294.00 (-0.25%)297.44 (98.84%)
serialize_deserialize_handle_authorize✅ (view plot)30,123.00 (-0.06%)30,331.72 (99.31%)✅ (view plot)12,101.00 (+0.04%)12,211.60 (99.09%)✅ (view plot)17,123.00 (+0.03%)17,281.98 (99.08%)✅ (view plot)59.00 (+0.40%)64.67 (91.23%)✅ (view plot)363.00 (-0.20%)366.58 (99.02%)
serialize_deserialize_handle_submit✅ (view plot)126,392.00 (-0.02%)127,033.95 (99.49%)✅ (view plot)73,224.00 (-0.04%)73,621.57 (99.46%)✅ (view plot)104,942.00 (-0.04%)105,513.75 (99.46%)✅ (view plot)125.00 (+3.55%)131.69 (94.92%)✅ (view plot)595.00 (+0.03%)599.21 (99.30%)
serialize_deserialize_handle_subscribe✅ (view plot)27,451.00 (-0.02%)27,604.38 (99.44%)✅ (view plot)9,643.00 (+0.11%)9,743.14 (98.97%)✅ (view plot)13,636.00 (+0.09%)13,777.18 (98.98%)✅ (view plot)68.00 (+2.95%)73.85 (92.08%)✅ (view plot)385.00 (-0.20%)388.54 (99.09%)
serialize_deserialize_submit✅ (view plot)115,019.00 (-0.05%)115,655.52 (99.45%)✅ (view plot)68,001.00 (-0.08%)68,404.14 (99.41%)✅ (view plot)97,554.00 (-0.10%)98,152.58 (99.39%)✅ (view plot)70.00 (+0.55%)75.20 (93.08%)✅ (view plot)489.00 (+0.18%)492.39 (99.31%)
serialize_deserialize_subscribe✅ (view plot)22,870.00 (-0.02%)23,113.12 (98.95%)✅ (view plot)8,195.00 (+0.11%)8,298.83 (98.75%)✅ (view plot)11,540.00 (+0.09%)11,684.58 (98.76%)✅ (view plot)40.00 (+1.24%)44.01 (90.89%)✅ (view plot)318.00 (-0.16%)321.48 (98.92%)
serialize_submit✅ (view plot)99,828.00 (-0.07%)100,473.12 (99.36%)✅ (view plot)61,483.00 (-0.05%)61,829.44 (99.44%)✅ (view plot)88,198.00 (-0.06%)88,691.90 (99.44%)✅ (view plot)58.00 (+3.57%)62.02 (93.52%)✅ (view plot)324.00 (-0.21%)329.21 (98.42%)
serialize_subscribe✅ (view plot)11,306.00 (-0.20%)11,609.03 (97.39%)✅ (view plot)4,188.00 (+0.26%)4,288.14 (97.66%)✅ (view plot)5,826.00 (+0.23%)5,960.51 (97.74%)✅ (view plot)18.00 (+9.39%)19.05 (94.49%)✅ (view plot)154.00 (-0.80%)159.78 (96.38%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented Jun 7, 2024

🐰Bencher

ReportFri, June 7, 2024 at 19:35:59 UTC
ProjectStratum v2 (SRI)
Branch2024/06/log-target
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
client_sv2_handle_message_common✅ (view plot)2,031.00 (-0.86%)2,125.14 (95.57%)✅ (view plot)473.00 (+0.49%)486.40 (97.25%)✅ (view plot)736.00 (+0.50%)755.46 (97.42%)✅ (view plot)7.00 (+2.44%)10.34 (67.72%)✅ (view plot)36.00 (-1.72%)38.54 (93.40%)
client_sv2_handle_message_mining✅ (view plot)8,215.00 (+0.22%)8,336.19 (98.55%)✅ (view plot)2,137.00 (+0.46%)2,171.37 (98.42%)✅ (view plot)3,160.00 (+0.49%)3,216.27 (98.25%)✅ (view plot)38.00 (-1.20%)43.58 (87.19%)✅ (view plot)139.00 (+0.11%)141.98 (97.90%)
client_sv2_mining_message_submit_standard✅ (view plot)6,216.00 (-0.92%)6,388.22 (97.30%)✅ (view plot)1,750.00 (+0.03%)1,763.19 (99.25%)✅ (view plot)2,556.00 (+0.08%)2,576.07 (99.22%)✅ (view plot)18.00 (+3.51%)22.16 (81.24%)✅ (view plot)102.00 (-1.73%)106.92 (95.40%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,701.00 (-0.51%)15,033.48 (97.79%)✅ (view plot)4,694.00 (+0.01%)4,707.19 (99.72%)✅ (view plot)6,756.00 (+0.02%)6,775.33 (99.71%)✅ (view plot)49.00 (+3.72%)51.82 (94.55%)✅ (view plot)220.00 (-1.10%)229.93 (95.68%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,474.00 (-0.02%)27,845.77 (98.66%)✅ (view plot)10,545.00 (+0.03%)10,558.59 (99.87%)✅ (view plot)15,339.00 (+0.00%)15,360.85 (99.86%)✅ (view plot)89.00 (+6.23%)89.47 (99.47%)✅ (view plot)334.00 (-0.27%)345.36 (96.71%)
client_sv2_open_channel✅ (view plot)4,497.00 (+0.06%)4,611.50 (97.52%)✅ (view plot)1,461.00 (+0.06%)1,474.45 (99.09%)✅ (view plot)2,152.00 (-0.03%)2,172.76 (99.04%)✅ (view plot)14.00 (+15.95%)15.41 (90.84%)✅ (view plot)65.00 (-0.28%)68.16 (95.36%)
client_sv2_open_channel_serialize✅ (view plot)14,194.00 (-0.19%)14,457.69 (98.18%)✅ (view plot)5,064.00 (+0.02%)5,077.45 (99.74%)✅ (view plot)7,319.00 (+0.02%)7,339.29 (99.72%)✅ (view plot)38.00 (+2.29%)41.46 (91.65%)✅ (view plot)191.00 (-0.48%)198.74 (96.11%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,678.00 (+0.15%)23,029.04 (98.48%)✅ (view plot)7,987.00 (+0.05%)8,001.16 (99.82%)✅ (view plot)11,613.00 (-0.00%)11,636.48 (99.80%)✅ (view plot)78.00 (+6.44%)81.54 (95.66%)✅ (view plot)305.00 (+0.09%)315.06 (96.81%)
client_sv2_setup_connection✅ (view plot)4,669.00 (-0.63%)4,764.69 (97.99%)✅ (view plot)1,502.00 (+0.05%)1,515.45 (99.11%)✅ (view plot)2,279.00 (+0.09%)2,299.85 (99.09%)✅ (view plot)9.00 (+0.41%)13.09 (68.73%)✅ (view plot)67.00 (-1.34%)69.59 (96.28%)
client_sv2_setup_connection_serialize✅ (view plot)16,312.00 (+0.24%)16,481.56 (98.97%)✅ (view plot)5,963.00 (+0.01%)5,976.45 (99.77%)✅ (view plot)8,652.00 (-0.03%)8,677.29 (99.71%)✅ (view plot)48.00 (+7.46%)49.03 (97.90%)✅ (view plot)212.00 (+0.33%)217.12 (97.64%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,608.00 (+0.19%)35,755.38 (99.59%)✅ (view plot)14,814.00 (+0.03%)14,828.16 (99.90%)✅ (view plot)21,748.00 (-0.01%)21,772.20 (99.89%)✅ (view plot)105.00 (+5.37%)112.62 (93.23%)✅ (view plot)381.00 (+0.32%)384.55 (99.08%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@plebhash plebhash merged commit 21d02a2 into stratum-mining:dev Jun 7, 2024
13 checks passed
@Sjors Sjors deleted the 2024/06/log-target branch June 8, 2024 19:35
@plebhash plebhash mentioned this pull request Aug 18, 2024
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