Fix/user identity validate authorize - #1
Open
average-gary wants to merge 23 commits into
Open
Conversation
…ve-deadlock Remove circular dependency on Sv1Server and downstream in tproxy
…sions-release-apps-script make `scripts/release-apps.yaml` executable
…publishing-bitcoin-core-sv2 avoid publishing `bitcoin-core-sv2`
it was originally copied from stratum repo, where we use cargo 1.75 this version of cargo returns a `already uploaded` string but on this repo, we're using cargo 1.85, which returns `already exists` string
…release-apps-script patch `release-apps.sh`
…publishing-apps avoid publishing all apps
average-gary
force-pushed
the
fix/user-identity-validate-authorize
branch
from
January 22, 2026 17:06
190ec4c to
30d4718
Compare
Get `bitcoin-capnp-types` from crates.io and publish apps on release
average-gary
force-pushed
the
fix/user-identity-validate-authorize
branch
from
January 23, 2026 15:16
8acdf30 to
9583132
Compare
…ve-check-alive-check Remove check alive check from spawn job keepalive loop method
Add btrust logo to readme
…on-no-downstream-channel (Tproxy): log on no upstream channel instead of shutdown
…broadcast-shutdown add `SHUTDOWN_BROADCAST_CAPACITY` constant
Refactor user identity handling in the translator to properly separate channel identity from worker identity for TLV extension. Changes: - Rename authorized_worker_name to worker_name_from_authorize for clarity - Store only worker suffix (part after '.') in user_identity for TLV use - Remove username length validation at authorize time (username is ignored) - Disconnect client at share submission if worker suffix exceeds 32 bytes - Remove config-based user_identity overwrite in open_extended_mining_channel - Update integration tests to reflect new behavior The user_identity in TLV now contains only the worker portion from mining.authorize (e.g., 'worker1' from 'user.worker1'), enabling pass-through of worker identification for hashrate tracking. The channel identity sent in OpenExtendedMiningChannel continues to use the translator's config value, which is separate from the TLV worker identity.
average-gary
force-pushed
the
fix/user-identity-validate-authorize
branch
from
February 2, 2026 20:08
9583132 to
1010f9a
Compare
bit-aloo
pushed a commit
that referenced
this pull request
Apr 29, 2026
…st assertions
Replaces string-concatenation form ("name{k=\"v\"}") with a structured
Metric<'a> { name, labels } type. Bare-name callers stay unchanged via
From<&str>; labeled callers use Metric::with_labels(name, &[(k, v), ...]).
Benefits over the previous string-prefix matching:
- Label matching is order-independent (current code passed by accident
thanks to the prometheus crate's BTreeMap label ordering)
- Subset matching: query a single label, ignore extras on the line
- Type-safe k/v pairs, no quote escaping at call sites
- Single match path used by parse_metric_value, assert_metric_*,
assert_metric_present/not_present, and poll_until_metric_gte
Leverages the new API in monitoring_integration tests to assert on the
specific (client_id, channel_id, user_identity) tuple each topology
produces, rather than matching the first series for a metric name.
Catches mis-attributed shares that the bare-name form would silently
accept:
- Test #1 (sv2 mining device): adds an explicit user_id to the fixture
so the user_identity label is a meaningful 'test-miner' rather than
empty.
- Test #2 (pool + tProxy + 1 SV1): asserts the SV1 worker name flows
through to the pool's view of tProxy's channel as
'user_identity.miner1'.
- Test #3 (aggregated): asserts JDC's 'IT-test' identity on the pool
side and the SV1 worker name on tProxy's server view.
- Test #4 (block found): unchanged \u2014 sv2_client_blocks_found_total is
a scalar gauge (no labels), so a bare-name selector is correct here.
Addresses stratum-mining#336 and the related review feedback on stratum-mining#338.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.