Page MenuHomePhabricator

[Mitra] Add Intcode integer format
Needs ReviewPublic

Authored by tobias_ruck on Feb 4 2023, 10:49.

Details

Reviewers
deadalnix
Fabien
Group Reviewers
Restricted Project
Summary

Intcode integer format for a new transaction version.

Spec and rationale (including discussions on this topic) can be be found here.

Test Plan

ninja test_bitcoin && ./src/test/test_bitcoin -t serialize_intcode_tests

Event Timeline

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-debug/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-debug failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Configuring native build in /work/abc-ci-builds/build-without-wallet/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-without-wallet failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-debug/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-debug failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-diff/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-diff failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang-tidy/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Configuring native build in /work/abc-ci-builds/build-without-wallet/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-without-wallet failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang-tidy/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-diff/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-diff failed with exit code 1

Add some comments to the implementations

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang-tidy/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Failed
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-clang/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-clang failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Configuring native build in /work/abc-ci-builds/build-without-wallet/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-without-wallet failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-diff/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-diff failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_conditional_uninitialized
-- Performing Test have_CXX__Wno_conditional_uninitialized - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wshadow
-- Performing Test have_C__Wshadow - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test have_C__Wno_duplicated_branches
-- Performing Test have_C__Wno_duplicated_branches - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: filesystem 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: thread 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1n")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/build-debug/native
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LZ4_LIBRARY
    linked by target "server" in directory /work/src

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Build build-debug failed with exit code 1

Tidy up, prepare for review

tobias_ruck edited the test plan for this revision. (Show Details)
tobias_ruck edited the test plan for this revision. (Show Details)

rebase & update, add new spec link

tobias_ruck retitled this revision from Add Mitra integer format to [Mitra] Add Mitra integer format.Sat, Apr 20, 12:06
tobias_ruck edited the summary of this revision. (Show Details)
deadalnix requested changes to this revision.Sat, Apr 20, 21:07

Not sure about the proposed changes, but 100% sure this could be much simpler.

src/mitra/serialize_int.h
53 ↗(On Diff #47345)

(numBits - 1) / 7

55–57 ↗(On Diff #47345)
if (...) {
  write(0xff);
} else {
  // See bellow.
  header = ...;
}
60 ↗(On Diff #47345)

header = -1 << (7 * numBytes)

61 ↗(On Diff #47345)

value |= header
value <<= 8 * numBytes;

This revision now requires changes to proceed.Sat, Apr 20, 21:07
src/mitra/serialize_int.h
53 ↗(On Diff #47345)

Good catch

55–57 ↗(On Diff #47345)

no need to bellow

61 ↗(On Diff #47345)

Is this what you meant? It doesn't work, but not sure what you meant exactly

// Number of bits required to represent `value`
const uint64_t numBits = CountBits(value);
// Number of bytes required to represent `value`
uint64_t numBytes = (numBits - 1) / 7;
if (numBytes > 8) {
    // For 0xff headers, the formula breaks, as it's not followed by a 0 bit
    ser_writedata8(os, 0xff);
    numBytes = 8;
} else {
    // Pre to represent how many bytes are used for the data
    value |= -1 << (7 * numBytes);
    value <<= 8 * numBytes;
}

// Write remaining bytes as big-endian
for (size_t i = 0; i < numBytes; ++i) {
    ser_writedata8(os, value >> 56);
    value <<= 8;
}
src/mitra/serialize_int.h
61 ↗(On Diff #47345)

That looks better.

src/mitra/serialize_int.h
80 ↗(On Diff #47345)

header < 0x80 ?

87 ↗(On Diff #47345)
8 - CountBits(uint8_t(~header));

And get rid of numHeaderBits, it's redundant.

90 ↗(On Diff #47345)
0xff >> leadingOnes
src/mitra/serialize_int.h
61 ↗(On Diff #47345)

Yes, but it doesn't work (tests fail), for example 0xfe should be encoded as 80fe, but is encoded as ff

value |= -1 << (7 * numBytes);
value <<= 8 * numBytes;

seems to be the issue, I don't get what you're trying to do there

apply suggestions that just work

Fabien requested changes to this revision.Mon, Apr 22, 14:47
Fabien added inline comments.
src/mitra/serialize_int.h
8–10 ↗(On Diff #47356)
54–70 ↗(On Diff #47356)

My take on this (the header variable can be removed, I left it for clarity):

if (numBytes >= 8) {
    // For 0xff headers, the formula breaks, as it's not followed by a 0 bit
    ser_writedata8(os, 0xff);
    numBytes = 8;
} else {
    // Bits to represent how many bytes are used for the data
    const uint64_t header = (0xff << (8 - numBytes)) & 0xff;
    // Prepend the header, which adds 1 leading byte
    value |= header << (8 * numBytes++);
    // Left align
    value <<= 8 * (8 - numBytes);
}

// Write remaining bytes as big-endian
for (size_t i = 0; i < numBytes; ++i) {
    ser_writedata8(os, value >> 56);
    value <<= 8;
}
94–96 ↗(On Diff #47356)
This revision now requires changes to proceed.Mon, Apr 22, 14:47

Rename mitra int to intcode, remove mitra directory, apply some of Fabiens suggestions

tobias_ruck retitled this revision from [Mitra] Add Mitra integer format to [Mitra] Add Intcode integer format.Mon, Apr 22, 19:06
tobias_ruck edited the summary of this revision. (Show Details)
tobias_ruck edited the test plan for this revision. (Show Details)
Fabien requested changes to this revision.Tue, Apr 23, 07:38
Fabien added inline comments.
src/serialize_intcode.h
10 ↗(On Diff #47372)

Please fix the headers, see previous comment

63 ↗(On Diff #47372)
This revision now requires changes to proceed.Tue, Apr 23, 07:38

fix imports, clarify comments