From 1124f5080f1cad938792c74135b4478462acd7c2 Mon Sep 17 00:00:00 2001 From: SV2-bot <205658058+SV2-bot@users.noreply.github.com> Date: Wed, 19 Aug 2026 10:18:31 +0000 Subject: [PATCH 1/2] chore(deps): update stratum-core to e131794 --- integration-tests/Cargo.lock | 35 ++++++++++++++++++----------------- miner-apps/Cargo.lock | 35 ++++++++++++++++++----------------- pool-apps/Cargo.lock | 31 ++++++++++++++++--------------- stratum-apps/Cargo.lock | 35 ++++++++++++++++++----------------- 4 files changed, 70 insertions(+), 66 deletions(-) diff --git a/integration-tests/Cargo.lock b/integration-tests/Cargo.lock index 92897f374..c6b649fc1 100644 --- a/integration-tests/Cargo.lock +++ b/integration-tests/Cargo.lock @@ -1025,7 +1025,7 @@ checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] name = "binary_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "buffer_sv2", "derive_codec_sv2", @@ -1210,7 +1210,7 @@ dependencies = [ [[package]] name = "buffer_sv2" version = "3.0.1" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "aes-gcm", ] @@ -1347,7 +1347,7 @@ dependencies = [ [[package]] name = "channels_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -1460,7 +1460,7 @@ dependencies = [ [[package]] name = "codec_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1489,7 +1489,7 @@ dependencies = [ [[package]] name = "common_messages_sv2" version = "9.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1790,7 +1790,7 @@ dependencies = [ [[package]] name = "derive_codec_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" [[package]] name = "digest" @@ -1969,7 +1969,7 @@ dependencies = [ [[package]] name = "extensions_sv2" version = "0.3.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -2042,7 +2042,7 @@ dependencies = [ [[package]] name = "framing_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -2263,7 +2263,7 @@ dependencies = [ [[package]] name = "handlers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -2826,7 +2826,7 @@ dependencies = [ [[package]] name = "job_declaration_sv2" version = "10.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -3071,7 +3071,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mining_sv2" version = "12.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -3124,11 +3124,12 @@ dependencies = [ [[package]] name = "noise_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "chacha20poly1305", "rand 0.8.6", "secp256k1 0.28.2", + "zeroize", ] [[package]] @@ -3285,7 +3286,7 @@ dependencies = [ [[package]] name = "parsers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -4398,7 +4399,7 @@ dependencies = [ [[package]] name = "stratum-core" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -4421,7 +4422,7 @@ dependencies = [ [[package]] name = "stratum_translation" version = "0.5.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -4468,7 +4469,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sv1_api" version = "6.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -4536,7 +4537,7 @@ dependencies = [ [[package]] name = "template_distribution_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] diff --git a/miner-apps/Cargo.lock b/miner-apps/Cargo.lock index 264da2a14..713e189cf 100644 --- a/miner-apps/Cargo.lock +++ b/miner-apps/Cargo.lock @@ -839,7 +839,7 @@ checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] name = "binary_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "buffer_sv2", "derive_codec_sv2", @@ -1005,7 +1005,7 @@ dependencies = [ [[package]] name = "buffer_sv2" version = "3.0.1" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "aes-gcm", ] @@ -1136,7 +1136,7 @@ dependencies = [ [[package]] name = "channels_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -1228,7 +1228,7 @@ dependencies = [ [[package]] name = "codec_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1266,7 +1266,7 @@ dependencies = [ [[package]] name = "common_messages_sv2" version = "9.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1476,7 +1476,7 @@ dependencies = [ [[package]] name = "derive_codec_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" [[package]] name = "digest" @@ -1644,7 +1644,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "extensions_sv2" version = "0.3.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1712,7 +1712,7 @@ dependencies = [ [[package]] name = "framing_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1883,7 +1883,7 @@ dependencies = [ [[package]] name = "handlers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "job_declaration_sv2" version = "10.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -2597,7 +2597,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mining_sv2" version = "12.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -2637,11 +2637,12 @@ dependencies = [ [[package]] name = "noise_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "chacha20poly1305", "rand 0.8.5", "secp256k1 0.28.2", + "zeroize", ] [[package]] @@ -2766,7 +2767,7 @@ dependencies = [ [[package]] name = "parsers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -3770,7 +3771,7 @@ dependencies = [ [[package]] name = "stratum-core" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3793,7 +3794,7 @@ dependencies = [ [[package]] name = "stratum_translation" version = "0.5.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3840,7 +3841,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sv1_api" version = "6.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3896,7 +3897,7 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] name = "template_distribution_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] diff --git a/pool-apps/Cargo.lock b/pool-apps/Cargo.lock index efa4609b6..0a30d4e79 100644 --- a/pool-apps/Cargo.lock +++ b/pool-apps/Cargo.lock @@ -273,7 +273,7 @@ checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] name = "binary_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "buffer_sv2", "derive_codec_sv2", @@ -430,7 +430,7 @@ dependencies = [ [[package]] name = "buffer_sv2" version = "3.0.1" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "aes-gcm", ] @@ -542,7 +542,7 @@ dependencies = [ [[package]] name = "channels_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -612,7 +612,7 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "codec_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -640,7 +640,7 @@ dependencies = [ [[package]] name = "common_messages_sv2" version = "9.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -808,7 +808,7 @@ dependencies = [ [[package]] name = "derive_codec_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" [[package]] name = "digest" @@ -937,7 +937,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "extensions_sv2" version = "0.3.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -998,7 +998,7 @@ dependencies = [ [[package]] name = "framing_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1133,7 +1133,7 @@ dependencies = [ [[package]] name = "handlers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -1533,7 +1533,7 @@ dependencies = [ [[package]] name = "job_declaration_sv2" version = "10.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1653,7 +1653,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mining_sv2" version = "12.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1693,11 +1693,12 @@ dependencies = [ [[package]] name = "noise_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "chacha20poly1305", "rand", "secp256k1 0.28.2", + "zeroize", ] [[package]] @@ -1816,7 +1817,7 @@ dependencies = [ [[package]] name = "parsers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -2475,7 +2476,7 @@ dependencies = [ [[package]] name = "stratum-core" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -2542,7 +2543,7 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "template_distribution_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] diff --git a/stratum-apps/Cargo.lock b/stratum-apps/Cargo.lock index db0afb439..34025ba57 100644 --- a/stratum-apps/Cargo.lock +++ b/stratum-apps/Cargo.lock @@ -774,7 +774,7 @@ checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] name = "binary_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "buffer_sv2", "derive_codec_sv2", @@ -940,7 +940,7 @@ dependencies = [ [[package]] name = "buffer_sv2" version = "3.0.1" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "aes-gcm", ] @@ -1071,7 +1071,7 @@ dependencies = [ [[package]] name = "channels_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -1117,7 +1117,7 @@ dependencies = [ [[package]] name = "codec_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "common_messages_sv2" version = "9.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1341,7 +1341,7 @@ dependencies = [ [[package]] name = "derive_codec_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" [[package]] name = "digest" @@ -1482,7 +1482,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "extensions_sv2" version = "0.3.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -1540,7 +1540,7 @@ dependencies = [ [[package]] name = "framing_sv2" version = "8.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "buffer_sv2", @@ -1711,7 +1711,7 @@ dependencies = [ [[package]] name = "handlers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -2140,7 +2140,7 @@ dependencies = [ [[package]] name = "job_declaration_sv2" version = "10.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -2328,7 +2328,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mining_sv2" version = "12.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] @@ -2368,11 +2368,12 @@ dependencies = [ [[package]] name = "noise_sv2" version = "2.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "chacha20poly1305", "rand 0.8.5", "secp256k1 0.28.2", + "zeroize", ] [[package]] @@ -2491,7 +2492,7 @@ dependencies = [ [[package]] name = "parsers_sv2" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "common_messages_sv2", @@ -3441,7 +3442,7 @@ dependencies = [ [[package]] name = "stratum-core" version = "0.6.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3464,7 +3465,7 @@ dependencies = [ [[package]] name = "stratum_translation" version = "0.5.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3505,7 +3506,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sv1_api" version = "6.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", "bitcoin", @@ -3561,7 +3562,7 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] name = "template_distribution_sv2" version = "7.0.0" -source = "git+https://github.com/stratum-mining/stratum?branch=main#59a3e3e3bacd24ba40548022046ff8720157dd70" +source = "git+https://github.com/stratum-mining/stratum?branch=main#e13179476941ea9707d93d514b95b29105391598" dependencies = [ "binary_sv2", ] From 7587256a99ac73f302901cbbb81f0430632c8ab8 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Wed, 19 Aug 2026 16:06:41 +0530 Subject: [PATCH 2/2] state decloning update on network-helpers --- .../src/network_helpers/noise_stream.rs | 142 +++++++++--------- 1 file changed, 70 insertions(+), 72 deletions(-) diff --git a/stratum-apps/src/network_helpers/noise_stream.rs b/stratum-apps/src/network_helpers/noise_stream.rs index 392d4345e..ce03f19c6 100644 --- a/stratum-apps/src/network_helpers/noise_stream.rs +++ b/stratum-apps/src/network_helpers/noise_stream.rs @@ -13,7 +13,10 @@ use std::time::Duration; use crate::network_helpers::Error; use stratum_core::{ binary_sv2::{Deserialize, GetSize, Serialize}, - codec_sv2::{HandshakeRole, NoiseEncoder, StandardNoiseDecoder, State}, + codec_sv2::{ + HandshakeRole, NoiseEncoder, StandardNoiseDecoder, State, TransportDecryptState, + TransportEncryptState, + }, noise_sv2::INITIATOR_EXPECTED_HANDSHAKE_MESSAGE_SIZE, }; use tokio::net::{ @@ -54,7 +57,7 @@ pub struct NoiseTcpReadHalf< > { reader: OwnedReadHalf, decoder: StandardNoiseDecoder, - state: State, + state: TransportDecryptState, current_frame_buf: Vec, bytes_read: usize, } @@ -68,7 +71,7 @@ pub struct NoiseTcpWriteHalf< > { writer: OwnedWriteHalf, encoder: NoiseEncoder, - state: State, + state: TransportEncryptState, } impl NoiseTcpStream @@ -92,89 +95,84 @@ where let mut decoder = StandardNoiseDecoder::::new(); let mut encoder = NoiseEncoder::::new(); - let mut state = State::initialized(role.clone()); - - match role { - HandshakeRole::Initiator(_) => { - let mut responder_state = State::not_initialized(&role); - let first_msg = state.step_0()?; - send_message(&mut writer, first_msg.into(), &mut state, &mut encoder).await?; - debug!("First handshake message sent"); - - loop { - match receive_message(&mut reader, &mut responder_state, &mut decoder, timeout) - .await - { - Ok(second_msg) => { - debug!("Second handshake message received"); - let handshake_frame: HandShakeFrame = second_msg + let mut peer_state = State::not_initialized(&role); + let is_initiator = matches!(role, HandshakeRole::Initiator(_)); + let mut state = State::initialized(role); + + if is_initiator { + let first_msg = state.step_0()?; + send_message(&mut writer, first_msg.into(), &mut state, &mut encoder).await?; + debug!("First handshake message sent"); + + loop { + match receive_message(&mut reader, &mut peer_state, &mut decoder, timeout).await { + Ok(second_msg) => { + debug!("Second handshake message received"); + let handshake_frame: HandShakeFrame = second_msg + .try_into() + .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; + let payload: [u8; INITIATOR_EXPECTED_HANDSHAKE_MESSAGE_SIZE] = + handshake_frame + .get_payload_when_handshaking() .try_into() .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; - let payload: [u8; INITIATOR_EXPECTED_HANDSHAKE_MESSAGE_SIZE] = - handshake_frame - .get_payload_when_handshaking() - .try_into() - .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; - let transport_state = state.step_2(payload)?; - state = transport_state; - break; - } - Err(Error::CodecError(stratum_core::codec_sv2::Error::MissingBytes(_))) => { - debug!("Waiting for more bytes during handshake"); - } - Err(e) => { - error!("Handshake failed with upstream: {:?}", e); - return Err(e); - } + let transport_state = state.step_2(payload)?; + state = transport_state; + break; + } + Err(Error::CodecError(stratum_core::codec_sv2::Error::MissingBytes(_))) => { + debug!("Waiting for more bytes during handshake"); + } + Err(e) => { + error!("Handshake failed with upstream: {:?}", e); + return Err(e); } } } - HandshakeRole::Responder(_) => { - let mut initiator_state = State::not_initialized(&role); - - loop { - match receive_message(&mut reader, &mut initiator_state, &mut decoder, timeout) - .await - { - Ok(first_msg) => { - debug!("First handshake message received"); - let handshake_frame: HandShakeFrame = first_msg - .try_into() - .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; - let payload: [u8; ELLSWIFT_ENCODING_SIZE] = handshake_frame - .get_payload_when_handshaking() - .try_into() - .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; - let (second_msg, transport_state) = state.step_1(payload)?; - send_message(&mut writer, second_msg.into(), &mut state, &mut encoder) - .await?; - debug!("Second handshake message sent"); - state = transport_state; - break; - } - Err(Error::CodecError(stratum_core::codec_sv2::Error::MissingBytes(_))) => { - debug!("Waiting for more bytes during handshake"); - } - Err(e) => { - error!("Handshake failed with downstream: {:?}", e); - return Err(e); - } + } else { + loop { + match receive_message(&mut reader, &mut peer_state, &mut decoder, timeout).await { + Ok(first_msg) => { + debug!("First handshake message received"); + let handshake_frame: HandShakeFrame = first_msg + .try_into() + .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; + let payload: [u8; ELLSWIFT_ENCODING_SIZE] = handshake_frame + .get_payload_when_handshaking() + .try_into() + .map_err(|_| Error::HandshakeRemoteInvalidMessage)?; + let (second_msg, transport_state) = state.step_1(payload)?; + send_message(&mut writer, second_msg.into(), &mut state, &mut encoder) + .await?; + debug!("Second handshake message sent"); + state = transport_state; + break; + } + Err(Error::CodecError(stratum_core::codec_sv2::Error::MissingBytes(_))) => { + debug!("Waiting for more bytes during handshake"); + } + Err(e) => { + error!("Handshake failed with downstream: {:?}", e); + return Err(e); } } } - }; + } + // Give each half only the direction it uses: the writer encrypts, the reader decrypts. + let (encrypt_state, decrypt_state) = state.split_transport()?; + Ok(Self { reader: NoiseTcpReadHalf { reader, decoder, - state: state.clone(), + state: decrypt_state, current_frame_buf: vec![], bytes_read: 0, }, writer: NoiseTcpWriteHalf { writer, encoder, - state, + state: encrypt_state, }, }) } @@ -195,7 +193,7 @@ where /// /// Not cancellation-safe: A canceled write may cause partial writes or state corruption. pub async fn write_frame(&mut self, frame: StandardEitherFrame) -> Result<(), Error> { - let buf = self.encoder.encode(frame, &mut self.state)?; + let buf = self.encoder.encode_transport(frame, &mut self.state)?; self.writer .write_all(buf.as_ref()) .await @@ -210,7 +208,7 @@ where /// - `Ok(false)` if the socket is not ready (would block). /// - `Err(_)` on socket or encoding errors. pub fn try_write_frame(&mut self, frame: StandardEitherFrame) -> Result { - let buf = self.encoder.encode(frame, &mut self.state)?; + let buf = self.encoder.encode_transport(frame, &mut self.state)?; match self.writer.try_write(buf.as_ref()) { Ok(n) if n == buf.len() => Ok(true), @@ -270,7 +268,7 @@ where self.bytes_read = 0; - match self.decoder.next_frame(&mut self.state) { + match self.decoder.next_transport_frame(&mut self.state) { Ok(frame) => return Ok(frame), Err(stratum_core::codec_sv2::Error::MissingBytes(_)) => { tokio::task::yield_now().await; @@ -315,7 +313,7 @@ where self.bytes_read = 0; - match self.decoder.next_frame(&mut self.state) { + match self.decoder.next_transport_frame(&mut self.state) { Ok(frame) => Ok(Some(frame)), Err(stratum_core::codec_sv2::Error::MissingBytes(_)) => Ok(None), Err(e) => Err(Error::CodecError(e)),