-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle Litecoin MWEB rules #59
Conversation
p2pool/bitcoin/helper.py
Outdated
@@ -16,6 +16,9 @@ def check(bitcoind, net, args): | |||
raise deferral.RetrySilentlyException() | |||
|
|||
version_check_result = net.VERSION_CHECK((yield bitcoind.rpc_getnetworkinfo())['version']) | |||
blockchaininfo = yield bitcoind.rpc_getblockchaininfo() | |||
global softforkrules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be a better way to do this than to use a global.
That's better, thanks. I'm going to do a little testing on this before merging, but as long as everything tests out, I'll probably merge within a couple of days. Can you provide a crypto address for thank-you tips? |
ltc1qsfac6mdk498zfrgs5dh3k8twqxfu4j563cu06v Thanks! |
Lingering concerns:
Anyway, this seems to work as far as I've tested, so I'll go ahead and merge it. Thanks for the contribution. Maybe buy yourself some pie for dessert to celebrate? ed9148413c1cae229cf00bdc18e40fef5d986940dea97ebcf4741b6191eceb1a |
Thanks for the tip! |
Do you know if it's required for every post-fork LTC block to have the MW extension block? Do you know if Taproot transactions will propagate to obsolete nodes and be included in blocks, or if they will be ignored as non-standard? The standard p2pool way to deal with (soft/hard) forks in which there's a risk of orphaned *coin blocks is to do a p2pool hard fork. This is done by creating a new share class in p2pool/data.py with a higher version number, setting the successor_share class for the current best version to be the new best version, and (usually, but not necessarily) incrementing the protocol number. However, there's currently no mechanism to make this happen only for LTC, so this would cause unnecessary p2pool hard forks to occur on all p2pool networks, like BCH and BTC. So I'd rather only do that if it's necessary. |
Please tell me which version of bitcoin core is your version of p2pool compatible with? |
@Anandraj-Singh This thread is about a PR to update p2pool's Litecoin compatibility. If there are issues with compatibility with BTC Bitcoin, that should be opened in a separate issue. |
@jtoomim thank you! |
I'm HyperDonkey.com's P2Pool owner and we are merge mining Litecoin and Dogecoin with the MWEB update as of today, 5/15/22. I will report back here once we mine a few blocks on either chain to confirm it's working OK. P2Pool statistics: Thanks for supporting P2Pool! |
Remember to update your node too. Litecoin core 0.21.2 is available now. |
@Azskygod, the block you found today, 2263948 looks good. (Version hex 20000010) |
@northern-lites the Litecoin block is fine, but we are also merge mining Dogecoin and our AuxPoW block didn't validate. Has anyone successfully merge mined a block with this release? I'm digging into the logs now and will update here when more information is available. |
@jtoomim yes. The extension block is required for every block after activation. |
@northern-lites and @jtoomim, AUXPOW ERROR Litecoin blocks mine OK, but Dogecoin AuxPoW blocks are not valid and failing as duplicates on block submission: 2022-05-18 04:02:34.716077 trying to punish a share by mining a low-diff share I captured and synched the log output from our P2Pool, Dogecoind and Litecoind West US nodes as shown below: P2POOL WEST US NODE2022-05-18 04:01:38.907036 P2Pool: 17422 shares in chain (17427 verified/17427 total) Peers: 6 (3 incoming) LITECOIND WEST US NODE2022-05-18T03:59:53Z CreateNewBlock(): block weight: 469426 txs: 255 fees: 2999396 sigops: 4325 MWEB weight: 0 DOGECOIND WEST US NODE2022-05-18 04:01:32 receive version message: /blockchair.com/dogecoin/nodes/: version 70015, blocks=4228992, us=20.150.137.205:22556, peer=1282 This duplicate block submission error has occurred while merge mining since our upgrade on 5/15/22. Reference blocks:
In addition and possibly related, P2Pool has now experienced 2 orphaned Litecoin blocks in the last week since our upgrade to this code. I've been P2Pool mining for 4 years and had never seen an orphaned P2Pool block until applying this update. URGENT -- Please let me know if I can provide any additional information for troubleshooting. Thank you! P2POOL WEST US NODE.txt |
@Azskygod this is not good for your pool... |
@northern-lites Thanks for the quick reply. We were running the previous commit and successfully merge mining LTC/DOGE. We upgraded our Litecoind to 0.21.2 and our P2Pool on 5/15/22 with the latest commit. Our version is listed as -dirty only because we're using a custom GUI polling the standard P2Pool API. We've made no local changes to the current P2Pool commit or to the Dogecoind 1.14.5 node that worked previously. Issue #61 may also be relevant. I will be monitoring this issue closely since this code is now in production on 3 public nodes. Thanks for your pull and help! |
@northern-lites the previous working commit we ran was 16.0-192-g6dac42e. |
@Azskygod there was a pull request (#51) previous to this one which was which was newer than the version you had. Are you able to test this? |
@northern-lites You are correct. I found and fixed the typo in our local work.py line 472 as suggested. Testing now. I'll update this issue once we successfully merge mine an AuxPoW block or another error occurs. Thanks for your prompt replies! |
@northern-lites We successfully mined an AuxPoW block today with this typo corrected. Thank you! https://dogechain.info/tx/1663149009df84a487bbed78c04fd35ca352cf1cbee6f9b5b5a531d65749f643 Unfortunately, P2Pool is now logging intermittent loss of connectivity to Litecoind after MWEB activation and the sharechain contains mostly shares with Version (hex): 20000000 instead of the expected 20000010. This is the same problem as issue #62, which results in mining rigs intermittently being disconnected from P2Pool when it occurs. Logs available if needed. |
Version is controlled by the node, and only the bits are set for signaling/activation. (Now that MWEB is activated these version bits are not set). |
That's not problem. |
#58