Bitcoin Gold (BTG) testnet upgrade spec and guide
This issue will be converted to a Wiki page when the content is fixed)
This guide is currently for testnet upgrade only. The mainnet upgrade doesn't have a scheduled date yet. We will decide the fork date after the success of the testnet fork.
1. Changes (testnet)
- Fork height:
- Switch to Equihash-BTG
- Solution size: 100 bytes
- Typical memory usage: 2.5G per thread
- Difficulty adjustment: #330
- From the fork height, the difficulty will be reduced by 100x
- Slightly change the LWMA DAA parameters
2. Compile the new full node
Everyone should upgrade to the new full node, compiled from master branch: https://github.com/BTCGPU/BTCG...
3. Upgrade guide for pool operators
Basically, you need to upgrade the full node as well as the pool software. The full node can be updated in-place. Please don't hesitate to reach out to us for help:
Why do we need to upgrade the pool software?
The PoW and the block header size is changed. The old pool can't handle it.
Is there any working pool software?
We have a reference implementation of z-nomp for the fork: https://github.com/BitcoinGold...
What if we want to change our own pool?
Please change the following components and check commits of the reference z-nomp:
- Block header handling: solution size is now 100 vs the original 1344 bytes. (Don't forget the leading encoded length before the solution is also changed)
- PoW validation
There are a few useful tools for pool development in this GitHub project: https://github.com/BitcoinGold...
How to test the pool?
After the fork, you can run your pool on the testnet. Then you can connect any working miner (nheqminer or EBWF, etc) to the pool.
The naive nheqminer on GPU is ~2.5 Sol/s while EWBF is much more efficient. EWBF should work with correct parameters
--algo 144_5 --pers BgoldPoW.
- EWBF: https://bitcointalk.org/index.php?topic=4466962.0
- (more miners are coming soon)
We suggest to run a new pool for the upgraded chain. Unlike Monero, it's not easy to do an in-place pool upgrade because Equihash-BTG (144,5) is very different than the original Equihash (200,9). The recommended procedure is:
- Launch a new pool for upgraded chain
- Tell miners to download the new miner softwares
- Miners can keep mining on the old pool before the fork
- When it reaches the fork height, stop the old pool and turn on the new pool
- Miners turn off the old software and turn on the new software
However for the testnet fork, usually the pool doesn't need to do anything unless you want to test the pool setup.
4. Upgrade guide for miners (mainnet)
The difficulty will be reduced by 100x to ensure the profitability because the new PoW is much harder and the PoW switch will cause a lose of hashrate. It also means the mining durning the first a few hundreds of blocks will be much more profitable.
Before the hardfork upgrade:
- Install the new miner software
- Config and test the miner on a testnet pool, either by your familiar pool or our official pool (TBD)
- Wait for the hardfork block height (TBD)
Durning the hardfork upgrade:
- Stop the old miner
- Start the new miner
5. Upgrade guide for devs
- Fork height: