Difference between revisions of "SegWit PoP Miner"

From Veriblock Wiki
Jump to: navigation, search
Line 4: Line 4:
  
 
SegWit article from Max: https://medium.com/@veriblock/veriblock-adopts-segwit-and-will-now-take-more-space-on-bitcoin-edf11fbb6678
 
SegWit article from Max: https://medium.com/@veriblock/veriblock-adopts-segwit-and-will-now-take-more-space-on-bitcoin-edf11fbb6678
 +
 +
== Beta 2 ==
 +
 +
https://mirror1.veriblock.org/nodecore-pop-0.4.8-dev.24.segwit.zip
 +
 +
https://mirror1.veriblock.org/nodecore-pop-0.4.8-dev.24.segwit.tar
 +
 +
Best to connect to latest NC 0.4.7 when using it: https://github.com/VeriBlock/nodecore-releases/releases/download/v0.4.7/veriblock-nodecore-all-0.4.7.zip
 +
 +
<pre>
 +
**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
 +
</pre>
 +
 +
  
 
== Beta ==
 
== Beta ==

Revision as of 17:37, 12 November 2019

See: HowTo_run_PoP_Miner

SegWit article from Max: https://medium.com/@veriblock/veriblock-adopts-segwit-and-will-now-take-more-space-on-bitcoin-edf11fbb6678

Beta 2

https://mirror1.veriblock.org/nodecore-pop-0.4.8-dev.24.segwit.zip

https://mirror1.veriblock.org/nodecore-pop-0.4.8-dev.24.segwit.tar

Best to connect to latest NC 0.4.7 when using it: https://github.com/VeriBlock/nodecore-releases/releases/download/v0.4.7/veriblock-nodecore-all-0.4.7.zip

**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


Beta

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: https://wiki.veriblock.org/index.php?title=PoP_Miner_API#GET_.2Fapi.2Flastbitcoinblock
`/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.

https://mirror1.veriblock.org/nodecore-pop-0.4.7-dev.6+segwit.89f793d.tar.gz

https://mirror1.veriblock.org/nodecore-pop-0.4.7-dev.6+segwit.89f793d.zip

Code: https://github.com/VeriBlock/nodecore/commits/feature/segwit

Alpha

VeriBlock SegWit-Enabled PoP Miner Alpha

WE STRONGLY RECOMMEND YOU RUN THE SEGWIT POP MINER WITH NODECORE 0.4.6, https://github.com/VeriBlock/nodecore-releases/releases/tag/v0.4.6

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:

http://mirror1.veriblock.org/segwit-pop-alpha/nodecore-pop-0.4.7-dev.1%2Bsegwit.a2bcf9c.zip

http://mirror1.veriblock.org/segwit-pop-alpha/nodecore-pop-0.4.7-dev.1%2Bsegwit.a2bcf9c.tar

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":

https://github.com/VeriBlock/nodecore/tree/feature/segwit/nodecore-miners-pop

FAQ:

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?

Yes.