Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with the main repo #9

Merged
merged 43 commits into from
Jul 13, 2021
Merged

Commits on Jul 12, 2021

  1. bench: bench.h fixes and improvements

    jonatack authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    aa27550 View commit details
    Browse the repository at this point in the history
  2. bench: bench_bitcoin.cpp help fixups

    - remove unneeded strprintf
    - consistent punctuation (no EOL periods)
    - sort helps by order they are printed (alphabetical order)
    jonatack authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    518fed2 View commit details
    Browse the repository at this point in the history
  3. doc: update doc/benchmarking.md

    jonatack authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    9939f5e View commit details
    Browse the repository at this point in the history
  4. guix: Rebase toolchain on glibc 2.24 (2.27 for riscv64)

    Support for riscv64 in glibc landed in 2.27 so it's unavoidable that we
    use 2.27.
    
    Running a Bitcoin build with toolchains based on 2.24 for platforms
    other than riscv64 seem to produce binaries which do not have 2.17
    symbols. So use 2.24 since it's more recent and maintained by Debian
    Stretch.
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    97125bf View commit details
    Browse the repository at this point in the history
  5. guix: Build depends/qt with our platform definition

    Our 'bitcoin-linux-g++' definition better integrates with our depends
    system than the stock linux-g++-64 definition.
    
    This fixes a bug whereby Guix builds on x86_64 for x86_64 did not
    produce a QMinimalIntegrationPlugin and led to bitcoin-qt not being
    built.
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    376942e View commit details
    Browse the repository at this point in the history
  6. guix: Also sort SHA256SUMS.part

    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    f8e8973 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a000c9d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b80995d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7ccb87c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7540757 View commit details
    Browse the repository at this point in the history
  11. doc: Remove unused section from release process

    MarcoFalke authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    7d9b99d View commit details
    Browse the repository at this point in the history
  12. fuzz: Move ConsumeTxDestination to cpp file

    Moving the implementation out of the header will reduce compile time
    MarcoFalke authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    3b4a5ad View commit details
    Browse the repository at this point in the history
  13. fuzz: Improve ConsumeTxDestination

    * Assert when a type is missing
    * Add missing WitnessV1Taproot
    * Limit WitnessUnknown to version [2, 16], to avoid abiguity
    * Limit WitnessUnknown to size [2, 40], to avoid invalid sizes
    MarcoFalke authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    1b38530 View commit details
    Browse the repository at this point in the history
  14. fuzz: Simplify CTxDestination fuzzing in the script target

    The WitnessUnknown operators == and < are already called indirectly by
    the corresponding CTxDestination operators.
    MarcoFalke authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    c9dbce0 View commit details
    Browse the repository at this point in the history
  15. fuzz: Move CTxDestination fuzzing to script fuzz target

    No need to split it over several targets
    MarcoFalke authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    9114e79 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e1a424b View commit details
    Browse the repository at this point in the history
  17. guix: no-longer pass --enable-glibc-back-compat to Guix

    Now that our Guix builds are performed on glibc 2.24 and 2.27 (RISCV),
    we no-longer need to pass the --enable-glibc-back-compat option.
    
    Replace it with --disable-threadlocal, to prevent the usage of symbols
    from glibc 2.18.
    
    None of the binaries produced required symbols later than 2.17, and 2.27
    (RISCV).
    fanquake authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    06b99f4 View commit details
    Browse the repository at this point in the history
  18. lint: exclude Guix patches from spell-checking

    Co-authored-by: Carl Dong <contact@carldong.me>
    2 people authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    29b1472 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    6cfa306 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    9202dc6 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4e131f7 View commit details
    Browse the repository at this point in the history
  22. net: simplify CNetAddr::IsRoutable()

    Reduce the condition `IsRFC4193() && !IsTor()` to `IsRFC4193()`. We know
    that if `IsRFC4193()` is `true` then, for sure, the address is not Tor,
    so `!IsTor()` is also `true`.
    vasild authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    0bef7f6 View commit details
    Browse the repository at this point in the history
  23. fuzz: reduce possible networks check

    If an address classifies as `IsRFC4193()`, then it cannot be
    `NET_ONION` (Tor v3), thus remove that condition from the assert.
    vasild authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    bdb4fef View commit details
    Browse the repository at this point in the history
  24. addrman: remove invalid addresses when unserializing

    The Tor v2 addresses, left over from when Tor v2 was supported will be
    unserialized as a dummy, invalid `::` (all zeros) IPv6 address. Remove
    them so that they do not take up space in addrman.
    vasild authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    00b681f View commit details
    Browse the repository at this point in the history
  25. test: add bad-txns-prevout-null test case to invalid_txs.py

    This reject reason is triggered for non-coinbase transactions with
    a coinbase-like outpoint, i.e. hash=0, n=0xffffffff.
    
    Note that the invalid tx templates are currently used in the
    functional tests feature_block.py and p2p_invalid_tx.py.
    theStack authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    e850d54 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    6093037 View commit details
    Browse the repository at this point in the history
  27. lint: Run mypy with --show-error-codes

    When using mypy ignore directives, the error code needs to be specified.
    Somehow mypy doesn't print it by default...
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    4854a6d View commit details
    Browse the repository at this point in the history
  28. ci: skip running the Linux test-security-check target for now

    The CI environment is a moving target, and these tests are somewhat
    fragile, so for now, disable them.
    fanquake authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    b24226f View commit details
    Browse the repository at this point in the history
  29. devtools: Improve *-check.py tool detection

    This is important to make sure that we're not testing tools different
    from the one we're building with.
    
    Introduce determine_wellknown_cmd, which encapsulates how we
    should handle well-known tools specification (IFS splitting, env
    override, etc.).
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    f1f5bec View commit details
    Browse the repository at this point in the history
  30. guix: Patch binutils to add security-related disable flags

    We use these flags in our test-security-check make target, but they are
    only available because debian patches them in.
    
    We can patch them in for our Guix builds so that we can check the sanity
    of our security/symbol checking suite before running them.
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    952adc8 View commit details
    Browse the repository at this point in the history
  31. build: Use and test PE binutils with --reloc-section

    Also fix test-security-check.py to account for new PE PIE failure
    indication.
    dongcarl authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    ea722ff View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    66e2683 View commit details
    Browse the repository at this point in the history
  33. scripts: adjust test-symbol-check for guix release environment

    Now that our release binaries are build in a glibc 2.24 and 2.27
    environment, we can't use a symbol from glibc 2.28 to test our checks.
    Replace renameat2() with nextup(), which was introduced in 2.24.
    
    Note that this also means re-disabling the test for RISC-V, however
    RISC-V is built in a glibc 2.27 environment, and our minimum required
    glibc for that binary is 2.27.
    fanquake authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    5a7f4a3 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a175337 View commit details
    Browse the repository at this point in the history
  35. test: Correct outstanding -Werror=sign-compare errors

    e.g.:
    In file included from /usr/local/include/boost/test/test_tools.hpp:46:
    /usr/local/include/boost/test/tools/old/impl.hpp:107:17: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
        return left == right;
               ~~~~ ^  ~~~~~
    /usr/local/include/boost/test/tools/old/impl.hpp:130:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl<unsigned int, int>' requested here
            return equal_impl( left, right );
                   ^
    /usr/local/include/boost/test/tools/old/impl.hpp:145:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::call_impl<unsigned int, int>' requested here
            return call_impl( left, right, left_is_array() );
                   ^
    /usr/local/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::operator()<unsigned int, int>' requested here
    BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
                                                     ^
    /usr/local/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
                             ^
    /usr/local/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
                                   ^
    /usr/local/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
                                     ^
    <scratch space>:153:1: note: expanded from here
    BOOST_PP_REPEAT_1
    ^
    test/streams_tests.cpp:122:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, unsigned int, int>' requested here
        BOOST_CHECK_EQUAL(varint, 54321);
        ^
    
    /usr/local/include/boost/test/tools/old/impl.hpp:107:17: error: comparison of integers of different signs: 'const unsigned long long' and 'const long' [-Werror,-Wsign-compare]
        return left == right;
               ~~~~ ^  ~~~~~
    /usr/local/include/boost/test/tools/old/impl.hpp:130:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl<unsigned long long, long>' requested here
            return equal_impl( left, right );
                   ^
    /usr/local/include/boost/test/tools/old/impl.hpp:145:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::call_impl<unsigned long long, long>' requested here
            return call_impl( left, right, left_is_array() );
                   ^
    /usr/local/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::operator()<unsigned long long, long>' requested here
    BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
                                                     ^
    /usr/local/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
                             ^
    /usr/local/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
                                   ^
    /usr/local/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
                                     ^
    <scratch space>:161:1: note: expanded from here
    BOOST_PP_REPEAT_1
    ^
    test/serfloat_tests.cpp:41:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, unsigned long long, long>' requested here
        BOOST_CHECK_EQUAL(TestDouble(std::numeric_limits<double>::infinity()), 0x7ff0000000000000);
        ^
    Empact authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    1ea5f60 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    4f577c4 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    f351772 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    f830262 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    98ce252 View commit details
    Browse the repository at this point in the history
  40. [validation] distinguish same txid different wtxid in mempool

    Changes behavior.
    glozow authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    7eb24f1 View commit details
    Browse the repository at this point in the history
  41. [test] submit same txid different wtxid as mempool tx

    Co-authored-by: Antoine Riard <ariard@student.42.fr>
    Co-authored-by: Antoine Riard <antoine.riard@gmail.com>
    3 people authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    a715665 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    1d4263d View commit details
    Browse the repository at this point in the history
  43. net: don't bind on 0.0.0.0 if binds are restricted to Tor

    The semantic of `-bind` is to restrict the binding only to some address.
    If not specified, then the user does not care and we bind to `0.0.0.0`.
    If specified then we should honor the restriction and bind only to the
    specified address.
    
    Before this change, if no `-bind` is given then we would bind to
    `0.0.0.0:8333` and to `127.0.0.1:8334` (incoming Tor) which is ok -
    the user does not care to restrict the binding.
    
    However, if only `-bind=addr:port=onion` is given (without ordinary
    `-bind=`) then we would bind to `addr:port` _and_ to `0.0.0.0:8333` in
    addition.
    
    Change the above to not do the additional bind: if only
    `-bind=addr:port=onion` is given (without ordinary `-bind=`) then bind
    to `addr:port` (only) and consider incoming connections to that as Tor
    and do not advertise it. I.e. a Tor-only node.
    vasild authored and hebasto committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    86f0bb9 View commit details
    Browse the repository at this point in the history