Skip to content

Comments

JDS block construction and propagation fix#780

Merged
GitGab19 merged 4 commits intostratum-mining:mainfrom
GitGab19:fix-jds-block-propagation
Mar 4, 2024
Merged

JDS block construction and propagation fix#780
GitGab19 merged 4 commits intostratum-mining:mainfrom
GitGab19:fix-jds-block-propagation

Conversation

@GitGab19
Copy link
Member

@GitGab19 GitGab19 commented Mar 4, 2024

This PR fixes the way JDS manages and uses version field in the block header, taking it from the successful share instead of taking it from the DeclareMiningJob message.

Right now, since version-rolling is used, this field was changed many times by the miner and so JDS was not able to correctly build the right block header, as pointed out in the Template Provider logs as well:
2024-02-29T17:45:55Z ERROR: ProcessNewBlock: AcceptBlock FAILED (high-hash, proof of work failed).
In the past we didn't figure out the exact reason of this message, because in the meantime block were propagated also from JDC. While testing PR #761 we forced JDC to not propagate it and the result was that we couldn't propagate valid blocks found because of the aforementioned reason.

Since I applied this patch to that PR, we finally mined and properly propagated many blocks on the testnet.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2024

🐰Bencher

ReportMon, March 4, 2024 at 20:00:17 UTC
ProjectStratum v2 (SRI)
Branchfix-jds-block-propagation
Testbedsv2
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)2094.000 (+2.23%)2177.056 (96.18%)✅ (view plot)469.000 (+0.46%)484.027 (96.90%)✅ (view plot)729.000 (+0.25%)755.180 (96.53%)✅ (view plot)7.000 (+10.98%)10.768 (65.01%)✅ (view plot)38.000 (+3.13%)40.442 (93.96%)
client_sv2_handle_message_mining✅ (view plot)8096.000 (-0.19%)8223.090 (98.45%)✅ (view plot)2133.000 (+1.63%)2161.368 (98.69%)✅ (view plot)3161.000 (+1.97%)3206.487 (98.58%)✅ (view plot)35.000 (-12.50%)47.822 (73.19%)✅ (view plot)136.000 (-1.06%)140.794 (96.59%)
client_sv2_mining_message_submit_standard✅ (view plot)6250.000 (-1.18%)6474.502 (96.53%)✅ (view plot)1750.000 (+0.04%)1764.186 (99.20%)✅ (view plot)2555.000 (+0.18%)2575.426 (99.21%)✅ (view plot)18.000 (-4.49%)24.101 (74.69%)✅ (view plot)103.000 (-2.05%)109.471 (94.09%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14675.000 (+0.08%)14853.603 (98.80%)✅ (view plot)4694.000 (+0.02%)4708.186 (99.70%)✅ (view plot)6755.000 (-0.01%)6780.447 (99.62%)✅ (view plot)51.000 (+5.24%)56.105 (90.90%)✅ (view plot)219.000 (0.00%)224.109 (97.72%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27278.000 (-0.18%)27498.783 (99.20%)✅ (view plot)10537.000 (+0.01%)10551.186 (99.87%)✅ (view plot)15338.000 (+0.02%)15358.654 (99.87%)✅ (view plot)85.000 (0.00%)90.343 (94.09%)✅ (view plot)329.000 (-0.44%)335.377 (98.10%)
client_sv2_open_channel✅ (view plot)4455.000 (-0.67%)4615.045 (96.53%)✅ (view plot)1461.000 (+0.15%)1476.027 (98.98%)✅ (view plot)2155.000 (+0.15%)2174.153 (99.12%)✅ (view plot)12.000 (+7.59%)15.375 (78.05%)✅ (view plot)64.000 (-1.65%)68.265 (93.75%)
client_sv2_open_channel_serialize✅ (view plot)14146.000 (+0.27%)14304.931 (98.89%)✅ (view plot)5064.000 (+0.04%)5079.027 (99.70%)✅ (view plot)7316.000 (-0.01%)7342.578 (99.64%)✅ (view plot)43.000 (+8.75%)45.151 (95.24%)✅ (view plot)189.000 (+0.33%)193.918 (97.46%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22474.000 (-0.09%)22714.153 (98.94%)✅ (view plot)7979.000 (+0.03%)7994.027 (99.81%)✅ (view plot)11614.000 (+0.04%)11639.670 (99.78%)✅ (view plot)72.000 (-1.16%)81.166 (88.71%)✅ (view plot)300.000 (-0.20%)306.437 (97.90%)
client_sv2_setup_connection✅ (view plot)4745.000 (+0.53%)4821.381 (98.42%)✅ (view plot)1502.000 (+0.14%)1517.027 (99.01%)✅ (view plot)2275.000 (+0.12%)2300.159 (98.91%)✅ (view plot)11.000 (-3.38%)15.377 (71.54%)✅ (view plot)69.000 (+1.01%)71.075 (97.08%)
client_sv2_setup_connection_serialize✅ (view plot)16278.000 (+0.78%)16343.274 (99.60%)✅ (view plot)5963.000 (+0.04%)5978.027 (99.75%)✅ (view plot)8653.000 (-0.05%)8683.763 (99.65%)✅ (view plot)48.000 (+8.90%)49.302 (97.36%)✅ (view plot)211.000 (+1.52%)213.254 (98.94%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35580.000 (+0.47%)35591.803 (99.97%)✅ (view plot)14806.000 (+0.01%)14821.027 (99.90%)✅ (view plot)21750.000 (-0.01%)21777.018 (99.88%)✅ (view plot)92.000 (-0.58%)98.078 (93.80%)✅ (view plot)382.000 (+1.28%)382.330 (99.91%)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2024

🐰Bencher

ReportMon, March 4, 2024 at 20:00:15 UTC
ProjectStratum v2 (SRI)
Branchfix-jds-block-propagation
Testbedsv2
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)43.942 (-0.88%)45.071 (97.50%)
client_sv2_handle_message_mining✅ (view plot)72.328 (+4.53%)81.643 (88.59%)
client_sv2_mining_message_submit_standard✅ (view plot)14.656 (-0.07%)14.710 (99.63%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)276.570 (+3.70%)282.860 (97.78%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)595.660 (+0.27%)705.007 (84.49%)
client_sv2_open_channel✅ (view plot)161.440 (-2.33%)171.397 (94.19%)
client_sv2_open_channel_serialize✅ (view plot)285.150 (-1.22%)304.408 (93.67%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)380.200 (-0.96%)432.182 (87.97%)
client_sv2_setup_connection✅ (view plot)163.370 (-0.48%)169.755 (96.24%)
client_sv2_setup_connection_serialize✅ (view plot)513.530 (+7.22%)514.437 (99.82%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)964.460 (-3.56%)1083.977 (88.97%)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2024

🐰Bencher

ReportMon, March 4, 2024 at 20:00:16 UTC
ProjectStratum v2 (SRI)
Branchfix-jds-block-propagation
Testbedsv1
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)8515.000 (+0.59%)8526.637 (99.86%)✅ (view plot)3772.000 (+0.53%)3777.225 (99.86%)✅ (view plot)5295.000 (+0.64%)5303.874 (99.83%)✅ (view plot)7.000 (+7.06%)9.031 (77.51%)✅ (view plot)91.000 (+0.42%)91.736 (99.20%)
get_submit✅ (view plot)95624.000 (+0.07%)95648.258 (99.97%)✅ (view plot)59522.000 (+0.11%)59538.680 (99.97%)✅ (view plot)85499.000 (+0.13%)85527.847 (99.97%)✅ (view plot)51.000 (-4.47%)57.859 (88.15%)✅ (view plot)282.000 (-0.35%)285.390 (98.81%)
get_subscribe✅ (view plot)8042.000 (+0.58%)8092.974 (99.37%)✅ (view plot)2848.000 (+0.19%)2849.407 (99.95%)✅ (view plot)3982.000 (+0.22%)3983.433 (99.96%)✅ (view plot)14.000 (0.00%)16.212 (86.35%)✅ (view plot)114.000 (+0.95%)115.550 (98.66%)
serialize_authorize✅ (view plot)12374.000 (+1.14%)12404.500 (99.75%)✅ (view plot)5343.000 (+0.38%)5348.225 (99.90%)✅ (view plot)7454.000 (+0.41%)7463.534 (99.87%)✅ (view plot)11.000 (+8.33%)13.515 (81.39%)✅ (view plot)139.000 (+2.21%)139.724 (99.48%)
serialize_deserialize_authorize✅ (view plot)24588.000 (+0.31%)24625.534 (99.85%)✅ (view plot)9950.000 (+0.40%)9960.450 (99.90%)✅ (view plot)14048.000 (+0.50%)14068.026 (99.86%)✅ (view plot)36.000 (-1.06%)41.293 (87.18%)✅ (view plot)296.000 (+0.08%)297.820 (99.39%)
serialize_deserialize_handle_authorize✅ (view plot)30202.000 (+0.04%)30293.362 (99.70%)✅ (view plot)12127.000 (+0.17%)12132.225 (99.96%)✅ (view plot)17167.000 (+0.20%)17177.559 (99.94%)✅ (view plot)59.000 (+1.32%)64.498 (91.48%)✅ (view plot)364.000 (-0.21%)367.918 (98.94%)
serialize_deserialize_handle_submit✅ (view plot)126475.000 (+0.04%)126525.565 (99.96%)✅ (view plot)73307.000 (+0.09%)73323.680 (99.98%)✅ (view plot)105090.000 (+0.10%)105119.491 (99.97%)✅ (view plot)119.000 (+2.79%)121.493 (97.95%)✅ (view plot)594.000 (-0.37%)599.629 (99.06%)
serialize_deserialize_handle_subscribe✅ (view plot)27468.000 (-0.05%)27563.878 (99.65%)✅ (view plot)9650.000 (+0.06%)9651.407 (99.99%)✅ (view plot)13648.000 (+0.05%)13653.097 (99.96%)✅ (view plot)69.000 (+6.79%)73.018 (94.50%)✅ (view plot)385.000 (-0.32%)388.963 (98.98%)
serialize_deserialize_submit✅ (view plot)115213.000 (+0.11%)115274.865 (99.95%)✅ (view plot)68167.000 (+0.19%)68200.360 (99.95%)✅ (view plot)97843.000 (+0.23%)97899.167 (99.94%)✅ (view plot)65.000 (-3.10%)70.851 (91.74%)✅ (view plot)487.000 (-0.47%)492.218 (98.94%)
serialize_deserialize_subscribe✅ (view plot)22956.000 (+0.21%)22973.331 (99.92%)✅ (view plot)8209.000 (+0.13%)8211.813 (99.97%)✅ (view plot)11566.000 (+0.17%)11572.027 (99.95%)✅ (view plot)38.000 (-2.18%)46.448 (81.81%)✅ (view plot)320.000 (+0.29%)320.985 (99.69%)
serialize_submit✅ (view plot)100051.000 (+0.16%)100094.365 (99.96%)✅ (view plot)61566.000 (+0.10%)61582.680 (99.97%)✅ (view plot)88341.000 (+0.12%)88369.318 (99.97%)✅ (view plot)53.000 (-2.55%)57.708 (91.84%)✅ (view plot)327.000 (+0.50%)328.174 (99.64%)
serialize_subscribe✅ (view plot)11477.000 (+1.20%)11517.385 (99.65%)✅ (view plot)4195.000 (+0.13%)4196.407 (99.97%)✅ (view plot)5837.000 (+0.10%)5838.004 (99.98%)✅ (view plot)15.000 (+1.56%)16.820 (89.18%)✅ (view plot)159.000 (+2.38%)160.034 (99.35%)

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2024

🐰Bencher

ReportMon, March 4, 2024 at 20:00:17 UTC
ProjectStratum v2 (SRI)
Branch780/merge
Testbedsv1
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)7027.900 (+2.88%)7194.614 (97.68%)
client-submit-serialize-deserialize✅ (view plot)7711.700 (-0.35%)8118.426 (94.99%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8462.400 (+1.53%)8726.493 (96.97%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)891.350 (-0.35%)925.530 (96.31%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)705.700 (+1.00%)715.915 (98.57%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize🚨 (view plot | view alert)257.790 (+4.23%)255.823 (100.77%)
client-sv1-get-authorize/client-sv1-get-authorize🚨 (view plot | view alert)165.350 (+5.04%)163.135 (101.36%)
client-sv1-get-submit✅ (view plot)6751.200 (+2.32%)6890.421 (97.98%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)284.390 (+1.62%)292.924 (97.09%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)748.390 (+0.38%)765.295 (97.79%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize✅ (view plot)625.600 (+2.01%)632.449 (98.92%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)204.410 (-0.05%)213.377 (95.80%)

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

Copy link
Member

@plebhash plebhash left a comment

Choose a reason for hiding this comment

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

LGTM

@pavlenex
Copy link
Collaborator

pavlenex commented Mar 4, 2024

@GitGab19 There's a conflict that needs to be resolved.

@GitGab19
Copy link
Member Author

GitGab19 commented Mar 4, 2024

@GitGab19 There's a conflict that needs to be resolved.

Yeah I will solve it right after #772 is merged

@GitGab19
Copy link
Member Author

GitGab19 commented Mar 4, 2024

@GitGab19 There's a conflict that needs to be resolved.

Yeah I will solve it right after #772 is merged

Since async functions were introduced in PR #761, it will take a little bit to correctly rebase #772 on main.
I would proceed by merging this one first, so that we can keep on with testing in the meantime!

@GitGab19 GitGab19 merged commit 74b3c49 into stratum-mining:main Mar 4, 2024
@GitGab19 GitGab19 deleted the fix-jds-block-propagation branch July 7, 2025 16:27
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.

3 participants