SegWit PoP Miner

From Veriblock Wiki
Revision as of 22:12, 16 November 2019 by VeriBlockTim (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

See: HowTo_run_PoP_Miner

SegWit article from Max:

Beta 3

Best to connect to latest NC 0.4.7 when using it:

**PoP Miner Segwit stability beta v3**

This is a pre-release for potential segwit stability fixes, and expect it still has some bugs, but it should be better than previous version.

Feedback is very welcome.

* Fixed the API issue which was preventing to run multiple miners at once.
* Re-added the rest of the logs into the log file (nodecore.miners.pop).
* Fixed the issue which was causing the process of download blocks to fail over and over.
* Added multiple graceful errors.
* Changed the shutdown process in order to avoid thread errors.

Beta 2

Best to connect to latest NC 0.4.7 when using it:

**PoP Miner Segwit stability alpha**

This is a pre-release for potential segwit stability fixes, and expect it still has some bugs, but it should be better than previoous version.

Feedback is very welcome.

It also has other updates to shell, logging, and API:
* /api/wallet/btc/withdraw --> withdrawbitcointoaddress 
* API is more standarized (e.g. now it requires the header -H "Content-Type: application/json")
* Quit api now supports restart code optionally with "/api/quit?restart=true"
* Shell now is able to display the normal logs in addition to the shell color-printed messages, so there will be more logs
* Common logs are colored depending on the severity level
* Typing in the shell while new logs show up don't disrupt the command that was being typed
* Restart quit is now supported on the windows bat file
* Overall code quality and maintainability has improved considerably


Released on 9/30/2019

** Beta SegWit PoP Miner **
We have tracked the stability issue down to deep within BitcoinJ (a 3rd party library). Trying to implement stability improvements in BitcoinJ hasn't proven fruitful so far.
However, we have noticed (and thanks to community testers) that rebooting the pop miner has improved stability, especially after a new BTC block was found, or after listoperations returned an operation with an error.
Obviously we'd like the code to run perfect without a reboot, but it has appeared to be an improvement, and thus we wanted to share it.

Two new APIs:
`/api/lastbitcoinblock`, verb = GET --> New:
`/api/quit`, verb = POST

API `lastbitcoinblock` maps to new CLI command: `showlastbitcoinblock`.

A sample script `nodecore-pop-loop` provides a way to call those APIs (currently linux, can add corresponding windows later). We do not claim this is the optimal script, and folks are encouraged to adjust it.



VeriBlock SegWit-Enabled PoP Miner Alpha


Message from Max:

Hi everyone, we're excited to announce the alpha release of our SegWit-Enabled PoP Miner. Please read this entire message before downloading and using the SegWit alpha miner!

This is an alpha release using a new major version (0.15.4) of BitcoinJ. Please only deposit small amounts of BTC for testing. AS ALWAYS, BACKUP YOUR WALLET FILES!

Special thanks to @@Leonard and @@Cye_BigDaddy for helping us test the SegWit miner on Bitcoin testnet. We are actively working on robustivity and stability improvements to address some hiccups encountered when running the SegWit PoP miner in testnet mode over the last few days.
The SegWit-enabled PoP miner is available for download here:

The source code is also available in the feature/segwit branch on the nodecore Github repository.
Guide for transferring funds from old, non-SegWit PoP miner to new SegWit PoP miner

Moving your funds from an old non-SegWit PoP miner is straight-forward, but be sure to follow these instructions carefully. We recommend you test with a very small amount of BTC first to make sure you are performing the process correctly.

1. Backup your old wallet.dat file to a safe location

2. Start up the new SegWit PoP miner with no wallet file present

3. Copy down the recovery key for the new SegWit PoP wallet, and continue through the recovery key prompt

4. Copy the bech32 SegWit address the SegWit PoP miner displays for funding (should start with "bc1", ex: bc1q3dd5hdrk8pf7qs6xt8wy32gfmjw99t7evtsnq8)

5. Close the SegWit PoP miner gracefully (type "quit" in the PoP miner)

6. Backup the wallet.dat file from your SegWit PoP miner

7. Unzip a duplicate of the SegWit PoP miner (so it is in the state that starting it up fresh would create a new wallet, but don't start it up yet). You should have two different SegWit PoP miner folders: one containing the newly-generated SegWit-based wallet, and this one which is completely blank.

8. Copy over the wallet.dat from your old legacy PoP miner to the new blank SegWit PoP miner folder (put it in the "bin" folder, so it is next to the start .bat and .sh scripts)

9. Startup the new SegWit PoP miner where you copied your legacy wallet to

10. Using the "withdrawtoaddress" command, withdraw however much BTC you want to the SegWit wallet address you copied earlier

11. Quit the PoP miner gracefully ("quit")

12. Re-open the original SegWit miner folder which you started from scratch which generated the SegWit address you transfered funds to.

Source Code

Alpha is available on branch "feature/segwit":


1. What type of SegWit addresses does the SegWit PoP miner use?

The SegWit PoP miner users bech32 SegWit addresses, as transactions from bech32 addresses use the lowest fees.

2. Do I configure the PoP miner with fee per byte still, or is there a fee-per-work-unit setting?

The current setting is still fee-per-byte. As a general rule of thumb, set this number to a number 28.9% lower than what you would normally set the fee-per-byte setting to before (bech32 PoP SegWit transactions cost 28.9% less weight than their standard, non-SegWit counterparts)

3. Can I just import or copy over my old wallet?

At the moment no, you have to follow the 12-step instructions for transferring coins. Alternately you can withdraw them from your current non-SegWit PoP miner to a third-party wallet which is able to send to bech32 addresses, but you will have to do 2 transactions instead of 1.

4. Do I have to set any special settings to SegWit mine in the new miner?

No, the new miner always generates bech32 addresses when allowed to generate a new wallet file. However, copying over an old wallet.dat file from a non-SegWit PoP miner will cause the SegWit-enabled PoP miner to still generate legacy transactions (non-SegWit).

5. Can I withdraw BTC from the SegWit miner to a non-SegWit address?