Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/dashpay/dash into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Nov 6, 2024
2 parents 29efcdf + a8e2316 commit 8c7cce4
Show file tree
Hide file tree
Showing 166 changed files with 8,853 additions and 24,523 deletions.
28 changes: 14 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ task:
QEMU_USER_CMD: "" # Disable qemu and run the test natively

task:
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [focal]'
name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_win64.sh"

Expand All @@ -87,12 +87,12 @@ task:
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"

task:
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [focal]'
name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [jammy]'
# For faster CI feedback, immediately schedule a task that compiles most modules
<< : *CREDITS_TEMPLATE
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh"

Expand All @@ -108,10 +108,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh"

task:
name: '[depends, sanitizers: memory (MSan)] [focal]'
name: '[depends, sanitizers: memory (MSan)] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"

Expand All @@ -124,40 +124,40 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"

task:
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [focal]'
name: '[no depends, sanitizers: fuzzer,address,undefined,integer] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
cpu: 4 # Increase CPU and memory to avoid timeout
memory: 16G
env:
MAKEJOBS: "-j8"
FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh"

task:
name: '[multiprocess, DEBUG] [focal]'
name: '[multiprocess, DEBUG] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
cpu: 4
memory: 16G # The default memory is sometimes just a bit too small, so double everything
env:
MAKEJOBS: "-j8"
FILE_ENV: "./ci/test/00_setup_env_native_multiprocess.sh"

task:
name: '[no wallet] [focal]'
name: '[no wallet] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"

task:
name: 'macOS 10.12 [gui, no tests] [focal]'
name: 'macOS 10.12 [gui, no tests] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:focal
image: ubuntu:jammy
env:
FILE_ENV: "./ci/test/00_setup_env_mac.sh"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
jobs:
build-image:
name: Build Image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
image-tag: ${{ steps.prepare.outputs.image-tag }}
repo-name: ${{ steps.prepare.outputs.repo-name }}
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
build-depends:
name: Build Dependencies
needs: build-image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
build:
name: Build
needs: [build-image, build-depends]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
# test:
# name: Test
# needs: [build-image, build]
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# container:
# image: ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-ci-runner:${{ needs.build-image.outputs.image-tag }}
# options: --user root
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: "ubuntu:focal"
image: "ubuntu:jammy"

variables:
DOCKER_DRIVER: overlay2
Expand Down
4 changes: 0 additions & 4 deletions ci/dash/build_src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,3 @@ fi
if [ "$RUN_SECURITY_TESTS" = "true" ]; then
make test-security-check
fi

if [ "$RUN_SYMBOL_TESTS" = "true" ]; then
make $MAKEJOBS -C src check-symbols
fi
1 change: 0 additions & 1 deletion ci/test/00_setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
export TEST_RUNNER_ENV=${TEST_RUNNER_ENV:-}
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
export RUN_SYMBOL_TESTS=${RUN_SYMBOL_TESTS:-false}
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}

export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}
Expand Down
1 change: 0 additions & 1 deletion ci/test/00_setup_env_native_qt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ export RUN_UNIT_TESTS="false"
export GOAL="install"
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0 v20.0.1"
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports --disable-fuzz-binary LDFLAGS=-static-libstdc++ --with-boost-process"
export RUN_SYMBOL_TESTS="true"
4 changes: 2 additions & 2 deletions contrib/containers/ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy

