Skip to content

modifications to: Support for splitting shares across multiple userna…#1

Closed
patrick-patel wants to merge 1 commit intoluke-jr:split_usernamefrom
patrick-patel:split_username
Closed

modifications to: Support for splitting shares across multiple userna…#1
patrick-patel wants to merge 1 commit intoluke-jr:split_usernamefrom
patrick-patel:split_username

Conversation

@patrick-patel
Copy link
Copy Markdown

Implementation of Username Percentage-Based Mining Distribution
This pull request implements a username format that allows mining rewards to be distributed between multiple Bitcoin addresses using a percentage-based allocation system. The format address1%nn[.n][%address2%nn[.n][...]] directs a specified percentage of mining shares to each address.

@patrick-patel
Copy link
Copy Markdown
Author

patrick-patel commented Apr 15, 2025

@luke-jr reverted back to your original solution since your comments made a lot of sense and I had originally been using your solution incorrectly causing errors (lacked the % between users). After testing I did find a couple issues:

  • %20, %25 and %26 splits all caused issues due to url encoding
  • whatsminer username configuration has a character limit, so only 2 splits are possible, not a third (not a big deal just something to note)

@luke-jr
Copy link
Copy Markdown
Owner

luke-jr commented Apr 15, 2025

%20, %25 and %26 splits all caused issues due to url encoding

Ugh, that limits us to only tilde I think :(

whatsminer username configuration has a character limit, so only 2 splits are possible, not a third (not a big deal just something to note)

I have this noted as 127 characters, so potentially up to 4 legacy addresses.

@patrick-patel
Copy link
Copy Markdown
Author

%20, %25 and %26 splits all caused issues due to url encoding

Ugh, that limits us to only tilde I think :(

I handled at least these 3 scenarios in my branch, are you thinking tilde to make it more robust and prevent other edge cases related to url encoding?

whatsminer username configuration has a character limit, so only 2 splits are possible, not a third (not a big deal just something to note)

I have this noted as 127 characters, so potentially up to 4 legacy addresses.

Legacy addresses are 34 characters, correct? With 3 users, double digit percentage splits for each and the 2 divider %, it comes out to 113. A fourth legacy address + the divider % before (no need for trailing percentage value) gives 35 for a fourth address to be tacked on totaling 148 characters. So 3 users without worker names (or short worker names) will work, but a 4th is definitely out.

@luke-jr
Copy link
Copy Markdown
Owner

luke-jr commented Apr 16, 2025

I handled at least these 3 scenarios in my branch, are you thinking tilde to make it more robust and prevent other edge cases related to url encoding?

And not burn the short username length limits

Legacy addresses are 34 characters, correct? With 3 users, double digit percentage splits for each and the 2 divider %, it comes out to 113. A fourth legacy address + the divider % before (no need for trailing percentage value) gives 35 for a fourth address to be tacked on totaling 148 characters. So 3 users without worker names (or short worker names) will work, but a 4th is definitely out.

26-35 characters

If your percentages don't add up to 100%, the remainder goes to the mining.pool_address config option. So that's the 4th.

@patrick-patel
Copy link
Copy Markdown
Author

patrick-patel commented Apr 17, 2025

And not burn the short username length limits

Ok, so this format is what you're thinking?
btcAddress1.worker~50~btcAddress2.worker~50

I can revert this branch back to yours and update it to that format.

26-35 characters
If your percentages don't add up to 100%, the remainder goes to the mining.pool_address config option. So that's the 4th.

Got it! Honestly don't think more than 4 splits would ever be a common occurrence so no need to over complicate it to try and handle more.

@luke-jr
Copy link
Copy Markdown
Owner

luke-jr commented Apr 17, 2025

I'm not sure I like "burning" the apparently-only character we have left (tilde) without some way of extending it in the future again. Let me know if you have any ideas there.

@luke-jr
Copy link
Copy Markdown
Owner

luke-jr commented Apr 17, 2025

BTW, what miner(s) send the URL escaped usernames?

@patrick-patel
Copy link
Copy Markdown
Author

patrick-patel commented Apr 21, 2025

BTW, what miner(s) send the URL escaped usernames?

Whatsminer m30s+ is what I'm testing with. We could just go the % route and handle the url encoding (what I included in this pr) unless you are worried about it being too fragile.

@luke-jr
Copy link
Copy Markdown
Owner

luke-jr commented Jun 9, 2025

Closed the upstream PR in favour of OCEAN-xyz#112

Could you review that?

@luke-jr luke-jr closed this Jun 9, 2025
@patrick-patel
Copy link
Copy Markdown
Author

Closed the upstream PR in favour of OCEAN-xyz#112

Could you review that?

Yep, I can do that

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.

2 participants