New Handlers wiith new tproxy#40
Open
Shourya742 wants to merge 88 commits intoGitGab19:new-tproxyfrom
Open
Conversation
7bc040b to
401e5b3
Compare
GitGab19
reviewed
Jul 21, 2025
| msg.error_code, msg.flags | ||
| ); | ||
|
|
||
| Ok(()) |
Owner
There was a problem hiding this comment.
Shouldn't we return an error here?
Author
There was a problem hiding this comment.
I was thinking more on lines liek the user can now report this directly to status handler, respawn the service.
Owner
There was a problem hiding this comment.
Yeah that's also kind of what I was thinking about.. would this be done directly here in the handler, right?
Or are we missing anything needed by the status handler?
GitGab19
reviewed
Jul 21, 2025
roles/translator/src/lib/sv2/channel_manager/message_handler.rs
Outdated
Show resolved
Hide resolved
Previously, `HandlerError` only supported a fixed set of internal error types. This made it difficult for downstream users implementing library traits to propagate their own custom error types. This commit introduces a new `External(Box<dyn Error + Send + Sync>)` variant to allow wrapping arbitrary error values. This enables implementors to return non-library errors without requiring changes to the core `HandlerError` enum.
- Added downstream_id to Downstream struct for better identification. - Updated message handling in Downstream to include response handling. - Enhanced ChannelManager with methods for processing upstream messages and creating channels. - Refactored SV1Server to manage downstream connections and messages more effectively. - Improved logging for better traceability of downstream operations.
…ome of the unused methods
… values in the handlers
- Renamed and reorganized modules for clarity, including the introduction of `sv1` and `sv2` directories. - Added new `Downstream` and `ChannelManager` implementations to enhance message handling and processing. - Introduced new message handler logic for upstream and downstream communication. - Implemented share validation and extended mining channel management. - Improved logging throughout the modules for better traceability and debugging.
- Updated Downstream struct to use a tuple for channel_id and message in the sender/receiver. - Improved spawn methods to utilize Arc<Mutex<Self>> for better concurrency handling. - Refactored SV1Server to accommodate changes in Downstream, ensuring proper message broadcasting and handling. - Enhanced logging for downstream operations to improve traceability.
- Added configuration parameter to SV1Server and TranslatorSv2 for improved flexibility. - Updated hashrate calculation to utilize configuration settings for downstream difficulty. - Introduced initial target calculation based on configured hashrate and shares per minute. - Improved message handling in SV1Server to accommodate new configuration features.
…ove target handling - Added min_extranonce_size configuration to SV1Server for enhanced flexibility. - Updated OpenExtendedMiningChannel message to utilize the configured min_extranonce_size. - Improved target handling by ensuring initial_target is cloned when setting difficulty.
e6e5898 to
328bc6a
Compare
e77d1ef to
f0a69aa
Compare
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.
This PR migrates the new TProxy to the updated handlers. We're no longer using the SendTo and awkward Arc ergonomics, and things feel much cleaner now. Have a look!