tradecraftio / tradecraft

Tradecraft integration/staging tree https://tradecraft.io/download
Other
13 stars 9 forks source link

Default to merge-mining freicoin if chain specifier is not present #92

Closed maaku closed 3 years ago

maaku commented 3 years ago

From the stratum logs of public mining servers, I have noted that some people are mistakenly leaving out the chain specifier from the merge-mining configuration in the password field of a stratum connection. So instead of a stratum password of freicoin=1EpB4RDznaju35KKbQ87AsiLQMywcTUDtz, they put just 1EpB4RDznaju35KKbQ87AsiLQMywcTUDtz. That would be fine if some sort of warning were generated for the user, but we actually can't do that because of the way gracefully handle unrecognized password options. So the result is that their miner solo-mines bitcoin without even realizing that they aren't merge-mining freicoin.

Since the default behavior in the wild is to merge-mine freicoin, and since freicoin addresses look like bitcoin addresses, we should attempt to decode the password field as a CBitcoinAddress. If that works, assume the user meant it as the freicoin merge-mining address.

maaku commented 3 years ago

Fixed in the latest version of #91 so I'm closing here.