diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..80f1a51f --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": ["ISNOTARYNODE=1"], + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..902e0b9d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,41 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) iguana (mainnet)", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/agents/iguana", + "args": ["notary"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/iguana", + "environment": [], + "externalConsole": true, + "MIMode": "gdb", + //"preLaunchTask": "Build Iguana [debug]", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + } + ] + }, + { + "name": "(lldb) iguana (mainnet)", + "type": "lldb", + "request": "launch", + "program": "${workspaceFolder}/agents/iguana", + "args": ["notary"], + "cwd": "${workspaceFolder}/iguana" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..61eadc6a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,23 @@ +{ + // The following will hide unneeded files in the editor + "files.exclude": { + "**/*.o": true, + "**/*.a": true, + "**/*.lo": true, + "**/*.Po": true, + "**/*.Plo": true, + "**/*.la": true, + "**/*.lai": true, + }, + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/*.o": true, + "**/*.a": true, + "**/*.lo": true, + "**/*.Po": true, + "**/*.Plo": true, + "**/*.la": true, + "**/*.lai": true, + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..cbc44261 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,20 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build Iguana [debug]", + "type": "shell", + "command": "make clean; make CFLAGS='-g -Wno-deprecated -O0 -DISNOTARYNODE=1' CFLAGS_NO_OPTIMIZATION='-g -Wno-deprecated -O0 -DISNOTARYNODE=1' -j$(nproc)", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + }, + "options": { + "cwd": "${workspaceFolder}/iguana/" + }, + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 1ba5d694..a9201812 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ General [Setup instructions](https://github.com/KomodoPlatform/Documentation/blo | Coin | src | Version/Tree | Status | dPoW | | -------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | ------------ | | KMD | [komodo](https://github.com/komodoplatform/komodo) | [2651eaf](https://github.com/KomodoPlatform/komodo/commit/2651eafc5219de3775cb08ff128c334d4c812aa9) | [![dPOW Status](https://badges.komodo.earth/svg/KMD_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-Mainnet | -| LTC | [litecoin](https://github.com/litecoin-project/litecoin) | [0.16](https://github.com/litecoin-project/litecoin/tree/69fce744115a7d2889ff1b90e89582b83de405ad) | [![dPOW Status](https://badges.komodo.earth/svg/KMD_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-Mainnet | +| LTC | [litecoin](https://github.com/litecoin-project/litecoin) | [0.21.4](https://github.com/litecoin-project/litecoin/tree/beae01d62292a0aab363b7a4d3f606708cea7260) | [![dPOW Status](https://badges.komodo.earth/svg/KMD_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-Mainnet | | CCL | [komodo](https://github.com/komodoplatform/komodo) | [2651eaf](https://github.com/KomodoPlatform/komodo/commit/2651eafc5219de3775cb08ff128c334d4c812aa9) | [![dPOW Status](https://badges.komodo.earth/svg/CCL_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-mainnet | | CLC | [komodo](https://github.com/komodoplatform/komodo) | [2651eaf](https://github.com/KomodoPlatform/komodo/commit/2651eafc5219de3775cb08ff128c334d4c812aa9) | [![dPOW Status](https://badges.komodo.earth/svg/CLC_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-mainnet | | DOC | [komodo](https://github.com/komodoplatform/komodo) | [2651eaf](https://github.com/KomodoPlatform/komodo/commit/2651eafc5219de3775cb08ff128c334d4c812aa9) | [![dPOW Status](https://badges.komodo.earth/svg/MORTY_badge.svg?maxAge=60)](https://komodostats.com) | dPoW-mainnet | diff --git a/doc/changelog.md b/doc/changelog.md index 1fe2afe9..56566f71 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 0.8.2 + +- Updates `litecoind` to `v0.21.4` [`beae01d`](https://github.com/litecoin-project/litecoin/commit/beae01d62292a0aab363b7a4d3f606708cea7260) +- Shuts down KDF on Notary 3P node + ## 0.8.1 - Removes `SUPERNET`, `NINJA` diff --git a/doc/daemon_versions.json b/doc/daemon_versions.json index 2a7488a7..35b84308 100644 --- a/doc/daemon_versions.json +++ b/doc/daemon_versions.json @@ -1,6 +1,6 @@ { "KMD": "2651eaf", - "LTC": "0.16", + "LTC": "0.21.4", "CCL": "2651eaf", "CLC": "2651eaf", "DOC": "2651eaf", diff --git a/doc/seed_version_epochs.json b/doc/seed_version_epochs.json index 27843bf5..5c4345b0 100644 --- a/doc/seed_version_epochs.json +++ b/doc/seed_version_epochs.json @@ -35,6 +35,6 @@ }, "35e9239": { "version": "2.1.0", - "end": 1987654321 + "end": 1736533799 } } diff --git a/doc/update082.md b/doc/update082.md new file mode 100644 index 00000000..269b6708 --- /dev/null +++ b/doc/update082.md @@ -0,0 +1,81 @@ +# dPoW 0.8.2 update information + +### Update Litecoin Core to `v0.21.4` + +The main purpose of this update is to upgrade the outdated Litecoin Core `0.16.x`, still used on notaries, to the latest version `v0.21.4`. Since a resync is required (as explained [here](https://github.com/litecoin-project/litecoin/issues/865#issuecomment-1304798606)) when updating from pre-MWEB versions, we need to prepare in advance. Specifically, build the latest `litecoind` and perform a full sync from scratch before the transition. The manual below explains how to achieve this without losing notarization counts and without stopping LTC notarizations. + +#### Build latest Litecoin: + +```bash +cd ~ +git clone https://github.com/litecoin-project/litecoin litecoin.021 +cd litecoin.021 +git checkout beae01d # https://github.com/litecoin-project/litecoin/tree/v0.21.4 +# apply patches from PR#990 to build dependencies with gcc-11 +wget https://github.com/litecoin-project/litecoin/pull/990.diff +git apply -v 990.diff +# build as described here https://komodoplatform.com/en/docs/notary/ +make -C ${PWD}/depends v=1 NO_PROTON=1 NO_QT=1 HOST=$(depends/config.guess) -j$(nproc --all) +./autogen.sh +CXXFLAGS="-g0 -O2" CONFIG_SITE="$PWD/depends/$(depends/config.guess)/share/config.site" ./configure --disable-tests --disable-bench --without-miniupnpc -enable-experimental-asm --with-gui=no --disable-bip70 +make V=1 -j$(nproc --all) +``` + +#### Sync latest Litecoin from scratch: + +```bash +mkdir -p ~/.litecoin.021 +echo -e "txindex=1\nrpcport=9334\nserver=1\nlisten=0" > ~/.litecoin.021/litecoin.conf +./src/litecoind -datadir=$HOME/.litecoin.021 -daemon +tail -F ~/.litecoin.021//debug.log # sync monitoring, when it synced till 100%, stop it +./src/litecoin-cli -datadir=$HOME/.litecoin.021 stop +rm ~/.litecoin.021/litecoin.conf +``` + +#### Swap data folders and sources folders: + +```bash +cd ~ +~/litecoin/src/litecoin-cli stop && sleep 5 # stop your old daemon +cp ~/.litecoin/litecoin.conf ~/.litecoin.021 # copy .conf and wallet.dat in new folder +cp ~/.litecoin/wallet.dat ~/.litecoin.021 +mv ~/.litecoin ~/.litecoin.016 # swap folders +mv ~/litecoin ~/litecoin.016 +mv ~/.litecoin.021 ~/.litecoin +mv ~/litecoin.021 ~/litecoin +``` + +#### Start the new litecoin daemon + +Start `litecoind` as usual. If you use scripts to start all daemons, modify them to include the `-daemon` argument to prevent console spam, and remove the `-pubkey` argument, as `litecoind` does not recognize it and will quit shortly instead of launching. Your daemon launch command should look like this: + +```bash +~/litecoin/src/litecoind -daemon +``` + +### Restart Iguana + +```bash +# Update dPoW repo +cd ~/dPoW +git checkout master +git pull + +# Restart Iguana +pkill -9 iguana +cd iguana +./m_notary_build +./m_notary_main +``` + +Make sure notarisations are progressing. + +### Stop KDF + +```bash +cd ~/notary_docker_3p +docker compose stop mm2 +docker compose rm mm2 +git pull +./setup nobuild +``` diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index 9207c16e..680fd5b2 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -34,7 +34,7 @@ int32_t dpow_is015(char *symbol) // for dpow_is015 enabled coins validateaddress call will be auto-changed on getaddressinfo, if initial validateaddress // call will return an error, also signrawtransaction will be replaced with signrawtransactionwithwallet, also, it seems // GAME, EMC2 and AYA shouldn't be there, bcz they don't have getaddressinfo and signrawtransactionwithwallet . - const char *dpow_015_coins[] = {"CHIPS", "AYA"}; + const char *dpow_015_coins[] = {"CHIPS", "AYA", "LTC"}; for (size_t i = 0; i < sizeof(dpow_015_coins) / sizeof(dpow_015_coins[0]); i++) { if (0 == strcmp(dpow_015_coins[i],symbol)) return 1; diff --git a/iguana/version b/iguana/version index 6f4eebdf..100435be 100644 --- a/iguana/version +++ b/iguana/version @@ -1 +1 @@ -0.8.1 +0.8.2