diff --git a/Dockerfile.focal.ci b/Dockerfile.focal.ci new file mode 100644 index 00000000..bffdaf9f --- /dev/null +++ b/Dockerfile.focal.ci @@ -0,0 +1,37 @@ +FROM ubuntu:20.04 +# Environment for build KomodoOcean + +# Build container: +# docker build -f Dockerfile.focal.ci --build-arg BUILDER_NAME=$USER --build-arg BUILDER_UID=$(id -u) --build-arg BUILDER_GID=$(id -g) -t ocean_focal_builder . +# Run interactive session in build environment: +# docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root -it ocean_focal_builder +# Run build itself: +# delete ./built/x86_64-unknown-linux-gnu before build (!) other version of linux, then do: +# ./zcutil/clean-help-dev.sh ; make clean ; zcutil/build.sh -j$(nproc --all) +# +# docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c "./zcutil/clean-help-dev.sh ; make clean ; zcutil/build.sh -j$(nproc --all)" + +ARG DEBIAN_FRONTEND=noninteractive +ARG BUILDER_NAME=builder +ARG BUILDER_UID=1000 +ARG BUILDER_GID=1000 +ENV TZ=Europe/Amsterdam + +RUN \ + apt-get update && apt-get install --no-install-recommends -y apt-transport-https ca-certificates curl &&\ + sed -i 's/archive\.ubuntu\.com/mirror\.nl\.leaseweb\.net/g' /etc/apt/sources.list &&\ + sed -i 's/http:/https:/g' /etc/apt/sources.list &&\ + apt-get update && apt-get install -y sudo &&\ + groupadd --gid ${BUILDER_GID} --force ${BUILDER_NAME} &&\ + adduser --disabled-password --gecos '' --no-create-home $BUILDER_NAME --uid ${BUILDER_UID} --gid ${BUILDER_GID} &&\ + adduser $BUILDER_NAME sudo &&\ + echo "$BUILDER_NAME ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/$BUILDER_NAME &&\ + apt-get install --no-install-recommends -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python bison zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake &&\ + apt-get install --no-install-recommends -y mingw-w64 &&\ + echo 1 | update-alternatives --config x86_64-w64-mingw32-gcc &&\ + echo 1 | update-alternatives --config x86_64-w64-mingw32-g++ &&\ + apt-get install --no-install-recommends -y librsvg2-bin libtiff-tools cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools libtinfo5 xorriso &&\ + chmod -R 777 /root +RUN \ + apt-get clean && rm -rf /var/lib/apt/lists/* + diff --git a/Dockerfile.xenial.ci b/Dockerfile.xenial.ci new file mode 100644 index 00000000..3c9cdc77 --- /dev/null +++ b/Dockerfile.xenial.ci @@ -0,0 +1,33 @@ +FROM ubuntu:16.04 +# Environment for build KomodoOcean + +# Build container: +# docker build -f Dockerfile.xenial.ci --build-arg BUILDER_NAME=$USER --build-arg BUILDER_UID=$(id -u) --build-arg BUILDER_GID=$(id -g) -t ocean_xenial_builder . +# Run interactive session in build environment: +# docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root -it ocean_xenial_builder +# Run build itself: +# delete ./built/x86_64-unknown-linux-gnu before build (!) other version of linux, then do: +# ./zcutil/clean-help-dev.sh ; make clean ; zcutil/build.sh -j$(nproc --all) +# +# docker run -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_xenial_builder /bin/bash -c "./zcutil/clean-help-dev.sh ; make clean ; zcutil/build.sh -j$(nproc --all)" + +ARG DEBIAN_FRONTEND=noninteractive +ARG BUILDER_NAME=builder +ARG BUILDER_UID=1000 +ARG BUILDER_GID=1000 +ENV TZ=Europe/Amsterdam + +RUN \ + apt-get update && apt-get install --no-install-recommends -y apt-transport-https ca-certificates curl &&\ + sed -i 's/archive\.ubuntu\.com/mirror\.nl\.leaseweb\.net/g' /etc/apt/sources.list &&\ + sed -i 's/http:/https:/g' /etc/apt/sources.list &&\ + apt-get update && apt-get install -y sudo &&\ + groupadd --gid ${BUILDER_GID} --force ${BUILDER_NAME} &&\ + adduser --disabled-password --gecos '' --no-create-home $BUILDER_NAME --uid ${BUILDER_UID} --gid ${BUILDER_GID} &&\ + adduser $BUILDER_NAME sudo &&\ + echo "$BUILDER_NAME ALL=(ALL:ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/$BUILDER_NAME &&\ + apt-get install --no-install-recommends -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python bison zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake &&\ + chmod -R 777 /root +RUN \ + apt-get clean && rm -rf /var/lib/apt/lists/* + diff --git a/README-dev.md b/README-dev.md index 4eaf976e..39daa088 100644 --- a/README-dev.md +++ b/README-dev.md @@ -115,4 +115,8 @@ make -C src/univalue clean make -C src/cryptoconditions clean rm src/qt/moc_*.cpp ``` -after each different build. \ No newline at end of file +after each different build. + +### part 6 + +For some reason moving out `PKG_CONFIG_SYSROOT_DIR`, `PKG_CONFIG_LIBDIR`, `QT_MAC_SDK_NO_VERSION_CHECK` environment variables into $(package)_config_env as mentione here - https://github.com/bitcoin/bitcoin/commit/affbf58a1e52a8e60c830be6a9e0347e0ff4c28e doesn't work for Qt package build, so we define them in `$(package)_config_cmds` in `qt.mk`. \ No newline at end of file diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 8b90ee3d..a716cd9a 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -5,8 +5,8 @@ dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. dnl Helper for cases where a qt dependency is not met. dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. AC_DEFUN([BITCOIN_QT_FAIL],[ - if test "x$bitcoin_qt_want_version" = xauto && test "x$bitcoin_qt_force" != xyes; then - if test "x$bitcoin_enable_qt" != xno; then + if test "$bitcoin_qt_want_version" = "auto" && test "$bitcoin_qt_force" != "yes"; then + if test "$bitcoin_enable_qt" != "no"; then AC_MSG_WARN([$1; bitcoin-qt frontend will not be built]) fi bitcoin_enable_qt=no @@ -17,7 +17,7 @@ AC_DEFUN([BITCOIN_QT_FAIL],[ ]) AC_DEFUN([BITCOIN_QT_CHECK],[ - if test "x$bitcoin_enable_qt" != xno && test "x$bitcoin_qt_want_version" != xno; then + if test "$bitcoin_enable_qt" != "no" && test "$bitcoin_qt_want_version" != "no"; then true $1 else @@ -35,12 +35,12 @@ dnl Inputs: $4: If "yes", don't fail if $2 is not found. dnl Output: $1 is set to the path of $2 if found. $2 are searched in order. AC_DEFUN([BITCOIN_QT_PATH_PROGS],[ BITCOIN_QT_CHECK([ - if test "x$3" != x; then + if test "$3" != ""; then AC_PATH_PROGS([$1], [$2], [], [$3]) else AC_PATH_PROGS([$1], [$2]) fi - if test "x$$1" = x && test "x$4" != xyes; then + if test "$$1" = "" && test "$4" != "yes"; then BITCOIN_QT_FAIL([$1 not found]) fi ]) @@ -57,20 +57,21 @@ AC_DEFUN([BITCOIN_QT_INIT],[ [build bitcoin-qt GUI (default=auto)])], [ bitcoin_qt_want_version=$withval - if test "x$bitcoin_qt_want_version" = xyes; then + if test "$bitcoin_qt_want_version" = "yes"; then bitcoin_qt_force=yes bitcoin_qt_want_version=auto fi ], [bitcoin_qt_want_version=auto]) - AS_IF([test "x$with_gui" = xqt5_debug], + AS_IF([test "$with_gui" = "qt5_debug"], [AS_CASE([$host], [*darwin*], [qt_lib_suffix=_debug], - [*mingw*], [qt_lib_suffix=d], [qt_lib_suffix= ]); bitcoin_qt_want_version=qt5], [qt_lib_suffix= ]) + AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH]) + AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) @@ -86,7 +87,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[ dnl Android doesn't support D-Bus and certainly doesn't use it for notifications case $host in *android*) - if test "x$use_dbus" != xyes; then + if test "$use_dbus" != "yes"; then use_dbus=no fi ;; @@ -115,13 +116,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_CHECK([ TEMP_CPPFLAGS=$CPPFLAGS TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CPPFLAGS" - CXXFLAGS="$PIC_FLAGS $CXXFLAGS" + CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" + CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS" _BITCOIN_QT_IS_STATIC - if test "x$bitcoin_cv_static_qt" = xyes; then + if test "$bitcoin_cv_static_qt" = "yes"; then _BITCOIN_QT_CHECK_STATIC_LIBS - if test "x$qt_plugin_path" != x; then + if test "$qt_plugin_path" != ""; then if test -d "$qt_plugin_path/platforms"; then QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" fi @@ -137,23 +138,21 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ fi AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static]) - if test "x$TARGET_OS" != xandroid; then + if test "$TARGET_OS" != "android"; then _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists]) fi - if test "x$TARGET_OS" = xwindows; then + if test "$TARGET_OS" = "windows"; then dnl Linking against wtsapi32 is required. See #17749 and dnl https://bugreports.qt.io/browse/QTBUG-27097. AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle]) AC_DEFINE([QT_QPA_PLATFORM_WINDOWS], [1], [Define this symbol if the qt platform is windows]) - elif test "x$TARGET_OS" = xlinux; then - dnl workaround for https://bugreports.qt.io/browse/QTBUG-74874 - AX_CHECK_LINK_FLAG([-lxcb-shm], [QT_LIBS="$QT_LIBS -lxcb-shm"], [AC_MSG_ERROR([could not link against -lxcb-shm])]) + elif test "$TARGET_OS" = "linux"; then _BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb]) AC_DEFINE([QT_QPA_PLATFORM_XCB], [1], [Define this symbol if the qt platform is xcb]) - elif test "x$TARGET_OS" = xdarwin; then + elif test "$TARGET_OS" = "darwin"; then AX_CHECK_LINK_FLAG([-framework Carbon], [QT_LIBS="$QT_LIBS -framework Carbon"], [AC_MSG_ERROR(could not link against Carbon framework)]) AX_CHECK_LINK_FLAG([-framework IOSurface], [QT_LIBS="$QT_LIBS -framework IOSurface"], [AC_MSG_ERROR(could not link against IOSurface framework)]) AX_CHECK_LINK_FLAG([-framework Metal], [QT_LIBS="$QT_LIBS -framework Metal"], [AC_MSG_ERROR(could not link against Metal framework)]) @@ -161,8 +160,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ _BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa]) - elif test "x$TARGET_OS" = xandroid; then - QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype $QT_LIBS" + elif test "$TARGET_OS" = "android"; then + QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS" AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android]) fi fi @@ -170,17 +169,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ CXXFLAGS=$TEMP_CXXFLAGS ]) - if test "x$qt_bin_path" = x; then + if test "$qt_bin_path" = ""; then qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`" fi - if test "x$use_hardening" != xno; then + if test "$use_hardening" != "no"; then BITCOIN_QT_CHECK([ AC_MSG_CHECKING([whether -fPIE can be used with this Qt config]) TEMP_CPPFLAGS=$CPPFLAGS TEMP_CXXFLAGS=$CXXFLAGS - CPPFLAGS="$QT_INCLUDES $CPPFLAGS" - CXXFLAGS="$PIE_FLAGS $CXXFLAGS" + CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" + CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef QT_VERSION @@ -202,7 +201,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_CHECK([ AC_MSG_CHECKING([whether -fPIC is needed with this Qt config]) TEMP_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$QT_INCLUDES $CPPFLAGS" + CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef QT_VERSION @@ -249,26 +248,26 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ BITCOIN_QT_CHECK([ bitcoin_enable_qt=yes bitcoin_enable_qt_test=yes - if test "x$have_qt_test" = xno; then + if test "$have_qt_test" = "no"; then bitcoin_enable_qt_test=no fi bitcoin_enable_qt_dbus=no - if test "x$use_dbus" != xno && test "x$have_qt_dbus" = xyes; then + if test "$use_dbus" != "no" && test "$have_qt_dbus" = "yes"; then bitcoin_enable_qt_dbus=yes fi - if test "x$use_dbus" = xyes && test "x$have_qt_dbus" = xno; then + if test "$use_dbus" = "yes" && test "$have_qt_dbus" = "no"; then AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.]) fi - if test "x$LUPDATE" = x; then + if test "$LUPDATE" = ""; then AC_MSG_WARN([lupdate tool is required to update Qt translations.]) fi - if test "x$LCONVERT" = x; then + if test "$LCONVERT" = ""; then AC_MSG_WARN([lconvert tool is required to update Qt translations.]) fi ],[ bitcoin_enable_qt=no ]) - if test x$bitcoin_enable_qt = xyes; then + if test $bitcoin_enable_qt = "yes"; then AC_MSG_RESULT([$bitcoin_enable_qt ($qt_lib_prefix)]) else AC_MSG_RESULT([$bitcoin_enable_qt]) @@ -279,9 +278,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ AC_SUBST(QT_LIBS) AC_SUBST(QT_LDFLAGS) AC_SUBST(QT_DBUS_INCLUDES) - AC_SUBST(QT_DBUS_LIBS) AC_SUBST(QT_TEST_INCLUDES) - AC_SUBST(QT_TEST_LIBS) AC_SUBST(QT_SELECT, qt5) AC_SUBST(MOC_DEFS) ]) @@ -349,18 +346,20 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [ PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"]) - if test "x$TARGET_OS" = xlinux; then + if test "$TARGET_OS" = "linux"; then PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}InputSupport], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"]) - elif test "x$TARGET_OS" = xdarwin; then + PKG_CHECK_MODULES([QT_XKBCOMMON], [${qt_lib_prefix}XkbCommonSupport], [QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"]) + elif test "$TARGET_OS" = "darwin"; then PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"]) PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) - elif test "x$TARGET_OS" = xwindows; then + elif test "$TARGET_OS" = "windows"; then PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"]) - elif test "x$TARGET_OS" = xandroid; then - PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) + elif test "$TARGET_OS" = "android"; then + PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) + PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) fi ]) @@ -391,7 +390,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[ BITCOIN_QT_CHECK([ PKG_CHECK_MODULES([QT_TEST], [${qt_lib_prefix}Test${qt_lib_suffix} $qt_version], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no]) - if test "x$use_dbus" != xno; then + if test "$use_dbus" != "no"; then PKG_CHECK_MODULES([QT_DBUS], [${qt_lib_prefix}DBus $qt_version], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no]) fi ]) diff --git a/build_releases.sh b/build_releases.sh new file mode 100755 index 00000000..450502e2 --- /dev/null +++ b/build_releases.sh @@ -0,0 +1,225 @@ +#!/usr/bin/env bash + +delete_linux_depends=false +force_rebuild_containers=false + +build_xenial=false +build_focal=true +build_windows=true +build_macos=true + +# we should rebuild linux depends before build for different linux os +if [[ $build_xenial == true && $build_focal == true ]]; then + delete_linux_depends=true +fi + +download_and_check_macos_sdk() { + url="https://bitcoincore.org/depends-sources/sdks/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" + output_file="Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz" + expected_checksum="be17f48fd0b08fb4dcd229f55a6ae48d9f781d210839b4ea313ef17dd12d6ea5" + + # Check if file exists + if [[ -f "$output_file" ]]; then + # Calculate checksum of the file + actual_checksum=$(sha256sum "$output_file" 2>/dev/null | awk '{print $1}') + if [[ -n $actual_checksum ]]; then + # Compare checksums + if [[ "$actual_checksum" == "$expected_checksum" ]]; then + echo "MacOS SDK already exists and has the correct checksum. Skipping download." + return + fi + fi + fi + + echo "Downloading MacOS SDK ..." + # Download the file + curl -L -o "$output_file" "$url" + + # Calculate checksum of the downloaded file + actual_checksum=$(sha256sum "$output_file" | awk '{print $1}') + + # Compare checksums + if [[ "$actual_checksum" != "$expected_checksum" ]]; then + echo "ERROR: Downloaded MacOS SDK has an invalid checksum." + exit 1 + fi + + echo "MacOS SDK downloaded successfully and has a valid checksum." +} + +delete_artefacts() { + local release_name=$1 + + if [[ "$release_name" = "windows" ]]; then + ext=".exe" + else + ext="" + fi + + mkdir -p ${WORKSPACE}/releases/${release_name} + + binaries=( + "src/komodod" + "src/wallet-utility" + "src/komodo-tx" + "src/komodo-cli" + "src/komodo-test" + "src/qt/komodo-qt" + ) + + for binary in "${binaries[@]}" + do + rm -f "${WORKSPACE}/${binary}${ext}" || false + done + + echo "Deleting artefacts from ${WORKSPACE} ..." + # delete possible artefacts from previous build(s) + find ${WORKSPACE}/src \( -name "*.a" -o -name "*.la" -o -name "*.o" -o -name "*.lo" -o -name "*.Plo" -o -name "*.Po" -o -name "*.lai" -o -name "*.dirstamp" \) -delete + find ${WORKSPACE}/src \( -name "*.a" -o -name "*.la" -o -name "*.o" -o -name "*.lo" -o -name "*.Plo" -o -name "*.Po" -o -name "*.lai" -o -name "*.dirstamp" \) -path "*/.*" -delete + rm -f ${WORKSPACE}/src/qt/moc_*.cpp # delete meta object code files, otherwise we will have MacOS after Linux/Windows build error +} + +copy_release() { + local release_name=$1 + + if [[ "$release_name" = "windows" ]]; then + ext=".exe" + else + ext="" + fi + + mkdir -p ${WORKSPACE}/releases/${release_name} + + binaries=( + "src/komodod" + "src/wallet-utility" + "src/komodo-tx" + "src/komodo-cli" + "src/qt/komodo-qt" + ) + + for binary in "${binaries[@]}" + do + case $release_name in + windows) + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c "/usr/bin/x86_64-w64-mingw32-strip ${WORKSPACE}/${binary}${ext}" || false + ;; + macos) + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c "${WORKSPACE}/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-strip ${WORKSPACE}/${binary}${ext}" || false + ;; + *) + strip "${WORKSPACE}/${binary}${ext}" || false + ;; + esac + cp -f "${WORKSPACE}/${binary}${ext}" "${WORKSPACE}/releases/${release_name}/" + done + + case $release_name in + xenial) + echo "Performing actions for Xenial..." + mv "${WORKSPACE}/releases/${release_name}/komodo-qt" "${WORKSPACE}/releases/${release_name}/komodo-qt-linux" + ;; + focal) + echo "Performing actions for Focal..." + mv "${WORKSPACE}/releases/${release_name}/komodo-qt" "${WORKSPACE}/releases/${release_name}/komodo-qt-linux" + ;; + windows) + echo "Performing actions for Windows..." + mv "${WORKSPACE}/releases/${release_name}/komodo-qt${ext}" "${WORKSPACE}/releases/${release_name}/komodo-qt-windows${ext}" + ;; + macos) + echo "Performing actions for MacOS..." + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c "make deploy" || false + cp -f ${WORKSPACE}/*.dmg "${WORKSPACE}/releases/${release_name}/" + mv "${WORKSPACE}/releases/${release_name}/komodo-qt${ext}" "${WORKSPACE}/releases/${release_name}/komodo-qt-mac${ext}" + ;; + *) + echo "Unknown release name: $release_name" + ;; + esac +} + +check_image_focal() { + if [[ "${force_rebuild_containers}" == "true" || "$(docker images --format '{{.Repository}}' | grep -c ocean_focal_builder)" -eq 0 ]]; then + echo "Container 'ocean_focal_builder' rebuilding ..." + docker build -f Dockerfile.focal.ci --build-arg BUILDER_NAME=$USER --build-arg BUILDER_UID=$(id -u) --build-arg BUILDER_GID=$(id -g) -t ocean_focal_builder . + fi +} + +check_image_xenial() { + if [[ "${force_rebuild_containers}" == "true" || "$(docker images --format '{{.Repository}}' | grep -c ocean_xenial_builder)" -eq 0 ]]; then + echo "Container 'ocean_xenial_builder' rebuilding ..." + docker build -f Dockerfile.xenial.ci --build-arg BUILDER_NAME=$USER --build-arg BUILDER_UID=$(id -u) --build-arg BUILDER_GID=$(id -g) -t ocean_xenial_builder . + fi +} + +# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself +SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +pushd ${SCRIPTPATH} +WORKSPACE=$(pwd) + +echo "Workspace directory: ${WORKSPACE}" + +# Check if awk command exists +command -v awk >/dev/null 2>&1 || { echo >&2 "ERROR: awk command not found."; exit 1; } +# Check if sha256sum command exists +command -v sha256sum >/dev/null 2>&1 || { echo >&2 "ERROR: sha256sum command not found."; exit 1; } +# Simple check if docker exists +command -v docker >/dev/null 2>&1 || { echo >&2 "ERROR: docker not found."; exit 1; } + +### xenial +if [[ "${build_xenial}" = "true" ]]; then + + # delete old depends binaries (from previous linux version, bcz it's x86_64-unknown-linux-gnu also) + if [[ "${delete_linux_depends}" = true ]]; then + rm -rf ${WORKSPACE}/depends/built/x86_64-unknown-linux-gnu + rm -rf ${WORKSPACE}/depends/x86_64-unknown-linux-gnu + fi + # delete possible artefacts from previous build(s) + delete_artefacts xenial + + check_image_xenial + + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_xenial_builder /bin/bash -c 'zcutil/build.sh -j'$(expr $(nproc) - 1) + copy_release xenial +fi + +### focal +if [[ "${build_focal}" = "true" ]]; then + + # delete old depends binaries (from previous linux version, bcz it's x86_64-unknown-linux-gnu also) + if [[ "${delete_linux_depends}" = true ]]; then + rm -rf ${WORKSPACE}/depends/built/x86_64-unknown-linux-gnu + rm -rf ${WORKSPACE}/depends/x86_64-unknown-linux-gnu + fi + # delete possible artefacts from previous build(s) + delete_artefacts focal + + check_image_focal + + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c 'zcutil/build.sh -j'$(expr $(nproc) - 1) + copy_release focal +fi + +### windows +if [[ "${build_windows}" = "true" ]]; then + delete_artefacts windows + + check_image_focal + + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c 'zcutil/build-win.sh -j'$(expr $(nproc) - 1) + copy_release windows +fi + +### macos +if [[ "${build_macos}" = "true" ]]; then + download_and_check_macos_sdk + delete_artefacts macos + + check_image_focal + + docker run -it -u $(id -u ${USER}):$(id -g ${USER}) -v $PWD:$PWD -w $PWD -e HOME=/root ocean_focal_builder /bin/bash -c 'zcutil/build-mac-cross.sh -j'$(expr $(nproc) - 1) + copy_release macos +fi + +popd \ No newline at end of file diff --git a/configure.ac b/configure.ac index 2a5c178e..ccb2bcc5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 8) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 0) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index 902fe43b..bb203d06 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -1,13 +1,18 @@ package=expat -$(package)_version=2.2.7 -$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_7/ -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=cbc9102f4a31a8dafd42d642e9a3aa31e79a0aedaa1f6efd2795ebc83174ec18 +$(package)_version=2.4.8 +$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$($(package)_version))/ +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25 +# -D_DEFAULT_SOURCE defines __USE_MISC, which exposes additional +# definitions in endian.h, which are required for a working +# endianess check in configure when building with -flto. define $(package)_set_vars $(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples $(package)_config_opts += --disable-dependency-tracking --enable-option-checking + $(package)_config_opts += --without-xmlwf $(package)_config_opts_linux=--with-pic + $(package)_cppflags += -D_DEFAULT_SOURCE endef define $(package)_config_cmds @@ -23,5 +28,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la + rm -rf share lib/cmake lib/*.la endef diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index 128599ba..444acfe3 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -1,26 +1,26 @@ package=fontconfig -$(package)_version=2.12.1 +$(package)_version=2.12.6 $(package)_download_path=https://www.freedesktop.org/software/fontconfig/release/ $(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 +$(package)_sha256_hash=cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017 $(package)_dependencies=freetype expat +$(package)_patches=gperf_header_regen.patch define $(package)_set_vars $(package)_config_opts=--disable-docs --disable-static --disable-libxml2 --disable-iconv $(package)_config_opts += --disable-dependency-tracking --enable-option-checking + $(package)_cflags += -Wno-implicit-function-declaration +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/gperf_header_regen.patch endef define $(package)_config_cmds $($(package)_autoconf) endef -# 2.12.1 uses CHAR_WIDTH which is reserved and clashes with some glibc versions, but newer versions of fontconfig -# have broken makefiles which needlessly attempt to re-generate headers with gperf. -# Instead, change all uses of CHAR_WIDTH, and disable the rule that forces header re-generation. -# This can be removed once the upstream build is fixed. define $(package)_build_cmds - sed -i 's/CHAR_WIDTH/CHARWIDTH/g' fontconfig/fontconfig.h src/fcobjshash.gperf src/fcobjs.h src/fcobjshash.h && \ - sed -i 's/fcobjshash.h: fcobjshash.gperf/fcobjshash.h:/' src/Makefile && \ $(MAKE) endef @@ -29,5 +29,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la + rm -rf var lib/*.la endef diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index a1584608..6f5dbe0f 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -1,12 +1,12 @@ package=freetype -$(package)_version=2.7.1 +$(package)_version=2.11.0 $(package)_download_path=https://download.savannah.gnu.org/releases/$(package) -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7 define $(package)_set_vars $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static - $(package)_config_opts += --enable-option-checking + $(package)_config_opts += --enable-option-checking --without-brotli $(package)_config_opts_linux=--with-pic endef @@ -23,5 +23,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la + rm -rf share/man lib/*.la endef diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index 4c55c2df..b7e032c0 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -1,8 +1,8 @@ package=libXau -$(package)_version=1.0.8 +$(package)_version=1.0.9 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/ $(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 +$(package)_sha256_hash=ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec $(package)_dependencies=xproto # When updating this package, check the default value of @@ -30,5 +30,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/*.la + rm -rf share lib/*.la endef diff --git a/depends/packages/libcurl.mk b/depends/packages/libcurl.mk index 29bb70cc..50317018 100644 --- a/depends/packages/libcurl.mk +++ b/depends/packages/libcurl.mk @@ -1,12 +1,13 @@ package=libcurl -$(package)_version=7.76.1 +$(package)_version=8.4.0 $(package)_dependencies=openssl $(package)_download_path=https://curl.haxx.se/download $(package)_file_name=curl-$($(package)_version).tar.gz -$(package)_sha256_hash=5f85c4d891ccb14d6c3c701da3010c91c6570c3419391d485d95235253d837d7 -$(package)_config_opts_linux=--disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-unknown-linux-gnu -$(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-w64-mingw32 --disable-ldap -$(package)_config_opts_darwin=--disable-shared --enable-static --prefix=$(host_prefix) --without-libidn2 --without-zstd +$(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 +$(package)_config_opts=--with-openssl --disable-shared --enable-static --prefix=$(host_prefix) +$(package)_config_opts_linux=--without-libidn2 --host=x86_64-unknown-linux-gnu +$(package)_config_opts_mingw32=--enable-mingw --host=x86_64-w64-mingw32 --disable-ldap +$(package)_config_opts_darwin=--without-libidn2 --without-zstd $(package)_cflags_darwin=-mmacosx-version-min=$(OSX_MIN_VERSION) $(package)_conf_tool=./configure diff --git a/depends/packages/librustzcash.mk b/depends/packages/librustzcash.mk index 13248ebc..49e7d7a0 100644 --- a/depends/packages/librustzcash.mk +++ b/depends/packages/librustzcash.mk @@ -11,7 +11,7 @@ $(package)_patches=cargo.config 0001-Start-using-cargo-clippy-for-CI.patch remov $(package)_rust_target=$(if $(rust_rust_target_$(canonical_host)),$(rust_rust_target_$(canonical_host)),$(canonical_host)) ifeq ($(host_os),mingw32) -$(package)_library_file=target/x86_64-pc-windows-gnu/release/rustzcash.lib +$(package)_library_file=target/x86_64-pc-windows-gnu/release/librustzcash.a else ifneq ($(canonical_host),$(build)) ifeq ($(build_os)$(host_os),darwindarwin) $(package)_library_file=target/release/librustzcash.a diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 710f4395..036eaf65 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -1,30 +1,27 @@ package=libxcb -$(package)_version=1.10 +$(package)_version=1.14 $(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5 +$(package)_file_name=$(package)-$($(package)_version).tar.xz +$(package)_sha256_hash=a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34 $(package)_dependencies=xcb_proto libXau +$(package)_patches = remove_pthread_stubs.patch define $(package)_set_vars -$(package)_config_opts=--disable-static --disable-build-docs --without-doxygen --without-launchd +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen --without-launchd $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -# Because we pass -qt-xcb to Qt, it will compile in a set of xcb helper libraries and extensions, -# so we skip building all of the extensions here. -# More info is available from: https://doc.qt.io/qt-5.9/linux-requirements.html +# Disable unneeded extensions. +# More info is available from: https://doc.qt.io/qt-5.15/linux-requirements.html $(package)_config_opts += --disable-composite --disable-damage --disable-dpms $(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx -$(package)_config_opts += --disable-present --disable-randr --disable-record -$(package)_config_opts += --disable-render --disable-resource --disable-screensaver -$(package)_config_opts += --disable-shape --disable-sync -$(package)_config_opts += --disable-xevie --disable-xfixes --disable-xfree86-dri -$(package)_config_opts += --disable-xinerama --disable-xinput -$(package)_config_opts += --disable-xprint --disable-selinux --disable-xtest -$(package)_config_opts += --disable-xv --disable-xvmc +$(package)_config_opts += --disable-present --disable-record --disable-resource +$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri +$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux +$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc endef define $(package)_preprocess_cmds cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \ - sed "s/pthread-stubs//" -i configure + patch -p1 -i $($(package)_patch_dir)/remove_pthread_stubs.patch endef define $(package)_config_cmds diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk new file mode 100644 index 00000000..6f1b9cd7 --- /dev/null +++ b/depends/packages/libxcb_util.mk @@ -0,0 +1,32 @@ +package=libxcb_util +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-$($(package)_version).tar.bz2 +$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9 +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +$(package)_config_opts += --with-pic +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_image.mk b/depends/packages/libxcb_util_image.mk new file mode 100644 index 00000000..d12d67e8 --- /dev/null +++ b/depends/packages/libxcb_util_image.mk @@ -0,0 +1,31 @@ +package=libxcb_util_image +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2 +$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc +$(package)_dependencies=libxcb libxcb_util + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_keysyms.mk b/depends/packages/libxcb_util_keysyms.mk new file mode 100644 index 00000000..d4f72ded --- /dev/null +++ b/depends/packages/libxcb_util_keysyms.mk @@ -0,0 +1,31 @@ +package=libxcb_util_keysyms +$(package)_version=0.4.0 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2 +$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 +$(package)_dependencies=libxcb xproto + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_render.mk b/depends/packages/libxcb_util_render.mk new file mode 100644 index 00000000..28f1fb07 --- /dev/null +++ b/depends/packages/libxcb_util_render.mk @@ -0,0 +1,31 @@ +package=libxcb_util_render +$(package)_version=0.3.9 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2 +$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxcb_util_wm.mk b/depends/packages/libxcb_util_wm.mk new file mode 100644 index 00000000..3b905ba4 --- /dev/null +++ b/depends/packages/libxcb_util_wm.mk @@ -0,0 +1,31 @@ +package=libxcb_util_wm +$(package)_version=0.4.1 +$(package)_download_path=https://xcb.freedesktop.org/dist +$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2 +$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f +$(package)_dependencies=libxcb + +define $(package)_set_vars +$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen +$(package)_config_opts += --disable-dependency-tracking --enable-option-checking +endef + +define $(package)_preprocess_cmds + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . +endef + +define $(package)_config_cmds + $($(package)_autoconf) +endef + +define $(package)_build_cmds + $(MAKE) +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install +endef + +define $(package)_postprocess_cmds + rm -rf share/man share/doc lib/*.la +endef diff --git a/depends/packages/libxkbcommon.mk b/depends/packages/libxkbcommon.mk index 8c6c5654..bcdcf671 100644 --- a/depends/packages/libxkbcommon.mk +++ b/depends/packages/libxkbcommon.mk @@ -5,9 +5,14 @@ $(package)_file_name=$(package)-$($(package)_version).tar.xz $(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b $(package)_dependencies=libxcb +# This package explicitly enables -Werror=array-bounds, which causes build failures +# with GCC 12.1+. Work around that by turning errors back into warnings. +# This workaround would be dropped if the package was updated, as that would require +# a different build system (Meson) define $(package)_set_vars $(package)_config_opts = --enable-option-checking --disable-dependency-tracking $(package)_config_opts += --disable-static --disable-docs +$(package)_cflags += -Wno-error=array-bounds endef define $(package)_preprocess_cmds diff --git a/depends/packages/native_clang.mk b/depends/packages/native_clang.mk index 25ac77c1..b10f8143 100644 --- a/depends/packages/native_clang.mk +++ b/depends/packages/native_clang.mk @@ -1,14 +1,14 @@ package=native_clang -$(package)_version=10.0.1 +$(package)_version=15.0.6 $(package)_download_path=https://github.com/llvm/llvm-project/releases/download/llvmorg-$($(package)_version) ifneq (,$(findstring aarch64,$(BUILD))) $(package)_download_file=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz $(package)_file_name=clang+llvm-$($(package)_version)-aarch64-linux-gnu.tar.xz -$(package)_sha256_hash=90dc69a4758ca15cd0ffa45d07fbf5bf4309d47d2c7745a9f0735ecffde9c31f +$(package)_sha256_hash=8ca4d68cf103da8331ca3f35fe23d940c1b78fb7f0d4763c1c059e352f5d1bec else -$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-16.04.tar.xz -$(package)_sha256_hash=48b83ef827ac2c213d5b64f5ad7ed082c8bcb712b46644e0dc5045c6f462c231 +$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz +$(package)_file_name=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz +$(package)_sha256_hash=38bc7f5563642e73e69ac5626724e206d6d539fbef653541b34cae0ba9c3f036 endif define $(package)_preprocess_cmds diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 10e0c58e..3f71a495 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -9,7 +9,7 @@ endif qt_native_packages = native_protobuf qt_packages = qrencode protobuf -qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon +qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm qt_android_packages=qt qt_darwin_packages=qt diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index d26e18c4..d9a19857 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,30 +1,39 @@ -PACKAGE=qt -$(package)_version=5.12.11 -$(package)_download_path=https://download.qt.io/archive/qt/5.12/$($(package)_version)/submodules -$(package)_suffix=everywhere-src-$($(package)_version).tar.xz +package=qt +$(package)_version=5.15.5 +$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules +$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=1c1b4e33137ca77881074c140d54c3c9747e845a31338cfe8680f171f0bc3a39 -$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon +$(package)_sha256_hash=0c42c799aa7c89e479a07c451bf5a301e291266ba789e81afc18f95049524edc +$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_linguist_tools = lrelease lupdate lconvert -$(package)_patches = qt.pro qttools_src.pro -$(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch -$(package)_patches += support_new_android_ndks.patch fix_android_jni_static.patch dont_hardcode_pwd.patch -$(package)_patches+= no_sdk_version_check.patch -$(package)_patches+= fix_lib_paths.patch fix_android_pch.patch -$(package)_patches+= qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch -$(package)_patches+= fix_cocoa_cgcolorspaceref.patch +$(package)_patches = qt.pro +$(package)_patches += qttools_src.pro +$(package)_patches += mac-qmake.conf +$(package)_patches += fix_qt_pkgconfig.patch +$(package)_patches += no-xlib.patch +$(package)_patches += dont_hardcode_x86_64.patch +$(package)_patches += fix_montery_include.patch +$(package)_patches += fix_android_jni_static.patch +$(package)_patches += dont_hardcode_pwd.patch +$(package)_patches += qtbase-moc-ignore-gcc-macro.patch +$(package)_patches += use_android_ndk23.patch +$(package)_patches += rcc_hardcode_timestamp.patch +$(package)_patches += duplicate_lcqpafonts.patch +$(package)_patches += fast_fixed_dtoa_no_optimize.patch +$(package)_patches += guix_cross_lib_path.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=577b0668a777eb2b451c61e8d026d79285371597ce9df06b6dee6c814164b7c3 +$(package)_qttranslations_sha256_hash=c92af4171397a0ed272330b4fa0669790fcac8d050b07c8b8cc565ebeba6735e $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=98b2aaca230458f65996f3534fd471d2ffd038dd58ac997c0589c06dc2385b4f +$(package)_qttools_sha256_hash=6d0778b71b2742cb527561791d1d3d255366163d54a10f78c683a398f09ffc6c $(package)_extra_sources = $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) define $(package)_set_vars +$(package)_config_env = QT_MAC_SDK_NO_VERSION_CHECK=1 $(package)_config_opts_release = -release $(package)_config_opts_release += -silent $(package)_config_opts_debug = -debug @@ -36,7 +45,7 @@ $(package)_config_opts += -no-compile-examples $(package)_config_opts += -no-cups $(package)_config_opts += -no-egl $(package)_config_opts += -no-eglfs -$(package)_config_opts += -no-freetype +$(package)_config_opts += -no-evdev $(package)_config_opts += -no-gif $(package)_config_opts += -no-glib $(package)_config_opts += -no-icu @@ -47,10 +56,12 @@ $(package)_config_opts += -no-linuxfb $(package)_config_opts += -no-libjpeg $(package)_config_opts += -no-libproxy $(package)_config_opts += -no-libudev +$(package)_config_opts += -no-mimetype-database $(package)_config_opts += -no-mtdev $(package)_config_opts += -no-openssl $(package)_config_opts += -no-openvg $(package)_config_opts += -no-reduce-relocations +$(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp $(package)_config_opts += -no-securetransport $(package)_config_opts += -no-sql-db2 @@ -64,6 +75,7 @@ $(package)_config_opts += -no-sql-sqlite $(package)_config_opts += -no-sql-sqlite2 $(package)_config_opts += -no-system-proxies $(package)_config_opts += -no-use-gold-linker +$(package)_config_opts += -no-zstd $(package)_config_opts += -nomake examples $(package)_config_opts += -nomake tests $(package)_config_opts += -nomake tools @@ -101,6 +113,7 @@ $(package)_config_opts += -no-feature-sqlmodel $(package)_config_opts += -no-feature-statemachine $(package)_config_opts += -no-feature-syntaxhighlighter $(package)_config_opts += -no-feature-textbrowser +$(package)_config_opts += -no-feature-textmarkdownwriter $(package)_config_opts += -no-feature-textodfwriter $(package)_config_opts += -no-feature-topleveldomain $(package)_config_opts += -no-feature-udpsocket @@ -116,8 +129,12 @@ $(package)_config_opts_darwin = -no-dbus $(package)_config_opts_darwin += -no-opengl $(package)_config_opts_darwin += -pch $(package)_config_opts_darwin += -no-feature-corewlan +$(package)_config_opts_darwin += -no-freetype $(package)_config_opts_darwin += QMAKE_MACOSX_DEPLOYMENT_TARGET=$(OSX_MIN_VERSION) +# Optimizing using > -O1 causes non-determinism when building across arches. +$(package)_config_opts_aarch64_darwin += "QMAKE_CFLAGS_OPTIMIZE_FULL = -O1" + ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) @@ -127,10 +144,12 @@ $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif -# for macOS on Apple Silicon (ARM) see https://bugreports.qt.io/browse/QTBUG-85279 +ifneq ($(build_arch),$(host_arch)) $(package)_config_opts_aarch64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 +$(package)_config_opts_x86_64_darwin += -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 +endif -$(package)_config_opts_linux = -qt-xcb +$(package)_config_opts_linux = -xcb $(package)_config_opts_linux += -no-xcb-xlib $(package)_config_opts_linux += -no-feature-xlib $(package)_config_opts_linux += -system-freetype @@ -138,21 +157,29 @@ $(package)_config_opts_linux += -fontconfig $(package)_config_opts_linux += -no-opengl $(package)_config_opts_linux += -no-feature-vulkan $(package)_config_opts_linux += -dbus-runtime -$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ -$(package)_config_opts_i686_linux = -xplatform linux-g++-32 -$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64 -$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++ -$(package)_config_opts_powerpc64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ -$(package)_config_opts_powerpc64le_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ -$(package)_config_opts_riscv64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ -$(package)_config_opts_s390x_linux = -platform linux-g++ -xplatform bitcoin-linux-g++ +ifneq ($(LTO),) +$(package)_config_opts_linux += -ltcg +endif + +ifneq (,$(findstring clang,$($(package)_cxx))) + ifneq (,$(findstring -stdlib=libc++,$($(package)_cxx))) + $(package)_config_opts_linux += -platform linux-clang-libc++ -xplatform linux-clang-libc++ + else + $(package)_config_opts_linux += -platform linux-clang -xplatform linux-clang + endif +else + $(package)_config_opts_linux += -platform linux-g++ -xplatform bitcoin-linux-g++ +endif $(package)_config_opts_mingw32 = -no-opengl $(package)_config_opts_mingw32 += -no-dbus +$(package)_config_opts_mingw32 += -no-freetype $(package)_config_opts_mingw32 += -xplatform win32-g++ $(package)_config_opts_mingw32 += "QMAKE_CFLAGS = '$($(package)_cflags) $($(package)_cppflags)'" -$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cflags) $($(package)_cppflags)'" +$(package)_config_opts_mingw32 += "QMAKE_CXX = '$($(package)_cxx)'" +$(package)_config_opts_mingw32 += "QMAKE_CXXFLAGS = '$($(package)_cxxflags) $($(package)_cppflags)'" $(package)_config_opts_mingw32 += "QMAKE_LFLAGS = '$($(package)_ldflags)'" +$(package)_config_opts_mingw32 += "QMAKE_LIB = '$($(package)_ar) rc'" $(package)_config_opts_mingw32 += -device-option CROSS_COMPILE="$(host)-" $(package)_config_opts_mingw32 += -pch @@ -160,10 +187,7 @@ $(package)_config_opts_android = -xplatform android-clang $(package)_config_opts_android += -android-sdk $(ANDROID_SDK) $(package)_config_opts_android += -android-ndk $(ANDROID_NDK) $(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL) -$(package)_config_opts_android += -device-option CROSS_COMPILE="$(host)-" $(package)_config_opts_android += -egl -$(package)_config_opts_android += -qpa xcb -$(package)_config_opts_android += -no-eglfs $(package)_config_opts_android += -no-dbus $(package)_config_opts_android += -opengl es2 $(package)_config_opts_android += -qt-freetype @@ -176,7 +200,6 @@ $(package)_config_opts_android += -no-feature-vulkan $(package)_config_opts_aarch64_android += -android-arch arm64-v8a $(package)_config_opts_armv7a_android += -android-arch armeabi-v7a $(package)_config_opts_x86_64_android += -android-arch x86_64 -$(package)_config_opts_i686_android += -android-arch i686 $(package)_config_opts_linux += -c++std c++11 $(package)_config_opts_mingw32 += -c++std c++11 @@ -211,49 +234,47 @@ endef # 2. Create a macOS-Clang-Linux mkspec using our mac-qmake.conf. # # 3. After making a copy of the mkspec for the linux-arm-gnueabi host, named -# bitcoin-linux-g++, replace instances of linux-arm-gnueabi with $(host). This -# way we can generically support hosts like riscv64-linux-gnu, which Qt doesn't -# ship a mkspec for. See it's usage in config_opts_* above. +# bitcoin-linux-g++, replace tool names with $($($(package)_type)_TOOL). # # 4. Put our C, CXX and LD FLAGS into gcc-base.conf. Only used for non-host builds. # -# 5. Do similar for the win32-g++ mkspec. -# -# 6. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. -# -# 7. Adjust a regex in toolchain.prf, to accommodate Guix's usage of -# CROSS_LIBRARY_PATH. See #15277. +# 5. In clang.conf, swap out clang & clang++, for our compiler + flags. See #17466. define $(package)_preprocess_cmds cp $($(package)_patch_dir)/qt.pro qt.pro && \ cp $($(package)_patch_dir)/qttools_src.pro qttools/src/src.pro && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \ - patch -p1 -i $($(package)_patch_dir)/support_new_android_ndks.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_android_pch.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ - patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \ + patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_cocoa_cgcolorspaceref.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \ + patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \ + patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ + patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ + patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ + patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \ - sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-gcc|$($($(package)_type)_CC)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-g++|$($($(package)_type)_CXX)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-ar|$($($(package)_type)_AR)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-objcopy|$($($(package)_type)_OBJCOPY)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-nm|$($($(package)_type)_NM)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ + sed -i.old "s|arm-linux-gnueabi-strip|$($($(package)_type)_STRIP)|" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \ sed -i.old "s|QMAKE_CC = \$$$$\$$$${CROSS_COMPILE}clang|QMAKE_CC = $($(package)_cc)|" qtbase/mkspecs/common/clang.conf && \ - sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf && \ - sed -i.old "s/LIBRARY_PATH/(CROSS_)?\0/g" qtbase/mkspecs/features/toolchain.prf + sed -i.old "s|QMAKE_CXX = \$$$$\$$$${CROSS_COMPILE}clang++|QMAKE_CXX = $($(package)_cxx)|" qtbase/mkspecs/common/clang.conf endef define $(package)_config_cmds export PKG_CONFIG_SYSROOT_DIR=/ && \ export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ + export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ cd qtbase && \ ./configure -top-level $($(package)_config_opts) endef diff --git a/depends/packages/rust.mk b/depends/packages/rust.mk index 933d81d1..0b115ec9 100644 --- a/depends/packages/rust.mk +++ b/depends/packages/rust.mk @@ -1,29 +1,35 @@ package=rust -$(package)_version=1.36.0 +# To update the Rust compiler, change the version below and then run the script +# ./contrib/devtools/update-rust-hashes.sh +$(package)_version=1.69.0 $(package)_download_path=https://static.rust-lang.org/dist $(package)_file_name_linux=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz -$(package)_sha256_hash_linux=15e592ec52f14a0586dcebc87a957e472c4544e07359314f6354e2b8bd284c55 +$(package)_sha256_hash_linux=2ca4a306047c0b8b4029c382910fcbc895badc29680e0332c9df990fd1c70d4f $(package)_file_name_darwin=rust-$($(package)_version)-x86_64-apple-darwin.tar.gz -$(package)_sha256_hash_darwin=91f151ec7e24f5b0645948d439fc25172ec4012f0584dd16c3fb1acb709aa325 +$(package)_sha256_hash_darwin=9818dab2c3726d63dfbfde12c9273e62e484ef6d6f6e05a6431a3e089c335454 $(package)_file_name_freebsd=rust-$($(package)_version)-x86_64-unknown-freebsd.tar.gz -$(package)_sha256_hash_freebsd=eeeb1e9d0d7823c55f00f434789696e7249f465ba5966a5ab479040e3912c0e7 +$(package)_sha256_hash_freebsd=2985d98910b4a1dd336bfc7a1ac3b18082ed917cff097b4db6f0d6602016c289 # Mapping from GCC canonical hosts to Rust targets -# If a mapping is not present, we assume they are identical -$(package)_rust_target_x86_64-apple-darwin11=x86_64-apple-darwin -$(package)_rust_target_x86_64-apple-darwin18=x86_64-apple-darwin -$(package)_rust_target_x86_64-apple-darwin19=x86_64-apple-darwin +# If a mapping is not present, we assume they are identical, unless $host_os is +# "darwin", in which case we assume x86_64-apple-darwin. +$(package)_rust_target_x86_64-pc-linux-gnu=x86_64-unknown-linux-gnu $(package)_rust_target_x86_64-w64-mingw32=x86_64-pc-windows-gnu # Mapping from Rust targets to SHA-256 hashes -$(package)_rust_std_sha256_hash_aarch64-unknown-linux-gnu=22bfc32b5003c3d5259babb202f3f66be16fa6f3c75c20f429a16d7ef5eb1928 -$(package)_rust_std_sha256_hash_x86_64-apple-darwin=7c6806809e010e5fba1780007ecff5c31f0ad2fcac1b414b98ca3baa0fb41b36 -$(package)_rust_std_sha256_hash_x86_64-pc-windows-gnu=3657c361f5d6048c2cb814f1773fece07b840276d60f012d0bf70993fa95a77e +$(package)_rust_std_sha256_hash_aarch64-unknown-linux-gnu=8f42b40c0a0658ee75ce758652c9821fac7db3fbd8d20f7fb2483ec2c57ee0ac +$(package)_rust_std_sha256_hash_x86_64-apple-darwin=e44d71250dc5a238da0dc4784dad59d562862653adecd31ea52e0920b85c6a7c +$(package)_rust_std_sha256_hash_x86_64-pc-windows-gnu=09ded4a4c27c16aff9c9911640b1bdf6e1172237ce540ed4dc3e166e9438f0d7 define rust_target $(if $($(1)_rust_target_$(2)),$($(1)_rust_target_$(2)),$(if $(findstring darwin,$(3)),x86_64-apple-darwin,$(if $(findstring freebsd,$(3)),x86_64-unknown-freebsd,$(2)))) endef +define $(package)_set_vars +$(package)_stage_opts=--disable-ldconfig +$(package)_stage_build_opts=--without=rust-docs-json-preview,rust-docs +endef + ifneq ($(canonical_host),$(build)) $(package)_rust_target=$(call rust_target,$(package),$(canonical_host),$(host_os)) $(package)_exact_file_name=rust-std-$($(package)_version)-$($(package)_rust_target).tar.gz @@ -53,12 +59,12 @@ endef # Runs from: build dir/$(package)_build_subdir # first install.sh is from buildos for native build_os platform, second it for host_os (target) platform define $(package)_stage_cmds - bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) --disable-ldconfig --without=rust-docs && \ - ../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) --disable-ldconfig --without=rust-docs + bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) $($(package)_stage_opts) $($(package)_stage_build_opts) && \ + ../$(canonical_host)/install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) $($(package)_stage_opts) endef else # for normal compilation (non-cross) define $(package)_stage_cmds - bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) --disable-ldconfig --without=rust-docs + bash ./install.sh --destdir=$($(package)_staging_dir) --prefix=$(build_prefix) $($(package)_stage_opts) $($(package)_stage_build_opts) endef endif diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk index 01203a07..9be82250 100644 --- a/depends/packages/xcb_proto.mk +++ b/depends/packages/xcb_proto.mk @@ -1,8 +1,8 @@ package=xcb_proto -$(package)_version=1.10 -$(package)_download_path=https://xcb.freedesktop.org/dist -$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2 -$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05 +$(package)_version=1.14.1 +$(package)_download_path=https://xorg.freedesktop.org/archive/individual/proto +$(package)_file_name=xcb-proto-$($(package)_version).tar.xz +$(package)_sha256_hash=f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3 define $(package)_config_cmds $($(package)_autoconf) @@ -17,6 +17,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - find -name "*.pyc" -delete && \ - find -name "*.pyo" -delete + rm -rf lib/python*/site-packages/xcbgen/__pycache__ endef diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk index 6bd867d0..7a43c52f 100644 --- a/depends/packages/xproto.mk +++ b/depends/packages/xproto.mk @@ -1,8 +1,8 @@ package=xproto -$(package)_version=7.0.26 +$(package)_version=7.0.31 $(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto $(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f +$(package)_sha256_hash=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747 define $(package)_set_vars $(package)_config_opts=--without-fop --without-xmlto --without-xsltproc --disable-specs diff --git a/depends/patches/fontconfig/gperf_header_regen.patch b/depends/patches/fontconfig/gperf_header_regen.patch new file mode 100644 index 00000000..b1a70d5f --- /dev/null +++ b/depends/patches/fontconfig/gperf_header_regen.patch @@ -0,0 +1,24 @@ +commit 7b6eb33ecd88768b28c67ce5d2d68a7eed5936b6 +Author: fanquake +Date: Tue Aug 25 14:34:53 2020 +0800 + + Remove rule that causes inadvertent header regeneration + + Otherwise the makefile will needlessly attempt to re-generate the + headers with gperf. This can be dropped once the upstream build is fixed. + + See #10851. + +diff --git a/src/Makefile.in b/src/Makefile.in +index f4626ad..4ae1b00 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -912,7 +912,7 @@ + ' - > $@.tmp && \ + mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false ) + +-fcobjshash.h: Makefile fcobjshash.gperf ++fcobjshash.h: + $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \ + mv -f $@.tmp $@ || ( $(RM) $@.tmp && false ) + diff --git a/depends/patches/libxcb/remove_pthread_stubs.patch b/depends/patches/libxcb/remove_pthread_stubs.patch new file mode 100644 index 00000000..1f32dea5 --- /dev/null +++ b/depends/patches/libxcb/remove_pthread_stubs.patch @@ -0,0 +1,12 @@ +Remove uneeded pthread-stubs dependency +--- a/configure ++++ b/configure +@@ -19695,7 +19695,7 @@ fi + NEEDED="xau >= 0.99.2" + case $host_os in + linux*) ;; +- *) NEEDED="$NEEDED pthread-stubs" ;; ++ *) NEEDED="$NEEDED" ;; + esac + + pkg_failed=no diff --git a/depends/patches/qt/dont_hardcode_x86_64.patch b/depends/patches/qt/dont_hardcode_x86_64.patch new file mode 100644 index 00000000..a6642687 --- /dev/null +++ b/depends/patches/qt/dont_hardcode_x86_64.patch @@ -0,0 +1,119 @@ +macOS: Don't hard-code x86_64 as the architecture when using qmake + +Upstream commit: + - Qt 6.1: 9082cc8e8d5a6441dabe5e7a95bc0cd9085b95fe + +For other Qt branches see +https://codereview.qt-project.org/q/I70db7e4c27f0d3da5d0af33cb491d72c312d3fa8 + + +--- old/qtbase/configure.json ++++ new/qtbase/configure.json +@@ -244,11 +244,18 @@ + + "testTypeDependencies": { + "linkerSupportsFlag": [ "use_bfd_linker", "use_gold_linker", "use_lld_linker" ], +- "verifySpec": [ "shared", "use_bfd_linker", "use_gold_linker", "use_lld_linker", "compiler-flags", "qmakeargs", "commit" ], ++ "verifySpec": [ ++ "shared", ++ "use_bfd_linker", "use_gold_linker", "use_lld_linker", ++ "compiler-flags", "qmakeargs", ++ "simulator_and_device", ++ "thread", ++ "commit" ], + "compile": [ "verifyspec" ], + "detectPkgConfig": [ "cross_compile", "machineTuple" ], + "library": [ "pkg-config", "compiler-flags" ], +- "getPkgConfigVariable": [ "pkg-config" ] ++ "getPkgConfigVariable": [ "pkg-config" ], ++ "architecture" : [ "verifyspec" ] + }, + + "testTypeAliases": { +@@ -762,7 +769,7 @@ + }, + "architecture": { + "label": "Architecture", +- "output": [ "architecture" ] ++ "output": [ "architecture", "commitConfig" ] + }, + "pkg-config": { + "label": "Using pkg-config", +diff --git a/configure.pri b/configure.pri +index 49755f7abfd..8be9b10d7d4 100644 +--- old/qtbase/configure.pri ++++ new/qtbase/configure.pri +@@ -662,6 +662,13 @@ defineTest(qtConfOutput_commitOptions) { + write_file($$QT_BUILD_TREE/mkspecs/qdevice.pri, $${currentConfig}.output.devicePro)|error() + } + ++# Output is written after configuring each Qt module, ++# but some tests within a module might depend on the ++# configuration output of previous tests. ++defineTest(qtConfOutput_commitConfig) { ++ qtConfProcessOutput() ++} ++ + # type (empty or 'host'), option name, default value + defineTest(processQtPath) { + out_var = config.rel_input.$${2} +diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf +index d16b77acb8e..4ba0a8eaa36 100644 +--- old/qtbase/mkspecs/common/macx.conf ++++ new/qtbase/mkspecs/common/macx.conf +@@ -6,7 +6,6 @@ QMAKE_PLATFORM += macos osx macx + QMAKE_MAC_SDK = macosx + + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 +-QMAKE_APPLE_DEVICE_ARCHS = x86_64 + + # Should be 10.15, but as long as the CI builds with + # older SDKs we have to keep this. +diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf +index 92a9112bca6..d888731ec8d 100644 +--- old/qtbase/mkspecs/features/mac/default_post.prf ++++ new/qtbase/mkspecs/features/mac/default_post.prf +@@ -95,6 +95,11 @@ app_extension_api_only { + QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION + } + ++# Non-universal builds do not set QMAKE_APPLE_DEVICE_ARCHS, ++# so we pick it up from what the arch test resolved instead. ++isEmpty(QMAKE_APPLE_DEVICE_ARCHS): \ ++ QMAKE_APPLE_DEVICE_ARCHS = $$QT_ARCH ++ + macx-xcode { + qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO + !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ +@@ -150,9 +155,6 @@ macx-xcode { + simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS + VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS + +- isEmpty(VALID_ARCHS): \ +- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") +- + single_arch: VALID_ARCHS = $$first(VALID_ARCHS) + + ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) +diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf +index efbe7c1e55b..8add6dc8043 100644 +--- old/qtbase/mkspecs/features/toolchain.prf ++++ new/qtbase/mkspecs/features/toolchain.prf +@@ -182,9 +182,14 @@ isEmpty($${target_prefix}.INCDIRS) { + # UIKit simulator platforms will see the device SDK's sysroot in + # QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass. + darwin { +- # Clang doesn't pick up the architecture from the sysroot, and will +- # default to the host architecture, so we need to manually set it. +- cxx_flags += -arch $$QMAKE_APPLE_DEVICE_ARCHS ++ uikit { ++ # Clang doesn't automatically pick up the architecture, just because ++ # we're passing the iOS sysroot below, and we will end up building the ++ # test for the host architecture, resulting in linker errors when ++ # linking against the iOS libraries. We work around this by passing ++ # the architecture explicitly. ++ cxx_flags += -arch $$first(QMAKE_APPLE_DEVICE_ARCHS) ++ } + + uikit:macx-xcode: \ + cxx_flags += -isysroot $$sdk_path_device.value diff --git a/depends/patches/qt/duplicate_lcqpafonts.patch b/depends/patches/qt/duplicate_lcqpafonts.patch new file mode 100644 index 00000000..c460b51d --- /dev/null +++ b/depends/patches/qt/duplicate_lcqpafonts.patch @@ -0,0 +1,104 @@ +QtGui: Fix duplication of logging category lcQpaFonts + +Move it to qplatformfontdatabase.h. + +Upstream commit: + - Qt 6.0: ab01885e48873fb2ad71841a3f1627fe4d9cd835 + +--- a/qtbase/src/gui/text/qplatformfontdatabase.cpp ++++ b/qtbase/src/gui/text/qplatformfontdatabase.cpp +@@ -52,6 +52,8 @@ + + QT_BEGIN_NAMESPACE + ++Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") ++ + void qt_registerFont(const QString &familyname, const QString &stylename, + const QString &foundryname, int weight, + QFont::Style style, int stretch, bool antialiased, + +--- a/qtbase/src/gui/text/qplatformfontdatabase.h ++++ b/qtbase/src/gui/text/qplatformfontdatabase.h +@@ -50,6 +50,7 @@ + // + + #include ++#include + #include + #include + #include +@@ -62,6 +63,7 @@ + + QT_BEGIN_NAMESPACE + ++Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) + + class QWritingSystemsPrivate; + + +--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm ++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +@@ -86,8 +86,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") +- + static float SYNTHETIC_ITALIC_SKEW = std::tan(14.f * std::acos(0.f) / 90.f); + + bool QCoreTextFontEngine::ct_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length) + +--- a/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h ++++ b/qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h +@@ -64,8 +64,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) +- + class QCoreTextFontEngine : public QFontEngine + { + Q_GADGET + +--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp ++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp +@@ -68,8 +68,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") +- + #ifndef QT_NO_DIRECTWRITE + // ### fixme: Consider direct linking of dwrite.dll once Windows Vista pre SP2 is dropped (QTBUG-49711) + + +--- a/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h ++++ b/qtbase/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h +@@ -63,8 +63,6 @@ + + QT_BEGIN_NAMESPACE + +-Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts) +- + class QWindowsFontEngineData + { + Q_DISABLE_COPY_MOVE(QWindowsFontEngineData) + +--- a/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp ++++ b/qtbase/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +@@ -40,6 +40,7 @@ + #include "qgenericunixthemes_p.h" + + #include "qpa/qplatformtheme_p.h" ++#include "qpa/qplatformfontdatabase.h" + + #include + #include +@@ -76,7 +77,6 @@ + QT_BEGIN_NAMESPACE + + Q_DECLARE_LOGGING_CATEGORY(qLcTray) +-Q_LOGGING_CATEGORY(lcQpaFonts, "qt.qpa.fonts") + + ResourceHelper::ResourceHelper() + { diff --git a/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch new file mode 100644 index 00000000..d4d6539f --- /dev/null +++ b/depends/patches/qt/fast_fixed_dtoa_no_optimize.patch @@ -0,0 +1,20 @@ +Modify the optimisation flags for FastFixedDtoa. +This fixes a non-determinism issue in the asm produced for +this function when cross-compiling on x86_64 and aarch64 for +the arm-linux-gnueabihf HOST. + +--- a/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h ++++ b/qtbase/src/3rdparty/double-conversion/fixed-dtoa.h +@@ -48,9 +48,12 @@ namespace double_conversion { + // + // This method only works for some parameters. If it can't handle the input it + // returns false. The output is null-terminated when the function succeeds. ++#pragma GCC push_options ++#pragma GCC optimize ("-O1") + bool FastFixedDtoa(double v, int fractional_count, + Vector buffer, int* length, int* decimal_point); + ++#pragma GCC pop_options + } // namespace double_conversion + + #endif // DOUBLE_CONVERSION_FIXED_DTOA_H_ diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch index a186aeb8..936b82e1 100644 --- a/depends/patches/qt/fix_android_jni_static.patch +++ b/depends/patches/qt/fix_android_jni_static.patch @@ -1,6 +1,6 @@ --- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp +++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp -@@ -898,6 +898,14 @@ +@@ -943,6 +943,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); return -1; } diff --git a/depends/patches/qt/fix_android_pch.patch b/depends/patches/qt/fix_android_pch.patch deleted file mode 100644 index 195e1c5e..00000000 --- a/depends/patches/qt/fix_android_pch.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- old/qtbase/mkspecs/common/android-base-head.conf -+++ new/qtbase/mkspecs/common/android-base-head.conf -@@ -72,6 +72,6 @@ CROSS_COMPILE = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX- - QMAKE_PCH_OUTPUT_EXT = .gch - - QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} --QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} -+QMAKE_CFLAGS_USE_PRECOMPILE = -include-pch ${QMAKE_PCH_OUTPUT} - QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} - QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/depends/patches/qt/fix_cocoa_cgcolorspaceref.patch b/depends/patches/qt/fix_cocoa_cgcolorspaceref.patch deleted file mode 100644 index 53e6f431..00000000 --- a/depends/patches/qt/fix_cocoa_cgcolorspaceref.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/old/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/new/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -index e070ba9..0896917 100644 ---- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -+++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -@@ -43,6 +43,8 @@ - #include - #include - -+#include -+ - QT_BEGIN_NAMESPACE - - class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer diff --git a/depends/patches/qt/fix_lib_paths.patch b/depends/patches/qt/fix_lib_paths.patch deleted file mode 100644 index d1a15373..00000000 --- a/depends/patches/qt/fix_lib_paths.patch +++ /dev/null @@ -1,193 +0,0 @@ ---- old/qtbase/mkspecs/common/mac.conf -+++ new/qtbase/mkspecs/common/mac.conf -@@ -14,7 +14,6 @@ - - QMAKE_RESOURCE = /Developer/Tools/Rez - QMAKE_EXTENSION_SHLIB = dylib --QMAKE_EXTENSIONS_AUX_SHLIB = tbd - QMAKE_LIBDIR = - - # sdk.prf will prefix the proper SDK sysroot - ---- old/qtbase/mkspecs/features/qmake_use.prf -+++ new/qtbase/mkspecs/features/qmake_use.prf -@@ -22,6 +22,8 @@ - !defined(QMAKE_LIBS_$$nu, var): \ - error("Library '$$lower($$replace(nu, _, -))' is not defined.") - -+ QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu) -+ - debug: \ - LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu) - else: \ - ---- old/qtbase/mkspecs/features/qt_configure.prf -+++ new/qtbase/mkspecs/features/qt_configure.prf -@@ -526,98 +526,23 @@ - return($$sysrootified) - } - --# libs-var, libs, in-paths, out-paths-var -+# libs-var, libs, in-paths - defineTest(qtConfResolveLibs) { -- ret = true -- paths = $$3 -- out = -- copy = false -- for (l, 2) { -- $$copy { -- copy = false -- out += $$l -- } else: equals(l, "-s") { -- # em++ flag to link libraries from emscripten-ports; passed on literally. -- copy = true -- out += $$l -- } else: contains(l, "^-L.*") { -- lp = $$replace(l, "^-L", ) -- gcc: lp = $$qtGccSysrootifiedPath($$lp) -- !exists($$lp/.) { -- qtLog("Library path $$val_escape(lp) is invalid.") -- ret = false -- } else { -- paths += $$lp -- } -- } else: contains(l, "^-l.*") { -- lib = $$replace(l, "^-l", ) -- lcan = -- integrity:contains(lib, "^.*\\.a") { -- # INTEGRITY compiler searches for exact filename -- # if -l argument has .a suffix -- lcan += $${lib} -- } else: contains(lib, "^:.*") { -- # Use exact filename when -l:filename syntax is used. -- lib ~= s/^:// -- lcan += $${lib} -- } else: unix { -- # Under UNIX, we look for actual shared libraries, in addition -- # to static ones. -- shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB -- for (ext, shexts) { -- lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext} -- } -- lcan += \ -- $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB} -- } else { -- # Under Windows, we look only for static libraries, as even for DLLs -- # one actually links against a static import library. -- mingw { -- lcan += \ -- # MinGW supports UNIX-style library naming in addition to -- # the MSVC style. -- lib$${lib}.dll.a lib$${lib}.a \ -- # Fun fact: prefix-less libraries are also supported. -- $${lib}.dll.a $${lib}.a -- } -- lcan += $${lib}.lib -- } -- l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS) -- isEmpty(l) { -- qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.") -- ret = false -- } else { -- out += $$l -- } -- } else { -- out += $$l -- } -- } -- $$1 = $$out -+ for (path, 3): \ -+ pre_lflags += -L$$path -+ $$1 = $$pre_lflags $$2 - export($$1) -- !isEmpty(4) { -- $$4 = $$paths -- export($$4) -- } -- return($$ret) --} -- --# source-var --defineTest(qtConfResolveAllLibs) { -- ret = true -- !qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \ -- ret = false -- for (b, $${1}.builds._KEYS_): \ -- !qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \ -- ret = false -- return($$ret) -+ return(true) - } - - # libs-var, in-paths, libs - defineTest(qtConfResolvePathLibs) { - ret = true -- gcc: 2 = $$qtGccSysrootifiedPaths($$2) -- for (libdir, 2) { -+ gcc: \ -+ local_paths = $$qtGccSysrootifiedPaths($$2) -+ else: \ -+ local_paths = $$2 -+ for (libdir, local_paths) { - !exists($$libdir/.) { - qtLog("Library path $$val_escape(libdir) is invalid.") - ret = false -@@ -667,8 +592,11 @@ - # includes-var, in-paths, test-object-var - defineTest(qtConfResolvePathIncs) { - ret = true -- gcc: 2 = $$qtGccSysrootifiedPaths($$2) -- for (incdir, 2) { -+ gcc: \ -+ local_paths = $$qtGccSysrootifiedPaths($$2) -+ else: \ -+ local_paths = $$2 -+ for (incdir, local_paths) { - !exists($$incdir/.) { - qtLog("Include path $$val_escape(incdir) is invalid.") - ret = false -@@ -727,6 +655,7 @@ - vars += $$eval(config.commandline.rev_assignments.$${iv}) - defined(config.input.$${iv}, var) { - eval($${1}.builds.$${b} = $$eval(config.input.$${iv})) -+ export($${1}.builds.$${b}) - $${1}.builds._KEYS_ *= $${b} - any = true - } else { -@@ -741,11 +670,14 @@ - export($${1}.builds._KEYS_) - # we also reset the generic libs, to avoid surprises. - $${1}.libs = -+ export($${1}.libs) - } - - # direct libs. overwrites inline libs. -- defined(config.input.$${input}.libs, var): \ -+ defined(config.input.$${input}.libs, var) { - eval($${1}.libs = $$eval(config.input.$${input}.libs)) -+ export($${1}.libs) -+ } - - includes = $$eval(config.input.$${input}.incdir) - -@@ -754,6 +686,7 @@ - !isEmpty(prefix) { - includes += $$prefix/include - $${1}.libs = -L$$prefix/lib $$eval($${1}.libs) -+ export($${1}.libs) - } - - libdir = $$eval(config.input.$${input}.libdir) -@@ -762,11 +695,9 @@ - for (ld, libdir): \ - libs += -L$$ld - $${1}.libs = $$libs $$eval($${1}.libs) -+ export($${1}.libs) - } - -- !qtConfResolveAllLibs($$1): \ -- return(false) -- - !qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \ - return(false) - diff --git a/depends/patches/qt/fix_limits_header.patch b/depends/patches/qt/fix_limits_header.patch deleted file mode 100644 index e4313770..00000000 --- a/depends/patches/qt/fix_limits_header.patch +++ /dev/null @@ -1,44 +0,0 @@ -Fix compiling with GCC 11 - -See: https://bugreports.qt.io/browse/QTBUG-90395. - -Upstream commits: - - Qt 5.15 -- unavailable as open source - - Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83 - - Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c - ---- old/qtbase/src/corelib/global/qendian.h -+++ new/qtbase/src/corelib/global/qendian.h -@@ -44,6 +44,8 @@ - #include - #include - -+#include -+ - // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems - #include - #include - ---- old/qtbase/src/corelib/tools/qbytearraymatcher.h -+++ new/qtbase/src/corelib/tools/qbytearraymatcher.h -@@ -42,6 +42,8 @@ - - #include - -+#include -+ - QT_BEGIN_NAMESPACE - - - ---- old/qtbase/src/tools/moc/generator.cpp -+++ new/qtbase/src/tools/moc/generator.cpp -@@ -40,6 +40,8 @@ - #include - #include - -+#include -+ - #include - #include - diff --git a/depends/patches/qt/fix_montery_include.patch b/depends/patches/qt/fix_montery_include.patch new file mode 100644 index 00000000..38b700ad --- /dev/null +++ b/depends/patches/qt/fix_montery_include.patch @@ -0,0 +1,21 @@ +From dece6f5840463ae2ddf927d65eb1b3680e34a547 +From: Øystein Heskestad +Date: Wed, 27 Oct 2021 13:07:46 +0200 +Subject: [PATCH] Add missing macOS header file that was indirectly included before + +See: https://bugreports.qt.io/browse/QTBUG-97855 + +Upstream Commits: + - Qt 6.2: c884bf138a21dd7320e35cef34d24e22e74d7ce0 + +diff --git a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h +index e070ba97..07c75b04 100644 +--- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h ++++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h +@@ -40,6 +40,7 @@ + #ifndef QIOSURFACEGRAPHICSBUFFER_H + #define QIOSURFACEGRAPHICSBUFFER_H + ++#include + #include + #include diff --git a/depends/patches/qt/fix_no_printer.patch b/depends/patches/qt/fix_no_printer.patch deleted file mode 100644 index 13723561..00000000 --- a/depends/patches/qt/fix_no_printer.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h -+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h -@@ -52,6 +52,7 @@ - // - - #include -+#include - - #ifndef QT_NO_PRINTER - ---- x/qtbase/src/plugins/plugins.pro -+++ y/qtbase/src/plugins/plugins.pro -@@ -9,6 +9,3 @@ qtHaveModule(gui) { - !android:qtConfig(library): SUBDIRS *= generic - } - qtHaveModule(widgets): SUBDIRS += styles -- --!winrt:qtHaveModule(printsupport): \ -- SUBDIRS += printsupport diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch index a5de2b4b..73f4d89f 100644 --- a/depends/patches/qt/fix_qt_pkgconfig.patch +++ b/depends/patches/qt/fix_qt_pkgconfig.patch @@ -4,20 +4,8 @@ load(qt_targets) # this builds on top of qt_common --!internal_module:if(unix|mingw) { +-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { +if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) { CONFIG += create_pc QMAKE_PKGCONFIG_DESTDIR = pkgconfig host_build: \ -@@ -284,9 +284,9 @@ load(qt_targets) - QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME - } - QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") -- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) -+ QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)$$qtPlatformTargetSuffix() - for(i, MODULE_DEPENDS): \ -- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) -+ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() - isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ - QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module - !isEmpty(lib_replace0.match) { diff --git a/depends/patches/qt/guix_cross_lib_path.patch b/depends/patches/qt/guix_cross_lib_path.patch new file mode 100644 index 00000000..7911dc21 --- /dev/null +++ b/depends/patches/qt/guix_cross_lib_path.patch @@ -0,0 +1,17 @@ +Facilitate guix building with CROSS_LIBRARY_PATH + +See discussion in https://github.com/bitcoin/bitcoin/pull/15277. + +--- a/qtbase/mkspecs/features/toolchain.prf ++++ b/qtbase/mkspecs/features/toolchain.prf +@@ -236,8 +236,8 @@ isEmpty($${target_prefix}.INCDIRS) { + add_libraries = false + for (line, output) { + line ~= s/^[ \\t]*// # remove leading spaces +- contains(line, "LIBRARY_PATH=.*") { +- line ~= s/^LIBRARY_PATH=// # remove leading LIBRARY_PATH= ++ contains(line, "(CROSS_)?LIBRARY_PATH=.*") { ++ line ~= s/^(CROSS_)?LIBRARY_PATH=// # remove leading (CROSS_)?LIBRARY_PATH= + equals(QMAKE_HOST.os, Windows): \ + paths = $$split(line, ;) + else: \ diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index 190ab7a1..cb94bf07 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -13,13 +13,10 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} QMAKE_MAC_SDK.macosx.PlatformPath = /phony -QMAKE_APPLE_DEVICE_ARCHS=x86_64 !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS -!host_build: QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +!host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} QMAKE_AR = $${CROSS_COMPILE}ar cq QMAKE_RANLIB=$${CROSS_COMPILE}ranlib -QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool -QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool load(qt_config) diff --git a/depends/patches/qt/no-xlib.patch b/depends/patches/qt/no-xlib.patch index f4a6f09e..d6846aac 100644 --- a/depends/patches/qt/no-xlib.patch +++ b/depends/patches/qt/no-xlib.patch @@ -22,7 +22,7 @@ index 7c62c2e2b3..c05c6c0a07 100644 #include #include -@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window) +@@ -391,6 +391,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window) xcb_flush(xcb_connection()); } @@ -30,7 +30,7 @@ index 7c62c2e2b3..c05c6c0a07 100644 static int cursorIdForShape(int cshape) { int cursorId = 0; -@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape) +@@ -444,6 +445,7 @@ static int cursorIdForShape(int cshape) } return cursorId; } @@ -38,7 +38,7 @@ index 7c62c2e2b3..c05c6c0a07 100644 xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) { -@@ -556,7 +560,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) +@@ -556,7 +558,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape) xcb_cursor_t QXcbCursor::createFontCursor(int cshape) { xcb_connection_t *conn = xcb_connection(); @@ -48,16 +48,15 @@ index 7c62c2e2b3..c05c6c0a07 100644 xcb_cursor_t cursor = XCB_NONE; // Try Xcursor first -@@ -585,7 +591,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) - +@@ -586,6 +590,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) // Non-standard X11 cursors are created from bitmaps cursor = createNonStandardCursor(cshape); -- + +#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) // Create a glpyh cursor if everything else failed if (!cursor && cursorId) { cursor = xcb_generate_id(conn); -@@ -593,6 +599,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) +@@ -593,6 +598,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) cursorId, cursorId + 1, 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); } diff --git a/depends/patches/qt/no_sdk_version_check.patch b/depends/patches/qt/no_sdk_version_check.patch deleted file mode 100644 index b16635b5..00000000 --- a/depends/patches/qt/no_sdk_version_check.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit f5eb142cd04be2bc4ca610ed3b5b7e8ce3520ee3 -Author: fanquake -Date: Tue Jan 5 16:08:49 2021 +0800 - - Don't invoke macOS SDK version checking - - This tries to use xcrun which is not available when cross-compiling. - -diff --git a/qtbase/mkspecs/features/mac/default_post.prf b/qtbase/mkspecs/features/mac/default_post.prf -index 92a9112bca6..447e186eb26 100644 ---- a/qtbase/mkspecs/features/mac/default_post.prf -+++ b/qtbase/mkspecs/features/mac/default_post.prf -@@ -8,7 +8,6 @@ contains(TEMPLATE, .*app) { - !macx-xcode:if(isEmpty(BUILDS)|build_pass) { - # Detect changes to the platform SDK - QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION QMAKE_XCODE_DEVELOPER_PATH -- QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk) - } - - # Detect incompatible SDK versions diff --git a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch index 0358bea6..f0c14a94 100644 --- a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch +++ b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch @@ -7,7 +7,7 @@ Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp --- a/qtbase/src/tools/moc/main.cpp +++ b/qtbase/src/tools/moc/main.cpp -@@ -188,6 +188,7 @@ int runMoc(int argc, char **argv) +@@ -238,6 +238,7 @@ int runMoc(int argc, char **argv) dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); pp.macros["__attribute__"] = dummyVariadicFunctionMacro; pp.macros["__declspec"] = dummyVariadicFunctionMacro; diff --git a/depends/patches/qt/rcc_hardcode_timestamp.patch b/depends/patches/qt/rcc_hardcode_timestamp.patch new file mode 100644 index 00000000..03f38979 --- /dev/null +++ b/depends/patches/qt/rcc_hardcode_timestamp.patch @@ -0,0 +1,24 @@ +Hardcode last modified timestamp in Qt RCC + +This change allows the already built qt package to be reused even with +the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds. + + +--- old/qtbase/src/tools/rcc/rcc.cpp ++++ new/qtbase/src/tools/rcc/rcc.cpp +@@ -227,14 +227,7 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib) + + if (lib.formatVersion() >= 2) { + // last modified time stamp +- const QDateTime lastModified = m_fileInfo.lastModified(); +- quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0); +- static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(); +- if (sourceDate != 0) +- lastmod = sourceDate; +- static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong(); +- if (sourceDate2 != 0) +- lastmod = sourceDate2; ++ quint64 lastmod = quint64(1); + lib.writeNumber8(lastmod); + if (text || pass1) + lib.writeChar('\n'); diff --git a/depends/patches/qt/support_new_android_ndks.patch b/depends/patches/qt/support_new_android_ndks.patch deleted file mode 100644 index 85c8ae21..00000000 --- a/depends/patches/qt/support_new_android_ndks.patch +++ /dev/null @@ -1,122 +0,0 @@ -Follow Google's BuildSystemMaintainers doc to support future NDK releases. - -Upstream commit: - - Qt 5.14: 9b14950ff600a4ce5a8698b67ab38907c50417f1 - ---- old/qtbase/mkspecs/android-clang/qmake.conf -+++ new/qtbase/mkspecs/android-clang/qmake.conf -@@ -14,43 +14,29 @@ - QMAKE_CC = $$NDK_LLVM_PATH/bin/clang - QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++ - -+# Follow https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md -+ - equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ -- QMAKE_CFLAGS += -target armv7-none-linux-androideabi --else: equals(ANDROID_TARGET_ARCH, armeabi): \ -- QMAKE_CFLAGS += -target armv5te-none-linux-androideabi -+ QMAKE_CFLAGS = -target armv7a-linux-androideabi$$replace(ANDROID_PLATFORM, "android-", "") - else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \ -- QMAKE_CFLAGS += -target aarch64-none-linux-android -+ QMAKE_CFLAGS = -target aarch64-linux-android$$replace(ANDROID_PLATFORM, "android-", "") - else: equals(ANDROID_TARGET_ARCH, x86): \ -- QMAKE_CFLAGS += -target i686-none-linux-android -mstackrealign -+ QMAKE_CFLAGS = -target i686-linux-android$$replace(ANDROID_PLATFORM, "android-", "") -mstackrealign - else: equals(ANDROID_TARGET_ARCH, x86_64): \ -- QMAKE_CFLAGS += -target x86_64-none-linux-android --else: equals(ANDROID_TARGET_ARCH, mips): \ -- QMAKE_CFLAGS += -target mipsel-none-linux-android --else: equals(ANDROID_TARGET_ARCH, mips64): \ -- QMAKE_CFLAGS += -target mips64el-none-linux-android -- --QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info -- --QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a -- --QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \ -- -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \ -- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \ -- -isystem $$NDK_ROOT/sources/android/support/include \ -- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include -+ QMAKE_CFLAGS = -target x86_64-linux-android$$replace(ANDROID_PLATFORM, "android-", "") - --ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH -+QMAKE_CFLAGS += -fno-limit-debug-info - --ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so -+QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS - --ANDROID_USE_LLVM = true -+ANDROID_STDCPP_PATH = $$NDK_LLVM_PATH/sysroot/usr/lib/$$NDK_TOOLS_PREFIX/libc++_shared.so - --exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \ -- ANDROID_CXX_STL_LIBS = -lc++ --else: \ -- ANDROID_CXX_STL_LIBS = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so.$$replace(ANDROID_PLATFORM, "android-", "") -+ANDROID_USE_LLVM = true - --QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz -+QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz -+QMAKE_LIBDIR_POST = -+QMAKE_LFLAGS = -+QMAKE_LIBS_PRIVATE = -+ANDROID_CXX_STL_LIBS = - - include(../common/android-base-tail.conf) - ---- old/qtbase/mkspecs/common/android-base-head.conf -+++ new/qtbase/mkspecs/common/android-base-head.conf -@@ -64,7 +58,6 @@ - } - - CONFIG += $$ANDROID_PLATFORM --QMAKE_CFLAGS = -D__ANDROID_API__=$$replace(ANDROID_PLATFORM, "android-", "") - - ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/ - ---- old/qtbase/mkspecs/common/android-base-tail.conf -+++ new/qtbase/mkspecs/common/android-base-tail.conf -@@ -6,22 +6,17 @@ - QMAKE_CFLAGS += -fstack-protector-strong -DANDROID - - equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ -- QMAKE_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -+ QMAKE_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp - else: equals(ANDROID_TARGET_ARCH, armeabi): \ -- QMAKE_CFLAGS += -march=armv5te -mtune=xscale -msoft-float -fno-builtin-memmove --# -fno-builtin-memmove is used to workaround https://code.google.com/p/android/issues/detail?id=81692 -+ QMAKE_CFLAGS += -march=armv5te -mtune=xscale -msoft-float - - QMAKE_CFLAGS_WARN_ON = -Wall -W - QMAKE_CFLAGS_WARN_OFF = - equals(ANDROID_TARGET_ARCH, armeabi-v7a) | equals(ANDROID_TARGET_ARCH, armeabi) { - CONFIG += optimize_size - QMAKE_CFLAGS_DEBUG = -g -marm -O0 -- equals(ANDROID_TARGET_ARCH, armeabi):if(equals(NDK_TOOLCHAIN_VERSION, 4.8)|equals(NDK_TOOLCHAIN_VERSION, 4.9)) { -- DEFINES += QT_OS_ANDROID_GCC_48_WORKAROUND -- } else { -- QMAKE_CFLAGS_RELEASE += -mthumb -- QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb -- } -+ QMAKE_CFLAGS_RELEASE += -mthumb -+ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -mthumb - } - - QMAKE_CFLAGS_SHLIB = -fPIC -@@ -61,15 +56,12 @@ - QMAKE_RANLIB = $${CROSS_COMPILE}ranlib - - QMAKE_INCDIR_POST = --QMAKE_LIBDIR_POST = $$ANDROID_SOURCES_CXX_STL_LIBDIR - QMAKE_INCDIR_X11 = - QMAKE_LIBDIR_X11 = - QMAKE_INCDIR_OPENGL = - QMAKE_LIBDIR_OPENGL = - - QMAKE_LINK_SHLIB = $$QMAKE_LINK --QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH --equals(ANDROID_TARGET_ARCH, x86_64) QMAKE_LFLAGS += -L$$ANDROID_PLATFORM_ROOT_PATH/usr/lib64 - QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared - QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared - QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB diff --git a/depends/patches/qt/use_android_ndk23.patch b/depends/patches/qt/use_android_ndk23.patch new file mode 100644 index 00000000..f22367d5 --- /dev/null +++ b/depends/patches/qt/use_android_ndk23.patch @@ -0,0 +1,13 @@ +Use Android NDK r23 LTS + +--- old/qtbase/mkspecs/features/android/default_pre.prf ++++ new/qtbase/mkspecs/features/android/default_pre.prf +@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux- + else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android- + else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi- + +-QMAKE_RANLIB = $${CROSS_COMPILE}ranlib ++QMAKE_RANLIB = $$NDK_LLVM_PATH/bin/llvm-ranlib + QMAKE_LINK_SHLIB = $$QMAKE_LINK + QMAKE_LFLAGS = + diff --git a/src/Makefile.ktest.include b/src/Makefile.ktest.include index 0fd658d4..91427f6b 100644 --- a/src/Makefile.ktest.include +++ b/src/Makefile.ktest.include @@ -21,7 +21,8 @@ komodo_test_SOURCES = \ test-komodo/test_hex.cpp \ test-komodo/test_haraka_removal.cpp \ test-komodo/test_oldhash_removal.cpp \ - test-komodo/test_kmd_feat.cpp + test-komodo/test_kmd_feat.cpp \ + test-komodo/test_legacy_events.cpp if TARGET_WINDOWS komodo_test_SOURCES += test-komodo/komodo-test-res.rc diff --git a/src/assetchains.old b/src/assetchains.old index 26815545..44d358ae 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -3,30 +3,14 @@ set -x delay=60 source pubkey.txt echo $pubkey - -./komodod -pubkey=$pubkey -ac_name=AXO -ac_supply=200000000 -ac_ccactivate=130000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=BET -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=BOTS -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=BTCH -ac_supply=20998641 -addnode=95.213.238.98 & -./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 $1 & -./komodod -pubkey=$pubkey -ac_name=COQUICASH -ac_supply=72000000 -ac_reward=7200000000 -ac_staked=50 -ac_halving=420000 -ac_cc=2 -ac_ccenable=227,235,236,241 -addnode=78.47.108.168 $1 & -./komodod -pubkey=$pubkey -ac_name=CRYPTO -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=DEX -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 $1 & -./komodod -pubkey=$pubkey -ac_name=HODL -ac_supply=9999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 $1 & -./komodod -pubkey=$pubkey -ac_name=JUMBLR -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 $1 & -./komodod -pubkey=$pubkey -ac_name=MESH -ac_supply=1000007 -ac_ccactivate=320000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=MGW -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=MORTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=95.217.44.58 -addnode=138.201.136.145 $1 & -./komodod -pubkey=$pubkey -ac_name=MSHARK -ac_supply=1400000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=OOT -ac_supply=216000000 -ac_sapling=5000000 -addnode=88.99.212.81 $1 & -./komodod -pubkey=$pubkey -ac_name=PANGEA -ac_supply=999999 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 $1 & -./komodod -pubkey=$pubkey -ac_name=REVS -ac_supply=1300000 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=RICK -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=95.217.44.58 -addnode=138.201.136.145 $1 & -./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 $1 & -./komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 $1 & -./komodod -pubkey=$pubkey -ac_name=ZILLA -ac_supply=11000000 -ac_sapling=5000000 -addnode=51.68.215.104 $1 & +./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=CLC -ac_supply=99000000 -ac_reward=50000000 -ac_perc=100000000 -ac_founders=1 -ac_cc=45 -ac_public=1 -ac_snapshot=1440 -ac_pubkey=02df9bda7bfe2bcaa938b29a399fb0ba58cfb6cc3ddc0001062a600f60a8237ad9 -addnode=node.cryptocollider.com -ac_adaptivepow=6 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=DOC -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=GLEEC -ac_supply=210000000 -ac_public=1 -ac_staked=100 -addnode=95.217.161.126 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=KOIN -ac_supply=125000000 -addnode=3.0.32.10 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=MARTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -ac_staked=10 -addnode=65.21.77.109 -addnode=65.21.51.47 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=88.99.212.81 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=SUPERNET -ac_supply=816061 -addnode=95.213.238.98 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & +./komodod -pubkey=$pubkey -ac_name=THC -ac_supply=251253103 -ac_reward=360000000,300000000,240000000,180000000,150000000,90000000,0 -ac_staked=100 -ac_eras=7 -ac_end=500001,1000001,1500001,2000001,2500001,4500001,0 -ac_perc=233333333 -ac_cc=2 -ac_ccenable=229,236,240 -ac_script=2ea22c8020987fad30df055db6fd922c3a57e55d76601229ed3da3b31340112e773df3d0d28103120c008203000401ccb8 -ac_founders=150 -ac_cbmaturity=1 -ac_sapling=1 -addnode=157.230.45.184 -addnode=165.22.52.123 -earlytxid=7e4a76259e99c9379551389e9f757fc5f46c33ae922a8644dc2b187af2a6adc1 -addnode=209.222.101.247 -addnode=103.195.100.32 $1 & diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 2cb74024..05b5d0be 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -271,9 +271,32 @@ class CMainParams : public CChainParams { ( 2350000, uint256S("0x0b8028dbfcd92fe34496953872cba2d256923e3e52b4abbdcbe9911071e929e5")) ( 2400000, uint256S("0x0000000030f4e55dab91dc3528257fdddbbaec7e7e6f877d357654f07704d773")) ( 2450000, uint256S("0x00000000b1cb8e9046e561486a5dbdb7fa06ac35c96f290653d1f0f4578d55c0")) - ( 2453333, uint256S("0x0183557e5d92b5337e005499f5e0f58c8c6a02756b55ad56f2be4792d38351bd")), - 1624689070, // * UNIX timestamp of last checkpoint block - 14279227, // * total number of transactions between genesis and last checkpoint + ( 2500000, uint256S("0x0d79a66e1e611b8b7070f924c6d23f41837caa6e2636d3e0e94fb74f4c0e7eaf")) + ( 2550000, uint256S("0x08ead55adf3253d8e7d4cc5eab3586bbc3bdbba9ae4104d13f0e9731350aa991")) + ( 2600000, uint256S("0x0665b6e23d60a892069fe12ccc3c6ec1f4b38bfd6c62ebbc88039d99492ec67d")) + ( 2650000, uint256S("0x0c0997bd2251d5aaa7d7509f49fd41ff8666f3d137cbe1b7695ec77afa95a977")) + ( 2700000, uint256S("0x02c317060b9ee983f30f33e21ae6973cda8c2746d38dff546a56341440fa0ff2")) + ( 2750000, uint256S("0x00000000d534909e2726aa0eb132cbd27894914de21f7e42942a11ce152bd0e8")) + ( 2800000, uint256S("0x0ce1585dfde5b561e4c436e9bceb3070681f033604df3ae5ee471fa37f93df40")) + ( 2850000, uint256S("0x000000000dd1a4cdc68d869d7bff1459c24950c2c49bfbc99379b1192189d9ff")) + ( 2900000, uint256S("0x0e476e4c8680723d5993c8d3241437eb496785a681bfee2723d48c8aca7e7775")) + ( 2950000, uint256S("0x02c2ad86947eb44eb0c341f62cbb42ee7604120736b59e3bf4ae7c15876116c6")) + ( 3000000, uint256S("0x000000000341c41238da4aa354c0b110c0dcb406c77ae88c6cbe1af9279e5ad5")) + ( 3050000, uint256S("0x06201c395a0e570e7efe63e8c406a57ba01ee1e7994a496aa7314d66c46f4d03")) + ( 3100000, uint256S("0x0cc9d173d3062e7bd02fe3880f6647c12be5e4fbc0d54bbc57fb630a4d27b152")) + ( 3150000, uint256S("0x0bc9aacb5b61ce72269156ef1c3d097b3866c1d41f9204eda0565c71e6f28765")) + ( 3200000, uint256S("0x0000000086d9a4cd07bab1c621f626c8b56fdb4502b47294d84215a263c74e72")) + ( 3250000, uint256S("0x05c1d8fff5449019ebf0dfc442fb6ab08aa8acb46c3fde0e9913a17feac897d9")) + ( 3300000, uint256S("0x0549e87f0f3f028e10e20f6844e5d4605ad2a26e810d671ae516ee33328eda94")) + ( 3350000, uint256S("0x0000000016335c6ac62b78d90dcc14a7e73fb71484bf18974ba13449fc223f4b")) + ( 3400000, uint256S("0x0a7db2957f5122f54351ffa79e0399788b180628daa440be63230454ab6ebdbe")) + ( 3450000, uint256S("0x0ed55d5048453070204e5301a194980aa6632dc53bf1fb3f5a38bcc127229751")) + ( 3500000, uint256S("0x00000000058ded4878267a04562fba5f5455f3f015d0befc30f18a2a5363293c")) + ( 3550000, uint256S("0x008e33e444039a184a27b083526a963f792f5053a1811cd8fde6aac0954a3925")) + ( 3600000, uint256S("0x09a6622ca9c61abcd2e20c5bedfd3c975803ae8c1fb913f61be9ba3e82916791")) + ( 3648244, uint256S("0x002fdc2c0a087b8b4075268c8caf97571ac9b0908aa6dde37077ad179dc614ee")), + 1698278398, // * UNIX timestamp of last checkpoint block + 21906511, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 2777 // * estimated number of transactions per day after checkpoint // total number of tx / (checkpoint block height / (24 * 24)) diff --git a/src/komodo.cpp b/src/komodo.cpp index c157c2d8..ba8b8d33 100644 --- a/src/komodo.cpp +++ b/src/komodo.cpp @@ -347,6 +347,34 @@ int32_t komodo_validate_chain(uint256 srchash,int32_t notarized_height) } else return(1); } +namespace { + bool CheckChainNameInScript(uint8_t* scriptbuf, int32_t scriptlen, size_t offsetInScript) + { + std::string chainPattern = chainName.ToString(); + size_t chainPatternSize = chainPattern.size(); + + if (offsetInScript + chainPatternSize < scriptlen) { + if (std::equal(chainPattern.begin(), chainPattern.end(), &scriptbuf[offsetInScript]) && scriptbuf[offsetInScript + chainPatternSize] == '\0') { + return true; + } + } + return false; + } + + std::string GetChainNameFromScript(uint8_t* scriptbuf, int32_t scriptlen, size_t offsetInScript) + { + std::string chainPattern = ""; + const size_t maxChainName = sizeof(komodo_ccdata::symbol); + + while (offsetInScript < scriptlen && scriptbuf[offsetInScript] != '\0' && chainPattern.size() < maxChainName) { + chainPattern.push_back(scriptbuf[offsetInScript]); + ++offsetInScript; + } + + return chainPattern; + } +} + int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notaryid,uint8_t *scriptbuf, int32_t scriptlen,int32_t height,uint256 txhash,int32_t i,int32_t j,uint64_t *voutmaskp, int32_t *specialtxp,int32_t *notarizedheightp,uint64_t value,int32_t notarized, @@ -398,42 +426,70 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar { struct komodo_ccdata ccdata; struct komodo_ccdataMoMoM MoMoMdata; int32_t validated = 0,nameoffset,opoffset = 0; - if ( (opretlen= scriptbuf[len++]) == 0x4c ) - opretlen = scriptbuf[len++]; - else if ( opretlen == 0x4d ) - { - opretlen = scriptbuf[len++]; - opretlen += (scriptbuf[len++] << 8); + + if (scriptlen - len < 1) + return notaryid; + + uint8_t opcode = scriptbuf[len++]; + + if (opcode <= OP_PUSHDATA4) { + opretlen = 0; + if (opcode < OP_PUSHDATA1) { + opretlen = opcode; + } else if (opcode == OP_PUSHDATA1) { + if (scriptlen - len < 1) + return notaryid; + opretlen = scriptbuf[len++]; + } else if (opcode == OP_PUSHDATA2) { + if (scriptlen - len < 2) + return notaryid; + uint16_t x; + memcpy((char*)&x, &scriptbuf[len], 2); + opretlen = le16toh(x); + len += 2; + } else if (opcode == OP_PUSHDATA4) { + if (scriptlen - len < 4) + return notaryid; + uint32_t x; + memcpy((char*)&x, &scriptbuf[len], 4); + opretlen = le32toh(x); + len += 4; + } + } else { + return notaryid; } + + if (scriptlen - len < 0 || (unsigned int)(scriptlen - len) < opretlen) + return notaryid; + + if (opretlen < 34) // Stop processing of OP_RETURNs that do not contain significant data, + return notaryid; // such as a 33-byte staking opret or a 32-byte notary proof in a mined block. + opoffset = len; + matched = 0; - if ( chainName.isKMD() ) - { - if ( strcmp("KMD",(char *)&scriptbuf[len+32 * 2 + 4]) == 0 ) - matched = 1; - } - else - { - if ( scriptbuf[len] == 'K' ) - { - //LogPrintf("i.%d j.%d KV OPRET len.%d %.8f\n",i,j,opretlen,dstr(value)); - komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,value,&scriptbuf[len],opretlen,j,zero,0); - return(-1); - } - if ( strcmp(chainName.symbol().c_str(),(char *)&scriptbuf[len+32*2+4]) == 0 ) - matched = 1; + + if (CheckChainNameInScript(scriptbuf, scriptlen, len + 32 * 2 + 4)) { + matched = 1; } + offset = 32 * (1 + matched) + 4; - nameoffset = (int32_t)strlen((char *)&scriptbuf[len+offset]); + + std::string fromScriptChainName = GetChainNameFromScript(scriptbuf, scriptlen, len + offset); + if (fromScriptChainName.empty()) + return notaryid; + + nameoffset = fromScriptChainName.size(); nameoffset++; memset(&ccdata,0,sizeof(ccdata)); - strncpy(ccdata.symbol,(char *)&scriptbuf[len+offset],sizeof(ccdata.symbol)); + std::copy_n(fromScriptChainName.begin(), std::min(fromScriptChainName.size(), sizeof(ccdata.symbol)), ccdata.symbol); + if ( j == 1 && opretlen >= len+offset-opoffset ) { memset(&MoMoMdata,0,sizeof(MoMoMdata)); if ( matched == 0 && signedmask != 0 && bitweight(signedmask) >= KOMODO_MINRATIFY ) notarized = 1; - if ( strcmp("PIZZA",ccdata.symbol) == 0 || strncmp("TXSCL",ccdata.symbol,5) == 0 || strcmp("BEER",ccdata.symbol) == 0) + if (fromScriptChainName == "PIZZA" || fromScriptChainName == "BEER" || fromScriptChainName.substr(0, 5) == "TXSCL") notarized = 1; len += iguana_rwbignum(0,&scriptbuf[len],32,(uint8_t *)&srchash); len += iguana_rwnum(0,&scriptbuf[len],sizeof(*notarizedheightp),(uint8_t *)notarizedheightp); @@ -540,13 +596,6 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar fwrite(&signedmask,1,sizeof(signedmask),signedfp); fflush(signedfp); } - if ( opretlen > len && scriptbuf[len] == 'A' ) - { - //for (i=0; i 600000 && matched != 0 ) @@ -561,7 +610,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar } else if ( matched != 0 ) { - if ( opretlen >= 32*2+4 && strcmp(chainName.ToString().c_str(),(char *)&scriptbuf[len+32*2+4]) == 0 ) + if ( opretlen >= 32*2+4 && CheckChainNameInScript(scriptbuf, scriptlen, len + 32 * 2 + 4) ) { for (k=0; k<32; k++) if ( scriptbuf[len+k] != 0 ) @@ -572,9 +621,6 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar LogPrintf("ISRATIFICATION (%s)\n",(char *)&scriptbuf[len+32*2+4]); } } - - if ( *isratificationp == 0 && (signedmask != 0 || (scriptbuf[len] != 'X' && scriptbuf[len] != 'A')) ) // && scriptbuf[len] != 'I') - komodo_stateupdate(height,0,0,0,txhash,0,0,0,0,value,&scriptbuf[len],opretlen,j,zero,0); } } return(notaryid); @@ -785,25 +831,28 @@ int32_t komodo_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block) } if ( specialtx != 0 && isratification != 0 && numvouts > 2 ) { - numvalid = 0; - memset(pubkeys,0,sizeof(pubkeys)); - for (j=1; j= sizeof(uint32_t) && len <= sizeof(scriptbuf) ) + numvalid = 0; + memset(pubkeys,0,sizeof(pubkeys)); + for (j=1; j= sizeof(uint32_t) && len <= sizeof(scriptbuf) ) { - memcpy(pubkeys[numvalid++],scriptbuf+1,33); - for (k=0; k<33; k++) - LogPrintf("%02x",scriptbuf[k+1]); - LogPrintf(" <- new notary.[%d]\n",j-1); + memcpy(scriptbuf,(uint8_t *)&block.vtx[i].vout[j].scriptPubKey[0],len); + if ( len == 35 && scriptbuf[0] == 33 && scriptbuf[34] == 0xac ) + { + if (numvalid < 64) { + memcpy(pubkeys[numvalid++],scriptbuf+1,33); + for (k=0; k<33; k++) + LogPrintf("%02x",scriptbuf[k+1]); + LogPrintf(" <- new notary.[%d]\n",j-1); + } + } } } - } - if ( !chainName.isKMD() || height < 100000 ) - { + if ( ((signedmask & 1) != 0 && numvalid >= KOMODO_MINRATIFY) || bitweight(signedmask) > (numnotaries/3) ) { memset(&txhash,0,sizeof(txhash)); diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index 9cb0feb8..4c21c59d 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -144,7 +144,7 @@ SplashScreen::~SplashScreen() bool SplashScreen::eventFilter(QObject * obj, QEvent * ev) { if (ev->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(ev); - if(keyEvent->text()[0] == 'q') { + if (keyEvent->key() == Qt::Key_Q) { StartShutdown(); } } diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp index 5bb86345..594d8857 100644 --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -6,6 +6,7 @@ #include "clientmodel.h" #include +#include #include #include diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 7c4fd28e..b4c2736a 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -81,7 +81,7 @@ int8_t StakedNotaryID(std::string ¬aryname, char *Raddress); uint64_t komodo_notarypayamount(int32_t nHeight, int64_t notarycount); int32_t komodo_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp);*/ -#define KOMODO_VERSION "0.8.0" +#define KOMODO_VERSION "0.8.1" extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT; extern uint32_t ASSETCHAINS_CC; extern uint32_t ASSETCHAINS_MAGIC,ASSETCHAINS_ALGO; diff --git a/src/snark/Makefile b/src/snark/Makefile index 3ef82ab8..42348d80 100644 --- a/src/snark/Makefile +++ b/src/snark/Makefile @@ -18,9 +18,9 @@ CURVE = BN128 OPTFLAGS = -O2 -march=x86-64 -g -mtune=x86-64 ifneq ($(PLATFORM),darwin) - FEATUREFLAGS = -DUSE_ASM -DMONTGOMERY_OUTPUT + FEATUREFLAGS = -DUSE_ASM_SNARK -DMONTGOMERY_OUTPUT else - FEATUREFLAGS = -DUSE_ASM -DMONTGOMERY_OUTPUT -D__SIZE_TYPE__="unsigned long long" + FEATUREFLAGS = -DUSE_ASM_SNARK -DMONTGOMERY_OUTPUT -D__SIZE_TYPE__="unsigned long long" endif # Initialize this using "CXXFLAGS=... make". The makefile appends to that. diff --git a/src/snark/README.md b/src/snark/README.md index d5aa3400..b39d7ead 100644 --- a/src/snark/README.md +++ b/src/snark/README.md @@ -426,7 +426,7 @@ The following flags change the behavior of the compiled code. of the corresponding algebraic objects. This option works for all curves except bn128. -* define `USE_ASM` (on by default) +* define `USE_ASM_SNARK` (on by default) Use unrolled assembly routines for F[p] arithmetic and faster heap in multi-exponentiation. (When not set, use GMP's `mpn_*` routines instead.) @@ -472,7 +472,7 @@ with respect to portability. Specifically: tested with g++ 4.7, g++ 4.8, and clang 3.4. 6. On x86-64, we by default use highly optimized assembly implementations for some - operations (see `USE_ASM` above). On other architectures we fall back to a + operations (see `USE_ASM_SNARK` above). On other architectures we fall back to a portable C++ implementation, which is slower. Tested configurations include: diff --git a/src/snark/libsnark/algebra/fields/fp.tcc b/src/snark/libsnark/algebra/fields/fp.tcc index f1d97153..0b0f4439 100644 --- a/src/snark/libsnark/algebra/fields/fp.tcc +++ b/src/snark/libsnark/algebra/fields/fp.tcc @@ -23,7 +23,7 @@ template& modulus> void Fp_model::mul_reduce(const bigint &other) { /* stupid pre-processor tricks; beware */ -#if defined(__x86_64__) && defined(USE_ASM) +#if defined(__x86_64__) && defined(USE_ASM_SNARK) if (n == 3) { // Use asm-optimized Comba multiplication and reduction mp_limb_t res[2*n]; @@ -293,7 +293,7 @@ Fp_model& Fp_model::operator+=(const Fp_model& #ifdef PROFILE_OP_COUNTS this->add_cnt++; #endif -#if defined(__x86_64__) && defined(USE_ASM) +#if defined(__x86_64__) && defined(USE_ASM_SNARK) if (n == 3) { __asm__ @@ -406,7 +406,7 @@ Fp_model& Fp_model::operator-=(const Fp_model& #ifdef PROFILE_OP_COUNTS this->sub_cnt++; #endif -#if defined(__x86_64__) && defined(USE_ASM) +#if defined(__x86_64__) && defined(USE_ASM_SNARK) if (n == 3) { __asm__ @@ -579,7 +579,7 @@ Fp_model Fp_model::squared() const this->mul_cnt--; // zero out the upcoming mul #endif /* stupid pre-processor tricks; beware */ -#if defined(__x86_64__) && defined(USE_ASM) +#if defined(__x86_64__) && defined(USE_ASM_SNARK) if (n == 3) { // use asm-optimized Comba squaring mp_limb_t res[2*n]; diff --git a/src/snark/libsnark/algebra/fields/fp_aux.tcc b/src/snark/libsnark/algebra/fields/fp_aux.tcc index 7f8a3ead..89c7438e 100644 --- a/src/snark/libsnark/algebra/fields/fp_aux.tcc +++ b/src/snark/libsnark/algebra/fields/fp_aux.tcc @@ -1,8 +1,8 @@ /** @file ***************************************************************************** Assembly code snippets for F[p] finite field arithmetic, used by fp.tcc . - Specific to x86-64, and used only if USE_ASM is defined. - On other architectures or without USE_ASM, fp.tcc uses a portable + Specific to x86-64, and used only if USE_ASM_SNARK is defined. + On other architectures or without USE_ASM_SNARK, fp.tcc uses a portable C++ implementation instead. ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab diff --git a/src/snark/libsnark/algebra/scalar_multiplication/multiexp.tcc b/src/snark/libsnark/algebra/scalar_multiplication/multiexp.tcc index 5dd19a65..7cd32f84 100644 --- a/src/snark/libsnark/algebra/scalar_multiplication/multiexp.tcc +++ b/src/snark/libsnark/algebra/scalar_multiplication/multiexp.tcc @@ -38,7 +38,7 @@ public: bool operator<(const ordered_exponent &other) const { -#if defined(__x86_64__) && defined(USE_ASM) +#if defined(__x86_64__) && defined(USE_ASM_SNARK) if (n == 3) { int64_t res; diff --git a/src/test-komodo/test_legacy_events.cpp b/src/test-komodo/test_legacy_events.cpp new file mode 100644 index 00000000..81bc3972 --- /dev/null +++ b/src/test-komodo/test_legacy_events.cpp @@ -0,0 +1,603 @@ +#include +#include +#include +#include + +#include "util.h" +#include "chainparams.h" + +#include "komodo_globals.h" +#include "main.h" +#include "primitives/transaction.h" +#include "core_io.h" +#include "komodo.h" +#include "komodo_notary.h" + +// https://bitcointalk.org/index.php?topic=1605144.msg32538076#msg32538076 - notarization txes explained + +void adjust_hwmheight(int32_t in); // declared in komodo.cpp (should be used only in unit-tests) +namespace fs = boost::filesystem; + +namespace LegacyEventsTests { + + /* KMD to LTC Nota in KMD chain */ + constexpr const char* strKMDLTCNotaHex = /* 2b4a299ed7c9b3444b9bbfd091783f4f1d4b1b70987505de926312a4ba5d9026 */ "0400008085202f890de75353322bad6580d8d349b47f80362b73d7a391ebf76cb455c9a22da81162d51d000000484730440220436b3772c4f508b8ea0904b7c1c05b93b72dcbbfe284ef98c2314cc7761dd289022044207efe4d61201ba1c3fdaab9aa9b164bf9da983cfdc884532f2556d2e3332001ffffffffc2fb445d59fdf56fbdee6da85182626006e3965f6543b552408a439414784a8f0e00000048473044022053fb98f7e7a99398a2745ca6982e72a0cd29b6dc35eb7d267af60776399ad64c02206435029c413dc68227dcb4055e7f0ffd8cc53d40452d13ad8ad11e762e4b3b4301fffffffff25ba9881d55c5f7e52984ba7b8e708e0a9536335076301b74b8af648af88ba50400000049483045022100c591e4148e583a721e42dadf0c137253913a1613714580e76dcf8a59260d026902205655a76161b912a992e716341c12f43d4f74942c3105b2a4a385631287e3873301ffffffff861026dc3790e6c59292dd8db9581f317e0cf4137283668b7b1686a91291e9770a000000484730440220551301509286c016e05c1db5b6e2a052791cb7295b54cd00f396a05c0cf89dee02200450fee4174fa93b1b5e40b3ff8bc9baec19f45080c1f8c73d452d09783ddd8801ffffffff5703a4413921d8bf3b719678094419f46948b41e4bda01863c11c61f803649db020000004948304502210091c5ccade0b5e4174fbba895bc8105c2f1ca0149c5f8b071f0176b97147e20c00220563254719049becb4f8bb5a50faa737077d378ffc15e93a96f357228182ba5d201ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910600000049483045022100c9561b0754a17f55c4b35d36e46df6d3845b83de88efd565d73bc50e83cbecba0220183865eb8446ad165733b9360d8ab9a0fdda7e73a3114d0feed7352c70d9972f01ffffffff1ed36a28c72c36710e4ae6849ee5f90511341c99f6a34235f150661f4445d2650000000049483045022100c7a7300841d671379f65075405eb85ee2930b417b5ede49ddb83d7717644cebd0220432e9aa745c65a0c30f408b5a9473dc38e1cb375eca5c640c7ed630444d503cf01fffffffff84acac4ddf0c87b9bbb40eadc485b891776153dff371872a4957ad1b40c07b50c0000004948304502210098d3c2b126f6f6022c6982c2a1ba600f575622911bdc1dff0a05fd093044340902207c50e568da145c751be8ded10bef6aabe1d4429f67253dbaac95242e2b8def2901ffffffff508000fa6bd1131fae49413a5ec8b1d3f479314e94527e39063532055aa8edde0700000049483045022100c7cb0a95afd3602ab07d2b9c1f390f3e81f438e555a8adf9fa52b810361920950220488ef1ef6b5fc50590b3d847fbffaaf9868c0f379750f0921acb73512d3a798901ffffffff4de7e7744f14114711defb6bb517bdf0b3edf53013d030da4d5ac7aad45542311300000049483045022100e6a4fe994cfbc028692eee048c4ed8d6dd9c63daa16c644bdd8ae72e3dcea56e02207597d0ceebb6e5a4a5d9802c5b9da2cf37a21f85f344b6acd8577b029410d21201ffffffffc14defef7bbd2dcf06502e18b8b0012fed83f5e644213401c8a1113501df1e6802000000494830450221009f414593f661a7b8c06defa585bdc428dac04234042357ac9a3b11108a26071d02204a862f72675dd8b46f9a1b93d44bd388eb819667bd3e7e7a30266491f8f5710501ffffffffd87d4c2d10fbf27c9800523e05bb43b2599bb9c8e9486b42b012f66c7a6f77ea13000000484730440220047c5eaabd6df36c8bfdd0737a367a12161629aa530c6012241cc36a88fa837d02207eda8879273887b954656e29ba1e98a7dce17cd66061d861e39a12521d6474fa01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e1d00000049483045022100cfb0758d9c1bcbb797d54ad0849b77055f1a2811b559ba2a59aaf38ac4cfb17802202d36f77b6bd9f41281937e39154708e58c82932386fdd8a75ef50d0feeff1c1701ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000004a6a48a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a283093c843500238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f4b4d440000000000000000000000000000000000000000"; + /* + OP_RETURN: + + a99470dba8fd1887b7f98e55aebbae41215c45667288662a4a529e70c9a28309 + = 0983a2c9709e524a2a66887266455c2141aebbae558ef9b78718fda8db7094a9 - KMD Block #3507260 // srchash + c843500 - 3507260 // notarizedheightp + 238ec4fea5df560a1fe88573a14c31f20c91e31d47ee9f12482bbf8f7a887f1f + - echo "$1" | dd conv=swab 2> /dev/null | rev + = https://blockchair.com/litecoin/transaction/1f7f887a8fbf2b48129fee471de3910cf2314ca17385e81f0a56dfa5fec48e23 - if name matched current chain // desttxid + + 4b4d4400 + */ + + /* MIL to KMD Nota in KMD chain */ + constexpr const char* strMILKMDNotaHex = /* b07c36ddcb015c7289f1d23225d7684087ee9c2e04f06e85522ef458db19f67e */ "0400008085202f890d31084ff2a066800cbeb8141a93e5c9d1e8690f29045fa9257fab1a3b8f6f64530200000049483045022100f93c131b3b89dd72c37a15abdd1be40646e4353730c1a12b6fbda6254f34cde6022064b937b920fe6173425453b4a7d97ab65ae095eb1b4796d62e8482fae1c9d9cb01ffffffff1a836a427a22549888adc54e902f09ee1077f70ed3a251125fd54a13413afbad1300000048473044022042bc15552e6a83c2daaf629f7506f849ee5ff5e2eceaf986d2e6a060f04f31b802200bf26040b761bf9e71e06a88079a62d3a50002a371119208334c8de1e3965c7601ffffffff3e224fd5f1b4c90b0a8d9bd4cb4e50eca6b79134e045bac25c87e8d6e25598f11b00000049483045022100ca25b6a74adbca68fa7101ddcf9728cc1ce4bef9bd0d92ca1b6373846cbea52002204957ea93f22439d1f443823f28b21b5194d1a0560dac511f9f88cae263e3444001ffffffffe96aeb8d55ca3c8673df8d9e7c3c8d93fafbbdd8a31b51afbe236bd3e5b3fe7e06000000494830450221009e744a2da5926f4e6e4f673a9c99921532f7d1036b46123d52b7de043f34f67202204af6d029e11be1b8a73e618ceb8c5149ce2e2737a38a03e8c63b213853ddc80d01ffffffff66c0a3b25a2f28222ccc7b24fcf467cb407ade77e64e63b4293e9f7e6439d79e040000004847304402205cce10f605b789fd50da53b6a671abda96f84c8511ccdd8bc4edfd80e52f8823022065bb2197bb99201acfec6dc5ddd3ecfa7690a2f69090073aa9621a40f249a35801ffffffff3be57bdde228c7b963116386ea82cd739d072017bad80966db222bcfdd3c1ee50c00000049483045022100ac555dc33a83af65ef04d95d5771cac9ea699265294f46ad8794264160388f1f0220449ad91f8ed769ea3d44edbeae5e27d78030f9af2fb0861160989b012bf3e5a501ffffffff25617f0b9249855f811804eb8fc80777dab9153f144adc05929ab7b237146c960800000048473044022035c05112d62e3fe2cb9a22dd53a0808998565539fd4d415a0b5ce8c76788803d02202aa0fa919abc3221d594f4ec0e374538dc6ca0f6fb31f93dbdec63436a3e125c01ffffffff76358aa1770a4021bd0ca18995eb1e25ef7cc098e11675ba75f035e27d74d28d030000004847304402207dbb57edd0a6f687d1168adad129e2bc3d0f609e7503faf3d6314e75600bcd700220038e56a301013b56373b54cbba004b7ce277f629974e2a2950fcd3761294d0c001ffffffffcbe3d3a2a43eaba8ca75abbdc5f517f68eefaaf5a05f24309247f2309381c30d0d000000494830450221008acdc662d28d67a87bf714d5841e52ec7bb0240e9020c2b7cc888bf1384a0d03022000faebab45b71f907eb51b8490795bce626ffe42fb95f69e5e3b4596e6f1f5d001ffffffffe78c00cf8a90459be040f137a485c05777ab751a5c8af1ad23eb12dad47854ca2f00000048473044022037a25f0622e8e52c4f267437f3d0c4297725e4ae085fc2249d515bb41dd9162002202faa1aa6d73b43917d8e9ec1b93cdee9a083c922ad536d1f5ae449ef3a25069d01ffffffffd6e4cb34a0fff3cb53e36226b36a15caeaffdbb824382e315f3c6d5d87744d240600000048473044022049a688a61ec0b1dca9e4bbd200b4f3ac7f511b8b367fe367f4485b041afda8f002203763c2c591674f054bdc4fb428da7a933448d4b4b7e1380c3dedce5f0fc5c11f01ffffffffe43d28a33d433f0c72636bf728097e00b3e6ceb4c1fb5588b07228c5963aff0b0700000049483045022100edcdb743bf49498a3243f761e70ce6256e4fe8df98dba9e6b9422fea3ca856730220676f37c062c20e22aad4f9b64f6a6066fbe52647381fb629aecfa32dd6fb91ce01ffffffffed91f6f406c9652025a4cfc2021b9ff59d5d122afcd1b63ebbd208c5ed54d09c0a00000049483045022100a3565007b2b9dadb91346d260c7f193da01fc7a260ae1ac288ca14fc61ae3fc40220616c5289aed3ade2345661f5322ecbcbd392c88c938d196f3f14a05bf773f2c001ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac00000000000000002a6a28459e3d4b93db370fc2dbc92488e6b2ef5563bb61f9da874ae63312049beec9a4b6cc09004d494c0000000000000000000000000000000000000000"; + /* MARTY to KMD Nota in KMD chain */ + constexpr const char* strMARTYKMDNotaHex = /* 3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 */ "0400008085202f890df7c7cb7594b9f1d34d06de01b434410d6b30f4e5ea02ff9807c05c345d5697f30a00000048473044022076ef2a020a9cc24b2d54d1d70a2c234118dd3ab8bec5649be16845f131781d69022078fa6187b335f830340e9112bd7a55331d1d3be04d8b4f8588628ce6264f2c4701ffffffff6be666653aeb9b8f56f27452e602c8232a3cd8d287c9cb3158a68dfa2beb5d581600000048473044022040bd4cd1b7bd147c0c4ccf2c1b1685bb463604ba5f1e2a8167ce35705e8692810220713b6d96da86bbcf346622510e17470187b0b6febdcb42b25200c8abf9eb493101ffffffff0672e192a8a4b2718fcac08f860a8d57c0d917b12828f149f8de02f74ccfff840700000049483045022100d9e21b9902f46983385c5453c3b04ba3a5ee58ce291e90d0763e64dc403fc93602204a6e79498aa269adf3a33ad812ab452e3cdf61205c1d656e352ed43c89e9e25101ffffffffaf9c7e4cff68ccacc7ae9f1087deaaf136e850738d43a7ed5054b37329df54910900000049483045022100df4e559c943a438652449813ee9ebe2c59ed294c542e508db9317ff84101386a022069b93f1acff2fd22b7ef65d0d524564412922a50be9b4d1cd1ec64d10732f97301ffffffff3f3604c882ddf4641bd68714ba22e89180fa1d75613a95feef8b2f243a9776f60000000049483045022100f0c9cccc5ad1fbc8f6d5d84e3b3aa4ffecfc2c722e7d5f4196cf03b222aea8bb0220238fc0c6dda7b0e82514717c38e82d64b8193d1ef83bc245a786d3b03548ae4f01ffffffff3b3a8e814d408a0c3ff841b6613f452568a5e9bc110429d623493b6af52197ef1500000048473044022029ded64cddf64e10e3a17322127c1ad2b8cc350679cb0004f3ff88adcc8a7b51022062fd807e184ae85d4b6239e3a8caea09ff966962cc221696073492f3ebb382a201ffffffffce93bf31c85222b7fc95e956a77ee3cb3ad24482297f85a4e0967d61d7ac73eb2a000000494830450221009ef5def03f9e8485c12763f6eb41b7e3ea1db6ebd30916895d1ed514f0d3dc220220354d8a1d617779fcb2bf95c45d2e39480465d46a6abb637a915509725247436501ffffffff5d96e2c7947571ffdd0ae0a5a57d842db902427aa02eace4cf69d08698ba526d02000000484730440220350e8d4c12c5fd635786804c55974f760d555702d5ac78aa5a949f3ec9102ed402205ff23f1a18f897ce93ddacdb70ee6d3f81f751f83009172e3968f701562b2adc01ffffffff2cc17a206344f3110af938c68016d422f86b2e499024913fc00e997b6b8319f103000000484730440220044b491275577fca35438a02e3acd218b5de2ba8ce8846abb5ecef78293d2c0802201252386782bd6e7dc8543a4b6ade118024f960ad684efc5d593cdc0f8a15051501ffffffffb8691fa8cdd709e4560671cf203ab1703b21e747800583dde9ff2760a077a9a60300000049483045022100d1e9c9b401c90f7d3dd5d3822afd6056486d50325eae7f84cfe203f66684a182022035ce96f036b8005d933078295f9776b44df4d6970eb94d4a6cb8a3d4021a1fbc01ffffffffa89eca8dbfa4a0739f8d18dc144bb4208a7336957db6b5552c2658646d33bf8a0000000049483045022100a5b3ebcb349540ec776ade7e531a9e50278ab9f64629dbf812e1899d763729ae02201e412771d4b54a3bac2a941af7e6b6c78461bcb7382d6c0f7ff67c1d6dceb02a01ffffffff774cdee54eda73eef85696f32c8f4ec8c03977e6536765ef0998482edd7c338e0f00000048473044022023a7f4898ef8e6e2dda4ee236a0b47bbed979a972751f71c5d5f5650e0edd50702207cc25962aafa6dd35fe16b934be5e8e89b314072d3a273c9e946464a17627fdd01ffffffffd0125e4675f6ac48482e57d5c60dc955a8736ef16e90226ef8f219af7fd6c1e90800000049483045022100d9d88f9ea4e77cd191449146560f52b98b98f776283c9681c5c25489bac3c4420220577a9e42b09d0ffee60c40ae2ae4f54ad4bd0055ea6f8eae2ee62ec2cbc3fc9d01ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000516a4c4e43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f007003e1602004d415254590077079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a411400030000000000000000000000000000000000000000"; + /* + OP_RETURN: + + 43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f00700 + = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766 // srchash + 3e160200 // *notarizedheightp = 136766 + 4d4152545900 // MARTY + 77079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a41 + = 416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 // MoM + 14000300 // MoMdepth = 196628, MoMdepth & 0xffff = 20 + */ + + /* MARTY to KMD Nota in MARTY chain */ + constexpr const char* strOtherMARTYKMDNotaHex = /* 5652d2c4280f3ae87115d1c34308d426ef19a3d12506c741aae9849c9692108e */ "0400008085202f890d7ec758fa6783ec2fdabdd7f110032b2776a885f308f0a4354767f2db0bd7acea0000000049483045022100aec03e70c4c10d7159f9b34172167636fc720b7a37b698c51f5792c1d59b67b802205084d893c77f6605747e3e26b7fc3f30fe4682a8cff3d2900171c0e00d0b6b2701ffffffffbce3c2c64767eb766fec6e4c037ed6e42dc5c053ee4b36c000bc5e0346d56702020000004948304502210095ea79085436136388f85566973768abe073f73e29863dad12b27d52a71ebb6d022014ba587f87786c5eb969389185d9cae07bd13df1cd85b2d1b14fcef8ee519f0f01ffffffff460d180832c974a85c1548fc3ab3df1e9a36d043dcae5d75641eac4dda3b71c4010000004847304402203b274d9b0a31211e8d68be9207789d52bb7ba633727c29432a4db561fc21b73f02203861a11a7fef13c2da575d226ba640f0e37d292f8be99cf660ad097b262ac1fd01ffffffff01e2fbfff7c9dabb60bd5e7dd5739ddb8888ed4fbf85aeb2670a2937e5c8e7b70200000049483045022100aa9164f6e8bcaa3ba6c5fe914320fba87fa28896afa7a4734a084a9cec0eec4802204a1f32b245fef25b15914abe22a5413bde65130456bf9b9b8602916ba64101a601ffffffff004899d14421817c6356fbdb48cba1d1109fdcae450a9b4e4ea1dc7429d97e230100000048473044022059782fce0a2d96e5955071df1dc7ceddb4ba97ecc6bacefad4a4417415514b7d022039f02e517a5935c00432175cccd47e7fa3f28cfaedb1c592d5041177bcb56df101ffffffff5ecd6f6c6868783bb8230cf10bfe38ba144ef52774a75a2fc3979289a308d3af2c00000049483045022100fd6a891ac32178e8a0d1b6229fd52215edc9b36775217627ac14ad797f74bd1b0220092678942659e188b9bf774b7aaf37df6f1324a9191d3f11c847c55e7ea1bb1201ffffffffd2b3e6188c21a7967e5bf0478cefa10b89ae54c79c9df1ea0aa5ac7e81748b910600000049483045022100c30b5bcee4c3aaaf04e4e8f97b5d011f0f9ba117febf6170935119255c8708f4022041d0d99a2cd7939c308a2cf826ef5a41fea6612b3230b486605a1e3f9f2a994b01ffffffff2380813ff427ae3e25bbfae0d0aab992e75b648e0d5d5988390c42eb3a070bc6020000004847304402205c29ecbf0b3b316425c72c290aa187e7f7aa8c67c2edd7c35787065764a064440220383ae0d842f5a51f15ec15b20e22386bef2992c95c97991cdeb7fb4d495b97db01ffffffff1807c403327c887424439fcd6f25d3482721b4cc139e15a10c9481b4db57ab8600000000484730440220676f105a1a7bdd046eb8887adb8445545f738375a674d1f31854451e33bd5a54022042514bbab7b4292704ae6acb595feec948912da986376fc0fd7f2277cc73f13001ffffffff6a33459f7633589547376ad35ed6976a8740ad3c37ec721ef913df2cf8ab51820100000049483045022100c114a0533dd8317cf3f24f4346109a8e691e1455929d4c2b0f7462481b54b57102206ccddb3f8c36ce2a14c49260cc83eca746d08ce7420aa13e006a18c1659f696501fffffffff1410cdb724ae369fd1654e87cf6eba08793acc19c0fccc759edd13f7e9dbae003000000484730440220697acd17030dcf389c08e4bcbeca853759712a01c3d045f6b41423eff158876d02205280dd15a6c71be53aada2fd2c4e69fe0fb152b59863f4c0c15c977c6c1c6a9201ffffffff830194770d1bf4b56da36c6ded3b31f300e44a2d346b56ec5cf9ec976746efe4070000004847304402203506bcc68fcd2a8b9254954dc6fb68e119b3c4f981c52d6ead5bdeec4abec87402205e09f78cbe18805a6b78ed057bc655305735937abec5e678d957765387c6c45b01ffffffff3a787505f87ad95fb0880cce2c0939f7f6275b182e197f54a67a1959f90e2d98110000004847304402202190642267a0bfc82253100ce4036a24adb2b5034cad6f8288a7d4e4acafa41302201abbe9e5ca7c2841db6368186d17176cba92ab85707931ed07bfb7a8d385818d01ffffffff02f0810100000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000956a4c9243531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f007003e16020076c31c0790592e2f4cc6e10d1d94c87225d055ba390576f289e7d8b209cdbf3b4d415254590077079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a411400030086d7ead2472d0bc65d1e532add98fb837739057d5d2e428db90740884f1b36070000000000000000000000000000000000000000000000"; + /* + + 2023-08-11 20:07:15 ConnectBlock: wrote 1 block notarisations in block: 00044cf05e394ac80f3be126baf421cb7d604e30cf6a68171504889789bb53df + 2023-08-11 20:07:15 [MARTY] ht.136773 txi.1 signedmask.80820204410001b9 numvins.13 numvouts.2 <<<<<<<<<<< notarized + 2023-08-11 20:07:15 [MARTY] matched.1 VALID (MARTY) MoM.416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 [20] CCid.3 + 2023-08-11 20:07:15 [MARTY] ht.136773 NOTARIZED.136766 MARTY.0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 KMDTXID.3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 lens.(146 117) MoM.416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 196628 + + OP_RETURN: + + 43531ac5e2b62429b8a0c25dfcb22716f5dbe50e25f9ba8ecb48aa77f4f00700 + = 0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343 - MARTY Block #136766 // srchash + 3e160200 // *notarizedheightp = 136766 + 76c31c0790592e2f4cc6e10d1d94c87225d055ba390576f289e7d8b209cdbf3b + = 3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376 // desttxid + 4d4152545900 // MARTY + 77079872508b559c4726238fc08712e343b40456215e1de51abc507691e16a41 + = 416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777 // MoM + 14000300 // MoMdepth = 196628 (0x00030014), MoMdepth & 0xffff = 20 + 86d7ead2 // ccdata.CCid = 3538605958 (0xd2ead786) + 472d0bc65d1e532add98fb837739057d5d2e428db90740884f1b360700000000 - Garbage (!) + + expected MoMoM, depth, numpairs, (notarization ht, MoMoM offset) 48 bytes, but have only unknown 32 bytes (!) + produced by iguana. + + TODO: a) if srchash will end on `K` in AC, it will be counted as KV OPRET bcz of this condition ... + */ + + CTransaction CreateCoinBaseTransaction(int nBlockHeight) { + // Create coinbase transaction + auto consensusParams = Params().GetConsensus(); + CMutableTransaction mtx = CreateNewContextualCMutableTransaction(consensusParams, nBlockHeight); + CScript scriptSig = (CScript() << nBlockHeight << CScriptNum(1)) + COINBASE_FLAGS; + mtx.vin.push_back(CTxIn(COutPoint(), scriptSig, 0)); + mtx.vout.push_back(CTxOut(300000000, CScript() << ParseHex("031111111111111111111111111111111111111111111111111111111111111111") << OP_CHECKSIG)); + CTransaction tx(mtx); + return tx; + } + + class LegacyEvents: public ::testing::Test { + + private: + boost::filesystem::path pathDataDir; + void printMessage(const std::string &message) { + std::cout << "[ ] " << message; + } + void ClearKomodoGlobals() { + + // clear global structures between tests (should be called in SetUp and TearDown as well) + + adjust_hwmheight(0); + for(size_t i = 0; i < KOMODO_STATES_NUMBER; ++i) + { + /* The destructors of all members, including NPOINTS (std::vector) and events (std::list), + will be called correctly after this assignment, and the memory will be freed. + */ + KOMODO_STATES[i] = komodo_state(); + } + } + public: + LegacyEvents() : pathDataDir("") {} + + std::ostream& LogMessage() { + std::cout << "[ ] "; + return std::cout; + } + + void SetUp( ) { + + /* Set environment for each test */ + pathDataDir.clear(); ClearDatadirCache(); + + fPrintToConsole = true; + fPrintToDebugLog = false; + + fs::path tempDir = fs::temp_directory_path(); + fs::path uniqueDir = tempDir / fs::unique_path(); + if (fs::create_directories(uniqueDir)) { + mapArgs["-datadir"] = uniqueDir.string(); + pathDataDir = GetDataDir(false); + } + + STAKED_NOTARY_ID = -1; // should be set via komodo_args call in real world + SelectParams(CBaseChainParams::MAIN); // by default it's a CBaseChainParams::REGTEST, see ./src/test-komodo/main.cpp + chainName = assetchain(); + + komodo_setactivation(Consensus::NetworkUpgrade::ALWAYS_ACTIVE); // act as UpdateNetworkUpgradeParameters for regtest, to set sapling & overwinter activation height, but for mainnet + + KOMODO_REWIND = 0; + chainActive.SetTip(nullptr); + + mempool.clear(); + ClearKomodoGlobals(); + /* We want to ensure that global variables are cleared after the current test execution + because the next test that will be run may be different and may not use this fixture. + Therefore, we should provide clear globals for this test as well. + */ + } + + void TearDown( ) { + + fPrintToDebugLog = true; + fPrintToConsole = false; + + if (!pathDataDir.empty()) { + fs::remove_all(pathDataDir); + } + + mapArgs.erase("-datadir"); + pathDataDir.clear(); + + chainActive.SetTip(nullptr); + komodo_setactivation(Consensus::NetworkUpgrade::NO_ACTIVATION_HEIGHT); + SelectParams(CBaseChainParams::REGTEST); + + mempool.clear(); + ClearKomodoGlobals(); + } + }; + + TEST_F(LegacyEvents, PhantomOpReturnEvent) { + + int32_t fakeBlockHeight = 3507273; + + std::vector vHexTxes = { + strKMDLTCNotaHex, + /* c495d8b31491bf5ef3d5f123344b9596ac84d604ca509d7f982400f33a6fc7ec */ "0400008085202f8901a2efbc1573128738a37fa5638800357eb309db7aee22eef3c7825aa962a86b380600000048473044022073e8a265ac732ddd480d9ccfbade1f71c98976d91061bc7abeaae96665fd00dd0220299fd6a23e4ab5e4b299f7d29a2da9c87a893901975ed38722c69dd0126f8bd201ffffffff0288130000000000002321020e46e79a2a8d12b9b5d12c7a91adb4e454edfae43c0a0cb805427d2ac7613fd9ac0000000000000000226a20e9a57645780b4559dbefc76111e450a37937d8ce5d70b0f2063e88d1c7dbd24c00000000000000000000000000000000000000" + }; + + std::vector txes; + + bool fAllTxesConverted = true; + std::transform(vHexTxes.begin(), vHexTxes.end(), std::back_inserter(txes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + + ASSERT_TRUE(fAllTxesConverted); + + CBlock b; + + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.insert(b.vtx.end(), txes.begin(), txes.end()); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* + we shouldn't have matched == 1 on 3rd transaction in a block here, as a result, + we shouldn't have komodo_voutupdate -> komodo_stateupdate -> write_event call + for komodo::event_opreturn, only for komodo::event_kmdheight, so the komodostate + filesize should be equal size of written komodo::event_kmdheight, i.e. 9. but + let's calculate this size here. + */ + + uintmax_t stateFileSize = 0; + fs::path filePath = GetDataDir(false) / KOMODO_STATE_FILENAME; // instead of komodo_statefname call + if (fs::exists(filePath) && fs::is_regular_file(filePath)) { + stateFileSize = fs::file_size(filePath); + } + + komodo::event_kmdheight kmd_ht(fakeBlockHeight); + kmd_ht.kheight = fakeBlockHeight; + kmd_ht.timestamp = 0; + std::stringstream ss; ss << kmd_ht; std::string buf = ss.str(); // see write_event + + ASSERT_TRUE(stateFileSize == buf.size()); + } + + TEST_F(LegacyEvents, NormalKMDLTCNota) { + + /* Test for normal KMD -> LTC nota in KMD chain */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507273; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/d56211a82da2c955b46cf7eb91a3d7732b36807fb449d3d88065ad2b325353e7/%3E/29 */ "0400008085202f8901f7c7cb7594b9f1d34d06de01b434410d6b30f4e5ea02ff9807c05c345d5697f31b0000006b483045022100afff458392eb0094e98eea5852fd79abd75caf2440836bd12b50a73178542eae02205ec4160a96b43ae3794e595a182e0a8e56c19e3630b23feb04458f17e4ae2884012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff1f1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4aca54b0ac1010000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88ac2a94b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8f4a781494438a4052b543655f96e30660628251a86deebd6ff5fd595d44fbc2/%3E/14 */ "0400008085202f8901a7bf96918e451370f1554ba6b04fc35abc7b4ac4f1eb96fd0767096112fa213f1c0000006b483045022100eb8283c33341c5da0af0f5f4ce34ca72858b28112dc01fa7f554fdf58a5dccc8022071113a8dc659c70850701df5c4c7a210f5a02fe65cefc75dc278448e4cd5e3fc012102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ffffffff1e1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac1027000000000000232102bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967ac67638fe0000000001976a91409b5e12290f48bc1d9dc5b8d26807252be95656388ac2a94b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/a58bf88a64afb8741b3076503336950a8e708e7bba8429e5f7c5551d88a95bf2/%3E/4 */ "0400008085202f89019e8b1e02b1ea4a0c2096031531e50f4d135a461f67e61b635ed05b0df4f35daf200000006b4830450221008cf781a9fcc8080037d8fc914649cd085ff6161e33fb28505de77458171bc52a02201a6bba76bc3ca910a6fa32284d18707c8f68e9cb5cf8c52f4da7e9da4988a1a7012102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acffffffff1b1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac1027000000000000232102340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24acac70659393070000001976a9146deb008e8c10fb4783a1c5d09e8099710f98bedc88ac228db564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/77e99112a986167b8b66837213f40c7e311f58b98ddd9292c5e69037dc261086/%3E/10 */ "0400008085202f89016be666653aeb9b8f56f27452e602c8232a3cd8d287c9cb3158a68dfa2beb5d58220000006a473044022026280c80a8faf08e7d309287066b97bfbfbdc0affaa6ab557c631661e2b9bb5802200c62637648dc2e87135a3337c285d98ab80767c174403e4ec9c7680cd3153e2e0121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff1f10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac81b254b30f0000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788acd291b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/db4936801fc6113c8601da4b1eb44869f41944097896713bbfd8213941a40357/%3E/2 */ "0400008085202f8901d98abab325206b3a72ef09403850260b3704bd36f7b658961687eecc3c10766e0b0000006b48304502210093cc9efb948134858c8033fe2bef73d64df45cc6446ca54e13ce2c493f3fe5ec02202c73c9010bcf710b687eb9bcadad6f15706d5ef34a5162da16550bf335f19a13012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff0e1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac80115302000000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9154df2973b35450eda7438d7350e836f1aade87109faec7accc68ff4c7e9caf/%3E/6 */ "0400008085202f8901faac01550081530fa7ac000aad923c39ec15972d15aef06bae2770c22f1238330b0000006a47304402202ce1d5a92cdc5962b4243f179fbe3d65d60ea4addb560d2e8c0f347782ed3036022014e679afb75494a4879320c15206286f699ab0a826b21c02741fae262412716f012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff101027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdacf86f620d000000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/65d245441f6650f13542a3f6991c341105f9e59e84e64a0e71362cc7286ad31e/%3E/0 */ "0400008085202f890199ed45b0f4b2d5f20952a8c7d017fa7bcafd3ebfc5273b1c44e6c42a7351e34f0c0000006b483045022100f82e67c52f7ca63344b18085a74adbd57edff32fdc475a8dec4ca6a44ffcb4e5022034f4f597d39b3df66ac376c8be27ff809140baddf6e70977c19d7dce1884f97e012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff0e1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8acd8a4b310000000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/b5070cb4d17a95a4721837ff3d157617895b48dcea40bb9b7bc8f0ddc4ca4af8/%3E/12 */ "0400008085202f8901acd5998aa532c8d7453626c047b11ed17d0132f2fad014aa81fdca492259819b370000006b483045022100c8a59aef8d3d95769b6699da83e18c853735a046405c0f97a183b2c67bb8e3cc022057c59b13cfc09ab2f7d7a04cd02d7e49e5579cc3784f6e8451738193c40ade54012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff2e1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac6a22b604000000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/deeda85a05323506397e52944e3179f4d3b1c85e3a4149ae1f13d16bfa008050/%3E/7 */ "0400008085202f89015d96e2c7947571ffdd0ae0a5a57d842db902427aa02eace4cf69d08698ba526d0f0000006b4830450221009e7ff18404c17f3339ae290e7dbff2fdd66c282251a7f7c1ea6752cd045d981c022070512e525940eb656654bed189d79ec91d5dc449f84774aff8ad9b6ee19691d60121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac6a9e3765000000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/314255d4aac75a4dda30d01330f5edb3f0bd17b56bfbde114711144f74e7e74d/%3E/19 */ "0400008085202f890193a6435e1a0bb7c61d351344ac5b42817a62dd71199c40738560f82e24e4858a140000006b483045022100f95f2bb13b63f8664f0971e3f008fdb21dd06074259d9dda880d867a634ada560220089f36d09494d5af0b3efe665f098b52f716b780fa929f9ee797dcc336fab20c0121022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acf2ffffff1710270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac10270000000000002321022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7acac0b9d5f8e010000001976a914740a3bd4ce730e3e4109d05f0944f369321f43ee88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/681edf013511a1c801342144e6f583ed2f01b0b8182e5006cf2dbd7befef4dc1/%3E/2 */ "0400008085202f8901c1cf11b23674bc7a14c4ca813fc012005ea75bf84ca679534a4b0a1028a1e0ac150000006b48304502210082aa302e68e057a4e8a34c8c3157fccff4b85971ec8921342a5ff97c053ce31a02205cb0a3c149f8cf13dddb3e7737edd885ed5ca73716a151a1a58d53bfdf7c14e3012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff151027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac0b43a123010000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ea776f7a6cf612b0426b48e9c8b99b59b243bb053e5200987cf2fb102d4c7dd8/%3E/19 */ "0400008085202f89014ad8ae2c0be0248cc0fea0a831d2e98a52d9718f2206a33f01b4595edcab1a4f140000006b48304502210085f09a897505bff7cece2c8a94027e6d276f79c8404aa57a76a5264cf0376b54022072049b9e8c9f0ea5ce66e45d723cc4363374fdc577467bfa434dea5a9d1dee6c0121026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efef2ffffff1710270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac10270000000000002321026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efeac744bf8ff000000001976a914bb3c96b371e912efc77d5312bd39bbc12abb7c5a88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8e337cdd2e489809ef656753e67739c0c84e8f2cf39656f8ee73da4ee5de4c77/%3E/29 */ "0400008085202f89012c147d87c9e8bcbe017209e2e1652f955eb624a90ef08edef3617490b9545f793f0000006a4730440220294cf60304a4c98509bce01cef2f7716c9e4949922f2856a0f78ed317a0c1b8a022062cd890d2b6663fbc3e69b939d94668a5b541afbadd5065dfbb65880adaf0747012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff2f1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812facbd335c04000000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000" + /* */ + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strKMDLTCNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); + ASSERT_TRUE(state_ptr->events.size() == 0); + + ASSERT_TRUE(state_ptr->SAVEDHEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->CURRENT_HEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->SAVEDTIMESTAMP==0); + ASSERT_TRUE(state_ptr->LastNotarizedHash().ToString() == "0983a2c9709e524a2a66887266455c2141aebbae558ef9b78718fda8db7094a9"); + ASSERT_TRUE(state_ptr->LastNotarizedDestTxId().ToString() == "1f7f887a8fbf2b48129fee471de3910cf2314ca17385e81f0a56dfa5fec48e23"); + ASSERT_TRUE(state_ptr->LastNotarizedMoM().ToString() == "0000000000000000000000000000000000000000000000000000000000000000"); + ASSERT_TRUE(state_ptr->LastNotarizedHeight() == 3507260); + ASSERT_TRUE(state_ptr->LastNotarizedMoMDepth() == 0); + + /* + komodo_stateupdate will be called 2 times here: + + 1. [ komodo::event_notarized ] + inside komodo_voutupdate komodo_stateupdate(height,0,0,0,zero,0,0,0,0,0,0,0,0,sp->LastNotarizedMoM(),sp->LastNotarizedMoMDepth()); and + this call will trigger komodo::event_notarized creation inside komodo_stateupdate and write_event to disk. Then in komodo_eventadd_notarized + it will call komodo_state::add_event, but it will not be added (!) in events list because add_event adds events to + the list only for assetchains (!). Then komodo_notarized_update will be called and checkpoint to numpoints will be + added via AddCheckpoint. + 2. [ komodo::event_kmdheight ] + Second time komodo_stateupdate will be called from komodo_connectblock: komodo_stateupdate(height,0,0,0,zero,0,0,height,(uint32_t)pindex->nTime,0,0,0,0,zero,0) + and for this time it will trigger komodo::event_kmdheight event creation. it will also be written to disk, but will not be added to events list + in komodo_eventadd_kmdheight, bcz add_event adds events to this list only for assetchains. Additionally komodo_eventadd_kmdheight will be called + with future call to komodo_setkmdheight (or rewind event create) and SAVEDHEIGHT, SAVEDTIMESTAMP and CURRENT_HEIGHT possible update. + */ + + } + + TEST_F(LegacyEvents, NormalMILKMDNota) { + + /* Test for MIL -> KMD in KMD chain (MIL is 3P coin) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507454; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/53646f8f3b1aab7f25a95f04290f69e8d1c9e5931a14b8be0c8066a0f24f0831/%3E/2 */ "0400008085202f8901c24c4390ec637242f7683c8bf1778f80132fe893bd36d78b38744323ed181c8d1a0000006b483045022100a762afbb4c53a2d6bc8bb68c352f59e92e1fa56f5272ffad54077ce3f3dc4b62022009f6610ebe01a412dc8f1488fe624ff0fd6627166ebd82b40e6fd18f1bfefd740121032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ffffffff1c10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac10270000000000002321032674b15524dab1c7a5824aa9d3d38f231a8a04095e11920677ee99d8197d9c60ac88790c10000000001976a9147b61a7a15c36b9a7dd8d048da113454db9b40b5188ac9aabb564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/adfb3a41134ad55f1251a2d30ef77710ee092f904ec5ad889854227a426a831a/%3E/19 */ "0400008085202f8901bd4ba0d2c785edeac233807ad621d49b6088aa16056058dd502b6c07d8f0280c1b0000006b483045022100dbc057bf13a8c3c8ff0f0242915d845d8bae985a219fbb453c969aee6d190e3802205d2c846c51fd9c00808bb08d1733948da70d7098cb225c2f352294245c986bec01210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ffffffff1c102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac102700000000000023210271663454ffe07b7a13f25c93482bb554bab646627ee78941f6e59473a423e9c5ac674bdd0f000000001976a914100b86f4ad905feaaf8c839476aca644ef2ba9cb88ac0ea1b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f19855e2d6e8875cc2ba45e03491b7a6ec504ecbd49b8d0a0bc9b4f1d54f223e/%3E/27 */ "0400008085202f8901e73fde8d1ddfbc580488c62810fbaa27b3d4fa855ee66ac16ef752eea2d8745e1a0000006a47304402205c396ac131983fe47aba450d7532bfb73454ecdb104791f6bacec2e6da16c57b0220256b711903b88f54cb2d5f46064275d97699aaa766f9cf70ad3913c4845e67760121035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ffffffff1e10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05ac10270000000000002321035e356c96d4bc8ddd11109f679b44034fdd22003b87a8deeaae6ba2bb938f7e05acf2bfa218000000001976a9148e760a2ff05bd7cc3f8ac63ee2b122a3eb6c2b7188ac0ea1b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/7efeb3e5d36b23beaf511ba3d8bdfbfa938d3c7c9e8ddf73863cca558deb6ae9/%3E/6 */ "0400008085202f8901c6f1f6f005ae37d2b735f64dd9ccf60c1e62e49ebaae386e8f686a52f7c29b830b0000006b483045022100faaff32d1bd8bcb0d5f89c29a3eb9275fdf027118ccd3b80341bd814603771ba022039a43320fe9545451330b1011334606813aaca51013020f1b9c9e5dd5ce981990121022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ffffffff0c10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac10270000000000002321022f62b56ddfd07c9860921c701285ac39bb3ac8f6f083d1b59c8f4943be3de162ac7c20740e000000001976a914bc8d4359ee1efbcf25b7859a05bb712f0223023588ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9ed739647e9f3e29b4634ee677de7a40cb67f4fc247bcc2c22282f5ab2a3c066/%3E/4 */ "0400008085202f8901c6a0d0de7174d8e182d422899ab7cbadf4a659e4d92fc881f82a89ef749d45210b0000006a47304402200293051c48ed50fa0565646b64b53a3704df98b37bc46e05f962265b78297f1a02203bf8849d4bf0d0e36aed43101717ef5ac225628c80764f7730d142ffce40fd020121022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ffffffff0e10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac10270000000000002321022b85908191788f409506ebcf96a892f3274f352864c3ed566c5a16de63953236ac328d2613000000001976a9140ba28b3d03c03bf8c35b6ef394cf5824f31b38dc88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/e51e3cddcf2b22db6609d8ba1720079d73cd82ea86631163b9c728e2dd7be53b/%3E/12 */ "0400008085202f890136e8a312265efe8af39cdcbbd41923face423f04beb6365550e83d3ffa3a326b0b0000006b48304502210093e68097a03af1241c35944327119cce2735e6afc5675d2d0dd155973d9992a1022078bba29ab637909b2b68c03c9832d930cafcce862d572a53434e9522d096b7b70121025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ffffffff0f10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac10270000000000002321025d5e11725233ab161f4f63d697c5f9f0c6b9d3aa2b9c68299638f8cc63faa9c2ac88fdae1b000000001976a914a4c4b39a3b4c5aceb61fca2835de699f7dd9097688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/966c1437b2b79a9205dc4a143f15b9da7707c88feb0418815f8549920b7f6125/%3E/8 */ "0400008085202f8901429c6e55bb965689e4109108a4961704ac44186c986d256e7d274c1095b73629320000006b483045022100bb59198685ac9866e5676e13ed39bf3ad111629a240a93e03b49c95d55ce2fd80220504578b870aff3680f811955aebaa1d1a1ea5a5cb4f6e64f15624d15165863fb0121036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ffffffff3310270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac10270000000000002321036d2b943e386bd855780b2e81a9f358b684884f396e653eb93b83d2f2ce06b4f7ac80ae0b02000000001976a914c15cbce8b854fa25d08ce349c81c0c16c8240ad088ac26b6b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8dd2747de235f075ba7516e198c07cef251eeb9589a10cbd21400a77a18a3576/%3E/3 */ "0400008085202f8901ff54599bb71f4aa28f0a366d5c7c2706dbc95376a381b3e043a2cb31d4bc41ed1f0000006a4730440220736d0cb449f717a9617ea50db521edfef7fb46030a297f2300ff65a0ff7636f9022076bb50c98ff8ba3f3b773bd2b3e2b838903bcf51035cc21f464a0900794342b30121022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ffffffff1e10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac10270000000000002321022b10b7ec56b5c9f12bc9db1055edb3c2c0e0530453b7cc05239e4a3c442e80c4ac7e0ea80f000000001976a91496598a3ef2782e0f48f6a4f061542a29d4ed609d88ac8a9db564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/0dc3819330f2479230245fa0f5aaef8ef617f5c5bdab75caa8ab3ea4a2d3e3cb/%3E/13 */ "0400008085202f8901bddbf699d789f2b6ce0857c06e18f7362d67bf84bb1d565274451d3ef7b453060f0000006a47304402207dc10a89b365e4e687b7e331b165c3eaa46cfe630aacca655197f1a94be20a6002200b6cff591ff1eb48d457623f76628294c66898172cf70d069948754cfd95765f0121035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184bef2ffffff1010270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac10270000000000002321035be6a54242a53e3ca55bd63430ac9b960fbfaad336d8c1464b5802f03ab184beac8c523824000000001976a914673d81653f225176da6d4351787921dd1689e29788ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ca5478d4da12eb23adf18a5c1a75ab7757c085a437f140e09b45908acf008ce7/%3E/47 */ "0400008085202f890109fb73e0dae1d9ac5f591fb1d3aca116ae6a902b6fa246fb8684bbf328f1c7464c0000006b4830450221008f23411e6088de9cbfd7d5c15c5f4884db903828a9f0110dbfdad0ace3641a9d0220527445f7df5a793ae2c93e64554bc29003b0f415e0151663a91618dc38f4c15e0121026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ffffffff4b10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac10270000000000002321026b8ae180e5e927fbe0cd89606d73df739288501d36d8ed4435d68f66dfcecc08ac08685805000000001976a914945b764e756263161fa2c1ddeb772967c345c32788ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/244d74875d6d3c5f312e3824b8dbffeaca156ab32662e353cbf3ffa034cbe4d6/%3E/6 */ "0400008085202f8901884bc77cce7802931e9671773fb26a72aa44ea666e1a18701a195e57cf5fc6740a0000006a47304402200dbedd3c629290d82e6571b09332586c67c8d1cfbb48cc7c933c68f446e4bec102200e8c121c0aec6faddafb7ca94a2f8953c736e7860107e7a6593da109042a467c01210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278af2ffffff0b102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac102700000000000023210397b7584cb29717b721c0c587d4462477efc1f36a56921f133c9d17b0cd7f278aac70e42116000000001976a9140d31c3c48485210e361cefbb802596795086fee188ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/0bff3a96c52872b08855fbc1b4cee6b3007e0928f76b63720c3f433da3283de4/%3E/7 */ "0400008085202f89011b71b922d6e1cb86da07e019849fb79ba5e0b02edaa0f32fafe875ca4d1d25170a0000006a4730440220163e7948e5efe2aeed7a8acfec69f874aad3e38bd41f2f5465750bdd9e036a1102204c257368e9e73a161a17c431d08b16b9d9f3022a7dafbeb39449c6d6fdfa0f0901210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01f2ffffff0b102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac102700000000000023210338f30ca34d0aca0d79b69abde447036aaaa75f482b6c75801fd382e984337d01ac6d2f160f000000001976a91414f205aee134f85aa42d5f878d562beac9eba68688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9cd054edc508d2bb3eb6d1fc2a125d9df59f1b02c2cfa4252065c906f4f691ed/%3E/10 */ "0400008085202f8901f00aff7f6994c78a94a80df4a5d961d3a46aca8df0422ea0ae19335507f5cd140a0000006a47304402206a4f1ce3c37baacb1337db5f9e9eecc91357a690c6ea846638e6f4b3c12ec33602204118f1c4db972c206d5e90def7bd3c643697da0a8d5b1da15553c3181927a6d8012103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497def2ffffff0c1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac1027000000000000232103c1efa0a64392e68cf50a13e4611b272b914cfba1e07f49f94389db3bac4497deac51c15331000000001976a914bb3c96b35f6bbc4f4e878591e12afd30dbb9af1588ac00000000000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strMILKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* + As it "back notarization", mean confirmation in KMD chain for the following MIL block: + + srchash (block) = a4c9ee9b041233e64a87daf961bb6355efb2e68824c9dbc20f37db934b3d9e45 + *notarizedheightp = 642230 + + There is no additional events should be added in events list, no new checkpoints added, etc. The only thing + the komodo_stateupdate may be called from the komodo_connectblock here: + + if ( !fJustCheck && pindex->nHeight == hwmheight ) + komodo_stateupdate(height,0,0,0,zero,0,0,height,(uint32_t)pindex->nTime,0,0,0,0,zero,0); + + and komodo::event_kmdheight will be written via write_event to komodoevents file. + + This test added for fast debug "back notarisations" inside komodo_connectblock -> komodo_voutupdate. + + Also as MIL is 3p coin it uses 3rd party notaries, so, notarized variable inside the check will be 0. + May be for 3P we should skip all checks and calculations at all? Like if chain is KMD and notarized is 0 + (and matched = 0), then skip it at all inside komodo_voutupdate? + */ + + } + + TEST_F(LegacyEvents, NormalMARTYKMDNota) { + + /* Test for MARTY -> KMD in KMD chain (MARTY is AC) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + int32_t fakeBlockHeight = 3507245; + + std::vector vHexNotaInputsTxes = { + /* https://kmdexplorer.io/tx/f397565d345cc00798ff02eae5f4306b0d4134b401de064dd3f1b99475cbc7f7/%3E/10 */ "0400008085202f8901257fa39ebbcc1975260c47be2a2b1abcab775e16f0170ce8fcf27d9def8720a31b0000006b483045022100c771f08d3901e37e46cd2918e3dd07fbb7da5f8b4b48ed73bc5423d52bafa78c022059e90d54ace2dc0d1b96a277e2384747a542b76e9889c044d4d01edc1dc164aa012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff1c1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4acc57b0fc1010000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88acca8ab564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/585deb2bfa8da65831cbc987d2d83c2a23c802e65274f2568f9beb3a6566e66b/%3E/22 */ "0400008085202f89017fa9f37be4b1df06f604d0b9c82bac3211a51c20a97f92aefd7dfba55e0e4659200000006a47304402201b78d424c6dff2ee0e704a6dfb18b5ecba8195f2c6cd3a63ec90c273bcdde24902202326fb3a71f7a24625c77c07d6db0711c1fc51d6a66ff8a0bee4388ac8a93a4f0121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff2310270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938aca1e259b30f0000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788ac7288b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/84ffcf4cf702def849f12828b117d9c0578d0a868fc0ca8f71b2a4a892e17206/%3E/7 */ "0400008085202f890140e69b4ca48cb8d9f04e135e8867f7b8b75645a68b677a3840a3cf7cb9d262e10b0000006a473044022075940052176bb861659c0feeadf141b4239fa647f07b16ef25808dcfd2c37fa802203d0b26700b7ae673127303ecd9f215e3818d04f4391fca3bb9f40b3991f6d4e8012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff0d1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac20095702000000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/9154df2973b35450eda7438d7350e836f1aade87109faec7accc68ff4c7e9caf/%3E/9 */ "0400008085202f8901faac01550081530fa7ac000aad923c39ec15972d15aef06bae2770c22f1238330b0000006a47304402202ce1d5a92cdc5962b4243f179fbe3d65d60ea4addb560d2e8c0f347782ed3036022014e679afb75494a4879320c15206286f699ab0a826b21c02741fae262412716f012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff101027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdacf86f620d000000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f676973a242f8beffe953a61751dfa8091e822ba1487d61b64f4dd82c804363f/%3E/0 */ "0400008085202f890101f509fd8fb00d5fcaf536d246e0718be4ad1058c754b9e75779d53a6d92b9a40b0000006a47304402203ec1b6ad71816eaa776667614e4d535d57f32790a2e94a51569b5b4ab333c02902202cdb642798f0ac1e5ea983cdd92a50d2095982ae732709d3d28aebded37626fe012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff0c1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac88c3b710000000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/ef9721f56a3b4923d6290411bce9a56825453f61b641f83f0c8a404d818e3a3b/%3E/21 */ "0400008085202f8901447144577c9ff9cc627ad033e09755ab37023a68aefbee73cd74091764f08219320000006b4830450221009b70dce873ebcba20ae131d26b313729e6d71aabc02637d45753f1b70ba745a5022000d328ebe5b2724c7fdccf439b58faa958d4f2ffe945809c657d01abd1138d2d01210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbffffffff33102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac701f0c06000000001976a91450e1ea45b5dc98c41b2a4df0999f327941ab858688acf217b564000000000000000000000000000000", + /* https://kmdexplorer.io/tx/eb73acd7617d96e0a4857f298244d23acbe37ea756e995fcb72252c831bf93ce/%3E/42 */ "0400008085202f89018bf5611ccae8600d509d0e7fa3ed97d57531f7c6325e8976407e88d060689648390000006a47304402202a5ad8322a795d70e273dad76694d0db2275de542be540ea0b8ebbdf538dc6b002205160170f4177b0d354b9f76a8b22e1e0260272dadb51256ce57f712e1bf78cb1012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff2e1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183acee00c604000000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/6d52ba9886d069cfe4ac2ea07a4202b92d847da5a5e00addff717594c7e2965d/%3E/2 */ "0400008085202f89016fe30be8e5926bc91189a6121967b1b8ebadce19a44ffb20abc52232beb75af00f0000006b483045022100de62fd20bb68ae8863a8974705c2e6f08af29d3df9c2483b62bca4265c0dc262022059f93345cc9351d28be78a13bbfea9b5b09c1232bf29094d98bb16c54352acef0121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac8df23965000000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/f119836b7b990ec03f912490492e6bf822d41680c638f90a11f34463207ac12c/%3E/3 */ "0400008085202f8902b249129b90e6e3fc10971e3f6a9b69e0e2c10c112c162e78459aa5824055df62000000004847304402207754fbd3f4ca5c3f719872cddebc9bbdb4423aa9668db8d6eebffb5e1433fe72022010b2bf829582bec509ac4e5bfa680133367547fe55e4d75f436168587d19abf801f2ffffff038d96ec6dcf59fbb996204936fcfe392c3413cc5214145871891772f664d32c140000006a473044022038fd47570415e9ecb885cd878f397edf523fd05f9e1a70f3069c016e25ba64f00220595c4584940f91fb4bc1484a98876769cb731196b5233b4bedc09ce573351eaa012102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82af2ffffff151027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aacf9cda66a150000001976a9146fec2bd5e24ec5c6848747193952d2155fcd844688ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/a6a977a06027ffe9dd83058047e7213b70b13a20cf710656e409d7cda81f69b8/%3E/3 */ "0400008085202f8901638a295039bbd3a7118cff06b56cd9c27628102836501860fec31df4fb4ae21b1e0000006a47304402200b3d4669f51788e09264fa10eb0e2140b0849de49f997a1806a127de52082352022005ffdfe64303a5b49252126df507df507bbe3f465d8b7b376edb0a5c42919a1c0121021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bffffffff1f10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bace0a2a4d9030000001976a914a816c58c6371b66db484f644bc07894befffb34588ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8abf336d6458262c55b5b67d9536738a20b44b14dc188d9f73a0a4bf8dca9ea8/%3E/0 */ "0400008085202f8901f3cf85e7e1b4f6831e62b55de8a030b865edd059067a09fe6f802aac143faceb140000006b483045022100f21d230b0e2ae3da7cce137317a7de0702d244e3420f3c0127daba23bfb463530220091bf3a848c95ec42aa5c66bc42c98c16d5a4cd48bbf729bed05dd05d2c7f009012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff151027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac450e9b23010000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/8e337cdd2e489809ef656753e67739c0c84e8f2cf39656f8ee73da4ee5de4c77/%3E/15 */ "0400008085202f89012c147d87c9e8bcbe017209e2e1652f955eb624a90ef08edef3617490b9545f793f0000006a4730440220294cf60304a4c98509bce01cef2f7716c9e4949922f2856a0f78ed317a0c1b8a022062cd890d2b6663fbc3e69b939d94668a5b541afbadd5065dfbb65880adaf0747012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff2f1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812facbd335c04000000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000", + /* https://kmdexplorer.io/tx/e9c1d67faf19f2f86e22906ef16e73a855c90dc6d5572e4848acf675465e12d0/%3E/8 */ "0400008085202f8901b91be96543d49b86b0789baaa8acbb97105eec0ac5f110c43a73aff9922b3420280000006b483045022100e856b08fd11f03e915f8502cc5ee74b6797ee08279927fc35b94ed932240a647022058a9872446787fd216d351724012ecce635c738b8e87136dc41449df5d2afbad012102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafffffffff291027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafacadaae384000000001976a9145c781a32992c3c07f350a72e4f6ca88f3630b0c788ac213bb564000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strMARTYKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + //indexDummy.nTime = GetTime(); + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 0); + + /* Same as in NormalMILKMDNota test, we have back notarization of MARTY in KMD chain ... + but we haven't any events or so related to it added, except writing of komodo::event_kmdheight in komodoevents file. + */ + + } + + TEST_F(LegacyEvents, OtherMARTYKMDNota) { + + /* Test for MARTY -> KMD in MARTY chain (MARTY is AC) */ + + ASSERT_TRUE(mempool.mapTx.size() == 0); // be sure that mempool is empty at the begin of test + + chainName = assetchain("MARTY"); + int32_t fakeBlockHeight = 136773; + + std::vector vHexNotaInputsTxes = { + /* https://marty.explorer.dexstats.info/tx/eaacd70bdbf2674735a4f008f385a876272b0310f1d7bdda2fec8367fa58c77e/%3E/0 */ "0400008085202f890132f6ccdb4590fe17f8013eff64d07b1868a67d8eabde820a63a8ea9b66c7aa5a060000006a47304402204f7b9648b1c17e3d4ef52c9ec8eeb2c6cbf9d70e245875c94b232af2632f92530220284019341ca6bd284509ac9d2dc1d2788bb357c4fb264a0a906ef52e688569e7012103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ffffffff071027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4ac1027000000000000232103955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4acd0ace8d0050000001976a914eb12f821ed7c9ac21c8a67bdcd0ff01ffcd9ce3c88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/0267d546035ebc00c0364bee53c0c52de4d67e034c6eec6f76eb6747c6c2e3bc/%3E/2 */ "0400008085202f89013077bde0d3cc59d60b09141e10aacbbf2f58ffe30eb3242a8a8b872e268c9a0a060000006a47304402203c9395eefea2717de404c559cf21e7c9736b8307246a0dda179131915b2101be022032695b6648b9447631bda26dfd99250aa40366de6a9eb876f9f710f383ef17110121035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ffffffff0710270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ac10270000000000002321035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938ace0780cd1050000001976a9143c874ea8a4248615ba0838c873e0a79a459c6b0788ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/c4713bda4dac1e64755daedc43d0369a1edfb33afc48155ca874c93208180d46/%3E/1 */ "0400008085202f8901fbc9fe09894f6f6f0ecd77c3328a994532c93592642bf109b093c310b0865bdb040000006b48304502210091f5d87e99b60fcd4af61d6fcbae2c23f650a9a08444568e7b8b8010b9724ea502206fb2d1a3c37949e844a3e6fbc5702a77ba731ff14ce8df201e1a45e4d4ce6f5b012103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ffffffff051027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8ac1027000000000000232103bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8acc013544a060000001976a9142ef9bded2a17342ad5d324a5d707de92df3bd8ff88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/b7e7c8e537290a67b2ae85bf4fed8888db9d73d57d5ebd60bbdac9f7fffbe201/%3E/2 */ "0400008085202f8901ee8e81bea5ff24b717a216c0fb220c8f3d968a40a71872d17f56dd78cd2ec6bf040000006a47304402203e7d9ca0ef45d70f68ae598ee3ab39299f12564bbf60718dd33aee5219042f3902204017e40e3e59daf1f25d15e51362509fb9f2b9ccb911af44e4b4d3d4d9ff3465012103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdffffffff051027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac1027000000000000232103bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cdac3be5c860060000001976a9140ba28b34ebd21d0b18e8753e71c2663c171bec9888ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/237ed92974dca14e4e9b0a45aedc9f10d1a1cb48dbfb56637c812144d1994800/%3E/1 */ "0400008085202f8901c64d36422e767c9e5aa45952d3dab03552439ba10f3caf1662135245e50589c3040000006a473044022079c97424113a2c5ecda6caec91e9a7cd800ea3b7f54007e0638a981078b8e19a02201c82ca5f42c5518ed7194da97b53e0f31cb97f4453e6a6bc5fb7e8014927a1be012102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ffffffff051027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac1027000000000000232102f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8ac98eff422060000001976a914972fa06fb0c15e139aa9da07e29bc57047e4d92288ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/afd308a3899297c32f5aa77427f54e14ba38fe0bf10c23b83b7868686c6fcd5e/%3E/44 */ "0400008085202f89017c1d05b5aa7dc45c6f66cbe2844e57f7eb55faad66b789a5ff86a74fa39753e9320000006b483045022100c5a349004a06eb7b88edb811be84ef89be645ddde31457ce2eee4778ef3c070002206d4c35647d4a274318a3f6f128a47be7f61650c8c21f85873e3cf1e846d7ee9501210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbffffffff33102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac102700000000000023210364f2beba6a91ca88a92e8bf709dc21b444587183256f651a30ad1b932242d4dbac8000f3d1050000001976a91450e1ea45b5dc98c41b2a4df0999f327941ab858688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/918b74817eaca50aeaf19d9cc754ae890ba1ef8c47f05b7e96a7218c18e6b3d2/%3E/6 */ "0400008085202f890184cdcb5ad5520b0cb50041abc34fa1361ac1da3fca563ec4a67ca741a985cf9a110000006b483045022100b76dd21741a3db679582717a292e64486967ddbf8e700950f7d311d5d66ee0e0022011be0988a61a0e085879bc2e458de8c079252570597a1969a7150546e70cc30d012103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ffffffff111027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac1027000000000000232103a8c071036228e0900e0171f616ce1a58f0a761193551d68c4c20e70534f2e183ac8811c2f0050000001976a91420dcd1cea9c288c9097fc74163495bc317da28c488ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/c60b073aeb420c3988595d0d8e645be792b9aad0e0fabb253eae27f43f818023/%3E/2 */ "0400008085202f89019e54d13296a98fe2b3187d4375880cadf802df5e9096c858ebd26792198ba5f60f0000006b4830450221008eaf3285e7acd130b1eec289f9eb477c5a8a3c3b8c28870f6d45d42e09e1683002204cd68be01eabf659b0a27dc9f837a0d094b9308e3fd25cc27f7ecca910e2e2680121027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bf2ffffff1010270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac10270000000000002321027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03bac398c66d1050000001976a914d64d6f5f96865f7d5e79fc0577c93ef437cf903688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/86ab57dbb481940ca1159e13ccb4212748d3256fcd9f432474887c3203c40718/%3E/0 */ "0400008085202f8901ae8ac72bc66166f1cb0f71aaa9091c8aa24d897c183fe8cd0fb7b7161352a49d0a0000006a47304402201a87c9e0deaca4eafaee201e1398b66da7699a4233c28ad536e3ede71604b95302204bdea239c33e1b3893eff9d88508200b154865de54c1abf632f574478d6ff4c5012102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82af2ffffff0b1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac1027000000000000232102116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82aac8451fcd1050000001976a9146fec2bd5e24ec5c6848747193952d2155fcd844688ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/8251abf82cdf13f91e72ec373cad40876a97d65ed36a3747955833769f45336a/%3E/1 */ "0400008085202f890114a1bf072dc6bb996c5b496fae0b55606c2b56e430918ad96c3a589785b58e9b1e0000006a47304402201e7c36c5a3f4210b35c4d265e933f47d19967b7363edfe455d31144bdf819df602207438defcd57bd42e37c93a0c9d03df03d9dadc14d675eaa2eea9d8655bfcc9c30121021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bffffffff1f10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac10270000000000002321021e362556ab07d4f1f75a0adce9709ad87ce1a51da679947b0ad4a6b651e9769bac146d06d2050000001976a914a816c58c6371b66db484f644bc07894befffb34588ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/e0ba9d7e3fd1ed59c7cc0f9cc1ac9387a0ebf67ce85416fd69e34a72db0c41f1/%3E/3 */ "0400008085202f8901d0ccb27930d3c94cf78663381819563ebdfef0a500dbaa957922b3c62b1c94360a0000006b483045022100ec756fb8c96a24cafe8e0a9b64f25e77d55599993647f1566061d67136b4e35102206d83282d48cd299515d8489ce9b4e974405e09df81f7e213264485d1c741bffa012102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9f2ffffff0b1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9ac1027000000000000232102eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9acbc1210d1050000001976a914bb3ce123d2e24f67aab158d4e55bb93fb7c9476b88ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/e4ef466797ecf95cec566b342d4ae400f3313bed6d6ca36db5f41b0d77940183/%3E/7 */ "0400008085202f8901ffa79f8c1488e13f7c7b69b6d791bbd611aca1b3948078e5aa3f94335231cee4100000006b483045022100abca2ac4fbd58719ec964b8b4751b3b84cd296e5ae9ab700dbbd57daf8112413022009117d5c4ec5dee63262160edc36bc35ed69212427abb938cd89a52fe4af2078012103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fffffffff121027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac1027000000000000232103af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812fac85d4ed20060000001976a914deb6190cadd4d9b38eddd81a5fc3df21733721a288ac00000000000000000000000000000000000000", + /* https://marty.explorer.dexstats.info/tx/982d0ef959197aa6547f192e185b27f6f739092cce0c88b05fd97af80575783a/%3E/17 */ "0400008085202f89015a86976810d88ced70417ad042121f1f447d78ae18caf72aac5df315bc5cbec9000000006a47304402202ab7b8596f7b8a816ad9098fcf60344e7ebeb0ffef3110fda38b90293ec92a88022028969e25c1ea1b4749e3a68a61d4ab746c123614999f782a611a5e88feee680f012102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafffffffff151027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac1027000000000000232102f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdafac90fddc3779c311001976a9145c781a32992c3c07f350a72e4f6ca88f3630b0c788ac00000000000000000000000000000000000000", + }; + + std::vector vNotaInputsTxes; + + bool fAllTxesConverted = true; + std::transform(vHexNotaInputsTxes.begin(), vHexNotaInputsTxes.end(), std::back_inserter(vNotaInputsTxes), [&fAllTxesConverted](const std::string& strHexTx) { + CTransaction tx; + fAllTxesConverted &= DecodeHexTx(tx, strHexTx); + return tx; + }); + ASSERT_TRUE(fAllTxesConverted); + + // put vNotaInputsTxes in mempool to allow GetTransaction in gettxout_scriptPubKey + bool fAllInputsInMempool = true; + auto consensusBranchId = CurrentEpochBranchId(fakeBlockHeight + 1, Params().GetConsensus()); + for (const CTransaction &in_tx : vNotaInputsTxes) { + CTxMemPoolEntry entry(in_tx, 0, GetTime(), 0, chainActive.Height(), mempool.HasNoInputsOf(in_tx), false, consensusBranchId); + mempool.addUnchecked(in_tx.GetHash(), entry, false); + fAllInputsInMempool &= mempool.exists(in_tx.GetHash()); + } + + ASSERT_TRUE(fAllInputsInMempool); + ASSERT_TRUE(mempool.size() == vHexNotaInputsTxes.size()); + + CTransaction notaTx; + ASSERT_TRUE(DecodeHexTx(notaTx, strOtherMARTYKMDNotaHex)); + + CBlock b; + // Compose a block + b.vtx.push_back(CreateCoinBaseTransaction(fakeBlockHeight)); + b.vtx.push_back(notaTx); + + CBlockIndex indexDummy(b); + indexDummy.nHeight = fakeBlockHeight; + indexDummy.nTime = 1689620962; /* for AC tests set blockindex time is mandatory (!) */ + chainActive.SetTip(&indexDummy); + int32_t res_kcb = komodo_connectblock(false, &indexDummy, b); + + /* + This is MARTY -> KMD notarization in MARTY chain. In this test: + + 1. signedmasks file should be filled like this { 0x45, 0x16, 0x02, 0x00, 0xb9, 0x01, 0x00, 0x41, 0x04, 0x02, 0x82, 0x80 }, + first 4 bytes is a int32_t height and 8 bytes of uint64_t signedmask after. signedmask.80820204410001b9 + 2. komodo::event_notarized and komodo::event_kmdheight added in the events list, because it's AC + 3. TODO: ??? events in file written check ... + 4. state_ptr changes check ... + */ + + komodo_state *state_ptr = komodo_stateptrget((char *)chainName.symbol().c_str()); // &KOMODO_STATES[0] + ASSERT_TRUE(state_ptr != nullptr); + ASSERT_TRUE(state_ptr->events.size() == 2); + + // (1) Check signedmasks + fs::path fileSignedMasksPath = GetDataDir(false) / "signedmasks"; + uintmax_t signedMasksFileSize = 0; + if (fs::exists(fileSignedMasksPath) && fs::is_regular_file(fileSignedMasksPath)) { + signedMasksFileSize = fs::file_size(fileSignedMasksPath); + } + + std::vector expectedBytes = { 0x45, 0x16, 0x02, 0x00, 0xb9, 0x01, 0x00, 0x41, 0x04, 0x02, 0x82, 0x80 }; + ASSERT_TRUE(signedMasksFileSize == expectedBytes.size()); + std::vector sm_bytes(signedMasksFileSize); + std::ifstream file(fileSignedMasksPath.string(), std::ios::binary); + if (file) { + file.read((char *)sm_bytes.data(), signedMasksFileSize); + file.close(); + } else { + ASSERT_TRUE(false) << "Failed to open signedmasks file ..."; + } + ASSERT_TRUE(expectedBytes == sm_bytes); + + // (2) Check events count + std::map eventCounter; + for (const std::shared_ptr& e : state_ptr->events) { + ++eventCounter[e->type]; + } + auto notarized_it = eventCounter.find(komodo::komodo_event_type::EVENT_NOTARIZED); + auto kmdheight_it = eventCounter.find(komodo::komodo_event_type::EVENT_KMDHEIGHT); + bool fAllEventsCorrect = (notarized_it != eventCounter.end() && notarized_it->second == 1) + && (kmdheight_it != eventCounter.end() && kmdheight_it->second == 1); + ASSERT_TRUE(fAllEventsCorrect); + + // (3) Check the komodoevents file content + + // TODO ... + + // (4) Check komodo_state changes + + ASSERT_TRUE(state_ptr->SAVEDHEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->CURRENT_HEIGHT==fakeBlockHeight); + ASSERT_TRUE(state_ptr->SAVEDTIMESTAMP==indexDummy.nTime); + ASSERT_TRUE(state_ptr->LastNotarizedHash().ToString() == "0007f0f477aa48cb8ebaf9250ee5dbf51627b2fc5dc2a0b82924b6e2c51a5343"); + ASSERT_TRUE(state_ptr->LastNotarizedDestTxId().ToString() == "3bbfcd09b2d8e789f2760539ba55d02572c8941d0de1c64c2f2e5990071cc376"); + ASSERT_TRUE(state_ptr->LastNotarizedMoM().ToString() == "416ae1917650bc1ae51d5e215604b443e31287c08f2326479c558b5072980777"); + ASSERT_TRUE(state_ptr->LastNotarizedHeight() == 136766); + ASSERT_TRUE(state_ptr->LastNotarizedMoMDepth() == 196628); + ASSERT_TRUE(state_ptr->NumCheckpoints() == 1); + + } +} diff --git a/zcutil/build-mac-cross.sh b/zcutil/build-mac-cross.sh index adc06861..36a09f71 100755 --- a/zcutil/build-mac-cross.sh +++ b/zcutil/build-mac-cross.sh @@ -4,15 +4,15 @@ mkdir -p ${PWD}/depends/SDKs tar -C ${PWD}/depends/SDKs -xf ${PWD}/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz # make deps -make -C ${PWD}/depends v=1 NO_PROTON=1 HOST=x86_64-apple-darwin19 DARWIN_SDK_PATH=${PWD}/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers -j$(nproc --all) +make -C ${PWD}/depends v=1 NO_PROTON=1 HOST=x86_64-apple-darwin DARWIN_SDK_PATH=${PWD}/depends/SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers -j$(nproc --all) # here we need bit modify config.site for darwin cross-compile case, # to fix env command path and paths to cctools (ar, ranlib, strip, nm, etc.), # but probably we don't need to use $(toolchain_path) variable in # depends/Makefile for $(host_prefix)/share/config.site target. -CONFIG_SITE="$PWD/depends/x86_64-apple-darwin19/share/config.site" -FIX_PATH=${PWD}/depends/x86_64-apple-darwin19/native/bin/ +CONFIG_SITE="$PWD/depends/x86_64-apple-darwin/share/config.site" +FIX_PATH=${PWD}/depends/x86_64-apple-darwin/native/bin/ if test -n "${FIX_PATH-}"; then sed -i.old 's|'${FIX_PATH}'env|'$(command -v env)'|g' ${CONFIG_SITE} && \ sed -i.old 's|'${FIX_PATH}'/|/|g' ${CONFIG_SITE} @@ -21,6 +21,6 @@ fi ./autogen.sh LDFLAGS="-Wl,-no_pie" \ CXXFLAGS="-g0 -O2" \ -CONFIG_SITE="$PWD/depends/x86_64-apple-darwin19/share/config.site" ./configure --disable-tests --disable-bench --with-gui=qt5 --disable-bip70 +CONFIG_SITE="$PWD/depends/x86_64-apple-darwin/share/config.site" ./configure --disable-tests --disable-bench --with-gui=qt5 --disable-bip70 # make app make V=1 -j$(nproc --all) diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh index 87a59afb..1fea5d73 100755 --- a/zcutil/build-mac.sh +++ b/zcutil/build-mac.sh @@ -2,8 +2,8 @@ # seems clang on native darwin doesn't support -fopenmp compiler flag (MULTICORE=1 for libsnark) sed -i.old -e 's|\(CURVE=ALT_BN128[ \t]*MULTICORE=\)\([0-9]\{1,\}\)|\10|' ./depends/packages/libsnark.mk -make -C ${PWD}/depends v=1 NO_PROTON=1 HOST=x86_64-apple-darwin18 -j$(nproc --all) +make -C ${PWD}/depends v=1 NO_PROTON=1 HOST=x86_64-apple-darwin -j$(nproc --all) ./autogen.sh CXXFLAGS="-g0 -O2" \ -CONFIG_SITE="$PWD/depends/x86_64-apple-darwin18/share/config.site" ./configure --disable-tests --disable-bench --with-gui=qt5 --disable-bip70 +CONFIG_SITE="$PWD/depends/x86_64-apple-darwin/share/config.site" ./configure --disable-tests --disable-bench --with-gui=qt5 --disable-bip70 make V=1 -j$(nproc --all) diff --git a/zcutil/clean-help-dev.sh b/zcutil/clean-help-dev.sh index d59f59c9..c247fbc6 100755 --- a/zcutil/clean-help-dev.sh +++ b/zcutil/clean-help-dev.sh @@ -7,21 +7,49 @@ # after an OSX cross-compile. Normally these files should be # cleaned during `make clean` execution. -rm ./src/qt/moc_*.cpp -rm ./src/qt/*.moc +is_git_root=0 -# this will partially recreate *.Po and *.Plo in .deps +function check_git_root() { + + local dir=$(pwd) + + while [[ "$dir" != "" && ! -d "$dir/.git" ]]; do + dir=${dir%/*} # ${parameter%word} + done + + if [ "$dir" == "" ]; then + echo "$(pwd) is not in a Git repository." + is_git_root=0 + else + if [ "$dir" != "$(pwd)" ]; then + echo "$(pwd) is not the root of the Git repository." + is_git_root=0 + else + echo "$(pwd) is the root of the Git repository." + is_git_root=1 + fi + fi +} + +check_git_root + +if [ "$is_git_root" -eq "1" ]; then + + rm -f ./src/qt/moc_*.cpp # delete meta object code files, otherwise we will have MacOS after Linux/Windows build error + rm -f ./src/qt/*.moc + rm -f ./src/qt/libkomodoqt.a + rm -f ./src/leveldb/libmemenv.a + rm -f ./src/leveldb/libleveldb_sse42.a + rm -f ./src/leveldb/libleveldb.a + + # https://unix.stackexchange.com/questions/84265/linux-shell-find-exec-in-find-exec + # https://askubuntu.com/questions/377438/how-can-i-recursively-delete-all-files-of-a-specific-extension-in-the-current-di + + # search for *.a, *.la, *.o, *.lo, *.Plo, *.Po, *.lai, *.dirstamp in all folders starting from .src, including hidden folders, + # to search only in hidden folders add -path "*/.*" arg to command + find ./src \( -name "*.a" -o -name "*.la" -o -name "*.o" -o -name "*.lo" -o -name "*.Plo" -o -name "*.Po" -o -name "*.lai" -o -name "*.dirstamp" \) -delete + +fi -# https://unix.stackexchange.com/questions/84265/linux-shell-find-exec-in-find-exec -find ./src/ -name ".deps" -type d -exec sh -c 'find {} -name "*.Po" -type f -delete' \; -find ./src/ -name ".deps" -type d -exec sh -c 'find {} -name "*.Plo" -type f -delete' \; -# https://askubuntu.com/questions/377438/how-can-i-recursively-delete-all-files-of-a-specific-extension-in-the-current-di -find ./src/ -name "*.Po" -type f -delete -find ./src/ -name "*.Plo" -type f -delete -find ./src/ -name ".dirstamp" -type f -delete -rm ./src/qt/libkomodoqt.a -rm ./src/leveldb/libmemenv.a -rm ./src/leveldb/libleveldb_sse42.a -rm ./src/leveldb/libleveldb.a