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

Bump rust-bitcoin to v0.32.5 #1487

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

GitGab19
Copy link
Collaborator

This PR bumps bitcoin crate we use to its 0.32.5 version.

I grouped commits by categories of changes and adaptations:

  • uint256 removal
  • Block header
  • Hashes
  • Transaction
  • Script/ScriptBuf

I really recommend to review commit by commit, to make the work easier.

Close #1457

@GitGab19 GitGab19 changed the title Bump rust-bitcoin to v.0.32.5 Bump rust-bitcoin to v0.32.5 Feb 17, 2025
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 62.90323% with 23 lines in your changes missing coverage. Please review.

Project coverage is 18.34%. Comparing base (bec1d3e) to head (0c4276e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
protocols/v2/roles-logic-sv2/src/utils.rs 77.41% 7 Missing ⚠️
...les-logic-sv2/src/channel_logic/channel_factory.rs 33.33% 6 Missing ⚠️
roles/test-utils/mining-device/src/lib/mod.rs 0.00% 4 Missing ⚠️
roles/jd-server/src/lib/mempool/mod.rs 0.00% 2 Missing ⚠️
roles/test-utils/mining-device-sv1/src/miner.rs 0.00% 2 Missing ⚠️
roles/jd-client/src/lib/job_declarator/mod.rs 0.00% 1 Missing ⚠️
...d-server/src/lib/job_declarator/message_handler.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1487      +/-   ##
==========================================
+ Coverage   18.28%   18.34%   +0.05%     
==========================================
  Files         127      127              
  Lines        9738     9723      -15     
==========================================
+ Hits         1781     1784       +3     
+ Misses       7957     7939      -18     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <0.00%> (ø)
binary_sv2-coverage 6.96% <0.00%> (+<0.01%) ⬆️
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 24.88% <ø> (ø)
codec_sv2-coverage 0.02% <0.00%> (+<0.01%) ⬆️
common_messages_sv2-coverage 0.17% <0.00%> (+<0.01%) ⬆️
const_sv2-coverage 0.00% <0.00%> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.37% <0.00%> (+<0.01%) ⬆️
jd_client-coverage 0.42% <0.00%> (+<0.01%) ⬆️
jd_server-coverage 13.07% <25.00%> (+0.08%) ⬆️
job_declaration_sv2-coverage 0.00% <0.00%> (ø)
key-utils-coverage 2.38% <ø> (ø)
mining-coverage 3.17% <0.00%> (+<0.01%) ⬆️
mining_device-coverage 0.00% <0.00%> (ø)
mining_proxy_sv2-coverage 0.82% <ø> (+<0.01%) ⬆️
noise_sv2-coverage 5.79% <0.00%> (+<0.01%) ⬆️
protocols 24.00% <73.46%> (+0.09%) ⬆️
roles 7.73% <23.07%> (+0.01%) ⬆️
roles_logic_sv2-coverage 11.70% <73.46%> (+0.08%) ⬆️
sv2_ffi-coverage 0.00% <0.00%> (ø)
template_distribution_sv2-coverage 0.00% <0.00%> (ø)
translator_sv2-coverage 9.58% <100.00%> (+0.04%) ⬆️
utils 25.04% <ø> (ø)
v1-coverage 3.11% <0.00%> (+<0.01%) ⬆️

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.

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.

Looks good, thats a big jump to 0.32.5. Added few comments.
I think by the end of the review it would be best to squash all commits into a single one as none of them compiles on its own.

@plebhash
Copy link
Collaborator

looks like some recent PR merges introduced conflicts here

@GitGab19
Copy link
Collaborator Author

looks like some recent PR merges introduced conflicts here

Solved.

This PR is ready for review.

@plebhash
Copy link
Collaborator

I was able to mine several signet blocks with the code from this PR

http://75.119.150.111:8080/block/00000000003ef32fc7a8e7d0b376e626b7b1c825081ed82af1396d001f5b6fa1

here's the logs:

pool

    Finished dev [optimized + debuginfo] target(s) in 0.11s
     Running `/Users/plebhash/develop/stratum/roles/target/debug/pool_sv2 -c config-examples/pool-config-local-tp-example.toml`
2025-02-18T21:03:48.206844Z  INFO pool_sv2::lib::template_receiver: Connected to template distribution server at 127.0.0.1:8442
2025-02-18T21:03:48.209881Z  INFO roles_logic_sv2::handlers::common: Received SetupConnectionSuccess: version=2, flags=0
2025-02-18T21:03:48.210036Z  INFO pool_sv2::lib::mining_pool: PUB KEY: Ok([TxOut { value: 0 SAT, script_pubkey: Script(OP_0 OP_PUSHBYTES_20 ebe1b7dcc293ccaa0ee743a86f89df8258c208fc) }])
2025-02-18T21:03:48.210179Z  INFO pool_sv2::lib::mining_pool: Starting up pool listener
2025-02-18T21:03:48.210293Z  INFO pool_sv2::lib::mining_pool: Listening for encrypted connection on: 0.0.0.0:34254
2025-02-18T21:03:49.435537Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 26, is future: true
2025-02-18T21:03:49.435661Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 26
2025-02-18T21:04:03.193216Z  INFO roles_logic_sv2::handlers::common: Received SetupConnection: version=2, flags=110
2025-02-18T21:04:11.059630Z  INFO roles_logic_sv2::handlers::mining: Received OpenExtendedMiningChannel from: ABC with id: 0
2025-02-18T21:04:15.569371Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJob message for channel: 1, with id: 1
2025-02-18T21:04:21.061560Z  INFO roles_logic_sv2::handlers::mining: Received UpdateChannel->GroupAndExtended message
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:33.593860Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000001b6a1569bde0993f3df7cdbbf414d74f06c98cf063e98b7697c45a
2025-02-18T21:04:33.597205Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 29, is future: false
2025-02-18T21:04:34.605557Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 31, is future: false
2025-02-18T21:04:35.607529Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJob message for channel: 1, with id: 2
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025815Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 000000000027018d22f4977361f00364f47be9dacac2cc7f5cdf48844c4f6ac3
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025844Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000000b7e43da94566a1307626a1fa5e13dfa194ce6487bdd57262a112f
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025856Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 0000000000a7304028f31675e5a3015f93d1c263767b1a70e35f6d16bd4cc145
2025-02-18T21:04:44.027655Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 33, is future: false
2025-02-18T21:04:46.035442Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJob message for channel: 1, with id: 3
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:46.035688Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000009c59bec0e09fc1b393d2a32d9de46fa7686cd17a7189eeb464831e
2025-02-18T21:04:46.036704Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 35, is future: false
2025-02-18T21:04:47.039512Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJob message for channel: 1, with id: 4

jds

    Finished dev [optimized + debuginfo] target(s) in 0.12s
     Running `/Users/plebhash/develop/stratum/roles/target/debug/jd_server -c config-examples/jds-config-local-example.toml`
2025-02-18T21:03:57.061470Z  INFO jd_server::lib::job_declarator: JD INITIALIZED
2025-02-18T21:03:57.062379Z  WARN jd_server::lib: EmptyMempool
2025-02-18T21:03:57.062391Z  WARN jd_server::lib: Template Provider is running, but its mempool is empty (possible reasons: you're testing in testnet, signet, or regtest)
2025-02-18T21:04:03.195684Z  INFO jd_server::lib::job_declarator: Sending success message for proxy
2025-02-18T21:04:03.196236Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([1, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:03.196255Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 1, mining_job_token: Owned([2, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:15.568800Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJob with id: 1
2025-02-18T21:04:15.568981Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([3, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:33.593717Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:33.593840Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.024142Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:34.024163Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.605771Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJob with id: 2
2025-02-18T21:04:34.605788Z  INFO jd_server::lib::job_declarator::message_handler: No transactions to remove from mempool
2025-02-18T21:04:34.605967Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([4, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:35.607072Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJob with id: 3
2025-02-18T21:04:35.607085Z  INFO jd_server::lib::job_declarator::message_handler: No transactions to remove from mempool
2025-02-18T21:04:35.607242Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([5, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:44.025689Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:44.025718Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.026024Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:44.026037Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.026062Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:44.026066Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:45.867717Z  INFO roles_logic_sv2::handlers::job_declaration: Received SubmitSolution
2025-02-18T21:04:45.867742Z  INFO jd_server::lib::job_declarator: All transactions in downstream job are recognized correctly by the JD Server
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:46.034993Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJob with id: 4
2025-02-18T21:04:46.035008Z  INFO jd_server::lib::job_declarator::message_handler: No transactions to remove from mempool
2025-02-18T21:04:46.035144Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([6, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
2025-02-18T21:04:47.039030Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJob with id: 5
2025-02-18T21:04:47.039052Z  INFO jd_server::lib::job_declarator::message_handler: No transactions to remove from mempool
2025-02-18T21:04:47.039282Z  INFO jd_server::lib::job_declarator::message_handler: Sending AllocateMiningJobTokenSuccess to proxy AllocateMiningJobTokenSuccess(AllocateMiningJobTokenSuccess { request_id: 0, mining_job_token: Owned([7, 0, 0, 0]), coinbase_output_max_additional_size: 100, coinbase_output: Owned([0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 235, 225, 183, 220, 194, 147, 204, 170, 14, 231, 67, 168, 111, 137, 223, 130, 88, 194, 8, 252]), async_mining_allowed: true })
^C2025-02-18T21:04:48.448844Z  INFO jd_server::lib: Interrupt received

jdc

    Finished dev [optimized + debuginfo] target(s) in 0.11s
     Running `/Users/plebhash/develop/stratum/roles/target/debug/jd_client -c config-examples/jdc-config-local-example.toml`
2025-02-18T21:04:03.190808Z  INFO jd_client::lib::upstream_sv2::upstream: PROXY SERVER - ACCEPTING FROM UPSTREAM: 127.0.0.1:34254
2025-02-18T21:04:03.193430Z  INFO roles_logic_sv2::handlers::common: Received SetupConnectionSuccess: version=2, flags=110
2025-02-18T21:04:03.193467Z  INFO jd_client::lib: Connected to Upstream!
2025-02-18T21:04:03.195506Z  INFO jd_client::lib::job_declarator: JD proxy: setupconnection Proxy address: 127.0.0.1:34265
2025-02-18T21:04:03.195941Z  INFO roles_logic_sv2::handlers::common: Received SetupConnectionSuccess: version=2, flags=1
2025-02-18T21:04:03.195948Z  INFO jd_client::lib::job_declarator: JD CONNECTED
2025-02-18T21:04:03.196032Z  INFO jd_client::lib::downstream: Listening for downstream mining connections on 127.0.0.1:34265
2025-02-18T21:04:11.058480Z  INFO roles_logic_sv2::handlers::common: Received SetupConnection: version=2, flags=100
2025-02-18T21:04:11.059357Z  INFO roles_logic_sv2::handlers::mining: Received OpenExtendedMiningChannel from: ABC with id: 0
2025-02-18T21:04:11.059807Z  INFO roles_logic_sv2::handlers::mining: Received OpenExtendedMiningChannelSuccess with request id: 0 and channel id: 1
2025-02-18T21:04:11.059817Z  INFO jd_client::lib::upstream_sv2::upstream: Receive open extended mining channel success
2025-02-18T21:04:11.059986Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 0 with job id: 1 is_future: true
2025-02-18T21:04:11.059994Z  WARN jd_client::lib::upstream_sv2::upstream: Extended job received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR
2025-02-18T21:04:11.060029Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 1
2025-02-18T21:04:11.060033Z  WARN jd_client::lib::upstream_sv2::upstream: SNPH received from upstream, proxy ignored it, and used the one declared by JDC
2025-02-18T21:04:11.551133Z  INFO jd_client::lib::template_receiver: Template Receiver try to set up connection
2025-02-18T21:04:12.556292Z  INFO roles_logic_sv2::handlers::common: Received SetupConnectionSuccess: version=2, flags=0
2025-02-18T21:04:12.556347Z  INFO jd_client::lib::template_receiver: Template Receiver connection set up
2025-02-18T21:04:14.566693Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 27, is future: true
2025-02-18T21:04:14.566881Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 27
2025-02-18T21:04:14.566896Z  INFO jd_client::lib::template_receiver: Received SetNewPrevHash, waiting for IS_NEW_TEMPLATE_HANDLED
2025-02-18T21:04:14.566901Z  INFO jd_client::lib::template_receiver: IS_NEW_TEMPLATE_HANDLED ok
2025-02-18T21:04:15.568501Z  INFO roles_logic_sv2::handlers::template_distribution: Received RequestTransactionDataSuccess for template: 27
2025-02-18T21:04:15.569090Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJobSuccess with id 1
2025-02-18T21:04:15.569135Z  INFO jd_client::lib::upstream_sv2::upstream: Sending set custom mining job
2025-02-18T21:04:15.569496Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJobSuccess for channel id: 1 for job id: 1
2025-02-18T21:04:15.569503Z  INFO jd_client::lib::upstream_sv2::upstream: Set custom mining job success 1
2025-02-18T21:04:21.061169Z  INFO roles_logic_sv2::handlers::mining: Received UpdateChannel->Extended message
2025-02-18T21:04:21.061814Z  INFO roles_logic_sv2::handlers::mining: Received SetTarget for channel id: 1
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:33.593283Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000001b6a1569bde0993f3df7cdbbf414d74f06c98cf063e98b7697c45a
2025-02-18T21:04:33.597190Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 28, is future: true
2025-02-18T21:04:33.597310Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 28
2025-02-18T21:04:33.597322Z  INFO jd_client::lib::template_receiver: Received SetNewPrevHash, waiting for IS_NEW_TEMPLATE_HANDLED
2025-02-18T21:04:33.597328Z  INFO jd_client::lib::template_receiver: IS_NEW_TEMPLATE_HANDLED ok
2025-02-18T21:04:33.597591Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 2 is_future: false
2025-02-18T21:04:33.597605Z  WARN jd_client::lib::upstream_sv2::upstream: Extended job received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.023970Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000003423dced6fea01a2d51d685b8c9007459c9de625d4aad29f791832
2025-02-18T21:04:34.605548Z  INFO roles_logic_sv2::handlers::template_distribution: Received RequestTransactionDataSuccess for template: 28
2025-02-18T21:04:34.605612Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 30, is future: true
2025-02-18T21:04:34.605745Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 3 is_future: false
2025-02-18T21:04:34.605767Z  WARN jd_client::lib::upstream_sv2::upstream: Extended job received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR
2025-02-18T21:04:34.605747Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 30
2025-02-18T21:04:34.605781Z  INFO jd_client::lib::template_receiver: Received SetNewPrevHash, waiting for IS_NEW_TEMPLATE_HANDLED
2025-02-18T21:04:34.605786Z  INFO jd_client::lib::template_receiver: IS_NEW_TEMPLATE_HANDLED ok
2025-02-18T21:04:34.606069Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJobSuccess with id 2
2025-02-18T21:04:35.606861Z  INFO roles_logic_sv2::handlers::template_distribution: Received RequestTransactionDataSuccess for template: 30
2025-02-18T21:04:35.607359Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJobSuccess with id 3
2025-02-18T21:04:35.607378Z  INFO jd_client::lib::upstream_sv2::upstream: Sending set custom mining job
2025-02-18T21:04:35.607654Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJobSuccess for channel id: 1 for job id: 2
2025-02-18T21:04:35.607663Z  INFO jd_client::lib::upstream_sv2::upstream: Set custom mining job success 2
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025341Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 000000000027018d22f4977361f00364f47be9dacac2cc7f5cdf48844c4f6ac3
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025375Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000000b7e43da94566a1307626a1fa5e13dfa194ce6487bdd57262a112f
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:44.025388Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 0000000000a7304028f31675e5a3015f93d1c263767b1a70e35f6d16bd4cc145
2025-02-18T21:04:44.027604Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 32, is future: true
2025-02-18T21:04:44.027670Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 32
2025-02-18T21:04:44.027678Z  INFO jd_client::lib::template_receiver: Received SetNewPrevHash, waiting for IS_NEW_TEMPLATE_HANDLED
2025-02-18T21:04:44.027681Z  INFO jd_client::lib::template_receiver: IS_NEW_TEMPLATE_HANDLED ok
2025-02-18T21:04:44.027857Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 4 is_future: false
2025-02-18T21:04:44.027868Z  WARN jd_client::lib::upstream_sv2::upstream: Extended job received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:45.867542Z  INFO roles_logic_sv2::channel_logic::channel_factory: Share hash meet bitcoin target: 00000000009c59bec0e09fc1b393d2a32d9de46fa7686cd17a7189eeb464831e
2025-02-18T21:04:46.034801Z  INFO roles_logic_sv2::handlers::template_distribution: Received RequestTransactionDataSuccess for template: 32
2025-02-18T21:04:46.035222Z  INFO roles_logic_sv2::handlers::job_declaration: Received DeclareMiningJobSuccess with id 4
2025-02-18T21:04:46.035254Z  INFO jd_client::lib::upstream_sv2::upstream: Sending set custom mining job
2025-02-18T21:04:46.035537Z  INFO roles_logic_sv2::handlers::mining: Received SetCustomMiningJobSuccess for channel id: 1 for job id: 3
2025-02-18T21:04:46.035544Z  INFO jd_client::lib::upstream_sv2::upstream: Set custom mining job success 3
2025-02-18T21:04:46.036709Z  INFO roles_logic_sv2::handlers::template_distribution: Received NewTemplate with id: 34, is future: true
2025-02-18T21:04:46.036780Z  INFO roles_logic_sv2::handlers::template_distribution: Received SetNewPrevHash for template: 34
2025-02-18T21:04:46.036787Z  INFO jd_client::lib::template_receiver: Received SetNewPrevHash, waiting for IS_NEW_TEMPLATE_HANDLED
2025-02-18T21:04:46.036792Z  INFO jd_client::lib::template_receiver: IS_NEW_TEMPLATE_HANDLED ok
2025-02-18T21:04:46.036817Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 5 is_future: false
2025-02-18T21:04:46.036828Z  WARN jd_client::lib::upstream_sv2::upstream: Extended job received from upstream, proxy ignore it, and use the one declared by JOB DECLARATOR

tproxy

    Finished dev [optimized + debuginfo] target(s) in 0.11s
     Running `/Users/plebhash/develop/stratum/roles/target/debug/translator_sv2 -c config-examples/tproxy-config-local-jdc-example.toml`
2025-02-18T21:04:11.055334Z  INFO translator_sv2: Proxy Config: ProxyConfig { upstream_address: "127.0.0.1", upstream_port: 34265, upstream_authority_pubkey: Secp256k1PublicKey(XOnlyPublicKey(e76c2b09eed7baa394dbb794896e913c86a5f719ea803bc0a4aaa104383cee24ac5b32268edbcc58d105534c281f112f5e7a5c1ff0e2d113bd938dc7698e2cce)), downstream_address: "0.0.0.0", downstream_port: 34255, max_supported_version: 2, min_supported_version: 2, min_extranonce2_size: 8, downstream_difficulty_config: DownstreamDifficultyConfig { min_individual_miner_hashrate: 1000000.0, shares_per_minute: 6.0, submits_since_last_update: 0, timestamp_of_last_update: 0 }, upstream_difficulty_config: UpstreamDifficultyConfig { channel_diff_update_interval: 60, channel_nominal_hashrate: 1000000.0, timestamp_of_last_update: 0, should_aggregate: false } }
2025-02-18T21:04:11.056159Z  INFO translator_sv2::lib::upstream_sv2::upstream: PROXY SERVER - ACCEPTING FROM UPSTREAM: 127.0.0.1:34265
2025-02-18T21:04:11.058949Z  INFO roles_logic_sv2::handlers::common: Received SetupConnectionSuccess: version=2, flags=10
2025-02-18T21:04:11.059052Z  INFO translator_sv2::lib: Connected to Upstream!
2025-02-18T21:04:11.060214Z  INFO roles_logic_sv2::handlers::mining: Received OpenExtendedMiningChannelSuccess with request id: 0 and channel id: 1
2025-02-18T21:04:11.060256Z  INFO translator_sv2::lib::upstream_sv2::upstream: Up: Successfully Opened Extended Mining Channel
2025-02-18T21:04:14.567229Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 1 is_future: true
2025-02-18T21:04:14.567294Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 1
2025-02-18T21:04:21.062031Z  INFO roles_logic_sv2::handlers::mining: Received SetTarget for channel id: 1
2025-02-18T21:04:21.062074Z  INFO translator_sv2::lib::upstream_sv2::upstream: SetTarget: SetTarget { channel_id: 1, maximum_target: Ref([255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]) }
2025-02-18T21:04:31.857369Z  INFO translator_sv2::lib::downstream_sv1::downstream: PROXY SERVER - ACCEPTING FROM DOWNSTREAM: 192.168.1.117:51807
2025-02-18T21:04:31.870484Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Configuring
2025-02-18T21:04:31.878771Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Subscribing
2025-02-18T21:04:31.891357Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Authorizing
2025-02-18T21:04:33.592485Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "1", extra_nonce2: Extranonce(Owned([2, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912653), nonce: HexU32Be(3075997758), version_bits: Some(HexU32Be(21946368)), id: 5 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:33.592762Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:33.597606Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 2 is_future: true
2025-02-18T21:04:33.597643Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 2
2025-02-18T21:04:34.023670Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "2", extra_nonce2: Extranonce(Owned([0, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912673), nonce: HexU32Be(515441724), version_bits: Some(HexU32Be(28983296)), id: 6 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.023760Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:34.072026Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "2", extra_nonce2: Extranonce(Owned([0, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912673), nonce: HexU32Be(1488847386), version_bits: Some(HexU32Be(57597952)), id: 7 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.072087Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:34.605985Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 3 is_future: true
2025-02-18T21:04:34.606009Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 3
2025-02-18T21:04:34.970030Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "3", extra_nonce2: Extranonce(Owned([1, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912674), nonce: HexU32Be(2892432440), version_bits: Some(HexU32Be(37797888)), id: 8 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:34.970197Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:38.799227Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "3", extra_nonce2: Extranonce(Owned([9, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912674), nonce: HexU32Be(4100784352), version_bits: Some(HexU32Be(3891200)), id: 9 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:38.799319Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:40.788428Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "3", extra_nonce2: Extranonce(Owned([13, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912674), nonce: HexU32Be(730727462), version_bits: Some(HexU32Be(1835008)), id: 10 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:40.788548Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:41.823530Z  WARN translator_sv2::lib::downstream_sv1::downstream: Downstream: Shutting down sv1 downstream job notifier for 192.168.1.117:51806
2025-02-18T21:04:44.027895Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 4 is_future: true
2025-02-18T21:04:44.027994Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 4
2025-02-18T21:04:45.867210Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "4", extra_nonce2: Extranonce(Owned([3, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912684), nonce: HexU32Be(4121494064), version_bits: Some(HexU32Be(35332096)), id: 11 }
[/Users/plebhash/develop/stratum/protocols/v2/roles-logic-sv2/src/utils.rs:182] &coinbase.len() = 239
2025-02-18T21:04:45.867324Z  INFO translator_sv2::lib::proxy::bridge: SHARE MEETS UPSTREAM TARGET
2025-02-18T21:04:46.036913Z  INFO roles_logic_sv2::handlers::mining: Received new extended mining job for channel id: 1 with job id: 5 is_future: true
2025-02-18T21:04:46.036932Z  INFO roles_logic_sv2::handlers::mining: Received SetNewPrevHash channel id: 1, job id: 5
2025-02-18T21:04:46.079805Z  INFO translator_sv2::lib::downstream_sv1::downstream: Down: Submitting Share Submit { user_name: "tb1qqh5v9y0cj3272g398sza9prq6jyuwxzw7gygz4", job_id: "4", extra_nonce2: Extranonce(Owned([3, 0, 0, 0, 0, 0, 0, 0])), time: HexU32Be(1739912684), nonce: HexU32Be(3292136204), version_bits: Some(HexU32Be(81453056)), id: 12 }
^C2025-02-18T21:04:46.712960Z  INFO translator_sv2::lib: Interrupt received
2025-02-18T21:04:46.712991Z  INFO translator_sv2::lib: Shutting down gracefully...

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.

rust-bitcoin version we use does not provide methods to get sigops from Script
4 participants