|
1 | | -# Riecoin Core |
| 1 | +# Riecoin Wallet Migrator |
2 | 2 |
|
3 | | - |
| 3 | +This is a stripped down version of Riecoin Core for migrating Legacy to Descriptor Wallets in order to be able to use Riecoin Core 23.04+. |
4 | 4 |
|
5 | | -This repository hosts the Riecoin Core source code. Riecoin Core connects to the Bitcoin peer-to-peer network to download and fully validate blocks and transactions. It also includes a wallet and graphical user interface, which can be optionally built. |
| 5 | +Binaries for Linux and Windows x64 are provided on the present GitHub repository. |
6 | 6 |
|
7 | | -Guides and release notes are available on the [project's page on Riecoin.xyz](https://riecoin.xyz/RiecoinCore). |
8 | | - |
9 | | -## Riecoin Introduction |
10 | | - |
11 | | -Riecoin is a currency based on Bitcoin, and follows in its footsteps into becoming a world currency. The Project supports and concretizes the idea that the gigantic mining resources can also serve scientific research, thus power a world currency of greater value for the society. |
12 | | - |
13 | | -Riecoin miners are not looking for useless hashes, but doing actual scientific number crunching, like in Folding@Home or the GIMPS (currently, they are looking for prime constellations). |
14 | | - |
15 | | -The project broke and holds several number theory world records, and demonstrated that scientific computations can be done using the PoW concept, and at the same time power a secure and practical international currency. It effectively solves the Bitcoin's power consumption issue without resorting to ideas like PoS that enrich the richer by design and makes value out of thin air. |
16 | | - |
17 | | -Visit [Riecoin.xyz](https://riecoin.xyz/) to learn more about Riecoin. |
18 | | - |
19 | | -## Build Riecoin Core |
20 | | - |
21 | | -### Recent Debian/Ubuntu |
22 | | - |
23 | | -Here are basic build instructions to generate the Riecoin Core binaries, including the Riecoin-Qt GUI wallet. |
24 | | - |
25 | | -First, get the build tools and dependencies, which can be done by running as root the following commands. |
| 7 | +They can also be built following similar instructions as for [Riecoin Core](https://github.com/RiecoinTeam/Riecoin/). If not using Guix, BDB should be installed and `--with-incompatible-bdb` should be used. |
26 | 8 |
|
27 | 9 | ```bash |
28 | | -apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 |
29 | | -apt install libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libgmp-dev libsqlite3-dev libqrencode-dev |
| 10 | +./autogen.sh ; ./configure --with-incompatible-bdb ; make |
30 | 11 | ``` |
31 | 12 |
|
32 | | -Get the source code. |
| 13 | +## Who Needs to Migrate? |
33 | 14 |
|
34 | | -```bash |
35 | | -git clone https://github.com/RiecoinTeam/Riecoin.git |
36 | | -``` |
| 15 | +Users who are |
37 | 16 |
|
38 | | -Then, |
| 17 | +* currently using Riecoin Core **0.21 or older**, |
| 18 | +* currently using Riecoin Core **22.03**, but **already used 0.21 or older in the past** without recreating wallets via 22.03, or generated **purposely** Legacy Wallets with 22.03, |
39 | 19 |
|
40 | | -```bash |
41 | | -cd Riecoin |
42 | | -./autogen.sh ; ./configure ; make |
43 | | -``` |
44 | | - |
45 | | -The Riecoin-Qt binary is located in `src/qt`. You can run `strip riecoin-qt` to reduce its size a lot. |
| 20 | +will have Legacy Wallets that need to be migrated. This is certain on 0.21 and older, on 22.03, you may double check if you indeed have Legacy Wallets with the `getwalletinfo` RPC Command (it is Legacy if it shows `"format": "bdb"` or ` "descriptors": false`; if it is not the case, you actually have a Descriptor Wallet that does not need to be upgraded). |
46 | 21 |
|
47 | | -#### Guix Build |
| 22 | +If you are using Riecoin Core **23.04** or more recent, you are **guaranteed** to have Descriptor Wallets and **no action** is required, **regardless** of whether you used 22.03 or older in the past (either because you already migrated or did not keep old wallets and generated new ones). 23.04+ are indeed unable to open Legacy Wallets. |
48 | 23 |
|
49 | | -Riecoin can be built using Guix. The process is longer, but also deterministic: everyone building this way should obtain the exact same binaries. Distributed binaries are produced this way, so anyone can ensure that they were not created with an altered source code by building themselves using Guix. Read the [Guix Guide](contrib/guix/README.md) for more details and options. |
| 24 | +## How to Migrate? |
50 | 25 |
|
51 | | -You should have a lot of free disk space (at least 40 GB), and 16 GB of RAM or more is recommended. |
| 26 | +In all cases, make a **backup of all your wallets** just in case - as long as you saved your wallet.dats somewhere, there will always be a a way to recover your funds if something goes wrong. Don't forget to shut down Riecoin Core before making such backup. |
52 | 27 |
|
53 | | -Install Guix on your system, on Debian 12 this can be done as root with |
| 28 | +### Using the Wallet Migrator |
54 | 29 |
|
55 | | -```bash |
56 | | -apt install guix |
57 | | -``` |
| 30 | +* Via `riecoinwm-qt`: after making a backup of your Wallets or the Riecoin Data Folder, stop any running Riecoin Core instance, then run the Qt version of the Wallet Migrator. Under the File menu, you can Open any Riecoin Wallet (if not already opened), and then click on "Migrate Wallet", again under the File Menu. If this option is disabled, it means that this Wallet is already a Descriptor Wallet and |
| 31 | +* Via `riecoinwmd`/`riecoinwm-cli`: after making a backup of your Wallets or the Riecoin Data Folder, stop any running Riecoin Core instance. Then, run the migrator daemon `riecoinwmd`, and then use the `riecoinwm-cli` binary to run the `migratewallet` command for every wallet to upgrade. Example: |
58 | 32 |
|
59 | | -Still as root, start the daemon, |
60 | 33 |
|
61 | 34 | ```bash |
62 | | -guix-daemon |
| 35 | + ./riecoinwm-cli -rpcuser=User -rpcpassword=Password -rpcwallet=Pool migratewallet |
| 36 | +{ |
| 37 | + "wallet_name": "Pool", |
| 38 | + "backup_path": "/home/user/.riecoin/wallets/Pool/Pool_1713190683.legacy.bak" |
| 39 | +} |
63 | 40 | ``` |
64 | 41 |
|
65 | | -Now, get the Riecoin Core source code. |
66 | | - |
67 | | -```bash |
68 | | -git clone https://github.com/RiecoinTeam/Riecoin.git |
69 | | -``` |
70 | | - |
71 | | -Start the Guix build. The environment variable will set which binaries to build (here, Linux x64, Linux Arm64, and Windows x64, but it is possible to add other architectures or Mac with an SDK). |
72 | | - |
73 | | -```bash |
74 | | -export HOSTS="x86_64-linux-gnu aarch64-linux-gnu x86_64-w64-mingw32" |
75 | | -cd Riecoin |
76 | | -./contrib/guix/guix-build |
77 | | -``` |
| 42 | +### Other Migration Options |
78 | 43 |
|
79 | | -It will be very long, do not be surprised if it takes an hour or more, even with a powerful machine. The binaries will be generated in a `guix-build-.../output` folder. |
| 44 | +The migration code is taken from Bitcoin 27's, and essentially remains untouched, so it should work well as it is no longer considered as experimental by the Bitcoin Developers unlike at the time Riecoin 23.04 was released (which is why the Wallet Migrator was not provided with this release). But should it still fail nevertheless due to a corrupted wallet or a bug, here are other options to perform the migration. |
80 | 45 |
|
81 | | -### Other OSes |
| 46 | +* Send all your funds to an exchange, delete your wallets, and proceed to the upgrade as usual. Then, create a new wallet with the new version, get a new address, send your coins back to yourself, and you are done. Riecoin Transactions Fees are negligible, though be sure to check the exchange deposit (if any) and withdrawal fees. |
| 47 | + * Alternatively, if you know how to do that, you can try to run both instances of Riecoin Core simultaneously and send directly to your own address without using an exchange. |
| 48 | +* Export the old addresses with `dumpprivkey` via the older Riecoin Core that still supports Legacy Wallets, then use 24.04+ to create a new Wallet and import Addresses with `importdescriptors` |
| 49 | + * The Base58 Wif Format has been dropped since 22.03 in favor of a straightforward Hex one, so if your `dumpprivkey` still provides WIF Keys, you need to convert them to Hex, and use the `prv` prefix. |
| 50 | +* Write your own script that automates the previous point. |
82 | 51 |
|
83 | | -Either build using Guix as explained above in a spare physical or virtual machine, or refer to the [Bitcoin's Documentation (build-... files)](https://github.com/bitcoin/bitcoin/tree/master/doc) and adapt the instructions for Riecoin if needed. |
| 52 | +If you are running a Riecoin Mining Pool or an Exchange that has Riecoin listed, you can always ask the Riecoin Developers for assistance |
84 | 53 |
|
85 | 54 | ## License |
86 | 55 |
|
87 | | -Riecoin Core is released under the terms of the MIT license. See [COPYING](COPYING) for more information or see https://opensource.org/licenses/MIT. |
| 56 | +The Riecoin Wallet Migrator is released under the terms of the MIT license. See [COPYING](COPYING) for more information or see https://opensource.org/licenses/MIT. |
0 commit comments