diff options
Diffstat (limited to '')
750 files changed, 2526 insertions, 1605 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f8e39903..801f85b7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: env: CCACHE_TEMPDIR: /tmp/.ccache-temp steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: /Users/runner/Library/Caches/ccache key: ccache-${{ runner.os }}-build-${{ github.sha }} @@ -54,15 +54,15 @@ jobs: run: shell: msys2 {0} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: C:\Users\runneradmin\.ccache key: ccache-${{ runner.os }}-build-${{ github.sha }} restore-keys: ccache-${{ runner.os }}-build- - - uses: eine/setup-msys2@v2 + - uses: msys2/setup-msys2@v2 with: update: true install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git @@ -82,10 +82,10 @@ jobs: matrix: os: [ubuntu-22.04, ubuntu-20.04] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.ccache key: ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }} @@ -108,10 +108,10 @@ jobs: env: CCACHE_TEMPDIR: /tmp/.ccache-temp steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.ccache key: ccache-${{ runner.os }}-libwallet-${{ github.sha }} @@ -136,11 +136,11 @@ jobs: env: CCACHE_TEMPDIR: /tmp/.ccache-temp steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: recursive - name: ccache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.ccache key: ccache-${{ runner.os }}-build-ubuntu-latest-${{ github.sha }} @@ -170,8 +170,9 @@ jobs: source-archive: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: + fetch-depth: 0 submodules: recursive - name: archive run: | @@ -180,7 +181,7 @@ jobs: export OUTPUT="$VERSION.tar" echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV /home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ env.OUTPUT }} path: /home/runner/work/monero/monero/${{ env.OUTPUT }} diff --git a/.github/workflows/depends.yml b/.github/workflows/depends.yml index 6228266cf..27b294503 100644 --- a/.github/workflows/depends.yml +++ b/.github/workflows/depends.yml @@ -63,19 +63,20 @@ jobs: packages: "gperf cmake python3" name: ${{ matrix.toolchain.name }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: + fetch-depth: 0 submodules: recursive # Most volatile cache - name: ccache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.ccache key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }} restore-keys: ccache-${{ matrix.toolchain.host }}- # Less volatile cache - name: depends cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: contrib/depends/built key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }} @@ -84,7 +85,7 @@ jobs: depends-${{ matrix.toolchain.host }}- # Static cache - name: OSX SDK cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: contrib/depends/sdk-sources key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }} @@ -102,7 +103,7 @@ jobs: run: | ${{env.CCACHE_SETTINGS}} make depends target=${{ matrix.toolchain.host }} -j2 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }} with: name: ${{ matrix.toolchain.name }} diff --git a/.github/workflows/gitian.yml b/.github/workflows/gitian.yml index 6506e3d46..91e60a88f 100644 --- a/.github/workflows/gitian.yml +++ b/.github/workflows/gitian.yml @@ -42,7 +42,7 @@ jobs: echo \`\`\` >> $GITHUB_STEP_SUMMARY shasum -a256 * >> $GITHUB_STEP_SUMMARY echo \`\`\` >> $GITHUB_STEP_SUMMARY - - uses: actions/upload-artifact@v3.1.0 + - uses: actions/upload-artifact@v3 with: name: ${{ matrix.operating-system.name }} path: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c088f26d..d036f7456 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # @@ -412,7 +412,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") else() set(DEFAULT_BUILD_DEBUG_UTILITIES OFF) endif() -option(BUILD_DEBUG_UTILITIES "Build debug utilities." DEFAULT_BUILD_DEBUG_UTILITIES) +option(BUILD_DEBUG_UTILITIES "Build debug utilities." ${DEFAULT_BUILD_DEBUG_UTILITIES}) if(OSSFUZZ) message(STATUS "Using OSS-Fuzz fuzzing system") diff --git a/CMakeLists_IOS.txt b/CMakeLists_IOS.txt index 21aa92094..f2d44ac88 100644 --- a/CMakeLists_IOS.txt +++ b/CMakeLists_IOS.txt @@ -1,4 +1,4 @@ -# Portions Copyright (c) 2017-2022, The Monero Project +# Portions Copyright (c) 2017-2023, The Monero Project # This file is based off of the https://code.google.com/archive/p/ios-cmake/ # It has been altered for Monero iOS development # @@ -1,4 +1,4 @@ -Copyright (c) 2014-2022, The Monero Project +Copyright (c) 2014-2023, The Monero Project All rights reserved. @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # @@ -1,6 +1,6 @@ # Monero -Copyright (c) 2014-2022 The Monero Project. +Copyright (c) 2014-2023, The Monero Project Portions Copyright (c) 2012-2013 The Cryptonote developers. ## Table of Contents @@ -171,7 +171,7 @@ library archives (`.a`). | CMake | 3.5 | NO | `cmake` | `cmake` | `cmake` | `cmake` | NO | | | pkg-config | any | NO | `pkg-config` | `base-devel` | `base-devel` | `pkgconf` | NO | | | Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | `boost-devel` | NO | C++ libraries | -| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `libressl-devel` | `openssl-devel` | NO | sha256 sum | +| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | `openssl-devel` | NO | sha256 sum | | libzmq | 4.2.0 | NO | `libzmq3-dev` | `zeromq` | `zeromq-devel` | `zeromq-devel` | NO | ZeroMQ library | | OpenPGM | ? | NO | `libpgm-dev` | `libpgm` | | `openpgm-devel` | NO | For ZeroMQ | | libnorm[2] | ? | NO | `libnorm-dev` | | | | YES | For ZeroMQ | diff --git a/cmake/32-bit-toolchain.cmake b/cmake/32-bit-toolchain.cmake index eb28953a4..0ae8394ab 100644 --- a/cmake/32-bit-toolchain.cmake +++ b/cmake/32-bit-toolchain.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/64-bit-toolchain.cmake b/cmake/64-bit-toolchain.cmake index 2ec22b8e5..1c1a95efd 100644 --- a/cmake/64-bit-toolchain.cmake +++ b/cmake/64-bit-toolchain.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/FindCcache.cmake b/cmake/FindCcache.cmake index d3f5f829b..c2cfe9789 100644 --- a/cmake/FindCcache.cmake +++ b/cmake/FindCcache.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/FindUnbound.cmake b/cmake/FindUnbound.cmake index 611b047ab..e6bfc8e22 100644 --- a/cmake/FindUnbound.cmake +++ b/cmake/FindUnbound.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake index 80f6b506d..0dd731881 100644 --- a/cmake/GitVersion.cmake +++ b/cmake/GitVersion.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/SetClangTidy.cmake b/cmake/SetClangTidy.cmake index 88dfe4be2..7288590bf 100644 --- a/cmake/SetClangTidy.cmake +++ b/cmake/SetClangTidy.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/Version.cmake b/cmake/Version.cmake index e9ed9fba1..cfb0e32a7 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/cmake/test-libusb-version.c b/cmake/test-libusb-version.c index 9f22416b8..f1e5d8ea8 100644 --- a/cmake/test-libusb-version.c +++ b/cmake/test-libusb-version.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/cmake/test-protobuf.cpp b/cmake/test-protobuf.cpp index f1665969e..2b658a605 100644 --- a/cmake/test-protobuf.cpp +++ b/cmake/test-protobuf.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/cmake/test-static-assert.c b/cmake/test-static-assert.c index 1697bfeb9..6d05d69ff 100644 --- a/cmake/test-static-assert.c +++ b/cmake/test-static-assert.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/cmake/test-static-assert.cpp b/cmake/test-static-assert.cpp index 1697bfeb9..6d05d69ff 100644 --- a/cmake/test-static-assert.cpp +++ b/cmake/test-static-assert.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 10296514c..631d89978 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/contrib/depends/packages/native_biplist.mk b/contrib/depends/packages/native_biplist.mk deleted file mode 100644 index 3c6e8900f..000000000 --- a/contrib/depends/packages/native_biplist.mk +++ /dev/null @@ -1,20 +0,0 @@ -package=native_biplist -$(package)_version=0.9 -$(package)_download_path=https://pypi.python.org/packages/source/b/biplist -$(package)_file_name=biplist-$($(package)_version).tar.gz -$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604 -$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages -$(package)_patches=sorted_list.patch - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/sorted_list.patch -endef - -define $(package)_build_cmds - python setup.py build -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_install_libdir) && \ - python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) -endef diff --git a/contrib/depends/packages/native_cdrkit.mk b/contrib/depends/packages/native_cdrkit.mk deleted file mode 100644 index 8243458ec..000000000 --- a/contrib/depends/packages/native_cdrkit.mk +++ /dev/null @@ -1,26 +0,0 @@ -package=native_cdrkit -$(package)_version=1.1.11 -$(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c -$(package)_file_name=cdrkit-$($(package)_version).tar.bz2 -$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564 -$(package)_patches=cdrkit-deterministic.patch - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch -endef - -define $(package)_config_cmds - cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) -endef - -define $(package)_build_cmds - $(MAKE) genisoimage -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install -endef - -define $(package)_postprocess_cmds - rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump -endef diff --git a/contrib/depends/packages/native_cmake-unused.mk b/contrib/depends/packages/native_cmake-unused.mk deleted file mode 100644 index c9ab75711..000000000 --- a/contrib/depends/packages/native_cmake-unused.mk +++ /dev/null @@ -1,23 +0,0 @@ -package=native_cmake -$(package)_version=3.14.0 -$(package)_version_dot=v3.14 -$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/ -$(package)_file_name=cmake-$($(package)_version).tar.gz -$(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502 - -define $(package)_set_vars -$(package)_config_opts= -endef - -define $(package)_config_cmds - ./bootstrap &&\ - ./configure $($(package)_config_opts) -endef - -define $(package)_build_cmd - $(MAKE) -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install -endef diff --git a/contrib/depends/packages/native_ds_store.mk b/contrib/depends/packages/native_ds_store.mk deleted file mode 100644 index f0c617659..000000000 --- a/contrib/depends/packages/native_ds_store.mk +++ /dev/null @@ -1,17 +0,0 @@ -package=native_ds_store -$(package)_version=1.1.0 -$(package)_download_path=https://github.com/al45tair/ds_store/archive/ -$(package)_download_file=v$($(package)_version).tar.gz -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed -$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages -$(package)_dependencies=native_biplist - -define $(package)_build_cmds - python setup.py build -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_install_libdir) && \ - python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) -endef diff --git a/contrib/depends/packages/native_libdmg-hfsplus.mk b/contrib/depends/packages/native_libdmg-hfsplus.mk deleted file mode 100644 index a4ffb6046..000000000 --- a/contrib/depends/packages/native_libdmg-hfsplus.mk +++ /dev/null @@ -1,22 +0,0 @@ -package=native_libdmg-hfsplus -$(package)_version=0.1 -$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive -$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz -$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3 -$(package)_build_subdir=build - -define $(package)_preprocess_cmds - mkdir build -endef - -define $(package)_config_cmds - cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin .. -endef - -define $(package)_build_cmds - $(MAKE) -C dmg -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install -endef diff --git a/contrib/depends/packages/native_mac_alias.mk b/contrib/depends/packages/native_mac_alias.mk deleted file mode 100644 index 48bd90fb6..000000000 --- a/contrib/depends/packages/native_mac_alias.mk +++ /dev/null @@ -1,21 +0,0 @@ -package=native_mac_alias -$(package)_version=1.1.0 -$(package)_download_path=https://github.com/al45tair/mac_alias/archive/ -$(package)_download_file=v$($(package)_version).tar.gz -$(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be -$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages -$(package)_patches=python3.patch - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/python3.patch -endef - -define $(package)_build_cmds - python setup.py build -endef - -define $(package)_stage_cmds - mkdir -p $($(package)_install_libdir) && \ - python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir) -endef diff --git a/contrib/depends/patches/cmake/cmake-1-fixes.patch b/contrib/depends/patches/cmake/cmake-1-fixes.patch deleted file mode 100644 index 062c06767..000000000 --- a/contrib/depends/patches/cmake/cmake-1-fixes.patch +++ /dev/null @@ -1,67 +0,0 @@ -This file is part of MXE. See LICENSE.md for licensing information. - -Contains ad hoc patches for cross building. - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Tony Theodore <tonyt@logyst.com> -Date: Fri, 12 Aug 2016 02:01:20 +1000 -Subject: [PATCH 1/3] fix windres invocation options - -windres doesn't recognise various gcc flags like -mms-bitfields, --fopenmp, -mthreads etc. (basically not `-D` or `-I`) - -diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake -index 1111111..2222222 100644 ---- a/Modules/Platform/Windows-windres.cmake -+++ b/Modules/Platform/Windows-windres.cmake -@@ -1 +1 @@ --set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>") -+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <SOURCE> <OBJECT>") - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Tony Theodore <tonyt@logyst.com> -Date: Tue, 25 Jul 2017 20:34:56 +1000 -Subject: [PATCH 2/3] add option to disable -isystem - -taken from (not accepted): -https://gitlab.kitware.com/cmake/cmake/merge_requests/895 - -see also: -https://gitlab.kitware.com/cmake/cmake/issues/16291 -https://gitlab.kitware.com/cmake/cmake/issues/16919 - -diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake -index 1111111..2222222 100644 ---- a/Modules/Compiler/GNU.cmake -+++ b/Modules/Compiler/GNU.cmake -@@ -42,7 +42,7 @@ macro(__compiler_gnu lang) - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") - set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") - set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") -- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 -+ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462 - set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") - endif() - endmacro() - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Tony Theodore <tonyt@logyst.com> -Date: Tue, 15 Aug 2017 15:25:06 +1000 -Subject: [PATCH 3/3] add CPACK_NSIS_EXECUTABLE variable - - -diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx -index 1111111..2222222 100644 ---- a/Source/CPack/cmCPackNSISGenerator.cxx -+++ b/Source/CPack/cmCPackNSISGenerator.cxx -@@ -384,7 +384,9 @@ int cmCPackNSISGenerator::InitializeInternal() - } - #endif - -- nsisPath = cmSystemTools::FindProgram("makensis", path, false); -+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis"); -+ nsisPath = cmSystemTools::FindProgram( -+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false); - - if (nsisPath.empty()) { - cmCPackLogger( diff --git a/contrib/depends/patches/native_biplist/sorted_list.patch b/contrib/depends/patches/native_biplist/sorted_list.patch deleted file mode 100644 index 89abdb1b7..000000000 --- a/contrib/depends/patches/native_biplist/sorted_list.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000 -+++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000 -@@ -541,7 +541,7 @@ - return HashableWrapper(n) - elif isinstance(root, dict): - n = {} -- for key, value in iteritems(root): -+ for key, value in sorted(iteritems(root)): - n[self.wrapRoot(key)] = self.wrapRoot(value) - return HashableWrapper(n) - elif isinstance(root, list): -@@ -616,7 +616,7 @@ - elif isinstance(obj, dict): - size = proc_size(len(obj)) - self.incrementByteCount('dictBytes', incr=1+size) -- for key, value in iteritems(obj): -+ for key, value in sorted(iteritems(obj)): - check_key(key) - self.computeOffsets(key, asReference=True) - self.computeOffsets(value, asReference=True) -@@ -714,7 +714,7 @@ - keys = [] - values = [] - objectsToWrite = [] -- for key, value in iteritems(obj): -+ for key, value in sorted(iteritems(obj)): - keys.append(key) - values.append(value) - for key in keys: diff --git a/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch b/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch deleted file mode 100644 index 8ab0993dc..000000000 --- a/contrib/depends/patches/native_cdrkit/cdrkit-deterministic.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400 -+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500 -@@ -1139,8 +1139,9 @@ - scan_directory_tree(struct directory *this_dir, char *path, - struct directory_entry *de) - { -- DIR *current_dir; -+ int current_file; - char whole_path[PATH_MAX]; -+ struct dirent **d_list; - struct dirent *d_entry; - struct directory *parent; - int dflag; -@@ -1164,7 +1165,8 @@ - this_dir->dir_flags |= DIR_WAS_SCANNED; - - errno = 0; /* Paranoia */ -- current_dir = opendir(path); -+ //current_dir = opendir(path); -+ current_file = scandir(path, &d_list, NULL, alphasort); - d_entry = NULL; - - /* -@@ -1173,12 +1175,12 @@ - */ - old_path = path; - -- if (current_dir) { -+ if (current_file >= 0) { - errno = 0; -- d_entry = readdir(current_dir); -+ d_entry = d_list[0]; - } - -- if (!current_dir || !d_entry) { -+ if (current_file < 0 || !d_entry) { - int ret = 1; - - #ifdef USE_LIBSCHILY -@@ -1191,8 +1193,8 @@ - de->isorec.flags[0] &= ~ISO_DIRECTORY; - ret = 0; - } -- if (current_dir) -- closedir(current_dir); -+ if(d_list) -+ free(d_list); - return (ret); - } - #ifdef ABORT_DEEP_ISO_ONLY -@@ -1208,7 +1210,7 @@ - errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n"); - errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n"); - } -- closedir(current_dir); -+ free(d_list); - return (1); - } - #endif -@@ -1250,13 +1252,13 @@ - * The first time through, skip this, since we already asked - * for the first entry when we opened the directory. - */ -- if (dflag) -- d_entry = readdir(current_dir); -+ if (dflag && current_file >= 0) -+ d_entry = d_list[current_file]; - dflag++; - -- if (!d_entry) -+ if (current_file < 0) - break; -- -+ current_file--; - /* OK, got a valid entry */ - - /* If we do not want all files, then pitch the backups. */ -@@ -1348,7 +1350,7 @@ - insert_file_entry(this_dir, whole_path, d_entry->d_name); - #endif /* APPLE_HYB */ - } -- closedir(current_dir); -+ free(d_list); - - #ifdef APPLE_HYB - /* diff --git a/contrib/depends/patches/native_mac_alias/python3.patch b/contrib/depends/patches/native_mac_alias/python3.patch deleted file mode 100644 index 1a32340be..000000000 --- a/contrib/depends/patches/native_mac_alias/python3.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -dur a/mac_alias/alias.py b/mac_alias/alias.py ---- a/mac_alias/alias.py 2015-10-19 12:12:48.000000000 +0200 -+++ b/mac_alias/alias.py 2016-04-03 12:13:12.037159417 +0200 -@@ -243,10 +243,10 @@ - alias = Alias() - alias.appinfo = appinfo - -- alias.volume = VolumeInfo (volname.replace('/',':'), -+ alias.volume = VolumeInfo (volname.decode().replace('/',':'), - voldate, fstype, disktype, - volattrs, volfsid) -- alias.target = TargetInfo (kind, filename.replace('/',':'), -+ alias.target = TargetInfo (kind, filename.decode().replace('/',':'), - folder_cnid, cnid, - crdate, creator_code, type_code) - alias.target.levels_from = levels_from -@@ -261,9 +261,9 @@ - b.read(1) - - if tag == TAG_CARBON_FOLDER_NAME: -- alias.target.folder_name = value.replace('/',':') -+ alias.target.folder_name = value.decode().replace('/',':') - elif tag == TAG_CNID_PATH: -- alias.target.cnid_path = struct.unpack(b'>%uI' % (length // 4), -+ alias.target.cnid_path = struct.unpack('>%uI' % (length // 4), - value) - elif tag == TAG_CARBON_PATH: - alias.target.carbon_path = value -@@ -298,9 +298,9 @@ - alias.target.creation_date \ - = mac_epoch + datetime.timedelta(seconds=seconds) - elif tag == TAG_POSIX_PATH: -- alias.target.posix_path = value -+ alias.target.posix_path = value.decode() - elif tag == TAG_POSIX_PATH_TO_MOUNTPOINT: -- alias.volume.posix_path = value -+ alias.volume.posix_path = value.decode() - elif tag == TAG_RECURSIVE_ALIAS_OF_DISK_IMAGE: - alias.volume.disk_image_alias = Alias.from_bytes(value) - elif tag == TAG_USER_HOME_LENGTH_PREFIX: -@@ -422,13 +422,13 @@ - # (so doing so is ridiculous, and nothing could rely on it). - b.write(struct.pack(b'>h28pI2shI64pII4s4shhI2s10s', - self.target.kind, -- carbon_volname, voldate, -+ carbon_volname, int(voldate), - self.volume.fs_type, - self.volume.disk_type, - self.target.folder_cnid, - carbon_filename, - self.target.cnid, -- crdate, -+ int(crdate), - self.target.creator_code, - self.target.type_code, - self.target.levels_from, -@@ -449,12 +449,12 @@ - - b.write(struct.pack(b'>hhQhhQ', - TAG_HIGH_RES_VOLUME_CREATION_DATE, -- 8, long(voldate * 65536), -+ 8, int(voldate * 65536), - TAG_HIGH_RES_CREATION_DATE, -- 8, long(crdate * 65536))) -+ 8, int(crdate * 65536))) - - if self.target.cnid_path: -- cnid_path = struct.pack(b'>%uI' % len(self.target.cnid_path), -+ cnid_path = struct.pack('>%uI' % len(self.target.cnid_path), - *self.target.cnid_path) - b.write(struct.pack(b'>hh', TAG_CNID_PATH, - len(cnid_path))) diff --git a/contrib/epee/CMakeLists.txt b/contrib/epee/CMakeLists.txt index a61e50445..9cfd09b5b 100644 --- a/contrib/epee/CMakeLists.txt +++ b/contrib/epee/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/contrib/epee/include/byte_slice.h b/contrib/epee/include/byte_slice.h index 57f6c410a..fa45613e4 100644 --- a/contrib/epee/include/byte_slice.h +++ b/contrib/epee/include/byte_slice.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/byte_stream.h b/contrib/epee/include/byte_stream.h index e7993133a..4f565326a 100644 --- a/contrib/epee/include/byte_stream.h +++ b/contrib/epee/include/byte_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/include/fnv1.h b/contrib/epee/include/fnv1.h index 6a699f4d8..8c11cd187 100644 --- a/contrib/epee/include/fnv1.h +++ b/contrib/epee/include/fnv1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/include/hex.h b/contrib/epee/include/hex.h index af0a581a9..d9eb93d51 100644 --- a/contrib/epee/include/hex.h +++ b/contrib/epee/include/hex.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/int-util.h b/contrib/epee/include/int-util.h index 3789076e8..d3fbd84ca 100644 --- a/contrib/epee/include/int-util.h +++ b/contrib/epee/include/int-util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/memwipe.h b/contrib/epee/include/memwipe.h index ebb9373c9..a27e0bb5e 100644 --- a/contrib/epee/include/memwipe.h +++ b/contrib/epee/include/memwipe.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/mlocker.h b/contrib/epee/include/mlocker.h index 47ca0032a..7d8e2c7a5 100644 --- a/contrib/epee/include/mlocker.h +++ b/contrib/epee/include/mlocker.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/include/net/buffer.h b/contrib/epee/include/net/buffer.h index c5305a8b7..8e53512ac 100644 --- a/contrib/epee/include/net/buffer.h +++ b/contrib/epee/include/net/buffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/include/net/connection_basic.hpp b/contrib/epee/include/net/connection_basic.hpp index a26d538cd..e3093de51 100644 --- a/contrib/epee/include/net/connection_basic.hpp +++ b/contrib/epee/include/net/connection_basic.hpp @@ -8,7 +8,7 @@ // ! (how ever if in some wonderful juristdictions that is not the case, then why not make another sub-class withat that members and licence it as epee part) // ! Working on above premise, IF this is valid in your juristdictions, then consider this code as released as: -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/net/enums.h b/contrib/epee/include/net/enums.h index b9e05a3eb..125ef0db0 100644 --- a/contrib/epee/include/net/enums.h +++ b/contrib/epee/include/net/enums.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/include/net/http_auth.h b/contrib/epee/include/net/http_auth.h index 97407ae2c..ee5a79a7d 100644 --- a/contrib/epee/include/net/http_auth.h +++ b/contrib/epee/include/net/http_auth.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/net/network_throttle-detail.hpp b/contrib/epee/include/net/network_throttle-detail.hpp index 0a6dc4a20..596ef29f5 100644 --- a/contrib/epee/include/net/network_throttle-detail.hpp +++ b/contrib/epee/include/net/network_throttle-detail.hpp @@ -2,7 +2,7 @@ /// @author rfree (current maintainer in monero.cc project) /// @brief implementaion for throttling of connection (count and rate-limit speed etc) -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/net/network_throttle.hpp b/contrib/epee/include/net/network_throttle.hpp index 750231610..90e214aa7 100644 --- a/contrib/epee/include/net/network_throttle.hpp +++ b/contrib/epee/include/net/network_throttle.hpp @@ -2,7 +2,7 @@ /// @author rfree (current maintainer in monero.cc project) /// @brief interface for throttling of connection (count and rate-limit speed etc) -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/rolling_median.h b/contrib/epee/include/rolling_median.h index e230fd974..c9caddfec 100644 --- a/contrib/epee/include/rolling_median.h +++ b/contrib/epee/include/rolling_median.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/span.h b/contrib/epee/include/span.h index 99c2ebb4f..82936a777 100644 --- a/contrib/epee/include/span.h +++ b/contrib/epee/include/span.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/storages/portable_storage_bin_utils.h b/contrib/epee/include/storages/portable_storage_bin_utils.h index 476c81ea1..d43090251 100644 --- a/contrib/epee/include/storages/portable_storage_bin_utils.h +++ b/contrib/epee/include/storages/portable_storage_bin_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/include/wipeable_string.h b/contrib/epee/include/wipeable_string.h index 65977cd97..bd1e9f12b 100644 --- a/contrib/epee/include/wipeable_string.h +++ b/contrib/epee/include/wipeable_string.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt index 4e920f39c..71ff94f00 100644 --- a/contrib/epee/src/CMakeLists.txt +++ b/contrib/epee/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/contrib/epee/src/buffer.cpp b/contrib/epee/src/buffer.cpp index dd6619074..7d054c7c2 100644 --- a/contrib/epee/src/buffer.cpp +++ b/contrib/epee/src/buffer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/src/byte_slice.cpp b/contrib/epee/src/byte_slice.cpp index 72aa39768..82ca12f54 100644 --- a/contrib/epee/src/byte_slice.cpp +++ b/contrib/epee/src/byte_slice.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/byte_stream.cpp b/contrib/epee/src/byte_stream.cpp index b674b5fe0..39166615c 100644 --- a/contrib/epee/src/byte_stream.cpp +++ b/contrib/epee/src/byte_stream.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/src/connection_basic.cpp b/contrib/epee/src/connection_basic.cpp index b0a30f47f..a42295d88 100644 --- a/contrib/epee/src/connection_basic.cpp +++ b/contrib/epee/src/connection_basic.cpp @@ -2,7 +2,7 @@ /// @author rfree (current maintainer in monero.cc project) /// @brief base for connection, contains e.g. the ratelimit hooks -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/hex.cpp b/contrib/epee/src/hex.cpp index c62406c39..edc7d46f4 100644 --- a/contrib/epee/src/hex.cpp +++ b/contrib/epee/src/hex.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/http_auth.cpp b/contrib/epee/src/http_auth.cpp index 98278cdfb..5071d2685 100644 --- a/contrib/epee/src/http_auth.cpp +++ b/contrib/epee/src/http_auth.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/int-util.cpp b/contrib/epee/src/int-util.cpp index 3a2924c5a..a330ff9ac 100644 --- a/contrib/epee/src/int-util.cpp +++ b/contrib/epee/src/int-util.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/levin_base.cpp b/contrib/epee/src/levin_base.cpp index a64f2aa17..111fe6651 100644 --- a/contrib/epee/src/levin_base.cpp +++ b/contrib/epee/src/levin_base.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/memwipe.c b/contrib/epee/src/memwipe.c index e96b94598..27dfb28a9 100644 --- a/contrib/epee/src/memwipe.c +++ b/contrib/epee/src/memwipe.c @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/mlocker.cpp b/contrib/epee/src/mlocker.cpp index ed71e386c..1bf764f18 100644 --- a/contrib/epee/src/mlocker.cpp +++ b/contrib/epee/src/mlocker.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/src/net_ssl.cpp b/contrib/epee/src/net_ssl.cpp index 2d0b7d791..52d24c587 100644 --- a/contrib/epee/src/net_ssl.cpp +++ b/contrib/epee/src/net_ssl.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/contrib/epee/src/network_throttle-detail.cpp b/contrib/epee/src/network_throttle-detail.cpp index 978572120..56c869d8e 100644 --- a/contrib/epee/src/network_throttle-detail.cpp +++ b/contrib/epee/src/network_throttle-detail.cpp @@ -2,7 +2,7 @@ /// @author rfree (current maintainer in monero.cc project) /// @brief implementaion for throttling of connection (count and rate-limit speed etc) -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/network_throttle.cpp b/contrib/epee/src/network_throttle.cpp index 3f250a542..bbff08fe8 100644 --- a/contrib/epee/src/network_throttle.cpp +++ b/contrib/epee/src/network_throttle.cpp @@ -26,7 +26,7 @@ Throttling work by: */ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/contrib/epee/src/wipeable_string.cpp b/contrib/epee/src/wipeable_string.cpp index b016f2f48..aea1cc970 100644 --- a/contrib/epee/src/wipeable_string.cpp +++ b/contrib/epee/src/wipeable_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index a50114d1a..4fb92af47 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -56,7 +56,7 @@ the previous paragraph is here. ## License Copyright (c) 2009-2015 Pieter Hintjens. -Copyright (c) 2017-2022, The Monero Project +Copyright (c) 2017-2023, The Monero Project This Specification is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 5b7f69a56..8deadc7ba 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2019, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/external/db_drivers/CMakeLists.txt b/external/db_drivers/CMakeLists.txt index a9b29e0d7..d4ce7aa26 100644 --- a/external/db_drivers/CMakeLists.txt +++ b/external/db_drivers/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2019, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/external/db_drivers/liblmdb/CMakeLists.txt b/external/db_drivers/liblmdb/CMakeLists.txt index 562ebb1eb..323437def 100644 --- a/external/db_drivers/liblmdb/CMakeLists.txt +++ b/external/db_drivers/liblmdb/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2019, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/external/easylogging++/CMakeLists.txt b/external/easylogging++/CMakeLists.txt index 462f774bf..f3352d837 100644 --- a/external/easylogging++/CMakeLists.txt +++ b/external/easylogging++/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2019, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3335d3c21..fed042ce2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/blockchain_db/CMakeLists.txt b/src/blockchain_db/CMakeLists.txt index 14ed76295..b1525d6d7 100644 --- a/src/blockchain_db/CMakeLists.txt +++ b/src/blockchain_db/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index ab73e255c..3d52d5fb9 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index a163ef98c..835d6dcad 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index f80013d02..4178c862b 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/blockchain_db/lmdb/db_lmdb.h b/src/blockchain_db/lmdb/db_lmdb.h index bdae44948..c352458b4 100644 --- a/src/blockchain_db/lmdb/db_lmdb.h +++ b/src/blockchain_db/lmdb/db_lmdb.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/blockchain_db/locked_txn.h b/src/blockchain_db/locked_txn.h index beab8af21..6170d7b5a 100644 --- a/src/blockchain_db/locked_txn.h +++ b/src/blockchain_db/locked_txn.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_db/testdb.h b/src/blockchain_db/testdb.h index fe8078d5e..946f26270 100644 --- a/src/blockchain_db/testdb.h +++ b/src/blockchain_db/testdb.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index 8122d9034..224a9e63c 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/blockchain_utilities/README.md b/src/blockchain_utilities/README.md index a7d47e233..4fcd138c4 100644 --- a/src/blockchain_utilities/README.md +++ b/src/blockchain_utilities/README.md @@ -1,6 +1,6 @@ # Monero Blockchain Utilities -Copyright (c) 2014-2022, The Monero Project +Copyright (c) 2014-2023, The Monero Project ## Introduction diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp index b0964e4a3..66dd7813b 100644 --- a/src/blockchain_utilities/blockchain_ancestry.cpp +++ b/src/blockchain_utilities/blockchain_ancestry.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp index dee0f7f2a..83051e290 100644 --- a/src/blockchain_utilities/blockchain_blackball.cpp +++ b/src/blockchain_utilities/blockchain_blackball.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_depth.cpp b/src/blockchain_utilities/blockchain_depth.cpp index b98a1f8e2..6a06e0a96 100644 --- a/src/blockchain_utilities/blockchain_depth.cpp +++ b/src/blockchain_utilities/blockchain_depth.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp index 82fe524de..3d7b3f61a 100644 --- a/src/blockchain_utilities/blockchain_export.cpp +++ b/src/blockchain_utilities/blockchain_export.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index f8cca638d..d6864e70d 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_prune.cpp b/src/blockchain_utilities/blockchain_prune.cpp index a78d7ada9..1e4b48b73 100644 --- a/src/blockchain_utilities/blockchain_prune.cpp +++ b/src/blockchain_utilities/blockchain_prune.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp b/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp index 05aaf42ee..4da9c15c1 100644 --- a/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp +++ b/src/blockchain_utilities/blockchain_prune_known_spent_data.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_stats.cpp b/src/blockchain_utilities/blockchain_stats.cpp index 21040a1d8..5e4245ebd 100644 --- a/src/blockchain_utilities/blockchain_stats.cpp +++ b/src/blockchain_utilities/blockchain_stats.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_usage.cpp b/src/blockchain_utilities/blockchain_usage.cpp index 129a9be21..a5228eb92 100644 --- a/src/blockchain_utilities/blockchain_usage.cpp +++ b/src/blockchain_utilities/blockchain_usage.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blockchain_utilities.h b/src/blockchain_utilities/blockchain_utilities.h index 47bbb0faf..13e2ef428 100644 --- a/src/blockchain_utilities/blockchain_utilities.h +++ b/src/blockchain_utilities/blockchain_utilities.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blocksdat_file.cpp b/src/blockchain_utilities/blocksdat_file.cpp index 606805a08..6a469289d 100644 --- a/src/blockchain_utilities/blocksdat_file.cpp +++ b/src/blockchain_utilities/blocksdat_file.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/blocksdat_file.h b/src/blockchain_utilities/blocksdat_file.h index ce224baa6..557b395a4 100644 --- a/src/blockchain_utilities/blocksdat_file.h +++ b/src/blockchain_utilities/blocksdat_file.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/bootstrap_file.cpp b/src/blockchain_utilities/bootstrap_file.cpp index 71477912a..287db1c86 100644 --- a/src/blockchain_utilities/bootstrap_file.cpp +++ b/src/blockchain_utilities/bootstrap_file.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/bootstrap_file.h b/src/blockchain_utilities/bootstrap_file.h index 0f2776172..7a1085a56 100644 --- a/src/blockchain_utilities/bootstrap_file.h +++ b/src/blockchain_utilities/bootstrap_file.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blockchain_utilities/bootstrap_serialization.h b/src/blockchain_utilities/bootstrap_serialization.h index 261810a6b..d6ab90a99 100644 --- a/src/blockchain_utilities/bootstrap_serialization.h +++ b/src/blockchain_utilities/bootstrap_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/blocks/CMakeLists.txt b/src/blocks/CMakeLists.txt index db8fe5f94..60b27baf3 100644 --- a/src/blocks/CMakeLists.txt +++ b/src/blocks/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/checkpoints/CMakeLists.txt b/src/checkpoints/CMakeLists.txt index 665441f62..680085757 100644 --- a/src/checkpoints/CMakeLists.txt +++ b/src/checkpoints/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/checkpoints/checkpoints.cpp b/src/checkpoints/checkpoints.cpp index 330e3653c..70ae58cf0 100644 --- a/src/checkpoints/checkpoints.cpp +++ b/src/checkpoints/checkpoints.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/checkpoints/checkpoints.h b/src/checkpoints/checkpoints.h index 07daeb4c0..7a93213c9 100644 --- a/src/checkpoints/checkpoints.h +++ b/src/checkpoints/checkpoints.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index b712ee6b1..7f0b0c18f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/common/aligned.c b/src/common/aligned.c index 3e33bfa80..9ffa01f92 100644 --- a/src/common/aligned.c +++ b/src/common/aligned.c @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/aligned.h b/src/common/aligned.h index 33242a151..7c201e000 100644 --- a/src/common/aligned.h +++ b/src/common/aligned.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/apply_permutation.h b/src/common/apply_permutation.h index ceccdfe96..1f8fce66f 100644 --- a/src/common/apply_permutation.h +++ b/src/common/apply_permutation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/base58.cpp b/src/common/base58.cpp index f50bd10fb..efa1d3fc8 100644 --- a/src/common/base58.cpp +++ b/src/common/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/base58.h b/src/common/base58.h index fa97ab98c..7e37a57ea 100644 --- a/src/common/base58.h +++ b/src/common/base58.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/combinator.cpp b/src/common/combinator.cpp index 72b139737..ea68f3414 100644 --- a/src/common/combinator.cpp +++ b/src/common/combinator.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/combinator.h b/src/common/combinator.h index 0d35e4786..cb237ed8d 100644 --- a/src/common/combinator.h +++ b/src/common/combinator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index 30ded6f33..1380622b2 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/command_line.h b/src/common/command_line.h index d80a1b0df..bd5a32edb 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/common_fwd.h b/src/common/common_fwd.h index 4853c23c9..04aa3ce0a 100644 --- a/src/common/common_fwd.h +++ b/src/common/common_fwd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 466224390..324566afd 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h index 81079ba30..87c6ec140 100644 --- a/src/common/dns_utils.h +++ b/src/common/dns_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/download.cpp b/src/common/download.cpp index 01d4a9aab..7d23568e2 100644 --- a/src/common/download.cpp +++ b/src/common/download.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/download.h b/src/common/download.h index 52af4dc6a..ee7353089 100644 --- a/src/common/download.h +++ b/src/common/download.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/error.cpp b/src/common/error.cpp index f5e402ef4..0be5586ed 100644 --- a/src/common/error.cpp +++ b/src/common/error.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/common/error.h b/src/common/error.h index d271517f4..b79731162 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/common/expect.h b/src/common/expect.h index 6f2d8e291..64a753f45 100644 --- a/src/common/expect.h +++ b/src/common/expect.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/http_connection.h b/src/common/http_connection.h index f8281fe1e..cf9a68d8d 100644 --- a/src/common/http_connection.h +++ b/src/common/http_connection.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/i18n.cpp b/src/common/i18n.cpp index 6d904a2e3..352c7879f 100644 --- a/src/common/i18n.cpp +++ b/src/common/i18n.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/i18n.h b/src/common/i18n.h index 1ed78bf8f..55506ce02 100644 --- a/src/common/i18n.h +++ b/src/common/i18n.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/json_util.h b/src/common/json_util.h index 6d2cfedb4..e512f4df8 100644 --- a/src/common/json_util.h +++ b/src/common/json_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/notify.cpp b/src/common/notify.cpp index 28f38d8c3..e1d6ee7f5 100644 --- a/src/common/notify.cpp +++ b/src/common/notify.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/notify.h b/src/common/notify.h index 7ff721c8a..fa7438585 100644 --- a/src/common/notify.h +++ b/src/common/notify.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/password.cpp b/src/common/password.cpp index e6dff95ea..7ba4546d3 100644 --- a/src/common/password.cpp +++ b/src/common/password.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/password.h b/src/common/password.h index 26b6616ab..2d889f4e6 100644 --- a/src/common/password.h +++ b/src/common/password.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/perf_timer.cpp b/src/common/perf_timer.cpp index 30164a557..2b67154e5 100644 --- a/src/common/perf_timer.cpp +++ b/src/common/perf_timer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/perf_timer.h b/src/common/perf_timer.h index c6120b06d..31df89fee 100644 --- a/src/common/perf_timer.h +++ b/src/common/perf_timer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/pod-class.h b/src/common/pod-class.h index c6fce75e6..3cdde72a7 100644 --- a/src/common/pod-class.h +++ b/src/common/pod-class.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/pruning.cpp b/src/common/pruning.cpp index 5cae238ae..48c365425 100644 --- a/src/common/pruning.cpp +++ b/src/common/pruning.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/pruning.h b/src/common/pruning.h index 6530dcf2e..a0d33bf66 100644 --- a/src/common/pruning.h +++ b/src/common/pruning.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/rpc_client.h b/src/common/rpc_client.h index a603a7baf..f6c1ea100 100644 --- a/src/common/rpc_client.h +++ b/src/common/rpc_client.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/scoped_message_writer.h b/src/common/scoped_message_writer.h index cf4e6855f..5814d7ff5 100644 --- a/src/common/scoped_message_writer.h +++ b/src/common/scoped_message_writer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/sfinae_helpers.h b/src/common/sfinae_helpers.h index c5974fe82..fe9163c08 100644 --- a/src/common/sfinae_helpers.h +++ b/src/common/sfinae_helpers.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/spawn.cpp b/src/common/spawn.cpp index 22e840407..1bdf0ddda 100644 --- a/src/common/spawn.cpp +++ b/src/common/spawn.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/spawn.h b/src/common/spawn.h index f3c8dbb6e..55b2333b1 100644 --- a/src/common/spawn.h +++ b/src/common/spawn.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/common/stack_trace.cpp b/src/common/stack_trace.cpp index 130ba4d81..bef14b244 100644 --- a/src/common/stack_trace.cpp +++ b/src/common/stack_trace.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/stack_trace.h b/src/common/stack_trace.h index dc8182154..77af0c58f 100644 --- a/src/common/stack_trace.h +++ b/src/common/stack_trace.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/threadpool.cpp b/src/common/threadpool.cpp index 5d2acc0a6..ff6277af5 100644 --- a/src/common/threadpool.cpp +++ b/src/common/threadpool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/threadpool.h b/src/common/threadpool.h index fcf8ca945..321f6682a 100644 --- a/src/common/threadpool.h +++ b/src/common/threadpool.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/unordered_containers_boost_serialization.h b/src/common/unordered_containers_boost_serialization.h index bc6dd8e7a..49bbe1956 100644 --- a/src/common/unordered_containers_boost_serialization.h +++ b/src/common/unordered_containers_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/updates.cpp b/src/common/updates.cpp index 654ad068c..15efb94c1 100644 --- a/src/common/updates.cpp +++ b/src/common/updates.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/updates.h b/src/common/updates.h index 64e4eea50..da1c8353b 100644 --- a/src/common/updates.h +++ b/src/common/updates.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/utf8.h b/src/common/utf8.h index 434de15e7..d21509c9c 100644 --- a/src/common/utf8.h +++ b/src/common/utf8.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. diff --git a/src/common/util.cpp b/src/common/util.cpp index f0de73a06..a0074f44c 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -1067,7 +1067,7 @@ std::string get_nix_version_display_string() time_t tt = ts; struct tm tm; misc_utils::get_gmt_time(tt, tm); - strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", &tm); + strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%SZ", &tm); return std::string(buffer); } diff --git a/src/common/util.h b/src/common/util.h index f489594e8..05748e020 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/common/varint.h b/src/common/varint.h index 9f8b9a4ab..58d3bbb84 100644 --- a/src/common/varint.h +++ b/src/common/varint.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt index 595c7f966..e17584c90 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/crypto/blake256.c b/src/crypto/blake256.c index 7e302bcad..83161fbb5 100644 --- a/src/crypto/blake256.c +++ b/src/crypto/blake256.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/blake256.h b/src/crypto/blake256.h index f727bddee..5bde2cb2f 100644 --- a/src/crypto/blake256.h +++ b/src/crypto/blake256.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/c_threads.h b/src/crypto/c_threads.h index b4f773641..e6c846db6 100644 --- a/src/crypto/c_threads.h +++ b/src/crypto/c_threads.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // @@ -42,10 +42,11 @@ #define CTHR_RWLOCK_TRYLOCK_READ(x) TryAcquireSRWLockShared(&x) #define CTHR_THREAD_TYPE HANDLE -#define CTHR_THREAD_RTYPE void -#define CTHR_THREAD_RETURN return -#define CTHR_THREAD_CREATE(thr, func, arg) ((thr = (HANDLE)_beginthread(func, 0, arg)) != -1L) -#define CTHR_THREAD_JOIN(thr) WaitForSingleObject((HANDLE)thr, INFINITE) +#define CTHR_THREAD_RTYPE unsigned __stdcall +#define CTHR_THREAD_RETURN _endthreadex(0); return 0; +#define CTHR_THREAD_CREATE(thr, func, arg) ((thr = (HANDLE)_beginthreadex(0, 0, func, arg, 0, 0)) != 0L) +#define CTHR_THREAD_JOIN(thr) do { WaitForSingleObject(thr, INFINITE); CloseHandle(thr); } while(0) +#define CTHR_THREAD_CLOSE(thr) CloseHandle((HANDLE)thr); #else @@ -64,5 +65,6 @@ #define CTHR_THREAD_RETURN return NULL #define CTHR_THREAD_CREATE(thr, func, arg) (pthread_create(&thr, NULL, func, arg) == 0) #define CTHR_THREAD_JOIN(thr) pthread_join(thr, NULL) +#define CTHR_THREAD_CLOSE(thr) #endif diff --git a/src/crypto/chacha.h b/src/crypto/chacha.h index 74f05cbe8..80170dea6 100644 --- a/src/crypto/chacha.h +++ b/src/crypto/chacha.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto-ops-data.c b/src/crypto/crypto-ops-data.c index 1a85de60d..e31cd6b9c 100644 --- a/src/crypto/crypto-ops-data.c +++ b/src/crypto/crypto-ops-data.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto-ops.c b/src/crypto/crypto-ops.c index 971bf663f..e9a5cc6f6 100644 --- a/src/crypto/crypto-ops.c +++ b/src/crypto/crypto-ops.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto-ops.h b/src/crypto/crypto-ops.h index 7a6f0789a..49bc8e081 100644 --- a/src/crypto/crypto-ops.h +++ b/src/crypto/crypto-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto.cpp b/src/crypto/crypto.cpp index 77a36069a..0ab4cad36 100644 --- a/src/crypto/crypto.cpp +++ b/src/crypto/crypto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 43ea59ac6..81d6e1803 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto_ops_builder/README.md b/src/crypto/crypto_ops_builder/README.md index 831c6a63c..aae9e88cd 100644 --- a/src/crypto/crypto_ops_builder/README.md +++ b/src/crypto/crypto_ops_builder/README.md @@ -1,6 +1,6 @@ # Monero -Copyright (c) 2014-2022, The Monero Project +Copyright (c) 2014-2023, The Monero Project ## Crypto Ops Builder diff --git a/src/crypto/crypto_ops_builder/crypto-ops-data.c b/src/crypto/crypto_ops_builder/crypto-ops-data.c index 4785f975f..ac1cf82e5 100644 --- a/src/crypto/crypto_ops_builder/crypto-ops-data.c +++ b/src/crypto/crypto_ops_builder/crypto-ops-data.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto_ops_builder/crypto-ops-old.c b/src/crypto/crypto_ops_builder/crypto-ops-old.c index 5d632809e..10c25bd1e 100644 --- a/src/crypto/crypto_ops_builder/crypto-ops-old.c +++ b/src/crypto/crypto_ops_builder/crypto-ops-old.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto_ops_builder/crypto-ops.h b/src/crypto/crypto_ops_builder/crypto-ops.h index 568bf2a37..171343676 100644 --- a/src/crypto/crypto_ops_builder/crypto-ops.h +++ b/src/crypto/crypto_ops_builder/crypto-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto_ops_builder/ref10CommentedCombined/MakeCryptoOps.py b/src/crypto/crypto_ops_builder/ref10CommentedCombined/MakeCryptoOps.py index 16b6c0ba9..5bb88f0a9 100644 --- a/src/crypto/crypto_ops_builder/ref10CommentedCombined/MakeCryptoOps.py +++ b/src/crypto/crypto_ops_builder/ref10CommentedCombined/MakeCryptoOps.py @@ -15,7 +15,7 @@ print("maybe someone smart can replace the sed with perl..") a = "" license = textwrap.dedent("""\ - // Copyright (c) 2014-2022, The Monero Project + // Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/crypto_ops_builder/ref10CommentedCombined/crypto-ops.h b/src/crypto/crypto_ops_builder/ref10CommentedCombined/crypto-ops.h index 8c0cbcda1..4badb59d6 100644 --- a/src/crypto/crypto_ops_builder/ref10CommentedCombined/crypto-ops.h +++ b/src/crypto/crypto_ops_builder/ref10CommentedCombined/crypto-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/duration.h b/src/crypto/duration.h index 25d1c0b8c..ad9f0a8c4 100644 --- a/src/crypto/duration.h +++ b/src/crypto/duration.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/crypto/generic-ops.h b/src/crypto/generic-ops.h index 5a5e09f9b..da19157f6 100644 --- a/src/crypto/generic-ops.h +++ b/src/crypto/generic-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/groestl.h b/src/crypto/groestl.h index 899660cb1..6fb0a26f4 100644 --- a/src/crypto/groestl.h +++ b/src/crypto/groestl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/groestl_tables.h b/src/crypto/groestl_tables.h index 556354c47..c553b98f5 100644 --- a/src/crypto/groestl_tables.h +++ b/src/crypto/groestl_tables.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash-extra-blake.c b/src/crypto/hash-extra-blake.c index 1557269e6..f3e91a0a8 100644 --- a/src/crypto/hash-extra-blake.c +++ b/src/crypto/hash-extra-blake.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash-extra-groestl.c b/src/crypto/hash-extra-groestl.c index 96230aed7..7d8e84eaa 100644 --- a/src/crypto/hash-extra-groestl.c +++ b/src/crypto/hash-extra-groestl.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash-extra-jh.c b/src/crypto/hash-extra-jh.c index 52efd4ae3..f2180a5dc 100644 --- a/src/crypto/hash-extra-jh.c +++ b/src/crypto/hash-extra-jh.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash-extra-skein.c b/src/crypto/hash-extra-skein.c index 3eacaba58..07bfdccd0 100644 --- a/src/crypto/hash-extra-skein.c +++ b/src/crypto/hash-extra-skein.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash-ops.h b/src/crypto/hash-ops.h index 9d3abc3f8..83cc78ce2 100644 --- a/src/crypto/hash-ops.h +++ b/src/crypto/hash-ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash.c b/src/crypto/hash.c index 7c761a1b9..b73a8587a 100644 --- a/src/crypto/hash.c +++ b/src/crypto/hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hash.h b/src/crypto/hash.h index 2812422e0..c1fccc50c 100644 --- a/src/crypto/hash.h +++ b/src/crypto/hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hmac-keccak.c b/src/crypto/hmac-keccak.c index 771fcc27e..0bdbf6d0f 100644 --- a/src/crypto/hmac-keccak.c +++ b/src/crypto/hmac-keccak.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/hmac-keccak.h b/src/crypto/hmac-keccak.h index 6b3633617..9d92a693a 100644 --- a/src/crypto/hmac-keccak.h +++ b/src/crypto/hmac-keccak.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/initializer.h b/src/crypto/initializer.h index 90c09a087..57c15d3e7 100644 --- a/src/crypto/initializer.h +++ b/src/crypto/initializer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/random.c b/src/crypto/random.c index cfb637fb4..854b29547 100644 --- a/src/crypto/random.c +++ b/src/crypto/random.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/random.h b/src/crypto/random.h index d50f29430..5bb80728a 100644 --- a/src/crypto/random.h +++ b/src/crypto/random.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/rx-slow-hash.c b/src/crypto/rx-slow-hash.c index 14fb56e07..4ba8f0561 100644 --- a/src/crypto/rx-slow-hash.c +++ b/src/crypto/rx-slow-hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // @@ -332,7 +332,7 @@ static void rx_init_dataset(size_t max_threads) { local_abort("Couldn't start RandomX seed thread"); } } - rx_seedthread(&si[n1]); + randomx_init_dataset(main_dataset, si[n1].si_cache, si[n1].si_start, si[n1].si_count); for (size_t i = 0; i < n1; ++i) CTHR_THREAD_JOIN(st[i]); CTHR_RWLOCK_UNLOCK_READ(main_cache_lock); @@ -402,6 +402,7 @@ void rx_set_main_seedhash(const char *seedhash, size_t max_dataset_init_threads) if (!CTHR_THREAD_CREATE(t, rx_set_main_seedhash_thread, info)) { local_abort("Couldn't start RandomX seed thread"); } + CTHR_THREAD_CLOSE(t); } void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash) { diff --git a/src/crypto/skein_port.h b/src/crypto/skein_port.h index 2b701e8cc..6ba83d3d7 100644 --- a/src/crypto/skein_port.h +++ b/src/crypto/skein_port.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 0de7db505..6b975f627 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/tree-hash.c b/src/crypto/tree-hash.c index 93a1bce4d..0959b5050 100644 --- a/src/crypto/tree-hash.c +++ b/src/crypto/tree-hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/crypto/wallet/CMakeLists.txt b/src/crypto/wallet/CMakeLists.txt index ac1bdf7fd..e724b3e96 100644 --- a/src/crypto/wallet/CMakeLists.txt +++ b/src/crypto/wallet/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, The Monero Project +# Copyright (c) 2020-2023, The Monero Project # # All rights reserved. diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h index cee0ca18e..27da956ec 100644 --- a/src/crypto/wallet/crypto.h +++ b/src/crypto/wallet/crypto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/crypto/wallet/empty.h.in b/src/crypto/wallet/empty.h.in index b884a57b5..bf54f54c5 100644 --- a/src/crypto/wallet/empty.h.in +++ b/src/crypto/wallet/empty.h.in @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt index 1414be1b2..864306cf7 100644 --- a/src/cryptonote_basic/CMakeLists.txt +++ b/src/cryptonote_basic/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp index 2ac455fda..9dc6e387d 100644 --- a/src/cryptonote_basic/account.cpp +++ b/src/cryptonote_basic/account.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/account.h b/src/cryptonote_basic/account.h index 2ee9545d4..7578aaf2a 100644 --- a/src/cryptonote_basic/account.h +++ b/src/cryptonote_basic/account.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/account_boost_serialization.h b/src/cryptonote_basic/account_boost_serialization.h index ce0e4501a..ca1a1aa29 100644 --- a/src/cryptonote_basic/account_boost_serialization.h +++ b/src/cryptonote_basic/account_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/blobdatatype.h b/src/cryptonote_basic/blobdatatype.h index 49735c034..98d05022c 100644 --- a/src/cryptonote_basic/blobdatatype.h +++ b/src/cryptonote_basic/blobdatatype.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/connection_context.cpp b/src/cryptonote_basic/connection_context.cpp index 4395bad9f..37cf31de4 100644 --- a/src/cryptonote_basic/connection_context.cpp +++ b/src/cryptonote_basic/connection_context.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h index 818999a60..e88c4ba7e 100644 --- a/src/cryptonote_basic/connection_context.h +++ b/src/cryptonote_basic/connection_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index 127958796..2ced7d2bc 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_basic_impl.cpp b/src/cryptonote_basic/cryptonote_basic_impl.cpp index c60a62689..9bde20609 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.cpp +++ b/src/cryptonote_basic/cryptonote_basic_impl.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_basic_impl.h b/src/cryptonote_basic/cryptonote_basic_impl.h index b423573c5..9746861e3 100644 --- a/src/cryptonote_basic/cryptonote_basic_impl.h +++ b/src/cryptonote_basic/cryptonote_basic_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_boost_serialization.h b/src/cryptonote_basic/cryptonote_boost_serialization.h index 493c9d91d..954f429cb 100644 --- a/src/cryptonote_basic/cryptonote_boost_serialization.h +++ b/src/cryptonote_basic/cryptonote_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp index 829e5fc70..cdbcf48c2 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_format_utils.h b/src/cryptonote_basic/cryptonote_format_utils.h index b97c9d499..33fec238e 100644 --- a/src/cryptonote_basic/cryptonote_format_utils.h +++ b/src/cryptonote_basic/cryptonote_format_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/cryptonote_format_utils_basic.cpp b/src/cryptonote_basic/cryptonote_format_utils_basic.cpp index 7431a1beb..fccfeccba 100644 --- a/src/cryptonote_basic/cryptonote_format_utils_basic.cpp +++ b/src/cryptonote_basic/cryptonote_format_utils_basic.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/difficulty.cpp b/src/cryptonote_basic/difficulty.cpp index 165c1936e..a9777c581 100644 --- a/src/cryptonote_basic/difficulty.cpp +++ b/src/cryptonote_basic/difficulty.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/difficulty.h b/src/cryptonote_basic/difficulty.h index ee9378eb9..93964646e 100644 --- a/src/cryptonote_basic/difficulty.h +++ b/src/cryptonote_basic/difficulty.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/events.h b/src/cryptonote_basic/events.h index 18ea99800..476ff6a22 100644 --- a/src/cryptonote_basic/events.h +++ b/src/cryptonote_basic/events.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/fwd.h b/src/cryptonote_basic/fwd.h index 54f3c0184..dd0d3aec3 100644 --- a/src/cryptonote_basic/fwd.h +++ b/src/cryptonote_basic/fwd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp index a0ea3633f..aa10e4709 100644 --- a/src/cryptonote_basic/hardfork.cpp +++ b/src/cryptonote_basic/hardfork.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/hardfork.h b/src/cryptonote_basic/hardfork.h index f43710f4f..9b2fef0e1 100644 --- a/src/cryptonote_basic/hardfork.h +++ b/src/cryptonote_basic/hardfork.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/merge_mining.cpp b/src/cryptonote_basic/merge_mining.cpp index b8d16aade..0e649e095 100644 --- a/src/cryptonote_basic/merge_mining.cpp +++ b/src/cryptonote_basic/merge_mining.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/merge_mining.h b/src/cryptonote_basic/merge_mining.h index 8fe282a76..acb70ebf0 100644 --- a/src/cryptonote_basic/merge_mining.h +++ b/src/cryptonote_basic/merge_mining.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 98f1555b6..249896ee8 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/miner.h b/src/cryptonote_basic/miner.h index 72dc12762..35b988bd7 100644 --- a/src/cryptonote_basic/miner.h +++ b/src/cryptonote_basic/miner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/subaddress_index.h b/src/cryptonote_basic/subaddress_index.h index 612d1e8a5..788040ae4 100644 --- a/src/cryptonote_basic/subaddress_index.h +++ b/src/cryptonote_basic/subaddress_index.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/tx_extra.h b/src/cryptonote_basic/tx_extra.h index 141f72352..af6ee5197 100644 --- a/src/cryptonote_basic/tx_extra.h +++ b/src/cryptonote_basic/tx_extra.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_basic/verification_context.h b/src/cryptonote_basic/verification_context.h index 34157218f..11d54ae9f 100644 --- a/src/cryptonote_basic/verification_context.h +++ b/src/cryptonote_basic/verification_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -42,7 +42,12 @@ namespace cryptonote static_assert(unsigned(relay_method::none) == 0, "default m_relay initialization is not to relay_method::none"); relay_method m_relay; // gives indication on how tx should be relayed (if at all) - bool m_verifivation_failed; //bad tx, should drop connection + bool m_verifivation_failed; //bad tx, tx should not enter mempool and connection should be dropped unless m_no_drop_offense + // Do not add to mempool, do not relay, but also do not punish the peer for sending or drop + // connections to them. Used for low fees, tx_extra too big, "relay-only rules". Not to be + // confused with breaking soft fork rules, because tx could be later added to the chain if mined + // because it does not violate consensus rules. + bool m_no_drop_offense; bool m_verifivation_impossible; //the transaction is related with an alternative blockchain bool m_added_to_pool; bool m_low_mixin; @@ -53,6 +58,7 @@ namespace cryptonote bool m_overspend; bool m_fee_too_low; bool m_too_few_outputs; + bool m_tx_extra_too_big; }; struct block_verification_context diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 2ec194ef8..45da75b66 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -206,6 +206,11 @@ #define DNS_BLOCKLIST_LIFETIME (86400 * 8) +//The limit is enough for the mandatory transaction content with 16 outputs (547 bytes), +//a custom tag (1 byte) and up to 32 bytes of custom data for each recipient. +// (1+32) + (1+1+16*32) + (1+16*32) = 1060 +#define MAX_TX_EXTRA_SIZE 1060 + // New constants are intended to go here namespace config { @@ -248,6 +253,7 @@ namespace config const unsigned char HASH_KEY_MM_SLOT = 'm'; const constexpr char HASH_KEY_MULTISIG_TX_PRIVKEYS_SEED[] = "multisig_tx_privkeys_seed"; const constexpr char HASH_KEY_MULTISIG_TX_PRIVKEYS[] = "multisig_tx_privkeys"; + const constexpr char HASH_KEY_TXHASH_AND_MIXRING[] = "txhash_and_mixring"; // Multisig const uint32_t MULTISIG_MAX_SIGNERS{16}; diff --git a/src/cryptonote_core/CMakeLists.txt b/src/cryptonote_core/CMakeLists.txt index 69411e379..373732b3b 100644 --- a/src/cryptonote_core/CMakeLists.txt +++ b/src/cryptonote_core/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # @@ -31,7 +31,9 @@ set(cryptonote_core_sources cryptonote_core.cpp tx_pool.cpp tx_sanity_check.cpp - cryptonote_tx_utils.cpp) + cryptonote_tx_utils.cpp + tx_verification_utils.cpp +) set(cryptonote_core_headers) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 1baa6bff9..dc20bd1ff 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -56,6 +56,7 @@ #include "common/notify.h" #include "common/varint.h" #include "common/pruning.h" +#include "common/data_cache.h" #include "time_helper.h" #undef MONERO_DEFAULT_LOG_CATEGORY @@ -97,7 +98,8 @@ Blockchain::Blockchain(tx_memory_pool& tx_pool) : m_difficulty_for_next_block(1), m_btc_valid(false), m_batch_success(true), - m_prepare_height(0) + m_prepare_height(0), + m_rct_ver_cache() { LOG_PRINT_L3("Blockchain::" << __func__); } @@ -2062,7 +2064,7 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id cryptonote::blobdata blob; if (m_tx_pool.have_tx(txid, relay_category::legacy)) { - if (m_tx_pool.get_transaction_info(txid, td)) + if (m_tx_pool.get_transaction_info(txid, td, true/*include_sensitive_data*/)) { bei.block_cumulative_weight += td.weight; } @@ -3210,7 +3212,7 @@ bool Blockchain::have_tx_keyimges_as_spent(const transaction &tx) const } return false; } -bool Blockchain::expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys) const +bool Blockchain::expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys) { PERF_TIMER(expand_transaction_2); CHECK_AND_ASSERT_MES(tx.version == 2, false, "Transaction version is not 2"); @@ -3533,6 +3535,13 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, false, "Transaction spends at least one output which is too young"); } + // Warn that new RCT types are present, and thus the cache is not being used effectively + static constexpr const std::uint8_t RCT_CACHE_TYPE = rct::RCTTypeBulletproofPlus; + if (tx.rct_signatures.type > RCT_CACHE_TYPE) + { + MWARNING("RCT cache is not caching new verification results. Please update RCT_CACHE_TYPE!"); + } + if (tx.version == 1) { if (threads > 1) @@ -3554,12 +3563,6 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } else { - if (!expand_transaction_2(tx, tx_prefix_hash, pubkeys)) - { - MERROR_VER("Failed to expand rct signatures!"); - return false; - } - // from version 2, check ringct signatures // obviously, the original and simple rct APIs use a mixRing that's indexes // in opposite orders, because it'd be too simple otherwise... @@ -3577,61 +3580,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, case rct::RCTTypeCLSAG: case rct::RCTTypeBulletproofPlus: { - // check all this, either reconstructed (so should really pass), or not - { - if (pubkeys.size() != rv.mixRing.size()) - { - MERROR_VER("Failed to check ringct signatures: mismatched pubkeys/mixRing size"); - return false; - } - for (size_t i = 0; i < pubkeys.size(); ++i) - { - if (pubkeys[i].size() != rv.mixRing[i].size()) - { - MERROR_VER("Failed to check ringct signatures: mismatched pubkeys/mixRing size"); - return false; - } - } - - for (size_t n = 0; n < pubkeys.size(); ++n) - { - for (size_t m = 0; m < pubkeys[n].size(); ++m) - { - if (pubkeys[n][m].dest != rct::rct2pk(rv.mixRing[n][m].dest)) - { - MERROR_VER("Failed to check ringct signatures: mismatched pubkey at vin " << n << ", index " << m); - return false; - } - if (pubkeys[n][m].mask != rct::rct2pk(rv.mixRing[n][m].mask)) - { - MERROR_VER("Failed to check ringct signatures: mismatched commitment at vin " << n << ", index " << m); - return false; - } - } - } - } - - const size_t n_sigs = rct::is_rct_clsag(rv.type) ? rv.p.CLSAGs.size() : rv.p.MGs.size(); - if (n_sigs != tx.vin.size()) - { - MERROR_VER("Failed to check ringct signatures: mismatched MGs/vin sizes"); - return false; - } - for (size_t n = 0; n < tx.vin.size(); ++n) - { - bool error; - if (rct::is_rct_clsag(rv.type)) - error = memcmp(&boost::get<txin_to_key>(tx.vin[n]).k_image, &rv.p.CLSAGs[n].I, 32); - else - error = rv.p.MGs[n].II.empty() || memcmp(&boost::get<txin_to_key>(tx.vin[n]).k_image, &rv.p.MGs[n].II[0], 32); - if (error) - { - MERROR_VER("Failed to check ringct signatures: mismatched key image"); - return false; - } - } - - if (!rct::verRctNonSemanticsSimpleCached(rv)) + if (!ver_rct_non_semantics_simple_cached(tx, pubkeys, m_rct_ver_cache, RCT_CACHE_TYPE)) { MERROR_VER("Failed to check ringct signatures!"); return false; @@ -3640,6 +3589,12 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } case rct::RCTTypeFull: { + if (!expand_transaction_2(tx, tx_prefix_hash, pubkeys)) + { + MERROR_VER("Failed to expand rct signatures!"); + return false; + } + // check all this, either reconstructed (so should really pass), or not { bool size_matches = true; diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index c61ce4466..a45d3ec60 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -57,6 +57,7 @@ #include "rpc/core_rpc_server_commands_defs.h" #include "cryptonote_basic/difficulty.h" #include "cryptonote_tx_utils.h" +#include "tx_verification_utils.h" #include "cryptonote_basic/verification_context.h" #include "crypto/hash.h" #include "checkpoints/checkpoints.h" @@ -597,6 +598,15 @@ namespace cryptonote bool store_blockchain(); /** + * @brief expands v2 transaction data from blockchain + * + * RingCT transactions do not transmit some of their data if it + * can be reconstituted by the receiver. This function expands + * that implicit data. + */ + static bool expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys); + + /** * @brief validates a transaction's inputs * * validates a transaction's inputs as correctly used and not previously @@ -1222,6 +1232,9 @@ namespace cryptonote uint64_t m_prepare_nblocks; std::vector<block> *m_prepare_blocks; + // cache for verifying transaction RCT non semantics + mutable rct_ver_cache_t m_rct_ver_cache; + /** * @brief collects the keys for all outputs being "spent" as an input * @@ -1575,15 +1588,6 @@ namespace cryptonote void load_compiled_in_block_hashes(const GetCheckpointsCallback& get_checkpoints); /** - * @brief expands v2 transaction data from blockchain - * - * RingCT transactions do not transmit some of their data if it - * can be reconstituted by the receiver. This function expands - * that implicit data. - */ - bool expand_transaction_2(transaction &tx, const crypto::hash &tx_prefix_hash, const std::vector<std::vector<rct::ctkey>> &pubkeys) const; - - /** * @brief invalidates any cached block template */ void invalidate_block_template_cache(); diff --git a/src/cryptonote_core/blockchain_storage_boost_serialization.h b/src/cryptonote_core/blockchain_storage_boost_serialization.h index d166caf76..3c6f87886 100644 --- a/src/cryptonote_core/blockchain_storage_boost_serialization.h +++ b/src/cryptonote_core/blockchain_storage_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index d8c782f78..72ddd0dc9 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -1099,7 +1099,7 @@ namespace cryptonote else if(tvc[i].m_verifivation_impossible) {MERROR_VER("Transaction verification impossible: " << results[i].hash);} - if(tvc[i].m_added_to_pool) + if(tvc[i].m_added_to_pool && results[i].tx.extra.size() <= MAX_TX_EXTRA_SIZE) { MDEBUG("tx added: " << results[i].hash); valid_events = true; @@ -1727,6 +1727,11 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- + bool core::get_pool_transactions_info(const std::vector<crypto::hash>& txids, std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>>& txs, bool include_sensitive_txes) const + { + return m_mempool.get_transactions_info(txids, txs, include_sensitive_txes); + } + //----------------------------------------------------------------------------------------------- bool core::get_pool_transactions(std::vector<transaction>& txs, bool include_sensitive_data) const { m_mempool.get_transactions(txs, include_sensitive_data); @@ -1739,6 +1744,11 @@ namespace cryptonote return true; } //----------------------------------------------------------------------------------------------- + bool core::get_pool_info(time_t start_time, bool include_sensitive_txes, size_t max_tx_count, std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>>& added_txs, std::vector<crypto::hash>& remaining_added_txids, std::vector<crypto::hash>& removed_txs, bool& incremental) const + { + return m_mempool.get_pool_info(start_time, include_sensitive_txes, max_tx_count, added_txs, remaining_added_txids, removed_txs, incremental); + } + //----------------------------------------------------------------------------------------------- bool core::get_pool_transaction_stats(struct txpool_stats& stats, bool include_sensitive_data) const { m_mempool.get_transaction_stats(stats, include_sensitive_data); diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index 6dc513570..e0655dfa2 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -510,6 +510,23 @@ namespace cryptonote bool get_pool_transaction_hashes(std::vector<crypto::hash>& txs, bool include_sensitive_txes = false) const; /** + * @copydoc tx_memory_pool::get_pool_transactions_info + * @param include_sensitive_txes include private transactions + * + * @note see tx_memory_pool::get_pool_transactions_info + */ + bool get_pool_transactions_info(const std::vector<crypto::hash>& txids, std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>>& txs, bool include_sensitive_txes = false) const; + + /** + * @copydoc tx_memory_pool::get_pool_info + * @param include_sensitive_txes include private transactions + * @param max_tx_count max allowed added_txs in response + * + * @note see tx_memory_pool::get_pool_info + */ + bool get_pool_info(time_t start_time, bool include_sensitive_txes, size_t max_tx_count, std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>>& added_txs, std::vector<crypto::hash>& remaining_added_txids, std::vector<crypto::hash>& removed_txs, bool& incremental) const; + + /** * @copydoc tx_memory_pool::get_transactions * @param include_sensitive_txes include private transactions * diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp index bf58a120d..60b399bb5 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.cpp +++ b/src/cryptonote_core/cryptonote_tx_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -437,6 +437,8 @@ namespace cryptonote if (!sort_tx_extra(tx.extra, tx.extra)) return false; + CHECK_AND_ASSERT_MES(tx.extra.size() <= MAX_TX_EXTRA_SIZE, false, "TX extra size (" << tx.extra.size() << ") is greater than max allowed (" << MAX_TX_EXTRA_SIZE << ")"); + //check money if(summary_outs_money > summary_inputs_money ) { diff --git a/src/cryptonote_core/cryptonote_tx_utils.h b/src/cryptonote_core/cryptonote_tx_utils.h index 5f301bb89..2ee93fd8f 100644 --- a/src/cryptonote_core/cryptonote_tx_utils.h +++ b/src/cryptonote_core/cryptonote_tx_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_core/i_core_events.h b/src/cryptonote_core/i_core_events.h index 629194543..cbebd9efb 100644 --- a/src/cryptonote_core/i_core_events.h +++ b/src/cryptonote_core/i_core_events.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 3346a9aba..d86a9f5f9 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -132,6 +132,12 @@ namespace cryptonote // class code expects unsigned values throughout if (m_next_check < time_t(0)) throw std::runtime_error{"Unexpected time_t (system clock) value"}; + + m_added_txs_start_time = (time_t)0; + m_removed_txs_start_time = (time_t)0; + // We don't set these to "now" already here as we don't know how long it takes from construction + // of the pool until it "goes to work". It's safer to set when the first actual txs enter the + // corresponding lists. } //--------------------------------------------------------------------------------- bool tx_memory_pool::add_tx(transaction &tx, /*const crypto::hash& tx_prefix_hash,*/ const crypto::hash &id, const cryptonote::blobdata &blob, size_t tx_weight, tx_verification_context& tvc, relay_method tx_relay, bool relayed, uint8_t version) @@ -206,6 +212,7 @@ namespace cryptonote { tvc.m_verifivation_failed = true; tvc.m_fee_too_low = true; + tvc.m_no_drop_offense = true; return false; } @@ -218,6 +225,16 @@ namespace cryptonote return false; } + size_t tx_extra_size = tx.extra.size(); + if (!kept_by_block && tx_extra_size > MAX_TX_EXTRA_SIZE) + { + LOG_PRINT_L1("transaction tx-extra is too big: " << tx_extra_size << " bytes, the limit is: " << MAX_TX_EXTRA_SIZE); + tvc.m_verifivation_failed = true; + tvc.m_tx_extra_too_big = true; + tvc.m_no_drop_offense = true; + return false; + } + // if the transaction came from a block popped from the chain, // don't check if we have its key images as spent. // TODO: Investigate why not? @@ -280,7 +297,7 @@ namespace cryptonote return false; m_blockchain.add_txpool_tx(id, blob, meta); - m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(fee / (double)(tx_weight ? tx_weight : 1), receive_time), id); + add_tx_to_transient_lists(id, fee / (double)(tx_weight ? tx_weight : 1), receive_time); lock.commit(); } catch (const std::exception &e) @@ -351,7 +368,7 @@ namespace cryptonote m_blockchain.remove_txpool_tx(id); m_blockchain.add_txpool_tx(id, blob, meta); - m_txs_by_fee_and_receive_time.emplace(std::pair<double, std::time_t>(fee / (double)(tx_weight ? tx_weight : 1), receive_time), id); + add_tx_to_transient_lists(id, meta.fee / (double)(tx_weight ? tx_weight : 1), receive_time); } lock.commit(); } @@ -372,7 +389,7 @@ namespace cryptonote ++m_cookie; - MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)(tx_weight ? tx_weight : 1))); + MINFO("Transaction added to pool: txid " << id << " weight: " << tx_weight << " fee/byte: " << (fee / (double)(tx_weight ? tx_weight : 1)) << ", count: " << m_added_txs_by_id.size()); prune(m_txpool_max_weight); @@ -463,7 +480,8 @@ namespace cryptonote reduce_txpool_weight(meta.weight); remove_transaction_keyimages(tx, txid); MINFO("Pruned tx " << txid << " from txpool: weight: " << meta.weight << ", fee/byte: " << it->first.first); - m_txs_by_fee_and_receive_time.erase(it--); + remove_tx_from_transient_lists(it, txid, !meta.matches(relay_category::broadcasted)); + it--; changed = true; } catch (const std::exception &e) @@ -545,8 +563,7 @@ namespace cryptonote CRITICAL_REGION_LOCAL(m_transactions_lock); CRITICAL_REGION_LOCAL1(m_blockchain); - auto sorted_it = find_tx_in_sorted_container(id); - + bool sensitive = false; try { LockedTXN lock(m_blockchain.get_db()); @@ -577,6 +594,7 @@ namespace cryptonote do_not_relay = meta.do_not_relay; double_spend_seen = meta.double_spend_seen; pruned = meta.pruned; + sensitive = !meta.matches(relay_category::broadcasted); // remove first, in case this throws, so key images aren't removed m_blockchain.remove_txpool_tx(id); @@ -590,13 +608,12 @@ namespace cryptonote return false; } - if (sorted_it != m_txs_by_fee_and_receive_time.end()) - m_txs_by_fee_and_receive_time.erase(sorted_it); + remove_tx_from_transient_lists(find_tx_in_sorted_container(id), id, sensitive); ++m_cookie; return true; } //--------------------------------------------------------------------------------- - bool tx_memory_pool::get_transaction_info(const crypto::hash &txid, tx_details &td) const + bool tx_memory_pool::get_transaction_info(const crypto::hash &txid, tx_details &td, bool include_sensitive_data, bool include_blob) const { PERF_TIMER(get_transaction_info); CRITICAL_REGION_LOCAL(m_transactions_lock); @@ -608,7 +625,12 @@ namespace cryptonote txpool_tx_meta_t meta; if (!m_blockchain.get_txpool_tx_meta(txid, meta)) { - MERROR("Failed to find tx in txpool"); + LOG_PRINT_L2("Failed to find tx in txpool: " << txid); + return false; + } + if (!include_sensitive_data && !meta.matches(relay_category::broadcasted)) + { + // We don't want sensitive data && the tx is sensitive, so no need to return it return false; } cryptonote::blobdata txblob = m_blockchain.get_txpool_tx_blob(txid, relay_category::all); @@ -634,11 +656,13 @@ namespace cryptonote td.kept_by_block = meta.kept_by_block; td.last_failed_height = meta.last_failed_height; td.last_failed_id = meta.last_failed_id; - td.receive_time = meta.receive_time; - td.last_relayed_time = meta.dandelionpp_stem ? 0 : meta.last_relayed_time; + td.receive_time = include_sensitive_data ? meta.receive_time : 0; + td.last_relayed_time = (include_sensitive_data && !meta.dandelionpp_stem) ? meta.last_relayed_time : 0; td.relayed = meta.relayed; td.do_not_relay = meta.do_not_relay; td.double_spend_seen = meta.double_spend_seen; + if (include_blob) + td.tx_blob = std::move(txblob); } catch (const std::exception &e) { @@ -648,6 +672,25 @@ namespace cryptonote return true; } + //------------------------------------------------------------------ + bool tx_memory_pool::get_transactions_info(const std::vector<crypto::hash>& txids, std::vector<std::pair<crypto::hash, tx_details>>& txs, bool include_sensitive) const + { + CRITICAL_REGION_LOCAL(m_transactions_lock); + CRITICAL_REGION_LOCAL1(m_blockchain); + + txs.clear(); + + for (const auto &it: txids) + { + tx_details details; + bool success = get_transaction_info(it, details, include_sensitive, true/*include_blob*/); + if (success) + { + txs.push_back(std::make_pair(it, std::move(details))); + } + } + return true; + } //--------------------------------------------------------------------------------- bool tx_memory_pool::get_complement(const std::vector<crypto::hash> &hashes, std::vector<cryptonote::blobdata> &txes) const { @@ -709,15 +752,7 @@ namespace cryptonote (tx_age > CRYPTONOTE_MEMPOOL_TX_FROM_ALT_BLOCK_LIVETIME && meta.kept_by_block) ) { LOG_PRINT_L1("Tx " << txid << " removed from tx pool due to outdated, age: " << tx_age ); - auto sorted_it = find_tx_in_sorted_container(txid); - if (sorted_it == m_txs_by_fee_and_receive_time.end()) - { - LOG_PRINT_L1("Removing tx " << txid << " from tx pool, but it was not found in the sorted txs container!"); - } - else - { - m_txs_by_fee_and_receive_time.erase(sorted_it); - } + remove_tx_from_transient_lists(find_tx_in_sorted_container(txid), txid, !meta.matches(relay_category::broadcasted)); m_timed_out_transactions.insert(txid); remove.push_back(std::make_pair(txid, meta.weight)); } @@ -871,9 +906,12 @@ namespace cryptonote meta.last_relayed_time = std::chrono::system_clock::to_time_t(now); m_blockchain.update_txpool_tx(hash, meta); - // wait until db update succeeds to ensure tx is visible in the pool was_just_broadcasted = !already_broadcasted && meta.matches(relay_category::broadcasted); + + if (was_just_broadcasted) + // Make sure the tx gets re-added with an updated time + add_tx_to_transient_lists(hash, meta.fee / (double)meta.weight, std::chrono::system_clock::to_time_t(now)); } } catch (const std::exception &e) @@ -926,6 +964,81 @@ namespace cryptonote }, false, category); } //------------------------------------------------------------------ + bool tx_memory_pool::get_pool_info(time_t start_time, bool include_sensitive, size_t max_tx_count, std::vector<std::pair<crypto::hash, tx_details>>& added_txs, std::vector<crypto::hash>& remaining_added_txids, std::vector<crypto::hash>& removed_txs, bool& incremental) const + { + CRITICAL_REGION_LOCAL(m_transactions_lock); + CRITICAL_REGION_LOCAL1(m_blockchain); + + incremental = true; + if (start_time == (time_t)0) + { + // Giving no start time means give back whole pool + incremental = false; + } + else if ((m_added_txs_start_time != (time_t)0) && (m_removed_txs_start_time != (time_t)0)) + { + if ((start_time <= m_added_txs_start_time) || (start_time <= m_removed_txs_start_time)) + { + // If either of the two lists do not go back far enough it's not possible to + // deliver incremental pool info + incremental = false; + } + // The check uses "<=": We cannot be sure to have ALL txs exactly at start_time, only AFTER that time + } + else + { + // Some incremental info still missing completely + incremental = false; + } + + added_txs.clear(); + remaining_added_txids.clear(); + removed_txs.clear(); + + std::vector<crypto::hash> txids; + if (!incremental) + { + LOG_PRINT_L2("Giving back the whole pool"); + // Give back the whole pool in 'added_txs'; because calling 'get_transaction_info' right inside the + // anonymous method somehow results in an LMDB error with transactions we have to build a list of + // ids first and get the full info afterwards + get_transaction_hashes(txids, include_sensitive); + if (txids.size() > max_tx_count) + { + remaining_added_txids = std::vector<crypto::hash>(txids.begin() + max_tx_count, txids.end()); + txids.erase(txids.begin() + max_tx_count, txids.end()); + } + get_transactions_info(txids, added_txs, include_sensitive); + return true; + } + + // Give back incrementally, based on time of entry into the map + for (const auto &pit : m_added_txs_by_id) + { + if (pit.second >= start_time) + txids.push_back(pit.first); + } + get_transactions_info(txids, added_txs, include_sensitive); + if (added_txs.size() > max_tx_count) + { + remaining_added_txids.reserve(added_txs.size() - max_tx_count); + for (size_t i = max_tx_count; i < added_txs.size(); ++i) + remaining_added_txids.push_back(added_txs[i].first); + added_txs.erase(added_txs.begin() + max_tx_count, added_txs.end()); + } + + std::multimap<time_t, removed_tx_info>::const_iterator rit = m_removed_txs_by_time.lower_bound(start_time); + while (rit != m_removed_txs_by_time.end()) + { + if (include_sensitive || !rit->second.sensitive) + { + removed_txs.push_back(rit->second.txid); + } + ++rit; + } + return true; + } + //------------------------------------------------------------------ void tx_memory_pool::get_transaction_backlog(std::vector<tx_backlog_entry>& backlog, bool include_sensitive) const { CRITICAL_REGION_LOCAL(m_transactions_lock); @@ -1630,6 +1743,12 @@ namespace cryptonote CRITICAL_REGION_LOCAL(m_transactions_lock); CRITICAL_REGION_LOCAL1(m_blockchain); + // Simply throw away incremental info, too difficult to update + m_added_txs_by_id.clear(); + m_added_txs_start_time = (time_t)0; + m_removed_txs_by_time.clear(); + m_removed_txs_start_time = (time_t)0; + MINFO("Validating txpool contents for v" << (unsigned)version); LockedTXN lock(m_blockchain.get_db()); @@ -1687,6 +1806,106 @@ namespace cryptonote return n_removed; } //--------------------------------------------------------------------------------- + void tx_memory_pool::add_tx_to_transient_lists(const crypto::hash& txid, double fee, time_t receive_time) + { + + time_t now = time(NULL); + const std::unordered_map<crypto::hash, time_t>::iterator it = m_added_txs_by_id.find(txid); + if (it == m_added_txs_by_id.end()) + { + m_added_txs_by_id.insert(std::make_pair(txid, now)); + } + else + { + // This tx was already added to the map earlier, probably because then it was in the "stem" + // phase of Dandelion++ and now is in the "fluff" phase i.e. got broadcasted: We have to set + // a new time for clients that are not allowed to see sensitive txs to make sure they will + // see it now if they query incrementally + it->second = now; + + auto sorted_it = find_tx_in_sorted_container(txid); + if (sorted_it == m_txs_by_fee_and_receive_time.end()) + { + MERROR("Re-adding tx " << txid << " to tx pool, but it was not found in the sorted txs container"); + } + else + { + m_txs_by_fee_and_receive_time.erase(sorted_it); + } + } + m_txs_by_fee_and_receive_time.emplace(std::pair<double, time_t>(fee, receive_time), txid); + + // Don't check for "resurrected" txs in case of reorgs i.e. don't check in 'm_removed_txs_by_time' + // whether we have that txid there and if yes remove it; this results in possible duplicates + // where we return certain txids as deleted AND in the pool at the same time which requires + // clients to process deleted ones BEFORE processing pool txs + if (m_added_txs_start_time == (time_t)0) + { + m_added_txs_start_time = now; + } + } + //--------------------------------------------------------------------------------- + void tx_memory_pool::remove_tx_from_transient_lists(const cryptonote::sorted_tx_container::iterator& sorted_it, const crypto::hash& txid, bool sensitive) + { + if (sorted_it == m_txs_by_fee_and_receive_time.end()) + { + LOG_PRINT_L1("Removing tx " << txid << " from tx pool, but it was not found in the sorted txs container!"); + } + else + { + m_txs_by_fee_and_receive_time.erase(sorted_it); + } + + const std::unordered_map<crypto::hash, time_t>::iterator it = m_added_txs_by_id.find(txid); + if (it != m_added_txs_by_id.end()) + { + m_added_txs_by_id.erase(it); + } + else + { + MDEBUG("Removing tx " << txid << " from tx pool, but it was not found in the map of added txs"); + } + track_removed_tx(txid, sensitive); + } + //--------------------------------------------------------------------------------- + void tx_memory_pool::track_removed_tx(const crypto::hash& txid, bool sensitive) + { + time_t now = time(NULL); + m_removed_txs_by_time.insert(std::make_pair(now, removed_tx_info{txid, sensitive})); + MDEBUG("Transaction removed from pool: txid " << txid << ", total entries in removed list now " << m_removed_txs_by_time.size()); + if (m_removed_txs_start_time == (time_t)0) + { + m_removed_txs_start_time = now; + } + + // Simple system to make sure the list of removed ids does not swell to an unmanageable size: Set + // an absolute size limit plus delete entries that are x minutes old (which is ok because clients + // will sync with sensible time intervalls and should not ask for incremental info e.g. 1 hour back) + const int MAX_REMOVED = 20000; + if (m_removed_txs_by_time.size() > MAX_REMOVED) + { + auto erase_it = m_removed_txs_by_time.begin(); + std::advance(erase_it, MAX_REMOVED / 4 + 1); + m_removed_txs_by_time.erase(m_removed_txs_by_time.begin(), erase_it); + m_removed_txs_start_time = m_removed_txs_by_time.begin()->first; + MDEBUG("Erased old transactions from big removed list, leaving " << m_removed_txs_by_time.size()); + } + else + { + time_t earliest = now - (30 * 60); // 30 minutes + std::map<time_t, removed_tx_info>::iterator from, to; + from = m_removed_txs_by_time.begin(); + to = m_removed_txs_by_time.lower_bound(earliest); + int distance = std::distance(from, to); + if (distance > 0) + { + m_removed_txs_by_time.erase(from, to); + m_removed_txs_start_time = earliest; + MDEBUG("Erased " << distance << " old transactions from removed list, leaving " << m_removed_txs_by_time.size()); + } + } + } + //--------------------------------------------------------------------------------- bool tx_memory_pool::init(size_t max_txpool_weight, bool mine_stem_txes) { CRITICAL_REGION_LOCAL(m_transactions_lock); @@ -1694,6 +1913,10 @@ namespace cryptonote m_txpool_max_weight = max_txpool_weight ? max_txpool_weight : DEFAULT_TXPOOL_MAX_WEIGHT; m_txs_by_fee_and_receive_time.clear(); + m_added_txs_by_id.clear(); + m_added_txs_start_time = (time_t)0; + m_removed_txs_by_time.clear(); + m_removed_txs_start_time = (time_t)0; m_spent_key_images.clear(); m_txpool_weight = 0; std::vector<crypto::hash> remove; @@ -1718,7 +1941,7 @@ namespace cryptonote MFATAL("Failed to insert key images from txpool tx"); return false; } - m_txs_by_fee_and_receive_time.emplace(std::pair<double, time_t>(meta.fee / (double)meta.weight, meta.receive_time), txid); + add_tx_to_transient_lists(txid, meta.fee / (double)meta.weight, meta.receive_time); m_txpool_weight += meta.weight; return true; }, true, relay_category::all); diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h index 45623fd14..6fe2eea59 100644 --- a/src/cryptonote_core/tx_pool.h +++ b/src/cryptonote_core/tx_pool.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -428,6 +428,7 @@ namespace cryptonote struct tx_details { transaction tx; //!< the transaction + cryptonote::blobdata tx_blob; //!< the transaction's binary blob size_t blob_size; //!< the transaction's size size_t weight; //!< the transaction's weight uint64_t fee; //!< the transaction's fee amount @@ -466,13 +467,25 @@ namespace cryptonote /** * @brief get infornation about a single transaction */ - bool get_transaction_info(const crypto::hash &txid, tx_details &td) const; + bool get_transaction_info(const crypto::hash &txid, tx_details &td, bool include_sensitive_data, bool include_blob = false) const; + + /** + * @brief get information about multiple transactions + */ + bool get_transactions_info(const std::vector<crypto::hash>& txids, std::vector<std::pair<crypto::hash, tx_details>>& txs, bool include_sensitive_data = false) const; /** * @brief get transactions not in the passed set */ bool get_complement(const std::vector<crypto::hash> &hashes, std::vector<cryptonote::blobdata> &txes) const; + /** + * @brief get info necessary for update of pool-related info in a wallet, preferably incremental + * + * @return true on success, false on error + */ + bool get_pool_info(time_t start_time, bool include_sensitive, size_t max_tx_count, std::vector<std::pair<crypto::hash, tx_details>>& added_txs, std::vector<crypto::hash>& remaining_added_txids, std::vector<crypto::hash>& removed_txs, bool& incremental) const; + private: /** @@ -577,6 +590,10 @@ namespace cryptonote */ void prune(size_t bytes = 0); + void add_tx_to_transient_lists(const crypto::hash& txid, double fee, time_t receive_time); + void remove_tx_from_transient_lists(const cryptonote::sorted_tx_container::iterator& sorted_it, const crypto::hash& txid, bool sensitive); + void track_removed_tx(const crypto::hash& txid, bool sensitive); + //TODO: confirm the below comments and investigate whether or not this // is the desired behavior //! map key images to transactions which spent them @@ -609,6 +626,26 @@ private: std::atomic<uint64_t> m_cookie; //!< incremented at each change + // Info when transactions entered the pool, accessible by txid + std::unordered_map<crypto::hash, time_t> m_added_txs_by_id; + + // Info at what time the pool started to track the adding of transactions + time_t m_added_txs_start_time; + + struct removed_tx_info + { + crypto::hash txid; + bool sensitive; + }; + + // Info about transactions that were removed from the pool, ordered by the time + // of deletion + std::multimap<time_t, removed_tx_info> m_removed_txs_by_time; + + // Info how far back in time the list of removed tx ids currently reaches + // (it gets shorted periodically to prevent overflow) + time_t m_removed_txs_start_time; + /** * @brief get an iterator to a transaction in the sorted container * diff --git a/src/cryptonote_core/tx_sanity_check.cpp b/src/cryptonote_core/tx_sanity_check.cpp index f46ec3bbc..99d5717cb 100644 --- a/src/cryptonote_core/tx_sanity_check.cpp +++ b/src/cryptonote_core/tx_sanity_check.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_core/tx_sanity_check.h b/src/cryptonote_core/tx_sanity_check.h index 9779a8e79..4d7bf741c 100644 --- a/src/cryptonote_core/tx_sanity_check.h +++ b/src/cryptonote_core/tx_sanity_check.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_core/tx_verification_utils.cpp b/src/cryptonote_core/tx_verification_utils.cpp new file mode 100644 index 000000000..a93ef2f25 --- /dev/null +++ b/src/cryptonote_core/tx_verification_utils.cpp @@ -0,0 +1,167 @@ +// Copyright (c) 2023, The Monero Project +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "cryptonote_core/blockchain.h" +#include "cryptonote_core/tx_verification_utils.h" +#include "ringct/rctSigs.h" + +#undef MONERO_DEFAULT_LOG_CATEGORY +#define MONERO_DEFAULT_LOG_CATEGORY "blockchain" + +#define VER_ASSERT(cond, msgexpr) CHECK_AND_ASSERT_MES(cond, false, msgexpr) + +using namespace cryptonote; + +// Do RCT expansion, then do post-expansion sanity checks, then do full non-semantics verification. +static bool expand_tx_and_ver_rct_non_sem(transaction& tx, const rct::ctkeyM& mix_ring) +{ + // Pruned transactions can not be expanded and verified because they are missing RCT data + VER_ASSERT(!tx.pruned, "Pruned transaction will not pass verRctNonSemanticsSimple"); + + // Calculate prefix hash + const crypto::hash tx_prefix_hash = get_transaction_prefix_hash(tx); + + // Expand mixring, tx inputs, tx key images, prefix hash message, etc into the RCT sig + const bool exp_res = Blockchain::expand_transaction_2(tx, tx_prefix_hash, mix_ring); + VER_ASSERT(exp_res, "Failed to expand rct signatures!"); + + const rct::rctSig& rv = tx.rct_signatures; + + // Check that expanded RCT mixring == input mixring + VER_ASSERT(rv.mixRing == mix_ring, "Failed to check ringct signatures: mismatched pubkeys/mixRing"); + + // Check CLSAG/MLSAG size against transaction input + const size_t n_sigs = rct::is_rct_clsag(rv.type) ? rv.p.CLSAGs.size() : rv.p.MGs.size(); + VER_ASSERT(n_sigs == tx.vin.size(), "Failed to check ringct signatures: mismatched input sigs/vin sizes"); + + // For each input, check that the key images were copied into the expanded RCT sig correctly + for (size_t n = 0; n < n_sigs; ++n) + { + const crypto::key_image& nth_vin_image = boost::get<txin_to_key>(tx.vin[n]).k_image; + + if (rct::is_rct_clsag(rv.type)) + { + const bool ki_match = 0 == memcmp(&nth_vin_image, &rv.p.CLSAGs[n].I, 32); + VER_ASSERT(ki_match, "Failed to check ringct signatures: mismatched CLSAG key image"); + } + else + { + const bool mg_nonempty = !rv.p.MGs[n].II.empty(); + VER_ASSERT(mg_nonempty, "Failed to check ringct signatures: missing MLSAG key image"); + const bool ki_match = 0 == memcmp(&nth_vin_image, &rv.p.MGs[n].II[0], 32); + VER_ASSERT(ki_match, "Failed to check ringct signatures: mismatched MLSAG key image"); + } + } + + // Mix ring data is now known to be correctly incorporated into the RCT sig inside tx. + return rct::verRctNonSemanticsSimple(rv); +} + +// Create a unique identifier for pair of tx blob + mix ring +static crypto::hash calc_tx_mixring_hash(const transaction& tx, const rct::ctkeyM& mix_ring) +{ + std::stringstream ss; + + // Start with domain seperation + ss << config::HASH_KEY_TXHASH_AND_MIXRING; + + // Then add TX hash + const crypto::hash tx_hash = get_transaction_hash(tx); + ss.write(tx_hash.data, sizeof(crypto::hash)); + + // Then serialize mix ring + binary_archive<true> ar(ss); + ::do_serialize(ar, const_cast<rct::ctkeyM&>(mix_ring)); + + // Calculate hash of TX hash and mix ring blob + crypto::hash tx_and_mixring_hash; + get_blob_hash(ss.str(), tx_and_mixring_hash); + + return tx_and_mixring_hash; +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace cryptonote +{ + +bool ver_rct_non_semantics_simple_cached +( + transaction& tx, + const rct::ctkeyM& mix_ring, + rct_ver_cache_t& cache, + const std::uint8_t rct_type_to_cache +) +{ + // Hello future Monero dev! If you got this assert, read the following carefully: + // + // For this version of RCT, the way we guaranteed that verification caches do not generate false + // positives (and thus possibly enabling double spends) is we take a hash of two things. One, + // we use get_transaction_hash() which gives us a (cryptographically secure) unique + // representation of all "knobs" controlled by the possibly malicious constructor of the + // transaction. Two, we take a hash of all *previously validated* blockchain data referenced by + // this transaction which is required to validate the ring signature. In our case, this is the + // mixring. Future versions of the protocol may differ in this regard, but if this assumptions + // holds true in the future, enable the verification hash by modifying the `untested_tx` + // condition below. + const bool untested_tx = tx.version > 2 || tx.rct_signatures.type > rct::RCTTypeBulletproofPlus; + VER_ASSERT(!untested_tx, "Unknown TX type. Make sure RCT cache works correctly with this type and then enable it in the code here."); + + // Don't cache older (or newer) rctSig types + // This cache only makes sense when it caches data from mempool first, + // so only "current fork version-enabled" RCT types need to be cached + if (tx.rct_signatures.type != rct_type_to_cache) + { + MDEBUG("RCT cache: tx " << get_transaction_hash(tx) << " skipped"); + return expand_tx_and_ver_rct_non_sem(tx, mix_ring); + } + + // Generate unique hash for tx+mix_ring pair + const crypto::hash tx_mixring_hash = calc_tx_mixring_hash(tx, mix_ring); + + // Search cache for successful verification of same TX + mix ring combination + if (cache.has(tx_mixring_hash)) + { + MDEBUG("RCT cache: tx " << get_transaction_hash(tx) << " hit"); + return true; + } + + // We had a cache miss, so now we must expand the mix ring and do full verification + MDEBUG("RCT cache: tx " << get_transaction_hash(tx) << " missed"); + if (!expand_tx_and_ver_rct_non_sem(tx, mix_ring)) + { + return false; + } + + // At this point, the TX RCT verified successfully, so add it to the cache and return true + cache.add(tx_mixring_hash); + + return true; +} + +} // namespace cryptonote diff --git a/src/cryptonote_core/tx_verification_utils.h b/src/cryptonote_core/tx_verification_utils.h new file mode 100644 index 000000000..ccd401d2a --- /dev/null +++ b/src/cryptonote_core/tx_verification_utils.h @@ -0,0 +1,78 @@ +// Copyright (c) 2023, The Monero Project +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#pragma once + +#include "common/data_cache.h" +#include "cryptonote_basic/cryptonote_basic.h" + +namespace cryptonote +{ + +// Modifying this value should not affect consensus. You can adjust it for performance needs +static constexpr const size_t RCT_VER_CACHE_SIZE = 8192; + +using rct_ver_cache_t = ::tools::data_cache<::crypto::hash, RCT_VER_CACHE_SIZE>; + +/** + * @brief Cached version of rct::verRctNonSemanticsSimple + * + * This function will not affect how the transaction is serialized and it will never modify the + * transaction prefix. + * + * The reference to tx is mutable since the transaction's ring signatures may be expanded by + * Blockchain::expand_transaction_2. However, on cache hits, the transaction will not be + * expanded. This means that the caller does not need to call expand_transaction_2 on this + * transaction before passing it; the transaction will not successfully verify with "old" RCT data + * if the transaction has been otherwise modified since the last verification. + * + * But, if cryptonote::get_transaction_hash(tx) returns a "stale" hash, this function is not + * guaranteed to work. So make sure that the cryptonote::transaction passed has not had + * modifications to it since the last time its hash was fetched without properly invalidating the + * hashes. + * + * rct_type_to_cache can be any RCT version value as long as rct::verRctNonSemanticsSimple works for + * this RCT version, but for most applications, it doesn't make sense to not make this version + * the "current" RCT version (i.e. the version that transactions in the mempool are). + * + * @param tx transaction which contains RCT signature to verify + * @param mix_ring mixring referenced by this tx. THIS DATA MUST BE PREVIOUSLY VALIDATED + * @param cache saves tx+mixring hashes used to cache calls + * @param rct_type_to_cache Only RCT sigs with version (e.g. RCTTypeBulletproofPlus) will be cached + * @return true when verRctNonSemanticsSimple() w/ expanded tx.rct_signatures would return true + * @return false when verRctNonSemanticsSimple() w/ expanded tx.rct_signatures would return false + */ +bool ver_rct_non_semantics_simple_cached +( + transaction& tx, + const rct::ctkeyM& mix_ring, + rct_ver_cache_t& cache, + std::uint8_t rct_type_to_cache +); + +} // namespace cryptonote diff --git a/src/cryptonote_protocol/CMakeLists.txt b/src/cryptonote_protocol/CMakeLists.txt index b516e17e9..c52eaa802 100644 --- a/src/cryptonote_protocol/CMakeLists.txt +++ b/src/cryptonote_protocol/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp index 4e65eafa4..ba22157b5 100644 --- a/src/cryptonote_protocol/block_queue.cpp +++ b/src/cryptonote_protocol/block_queue.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/block_queue.h b/src/cryptonote_protocol/block_queue.h index 64ff106a3..311275aa9 100644 --- a/src/cryptonote_protocol/block_queue.h +++ b/src/cryptonote_protocol/block_queue.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h index 0b860f1a8..23d9144a5 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_defs.h +++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp index 92ee08054..90f3c111a 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp +++ b/src/cryptonote_protocol/cryptonote_protocol_handler-base.cpp @@ -2,7 +2,7 @@ /// @author rfree (current maintainer in monero.cc project) /// @brief This is the place to implement our handlers for protocol network actions, e.g. for ratelimit for download-requests -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index 515b78c94..a29ee8287 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -2,7 +2,7 @@ /// @author rfree (current maintainer/user in monero.cc project - most of code is from CryptoNote) /// @brief This is the original cryptonote protocol network-events handler, modified by us -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index bd2f8ce85..325737789 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -2,7 +2,7 @@ /// @author rfree (current maintainer/user in monero.cc project - most of code is from CryptoNote) /// @brief This is the original cryptonote protocol network-events handler, modified by us -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -1020,7 +1020,7 @@ namespace cryptonote for (auto& tx : arg.txs) { tx_verification_context tvc{}; - if (!m_core.handle_incoming_tx({tx, crypto::null_hash}, tvc, tx_relay, true)) + if (!m_core.handle_incoming_tx({tx, crypto::null_hash}, tvc, tx_relay, true) && !tvc.m_no_drop_offense) { LOG_PRINT_CCONTEXT_L1("Tx verification failed, dropping connection"); drop_connection(context, false, false); diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler_common.h b/src/cryptonote_protocol/cryptonote_protocol_handler_common.h index 3b2ca5e37..688ff2f37 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler_common.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/enums.h b/src/cryptonote_protocol/enums.h index aeb66ed5c..19cf8078c 100644 --- a/src/cryptonote_protocol/enums.h +++ b/src/cryptonote_protocol/enums.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/fwd.h b/src/cryptonote_protocol/fwd.h index f036f41cb..7182d9ef4 100644 --- a/src/cryptonote_protocol/fwd.h +++ b/src/cryptonote_protocol/fwd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/levin_notify.cpp b/src/cryptonote_protocol/levin_notify.cpp index 27c6d0278..5b420ec3f 100644 --- a/src/cryptonote_protocol/levin_notify.cpp +++ b/src/cryptonote_protocol/levin_notify.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/cryptonote_protocol/levin_notify.h b/src/cryptonote_protocol/levin_notify.h index 2927eea86..52d36efb0 100644 --- a/src/cryptonote_protocol/levin_notify.h +++ b/src/cryptonote_protocol/levin_notify.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index 455f72472..8a8d1d9a7 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/daemon/command_line_args.h b/src/daemon/command_line_args.h index 96fddc02d..506d75490 100644 --- a/src/daemon/command_line_args.h +++ b/src/daemon/command_line_args.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 20c906141..25b15f3b1 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/command_parser_executor.h b/src/daemon/command_parser_executor.h index cd9e6544e..7224e36f6 100644 --- a/src/daemon/command_parser_executor.h +++ b/src/daemon/command_parser_executor.h @@ -6,7 +6,7 @@ */ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp index fc5f1b3d7..6baaa7015 100644 --- a/src/daemon/command_server.cpp +++ b/src/daemon/command_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/command_server.h b/src/daemon/command_server.h index babb8e85a..8e3972beb 100644 --- a/src/daemon/command_server.h +++ b/src/daemon/command_server.h @@ -9,7 +9,7 @@ Passing RPC commands: */ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/core.h b/src/daemon/core.h index fde0d6bab..c3a3116b1 100644 --- a/src/daemon/core.h +++ b/src/daemon/core.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 286c02b50..97dad9357 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/daemon.h b/src/daemon/daemon.h index 529b42d20..d652d9a4b 100644 --- a/src/daemon/daemon.h +++ b/src/daemon/daemon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/executor.cpp b/src/daemon/executor.cpp index d67bd6141..14b0f86a3 100644 --- a/src/daemon/executor.cpp +++ b/src/daemon/executor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/executor.h b/src/daemon/executor.h index d59ef22fb..92fc5ca46 100644 --- a/src/daemon/executor.h +++ b/src/daemon/executor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 38b99ff49..23c313c9d 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/p2p.h b/src/daemon/p2p.h index 799dc3d25..40d7ab695 100644 --- a/src/daemon/p2p.h +++ b/src/daemon/p2p.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/protocol.h b/src/daemon/protocol.h index 733bacfc9..6e960168a 100644 --- a/src/daemon/protocol.h +++ b/src/daemon/protocol.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/rpc.h b/src/daemon/rpc.h index 7b059ebd3..f7bdb921e 100644 --- a/src/daemon/rpc.h +++ b/src/daemon/rpc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index a88c35638..0dcfc9d53 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemon/rpc_command_executor.h b/src/daemon/rpc_command_executor.h index ebd7eda85..3d4582422 100644 --- a/src/daemon/rpc_command_executor.h +++ b/src/daemon/rpc_command_executor.h @@ -6,7 +6,7 @@ */ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/CMakeLists.txt b/src/daemonizer/CMakeLists.txt index 61999b3a5..5be9fda42 100644 --- a/src/daemonizer/CMakeLists.txt +++ b/src/daemonizer/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/daemonizer/daemonizer.h b/src/daemonizer/daemonizer.h index fa19c28b0..d313ff3f1 100644 --- a/src/daemonizer/daemonizer.h +++ b/src/daemonizer/daemonizer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/posix_daemonizer.inl b/src/daemonizer/posix_daemonizer.inl index bd2741039..5defd1e69 100644 --- a/src/daemonizer/posix_daemonizer.inl +++ b/src/daemonizer/posix_daemonizer.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/posix_fork.h b/src/daemonizer/posix_fork.h index b1d82ff43..497643699 100644 --- a/src/daemonizer/posix_fork.h +++ b/src/daemonizer/posix_fork.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/windows_daemonizer.inl b/src/daemonizer/windows_daemonizer.inl index a0086408f..d3e5d66dd 100644 --- a/src/daemonizer/windows_daemonizer.inl +++ b/src/daemonizer/windows_daemonizer.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/windows_service.cpp b/src/daemonizer/windows_service.cpp index 5fcc469e9..04ea62d2b 100644 --- a/src/daemonizer/windows_service.cpp +++ b/src/daemonizer/windows_service.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/windows_service.h b/src/daemonizer/windows_service.h index a96674d19..55b097bf9 100644 --- a/src/daemonizer/windows_service.h +++ b/src/daemonizer/windows_service.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/daemonizer/windows_service_runner.h b/src/daemonizer/windows_service_runner.h index 5a33b2aa7..5aa1a8c2f 100644 --- a/src/daemonizer/windows_service_runner.h +++ b/src/daemonizer/windows_service_runner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/debug_utilities/CMakeLists.txt b/src/debug_utilities/CMakeLists.txt index ecb0f0229..58cb713df 100644 --- a/src/debug_utilities/CMakeLists.txt +++ b/src/debug_utilities/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/debug_utilities/cn_deserialize.cpp b/src/debug_utilities/cn_deserialize.cpp index 41c397bd8..aa9ceec0e 100644 --- a/src/debug_utilities/cn_deserialize.cpp +++ b/src/debug_utilities/cn_deserialize.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/debug_utilities/dns_checks.cpp b/src/debug_utilities/dns_checks.cpp index caa0421e9..a59a08209 100644 --- a/src/debug_utilities/dns_checks.cpp +++ b/src/debug_utilities/dns_checks.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/debug_utilities/object_sizes.cpp b/src/debug_utilities/object_sizes.cpp index 40b651ab3..b6f9a3fbf 100644 --- a/src/debug_utilities/object_sizes.cpp +++ b/src/debug_utilities/object_sizes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index e4f1159b5..eef49ffee 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/device/device.cpp b/src/device/device.cpp index e6cd358b6..3d3a14fd5 100644 --- a/src/device/device.cpp +++ b/src/device/device.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device.hpp b/src/device/device.hpp index 392703a24..1c29018e6 100644 --- a/src/device/device.hpp +++ b/src/device/device.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_cold.hpp b/src/device/device_cold.hpp index ba4d6d8ae..0738598b8 100644 --- a/src/device/device_cold.hpp +++ b/src/device/device_cold.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_default.cpp b/src/device/device_default.cpp index d70ece229..d938087fe 100644 --- a/src/device/device_default.cpp +++ b/src/device/device_default.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_default.hpp b/src/device/device_default.hpp index 58149cdbf..7ee9f15b7 100644 --- a/src/device/device_default.hpp +++ b/src/device/device_default.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_io.hpp b/src/device/device_io.hpp index b333caa13..20678568d 100644 --- a/src/device/device_io.hpp +++ b/src/device/device_io.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_io_hid.cpp b/src/device/device_io_hid.cpp index 3116a8713..472414d3b 100644 --- a/src/device/device_io_hid.cpp +++ b/src/device/device_io_hid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_io_hid.hpp b/src/device/device_io_hid.hpp index fd2ec8515..90d7d8553 100644 --- a/src/device/device_io_hid.hpp +++ b/src/device/device_io_hid.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp index 22a1fd986..27d080a1c 100644 --- a/src/device/device_ledger.cpp +++ b/src/device/device_ledger.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // @@ -530,6 +530,7 @@ namespace hw { {0x2c97, 0x0001, 0, 0xffa0}, {0x2c97, 0x0004, 0, 0xffa0}, {0x2c97, 0x0005, 0, 0xffa0}, + {0x2c97, 0x0006, 0, 0xffa0}, }; bool device_ledger::connect(void) { diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp index 5a1e7d75c..071274160 100644 --- a/src/device/device_ledger.hpp +++ b/src/device/device_ledger.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/log.cpp b/src/device/log.cpp index b159632d9..1a243c831 100644 --- a/src/device/log.cpp +++ b/src/device/log.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device/log.hpp b/src/device/log.hpp index a0c89ec71..92d174da1 100644 --- a/src/device/log.hpp +++ b/src/device/log.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/CMakeLists.txt b/src/device_trezor/CMakeLists.txt index 6688a317b..c30fb2b16 100644 --- a/src/device_trezor/CMakeLists.txt +++ b/src/device_trezor/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/device_trezor/device_trezor.cpp b/src/device_trezor/device_trezor.cpp index 3f7b10be4..9c8148ed6 100644 --- a/src/device_trezor/device_trezor.cpp +++ b/src/device_trezor/device_trezor.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/device_trezor.hpp b/src/device_trezor/device_trezor.hpp index 38aeaf6b5..35bb78927 100644 --- a/src/device_trezor/device_trezor.hpp +++ b/src/device_trezor/device_trezor.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/device_trezor_base.cpp b/src/device_trezor/device_trezor_base.cpp index 56f3784a7..a8a3d9f67 100644 --- a/src/device_trezor/device_trezor_base.cpp +++ b/src/device_trezor/device_trezor_base.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/device_trezor_base.hpp b/src/device_trezor/device_trezor_base.hpp index 5b6920313..3ec21e157 100644 --- a/src/device_trezor/device_trezor_base.hpp +++ b/src/device_trezor/device_trezor_base.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor.hpp b/src/device_trezor/trezor.hpp index f2a352f58..d425b3209 100644 --- a/src/device_trezor/trezor.hpp +++ b/src/device_trezor/trezor.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/debug_link.cpp b/src/device_trezor/trezor/debug_link.cpp index 1eed0a53e..ff7cf0ad6 100644 --- a/src/device_trezor/trezor/debug_link.cpp +++ b/src/device_trezor/trezor/debug_link.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/debug_link.hpp b/src/device_trezor/trezor/debug_link.hpp index b7a252833..4249222dc 100644 --- a/src/device_trezor/trezor/debug_link.hpp +++ b/src/device_trezor/trezor/debug_link.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/exceptions.hpp b/src/device_trezor/trezor/exceptions.hpp index 818b2cb6c..b66386c47 100644 --- a/src/device_trezor/trezor/exceptions.hpp +++ b/src/device_trezor/trezor/exceptions.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/messages_map.cpp b/src/device_trezor/trezor/messages_map.cpp index 313fd6820..527fe38ba 100644 --- a/src/device_trezor/trezor/messages_map.cpp +++ b/src/device_trezor/trezor/messages_map.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/messages_map.hpp b/src/device_trezor/trezor/messages_map.hpp index b1ea65e6e..f6820524e 100644 --- a/src/device_trezor/trezor/messages_map.hpp +++ b/src/device_trezor/trezor/messages_map.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/protocol.cpp b/src/device_trezor/trezor/protocol.cpp index 0e59a16ba..49d3af0f5 100644 --- a/src/device_trezor/trezor/protocol.cpp +++ b/src/device_trezor/trezor/protocol.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/protocol.hpp b/src/device_trezor/trezor/protocol.hpp index 7ffadd9aa..e9d84ace8 100644 --- a/src/device_trezor/trezor/protocol.hpp +++ b/src/device_trezor/trezor/protocol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/transport.cpp b/src/device_trezor/trezor/transport.cpp index 53b35a37a..8c6b30787 100644 --- a/src/device_trezor/trezor/transport.cpp +++ b/src/device_trezor/trezor/transport.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/transport.hpp b/src/device_trezor/trezor/transport.hpp index a452724da..3f280b104 100644 --- a/src/device_trezor/trezor/transport.hpp +++ b/src/device_trezor/trezor/transport.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/device_trezor/trezor/trezor_defs.hpp b/src/device_trezor/trezor/trezor_defs.hpp index 53bf2b03c..8e7f89031 100644 --- a/src/device_trezor/trezor/trezor_defs.hpp +++ b/src/device_trezor/trezor/trezor_defs.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/gen_multisig/CMakeLists.txt b/src/gen_multisig/CMakeLists.txt index e8aaec62c..e88d21902 100644 --- a/src/gen_multisig/CMakeLists.txt +++ b/src/gen_multisig/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2022, The Monero Project +# Copyright (c) 2017-2023, The Monero Project # # All rights reserved. # diff --git a/src/gen_multisig/gen_multisig.cpp b/src/gen_multisig/gen_multisig.cpp index eedd1511d..48cf818ef 100644 --- a/src/gen_multisig/gen_multisig.cpp +++ b/src/gen_multisig/gen_multisig.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/gen_ssl_cert/CMakeLists.txt b/src/gen_ssl_cert/CMakeLists.txt index efadc7c31..e86518844 100644 --- a/src/gen_ssl_cert/CMakeLists.txt +++ b/src/gen_ssl_cert/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2022, The Monero Project +# Copyright (c) 2017-2023, The Monero Project # # All rights reserved. # diff --git a/src/gen_ssl_cert/gen_ssl_cert.cpp b/src/gen_ssl_cert/gen_ssl_cert.cpp index cd810ed20..e695df727 100644 --- a/src/gen_ssl_cert/gen_ssl_cert.cpp +++ b/src/gen_ssl_cert/gen_ssl_cert.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/hardforks/CMakeLists.txt b/src/hardforks/CMakeLists.txt index 81a3d694b..20ea907c5 100644 --- a/src/hardforks/CMakeLists.txt +++ b/src/hardforks/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/hardforks/hardforks.cpp b/src/hardforks/hardforks.cpp index 336ef6519..3d1d53589 100644 --- a/src/hardforks/hardforks.cpp +++ b/src/hardforks/hardforks.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/hardforks/hardforks.h b/src/hardforks/hardforks.h index 53f14b8eb..fbe0d630d 100644 --- a/src/hardforks/hardforks.h +++ b/src/hardforks/hardforks.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/lmdb/CMakeLists.txt b/src/lmdb/CMakeLists.txt index a26c48ad5..50e08be73 100644 --- a/src/lmdb/CMakeLists.txt +++ b/src/lmdb/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/lmdb/database.cpp b/src/lmdb/database.cpp index 544197d57..22569fcf0 100644 --- a/src/lmdb/database.cpp +++ b/src/lmdb/database.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/lmdb/database.h b/src/lmdb/database.h index 0c2390652..0f12571da 100644 --- a/src/lmdb/database.h +++ b/src/lmdb/database.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/error.cpp b/src/lmdb/error.cpp index 62fdb83c3..28659dddd 100644 --- a/src/lmdb/error.cpp +++ b/src/lmdb/error.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/lmdb/error.h b/src/lmdb/error.h index f4134359b..eaacc56e6 100644 --- a/src/lmdb/error.h +++ b/src/lmdb/error.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/lmdb/key_stream.h b/src/lmdb/key_stream.h index 11fa284dd..1765c0e39 100644 --- a/src/lmdb/key_stream.h +++ b/src/lmdb/key_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/table.cpp b/src/lmdb/table.cpp index 725a1a0b7..239e80ef9 100644 --- a/src/lmdb/table.cpp +++ b/src/lmdb/table.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/transaction.h b/src/lmdb/transaction.h index f358290ec..4cb43aead 100644 --- a/src/lmdb/transaction.h +++ b/src/lmdb/transaction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/util.h b/src/lmdb/util.h index c6c75bc00..95057fe8d 100644 --- a/src/lmdb/util.h +++ b/src/lmdb/util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/value_stream.cpp b/src/lmdb/value_stream.cpp index 6a1e054c1..cccb74bc3 100644 --- a/src/lmdb/value_stream.cpp +++ b/src/lmdb/value_stream.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/lmdb/value_stream.h b/src/lmdb/value_stream.h index bd2814ef4..858a54f3e 100644 --- a/src/lmdb/value_stream.h +++ b/src/lmdb/value_stream.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // All rights reserved. // diff --git a/src/mnemonics/CMakeLists.txt b/src/mnemonics/CMakeLists.txt index 738633ef5..23e63dfa1 100644 --- a/src/mnemonics/CMakeLists.txt +++ b/src/mnemonics/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/mnemonics/chinese_simplified.h b/src/mnemonics/chinese_simplified.h index 2661b5820..79f211512 100644 --- a/src/mnemonics/chinese_simplified.h +++ b/src/mnemonics/chinese_simplified.h @@ -21,7 +21,7 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Code surrounding the word list is Copyright (c) 2014-2022, The Monero Project
+// Code surrounding the word list is Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/dutch.h b/src/mnemonics/dutch.h index ace2e1b3d..afa856f3b 100644 --- a/src/mnemonics/dutch.h +++ b/src/mnemonics/dutch.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/electrum-words.cpp b/src/mnemonics/electrum-words.cpp index b53f3acd3..69816c43c 100644 --- a/src/mnemonics/electrum-words.cpp +++ b/src/mnemonics/electrum-words.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/mnemonics/electrum-words.h b/src/mnemonics/electrum-words.h index becd6bb4e..ab6a4a9f1 100644 --- a/src/mnemonics/electrum-words.h +++ b/src/mnemonics/electrum-words.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/mnemonics/english.h b/src/mnemonics/english.h index 1715445d8..3abb5d3b2 100644 --- a/src/mnemonics/english.h +++ b/src/mnemonics/english.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/english_old.h b/src/mnemonics/english_old.h index c609dff2d..71ed862cb 100644 --- a/src/mnemonics/english_old.h +++ b/src/mnemonics/english_old.h @@ -1,6 +1,6 @@ // Word list originally created as part of the Electrum project, Copyright (C) 2014 Thomas Voegtlin
//
-// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/esperanto.h b/src/mnemonics/esperanto.h index 1d3437fad..db8ccc99a 100644 --- a/src/mnemonics/esperanto.h +++ b/src/mnemonics/esperanto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/french.h b/src/mnemonics/french.h index be2f8957c..e39bd5902 100644 --- a/src/mnemonics/french.h +++ b/src/mnemonics/french.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/mnemonics/german.h b/src/mnemonics/german.h index 4f5265888..845bc729a 100644 --- a/src/mnemonics/german.h +++ b/src/mnemonics/german.h @@ -1,6 +1,6 @@ // Word list created by Monero contributor Shrikez
//
-// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/italian.h b/src/mnemonics/italian.h index dbd39984b..e258811d3 100644 --- a/src/mnemonics/italian.h +++ b/src/mnemonics/italian.h @@ -1,6 +1,6 @@ // Word list created by Monero contributor Shrikez
//
-// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/japanese.h b/src/mnemonics/japanese.h index 5831b1995..65d81daf1 100644 --- a/src/mnemonics/japanese.h +++ b/src/mnemonics/japanese.h @@ -21,7 +21,7 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Code surrounding the word list is Copyright (c) 2014-2022, The Monero Project
+// Code surrounding the word list is Copyright (c) 2014-2023, The Monero Project
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
diff --git a/src/mnemonics/language_base.h b/src/mnemonics/language_base.h index 92eb09f0d..f6ed5bd57 100644 --- a/src/mnemonics/language_base.h +++ b/src/mnemonics/language_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/lojban.h b/src/mnemonics/lojban.h index 68aefd5fd..9c127c0a0 100644 --- a/src/mnemonics/lojban.h +++ b/src/mnemonics/lojban.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/portuguese.h b/src/mnemonics/portuguese.h index 9ddac09bb..f87464b27 100644 --- a/src/mnemonics/portuguese.h +++ b/src/mnemonics/portuguese.h @@ -21,7 +21,7 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Code surrounding the word list is Copyright (c) 2014-2022, The Monero Project
+// Code surrounding the word list is Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/russian.h b/src/mnemonics/russian.h index 8922b1ed9..23b108daa 100644 --- a/src/mnemonics/russian.h +++ b/src/mnemonics/russian.h @@ -1,6 +1,6 @@ // Word list created by Monero contributor sammy007
//
-// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/singleton.h b/src/mnemonics/singleton.h index 91faad92c..156db9e3d 100644 --- a/src/mnemonics/singleton.h +++ b/src/mnemonics/singleton.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project
+// Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/mnemonics/spanish.h b/src/mnemonics/spanish.h index 1bdb6b934..312ac4adc 100644 --- a/src/mnemonics/spanish.h +++ b/src/mnemonics/spanish.h @@ -21,7 +21,7 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Code surrounding the word list is Copyright (c) 2014-2022, The Monero Project
+// Code surrounding the word list is Copyright (c) 2014-2023, The Monero Project
//
// All rights reserved.
//
diff --git a/src/multisig/CMakeLists.txt b/src/multisig/CMakeLists.txt index 61e658a39..62ae00e80 100644 --- a/src/multisig/CMakeLists.txt +++ b/src/multisig/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2022, The Monero Project +# Copyright (c) 2017-2023, The Monero Project # # All rights reserved. # diff --git a/src/multisig/multisig.cpp b/src/multisig/multisig.cpp index fabffdd02..70baa7f19 100644 --- a/src/multisig/multisig.cpp +++ b/src/multisig/multisig.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig.h b/src/multisig/multisig.h index 16dbbc544..2ec2f4e66 100644 --- a/src/multisig/multisig.h +++ b/src/multisig/multisig.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_account.cpp b/src/multisig/multisig_account.cpp index 401c6f1fe..4f9711b15 100644 --- a/src/multisig/multisig_account.cpp +++ b/src/multisig/multisig_account.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_account.h b/src/multisig/multisig_account.h index 9cd0942d4..0d832f243 100644 --- a/src/multisig/multisig_account.h +++ b/src/multisig/multisig_account.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_account_kex_impl.cpp b/src/multisig/multisig_account_kex_impl.cpp index 243058b81..ef0acf307 100644 --- a/src/multisig/multisig_account_kex_impl.cpp +++ b/src/multisig/multisig_account_kex_impl.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_clsag_context.cpp b/src/multisig/multisig_clsag_context.cpp index e3417b896..81e471287 100644 --- a/src/multisig/multisig_clsag_context.cpp +++ b/src/multisig/multisig_clsag_context.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_clsag_context.h b/src/multisig/multisig_clsag_context.h index 5017e8688..c184b83d6 100644 --- a/src/multisig/multisig_clsag_context.h +++ b/src/multisig/multisig_clsag_context.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_kex_msg.cpp b/src/multisig/multisig_kex_msg.cpp index c717e23ad..49350948a 100644 --- a/src/multisig/multisig_kex_msg.cpp +++ b/src/multisig/multisig_kex_msg.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_kex_msg.h b/src/multisig/multisig_kex_msg.h index 833c7c8f6..8cb8faa7c 100644 --- a/src/multisig/multisig_kex_msg.h +++ b/src/multisig/multisig_kex_msg.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_kex_msg_serialization.h b/src/multisig/multisig_kex_msg_serialization.h index e5558cdff..d1e07ea8a 100644 --- a/src/multisig/multisig_kex_msg_serialization.h +++ b/src/multisig/multisig_kex_msg_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_tx_builder_ringct.cpp b/src/multisig/multisig_tx_builder_ringct.cpp index e5c9ac483..8643a8af4 100644 --- a/src/multisig/multisig_tx_builder_ringct.cpp +++ b/src/multisig/multisig_tx_builder_ringct.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/multisig/multisig_tx_builder_ringct.h b/src/multisig/multisig_tx_builder_ringct.h index 853934659..f1bd24e73 100644 --- a/src/multisig/multisig_tx_builder_ringct.h +++ b/src/multisig/multisig_tx_builder_ringct.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021, The Monero Project +// Copyright (c) 2021-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/CMakeLists.txt b/src/net/CMakeLists.txt index a4d31eedf..29807f50e 100644 --- a/src/net/CMakeLists.txt +++ b/src/net/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/src/net/dandelionpp.cpp b/src/net/dandelionpp.cpp index e75fb2753..b38427086 100644 --- a/src/net/dandelionpp.cpp +++ b/src/net/dandelionpp.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/dandelionpp.h b/src/net/dandelionpp.h index e344bc7ce..24e1fc625 100644 --- a/src/net/dandelionpp.h +++ b/src/net/dandelionpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/error.cpp b/src/net/error.cpp index 254db7ae1..0f3de6a6c 100644 --- a/src/net/error.cpp +++ b/src/net/error.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/error.h b/src/net/error.h index 969eefc41..3bce227ee 100644 --- a/src/net/error.h +++ b/src/net/error.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/fwd.h b/src/net/fwd.h index b105da115..871c13432 100644 --- a/src/net/fwd.h +++ b/src/net/fwd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/http.cpp b/src/net/http.cpp index c0ed3d430..8eaf5b4b4 100644 --- a/src/net/http.cpp +++ b/src/net/http.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/net/http.h b/src/net/http.h index bbb8ee984..72bd3f66d 100644 --- a/src/net/http.h +++ b/src/net/http.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/net/i2p_address.cpp b/src/net/i2p_address.cpp index b0194a525..a151e420b 100644 --- a/src/net/i2p_address.cpp +++ b/src/net/i2p_address.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/i2p_address.h b/src/net/i2p_address.h index 7f6ef1b3f..4d342e67d 100644 --- a/src/net/i2p_address.h +++ b/src/net/i2p_address.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/parse.cpp b/src/net/parse.cpp index 92be492a3..71d0d7b26 100644 --- a/src/net/parse.cpp +++ b/src/net/parse.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/parse.h b/src/net/parse.h index 6ece931c6..695049268 100644 --- a/src/net/parse.h +++ b/src/net/parse.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/resolve.cpp b/src/net/resolve.cpp index f4881ffe5..c4c8e8d08 100644 --- a/src/net/resolve.cpp +++ b/src/net/resolve.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/net/resolve.h b/src/net/resolve.h index 39b1d1830..afbe5d879 100644 --- a/src/net/resolve.h +++ b/src/net/resolve.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/net/socks.cpp b/src/net/socks.cpp index 97ef4a672..cc8e0be6d 100644 --- a/src/net/socks.cpp +++ b/src/net/socks.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/socks.h b/src/net/socks.h index af67d4abe..920496c6e 100644 --- a/src/net/socks.h +++ b/src/net/socks.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/socks_connect.cpp b/src/net/socks_connect.cpp index 5317564de..f24569674 100644 --- a/src/net/socks_connect.cpp +++ b/src/net/socks_connect.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/socks_connect.h b/src/net/socks_connect.h index 587e3cd3c..e036d9c31 100644 --- a/src/net/socks_connect.h +++ b/src/net/socks_connect.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/tor_address.cpp b/src/net/tor_address.cpp index ac36dbffd..53b73a839 100644 --- a/src/net/tor_address.cpp +++ b/src/net/tor_address.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/tor_address.h b/src/net/tor_address.h index 5b036f0d4..3dd320b5d 100644 --- a/src/net/tor_address.h +++ b/src/net/tor_address.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/net/zmq.cpp b/src/net/zmq.cpp index 2b3ca8376..f57cbdac6 100644 --- a/src/net/zmq.cpp +++ b/src/net/zmq.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/net/zmq.h b/src/net/zmq.h index 18bb80c8b..2b60432d7 100644 --- a/src/net/zmq.h +++ b/src/net/zmq.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/CMakeLists.txt b/src/p2p/CMakeLists.txt index af58d2bb0..bd2345979 100644 --- a/src/p2p/CMakeLists.txt +++ b/src/p2p/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/p2p/net_node.cpp b/src/p2p/net_node.cpp index f9803fd81..13ff06c8b 100644 --- a/src/p2p/net_node.cpp +++ b/src/p2p/net_node.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 98d8ecfff..cf2d212b3 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index ee6bd8b19..9b5e57496 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -247,7 +247,23 @@ namespace nodetool if (it == m_blocked_hosts.end()) { m_blocked_hosts[host_str] = limit; - added = true; + + // if the host was already blocked due to being in a blocked subnet, let it be silent + bool matches_blocked_subnet = false; + if (addr.get_type_id() == epee::net_utils::address_type::ipv4) + { + auto ipv4_address = addr.template as<epee::net_utils::ipv4_network_address>(); + for (auto jt = m_blocked_subnets.begin(); jt != m_blocked_subnets.end(); ++jt) + { + if (jt->first.matches(ipv4_address)) + { + matches_blocked_subnet = true; + break; + } + } + } + if (!matches_blocked_subnet) + added = true; } else if (it->second < limit || !add_only) it->second = limit; @@ -317,6 +333,7 @@ namespace nodetool limit = std::numeric_limits<time_t>::max(); else limit = now + seconds; + const bool added = m_blocked_subnets.find(subnet) == m_blocked_subnets.end(); m_blocked_subnets[subnet] = limit; // drop any connection to that subnet. This should only have to look into @@ -349,7 +366,10 @@ namespace nodetool conns.clear(); } - MCLOG_CYAN(el::Level::Info, "global", "Subnet " << subnet.host_str() << " blocked."); + if (added) + MCLOG_CYAN(el::Level::Info, "global", "Subnet " << subnet.host_str() << " blocked."); + else + MINFO("Subnet " << subnet.host_str() << " blocked."); return true; } //----------------------------------------------------------------------------------- diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h index ef4552f44..66ef40f1e 100644 --- a/src/p2p/net_node_common.h +++ b/src/p2p/net_node_common.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/net_peerlist.cpp b/src/p2p/net_peerlist.cpp index 3e132c91f..11cf235a5 100644 --- a/src/p2p/net_peerlist.cpp +++ b/src/p2p/net_peerlist.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/p2p/net_peerlist.h b/src/p2p/net_peerlist.h index dc480462d..c2f700598 100644 --- a/src/p2p/net_peerlist.h +++ b/src/p2p/net_peerlist.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/net_peerlist_boost_serialization.h b/src/p2p/net_peerlist_boost_serialization.h index 7d8bd1480..7f4aecce3 100644 --- a/src/p2p/net_peerlist_boost_serialization.h +++ b/src/p2p/net_peerlist_boost_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/p2p/p2p_protocol_defs.h b/src/p2p/p2p_protocol_defs.h index 8b9cd0f09..18b853d35 100644 --- a/src/p2p/p2p_protocol_defs.h +++ b/src/p2p/p2p_protocol_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/platform/mingw/alloca.h b/src/platform/mingw/alloca.h index 10a9db198..8ed1c6514 100644 --- a/src/platform/mingw/alloca.h +++ b/src/platform/mingw/alloca.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/platform/msc/alloca.h b/src/platform/msc/alloca.h index 3b197bf6d..8c4701b78 100644 --- a/src/platform/msc/alloca.h +++ b/src/platform/msc/alloca.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/platform/msc/inline_c.h b/src/platform/msc/inline_c.h index 36d3d0026..72bad9223 100644 --- a/src/platform/msc/inline_c.h +++ b/src/platform/msc/inline_c.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/platform/msc/stdbool.h b/src/platform/msc/stdbool.h index d4932e8f8..1bfd78f57 100644 --- a/src/platform/msc/stdbool.h +++ b/src/platform/msc/stdbool.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/platform/msc/sys/param.h b/src/platform/msc/sys/param.h index 61002e1a1..1f1950ac6 100644 --- a/src/platform/msc/sys/param.h +++ b/src/platform/msc/sys/param.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/CMakeLists.txt b/src/ringct/CMakeLists.txt index d415e6409..1f3d1913f 100644 --- a/src/ringct/CMakeLists.txt +++ b/src/ringct/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2022, The Monero Project +# Copyright (c) 2016-2023, The Monero Project # # All rights reserved. # diff --git a/src/ringct/bulletproofs.cc b/src/ringct/bulletproofs.cc index ba7ab2c0d..2cfaf18c0 100644 --- a/src/ringct/bulletproofs.cc +++ b/src/ringct/bulletproofs.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/bulletproofs.h b/src/ringct/bulletproofs.h index c3fe6f8b9..7ff47e8a0 100644 --- a/src/ringct/bulletproofs.h +++ b/src/ringct/bulletproofs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/bulletproofs_plus.cc b/src/ringct/bulletproofs_plus.cc index 77b800064..0619811cb 100644 --- a/src/ringct/bulletproofs_plus.cc +++ b/src/ringct/bulletproofs_plus.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/bulletproofs_plus.h b/src/ringct/bulletproofs_plus.h index 861c54f4f..80a8de8fb 100644 --- a/src/ringct/bulletproofs_plus.h +++ b/src/ringct/bulletproofs_plus.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/multiexp.cc b/src/ringct/multiexp.cc index 67814682a..5e241f2cc 100644 --- a/src/ringct/multiexp.cc +++ b/src/ringct/multiexp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. @@ -57,28 +57,28 @@ extern "C" // 1 1 52.8 70.4 70.2 // Pippenger: -// 1 2 3 4 5 6 7 8 9 bestN -// 2 555 598 621 804 1038 1733 2486 5020 8304 1 -// 4 783 747 800 1006 1428 2132 3285 5185 9806 2 -// 8 1174 1071 1095 1286 1640 2398 3869 6378 12080 2 -// 16 2279 1874 1745 1739 2144 2831 4209 6964 12007 4 -// 32 3910 3706 2588 2477 2782 3467 4856 7489 12618 4 -// 64 7184 5429 4710 4368 4010 4672 6027 8559 13684 5 -// 128 14097 10574 8452 7297 6841 6718 8615 10580 15641 6 -// 256 27715 20800 16000 13550 11875 11400 11505 14090 18460 6 -// 512 55100 41250 31740 26570 22030 19830 20760 21380 25215 6 -// 1024 111520 79000 61080 49720 43080 38320 37600 35040 36750 8 -// 2048 219480 162680 122120 102080 83760 70360 66600 63920 66160 8 -// 4096 453320 323080 247240 210200 180040 150240 132440 114920 110560 9 - -// 2 4 8 16 32 64 128 256 512 1024 2048 4096 -// Bos Coster 858 994 1316 1949 3183 5512 9865 17830 33485 63160 124280 246320 -// Straus 226 341 548 980 1870 3538 7039 14490 29020 57200 118640 233640 -// Straus/cached 226 315 485 785 1514 2858 5753 11065 22970 45120 98880 194840 -// Pippenger 555 747 1071 1739 2477 4010 6718 11400 19830 35040 63920 110560 - -// Best/cached Straus Straus Straus Straus Straus Straus Straus Straus Pip Pip Pip Pip -// Best/uncached Straus Straus Straus Straus Straus Straus Pip Pip Pip Pip Pip Pip +// 1 2 3 4 5 6 7 8 9 bestN +// 2 555 598 621 804 1038 1733 2486 5020 8304 1 +// 4 783 747 800 1006 1428 2132 3285 5185 9806 2 +// 8 1174 1071 1095 1286 1640 2398 3869 6378 12080 2 +// 16 2279 1874 1745 1739 2144 2831 4209 6964 12007 4 +// 32 3910 3706 2588 2477 2782 3467 4856 7489 12618 4 +// 64 7184 5429 4710 4368 4010 4672 6027 8559 13684 5 +// 128 14097 10574 8452 7297 6841 6718 8615 10580 15641 6 +// 256 27715 20800 16000 13550 11875 11400 11505 14090 18460 6 +// 512 55100 41250 31740 26570 22030 19830 20760 21380 25215 6 +// 1024 111520 79000 61080 49720 43080 38320 37600 35040 36750 8 +// 2048 219480 162680 122120 102080 83760 70360 66600 63920 66160 8 +// 4096 453320 323080 247240 210200 180040 150240 132440 114920 110560 9 + +// 2 4 8 16 32 64 128 256 512 1024 2048 4096 +// Bos Coster 858 994 1316 1949 3183 5512 9865 17830 33485 63160 124280 246320 +// Straus 226 341 548 980 1870 3538 7039 14490 29020 57200 118640 233640 +// Straus/cached 226 315 485 785 1514 2858 5753 11065 22970 45120 98880 194840 +// Pippenger 555 747 1071 1739 2477 4010 6718 11400 19830 35040 63920 110560 + +// Best/cached Straus Straus Straus Straus Straus Straus Straus Straus Pip Pip Pip Pip +// Best/uncached Straus Straus Straus Straus Straus Straus Pip Pip Pip Pip Pip Pip // New timings: // Pippenger: @@ -443,7 +443,7 @@ size_t straus_get_cache_size(const std::shared_ptr<straus_cached_data> &cache) return sz; } -rct::key straus(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache, size_t STEP) +ge_p3 straus_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache, size_t STEP) { CHECK_AND_ASSERT_THROW_MES(cache == NULL || cache->size >= data.size(), "Cache is too small"); MULTIEXP_PERF(PERF_TIMER_UNIT(straus, 1000000)); @@ -554,7 +554,13 @@ skipfirst: ge_p1p1_to_p3(&res_p3, &p1); } + return res_p3; +} + +rct::key straus(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache, size_t STEP) +{ rct::key res; + const ge_p3 res_p3 = straus_p3(data, cache, STEP); ge_p3_tobytes(res.bytes, &res_p3); return res; } @@ -571,14 +577,6 @@ size_t get_pippenger_c(size_t N) return 9; } -struct pippenger_cached_data -{ - size_t size; - ge_cached *cached; - pippenger_cached_data(): size(0), cached(NULL) {} - ~pippenger_cached_data() { aligned_free(cached); } -}; - std::shared_ptr<pippenger_cached_data> pippenger_init_cache(const std::vector<MultiexpData> &data, size_t start_offset, size_t N) { MULTIEXP_PERF(PERF_TIMER_START_UNIT(pippenger_init_cache, 1000000)); @@ -586,13 +584,11 @@ std::shared_ptr<pippenger_cached_data> pippenger_init_cache(const std::vector<Mu if (N == 0) N = data.size() - start_offset; CHECK_AND_ASSERT_THROW_MES(N <= data.size() - start_offset, "Bad cache base data"); - std::shared_ptr<pippenger_cached_data> cache(new pippenger_cached_data()); + std::shared_ptr<pippenger_cached_data> cache = std::make_shared<pippenger_cached_data>(); - cache->size = N; - cache->cached = (ge_cached*)aligned_realloc(cache->cached, N * sizeof(ge_cached), 4096); - CHECK_AND_ASSERT_THROW_MES(cache->cached, "Out of memory"); + cache->resize(N); for (size_t i = 0; i < N; ++i) - ge_p3_to_cached(&cache->cached[i], &data[i+start_offset].point); + ge_p3_to_cached(&(*cache)[i], &data[i+start_offset].point); MULTIEXP_PERF(PERF_TIMER_STOP(pippenger_init_cache)); return cache; @@ -600,14 +596,14 @@ std::shared_ptr<pippenger_cached_data> pippenger_init_cache(const std::vector<Mu size_t pippenger_get_cache_size(const std::shared_ptr<pippenger_cached_data> &cache) { - return cache->size * sizeof(*cache->cached); + return cache->size() * sizeof(ge_cached); } -rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache, size_t cache_size, size_t c) +ge_p3 pippenger_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache, size_t cache_size, size_t c) { if (cache != NULL && cache_size == 0) - cache_size = cache->size; - CHECK_AND_ASSERT_THROW_MES(cache == NULL || cache_size <= cache->size, "Cache is too small"); + cache_size = cache->size(); + CHECK_AND_ASSERT_THROW_MES(cache == NULL || cache_size <= cache->size(), "Cache is too small"); if (c == 0) c = get_pippenger_c(data.size()); CHECK_AND_ASSERT_THROW_MES(c <= 9, "c is too large"); @@ -661,9 +657,9 @@ rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr< if (buckets_init[bucket]) { if (i < cache_size) - add(buckets[bucket], local_cache->cached[i]); + add(buckets[bucket], (*local_cache)[i]); else - add(buckets[bucket], local_cache_2->cached[i - cache_size]); + add(buckets[bucket], (*local_cache_2)[i - cache_size]); } else { @@ -700,8 +696,14 @@ rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr< } } + return result; +} + +rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache, const size_t cache_size, const size_t c) +{ rct::key res; - ge_p3_tobytes(res.bytes, &result); + const ge_p3 result_p3 = pippenger_p3(data, cache, cache_size, c); + ge_p3_tobytes(res.bytes, &result_p3); return res; } diff --git a/src/ringct/multiexp.h b/src/ringct/multiexp.h index 788516c0b..ae10fcc8e 100644 --- a/src/ringct/multiexp.h +++ b/src/ringct/multiexp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. @@ -35,10 +35,16 @@ #define MULTIEXP_H #include <vector> +extern "C" +{ +#include "crypto/crypto-ops.h" +} #include "crypto/crypto.h" #include "rctTypes.h" #include "misc_log_ex.h" +#include <boost/align/aligned_allocator.hpp> + namespace rct { @@ -55,17 +61,19 @@ struct MultiexpData { }; struct straus_cached_data; -struct pippenger_cached_data; +using pippenger_cached_data = std::vector<ge_cached, boost::alignment::aligned_allocator<ge_cached, 4096>>; rct::key bos_coster_heap_conv(std::vector<MultiexpData> data); rct::key bos_coster_heap_conv_robust(std::vector<MultiexpData> data); std::shared_ptr<straus_cached_data> straus_init_cache(const std::vector<MultiexpData> &data, size_t N =0); size_t straus_get_cache_size(const std::shared_ptr<straus_cached_data> &cache); +ge_p3 straus_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache = NULL, size_t STEP = 0); rct::key straus(const std::vector<MultiexpData> &data, const std::shared_ptr<straus_cached_data> &cache = NULL, size_t STEP = 0); std::shared_ptr<pippenger_cached_data> pippenger_init_cache(const std::vector<MultiexpData> &data, size_t start_offset = 0, size_t N =0); size_t pippenger_get_cache_size(const std::shared_ptr<pippenger_cached_data> &cache); size_t get_pippenger_c(size_t N); -rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, size_t cache_size = 0, size_t c = 0); +ge_p3 pippenger_p3(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, size_t cache_size = 0, size_t c = 0); +rct::key pippenger(const std::vector<MultiexpData> &data, const std::shared_ptr<pippenger_cached_data> &cache = NULL, const size_t cache_size = 0, const size_t c = 0); } diff --git a/src/ringct/rctCryptoOps.c b/src/ringct/rctCryptoOps.c index a2bb68665..b4fcc64bd 100644 --- a/src/ringct/rctCryptoOps.c +++ b/src/ringct/rctCryptoOps.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/rctCryptoOps.h b/src/ringct/rctCryptoOps.h index 2d6e13bb7..ec5708818 100644 --- a/src/ringct/rctCryptoOps.h +++ b/src/ringct/rctCryptoOps.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp index 5b039d907..56dd53b2c 100644 --- a/src/ringct/rctOps.cpp +++ b/src/ringct/rctOps.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // diff --git a/src/ringct/rctOps.h b/src/ringct/rctOps.h index da0013ee1..eaab998cb 100644 --- a/src/ringct/rctOps.h +++ b/src/ringct/rctOps.h @@ -1,5 +1,5 @@ //#define DBG -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp index 7b16f017b..717bc27a3 100644 --- a/src/ringct/rctSigs.cpp +++ b/src/ringct/rctSigs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // @@ -30,7 +30,6 @@ #include "misc_log_ex.h" #include "misc_language.h" -#include "common/data_cache.h" #include "common/perf_timer.h" #include "common/threadpool.h" #include "common/util.h" @@ -1579,42 +1578,6 @@ namespace rct { } } - bool verRctNonSemanticsSimpleCached(const rctSig & rv) - { - // Hello future Monero dev! If you got this assert, read the following carefully: - // - // RCT cache assumes that this function will serialize and hash all rv's fields used for RingCT verification - // If you're about to add a new RCTType here, first you must check that binary_archive serialization writes all rv's fields to the binary blob - // If it's not the case, rewrite this function to serialize everything, even some "temporary" fields which are not serialized normally - CHECK_AND_ASSERT_MES_L1(rv.type <= RCTTypeBulletproofPlus, false, "Unknown RCT type. Make sure RCT cache works correctly with this type and then enable it in the code here."); - - // Don't cache older (or newer) rctSig types - // This cache only makes sense when it caches data from mempool first, - // so only "current fork version-enabled" RCT types need to be cached - if (rv.type != RCTTypeBulletproofPlus) - return verRctNonSemanticsSimple(rv); - - // Get the hash of rv - std::stringstream ss; - binary_archive<true> ar(ss); - - ::do_serialize(ar, const_cast<rctSig&>(rv)); - - crypto::hash h; - cryptonote::get_blob_hash(ss.str(), h); - - static tools::data_cache<crypto::hash, 8192> cache; - - if (cache.has(h)) - return true; - - const bool res = verRctNonSemanticsSimple(rv); - if (res) - cache.add(h); - - return res; - } - //RingCT protocol //genRct: // creates an rctSig with all data necessary to verify the rangeProofs and that the signer owns one of the diff --git a/src/ringct/rctSigs.h b/src/ringct/rctSigs.h index 18c7e5fe6..5c4773eb9 100644 --- a/src/ringct/rctSigs.h +++ b/src/ringct/rctSigs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // @@ -132,7 +132,6 @@ namespace rct { bool verRctSemanticsSimple(const rctSig & rv); bool verRctSemanticsSimple(const std::vector<const rctSig*> & rv); bool verRctNonSemanticsSimple(const rctSig & rv); - bool verRctNonSemanticsSimpleCached(const rctSig & rv); static inline bool verRctSimple(const rctSig & rv) { return verRctSemanticsSimple(rv) && verRctNonSemanticsSimple(rv); } xmr_amount decodeRct(const rctSig & rv, const key & sk, unsigned int i, key & mask, hw::device &hwdev); xmr_amount decodeRct(const rctSig & rv, const key & sk, unsigned int i, hw::device &hwdev); diff --git a/src/ringct/rctTypes.cpp b/src/ringct/rctTypes.cpp index c22b0524f..4ac75b78b 100644 --- a/src/ringct/rctTypes.cpp +++ b/src/ringct/rctTypes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 59ed4d6a6..380ca2f53 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016, Monero Research Labs +// Copyright (c) 2016-2023, Monero Research Labs // // Author: Shen Noether <shen.noether@gmx.com> // @@ -97,6 +97,14 @@ namespace rct { struct ctkey { key dest; key mask; //C here if public + + bool operator==(const ctkey &other) const { + return (dest == other.dest) && (mask == other.mask); + } + + bool operator!=(const ctkey &other) const { + return !(*this == other); + } }; typedef std::vector<ctkey> ctkeyV; typedef std::vector<ctkeyV> ctkeyM; diff --git a/src/rpc/CMakeLists.txt b/src/rpc/CMakeLists.txt index edfc70067..fe80d3083 100644 --- a/src/rpc/CMakeLists.txt +++ b/src/rpc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/rpc/bootstrap_node_selector.cpp b/src/rpc/bootstrap_node_selector.cpp index a1cad3e59..d224c5c53 100644 --- a/src/rpc/bootstrap_node_selector.cpp +++ b/src/rpc/bootstrap_node_selector.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/rpc/bootstrap_node_selector.h b/src/rpc/bootstrap_node_selector.h index 616c180fc..3e52c3538 100644 --- a/src/rpc/bootstrap_node_selector.h +++ b/src/rpc/bootstrap_node_selector.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index c6d105fb4..50a77cd8e 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -598,88 +598,165 @@ namespace cryptonote CHECK_PAYMENT(req, res, 1); - // quick check for noop - if (!req.block_ids.empty()) + res.daemon_time = (uint64_t)time(NULL); + // Always set daemon time, and set it early rather than late, as delivering some incremental pool + // info twice because of slightly overlapping time intervals is no problem, whereas producing gaps + // and never delivering something is + + bool get_blocks = false; + bool get_pool = false; + switch (req.requested_info) { - uint64_t last_block_height; - crypto::hash last_block_hash; - m_core.get_blockchain_top(last_block_height, last_block_hash); - if (last_block_hash == req.block_ids.front()) - { - res.start_height = 0; - res.current_height = m_core.get_current_blockchain_height(); - res.status = CORE_RPC_STATUS_OK; + case COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_ONLY: + // Compatibility value 0: Clients that do not set 'requested_info' want blocks, and only blocks + get_blocks = true; + break; + case COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_AND_POOL: + get_blocks = true; + get_pool = true; + break; + case COMMAND_RPC_GET_BLOCKS_FAST::POOL_ONLY: + get_pool = true; + break; + default: + res.status = "Failed, wrong requested info"; return true; - } } - size_t max_blocks = COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT; - if (m_rpc_payment) + res.pool_info_extent = COMMAND_RPC_GET_BLOCKS_FAST::NONE; + + if (get_pool) { - max_blocks = res.credits / COST_PER_BLOCK; - if (max_blocks > COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT) - max_blocks = COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT; - if (max_blocks == 0) + const bool restricted = m_restricted && ctx; + const bool request_has_rpc_origin = ctx != NULL; + const bool allow_sensitive = !request_has_rpc_origin || !restricted; + const size_t max_tx_count = restricted ? RESTRICTED_TRANSACTIONS_COUNT : std::numeric_limits<size_t>::max(); + + bool incremental; + std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>> added_pool_txs; + bool success = m_core.get_pool_info((time_t)req.pool_info_since, allow_sensitive, max_tx_count, added_pool_txs, res.remaining_added_pool_txids, res.removed_pool_txids, incremental); + if (success) { - res.status = CORE_RPC_STATUS_PAYMENT_REQUIRED; + res.added_pool_txs.clear(); + if (m_rpc_payment) + { + CHECK_PAYMENT_SAME_TS(req, res, added_pool_txs.size() * COST_PER_TX + (res.remaining_added_pool_txids.size() + res.removed_pool_txids.size()) * COST_PER_POOL_HASH); + } + for (const auto &added_pool_tx: added_pool_txs) + { + COMMAND_RPC_GET_BLOCKS_FAST::pool_tx_info info; + info.tx_hash = added_pool_tx.first; + std::stringstream oss; + binary_archive<true> ar(oss); + bool r = req.prune + ? const_cast<cryptonote::transaction&>(added_pool_tx.second.tx).serialize_base(ar) + : ::serialization::serialize(ar, const_cast<cryptonote::transaction&>(added_pool_tx.second.tx)); + if (!r) + { + res.status = "Failed to serialize transaction"; + return true; + } + info.tx_blob = oss.str(); + info.double_spend_seen = added_pool_tx.second.double_spend_seen; + res.added_pool_txs.push_back(std::move(info)); + } + } + if (success) + { + res.pool_info_extent = incremental ? COMMAND_RPC_GET_BLOCKS_FAST::INCREMENTAL : COMMAND_RPC_GET_BLOCKS_FAST::FULL; + } + else + { + res.status = "Failed to get pool info"; return true; } } - std::vector<std::pair<std::pair<cryptonote::blobdata, crypto::hash>, std::vector<std::pair<crypto::hash, cryptonote::blobdata> > > > bs; - if(!m_core.find_blockchain_supplement(req.start_height, req.block_ids, bs, res.current_height, res.start_height, req.prune, !req.no_miner_tx, max_blocks, COMMAND_RPC_GET_BLOCKS_FAST_MAX_TX_COUNT)) - { - res.status = "Failed"; - add_host_fail(ctx); - return true; - } - - CHECK_PAYMENT_SAME_TS(req, res, bs.size() * COST_PER_BLOCK); - - size_t size = 0, ntxes = 0; - res.blocks.reserve(bs.size()); - res.output_indices.reserve(bs.size()); - for(auto& bd: bs) + if (get_blocks) { - res.blocks.resize(res.blocks.size()+1); - res.blocks.back().pruned = req.prune; - res.blocks.back().block = bd.first.first; - size += bd.first.first.size(); - res.output_indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices()); - ntxes += bd.second.size(); - res.output_indices.back().indices.reserve(1 + bd.second.size()); - if (req.no_miner_tx) - res.output_indices.back().indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::tx_output_indices()); - res.blocks.back().txs.reserve(bd.second.size()); - for (std::vector<std::pair<crypto::hash, cryptonote::blobdata>>::iterator i = bd.second.begin(); i != bd.second.end(); ++i) + // quick check for noop + if (!req.block_ids.empty()) { - res.blocks.back().txs.push_back({std::move(i->second), crypto::null_hash}); - i->second.clear(); - i->second.shrink_to_fit(); - size += res.blocks.back().txs.back().blob.size(); + uint64_t last_block_height; + crypto::hash last_block_hash; + m_core.get_blockchain_top(last_block_height, last_block_hash); + if (last_block_hash == req.block_ids.front()) + { + res.start_height = 0; + res.current_height = last_block_height + 1; + res.status = CORE_RPC_STATUS_OK; + return true; + } } - const size_t n_txes_to_lookup = bd.second.size() + (req.no_miner_tx ? 0 : 1); - if (n_txes_to_lookup > 0) + size_t max_blocks = COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT; + if (m_rpc_payment) { - std::vector<std::vector<uint64_t>> indices; - bool r = m_core.get_tx_outputs_gindexs(req.no_miner_tx ? bd.second.front().first : bd.first.second, n_txes_to_lookup, indices); - if (!r) + max_blocks = res.credits / COST_PER_BLOCK; + if (max_blocks > COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT) + max_blocks = COMMAND_RPC_GET_BLOCKS_FAST_MAX_BLOCK_COUNT; + if (max_blocks == 0) { - res.status = "Failed"; + res.status = CORE_RPC_STATUS_PAYMENT_REQUIRED; return true; } - if (indices.size() != n_txes_to_lookup || res.output_indices.back().indices.size() != (req.no_miner_tx ? 1 : 0)) + } + + std::vector<std::pair<std::pair<cryptonote::blobdata, crypto::hash>, std::vector<std::pair<crypto::hash, cryptonote::blobdata> > > > bs; + if(!m_core.find_blockchain_supplement(req.start_height, req.block_ids, bs, res.current_height, res.start_height, req.prune, !req.no_miner_tx, max_blocks, COMMAND_RPC_GET_BLOCKS_FAST_MAX_TX_COUNT)) + { + res.status = "Failed"; + add_host_fail(ctx); + return true; + } + + CHECK_PAYMENT_SAME_TS(req, res, bs.size() * COST_PER_BLOCK); + + size_t size = 0, ntxes = 0; + res.blocks.reserve(bs.size()); + res.output_indices.reserve(bs.size()); + for(auto& bd: bs) + { + res.blocks.resize(res.blocks.size()+1); + res.blocks.back().pruned = req.prune; + res.blocks.back().block = bd.first.first; + size += bd.first.first.size(); + res.output_indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices()); + ntxes += bd.second.size(); + res.output_indices.back().indices.reserve(1 + bd.second.size()); + if (req.no_miner_tx) + res.output_indices.back().indices.push_back(COMMAND_RPC_GET_BLOCKS_FAST::tx_output_indices()); + res.blocks.back().txs.reserve(bd.second.size()); + for (std::vector<std::pair<crypto::hash, cryptonote::blobdata>>::iterator i = bd.second.begin(); i != bd.second.end(); ++i) { - res.status = "Failed"; - return true; + res.blocks.back().txs.push_back({std::move(i->second), crypto::null_hash}); + i->second.clear(); + i->second.shrink_to_fit(); + size += res.blocks.back().txs.back().blob.size(); + } + + const size_t n_txes_to_lookup = bd.second.size() + (req.no_miner_tx ? 0 : 1); + if (n_txes_to_lookup > 0) + { + std::vector<std::vector<uint64_t>> indices; + bool r = m_core.get_tx_outputs_gindexs(req.no_miner_tx ? bd.second.front().first : bd.first.second, n_txes_to_lookup, indices); + if (!r) + { + res.status = "Failed"; + return true; + } + if (indices.size() != n_txes_to_lookup || res.output_indices.back().indices.size() != (req.no_miner_tx ? 1 : 0)) + { + res.status = "Failed"; + return true; + } + for (size_t i = 0; i < indices.size(); ++i) + res.output_indices.back().indices.push_back({std::move(indices[i])}); } - for (size_t i = 0; i < indices.size(); ++i) - res.output_indices.back().indices.push_back({std::move(indices[i])}); } + MDEBUG("on_get_blocks: " << bs.size() << " blocks, " << ntxes << " txes, size " << size); } - MDEBUG("on_get_blocks: " << bs.size() << " blocks, " << ntxes << " txes, size " << size); res.status = CORE_RPC_STATUS_OK; return true; } @@ -919,17 +996,16 @@ namespace cryptonote // try the pool for any missing txes size_t found_in_pool = 0; std::unordered_set<crypto::hash> pool_tx_hashes; - std::unordered_map<crypto::hash, tx_info> per_tx_pool_tx_info; + std::unordered_map<crypto::hash, tx_memory_pool::tx_details> per_tx_pool_tx_details; if (!missed_txs.empty()) { - std::vector<tx_info> pool_tx_info; - std::vector<spent_key_image_info> pool_key_image_info; - bool r = m_core.get_pool_transactions_and_spent_keys_info(pool_tx_info, pool_key_image_info, !request_has_rpc_origin || !restricted); + std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>> pool_txs; + bool r = m_core.get_pool_transactions_info(missed_txs, pool_txs, !request_has_rpc_origin || !restricted); if(r) { // sort to match original request std::vector<std::tuple<crypto::hash, cryptonote::blobdata, crypto::hash, cryptonote::blobdata>> sorted_txs; - std::vector<tx_info>::const_iterator i; + std::vector<std::pair<crypto::hash, tx_memory_pool::tx_details>>::const_iterator i; unsigned txs_processed = 0; for (const crypto::hash &h: vh) { @@ -949,36 +1025,23 @@ namespace cryptonote sorted_txs.push_back(std::move(txs[txs_processed])); ++txs_processed; } - else if ((i = std::find_if(pool_tx_info.begin(), pool_tx_info.end(), [h](const tx_info &txi) { return epee::string_tools::pod_to_hex(h) == txi.id_hash; })) != pool_tx_info.end()) + else if ((i = std::find_if(pool_txs.begin(), pool_txs.end(), [h](const std::pair<crypto::hash, tx_memory_pool::tx_details> &pt) { return h == pt.first; })) != pool_txs.end()) { - cryptonote::transaction tx; - if (!cryptonote::parse_and_validate_tx_from_blob(i->tx_blob, tx)) - { - res.status = "Failed to parse and validate tx from blob"; - return true; - } + const tx_memory_pool::tx_details &td = i->second; std::stringstream ss; binary_archive<true> ba(ss); - bool r = const_cast<cryptonote::transaction&>(tx).serialize_base(ba); + bool r = const_cast<cryptonote::transaction&>(td.tx).serialize_base(ba); if (!r) { res.status = "Failed to serialize transaction base"; return true; } const cryptonote::blobdata pruned = ss.str(); - const crypto::hash prunable_hash = tx.version == 1 ? crypto::null_hash : get_transaction_prunable_hash(tx); - sorted_txs.push_back(std::make_tuple(h, pruned, prunable_hash, std::string(i->tx_blob, pruned.size()))); + const crypto::hash prunable_hash = td.tx.version == 1 ? crypto::null_hash : get_transaction_prunable_hash(td.tx); + sorted_txs.push_back(std::make_tuple(h, pruned, prunable_hash, std::string(td.tx_blob, pruned.size()))); missed_txs.erase(std::find(missed_txs.begin(), missed_txs.end(), h)); pool_tx_hashes.insert(h); - const std::string hash_string = epee::string_tools::pod_to_hex(h); - for (const auto &ti: pool_tx_info) - { - if (ti.id_hash == hash_string) - { - per_tx_pool_tx_info.insert(std::make_pair(h, ti)); - break; - } - } + per_tx_pool_tx_details.insert(std::make_pair(h, td)); ++found_in_pool; } } @@ -1084,8 +1147,8 @@ namespace cryptonote { e.block_height = e.block_timestamp = std::numeric_limits<uint64_t>::max(); e.confirmations = 0; - auto it = per_tx_pool_tx_info.find(tx_hash); - if (it != per_tx_pool_tx_info.end()) + auto it = per_tx_pool_tx_details.find(tx_hash); + if (it != per_tx_pool_tx_details.end()) { e.double_spend_seen = it->second.double_spend_seen; e.relayed = it->second.relayed; @@ -1285,6 +1348,8 @@ namespace cryptonote add_reason(reason, "fee too low"); if ((res.too_few_outputs = tvc.m_too_few_outputs)) add_reason(reason, "too few outputs"); + if ((res.tx_extra_too_big = tvc.m_tx_extra_too_big)) + add_reason(reason, "tx-extra too big"); const std::string punctuation = reason.empty() ? "" : ": "; if (tvc.m_verifivation_failed) { diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h index b87412ca6..790d5eb23 100644 --- a/src/rpc/core_rpc_server.h +++ b/src/rpc/core_rpc_server.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index e1222f6eb..7f1581d0c 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -88,7 +88,7 @@ namespace cryptonote // advance which version they will stop working with // Don't go over 32767 for any of these #define CORE_RPC_VERSION_MAJOR 3 -#define CORE_RPC_VERSION_MINOR 11 +#define CORE_RPC_VERSION_MINOR 12 #define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor)) #define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR) @@ -162,18 +162,29 @@ namespace cryptonote struct COMMAND_RPC_GET_BLOCKS_FAST { + enum REQUESTED_INFO + { + BLOCKS_ONLY = 0, + BLOCKS_AND_POOL = 1, + POOL_ONLY = 2 + }; + struct request_t: public rpc_access_request_base { + uint8_t requested_info; std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */ uint64_t start_height; bool prune; bool no_miner_tx; + uint64_t pool_info_since; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_PARENT(rpc_access_request_base) + KV_SERIALIZE_OPT(requested_info, (uint8_t)0) KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids) KV_SERIALIZE(start_height) KV_SERIALIZE(prune) KV_SERIALIZE_OPT(no_miner_tx, false) + KV_SERIALIZE_OPT(pool_info_since, (uint64_t)0) END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init<request_t> request; @@ -196,12 +207,37 @@ namespace cryptonote END_KV_SERIALIZE_MAP() }; + struct pool_tx_info + { + crypto::hash tx_hash; + blobdata tx_blob; + bool double_spend_seen; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE_VAL_POD_AS_BLOB(tx_hash) + KV_SERIALIZE(tx_blob) + KV_SERIALIZE(double_spend_seen) + END_KV_SERIALIZE_MAP() + }; + + enum POOL_INFO_EXTENT + { + NONE = 0, + INCREMENTAL = 1, + FULL = 2 + }; + struct response_t: public rpc_access_response_base { std::vector<block_complete_entry> blocks; uint64_t start_height; uint64_t current_height; std::vector<block_output_indices> output_indices; + uint64_t daemon_time; + uint8_t pool_info_extent; + std::vector<pool_tx_info> added_pool_txs; + std::vector<crypto::hash> remaining_added_pool_txids; + std::vector<crypto::hash> removed_pool_txids; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_PARENT(rpc_access_response_base) @@ -209,6 +245,17 @@ namespace cryptonote KV_SERIALIZE(start_height) KV_SERIALIZE(current_height) KV_SERIALIZE(output_indices) + KV_SERIALIZE_OPT(daemon_time, (uint64_t) 0) + KV_SERIALIZE_OPT(pool_info_extent, (uint8_t) 0) + if (pool_info_extent != POOL_INFO_EXTENT::NONE) + { + KV_SERIALIZE(added_pool_txs) + KV_SERIALIZE_CONTAINER_POD_AS_BLOB(remaining_added_pool_txids) + } + if (pool_info_extent == POOL_INFO_EXTENT::INCREMENTAL) + { + KV_SERIALIZE_CONTAINER_POD_AS_BLOB(removed_pool_txids) + } END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init<response_t> response; @@ -592,6 +639,7 @@ namespace cryptonote bool fee_too_low; bool too_few_outputs; bool sanity_check_failed; + bool tx_extra_too_big; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE_PARENT(rpc_access_response_base) @@ -606,6 +654,7 @@ namespace cryptonote KV_SERIALIZE(fee_too_low) KV_SERIALIZE(too_few_outputs) KV_SERIALIZE(sanity_check_failed) + KV_SERIALIZE(tx_extra_too_big) END_KV_SERIALIZE_MAP() }; typedef epee::misc_utils::struct_init<response_t> response; diff --git a/src/rpc/core_rpc_server_error_codes.h b/src/rpc/core_rpc_server_error_codes.h index 1ba2392a9..2a4726a89 100644 --- a/src/rpc/core_rpc_server_error_codes.h +++ b/src/rpc/core_rpc_server_error_codes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/daemon_handler.cpp b/src/rpc/daemon_handler.cpp index 0466c92c2..52067bd4d 100644 --- a/src/rpc/daemon_handler.cpp +++ b/src/rpc/daemon_handler.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/daemon_handler.h b/src/rpc/daemon_handler.h index 74885cf30..11a6c2849 100644 --- a/src/rpc/daemon_handler.h +++ b/src/rpc/daemon_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/daemon_messages.cpp b/src/rpc/daemon_messages.cpp index a7c921ff9..0da22f15f 100644 --- a/src/rpc/daemon_messages.cpp +++ b/src/rpc/daemon_messages.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/daemon_messages.h b/src/rpc/daemon_messages.h index fb33f0d4a..d4b55f8fd 100644 --- a/src/rpc/daemon_messages.h +++ b/src/rpc/daemon_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/daemon_rpc_version.h b/src/rpc/daemon_rpc_version.h index 62847fd58..d14b85ed9 100644 --- a/src/rpc/daemon_rpc_version.h +++ b/src/rpc/daemon_rpc_version.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/fwd.h b/src/rpc/fwd.h index cd9eacb9a..6227f5696 100644 --- a/src/rpc/fwd.h +++ b/src/rpc/fwd.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/instanciations.cpp b/src/rpc/instanciations.cpp index 6e48d36a8..d4f5231f3 100644 --- a/src/rpc/instanciations.cpp +++ b/src/rpc/instanciations.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/message.cpp b/src/rpc/message.cpp index 005c40ea2..9fda96e71 100644 --- a/src/rpc/message.cpp +++ b/src/rpc/message.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/message.h b/src/rpc/message.h index 730b3ec74..b7253e09b 100644 --- a/src/rpc/message.h +++ b/src/rpc/message.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/message_data_structs.h b/src/rpc/message_data_structs.h index dd9d198ed..542d71239 100644 --- a/src/rpc/message_data_structs.h +++ b/src/rpc/message_data_structs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_args.cpp b/src/rpc/rpc_args.cpp index 74f0879af..e6233fa98 100644 --- a/src/rpc/rpc_args.cpp +++ b/src/rpc/rpc_args.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_args.h b/src/rpc/rpc_args.h index 0b0dac57a..ac6a5d7cd 100644 --- a/src/rpc/rpc_args.h +++ b/src/rpc/rpc_args.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_handler.h b/src/rpc/rpc_handler.h index c84460549..e13d3036f 100644 --- a/src/rpc/rpc_handler.h +++ b/src/rpc/rpc_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_payment.cpp b/src/rpc/rpc_payment.cpp index aca3e3761..71a00aca4 100644 --- a/src/rpc/rpc_payment.cpp +++ b/src/rpc/rpc_payment.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_payment.h b/src/rpc/rpc_payment.h index e93f27d24..4ead5a344 100644 --- a/src/rpc/rpc_payment.h +++ b/src/rpc/rpc_payment.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_payment_costs.h b/src/rpc/rpc_payment_costs.h index 6ba4e8064..36ee5ec1d 100644 --- a/src/rpc/rpc_payment_costs.h +++ b/src/rpc/rpc_payment_costs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_payment_signature.cpp b/src/rpc/rpc_payment_signature.cpp index 4e4798aae..ec7aeb715 100644 --- a/src/rpc/rpc_payment_signature.cpp +++ b/src/rpc/rpc_payment_signature.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_payment_signature.h b/src/rpc/rpc_payment_signature.h index 55ba49e9a..f0539446f 100644 --- a/src/rpc/rpc_payment_signature.h +++ b/src/rpc/rpc_payment_signature.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_version_str.cpp b/src/rpc/rpc_version_str.cpp index 528c92415..07756d636 100644 --- a/src/rpc/rpc_version_str.cpp +++ b/src/rpc/rpc_version_str.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/rpc_version_str.h b/src/rpc/rpc_version_str.h index b81a76980..2cfa9f867 100644 --- a/src/rpc/rpc_version_str.h +++ b/src/rpc/rpc_version_str.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/zmq_pub.cpp b/src/rpc/zmq_pub.cpp index 81e6de99a..4c620c59a 100644 --- a/src/rpc/zmq_pub.cpp +++ b/src/rpc/zmq_pub.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/rpc/zmq_pub.h b/src/rpc/zmq_pub.h index 9554f26be..fe60527a6 100644 --- a/src/rpc/zmq_pub.h +++ b/src/rpc/zmq_pub.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/src/rpc/zmq_server.cpp b/src/rpc/zmq_server.cpp index 398a0499a..cb8a8bea4 100644 --- a/src/rpc/zmq_server.cpp +++ b/src/rpc/zmq_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/rpc/zmq_server.h b/src/rpc/zmq_server.h index 2d4049baa..b561fd580 100644 --- a/src/rpc/zmq_server.h +++ b/src/rpc/zmq_server.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/CMakeLists.txt b/src/serialization/CMakeLists.txt index d3b9e57ca..07076bae2 100644 --- a/src/serialization/CMakeLists.txt +++ b/src/serialization/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2022, The Monero Project +# Copyright (c) 2016-2023, The Monero Project # # All rights reserved. # diff --git a/src/serialization/binary_archive.h b/src/serialization/binary_archive.h index 07a4ec169..b3946a84b 100644 --- a/src/serialization/binary_archive.h +++ b/src/serialization/binary_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/binary_utils.h b/src/serialization/binary_utils.h index 9b41e9529..247c60beb 100644 --- a/src/serialization/binary_utils.h +++ b/src/serialization/binary_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/container.h b/src/serialization/container.h index 7b59e9408..80e1892f2 100644 --- a/src/serialization/container.h +++ b/src/serialization/container.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/containers.h b/src/serialization/containers.h index dd2de829a..65e6359b2 100644 --- a/src/serialization/containers.h +++ b/src/serialization/containers.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/crypto.h b/src/serialization/crypto.h index c2a4846ee..896d00583 100644 --- a/src/serialization/crypto.h +++ b/src/serialization/crypto.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/debug_archive.h b/src/serialization/debug_archive.h index 479ed0cac..ef3bb4345 100644 --- a/src/serialization/debug_archive.h +++ b/src/serialization/debug_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/difficulty_type.h b/src/serialization/difficulty_type.h index b13693c26..37761839b 100644 --- a/src/serialization/difficulty_type.h +++ b/src/serialization/difficulty_type.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/json_archive.h b/src/serialization/json_archive.h index 8c4486d05..194ddaee9 100644 --- a/src/serialization/json_archive.h +++ b/src/serialization/json_archive.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/json_object.cpp b/src/serialization/json_object.cpp index 8de5860f6..4e436c254 100644 --- a/src/serialization/json_object.cpp +++ b/src/serialization/json_object.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/json_object.h b/src/serialization/json_object.h index 968707165..513ecfd34 100644 --- a/src/serialization/json_object.h +++ b/src/serialization/json_object.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/json_utils.h b/src/serialization/json_utils.h index 63f4bc043..cb371c194 100644 --- a/src/serialization/json_utils.h +++ b/src/serialization/json_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/pair.h b/src/serialization/pair.h index f18260dc8..f21041fe8 100644 --- a/src/serialization/pair.h +++ b/src/serialization/pair.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/serialization.h b/src/serialization/serialization.h index 381d29cfc..efe1270a4 100644 --- a/src/serialization/serialization.h +++ b/src/serialization/serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/string.h b/src/serialization/string.h index 976924602..a5d68eb64 100644 --- a/src/serialization/string.h +++ b/src/serialization/string.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/tuple.h b/src/serialization/tuple.h index 6d98e05b0..e76ca0b99 100644 --- a/src/serialization/tuple.h +++ b/src/serialization/tuple.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/serialization/variant.h b/src/serialization/variant.h index 2b3c75ce5..77d767a1c 100644 --- a/src/serialization/variant.h +++ b/src/serialization/variant.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt index b659d9f48..9c1d2a339 100644 --- a/src/simplewallet/CMakeLists.txt +++ b/src/simplewallet/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index f59af575e..cc335411b 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -4022,6 +4022,7 @@ bool simple_wallet::ask_wallet_create_if_needed() bool ok = true; if (!m_restoring) { + message_writer() << tr("Looking for filename: ") << boost::filesystem::complete(wallet_path); message_writer() << tr("No wallet found with that name. Confirm creation of new wallet named: ") << wallet_path; confirm_creation = input_line("", true); if(std::cin.eof()) @@ -4968,6 +4969,7 @@ boost::optional<epee::wipeable_string> simple_wallet::new_wallet(const boost::pr "your current session's state. Otherwise, you might need to synchronize \n" "your wallet again (your wallet keys are NOT at risk in any case).\n") ; + success_msg_writer() << tr("Filename: ") << boost::filesystem::complete(m_wallet->get_keys_file()); if (!two_random) { @@ -5894,7 +5896,10 @@ bool simple_wallet::refresh_main(uint64_t start_height, enum ResetType reset, bo { m_in_manual_refresh.store(true, std::memory_order_relaxed); epee::misc_utils::auto_scope_leave_caller scope_exit_handler = epee::misc_utils::create_scope_leave_handler([&](){m_in_manual_refresh.store(false, std::memory_order_relaxed);}); - m_wallet->refresh(m_wallet->is_trusted_daemon(), start_height, fetched_blocks, received_money); + // For manual refresh don't allow incremental checking of the pool: Because we did not process the txs + // for us in the pool during automatic refresh we could miss some of them if we checked the pool + // incrementally here + m_wallet->refresh(m_wallet->is_trusted_daemon(), start_height, fetched_blocks, received_money, true, false); if (reset == ResetSoftKeepKI) { diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 7c45d45e8..acefb0bcc 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 6095f99d5..e72f3eb20 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/wallet/api/CMakeLists.txt b/src/wallet/api/CMakeLists.txt index af7948d8a..35ce5144b 100644 --- a/src/wallet/api/CMakeLists.txt +++ b/src/wallet/api/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/src/wallet/api/address_book.cpp b/src/wallet/api/address_book.cpp index c73653e37..aeffe921e 100644 --- a/src/wallet/api/address_book.cpp +++ b/src/wallet/api/address_book.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/address_book.h b/src/wallet/api/address_book.h index 5b0655000..8de7f95ff 100644 --- a/src/wallet/api/address_book.h +++ b/src/wallet/api/address_book.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp index 70a702796..47eb7a243 100644 --- a/src/wallet/api/pending_transaction.cpp +++ b/src/wallet/api/pending_transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/pending_transaction.h b/src/wallet/api/pending_transaction.h index 0a9779c07..ea2831b25 100644 --- a/src/wallet/api/pending_transaction.h +++ b/src/wallet/api/pending_transaction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/subaddress.cpp b/src/wallet/api/subaddress.cpp index 9e358b4c8..7a1460c8e 100644 --- a/src/wallet/api/subaddress.cpp +++ b/src/wallet/api/subaddress.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/subaddress.h b/src/wallet/api/subaddress.h index 53ece126d..bcee10577 100644 --- a/src/wallet/api/subaddress.h +++ b/src/wallet/api/subaddress.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/subaddress_account.cpp b/src/wallet/api/subaddress_account.cpp index e8153df3d..ebee80e7e 100644 --- a/src/wallet/api/subaddress_account.cpp +++ b/src/wallet/api/subaddress_account.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/subaddress_account.h b/src/wallet/api/subaddress_account.h index 94cab47fb..3934df3ef 100644 --- a/src/wallet/api/subaddress_account.h +++ b/src/wallet/api/subaddress_account.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/transaction_history.cpp b/src/wallet/api/transaction_history.cpp index 9f5e41156..ad797cc07 100644 --- a/src/wallet/api/transaction_history.cpp +++ b/src/wallet/api/transaction_history.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/transaction_history.h b/src/wallet/api/transaction_history.h index 1d52f4a69..04bc8a705 100644 --- a/src/wallet/api/transaction_history.h +++ b/src/wallet/api/transaction_history.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/transaction_info.cpp b/src/wallet/api/transaction_info.cpp index 572b04316..8f5ee39a0 100644 --- a/src/wallet/api/transaction_info.cpp +++ b/src/wallet/api/transaction_info.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/transaction_info.h b/src/wallet/api/transaction_info.h index 6337f2aaa..33dc8a7f4 100644 --- a/src/wallet/api/transaction_info.h +++ b/src/wallet/api/transaction_info.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp index 6165a2240..07cf93f59 100644 --- a/src/wallet/api/unsigned_transaction.cpp +++ b/src/wallet/api/unsigned_transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/unsigned_transaction.h b/src/wallet/api/unsigned_transaction.h index 30065a7fa..4fd1a0b28 100644 --- a/src/wallet/api/unsigned_transaction.h +++ b/src/wallet/api/unsigned_transaction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/utils.cpp b/src/wallet/api/utils.cpp index d8dcedc5f..d02fdcaf6 100644 --- a/src/wallet/api/utils.cpp +++ b/src/wallet/api/utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 085f4f9df..38184fb51 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index 4ac672287..c44d05968 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index 0ae84adb9..a363636df 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index e81b8f83a..1bb4bc27c 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/api/wallet_manager.h b/src/wallet/api/wallet_manager.h index a223e1df9..46ec36297 100644 --- a/src/wallet/api/wallet_manager.h +++ b/src/wallet/api/wallet_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/message_store.cpp b/src/wallet/message_store.cpp index cf1d91d5a..1169d5269 100644 --- a/src/wallet/message_store.cpp +++ b/src/wallet/message_store.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/message_store.h b/src/wallet/message_store.h index c5421a702..202d77be6 100644 --- a/src/wallet/message_store.h +++ b/src/wallet/message_store.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/message_transporter.cpp b/src/wallet/message_transporter.cpp index c985eb583..7aa765c87 100644 --- a/src/wallet/message_transporter.cpp +++ b/src/wallet/message_transporter.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/message_transporter.h b/src/wallet/message_transporter.h index b7d3c8107..d24888333 100644 --- a/src/wallet/message_transporter.h +++ b/src/wallet/message_transporter.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/node_rpc_proxy.cpp b/src/wallet/node_rpc_proxy.cpp index 0a9ea8f7b..62a525a4b 100644 --- a/src/wallet/node_rpc_proxy.cpp +++ b/src/wallet/node_rpc_proxy.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // @@ -392,4 +392,34 @@ boost::optional<std::string> NodeRPCProxy::get_rpc_payment_info(bool mining, boo return boost::none; } +boost::optional<std::string> NodeRPCProxy::get_transactions(const std::vector<crypto::hash> &txids, const std::function<void(const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request&, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response&, bool)> &f) +{ + const size_t SLICE_SIZE = 100; // RESTRICTED_TRANSACTIONS_COUNT as defined in rpc/core_rpc_server.cpp + for (size_t offset = 0; offset < txids.size(); offset += SLICE_SIZE) + { + cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request req_t = AUTO_VAL_INIT(req_t); + cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response resp_t = AUTO_VAL_INIT(resp_t); + + const size_t n_txids = std::min<size_t>(SLICE_SIZE, txids.size() - offset); + for (size_t n = offset; n < (offset + n_txids); ++n) + req_t.txs_hashes.push_back(epee::string_tools::pod_to_hex(txids[n])); + MDEBUG("asking for " << req_t.txs_hashes.size() << " transactions"); + req_t.decode_as_json = false; + req_t.prune = true; + + bool r = false; + { + const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex}; + uint64_t pre_call_credits = m_rpc_payment_state.credits; + req_t.client = cryptonote::make_rpc_payment_signature(m_client_id_secret_key); + r = net_utils::invoke_http_json("/gettransactions", req_t, resp_t, m_http_client, rpc_timeout); + if (r && resp_t.status == CORE_RPC_STATUS_OK) + check_rpc_cost(m_rpc_payment_state, "/gettransactions", resp_t.credits, pre_call_credits, resp_t.txs.size() * COST_PER_TX); + } + + f(req_t, resp_t, r); + } + return boost::optional<std::string>(); +} + } diff --git a/src/wallet/node_rpc_proxy.h b/src/wallet/node_rpc_proxy.h index e320565ac..eb947d2b2 100644 --- a/src/wallet/node_rpc_proxy.h +++ b/src/wallet/node_rpc_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // @@ -59,6 +59,7 @@ public: boost::optional<std::string> get_dynamic_base_fee_estimate_2021_scaling(uint64_t grace_blocks, std::vector<uint64_t> &fees); boost::optional<std::string> get_fee_quantization_mask(uint64_t &fee_quantization_mask); boost::optional<std::string> get_rpc_payment_info(bool mining, bool &payment_required, uint64_t &credits, uint64_t &diff, uint64_t &credits_per_hash_found, cryptonote::blobdata &blob, uint64_t &height, uint64_t &seed_height, crypto::hash &seed_hash, crypto::hash &next_seed_hash, uint32_t &cookie); + boost::optional<std::string> get_transactions(const std::vector<crypto::hash> &txids, const std::function<void(const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request&, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response&, bool)> &f); private: template<typename T> void handle_payment_changes(const T &res, std::true_type) { diff --git a/src/wallet/ringdb.cpp b/src/wallet/ringdb.cpp index 7e4f12f5b..3b3a8303a 100644 --- a/src/wallet/ringdb.cpp +++ b/src/wallet/ringdb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/ringdb.h b/src/wallet/ringdb.h index bdecdba37..93be362d0 100644 --- a/src/wallet/ringdb.h +++ b/src/wallet/ringdb.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 9e99cac83..6c474abc7 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -1006,7 +1006,7 @@ gamma_picker::gamma_picker(const std::vector<uint64_t> &rct_offsets, double shap const size_t blocks_to_consider = std::min<size_t>(rct_offsets.size(), blocks_in_a_year); const size_t outputs_to_consider = rct_offsets.back() - (blocks_to_consider < rct_offsets.size() ? rct_offsets[rct_offsets.size() - blocks_to_consider - 1] : 0); begin = rct_offsets.data(); - end = rct_offsets.data() + rct_offsets.size() - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE; + end = rct_offsets.data() + rct_offsets.size() - (std::max(1, CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE) - 1); num_rct_outputs = *(end - 1); THROW_WALLET_EXCEPTION_IF(num_rct_outputs == 0, error::wallet_internal_error, "No rct outputs"); average_output_time = DIFFICULTY_TARGET_V2 * blocks_to_consider / static_cast<double>(outputs_to_consider); // this assumes constant target over the whole rct range @@ -1225,6 +1225,7 @@ wallet2::wallet2(network_type nettype, uint64_t kdf_rounds, bool unattended, std m_load_deprecated_formats(false), m_credits_target(0), m_enable_multisig(false), + m_pool_info_query_time(0), m_has_ever_refreshed_from_node(false), m_allow_mismatched_daemon_version(false) { @@ -1349,6 +1350,7 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u m_rpc_payment_state.discrepancy = 0; m_rpc_version = 0; m_node_rpc_proxy.invalidate(); + m_pool_info_query_time = 0; } const std::string address = get_daemon_address(); @@ -2664,7 +2666,83 @@ void wallet2::parse_block_round(const cryptonote::blobdata &blob, cryptonote::bl error = !cryptonote::parse_and_validate_block_from_blob(blob, bl, bl_id); } //---------------------------------------------------------------------------------------------------- -void wallet2::pull_blocks(uint64_t start_height, uint64_t &blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices, uint64_t ¤t_height) +void read_pool_txs(const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request &req, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response &res, bool r, const std::vector<crypto::hash> &txids, std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &txs) +{ + if (r && res.status == CORE_RPC_STATUS_OK) + { + MDEBUG("Reading pool txs"); + if (res.txs.size() == req.txs_hashes.size()) + { + for (const auto &tx_entry: res.txs) + { + if (tx_entry.in_pool) + { + cryptonote::transaction tx; + cryptonote::blobdata bd; + crypto::hash tx_hash; + + if (get_pruned_tx(tx_entry, tx, tx_hash)) + { + const std::vector<crypto::hash>::const_iterator i = std::find_if(txids.begin(), txids.end(), + [tx_hash](const crypto::hash &e) { return e == tx_hash; }); + if (i != txids.end()) + { + txs.push_back(std::make_tuple(tx, tx_hash, tx_entry.double_spend_seen)); + } + else + { + MERROR("Got txid " << tx_hash << " which we did not ask for"); + } + } + else + { + LOG_PRINT_L0("Failed to parse transaction from daemon"); + } + } + else + { + LOG_PRINT_L1("Transaction from daemon was in pool, but is no more"); + } + } + } + else + { + LOG_PRINT_L0("Expected " << req.txs_hashes.size() << " out of " << txids.size() << " tx(es), got " << res.txs.size()); + } + } +} +//---------------------------------------------------------------------------------------------------- +void wallet2::process_pool_info_extent(const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response &res, std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed) +{ + std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> added_pool_txs; + added_pool_txs.reserve(res.added_pool_txs.size() + res.remaining_added_pool_txids.size()); + + for (const auto &pool_tx: res.added_pool_txs) + { + cryptonote::transaction tx; + THROW_WALLET_EXCEPTION_IF(!cryptonote::parse_and_validate_tx_base_from_blob(pool_tx.tx_blob, tx), + error::wallet_internal_error, "Failed to validate transaction base from daemon"); + added_pool_txs.push_back(std::make_tuple(tx, pool_tx.tx_hash, pool_tx.double_spend_seen)); + } + + // getblocks.bin may return more added pool transactions than we're allowed to request in restricted mode + if (!res.remaining_added_pool_txids.empty()) + { + // request the remaining txs + m_node_rpc_proxy.get_transactions(res.remaining_added_pool_txids, + [this, &res, &added_pool_txs](const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request &req_t, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response &resp_t, bool r) + { + read_pool_txs(req_t, resp_t, r, res.remaining_added_pool_txids, added_pool_txs); + if (!r || resp_t.status != CORE_RPC_STATUS_OK) + LOG_PRINT_L0("Error calling gettransactions daemon RPC: r " << r << ", status " << get_rpc_status(resp_t.status)); + } + ); + } + + update_pool_state_from_pool_data(res.pool_info_extent == COMMAND_RPC_GET_BLOCKS_FAST::INCREMENTAL, res.removed_pool_txids, added_pool_txs, process_txs, refreshed); +} +//---------------------------------------------------------------------------------------------------- +void wallet2::pull_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t &blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices, uint64_t ¤t_height) { cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::request req = AUTO_VAL_INIT(req); cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response res = AUTO_VAL_INIT(res); @@ -2676,6 +2754,10 @@ void wallet2::pull_blocks(uint64_t start_height, uint64_t &blocks_start_height, req.start_height = start_height; req.no_miner_tx = m_refresh_type == RefreshNoCoinbase; + req.requested_info = first ? COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_AND_POOL : COMMAND_RPC_GET_BLOCKS_FAST::BLOCKS_ONLY; + if (try_incremental) + req.pool_info_since = m_pool_info_query_time; + { const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex}; uint64_t pre_call_credits = m_rpc_payment_state.credits; @@ -2685,16 +2767,36 @@ void wallet2::pull_blocks(uint64_t start_height, uint64_t &blocks_start_height, THROW_WALLET_EXCEPTION_IF(res.blocks.size() != res.output_indices.size(), error::wallet_internal_error, "mismatched blocks (" + boost::lexical_cast<std::string>(res.blocks.size()) + ") and output_indices (" + boost::lexical_cast<std::string>(res.output_indices.size()) + ") sizes from daemon"); - check_rpc_cost("/getblocks.bin", res.credits, pre_call_credits, 1 + res.blocks.size() * COST_PER_BLOCK); + uint64_t pool_info_cost = res.added_pool_txs.size() * COST_PER_TX + (res.remaining_added_pool_txids.size() + res.removed_pool_txids.size()) * COST_PER_POOL_HASH; + check_rpc_cost("/getblocks.bin", res.credits, pre_call_credits, 1 + res.blocks.size() * COST_PER_BLOCK + pool_info_cost); } blocks_start_height = res.start_height; blocks = std::move(res.blocks); o_indices = std::move(res.output_indices); current_height = res.current_height; + if (res.pool_info_extent != COMMAND_RPC_GET_BLOCKS_FAST::NONE) + m_pool_info_query_time = res.daemon_time; MDEBUG("Pulled blocks: blocks_start_height " << blocks_start_height << ", count " << blocks.size() - << ", height " << blocks_start_height + blocks.size() << ", node height " << res.current_height); + << ", height " << blocks_start_height + blocks.size() << ", node height " << res.current_height + << ", pool info " << static_cast<unsigned int>(res.pool_info_extent)); + + if (first) + { + if (res.pool_info_extent != COMMAND_RPC_GET_BLOCKS_FAST::NONE) + { + process_pool_info_extent(res, m_process_pool_txs, true); + } + else + { + // If we did not get any pool info, neither incremental nor the whole pool, we probably talk + // to a daemon that does not yet support giving back pool info with the 'getblocks' call, + // and we have to update in the "old way" + update_pool_state_by_pool_query(m_process_pool_txs, true); + } + } + } //---------------------------------------------------------------------------------------------------- void wallet2::pull_hashes(uint64_t start_height, uint64_t &blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<crypto::hash> &hashes) @@ -2944,7 +3046,7 @@ void check_block_hard_fork_version(cryptonote::network_type nettype, uint8_t hf_ daemon_is_outdated = height < start_height || height >= end_height; } //---------------------------------------------------------------------------------------------------- -void wallet2::pull_and_parse_next_blocks(uint64_t start_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, const std::vector<cryptonote::block_complete_entry> &prev_blocks, const std::vector<parsed_block> &prev_parsed_blocks, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<parsed_block> &parsed_blocks, bool &last, bool &error, std::exception_ptr &exception) +void wallet2::pull_and_parse_next_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, const std::vector<cryptonote::block_complete_entry> &prev_blocks, const std::vector<parsed_block> &prev_parsed_blocks, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<parsed_block> &parsed_blocks, bool &last, bool &error, std::exception_ptr &exception) { error = false; last = false; @@ -2966,7 +3068,7 @@ void wallet2::pull_and_parse_next_blocks(uint64_t start_height, uint64_t &blocks // pull the new blocks std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> o_indices; uint64_t current_height; - pull_blocks(start_height, blocks_start_height, short_chain_history, blocks, o_indices, current_height); + pull_blocks(first, try_incremental, start_height, blocks_start_height, short_chain_history, blocks, o_indices, current_height); THROW_WALLET_EXCEPTION_IF(blocks.size() != o_indices.size(), error::wallet_internal_error, "Mismatched sizes of blocks and o_indices"); tools::threadpool& tpool = tools::threadpool::getInstanceForCompute(); @@ -3030,9 +3132,10 @@ void wallet2::pull_and_parse_next_blocks(uint64_t start_height, uint64_t &blocks } } -void wallet2::remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashes) +void wallet2::remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashes, bool remove_if_found) { - // remove pool txes to us that aren't in the pool anymore + // remove pool txes to us that aren't in the pool anymore (remove_if_found = false), + // or remove pool txes to us that were reported as removed (remove_if_found = true) std::unordered_multimap<crypto::hash, wallet2::pool_payment_details>::iterator uit = m_unconfirmed_payments.begin(); while (uit != m_unconfirmed_payments.end()) { @@ -3047,9 +3150,9 @@ void wallet2::remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashe } } auto pit = uit++; - if (!found) + if ((!remove_if_found && !found) || (remove_if_found && found)) { - MDEBUG("Removing " << txid << " from unconfirmed payments, not found in pool"); + MDEBUG("Removing " << txid << " from unconfirmed payments"); m_unconfirmed_payments.erase(pit); if (0 != m_callback) m_callback->on_pool_tx_removed(txid); @@ -3058,9 +3161,183 @@ void wallet2::remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashe } //---------------------------------------------------------------------------------------------------- -void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed) +// Code that is common to 'update_pool_state_by_pool_query' and 'update_pool_state_from_pool_data': +// Check wether a tx in the pool is worthy of processing because we did not see it +// yet or because it is "interesting" out of special circumstances +bool wallet2::accept_pool_tx_for_processing(const crypto::hash &txid) +{ + bool txid_found_in_up = false; + for (const auto &up: m_unconfirmed_payments) + { + if (up.second.m_pd.m_tx_hash == txid) + { + txid_found_in_up = true; + break; + } + } + if (m_scanned_pool_txs[0].find(txid) != m_scanned_pool_txs[0].end() || m_scanned_pool_txs[1].find(txid) != m_scanned_pool_txs[1].end()) + { + // if it's for us, we want to keep track of whether we saw a double spend, so don't bail out + if (!txid_found_in_up) + { + LOG_PRINT_L2("Already seen " << txid << ", and not for us, skipped"); + return false; + } + } + if (!txid_found_in_up) + { + LOG_PRINT_L1("Found new pool tx: " << txid); + bool found = false; + for (const auto &i: m_unconfirmed_txs) + { + if (i.first == txid) + { + found = true; + // if this is a payment to yourself at a different subaddress account, don't skip it + // so that you can see the incoming pool tx with 'show_transfers' on that receiving subaddress account + const unconfirmed_transfer_details& utd = i.second; + for (const auto& dst : utd.m_dests) + { + auto subaddr_index = m_subaddresses.find(dst.addr.m_spend_public_key); + if (subaddr_index != m_subaddresses.end() && subaddr_index->second.major != utd.m_subaddr_account) + { + found = false; + break; + } + } + break; + } + } + if (!found) + { + // not one of those we sent ourselves + return true; + } + else + { + LOG_PRINT_L1("We sent that one"); + return false; + } + } + else { + return false; + } +} +//---------------------------------------------------------------------------------------------------- +// Code that is common to 'update_pool_state_by_pool_query' and 'update_pool_state_from_pool_data': +// Process an unconfirmed transfer after we know whether it's in the pool or not +void wallet2::process_unconfirmed_transfer(bool incremental, const crypto::hash &txid, wallet2::unconfirmed_transfer_details &tx_details, bool seen_in_pool, std::chrono::system_clock::time_point now, bool refreshed) { - MTRACE("update_pool_state start"); + // TODO: set tx_propagation_timeout to CRYPTONOTE_DANDELIONPP_EMBARGO_AVERAGE * 3 / 2 after v15 hardfork + constexpr const std::chrono::seconds tx_propagation_timeout{500}; + if (seen_in_pool) + { + if (tx_details.m_state != wallet2::unconfirmed_transfer_details::pending_in_pool) + { + tx_details.m_state = wallet2::unconfirmed_transfer_details::pending_in_pool; + MINFO("Pending txid " << txid << " seen in pool, marking as pending in pool"); + } + } + else + { + if (!incremental) + { + if (tx_details.m_state == wallet2::unconfirmed_transfer_details::pending_in_pool) + { + // For the probably unlikely case that a tx once seen in the pool vanishes + // again set back to 'pending' + tx_details.m_state = wallet2::unconfirmed_transfer_details::pending; + MINFO("Already seen txid " << txid << " vanished from pool, marking as pending"); + } + } + // If a tx is pending for a "long time" without appearing in the pool, and if + // we have refreshed and thus had a chance to really see it if it was there, + // judge it as failed; the waiting for timeout and refresh happened avoids + // false alarms with txs going to 'failed' too early + if (tx_details.m_state == wallet2::unconfirmed_transfer_details::pending && refreshed && + now > std::chrono::system_clock::from_time_t(tx_details.m_sent_time) + tx_propagation_timeout) + { + LOG_PRINT_L1("Pending txid " << txid << " not in pool after " << tx_propagation_timeout.count() << + " seconds, marking as failed"); + tx_details.m_state = wallet2::unconfirmed_transfer_details::failed; + + // the inputs aren't spent anymore, since the tx failed + for (size_t vini = 0; vini < tx_details.m_tx.vin.size(); ++vini) + { + if (tx_details.m_tx.vin[vini].type() == typeid(txin_to_key)) + { + txin_to_key &tx_in_to_key = boost::get<txin_to_key>(tx_details.m_tx.vin[vini]); + for (size_t i = 0; i < m_transfers.size(); ++i) + { + const transfer_details &td = m_transfers[i]; + if (td.m_key_image == tx_in_to_key.k_image) + { + LOG_PRINT_L1("Resetting spent status for output " << vini << ": " << td.m_key_image); + set_unspent(i); + break; + } + } + } + } + } + } +} +//---------------------------------------------------------------------------------------------------- +// This public method is typically called to make sure that the wallet's pool state is up-to-date by +// clients like simplewallet and the RPC daemon. Before incremental update this was the same method +// that 'refresh' also used, but now it's more complicated because for the time being we support +// the "old" and the "new" way of updating the pool and because only the 'getblocks' call supports +// incremental update but we don't want any blocks here. +// +// simplewallet does NOT update the pool info during automatic refresh to avoid disturbing interactive +// messages and prompts. When it finally calls this method here "to catch up" so to say we can't use +// incremental update anymore, because with that we might miss some txs altogether. +void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed, bool try_incremental) +{ + bool updated = false; + if (m_pool_info_query_time != 0 && try_incremental) + { + // We are connected to a daemon that supports giving back pool data with the 'getblocks' call, + // thus use that, to get the chance to work incrementally and to keep working incrementally; + // 'POOL_ONLY' was created to support this case + cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::request req = AUTO_VAL_INIT(req); + cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response res = AUTO_VAL_INIT(res); + + req.requested_info = COMMAND_RPC_GET_BLOCKS_FAST::POOL_ONLY; + req.pool_info_since = m_pool_info_query_time; + + { + const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex}; + uint64_t pre_call_credits = m_rpc_payment_state.credits; + req.client = get_client_signature(); + bool r = net_utils::invoke_http_bin("/getblocks.bin", req, res, *m_http_client, rpc_timeout); + THROW_ON_RPC_RESPONSE_ERROR(r, {}, res, "getblocks.bin", error::get_blocks_error, get_rpc_status(res.status)); + uint64_t pool_info_cost = res.added_pool_txs.size() * COST_PER_TX + (res.remaining_added_pool_txids.size() + res.removed_pool_txids.size()) * COST_PER_POOL_HASH; + check_rpc_cost("/getblocks.bin", res.credits, pre_call_credits, pool_info_cost); + } + + m_pool_info_query_time = res.daemon_time; + if (res.pool_info_extent != COMMAND_RPC_GET_BLOCKS_FAST::NONE) + { + process_pool_info_extent(res, process_txs, refreshed); + updated = true; + } + // We SHOULD get pool data here, but if for some crazy reason we don't fall back to the "old" method + } + if (!updated) + { + update_pool_state_by_pool_query(process_txs, refreshed); + } +} +//---------------------------------------------------------------------------------------------------- +// This is the "old" way of updating the pool with separate queries to get the pool content, used before +// the 'getblocks' command was able to give back pool data in addition to blocks. Before this code was +// the public 'update_pool_state' method. The logic is unchanged. This is a candidate for elimination +// when it's sure that no more "old" daemons can be possibly around. +void wallet2::update_pool_state_by_pool_query(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed) +{ + MTRACE("update_pool_state_by_pool_query start"); + process_txs.clear(); auto keys_reencryptor = epee::misc_utils::create_scope_leave_handler([&, this]() { m_encrypt_keys_after_refresh.reset(); @@ -3078,16 +3355,15 @@ void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction, THROW_ON_RPC_RESPONSE_ERROR(r, {}, res, "get_transaction_pool_hashes.bin", error::get_tx_pool_error); check_rpc_cost("/get_transaction_pool_hashes.bin", res.credits, pre_call_credits, 1 + res.tx_hashes.size() * COST_PER_POOL_HASH); } - MTRACE("update_pool_state got pool"); + MTRACE("update_pool_state_by_pool_query got pool"); // remove any pending tx that's not in the pool - // TODO: set tx_propagation_timeout to CRYPTONOTE_DANDELIONPP_EMBARGO_AVERAGE * 3 / 2 after v15 hardfork - constexpr const std::chrono::seconds tx_propagation_timeout{500}; const auto now = std::chrono::system_clock::now(); std::unordered_map<crypto::hash, wallet2::unconfirmed_transfer_details>::iterator it = m_unconfirmed_txs.begin(); while (it != m_unconfirmed_txs.end()) { const crypto::hash &txid = it->first; + MDEBUG("Checking m_unconfirmed_txs entry " << txid); bool found = false; for (const auto &it2: res.tx_hashes) { @@ -3098,193 +3374,115 @@ void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction, } } auto pit = it++; - if (!found) - { - // we want to avoid a false positive when we ask for the pool just after - // a tx is removed from the pool due to being found in a new block, but - // just before the block is visible by refresh. So we keep a boolean, so - // that the first time we don't see the tx, we set that boolean, and only - // delete it the second time it is checked (but only when refreshed, so - // we're sure we've seen the blockchain state first) - if (pit->second.m_state == wallet2::unconfirmed_transfer_details::pending) - { - LOG_PRINT_L1("Pending txid " << txid << " not in pool, marking as not in pool"); - pit->second.m_state = wallet2::unconfirmed_transfer_details::pending_not_in_pool; - } - else if (pit->second.m_state == wallet2::unconfirmed_transfer_details::pending_not_in_pool && refreshed && - now > std::chrono::system_clock::from_time_t(pit->second.m_sent_time) + tx_propagation_timeout) - { - LOG_PRINT_L1("Pending txid " << txid << " not in pool after " << tx_propagation_timeout.count() << - " seconds, marking as failed"); - pit->second.m_state = wallet2::unconfirmed_transfer_details::failed; - - // the inputs aren't spent anymore, since the tx failed - for (size_t vini = 0; vini < pit->second.m_tx.vin.size(); ++vini) - { - if (pit->second.m_tx.vin[vini].type() == typeid(txin_to_key)) - { - txin_to_key &tx_in_to_key = boost::get<txin_to_key>(pit->second.m_tx.vin[vini]); - for (size_t i = 0; i < m_transfers.size(); ++i) - { - const transfer_details &td = m_transfers[i]; - if (td.m_key_image == tx_in_to_key.k_image) - { - LOG_PRINT_L1("Resetting spent status for output " << vini << ": " << td.m_key_image); - set_unspent(i); - break; - } - } - } - } - } - } + process_unconfirmed_transfer(false, txid, pit->second, found, now, refreshed); + MDEBUG("New state of that entry: " << pit->second.m_state); } - MTRACE("update_pool_state done first loop"); + MTRACE("update_pool_state_by_pool_query done first loop"); // remove pool txes to us that aren't in the pool anymore // but only if we just refreshed, so that the tx can go in // the in transfers list instead (or nowhere if it just // disappeared without being mined) if (refreshed) - remove_obsolete_pool_txs(res.tx_hashes); + remove_obsolete_pool_txs(res.tx_hashes, false); - MTRACE("update_pool_state done second loop"); + MTRACE("update_pool_state_by_pool_query done second loop"); // gather txids of new pool txes to us - std::vector<std::pair<crypto::hash, bool>> txids; + std::vector<crypto::hash> txids; for (const auto &txid: res.tx_hashes) { - bool txid_found_in_up = false; - for (const auto &up: m_unconfirmed_payments) + if (accept_pool_tx_for_processing(txid)) + txids.push_back(txid); + } + + m_node_rpc_proxy.get_transactions(txids, + [this, &txids, &process_txs](const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request &req_t, const cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response &resp_t, bool r) { - if (up.second.m_pd.m_tx_hash == txid) - { - txid_found_in_up = true; - break; - } + read_pool_txs(req_t, resp_t, r, txids, process_txs); + if (!r || resp_t.status != CORE_RPC_STATUS_OK) + LOG_PRINT_L0("Error calling gettransactions daemon RPC: r " << r << ", status " << get_rpc_status(resp_t.status)); } - if (m_scanned_pool_txs[0].find(txid) != m_scanned_pool_txs[0].end() || m_scanned_pool_txs[1].find(txid) != m_scanned_pool_txs[1].end()) + ); + + MTRACE("update_pool_state_by_pool_query end"); +} +//---------------------------------------------------------------------------------------------------- +// Update pool state from pool data we got together with block data, either incremental data with +// txs that are new in the pool since the last time we queried and the ids of txs that were +// removed from the pool since then, or the whole content of the pool if incremental was not +// possible, e.g. because the server was just started or restarted. +void wallet2::update_pool_state_from_pool_data(bool incremental, const std::vector<crypto::hash> &removed_pool_txids, const std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &added_pool_txs, std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed) +{ + MTRACE("update_pool_state_from_pool_data start"); + auto keys_reencryptor = epee::misc_utils::create_scope_leave_handler([&, this]() { + m_encrypt_keys_after_refresh.reset(); + }); + + if (refreshed) + { + if (incremental) { - // if it's for us, we want to keep track of whether we saw a double spend, so don't bail out - if (!txid_found_in_up) - { - LOG_PRINT_L2("Already seen " << txid << ", and not for us, skipped"); - continue; - } + // Delete from the list of unconfirmed payments what the daemon reported as tx that was removed from + // pool; do so only after refresh to not delete too early and too eagerly; maybe we will find the tx + // later in a block, or not, or find it again in the pool txs because it was first removed but then + // somehow quickly "resurrected" - that all does not matter here, we retrace the removal + remove_obsolete_pool_txs(removed_pool_txids, true); } - if (!txid_found_in_up) + else { - LOG_PRINT_L1("Found new pool tx: " << txid); - bool found = false; - for (const auto &i: m_unconfirmed_txs) + // Delete from the list of unconfirmed payments what we don't find anymore in the pool; a bit + // unfortunate that we have to build a new vector with ids first, but better than copying and + // modifying the code of 'remove_obsolete_pool_txs' here + std::vector<crypto::hash> txids; + txids.reserve(added_pool_txs.size()); + for (const auto &pool_tx: added_pool_txs) { - if (i.first == txid) - { - found = true; - // if this is a payment to yourself at a different subaddress account, don't skip it - // so that you can see the incoming pool tx with 'show_transfers' on that receiving subaddress account - const unconfirmed_transfer_details& utd = i.second; - for (const auto& dst : utd.m_dests) - { - auto subaddr_index = m_subaddresses.find(dst.addr.m_spend_public_key); - if (subaddr_index != m_subaddresses.end() && subaddr_index->second.major != utd.m_subaddr_account) - { - found = false; - break; - } - } - break; - } - } - if (!found) - { - // not one of those we sent ourselves - txids.push_back({txid, false}); - } - else - { - LOG_PRINT_L1("We sent that one"); + txids.push_back(std::get<1>(pool_tx)); } + remove_obsolete_pool_txs(txids, false); } } - // get_transaction_pool_hashes.bin may return more transactions than we're allowed to request in restricted mode - const size_t SLICE_SIZE = 100; // RESTRICTED_TRANSACTIONS_COUNT as defined in rpc/core_rpc_server.cpp - for (size_t offset = 0; offset < txids.size(); offset += SLICE_SIZE) + // Possibly remove any pending tx that's not in the pool + const auto now = std::chrono::system_clock::now(); + std::unordered_map<crypto::hash, wallet2::unconfirmed_transfer_details>::iterator it = m_unconfirmed_txs.begin(); + while (it != m_unconfirmed_txs.end()) { - cryptonote::COMMAND_RPC_GET_TRANSACTIONS::request req; - cryptonote::COMMAND_RPC_GET_TRANSACTIONS::response res; - - const size_t n_txids = std::min<size_t>(SLICE_SIZE, txids.size() - offset); - for (size_t n = offset; n < (offset + n_txids); ++n) { - req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txids.at(n).first)); - } - MDEBUG("asking for " << req.txs_hashes.size() << " transactions"); - req.decode_as_json = false; - req.prune = true; - - bool r; - { - const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex}; - uint64_t pre_call_credits = m_rpc_payment_state.credits; - req.client = get_client_signature(); - r = epee::net_utils::invoke_http_json("/gettransactions", req, res, *m_http_client, rpc_timeout); - if (r && res.status == CORE_RPC_STATUS_OK) - check_rpc_cost("/gettransactions", res.credits, pre_call_credits, res.txs.size() * COST_PER_TX); - } - - MDEBUG("Got " << r << " and " << res.status); - if (r && res.status == CORE_RPC_STATUS_OK) + const crypto::hash &txid = it->first; + MDEBUG("Checking m_unconfirmed_txs entry " << txid); + bool found = false; + for (const auto &pool_tx: added_pool_txs) { - if (res.txs.size() == req.txs_hashes.size()) + if (std::get<1>(pool_tx) == txid) { - for (const auto &tx_entry: res.txs) - { - if (tx_entry.in_pool) - { - cryptonote::transaction tx; - cryptonote::blobdata bd; - crypto::hash tx_hash; - - if (get_pruned_tx(tx_entry, tx, tx_hash)) - { - const std::vector<std::pair<crypto::hash, bool>>::const_iterator i = std::find_if(txids.begin(), txids.end(), - [tx_hash](const std::pair<crypto::hash, bool> &e) { return e.first == tx_hash; }); - if (i != txids.end()) - { - process_txs.push_back(std::make_tuple(tx, tx_hash, tx_entry.double_spend_seen)); - } - else - { - MERROR("Got txid " << tx_hash << " which we did not ask for"); - } - } - else - { - LOG_PRINT_L0("Failed to parse transaction from daemon"); - } - } - else - { - LOG_PRINT_L1("Transaction from daemon was in pool, but is no more"); - } - } - } - else - { - LOG_PRINT_L0("Expected " << n_txids << " out of " << txids.size() << " tx(es), got " << res.txs.size()); + found = true; + break; } } - else + auto pit = it++; + process_unconfirmed_transfer(incremental, txid, pit->second, found, now, refreshed); + MDEBUG("Resulting state of that entry: " << pit->second.m_state); + } + + // Collect all pool txs that are "interesting" i.e. mostly those that we don't know about yet; + // if we work incrementally and thus see only new pool txs since last time we asked it should + // be rare that we know already about one of those, but check nevertheless + process_txs.clear(); + for (const auto &pool_tx: added_pool_txs) + { + if (accept_pool_tx_for_processing(std::get<1>(pool_tx))) { - LOG_PRINT_L0("Error calling gettransactions daemon RPC: r " << r << ", status " << get_rpc_status(res.status)); + process_txs.push_back(pool_tx); } } - MTRACE("update_pool_state end"); + + MTRACE("update_pool_state_from_pool_data end"); } //---------------------------------------------------------------------------------------------------- void wallet2::process_pool_state(const std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &txs) { + MTRACE("process_pool_state start"); const time_t now = time(NULL); for (const auto &e: txs) { @@ -3299,6 +3497,7 @@ void wallet2::process_pool_state(const std::vector<std::tuple<cryptonote::transa m_scanned_pool_txs[0].clear(); } } + MTRACE("process_pool_state end"); } //---------------------------------------------------------------------------------------------------- void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, bool force) @@ -3419,7 +3618,7 @@ std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>, size_t>> wallet2::create return cache; } //---------------------------------------------------------------------------------------------------- -void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool, uint64_t max_blocks) +void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool, bool try_incremental, uint64_t max_blocks) { if (m_offline) { @@ -3507,12 +3706,15 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo auto scope_exit_handler_hwdev = epee::misc_utils::create_scope_leave_handler([&](){hwdev.computing_key_images(false);}); + m_process_pool_txs.clear(); + // Getting and processing the pool state has moved down into method 'pull_blocks' to + // allow for "conventional" as well as "incremental" update. However the following + // principle of getting all info first (pool AND blocks) and only process txs afterwards + // still holds and is still respected: // get updated pool state first, but do not process those txes just yet, // since that might cause a password prompt, which would introduce a data // leak allowing a passive adversary with traffic analysis capability to // infer when we get an incoming output - std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> process_pool_txs; - update_pool_state(process_pool_txs, true); bool first = true, last = false; while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks) @@ -3533,11 +3735,10 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo if (!first && blocks.empty()) { m_node_rpc_proxy.set_height(m_blockchain.size()); - refreshed = true; break; } if (!last) - tpool.submit(&waiter, [&]{pull_and_parse_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, parsed_blocks, next_blocks, next_parsed_blocks, last, error, exception);}); + tpool.submit(&waiter, [&]{pull_and_parse_next_blocks(first, try_incremental, start_height, next_blocks_start_height, short_chain_history, blocks, parsed_blocks, next_blocks, next_parsed_blocks, last, error, exception);}); if (!first) { @@ -3591,7 +3792,6 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo if(!first && blocks_start_height == next_blocks_start_height) { m_node_rpc_proxy.set_height(m_blockchain.size()); - refreshed = true; break; } @@ -3657,8 +3857,8 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo try { // If stop() is called we don't need to check pending transactions - if (check_pool && m_run.load(std::memory_order_relaxed) && !process_pool_txs.empty()) - process_pool_state(process_pool_txs); + if (check_pool && m_run.load(std::memory_order_relaxed) && !m_process_pool_txs.empty()) + process_pool_state(m_process_pool_txs); } catch (...) { @@ -3780,7 +3980,7 @@ void wallet2::detach_blockchain(uint64_t height, std::map<std::pair<uint64_t, ui transfers_detached = std::distance(it, m_transfers.end()); m_transfers.erase(it, m_transfers.end()); - size_t blocks_detached = m_blockchain.size() - height; + const uint64_t blocks_detached = m_blockchain.size() - height; m_blockchain.crop(height); for (auto it = m_payments.begin(); it != m_payments.end(); ) @@ -3799,6 +3999,9 @@ void wallet2::detach_blockchain(uint64_t height, std::map<std::pair<uint64_t, ui ++it; } + if (m_callback) + m_callback->on_reorg(height, blocks_detached, transfers_detached); + LOG_PRINT_L0("Detached blockchain on height " << height << ", transfers detached " << transfers_detached << ", blocks detached " << blocks_detached); } //---------------------------------------------------------------------------------------------------- @@ -3831,6 +4034,7 @@ bool wallet2::clear() m_subaddress_labels.clear(); m_multisig_rounds_passed = 0; m_device_last_key_image_sync = 0; + m_pool_info_query_time = 0; return true; } //---------------------------------------------------------------------------------------------------- @@ -3847,6 +4051,7 @@ void wallet2::clear_soft(bool keep_key_images) m_unconfirmed_payments.clear(); m_scanned_pool_txs[0].clear(); m_scanned_pool_txs[1].clear(); + m_pool_info_query_time = 0; cryptonote::block b; generate_genesis(b); @@ -8413,7 +8618,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>> else { // the base offset of the first rct output in the first unlocked block (or the one to be if there's none) - num_outs = rct_offsets[rct_offsets.size() - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE]; + num_outs = gamma->get_num_rct_outs(); LOG_PRINT_L1("" << num_outs << " unlocked rct outputs"); THROW_WALLET_EXCEPTION_IF(num_outs == 0, error::wallet_internal_error, "histogram reports no unlocked rct outputs, not even ours"); @@ -8697,7 +8902,7 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>> } bool use_histogram = amount != 0; if (!use_histogram) - num_outs = rct_offsets[rct_offsets.size() - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE]; + num_outs = gamma->get_num_rct_outs(); // make sure the real outputs we asked for are really included, along // with the correct key and mask: this guards against an active attack @@ -9850,7 +10055,7 @@ void wallet2::light_wallet_get_address_txs() } } // TODO: purge old unconfirmed_txs - remove_obsolete_pool_txs(pool_txs); + remove_obsolete_pool_txs(pool_txs, false); // Calculate wallet balance m_light_wallet_balance = ires.total_received-wallet_total_sent; diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 3ee40a5f0..142c8edea 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -101,6 +101,7 @@ namespace tools uint64_t pick(); gamma_picker(const std::vector<uint64_t> &rct_offsets); gamma_picker(const std::vector<uint64_t> &rct_offsets, double shape, double scale); + uint64_t get_num_rct_outs() const { return num_rct_outputs; } private: struct gamma_engine @@ -138,6 +139,7 @@ private: public: // Full wallet callbacks virtual void on_new_block(uint64_t height, const cryptonote::block& block) {} + virtual void on_reorg(uint64_t height, uint64_t blocks_detached, size_t transfers_detached) {} virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, uint64_t burnt, const cryptonote::subaddress_index& subaddr_index, bool is_change, uint64_t unlock_time) {} virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, const cryptonote::subaddress_index& subaddr_index) {} virtual void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& in_tx, uint64_t amount, const cryptonote::transaction& spend_tx, const cryptonote::subaddress_index& subaddr_index) {} @@ -475,7 +477,7 @@ private: time_t m_sent_time; std::vector<cryptonote::tx_destination_entry> m_dests; crypto::hash m_payment_id; - enum { pending, pending_not_in_pool, failed } m_state; + enum { pending, pending_in_pool, failed } m_state; uint64_t m_timestamp; uint32_t m_subaddr_account; // subaddress account of your wallet to be used in this transfer std::set<uint32_t> m_subaddr_indices; // set of address indices used as inputs in this transfer @@ -1023,7 +1025,7 @@ private: bool is_deprecated() const; void refresh(bool trusted_daemon); void refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched); - void refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool = true, uint64_t max_blocks = std::numeric_limits<uint64_t>::max()); + void refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool = true, bool try_incremental = true, uint64_t max_blocks = std::numeric_limits<uint64_t>::max()); bool refresh(bool trusted_daemon, uint64_t & blocks_fetched, bool& received_money, bool& ok); void set_refresh_type(RefreshType refresh_type) { m_refresh_type = refresh_type; } @@ -1506,9 +1508,9 @@ private: bool import_key_images(signed_tx_set & signed_tx, size_t offset=0, bool only_selected_transfers=false); crypto::public_key get_tx_pub_key_from_received_outs(const tools::wallet2::transfer_details &td) const; - void update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed = false); + void update_pool_state(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed = false, bool try_incremental = false); void process_pool_state(const std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &txs); - void remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashes); + void remove_obsolete_pool_txs(const std::vector<crypto::hash> &tx_hashes, bool remove_if_found); std::string encrypt(const char *plaintext, size_t len, const crypto::secret_key &skey, bool authenticated = true) const; std::string encrypt(const epee::span<char> &span, const crypto::secret_key &skey, bool authenticated = true) const; @@ -1706,11 +1708,16 @@ private: void get_short_chain_history(std::list<crypto::hash>& ids, uint64_t granularity = 1) const; bool clear(); void clear_soft(bool keep_key_images=false); - void pull_blocks(uint64_t start_height, uint64_t& blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices, uint64_t ¤t_height); + void pull_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t& blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::block_output_indices> &o_indices, uint64_t ¤t_height); void pull_hashes(uint64_t start_height, uint64_t& blocks_start_height, const std::list<crypto::hash> &short_chain_history, std::vector<crypto::hash> &hashes); void fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, bool force = false); - void pull_and_parse_next_blocks(uint64_t start_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, const std::vector<cryptonote::block_complete_entry> &prev_blocks, const std::vector<parsed_block> &prev_parsed_blocks, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<parsed_block> &parsed_blocks, bool &last, bool &error, std::exception_ptr &exception); + void pull_and_parse_next_blocks(bool first, bool try_incremental, uint64_t start_height, uint64_t &blocks_start_height, std::list<crypto::hash> &short_chain_history, const std::vector<cryptonote::block_complete_entry> &prev_blocks, const std::vector<parsed_block> &prev_parsed_blocks, std::vector<cryptonote::block_complete_entry> &blocks, std::vector<parsed_block> &parsed_blocks, bool &last, bool &error, std::exception_ptr &exception); void process_parsed_blocks(uint64_t start_height, const std::vector<cryptonote::block_complete_entry> &blocks, const std::vector<parsed_block> &parsed_blocks, uint64_t& blocks_added, std::map<std::pair<uint64_t, uint64_t>, size_t> *output_tracker_cache = NULL); + bool accept_pool_tx_for_processing(const crypto::hash &txid); + void process_unconfirmed_transfer(bool incremental, const crypto::hash &txid, wallet2::unconfirmed_transfer_details &tx_details, bool seen_in_pool, std::chrono::system_clock::time_point now, bool refreshed); + void process_pool_info_extent(const cryptonote::COMMAND_RPC_GET_BLOCKS_FAST::response &res, std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed); + void update_pool_state_by_pool_query(std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed = false); + void update_pool_state_from_pool_data(bool incremental, const std::vector<crypto::hash> &removed_pool_txids, const std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &added_pool_txs, std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> &process_txs, bool refreshed); uint64_t select_transfers(uint64_t needed_money, std::vector<size_t> unused_transfers_indices, std::vector<size_t>& selected_transfers) const; bool prepare_file_names(const std::string& file_path); void process_unconfirmed(const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t height); @@ -1845,6 +1852,8 @@ private: // If m_refresh_from_block_height is explicitly set to zero we need this to differentiate it from the case that // m_refresh_from_block_height was defaulted to zero.*/ bool m_explicit_refresh_from_block_height; + uint64_t m_pool_info_query_time; + std::vector<std::tuple<cryptonote::transaction, crypto::hash, bool>> m_process_pool_txs; bool m_confirm_non_default_ring_size; AskPasswordType m_ask_password; uint64_t m_max_reorg_depth; diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp index ce13fc573..c1f47d6a9 100644 --- a/src/wallet/wallet_args.cpp +++ b/src/wallet/wallet_args.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_args.h b/src/wallet/wallet_args.h index 350fce24e..2e687521f 100644 --- a/src/wallet/wallet_args.h +++ b/src/wallet/wallet_args.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 0b8512163..fb43d16b4 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_light_rpc.h b/src/wallet/wallet_light_rpc.h index 743a147f6..bae3a05f7 100644 --- a/src/wallet/wallet_light_rpc.h +++ b/src/wallet/wallet_light_rpc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_rpc_helpers.h b/src/wallet/wallet_rpc_helpers.h index 93fa6996a..e974e0a9e 100644 --- a/src/wallet/wallet_rpc_helpers.h +++ b/src/wallet/wallet_rpc_helpers.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_rpc_payments.cpp b/src/wallet/wallet_rpc_payments.cpp index 06910ebbb..3242d88b8 100644 --- a/src/wallet/wallet_rpc_payments.cpp +++ b/src/wallet/wallet_rpc_payments.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index cecf24289..d11e9bc1a 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // @@ -154,7 +154,7 @@ namespace tools uint64_t blocks_fetched = 0; try { bool received_money = false; - if (m_wallet) m_wallet->refresh(m_wallet->is_trusted_daemon(), 0, blocks_fetched, received_money, true, REFRESH_INFICATIVE_BLOCK_CHUNK_SIZE); + if (m_wallet) m_wallet->refresh(m_wallet->is_trusted_daemon(), 0, blocks_fetched, received_money, true, true, REFRESH_INFICATIVE_BLOCK_CHUNK_SIZE); } catch (const std::exception& ex) { LOG_ERROR("Exception at while refreshing, what=" << ex.what()); } @@ -583,9 +583,9 @@ namespace tools if (!m_wallet) return not_open(er); try { - if (req.count < 1 || req.count > 64) { + if (req.count < 1 || req.count > 65536) { er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR; - er.message = "Count must be between 1 and 64."; + er.message = "Count must be between 1 and 65536."; return false; } diff --git a/src/wallet/wallet_rpc_server.h b/src/wallet/wallet_rpc_server.h index 3088fd9c2..282035052 100644 --- a/src/wallet/wallet_rpc_server.h +++ b/src/wallet/wallet_rpc_server.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h index 60df6296f..72719e982 100644 --- a/src/wallet/wallet_rpc_server_commands_defs.h +++ b/src/wallet/wallet_rpc_server_commands_defs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/src/wallet/wallet_rpc_server_error_codes.h b/src/wallet/wallet_rpc_server_error_codes.h index 734229380..8e3bdf650 100644 --- a/src/wallet/wallet_rpc_server_error_codes.h +++ b/src/wallet/wallet_rpc_server_error_codes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2cabb1ba5..f14f7ff5a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/benchmark.cpp b/tests/benchmark.cpp index 6a845d61a..6843ad0d7 100644 --- a/tests/benchmark.cpp +++ b/tests/benchmark.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/tests/block_weight/CMakeLists.txt b/tests/block_weight/CMakeLists.txt index d36de3e9a..6d88fb754 100644 --- a/tests/block_weight/CMakeLists.txt +++ b/tests/block_weight/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/block_weight/block_weight.cpp b/tests/block_weight/block_weight.cpp index b478a5633..7cd0d572b 100644 --- a/tests/block_weight/block_weight.cpp +++ b/tests/block_weight/block_weight.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/block_weight/block_weight.py b/tests/block_weight/block_weight.py index 16154bab9..5ec09896d 100755 --- a/tests/block_weight/block_weight.py +++ b/tests/block_weight/block_weight.py @@ -2,7 +2,7 @@ # Simulate a maximal block attack on the Monero network # This uses the scheme proposed by ArticMine # Written by Sarang Nother -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project from __future__ import print_function import sys import math diff --git a/tests/core_proxy/CMakeLists.txt b/tests/core_proxy/CMakeLists.txt index a18a46c8d..e0ee5d7f5 100644 --- a/tests/core_proxy/CMakeLists.txt +++ b/tests/core_proxy/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/core_proxy/core_proxy.cpp b/tests/core_proxy/core_proxy.cpp index c029bc235..fa5de5b3a 100644 --- a/tests/core_proxy/core_proxy.cpp +++ b/tests/core_proxy/core_proxy.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_proxy/core_proxy.h b/tests/core_proxy/core_proxy.h index 6d0597ad9..f1f9bdb66 100644 --- a/tests/core_proxy/core_proxy.h +++ b/tests/core_proxy/core_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/CMakeLists.txt b/tests/core_tests/CMakeLists.txt index d098a8e04..debe0fa4f 100644 --- a/tests/core_tests/CMakeLists.txt +++ b/tests/core_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/core_tests/block_reward.cpp b/tests/core_tests/block_reward.cpp index b1175e297..bd2fc2a9b 100644 --- a/tests/core_tests/block_reward.cpp +++ b/tests/core_tests/block_reward.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/block_reward.h b/tests/core_tests/block_reward.h index 77d0bd5f9..fa8751bf2 100644 --- a/tests/core_tests/block_reward.h +++ b/tests/core_tests/block_reward.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/block_validation.cpp b/tests/core_tests/block_validation.cpp index 711f67b41..37f19d94b 100644 --- a/tests/core_tests/block_validation.cpp +++ b/tests/core_tests/block_validation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/block_validation.h b/tests/core_tests/block_validation.h index 3a157aaa9..a7a901279 100644 --- a/tests/core_tests/block_validation.h +++ b/tests/core_tests/block_validation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/bulletproof_plus.cpp b/tests/core_tests/bulletproof_plus.cpp index f758ac0fb..ece03dd77 100644 --- a/tests/core_tests/bulletproof_plus.cpp +++ b/tests/core_tests/bulletproof_plus.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/bulletproof_plus.h b/tests/core_tests/bulletproof_plus.h index a90a1b2cb..f23732554 100644 --- a/tests/core_tests/bulletproof_plus.h +++ b/tests/core_tests/bulletproof_plus.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/bulletproofs.cpp b/tests/core_tests/bulletproofs.cpp index 2f0f33cd6..f875edf74 100644 --- a/tests/core_tests/bulletproofs.cpp +++ b/tests/core_tests/bulletproofs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/bulletproofs.h b/tests/core_tests/bulletproofs.h index 56c83f522..4fc8b60de 100644 --- a/tests/core_tests/bulletproofs.h +++ b/tests/core_tests/bulletproofs.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chain_split_1.cpp b/tests/core_tests/chain_split_1.cpp index db3eca591..8f49b1af8 100644 --- a/tests/core_tests/chain_split_1.cpp +++ b/tests/core_tests/chain_split_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chain_split_1.h b/tests/core_tests/chain_split_1.h index 10d9eb78f..dbf1178a8 100644 --- a/tests/core_tests/chain_split_1.h +++ b/tests/core_tests/chain_split_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chain_switch_1.cpp b/tests/core_tests/chain_switch_1.cpp index 5765b7d1f..8271ab783 100644 --- a/tests/core_tests/chain_switch_1.cpp +++ b/tests/core_tests/chain_switch_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chain_switch_1.h b/tests/core_tests/chain_switch_1.h index 9a50d10cf..ebae72b7f 100644 --- a/tests/core_tests/chain_switch_1.h +++ b/tests/core_tests/chain_switch_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp index 9bcae19d0..9f6fe5387 100644 --- a/tests/core_tests/chaingen.cpp +++ b/tests/core_tests/chaingen.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen.h b/tests/core_tests/chaingen.h index 1f782831f..31580502d 100644 --- a/tests/core_tests/chaingen.h +++ b/tests/core_tests/chaingen.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen001.cpp b/tests/core_tests/chaingen001.cpp index 43d2f5501..8738585e0 100644 --- a/tests/core_tests/chaingen001.cpp +++ b/tests/core_tests/chaingen001.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp index b89dff445..dfcdfd8bd 100644 --- a/tests/core_tests/chaingen_main.cpp +++ b/tests/core_tests/chaingen_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen_serialization.h b/tests/core_tests/chaingen_serialization.h index 4a903107f..7eac3987f 100644 --- a/tests/core_tests/chaingen_serialization.h +++ b/tests/core_tests/chaingen_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/chaingen_tests_list.h b/tests/core_tests/chaingen_tests_list.h index 13fc52632..db05f684f 100644 --- a/tests/core_tests/chaingen_tests_list.h +++ b/tests/core_tests/chaingen_tests_list.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/double_spend.cpp b/tests/core_tests/double_spend.cpp index 4750f82e3..4bc854ae6 100644 --- a/tests/core_tests/double_spend.cpp +++ b/tests/core_tests/double_spend.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/double_spend.h b/tests/core_tests/double_spend.h index 6dccd6a0c..b1f071f38 100644 --- a/tests/core_tests/double_spend.h +++ b/tests/core_tests/double_spend.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/double_spend.inl b/tests/core_tests/double_spend.inl index 59460e674..4b60da3a3 100644 --- a/tests/core_tests/double_spend.inl +++ b/tests/core_tests/double_spend.inl @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/integer_overflow.cpp b/tests/core_tests/integer_overflow.cpp index 31853ca24..42ad0d26a 100644 --- a/tests/core_tests/integer_overflow.cpp +++ b/tests/core_tests/integer_overflow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/integer_overflow.h b/tests/core_tests/integer_overflow.h index 2c8ac9251..16af6ef06 100644 --- a/tests/core_tests/integer_overflow.h +++ b/tests/core_tests/integer_overflow.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/multisig.cpp b/tests/core_tests/multisig.cpp index 28b44d293..ed6fd68b5 100644 --- a/tests/core_tests/multisig.cpp +++ b/tests/core_tests/multisig.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/multisig.h b/tests/core_tests/multisig.h index 948c19458..f46558655 100644 --- a/tests/core_tests/multisig.h +++ b/tests/core_tests/multisig.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/rct.cpp b/tests/core_tests/rct.cpp index 4e51ed713..3f2cfbea3 100644 --- a/tests/core_tests/rct.cpp +++ b/tests/core_tests/rct.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/rct.h b/tests/core_tests/rct.h index c20e8a580..eea2740ca 100644 --- a/tests/core_tests/rct.h +++ b/tests/core_tests/rct.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/rct2.cpp b/tests/core_tests/rct2.cpp index d98cbd453..c8e0f6260 100644 --- a/tests/core_tests/rct2.cpp +++ b/tests/core_tests/rct2.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/rct2.h b/tests/core_tests/rct2.h index c85bd44a2..7fc7ad49b 100644 --- a/tests/core_tests/rct2.h +++ b/tests/core_tests/rct2.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/ring_signature_1.cpp b/tests/core_tests/ring_signature_1.cpp index e6a76179e..f3f8109c3 100644 --- a/tests/core_tests/ring_signature_1.cpp +++ b/tests/core_tests/ring_signature_1.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/ring_signature_1.h b/tests/core_tests/ring_signature_1.h index 47592732f..03120b95f 100644 --- a/tests/core_tests/ring_signature_1.h +++ b/tests/core_tests/ring_signature_1.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/transaction_tests.cpp b/tests/core_tests/transaction_tests.cpp index 0f8df5030..b5ecba9ae 100644 --- a/tests/core_tests/transaction_tests.cpp +++ b/tests/core_tests/transaction_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/transaction_tests.h b/tests/core_tests/transaction_tests.h index 15cb5df7b..1450e3b6f 100644 --- a/tests/core_tests/transaction_tests.h +++ b/tests/core_tests/transaction_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/tx_pool.cpp b/tests/core_tests/tx_pool.cpp index fab40a972..d3dc5d9bb 100644 --- a/tests/core_tests/tx_pool.cpp +++ b/tests/core_tests/tx_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/tx_pool.h b/tests/core_tests/tx_pool.h index 5155454f8..ebf728422 100644 --- a/tests/core_tests/tx_pool.h +++ b/tests/core_tests/tx_pool.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/tx_validation.cpp b/tests/core_tests/tx_validation.cpp index b2b742b93..cfc8f089d 100644 --- a/tests/core_tests/tx_validation.cpp +++ b/tests/core_tests/tx_validation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/tx_validation.h b/tests/core_tests/tx_validation.h index 929d61f66..5c06bcd16 100644 --- a/tests/core_tests/tx_validation.h +++ b/tests/core_tests/tx_validation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/v2_tests.cpp b/tests/core_tests/v2_tests.cpp index 68db46f51..f2d0121b6 100644 --- a/tests/core_tests/v2_tests.cpp +++ b/tests/core_tests/v2_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/v2_tests.h b/tests/core_tests/v2_tests.h index b812e32e2..a71b5b300 100644 --- a/tests/core_tests/v2_tests.h +++ b/tests/core_tests/v2_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/core_tests/wallet_tools.h b/tests/core_tests/wallet_tools.h index 20cd2c4d9..1fb8017bf 100644 --- a/tests/core_tests/wallet_tools.h +++ b/tests/core_tests/wallet_tools.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/CMakeLists.txt b/tests/crypto/CMakeLists.txt index f364ada84..df0f871f2 100644 --- a/tests/crypto/CMakeLists.txt +++ b/tests/crypto/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/crypto/cnv4-jit.c b/tests/crypto/cnv4-jit.c index 23f3c3cb1..f1cb35a79 100644 --- a/tests/crypto/cnv4-jit.c +++ b/tests/crypto/cnv4-jit.c @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/crypto-ops-data.c b/tests/crypto/crypto-ops-data.c index eeb3a3253..c1ebbb1f0 100644 --- a/tests/crypto/crypto-ops-data.c +++ b/tests/crypto/crypto-ops-data.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/crypto-ops.c b/tests/crypto/crypto-ops.c index 0203484de..fcb38200d 100644 --- a/tests/crypto/crypto-ops.c +++ b/tests/crypto/crypto-ops.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/crypto-tests.h b/tests/crypto/crypto-tests.h index 661ba5854..f0b2a8eaa 100644 --- a/tests/crypto/crypto-tests.h +++ b/tests/crypto/crypto-tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/crypto.cpp b/tests/crypto/crypto.cpp index b6ddf9f01..68f8259e2 100644 --- a/tests/crypto/crypto.cpp +++ b/tests/crypto/crypto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/hash.c b/tests/crypto/hash.c index fc2c1594d..fc69c3a71 100644 --- a/tests/crypto/hash.c +++ b/tests/crypto/hash.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/main.cpp b/tests/crypto/main.cpp index 045ffc08d..6f8aba597 100644 --- a/tests/crypto/main.cpp +++ b/tests/crypto/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/crypto/random.c b/tests/crypto/random.c index 09268a029..d575b95a0 100644 --- a/tests/crypto/random.c +++ b/tests/crypto/random.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/cryptolib.pl b/tests/cryptolib.pl index 4fa08263c..dce58482d 100644 --- a/tests/cryptolib.pl +++ b/tests/cryptolib.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/cryptotest.pl b/tests/cryptotest.pl index 19376a4e5..67ccc1d79 100644 --- a/tests/cryptotest.pl +++ b/tests/cryptotest.pl @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/daemon_tests/CMakeLists.txt b/tests/daemon_tests/CMakeLists.txt index 3e8caa22a..182231132 100644 --- a/tests/daemon_tests/CMakeLists.txt +++ b/tests/daemon_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/daemon_tests/transfers.cpp b/tests/daemon_tests/transfers.cpp index 3baa99ec6..2980c93ed 100644 --- a/tests/daemon_tests/transfers.cpp +++ b/tests/daemon_tests/transfers.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/data/txs/bpp_tx_e89415.bin b/tests/data/txs/bpp_tx_e89415.bin Binary files differnew file mode 100644 index 000000000..38f596397 --- /dev/null +++ b/tests/data/txs/bpp_tx_e89415.bin diff --git a/tests/difficulty/CMakeLists.txt b/tests/difficulty/CMakeLists.txt index db35f87ce..109ed1d43 100644 --- a/tests/difficulty/CMakeLists.txt +++ b/tests/difficulty/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/difficulty/difficulty.cpp b/tests/difficulty/difficulty.cpp index 09b6371ed..9cecadca8 100644 --- a/tests/difficulty/difficulty.cpp +++ b/tests/difficulty/difficulty.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/difficulty/generate-data b/tests/difficulty/generate-data index a566905fc..cfec61a88 100755 --- a/tests/difficulty/generate-data +++ b/tests/difficulty/generate-data @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/CMakeLists.txt b/tests/functional_tests/CMakeLists.txt index f7747b515..0daf71b59 100644 --- a/tests/functional_tests/CMakeLists.txt +++ b/tests/functional_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/address_book.py b/tests/functional_tests/address_book.py index 396ce505e..d614fb24c 100755 --- a/tests/functional_tests/address_book.py +++ b/tests/functional_tests/address_book.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 #encoding=utf-8 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/bans.py b/tests/functional_tests/bans.py index 96d4c0aeb..71299b681 100755 --- a/tests/functional_tests/bans.py +++ b/tests/functional_tests/bans.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/blockchain.py b/tests/functional_tests/blockchain.py index 328c225ff..65378da4b 100755 --- a/tests/functional_tests/blockchain.py +++ b/tests/functional_tests/blockchain.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/cold_signing.py b/tests/functional_tests/cold_signing.py index bd48671a2..be5710f1d 100755 --- a/tests/functional_tests/cold_signing.py +++ b/tests/functional_tests/cold_signing.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/cpu_power_test.cpp b/tests/functional_tests/cpu_power_test.cpp index 372bd891b..0ae48c527 100644 --- a/tests/functional_tests/cpu_power_test.cpp +++ b/tests/functional_tests/cpu_power_test.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/daemon_info.py b/tests/functional_tests/daemon_info.py index 116e6b73d..901375bc8 100755 --- a/tests/functional_tests/daemon_info.py +++ b/tests/functional_tests/daemon_info.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/get_output_distribution.py b/tests/functional_tests/get_output_distribution.py index 43c7b4a74..08019121a 100755 --- a/tests/functional_tests/get_output_distribution.py +++ b/tests/functional_tests/get_output_distribution.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/integrated_address.py b/tests/functional_tests/integrated_address.py index d4b7cd2ff..d2e81622f 100755 --- a/tests/functional_tests/integrated_address.py +++ b/tests/functional_tests/integrated_address.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/main.cpp b/tests/functional_tests/main.cpp index 41c55e4d4..f19fa2c44 100644 --- a/tests/functional_tests/main.cpp +++ b/tests/functional_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/make_test_signature.cc b/tests/functional_tests/make_test_signature.cc index e9dab8bd4..cba989070 100644 --- a/tests/functional_tests/make_test_signature.cc +++ b/tests/functional_tests/make_test_signature.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/mining.py b/tests/functional_tests/mining.py index a315ae97f..e98037811 100755 --- a/tests/functional_tests/mining.py +++ b/tests/functional_tests/mining.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/multisig.py b/tests/functional_tests/multisig.py index 1c5894f47..c6db82d4f 100755 --- a/tests/functional_tests/multisig.py +++ b/tests/functional_tests/multisig.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/p2p.py b/tests/functional_tests/p2p.py index ec2206aa8..2c582cc8a 100755 --- a/tests/functional_tests/p2p.py +++ b/tests/functional_tests/p2p.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/proofs.py b/tests/functional_tests/proofs.py index fe734d697..23cb858be 100755 --- a/tests/functional_tests/proofs.py +++ b/tests/functional_tests/proofs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/rpc_payment.py b/tests/functional_tests/rpc_payment.py index ab478436c..bfd20bc1a 100755 --- a/tests/functional_tests/rpc_payment.py +++ b/tests/functional_tests/rpc_payment.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/sign_message.py b/tests/functional_tests/sign_message.py index ea342aa7c..1bfb6f666 100755 --- a/tests/functional_tests/sign_message.py +++ b/tests/functional_tests/sign_message.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/speed.py b/tests/functional_tests/speed.py index 5b942bb06..cc971d83d 100755 --- a/tests/functional_tests/speed.py +++ b/tests/functional_tests/speed.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/transactions_flow_test.cpp b/tests/functional_tests/transactions_flow_test.cpp index 41cf1bea5..8c4b27d24 100644 --- a/tests/functional_tests/transactions_flow_test.cpp +++ b/tests/functional_tests/transactions_flow_test.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/transactions_flow_test.h b/tests/functional_tests/transactions_flow_test.h index 33a513bd2..568ce4d86 100644 --- a/tests/functional_tests/transactions_flow_test.h +++ b/tests/functional_tests/transactions_flow_test.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/transactions_generation_from_blockchain.cpp b/tests/functional_tests/transactions_generation_from_blockchain.cpp index fa4c19982..9e33330a6 100644 --- a/tests/functional_tests/transactions_generation_from_blockchain.cpp +++ b/tests/functional_tests/transactions_generation_from_blockchain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/transactions_generation_from_blockchain.h b/tests/functional_tests/transactions_generation_from_blockchain.h index 2fe14f4ef..4758bd066 100644 --- a/tests/functional_tests/transactions_generation_from_blockchain.h +++ b/tests/functional_tests/transactions_generation_from_blockchain.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py index dd15369d3..cb91c25a3 100755 --- a/tests/functional_tests/transfer.py +++ b/tests/functional_tests/transfer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/txpool.py b/tests/functional_tests/txpool.py index b7f55d04c..273337631 100755 --- a/tests/functional_tests/txpool.py +++ b/tests/functional_tests/txpool.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/uri.py b/tests/functional_tests/uri.py index 1fefbb87d..1cbba14df 100755 --- a/tests/functional_tests/uri.py +++ b/tests/functional_tests/uri.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 #encoding=utf-8 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py index e030312da..c12506146 100755 --- a/tests/functional_tests/util_resources.py +++ b/tests/functional_tests/util_resources.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2021-2022, The Monero Project +# Copyright (c) 2021-2023, The Monero Project # # All rights reserved. diff --git a/tests/functional_tests/validate_address.py b/tests/functional_tests/validate_address.py index eb6ebbe91..915308df5 100755 --- a/tests/functional_tests/validate_address.py +++ b/tests/functional_tests/validate_address.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/functional_tests/wallet.py b/tests/functional_tests/wallet.py index 1ad05c98f..3bb4459d6 100755 --- a/tests/functional_tests/wallet.py +++ b/tests/functional_tests/wallet.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 #encoding=utf-8 -# Copyright (c) 2019-2022, The Monero Project +# Copyright (c) 2019-2023, The Monero Project # # All rights reserved. # diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt index e42c6d2a7..570ee78f9 100644 --- a/tests/fuzz/CMakeLists.txt +++ b/tests/fuzz/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/fuzz/base58.cpp b/tests/fuzz/base58.cpp index b873381f7..8cdce0921 100644 --- a/tests/fuzz/base58.cpp +++ b/tests/fuzz/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/block.cpp b/tests/fuzz/block.cpp index c02c22e54..1da38fa44 100644 --- a/tests/fuzz/block.cpp +++ b/tests/fuzz/block.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/bulletproof.cpp b/tests/fuzz/bulletproof.cpp index 49c068ed6..210f444f1 100644 --- a/tests/fuzz/bulletproof.cpp +++ b/tests/fuzz/bulletproof.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/cold-outputs.cpp b/tests/fuzz/cold-outputs.cpp index fddd5359b..79a43ddca 100644 --- a/tests/fuzz/cold-outputs.cpp +++ b/tests/fuzz/cold-outputs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/cold-transaction.cpp b/tests/fuzz/cold-transaction.cpp index 91cce1ac9..96c84bf76 100644 --- a/tests/fuzz/cold-transaction.cpp +++ b/tests/fuzz/cold-transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/fuzzer.cpp b/tests/fuzz/fuzzer.cpp index 18fdc1c7e..d9016866a 100644 --- a/tests/fuzz/fuzzer.cpp +++ b/tests/fuzz/fuzzer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/fuzzer.h b/tests/fuzz/fuzzer.h index cc30e765b..aecf44707 100644 --- a/tests/fuzz/fuzzer.h +++ b/tests/fuzz/fuzzer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/http-client.cpp b/tests/fuzz/http-client.cpp index 7858d4d16..629d012cb 100644 --- a/tests/fuzz/http-client.cpp +++ b/tests/fuzz/http-client.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/levin.cpp b/tests/fuzz/levin.cpp index d86f6b940..b3f64b03f 100644 --- a/tests/fuzz/levin.cpp +++ b/tests/fuzz/levin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/load_from_binary.cpp b/tests/fuzz/load_from_binary.cpp index f2d4ba78f..476ca2955 100644 --- a/tests/fuzz/load_from_binary.cpp +++ b/tests/fuzz/load_from_binary.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/load_from_json.cpp b/tests/fuzz/load_from_json.cpp index ceb8d0800..7cdb55054 100644 --- a/tests/fuzz/load_from_json.cpp +++ b/tests/fuzz/load_from_json.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/parse_url.cpp b/tests/fuzz/parse_url.cpp index f0f11ac01..7b68c1532 100644 --- a/tests/fuzz/parse_url.cpp +++ b/tests/fuzz/parse_url.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/signature.cpp b/tests/fuzz/signature.cpp index 77575ffb5..92f4911bf 100644 --- a/tests/fuzz/signature.cpp +++ b/tests/fuzz/signature.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/transaction.cpp b/tests/fuzz/transaction.cpp index 2eaf7b9eb..2f7f629ff 100644 --- a/tests/fuzz/transaction.cpp +++ b/tests/fuzz/transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/fuzz/tx-extra.cpp b/tests/fuzz/tx-extra.cpp index 161114e04..b7b0fdec7 100644 --- a/tests/fuzz/tx-extra.cpp +++ b/tests/fuzz/tx-extra.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/tests/fuzz/utf8.cpp b/tests/fuzz/utf8.cpp index aa03dc269..3b6033e8b 100644 --- a/tests/fuzz/utf8.cpp +++ b/tests/fuzz/utf8.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/hash-target.cpp b/tests/hash-target.cpp index 94af9203d..440742666 100644 --- a/tests/hash-target.cpp +++ b/tests/hash-target.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/hash/CMakeLists.txt b/tests/hash/CMakeLists.txt index 118e0e726..d35331e91 100644 --- a/tests/hash/CMakeLists.txt +++ b/tests/hash/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/hash/main.cpp b/tests/hash/main.cpp index 3cae92a83..b4b2704d4 100644 --- a/tests/hash/main.cpp +++ b/tests/hash/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/io.h b/tests/io.h index 9b2a298c5..d6d82aaa2 100644 --- a/tests/io.h +++ b/tests/io.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/libwallet_api_tests/CMakeLists.txt b/tests/libwallet_api_tests/CMakeLists.txt index c4ec443c1..9b081ab1d 100644 --- a/tests/libwallet_api_tests/CMakeLists.txt +++ b/tests/libwallet_api_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index 806f8afc2..9a9ccd5b7 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/net_load_tests/CMakeLists.txt b/tests/net_load_tests/CMakeLists.txt index 71c04fa3a..cabbc741b 100644 --- a/tests/net_load_tests/CMakeLists.txt +++ b/tests/net_load_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp index 6149de653..21b0359c1 100644 --- a/tests/net_load_tests/clt.cpp +++ b/tests/net_load_tests/clt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/net_load_tests/net_load_tests.h b/tests/net_load_tests/net_load_tests.h index 06e42b38d..67d5605d7 100644 --- a/tests/net_load_tests/net_load_tests.h +++ b/tests/net_load_tests/net_load_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/net_load_tests/srv.cpp b/tests/net_load_tests/srv.cpp index 1fd2224ab..990e54460 100644 --- a/tests/net_load_tests/srv.cpp +++ b/tests/net_load_tests/srv.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/CMakeLists.txt b/tests/performance_tests/CMakeLists.txt index c079afe3a..7462f7119 100644 --- a/tests/performance_tests/CMakeLists.txt +++ b/tests/performance_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/performance_tests/bulletproof.h b/tests/performance_tests/bulletproof.h index 3a147f2f4..989b4ba00 100644 --- a/tests/performance_tests/bulletproof.h +++ b/tests/performance_tests/bulletproof.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/bulletproof_plus.h b/tests/performance_tests/bulletproof_plus.h index 00dfc46f8..152e66046 100644 --- a/tests/performance_tests/bulletproof_plus.h +++ b/tests/performance_tests/bulletproof_plus.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/check_hash.h b/tests/performance_tests/check_hash.h index 174865bd4..d786cc36a 100644 --- a/tests/performance_tests/check_hash.h +++ b/tests/performance_tests/check_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/check_tx_signature.h b/tests/performance_tests/check_tx_signature.h index b542f91b1..de979856a 100644 --- a/tests/performance_tests/check_tx_signature.h +++ b/tests/performance_tests/check_tx_signature.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/cn_fast_hash.h b/tests/performance_tests/cn_fast_hash.h index bba051ace..8f6d2d6b8 100644 --- a/tests/performance_tests/cn_fast_hash.h +++ b/tests/performance_tests/cn_fast_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/cn_slow_hash.h b/tests/performance_tests/cn_slow_hash.h index 2cb3dbba5..26f4113de 100644 --- a/tests/performance_tests/cn_slow_hash.h +++ b/tests/performance_tests/cn_slow_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/construct_tx.h b/tests/performance_tests/construct_tx.h index 00bd75b40..4b3f061c4 100644 --- a/tests/performance_tests/construct_tx.h +++ b/tests/performance_tests/construct_tx.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/crypto_ops.h b/tests/performance_tests/crypto_ops.h index 6ef1641dc..9753bbeb7 100644 --- a/tests/performance_tests/crypto_ops.h +++ b/tests/performance_tests/crypto_ops.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/derive_public_key.h b/tests/performance_tests/derive_public_key.h index b36d35a6b..29ab0aefa 100644 --- a/tests/performance_tests/derive_public_key.h +++ b/tests/performance_tests/derive_public_key.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/derive_secret_key.h b/tests/performance_tests/derive_secret_key.h index 0697e076d..49b546599 100644 --- a/tests/performance_tests/derive_secret_key.h +++ b/tests/performance_tests/derive_secret_key.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/derive_view_tag.h b/tests/performance_tests/derive_view_tag.h index 3179ea0b2..fed00b905 100644 --- a/tests/performance_tests/derive_view_tag.h +++ b/tests/performance_tests/derive_view_tag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/equality.h b/tests/performance_tests/equality.h index 5f548f811..51b9cb609 100644 --- a/tests/performance_tests/equality.h +++ b/tests/performance_tests/equality.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/ge_frombytes_vartime.h b/tests/performance_tests/ge_frombytes_vartime.h index 912961b50..d543ed720 100644 --- a/tests/performance_tests/ge_frombytes_vartime.h +++ b/tests/performance_tests/ge_frombytes_vartime.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/ge_tobytes.h b/tests/performance_tests/ge_tobytes.h index a0566b081..a3c6121b1 100644 --- a/tests/performance_tests/ge_tobytes.h +++ b/tests/performance_tests/ge_tobytes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/generate_key_derivation.h b/tests/performance_tests/generate_key_derivation.h index bb445b235..dc1d7e3d0 100644 --- a/tests/performance_tests/generate_key_derivation.h +++ b/tests/performance_tests/generate_key_derivation.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/generate_key_image.h b/tests/performance_tests/generate_key_image.h index e2fcb26a1..36d86a77c 100644 --- a/tests/performance_tests/generate_key_image.h +++ b/tests/performance_tests/generate_key_image.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/generate_key_image_helper.h b/tests/performance_tests/generate_key_image_helper.h index 2fa0cb244..03ef0138c 100644 --- a/tests/performance_tests/generate_key_image_helper.h +++ b/tests/performance_tests/generate_key_image_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/generate_keypair.h b/tests/performance_tests/generate_keypair.h index 403157f18..1ec76c0a6 100644 --- a/tests/performance_tests/generate_keypair.h +++ b/tests/performance_tests/generate_keypair.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/is_out_to_acc.h b/tests/performance_tests/is_out_to_acc.h index 75d4a5c46..017145aa9 100644 --- a/tests/performance_tests/is_out_to_acc.h +++ b/tests/performance_tests/is_out_to_acc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp index 71c736977..92bcedcba 100644 --- a/tests/performance_tests/main.cpp +++ b/tests/performance_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/multi_tx_test_base.h b/tests/performance_tests/multi_tx_test_base.h index 2a121a15d..23186a2e0 100644 --- a/tests/performance_tests/multi_tx_test_base.h +++ b/tests/performance_tests/multi_tx_test_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/multiexp.h b/tests/performance_tests/multiexp.h index c9abb7cb3..14493d34f 100644 --- a/tests/performance_tests/multiexp.h +++ b/tests/performance_tests/multiexp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/performance_tests/out_can_be_to_acc.h b/tests/performance_tests/out_can_be_to_acc.h index 952f132a5..ac38c0f58 100644 --- a/tests/performance_tests/out_can_be_to_acc.h +++ b/tests/performance_tests/out_can_be_to_acc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/performance_tests.h b/tests/performance_tests/performance_tests.h index 1a423879b..531e9d7fb 100644 --- a/tests/performance_tests/performance_tests.h +++ b/tests/performance_tests/performance_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/performance_utils.h b/tests/performance_tests/performance_utils.h index 8555bb6b7..013aa94cd 100644 --- a/tests/performance_tests/performance_utils.h +++ b/tests/performance_tests/performance_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/range_proof.h b/tests/performance_tests/range_proof.h index 64dc56691..702a73d53 100644 --- a/tests/performance_tests/range_proof.h +++ b/tests/performance_tests/range_proof.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/rct_mlsag.h b/tests/performance_tests/rct_mlsag.h index 2163431fe..034df3183 100644 --- a/tests/performance_tests/rct_mlsag.h +++ b/tests/performance_tests/rct_mlsag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/sc_check.h b/tests/performance_tests/sc_check.h index fed0b2881..6df8e0d5d 100644 --- a/tests/performance_tests/sc_check.h +++ b/tests/performance_tests/sc_check.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/performance_tests/sc_reduce32.h b/tests/performance_tests/sc_reduce32.h index b18bfb0e3..5dadc4395 100644 --- a/tests/performance_tests/sc_reduce32.h +++ b/tests/performance_tests/sc_reduce32.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/sig_clsag.h b/tests/performance_tests/sig_clsag.h index 043830ee6..6c36819a5 100644 --- a/tests/performance_tests/sig_clsag.h +++ b/tests/performance_tests/sig_clsag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/sig_mlsag.h b/tests/performance_tests/sig_mlsag.h index 46bdcde63..54e89829d 100644 --- a/tests/performance_tests/sig_mlsag.h +++ b/tests/performance_tests/sig_mlsag.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/signature.h b/tests/performance_tests/signature.h index 632dd649b..e8aa8f33b 100644 --- a/tests/performance_tests/signature.h +++ b/tests/performance_tests/signature.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/single_tx_test_base.h b/tests/performance_tests/single_tx_test_base.h index 3700866f0..b0a3f30bc 100644 --- a/tests/performance_tests/single_tx_test_base.h +++ b/tests/performance_tests/single_tx_test_base.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/performance_tests/subaddress_expand.h b/tests/performance_tests/subaddress_expand.h index f4ed568e1..a154aba21 100644 --- a/tests/performance_tests/subaddress_expand.h +++ b/tests/performance_tests/subaddress_expand.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/CMakeLists.txt b/tests/trezor/CMakeLists.txt index 7c8cdf776..14c25823b 100644 --- a/tests/trezor/CMakeLists.txt +++ b/tests/trezor/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/tests/trezor/daemon.cpp b/tests/trezor/daemon.cpp index be13f6d19..47c0cde9b 100644 --- a/tests/trezor/daemon.cpp +++ b/tests/trezor/daemon.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/daemon.h b/tests/trezor/daemon.h index 3131881ce..b87fd5036 100644 --- a/tests/trezor/daemon.h +++ b/tests/trezor/daemon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/tools.cpp b/tests/trezor/tools.cpp index 1660c3986..aa5664611 100644 --- a/tests/trezor/tools.cpp +++ b/tests/trezor/tools.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/tools.h b/tests/trezor/tools.h index c163907d9..b628bbefa 100644 --- a/tests/trezor/tools.h +++ b/tests/trezor/tools.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/trezor_tests.cpp b/tests/trezor/trezor_tests.cpp index cf85ffb30..10c52ff29 100644 --- a/tests/trezor/trezor_tests.cpp +++ b/tests/trezor/trezor_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/trezor/trezor_tests.h b/tests/trezor/trezor_tests.h index f7684da12..0f9ee30ca 100644 --- a/tests/trezor/trezor_tests.h +++ b/tests/trezor/trezor_tests.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt index 55818dc93..d57c9bd7b 100644 --- a/tests/unit_tests/CMakeLists.txt +++ b/tests/unit_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # @@ -91,6 +91,7 @@ set(unit_tests_sources unbound.cpp uri.cpp varint.cpp + ver_rct_non_semantics_simple_cached.cpp ringct.cpp output_selection.cpp vercmp.cpp diff --git a/tests/unit_tests/account.cpp b/tests/unit_tests/account.cpp index 0ca16fe24..68fb63ebf 100644 --- a/tests/unit_tests/account.cpp +++ b/tests/unit_tests/account.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/address_from_url.cpp b/tests/unit_tests/address_from_url.cpp index d54ec6be5..d33502d6e 100644 --- a/tests/unit_tests/address_from_url.cpp +++ b/tests/unit_tests/address_from_url.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/aligned.cpp b/tests/unit_tests/aligned.cpp index fadf5cc41..b64b03c5a 100644 --- a/tests/unit_tests/aligned.cpp +++ b/tests/unit_tests/aligned.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/apply_permutation.cpp b/tests/unit_tests/apply_permutation.cpp index 61e98b892..829af4e8a 100644 --- a/tests/unit_tests/apply_permutation.cpp +++ b/tests/unit_tests/apply_permutation.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/base58.cpp b/tests/unit_tests/base58.cpp index 165c52a8e..4b897308f 100644 --- a/tests/unit_tests/base58.cpp +++ b/tests/unit_tests/base58.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/block_queue.cpp b/tests/unit_tests/block_queue.cpp index ec191c636..61e1b050e 100644 --- a/tests/unit_tests/block_queue.cpp +++ b/tests/unit_tests/block_queue.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/block_reward.cpp b/tests/unit_tests/block_reward.cpp index 9d06c8e86..c469fac2c 100644 --- a/tests/unit_tests/block_reward.cpp +++ b/tests/unit_tests/block_reward.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/blockchain_db.cpp b/tests/unit_tests/blockchain_db.cpp index 17828645a..0207a6e8f 100644 --- a/tests/unit_tests/blockchain_db.cpp +++ b/tests/unit_tests/blockchain_db.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/bootstrap_node_selector.cpp b/tests/unit_tests/bootstrap_node_selector.cpp index ec0fc638f..4c5929502 100644 --- a/tests/unit_tests/bootstrap_node_selector.cpp +++ b/tests/unit_tests/bootstrap_node_selector.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/bulletproofs.cpp b/tests/unit_tests/bulletproofs.cpp index 65f0d85f8..9fa6887fc 100644 --- a/tests/unit_tests/bulletproofs.cpp +++ b/tests/unit_tests/bulletproofs.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/bulletproofs_plus.cpp b/tests/unit_tests/bulletproofs_plus.cpp index 5d5c0170c..4bcfdb682 100644 --- a/tests/unit_tests/bulletproofs_plus.cpp +++ b/tests/unit_tests/bulletproofs_plus.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/canonical_amounts.cpp b/tests/unit_tests/canonical_amounts.cpp index 5c2466b9e..e10a5bc8e 100644 --- a/tests/unit_tests/canonical_amounts.cpp +++ b/tests/unit_tests/canonical_amounts.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/chacha.cpp b/tests/unit_tests/chacha.cpp index 2e37f8030..3041b02a2 100644 --- a/tests/unit_tests/chacha.cpp +++ b/tests/unit_tests/chacha.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/checkpoints.cpp b/tests/unit_tests/checkpoints.cpp index 3b36fa027..f047bd439 100644 --- a/tests/unit_tests/checkpoints.cpp +++ b/tests/unit_tests/checkpoints.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/command_line.cpp b/tests/unit_tests/command_line.cpp index 6b9025c7c..7e2e5a18d 100644 --- a/tests/unit_tests/command_line.cpp +++ b/tests/unit_tests/command_line.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/crypto.cpp b/tests/unit_tests/crypto.cpp index 7f926534a..4cac0b89f 100644 --- a/tests/unit_tests/crypto.cpp +++ b/tests/unit_tests/crypto.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/decompose_amount_into_digits.cpp b/tests/unit_tests/decompose_amount_into_digits.cpp index bf0e9263f..e69eac232 100644 --- a/tests/unit_tests/decompose_amount_into_digits.cpp +++ b/tests/unit_tests/decompose_amount_into_digits.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/device.cpp b/tests/unit_tests/device.cpp index 1f0dfaf78..6d8bb1492 100644 --- a/tests/unit_tests/device.cpp +++ b/tests/unit_tests/device.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/difficulty.cpp b/tests/unit_tests/difficulty.cpp index 4c6f06b2b..ae4997dd1 100644 --- a/tests/unit_tests/difficulty.cpp +++ b/tests/unit_tests/difficulty.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/dns_resolver.cpp b/tests/unit_tests/dns_resolver.cpp index d56cbe45b..87957398e 100644 --- a/tests/unit_tests/dns_resolver.cpp +++ b/tests/unit_tests/dns_resolver.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/epee_boosted_tcp_server.cpp b/tests/unit_tests/epee_boosted_tcp_server.cpp index 70f1b966f..d68f3c9bb 100644 --- a/tests/unit_tests/epee_boosted_tcp_server.cpp +++ b/tests/unit_tests/epee_boosted_tcp_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index 38a18695d..05cc6412f 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/epee_serialization.cpp b/tests/unit_tests/epee_serialization.cpp index f46630615..035f5e206 100644 --- a/tests/unit_tests/epee_serialization.cpp +++ b/tests/unit_tests/epee_serialization.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/epee_utils.cpp b/tests/unit_tests/epee_utils.cpp index 1c756e77c..185cb73b1 100644 --- a/tests/unit_tests/epee_utils.cpp +++ b/tests/unit_tests/epee_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/expect.cpp b/tests/unit_tests/expect.cpp index 6162ed830..d4cb8cf37 100644 --- a/tests/unit_tests/expect.cpp +++ b/tests/unit_tests/expect.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/fee.cpp b/tests/unit_tests/fee.cpp index 39f3014a2..1df1a4f04 100644 --- a/tests/unit_tests/fee.cpp +++ b/tests/unit_tests/fee.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/get_xtype_from_string.cpp b/tests/unit_tests/get_xtype_from_string.cpp index 2831b65b0..f499bca0d 100644 --- a/tests/unit_tests/get_xtype_from_string.cpp +++ b/tests/unit_tests/get_xtype_from_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp index bb2632d01..e6602bdb3 100644 --- a/tests/unit_tests/hardfork.cpp +++ b/tests/unit_tests/hardfork.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/hashchain.cpp b/tests/unit_tests/hashchain.cpp index 1831d0504..fc07a2986 100644 --- a/tests/unit_tests/hashchain.cpp +++ b/tests/unit_tests/hashchain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/hmac_keccak.cpp b/tests/unit_tests/hmac_keccak.cpp index e05bcca44..6f83b5a29 100644 --- a/tests/unit_tests/hmac_keccak.cpp +++ b/tests/unit_tests/hmac_keccak.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/http.cpp b/tests/unit_tests/http.cpp index 60afe788e..72870aa18 100644 --- a/tests/unit_tests/http.cpp +++ b/tests/unit_tests/http.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/json_serialization.h b/tests/unit_tests/json_serialization.h index 5ae97a3dd..8aeac6fde 100644 --- a/tests/unit_tests/json_serialization.h +++ b/tests/unit_tests/json_serialization.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/keccak.cpp b/tests/unit_tests/keccak.cpp index 1ebe63646..780138615 100644 --- a/tests/unit_tests/keccak.cpp +++ b/tests/unit_tests/keccak.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/levin.cpp b/tests/unit_tests/levin.cpp index 416c14bcc..15ece14a8 100644 --- a/tests/unit_tests/levin.cpp +++ b/tests/unit_tests/levin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/lmdb.cpp b/tests/unit_tests/lmdb.cpp index b6a0d000c..c859439eb 100644 --- a/tests/unit_tests/lmdb.cpp +++ b/tests/unit_tests/lmdb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/logging.cpp b/tests/unit_tests/logging.cpp index 2c10f2c0a..20f1466b4 100644 --- a/tests/unit_tests/logging.cpp +++ b/tests/unit_tests/logging.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/long_term_block_weight.cpp b/tests/unit_tests/long_term_block_weight.cpp index 973055097..b9ce2b247 100644 --- a/tests/unit_tests/long_term_block_weight.cpp +++ b/tests/unit_tests/long_term_block_weight.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/main.cpp b/tests/unit_tests/main.cpp index 12792bfe8..f690f3581 100644 --- a/tests/unit_tests/main.cpp +++ b/tests/unit_tests/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/memwipe.cpp b/tests/unit_tests/memwipe.cpp index 8eab69548..343f66722 100644 --- a/tests/unit_tests/memwipe.cpp +++ b/tests/unit_tests/memwipe.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/mlocker.cpp b/tests/unit_tests/mlocker.cpp index 948909af8..ea8d3de3f 100644 --- a/tests/unit_tests/mlocker.cpp +++ b/tests/unit_tests/mlocker.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/mnemonics.cpp b/tests/unit_tests/mnemonics.cpp index 7b778d3cf..ca568380a 100644 --- a/tests/unit_tests/mnemonics.cpp +++ b/tests/unit_tests/mnemonics.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/mul_div.cpp b/tests/unit_tests/mul_div.cpp index 1733a47f0..800c42354 100644 --- a/tests/unit_tests/mul_div.cpp +++ b/tests/unit_tests/mul_div.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/multiexp.cpp b/tests/unit_tests/multiexp.cpp index 8f2a3cc27..1e0100603 100644 --- a/tests/unit_tests/multiexp.cpp +++ b/tests/unit_tests/multiexp.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/multisig.cpp b/tests/unit_tests/multisig.cpp index 3b3c4197c..a79b81e84 100644 --- a/tests/unit_tests/multisig.cpp +++ b/tests/unit_tests/multisig.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/net.cpp b/tests/unit_tests/net.cpp index af0f07db0..03072b283 100644 --- a/tests/unit_tests/net.cpp +++ b/tests/unit_tests/net.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/node_server.cpp b/tests/unit_tests/node_server.cpp index 584f98f7a..747778c69 100644 --- a/tests/unit_tests/node_server.cpp +++ b/tests/unit_tests/node_server.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/notify.cpp b/tests/unit_tests/notify.cpp index 8e76a3d78..c724be8fa 100644 --- a/tests/unit_tests/notify.cpp +++ b/tests/unit_tests/notify.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/output_distribution.cpp b/tests/unit_tests/output_distribution.cpp index b70fdedf8..ab474a7d8 100644 --- a/tests/unit_tests/output_distribution.cpp +++ b/tests/unit_tests/output_distribution.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/output_selection.cpp b/tests/unit_tests/output_selection.cpp index 02619207e..8851b8287 100644 --- a/tests/unit_tests/output_selection.cpp +++ b/tests/unit_tests/output_selection.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/parse_amount.cpp b/tests/unit_tests/parse_amount.cpp index 9a2a21c2b..37dd23be5 100644 --- a/tests/unit_tests/parse_amount.cpp +++ b/tests/unit_tests/parse_amount.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/pruning.cpp b/tests/unit_tests/pruning.cpp index 3577c6924..14700d664 100644 --- a/tests/unit_tests/pruning.cpp +++ b/tests/unit_tests/pruning.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/random.cpp b/tests/unit_tests/random.cpp index 926cb775a..0d8175445 100644 --- a/tests/unit_tests/random.cpp +++ b/tests/unit_tests/random.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp index 920ec7c5e..d7d29fc54 100644 --- a/tests/unit_tests/ringct.cpp +++ b/tests/unit_tests/ringct.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/ringdb.cpp b/tests/unit_tests/ringdb.cpp index b41781f51..d213bde55 100644 --- a/tests/unit_tests/ringdb.cpp +++ b/tests/unit_tests/ringdb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/rolling_median.cpp b/tests/unit_tests/rolling_median.cpp index 07da0f0ef..363544caa 100644 --- a/tests/unit_tests/rolling_median.cpp +++ b/tests/unit_tests/rolling_median.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/rpc_version_str.cpp b/tests/unit_tests/rpc_version_str.cpp index 61b389a80..6cda8d3fd 100644 --- a/tests/unit_tests/rpc_version_str.cpp +++ b/tests/unit_tests/rpc_version_str.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/scaling_2021.cpp b/tests/unit_tests/scaling_2021.cpp index 36a77c107..024a4b4fd 100644 --- a/tests/unit_tests/scaling_2021.cpp +++ b/tests/unit_tests/scaling_2021.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022, The Monero Project +// Copyright (c) 2019-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index 87571e5b5..49f1dc310 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/sha256.cpp b/tests/unit_tests/sha256.cpp index 7a96a783b..a2a65dfbf 100644 --- a/tests/unit_tests/sha256.cpp +++ b/tests/unit_tests/sha256.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/slow_memmem.cpp b/tests/unit_tests/slow_memmem.cpp index aa1bea128..1b86a0e46 100644 --- a/tests/unit_tests/slow_memmem.cpp +++ b/tests/unit_tests/slow_memmem.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/subaddress.cpp b/tests/unit_tests/subaddress.cpp index 17fc0fe78..1df20e825 100644 --- a/tests/unit_tests/subaddress.cpp +++ b/tests/unit_tests/subaddress.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/test_notifier.cpp b/tests/unit_tests/test_notifier.cpp index ffa0b3965..bfa7c3a54 100644 --- a/tests/unit_tests/test_notifier.cpp +++ b/tests/unit_tests/test_notifier.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/test_peerlist.cpp b/tests/unit_tests/test_peerlist.cpp index 98caabafd..c5343b757 100644 --- a/tests/unit_tests/test_peerlist.cpp +++ b/tests/unit_tests/test_peerlist.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/test_protocol_pack.cpp b/tests/unit_tests/test_protocol_pack.cpp index 78bf01d4b..f25dc7694 100644 --- a/tests/unit_tests/test_protocol_pack.cpp +++ b/tests/unit_tests/test_protocol_pack.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/test_tx_utils.cpp b/tests/unit_tests/test_tx_utils.cpp index 2991a143e..176a9af09 100644 --- a/tests/unit_tests/test_tx_utils.cpp +++ b/tests/unit_tests/test_tx_utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/threadpool.cpp b/tests/unit_tests/threadpool.cpp index c1ea722c8..0c4035f18 100644 --- a/tests/unit_tests/threadpool.cpp +++ b/tests/unit_tests/threadpool.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/tx_proof.cpp b/tests/unit_tests/tx_proof.cpp index 04fe7aaa2..932b38792 100644 --- a/tests/unit_tests/tx_proof.cpp +++ b/tests/unit_tests/tx_proof.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/unbound.cpp b/tests/unit_tests/unbound.cpp index 1cac02901..dc888cec3 100644 --- a/tests/unit_tests/unbound.cpp +++ b/tests/unit_tests/unbound.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/unit_tests_utils.h b/tests/unit_tests/unit_tests_utils.h index 6b3fe1f44..e3c6c2521 100644 --- a/tests/unit_tests/unit_tests_utils.h +++ b/tests/unit_tests/unit_tests_utils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/uri.cpp b/tests/unit_tests/uri.cpp index 0ece6d4c1..98bf80643 100644 --- a/tests/unit_tests/uri.cpp +++ b/tests/unit_tests/uri.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2022, The Monero Project +// Copyright (c) 2016-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/varint.cpp b/tests/unit_tests/varint.cpp index 9bf30c5ed..f0a499d0c 100644 --- a/tests/unit_tests/varint.cpp +++ b/tests/unit_tests/varint.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2022, The Monero Project +// Copyright (c) 2014-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/ver_rct_non_semantics_simple_cached.cpp b/tests/unit_tests/ver_rct_non_semantics_simple_cached.cpp new file mode 100644 index 000000000..118fb7c48 --- /dev/null +++ b/tests/unit_tests/ver_rct_non_semantics_simple_cached.cpp @@ -0,0 +1,426 @@ +// Copyright (c) 2023, The Monero Project +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include <sstream> + +#define IN_UNIT_TESTS // To access Blockchain::{expand_transaction_2, verRctNonSemanticsSimpleCached} + +#include "gtest/gtest.h" +#include "unit_tests_utils.h" + +#include "cryptonote_basic/cryptonote_format_utils.h" +#include "cryptonote_core/blockchain.h" +#include "file_io_utils.h" +#include "misc_log_ex.h" +#include "ringct/rctSigs.h" + +namespace cryptonote +{ +// declaration not provided in cryptonote_format_utils.h, but definition is not static ;) +bool expand_transaction_1(transaction &tx, bool base_only); +} + +namespace +{ +/** + * @brief Make rct::ctkey from hex string representation of destionation and mask + * + * @param dest_hex + * @param mask_hex + * @return rct::ctkey + */ +static rct::ctkey make_ctkey(const char* dest_hex, const char* mask_hex) +{ + rct::key dest; + rct::key mask; + CHECK_AND_ASSERT_THROW_MES(epee::from_hex::to_buffer(epee::as_mut_byte_span(dest), dest_hex), "dest bad hex: " << dest_hex); + CHECK_AND_ASSERT_THROW_MES(epee::from_hex::to_buffer(epee::as_mut_byte_span(mask), mask_hex), "mask bad hex: " << mask_hex); + return {dest, mask}; +} + +template <typename T> +static std::string stringify_with_do_serialize(const T& t) +{ + std::stringstream ss; + binary_archive<true> ar(ss); + CHECK_AND_ASSERT_THROW_MES(ar.good(), "Archiver is not in a good state. This shouldn't happen!"); + ::do_serialize(ar, const_cast<T&>(t)); + return ss.str(); +} + +static bool check_tx_is_expanded(const cryptonote::transaction& tx, const rct::ctkeyM& pubkeys) +{ + // Ripped from cryptonote_core/blockchain.cpp + + const rct::rctSig& rv = tx.rct_signatures; + + if (pubkeys.size() != rv.mixRing.size()) + { + MERROR("Failed to check ringct signatures: mismatched pubkeys/mixRing size"); + return false; + } + for (size_t i = 0; i < pubkeys.size(); ++i) + { + if (pubkeys[i].size() != rv.mixRing[i].size()) + { + MERROR("Failed to check ringct signatures: mismatched pubkeys/mixRing size"); + return false; + } + } + + for (size_t n = 0; n < pubkeys.size(); ++n) + { + for (size_t m = 0; m < pubkeys[n].size(); ++m) + { + if (pubkeys[n][m].dest != rct::rct2pk(rv.mixRing[n][m].dest)) + { + MERROR("Failed to check ringct signatures: mismatched pubkey at vin " << n << ", index " << m); + return false; + } + if (pubkeys[n][m].mask != rct::rct2pk(rv.mixRing[n][m].mask)) + { + MERROR("Failed to check ringct signatures: mismatched commitment at vin " << n << ", index " << m); + return false; + } + } + } + + const size_t n_sigs = rct::is_rct_clsag(rv.type) ? rv.p.CLSAGs.size() : rv.p.MGs.size(); + if (n_sigs != tx.vin.size()) + { + MERROR("Failed to check ringct signatures: mismatched MGs/vin sizes"); + return false; + } + for (size_t n = 0; n < tx.vin.size(); ++n) + { + bool error; + if (rct::is_rct_clsag(rv.type)) + error = memcmp(&boost::get<cryptonote::txin_to_key>(tx.vin[n]).k_image, &rv.p.CLSAGs[n].I, 32); + else + error = rv.p.MGs[n].II.empty() || memcmp(&boost::get<cryptonote::txin_to_key>(tx.vin[n]).k_image, &rv.p.MGs[n].II[0], 32); + if (error) + { + MERROR("Failed to check ringct signatures: mismatched key image"); + return false; + } + } + + return true; +} + +/** + * @brief Perform expand_transaction_1 and Blockchain::expand_transaction_2 on a certain transaction + */ +static void expand_transaction_fully(cryptonote::transaction& tx, const rct::ctkeyM& input_pubkeys) +{ + const crypto::hash tx_prefix_hash = cryptonote::get_transaction_prefix_hash(tx); + CHECK_AND_ASSERT_THROW_MES(cryptonote::expand_transaction_1(tx, false), "expand 1 failed"); + CHECK_AND_ASSERT_THROW_MES + ( + cryptonote::Blockchain::expand_transaction_2(tx, tx_prefix_hash, input_pubkeys), + "expand 2 failed" + ); + CHECK_AND_ASSERT_THROW_MES(!memcmp(&tx_prefix_hash, &tx.rct_signatures.message, 32), "message check failed"); + CHECK_AND_ASSERT_THROW_MES(input_pubkeys == tx.rct_signatures.mixRing, "mixring check failed"); + CHECK_AND_ASSERT_THROW_MES(check_tx_is_expanded(tx, input_pubkeys), "tx expansion check 2 failed"); +} + +/** + * @brief Mostly construct transaction from binary file and provided mix ring pubkeys + * + * Most important to us, this should populate the .rct_signatures.message and + * .rct_signatures.mixRings fields of the transaction. + * + * @param file_name relative file path in unit test data directory + * @param input_pubkeys manually retrived input pubkey destination / masks for each ring + * @return cryptonote::transaction the expanded transaction + */ +static cryptonote::transaction expand_transaction_from_bin_file_and_pubkeys +( + const char* file_name, + const rct::ctkeyM& input_pubkeys +) +{ + cryptonote::transaction transaction; + + const boost::filesystem::path tx_json_path = unit_test::data_dir / file_name; + std::string tx_blob; + CHECK_AND_ASSERT_THROW_MES + ( + epee::file_io_utils::load_file_to_string(tx_json_path.string(), tx_blob), + "loading file to string failed" + ); + + CHECK_AND_ASSERT_THROW_MES + ( + cryptonote::parse_and_validate_tx_from_blob(tx_blob, transaction), + "TX blob could not be parsed" + ); + + expand_transaction_fully(transaction, input_pubkeys); + + return transaction; +} + +/** + * @brief Return whether a modification changes blob resulting from do_serialize() + */ +template <typename T, class TModifier> +static bool modification_changes_do_serialize +( + const T& og_obj, + TModifier& obj_modifier_func, + bool expected_change +) +{ + T modded_obj = og_obj; + obj_modifier_func(modded_obj); + const std::string og_blob = stringify_with_do_serialize(og_obj); + const std::string modded_blob = stringify_with_do_serialize(modded_obj); + const bool did_change = modded_blob != og_blob; + if (did_change != expected_change) + { + const std::string og_hex = epee::to_hex::string(epee::strspan<uint8_t>(og_blob)); + const std::string modded_hex = epee::to_hex::string(epee::strspan<uint8_t>(modded_blob)); + MERROR("unexpected: modded_blob '" << modded_hex << "' vs og_blob ' << " << og_hex << "'"); + } + return did_change; +} + +// Contains binary representation of mainnet transaction (height 2777777): +// e89415b95564aa7e3587c91422756ba5303e727996e19c677630309a0d52a7ca +static constexpr const char* tx1_file_name = "txs/bpp_tx_e89415.bin"; + +// This contains destination key / mask pairs for each output in the input ring of the above tx +static const rct::ctkeyM tx1_input_pubkeys = +{{ + make_ctkey("e50f476129d40af31e0938743f7f2d60e867aab31294f7acaf6e38f0976f0228", "51e788ddf5c95c124a7314d45a91b52d60db25a0572de9c2b4ec515aca3d4481"), + make_ctkey("804245d067fcfe6cd66376db0571869989bc68b3e22a0f902109c7530df47a59", "c3cc65d3b3a05defaa05213dc3b0496f9b86dbeeefbff28db34b134b6ee3230b"), + make_ctkey("527563a03b498e47732b815f5f0c5875a70e0fb71a37c88123f0f8686349fae4", "04417c03b397cd11e403275ec89cb0ab5b8476bb88470e9ae7208ea63dacf073"), + make_ctkey("bffca8b5c7fe4235ba7136d6b5325f63df343dc147940b677f50217f8953bca6", "5cd8c5e54e07275422c9c5a9f4a7268d26c494ffba419e878b7e873a02ae2e76"), + make_ctkey("1f73385ea74308aa78b5abf585faac14a5e78a6e23f0f68c9c14681108b28ef0", "5c02b3156daaa8ec476d3244439d90efa266f3e51cb9c8eb384d8b9a8efaa024"), + make_ctkey("a2421eae8bb256644b34feeab48c6086c2c9feb40d2643436dc45e303eee8ab2", "787823abffa988b56d4a7b4a834630f71520220fd82fad035955e616ec095788"), + make_ctkey("17d8d8dc1e1c25b7295f2eab44c4ccc08a629b8e8d781bbb6f9a51a9561bcd4c", "db1ea24be6947e03176a297160dba16d65f37751bb0ef2ba71a4590d12b61dfc"), + make_ctkey("2c39348a9ab04dbabe3b5249819b7845ed8aaebd0d8eddd98bda0bf40753a398", "4e6cd25fbd10e2e040be84e3bf8043c612daeef625e66a5e5bcff88c9c46e82c"), + make_ctkey("c4c97157f23b45c7084526aaa9958fe858bebe446a7efa22c491c439b74271b1", "e251db2c86193a11a5bffefffe48c20e3d92a8dc98cb3a2f41704e565bcd860a"), + make_ctkey("d342045525139a8551bcdfa7aa0117d2ac2327cb6cf449ca59420c300e4471a5", "789c11f72060ad80f4cda5d89b24d49f9435bf765598dea7a91776e99f05f87c"), + make_ctkey("9a972ccf2c74f648070b0be839749c98eca87166de401a6c1f59e64b938a46c1", "5444cbed5cec31fb6ed1612f815d292f2bf3d2ff584bbcd8e5201ec59670d414"), + make_ctkey("49ccb806ccf5cbd74bae8d9fb2da8918ab61d0774ee6a6c3a6ccd237db22a088", "0c5db942fb44f29f6ef956e24db91f98a6de6e7288b0b04d01b8f260453d1431"), + make_ctkey("74417e8d1483df2df6fe68c88fc9a72639c35d765b38351b838521addf45dadc", "a1a606d6c4762ef51c1759bcb8b5c88be1d323025400c41fe6885431064b64dc"), + make_ctkey("48c4c349adaf7b3be27656ea70d1c83b93e1511bb0aac987861a4da9689b0e95", "ad14ffd5edac199ea7c5437d558089b0f2f03aa74bde43611322d769968b5a1c"), + make_ctkey("2d2ffade0f85ddd83a036469e49542e93cad94f9bea535f0ea2eb2f56304517e", "bcc48d00bd06dc5439200e749d0caf8a062b072d0c0eb1f78f6a4d8f2373e5f4"), + make_ctkey("4ee857d0ce17f66eca9c81eb326e404ceb50c8198248f2f827c440ee7aa0c0d7", "a8a9d61d4abbfb123630ffd214c834cc45113eaa51dd2f904cc6ae0c3c5d70e3") +}}; +} // anonymous namespace + +TEST(verRctNonSemanticsSimple, tx1_preconditions) +{ + // If this unit test fails, something changed about transaction deserialization / expansion or + // something changed about RingCT signature verification. + + cryptonote::rct_ver_cache_t rct_ver_cache; + + cryptonote::transaction tx = expand_transaction_from_bin_file_and_pubkeys + (tx1_file_name, tx1_input_pubkeys); + const rct::rctSig& rs = tx.rct_signatures; + + const crypto::hash tx_prefix_hash = cryptonote::get_transaction_prefix_hash(tx); + + EXPECT_EQ(1, tx.vin.size()); + EXPECT_EQ(2, tx.vout.size()); + const rct::key expected_sig_msg = rct::hash2rct(tx_prefix_hash); + EXPECT_EQ(expected_sig_msg, rs.message); + EXPECT_EQ(1, rs.mixRing.size()); + EXPECT_EQ(16, rs.mixRing[0].size()); + EXPECT_EQ(0, rs.pseudoOuts.size()); + EXPECT_EQ(0, rs.p.rangeSigs.size()); + EXPECT_EQ(0, rs.p.bulletproofs.size()); + EXPECT_EQ(1, rs.p.bulletproofs_plus.size()); + EXPECT_EQ(2, rs.p.bulletproofs_plus[0].V.size()); + EXPECT_EQ(7, rs.p.bulletproofs_plus[0].L.size()); + EXPECT_EQ(7, rs.p.bulletproofs_plus[0].R.size()); + EXPECT_EQ(0, rs.p.MGs.size()); + EXPECT_EQ(1, rs.p.CLSAGs.size()); + EXPECT_EQ(16, rs.p.CLSAGs[0].s.size()); + EXPECT_EQ(1, rs.p.pseudoOuts.size()); + EXPECT_EQ(tx1_input_pubkeys, rs.mixRing); + EXPECT_EQ(2, rs.outPk.size()); + + EXPECT_TRUE(rct::verRctSemanticsSimple(rs)); + EXPECT_TRUE(rct::verRctNonSemanticsSimple(rs)); + EXPECT_TRUE(rct::verRctSimple(rs)); + EXPECT_TRUE(cryptonote::ver_rct_non_semantics_simple_cached(tx, tx1_input_pubkeys, rct_ver_cache, rct::RCTTypeBulletproofPlus)); + EXPECT_TRUE(cryptonote::ver_rct_non_semantics_simple_cached(tx, tx1_input_pubkeys, rct_ver_cache, rct::RCTTypeBulletproofPlus)); +} + +#define SERIALIZABLE_SIG_CHANGES_SUBTEST(fieldmodifyclause) \ + do { \ + const auto sig_modifier_func = [](rct::rctSig& rs) { rs.fieldmodifyclause; }; \ + EXPECT_TRUE(modification_changes_do_serialize(original_sig, sig_modifier_func, true)); \ + } while (0); \ + +TEST(verRctNonSemanticsSimple, serializable_sig_changes) +{ + // Hello, future visitors. If this unit test fails, then fields of rctSig have been dropped from + // serialization. + + const cryptonote::transaction tx = expand_transaction_from_bin_file_and_pubkeys + (tx1_file_name, tx1_input_pubkeys); + const rct::rctSig& original_sig = tx.rct_signatures; + + // These are the subtests most likely to fail. Fields 'message' and 'mixRing' are not serialized + // when sent over the wire, since they can be reconstructed from transaction data. However, they + // are serialized by ::do_serialize(rctSig). + // How signatures are serialized for the blockchain can be found in the methods + // rct::rctSigBase::serialize_rctsig_base and rct::rctSigPrunable::serialize_rctsig_prunable. + SERIALIZABLE_SIG_CHANGES_SUBTEST(message.bytes[31]++) + SERIALIZABLE_SIG_CHANGES_SUBTEST(mixRing.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(mixRing[0].push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(mixRing[0][8].dest[10]--) + SERIALIZABLE_SIG_CHANGES_SUBTEST(mixRing[0][15].mask[3]--) + + // rctSigBase changes. These subtests are less likely to break + SERIALIZABLE_SIG_CHANGES_SUBTEST(type ^= 23) + SERIALIZABLE_SIG_CHANGES_SUBTEST(pseudoOuts.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(ecdhInfo.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(outPk.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(outPk[0].dest[14]--) + SERIALIZABLE_SIG_CHANGES_SUBTEST(outPk[1].dest[14]--) + SERIALIZABLE_SIG_CHANGES_SUBTEST(outPk[0].mask[14]--) + SERIALIZABLE_SIG_CHANGES_SUBTEST(outPk[1].mask[14]--) + SERIALIZABLE_SIG_CHANGES_SUBTEST(txnFee *= 2023) + + // rctSigPrunable changes + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.rangeSigs.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].A[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].A1[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].B[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].r1[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].s1[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].d1[13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].L.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].L[2][13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].R.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].R[2][13] -= 7) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.MGs.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs[0].s.push_back({})) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs[0].s[15][31] ^= 69) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs[0].c1[0] /= 3) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs[0].D[0] /= 3) + SERIALIZABLE_SIG_CHANGES_SUBTEST(p.pseudoOuts.push_back({})) + + // Uncomment line below to sanity check SERIALIZABLE_SIG_CHANGES_SUBTEST + // SERIALIZABLE_SIG_CHANGES_SUBTEST(message) // should fail +} + +#define UNSERIALIZABLE_SIG_CHANGES_SUBTEST(fieldmodifyclause) \ + do { \ + const auto sig_modifier_func = [](rct::rctSig& rs) { rs.fieldmodifyclause; }; \ + EXPECT_FALSE(modification_changes_do_serialize(original_sig, sig_modifier_func, false)); \ + } while (0); \ + +TEST(verRctNonSemanticsSimple, unserializable_sig_changes) +{ + // Hello, future visitors. If this unit test fails, then congrats! ::do_serialize(rctSig) became + // better at uniquely representing rctSig. + const cryptonote::transaction tx = expand_transaction_from_bin_file_and_pubkeys + (tx1_file_name, tx1_input_pubkeys); + const rct::rctSig& original_sig = tx.rct_signatures; + + UNSERIALIZABLE_SIG_CHANGES_SUBTEST(p.CLSAGs[0].I[14]++) + UNSERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].V.push_back({})) + UNSERIALIZABLE_SIG_CHANGES_SUBTEST(p.bulletproofs_plus[0].V[1][31]--) + + // Uncomment line below to sanity check UNSERIALIZABLE_SIG_CHANGES_SUBTEST_SHORTCUT + // UNSERIALIZABLE_SIG_CHANGES_SUBTEST_SHORTCUT(message[2]++) // should fail +} + +#define SERIALIZABLE_MIXRING_CHANGES_SUBTEST(fieldmodifyclause) \ + do { \ + using mr_mod_func_t = std::function<void(rct::ctkeyM&)>; \ + const mr_mod_func_t mr_modifier_func = [&](rct::ctkeyM& mr) { mr fieldmodifyclause; }; \ + EXPECT_TRUE(modification_changes_do_serialize(original_mixring, mr_modifier_func, true)); \ + } while (0); \ + +TEST(verRctNonSemanticsSimple, serializable_mixring_changes) +{ + // Hello, future Monero devs! If this unit test fails, a huge concensus-related assumption has + // been broken and verRctNonSemanticsSimpleCached needs to be reevalulated for validity. If it + // is not, there may be an exploit which allows for double-spending. See the implementation for + // more comments on the uniqueness of the internal cache hash. + + const rct::ctkeyM original_mixring = tx1_input_pubkeys; + + const size_t mlen = tx1_input_pubkeys.size(); + ASSERT_EQ(1, mlen); + const size_t nlen = tx1_input_pubkeys[0].size(); + ASSERT_EQ(16, nlen); + + SERIALIZABLE_MIXRING_CHANGES_SUBTEST(.clear()) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST(.push_back({})) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([0].clear()) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([0].push_back({})) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([0][0].dest[4]--) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([0][15].mask[31]--) + + // Loop through all bytes of the mixRing and check for serialiable changes + for (size_t i = 0; i < mlen; ++i) + { + for (size_t j = 0; j < nlen; ++j) + { + static_assert(sizeof(rct::key) == 32, "rct::key size wrong"); + for (size_t k = 0; k < sizeof(rct::key); ++k) + { + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([i][j].dest[k]++) + SERIALIZABLE_MIXRING_CHANGES_SUBTEST([i][j].mask[k]++) + } + } + } +} + +#define EXPAND_TRANSACTION_2_FAILURES_SUBTEST(fieldmodifyclause) \ + do { \ + cryptonote::transaction test_tx = original_tx; \ + test_tx.fieldmodifyclause; \ + test_tx.invalidate_hashes(); \ + EXPECT_FALSE(check_tx_is_expanded(test_tx, original_mixring)); \ + } while (0); \ + +TEST(verRctNonSemanticsSimple, expand_transaction_2_failures) +{ + cryptonote::transaction original_tx = expand_transaction_from_bin_file_and_pubkeys + (tx1_file_name, tx1_input_pubkeys); + rct::ctkeyM original_mixring = tx1_input_pubkeys; + + EXPAND_TRANSACTION_2_FAILURES_SUBTEST(rct_signatures.p.CLSAGs[0].I[0]++) + EXPAND_TRANSACTION_2_FAILURES_SUBTEST(rct_signatures.mixRing[0][15].dest[31]++) + EXPAND_TRANSACTION_2_FAILURES_SUBTEST(rct_signatures.mixRing[0][15].mask[31]++) +} diff --git a/tests/unit_tests/vercmp.cpp b/tests/unit_tests/vercmp.cpp index 627a53c3b..7565fbab5 100644 --- a/tests/unit_tests/vercmp.cpp +++ b/tests/unit_tests/vercmp.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // // All rights reserved. // diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp index ef6964f9e..f1bb90a41 100644 --- a/tests/unit_tests/wipeable_string.cpp +++ b/tests/unit_tests/wipeable_string.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2018-2022, The Monero Project +// Copyright (c) 2018-2023, The Monero Project // // All rights reserved. diff --git a/tests/unit_tests/zmq_rpc.cpp b/tests/unit_tests/zmq_rpc.cpp index c98f0011b..51b0ed014 100644 --- a/tests/unit_tests/zmq_rpc.cpp +++ b/tests/unit_tests/zmq_rpc.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022, The Monero Project +// Copyright (c) 2020-2023, The Monero Project // // All rights reserved. diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt index 3b43360f8..8abebf673 100644 --- a/translations/CMakeLists.txt +++ b/translations/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2022, The Monero Project +# Copyright (c) 2017-2023, The Monero Project # # All rights reserved. # diff --git a/translations/generate_translations_header.c b/translations/generate_translations_header.c index 01dc139b4..b9ea41988 100644 --- a/translations/generate_translations_header.c +++ b/translations/generate_translations_header.c @@ -1,5 +1,5 @@ // Copyright (c) 2013, Sergey Lyubka -// Copyright (c) 2017-2022, The Monero Project +// Copyright (c) 2017-2023, The Monero Project // All rights reserved. // Released under the MIT license. diff --git a/utils/health/build-scripts/clang-build-time-analyzer-clone-build.sh b/utils/health/build-scripts/clang-build-time-analyzer-clone-build.sh index 9284cbbd4..f218ce5a5 100755 --- a/utils/health/build-scripts/clang-build-time-analyzer-clone-build.sh +++ b/utils/health/build-scripts/clang-build-time-analyzer-clone-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/clang-build-time-analyzer-run.sh b/utils/health/clang-build-time-analyzer-run.sh index 583b4ed30..cbfb00f65 100755 --- a/utils/health/clang-build-time-analyzer-run.sh +++ b/utils/health/clang-build-time-analyzer-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/clang-include-what-you-use-run.sh b/utils/health/clang-include-what-you-use-run.sh index 50db929b0..aee10b9a9 100755 --- a/utils/health/clang-include-what-you-use-run.sh +++ b/utils/health/clang-include-what-you-use-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/clang-tidy-run-cc.sh b/utils/health/clang-tidy-run-cc.sh index 5c8e8acb3..b43f575b2 100755 --- a/utils/health/clang-tidy-run-cc.sh +++ b/utils/health/clang-tidy-run-cc.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/clang-tidy-run-common.sh b/utils/health/clang-tidy-run-common.sh index b16d96584..fc34b7fe9 100755 --- a/utils/health/clang-tidy-run-common.sh +++ b/utils/health/clang-tidy-run-common.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/clang-tidy-run-cpp.sh b/utils/health/clang-tidy-run-cpp.sh index 3b5ea4b04..e8df05958 100755 --- a/utils/health/clang-tidy-run-cpp.sh +++ b/utils/health/clang-tidy-run-cpp.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/health/valgrind-tests.sh b/utils/health/valgrind-tests.sh index b1fb0b0f4..3248c8b91 100755 --- a/utils/health/valgrind-tests.sh +++ b/utils/health/valgrind-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Copyright (c) 2014-2022, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/alt_blocks_count b/utils/munin_plugins/alt_blocks_count index 372f11088..510adb080 100644 --- a/utils/munin_plugins/alt_blocks_count +++ b/utils/munin_plugins/alt_blocks_count @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/difficulty b/utils/munin_plugins/difficulty index 02a307a02..b97f5731f 100644 --- a/utils/munin_plugins/difficulty +++ b/utils/munin_plugins/difficulty @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/grey_peerlist_size b/utils/munin_plugins/grey_peerlist_size index 3dad08150..a18b4323a 100644 --- a/utils/munin_plugins/grey_peerlist_size +++ b/utils/munin_plugins/grey_peerlist_size @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/height b/utils/munin_plugins/height index 29c857817..bf7571a85 100644 --- a/utils/munin_plugins/height +++ b/utils/munin_plugins/height @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/incoming_connections_count b/utils/munin_plugins/incoming_connections_count index 9c92749a3..f6b5ac7d7 100644 --- a/utils/munin_plugins/incoming_connections_count +++ b/utils/munin_plugins/incoming_connections_count @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/outgoing_connections_count b/utils/munin_plugins/outgoing_connections_count index 277c02a15..33135a9dc 100644 --- a/utils/munin_plugins/outgoing_connections_count +++ b/utils/munin_plugins/outgoing_connections_count @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/tx_count b/utils/munin_plugins/tx_count index b61fe3b3d..11508a3cd 100644 --- a/utils/munin_plugins/tx_count +++ b/utils/munin_plugins/tx_count @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/tx_pool_size b/utils/munin_plugins/tx_pool_size index b8f81fbf6..8985ea99f 100644 --- a/utils/munin_plugins/tx_pool_size +++ b/utils/munin_plugins/tx_pool_size @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/munin_plugins/white_peerlist_size b/utils/munin_plugins/white_peerlist_size index 4cafb0fbc..8db255f07 100644 --- a/utils/munin_plugins/white_peerlist_size +++ b/utils/munin_plugins/white_peerlist_size @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014-2020, The Monero Project +# Copyright (c) 2014-2023, The Monero Project # # All rights reserved. # diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py index 2bb7e664f..43a1aa469 100644 --- a/utils/python-rpc/framework/daemon.py +++ b/utils/python-rpc/framework/daemon.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/utils/python-rpc/framework/rpc.py b/utils/python-rpc/framework/rpc.py index 58b1eb794..6d9a4b27e 100644 --- a/utils/python-rpc/framework/rpc.py +++ b/utils/python-rpc/framework/rpc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py index 0f6db76bd..d78cb732f 100644 --- a/utils/python-rpc/framework/wallet.py +++ b/utils/python-rpc/framework/wallet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. diff --git a/utils/python-rpc/framework/zmq.py b/utils/python-rpc/framework/zmq.py index 91ab70756..99d7be332 100644 --- a/utils/python-rpc/framework/zmq.py +++ b/utils/python-rpc/framework/zmq.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, The Monero Project +# Copyright (c) 2018-2023, The Monero Project # # All rights reserved. |