Every story needs a happy ending and although I didn’t find a Mainnet block (yet), it appears that I have the mechanisms to do so. This is the "last chapter" but I still have a concern and a question below.
As I said in a previous post, if you make a change to mining or pool software, USE TESTNET!!!
Background: The NOMP that I had been using for years wasn’t SegWit compliant so I couldn’t use it for Bitcoin. I therefore needed and found a SegWit commit to a different NOMP fork, and added the code to my NOMP. This was the solution that I chose, I could have started using different pool software or connect to a public pool.
For reference:
P2PKH script address equivalent (legacy starting with 1 on mainnet) starts with m or n on testnet
P2SH script address equivalent (legacy starting with 3 on mainnet) starts with 2 on testnet
P2WPKH script address equivalent (native SegWit starting with bc1 on mainnet) starts with tb1 on testnet
After adding the SegWit code, I installed a BitPay wallet to get a Testnet address. The address began with an "m". This address is used for the miner to connect to my NOMP pool.
My Testnet Bitcoin Core wallet -
bitcoin-cli getnewaddress - gave me an address beginning with a "2" by default. This address was used by the pool to communicate with the Bitcoin network.
When I found 6 Testnet blocks, I got errors in the PaymentProcessing module seconds after each find. It turns out, that in checking the Bitcoin Testnet Block Explorer, the address associated with my found blocks began with an "m" but didn't belong to my wallet. I have no idea where this address came from.
How this address changed from a "2" to an "m" is my concern. It would be nice to return the faucet coins that I borrowed for testing, but I can't get access to this "m" account. Obviously, I don't want anything of the sort to happen on Mainnet.
Next, using
bitcoin-cli getnewaddress "" "legacy", I got an address beginning with an "m", confirmed that it belonged to my wallet, found 2 more blocks, and after 100 confirmations, funds were in my BitPay wallet. So everything seems to work with like legacy addresses.
So on Mainnet, I'll use all addresses (ASIC miners and pool) starting with a "1".
I may try again with two "2" addresses on Testnet to see if that works.
Q: What would be the advantage of using "2" addresses on Testnet rather than "m" (and then all "3" addresses on Mainnet rather than "1")?