# Needed to prevent tzdata hanging while expecting user input
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
Expand All @@ -11,7 +11,7 @@ ENV APT_ARGS="-y --no-install-recommends --no-upgrade"
# Install packages for i386; disabled on aarch64 and arm64 hosts
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || dpkg --add-architecture i386)
RUN (dpkg --print-architecture | grep -Eq 'aarch64|arm64' || (apt-get update && apt-get install $APT_ARGS \
g++-9-multilib \
g++-multilib \
wine32) && rm -rf /var/lib/apt/lists/*)

RUN apt-get update && apt-get install $APT_ARGS \
Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/baseimage:focal-1.0.0
FROM phusion/baseimage:jammy-1.0.4
LABEL maintainer="Dash Developers <[email protected]>"
LABEL description="Dockerised DashCore, built from CI"

Expand Down
4 changes: 2 additions & 2 deletions contrib/containers/deploy/Dockerfile.GitHubActions.Dispatch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3

FROM --platform=$BUILDPLATFORM ubuntu:focal as builder
FROM --platform=$BUILDPLATFORM ubuntu:jammy as builder
RUN apt-get update && \
apt-get -y install --no-install-recommends \
automake \
Expand Down Expand Up @@ -42,7 +42,7 @@ RUN mkdir built-target && \
"linux/amd64") cp depends/x86_64-pc-linux-gnu/bin/dash* /home/dash/built-target ;; \
esac

FROM ubuntu:focal
FROM ubuntu:jammy
LABEL maintainer="Dash Developers <[email protected]>"
LABEL description="Dockerised DashCore"

Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/develop/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = edrevo/dockerfile-plus

FROM ubuntu:focal
FROM ubuntu:jammy

INCLUDE+ ci/Dockerfile

Expand Down
2 changes: 1 addition & 1 deletion contrib/containers/guix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to use 'docker compose run guix_ubuntu' to drop into an
# interactive shell

FROM ubuntu:focal
FROM ubuntu:jammy

SHELL ["/bin/bash", "-c"]

Expand Down
5 changes: 5 additions & 0 deletions src/evo/cbtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ std::optional<CCbTx> GetCoinbaseTx(const CBlockIndex* pindex)
return std::nullopt;
}

// There's no CbTx before DIP0003 activation
if (!DeploymentActiveAt(*pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0003)) {
return std::nullopt;
}

CBlock block;
if (!ReadBlockFromDisk(block, pindex, Params().GetConsensus())) {
return std::nullopt;
Expand Down
2 changes: 2 additions & 0 deletions src/immer/.gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Load pretty printers
source tools/gdb_pretty_printers/autoload.py
26 changes: 26 additions & 0 deletions src/immer/.github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'immer'
dry-run: false
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'immer'
fuzz-seconds: 300
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
35 changes: 20 additions & 15 deletions src/immer/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,46 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # needed for fetchGit in default.nix
- uses: cachix/install-nix-action@v12
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: "https://releases.nixos.org/nix/nix-2.3.16/install"
- uses: cachix/cachix-action@v8
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build

build-spm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: swift build

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: cachix/install-nix-action@v12
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: "https://releases.nixos.org/nix/nix-2.3.16/install"
- uses: cachix/cachix-action@v8
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --run "mkdir build"
- run: nix-shell --run "cd build && cmake .."
- run: nix-shell --run "cd build && make docs"
- uses: shimataro/ssh-key-action@v2
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.repository_owner == 'arximboldi'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix-shell --run "cd build && make upload-docs"
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && github.repository_owner == 'arximboldi'

check:
strategy:
Expand Down Expand Up @@ -74,7 +80,7 @@ jobs:
- type: Debug
toolchain: llvm-8
std: 14
opts: ['sanitizer']
opts: ['sanitize']
# benchmarks
- type: Release
toolchain: gnu-9
Expand All @@ -87,11 +93,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: "https://releases.nixos.org/nix/nix-2.3.16/install"
- uses: cachix/cachix-action@v8
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
Expand All @@ -113,11 +118,11 @@ jobs:
"
- run: nix-shell --argstr toolchain ${{ matrix.toolchain }} --run "cd build && make check -j`nproc`"
- run: nix-shell --argstr toolchain ${{ matrix.toolchain }} --run "bash <(curl -s https://codecov.io/bash)"
if: ${{ contains(matrix.opts, 'coverage') }}
if: contains(matrix.opts, 'coverage')
- uses: shimataro/ssh-key-action@v2
if: ${{ contains(matrix.opts, 'benchmark') }}
if: contains(matrix.opts, 'benchmark') && github.repository_owner == 'arximboldi'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix-shell --run "cd build && make upload-benchmark-reports"
if: ${{ contains(matrix.opts, 'benchmark') }}
if: contains(matrix.opts, 'benchmark') && github.repository_owner == 'arximboldi'
5 changes: 5 additions & 0 deletions src/immer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ __pycache__
tools/clojure/.lein*

*.pyc

/result*

.build
.swiftpm
12 changes: 11 additions & 1 deletion src/immer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy(SET CMP0048 NEW) # enable project VERSION
cmake_policy(SET CMP0056 NEW) # honor link flags in try_compile()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

project(immer VERSION 0.7.0)
project(immer VERSION 0.8.0)

if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-extended-offsetof -Wno-c++17-extensions -Wno-c++1z-extensions -Wno-unknown-warning-option -Wno-type-limits")
Expand Down Expand Up @@ -99,6 +99,14 @@ install(TARGETS immer EXPORT ImmerConfig)
install(EXPORT ImmerConfig DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Immer")
install(DIRECTORY immer DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/ImmerConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion )

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ImmerConfigVersion.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Immer" )

# development target to be used in tests, examples, benchmarks...
immer_canonicalize_cmake_booleans(
DISABLE_FREE_LIST
Expand Down Expand Up @@ -131,6 +139,8 @@ endif()
if (immer_BUILD_TESTS)
enable_testing()

find_package(Catch2 REQUIRED)

add_custom_target(check
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Expand Down
Loading

0 comments on commit 8c7cce4

Please sign in to comment.