Skip to content

Make version rolling mask configurable in sv1_rolling function#37

Open
krishnavbajoria02 wants to merge 2 commits into
dmnd-pool:masterfrom
krishnavbajoria02:fix-configure-#20
Open

Make version rolling mask configurable in sv1_rolling function#37
krishnavbajoria02 wants to merge 2 commits into
dmnd-pool:masterfrom
krishnavbajoria02:fix-configure-#20

Conversation

@krishnavbajoria02
Copy link
Copy Markdown

Fixes #20

  • Replaced the hardcoded version rolling mask (0x1FFFE000) with a configurable mechanism.
  • Added support for configuring the pool's mask via the POOL_MASK environment variable.
  • Negotiated the mask dynamically between upstream and downstream using bitwise AND.
  • Considered the version_rolling_min_bit_count from the mining.configure message.

- Replaced the hardcoded version rolling mask (0x1FFFE000) with a configurable mechanism.
- Added support for configuring the pool's mask via the POOL_MASK environment variable.
- Negotiated the mask dynamically between upstream and downstream using bitwise AND.
- Considered the version_rolling_min_bit_count from the mining.configure message.

This change allows dynamic negotiation between upstream and downstream, improving flexibility and protocol compliance.
Copy link
Copy Markdown
Collaborator

@Priceless-P Priceless-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @krishnavbajoria02, please ensure the code compiles, and run cargo fmt and cargo clippy before submitting. Thanks!

@krishnavbajoria02
Copy link
Copy Markdown
Author

Hi @krishnavbajoria02, please ensure the code compiles, and run cargo fmt and cargo clippy before submitting. Thanks!

@Priceless-P
I apologize for the oversight. As I'm relatively new to contributing to Rust-based open source projects, I wasn't aware of the necessary steps to take before submitting. I will make sure to run cargo fmt and cargo clippy moving forward and follow the correct process. I will correct the issue and make another commit to resolve it.

@krishnavbajoria02
Copy link
Copy Markdown
Author

@Priceless-P
I have corrected the type mismatch which was occurring in the last commit. I have also made sure I have run the required compilation and formatting tests before submitting. Please do review it. Thanks.

@Advaitgaur004
Copy link
Copy Markdown

@Priceless-P I have corrected the type mismatch which was occurring in the last commit. I have also made sure I have run the required compilation and formatting tests before submitting. Please do review it. Thanks.

Squash the last commit.

@krishnavbajoria02
Copy link
Copy Markdown
Author

@Priceless-P I have corrected the type mismatch which was occurring in the last commit. I have also made sure I have run the required compilation and formatting tests before submitting. Please do review it. Thanks.

Squash the last commit.

Yeah I will do that. I was waiting for this change to be approved and then squash it since squashing it will not make the changes apparent I guess. Thanks for the suggestion.

@jbesraa jbesraa requested a review from Priceless-P December 5, 2025 09:22
@jbesraa
Copy link
Copy Markdown
Contributor

jbesraa commented Dec 5, 2025

This look like a good PR to get in. @krishnavbajoria02 can u rebase on master please?

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.

Make Version Rolling Mask Configurable

4 participants