Skip to content

Add request_id to downstream_id mapping in translator - #76

Merged
GitGab19 merged 3 commits into
stratum-mining:mainfrom
bit-aloo:2025-11-06-add-request-id-to-downstream-id-mapping
Nov 13, 2025
Merged

Add request_id to downstream_id mapping in translator#76
GitGab19 merged 3 commits into
stratum-mining:mainfrom
bit-aloo:2025-11-06-add-request-id-to-downstream-id-mapping

Conversation

@bit-aloo

@bit-aloo bit-aloo commented Nov 6, 2025

Copy link
Copy Markdown
Member

In the translator, when opening a channel, we were previously assigning the downstream_id to be the same as the message’s request_id. This was a bit hacky and also limited the number of downstreams to a u32 range (which is large, but still an unnecessary constraint). To address this, we’ve introduced a mapping between request_id and downstream_id, which exists only for the duration of the request’s lifetime on the upstream.

@bit-aloo
bit-aloo force-pushed the 2025-11-06-add-request-id-to-downstream-id-mapping branch from 53a1b43 to c912b40 Compare November 6, 2025 16:41
@bit-aloo bit-aloo changed the title Add request_id to downstream_id mapping Add request_id to downstream_id mapping in translator Nov 6, 2025
Comment thread miner-apps/translator/src/lib/sv1/sv1_server/sv1_server.rs Outdated
Comment thread miner-apps/translator/src/lib/sv1/sv1_server/data.rs Outdated
@bit-aloo
bit-aloo force-pushed the 2025-11-06-add-request-id-to-downstream-id-mapping branch from a1cb581 to 5efa4d2 Compare November 11, 2025 16:34
@bit-aloo
bit-aloo force-pushed the 2025-11-06-add-request-id-to-downstream-id-mapping branch from 5efa4d2 to e774157 Compare November 11, 2025 17:03
@bit-aloo
bit-aloo force-pushed the 2025-11-06-add-request-id-to-downstream-id-mapping branch from e774157 to 5fc722d Compare November 13, 2025 15:44
@GitGab19
GitGab19 merged commit 1eb501a into stratum-mining:main Nov 13, 2025
9 checks passed
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