From 5d39102512da03c14175ba84b62c35367c14a463 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 16:45:27 +0100 Subject: [PATCH 01/39] adapt the build system to support other GitHub users and repositories --- .github/workflows/build.yml | 16 ++++++++++ build.sh | 21 ++++++++++---- .../docker/Dockerfile.dsw-linux-arm64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-linux-x64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-macos-x64-wallet | 15 ++++++---- .../docker/Dockerfile.dsw-windows-x64-wallet | 29 +++++++++++-------- 6 files changed, 79 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62fad7836..f7456de79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,12 +17,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=linux-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=linux-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -40,6 +43,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-linux-x64-wallet . @@ -76,12 +80,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=linux-arm64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=linux-arm64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -99,6 +106,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-linux-arm64-wallet . @@ -135,12 +143,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=windows-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=windows-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -158,6 +169,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-windows-x64-wallet . @@ -194,12 +206,15 @@ jobs: run: | # Extract the name of the repository and use it as the ticker value REPO_NAME="${GITHUB_REPOSITORY##*/}" + # Extract the name of the repository owner and use it as the github user + ACCOUNT_NAME="${GITHUB_REPOSITORY%/*}" # Get the short name of the ref (strip 'refs/heads/', 'refs/tags/', etc.) SHORT_REF=${GITHUB_REF##*/} # Get the short commit hash SHORT_COMMIT_HASH=$(git rev-parse --short HEAD) # Set environment variables echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV + echo "ACCOUNT_NAME=${ACCOUNT_NAME}" >> $GITHUB_ENV echo "SHORT_REF=${SHORT_REF}" >> $GITHUB_ENV echo "IMAGE_NAME=macos-x64-build-img-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV echo "CONTAINER_NAME=macos-x64-build-ctn-${SHORT_COMMIT_HASH}" >> $GITHUB_ENV @@ -217,6 +232,7 @@ jobs: --build-arg NAME=__Decenomy__ \ --build-arg BASE_NAME=__decenomy__ \ --build-arg TARGET=$SHORT_REF \ + --build-arg GITHUB_USER=$ACCOUNT_NAME \ -t ${IMAGE_NAME} \ -f contrib/docker/Dockerfile.dsw-macos-x64-wallet . diff --git a/build.sh b/build.sh index 0f43f4983..5f433fb77 100755 --- a/build.sh +++ b/build.sh @@ -11,15 +11,26 @@ CPU_CORES=${CPU_CORES:-""} # windows-x64 ARCHITECTURE=${ARCHITECTURE:-""} +# Get the origin URL +ORIGIN_URL=$(git config --get remote.origin.url) + +# Extract the github username and repository name +if [[ $ORIGIN_URL =~ ^https://github.com/(.+)/(.+)\.git$ ]]; then + GITHUB_USER="${BASH_REMATCH[1]}" + GITHUB_REPO="${BASH_REMATCH[2]}" +elif [[ $ORIGIN_URL =~ ^git@github.com:(.+)/(.+)\.git$ ]]; then + GITHUB_USER="${BASH_REMATCH[1]}" + GITHUB_REPO="${BASH_REMATCH[2]}" +else + echo "Unable to parse origin URL: $ORIGIN_URL" + exit 1 +fi + # Sets variables needed for the build -TICKER=${TICKER:-"__DSW__"} +TICKER=${TICKER:-"${GITHUB_REPO}"} UI_NAME=${UI_NAME:-"__Decenomy__"} BASE_NAME=${BASE_NAME:-"__decenomy__"} -# Sets the github environment variables -GITHUB_USER="decenomy" -GITHUB_REPO="__DSW__" - # Sets the build environment variable # 0: The build will use the builder image available on docker hub # 1: The build will use a locally build image for the builder image diff --git a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet index c4402ba21..16da0ade5 100644 --- a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -63,9 +68,9 @@ RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $B RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $BASE_NAME)-cli RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/$(echo $BASE_NAME)-tx RUN PATH=${WRAP_DIR}:${PATH} aarch64-linux-gnu-objcopy --strip-all src/qt/$(echo $BASE_NAME)-qt -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /$TICKER/deploy/linux-arm64 -RUN find /$TICKER/deploy/linux-arm64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/linux-arm64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/linux-arm64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Linux-arm64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-Linux-arm64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-Linux-arm64.ASC diff --git a/contrib/docker/Dockerfile.dsw-linux-x64-wallet b/contrib/docker/Dockerfile.dsw-linux-x64-wallet index 7fed396f3..a83ede5c1 100644 --- a/contrib/docker/Dockerfile.dsw-linux-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-x64-wallet @@ -10,16 +10,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -61,9 +66,9 @@ RUN grep "define(_CLIENT_VERSION_BUILD" configure.ac | awk -F"[ ,)]" '{print $3} # Create deploy files RUN mkdir -p deploy/linux-x64 RUN PATH=${WRAP_DIR}:${PATH} strip -s src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /$TICKER/deploy/linux-x64 -RUN find /$TICKER/deploy/linux-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/linux-x64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt /${GITHUB_USER}/${TICKER}/deploy/linux-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/linux-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/linux-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Linux-x64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-Linux-x64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-Linux-x64.ASC diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-wallet b/contrib/docker/Dockerfile.dsw-macos-x64-wallet index e5343bbff..f52497261 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-macos-x64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -65,9 +70,9 @@ RUN PATH=${WRAP_DIR}:/DSW/depends/x86_64-apple-darwin14/native/bin/:${PATH} \ # Create deploy files RUN mkdir -p deploy/macos-x64 -RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg /$TICKER/deploy/macos-x64 -RUN find /$TICKER/deploy/macos-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/macos-x64 +RUN cp src/$(echo $BASE_NAME)d src/$(echo $BASE_NAME)-cli src/$(echo $BASE_NAME)-tx src/qt/$(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg /${GITHUB_USER}/${TICKER}/deploy/macos-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/macos-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/macos-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-MacOS-x64.zip $(echo $BASE_NAME)d $(echo $BASE_NAME)-cli $(echo $BASE_NAME)-tx $(echo $BASE_NAME)-qt $(echo $NAME)-Core.dmg RUN echo "$(git rev-parse HEAD) commit" >> SHA256SUMS-MacOS-x64.ASC RUN sha256sum $(echo $BASE_NAME)d >> SHA256SUMS-MacOS-x64.ASC diff --git a/contrib/docker/Dockerfile.dsw-windows-x64-wallet b/contrib/docker/Dockerfile.dsw-windows-x64-wallet index 08daee0f7..aea1c27a0 100644 --- a/contrib/docker/Dockerfile.dsw-windows-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-windows-x64-wallet @@ -9,16 +9,21 @@ ARG TICKER=__DSW__ ARG NAME=__Decenomy__ ARG BASE_NAME=__decenomy__ ARG TARGET=master +ARG GITHUB_USER=decenomy RUN sleep 30 +RUN mkdir -p ${GITHUB_USER} +# Switch to the github user directory +WORKDIR /$GITHUB_USER + # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/decenomy/$TICKER; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}; \ fi # Switch to the repository directory -WORKDIR /$TICKER +WORKDIR /${GITHUB_USER}/${TICKER} # Check out the $TARGET RUN git stash --include-untracked && \ @@ -69,10 +74,10 @@ RUN cp \ src/$(echo $BASE_NAME)-cli.exe \ src/$(echo $BASE_NAME)-tx.exe \ src/qt/$(echo $BASE_NAME)-qt.exe \ - /$TICKER/deploy/windows-x64 -RUN find /$TICKER/deploy/windows-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + + /${GITHUB_USER}/${TICKER}/deploy/windows-x64 +RUN find /${GITHUB_USER}/${TICKER}/deploy/windows-x64 -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/deploy/windows-x64 +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/windows-x64 RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-Windows-x64.zip \ $(echo $BASE_NAME)d.exe \ $(echo $BASE_NAME)-cli.exe \ @@ -87,17 +92,17 @@ RUN sha256sum $(echo $BASE_NAME)-qt.exe >> SHA256SUMS-Windows-x64.ASC RUN sha256sum $TICKER-$(cat /wallet_version)-Windows-x64.zip >> SHA256SUMS-Windows-x64.ASC # Set the Inno Setup compiler -RUN mkdir -p /$TICKER/contrib/innosetup/package -RUN cp $(echo $BASE_NAME)* /$TICKER/contrib/innosetup/package/ -RUN find /$TICKER/contrib/innosetup/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + -RUN find /$TICKER/contrib/innosetup/package/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + +RUN mkdir -p /${GITHUB_USER}/${TICKER}/contrib/innosetup/package +RUN cp $(echo $BASE_NAME)* /${GITHUB_USER}/${TICKER}/contrib/innosetup/package/ +RUN find /${GITHUB_USER}/${TICKER}/contrib/innosetup/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + +RUN find /${GITHUB_USER}/${TICKER}/contrib/innosetup/package/ -type f -exec touch -t $(cat /git_timestamp_touch) {} + -WORKDIR /$TICKER/contrib/innosetup +WORKDIR /${GITHUB_USER}/${TICKER}/contrib/innosetup RUN PATH=${WRAP_DIR}:${PATH} wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe setup.iss -RUN mv output/$(echo $NAME)Setup.exe /$TICKER/deploy/windows-x64/$(echo $NAME)-$(cat /wallet_version)-Setup.exe +RUN mv output/$(echo $NAME)Setup.exe /${GITHUB_USER}/${TICKER}/deploy/windows-x64/$(echo $NAME)-$(cat /wallet_version)-Setup.exe -WORKDIR /$TICKER/deploy/windows-x64 +WORKDIR /${GITHUB_USER}/${TICKER}/deploy/windows-x64 RUN touch -t $(cat /git_timestamp_touch) $(echo $NAME)-$(cat /wallet_version)-Setup.exe RUN PATH=${WRAP_DIR}:${PATH} zip -X $TICKER-$(cat /wallet_version)-WindowsSetup-x64.zip \ $(echo $NAME)-$(cat /wallet_version)-Setup.exe From 306fa064b4d40a64709fa4bfa6445e5015bf7115 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 16:55:31 +0100 Subject: [PATCH 02/39] changes the docker cp command on build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7456de79..5627b1024 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/linux-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/linux-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -117,7 +117,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/linux-arm64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/linux-arm64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -180,7 +180,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/windows-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/windows-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 @@ -243,7 +243,7 @@ jobs: mkdir release_files # Copy files from the Docker container to the local filesystem - docker cp ${CONTAINER_NAME}:/$REPO_NAME/deploy/macos-x64 release_files/ + docker cp ${CONTAINER_NAME}:/$ACCOUNT_NAME/$REPO_NAME/deploy/macos-x64 release_files/ - name: Archive and Upload Extracted Files uses: actions/upload-artifact@v4 From f3daf941c4ef808e125a825acd3085a33f9631a2 Mon Sep 17 00:00:00 2001 From: zimbora Date: Mon, 5 Aug 2024 20:51:26 +0100 Subject: [PATCH 03/39] build.sh: uses GITHUB_USER Dockerfile: adds ".git" --- build.sh | 3 ++- contrib/docker/Dockerfile.dsw-linux-arm64-wallet | 2 +- contrib/docker/Dockerfile.dsw-linux-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-windows-x64-wallet | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 5f433fb77..057bc7251 100755 --- a/build.sh +++ b/build.sh @@ -238,6 +238,7 @@ docker buildx build \ --build-arg NAME=$UI_NAME \ --build-arg BASE_NAME=$BASE_NAME \ --build-arg TARGET=$TARGET \ + --build-arg GITHUB_USER=$GITHUB_USER \ -f $WALLET_DOCKER_FILE.tmp \ -t $image_tag \ . @@ -257,7 +258,7 @@ trace "Container ID: $container_id" # Copy files from the container to the current directory mkdir -p deploy rm -rf deploy/$ARCHITECTURE -docker cp "$container_id":/${TICKER}/deploy/. ./deploy/ +docker cp "$container_id":/${GITHUB_USER}/${TICKER}/deploy/. ./deploy/ # Main verification process if [ "$VERIFY" -ge 1 ]; then diff --git a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet index 16da0ade5..a951120fa 100644 --- a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-linux-x64-wallet b/contrib/docker/Dockerfile.dsw-linux-x64-wallet index a83ede5c1..f97971f96 100644 --- a/contrib/docker/Dockerfile.dsw-linux-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-x64-wallet @@ -20,7 +20,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-wallet b/contrib/docker/Dockerfile.dsw-macos-x64-wallet index f52497261..35d16635c 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-macos-x64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory diff --git a/contrib/docker/Dockerfile.dsw-windows-x64-wallet b/contrib/docker/Dockerfile.dsw-windows-x64-wallet index aea1c27a0..87914f42f 100644 --- a/contrib/docker/Dockerfile.dsw-windows-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-windows-x64-wallet @@ -19,7 +19,7 @@ WORKDIR /$GITHUB_USER # Clone the repository RUN if [ ! -d $TICKER ]; then \ - git clone https://github.com/${GITHUB_USER}/${TICKER}; \ + git clone https://github.com/${GITHUB_USER}/${TICKER}.git; \ fi # Switch to the repository directory From a0ad6a3967e37f43d95d51783f6e0ef7056987fc Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 24 Sep 2024 17:32:58 +0100 Subject: [PATCH 04/39] adds CWallet::AvailableCoins performance improvements --- src/wallet/wallet.cpp | 127 ++++++++++++++++++++++++++++++------------ src/wallet/wallet.h | 9 ++- 2 files changed, 98 insertions(+), 38 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e4f5f2399..e53cfcc6e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -588,9 +588,10 @@ ScriptPubKeyMan* CWallet::GetScriptPubKeyMan() const * Outpoint is spent if any non-conflicted transaction * spends it: */ -bool CWallet::IsSpent(const uint256& hash, unsigned int n) const +bool CWallet::IsSpent(const uint256& hash, unsigned int n, int& nSpendDepth) const { const COutPoint outpoint(hash, n); + nSpendDepth = 0; std::pair range; range = mapTxSpends.equal_range(outpoint); for (TxSpends::const_iterator it = range.first; it != range.second; ++it) { @@ -601,8 +602,10 @@ bool CWallet::IsSpent(const uint256& hash, unsigned int n) const const int nDepth = mit->second.GetDepthAndMempool(fConflicted); // not in mempool txes can spend coins only if not coinstakes const bool fConflictedCoinstake = fConflicted && mit->second.IsCoinStake(); - if (nDepth > 0 || (nDepth == 0 && !mit->second.isAbandoned() && !fConflictedCoinstake) ) + if (nDepth > 0 || (nDepth == 0 && !mit->second.isAbandoned() && !fConflictedCoinstake)) { + nSpendDepth = nDepth; return true; // Spent + } } } return false; @@ -823,6 +826,9 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose) // Inserts only if not already there, returns tx inserted or tx found auto ret = mapWallet.insert(std::make_pair(hash, wtxIn)); CWalletTx& wtx = (*ret.first).second; + if(ret.second) { // if it is a newly inserted transaction + setWallet.insert(hash); + } wtx.BindWallet(this); bool fInsertedNew = ret.second; if (fInsertedNew) { @@ -886,6 +892,7 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn) { const uint256& hash = wtxIn.GetHash(); mapWallet[hash] = wtxIn; + setWallet.insert(hash); CWalletTx& wtx = mapWallet[hash]; wtx.BindWallet(this); wtxOrdered.insert(std::make_pair(wtx.nOrderPos, TxPair(&wtx, (CAccountingEntry*)0))); @@ -1088,8 +1095,10 @@ void CWallet::EraseFromWallet(const uint256& hash) return; { LOCK(cs_wallet); - if (mapWallet.erase(hash)) + if (mapWallet.erase(hash)) { + setWallet.erase(hash); CWalletDB(strWalletFile).EraseTx(hash); + } LogPrintf("%s: Erased wtx %s from wallet\n", __func__, hash.GetHex()); } return; @@ -1624,8 +1633,12 @@ CAmount CWallet::loopTxsBalance(std::functionsecond, nTotal); + } } } return nTotal; @@ -1650,18 +1663,28 @@ CAmount CWallet::GetAvailableBalance(isminefilter& filter, bool useCache, int mi CAmount CWallet::GetStakingBalance() const { - return std::max(CAmount(0), loopTxsBalance( - [](const uint256& id, const CWalletTx& pcoin, CAmount& nTotal) { - if (pcoin.IsTrusted() && - pcoin.GetDepthInMainChain() - >= - (Params().GetConsensus().NetworkUpgradeActive(chainActive.Height(), Consensus::UPGRADE_STAKE_MIN_DEPTH_V2) ? - Params().GetConsensus().nStakeMinDepthV2 : Params().GetConsensus().nStakeMinDepth) - ) { - nTotal += pcoin.GetAvailableCredit(); // available coins - nTotal -= pcoin.GetLockedCredit(); // minus locked coins, if any - } - })); + const auto& nHeight = chainActive.Height(); + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + const auto& nStakeMinDepth = + consensus.NetworkUpgradeActive(nHeight, Consensus::UPGRADE_STAKE_MIN_DEPTH_V2) ? + consensus.nStakeMinDepthV2 : + consensus.nStakeMinDepth; + + return + std::max( + CAmount(0), + loopTxsBalance( + [nStakeMinDepth](const uint256& id, const CWalletTx& pcoin, CAmount& nTotal) + { + if (pcoin.IsTrusted() && pcoin.GetDepthInMainChain() >= nStakeMinDepth) + { + nTotal += pcoin.GetAvailableCredit(); // available coins + nTotal -= pcoin.GetLockedCredit(); // minus locked coins, if any + } + } + ) + ); } CAmount CWallet::GetLockedCoins() const @@ -1865,11 +1888,26 @@ bool CWallet::AvailableCoins(std::vector* pCoins, // --> populates if (pCoins) pCoins->clear(); const bool fCoinsSelected = (coinControl != nullptr) && coinControl->HasSelected(); - { - LOCK2(cs_main, cs_wallet); - for (auto it = mapWallet.begin(); it != mapWallet.end(); ++it) { - const uint256& wtxid = it->first; - const CWalletTx* pcoin = &(*it).second; + const auto nMaxReorgDepth = GetArg("-maxreorg", DEFAULT_MAX_REORG_DEPTH); + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + const auto nHeight = chainActive.Height(); + const auto nStakeMinDepth = + consensus.NetworkUpgradeActive(nHeight, Consensus::UPGRADE_STAKE_MIN_DEPTH_V2) ? + consensus.nStakeMinDepthV2 : + consensus.nStakeMinDepth; + + LOCK2(cs_main, cs_wallet); + + std::vector vErase; + + for (auto it = setWallet.begin(); it != setWallet.end(); ++it) { + + const uint256& wtxid = *it; + + auto it2 = mapWallet.find(wtxid); + if(it2 != mapWallet.end()) { + const CWalletTx* pcoin = &(*it2).second; // Check if the tx is selectable int nDepth; @@ -1877,38 +1915,44 @@ bool CWallet::AvailableCoins(std::vector* pCoins, // --> populates continue; // Check min depth requirement for stake inputs - if (nCoinType == STAKEABLE_COINS && - nDepth - < - (Params().GetConsensus().NetworkUpgradeActive(chainActive.Height(), Consensus::UPGRADE_STAKE_MIN_DEPTH_V2) ? - Params().GetConsensus().nStakeMinDepthV2 : Params().GetConsensus().nStakeMinDepth)) continue; - - for (unsigned int i = 0; i < pcoin->vout.size(); i++) { + if (nCoinType == STAKEABLE_COINS && nDepth < nStakeMinDepth) continue; - // Check for only 10k utxo - if (nCoinType == ONLY_10000 && !CMasternode::CheckMasternodeCollateral(pcoin->vout[i].nValue)) continue; + int nMine = 0; + int nMineSpent = 0; - // Check if the utxo was spent. - if (IsSpent(wtxid, i)) continue; + for (unsigned int i = 0; i < pcoin->vout.size(); i++) { + int nSpendDepth; + bool spent = IsSpent(wtxid, i, nSpendDepth); isminetype mine = IsMine(pcoin->vout[i]); // Check If not mine if (mine == ISMINE_NO) continue; + nMine++; + + // Check if the utxo was spent. + if (spent) { + if(nSpendDepth > nMaxReorgDepth) nMineSpent++; + continue; + } + + // Check for only 10k utxo + if (nCoinType == ONLY_10000 && !CMasternode::CheckMasternodeCollateral(pcoin->vout[i].nValue)) continue; + // Check if watch only utxo are allowed if (mine == ISMINE_WATCH_ONLY && coinControl && !coinControl->fAllowWatchOnly) continue; // Skip locked utxo - if (IsLockedCoin((*it).first, i) && nCoinType != ONLY_10000) continue; + if (IsLockedCoin(wtxid, i) && nCoinType != ONLY_10000) continue; // Skip configured masternode collaterals - if (masternodeConfig.contains(COutPoint((*it).first, i)) && nCoinType != ONLY_10000) continue; + if (masternodeConfig.contains(COutPoint(wtxid, i)) && nCoinType != ONLY_10000) continue; // Check if we should include zero value utxo if (pcoin->vout[i].nValue <= 0) continue; - if (fCoinsSelected && !coinControl->fAllowOtherInputs && !coinControl->IsSelected(COutPoint((*it).first, i))) + if (fCoinsSelected && !coinControl->fAllowOtherInputs && !coinControl->IsSelected(COutPoint(wtxid, i))) continue; bool solvable = IsSolvable(*this, pcoin->vout[i].scriptPubKey); @@ -1920,9 +1964,18 @@ bool CWallet::AvailableCoins(std::vector* pCoins, // --> populates if (!pCoins) return true; pCoins->emplace_back(COutput(pcoin, i, nDepth, spendable, solvable)); } + + if(nDepth > 0 && nMine > 0 && nMine == nMineSpent) { + vErase.push_back(wtxid); + } } - return (pCoins && pCoins->size() > 0); } + + for (auto it = vErase.begin(); it != vErase.end(); ++it) { + setWallet.erase(*it); + } + + return (pCoins && pCoins->size() > 0); } std::map > CWallet::AvailableCoinsByAddress(bool fConfirmed, CAmount maxCoinValue) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index c5692ff7a..8eb64de8f 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -40,6 +40,7 @@ #include #include +#include extern CWallet* pwalletMain; @@ -336,6 +337,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface void setMultiSendDisabled(); boost::unordered_map mapWallet; + mutable boost::unordered_set setWallet; + std::list laccentries; typedef std::pair TxPair; @@ -378,7 +381,11 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface /// Extract txin information and keys from output bool GetVinAndKeysFromOutput(COutput out, CTxIn& txinRet, CPubKey& pubKeyRet, CKey& keyRet); - bool IsSpent(const uint256& hash, unsigned int n) const; + bool IsSpent(const uint256& hash, unsigned int n, int& nSpendDepth) const; + bool IsSpent(const uint256& hash, unsigned int n) const { + int nSpendDepth; + return IsSpent(hash, n, nSpendDepth); + }; bool IsLockedCoin(const uint256& hash, unsigned int n) const; void LockCoin(const COutPoint& output); From b31e68998bc18fa9142229d914f20d13e6bfa017 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 24 Sep 2024 17:42:43 +0100 Subject: [PATCH 05/39] removes the selfhost github actions builder to the default one on ghithub --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62fad7836..210513c60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: jobs: build-files-linux-x64: - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-22.04 steps: - name: Checkout Repository @@ -66,7 +66,7 @@ jobs: docker rmi ${IMAGE_NAME} build-files-linux-arm64: - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-22.04 steps: - name: Checkout Repository @@ -125,7 +125,7 @@ jobs: docker rmi ${IMAGE_NAME} build-windows-x64: - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-22.04 steps: - name: Checkout Repository @@ -184,7 +184,7 @@ jobs: docker rmi ${IMAGE_NAME} build-macos-x64: - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-22.04 steps: - name: Checkout Repository From 51d98234a5704b18f277c13f8e052b9482dfe757 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 27 Sep 2024 14:26:57 +0100 Subject: [PATCH 06/39] Changes the depends packages to IPFS hosted ones --- depends/packages/bdb.mk | 4 +++- depends/packages/boost.mk | 4 +++- depends/packages/curl.mk | 4 +++- depends/packages/dbus.mk | 4 +++- depends/packages/expat.mk | 4 +++- depends/packages/fontconfig.mk | 4 +++- depends/packages/freetype.mk | 4 +++- depends/packages/gmp.mk | 4 +++- depends/packages/libX11.mk | 4 +++- depends/packages/libXau.mk | 4 +++- depends/packages/libXext.mk | 4 +++- depends/packages/libevent.mk | 6 ++++-- depends/packages/libxcb.mk | 4 +++- depends/packages/miniupnpc.mk | 4 +++- depends/packages/native_biplist.mk | 4 +++- depends/packages/native_cctools.mk | 9 ++++++--- depends/packages/native_cdrkit.mk | 4 +++- depends/packages/native_ds_store.mk | 4 +++- depends/packages/native_libdmg-hfsplus.mk | 4 +++- depends/packages/native_mac_alias.mk | 4 +++- depends/packages/native_protobuf.mk | 4 +++- depends/packages/openssl.mk | 4 +++- depends/packages/protobuf.mk | 3 +-- depends/packages/qrencode.mk | 4 +++- depends/packages/qt.mk | 20 +++++++++++++++----- depends/packages/xcb_proto.mk | 4 +++- depends/packages/xextproto.mk | 4 +++- depends/packages/xproto.mk | 4 +++- depends/packages/xtrans.mk | 4 +++- depends/packages/zeromq.mk | 4 +++- depends/packages/zlib.mk | 4 +++- 31 files changed, 107 insertions(+), 39 deletions(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index d3a46d785..00278772d 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -1,7 +1,9 @@ package=bdb $(package)_version=4.8.30 # $(package)_download_path=https://download.oracle.com/berkeley-db -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-4.8.30.NC.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-$($(package)_version).NC.tar.gz $(package)_file_name=db-$($(package)_version).NC.tar.gz $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef $(package)_build_subdir=build_unix diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 90153882f..c26178a37 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,7 +1,9 @@ package=boost $(package)_version=1_85_0 # $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_1_85_0.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_$($(package)_version).tar.bz2 $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 diff --git a/depends/packages/curl.mk b/depends/packages/curl.mk index 0109be8e5..09cd7f4ec 100644 --- a/depends/packages/curl.mk +++ b/depends/packages/curl.mk @@ -1,7 +1,9 @@ package=curl $(package)_version=8.4.0 #$(package)_download_path=https://github.com/curl/curl/releases/download/curl-8_4_0/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=curl-8.4.0.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 $(package)_dependencies=openssl diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk index c0c344c1e..a94a81939 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -1,7 +1,9 @@ package=dbus $(package)_version=1.10.18 # $(package)_download_path=https://dbus.freedesktop.org/releases/dbus -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=dbus-1.10.18.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a $(package)_dependencies=expat diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index b0a869084..b004f683c 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -1,7 +1,9 @@ package=expat $(package)_version=2.2.6 # $(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=expat-2.2.6.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2 diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index ad85f73e7..9d7ff41db 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -1,7 +1,9 @@ package=fontconfig $(package)_version=2.12.1 # $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=fontconfig-2.12.1.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 $(package)_dependencies=freetype expat diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index 6cb281c19..54ef3b418 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -1,7 +1,9 @@ package=freetype $(package)_version=2.7.1 # $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=freetype-2.7.1.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index 4dd46c529..070f2d672 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -1,7 +1,9 @@ package=gmp $(package)_version=6.1.2 # $(package)_download_path=https://gmplib.org/download/gmp -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=gmp-6.1.2.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2 diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk index 3b8e60287..c6fcb7b00 100644 --- a/depends/packages/libX11.mk +++ b/depends/packages/libX11.mk @@ -1,7 +1,9 @@ package=libX11 $(package)_version=1.6.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=libX11-1.6.2.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16 $(package)_dependencies=libxcb xtrans xextproto xproto diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index cb396c7c9..0da1268a6 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -1,7 +1,9 @@ package=libXau $(package)_version=1.0.8 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=libXau-1.0.8.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 $(package)_dependencies=xproto diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk index be5e06cfa..99eef29f9 100644 --- a/depends/packages/libXext.mk +++ b/depends/packages/libXext.mk @@ -1,7 +1,9 @@ package=libXext $(package)_version=1.3.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=libXext-1.3.2.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0 $(package)_dependencies=xproto xextproto libX11 libXau diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 086c9887d..0c3365a94 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -1,7 +1,9 @@ package=libevent $(package)_version=2.1.12-stable -#$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/ +# https://ipfs.io/ipfs/QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-2.1.12-stable.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-$($(package)_version).tar.gz $(package)_file_name=libevent-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index e37fa63a0..afef15d5d 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,7 +1,9 @@ package=libxcb $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=libxcb-1.10.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 $(package)_dependencies=xcb_proto libXau xproto diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index ae717fe20..77024ad26 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -1,7 +1,9 @@ package=miniupnpc $(package)_version=2.0.20180203 # $(package)_download_path=https://miniupnp.tuxfamily.org/files/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=miniupnpc-2.0.20180203.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk index f992f6e62..172cb8c41 100644 --- a/depends/packages/native_biplist.mk +++ b/depends/packages/native_biplist.mk @@ -1,7 +1,9 @@ package=native_biplist $(package)_version=1.0.3 # $(package)_download_path=https://bitbucket.org/wooster/biplist/downloads -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-1.0.3.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-$($(package)_version).tar.gz $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index cbb6bc30c..7c5708474 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,14 +1,17 @@ package=native_cctools $(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 # $(package)_download_path=https://github.com/theuni/cctools-port/archive -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=807d6fd1be5d2224872e381870c0a75387fe05e6.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=$($(package)_version).tar.gz $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a $(package)_build_subdir=cctools $(package)_clang_version=3.7.1 # $(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) -$(package)_clang_download_path=https://github.com/decenomy/depends/raw/main/ -$(package)_clang_download_file=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz +# https://ipfs.io/ipfs/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz +$(package)_clang_download_path=https://ipfs.io/ipfs/ +$(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 $(package)_extra_sources=$($(package)_clang_file_name) diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk index b9a8a917f..d60eb7370 100644 --- a/depends/packages/native_cdrkit.mk +++ b/depends/packages/native_cdrkit.mk @@ -1,7 +1,9 @@ package=native_cdrkit $(package)_version=1.1.11 # $(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-1.1.11.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-$($(package)_version).tar.bz2 $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 $(package)_patches=cdrkit-deterministic.patch diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk index 0aaa11ee3..29309d717 100644 --- a/depends/packages/native_ds_store.mk +++ b/depends/packages/native_ds_store.mk @@ -1,7 +1,9 @@ package=native_ds_store $(package)_version=1.1.2 # $(package)_download_path=https://github.com/al45tair/ds_store/archive/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v1.1.2.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v$($(package)_version).tar.gz $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index 877a52dc2..73ff281fd 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -1,7 +1,9 @@ package=native_libdmg-hfsplus $(package)_version=0.1 # $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v0.1.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 $(package)_build_subdir=build diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk index d0927b8c2..4811bea14 100644 --- a/depends/packages/native_mac_alias.mk +++ b/depends/packages/native_mac_alias.mk @@ -1,7 +1,9 @@ package=native_mac_alias $(package)_version=2.0.7 # $(package)_download_path=https://github.com/al45tair/mac_alias/archive/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v2.0.7.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v$($(package)_version).tar.gz $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk index f0d314abb..908c09f42 100644 --- a/depends/packages/native_protobuf.mk +++ b/depends/packages/native_protobuf.mk @@ -1,7 +1,9 @@ package=native_protobuf $(package)_version=2.6.1 # $(package)_download_path=https://github.com/google/protobuf/releases/download/v$($(package)_version) -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-2.6.1.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-$($(package)_version).tar.bz2 $(package)_file_name=protobuf-$($(package)_version).tar.bz2 $(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index abeb2e451..9dad5e9db 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -1,7 +1,9 @@ package=openssl $(package)_version=1.1.1w #$(package)_download_path=https://www.openssl.org/source/old/1.1.1/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=openssl-1.1.1w.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 diff --git a/depends/packages/protobuf.mk b/depends/packages/protobuf.mk index 95872e7e6..d201d1183 100644 --- a/depends/packages/protobuf.mk +++ b/depends/packages/protobuf.mk @@ -1,7 +1,6 @@ package=protobuf $(package)_version=$(native_$(package)_version) -# $(package)_download_path=$(native_$(package)_download_path) -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +$(package)_download_path=$(native_$(package)_download_path) $(package)_file_name=$(native_$(package)_file_name) $(package)_sha256_hash=$(native_$(package)_sha256_hash) $(package)_dependencies=native_$(package) diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index cb6164ad3..04ea5de9d 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -1,7 +1,9 @@ package=qrencode $(package)_version=3.4.4 # $(package)_download_path=https://fukuchi.org/works/qrencode/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=qrencode-3.4.4.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index d4b56eacb..eb6631bcd 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,8 +1,10 @@ PACKAGE=qt $(package)_version=5.9.9 # $(package)_download_path=https://download.qt.io/archive/qt/5.9/$($(package)_version)/submodules -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-opensource-src-5.9.9.tar.xz $(package)_suffix=opensource-src-$($(package)_version).tar.xz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-$($(package)_suffix) $(package)_file_name=qtbase-$($(package)_suffix) $(package)_sha256_hash=d5a97381b9339c0fbaf13f0c05d599a5c999dcf94145044058198987183fed65 $(package)_dependencies=zlib @@ -11,15 +13,23 @@ $(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib concurrent $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch fix_s390x_powerpc_mips_mipsel_architectures.patch xkb-default.patch fix_gcc_11_3_compile.patch +# https://ipfs.io/ipfs/QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-opensource-src-5.9.9.tar.xz +$(package)_qttranslations_download_file=QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-$($(package)_suffix) $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=f7474f260a1382549720081bf2359a3d425ec3bf7d31976c512834303d30d73b +# https://ipfs.io/ipfs/QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-opensource-src-5.9.9.tar.xz +$(package)_qttools_download_file=QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-$($(package)_suffix) $(package)_qttools_file_name=qttools-$($(package)_suffix) $(package)_qttools_sha256_hash=fce6e0fd39a40bcef880c669080087dba94af1ec442296222210472e0852bf98 +# https://ipfs.io/ipfs/QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-opensource-src-5.9.9.tar.xz +$(package)_qtsvg_download_file=QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-$($(package)_suffix) $(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) $(package)_qtsvg_sha256_hash=0d2759178c0c1ec8c7ea0d05b7bf57787c09d8059ca9b9518607a8e97933e888 +# https://ipfs.io/ipfs/QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-opensource-src-5.9.9.tar.xz +$(package)_qtcharts_download_file=QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-$($(package)_suffix) $(package)_qtcharts_file_name=qtcharts-$($(package)_suffix) $(package)_qtcharts_sha256_hash=a503e9f1504c41a6a7850ca2e0e4e786fce45345c94eb81a6abd352d15b7d95c @@ -128,10 +138,10 @@ endef define $(package)_fetch_cmds $(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_file_name),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \ -$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtcharts_file_name),$($(package)_qtcharts_file_name),$($(package)_qtcharts_sha256_hash)) +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_download_file),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_download_file),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtsvg_download_file),$($(package)_qtsvg_file_name),$($(package)_qtsvg_sha256_hash)) && \ +$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qtcharts_download_file),$($(package)_qtcharts_file_name),$($(package)_qtcharts_sha256_hash)) endef define $(package)_extract_cmds diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 9902fc098..76323b577 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -1,7 +1,9 @@ package=xcb_proto $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-1.10.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-$($(package)_version).tar.bz2 $(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 $(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk index 72e12acd1..b12e19111 100644 --- a/depends/packages/xextproto.mk +++ b/depends/packages/xextproto.mk @@ -1,7 +1,9 @@ package=xextproto $(package)_version=7.3.0 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=xextproto-7.3.0.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0 diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index 51b61b8ae..d5890493a 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -1,7 +1,9 @@ package=xproto $(package)_version=7.0.26 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=xproto-7.0.26.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk index 884b0c582..b3edddf6b 100644 --- a/depends/packages/xtrans.mk +++ b/depends/packages/xtrans.mk @@ -1,7 +1,9 @@ package=xtrans $(package)_version=1.3.4 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=xtrans-1.3.4.tar.bz2 +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=$(package)-$($(package)_version).tar.bz2 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a $(package)_dependencies= diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 390999652..215aaa223 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -1,7 +1,9 @@ package=zeromq $(package)_version=4.3.1 # $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=zeromq-4.3.1.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb $(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index bf530a899..38d340e22 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -1,7 +1,9 @@ package=zlib $(package)_version=1.2.11 # $(package)_download_path=https://www.zlib.net -$(package)_download_path=https://github.com/decenomy/depends/raw/main/ +# https://ipfs.io/ipfs/QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=zlib-1.2.11.tar.gz +$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_file=QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 From 2ecdfe09c0eaf84c444e7e7b28839910be92884d Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 1 Oct 2024 09:20:49 +0100 Subject: [PATCH 07/39] changes the MacOSX sdk from GitHub to IPFS --- Jenkinsfile | 2 +- contrib/docker/Dockerfile.dsw-develop-builder | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-builder | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ccad55e5..84147efe0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { rm -rf SDKs mkdir SDKs cd SDKs - wget -c https://github.com/decenomy/depends/raw/main/SDKs/MacOSX10.11.sdk.tar.xz + wget -c https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz tar -xf MacOSX10.11.sdk.tar.xz cd .. make -j $(nproc) HOST=x86_64-apple-darwin14 diff --git a/contrib/docker/Dockerfile.dsw-develop-builder b/contrib/docker/Dockerfile.dsw-develop-builder index b055e9e17..573668626 100644 --- a/contrib/docker/Dockerfile.dsw-develop-builder +++ b/contrib/docker/Dockerfile.dsw-develop-builder @@ -105,7 +105,7 @@ RUN git pull origin $TARGET RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://github.com/decenomy/depends/raw/main/SDKs/MacOSX10.11.sdk.tar.xz +RUN curl -LO https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-builder b/contrib/docker/Dockerfile.dsw-macos-x64-builder index 61a0d940b..0e5148324 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-builder +++ b/contrib/docker/Dockerfile.dsw-macos-x64-builder @@ -79,7 +79,7 @@ RUN git clone https://github.com/decenomy/DSW.git RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://github.com/decenomy/depends/raw/main/SDKs/MacOSX10.11.sdk.tar.xz +RUN curl -LO https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz From f9799582985188726b1790066be8a750af01fb71 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Wed, 2 Oct 2024 18:27:25 +0100 Subject: [PATCH 08/39] adds nLoadedRecordsMaxCount option for the maximum number of transaction records that are loaded into the UI --- src/qt/optionsmodel.cpp | 19 ++++++++ src/qt/optionsmodel.h | 46 ++++++++++--------- .../forms/settingswalletoptionswidget.ui | 43 +++++++++++++++++ .../settings/settingswalletoptionswidget.cpp | 7 +++ src/qt/transactiontablemodel.cpp | 6 +-- src/qt/transactiontablemodel.h | 5 -- src/wallet/wallet.cpp | 7 ++- src/wallet/wallet.h | 12 ++++- src/wallet/walletdb.cpp | 8 ++++ src/wallet/walletdb.h | 3 +- 10 files changed, 121 insertions(+), 35 deletions(-) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 34fc928b5..7f62855ce 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -127,6 +127,7 @@ void OptionsModel::setWalletDefaultOptions(QSettings& settings, bool reset) if (reset) { setStakeSplitThreshold(CWallet::DEFAULT_STAKE_SPLIT_THRESHOLD); setAutoCombineThreshold(CWallet::DEFAULT_AUTO_COMBINE_THRESHOLD); + setLoadedRecordsMaxCount(MAX_AMOUNT_LOADED_RECORDS); setCombineDust(CWallet::DEFAULT_COMBINE_DUST); setUseCustomFee(false); refreshDataView(); @@ -275,6 +276,8 @@ QVariant OptionsModel::data(const QModelIndex& index, int role) const const CAmount nAutoCombineThreshold = (pwalletMain) ? pwalletMain->nAutoCombineThreshold : CWallet::DEFAULT_AUTO_COMBINE_THRESHOLD; return QVariant(static_cast(nAutoCombineThreshold / static_cast(COIN))); } + case LoadedRecordsMaxCount: + return QVariant((pwalletMain) ? pwalletMain->nLoadedRecordsMaxCount : MAX_AMOUNT_LOADED_RECORDS); case fUseCustomFee: return QVariant((pwalletMain) ? pwalletMain->fUseCustomFee : false); case nCustomFee: @@ -396,6 +399,8 @@ bool OptionsModel::setData(const QModelIndex& index, const QVariant& value, int setAutoCombineThreshold(static_cast(value.toDouble() * COIN)); //setACTChanged(true); break; + case LoadedRecordsMaxCount: + setLoadedRecordsMaxCount(value.toInt()); case DisplayUnit: setDisplayUnit(value); break; @@ -524,6 +529,20 @@ void OptionsModel::setAutoCombineThreshold(const CAmount nAutoCombineThreshold) } } +/* Update LoadedRecordsMaxCount value in wallet */ +void OptionsModel::setLoadedRecordsMaxCount(const int nLoadedRecordsMaxCount) +{ + if (pwalletMain && pwalletMain->nLoadedRecordsMaxCount != nLoadedRecordsMaxCount) { + CWalletDB walletdb(pwalletMain->strWalletFile); + LOCK(pwalletMain->cs_wallet); + { + pwalletMain->nLoadedRecordsMaxCount = nLoadedRecordsMaxCount; + if (pwalletMain->fFileBacked) + walletdb.WriteLoadedRecordsMaxCount(pwalletMain->nLoadedRecordsMaxCount); + } + } +} + /* returns default minimum value for stake split threshold as doulbe */ double OptionsModel::getSSTMinimum() const { diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index 596fd8c94..8ca6ded19 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -30,33 +30,34 @@ class OptionsModel : public QAbstractListModel explicit OptionsModel(QObject* parent = 0); enum OptionID { - StartAtStartup, // bool - MinimizeToTray, // bool - MapPortUPnP, // bool - MinimizeOnClose, // bool - ProxyUse, // bool - ProxyIP, // QString - ProxyPort, // int - DisplayUnit, // BitcoinUnits::Unit - ThirdPartyTxUrls, // QString - Digits, // QString - Theme, // QString - Language, // QString - CoinControlFeatures, // bool - ThreadsScriptVerif, // int - DatabaseCache, // int - SpendZeroConfChange, // bool - HideCharts, // bool - HideZeroBalances, // bool - HideOrphans, // bool - AnonymizePivxAmount, //int - ShowMasternodesTab, // bool - Listen, // bool + StartAtStartup, // bool + MinimizeToTray, // bool + MapPortUPnP, // bool + MinimizeOnClose, // bool + ProxyUse, // bool + ProxyIP, // QString + ProxyPort, // int + DisplayUnit, // BitcoinUnits::Unit + ThirdPartyTxUrls, // QString + Digits, // QString + Theme, // QString + Language, // QString + CoinControlFeatures, // bool + ThreadsScriptVerif, // int + DatabaseCache, // int + SpendZeroConfChange, // bool + HideCharts, // bool + HideZeroBalances, // bool + HideOrphans, // bool + AnonymizePivxAmount, //int + ShowMasternodesTab, // bool + Listen, // bool StakeSplitThreshold, // CAmount (LongLong) CombineDust, // bool AutoCombineThreshold, // CAmount (LongLong) fUseCustomFee, // bool nCustomFee, // CAmount (LongLong) + LoadedRecordsMaxCount, // int OptionIDRowCount, }; @@ -73,6 +74,7 @@ class OptionsModel : public QAbstractListModel void setStakeSplitThreshold(const CAmount value); void setCombineDust(bool fCombineDust); void setAutoCombineThreshold(const CAmount nAutoCombineThreshold); + void setLoadedRecordsMaxCount(const int nLoadedRecordsMaxCount); double getSSTMinimum() const; bool isSSTValid(); /* Update Custom Fee value in wallet */ diff --git a/src/qt/pivx/settings/forms/settingswalletoptionswidget.ui b/src/qt/pivx/settings/forms/settingswalletoptionswidget.ui index d5130ae21..9ec1e1876 100644 --- a/src/qt/pivx/settings/forms/settingswalletoptionswidget.ui +++ b/src/qt/pivx/settings/forms/settingswalletoptionswidget.ui @@ -139,6 +139,49 @@ + + + + 9 + + + + + Max. loaded transactions + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + + + 0 + + + 999999999 + + + 100000 + + + + + diff --git a/src/qt/pivx/settings/settingswalletoptionswidget.cpp b/src/qt/pivx/settings/settingswalletoptionswidget.cpp index f802ad77e..a71efd47e 100644 --- a/src/qt/pivx/settings/settingswalletoptionswidget.cpp +++ b/src/qt/pivx/settings/settingswalletoptionswidget.cpp @@ -44,6 +44,12 @@ SettingsWalletOptionsWidget::SettingsWalletOptionsWidget(PIVXGUI* _window, QWidg this, &SettingsWalletOptionsWidget::onSpinBoxAutoCombineThresholdChanged); setShadow(ui->spinBoxAutoCombineThreshold); + // Combobox + ui->labelTitleLoadRecords->setProperty("cssClass", "text-main-settings"); + ui->spinBoxLoadedRecordsMaxCount->setProperty("cssClass", "btn-spin-box"); + ui->spinBoxLoadedRecordsMaxCount->setAttribute(Qt::WA_MacShowFocusRect, 0); + setShadow(ui->spinBoxLoadedRecordsMaxCount); + // Radio buttons // Title @@ -84,6 +90,7 @@ void SettingsWalletOptionsWidget::setMapper(QDataWidgetMapper *mapper){ mapper->addMapping(ui->spinBoxStakeSplitThreshold, OptionsModel::StakeSplitThreshold); mapper->addMapping(ui->checkBoxAutoCombine, OptionsModel::CombineDust); mapper->addMapping(ui->spinBoxAutoCombineThreshold, OptionsModel::AutoCombineThreshold); + mapper->addMapping(ui->spinBoxLoadedRecordsMaxCount, OptionsModel::LoadedRecordsMaxCount); // Network mapper->addMapping(ui->checkBoxMap, OptionsModel::MapPortUPnP); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 959ddcb12..6a69da0f9 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -108,7 +108,7 @@ class TransactionTablePriv if (txesSize > SINGLE_THREAD_MAX_TXES_SIZE) { // First check if the amount of txs exceeds the UI limit - if (txesSize > MAX_AMOUNT_LOADED_RECORDS) { + if (txesSize > wallet->nLoadedRecordsMaxCount) { // Sort the txs by date just to be really really sure that them are ordered. // (this extra calculation should be removed in the future if can ensure that // txs are stored in order in the db, which is what should be happening) @@ -118,7 +118,7 @@ class TransactionTablePriv }); // Only latest ones. - walletTxes = std::vector(walletTxes.begin(), walletTxes.begin() + MAX_AMOUNT_LOADED_RECORDS); + walletTxes = std::vector(walletTxes.begin(), walletTxes.begin() + wallet->nLoadedRecordsMaxCount); txesSize = walletTxes.size(); }; @@ -265,7 +265,7 @@ class TransactionTablePriv // As old transactions are still getting updated (+20k range), // do not add them if we deliberately didn't load them at startup. - if (cachedWallet.size() >= MAX_AMOUNT_LOADED_RECORDS && wtx.GetTxTime() < nFirstLoadedTxTime) { + if (cachedWallet.size() >= wallet->nLoadedRecordsMaxCount && wtx.GetTxTime() < nFirstLoadedTxTime) { return; } } diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index 88489ca27..a504912bc 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -14,11 +14,6 @@ #define SINGLE_THREAD_MAX_TXES_SIZE 4000 -// Maximum amount of loaded records in ram in the first load. -// If the user has more and want to load them: -// TODO, add load on demand in pages (not every tx loaded all the time into the records list). -#define MAX_AMOUNT_LOADED_RECORDS 100000 - class TransactionRecord; class TransactionTablePriv; class WalletModel; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e53cfcc6e..d9c9fdd69 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3903,7 +3903,7 @@ void CWallet::SetNull() fUseCustomFee = false; nCustomFee = CWallet::minTxFee.GetFeePerK(); - //MultiSend + // MultiSend vMultiSend.clear(); fMultiSendStake = false; fMultiSendMasternodeReward = false; @@ -3912,9 +3912,12 @@ void CWallet::SetNull() nLastMultiSendHeight = 0; vDisabledAddresses.clear(); - //Auto Combine Dust + // Auto Combine Dust fCombineDust = false; nAutoCombineThreshold = 0; + + // Max record in the UI + nLoadedRecordsMaxCount = MAX_AMOUNT_LOADED_RECORDS; } bool CWallet::isMultiSendEnabled() diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 8eb64de8f..61ecc596d 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -85,6 +85,11 @@ static const bool DEFAULT_DISABLE_WALLET = false; extern const char * DEFAULT_WALLET_DAT; +// Maximum amount of loaded records in ram in the first load. +// If the user has more and want to load them: +// TODO, add load on demand in pages (not every tx loaded all the time into the records list). +#define MAX_AMOUNT_LOADED_RECORDS 100000 + class CAccountingEntry; class CCoinControl; class COutput; @@ -316,7 +321,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool fUseCustomFee; CAmount nCustomFee; - //MultiSend + // MultiSend std::vector > vMultiSend; bool fMultiSendStake; bool fMultiSendMasternodeReward; @@ -325,10 +330,13 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface int nLastMultiSendHeight; std::vector vDisabledAddresses; - //Auto Combine Inputs + // Auto Combine Inputs bool fCombineDust; CAmount nAutoCombineThreshold; + // MAX_AMOUNT_LOADED_RECORDS + int nLoadedRecordsMaxCount; + CWallet(); CWallet(std::string strWalletFileIn); ~CWallet(); diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index b16accd5a..ca149322d 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -268,6 +268,12 @@ bool CWalletDB::WriteAutoCombineSettings(bool fEnable, CAmount nCombineThreshold return Write(std::string("autocombinesettings"), pSettings, true); } +bool CWalletDB::WriteLoadedRecordsMaxCount(int nLoadedRecordsMaxCount) +{ + nWalletDBUpdateCounter++; + return Write(std::string("loadedrecordsmaxcount"), nLoadedRecordsMaxCount, true); +} + bool CWalletDB::ReadPool(int64_t nPool, CKeyPool& keypool) { return Read(std::make_pair(std::string("pool"), nPool), keypool); @@ -689,6 +695,8 @@ bool ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, CW // originally saved as integer if (pwallet->nAutoCombineThreshold < COIN) pwallet->nAutoCombineThreshold *= COIN; + } else if (strType == "loadedrecordsmaxcount") { + ssValue >> pwallet->nLoadedRecordsMaxCount; } else if (strType == "destdata") { std::string strAddress, strKey, strValue; ssKey >> strAddress; diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 851491448..34749dbc4 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -139,7 +139,8 @@ class CWalletDB : public CDB bool WriteMSDisabledAddresses(std::vector vDisabledAddresses); bool EraseMSDisabledAddresses(std::vector vDisabledAddresses); bool WriteAutoCombineSettings(bool fEnable, CAmount nCombineThreshold); - + bool WriteLoadedRecordsMaxCount(int nLoadedRecordsMaxCount); + bool ReadPool(int64_t nPool, CKeyPool& keypool); bool WritePool(int64_t nPool, const CKeyPool& keypool); bool ErasePool(int64_t nPool); From a32ac9d690c4ee2656d832778d7f3827566b3ffd Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Wed, 2 Oct 2024 18:35:02 +0100 Subject: [PATCH 09/39] small setWallet erase improvement --- src/wallet/wallet.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d9c9fdd69..36e6a1bb0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1971,8 +1971,11 @@ bool CWallet::AvailableCoins(std::vector* pCoins, // --> populates } } - for (auto it = vErase.begin(); it != vErase.end(); ++it) { - setWallet.erase(*it); + if(vErase.size() > 0) { + for (auto& h : vErase) { + setWallet.erase(h); + } + setWallet.rehash(0); } return (pCoins && pCoins->size() > 0); From 4011a51b74c3c2f9bcb277b355ee5044871db2c9 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Thu, 3 Oct 2024 16:43:56 +0100 Subject: [PATCH 10/39] removes pinata gateway --- depends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/Makefile b/depends/Makefile index 38350bb55..f56df5e2d 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -8,7 +8,7 @@ NO_QT ?= NO_WALLET ?= NO_ZMQ ?= NO_UPNP ?= -FALLBACK_DOWNLOAD_PATH ?= https://gateway.pinata.cloud/ipfs/QmYv9wHqKa5gZE1kL4ZpcVqKp1coS5tS9cYKGe4mUxxrqL +FALLBACK_DOWNLOAD_PATH ?= BUILD = $(shell ./config.guess) HOST ?= $(BUILD) From 912ba859be2d149dea106a72149f191c2964c066 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Thu, 3 Oct 2024 17:55:10 +0100 Subject: [PATCH 11/39] removes the ?filename=... from the IPFS urls present on the depends package files --- depends/packages/bdb.mk | 2 +- depends/packages/boost.mk | 2 +- depends/packages/curl.mk | 2 +- depends/packages/dbus.mk | 2 +- depends/packages/expat.mk | 2 +- depends/packages/fontconfig.mk | 2 +- depends/packages/freetype.mk | 2 +- depends/packages/gmp.mk | 2 +- depends/packages/libX11.mk | 2 +- depends/packages/libXau.mk | 2 +- depends/packages/libXext.mk | 2 +- depends/packages/libevent.mk | 2 +- depends/packages/libxcb.mk | 2 +- depends/packages/miniupnpc.mk | 2 +- depends/packages/native_biplist.mk | 2 +- depends/packages/native_cctools.mk | 4 ++-- depends/packages/native_cdrkit.mk | 2 +- depends/packages/native_ds_store.mk | 2 +- depends/packages/native_libdmg-hfsplus.mk | 2 +- depends/packages/native_mac_alias.mk | 2 +- depends/packages/native_protobuf.mk | 2 +- depends/packages/openssl.mk | 2 +- depends/packages/qrencode.mk | 2 +- depends/packages/qt.mk | 10 +++++----- depends/packages/xcb_proto.mk | 2 +- depends/packages/xextproto.mk | 2 +- depends/packages/xproto.mk | 2 +- depends/packages/xtrans.mk | 2 +- depends/packages/zeromq.mk | 2 +- depends/packages/zlib.mk | 2 +- 30 files changed, 35 insertions(+), 35 deletions(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 00278772d..6c27a57a0 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -3,7 +3,7 @@ $(package)_version=4.8.30 # $(package)_download_path=https://download.oracle.com/berkeley-db # https://ipfs.io/ipfs/QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-4.8.30.NC.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-$($(package)_version).NC.tar.gz +$(package)_download_file=QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay $(package)_file_name=db-$($(package)_version).NC.tar.gz $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef $(package)_build_subdir=build_unix diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index c26178a37..df11a4181 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -3,7 +3,7 @@ $(package)_version=1_85_0 # $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ # https://ipfs.io/ipfs/QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_1_85_0.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_$($(package)_version).tar.bz2 +$(package)_download_file=QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 diff --git a/depends/packages/curl.mk b/depends/packages/curl.mk index 09cd7f4ec..40f728877 100644 --- a/depends/packages/curl.mk +++ b/depends/packages/curl.mk @@ -3,7 +3,7 @@ $(package)_version=8.4.0 #$(package)_download_path=https://github.com/curl/curl/releases/download/curl-8_4_0/ # https://ipfs.io/ipfs/QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=curl-8.4.0.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 $(package)_dependencies=openssl diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk index a94a81939..b2758a733 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -3,7 +3,7 @@ $(package)_version=1.10.18 # $(package)_download_path=https://dbus.freedesktop.org/releases/dbus # https://ipfs.io/ipfs/QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=dbus-1.10.18.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a $(package)_dependencies=expat diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index b004f683c..b5b0c1d28 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -3,7 +3,7 @@ $(package)_version=2.2.6 # $(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/ # https://ipfs.io/ipfs/QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=expat-2.2.6.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2 diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index 9d7ff41db..74778146a 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -3,7 +3,7 @@ $(package)_version=2.12.1 # $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ # https://ipfs.io/ipfs/QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=fontconfig-2.12.1.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 $(package)_dependencies=freetype expat diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index 54ef3b418..f790bb9fe 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -3,7 +3,7 @@ $(package)_version=2.7.1 # $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) # https://ipfs.io/ipfs/Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=freetype-2.7.1.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index 070f2d672..cca7c6bb7 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -3,7 +3,7 @@ $(package)_version=6.1.2 # $(package)_download_path=https://gmplib.org/download/gmp # https://ipfs.io/ipfs/Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=gmp-6.1.2.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2 diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk index c6fcb7b00..4721697cf 100644 --- a/depends/packages/libX11.mk +++ b/depends/packages/libX11.mk @@ -3,7 +3,7 @@ $(package)_version=1.6.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=libX11-1.6.2.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16 $(package)_dependencies=libxcb xtrans xextproto xproto diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index 0da1268a6..6f418efbd 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -3,7 +3,7 @@ $(package)_version=1.0.8 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=libXau-1.0.8.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 $(package)_dependencies=xproto diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk index 99eef29f9..38f07fd83 100644 --- a/depends/packages/libXext.mk +++ b/depends/packages/libXext.mk @@ -3,7 +3,7 @@ $(package)_version=1.3.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=libXext-1.3.2.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0 $(package)_dependencies=xproto xextproto libX11 libXau diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 0c3365a94..bd6bd8d16 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -3,7 +3,7 @@ $(package)_version=2.1.12-stable # $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/ # https://ipfs.io/ipfs/QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-2.1.12-stable.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-$($(package)_version).tar.gz +$(package)_download_file=QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G $(package)_file_name=libevent-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index afef15d5d..27b8510ca 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -3,7 +3,7 @@ $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist # https://ipfs.io/ipfs/QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=libxcb-1.10.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 $(package)_dependencies=xcb_proto libXau xproto diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 77024ad26..0c18b7e4d 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -3,7 +3,7 @@ $(package)_version=2.0.20180203 # $(package)_download_path=https://miniupnp.tuxfamily.org/files/ # https://ipfs.io/ipfs/Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=miniupnpc-2.0.20180203.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk index 172cb8c41..4694887a0 100644 --- a/depends/packages/native_biplist.mk +++ b/depends/packages/native_biplist.mk @@ -3,7 +3,7 @@ $(package)_version=1.0.3 # $(package)_download_path=https://bitbucket.org/wooster/biplist/downloads # https://ipfs.io/ipfs/QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-1.0.3.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-$($(package)_version).tar.gz +$(package)_download_file=QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 7c5708474..068fffd41 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -3,7 +3,7 @@ $(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 # $(package)_download_path=https://github.com/theuni/cctools-port/archive # https://ipfs.io/ipfs/QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=807d6fd1be5d2224872e381870c0a75387fe05e6.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=$($(package)_version).tar.gz +$(package)_download_file=QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a $(package)_build_subdir=cctools @@ -11,7 +11,7 @@ $(package)_clang_version=3.7.1 # $(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) # https://ipfs.io/ipfs/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_download_path=https://ipfs.io/ipfs/ -$(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz +$(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 $(package)_extra_sources=$($(package)_clang_file_name) diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk index d60eb7370..569da9dc2 100644 --- a/depends/packages/native_cdrkit.mk +++ b/depends/packages/native_cdrkit.mk @@ -3,7 +3,7 @@ $(package)_version=1.1.11 # $(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c # https://ipfs.io/ipfs/QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-1.1.11.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-$($(package)_version).tar.bz2 +$(package)_download_file=QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 $(package)_patches=cdrkit-deterministic.patch diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk index 29309d717..9f0ec05f7 100644 --- a/depends/packages/native_ds_store.mk +++ b/depends/packages/native_ds_store.mk @@ -3,7 +3,7 @@ $(package)_version=1.1.2 # $(package)_download_path=https://github.com/al45tair/ds_store/archive/ # https://ipfs.io/ipfs/QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v1.1.2.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v$($(package)_version).tar.gz +$(package)_download_file=QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9 $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index 73ff281fd..a3e9de8d4 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -3,7 +3,7 @@ $(package)_version=0.1 # $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive # https://ipfs.io/ipfs/QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v0.1.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v$($(package)_version).tar.gz +$(package)_download_file=QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8 $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 $(package)_build_subdir=build diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk index 4811bea14..5ca690d6b 100644 --- a/depends/packages/native_mac_alias.mk +++ b/depends/packages/native_mac_alias.mk @@ -3,7 +3,7 @@ $(package)_version=2.0.7 # $(package)_download_path=https://github.com/al45tair/mac_alias/archive/ # https://ipfs.io/ipfs/QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v2.0.7.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v$($(package)_version).tar.gz +$(package)_download_file=QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838 $(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk index 908c09f42..eaa241607 100644 --- a/depends/packages/native_protobuf.mk +++ b/depends/packages/native_protobuf.mk @@ -3,7 +3,7 @@ $(package)_version=2.6.1 # $(package)_download_path=https://github.com/google/protobuf/releases/download/v$($(package)_version) # https://ipfs.io/ipfs/QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-2.6.1.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-$($(package)_version).tar.bz2 +$(package)_download_file=QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W $(package)_file_name=protobuf-$($(package)_version).tar.bz2 $(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index 9dad5e9db..f25ec47b0 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -3,7 +3,7 @@ $(package)_version=1.1.1w #$(package)_download_path=https://www.openssl.org/source/old/1.1.1/ # https://ipfs.io/ipfs/QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=openssl-1.1.1w.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 04ea5de9d..4fe39df9d 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -3,7 +3,7 @@ $(package)_version=3.4.4 # $(package)_download_path=https://fukuchi.org/works/qrencode/ # https://ipfs.io/ipfs/Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=qrencode-3.4.4.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index eb6631bcd..5ef9ec12e 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -4,7 +4,7 @@ $(package)_version=5.9.9 # https://ipfs.io/ipfs/QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-opensource-src-5.9.9.tar.xz $(package)_suffix=opensource-src-$($(package)_version).tar.xz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-$($(package)_suffix) +$(package)_download_file=QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt $(package)_file_name=qtbase-$($(package)_suffix) $(package)_sha256_hash=d5a97381b9339c0fbaf13f0c05d599a5c999dcf94145044058198987183fed65 $(package)_dependencies=zlib @@ -14,22 +14,22 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib concurrent $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch fix_s390x_powerpc_mips_mipsel_architectures.patch xkb-default.patch fix_gcc_11_3_compile.patch # https://ipfs.io/ipfs/QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-opensource-src-5.9.9.tar.xz -$(package)_qttranslations_download_file=QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-$($(package)_suffix) +$(package)_qttranslations_download_file=QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1 $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=f7474f260a1382549720081bf2359a3d425ec3bf7d31976c512834303d30d73b # https://ipfs.io/ipfs/QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-opensource-src-5.9.9.tar.xz -$(package)_qttools_download_file=QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-$($(package)_suffix) +$(package)_qttools_download_file=QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6 $(package)_qttools_file_name=qttools-$($(package)_suffix) $(package)_qttools_sha256_hash=fce6e0fd39a40bcef880c669080087dba94af1ec442296222210472e0852bf98 # https://ipfs.io/ipfs/QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-opensource-src-5.9.9.tar.xz -$(package)_qtsvg_download_file=QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-$($(package)_suffix) +$(package)_qtsvg_download_file=QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa $(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) $(package)_qtsvg_sha256_hash=0d2759178c0c1ec8c7ea0d05b7bf57787c09d8059ca9b9518607a8e97933e888 # https://ipfs.io/ipfs/QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-opensource-src-5.9.9.tar.xz -$(package)_qtcharts_download_file=QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-$($(package)_suffix) +$(package)_qtcharts_download_file=QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2 $(package)_qtcharts_file_name=qtcharts-$($(package)_suffix) $(package)_qtcharts_sha256_hash=a503e9f1504c41a6a7850ca2e0e4e786fce45345c94eb81a6abd352d15b7d95c diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 76323b577..d103de0ea 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -3,7 +3,7 @@ $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist # https://ipfs.io/ipfs/QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-1.10.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-$($(package)_version).tar.bz2 +$(package)_download_file=QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2 $(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 $(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk index b12e19111..8bb5cfc91 100644 --- a/depends/packages/xextproto.mk +++ b/depends/packages/xextproto.mk @@ -3,7 +3,7 @@ $(package)_version=7.3.0 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto # https://ipfs.io/ipfs/QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=xextproto-7.3.0.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0 diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index d5890493a..593479187 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -3,7 +3,7 @@ $(package)_version=7.0.26 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto # https://ipfs.io/ipfs/QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=xproto-7.0.26.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk index b3edddf6b..f0323c64c 100644 --- a/depends/packages/xtrans.mk +++ b/depends/packages/xtrans.mk @@ -3,7 +3,7 @@ $(package)_version=1.3.4 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=xtrans-1.3.4.tar.bz2 $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=$(package)-$($(package)_version).tar.bz2 +$(package)_download_file=QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a $(package)_dependencies= diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 215aaa223..702bd7be9 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -3,7 +3,7 @@ $(package)_version=4.3.1 # $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ # https://ipfs.io/ipfs/QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=zeromq-4.3.1.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4 $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb $(package)_patches=0001-fix-build-with-older-mingw64.patch 0002-disable-pthread_set_name_np.patch diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index 38d340e22..4f84ba953 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -3,7 +3,7 @@ $(package)_version=1.2.11 # $(package)_download_path=https://www.zlib.net # https://ipfs.io/ipfs/QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=zlib-1.2.11.tar.gz $(package)_download_path=https://ipfs.io/ipfs/ -$(package)_download_file=QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=$(package)-$($(package)_version).tar.gz +$(package)_download_file=QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 From d8e3e2077d65b448041c25aa444b71d1b97ead72 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Thu, 3 Oct 2024 18:12:22 +0100 Subject: [PATCH 12/39] removes the ending / from all depends' packages download_paths --- depends/packages/bdb.mk | 2 +- depends/packages/boost.mk | 2 +- depends/packages/curl.mk | 2 +- depends/packages/dbus.mk | 2 +- depends/packages/expat.mk | 2 +- depends/packages/fontconfig.mk | 2 +- depends/packages/freetype.mk | 2 +- depends/packages/gmp.mk | 2 +- depends/packages/libX11.mk | 2 +- depends/packages/libXau.mk | 2 +- depends/packages/libXext.mk | 2 +- depends/packages/libevent.mk | 2 +- depends/packages/libxcb.mk | 2 +- depends/packages/miniupnpc.mk | 2 +- depends/packages/native_biplist.mk | 2 +- depends/packages/native_cctools.mk | 4 ++-- depends/packages/native_cdrkit.mk | 2 +- depends/packages/native_ds_store.mk | 2 +- depends/packages/native_libdmg-hfsplus.mk | 2 +- depends/packages/native_mac_alias.mk | 2 +- depends/packages/native_protobuf.mk | 2 +- depends/packages/openssl.mk | 2 +- depends/packages/qrencode.mk | 2 +- depends/packages/qt.mk | 2 +- depends/packages/xcb_proto.mk | 2 +- depends/packages/xextproto.mk | 2 +- depends/packages/xproto.mk | 2 +- depends/packages/xtrans.mk | 2 +- depends/packages/zeromq.mk | 2 +- depends/packages/zlib.mk | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 6c27a57a0..311c9d5f3 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -2,7 +2,7 @@ package=bdb $(package)_version=4.8.30 # $(package)_download_path=https://download.oracle.com/berkeley-db # https://ipfs.io/ipfs/QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-4.8.30.NC.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay $(package)_file_name=db-$($(package)_version).NC.tar.gz $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index df11a4181..de8021c69 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -2,7 +2,7 @@ package=boost $(package)_version=1_85_0 # $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ # https://ipfs.io/ipfs/QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_1_85_0.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 diff --git a/depends/packages/curl.mk b/depends/packages/curl.mk index 40f728877..0f474f5d0 100644 --- a/depends/packages/curl.mk +++ b/depends/packages/curl.mk @@ -2,7 +2,7 @@ package=curl $(package)_version=8.4.0 #$(package)_download_path=https://github.com/curl/curl/releases/download/curl-8_4_0/ # https://ipfs.io/ipfs/QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=curl-8.4.0.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk index b2758a733..f14f55c86 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -2,7 +2,7 @@ package=dbus $(package)_version=1.10.18 # $(package)_download_path=https://dbus.freedesktop.org/releases/dbus # https://ipfs.io/ipfs/QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=dbus-1.10.18.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index b5b0c1d28..c7aba0dd1 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -2,7 +2,7 @@ package=expat $(package)_version=2.2.6 # $(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/ # https://ipfs.io/ipfs/QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=expat-2.2.6.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2 diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index 74778146a..f9005c81e 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -2,7 +2,7 @@ package=fontconfig $(package)_version=2.12.1 # $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ # https://ipfs.io/ipfs/QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=fontconfig-2.12.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index f790bb9fe..abeb7e873 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -2,7 +2,7 @@ package=freetype $(package)_version=2.7.1 # $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) # https://ipfs.io/ipfs/Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=freetype-2.7.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index cca7c6bb7..fd4392078 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -2,7 +2,7 @@ package=gmp $(package)_version=6.1.2 # $(package)_download_path=https://gmplib.org/download/gmp # https://ipfs.io/ipfs/Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=gmp-6.1.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2 diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk index 4721697cf..090585fd4 100644 --- a/depends/packages/libX11.mk +++ b/depends/packages/libX11.mk @@ -2,7 +2,7 @@ package=libX11 $(package)_version=1.6.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=libX11-1.6.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16 diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index 6f418efbd..95efbe9ee 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -2,7 +2,7 @@ package=libXau $(package)_version=1.0.8 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=libXau-1.0.8.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk index 38f07fd83..dcd1feb34 100644 --- a/depends/packages/libXext.mk +++ b/depends/packages/libXext.mk @@ -2,7 +2,7 @@ package=libXext $(package)_version=1.3.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=libXext-1.3.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0 diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index bd6bd8d16..48f47a83c 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -2,7 +2,7 @@ package=libevent $(package)_version=2.1.12-stable # $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/ # https://ipfs.io/ipfs/QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-2.1.12-stable.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G $(package)_file_name=libevent-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 27b8510ca..0afffd59e 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -2,7 +2,7 @@ package=libxcb $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist # https://ipfs.io/ipfs/QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=libxcb-1.10.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 0c18b7e4d..3dae48fba 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -2,7 +2,7 @@ package=miniupnpc $(package)_version=2.0.20180203 # $(package)_download_path=https://miniupnp.tuxfamily.org/files/ # https://ipfs.io/ipfs/Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=miniupnpc-2.0.20180203.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk index 4694887a0..d889a72ea 100644 --- a/depends/packages/native_biplist.mk +++ b/depends/packages/native_biplist.mk @@ -2,7 +2,7 @@ package=native_biplist $(package)_version=1.0.3 # $(package)_download_path=https://bitbucket.org/wooster/biplist/downloads # https://ipfs.io/ipfs/QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-1.0.3.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 068fffd41..dd78657c9 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -2,7 +2,7 @@ package=native_cctools $(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 # $(package)_download_path=https://github.com/theuni/cctools-port/archive # https://ipfs.io/ipfs/QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=807d6fd1be5d2224872e381870c0a75387fe05e6.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a @@ -10,7 +10,7 @@ $(package)_build_subdir=cctools $(package)_clang_version=3.7.1 # $(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) # https://ipfs.io/ipfs/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz -$(package)_clang_download_path=https://ipfs.io/ipfs/ +$(package)_clang_download_path=https://ipfs.io/ipfs $(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk index 569da9dc2..562da82cb 100644 --- a/depends/packages/native_cdrkit.mk +++ b/depends/packages/native_cdrkit.mk @@ -2,7 +2,7 @@ package=native_cdrkit $(package)_version=1.1.11 # $(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c # https://ipfs.io/ipfs/QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-1.1.11.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk index 9f0ec05f7..79e512cd7 100644 --- a/depends/packages/native_ds_store.mk +++ b/depends/packages/native_ds_store.mk @@ -2,7 +2,7 @@ package=native_ds_store $(package)_version=1.1.2 # $(package)_download_path=https://github.com/al45tair/ds_store/archive/ # https://ipfs.io/ipfs/QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v1.1.2.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9 $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index a3e9de8d4..f4def0853 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -2,7 +2,7 @@ package=native_libdmg-hfsplus $(package)_version=0.1 # $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive # https://ipfs.io/ipfs/QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v0.1.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8 $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk index 5ca690d6b..d974301de 100644 --- a/depends/packages/native_mac_alias.mk +++ b/depends/packages/native_mac_alias.mk @@ -2,7 +2,7 @@ package=native_mac_alias $(package)_version=2.0.7 # $(package)_download_path=https://github.com/al45tair/mac_alias/archive/ # https://ipfs.io/ipfs/QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v2.0.7.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838 diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk index eaa241607..a8678c4d8 100644 --- a/depends/packages/native_protobuf.mk +++ b/depends/packages/native_protobuf.mk @@ -2,7 +2,7 @@ package=native_protobuf $(package)_version=2.6.1 # $(package)_download_path=https://github.com/google/protobuf/releases/download/v$($(package)_version) # https://ipfs.io/ipfs/QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-2.6.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W $(package)_file_name=protobuf-$($(package)_version).tar.bz2 $(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index f25ec47b0..749bc2b6e 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -2,7 +2,7 @@ package=openssl $(package)_version=1.1.1w #$(package)_download_path=https://www.openssl.org/source/old/1.1.1/ # https://ipfs.io/ipfs/QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=openssl-1.1.1w.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 4fe39df9d..f72757636 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -2,7 +2,7 @@ package=qrencode $(package)_version=3.4.4 # $(package)_download_path=https://fukuchi.org/works/qrencode/ # https://ipfs.io/ipfs/Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=qrencode-3.4.4.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 5ef9ec12e..414e65952 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -3,7 +3,7 @@ $(package)_version=5.9.9 # $(package)_download_path=https://download.qt.io/archive/qt/5.9/$($(package)_version)/submodules # https://ipfs.io/ipfs/QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-opensource-src-5.9.9.tar.xz $(package)_suffix=opensource-src-$($(package)_version).tar.xz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt $(package)_file_name=qtbase-$($(package)_suffix) $(package)_sha256_hash=d5a97381b9339c0fbaf13f0c05d599a5c999dcf94145044058198987183fed65 diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index d103de0ea..19b2b04ff 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -2,7 +2,7 @@ package=xcb_proto $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist # https://ipfs.io/ipfs/QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-1.10.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2 $(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 $(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk index 8bb5cfc91..7ff80e587 100644 --- a/depends/packages/xextproto.mk +++ b/depends/packages/xextproto.mk @@ -2,7 +2,7 @@ package=xextproto $(package)_version=7.3.0 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto # https://ipfs.io/ipfs/QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=xextproto-7.3.0.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0 diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index 593479187..f44d2b0a3 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -2,7 +2,7 @@ package=xproto $(package)_version=7.0.26 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto # https://ipfs.io/ipfs/QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=xproto-7.0.26.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk index f0323c64c..d2c6e81d8 100644 --- a/depends/packages/xtrans.mk +++ b/depends/packages/xtrans.mk @@ -2,7 +2,7 @@ package=xtrans $(package)_version=1.3.4 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ # https://ipfs.io/ipfs/QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=xtrans-1.3.4.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 702bd7be9..d0eb777e8 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -2,7 +2,7 @@ package=zeromq $(package)_version=4.3.1 # $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ # https://ipfs.io/ipfs/QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=zeromq-4.3.1.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4 $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index 4f84ba953..d955703f7 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -2,7 +2,7 @@ package=zlib $(package)_version=1.2.11 # $(package)_download_path=https://www.zlib.net # https://ipfs.io/ipfs/QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=zlib-1.2.11.tar.gz -$(package)_download_path=https://ipfs.io/ipfs/ +$(package)_download_path=https://ipfs.io/ipfs $(package)_download_file=QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 From 6df8725357a7e7865ddbd958994d5cff54cc40cd Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 4 Oct 2024 11:53:03 +0100 Subject: [PATCH 13/39] replaces the ipfs url to our own ipfs gateway --- Jenkinsfile | 2 +- contrib/docker/Dockerfile.dsw-develop-builder | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-builder | 2 +- depends/Makefile | 2 +- depends/packages/bdb.mk | 4 ++-- depends/packages/boost.mk | 4 ++-- depends/packages/curl.mk | 4 ++-- depends/packages/dbus.mk | 4 ++-- depends/packages/expat.mk | 4 ++-- depends/packages/fontconfig.mk | 4 ++-- depends/packages/freetype.mk | 4 ++-- depends/packages/gmp.mk | 4 ++-- depends/packages/libX11.mk | 4 ++-- depends/packages/libXau.mk | 4 ++-- depends/packages/libXext.mk | 4 ++-- depends/packages/libevent.mk | 4 ++-- depends/packages/libxcb.mk | 4 ++-- depends/packages/miniupnpc.mk | 4 ++-- depends/packages/native_biplist.mk | 4 ++-- depends/packages/native_cctools.mk | 8 ++++---- depends/packages/native_cdrkit.mk | 4 ++-- depends/packages/native_ds_store.mk | 4 ++-- depends/packages/native_libdmg-hfsplus.mk | 4 ++-- depends/packages/native_mac_alias.mk | 4 ++-- depends/packages/native_protobuf.mk | 4 ++-- depends/packages/openssl.mk | 4 ++-- depends/packages/qrencode.mk | 4 ++-- depends/packages/qt.mk | 12 ++++++------ depends/packages/xcb_proto.mk | 4 ++-- depends/packages/xextproto.mk | 4 ++-- depends/packages/xproto.mk | 4 ++-- depends/packages/xtrans.mk | 4 ++-- depends/packages/zeromq.mk | 4 ++-- depends/packages/zlib.mk | 4 ++-- 34 files changed, 70 insertions(+), 70 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 84147efe0..2d13d8206 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { rm -rf SDKs mkdir SDKs cd SDKs - wget -c https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz + wget -c https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz tar -xf MacOSX10.11.sdk.tar.xz cd .. make -j $(nproc) HOST=x86_64-apple-darwin14 diff --git a/contrib/docker/Dockerfile.dsw-develop-builder b/contrib/docker/Dockerfile.dsw-develop-builder index 573668626..66ea6ceee 100644 --- a/contrib/docker/Dockerfile.dsw-develop-builder +++ b/contrib/docker/Dockerfile.dsw-develop-builder @@ -105,7 +105,7 @@ RUN git pull origin $TARGET RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz +RUN curl -LO https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-builder b/contrib/docker/Dockerfile.dsw-macos-x64-builder index 0e5148324..0b9f2c743 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-builder +++ b/contrib/docker/Dockerfile.dsw-macos-x64-builder @@ -79,7 +79,7 @@ RUN git clone https://github.com/decenomy/DSW.git RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://ipfs.io/ipfs/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz +RUN curl -LO https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz diff --git a/depends/Makefile b/depends/Makefile index f56df5e2d..2636e26b4 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -8,7 +8,7 @@ NO_QT ?= NO_WALLET ?= NO_ZMQ ?= NO_UPNP ?= -FALLBACK_DOWNLOAD_PATH ?= +FALLBACK_DOWNLOAD_PATH ?= https://ipfs.io/ipfs BUILD = $(shell ./config.guess) HOST ?= $(BUILD) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 311c9d5f3..a6abe2b5b 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -1,8 +1,8 @@ package=bdb $(package)_version=4.8.30 # $(package)_download_path=https://download.oracle.com/berkeley-db -# https://ipfs.io/ipfs/QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-4.8.30.NC.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay?filename=db-4.8.30.NC.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmRL4ExmYkCBH3UpZGjunodVozjwshhRojwVvbj3nTAPay $(package)_file_name=db-$($(package)_version).NC.tar.gz $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index de8021c69..fe319b538 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,8 +1,8 @@ package=boost $(package)_version=1_85_0 # $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ -# https://ipfs.io/ipfs/QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_1_85_0.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG?filename=boost_1_85_0.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmUwpqzdrYQadMzL5PT6kkdrZM2HwUNgHGKR7uQgwNPpSG $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617 diff --git a/depends/packages/curl.mk b/depends/packages/curl.mk index 0f474f5d0..2499dc21a 100644 --- a/depends/packages/curl.mk +++ b/depends/packages/curl.mk @@ -1,8 +1,8 @@ package=curl $(package)_version=8.4.0 #$(package)_download_path=https://github.com/curl/curl/releases/download/curl-8_4_0/ -# https://ipfs.io/ipfs/QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=curl-8.4.0.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki?filename=curl-8.4.0.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmVBCSbyviKNaEVUWEk3pABvfFMmj8KEm6TwnQ2Y2vMeki $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk index f14f55c86..57ec84a67 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -1,8 +1,8 @@ package=dbus $(package)_version=1.10.18 # $(package)_download_path=https://dbus.freedesktop.org/releases/dbus -# https://ipfs.io/ipfs/QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=dbus-1.10.18.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d?filename=dbus-1.10.18.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmXoHHNbkFZCjzj3cNTcqTEejEd5QEcB2nXixvm43xPc7d $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index c7aba0dd1..72df79ced 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -1,8 +1,8 @@ package=expat $(package)_version=2.2.6 # $(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/ -# https://ipfs.io/ipfs/QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=expat-2.2.6.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62?filename=expat-2.2.6.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmUCVuBSgKgSt1SD3McDSiXsFrA52APoZZNsCZuw31ug62 $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2 diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index f9005c81e..91ca4c149 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -1,8 +1,8 @@ package=fontconfig $(package)_version=2.12.1 # $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ -# https://ipfs.io/ipfs/QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=fontconfig-2.12.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga?filename=fontconfig-2.12.1.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmbR5DvNpNKWe3sTTE5VZvjkSrzM2wrTqguXKMABCpi4ga $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index abeb7e873..98c79e29e 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -1,8 +1,8 @@ package=freetype $(package)_version=2.7.1 # $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) -# https://ipfs.io/ipfs/Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=freetype-2.7.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f?filename=freetype-2.7.1.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=Qmf95bu3dNKtDx2oF5aULCL9wN9Heuo4yMScEwjrzDs34f $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index fd4392078..fe5a64879 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -1,8 +1,8 @@ package=gmp $(package)_version=6.1.2 # $(package)_download_path=https://gmplib.org/download/gmp -# https://ipfs.io/ipfs/Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=gmp-6.1.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p?filename=gmp-6.1.2.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=Qmcyxsgz7xTcEHcTUP1UVrYcVe6Krk4Rph9iX9RkgCea1p $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2 diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk index 090585fd4..f1216c12f 100644 --- a/depends/packages/libX11.mk +++ b/depends/packages/libX11.mk @@ -1,8 +1,8 @@ package=libX11 $(package)_version=1.6.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -# https://ipfs.io/ipfs/QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=libX11-1.6.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd?filename=libX11-1.6.2.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmSax8vonHyZhgXpiMPGqKBqg149S8RcKF8kETtu79pnsd $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16 diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index 95efbe9ee..d0c9a3a65 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -1,8 +1,8 @@ package=libXau $(package)_version=1.0.8 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -# https://ipfs.io/ipfs/QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=libXau-1.0.8.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My?filename=libXau-1.0.8.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmVZ9Gzz5ESap4GSapnx9myDdGA4jdfCaZYFk6Rk73E3My $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk index dcd1feb34..b38b08b3d 100644 --- a/depends/packages/libXext.mk +++ b/depends/packages/libXext.mk @@ -1,8 +1,8 @@ package=libXext $(package)_version=1.3.2 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -# https://ipfs.io/ipfs/QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=libXext-1.3.2.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj?filename=libXext-1.3.2.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmPipBRi2Lg2gbxCTMTmdSdsdBKP6FkgRovTcANNQ833Pj $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0 diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 48f47a83c..99d3d1556 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -1,8 +1,8 @@ package=libevent $(package)_version=2.1.12-stable # $(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/ -# https://ipfs.io/ipfs/QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-2.1.12-stable.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G?filename=libevent-2.1.12-stable.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmRSSDnv6BmQRNRNLbVr16cdrNDqThLANm5Hj1fUNt8R3G $(package)_file_name=libevent-$($(package)_version).tar.gz $(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 0afffd59e..522bef675 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,8 +1,8 @@ package=libxcb $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist -# https://ipfs.io/ipfs/QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=libxcb-1.10.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe?filename=libxcb-1.10.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmUvHYqASGDGn8eszh8E3T8amux53BWLKup4N6SCLGFzLe $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index 3dae48fba..6efe50c05 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -1,8 +1,8 @@ package=miniupnpc $(package)_version=2.0.20180203 # $(package)_download_path=https://miniupnp.tuxfamily.org/files/ -# https://ipfs.io/ipfs/Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=miniupnpc-2.0.20180203.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC?filename=miniupnpc-2.0.20180203.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=Qma4m48h24gWFFPCGhbm61oGYGDWHkgDRQ8FNX42pDoxuC $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=90dda8c7563ca6cd4a83e23b3c66dbbea89603a1675bfdb852897c2c9cc220b7 diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk index d889a72ea..45701a7b4 100644 --- a/depends/packages/native_biplist.mk +++ b/depends/packages/native_biplist.mk @@ -1,8 +1,8 @@ package=native_biplist $(package)_version=1.0.3 # $(package)_download_path=https://bitbucket.org/wooster/biplist/downloads -# https://ipfs.io/ipfs/QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-1.0.3.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe?filename=biplist-1.0.3.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmQjBk14hQxWCgT4DWcpGQ6N22sB8DDezSKyNb852uAUYe $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=4c0549764c5fe50b28042ec21aa2e14fe1a2224e239a1dae77d9e7f3932aa4c6 diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index dd78657c9..b20bb8a5e 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -1,16 +1,16 @@ package=native_cctools $(package)_version=807d6fd1be5d2224872e381870c0a75387fe05e6 # $(package)_download_path=https://github.com/theuni/cctools-port/archive -# https://ipfs.io/ipfs/QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=807d6fd1be5d2224872e381870c0a75387fe05e6.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe?filename=807d6fd1be5d2224872e381870c0a75387fe05e6.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmePeEyXTo89ihq5AVk3wN6vYBbMkLCnA59g3wkgLdhAJe $(package)_file_name=$($(package)_version).tar.gz $(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d7032ccc6a $(package)_build_subdir=cctools $(package)_clang_version=3.7.1 # $(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) -# https://ipfs.io/ipfs/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz -$(package)_clang_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz +$(package)_clang_download_path=https://ipfs.decenomy.net $(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk index 562da82cb..b6ef69a3b 100644 --- a/depends/packages/native_cdrkit.mk +++ b/depends/packages/native_cdrkit.mk @@ -1,8 +1,8 @@ package=native_cdrkit $(package)_version=1.1.11 # $(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c -# https://ipfs.io/ipfs/QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-1.1.11.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk?filename=cdrkit-1.1.11.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmPR9mf48Hd68q5xGrYiYk89dpVhzPoAbeiohCimu4GBHk $(package)_file_name=cdrkit-$($(package)_version).tar.bz2 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk index 79e512cd7..e25fd84cb 100644 --- a/depends/packages/native_ds_store.mk +++ b/depends/packages/native_ds_store.mk @@ -1,8 +1,8 @@ package=native_ds_store $(package)_version=1.1.2 # $(package)_download_path=https://github.com/al45tair/ds_store/archive/ -# https://ipfs.io/ipfs/QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v1.1.2.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9?filename=v1.1.2.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmfTnof5eKf5JxajzXCPra9RdtP5W8jtACcAjBxwFwSva9 $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=3b3ecb7bf0a5157f5b6010bc3af7c141fb0ad3527084e63336220d22744bc20c diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index f4def0853..9e856c354 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -1,8 +1,8 @@ package=native_libdmg-hfsplus $(package)_version=0.1 # $(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive -# https://ipfs.io/ipfs/QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v0.1.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8?filename=libdmg-hfsplus-v0.1.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmcmTs4nvXYGiY4Mkm3QegMYqwAWLgUXH1zm65fu7namC8 $(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz $(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk index d974301de..2f32296bf 100644 --- a/depends/packages/native_mac_alias.mk +++ b/depends/packages/native_mac_alias.mk @@ -1,8 +1,8 @@ package=native_mac_alias $(package)_version=2.0.7 # $(package)_download_path=https://github.com/al45tair/mac_alias/archive/ -# https://ipfs.io/ipfs/QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v2.0.7.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt?filename=v2.0.7.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmeWpRdQJJkXU8vPfkVE1JDEK5UJv3BsJ15MURQJb91tVt $(package)_file_name=v$($(package)_version).tar.gz $(package)_sha256_hash=6f606d3b6bccd2112aeabf1a063f5b5ece87005a5d7e97c8faca23b916e88838 diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk index a8678c4d8..60c972ffe 100644 --- a/depends/packages/native_protobuf.mk +++ b/depends/packages/native_protobuf.mk @@ -1,8 +1,8 @@ package=native_protobuf $(package)_version=2.6.1 # $(package)_download_path=https://github.com/google/protobuf/releases/download/v$($(package)_version) -# https://ipfs.io/ipfs/QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-2.6.1.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W?filename=protobuf-2.6.1.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmPqPmBLNhSZKZkvf3RHDUK1ePQLzWXE9ZCHQhdLqHW67W $(package)_file_name=protobuf-$($(package)_version).tar.bz2 $(package)_sha256_hash=ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index 749bc2b6e..392049aa5 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -1,8 +1,8 @@ package=openssl $(package)_version=1.1.1w #$(package)_download_path=https://www.openssl.org/source/old/1.1.1/ -# https://ipfs.io/ipfs/QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=openssl-1.1.1w.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP?filename=openssl-1.1.1w.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmRtgHuSAGdjiWAD2YpdG79fjqLc59EUHUAxDdBi12SzYP $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index f72757636..1fa3920ed 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -1,8 +1,8 @@ package=qrencode $(package)_version=3.4.4 # $(package)_download_path=https://fukuchi.org/works/qrencode/ -# https://ipfs.io/ipfs/Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=qrencode-3.4.4.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF?filename=qrencode-3.4.4.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=Qma2igUXcx1UPLW2qhsxqx3Xjbi4F6ZaiGRxhb3Ef913cF $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 414e65952..d705e953f 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,9 +1,9 @@ PACKAGE=qt $(package)_version=5.9.9 # $(package)_download_path=https://download.qt.io/archive/qt/5.9/$($(package)_version)/submodules -# https://ipfs.io/ipfs/QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-opensource-src-5.9.9.tar.xz +# https://ipfs.decenomy.net/QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt?filename=qtbase-opensource-src-5.9.9.tar.xz $(package)_suffix=opensource-src-$($(package)_version).tar.xz -$(package)_download_path=https://ipfs.io/ipfs +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmWS1cnwY74rbuHes91FvNNX8XXDHu1Unqzg5Wjta4Wcpt $(package)_file_name=qtbase-$($(package)_suffix) $(package)_sha256_hash=d5a97381b9339c0fbaf13f0c05d599a5c999dcf94145044058198987183fed65 @@ -13,22 +13,22 @@ $(package)_build_subdir=qtbase $(package)_qt_libs=corelib network widgets gui plugins testlib concurrent $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch fix_rcc_determinism.patch fix_riscv64_arch.patch fix_s390x_powerpc_mips_mipsel_architectures.patch xkb-default.patch fix_gcc_11_3_compile.patch -# https://ipfs.io/ipfs/QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-opensource-src-5.9.9.tar.xz +# https://ipfs.decenomy.net/QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1?filename=qttranslations-opensource-src-5.9.9.tar.xz $(package)_qttranslations_download_file=QmaBqkWqYQeyvqK3djYy3AXguyswZGY8nbrHaMHrfM6jD1 $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=f7474f260a1382549720081bf2359a3d425ec3bf7d31976c512834303d30d73b -# https://ipfs.io/ipfs/QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-opensource-src-5.9.9.tar.xz +# https://ipfs.decenomy.net/QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6?filename=qttools-opensource-src-5.9.9.tar.xz $(package)_qttools_download_file=QmQ7eQYaySNp7NSVpJXyT9oBsf7yRxHyd53Cm1z3u7JSG6 $(package)_qttools_file_name=qttools-$($(package)_suffix) $(package)_qttools_sha256_hash=fce6e0fd39a40bcef880c669080087dba94af1ec442296222210472e0852bf98 -# https://ipfs.io/ipfs/QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-opensource-src-5.9.9.tar.xz +# https://ipfs.decenomy.net/QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa?filename=qtsvg-opensource-src-5.9.9.tar.xz $(package)_qtsvg_download_file=QmUWDvGG5wT26cmE8wkz5dZkjFWNuTHq1bBY6nudLUQ3Xa $(package)_qtsvg_file_name=qtsvg-$($(package)_suffix) $(package)_qtsvg_sha256_hash=0d2759178c0c1ec8c7ea0d05b7bf57787c09d8059ca9b9518607a8e97933e888 -# https://ipfs.io/ipfs/QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-opensource-src-5.9.9.tar.xz +# https://ipfs.decenomy.net/QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2?filename=qtcharts-opensource-src-5.9.9.tar.xz $(package)_qtcharts_download_file=QmT5BgG9nYmUs6aZArYHWL878vYHjBzrtkNfQ2Vt6sgXY2 $(package)_qtcharts_file_name=qtcharts-$($(package)_suffix) $(package)_qtcharts_sha256_hash=a503e9f1504c41a6a7850ca2e0e4e786fce45345c94eb81a6abd352d15b7d95c diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 19b2b04ff..ec74aec46 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -1,8 +1,8 @@ package=xcb_proto $(package)_version=1.10 # $(package)_download_path=https://xcb.freedesktop.org/dist -# https://ipfs.io/ipfs/QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-1.10.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2?filename=xcb-proto-1.10.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmRzchvXBhLAdZz76GF9ikPVufnKnnnBEyAiDnbuz9TWM2 $(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 $(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk index 7ff80e587..f4b7c7300 100644 --- a/depends/packages/xextproto.mk +++ b/depends/packages/xextproto.mk @@ -1,8 +1,8 @@ package=xextproto $(package)_version=7.3.0 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto -# https://ipfs.io/ipfs/QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=xextproto-7.3.0.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv?filename=xextproto-7.3.0.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmZToJAAfQ5CBcT6rcKh9vjSPDjUr6E6TsNgYg4dU8gdKv $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0 diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index f44d2b0a3..6f9b63ccc 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -1,8 +1,8 @@ package=xproto $(package)_version=7.0.26 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto -# https://ipfs.io/ipfs/QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=xproto-7.0.26.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx?filename=xproto-7.0.26.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmTb3hRqX7E5FZ8Ms1Um8huoi2ZxABGRpmuCZz4T1NWpRx $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk index d2c6e81d8..54027fa9b 100644 --- a/depends/packages/xtrans.mk +++ b/depends/packages/xtrans.mk @@ -1,8 +1,8 @@ package=xtrans $(package)_version=1.3.4 # $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ -# https://ipfs.io/ipfs/QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=xtrans-1.3.4.tar.bz2 -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C?filename=xtrans-1.3.4.tar.bz2 +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmXRZpfJG4cwwu3UvZLzB2ZAf4zTPQGMEToqzehKiLRn3C $(package)_file_name=$(package)-$($(package)_version).tar.bz2 $(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index d0eb777e8..a19a8f1ae 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -1,8 +1,8 @@ package=zeromq $(package)_version=4.3.1 # $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ -# https://ipfs.io/ipfs/QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=zeromq-4.3.1.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4?filename=zeromq-4.3.1.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmW9vK8jQqdEjC4Xesu1ZhZwRDEmv8odG2BrbGFrWBuiL4 $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index d955703f7..3f106429a 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -1,8 +1,8 @@ package=zlib $(package)_version=1.2.11 # $(package)_download_path=https://www.zlib.net -# https://ipfs.io/ipfs/QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=zlib-1.2.11.tar.gz -$(package)_download_path=https://ipfs.io/ipfs +# https://ipfs.decenomy.net/QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr?filename=zlib-1.2.11.tar.gz +$(package)_download_path=https://ipfs.decenomy.net $(package)_download_file=QmVUxkKQnLaiWK7nSwMFQ97LYSeGuwtRFjhw9ooMpJd5Gr $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 From ae593d345915d5f6d28631e19c546a211b5b3426 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 4 Oct 2024 12:24:21 +0100 Subject: [PATCH 14/39] fixes the filename error on the files downloaded from IPFS --- Jenkinsfile | 2 +- contrib/docker/Dockerfile.dsw-develop-builder | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-builder | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2d13d8206..2c8624623 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { rm -rf SDKs mkdir SDKs cd SDKs - wget -c https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz + wget -c https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH -O MacOSX10.11.sdk.tar.xz tar -xf MacOSX10.11.sdk.tar.xz cd .. make -j $(nproc) HOST=x86_64-apple-darwin14 diff --git a/contrib/docker/Dockerfile.dsw-develop-builder b/contrib/docker/Dockerfile.dsw-develop-builder index 66ea6ceee..de77a9de6 100644 --- a/contrib/docker/Dockerfile.dsw-develop-builder +++ b/contrib/docker/Dockerfile.dsw-develop-builder @@ -105,7 +105,7 @@ RUN git pull origin $TARGET RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz +RUN curl -LOJ https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-builder b/contrib/docker/Dockerfile.dsw-macos-x64-builder index 0b9f2c743..fc4dbb8f7 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-builder +++ b/contrib/docker/Dockerfile.dsw-macos-x64-builder @@ -79,7 +79,7 @@ RUN git clone https://github.com/decenomy/DSW.git RUN mkdir -p /DSW/depends/SDKs WORKDIR /DSW/depends/SDKs -RUN curl -LO https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz +RUN curl -LOJ https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz From 441b80298f1b641cc300abf63e6c4b25add6ef46 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 4 Oct 2024 13:31:19 +0100 Subject: [PATCH 15/39] delete unnecessary docker file --- contrib/docker/Dockerfile.dsw-develop-builder | 147 ------------------ 1 file changed, 147 deletions(-) delete mode 100644 contrib/docker/Dockerfile.dsw-develop-builder diff --git a/contrib/docker/Dockerfile.dsw-develop-builder b/contrib/docker/Dockerfile.dsw-develop-builder deleted file mode 100644 index de77a9de6..000000000 --- a/contrib/docker/Dockerfile.dsw-develop-builder +++ /dev/null @@ -1,147 +0,0 @@ -# Use a base image (Ubuntu 18.04) -# FROM ubuntu:18.04 -FROM ubuntu@sha256:dca176c9663a7ba4c1f0e710986f5a25e672842963d95b960191e2d9f7185ebe - -# Set arguments -ARG CPU_CORES=1 -ARG TARGET=develop - -# Set environment variables -ENV DEBIAN_FRONTEND=noninteractive -ENV TZ=UTC -ENV QT_RCC_TEST=1 -ENV QT_RCC_SOURCE_DATE_OVERRIDE=1 -ENV ZERO_AR_DATE=1 -ENV WRAP_DIR=/wrapped -ENV HOSTS="x86_64-linux-gnu aarch64-linux-gnu x86_64-apple-darwin14 x86_64-w64-mingw32" -ENV FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy gcc g++" -ENV FAKETIME_PROGS="ar ranlib nm strip objcopy gcc g++ date zip wine wine64 dmg genisoimage tar" - - -# Update and install necessary packages -RUN dpkg --add-architecture i386 && \ - apt-get update && \ - apt-get install -y \ - curl=7.58.0-2ubuntu3.24 \ - git=1:2.17.1-1ubuntu0.18 \ - zip=3.0-11build1 \ - faketime=0.9.7-2 \ - build-essential=12.4ubuntu1 \ - libtool=2.4.6-2 \ - bsdmainutils=11.1.2ubuntu1 \ - autotools-dev=20180224.1 \ - autoconf=2.69-11 \ - pkg-config=0.29.1-0ubuntu2 \ - automake=1:1.15.1-3ubuntu2 \ - python3=3.6.7-1~18.04 \ - g++-aarch64-linux-gnu=4:7.4.0-1ubuntu2.3 \ - g++-8-aarch64-linux-gnu=8.4.0-1ubuntu1~18.04cross2 \ - gcc-8-aarch64-linux-gnu=8.4.0-1ubuntu1~18.04cross2 \ - binutils-aarch64-linux-gnu=2.30-21ubuntu1~18.04.9 \ - g++-8-multilib=8.4.0-1ubuntu1~18.04 \ - gcc-8-multilib=8.4.0-1ubuntu1~18.04 \ - python3-dev=3.6.7-1~18.04 \ - python3-setuptools=39.0.1-2ubuntu0.1 \ - fonts-tuffy=20120614-2 \ - libcap-dev=1:2.25-1.2 \ - libz-dev \ - libbz2-dev=1.0.6-8.1ubuntu0.2 \ - imagemagick=8:6.9.7.4+dfsg-16ubuntu6.15 \ - cmake=3.10.2-1ubuntu2.18.04.2 \ - librsvg2-bin=2.40.20-2ubuntu0.2 \ - libtiff-tools=4.0.9-5ubuntu0.10 \ - mingw-w64=5.0.3-1 \ - xvfb=2:1.19.6-1ubuntu4.15 \ - wine32=3.0-1ubuntu1 \ - wine64=3.0-1ubuntu1 && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Set POSIX for x86_64-w64-mingw32-g++ alternatives config -RUN echo "1" | update-alternatives --config x86_64-w64-mingw32-g++ - -# use a fixed date -RUN echo -n "2000-01-01 12:00:00" > /git_timestamp -RUN echo -n "200001011200.00" > /git_timestamp_touch - -# Compile the depends folder using a deterministic timestamp - -RUN mkdir -p ${WRAP_DIR} - -RUN for prog in ${FAKETIME_PROGS}; \ - do \ - echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}; \ - echo -n "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 " >> ${WRAP_DIR}/${prog}; \ - echo -n "FAKETIME=\"\$(cat /git_timestamp)\" " >> ${WRAP_DIR}/${prog}; \ - echo "\$(which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -n 1) \"\$@\"" >> ${WRAP_DIR}/${prog}; \ - chmod +x ${WRAP_DIR}/${prog}; \ - done - -RUN for host in $HOSTS; \ - do \ - for prog in ${FAKETIME_HOST_PROGS}; \ - do \ - echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${host}-${prog}; \ - echo -n "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 " >> ${WRAP_DIR}/${host}-${prog}; \ - echo -n "FAKETIME=\"\$(cat /git_timestamp)\" " >> ${WRAP_DIR}/${host}-${prog}; \ - echo "\$(which -a ${host}-${prog} | grep -v ${WRAP_DIR}/${host}-${prog} | head -n 1) \"\$@\"" >> ${WRAP_DIR}/${host}-${prog}; \ - chmod +x ${WRAP_DIR}/${host}-${prog}; \ - done \ - done - -RUN ln -s ${WRAP_DIR}/x86_64-w64-mingw32-windres ${WRAP_DIR}/windres - -# Clone the repository -RUN git clone https://github.com/decenomy/DSW.git - -WORKDIR /DSW - -# Check out a specific version if needed -RUN git checkout -B $TARGET -RUN git pull origin $TARGET - -# --- macos --- -# Install the MacOS SDK -RUN mkdir -p /DSW/depends/SDKs -WORKDIR /DSW/depends/SDKs - -RUN curl -LOJ https://ipfs.decenomy.net/QmccbpJcugkoV6uVovYsyZ3MPxGTcbUNYXMhLQL2hLzHwH?filename=MacOSX10.11.sdk.tar.xz -RUN touch -t $(cat /git_timestamp_touch) /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz -RUN PATH=${WRAP_DIR}:${PATH} tar -C /DSW/depends/SDKs -xf /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz -RUN rm /DSW/depends/SDKs/MacOSX10.11.sdk.tar.xz -# --- --- --- - -# --- windows --- -# Set the Inno Setup compiler -WORKDIR /DSW/contrib/innosetup - -ENV DISPLAY=:99 -RUN Xvfb :99 -screen 0 1024x768x16 -nolisten tcp & - -RUN Xvfb :99 -screen 0 1024x768x16 -nolisten tcp & \ - wine innosetup-6.1.2.exe /VERYSILENT /NORESTART /ALLUSERS /SUPPRESSMSGBOXES /SP /LOG=setup.log && \ - wine idpsetup-1.5.1.exe /VERYSILENT /NORESTART /ALLUSERS /SUPPRESSMSGBOXES /SP /LOG=setup.log - -RUN rm /tmp/.X99-lock -# --- --- --- - -# Switch to the repository directory -WORKDIR /DSW/depends - -# Builds the dependencies in the depends folder -RUN for host in $HOSTS; \ - do \ - PATH=${WRAP_DIR}:${PATH} make -j$(echo $CPU_CORES) HOST=${host}; \ - done - -# Set the work dir to the root folder -WORKDIR / - -# Set the entry point if you want to interact within the container -ENTRYPOINT ["bash"] - -# Build it with: -# docker build --build-arg CPU_CORES= --build-arg TARGET= -t decenomy/dsw-develop-builder -f Dockerfile.dsw-develop-builder . -# Publish with: -# docker login -# docker push decenomy/dsw-develop-builder:latest From 73c64e9653c628532ea24a55d5b60dea1b3c6645 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 4 Oct 2024 15:02:03 +0100 Subject: [PATCH 16/39] fixes corrupted file from IPFS --- depends/packages/native_cctools.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index b20bb8a5e..62e622af9 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -9,9 +9,9 @@ $(package)_sha256_hash=a09c9ba4684670a0375e42d9d67e7f12c1f62581a27f28f7c825d6d70 $(package)_build_subdir=cctools $(package)_clang_version=3.7.1 # $(package)_clang_download_path=https://llvm.org/releases/$($(package)_clang_version) -# https://ipfs.decenomy.net/Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz +# https://ipfs.decenomy.net/QmVDNntsHf2C1eU6K9xepuiGhtd1FL5SKucDqg5qZfqAc9?filename=clang-llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_download_path=https://ipfs.decenomy.net -$(package)_clang_download_file=Qme9KKikF4dWuPm9gmdGzDKXjTCgfNc2HnMXLdA6e12SVS +$(package)_clang_download_file=QmVDNntsHf2C1eU6K9xepuiGhtd1FL5SKucDqg5qZfqAc9 $(package)_clang_file_name=clang-llvm-$($(package)_clang_version)-x86_64-linux-gnu-ubuntu-14.04.tar.xz $(package)_clang_sha256_hash=99b28a6b48e793705228a390471991386daa33a9717cd9ca007fcdde69608fd9 $(package)_extra_sources=$($(package)_clang_file_name) From fffdd669a009d9b85701def0dacac81fdfd60f81 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sat, 5 Oct 2024 12:22:56 +0100 Subject: [PATCH 17/39] changes the docker hub digests for the wallet docker files --- contrib/docker/Dockerfile.dsw-linux-arm64-wallet | 2 +- contrib/docker/Dockerfile.dsw-linux-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-macos-x64-wallet | 2 +- contrib/docker/Dockerfile.dsw-windows-x64-wallet | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet index a951120fa..56f9de4bd 100644 --- a/contrib/docker/Dockerfile.dsw-linux-arm64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-arm64-wallet @@ -1,5 +1,5 @@ # FROM decenomy/dsw-linux-arm64-builder:latest -FROM decenomy/dsw-linux-arm64-builder@sha256:33f849b0d55eedd0f3d971d790a0fe008b4efa92066362f2f9eb4bed3bfb4ecb +FROM decenomy/dsw-linux-arm64-builder@sha256:b26756d83266ea11bc9a2c2915254220892e04cf3ccc573677b4874b66ab4585 # ARG for specifying the number of cores ARG CPU_CORES=1 diff --git a/contrib/docker/Dockerfile.dsw-linux-x64-wallet b/contrib/docker/Dockerfile.dsw-linux-x64-wallet index f97971f96..3e9cbbc54 100644 --- a/contrib/docker/Dockerfile.dsw-linux-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-linux-x64-wallet @@ -1,5 +1,5 @@ # FROM decenomy/dsw-linux-x64-builder:latest -FROM decenomy/dsw-linux-x64-builder@sha256:5b4550b5dc7b37e13b1b8b3a01443689dcd391578940068998fa3a137b845b58 +FROM decenomy/dsw-linux-x64-builder@sha256:ff104c62a14c79d0242725aa69c15dda4d17282be4f8405c8cc7a89683b249e0 # ARG for specifying the number of cores diff --git a/contrib/docker/Dockerfile.dsw-macos-x64-wallet b/contrib/docker/Dockerfile.dsw-macos-x64-wallet index 35d16635c..851041888 100644 --- a/contrib/docker/Dockerfile.dsw-macos-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-macos-x64-wallet @@ -1,5 +1,5 @@ #FROM decenomy/dsw-macos-x64-builder:latest -FROM decenomy/dsw-macos-x64-builder@sha256:3977226e7d631af8f65d2d1903c34bf7452f359e76a0ee14e8f72a1feb3de40c +FROM decenomy/dsw-macos-x64-builder@sha256:ff118694a4892abc89384bae52362aee9048499e6c39f62147fa9fe370dc97fb # ARG for specifying the number of cores ARG CPU_CORES=1 diff --git a/contrib/docker/Dockerfile.dsw-windows-x64-wallet b/contrib/docker/Dockerfile.dsw-windows-x64-wallet index 87914f42f..27b9e5d16 100644 --- a/contrib/docker/Dockerfile.dsw-windows-x64-wallet +++ b/contrib/docker/Dockerfile.dsw-windows-x64-wallet @@ -1,5 +1,5 @@ #FROM decenomy/dsw-windows-x64-builder:latest -FROM decenomy/dsw-windows-x64-builder@sha256:3bbdc2380c3e0c7409fe4dc54ad6f99d53fc1110d9f9a236d6e78a79e7067ccb +FROM decenomy/dsw-windows-x64-builder@sha256:aea70b0aeb3605a83d2c7e2fac514dc5a27561d0ac89aa6d33da47413e257e23 # ARG for specifying the number of cores ARG CPU_CORES=1 From 158f6fc9c80b3a6aa716ababbd3a50b603e1facd Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sat, 5 Oct 2024 12:26:48 +0100 Subject: [PATCH 18/39] removes superfluous define --- src/bootstrap.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bootstrap.h b/src/bootstrap.h index fe43e983f..293644830 100644 --- a/src/bootstrap.h +++ b/src/bootstrap.h @@ -5,8 +5,6 @@ #ifndef BOOTSTRAP_H #define BOOTSTRAP_H -#define APPLE_CA_PATH "/etc/ssl/cert.pem" - class CBootstrap { public: From 396af0007ddaa423de25f6c3e7b92531a960aae4 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sat, 5 Oct 2024 12:43:23 +0100 Subject: [PATCH 19/39] sets ca path of curl outomatically --- src/curl.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++--- src/curl.h | 2 -- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index fbfea3d99..f29144854 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -23,6 +23,40 @@ size_t writeCallback(void* data, size_t size, size_t nmemb, void* clientp) return total_size; } +bool fileExists(const std::string &path) { + std::ifstream file(path); + return file.good(); +} + +std::string findCAPath() { + std::vector commonPaths = { + // Linux common locations + "/etc/ssl/certs/ca-certificates.crt", + "/etc/pki/tls/certs/ca-bundle.crt", + "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", + "/etc/pki/tls/cert.pem", + // macOS common locations + "/etc/ssl/cert.pem", + "/usr/local/etc/openssl/cert.pem" + }; + + // Search through the common paths + for (const auto &path : commonPaths) { + if (fileExists(path)) { + LogPrintf( + "CCurlWrapper::%s: CA certificate found: %s\n", + __func__, path); + return path; + } + } + + // If no file is found, return an empty string + LogPrintf( + "CCurlWrapper::%s: No CA certificate found!\n", + __func__); + return ""; +} + bool CCurlWrapper::DownloadFile( const std::string& url, const std::string& filename, @@ -76,9 +110,14 @@ bool CCurlWrapper::DownloadFile( // Sets HTTPS parameters curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); -#if defined(__APPLE__) - LogPrintf("CCurlWrapper::%s: apple ca path: %s\n", __func__, (const char*)APPLE_CA_PATH); - curl_easy_setopt(curl, CURLOPT_CAINFO, (const char*)APPLE_CA_PATH); + +#ifndef WIN32 + std::string caPath = findCAPath(); + if (!caPath.empty()) { + // Set the path to the CA bundle if found + LogPrintf("CCurlWrapper::%s: ca path: %s\n", __func__, caPath); + curl_easy_setopt(curl, CURLOPT_CAINFO, caPath.c_str()); + } #endif // Sets file releated parameters diff --git a/src/curl.h b/src/curl.h index f9b7bad3d..8cca6b835 100644 --- a/src/curl.h +++ b/src/curl.h @@ -8,8 +8,6 @@ #include #include -#define APPLE_CA_PATH "/etc/ssl/cert.pem" - class CCurlWrapper { public: From af2b262cd3504a0c25e10c3702c454ca7b040520 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sat, 5 Oct 2024 12:46:25 +0100 Subject: [PATCH 20/39] caches the caPath value --- src/curl.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index f29144854..0b198cab4 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -23,6 +23,8 @@ size_t writeCallback(void* data, size_t size, size_t nmemb, void* clientp) return total_size; } +#ifndef WIN32 + bool fileExists(const std::string &path) { std::ifstream file(path); return file.good(); @@ -57,6 +59,10 @@ std::string findCAPath() { return ""; } +std::string caPath = ""; + +#endif + bool CCurlWrapper::DownloadFile( const std::string& url, const std::string& filename, @@ -110,9 +116,11 @@ bool CCurlWrapper::DownloadFile( // Sets HTTPS parameters curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); - + #ifndef WIN32 - std::string caPath = findCAPath(); + if (caPath.empty()) { + caPath = findCAPath(); + } if (!caPath.empty()) { // Set the path to the CA bundle if found LogPrintf("CCurlWrapper::%s: ca path: %s\n", __func__, caPath); From f7ebdc7feb58dd6118b2f933f4418012254934e5 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sun, 6 Oct 2024 12:42:54 +0100 Subject: [PATCH 21/39] removes the '?' FAQ button from the UI's top bar --- src/qt/pivx/forms/topbar.ui | 16 ---------------- src/qt/pivx/topbar.cpp | 6 +++--- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/qt/pivx/forms/topbar.ui b/src/qt/pivx/forms/topbar.ui index 18ff07357..5880058f8 100644 --- a/src/qt/pivx/forms/topbar.ui +++ b/src/qt/pivx/forms/topbar.ui @@ -378,22 +378,6 @@ - - - - - 36 - 36 - - - - - 16777215 - 36 - - - - diff --git a/src/qt/pivx/topbar.cpp b/src/qt/pivx/topbar.cpp index e5768f432..d259064d5 100644 --- a/src/qt/pivx/topbar.cpp +++ b/src/qt/pivx/topbar.cpp @@ -78,8 +78,8 @@ TopBar::TopBar(PIVXGUI* _mainWindow, QWidget* parent) : PWidget(_mainWindow, par progressBar->raise(); progressBar->move(0, 34); - ui->pushButtonFAQ->setButtonClassStyle("cssClass", "btn-check-faq"); - ui->pushButtonFAQ->setButtonText(tr("FAQ")); + // ui->pushButtonFAQ->setButtonClassStyle("cssClass", "btn-check-faq"); + // ui->pushButtonFAQ->setButtonText(tr("FAQ")); ui->pushButtonHDUpgrade->setButtonClassStyle("cssClass", "btn-check-hd-upgrade"); ui->pushButtonHDUpgrade->setButtonText(tr("Upgrade to HD Wallet")); @@ -140,7 +140,7 @@ TopBar::TopBar(PIVXGUI* _mainWindow, QWidget* parent) : PWidget(_mainWindow, par connect(ui->btnQr, &QPushButton::clicked, this, &TopBar::onBtnReceiveClicked); connect(ui->pushButtonLock, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnLockClicked); connect(ui->pushButtonTheme, &ExpandableButton::Mouse_Pressed, this, &TopBar::onThemeClicked); - connect(ui->pushButtonFAQ, &ExpandableButton::Mouse_Pressed, [this]() { window->openFAQ(); }); + // connect(ui->pushButtonFAQ, &ExpandableButton::Mouse_Pressed, [this]() { window->openFAQ(); }); connect(ui->pushButtonConf, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnConfClicked); connect(ui->pushButtonMasternodes, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnMasternodesClicked); connect(ui->pushButtonSync, &ExpandableButton::Mouse_HoverLeave, this, &TopBar::refreshProgressBarSize); From f084d71ea98d7cc746343ffeb134981cfb960a09 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Wed, 9 Oct 2024 14:03:15 +0100 Subject: [PATCH 22/39] changes the QR icon image to a generic one --- src/qt/pivx/res/img/img-qr-test-big.png | Bin 23309 -> 3383 bytes src/qt/pivx/res/img/img-qr-test.png | Bin 2234 -> 774 bytes src/qt/pivx/res/img/img-qr.svg | 388 ++++-------------------- 3 files changed, 63 insertions(+), 325 deletions(-) diff --git a/src/qt/pivx/res/img/img-qr-test-big.png b/src/qt/pivx/res/img/img-qr-test-big.png index 4019449033bacdc7f1397a3e91de1257694e84f1..f86701d4e6f4a15aed25f3db28422970ae8f3d26 100644 GIT binary patch literal 3383 zcmeAS@N?(olHy`uVBq!ia0y~yU}^wi4mO|&&)Jj8K#HZ<$uool2x>S|I)Hr60*}aI z1_r((Aj~*bn@<`jC|TkfQ4*Y=R#Ki=l*&+EUaps!mtCBkSdglhUz9%kosAUGye*zC zjv*Cu-rjU9)b1{0V6fIW=S6&3~@2Lwc&wuU^aN zHjE4tKAwNY$iVPNhmnIpK$(G&A&EtS!J&tNg`q>Rfq}u0Nq|AYje&{b2!{hhgT$yJ zii6Edkw?<6>`q)tYS*MXCLD!($+&Hw)W`{k!ak+#e~p5|@8 z{fe{Z@ZUQ7+M1d*^A74OGyI%>`f1UvZMk209!&r2cc9Rck$E&7(jzNcu9qt)*?v3s zYs>Q8aqCyBGkj3F{`%|sKkFYECZDqm?`L3m@Z4fFGU!t-f+OShwzcyZ7%YG9TR*QL z0~`kyn+%V=;$)bh9545ng=fT+-N16AVR3bBZLBRL!-IOsVqh7{!oXmEoKs@7o}x!p z4G#a?-)kX7!}96Vr(ZQ@sAyWhe*NX=&!4}N^xvKfEXUi;p3N!#+Mz6+yk_19U`cY8 zpZkIS#`nKpzI~hfwP*Qc{r*BGw$T;_JsMfXakdTjpV#eQKktBf?(J>B76+&hIbdFK z`KLZoLDKT`=cY;D`={=yA9+#JWBEMBmWiQZ{$uXZwlDpf|DV}8SYjunOV!Z literal 23309 zcmeHv30PCt_U{QGNM%rHtAav+09uDAGKiQks)@G8}?4_1Rj;3sxP~26qd`G8Bf;E3l;m%0cUd!2O33+z1YL-rsLm?50I4c>oF{QZK zRgh(apXxXBzo1g&W-MjotuB7P0sJ4ky8;?}kVrf>_XPL_$^&YYRfGQl-_&(VPKl!J z_qgiv!m#pIn8n9o1^s7J-Cztf^@==mY9(s$o4DB-X?d#@Po}fCA_J%H%i(g0bq%LC zNe&(ExSly2xt9xFp%sZ;WrRqYs`9PLH>b5@w(ty-w4&FaA7+&?#x_wDsWVRbn$Uii z=HvF1HFiUJI^pi^{kE#RCxrESXs^_nbg5eTk}U{c=dCbVkG(Z)KSgRh4r|O5`(=_o zJj3Ozi4o>+o4|hR z>k2s>`6f@9vVMKvJ$)+`-SK)V`+mS^o`N1J2uH3ZCU?qQfkcu6Y{V9QFa9IB zYHO6XhKuykOYE=*(^&;Gs6I4N^x=XYDnEZZPkbrbFiEgtoT5PfOa8v@Q&D z^Y##Gbb&VX&n)whVV3U~$ycPMg}1076;fk;aQqh2$@=(Itod-Y{ZVFlH|Kc}!htdz z`3-+jX^Tqxzgb%O4k#Pi9*__|8!03F!Eu6l&`h+4rg$rJSn*anXV$G^A+F zR0kX%+mGUNh;*$+Ln0A>W*{PG6@-^QmY$MxRd{evdg|gfh_;ST#8o_5b9S<|2!7Gj zl{~kU_8sR6*!UbO7-6Q!md7tO6IqjrSPWrHpfnjl4NDMxefBOR1Dl zb2;e)FV^I9Xl$!3ON%upD^>@{I_;IjER77}#ZPz!p}F_@Vs%-hNK1O=f>j@~r1#9- z?`LFiKZQwj5IrGF#iwfFR}7v?48#P&mkmfZMmph>wJP{XiGZmv!W9r`?xlP~c`F`9 zJiRKe+1kHp`pCPfB~&|+z*eTNdwEAyI{b>RDkXkQ2YlIaBEi$9ca*V~CKhn;s=ag$ z2UQ+X>a0Xz5<4ch$`r)6-kyB$+xRkMGLMracdb_Eampt66%{F~*&~nP%V0&g35^42 zi@&YTPb;m|@`&k{1?7)@81zvCQJ>}7jq9g;X6f4AF( z7P*10U#$9d@kBx+|2x@`&G4v3L(qoPUj@nFmSl@BR@e53m zJv59m ze9S?M6IfhObMOC2y*;F%WCo#C{ z3O*z1fwTMHp(*QcksHSgJ3kfD<9~J*f8-9{jv^hsQx41YG_WxbA{ohfLsN(j^2|2( zSkYdE*UKy(MBH(vJ zKn@1Ga!_eXl+eAiMLfs{a!|?#ufp>r>VC0Esr;=&0>c=y*Nruqjak8yIT~by1Ah8? zUD9-RQq~$fQb>w(;^ANWYF(!b#GGd%;n!7`e4y)Wm+eyRnwmvSEz6Go@I#ivfxnW8 zMwZFmKjd7o!U7h0>)yY<0jP-!t$Gl;oKvWNy?6p;-kxj%1RfyKUeK}lb*rHsAoSwn ze^YgO4k=$v-yAOA!|$b6X+*x>?TN-a2>W5j4;2(5IRp;4G%0yzvgiw5z3?@T@B7K= zjvv?(2E@i*Yj7T_^9+Ro@XTkof@bz4azl_yWKBB=dnWc|#gCb7=hdTvT%`4c*G4ov z%HxRLP@tEQ-S~u25kvSEH|Jt5yot4Nayb%WnPUB7?JsZ!f1ZpM#gu;iXwNw($c&rW zQF<91ciq51KOc|umD;z6iUUb9H140rugWGQ5wDdo=f61)8At=+4IK>!sq<&B@Yg-P z1e?h`is#UuXT0sQY65M~yz5CX<8s`o}cM9*xI9HL9DDhb#an$5l5zDeVZIdc>qTUhSkA-`fsR% zX#0SJGVIRg1i?YK)_nqr)@+RmXPI^sJ~Zp6Vs)nHP>D8s>FCOe0j=QWEWP_v9&mhe z`Qp^49@Wnxc?PX3VF;NW52XXxk1H#PWicaoSYP}%!IgD_LfeUiVKWgOM003>|VQwisTbaVRi9Y$x4b`YElx`=*rU;;7w-p=pmOhHqGrp(B! z(qJh43gSJsZCEDB2x*k{sHzKCazc0BsLX>?=|8 zSqluWS$^l(R(M{YJo;wd{J1bR5TL?=^v``801BgftMsSuXLV_@t#|`Zv{#YYm+kf; zF5$a-Ojwh`UT6$c8uPm%V(4Q4$Eq;^i9d}8 zF5lhM3c)05?tq0cSlO=5f{_!Q#1plXT7nirnpXd}GQv{&7bXjMDYjp_vwz|_dEGIh zVoc$HT=gUhb728=HHI`G`m=c_n`NSg?958Lw{UUzM0wAN7Q-2tr~&;C&q~yh68i9# z1&H-E>~_lU0bm%N+1ZSv#74TX|GWshn#Xg12m6STtI+O5DRbsku3A8$Wpfc*R$NtGA(F-UNhcGW^yU@+2x(TDl&S7u?1y@-i|HBqehsV zaJ8sR3Sw|TWsIb_2A69>Elx}Xer&iK5pVQ;km61}$X=lwrL+otIagV{pN~(s;~UN+ z1^|rGE9f9~<;)91D;~31c#yyN;G%N=0m~t%QVLeO_jNbcOyV16L+>{eXbvF0DRT>F zjnWzc2HnW-wRSP%mWE5zrvjig?4E@8j!X+7dB5L4H*;2`0X${^c>1~fRx0nbC381nY}wXRtYC4U~^~aAjkt~FbMSEl!K7ZHfyU* zOP&kC*3fp4+Z5xYH1vnIBBNQo29wS}3OYEh>16z(p4RQlaF zt-6XL?9->d2JsiwL=xB!b<|4(Y)LotxU4^F+V%A~Vf4a(eFKG2)% z2H;H9wP+W!HUzvQJK6~|jttL`QUzs-uvkU_@_NN)G$f3&#;t` zLv?@1kiO6t(Zhm3R{gtES*nw}Tgfw1A6@vhr6Yb!=jseY;8~);UgUB>dSDPwUJd0i z$Lk4%Sk*Ws)<+j*Yf{;TVMX&#%s`$RydR&iIK~iGgqH218*9I*JulIrzBMJ>*7-Sw zk&4yv&Te#cJqzzvX$eTe7*2aZv9$NL#ORM0Iirr>>`mlGJ{kdJ=mnjPw}-JLp2xyjeeSBmDnD2D=`;K*gZdGU&YT;)_`(`89>CVssr7>N|#p$YoeQ$H&)ex zFWolhUV}~6@P~-lZVx1zF@mu8PkEfOF)f+Zf$#D)&Q3(F7O9842XK@=oaG7$0?CtD zo;wiH7hB9&*=dWc3@AHbyH6XfN3yBgc`LJ64*pb$13=ctd7>6L1}~FFhkhq6^?ZDh z@!iticV3^BmyTRi-v0#Uwe%tO+4_BWUO(Y^-aY$6L)TOZ;5*^KhGdMd7*K5<63YN`-mgJdLP!c8xr0My#X|IjY zhGdf;FSxie%k4EIQ~fbf-)^hCz6!G4H@i_U{!4R^XVj_jS124W) zG%}05g$Qm99by>&-IwK1dX(qPF7#^OWrEX;%;N}r&<``>0sf|%k*-ZyFJ8SxQ_MHa z%I)+Vc@FGSwo4tmBV2Ww^qu$9>-MT=Znn%Qj#Uxp1;pXr+awuJ~?Fon2 zUdt()zB-%RC_BTj`c2CRHtOTt^0w#2s-8)2*a$TF8Mt9*gC z)nv{D;x^FZ9$h-}Q@J$p_e119I_KRt5>6;Sf))OL&XEL}eAkO_yN&(F;%fW51xdeU zNVQ2^ldfaptXigF!`0>t=T~s_4X45bwbS(}FPC7AiP~4^#)@D6zl{aM^u41ej>@zi z>#}_)&GQ{$VcRUO3<)e4o{?_e*w60e;y{Z!`mbb1hZQQm{KYq%fFvMqMi1dJ1v3WW zmfXl5f>3t7q}*b?Bujj{eAlSaL6|lfa90ogRNcYM8gG>G0pC(QDdXNxZJE_4UYS04hAtikV@&l0{A4GnQzwH>xGk+GQo;DY+I&P2*$I^EcG2nDx!aGGjkU(BGB&f}t(rBwa z0H^jIJ-8I>z;hwLsfF_YjeYm#IjXV_3&=!9m?Kfhk=wuKI(0m<>p%7hV%uYZ(!3pkb zi>(k$1uo(Cq}4WM{Z#Dgy)iJc1s`mb(O?3pw52lCeLuYY-raro(3$CAg)fj8+^7p* z;i~VtDgGAOvj9zTLgDsxv408>e zdxO-jIlK>3rr1UZyX`b$qB>d_sb%h#9dR=AT8KNXu~(O5lr}t3bcjsv@-({X2dyd6 zLmTqyE8jhRdO2*ic$Z0Xdo+N)V zz&vJ^p1C-m)Z8HslJP_b^#Hg!qP5mnf~1uteSI!H+I%&ncRlUv)ENWsrw1c%Iqqxo zM1T8M!9NgMWBLpPFjtOL!9T~Cj}nJjk^Xl!jP`H1$O0J;DtIX$)0JnzRjlgQRhG4&1$^#fvWh;JvSV z^$zgi54-~oz>Dd8?8X%d7k93H*i7*7Wa>yNJjc^1(X(Inbjx(S!sHlc;LOz?dLyntnCd{bGst+t`=YOfBawIG6^E-aXlEIv1lSGr<>*UA4?pvc$;0p{aJbi=av?3nKeCY1$PrZf2P@*~S!J zHshiOmL2tm*6;#MfGhR7s69#lY~cf(ss?2CX5hB7xrOwFitmf|PGi{A2+05brUpBp z)~Jg*^zuDdJx`*gSb4Z0DxtAJ0nZkbwjn|y0^g5XdIQt2aJX8x=LNLAxcgKsj%;Z# zlE*zph$JeHd!7 zSGKFLk||OG1dqH;+HSiiCby;nUQnJt$N8tqqr=fM1(8jPpgKyW)avTJkzWG6c(;i@ z{Lct2c-_o9-&O+#z6%r&MK+y+&a_rT+Y|Nx!Tcq9r_s~ugM%7T{ux@aO8J_k3y`@5 z>$>s01c^!y`g#frD$fYJuh^ zy$m~<#9eiD0`gAfcA=5t&fVa~7^MnTP4G1s#QiZvfS(d%Q#Likr{slQPg#NV?ukeP zVdYAjCO`o9l?V)9zuh>oGp@O`H{mxR_i?0SOUwxt zU@~Ef1B)+sswuAe+T4OT`_b5+UW*z8MO~%6TOmt-PiW0AdX7DMCDIiS88eDeQOY|@ z98|H1yo=b~lxtb---2*tt%0LAU_Pk?jJF!`I#ZH?U@K~xCs8}D?aDE%k2#!G54h%q z%a|fpbpIiP0(MgK#m}(4x3|PHJ24<6LrzN%+=!9yO1cR4cN9|;`+O98a+GI@Q2mGO zMsd4MTTG5!(!&p*Ml~~-3ogl$xid$iW5-Tjmug>JDGx&5uiX#7S0~7X2RJwKn7=( z;n|(-?a&w}oA^5*Jc1?Qd-}l)0sz9#bIgOH>0#w87GjWykv`W{EC!~}<~9TB1mBYi z7dqkvLcx%M=uA+MY?m}foNT7%17;acFVKfGa>!k9IuJ0lyB&Gc0>IFgjC806q3VHk z^%}U@!xyc8oXZ!`iM5%`Ne)Mu(%JXKP=Lz?ySmA-BptpO|K%LQZ6HlI!%K;Pd|2KR z>Rgs;1s3pjrvE1RqWtuH2bQ_tTYSwXz}ec7Y~WU$M`kMlt^hy!xBJ4BWgd$)lW}b?xT$Ajd*XrTj{bd zWcQIBEek(q9q;Vi=tF&DVNp=#Jbdr!%+yw>_v|b6Es&V>92@lbJX9>N7H;ur<;AyS z>*Oo8?pP_XsenG53O>(>%&9~^ii~iLmW<|i)-GKIZF4$w+@S(`EL~CBx;Mwd)ereC zYuoIT6VnV?O(^_XkK!tbq=dDUvxVeualnL$K4``>AmA1cmSqkF5iHS*c&c~cirT!O z`%^lPc|&DSO0zfVdO*Wl&s{kA+Fee`h3I|rGV6M%0br44kiKo&EhAsSNooD9d1Cz) ztGPF-rtJQ8RKDUz)AckI{2+2V{F7k*jg#+J`(QH>g-?jzkrU?LIEriN5H6J|h_mC@ zO|6g}E?O$vRjWMsNdh!5v8qh+i_?<%M@t*{(mS9KwDXknW26VvF?r6nnz(dcIZ}tW zQz-cgbBn`-dF3QuW@&#`PLSCR?F&FTdJbRnKP#ur-rd4&UOA7BPP0B~{3lXQdlRB? z^~G>^+QsoCdf&rbL=T)W7Rr`S#hY0HKd{zL%g%oT^&-$@6nyjc2AXq zat6pxgP@&x%f36JhD2jSs+%~{6AaJ;f`R`YA(EWjcqMEopu%p}(%&DNB2&CX#5vA> zNVq1BcI&kvkwhC7J_md^!)$4Qqp*E&v~6n1V1mleI)7WX$z>i(Yl)M%}erGe86}%*pt&gg6GlI{ct(gq693H)S$|C?@uc$)OX}2o`XQekL^7% zN42!9d+qUc`MW?OKQ*_A%R+pm6$lc%I_qi$`tyoyx1u>*!nXC%nTCeVRIK^OvLHX* z&P3L$_h^b?n3eJh#L(}0Nyqp^?TF}F3--Rf=W%3)uC*6ENcNkZ9Ubof&;q=4hnzo9 zG<0P^`I5>LwiMexlpYzD2SYNOcb%;<=#)PY_4r9SOa>=1=7kTG#T%LbA6AhZt0}-{ zmP6U~2ot-{Ya}7Hc5jk=uvx!Jcl!8`a+e*SD*rqf97;w2>iy{E&%(>oJVSt^kb}aQ zKS&(rCijrs)W=QBNTy`O&OF)g&Mlo^Bf(^0t()NW4=%2D6Qy4&ev=uix$o`U_rTLW zThxF2v+&9&uJ8k$gT=>$oCKst^;eT6215Z+lm37VZlln+e8pdy*!5-k#pi}2*Q*^c z9XHMWrSj$Uk}YyxZKZ!2824XcV5)0_mrDt)pv~QkH*LyuQ z5h0r!Yyl->Z?AT^uo4R}O(VDrE_^m%EzQigv6)blfa(&cZBK!s59i;63G_35Saler;PRg+Q)YiWcMasnn{m09 zp>Z+OK?#(v%XZPe^z|9a`<8_W_6>vy@LQ8j)RrnzB~I(!rpz%s;qq|cp=gpfNb*z9 ztfMAl$Dd(0U#>8f5gxy+^$Xyc8bO=!sfni0L?K#vtmjqEAyotK%;sv(y>;PgT}!E< z8MjRr#DR(O`3P8;pTjrP0nI+{5G?Rt2m=QNzE*#TvYi5r6K+&(`>O%uE1sj8ab1v% zkeH$M>Mx|wfEe;{0f9RGh+drRQmVu&W+&W226~LzrSS$tRmU{y;UWQtlNaSwkXBC_ zqK|)SV)5nk7VuA2JKF@>oHxDC%4poWIph}hsP66cJ|iB=UF4f8hgA2=O}*A||B;qwIv1@~mff0c(tMwk!UE~)SxV@W z;->gHo-(nm-*y>Jkfb$!@Mr;OYa(wY+jZx#!tD1Td4yi>VulB0UVualbDP2D3<3=i z0N?tMYOgx5fx?ky#c(=9JvxpGDu1pU(YUyMkI&5!tdl-m+MpM$9oZ@?_XzaWSOtP+ zg=0vj+~-k0Q0qmE2yuZBZfry)DFF)L0cxOF=}RptCIllgXGfet=1kl9@G5jKSA+ zD}uHchGEvq_A6COY!)= zN*WY>i)QNtH&O7go)hHgq9BVJ`Ip*=s27To@i4jOOj$G3Tt)G;*4wJA6nzcA$%ZHE6IpdmAtkR!b1F9=kHXT)!Z2 zww?zRdnw-n)S7=D_X{8$K&V|7Ca`l4s3u=yA4yvn_bVXXR{<`}g$YDm0@di|>0;Ev txZeQjHoRft7ACN$n0XEV8;XgWU2-EM_2N!rka7cm@VlJs?%8;p{a+D^DN6tV diff --git a/src/qt/pivx/res/img/img-qr-test.png b/src/qt/pivx/res/img/img-qr-test.png index fd68875911e8802f736e735e880e4a3465c7f9d1..ccddd103f5924c4e00148b4a7ad8163c4c862c8d 100644 GIT binary patch literal 774 zcmeAS@N?(olHy`uVBq!ia0vp^3qY8I4M=vMPuB%fEX7WqAsj$Z!;#Vf4nJ zFmD85#;?t9J%NIfC9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NHH)lHG8@^ zhE&XXd-q`PBLfD9iz!=E13WIV8@Ku>2773vXtdbf;EQNn^CzR?eP6O`{Kunapa0hF z_ZRpX?BDQR%^`?MMU_b6Yx$Rk&o=#XMJpD|H&$-{{+!#xt6>QXE}|{pt>WnQ>({sF zc-!_m-`JKr{dvs#>o0%*uAZK5ThzfYJ$0s?o!zTUnM1qxvU?k7GENdwAdZmQr}}@Y zG4JbLee>Ae$FS-w#D<3efVf5sjFol6=;xF@|tC1HLNX`lXrdbA0S3j3^ HP6fyOgKA=l(X+2@x8C>zV9FI>%Okfb$vef%cWq7p9$6qtEZ=D zvTLUgO_v4#b6}A!)=&o@>*)cRyL`OpDUlk!Vvn_(G5Y$#Lfj0pIr?SPj+k*)L*}c> zm|aayuUXz#`^R;bn?a8%L2ZNHRWu0(%|O_zr1cvmp|^=&`dM z(jO3of*lR|mxB_G{RVyLTBZgIsAiTGvB6i(EHsjM78B?R#6&fqV3F9+!4BC}%g~43 zMWS#Qy;2$m2qnX#yjH(i{#3wc8^$P!g}Kui1ejJAgKtrb58S7|hJmBANbTE-7zlZE z4h}oo^$?VVH+e&WjEFlfS?;bC1CHiswg3420FPLOq9$hzQV3`K^j~#ub}aqO#P_E16^Ecag>l-USfN2x$&1F z`m?T7&ZJ-yy=OH!3+&WPNBQL*#7CHYbJvWKYN|RYarpU`ytb)=`&~=3SyA~zJRY}$ zC22s>eVlp-8AQUPfEr#xk5hG9Qki`57vtvcn;4G6@zXofiBdl@WO$Ei$##aUFRnq@ z*3kR`kBtIT!#QZy|IRu+8A~$w4&%p`n_QVdm|2Qj%2{fLd!U2I`_A(;Pse8d#Li@) zoOx1!Uy?WFywah*816YMUaVs1rv}Osew`qiF@I0$)b-Fuuy6MNO%kHZ*um^dRAavK zeCMGD1%vt7m(4kS8Ye7g&R7&@d@nxrc*r{?`9PukFA>Q7l2}LDGeaMFB?BkB7LK2e zzA7`{F(k|{XFeINdQM5HS+qPUrW{Z$U?UhKg>$La2HkPxYCU*_My{<|Td;b_7OU!V z%98T`v|0Y$pXH?%Mkw0%x-FL&ajFe11_DE_Q{xEAOv8$ZN3cx+TSi2Jt zIK?$Og#Fqp%zmCBRe$vf*Bd)gYMM92sQ=+4>v{gEVe!;$56%S?`~#y3f*fm?VDrF5 zElmxzxbs0oKEYQo(egr7+g1Q#RkqXaK6zd{PtSMfKhU;~Q8_YsPP%~x+3p!$yPEc9vt}c;A;0+3X5yPmx>>*C#FSwKx-nhh$$fp?pzT`$g3|^;3 z+)#arjb|K*Z^^VF@?KE@XO4q3eu~7FGf5jqNpXZihOvZ^OKB5#8VH=;|CQob*&DWb z1_rvu&gF<`s+w!B{d#pcJ=V&5nVua%4lqC;H~Z{AFyjBT2lEAci+XMIL3Wz<@X4}> zC7Fq9d`1epulKLTYEt?0q-2@g?T2gS*itfA24i+zPRH;cF4*zaf1#J{~y z8reoaMuyh&`InFWb9gN>vYimOH$4U)nCtEPSM%V@>m6k*EmF)PCd^sYF5AYkR(`M% zkdl!SeWbS-nIjfm z)JK(**N;;OzpawZEtTMN6z6GV$U4^rfnEDWA7@}kB&p)CP5M3{)*|(B+K9e)?$ss> zrAXV+H+4E%e9*LDbwS`abIH{D0f&0c94IkDudS;8E^iCM6WUuTJp+XH+4>h_O;lR@}{%?{CoJeEty}pYB9EIl!-L!!bbjON3k>=lu?Nbifv7BXK-={Z}*I$|b? z7O{0J^~l%8?`oj`Wmz2**Fk*NAr)>!CNI(Ii`6g&YJKv!4)@l|#6>41(H}%8qKgJt zaBz}aiExo}T23hnNbbO)qdyf!Hmhw4hG7lK&D10RT|)B5^jcwfh(0pu1vyoL!#}Mm zKi3-t&B0@UOY(yg) w9Ll(Rbay-C^DT?rp1>j6Sls`sn7N?mTG#TNdo+Qd`$_b6`BHqU;i&Wf0-Zh-!vFvP diff --git a/src/qt/pivx/res/img/img-qr.svg b/src/qt/pivx/res/img/img-qr.svg index 403a6657b..9395155da 100644 --- a/src/qt/pivx/res/img/img-qr.svg +++ b/src/qt/pivx/res/img/img-qr.svg @@ -1,325 +1,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + image/svg+xml + + + + + + + + + + + From 4df2629a53a666b73e9fcec1b7539562c0f26fb7 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 11 Oct 2024 20:07:42 +0100 Subject: [PATCH 23/39] Add Blockchain Status tab to the Tools Window => by techy2 --- src/qt/forms/rpcconsole.ui | 638 ++++++++++++++++++++++++++++++++++++- src/qt/rpcconsole.cpp | 117 +++++++ src/qt/rpcconsole.h | 16 +- src/rewards.cpp | 93 +++++- src/rewards.h | 25 ++ src/rpc/misc.cpp | 589 ++++++++++++++++------------------ 6 files changed, 1163 insertions(+), 315 deletions(-) diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 9887f8b39..3e5530e8c 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -7,7 +7,7 @@ 0 0 769 - 496 + 520 @@ -587,7 +587,7 @@ - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignRight|Qt::AlignVCenter @@ -667,7 +667,7 @@ - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignRight|Qt::AlignVCenter @@ -1624,6 +1624,638 @@ + + + &Blockchain Status + + + + + 60 + 20 + 181 + 17 + + + + + 75 + true + + + + Return on Investment + + + + + + 70 + 40 + 171 + 17 + + + + Staking ROI + + + + + + 70 + 60 + 171 + 17 + + + + Smooth Staking ROI + + + + + + 70 + 80 + 171 + 17 + + + + Staked Coins + + + + + + 70 + 110 + 171 + 17 + + + + Masternoding ROI + + + + + + 70 + 130 + 171 + 17 + + + + Masternoded Coins + + + + + + 60 + 170 + 181 + 17 + + + + + 75 + true + + + + Masternode Count + + + + + + 70 + 190 + 171 + 17 + + + + Total + + + + + + 70 + 210 + 171 + 17 + + + + Stable + + + + + + 70 + 230 + 171 + 17 + + + + Enabled + + + + + + 70 + 250 + 171 + 17 + + + + In Queue + + + + + + 70 + 270 + 171 + 17 + + + + ipV4 + + + + + + 70 + 290 + 171 + 17 + + + + ipV6 + + + + + + 70 + 310 + 171 + 17 + + + + Onion + + + + + + 260 + 40 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 60 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 80 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 110 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 130 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 190 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 210 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 230 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 250 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 270 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 290 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 310 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 60 + 350 + 181 + 17 + + + + + 75 + true + + + + My Masternodes + + + + + + 70 + 370 + 171 + 17 + + + + Total + + + + + + 70 + 390 + 171 + 17 + + + + Active + + + + + + 260 + 370 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 390 + 121 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 260 + 20 + 451 + 17 + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::AlignLeft|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 530 + 370 + 97 + 33 + + + + Refresh + + + diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 907f89835..d15b45cb7 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -14,6 +14,9 @@ #include "peertablemodel.h" #include "chainparams.h" +#include "masternodeman.h" +#include "masternodeconfig.h" +#include "masternode-sync.h" #include "netbase.h" #include "rpc/client.h" #include "rpc/server.h" @@ -37,6 +40,11 @@ #include #include +#include +#include +#include +#include + // TODO: add a scrollback limit, as there is currently none // TODO: make it possible to filter out categories (esp debug messages when implemented) // TODO: receive errors and debug messages through ClientModel @@ -286,6 +294,9 @@ RPCConsole::RPCConsole(QWidget* parent) : QDialog(parent, Qt::WindowSystemMenuHi connect(ui->btn_resync, &QPushButton::clicked, this, &RPCConsole::walletResync); connect(ui->btn_bootstrap, &QPushButton::clicked, this, &RPCConsole::walletBootstrap); + // Blockchain Status Refresh Button + connect(ui->btn_refresh, &QPushButton::clicked, this, &RPCConsole::updateBlockchainStats); + // set library version labels #ifdef ENABLE_WALLET std::string strPathCustom = GetArg("-backuppath", ""); @@ -769,6 +780,8 @@ void RPCConsole::on_tabWidget_currentChanged(int index) { if (ui->tabWidget->widget(index) == ui->tab_console) { ui->lineEdit->setFocus(); + } else if (ui->tabWidget->widget(index) == ui->tab_status) { + updateBlockchainStats(); } else if (ui->tabWidget->widget(index) != ui->tab_peers) { clearSelectedNode(); } @@ -846,6 +859,12 @@ void RPCConsole::showRepair() show(); } +void RPCConsole::showBlockchainStatus() +{ + ui->tabWidget->setCurrentIndex(5); + show(); +} + void RPCConsole::showConfEditor() { GUIUtil::openConfigfile(); @@ -1079,3 +1098,101 @@ void RPCConsole::showOrHideBanTableIfRequired() ui->banlistWidget->setVisible(visible); ui->banHeading->setVisible(visible); } + +void RPCConsole::setroi(CBlockchainStatus& cbs) +{ + ui->stkroi->setText(QString::fromStdString(strprintf("%4.2f%%", cbs.nSmoothStakingROI * 100))); + ui->ssroi->setText(QString::fromStdString(strprintf("%4.2f%%", cbs.nStakingROI * 100))); + ui->stkcoins->setText(QString::fromStdString(cbs.coin2prettyText((CAmount)(cbs.nSmoothStakedCoins/COIN)))); + const auto nMasternodingYearlyRewardsROI = cbs.nMNReward * cbs.nBlocksPerDay * 365 / cbs.nMNCoins; + ui->mnroi->setText(QString::fromStdString(strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); + ui->mncoins->setText(QString::fromStdString(cbs.coin2prettyText((CAmount)(cbs.nMNCoins/COIN)))); +} + +void RPCConsole::setchainmasternodes(CBlockchainStatus& cbs) +{ + int ipv4 = 0, ipv6 = 0, onion = 0; + int nCount = mnodeman.GetNextMasternodeInQueueCount(cbs.nHeight); + mnodeman.CountNetworks(ipv4, ipv6, onion); + int totalmn = mnodeman.size(); + int stablemn = mnodeman.stable_size(); + + ui->totalmn->setText(QString::number(totalmn)); + ui->stablemn->setText(QString::number(stablemn)); + ui->enabledmn->setText(QString::number(cbs.nMNEnabled)); + ui->inqmn->setText(QString::number(nCount)); + ui->ipv4mn->setText(QString::number(ipv4)); + ui->ipv6mn->setText(QString::number(ipv6)); + ui->onionmn->setText(QString::number(onion)); +} + +void RPCConsole::setmymasternodes() +{ + // Masternodes + int nMNCount = 0; + int nMNActive = 0; + bool isSynced = masternodeSync.IsSynced(); + + for (auto mne : masternodeConfig.getEntries()) { + nMNCount++; + + if (isSynced) { + int nIndex; + if (!mne.castOutputIndex(nIndex)) + continue; + + uint256 txHash(mne.getTxHash()); + CTxIn txIn(txHash, uint32_t(nIndex)); + auto pmn = mnodeman.Find(txIn); + + if (!pmn) continue; + + int activeState = pmn->activeState; + + if (activeState == CMasternode::MASTERNODE_PRE_ENABLED || activeState == CMasternode::MASTERNODE_ENABLED) { + nMNActive++; + } + } + } + + QString sMNActive = isSynced ? std::to_string(nMNActive).c_str() : "--"; + + ui->mytotalmn->setText(sMNActive); + ui->myactivemn->setText(QString::number(nMNCount)); +} + +void RPCConsole::setbstamp() +{ + QDateTime timestamp = QDateTime::currentDateTime(); + QString timestring = timestamp.toString(); + ui->bststamp->setText(timestring); +} + +// color text helper +void applyColor2Text(QLabel * label, QColor color) +{ + QPalette palette = label->palette(); + palette.setColor(QPalette::WindowText, color); + label->setPalette(palette); +} + +void RPCConsole::updateBlockchainStats() +{ + CBlockchainStatus cbs; + int cbserror = cbs.getblockchainstatus(); + if (cbserror > 0) { + applyColor2Text(ui->bststamp, Qt::red); + ui->bststamp->setText(QStringLiteral("Try again after the active chain is loaded")); + return; + } else + if (cbserror < 0) { + applyColor2Text(ui->bststamp, Qt::red); + ui->bststamp->setText(QStringLiteral("Try again after the chain is fully synced")); + return; + } + setroi(cbs); + setchainmasternodes(cbs); + setmymasternodes(); + applyColor2Text(ui->bststamp, Qt::black); + setbstamp(); +} diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 115923081..d335a1d3a 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -7,6 +7,7 @@ #ifndef BITCOIN_QT_RPCCONSOLE_H #define BITCOIN_QT_RPCCONSOLE_H +#include "rewards.h" #include "guiutil.h" #include "peertablemodel.h" @@ -84,6 +85,9 @@ public Q_SLOTS: void walletResync(); void walletBootstrap(); + /** update blockchainstats */ + void updateBlockchainStats(); + void reject(); void message(int category, const QString &msg) { message(category, msg, false); } void message(int category, const QString &message, bool html); @@ -107,7 +111,9 @@ public Q_SLOTS: void showPeers(); /** Switch to wallet-repair tab and show */ void showRepair(); - /** Open external (default) editor with __decenomy__.conf */ + /** Switch to blockchain status tab and show */ + void showBlockchainStatus(); + /** Open external (default) editor with kyanite.conf */ void showConfEditor(); /** Open external (default) editor with masternode.conf */ void showMNConfEditor(); @@ -139,6 +145,14 @@ public Q_SLOTS: void buildParameterlist(QString arg); /** show detailed information on ui about selected node */ void updateNodeDetail(const CNodeCombinedStats* stats); + /** show detailed blockchain ROI statistics */ + void setroi(CBlockchainStatus& cbs); + /** show blockchain masternode count numbers */ + void setchainmasternodes(CBlockchainStatus& cbs); + /** show my masternode status */ + void setmymasternodes(); + /** show the timestamp when the status snapshot was taken */ + void setbstamp(); enum ColumnWidths { ADDRESS_COLUMN_WIDTH = 170, diff --git a/src/rewards.cpp b/src/rewards.cpp index e548b003b..2c6931a1b 100644 --- a/src/rewards.cpp +++ b/src/rewards.cpp @@ -6,7 +6,9 @@ #include "fs.h" #include "logging.h" +#include "main.h" #include "masternode.h" +#include "masternodeman.h" #include "masternode-sync.h" #include "rewards.h" #include "sqlite3/sqlite3.h" @@ -439,4 +441,93 @@ CAmount CRewards::GetBlockValue(int nHeight) // fallback non-dynamic reward return return nSubsidy; -} \ No newline at end of file +} + +// returns = 1 if !pwalletMain, -1 if RPC_IN_WARMUP, 0 if all is good +int +CBlockchainStatus::getblockchainstatus() +{ + if (!pwalletMain) { + return 1; + } else + if (!masternodeSync.IsSynced()) { + return -1; + } + + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + + const auto pTip = chainActive.Tip(); + nHeight = pTip->nHeight; + + // Fetch consensus parameters + const auto nTargetSpacing = consensus.nTargetSpacing; + const auto nTargetTimespan = consensus.TargetTimespan(nHeight); + const auto nTimeSlotLength = consensus.TimeSlotLength(nHeight); + + // Fetch reward details + nMoneySupplyThisBlock = pTip->nMoneySupply.get(); + nBlockValue = CRewards::GetBlockValue(nHeight); + nMNReward = CMasternode::GetMasternodePayment(nHeight); + nStakeReward = nBlockValue - nMNReward; + + nBlocksPerDay = DAY_IN_SECONDS / nTargetSpacing; + CBlockIndex* BlockReading = pTip; + + if(nHeight > nBlocksPerDay) { + for (unsigned int i = 0; BlockReading && BlockReading->nHeight > 0; i++) { + if(BlockReading->nTime < (pTip->nTime - DAY_IN_SECONDS)) { + nBlocksPerDay = i; + break; + } + + BlockReading = BlockReading->pprev; + } + } + + // Fetch the network generated hashes per second + const auto nBlocks = static_cast(nTargetTimespan / nTargetSpacing); + const auto startBlock = chainActive[nHeight - std::min(nBlocks, nHeight)]; + const auto endBlock = pTip; + const auto nTimeDiff = endBlock->GetBlockTime() - startBlock->GetBlockTime(); + const auto nWorkDiff = endBlock->nChainWork - startBlock->nChainWork; + nNetworkHashPS = static_cast(nWorkDiff.getdouble() / nTimeDiff); + + const auto nSmoothBlocks = static_cast((3 * HOUR_IN_SECONDS) / nTargetSpacing); + const auto startSmoothBlock = chainActive[nHeight - std::min(nSmoothBlocks, nHeight)]; + const auto nSmoothTimeDiff = endBlock->GetBlockTime() - startSmoothBlock->GetBlockTime(); + const auto nSmoothWorkDiff = endBlock->nChainWork - startSmoothBlock->nChainWork; + nSmoothNetworkHashPS = static_cast(nSmoothWorkDiff.getdouble() / nSmoothTimeDiff); + + // Calculate how many coins are allocated in the entire staking algorithm + nStakedCoins = static_cast(nNetworkHashPS * nTimeSlotLength * 100); + nSmoothStakedCoins = static_cast(nSmoothNetworkHashPS * nTimeSlotLength * 100); + const auto nYearlyStakingRewards = nStakeReward * nBlocksPerDay * 365; + nStakingROI = nYearlyStakingRewards / nStakedCoins; + nSmoothStakingROI = nYearlyStakingRewards / nSmoothStakedCoins; + + // Fetch the masternode related data + nMNCollateral = CMasternode::GetMasternodeNodeCollateral(nHeight); + nMNNextWeekCollateral = CMasternode::GetNextWeekMasternodeCollateral(); + nMNEnabled = mnodeman.CountEnabled(); + nMNCoins = nMNCollateral * nMNEnabled; + + return 0; +} + +std::string +CBlockchainStatus::coin2prettyText(CAmount koin) +{ + std::string s = strprintf("%" PRId64, (int64_t)koin); + int j = 0; + std::string k; + + for (int i = s.size() - 1; i >= 0;) { + k.push_back(s[i]); + j++; + i--; + if (j % 3 == 0 && i >= 0) k.push_back(','); + } + reverse(k.begin(), k.end()); + return k; +}; diff --git a/src/rewards.h b/src/rewards.h index f8ae3ef8d..6a9234c5b 100644 --- a/src/rewards.h +++ b/src/rewards.h @@ -9,6 +9,31 @@ #include "main.h" +class CBlockchainStatus +{ +public: + int nHeight; + CAmount nMoneySupplyThisBlock; + CAmount nMNReward; + CAmount nStakeReward; + int64_t nBlocksPerDay; + int64_t nNetworkHashPS; + int64_t nSmoothNetworkHashPS; + double nStakedCoins; + double nSmoothStakedCoins; + double nStakingROI; + double nSmoothStakingROI; + CAmount nBlockValue; + CAmount nMNCollateral; + CAmount nMNNextWeekCollateral; + int nMNEnabled; + double nMNCoins; + +// returns 1 if !pwalletMain, -1 if RPC_IN_WARMUP, 0 if all is good + int getblockchainstatus(); + std::string coin2prettyText(CAmount koin); +}; + class CRewards { private: diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index a414605fe..74ac4f190 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -735,7 +735,7 @@ UniValue getstakingstatus(const JSONRPCRequest& request) UniValue getrewardsinfo(const JSONRPCRequest& request) { - std::string info_type = "both"; // Default value + std::string info_type = "all"; // Default value if (request.fHelp || (request.params.size() > 1 || (request.params.size() == 1 && !request.params[0].isStr()))) { throw std::runtime_error( @@ -743,7 +743,7 @@ UniValue getrewardsinfo(const JSONRPCRequest& request) "\nReturns an object containing ROI information.\n" "\nArguments:\n" - "1. \"info_type\" (string, optional, default=\"both\") The type of info to display (\"network\", \"wallet\", or \"both\")\n" + "1. \"info_type\" (string, optional, default=\"all\") The type of info to display (\"network\", \"wallet\", \"simple\", or \"all\")\n" "\nResult:\n" "{\n" @@ -839,352 +839,321 @@ UniValue getrewardsinfo(const JSONRPCRequest& request) if (request.params.size() == 1) { info_type = request.params[0].get_str(); - if (info_type != "network" && info_type != "wallet" && info_type != "both") { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid info_type parameter, must be \"network\", \"wallet\", or \"both\""); + if (info_type != "network" && info_type != "wallet" && info_type != "simple" && info_type != "all") { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid info_type parameter, must be \"network\", \"wallet\", \"simple\", or \"all\""); } } - if (pwalletMain) { - if (!masternodeSync.IsSynced()) { - throw JSONRPCError(RPC_IN_WARMUP, "Try again after the chain is fully synced"); - } + CBlockchainStatus cbs; + int cbserror = cbs.getblockchainstatus(); + if (cbserror > 0) { + throw JSONRPCError(RPC_IN_WARMUP, "Try again after the active chain is loaded"); + } else + if (cbserror < 0) { + throw JSONRPCError(RPC_IN_WARMUP, "Try again after the chain is fully synced"); + } + int64_t nBlocksPerWeek = cbs.nBlocksPerDay * 7; + int64_t nBlocksPerMonth = cbs.nBlocksPerDay * 30; + int64_t nBlocksPerYear = cbs.nBlocksPerDay * 365; + + const auto nStakingAllocation = static_cast(cbs.nSmoothStakedCoins) / cbs.nMoneySupplyThisBlock; + const auto nYearlyStakingRewards = cbs.nStakeReward * nBlocksPerYear; + const auto nMNAllocation = static_cast(cbs.nMNCoins) / cbs.nMoneySupplyThisBlock; + + const auto nTotalAllocationCoins = cbs.nSmoothStakedCoins + cbs.nMNCoins; + const auto nTotalAllocation = nStakingAllocation + nMNAllocation; + + const auto nYearlyMNRewards = cbs.nMNReward * nBlocksPerYear; + const auto nMasternodingRewards = static_cast((cbs.nMNReward * nBlocksPerYear) / cbs.nMNEnabled); + const auto nDailyMasternodingRewards = nMasternodingRewards / 365; + + const auto fStakingActive = pwalletMain->pStakerStatus->IsActive(); + const auto nStakedBalance = + pwalletMain->mapWallet.empty() ? + 0 : + fStakingActive ? + pwalletMain->pStakerStatus->GetLastValue() : + pwalletMain->GetStakingBalance(); + const auto nStakeShare = static_cast(nStakedBalance) / cbs.nSmoothStakedCoins; - const auto& params = Params(); - const auto& consensus = params.GetConsensus(); - - const auto tip = chainActive.Tip(); - const auto nHeight = tip->nHeight; - - // Fetch consensus parameters - const auto nTargetSpacing = consensus.nTargetSpacing; - const auto nTargetTimespan = consensus.TargetTimespan(nHeight); - const auto nTimeSlotLength = consensus.TimeSlotLength(nHeight); - - // Fetch reward details - const auto nBlockValue = CRewards::GetBlockValue(nHeight); - const auto nMNReward = CMasternode::GetMasternodePayment(nHeight); - const auto nStakeReward = nBlockValue - nMNReward; - - const auto nBlocksPerDay = DAY_IN_SECONDS / nTargetSpacing; - const auto nBlocksPerWeek = WEEK_IN_SECONDS / nTargetSpacing; - const auto nBlocksPerMonth = MONTH_IN_SECONDS / nTargetSpacing; - const auto nBlocksPerYear = YEAR_IN_SECONDS / nTargetSpacing; - - // Fetch the network generated hashes per second - const auto nBlocks = static_cast(nTargetTimespan / nTargetSpacing); - const auto startBlock = chainActive[nHeight - std::min(nBlocks, nHeight)]; - const auto endBlock = tip; - const auto nTimeDiff = endBlock->GetBlockTime() - startBlock->GetBlockTime(); - const auto nWorkDiff = endBlock->nChainWork - startBlock->nChainWork; - const auto nNetworkHashPS = static_cast(nWorkDiff.getdouble() / nTimeDiff); - - const auto nSmoothBlocks = static_cast((3 * HOUR_IN_SECONDS) / nTargetSpacing); - const auto startSmoothBlock = chainActive[nHeight - std::min(nSmoothBlocks, nHeight)]; - const auto nSmoothTimeDiff = endBlock->GetBlockTime() - startSmoothBlock->GetBlockTime(); - const auto nSmoothWorkDiff = endBlock->nChainWork - startSmoothBlock->nChainWork; - const auto nSmoothNetworkHashPS = static_cast(nSmoothWorkDiff.getdouble() / nSmoothTimeDiff); - - // Calculate how many coins are allocated in the entire staking algorithm - const auto nStakedCoins = static_cast(nNetworkHashPS * nTimeSlotLength * 100); - const auto nSmoothStakedCoins = static_cast(nSmoothNetworkHashPS * nTimeSlotLength * 100); - const auto nStakingAllocation = static_cast(nSmoothStakedCoins) / tip->nMoneySupply.get(); - const auto nYearlyStakingRewards = nStakeReward * nBlocksPerYear; - auto nStakingROI = nYearlyStakingRewards / nStakedCoins; - auto nSmoothStakingROI = nYearlyStakingRewards / nSmoothStakedCoins; - - // Fetch the masternode related data - const auto nMNCollateral = CMasternode::GetMasternodeNodeCollateral(nHeight); - const auto nMNNextWeekCollateral = CMasternode::GetNextWeekMasternodeCollateral(); - const auto nMNEnabled = mnodeman.CountEnabled(); - const auto nMNCoins = nMNCollateral * nMNEnabled; - const auto nMNAllocation = static_cast(nMNCoins) / tip->nMoneySupply.get(); - - const auto nTotalAllocationCoins = nSmoothStakedCoins + nMNCoins; - const auto nTotalAllocation = nStakingAllocation + nMNAllocation; - - const auto nYearlyMNRewards = nMNReward * nBlocksPerYear; - const auto nMasternodingRewards = static_cast((nMNReward * nBlocksPerYear) / nMNEnabled); - const auto nDailyMasternodingRewards = nMasternodingRewards / 365; - - const auto fStakingActive = pwalletMain->pStakerStatus->IsActive(); - const auto nStakedBalance = - pwalletMain->mapWallet.empty() ? - 0 : - fStakingActive ? - pwalletMain->pStakerStatus->GetLastValue() : - pwalletMain->GetStakingBalance(); - const auto nStakeShare = static_cast(nStakedBalance) / nSmoothStakedCoins; + UniValue obj(UniValue::VOBJ); - UniValue obj(UniValue::VOBJ); + if (info_type == "simple") { + + const auto nMasternodingYearlyRewardsROI = (cbs.nMNReward * nBlocksPerYear) / cbs.nMNCoins; + + obj.push_back(Pair("staking_roi", strprintf("%4.2f%%", cbs.nStakingROI * 100))); + obj.push_back(Pair("smooth_staking_roi", strprintf("%4.2f%%", cbs.nSmoothStakingROI * 100))); + obj.push_back(Pair("staked_coins", ValueFromAmount(cbs.nSmoothStakedCoins))); + obj.push_back(Pair("masternoding_roi", strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); + obj.push_back(Pair("masternoded_coins", ValueFromAmount(cbs.nMNCoins))); + obj.push_back(Pair("enabled_masternodes", cbs.nMNEnabled)); + obj.push_back(Pair("blocks_per_day", cbs.nBlocksPerDay)); + + } else if (info_type == "network" || info_type == "all") { + + UniValue networkObj(UniValue::VOBJ); + + networkObj.push_back(Pair("reward", ValueFromAmount(cbs.nBlockValue))); + networkObj.push_back(Pair("allocated_coins", ValueFromAmount(nTotalAllocationCoins))); + networkObj.push_back(Pair("allocation", strprintf("%4.2f%%", nTotalAllocation * 100))); + + UniValue blocksObj(UniValue::VOBJ); + blocksObj.push_back(Pair("day", cbs.nBlocksPerDay)); + blocksObj.push_back(Pair("week", nBlocksPerWeek)); + blocksObj.push_back(Pair("month", nBlocksPerMonth)); + blocksObj.push_back(Pair("year", nBlocksPerYear)); + networkObj.push_back(Pair("blocks", blocksObj)); + + UniValue stakingObj(UniValue::VOBJ); + + stakingObj.push_back(Pair("reward", ValueFromAmount(cbs.nStakeReward))); + + UniValue hashRateObj(UniValue::VOBJ); + hashRateObj.push_back(Pair("networkhashps", GetReadableHashRate(cbs.nNetworkHashPS))); + hashRateObj.push_back(Pair("allocated_coins", ValueFromAmount(cbs.nStakedCoins))); + hashRateObj.push_back(Pair("roi", strprintf("%4.2f%%", cbs.nStakingROI * 100))); + stakingObj.push_back(Pair("hashrate", hashRateObj)); + + UniValue smoothHashRateObj(UniValue::VOBJ); + smoothHashRateObj.push_back(Pair("networkhashps", GetReadableHashRate(cbs.nSmoothNetworkHashPS))); + smoothHashRateObj.push_back(Pair("allocated_coins", ValueFromAmount(cbs.nSmoothStakedCoins))); + smoothHashRateObj.push_back(Pair("roi", strprintf("%4.2f%%", cbs.nSmoothStakingROI * 100))); + stakingObj.push_back(Pair("smooth_hashrate", smoothHashRateObj)); + + stakingObj.push_back(Pair("allocation", strprintf("%4.2f%%", nStakingAllocation * 100))); + + { + // Calculate all data for the wallet's staking ROI + UniValue stakingRegularObj(UniValue::VOBJ); + + const auto nStakingRewards = nYearlyStakingRewards; + const auto nStakingDailyRewards = nStakingRewards / 365; + const auto nStakingWeeklyRewards = nStakingDailyRewards * 7; + const auto nStakingMonthlyRewards = nStakingDailyRewards * 30; + const auto nStakingYearlyRewards = nStakingRewards; + + const auto nStakingDailyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nStakingDailyRewards / cbs.nSmoothStakedCoins; + const auto nStakingWeeklyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nStakingWeeklyRewards / cbs.nSmoothStakedCoins; + const auto nStakingMonthlyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nStakingMonthlyRewards / cbs.nSmoothStakedCoins; + const auto nStakingYearlyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nStakingYearlyRewards / cbs.nSmoothStakedCoins; + + stakingRegularObj.push_back(Pair("daily", ValueFromAmount(nStakingDailyRewards))); + stakingRegularObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nStakingDailyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("weekly", ValueFromAmount(nStakingWeeklyRewards))); + stakingRegularObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nStakingWeeklyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("monthly", ValueFromAmount(nStakingMonthlyRewards))); + stakingRegularObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nStakingMonthlyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("yearly", ValueFromAmount(nStakingYearlyRewards))); + stakingRegularObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nStakingYearlyRewardsROI * 100))); + + stakingObj.push_back(Pair("regular", stakingRegularObj)); - if (info_type == "network" || info_type == "both") { - UniValue networkObj(UniValue::VOBJ); + { + // Compounding calculations + UniValue stakingCompoundObj(UniValue::VOBJ); - networkObj.push_back(Pair("reward", ValueFromAmount(nBlockValue))); - networkObj.push_back(Pair("allocated_coins", ValueFromAmount(nTotalAllocationCoins))); - networkObj.push_back(Pair("allocation", strprintf("%4.2f%%", nTotalAllocation * 100))); + auto nStakingBalanceAccumulator = static_cast(cbs.nSmoothStakedCoins); - UniValue blocksObj(UniValue::VOBJ); - blocksObj.push_back(Pair("day", nBlocksPerDay)); - blocksObj.push_back(Pair("week", nBlocksPerWeek)); - blocksObj.push_back(Pair("month", nBlocksPerMonth)); - blocksObj.push_back(Pair("year", nBlocksPerYear)); - networkObj.push_back(Pair("blocks", blocksObj)); + for (int i = 1; i <= 365; i++) { + nStakingBalanceAccumulator += ((nStakingBalanceAccumulator * cbs.nSmoothStakingROI) / 365); - UniValue stakingObj(UniValue::VOBJ); + if (i == 1) { // After a day + const auto nCompoundStakingDailyRewards = nStakingBalanceAccumulator - cbs.nSmoothStakedCoins; + const auto nCompoundStakingDailyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nCompoundStakingDailyRewards / cbs.nSmoothStakedCoins; - stakingObj.push_back(Pair("reward", ValueFromAmount(nStakeReward))); + stakingCompoundObj.push_back(Pair("daily", ValueFromAmount(nCompoundStakingDailyRewards))); + stakingCompoundObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nCompoundStakingDailyRewardsROI * 100))); + } - UniValue hashRateObj(UniValue::VOBJ); - hashRateObj.push_back(Pair("networkhashps", GetReadableHashRate(nNetworkHashPS))); - hashRateObj.push_back(Pair("allocated_coins", ValueFromAmount(nStakedCoins))); - hashRateObj.push_back(Pair("roi", strprintf("%4.2f%%", nStakingROI * 100))); - stakingObj.push_back(Pair("hashrate", hashRateObj)); + if (i == 7) { // After a week + const auto nCompoundStakingWeeklyRewards = nStakingBalanceAccumulator - cbs.nSmoothStakedCoins; + const auto nCompoundStakingWeeklyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nCompoundStakingWeeklyRewards / cbs.nSmoothStakedCoins; - UniValue smoothHashRateObj(UniValue::VOBJ); - smoothHashRateObj.push_back(Pair("networkhashps", GetReadableHashRate(nSmoothNetworkHashPS))); - smoothHashRateObj.push_back(Pair("allocated_coins", ValueFromAmount(nSmoothStakedCoins))); - smoothHashRateObj.push_back(Pair("roi", strprintf("%4.2f%%", nSmoothStakingROI * 100))); - stakingObj.push_back(Pair("smooth_hashrate", smoothHashRateObj)); + stakingCompoundObj.push_back(Pair("weekly", ValueFromAmount(nCompoundStakingWeeklyRewards))); + stakingCompoundObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nCompoundStakingWeeklyRewardsROI * 100))); + } - stakingObj.push_back(Pair("allocation", strprintf("%4.2f%%", nStakingAllocation * 100))); + if (i == 30) { // After a month + const auto nCompoundStakingMonthlyRewards = nStakingBalanceAccumulator - cbs.nSmoothStakedCoins; + const auto nCompoundStakingMonthlyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nCompoundStakingMonthlyRewards / cbs.nSmoothStakedCoins; - { - // Calculate all data for the wallet's staking ROI - UniValue stakingRegularObj(UniValue::VOBJ); - - const auto nStakingRewards = nYearlyStakingRewards; - const auto nStakingDailyRewards = nStakingRewards / 365; - const auto nStakingWeeklyRewards = nStakingDailyRewards * 7; - const auto nStakingMonthlyRewards = nStakingDailyRewards * 30; - const auto nStakingYearlyRewards = nStakingRewards; - - const auto nStakingDailyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nStakingDailyRewards / nSmoothStakedCoins; - const auto nStakingWeeklyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nStakingWeeklyRewards / nSmoothStakedCoins; - const auto nStakingMonthlyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nStakingMonthlyRewards / nSmoothStakedCoins; - const auto nStakingYearlyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nStakingYearlyRewards / nSmoothStakedCoins; - - stakingRegularObj.push_back(Pair("daily", ValueFromAmount(nStakingDailyRewards))); - stakingRegularObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nStakingDailyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("weekly", ValueFromAmount(nStakingWeeklyRewards))); - stakingRegularObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nStakingWeeklyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("monthly", ValueFromAmount(nStakingMonthlyRewards))); - stakingRegularObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nStakingMonthlyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("yearly", ValueFromAmount(nStakingYearlyRewards))); - stakingRegularObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nStakingYearlyRewardsROI * 100))); - - stakingObj.push_back(Pair("regular", stakingRegularObj)); - - { - // Compounding calculations - UniValue stakingCompoundObj(UniValue::VOBJ); - - auto nStakingBalanceAccumulator = static_cast(nSmoothStakedCoins); - - for (int i = 1; i <= 365; i++) { - nStakingBalanceAccumulator += ((nStakingBalanceAccumulator * nSmoothStakingROI) / 365); - - if (i == 1) { // After a day - const auto nCompoundStakingDailyRewards = nStakingBalanceAccumulator - nSmoothStakedCoins; - const auto nCompoundStakingDailyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nCompoundStakingDailyRewards / nSmoothStakedCoins; - - stakingCompoundObj.push_back(Pair("daily", ValueFromAmount(nCompoundStakingDailyRewards))); - stakingCompoundObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nCompoundStakingDailyRewardsROI * 100))); - } - - if (i == 7) { // After a week - const auto nCompoundStakingWeeklyRewards = nStakingBalanceAccumulator - nSmoothStakedCoins; - const auto nCompoundStakingWeeklyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nCompoundStakingWeeklyRewards / nSmoothStakedCoins; - - stakingCompoundObj.push_back(Pair("weekly", ValueFromAmount(nCompoundStakingWeeklyRewards))); - stakingCompoundObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nCompoundStakingWeeklyRewardsROI * 100))); - } - - if (i == 30) { // After a month - const auto nCompoundStakingMonthlyRewards = nStakingBalanceAccumulator - nSmoothStakedCoins; - const auto nCompoundStakingMonthlyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nCompoundStakingMonthlyRewards / nSmoothStakedCoins; - - stakingCompoundObj.push_back(Pair("monthly", ValueFromAmount(nCompoundStakingMonthlyRewards))); - stakingCompoundObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nCompoundStakingMonthlyRewardsROI * 100))); - } - - if (i == 365) { // After a year - const auto nCompoundStakingYearlyRewards = nStakingBalanceAccumulator - nSmoothStakedCoins; - const auto nCompoundStakingYearlyRewardsROI = nSmoothStakedCoins == 0 ? 0 : nCompoundStakingYearlyRewards / nSmoothStakedCoins; - - stakingCompoundObj.push_back(Pair("yearly", ValueFromAmount(nCompoundStakingYearlyRewards))); - stakingCompoundObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nCompoundStakingYearlyRewardsROI * 100))); - } + stakingCompoundObj.push_back(Pair("monthly", ValueFromAmount(nCompoundStakingMonthlyRewards))); + stakingCompoundObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nCompoundStakingMonthlyRewardsROI * 100))); } - stakingObj.push_back(Pair("compound", stakingCompoundObj)); + if (i == 365) { // After a year + const auto nCompoundStakingYearlyRewards = nStakingBalanceAccumulator - cbs.nSmoothStakedCoins; + const auto nCompoundStakingYearlyRewardsROI = cbs.nSmoothStakedCoins == 0 ? 0 : nCompoundStakingYearlyRewards / cbs.nSmoothStakedCoins; + + stakingCompoundObj.push_back(Pair("yearly", ValueFromAmount(nCompoundStakingYearlyRewards))); + stakingCompoundObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nCompoundStakingYearlyRewardsROI * 100))); + } } + + stakingObj.push_back(Pair("compound", stakingCompoundObj)); } + } + + networkObj.push_back(Pair("staking", stakingObj)); + + { + UniValue masternodingObj(UniValue::VOBJ); + + masternodingObj.push_back(Pair("reward", ValueFromAmount(cbs.nMNReward))); + masternodingObj.push_back(Pair("collateral", ValueFromAmount(cbs.nMNCollateral))); + masternodingObj.push_back(Pair("nextweek_collateral", ValueFromAmount(cbs.nMNNextWeekCollateral))); + masternodingObj.push_back(Pair("enabled_masternodes", cbs.nMNEnabled)); + masternodingObj.push_back(Pair("allocated_coins", ValueFromAmount(cbs.nMNCoins))); + masternodingObj.push_back(Pair("allocation", strprintf("%4.2f%%", nMNAllocation * 100))); + + const auto nMasternodingDailyRewards = nDailyMasternodingRewards * cbs.nMNEnabled; + const auto nMasternodingWeeklyRewards = nMasternodingDailyRewards * 7; + const auto nMasternodingMonthlyRewards = nMasternodingDailyRewards * 30; + const auto nMasternodingYearlyRewards = nMasternodingRewards * cbs.nMNEnabled; + + const auto nMasternodingDailyRewardsROI = nMasternodingDailyRewards / cbs.nMNCoins; + const auto nMasternodingWeeklyRewardsROI = nMasternodingWeeklyRewards / cbs.nMNCoins; + const auto nMasternodingMonthlyRewardsROI = nMasternodingMonthlyRewards / cbs.nMNCoins; + const auto nMasternodingYearlyRewardsROI = nMasternodingYearlyRewards / cbs.nMNCoins; + + masternodingObj.push_back(Pair("daily", ValueFromAmount(nMasternodingDailyRewards))); + masternodingObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nMasternodingDailyRewardsROI * 100))); + masternodingObj.push_back(Pair("weekly", ValueFromAmount(nMasternodingWeeklyRewards))); + masternodingObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nMasternodingWeeklyRewardsROI * 100))); + masternodingObj.push_back(Pair("monthly", ValueFromAmount(nMasternodingMonthlyRewards))); + masternodingObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nMasternodingMonthlyRewardsROI * 100))); + masternodingObj.push_back(Pair("yearly", ValueFromAmount(nMasternodingYearlyRewards))); + masternodingObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); + + networkObj.push_back(Pair("masternoding", masternodingObj)); + } + + obj.push_back(Pair("network", networkObj)); + } - networkObj.push_back(Pair("staking", stakingObj)); + if (info_type == "wallet" || info_type == "all") { + UniValue walletObj(UniValue::VOBJ); + + UniValue walletStakingObj(UniValue::VOBJ); + + walletStakingObj.push_back(Pair("status", fStakingActive)); + walletStakingObj.push_back(Pair("tries", pwalletMain->pStakerStatus->GetLastTries())); + walletStakingObj.push_back(Pair("allocated_coins", ValueFromAmount(nStakedBalance))); + walletStakingObj.push_back(Pair("share", strprintf("%4.2f%%", nStakeShare * 100))); + walletStakingObj.push_back(Pair("stakesplitthreshold", ValueFromAmount(pwalletMain->nStakeSplitThreshold))); + walletStakingObj.push_back(Pair("autocombinethreshold", ValueFromAmount(pwalletMain->fCombineDust ? pwalletMain->nAutoCombineThreshold : 0))); + + { + // Calculate all data for the wallet's staking ROI + UniValue stakingRegularObj(UniValue::VOBJ); + const auto nStakingRewards = nStakedBalance * cbs.nSmoothStakingROI; + const auto nStakingDailyRewards = nStakingRewards / 365; + const auto nStakingWeeklyRewards = nStakingDailyRewards * 7; + const auto nStakingMonthlyRewards = nStakingDailyRewards * 30; + const auto nStakingYearlyRewards = nStakingRewards; + + const auto nStakingDailyRewardsROI = nStakedBalance == 0 ? 0 : nStakingDailyRewards / nStakedBalance; + const auto nStakingWeeklyRewardsROI = nStakedBalance == 0 ? 0 : nStakingWeeklyRewards / nStakedBalance; + const auto nStakingMonthlyRewardsROI = nStakedBalance == 0 ? 0 : nStakingMonthlyRewards / nStakedBalance; + const auto nStakingYearlyRewardsROI = nStakedBalance == 0 ? 0 : nStakingYearlyRewards / nStakedBalance; + + stakingRegularObj.push_back(Pair("daily", ValueFromAmount(nStakingDailyRewards))); + stakingRegularObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nStakingDailyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("weekly", ValueFromAmount(nStakingWeeklyRewards))); + stakingRegularObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nStakingWeeklyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("monthly", ValueFromAmount(nStakingMonthlyRewards))); + stakingRegularObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nStakingMonthlyRewardsROI * 100))); + stakingRegularObj.push_back(Pair("yearly", ValueFromAmount(nStakingYearlyRewards))); + stakingRegularObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nStakingYearlyRewardsROI * 100))); + + walletStakingObj.push_back(Pair("regular", stakingRegularObj)); { - UniValue masternodingObj(UniValue::VOBJ); - - masternodingObj.push_back(Pair("reward", ValueFromAmount(nMNReward))); - masternodingObj.push_back(Pair("collateral", ValueFromAmount(nMNCollateral))); - masternodingObj.push_back(Pair("nextweek_collateral", ValueFromAmount(nMNNextWeekCollateral))); - masternodingObj.push_back(Pair("enabled_masternodes", nMNEnabled)); - masternodingObj.push_back(Pair("allocated_coins", ValueFromAmount(nMNCoins))); - masternodingObj.push_back(Pair("allocation", strprintf("%4.2f%%", nMNAllocation * 100))); - - const auto nMasternodingDailyRewards = nDailyMasternodingRewards * nMNEnabled; - const auto nMasternodingWeeklyRewards = nMasternodingDailyRewards * 7; - const auto nMasternodingMonthlyRewards = nMasternodingDailyRewards * 30; - const auto nMasternodingYearlyRewards = nMasternodingRewards * nMNEnabled; - - const auto nMasternodingDailyRewardsROI = nMasternodingDailyRewards / nMNCoins; - const auto nMasternodingWeeklyRewardsROI = nMasternodingWeeklyRewards / nMNCoins; - const auto nMasternodingMonthlyRewardsROI = nMasternodingMonthlyRewards / nMNCoins; - const auto nMasternodingYearlyRewardsROI = nMasternodingYearlyRewards / nMNCoins; - - masternodingObj.push_back(Pair("daily", ValueFromAmount(nMasternodingDailyRewards))); - masternodingObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nMasternodingDailyRewardsROI * 100))); - masternodingObj.push_back(Pair("weekly", ValueFromAmount(nMasternodingWeeklyRewards))); - masternodingObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nMasternodingWeeklyRewardsROI * 100))); - masternodingObj.push_back(Pair("monthly", ValueFromAmount(nMasternodingMonthlyRewards))); - masternodingObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nMasternodingMonthlyRewardsROI * 100))); - masternodingObj.push_back(Pair("yearly", ValueFromAmount(nMasternodingYearlyRewards))); - masternodingObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); - - networkObj.push_back(Pair("masternoding", masternodingObj)); - } + // Compounding calculations + UniValue stakingCompoundObj(UniValue::VOBJ); - obj.push_back(Pair("network", networkObj)); - } + auto nStakingBalanceAccumulator = static_cast(nStakedBalance); - if (info_type == "wallet" || info_type == "both") { - UniValue walletObj(UniValue::VOBJ); + for (int i = 1; i <= 365; i++) { + nStakingBalanceAccumulator += ((nStakingBalanceAccumulator * cbs.nSmoothStakingROI) / 365); - UniValue walletStakingObj(UniValue::VOBJ); + if (i == 1) { // After a day + const auto nCompoundStakingDailyRewards = nStakingBalanceAccumulator - nStakedBalance; + const auto nCompoundStakingDailyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingDailyRewards / nStakedBalance; - walletStakingObj.push_back(Pair("status", fStakingActive)); - walletStakingObj.push_back(Pair("tries", pwalletMain->pStakerStatus->GetLastTries())); - walletStakingObj.push_back(Pair("allocated_coins", ValueFromAmount(nStakedBalance))); - walletStakingObj.push_back(Pair("share", strprintf("%4.2f%%", nStakeShare * 100))); - walletStakingObj.push_back(Pair("stakesplitthreshold", ValueFromAmount(pwalletMain->nStakeSplitThreshold))); - walletStakingObj.push_back(Pair("autocombinethreshold", ValueFromAmount(pwalletMain->fCombineDust ? pwalletMain->nAutoCombineThreshold : 0))); + stakingCompoundObj.push_back(Pair("daily", ValueFromAmount(nCompoundStakingDailyRewards))); + stakingCompoundObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nCompoundStakingDailyRewardsROI * 100))); + } - { - // Calculate all data for the wallet's staking ROI - UniValue stakingRegularObj(UniValue::VOBJ); - - const auto nStakingRewards = nStakedBalance * nSmoothStakingROI; - const auto nStakingDailyRewards = nStakingRewards / 365; - const auto nStakingWeeklyRewards = nStakingDailyRewards * 7; - const auto nStakingMonthlyRewards = nStakingDailyRewards * 30; - const auto nStakingYearlyRewards = nStakingRewards; - - const auto nStakingDailyRewardsROI = nStakedBalance == 0 ? 0 : nStakingDailyRewards / nStakedBalance; - const auto nStakingWeeklyRewardsROI = nStakedBalance == 0 ? 0 : nStakingWeeklyRewards / nStakedBalance; - const auto nStakingMonthlyRewardsROI = nStakedBalance == 0 ? 0 : nStakingMonthlyRewards / nStakedBalance; - const auto nStakingYearlyRewardsROI = nStakedBalance == 0 ? 0 : nStakingYearlyRewards / nStakedBalance; - - stakingRegularObj.push_back(Pair("daily", ValueFromAmount(nStakingDailyRewards))); - stakingRegularObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nStakingDailyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("weekly", ValueFromAmount(nStakingWeeklyRewards))); - stakingRegularObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nStakingWeeklyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("monthly", ValueFromAmount(nStakingMonthlyRewards))); - stakingRegularObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nStakingMonthlyRewardsROI * 100))); - stakingRegularObj.push_back(Pair("yearly", ValueFromAmount(nStakingYearlyRewards))); - stakingRegularObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nStakingYearlyRewardsROI * 100))); - - walletStakingObj.push_back(Pair("regular", stakingRegularObj)); - - { - // Compounding calculations - UniValue stakingCompoundObj(UniValue::VOBJ); - - auto nStakingBalanceAccumulator = static_cast(nStakedBalance); - - for (int i = 1; i <= 365; i++) { - nStakingBalanceAccumulator += ((nStakingBalanceAccumulator * nSmoothStakingROI) / 365); - - if (i == 1) { // After a day - const auto nCompoundStakingDailyRewards = nStakingBalanceAccumulator - nStakedBalance; - const auto nCompoundStakingDailyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingDailyRewards / nStakedBalance; - - stakingCompoundObj.push_back(Pair("daily", ValueFromAmount(nCompoundStakingDailyRewards))); - stakingCompoundObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nCompoundStakingDailyRewardsROI * 100))); - } - - if (i == 7) { // After a week - const auto nCompoundStakingWeeklyRewards = nStakingBalanceAccumulator - nStakedBalance; - const auto nCompoundStakingWeeklyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingWeeklyRewards / nStakedBalance; - - stakingCompoundObj.push_back(Pair("weekly", ValueFromAmount(nCompoundStakingWeeklyRewards))); - stakingCompoundObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nCompoundStakingWeeklyRewardsROI * 100))); - } - - if (i == 30) { // After a month - const auto nCompoundStakingMonthlyRewards = nStakingBalanceAccumulator - nStakedBalance; - const auto nCompoundStakingMonthlyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingMonthlyRewards / nStakedBalance; - - stakingCompoundObj.push_back(Pair("monthly", ValueFromAmount(nCompoundStakingMonthlyRewards))); - stakingCompoundObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nCompoundStakingMonthlyRewardsROI * 100))); - } - - if (i == 365) { // After a year - const auto nCompoundStakingYearlyRewards = nStakingBalanceAccumulator - nStakedBalance; - const auto nCompoundStakingYearlyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingYearlyRewards / nStakedBalance; - - stakingCompoundObj.push_back(Pair("yearly", ValueFromAmount(nCompoundStakingYearlyRewards))); - stakingCompoundObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nCompoundStakingYearlyRewardsROI * 100))); - } + if (i == 7) { // After a week + const auto nCompoundStakingWeeklyRewards = nStakingBalanceAccumulator - nStakedBalance; + const auto nCompoundStakingWeeklyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingWeeklyRewards / nStakedBalance; + + stakingCompoundObj.push_back(Pair("weekly", ValueFromAmount(nCompoundStakingWeeklyRewards))); + stakingCompoundObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nCompoundStakingWeeklyRewardsROI * 100))); } - walletStakingObj.push_back(Pair("compound", stakingCompoundObj)); + if (i == 30) { // After a month + const auto nCompoundStakingMonthlyRewards = nStakingBalanceAccumulator - nStakedBalance; + const auto nCompoundStakingMonthlyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingMonthlyRewards / nStakedBalance; + + stakingCompoundObj.push_back(Pair("monthly", ValueFromAmount(nCompoundStakingMonthlyRewards))); + stakingCompoundObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nCompoundStakingMonthlyRewardsROI * 100))); + } + + if (i == 365) { // After a year + const auto nCompoundStakingYearlyRewards = nStakingBalanceAccumulator - nStakedBalance; + const auto nCompoundStakingYearlyRewardsROI = nStakedBalance == 0 ? 0 : nCompoundStakingYearlyRewards / nStakedBalance; + + stakingCompoundObj.push_back(Pair("yearly", ValueFromAmount(nCompoundStakingYearlyRewards))); + stakingCompoundObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nCompoundStakingYearlyRewardsROI * 100))); + } } + + walletStakingObj.push_back(Pair("compound", stakingCompoundObj)); } + } - walletObj.push_back(Pair("staking", walletStakingObj)); + walletObj.push_back(Pair("staking", walletStakingObj)); - { - // Calculate all data for the wallet's masternoding ROI - UniValue walletMasternodingObj(UniValue::VOBJ); + { + // Calculate all data for the wallet's masternoding ROI + UniValue walletMasternodingObj(UniValue::VOBJ); - const auto nMNs = masternodeConfig.getCount() + 1; // legacy preservation without showing a strange counting - const auto nMNBalance = nMNs * nMNCollateral; - const auto nMNShare = static_cast(nMNBalance) / nMNCoins; + const auto nMNs = masternodeConfig.getCount() + 1; // legacy preservation without showing a strange counting + const auto nMNBalance = nMNs * cbs.nMNCollateral; + const auto nMNShare = static_cast(nMNBalance) / cbs.nMNCoins; - walletMasternodingObj.push_back(Pair("masternodes", nMNs)); - walletMasternodingObj.push_back(Pair("allocated_coins", ValueFromAmount(nMNBalance))); - walletMasternodingObj.push_back(Pair("share", strprintf("%4.2f%%", nMNShare * 100))); + walletMasternodingObj.push_back(Pair("masternodes", nMNs)); + walletMasternodingObj.push_back(Pair("allocated_coins", ValueFromAmount(nMNBalance))); + walletMasternodingObj.push_back(Pair("share", strprintf("%4.2f%%", nMNShare * 100))); - const auto nMasternodingDailyRewards = nDailyMasternodingRewards * nMNs; - const auto nMasternodingWeeklyRewards = nMasternodingDailyRewards * 7; - const auto nMasternodingMonthlyRewards = nMasternodingDailyRewards * 30; - const auto nMasternodingYearlyRewards = nMasternodingRewards * nMNs; - - const auto nMasternodingDailyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingDailyRewards / nMNBalance; - const auto nMasternodingWeeklyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingWeeklyRewards / nMNBalance; - const auto nMasternodingMonthlyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingMonthlyRewards / nMNBalance; - const auto nMasternodingYearlyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingYearlyRewards / nMNBalance; - - walletMasternodingObj.push_back(Pair("daily", ValueFromAmount(nMasternodingDailyRewards))); - walletMasternodingObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nMasternodingDailyRewardsROI * 100))); - walletMasternodingObj.push_back(Pair("weekly", ValueFromAmount(nMasternodingWeeklyRewards))); - walletMasternodingObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nMasternodingWeeklyRewardsROI * 100))); - walletMasternodingObj.push_back(Pair("monthly", ValueFromAmount(nMasternodingMonthlyRewards))); - walletMasternodingObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nMasternodingMonthlyRewardsROI * 100))); - walletMasternodingObj.push_back(Pair("yearly", ValueFromAmount(nMasternodingYearlyRewards))); - walletMasternodingObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); - - walletObj.push_back(Pair("masternoding", walletMasternodingObj)); - } - - obj.push_back(Pair("wallet", walletObj)); + const auto nMasternodingDailyRewards = nDailyMasternodingRewards * nMNs; + const auto nMasternodingWeeklyRewards = nMasternodingDailyRewards * 7; + const auto nMasternodingMonthlyRewards = nMasternodingDailyRewards * 30; + const auto nMasternodingYearlyRewards = nMasternodingRewards * nMNs; + + const auto nMasternodingDailyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingDailyRewards / nMNBalance; + const auto nMasternodingWeeklyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingWeeklyRewards / nMNBalance; + const auto nMasternodingMonthlyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingMonthlyRewards / nMNBalance; + const auto nMasternodingYearlyRewardsROI = nMNBalance == 0 ? 0 : nMasternodingYearlyRewards / nMNBalance; + + walletMasternodingObj.push_back(Pair("daily", ValueFromAmount(nMasternodingDailyRewards))); + walletMasternodingObj.push_back(Pair("daily_roi", strprintf("%4.2f%%", nMasternodingDailyRewardsROI * 100))); + walletMasternodingObj.push_back(Pair("weekly", ValueFromAmount(nMasternodingWeeklyRewards))); + walletMasternodingObj.push_back(Pair("weekly_roi", strprintf("%4.2f%%", nMasternodingWeeklyRewardsROI * 100))); + walletMasternodingObj.push_back(Pair("monthly", ValueFromAmount(nMasternodingMonthlyRewards))); + walletMasternodingObj.push_back(Pair("monthly_roi", strprintf("%4.2f%%", nMasternodingMonthlyRewardsROI * 100))); + walletMasternodingObj.push_back(Pair("yearly", ValueFromAmount(nMasternodingYearlyRewards))); + walletMasternodingObj.push_back(Pair("yearly_roi", strprintf("%4.2f%%", nMasternodingYearlyRewardsROI * 100))); + + walletObj.push_back(Pair("masternoding", walletMasternodingObj)); } - return obj; - } else { - throw JSONRPCError(RPC_IN_WARMUP, "Try again after the active chain is loaded"); + obj.push_back(Pair("wallet", walletObj)); } + return obj; } #endif // ENABLE_WALLET From e78d8a315709e18b356f7fc9e00190fab8cf79b9 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Fri, 11 Oct 2024 20:10:42 +0100 Subject: [PATCH 24/39] improves the current circulating supply calculations --- src/rewards.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rewards.cpp b/src/rewards.cpp index 2c6931a1b..5bc227de3 100644 --- a/src/rewards.cpp +++ b/src/rewards.cpp @@ -218,12 +218,13 @@ bool CRewards::ConnectBlock(CBlockIndex* pindex, CAmount nSubsidy, CCoinsViewCac // calculate the current circulating supply CAmount nCirculatingSupply = 0; + FlushStateToDisk(); std::unique_ptr pcursor(coins.Cursor()); while (pcursor->Valid()) { COutPoint key; Coin coin; - if (pcursor->GetKey(key) && pcursor->GetValue(coin)) { + if (pcursor->GetKey(key) && pcursor->GetValue(coin) && !coin.IsSpent()) { // ----------- burn address scanning ----------- CTxDestination source; if (ExtractDestination(coin.out.scriptPubKey, source)) { From 36fb17b422c8209b44d55c1083b2922ae22fd377 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Sun, 13 Oct 2024 19:36:34 +0100 Subject: [PATCH 25/39] adds UPGRADE_POS_V3 and new difficulty algorithm --- src/chainparams.cpp | 10 +- src/consensus/params.h | 1 + src/pow.cpp | 205 +++++++++++++++++++++++++++++++++-------- 3 files changed, 175 insertions(+), 41 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 5e6d0ac68..94dbcf7c8 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -200,6 +200,7 @@ class CMainParams : public CChainParams consensus.vUpgrades[Consensus::UPGRADE_MASTERNODE_RANK_V2].nActivationHeight = 5001; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; + consensus.vUpgrades[Consensus::UPGRADE_POS_V3].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; consensus.vUpgrades[Consensus::UPGRADE_POS].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_POS_V2].hashActivationBlock = uint256S("0x0"); @@ -211,6 +212,7 @@ class CMainParams : public CChainParams consensus.vUpgrades[Consensus::UPGRADE_MASTERNODE_RANK_V2].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_POS_V3].hashActivationBlock = uint256S("0x0"); /** * The message start string is designed to be unlikely to occur in normal data. @@ -306,6 +308,7 @@ class CTestNetParams : public CMainParams consensus.vUpgrades[Consensus::UPGRADE_MASTERNODE_RANK_V2].nActivationHeight = 1941; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; + consensus.vUpgrades[Consensus::UPGRADE_POS_V3].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; consensus.vUpgrades[Consensus::UPGRADE_POS].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_POS_V2].hashActivationBlock = uint256S("0x0"); @@ -314,9 +317,10 @@ class CTestNetParams : public CMainParams consensus.vUpgrades[Consensus::UPGRADE_TIME_PROTOCOL_V2].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_P2PKH_BLOCK_SIGNATURES].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_STAKE_MIN_DEPTH_V2].hashActivationBlock = uint256S("0x0"); - consensus.vUpgrades[Consensus::UPGRADE_STAKE_MIN_DEPTH_V2].hashActivationBlock = uint256S("0x0"); - consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].hashActivationBlock = uint256S("0x0"); - consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_STAKE_MIN_DEPTH_V2].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_POS_V3].hashActivationBlock = uint256S("0x0"); /** * The message start string is designed to be unlikely to occur in normal data. diff --git a/src/consensus/params.h b/src/consensus/params.h index cddb364c3..2927f3f9e 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -35,6 +35,7 @@ enum UpgradeIndex : uint32_t { UPGRADE_MASTERNODE_RANK_V2, UPGRADE_DYNAMIC_REWARDS, UPGRADE_DYNAMIC_COLLATERALS, + UPGRADE_POS_V3, // NOTE: Also add new upgrades to NetworkUpgradeInfo in upgrades.cpp UPGRADE_TESTDUMMY, MAX_NETWORK_UPGRADES, diff --git a/src/pow.cpp b/src/pow.cpp index abf8ed87e..736e3d684 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -17,13 +17,12 @@ #include - -unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader* pblock) +unsigned int GetNextWorkRequiredPOW(const CBlockIndex* pindexLast) { - if (Params().IsRegTestNet()) - return pindexLast->nBits; + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); - /* current difficulty formula, __decenomy__ - DarkGravity v3, written by Evan Duffield - evan@dashpay.io */ + /* current difficulty formula, kyanite - DarkGravity v3, written by Evan Duffield - evan@dashpay.io */ const CBlockIndex* BlockLastSolved = pindexLast; const CBlockIndex* BlockReading = pindexLast; int64_t nActualTimespan = 0; @@ -33,44 +32,11 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead int64_t CountBlocks = 0; uint256 PastDifficultyAverage; uint256 PastDifficultyAveragePrev; - const Consensus::Params& consensus = Params().GetConsensus(); if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || BlockLastSolved->nHeight < PastBlocksMin) { return consensus.powLimit.GetCompact(); } - if (consensus.NetworkUpgradeActive(pindexLast->nHeight + 1, Consensus::UPGRADE_POS)) { - const bool fTimeV2 = !Params().IsRegTestNet() && consensus.IsTimeProtocolV2(pindexLast->nHeight+1); - const uint256& bnTargetLimit = consensus.ProofOfStakeLimit(fTimeV2); - const int64_t& nTargetTimespan = consensus.TargetTimespan(fTimeV2); - - int64_t nActualSpacing = 0; - if (pindexLast->nHeight != 0) - nActualSpacing = pindexLast->GetBlockTime() - pindexLast->pprev->GetBlockTime(); - if (nActualSpacing < 0) - nActualSpacing = 1; - if (fTimeV2 && nActualSpacing > consensus.nTargetSpacing*10) - nActualSpacing = consensus.nTargetSpacing*10; - - // ppcoin: target change every block - // ppcoin: retarget with exponential moving toward target spacing - uint256 bnNew; - bnNew.SetCompact(pindexLast->nBits); - - // on first block with V2 time protocol, reduce the difficulty by a factor 16 - if (fTimeV2 && !consensus.IsTimeProtocolV2(pindexLast->nHeight)) - bnNew <<= 4; - - int64_t nInterval = nTargetTimespan / consensus.nTargetSpacing; - bnNew *= ((nInterval - 1) * consensus.nTargetSpacing + nActualSpacing + nActualSpacing); - bnNew /= ((nInterval + 1) * consensus.nTargetSpacing); - - if (bnNew <= 0 || bnNew > bnTargetLimit) - bnNew = bnTargetLimit; - - return bnNew.GetCompact(); - } - for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) { if (PastBlocksMax > 0 && i > PastBlocksMax) { break; @@ -119,6 +85,169 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead return bnNew.GetCompact(); } +unsigned int GetNextWorkRequiredPOS(const CBlockIndex* pindexLast) +{ + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + + const auto nHeight = pindexLast->nHeight + 1; + const auto fIsTimeProtocolV2 = consensus.IsTimeProtocolV2(nHeight); + const auto nTargetTimespan = consensus.TargetTimespan(nHeight); + const auto posLimit = consensus.ProofOfStakeLimit(fIsTimeProtocolV2); + + int64_t nActualSpacing = 0; + if (pindexLast->nHeight != 0) + nActualSpacing = pindexLast->GetBlockTime() - pindexLast->pprev->GetBlockTime(); + if (nActualSpacing < 0) + nActualSpacing = 1; + if (fIsTimeProtocolV2 && nActualSpacing > consensus.nTargetSpacing * 10) + nActualSpacing = consensus.nTargetSpacing * 10; + + // ppcoin: target change every block + // ppcoin: retarget with exponential moving toward target spacing + uint256 bnNew; + bnNew.SetCompact(pindexLast->nBits); + + // On first block with V2 time protocol, reduce the difficulty by a factor 16 + if (fIsTimeProtocolV2 && !consensus.IsTimeProtocolV2(pindexLast->nHeight)) + bnNew <<= 4; + + int64_t nInterval = nTargetTimespan / consensus.nTargetSpacing; + bnNew *= ((nInterval - 1) * consensus.nTargetSpacing + nActualSpacing + nActualSpacing); + bnNew /= ((nInterval + 1) * consensus.nTargetSpacing); + + if (bnNew > posLimit) + bnNew = posLimit; + + return bnNew.GetCompact(); +} + +unsigned int GetNextWorkRequiredPOSV2(const CBlockIndex* pIndexLast) +{ + // Retrieve the parameters and consensus rules + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + + // Get the current block height + const auto nPrevHeight = pIndexLast->nHeight; + const auto nHeight = nPrevHeight + 1; + + // Get additional parameters + const auto fIsTimeProtocolV2 = consensus.IsTimeProtocolV2(nHeight); + const auto posLimit = consensus.ProofOfStakeLimit(fIsTimeProtocolV2); + + // Fetch the target block spacing time and timespan + int64_t nTargetSpacing = consensus.nTargetSpacing; + + const int nTargetBlocksPerDay = DAY_IN_SECONDS / nTargetSpacing; + const int nTargetBlocksPerWeek = WEEK_IN_SECONDS / nTargetSpacing; + const int nTargetBlocksPerMonth = MONTH_IN_SECONDS / nTargetSpacing; + + // Calculates the actual spacing using the previous block and the block before it + int64_t nActualSpacing = nHeight > 1 ? pIndexLast->GetBlockTime() - pIndexLast->pprev->GetBlockTime() : nTargetSpacing; + + int64_t nDayAccumulatedTargetSpacing = DAY_IN_SECONDS; + int64_t nDayAccumulatedSpacing = nHeight > nTargetBlocksPerDay ? + pIndexLast->GetBlockTime() - chainActive[nPrevHeight - nTargetBlocksPerDay]->GetBlockTime() : + nDayAccumulatedTargetSpacing; + + int64_t nWeekAccumulatedTargetSpacing = WEEK_IN_SECONDS; + int64_t nWeekAccumulatedSpacing = nHeight > nTargetBlocksPerWeek ? + pIndexLast->GetBlockTime() - chainActive[nPrevHeight - nTargetBlocksPerWeek]->GetBlockTime() : + nWeekAccumulatedTargetSpacing; + + int64_t nBiWeekAccumulatedTargetSpacing = 2 * WEEK_IN_SECONDS; + int64_t nBiWeekAccumulatedSpacing = nHeight > 2 * nTargetBlocksPerWeek ? + pIndexLast->GetBlockTime() - chainActive[nPrevHeight - 2 * nTargetBlocksPerWeek]->GetBlockTime() : + nBiWeekAccumulatedTargetSpacing; + + int64_t nMonthAccumulatedTargetSpacing = MONTH_IN_SECONDS; + int64_t nMonthAccumulatedSpacing = nHeight > nTargetBlocksPerMonth ? + pIndexLast->GetBlockTime() - chainActive[nPrevHeight - nTargetBlocksPerMonth]->GetBlockTime() : + nMonthAccumulatedTargetSpacing; + + int64_t nMultiplier = 1000; // increase the adjustemnt resolution to the millisecond level + + nActualSpacing = nActualSpacing * nMultiplier; + + // 24h target adjustment + int64_t nDayTargetSpacing = (nDayAccumulatedTargetSpacing * nTargetSpacing * nMultiplier) / nDayAccumulatedSpacing; // ^1 + nDayTargetSpacing = nDayAccumulatedTargetSpacing * nDayTargetSpacing / nDayAccumulatedSpacing; // ^2 + nDayTargetSpacing = nDayAccumulatedTargetSpacing * nDayTargetSpacing / nDayAccumulatedSpacing; // ^3 + nDayTargetSpacing = nDayAccumulatedTargetSpacing * nDayTargetSpacing / nDayAccumulatedSpacing; // ^4 + + // 7 days target adjustment + int64_t nWeekTargetSpacing = (nWeekAccumulatedTargetSpacing * nTargetSpacing * nMultiplier) / nWeekAccumulatedSpacing; // ^1 + nWeekTargetSpacing = nWeekAccumulatedTargetSpacing * nWeekTargetSpacing / nWeekAccumulatedSpacing; // ^2 + nWeekTargetSpacing = nWeekAccumulatedTargetSpacing * nWeekTargetSpacing / nWeekAccumulatedSpacing; // ^3 + nWeekTargetSpacing = nWeekAccumulatedTargetSpacing * nWeekTargetSpacing / nWeekAccumulatedSpacing; // ^4 + + // 14 days target adjustment + int64_t nBiWeekTargetSpacing = (nBiWeekAccumulatedTargetSpacing * nTargetSpacing * nMultiplier) / nBiWeekAccumulatedSpacing; // ^1 + nBiWeekTargetSpacing = nBiWeekAccumulatedTargetSpacing * nBiWeekTargetSpacing / nBiWeekAccumulatedSpacing; // ^2 + nBiWeekTargetSpacing = nBiWeekAccumulatedTargetSpacing * nBiWeekTargetSpacing / nBiWeekAccumulatedSpacing; // ^3 + nBiWeekTargetSpacing = nBiWeekAccumulatedTargetSpacing * nBiWeekTargetSpacing / nBiWeekAccumulatedSpacing; // ^4 + + // 30 days target adjustment + int64_t nMonthTargetSpacing = (nMonthAccumulatedTargetSpacing * nTargetSpacing * nMultiplier) / nMonthAccumulatedSpacing; // ^1 + nMonthTargetSpacing = nMonthAccumulatedTargetSpacing * nMonthTargetSpacing / nMonthAccumulatedSpacing; // ^2 + nMonthTargetSpacing = nMonthAccumulatedTargetSpacing * nMonthTargetSpacing / nMonthAccumulatedSpacing; // ^3 + nMonthTargetSpacing = nMonthAccumulatedTargetSpacing * nMonthTargetSpacing / nMonthAccumulatedSpacing; // ^4 + + int64_t nK = 60; // adjustments in 1/60th steps from the target + + int64_t nKd = 60; // 60/40 rule from level to level + int64_t nKw = 24; // 40 * 60% + int64_t nK2w = 10; // 16 * 60% rounded + int64_t nKm = 6; // remainder + + int64_t nFinalTargetSpacing = + ( + (nDayTargetSpacing * nKd) + + (nWeekTargetSpacing * nKw) + + (nBiWeekTargetSpacing * nK2w) + + (nMonthTargetSpacing * nKm) + ) / 100; + int64_t nMaxTargetSpacing = (nTargetSpacing * nMultiplier * 110) / 100; + int64_t nMinTargetSpacing = (nTargetSpacing * nMultiplier * 90) / 100; + + // limit nFinalTargetSpacing to +-10% of the nTargetSpacing + nFinalTargetSpacing = std::min(nFinalTargetSpacing, nMaxTargetSpacing); + nFinalTargetSpacing = std::max(nFinalTargetSpacing, nMinTargetSpacing); + + uint256 bnNew; + bnNew.SetCompact(pIndexLast->nBits); + + bnNew *= nActualSpacing + ((nK - 1) * nFinalTargetSpacing); + bnNew /= nK * nFinalTargetSpacing; + + // Ensure the new difficulty does not exceed the minimum allowed by consensus + if (bnNew > posLimit) + bnNew = posLimit; + + // Return the new difficulty in compact format + return bnNew.GetCompact(); +} + +unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader* pblock) +{ + const auto& params = Params(); + const auto& consensus = params.GetConsensus(); + const auto nHeight = pindexLast->nHeight + 1; + + if (params.IsRegTestNet()) return pindexLast->nBits; + + if (consensus.NetworkUpgradeActive(nHeight, Consensus::UPGRADE_POS_V3)) { + return GetNextWorkRequiredPOSV2(pindexLast); + } + + if (consensus.NetworkUpgradeActive(nHeight, Consensus::UPGRADE_POS)) { + return GetNextWorkRequiredPOS(pindexLast); + } + + return GetNextWorkRequiredPOW(pindexLast); +} + bool CheckProofOfWork(uint256 hash, unsigned int nBits) { bool fNegative; From 6825e878e74de39e77ca1fb87f652b45cc2db72b Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 14 Oct 2024 18:42:07 +0100 Subject: [PATCH 26/39] adds docker composer file --- compose.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 000000000..7755091ed --- /dev/null +++ b/compose.yaml @@ -0,0 +1,28 @@ +services: + __decenomy__: + image: ubuntu:24.04 + container_name: __decenomy__-ctn + restart: always + ports: + - "__PORT_MAINNET__:__PORT_MAINNET__" # TCP mainnet port + - "__RPCPORT_MAINNET__:__RPCPORT_MAINNET__" # RPC mainnet port + volumes: + - ${HOME}/.__decenomy__:/root/.__decenomy__:shared + command: + - bash + - -c + - | + apt-get update && \ + apt-get install -y wget curl unzip && \ + rm -rf /var/lib/apt/lists/* && \ + echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep "Linux-x64.zip" | cut -d '"' -f 4) > latest_release_url && \ + echo "Latest release URL: $(cat latest_release_url)" && \ + echo $(basename "$(cat latest_release_url)") > latest_filename && \ + echo "Latest filename: $(cat latest_filename)" && \ + wget "$(cat latest_release_url)" && \ + unzip -q "$(cat latest_filename)" && \ + rm "$(cat latest_filename)" && \ + rm latest_filename && \ + rm latest_release_url && \ + mv __decenomy__* /usr/local/bin && \ + __decenomy__d \ No newline at end of file From d1e27fd2dc974748ae84fd552bd559089d2f8e8a Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 15 Oct 2024 19:45:44 +0100 Subject: [PATCH 27/39] fixes bug that selected all the collateral in a collateral window change, now it only selects the next week collateral --- src/qt/walletmodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 4da31f743..83b209b80 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace boost::placeholders; @@ -757,11 +758,12 @@ void WalletModel::getOutputs(const std::vector& vOutpoints, std::vect // returns a COutPoint of collateral amount if found bool WalletModel::getMNCollateralCandidate(COutPoint& outPoint) { + const auto nCollateralValue = CMasternode::GetNextWeekMasternodeCollateral(); std::vector vCoins; wallet->AvailableCoins(&vCoins, nullptr, ONLY_10000); for (const COutput& out : vCoins) { // skip locked collaterals - if (!isLockedCoin(out.tx->GetHash(), out.i)) { + if (!isLockedCoin(out.tx->GetHash(), out.i) && out.Value() == nCollateralValue) { outPoint = COutPoint(out.tx->GetHash(), out.i); return true; } From e4f6a789762878c062c42cb4c5201f9ca9593e4d Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 28 Oct 2024 14:48:11 +0000 Subject: [PATCH 28/39] changes the docker compose file to only setup the container once --- compose.yaml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/compose.yaml b/compose.yaml index 7755091ed..be1f8547e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -12,17 +12,22 @@ services: - bash - -c - | - apt-get update && \ - apt-get install -y wget curl unzip && \ - rm -rf /var/lib/apt/lists/* && \ - echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep "Linux-x64.zip" | cut -d '"' -f 4) > latest_release_url && \ - echo "Latest release URL: $(cat latest_release_url)" && \ - echo $(basename "$(cat latest_release_url)") > latest_filename && \ - echo "Latest filename: $(cat latest_filename)" && \ - wget "$(cat latest_release_url)" && \ - unzip -q "$(cat latest_filename)" && \ - rm "$(cat latest_filename)" && \ - rm latest_filename && \ - rm latest_release_url && \ - mv __decenomy__* /usr/local/bin && \ + if [ ! -f /usr/local/bin/__decenomy__d ]; then + echo "__Decenomy__ binary not found, setting up environment..." + apt-get update && \ + apt-get install -y wget curl unzip && \ + rm -rf /var/lib/apt/lists/* && \ + echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep "Linux-x64.zip" | cut -d '"' -f 4) > latest_release_url && \ + echo "Latest release URL: $(cat latest_release_url)" && \ + echo $(basename "$(cat latest_release_url)") > latest_filename && \ + echo "Latest filename: $(cat latest_filename)" && \ + wget "$(cat latest_release_url)" && \ + unzip -q "$(cat latest_filename)" && \ + rm "$(cat latest_filename)" && \ + rm latest_filename && \ + rm latest_release_url && \ + mv __decenomy__* /usr/local/bin; + else + echo "__Decenomy__ binary already installed, skipping setup." + fi __decenomy__d \ No newline at end of file From 78fbcb2896c461aeb7d4b65e4e5d49c4f7821250 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 28 Oct 2024 14:50:48 +0000 Subject: [PATCH 29/39] changes grep to match both Linux.zip and Linux-x64.zip --- compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index be1f8547e..e46cdb4cd 100644 --- a/compose.yaml +++ b/compose.yaml @@ -17,7 +17,7 @@ services: apt-get update && \ apt-get install -y wget curl unzip && \ rm -rf /var/lib/apt/lists/* && \ - echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep "Linux-x64.zip" | cut -d '"' -f 4) > latest_release_url && \ + echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep -E "Linux(-x64)?\.zip" | cut -d '"' -f 4) > latest_release_url && \ echo "Latest release URL: $(cat latest_release_url)" && \ echo $(basename "$(cat latest_release_url)") > latest_filename && \ echo "Latest filename: $(cat latest_filename)" && \ From 76cc1024c8a24a9fb9644eb9e928409cddf4f5ef Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 4 Nov 2024 12:27:11 +0000 Subject: [PATCH 30/39] hides the conf and masternode.conf buttons from the topbar --- src/qt/pivx/forms/topbar.ui | 16 ++++++++++++++++ src/qt/pivx/topbar.cpp | 9 ++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/qt/pivx/forms/topbar.ui b/src/qt/pivx/forms/topbar.ui index 5880058f8..18ff07357 100644 --- a/src/qt/pivx/forms/topbar.ui +++ b/src/qt/pivx/forms/topbar.ui @@ -378,6 +378,22 @@ + + + + + 36 + 36 + + + + + 16777215 + 36 + + + + diff --git a/src/qt/pivx/topbar.cpp b/src/qt/pivx/topbar.cpp index d259064d5..797037fc1 100644 --- a/src/qt/pivx/topbar.cpp +++ b/src/qt/pivx/topbar.cpp @@ -78,8 +78,9 @@ TopBar::TopBar(PIVXGUI* _mainWindow, QWidget* parent) : PWidget(_mainWindow, par progressBar->raise(); progressBar->move(0, 34); - // ui->pushButtonFAQ->setButtonClassStyle("cssClass", "btn-check-faq"); - // ui->pushButtonFAQ->setButtonText(tr("FAQ")); + ui->pushButtonFAQ->setButtonClassStyle("cssClass", "btn-check-faq"); + ui->pushButtonFAQ->setButtonText(tr("FAQ")); + ui->pushButtonFAQ->setVisible(false); ui->pushButtonHDUpgrade->setButtonClassStyle("cssClass", "btn-check-hd-upgrade"); ui->pushButtonHDUpgrade->setButtonText(tr("Upgrade to HD Wallet")); @@ -99,10 +100,12 @@ TopBar::TopBar(PIVXGUI* _mainWindow, QWidget* parent) : PWidget(_mainWindow, par ui->pushButtonConf->setButtonClassStyle("cssClass", "btn-check-conf"); ui->pushButtonConf->setButtonText("__decenomy__.conf"); ui->pushButtonConf->setChecked(false); + ui->pushButtonConf->setVisible(false); ui->pushButtonMasternodes->setButtonClassStyle("cssClass", "btn-check-masternodes"); ui->pushButtonMasternodes->setButtonText("masternode.conf"); ui->pushButtonMasternodes->setChecked(false); + ui->pushButtonMasternodes->setVisible(false); ui->pushButtonConsole->setButtonClassStyle("cssClass", "btn-check-console"); ui->pushButtonConsole->setButtonText("Debug Console"); @@ -140,7 +143,7 @@ TopBar::TopBar(PIVXGUI* _mainWindow, QWidget* parent) : PWidget(_mainWindow, par connect(ui->btnQr, &QPushButton::clicked, this, &TopBar::onBtnReceiveClicked); connect(ui->pushButtonLock, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnLockClicked); connect(ui->pushButtonTheme, &ExpandableButton::Mouse_Pressed, this, &TopBar::onThemeClicked); - // connect(ui->pushButtonFAQ, &ExpandableButton::Mouse_Pressed, [this]() { window->openFAQ(); }); + connect(ui->pushButtonFAQ, &ExpandableButton::Mouse_Pressed, [this]() { window->openFAQ(); }); connect(ui->pushButtonConf, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnConfClicked); connect(ui->pushButtonMasternodes, &ExpandableButton::Mouse_Pressed, this, &TopBar::onBtnMasternodesClicked); connect(ui->pushButtonSync, &ExpandableButton::Mouse_HoverLeave, this, &TopBar::refreshProgressBarSize); From bf18ee2769ca930ac7c6202cce96a862d47a5c47 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 4 Nov 2024 12:55:09 +0000 Subject: [PATCH 31/39] adds button to open the masternode.conf file for editing --- src/qt/pivx/forms/masternodeswidget.ui | 10 ++++++++++ src/qt/pivx/masternodeswidget.cpp | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/src/qt/pivx/forms/masternodeswidget.ui b/src/qt/pivx/forms/masternodeswidget.ui index 2a11510f6..9a96a0a66 100644 --- a/src/qt/pivx/forms/masternodeswidget.ui +++ b/src/qt/pivx/forms/masternodeswidget.ui @@ -378,6 +378,16 @@ and vote on the treasury system receiving a periodic reward. + + + + + 0 + 50 + + + + diff --git a/src/qt/pivx/masternodeswidget.cpp b/src/qt/pivx/masternodeswidget.cpp index d60edb2e0..dc5f352fa 100644 --- a/src/qt/pivx/masternodeswidget.cpp +++ b/src/qt/pivx/masternodeswidget.cpp @@ -108,6 +108,8 @@ MasterNodesWidget::MasterNodesWidget(PIVXGUI *parent) : ui->btnAbout->setSubTitleClassAndText("text-subtitle", tr("FAQ explaining what Masternodes are")); ui->btnAboutController->setTitleClassAndText("btn-title-grey", tr("What is a Controller?")); ui->btnAboutController->setSubTitleClassAndText("text-subtitle", tr("FAQ explaining what is a Masternode Controller")); + ui->btnMasternodeConf->setTitleClassAndText("btn-title-grey", tr("masternode.conf")); + ui->btnMasternodeConf->setSubTitleClassAndText("text-subtitle", tr("Opens the masternode configuration file for editing")); setCssProperty(ui->listMn, "container"); ui->listMn->setItemDelegate(delegate); @@ -131,6 +133,11 @@ MasterNodesWidget::MasterNodesWidget(PIVXGUI *parent) : connect(ui->listMn, &QListView::clicked, this, &MasterNodesWidget::onMNClicked); connect(ui->btnAbout, &OptionButton::clicked, [this](){window->openFAQ(5);}); connect(ui->btnAboutController, &OptionButton::clicked, [this](){window->openFAQ(6);}); + connect(ui->btnMasternodeConf, &OptionButton::clicked, [this](){ + if(!GUIUtil::openMNConfigfile()) { + inform(tr("Unable to open masternode.conf with default application")); + } + }); } void MasterNodesWidget::showEvent(QShowEvent *event) From 9469fbafa899818302adce1935de5c547103220b Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 4 Nov 2024 17:45:15 +0000 Subject: [PATCH 32/39] adds activemasternode.conf export function --- src/masternodeconfig.cpp | 25 +++++++++++++++++++++++++ src/masternodeconfig.h | 2 ++ src/qt/pivx/forms/masternodeswidget.ui | 10 ++++++++++ src/qt/pivx/masternodeswidget.cpp | 20 ++++++++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/src/masternodeconfig.cpp b/src/masternodeconfig.cpp index f78065811..fa0e1c067 100644 --- a/src/masternodeconfig.cpp +++ b/src/masternodeconfig.cpp @@ -111,3 +111,28 @@ bool CMasternodeConfig::CMasternodeEntry::castOutputIndex(int &n) const return true; } + +bool CMasternodeConfig::exportActiveMasternodes(std::string filename) +{ + try { + std::ofstream file(filename); + + if (!file.is_open()) { + return false; + } + + // Iterate through entries and write to the file + for (const auto& mne : entries) { + std::string line = mne.getAlias() + " " + mne.getPrivKey() + "\n"; + file << line; + + if (file.fail()) { + return false; + } + } + } catch (const std::exception& e) { + return false; + } + + return true; +} diff --git a/src/masternodeconfig.h b/src/masternodeconfig.h index 30a491f33..8d124f72d 100644 --- a/src/masternodeconfig.h +++ b/src/masternodeconfig.h @@ -133,6 +133,8 @@ class CMasternodeConfig return false; } + bool exportActiveMasternodes(std::string filename); + private: std::vector entries; }; diff --git a/src/qt/pivx/forms/masternodeswidget.ui b/src/qt/pivx/forms/masternodeswidget.ui index 9a96a0a66..5acc6fcbb 100644 --- a/src/qt/pivx/forms/masternodeswidget.ui +++ b/src/qt/pivx/forms/masternodeswidget.ui @@ -388,6 +388,16 @@ and vote on the treasury system receiving a periodic reward. + + + + + 0 + 50 + + + + diff --git a/src/qt/pivx/masternodeswidget.cpp b/src/qt/pivx/masternodeswidget.cpp index dc5f352fa..081134707 100644 --- a/src/qt/pivx/masternodeswidget.cpp +++ b/src/qt/pivx/masternodeswidget.cpp @@ -110,6 +110,8 @@ MasterNodesWidget::MasterNodesWidget(PIVXGUI *parent) : ui->btnAboutController->setSubTitleClassAndText("text-subtitle", tr("FAQ explaining what is a Masternode Controller")); ui->btnMasternodeConf->setTitleClassAndText("btn-title-grey", tr("masternode.conf")); ui->btnMasternodeConf->setSubTitleClassAndText("text-subtitle", tr("Opens the masternode configuration file for editing")); + ui->btnExportActivemasternodeConf->setTitleClassAndText("btn-title-grey", tr("Export activemasternode.conf")); + ui->btnExportActivemasternodeConf->setSubTitleClassAndText("text-subtitle", tr("Exports the masternode list as a activemasternode.conf file")); setCssProperty(ui->listMn, "container"); ui->listMn->setItemDelegate(delegate); @@ -138,6 +140,24 @@ MasterNodesWidget::MasterNodesWidget(PIVXGUI *parent) : inform(tr("Unable to open masternode.conf with default application")); } }); + connect(ui->btnExportActivemasternodeConf, &OptionButton::clicked, [this](){ + QString filename = + GUIUtil::getSaveFileName( + this, + tr("Export activemasternode.conf"), + tr("activemasternode.conf"), + tr("activemasternode.conf (*.conf)"), + NULL + ); + + if (!filename.isEmpty()) { + if(masternodeConfig.exportActiveMasternodes(filename.toStdString())) { + inform(tr("activemasternode.conf file exported to file: ") + filename); + } else { + inform(tr("Error exporting activemasternode.conf file")); + } + } + }); } void MasterNodesWidget::showEvent(QShowEvent *event) From 3581f122eefa2fa9eb457f78984f951139eb429f Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Mon, 4 Nov 2024 19:29:56 +0000 Subject: [PATCH 33/39] replace placeholders --- compose.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/compose.yaml b/compose.yaml index e46cdb4cd..3642a1009 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,23 +1,23 @@ services: - __decenomy__: + kyanite: image: ubuntu:24.04 - container_name: __decenomy__-ctn + container_name: kyanite-ctn restart: always ports: - "__PORT_MAINNET__:__PORT_MAINNET__" # TCP mainnet port - "__RPCPORT_MAINNET__:__RPCPORT_MAINNET__" # RPC mainnet port volumes: - - ${HOME}/.__decenomy__:/root/.__decenomy__:shared + - ${HOME}/.kyanite:/root/.kyanite:shared command: - bash - -c - | - if [ ! -f /usr/local/bin/__decenomy__d ]; then - echo "__Decenomy__ binary not found, setting up environment..." + if [ ! -f /usr/local/bin/kyanited ]; then + echo "Kyanite binary not found, setting up environment..." apt-get update && \ apt-get install -y wget curl unzip && \ rm -rf /var/lib/apt/lists/* && \ - echo $(curl -s https://api.github.com/repos/decenomy/__DSW__/releases/latest | grep "browser_download_url" | grep -E "Linux(-x64)?\.zip" | cut -d '"' -f 4) > latest_release_url && \ + echo $(curl -s https://api.github.com/repos/decenomy/KYAN/releases/latest | grep "browser_download_url" | grep -E "Linux(-x64)?\.zip" | cut -d '"' -f 4) > latest_release_url && \ echo "Latest release URL: $(cat latest_release_url)" && \ echo $(basename "$(cat latest_release_url)") > latest_filename && \ echo "Latest filename: $(cat latest_filename)" && \ @@ -26,8 +26,8 @@ services: rm "$(cat latest_filename)" && \ rm latest_filename && \ rm latest_release_url && \ - mv __decenomy__* /usr/local/bin; + mv kyanite* /usr/local/bin; else - echo "__Decenomy__ binary already installed, skipping setup." + echo "Kyanite binary already installed, skipping setup." fi - __decenomy__d \ No newline at end of file + kyanited \ No newline at end of file From 4246cde955b115007d3bf8a21b4b86ce50c80fc6 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 10:46:42 +0000 Subject: [PATCH 34/39] adds UPGRADE_POS_V3 activation block --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index f51c56e5e..3ef254f9e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -266,7 +266,7 @@ class CMainParams : public CChainParams consensus.vUpgrades[Consensus::UPGRADE_MASTERNODE_RANK_V2].nActivationHeight = 3001; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].nActivationHeight = 1475000; consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; - consensus.vUpgrades[Consensus::UPGRADE_POS_V3].nActivationHeight = Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT; + consensus.vUpgrades[Consensus::UPGRADE_POS_V3].nActivationHeight = 1750000; consensus.vUpgrades[Consensus::UPGRADE_POS].hashActivationBlock = uint256S("a68286b8dd2d7730ab2025201b38020fa68592010ac3e4bcbeaf066b40533802"); consensus.vUpgrades[Consensus::UPGRADE_POS_V2].hashActivationBlock = uint256S("09daf9665ae60b0dbcef4d60ac4af43bf83837e3d8a89198d82e53fac00010fc"); @@ -276,7 +276,7 @@ class CMainParams : public CChainParams consensus.vUpgrades[Consensus::UPGRADE_P2PKH_BLOCK_SIGNATURES].hashActivationBlock = uint256S("2123647f29f91a35aa429913db96e666d7de476f1fc109a8298bf6f291b36584"); consensus.vUpgrades[Consensus::UPGRADE_STAKE_MIN_DEPTH_V2].hashActivationBlock = uint256S("04721c90cd55aa14dbf5cf0b24de60311b37b2deb0e98004b01b2e90c4d3b031"); consensus.vUpgrades[Consensus::UPGRADE_MASTERNODE_RANK_V2].hashActivationBlock = uint256S("8f7c1d65300983dbf2d99c70051d20470f0088275d6bca9a69fbb2b8597585b7"); - consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].hashActivationBlock = uint256S("0x0"); + consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_REWARDS].hashActivationBlock = uint256S("fb34d4dac7794c616b7894b06499d175ccecfbff7809a706842c5c7b3f41fc1b"); consensus.vUpgrades[Consensus::UPGRADE_DYNAMIC_COLLATERALS].hashActivationBlock = uint256S("0x0"); consensus.vUpgrades[Consensus::UPGRADE_POS_V3].hashActivationBlock = uint256S("0x0"); From f14fb70d393d70359377c61db8b2cdefb46d77a4 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 11:16:41 +0000 Subject: [PATCH 35/39] adds new checkpoints --- src/chainparams.cpp | 202 ++++++++++++++++++++++---------------------- 1 file changed, 99 insertions(+), 103 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3ef254f9e..0e7e39b15 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -71,114 +71,110 @@ static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits static Checkpoints::MapCheckpoints mapCheckpoints = boost::assign::map_list_of (0, uint256S("00000551e93eb0749d40dfafd54b092e78d6612b47bd40de8d099818f65f53c1")) - (12984, uint256S("211ee1715b57105b0e9a38d53aa0ff3a60992f9c37a6de5e7a0447e31550ad9b")) - (25969, uint256S("94960d54cc4a218b78e41fe3017f473f529b563486945bc8ace5e2c298502cd1")) - (38954, uint256S("db784f82088bb0d43dcd08164168d09e886a3fe6255b64887b4fab758873e603")) - (51939, uint256S("07bf87150fd0618190a20d9f6da4d6e735311e0e03ae2eca9fd242c6abddafac")) - (64924, uint256S("f073af3bc7eb18396267bfd2eb10630fcf778f8ed2d1d685f17baa2aec5120ec")) - (77909, uint256S("c43333640bae62784a1f34becb68ca33397b18e021f496b09afd40d37e2b67e6")) - (90894, uint256S("e133080e6d6827435b46bcaf6b0ed64465afa4c0628e885c67f396083e4e6f1a")) - (103879, uint256S("0416fea939de59eb6a343b421ecefc9cc3515d483c23d153d5aa4690c7ab95f2")) - (116864, uint256S("ef50f3918aae00f280d80da23a7114000b1a6cc31a162004f438983a5d5a32c8")) - (129849, uint256S("cac2e3bdd6251ac1acfddf14c24e54154012b34ff1be5fa6daff1352a7210589")) - (142834, uint256S("1c699c7aa4b9da9b0bba8bdadfc4e20aaceaa6c150e27e60e76215a018deb38f")) - (155819, uint256S("1fe98ae79f6ba0de31e244e2c4806c1ec683e0ffaaede65701908cf4f4ecb46d")) - (168804, uint256S("121a10fc40e76b6eeb886debbf0f0cd36f1ea4f304fbbfb1c1bc769ec4b329eb")) - (181789, uint256S("0441773edf8b34adbdba3930c37f33368a99e5a45a8915ffc655069e2e49ddb6")) - (194774, uint256S("b4e65fa4e631cd1b24e529e02c500d6c1f298f90746043294fcee36f207fd92c")) - (207759, uint256S("68316bb286773d0c1980956a50af4ad77905e48b746b9a31d4d7b33120affccc")) - (220744, uint256S("230f9db45628d8610e1aafc9f9b77d9ba7a47fb742c71defaac203c56fce92ce")) - (233729, uint256S("4d2e24136df2f4d248d780c6c42a4c6b8b259edcbb35ffe2f31b1fbe77d925b7")) - (246714, uint256S("1d7bbc8a14ae6f5f510ee27c34dae1f3a37471cad754b19fcaeb7f922baeebca")) - (259699, uint256S("a2b343f2f9bc60211a89645c2b5b6ad8e9e996e84cf76ae9efe8266a211b5132")) - (272684, uint256S("c0ce9af48abdca42266eb10c10654b1d346025494292b380c286f106c86b7753")) - (285669, uint256S("f9adfd663a7db8b67c80b27a9f74271c18442b99016f6d10f2fc9b60e212ed9b")) - (298654, uint256S("e05e5cae66711a4590264849560dfca5aed07e5fc25cb31c11f34e358f80e75d")) - (311639, uint256S("47818b19064216e378a2b5b497b4cd0c8ce77331609e1f189ea1ec02b697b9aa")) - (324624, uint256S("980bc345f37a31c31e34bc9b8992691d0dc4a6f38e76de274c091b6acf8da5bf")) - (337609, uint256S("d58e91f958c37b11fb2859a563e6cad09e5eb188d021bee1a9d5b1249300cd65")) - (350594, uint256S("db8edb4946bf75a1c6f96a89127b2ca2f144fae7ed0d71503ee67d7d5da09819")) - (363579, uint256S("34dab37ce153115bf8d6635c267c6a3724e70367067089ee2cfbc54fdc6dedf2")) - (376564, uint256S("f91b686d64b285fbc29a0e68a29e71071269658c6ab6af40cb534404925fd324")) - (389549, uint256S("b78026bf08d78001059794374f88898ab56dd85606de736def51ea9f0ca01a28")) - (402534, uint256S("bd8e88bec7cfc1fb9fe5445a32c5145d67cf5be537841441b1cef27c1ab6b7f6")) - (415519, uint256S("742f212b19636af7895940ff17a0220580b7e658141b3018f7ffdf6b92eda60e")) - (428504, uint256S("a5d35e1340b331b96b7eaefcb042017a6d8eddfaa16920e6ff8dd883393b579d")) - (441489, uint256S("93fd9599680a175e24e4b5ceb59e5e5df1cd59fc04c0485cbad31f5ea8a73611")) - (454474, uint256S("ddcb24e3d9c20139b7bc74ecdd1b7c17c9845113f7144f43c4961fdad7971a88")) - (467459, uint256S("177299201f4c3cdc51b963a82368a8740736375caf5876a22355d32e58316c5f")) - (480444, uint256S("dcef79cd7dfe41750a0697d46acd1b046ed5ee3f0da40a1e6c3d028f331025fd")) - (493429, uint256S("576e29b992a5eca7b1f3fd1a773052a43477ee1a3f13302da7321cab55371756")) - (506414, uint256S("98ab323c126cc62818a877ff110e0adf0f4dd9987eaedf21aa3d03f3ff9911d5")) - (519399, uint256S("fc83f66981e8ccd2aea095df6d3b9e0bebc0957b2e75841404a9186c20cfe4dc")) - (532384, uint256S("aec28b385c8d6ab9fe762dc5203032451dd05a828d6955c50255d8b8ad8215ef")) - (545369, uint256S("260a2159544f4e13c18defc0f5257d4bfc27eff35044c34ad2e70400404272d8")) - (558354, uint256S("f87dcf0c973eee49a7184a6dfca377a86a37f03783bcef1d56fbf2fc4efeb577")) - (571339, uint256S("3954ff17007b29df6f4cc21fd2dc5503ec886d10db47a84b041c5d580c9df4a0")) - (584324, uint256S("9cd44e2d7d30d7c0ba5dbdcdde9d0429a0bac89cf3d657795cc331006a768646")) - (597309, uint256S("a5cf7b7dc204d3c7f8a913d67d1f6d2eb4764fabbf7aedf222f98b55eb61f281")) - (610294, uint256S("ef82ae0824a4ff8296c3f6f3d6b5820c901fdb642897875612987f47ab011171")) - (623279, uint256S("d230d971413867b54d4735097af439b92eec0d284bf82a8b8232a59f90d7aef2")) - (636264, uint256S("ebeedf6761e989652afa2256c76700769b226c7f4a206f6e521ff2a3bbb41713")) - (649249, uint256S("5eb4c2a1d0c34cac6f91ca3d23799e697b6c0b8a03947dadf5e45058e1b487da")) - (662234, uint256S("fa88f266a3d412f4483444150fca6762d22858218e7519b94dc728d7996a2a43")) - (675219, uint256S("7c536c6d7356307e5fe1cf8635b642f952d21c2062da61dd8f621e4590101f4b")) - (688204, uint256S("b11a67a529a5b3fbe5248d9d8c7c580ebbe865309d5c5c98208235c60e5a473d")) - (701189, uint256S("0241038e5d542981489d81c0d4aa5843291d72d6d1f7e60aef1a28583d408196")) - (714174, uint256S("bd09add95a49436df48dc6a0beb515302dcf8e761578dc2fc80407b7bc40650d")) - (727159, uint256S("f74af8a919a5879f932996f8aa1dcc7b513bd6570ff045566b4ea3ca4f8b44d5")) - (740144, uint256S("83e8e35bfa1e51e14e504109704573ae8b5a3e9d9b974ef8c84ac73f28a5e5f3")) - (753129, uint256S("8be30dac301b976df11a6c73ef245e11095d051f61d0c99333409050850327f9")) - (766114, uint256S("98468fbb843d8d73fdea75fa5bac3ce79d8365897b436f49f25113632cdeb23f")) - (779099, uint256S("ac054231ac0cc316cbb7253f2200ccd9adc7c726bdc0764acbad680350ec551a")) - (792084, uint256S("f125cfb04c25a533a34800c2ee851a7547783d4ee798e2649af2eb6d93dd8b25")) - (805069, uint256S("ea4d96448fdca83084248796bf23dc1d68fb2a3854f201c21588727a29f85613")) - (818054, uint256S("a9b6e8eb0df0d4018537bf542588267bb0c9d1d5dadc668b380f89893746d448")) - (831039, uint256S("6cc6e21505edb9a3e0cf3dca32f73abcc9aa624a97a2cd0620a63e5dd5c37401")) - (844024, uint256S("b0d8f2164c726cb83213ed3a4a405cc469b6f0546971b613a1aba818e94dc886")) - (857009, uint256S("29db0b9df62930586e382254ceac576a7322d20d9395b32f1354077efa42a490")) - (869994, uint256S("7c843fb01ec318bbe10d454020f863442af2fad2d760c6e44c316cbc90a34b26")) - (882979, uint256S("b7a2a22ceea0b3d17711cd0d549444e58dc8205409660a980d4a7ab4997bd2db")) - (895964, uint256S("22f418fb4bba23ef0ff479d1ca8b431fdcebbe4b65acf689ed49bbd4ab1f2672")) - (908949, uint256S("5db3b8d1031a0e6ae6283c23d315417e8c78cb3f93078901359680720ac1de4a")) - (921934, uint256S("7e9144c97e551995100da617dc8749dcc34e749308361fa5f0e5eba1d7c16342")) - (934919, uint256S("8ca23faebfbd84c5275ac55dddf2b7897e1351c281aca313c1ce1a31aa70ab45")) - (947904, uint256S("7429692660299eee7fd7d9c8ea7e8a59ad2b8258094ab3c621111ef56ca3c1de")) - (960889, uint256S("129f70ef0e039bab36b1d3d158dcaf65800c5ed5693868c7abf64b243d45cd5d")) - (973874, uint256S("d9120c4f3507868a0155473c03b2ca0b9fed4b0b371756acdbaeca6e767f1d12")) - (986859, uint256S("699f62c9536dad7d8fdc2c258293e02a87f956b552a371b7ef0ca9f21bf587e4")) - (999844, uint256S("19da9403d6f22462eff83b340f07e89fa6bc5c6fb3e685e69abc50078ff9c553")) - (1012829, uint256S("1c933e2a1c2ca011eb2e5db85f098f6fd505f58cdae39b96a71030577f47a443")) - (1025814, uint256S("ef7d495e443e5e616bf02da42fa2481289b2bf5a9fca5a5c2777f0334df8826e")) - (1038799, uint256S("156797891a12d205668260e7791232ca06fcaa2f1b84200e6e37f7dd02656bb8")) - (1051784, uint256S("31c4803cc1e4a6d4f3872a3b1e5d8ee85856a86e0f070ec785d61db4c902cfb2")) - (1064769, uint256S("a4ce50ae510223e4c0713e19ecdc54fb970d8dfeb076feac3a3c4c4f84112552")) - (1077754, uint256S("5278ba287f1add7f3063e39b1ab4a238b878dd3b69ef64fc27a702792e8bb3ab")) - (1090739, uint256S("a121a7f284691e9a88f5c6cc597ec88b793bc97a0870cdf293f79b468532bace")) - (1103724, uint256S("9d29f50ce6a8c1dbfd5280dbe49a29b6ce4a1f62e8b66f9a8dbd979e66544fd9")) - (1116709, uint256S("c927e71a94c42aa69501453a273a4b8b263843284129b146f7c974a5d70fbd6d")) - (1129694, uint256S("afc1005342ab35ece2e94e86c5144264e1136145cd46517a1e2133401603466d")) - (1142679, uint256S("7e194ae77a513bd03366d4f5530ca8d1922cb36e6187a8e13a41d42e61656bb2")) - (1155664, uint256S("f72a09aa54d8eb80829e477601be47df559dfa266fd2cbf02f347a3efa504181")) - (1168649, uint256S("0f35a4776767bf2c9236eba0f75be25dfeb9b7d21a42b2fd387685f6cc151d04")) - (1181634, uint256S("02538e8ea78bc41e39c72985160e5bf30707cd2fb8572d723ae33d7466351ce4")) - (1194619, uint256S("122e07677b71508c97c6a589de7ec96a2f2a352060c0f361d4a94ecb16ee5e50")) - (1207604, uint256S("d4956fbfb47153e07860b020d2bfc9c93a82798fd7638d45c526d313a0d60ac5")) - (1220589, uint256S("b23304fd345c4d6455c3b044cef6860696884a9405b5bdeb4975f1a8c2e44504")) - (1233574, uint256S("e4e265e8d7315ee10a3af7ccf2f62cc89a28f347dba509e0c43acf87e70c2538")) - (1246559, uint256S("ea122f5c08fc56cb9f28106e65f00f7ea1af3d54d1000d59d008f331703d2ae1")) - (1259544, uint256S("9514e006d4458400342d4152b14625a8fa9ded18c86ea517b6bbf8c79181fb84")) - (1272529, uint256S("0bca5155117195fb0cacbf6e01f6855133f254fd38ff9c7a88910f38bd4aead9")) - (1285514, uint256S("ac86531689c8973afd6db06926b845c6623c1a46bd766ee2dfac6b313967b208")) - (1298504, uint256S("b14f1a40e8a4c28f45c054ab3a15e89694cf74cd08314311003f67e9082eb56d")) + (17431, uint256S("756fc5a48231f0a7422de24f5801e0c4ca8a14b428789b9e196c35fa7864eef5")) + (34863, uint256S("e41a7cd96e0a0bf01781243fc0ee7297d18891deacd0c4442ef39c7a3fe80332")) + (52295, uint256S("498140ca2fdce8a437e604019492469cf09e875ed11afbbfbe58b6d2dec5f3bc")) + (69727, uint256S("3b263bc8a912f5ee84eb0875aab5b982bf8c9c221d05e808a47ea2b25dc0b2b6")) + (87159, uint256S("bb0447caa8ef1f279b15a7bd8538095161563d073dfed79977de9bee0aa8947d")) + (104591, uint256S("2d25725c9be9e0dfdb003ceabda41b017e427a732260ed203fb7a83b2a798860")) + (122023, uint256S("5200c64ca58efdabfa15bc97b496347b0cbb1aa65924dd29c2823ac1668736ac")) + (139455, uint256S("5cd4a4025cae96dd4dd852a95b2ca132ff765204b762dacf01824ad7205b5c41")) + (156887, uint256S("ed0e2ec69bcf4b6387601e48a68ccf987a71bd745081013d1f2a257e11fcce0d")) + (174319, uint256S("1b61207ab3b14960cbe33b7148b65a8e88b62b44392fc7f2192a55322e3f43aa")) + (191751, uint256S("a0df3dd4450523bfb96133bb18d3dcf751cfcc315fe7eb3ec9ba6fddfffaae9d")) + (209183, uint256S("a646267e876ce897593af5353ac8e3fbb72435ae0a16a39199fc9487e18f30fc")) + (226615, uint256S("cc1056afa29a97510b4f695067a31a7af6f0cd5e2b33ac1cb38abf69575af79a")) + (244047, uint256S("6cbc0b06cac64a8e853c12286012437ac1a8aa5c126f3b23ca7a07943d76c3e0")) + (261479, uint256S("ed9ca144a4376812cf135fe4e258e78019bb5269f35fe1615d883e9861b02f68")) + (278911, uint256S("512b3e0ca8cee19b9b19c464895defb00d774e72827ef84c8bcf08a5b152a09d")) + (296343, uint256S("e22e78a53ad2821f9c5f1e5a96144a9eb34941b12cf1eaefb1ce3389a765036f")) + (313775, uint256S("fe356746a37acdb63ba46bb4848b8830f172b300a91bb7fa25786a00dafc22fd")) + (331207, uint256S("da8a0d76d5d1c7d1584964e2bde0273b52ba253803cf633a88e73268a5058c9e")) + (348639, uint256S("97781bbf4e323570269a170f7ae599a93f0fb6cab19cf62874df94f97145a5f5")) + (366071, uint256S("338114582c6af513f1d25618ff5ec4e9324b178cebe86f0cf250288855cc62e3")) + (383503, uint256S("169e9f134643c5cbe1df1a0a0e2c2981558c7ac39444927317eb37e999353a56")) + (400935, uint256S("5fe19a9634efbce37049804bb90dae8b1e95ccb084593419c5d67175873610f4")) + (418367, uint256S("daa8ac9ad02f47e4f2e2a5a278f67a528c10773ffb6c09fab0f3005305db9f15")) + (435799, uint256S("62f3cf203ab93313503ed8aae11176168df2d63e8716afb0f9f6b3e8af2f11d5")) + (453231, uint256S("5031139828d7aaec0fc0c27dd63b0d0e98d40e592e16546f4e9b77b1ca73ee71")) + (470663, uint256S("d5bc2a291b6c6564dbe80e67e2e150ffd2fe94657b99358f29d311d940001ac1")) + (488095, uint256S("eb9af35f8a4247cf2afd5dd30aeb941e245ad686543b7cc5a2a5422619653e50")) + (505527, uint256S("5fe30ace97370b5bf896d9f8dde9aee86c53db6420d2cc7229fded87c77875a0")) + (522959, uint256S("4e55ebd7b189f116d5431d6e554049d9d43a0d7ffc78cef72ff8fbf546965db2")) + (540391, uint256S("2a94be0b1b6c4f208fd05e001cb30cbfb5cf07213c1a90fce664b08c5e3b8f89")) + (557823, uint256S("daa3a0a887b8d54e51836398a5cf4d37ecbe0eea2a9d24468e1477ca7afa8348")) + (575255, uint256S("0d95e0183469bd2e9a6297975a2e5bcb91f568d165b02abdda9f4654cbffdce8")) + (592687, uint256S("9a5ef0a5efd31b4c02dabef51696d55815bfafa604d435b80880e8e814a6358e")) + (610119, uint256S("0394ec5a00450fd003f8c4f88ed1088e97ee5dff6ddbfbc16f01e510f582cdec")) + (627551, uint256S("ae1850fae1587085f11e0fef7957255daf22456e9df57a0edcb34d407cb7d9ab")) + (644983, uint256S("a4d989c067b929ac56b065a16a37cbb9d78d6447626696544c278b8602da435c")) + (662415, uint256S("3338f0e7bc6f7326d2360be21ccf5944bead898162f63ed6a2fd281be06dc5fa")) + (679847, uint256S("594a62eb358d0061b1b29174ec456f87eb7fe17001b2cdd2f725c565d7356c16")) + (697279, uint256S("c11c23a1fae5582ba0e8fc780b773d7c4924d93ffff110ac6262d1b6ca243f92")) + (714711, uint256S("07fde01496985fd13ebd9c809d576ba179c8828222b1d373acc06b72613b9957")) + (732143, uint256S("195e8fdc5a8b7f7c8ca66c75d2db32ffec6f575701c22d663b687a123f24e755")) + (749575, uint256S("e8217fac9a8df59f7748a891c5ec99261ddc6c48ae21c4f0965cc99dac826cd3")) + (767007, uint256S("f3312329aab732b1d29fcb5885bb7bc07d5bf557b7ed6a16b723a44c665e9696")) + (784439, uint256S("45d1be68043f13a59e8e65a5d8754402da2f9429466f211ae604a802268f7f42")) + (801871, uint256S("ae1df919fae83fe5ea0c905af02d07c902e1c7daf565f944b54087b9f963d1a5")) + (819303, uint256S("f4f16af660313ae3fc9d3a92a950a05b87d597c19d5d646804391bd7429730ba")) + (836735, uint256S("dd8e1163e606183b8face59b7c699b263b1b357a54ac28e569b86e9a60ac954d")) + (854167, uint256S("2f15f5d3ce263d88b770578bccd328eb6e7218451892b17eae0256c027317058")) + (871599, uint256S("b68a15d84f758cb06dff5ad29e2e0827a101da68d51608a0137dd4aa6027b31d")) + (889031, uint256S("5c0fa7e456238bbfe3ff47a48386baca9e3e1db19e52a440681ba1a38acfa546")) + (906463, uint256S("3f138e3659ee678bc4c14609d5a72ebdf55621bca140448e7a73aff8b83d4d5b")) + (923895, uint256S("172c5d90359a8ec818536b10efda507585485fe9399c9f88166ae2f803b1f037")) + (941327, uint256S("21df23010e639ad1b43183632d381bf684fa5c131ec640093734ba4cd1aa9df5")) + (958759, uint256S("08e584a345fe725f706066cd37a5ac494b0c5625521bdd596ef8466ce9e139f7")) + (976191, uint256S("4553f387efda60fc49ddc47e50f9adae81b81c5e0030d7a62509eab9392403e2")) + (993623, uint256S("80a2a1488ba2a874c078b351b106af3d343df9ec892dce56f145693d33851c1c")) + (1011055, uint256S("71ab49555acab62274a650134666fbe26915c220a5213f50bd8c5a3a9ee2880a")) + (1028487, uint256S("0e16dfcbc765112791ba1e3f580db284c2c627b66b1af06323ccda7ce0c1aeca")) + (1045919, uint256S("9575b2a1be653b87a8c2fa26a675adb4c7123cf4b0e63ca760db6dcb964f5792")) + (1063351, uint256S("4e3bd4d210997f145c6273e75a284633791f2c66352a78c26d4afab1b5057197")) + (1080783, uint256S("37127bbe788576243a629a4135f0bb46cfea90101a0b7f4debdae5fc44f8de9f")) + (1098215, uint256S("6dbbe155eb2a8bc5df5f961befaa98930a916023f038d5f672f07bd56ff48490")) + (1115647, uint256S("266b1470d2d966e7e24bbfefb7698d4106839b41635c3c7aa979ad337065f38b")) + (1133079, uint256S("b3533ebeb2176cb90ac20bc835b99b1830c0a5b003eeeeaf0f402c95229372a9")) + (1150511, uint256S("9d638915dfbf0a29a828e85bb041494ede9a918c1193cc8f8348cf4811c833ac")) + (1167943, uint256S("95161cc020a15fc1b70eb631ae733c4d225ddcdfad85ceb505dac3ace3b6ebdc")) + (1185375, uint256S("d1f4603f8ce29f14800b12fa96f86c5849ba0138f87c0d56a1a912cdb2161725")) + (1202807, uint256S("ae8136602f082fab203873b9f3a03a1dd3accc335ec51e033b8b8d08f7e19183")) + (1220329, uint256S("6496d3bf8732be53932b18e9d9ec0d4ab6d32b340b6f2b9a45f871a2b2c2ffbf")) + (1238010, uint256S("ac8062dcb632d697e098adcae4c389692b1ff9485daff1d0440812ab5a196fb2")) + (1255596, uint256S("5902e3b09a831112d3de2fb63a2f098309caca0fb4b3770d3dcdf5ae0b0a5d05")) + (1273262, uint256S("35ae6df0451fda29a77905d68fdbc81601ee5bc144bce0c79740d75861ca9347")) + (1290999, uint256S("5f05eea97876e36bd561b95124502a159dc301040735dd7a658ecf1431d96db3")) + (1308767, uint256S("5bfce49294053d4c1b8c5c1352cc7a25e925a880bd9c0ab259fa955b1b8f46ca")) + (1326430, uint256S("66a1bb8752c31822bcb24fe6d14277ad58c4eb7eac514cf544bec27dfabe5e8c")) + (1344290, uint256S("ae5b48605b3e3d85887c0de3e224c624d53e590b0942eb58f13d405d83222e34")) + (1362088, uint256S("7b1fc39808be08824230ec044b0c1a45c0c09c03c48fe2273898207b4c9b05d7")) + (1379749, uint256S("1da1779af8e2dfbfa2c2238b301cd9410d5b3ca1a9daf0dbe61b35c1cde0c815")) + (1397474, uint256S("4c35578cbb7992e47886ea8b70cf279614fc5c278faccec623f55eb8fc7d4fe5")) + (1415134, uint256S("3dfea97bace449be7b8428b02be382441c5f5c8099679ef390afe4090426bfca")) + (1432804, uint256S("ab07a549799c17d0ca7af2ee72ba90b2f5b29ecd4ca4fd9de6f47bc5f85067be")) + (1450531, uint256S("05674e36c4b5b8c550d12c96903350e5438b30bd809f57be1cce25405befced3")) + (1468213, uint256S("89720c153a7340307fb3d89e65440a7c0c0a5dea019df9a17ab81a8f64aa4761")) + (1485875, uint256S("45509c96f4bd58050bbc6f3a085ba4387fe5339c7cc63f1eee0069691b9ffc4a")) + (1503603, uint256S("812d659d80a959d13c627942dc2100fa36db216c611abdfadd2379952981d31c")) + (1523160, uint256S("880432f6423dff57e6d2601cfc0fd8dbf755933912991b1577b621330f1a597e")) + (1543801, uint256S("54dd193918b2054e3d4898e9cee1678cff406096a02c67fa5089faa21bf7664c")) + (1562794, uint256S("442489e61f88789e035daf652382937ddf7256a1ebb4c2fe6ebaecbdfa062df6")) + (1581648, uint256S("4f743f3685d416d01762006383929f700b511bde331bcdec86cef1d616780eca")) + (1600190, uint256S("94b5fc227c5a826967cc9fb2f14f8cda8c2ade60488e95b5fa96ea6277cde1e3")) + (1618979, uint256S("e2c97d0a21599d46e167165dcd3c619a74c5c48479e0e5b2991c12bcefb96e1c")) + (1637876, uint256S("6141d62052d23a1668f77c2386b7483244e25e9493e7d60983db44527016b5d8")) + (1657688, uint256S("1c318090bbf5d777ec1525bcc03de940fc594cb066ba5954cd4daa2b745f80bb")) + (1677186, uint256S("b5e2a4d63eecd596dd8efa74c56f8c7f4f2e5c1a89f1ae2ed58cc4b9944108d5")) + (1696465, uint256S("0a5d75cd9193e0d4e61e9acf23b4649926b5b33e1c7275c234be53e0b60e810f")) ; static const Checkpoints::CCheckpointData data = { &mapCheckpoints, - 1707563835, // * UNIX timestamp of last checkpoint block - 2768673, // * total number of transactions between genesis and last checkpoint + 1731999990, // * UNIX timestamp of last checkpoint block + 3583075, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the UpdateTip debug.log lines) - 2822 // * estimated number of transactions per day after checkpoint. 2000 for 10 minutes of bitcoin blockchain (1M block size). With 2M of block size and 1 minute of block time, this field should be around 4000 * 10 * 6 * 24 = 5760000 + 2814 // * estimated number of transactions per day after checkpoint. 2000 for 10 minutes of bitcoin blockchain (1M block size). With 2M of block size and 1 minute of block time, this field should be around 4000 * 10 * 6 * 24 = 5760000 }; static Checkpoints::MapCheckpoints mapCheckpointsTestnet = From 46b8126c237fcf39db9c9c3d5d0c9434aede7334 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 11:17:28 +0000 Subject: [PATCH 36/39] bumps protocol version --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 7b6830109..5537860b2 100644 --- a/src/version.h +++ b/src/version.h @@ -12,7 +12,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70227; +static const int PROTOCOL_VERSION = 70228; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; From d407ec15e098f5fc1fc713013a7d3145d9cdf7df Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 11:17:59 +0000 Subject: [PATCH 37/39] bumps version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d271859a6..e7c362bf5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 1) -define(_CLIENT_VERSION_REVISION, 6) +define(_CLIENT_VERSION_REVISION, 7) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) From dba57620df09253e4c9cb695adac732ba25b9e74 Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 14:24:42 +0000 Subject: [PATCH 38/39] reduces the number of checkpoints --- src/chainparams.cpp | 111 +++++--------------------------------------- 1 file changed, 12 insertions(+), 99 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 0e7e39b15..1b19ff65d 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -71,110 +71,23 @@ static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits static Checkpoints::MapCheckpoints mapCheckpoints = boost::assign::map_list_of (0, uint256S("00000551e93eb0749d40dfafd54b092e78d6612b47bd40de8d099818f65f53c1")) - (17431, uint256S("756fc5a48231f0a7422de24f5801e0c4ca8a14b428789b9e196c35fa7864eef5")) - (34863, uint256S("e41a7cd96e0a0bf01781243fc0ee7297d18891deacd0c4442ef39c7a3fe80332")) - (52295, uint256S("498140ca2fdce8a437e604019492469cf09e875ed11afbbfbe58b6d2dec5f3bc")) - (69727, uint256S("3b263bc8a912f5ee84eb0875aab5b982bf8c9c221d05e808a47ea2b25dc0b2b6")) - (87159, uint256S("bb0447caa8ef1f279b15a7bd8538095161563d073dfed79977de9bee0aa8947d")) - (104591, uint256S("2d25725c9be9e0dfdb003ceabda41b017e427a732260ed203fb7a83b2a798860")) - (122023, uint256S("5200c64ca58efdabfa15bc97b496347b0cbb1aa65924dd29c2823ac1668736ac")) - (139455, uint256S("5cd4a4025cae96dd4dd852a95b2ca132ff765204b762dacf01824ad7205b5c41")) - (156887, uint256S("ed0e2ec69bcf4b6387601e48a68ccf987a71bd745081013d1f2a257e11fcce0d")) - (174319, uint256S("1b61207ab3b14960cbe33b7148b65a8e88b62b44392fc7f2192a55322e3f43aa")) - (191751, uint256S("a0df3dd4450523bfb96133bb18d3dcf751cfcc315fe7eb3ec9ba6fddfffaae9d")) - (209183, uint256S("a646267e876ce897593af5353ac8e3fbb72435ae0a16a39199fc9487e18f30fc")) - (226615, uint256S("cc1056afa29a97510b4f695067a31a7af6f0cd5e2b33ac1cb38abf69575af79a")) - (244047, uint256S("6cbc0b06cac64a8e853c12286012437ac1a8aa5c126f3b23ca7a07943d76c3e0")) - (261479, uint256S("ed9ca144a4376812cf135fe4e258e78019bb5269f35fe1615d883e9861b02f68")) - (278911, uint256S("512b3e0ca8cee19b9b19c464895defb00d774e72827ef84c8bcf08a5b152a09d")) - (296343, uint256S("e22e78a53ad2821f9c5f1e5a96144a9eb34941b12cf1eaefb1ce3389a765036f")) - (313775, uint256S("fe356746a37acdb63ba46bb4848b8830f172b300a91bb7fa25786a00dafc22fd")) - (331207, uint256S("da8a0d76d5d1c7d1584964e2bde0273b52ba253803cf633a88e73268a5058c9e")) - (348639, uint256S("97781bbf4e323570269a170f7ae599a93f0fb6cab19cf62874df94f97145a5f5")) - (366071, uint256S("338114582c6af513f1d25618ff5ec4e9324b178cebe86f0cf250288855cc62e3")) - (383503, uint256S("169e9f134643c5cbe1df1a0a0e2c2981558c7ac39444927317eb37e999353a56")) - (400935, uint256S("5fe19a9634efbce37049804bb90dae8b1e95ccb084593419c5d67175873610f4")) - (418367, uint256S("daa8ac9ad02f47e4f2e2a5a278f67a528c10773ffb6c09fab0f3005305db9f15")) - (435799, uint256S("62f3cf203ab93313503ed8aae11176168df2d63e8716afb0f9f6b3e8af2f11d5")) - (453231, uint256S("5031139828d7aaec0fc0c27dd63b0d0e98d40e592e16546f4e9b77b1ca73ee71")) - (470663, uint256S("d5bc2a291b6c6564dbe80e67e2e150ffd2fe94657b99358f29d311d940001ac1")) - (488095, uint256S("eb9af35f8a4247cf2afd5dd30aeb941e245ad686543b7cc5a2a5422619653e50")) - (505527, uint256S("5fe30ace97370b5bf896d9f8dde9aee86c53db6420d2cc7229fded87c77875a0")) - (522959, uint256S("4e55ebd7b189f116d5431d6e554049d9d43a0d7ffc78cef72ff8fbf546965db2")) - (540391, uint256S("2a94be0b1b6c4f208fd05e001cb30cbfb5cf07213c1a90fce664b08c5e3b8f89")) - (557823, uint256S("daa3a0a887b8d54e51836398a5cf4d37ecbe0eea2a9d24468e1477ca7afa8348")) - (575255, uint256S("0d95e0183469bd2e9a6297975a2e5bcb91f568d165b02abdda9f4654cbffdce8")) - (592687, uint256S("9a5ef0a5efd31b4c02dabef51696d55815bfafa604d435b80880e8e814a6358e")) - (610119, uint256S("0394ec5a00450fd003f8c4f88ed1088e97ee5dff6ddbfbc16f01e510f582cdec")) - (627551, uint256S("ae1850fae1587085f11e0fef7957255daf22456e9df57a0edcb34d407cb7d9ab")) - (644983, uint256S("a4d989c067b929ac56b065a16a37cbb9d78d6447626696544c278b8602da435c")) - (662415, uint256S("3338f0e7bc6f7326d2360be21ccf5944bead898162f63ed6a2fd281be06dc5fa")) - (679847, uint256S("594a62eb358d0061b1b29174ec456f87eb7fe17001b2cdd2f725c565d7356c16")) - (697279, uint256S("c11c23a1fae5582ba0e8fc780b773d7c4924d93ffff110ac6262d1b6ca243f92")) - (714711, uint256S("07fde01496985fd13ebd9c809d576ba179c8828222b1d373acc06b72613b9957")) - (732143, uint256S("195e8fdc5a8b7f7c8ca66c75d2db32ffec6f575701c22d663b687a123f24e755")) - (749575, uint256S("e8217fac9a8df59f7748a891c5ec99261ddc6c48ae21c4f0965cc99dac826cd3")) - (767007, uint256S("f3312329aab732b1d29fcb5885bb7bc07d5bf557b7ed6a16b723a44c665e9696")) - (784439, uint256S("45d1be68043f13a59e8e65a5d8754402da2f9429466f211ae604a802268f7f42")) - (801871, uint256S("ae1df919fae83fe5ea0c905af02d07c902e1c7daf565f944b54087b9f963d1a5")) - (819303, uint256S("f4f16af660313ae3fc9d3a92a950a05b87d597c19d5d646804391bd7429730ba")) - (836735, uint256S("dd8e1163e606183b8face59b7c699b263b1b357a54ac28e569b86e9a60ac954d")) - (854167, uint256S("2f15f5d3ce263d88b770578bccd328eb6e7218451892b17eae0256c027317058")) - (871599, uint256S("b68a15d84f758cb06dff5ad29e2e0827a101da68d51608a0137dd4aa6027b31d")) - (889031, uint256S("5c0fa7e456238bbfe3ff47a48386baca9e3e1db19e52a440681ba1a38acfa546")) - (906463, uint256S("3f138e3659ee678bc4c14609d5a72ebdf55621bca140448e7a73aff8b83d4d5b")) - (923895, uint256S("172c5d90359a8ec818536b10efda507585485fe9399c9f88166ae2f803b1f037")) - (941327, uint256S("21df23010e639ad1b43183632d381bf684fa5c131ec640093734ba4cd1aa9df5")) - (958759, uint256S("08e584a345fe725f706066cd37a5ac494b0c5625521bdd596ef8466ce9e139f7")) - (976191, uint256S("4553f387efda60fc49ddc47e50f9adae81b81c5e0030d7a62509eab9392403e2")) - (993623, uint256S("80a2a1488ba2a874c078b351b106af3d343df9ec892dce56f145693d33851c1c")) - (1011055, uint256S("71ab49555acab62274a650134666fbe26915c220a5213f50bd8c5a3a9ee2880a")) - (1028487, uint256S("0e16dfcbc765112791ba1e3f580db284c2c627b66b1af06323ccda7ce0c1aeca")) - (1045919, uint256S("9575b2a1be653b87a8c2fa26a675adb4c7123cf4b0e63ca760db6dcb964f5792")) - (1063351, uint256S("4e3bd4d210997f145c6273e75a284633791f2c66352a78c26d4afab1b5057197")) - (1080783, uint256S("37127bbe788576243a629a4135f0bb46cfea90101a0b7f4debdae5fc44f8de9f")) - (1098215, uint256S("6dbbe155eb2a8bc5df5f961befaa98930a916023f038d5f672f07bd56ff48490")) - (1115647, uint256S("266b1470d2d966e7e24bbfefb7698d4106839b41635c3c7aa979ad337065f38b")) - (1133079, uint256S("b3533ebeb2176cb90ac20bc835b99b1830c0a5b003eeeeaf0f402c95229372a9")) - (1150511, uint256S("9d638915dfbf0a29a828e85bb041494ede9a918c1193cc8f8348cf4811c833ac")) - (1167943, uint256S("95161cc020a15fc1b70eb631ae733c4d225ddcdfad85ceb505dac3ace3b6ebdc")) - (1185375, uint256S("d1f4603f8ce29f14800b12fa96f86c5849ba0138f87c0d56a1a912cdb2161725")) - (1202807, uint256S("ae8136602f082fab203873b9f3a03a1dd3accc335ec51e033b8b8d08f7e19183")) - (1220329, uint256S("6496d3bf8732be53932b18e9d9ec0d4ab6d32b340b6f2b9a45f871a2b2c2ffbf")) - (1238010, uint256S("ac8062dcb632d697e098adcae4c389692b1ff9485daff1d0440812ab5a196fb2")) - (1255596, uint256S("5902e3b09a831112d3de2fb63a2f098309caca0fb4b3770d3dcdf5ae0b0a5d05")) - (1273262, uint256S("35ae6df0451fda29a77905d68fdbc81601ee5bc144bce0c79740d75861ca9347")) - (1290999, uint256S("5f05eea97876e36bd561b95124502a159dc301040735dd7a658ecf1431d96db3")) - (1308767, uint256S("5bfce49294053d4c1b8c5c1352cc7a25e925a880bd9c0ab259fa955b1b8f46ca")) - (1326430, uint256S("66a1bb8752c31822bcb24fe6d14277ad58c4eb7eac514cf544bec27dfabe5e8c")) - (1344290, uint256S("ae5b48605b3e3d85887c0de3e224c624d53e590b0942eb58f13d405d83222e34")) - (1362088, uint256S("7b1fc39808be08824230ec044b0c1a45c0c09c03c48fe2273898207b4c9b05d7")) - (1379749, uint256S("1da1779af8e2dfbfa2c2238b301cd9410d5b3ca1a9daf0dbe61b35c1cde0c815")) - (1397474, uint256S("4c35578cbb7992e47886ea8b70cf279614fc5c278faccec623f55eb8fc7d4fe5")) - (1415134, uint256S("3dfea97bace449be7b8428b02be382441c5f5c8099679ef390afe4090426bfca")) - (1432804, uint256S("ab07a549799c17d0ca7af2ee72ba90b2f5b29ecd4ca4fd9de6f47bc5f85067be")) - (1450531, uint256S("05674e36c4b5b8c550d12c96903350e5438b30bd809f57be1cce25405befced3")) - (1468213, uint256S("89720c153a7340307fb3d89e65440a7c0c0a5dea019df9a17ab81a8f64aa4761")) - (1485875, uint256S("45509c96f4bd58050bbc6f3a085ba4387fe5339c7cc63f1eee0069691b9ffc4a")) - (1503603, uint256S("812d659d80a959d13c627942dc2100fa36db216c611abdfadd2379952981d31c")) - (1523160, uint256S("880432f6423dff57e6d2601cfc0fd8dbf755933912991b1577b621330f1a597e")) - (1543801, uint256S("54dd193918b2054e3d4898e9cee1678cff406096a02c67fa5089faa21bf7664c")) - (1562794, uint256S("442489e61f88789e035daf652382937ddf7256a1ebb4c2fe6ebaecbdfa062df6")) - (1581648, uint256S("4f743f3685d416d01762006383929f700b511bde331bcdec86cef1d616780eca")) - (1600190, uint256S("94b5fc227c5a826967cc9fb2f14f8cda8c2ade60488e95b5fa96ea6277cde1e3")) - (1618979, uint256S("e2c97d0a21599d46e167165dcd3c619a74c5c48479e0e5b2991c12bcefb96e1c")) - (1637876, uint256S("6141d62052d23a1668f77c2386b7483244e25e9493e7d60983db44527016b5d8")) - (1657688, uint256S("1c318090bbf5d777ec1525bcc03de940fc594cb066ba5954cd4daa2b745f80bb")) - (1677186, uint256S("b5e2a4d63eecd596dd8efa74c56f8c7f4f2e5c1a89f1ae2ed58cc4b9944108d5")) - (1696465, uint256S("0a5d75cd9193e0d4e61e9acf23b4649926b5b33e1c7275c234be53e0b60e810f")) + (169669, uint256S("ece5ec203160de0b91842e319cc4dd5660e5adbbe4d0541fabb96bdc8289fb6b")) + (339339, uint256S("e5d68479a10a9d1ede4638fac6523dcd58dec879fc2a2d73ecb86c344c65cc2a")) + (509009, uint256S("c2c6a3b0ed9fd4091f4e8fb67ccdcfba7fdf92a1f8c1c691f810154462806927")) + (678679, uint256S("de3eecfc95d12b4fc231ae483a603c6e28ee42f6dc9bf807a9f515fe09dcd325")) + (848349, uint256S("f2d3f40231fcd46b86f1acf1b79e3b9d47563ef36ad504be7d50b52b10ca241b")) + (1018019, uint256S("6faa8c962109566ec2bd4cd3bf322a61e6460849b340f59f16038dcecdb5ca1a")) + (1187689, uint256S("ea6301128708ef77e2779a772bbcef9db8c7c14a7bac12b2c19e600e7c081281")) + (1357359, uint256S("43595fed114bb51abe801fcb31989f10839677cbcfc6b100719f3e1bd85d49fb")) + (1527029, uint256S("250ab167903b750aa338fd03576feda90e2974fd35e5ef3851db7f02e914fb75")) ; static const Checkpoints::CCheckpointData data = { &mapCheckpoints, - 1731999990, // * UNIX timestamp of last checkpoint block - 3583075, // * total number of transactions between genesis and last checkpoint + 1721598600, // * UNIX timestamp of last checkpoint block + 3240675, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the UpdateTip debug.log lines) - 2814 // * estimated number of transactions per day after checkpoint. 2000 for 10 minutes of bitcoin blockchain (1M block size). With 2M of block size and 1 minute of block time, this field should be around 4000 * 10 * 6 * 24 = 5760000 + 2826 // * estimated number of transactions per day after checkpoint. 2000 for 10 minutes of bitcoin blockchain (1M block size). With 2M of block size and 1 minute of block time, this field should be around 4000 * 10 * 6 * 24 = 5760000 }; static Checkpoints::MapCheckpoints mapCheckpointsTestnet = From 704e36c634ea0ed1061e6a8b2b54e88e805da37d Mon Sep 17 00:00:00 2001 From: pedro-at-decenomy Date: Tue, 19 Nov 2024 14:29:38 +0000 Subject: [PATCH 39/39] disable SPORK_116_TOT_SPLY_TRGT_EMISSION and SPORK_117_CIRC_SPLY_TRGT_EMISSION sporks, the dynamic rewards value will be determined by constant values --- src/rewards.cpp | 4 ++-- src/rewards.h | 3 +++ src/spork.cpp | 4 ++-- src/sporkid.h | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/rewards.cpp b/src/rewards.cpp index 5bc227de3..4b23699bb 100644 --- a/src/rewards.cpp +++ b/src/rewards.cpp @@ -286,9 +286,9 @@ bool CRewards::ConnectBlock(CBlockIndex* pindex, CAmount nSubsidy, CCoinsViewCac oss << "nCirculatingSupply without staked coins: " << FormatMoney(nCirculatingSupply) << std::endl; // calculate target emissions - const auto nTotalEmissionRate = sporkManager.GetSporkValue(SPORK_116_TOT_SPLY_TRGT_EMISSION); + const auto nTotalEmissionRate = TOT_SPLY_TRGT_EMISSION; oss << "nTotalEmissionRate: " << nTotalEmissionRate << std::endl; - const auto nCirculatingEmissionRate = sporkManager.GetSporkValue(SPORK_117_CIRC_SPLY_TRGT_EMISSION); + const auto nCirculatingEmissionRate = CIRC_SPLY_TRGT_EMISSION; oss << "nCirculatingEmissionRate: " << nCirculatingEmissionRate << std::endl; const auto nActualEmission = nSubsidy * nRewardAdjustmentInterval; oss << "nActualEmission: " << FormatMoney(nActualEmission) << std::endl; diff --git a/src/rewards.h b/src/rewards.h index 6a9234c5b..2f67cb3ba 100644 --- a/src/rewards.h +++ b/src/rewards.h @@ -9,6 +9,9 @@ #include "main.h" +static const int64_t TOT_SPLY_TRGT_EMISSION = 50000; +static const int64_t CIRC_SPLY_TRGT_EMISSION = 100000; + class CBlockchainStatus { public: diff --git a/src/spork.cpp b/src/spork.cpp index c6d11226f..b0bcc31a0 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -32,8 +32,6 @@ std::vector sporkDefs = { MAKE_SPORK_DEF(SPORK_112_MASTERNODE_LAST_PAID_V2, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_114_MN_PAYMENT_V2, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_115_MN_COLLATERAL_WINDOW, 4070908800ULL), // OFF - MAKE_SPORK_DEF(SPORK_116_TOT_SPLY_TRGT_EMISSION, 50000ULL), // 5% - MAKE_SPORK_DEF(SPORK_117_CIRC_SPLY_TRGT_EMISSION, 100000ULL), // 10% MAKE_SPORK_DEF(SPORK_118_MIN_BASE_FEE, 0ULL), // OFF MAKE_SPORK_DEF(SPORK_119_MIN_ECON_FEE, 0ULL), // OFF @@ -52,6 +50,8 @@ std::vector sporkDefs = { MAKE_SPORK_DEF(SPORK_18_NOOP, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_19_NOOP, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_113_NOOP, 4070908800ULL), // OFF + MAKE_SPORK_DEF(SPORK_116_NOOP, 4070908800ULL), // OFF + MAKE_SPORK_DEF(SPORK_117_NOOP, 4070908800ULL), // OFF }; CSporkManager sporkManager; diff --git a/src/sporkid.h b/src/sporkid.h index 46195a427..aac59d608 100644 --- a/src/sporkid.h +++ b/src/sporkid.h @@ -30,8 +30,6 @@ enum SporkId : int32_t { SPORK_112_MASTERNODE_LAST_PAID_V2 = 10111, SPORK_114_MN_PAYMENT_V2 = 10113, SPORK_115_MN_COLLATERAL_WINDOW = 10114, - SPORK_116_TOT_SPLY_TRGT_EMISSION = 10115, - SPORK_117_CIRC_SPLY_TRGT_EMISSION = 10116, SPORK_118_MIN_BASE_FEE = 10117, SPORK_119_MIN_ECON_FEE = 10118, @@ -50,6 +48,8 @@ enum SporkId : int32_t { SPORK_18_NOOP = 10017, SPORK_19_NOOP = 10018, SPORK_113_NOOP = 10112, + SPORK_116_NOOP = 10115, + SPORK_117_NOOP = 10116, SPORK_INVALID = -1 };