profile
viewpoint
practicalswift practicalswift Independent Bitcoin Core contributor 100% independent. Not for sale. https://twitter.com/practicalswift Donations: 15n9yZyf73X9Ex3RznCPAxSQzCwAVFJeex

apple/swift 51830

The Swift Programming Language

apple/swift-evolution 11155

This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.

apple/swift-package-manager 7754

The Package Manager for the Swift Programming Language

apple/swift-corelibs-foundation 3888

The Foundation Project, providing core utilities, internationalization, and OS independence

apple/swift-corelibs-libdispatch 1817

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware

ElementsProject/lightning 1689

c-lightning — a Lightning Network implementation in C

apple/swift-corelibs-xctest 822

The XCTest Project, A Swift core library for providing unit test support

apple/swift-llbuild 771

A low-level build system, used by Xcode and the Swift Package Manager

push eventpracticalswift/bitcoin

practicalswift

commit sha 36b777d7c08f9f55e22f27e3756ed483aabc6d1d

update-alternatives

view details

push time in 16 minutes

create barnchpracticalswift/bitcoin

branch : msan-in-travis-rebased-again

created branch time in 17 minutes

push eventpracticalswift/bitcoin

practicalswift

commit sha 16ce7c35480ec7fffde59a8ef8f1ef5a093fec3e

ccache

view details

push time in an hour

push eventpracticalswift/bitcoin

practicalswift

commit sha 4b3fc9bef2e3e2c9fe2ac47c74030537bde1ecc7

fixup

view details

practicalswift

commit sha 71142b5417325edc16ed2c9a17abff2a1dd820b0

remove-bdb

view details

push time in an hour

push eventpracticalswift/bitcoin

practicalswift

commit sha f6bea83214fe6be825423e8c98cd023cc667b555

no-zmq

view details

push time in 2 hours

push eventpracticalswift/bitcoin

10xcryptodev

commit sha 60ed33904cf974e8f3c1b95392a23db1fe2d4a98

tests: implement base58_decode

view details

Amiti Uttarwar

commit sha dab298d9ab5a5a41685f437db9081fa7b395fa73

[docs] add release notes

view details

Amiti Uttarwar

commit sha bd093ca15de762fdaf0937a0877d17b0c2bce16e

[test] updates to unbroadcast test - add () to function to actually disconnect from p2pconn - extract max interval into a constant - disconnect at the end of a subtest rather than start of next

view details

Amiti Uttarwar

commit sha 00d44a534b4e5ae249b8011360c6b0f7dc731581

[test] P2P connection behavior should meet expectations - P2PTxInvStore should supplement `on_inv` behavior of parent, not overwrite.

view details

Amiti Uttarwar

commit sha ba5498318233ab81decbc585e9619d8ffe2df1b0

[test] Test that wallet transactions aren't rebroadcast before 12 hours

view details

Amiti Uttarwar

commit sha 9c8a55d9cb0ec73f10b196e79b637aa601c0a6b7

[mempool] Don't throw expected error message when upgrading

view details

Amiti Uttarwar

commit sha 1f94bb0c744a103b633c1051e8fbc01e612097dc

[doc] Provide rationale for randomization in scheduling.

view details

Amiti Uttarwar

commit sha fa32e676e5833a5c5fc735ef00c0a80f5fab7a2c

[test] Manage node connections better in mempool persist test there were two calls to disconnect_nodes that were no-ops. fixed one & removed the other & added assertions to confirm node has no connections when creating the unbroadcast transaction.

view details

Amiti Uttarwar

commit sha 750456d6f29c63d57af05bfbdd6035bb9c965de2

[trivial] Remove misleading 'const' Returning by const value is only meaningful in a specific circumstance around user defined types. In this case, the const is not enforcing any restrictions on the call site, so is misleading.

view details

Amiti Uttarwar

commit sha 8f30260a67166a6ab7c0f33f7ec1990d3c31761e

[doc] Update unbroadcast description in RPC results

view details

Amiti Uttarwar

commit sha 9e1cb1adf1800efe429e348650931f2669b0d2c0

[trivial/doc] Fix comment type

view details

MarcoFalke

commit sha 826fe9c667118cc48ef000cd76e395e4cad4d6c1

Merge #18807: [doc / test / mempool] unbroadcast follow-ups 9e1cb1adf1800efe429e348650931f2669b0d2c0 [trivial/doc] Fix comment type (Amiti Uttarwar) 8f30260a67166a6ab7c0f33f7ec1990d3c31761e [doc] Update unbroadcast description in RPC results (Amiti Uttarwar) 750456d6f29c63d57af05bfbdd6035bb9c965de2 [trivial] Remove misleading 'const' (Amiti Uttarwar) fa32e676e5833a5c5fc735ef00c0a80f5fab7a2c [test] Manage node connections better in mempool persist test (Amiti Uttarwar) 1f94bb0c744a103b633c1051e8fbc01e612097dc [doc] Provide rationale for randomization in scheduling. (Amiti Uttarwar) 9c8a55d9cb0ec73f10b196e79b637aa601c0a6b7 [mempool] Don't throw expected error message when upgrading (Amiti Uttarwar) ba5498318233ab81decbc585e9619d8ffe2df1b0 [test] Test that wallet transactions aren't rebroadcast before 12 hours (Amiti Uttarwar) 00d44a534b4e5ae249b8011360c6b0f7dc731581 [test] P2P connection behavior should meet expectations (Amiti Uttarwar) bd093ca15de762fdaf0937a0877d17b0c2bce16e [test] updates to unbroadcast test (Amiti Uttarwar) dab298d9ab5a5a41685f437db9081fa7b395fa73 [docs] add release notes (Amiti Uttarwar) Pull request description: This PR is a follow up to #18038 which introduced the idea of an unbroadcast set & focuses mostly on documentation updates and test fixes. One small functionality update to not throw an expected error in `LoadMempool` when you upgrade software versions. #18895 is another follow up to that addresses other functionality updates. Background context: The unbroadcast set is a mechanism for the mempool to track locally submitted transactions (via wallet or RPC). The node does a best-effort of delivering the transactions to the network via retries every 10-15 minutes until either a `GETDATA` is received or the transaction is removed from the mempool. ACKs for top commit: MarcoFalke: ACK 9e1cb1adf1 👁 gzhao408: ACK [`9e1cb1a`](https://github.com/bitcoin/bitcoin/pull/18807/commits/9e1cb1adf1800efe429e348650931f2669b0d2c0) Tree-SHA512: 0cd51c4ca368b9dce92d50d73ec6e9df278a259e609eef2858f24cb8595ad07acc3db781d9eb0c351715f18fca5a2b4526838981fdb34a522427e9dc868bdaa6

view details

MarcoFalke

commit sha dec067f5a019fbeea0403efcfc501238a114d095

Merge #18965: tests: implement base58_decode 60ed33904cf974e8f3c1b95392a23db1fe2d4a98 tests: implement base58_decode (10xcryptodev) Pull request description: implements TODO: def base58_decode ACKs for top commit: ryanofsky: Code review ACK 60ed33904cf974e8f3c1b95392a23db1fe2d4a98. Just suggested changes since last review. Thank you for taking suggestions! Tree-SHA512: b3c06b4df041a6d88033cd077a093813a688e42d0b9aa777c715e5fd69cfba7b1bf984428bd98417d3c15232d3d48bc9c163317564f9e1d562db6611c21e2c10

view details

practicalswift

commit sha 6a3ad946e8ffeec88ba83a66530f345144f92a7f

build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory

view details

practicalswift

commit sha 438eb42c817b66b75c566e773dc780589af542af

V=1

view details

practicalswift

commit sha df0480c215ecfeab0938a7bd759764c584fc7053

debug

view details

practicalswift

commit sha f009a4bc0cfa3fd523722cf534a19bdb665255bb

noboost

view details

practicalswift

commit sha 2595fc09fa9a5d461cea9aded631b3f793e27772

add-workaround

view details

practicalswift

commit sha 47378053cf21e791d37d2fe6a9be8d460135c663

update-alternatives

view details

practicalswift

commit sha ecb1da89f225fd9f8324bc97dbe9418d755e6a5c

nosudo

view details

push time in 2 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 74baaa84d9f53a8b8c4973539cddc50d777421c6

disable-wallet

view details

push time in 2 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 7c71a062fe46153f8c41f8811d578f24d37a0e4e

cleanup-try

view details

push time in 8 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha f267ee73225f2ffc78dca00ed7d81c2b608bac9d

go-deps

view details

push time in 9 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 66f8b14d653b9a5e8c488f6548859e1da56a38f9

nosudo

view details

push time in 9 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 765ab42681e19fd52026d4b764e8d9ed4edaa1b0

update-alternatives

view details

push time in 11 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 7a12575da9db1e35deeef57ca252ff660ba757d9

add-workaround

view details

push time in 11 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 8e0f829a8d1754b3cf29cd9cb4e180febcc8236e

noboost

view details

push time in 12 hours

push eventpracticalswift/bitcoin

practicalswift

commit sha 937855a0c096d24f433c2e0f75380637ed0ecd8b

fixup

view details

push time in a day

push eventpracticalswift/bitcoin

practicalswift

commit sha a133b35f408a4a69c99090365981c98b77f352b8

debug

view details

push time in a day

pull request commentbitcoin/bitcoin

scripted-diff: TxoutType C++11 scoped enum class

Concept ACK: Prefer class enums over “plain” enums (C++ Core Guidelines)

These are the remaining non-class enums that might be worth investigating too:

$ git grep '^enum [^c][^l][^(]*$' -- "*.h" "*.cpp" ":(exclude)src/univalue/" 
      ":(exclude)src/leveldb/" | cut -f2 -d' ' | cut -f1 -d: | sort -u | tr "\n" " "
BindFlags ChangeType DeploymentPos DisconnectResult GetDataMsg HTTPStatusCode
isminetype NetPermissionFlags Network NumConnections opcodetype RPCErrorCode SafeChars
ServiceFlags SOCKS5Atyp SOCKS5Command SOCKS5Method SOCKS5Reply SOCKSVersion txnouttype
WalletFeature WalletFlags
MarcoFalke

comment created time in a day

pull request commentbitcoin/bitcoin

wallet: Introduce and use DummyDatabase instead of dummy BerkeleyDatabase

Concept ACK

Inspired by DummyDatabase I'll try to find time to do create a FuzzedDatabase implementing the WalletDatabase interface but with data feeded by FuzzedDataProvider :)

achow101

comment created time in a day

issue closedbitcoin/bitcoin

"make depends" builds boost with g++ regardless of environment variable settings

make depends builds boost with g++ regardless of environment variable settings.

closed time in a day

practicalswift

issue commentbitcoin/bitcoin

"make depends" builds boost with g++ regardless of environment variable settings

The merge of #18820 resolved this.

practicalswift

comment created time in a day

issue closedbitcoin/bitcoin

Low level functions ScriptToAsmStr (core_io), i64tostr (strencodings) and itostr (strencodings) are locale dependent

Low level functions ScriptToAsmStr (core_io), i64tostr (strencodings) and itostr (strencodings) are locale dependent:

const std::vector<uint8_t> b{0x6a, 0x4, 0xff, 0xff, 0xff, 0xff};
const CScript script{b.begin(), b.end()};
for (const std::string& locale_string : {"C", "de_DE"}) {
    std::locale::global(std::locale(locale_string));
    std::cout << "[" << locale_string << "] ScriptToAsmStr(script, false) == " 
        << ScriptToAsmStr(script, false) << "\n";
    std::cout << "[" << locale_string << "] i64tostr(12345678) == " 
        << i64tostr(12345678) << "\n";
    std::cout << "[" << locale_string << "] itostr(12345678) == " 
        << itostr(12345678) << "\n";
}
[C] ScriptToAsmStr(script, false) == OP_RETURN -2147483647
[C] i64tostr(12345678) == 12345678
[C] itostr(12345678) == 12345678
[de_DE] ScriptToAsmStr(script, false) == OP_RETURN -2.147.483.647
[de_DE] i64tostr(12345678) == 12.345.678
[de_DE] itostr(12345678) == 12.345.678

closed time in a day

practicalswift

push eventpracticalswift/bitcoin

practicalswift

commit sha 374bcc473d97bb1cb33cbec095bc5874de59721e

V=1

view details

push time in a day

push eventpracticalswift/bitcoin

Ben Carman

commit sha 9760293ce632e09f0175368ebf0c8502ac9b10d4

wallet: Fix for exported confirmation field in payment to self transactions

view details

Luke Dashjr

commit sha 2abe8cc3b760219cfa434e4c96e9f8d3611d0037

Bugfix: Include "csv","!segwit" in "rules" They have been missing since buried deployments were merged

view details

Luke Dashjr

commit sha 412d5fe8791c417bf46fc55a5bb8d59be98a33db

QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate

view details

Emil Engler

commit sha c4ea501e96363e937200bc97b8e2d78162bdb699

qt: Hide non PKHash-Addresses in signing address book

view details

Andrew Chow

commit sha a8334f7ac39532528c5f8bd3b0eea05aa63e8794

Read and write a checksum for encrypted keys

view details

Andrew Chow

commit sha c9a9ddb4142af0af5f7b1a5ccd13f8e585007089

Set fDecryptionThoroughlyChecked based on whether crypted key checksums are valid Change fDecryptionThoroughlyChecked to default to true so that it can latch to false when an invalid checksum is seen. Checksums may be invalid if the wallet does not have checksums or if the wallet became corrupted. It is safe to default fDecryptionThoroughlyChecked to true because any existing wallet without a checksum will set it to false. Any new or blank wallet where encrypted keys are added will then set this to true when the first encrypted key is generated by virtue of CheckDecryptionKey doing that during the initial Unlock prior to keys being added.

view details

Andrew Chow

commit sha d67055e00dd90f504384e5c3f229fc95306d5aac

Upgrade or rewrite encrypted key checksums If fDecryptionThoroughlyChecked is false, after a key has been checked, write (or rewrite) its checksum. This serves to upgrade wallets and correct those which have the checksum corrupted but not the key.

view details

Luke Dashjr

commit sha cea91a1e40e12029140ebfba969ce3ef2965029c

Bugfix: GUI: Use unsigned long long type to avoid implicit conversion of MSB check

view details

Luke Dashjr

commit sha c31bc5bcfddf440e9a1713f7ba2ca2bf9cfa8e2e

Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function Side effect: this results in the RPC showing unknown service bits as "UNKNOWN[n]" like the GUI. Note that there is no common mask-to-vector<string> function because both GUI and RPC would need to iterate through it to convert to their desired target formats.

view details

Anthony Towns

commit sha fa5894f7f581718ea28bb34b52fcd3b33ff3e644

DNS seeds: wait for 5m instead of 11s if 1000+ peers are known If 1000 potential peers are known, wait for 5m before querying DNS seeds for more peers, since eventually the addresses we already know should get us connected. Also check every 11s whether we've got enough active outbounds that DNS seeds aren't worth querying, and exit the dnsseed thread early if so.

view details

Anthony Towns

commit sha 96954d17948662672cababc940e453dff08e8cbb

DNS seeds: don't query DNS while network is inactive

view details

Hennadii Stepanov

commit sha 8e08d005989c6b5f7f05e0a1e0ba84f544a76d01

qt: Use parent-child relation to manage lifetime of OptionsModel object Both BitcoinApplication and OptionsModel classes are derived from the QObject class, therefore a parent-child relation could be established to manage the lifetime of an OptionsModel object. This commit does not change behavior.

view details

Pieter Wuille

commit sha 769ee5fa0011ae658770586442715452a656559d

Merge BigEndian functionality into CustomUintFormatter

view details

Russell Yanofsky

commit sha 6f9a1e5ad0a270d3b5a715f3e3ea0911193bf244

Extend CustomUintFormatter to support enums Extracted by Pieter Wuille from a comment by Russ Yanofsky, see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398821936.

view details

Russell Yanofsky

commit sha d06fedd1bc26bf5bf2b203d4445aeaebccca780e

Add SER_READ and SER_WRITE for read/write-dependent statements Extracted and extended by Pieter Wuille from a comment by Russ Yanofsky (see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398625457).

view details

Pieter Wuille

commit sha 73747afbbeb013669faf4c4d2c0903cec4526fb0

Convert merkleblock to new serialization

view details

Pieter Wuille

commit sha 2b1f85e8c52c8bc5a17eae4c809eaf61d724af98

Convert blockencodings_tests to new serialization

view details

Pieter Wuille

commit sha 4eb5643e3538863c9d2ff261f49a9a1b248de243

Convert everything except wallet/qt to new serialization

view details

practicalswift

commit sha 8d306862ef077f2a71931372dd6a2efa05188c84

ci: Add fuzzbuzz integration

view details

Kristaps Kaupe

commit sha 2b18fd2242a589988fbb68205dae4afa0b8b3d34

Disable unavailable context menu items in transactions tab

view details

push time in a day

PR closed bitcoin/bitcoin

util: Use locale independent ToString(…) instead of locale dependent strprintf(…) for low-level string formatting Refactoring Utils/log/libs

Use locale independent ToString(…) instead of locale dependent strprintf(…) for low-level string formatting.

Context: See sipas comment in https://github.com/bitcoin/bitcoin/pull/18147#issuecomment-604727148.

Example taken from #18281:

Low level functions ScriptToAsmStr (core_io), i64tostr (strencodings) and itostr (strencodings) are locale dependent:

const std::vector<uint8_t> b{0x6a, 0x4, 0xff, 0xff, 0xff, 0xff};
const CScript script{b.begin(), b.end()};
for (const std::string& locale_string : {"C", "de_DE"}) {
    std::locale::global(std::locale(locale_string));
    std::cout << "[" << locale_string << "] ScriptToAsmStr(script, false) == " 
        << ScriptToAsmStr(script, false) << "\n";
}
[C] ScriptToAsmStr(script, false) == OP_RETURN -2147483647
[de_DE] ScriptToAsmStr(script, false) == OP_RETURN -2.147.483.647

Fixes #18281.

+20 -15

12 comments

8 changed files

practicalswift

pr closed time in a day

push eventpracticalswift/bitcoin

Ben Carman

commit sha 9760293ce632e09f0175368ebf0c8502ac9b10d4

wallet: Fix for exported confirmation field in payment to self transactions

view details

Luke Dashjr

commit sha 2abe8cc3b760219cfa434e4c96e9f8d3611d0037

Bugfix: Include "csv","!segwit" in "rules" They have been missing since buried deployments were merged

view details

Luke Dashjr

commit sha 412d5fe8791c417bf46fc55a5bb8d59be98a33db

QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate

view details

Emil Engler

commit sha c4ea501e96363e937200bc97b8e2d78162bdb699

qt: Hide non PKHash-Addresses in signing address book

view details

Andrew Chow

commit sha a8334f7ac39532528c5f8bd3b0eea05aa63e8794

Read and write a checksum for encrypted keys

view details

Andrew Chow

commit sha c9a9ddb4142af0af5f7b1a5ccd13f8e585007089

Set fDecryptionThoroughlyChecked based on whether crypted key checksums are valid Change fDecryptionThoroughlyChecked to default to true so that it can latch to false when an invalid checksum is seen. Checksums may be invalid if the wallet does not have checksums or if the wallet became corrupted. It is safe to default fDecryptionThoroughlyChecked to true because any existing wallet without a checksum will set it to false. Any new or blank wallet where encrypted keys are added will then set this to true when the first encrypted key is generated by virtue of CheckDecryptionKey doing that during the initial Unlock prior to keys being added.

view details

Andrew Chow

commit sha d67055e00dd90f504384e5c3f229fc95306d5aac

Upgrade or rewrite encrypted key checksums If fDecryptionThoroughlyChecked is false, after a key has been checked, write (or rewrite) its checksum. This serves to upgrade wallets and correct those which have the checksum corrupted but not the key.

view details

Luke Dashjr

commit sha cea91a1e40e12029140ebfba969ce3ef2965029c

Bugfix: GUI: Use unsigned long long type to avoid implicit conversion of MSB check

view details

Luke Dashjr

commit sha c31bc5bcfddf440e9a1713f7ba2ca2bf9cfa8e2e

Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function Side effect: this results in the RPC showing unknown service bits as "UNKNOWN[n]" like the GUI. Note that there is no common mask-to-vector<string> function because both GUI and RPC would need to iterate through it to convert to their desired target formats.

view details

Anthony Towns

commit sha fa5894f7f581718ea28bb34b52fcd3b33ff3e644

DNS seeds: wait for 5m instead of 11s if 1000+ peers are known If 1000 potential peers are known, wait for 5m before querying DNS seeds for more peers, since eventually the addresses we already know should get us connected. Also check every 11s whether we've got enough active outbounds that DNS seeds aren't worth querying, and exit the dnsseed thread early if so.

view details

Anthony Towns

commit sha 96954d17948662672cababc940e453dff08e8cbb

DNS seeds: don't query DNS while network is inactive

view details

Hennadii Stepanov

commit sha 8e08d005989c6b5f7f05e0a1e0ba84f544a76d01

qt: Use parent-child relation to manage lifetime of OptionsModel object Both BitcoinApplication and OptionsModel classes are derived from the QObject class, therefore a parent-child relation could be established to manage the lifetime of an OptionsModel object. This commit does not change behavior.

view details

Pieter Wuille

commit sha 769ee5fa0011ae658770586442715452a656559d

Merge BigEndian functionality into CustomUintFormatter

view details

Russell Yanofsky

commit sha 6f9a1e5ad0a270d3b5a715f3e3ea0911193bf244

Extend CustomUintFormatter to support enums Extracted by Pieter Wuille from a comment by Russ Yanofsky, see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398821936.

view details

Russell Yanofsky

commit sha d06fedd1bc26bf5bf2b203d4445aeaebccca780e

Add SER_READ and SER_WRITE for read/write-dependent statements Extracted and extended by Pieter Wuille from a comment by Russ Yanofsky (see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398625457).

view details

Pieter Wuille

commit sha 73747afbbeb013669faf4c4d2c0903cec4526fb0

Convert merkleblock to new serialization

view details

Pieter Wuille

commit sha 2b1f85e8c52c8bc5a17eae4c809eaf61d724af98

Convert blockencodings_tests to new serialization

view details

Pieter Wuille

commit sha 4eb5643e3538863c9d2ff261f49a9a1b248de243

Convert everything except wallet/qt to new serialization

view details

Kristaps Kaupe

commit sha 2b18fd2242a589988fbb68205dae4afa0b8b3d34

Disable unavailable context menu items in transactions tab

view details

Samuel Dobson

commit sha e8fa0a3d2025509fcddc59fc618e91371542cf87

Fix WSL file locking by using flock instead of fcntl Co-authored-by: sipa <pieter@wuille.net>

view details

push time in a day

pull request commentbitcoin/bitcoin

build: Only allow ASCII identifiers

ACK 399d84da3708719b063953107bab0f5f6493addb -- patch looks correct

laanwj

comment created time in 3 days

pull request commentbitcoin/bitcoin

Remove g_rpc_chain global

Concept ACK

ryanofsky

comment created time in 3 days

pull request commentbitcoin/bitcoin

refactor: Misc scheduler cleanups

Concept ACK

MarcoFalke

comment created time in 3 days

pull request commentbitcoin/bitcoin

validation: use std::chrono throughout some validation functions

Concept ACK: suggestion version is more readable

fanquake

comment created time in 3 days

PR opened bitcoin-core/qa-assets

Add seeds

Add seeds.

+320 -0

0 comment

1436 changed files

pr created time in 3 days

pull request commentbitcoin/bitcoin

Replace -Wthread-safety-analysis with broader -Wthread-safety

ACK 87766b355c47fcb0f0dcf3f6fe359eb00227d50c -- patch looks correct

hebasto

comment created time in 3 days

create barnchpracticalswift/qa-assets

branch : seeds-2020-05-28

created branch time in 3 days

pull request commentbitcoin/bitcoin

build: Propagate well-known vars into depends

ACK f0d7ed10b48a6303d8b0cb6f2fc6b8652945bffb -- patch looks correct

dongcarl

comment created time in 4 days

pull request commentbitcoin/bitcoin

Replace -Wthread-safety-analysis with broader -Wthread-safety

ACK 908c6c3cea5ffe3b9a9612f2327227cf3f54e5fc: patch looks correct, and more compile-time checking is better! :)

hebasto

comment created time in 4 days

pull request commentbitcoin/bitcoin

wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets

Concept ACK

Nice work! Very readable code!

achow101

comment created time in 4 days

pull request commentbitcoin/bitcoin

[WIP RFC DONOTMERGE] meta: Separate repository for the gui

Concept ACK: allowing for increased specialization is good :)

MarcoFalke

comment created time in 4 days

pull request commentbitcoin/bitcoin

[WIP] Moved the CScriptNum asserts into the unit test in script.py

Concept ACK: more testing is better!

Welcome as a contributor @gillichu :)

gillichu

comment created time in 4 days

pull request commentbitcoin/bitcoin

refactor: Replace const char* to std::string

ACK c57f03ce1741b38af448bec7b22ab9f8ac21f067 -- patch looks correct

kcalvinalvin

comment created time in 4 days

PR opened bitcoin/bitcoin

tests: Use BasicTestingSetup to initialise fuzzing environment

Use BasicTestingSetup to initialise fuzzing environment (as suggested by MarcoFalke).

Also: Remove unreachable fuzzing code. Various small coverage improvements.

+48 -75

0 comment

19 changed files

pr created time in 5 days

create barnchpracticalswift/bitcoin

branch : fuzzers-2020-05-26

created branch time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 4e16f7674b4d581d6abbbc4f06ebf69aa5bbe67f

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 5 days

pull request commentbitcoin/bitcoin

wallet: Move salvagewallet into wallettool

Concept ACK: thanks for doing this! :)

achow101

comment created time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 2206f168f6ea4e93eeedc7ee2a3eea1e3df9ac27

tests: Add fuzzing harness for CNode

view details

push time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CAddrMan. Fill some fuzzing coverage gaps.

 // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <addrdb.h>+#include <chainparams.h>+#include <net.h>+#include <outputtype.h>+#include <policy/fees.h> #include <rpc/util.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h>+#include <test/util/setup_common.h> #include <util/error.h>  #include <cstdint> #include <vector> +void initialize()+{+    SelectParams(CBaseChainParams::REGTEST);+    StartMutedLogging();

Coverage stability with BasicTestingSetup vs TestingSetup:

Fuzzer with an empty test_one_input function, and an initialize function containing static const BasicTestingSetup basic_testing_setup:

INFO: A corpus is not provided, starting from an empty corpus
#2      INITED cov: 58 ft: 59 corp: 1/1b exec/s: 0 rss: 125Mb
#65536  pulse  cov: 58 ft: 59 corp: 1/1b lim: 652 exec/s: 21845 rss: 145Mb
#131072 pulse  cov: 58 ft: 59 corp: 1/1b lim: 1300 exec/s: 21845 rss: 188Mb
#262144 pulse  cov: 58 ft: 59 corp: 1/1b lim: 2611 exec/s: 21845 rss: 339Mb
#524288 pulse  cov: 58 ft: 59 corp: 1/1b lim: 4096 exec/s: 20164 rss: 715Mb
#1048576        pulse  cov: 58 ft: 59 corp: 1/1b lim: 4096 exec/s: 20560 rss: 716Mb
#2097152        pulse  cov: 58 ft: 59 corp: 1/1b lim: 4096 exec/s: 20560 rss: 716Mb

Fuzzer with an empty test_one_input function, and an initialize function containing static const TestingSetup testing_setup:

INFO: A corpus is not provided, starting from an empty corpus
#2      INITED cov: 58 ft: 59 corp: 1/1b exec/s: 0 rss: 134Mb
#65536  pulse  cov: 58 ft: 59 corp: 1/1b lim: 652 exec/s: 21845 rss: 155Mb
#131072 pulse  cov: 58 ft: 59 corp: 1/1b lim: 1300 exec/s: 21845 rss: 198Mb
#262144 pulse  cov: 58 ft: 59 corp: 1/1b lim: 2611 exec/s: 21845 rss: 348Mb
#524288 pulse  cov: 58 ft: 59 corp: 1/1b lim: 4096 exec/s: 20164 rss: 715Mb
        NEW_FUNC[1/85]: 0x55e526ad96c0 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:516
        NEW_FUNC[2/85]: 0x55e526adc5a0 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_local_data() /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:180
#910854 NEW    cov: 663 ft: 143 corp: 2/3b lim: 4096 exec/s: 20241 rss: 717Mb L: 2/2 MS: 2 InsertByte-CopyPart-
#1048576        pulse  cov: 663 ft: 143 corp: 2/3b lim: 4096 exec/s: 20560 rss: 717Mb
        NEW_FUNC[1/10]: 0x55e526ad95c0 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:2291
        NEW_FUNC[2/10]: 0x55e526adc140 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:219
#1830962        NEW    cov: 711 ft: 335 corp: 3/4099b lim: 4096 exec/s: 20572 rss: 717Mb L: 4096/4096 MS: 3 ChangeBinInt-CrossOver-ChangeASCIIInt-
#2097152        pulse  cov: 711 ft: 335 corp: 3/4099b lim: 4096 exec/s: 20360 rss: 717Mb
practicalswift

comment created time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 979174fc2b635a2c3fa62490d2da871df53eb8b2

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 46499ad49e2aad99cf5f29dc879586e1878e543e

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CAddrMan. Fill some fuzzing coverage gaps.

 // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <addrdb.h>+#include <chainparams.h>+#include <net.h>+#include <outputtype.h>+#include <policy/fees.h> #include <rpc/util.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h>+#include <test/util/setup_common.h> #include <util/error.h>  #include <cstdint> #include <vector> +void initialize()+{+    SelectParams(CBaseChainParams::REGTEST);+    StartMutedLogging();

I was wrong about BasicTestingSetup: it seems like only TestingSetup introduces coverage non-determinism.

This shows the issue with TestingSetup:

# With TestingSetup:
$ src/test/fuzz/kitchen_sink corpus/
…
#20425  NEW    cov: 3867 ft: 12141 corp: 248/49Kb lim: 607 exec/s: 464 rss: 357Mb L: 605/607 MS: 5 InsertRepeatedBytes-CopyPart-InsertByte-ChangeBinInt-CopyPart-
        NEW_FUNC[1/68]: 0x56533ed75c60 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:2291
        NEW_FUNC[2/68]: 0x56533f03dfc0 in std::function<void ()>::function(std::function<void ()> const&) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/std_function.h:655
#20441  NEW    cov: 4384 ft: 12690 corp: 249/49Kb lim: 607 exec/s: 454 rss: 358Mb L: 326/607 MS: 1 CopyPart-
…
#28628        NEW    cov: 4384 ft: 12731 corp: 258/54Kb lim: 652 exec/s: 454 rss: 452Mb L: 652/652 MS: 1 CrossOver-
==6668== libFuzzer: run interrupted; exiting

$ src/test/fuzz/kitchen_sink corpus/
#423    INITED cov: 3867 ft: 12182 corp: 245/48Kb exec/s: 423 rss: 148Mb

Notice the non-deterministic coverage increase from 3867 to 4384 which drops back to 3867 when the fuzzer is restarted.

I'll go with BasicTestingSetup :)

practicalswift

comment created time in 5 days

pull request commentbitcoin/bitcoin

refactor: replace pointers by references within tx_verify.{h,cpp}

Concept ACK: having compiler-enforcement of preconditions is better obviously :)

theStack

comment created time in 5 days

push eventpracticalswift/bitcoin

Hennadii Stepanov

commit sha 458992b06d80eb568141f60a33d38e12e894e27a

Prevent UB in DeleteLock() function

view details

Hennadii Stepanov

commit sha 8d8921abd35c3ac1b8ebacb11de8e1bbc7b28d66

refactor: Add LockStackItem type alias

view details

Hennadii Stepanov

commit sha f511f61dda4e860079153d5e51d64658cc265283

refactor: Add LockPair type alias

view details

Hennadii Stepanov

commit sha 58e6881bc5be002e8ddbc9b75422c0deae66a2df

refactor: Refactor duplicated code into LockHeld()

view details

Hennadii Stepanov

commit sha 26c093a9957756f3743c2347fe0abd90f81159c4

Replace thread_local g_lockstack with a mutex-protected map This change prevents UB in case of early g_lockstack destroying. Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>

view details

Jon Atack

commit sha 29f2cbdeb7afdde87d108adf80cffad17d112632

cli: extract connection exception handler, -rpcwait logic to ConnectAndCallRPC() to be callable for individual connections. This is needed for RPCs that need to be called and handled sequentially, rather than alone or in a batch. For example, when fetching the balances for each loaded wallet, -getinfo will call RPC listwallets, and then, depending on the result, RPC getbalances. It may be somewhat helpful to review this commit with `git show -w`.

view details

Jon Atack

commit sha 743077544b5420246ef29e0b708c90e3a8dfeeb6

cli: lift -rpcwallet logic up to CommandLineRPC() to allow passing rpcwallet independently from the -rpcwallet user option, and to move the logic to the top-level layer where most of the other option args are handled.

view details

Jon Atack

commit sha 9f01849a498a70616506bdcda8ce6897aa29e664

cli: create GetWalletBalances() to fetch multiwallet balances

view details

Jon Atack

commit sha afce85eb994384246e455b766549c3206cb059e0

cli: use GetWalletBalances() functionality for -getinfo and replace GetBoolArg with IsArgSet as we only want to know if the arg is passed; we do not need the value.

view details

Jon Atack

commit sha 903b6c117f541ea9258d3234ffcf59427344e668

rpc: drop unused JSONRPCProcessBatchReply size arg, refactor

view details

Jon Atack

commit sha 5edad5ce5d3f15b694bf3fad0300c6446674b554

test: add -getinfo multiwallet functional tests and improve the existing -getinfo -rpcwallet tests.

view details

MarcoFalke

commit sha fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4

node: Add chainman alias for g_chainman

view details

MarcoFalke

commit sha fa05fdf0f19fa4b557cc5e9ba436e3215b83c4e6

net: Pass chainman into PeerLogicValidation

view details

MarcoFalke

commit sha fa84b1cd846f6499b741710fd478ec9ad49b5120

validation: Make LoadBlockIndex() a member of ChainstateManager

view details

MarcoFalke

commit sha fa24d4909864096934577abc26cfa9be47f634ba

validation: Make PruneOneBlockFile() a member of ChainstateManager

view details

MarcoFalke

commit sha fa1d97b25686a5caca623599f6d608fd08616fe8

validation: Make ProcessNewBlock*() members of ChainstateManager

view details

MarcoFalke

commit sha fab6b9d18fd48bbbd1939b1173723bc04c5824b5

validation: Mark g_chainman DEPRECATED

view details

Hennadii Stepanov

commit sha 90eb027204f5a9d7c00fa97d4112243bd37a9012

doc: Add and fix comments about never destroyed objects

view details

John Newbery

commit sha 3bdc7c2d3977a7864aacea80bffc4df7f37cac51

[doc] Add comment for m_headers_cache

view details

Jim Posen

commit sha f6b58c150686e90bc4952976e488b1605f3ae02a

[net processing] Message handling for getcfheaders. if -peerblockfilters is configured, handle requests for cfheaders.

view details

push time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CAddrMan. Fill some fuzzing coverage gaps.

 // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <addrdb.h>+#include <chainparams.h>+#include <net.h>+#include <outputtype.h>+#include <policy/fees.h> #include <rpc/util.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h>+#include <test/util/setup_common.h> #include <util/error.h>  #include <cstdint> #include <vector> +void initialize()+{+    SelectParams(CBaseChainParams::REGTEST);+    StartMutedLogging();

I think it is the same problem there: I get more setup than I need and a subset of that setup work introduces coverage non-determinism :)

I prefer opt-ing in to exactly the setup I need: it avoids the non-determinism problem and I also think that makes it easier to reason about the dependencies of each fuzzing harness.

practicalswift

comment created time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CNode

+// Copyright (c) 2020 The Bitcoin Core developers+// Distributed under the MIT software license, see the accompanying+// file COPYING or http://www.opensource.org/licenses/mit-license.php.++#include <chainparams.h>+#include <chainparamsbase.h>+#include <net.h>+#include <net_permissions.h>+#include <netaddress.h>+#include <optional.h>+#include <protocol.h>+#include <random.h>+#include <test/fuzz/FuzzedDataProvider.h>+#include <test/fuzz/fuzz.h>+#include <test/fuzz/util.h>+#include <test/util/setup_common.h>++#include <cstdint>+#include <string>+#include <vector>++void initialize()+{+    SelectParams(CBaseChainParams::REGTEST);+    StartMutedLogging();+}++void test_one_input(const std::vector<uint8_t>& buffer)+{+    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());++    const std::optional<CAddress> address = ConsumeDeserializable<CAddress>(fuzzed_data_provider);+    if (!address) {+        return;+    }+    const std::optional<CAddress> address_bind = ConsumeDeserializable<CAddress>(fuzzed_data_provider);+    if (!address_bind) {+        return;+    }++    CNode node{fuzzed_data_provider.ConsumeIntegral<NodeId>(), static_cast<ServiceFlags>(fuzzed_data_provider.ConsumeIntegral<uint64_t>()), fuzzed_data_provider.ConsumeIntegral<int>(), INVALID_SOCKET, *address, fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), *address_bind, fuzzed_data_provider.ConsumeRandomLengthString(32), fuzzed_data_provider.ConsumeBool(), fuzzed_data_provider.ConsumeBool()};+    while (fuzzed_data_provider.ConsumeBool()) {+        switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 13)) {+        case 0: {+            node.CloseSocketDisconnect();+            break;+        }+        case 1: {+            node.MaybeSetAddrName(fuzzed_data_provider.ConsumeRandomLengthString(32));+            break;+        }+        case 2: {+            node.SetSendVersion(fuzzed_data_provider.ConsumeIntegral<int>());+            break;+        }+        case 3: {+            const std::vector<bool> asmap = ConsumeRandomLengthIntegralVector<bool>(fuzzed_data_provider, 128);+            if (!SanityCheckASMap(asmap)) {+                break;+            }+            CNodeStats stats;+            node.copyStats(stats, asmap);+            break;+        }+        case 4: {+            node.SetRecvVersion(fuzzed_data_provider.ConsumeIntegral<int>());+            break;+        }+        case 5: {+            const CNode* add_ref_node = node.AddRef();+            assert(add_ref_node == &node);+            break;+        }+        case 6: {+            if (node.GetRefCount() > 0) {+                node.Release();+            }+            break;+        }+        case 7: {+            if (node.m_addr_known == nullptr) {+                break;+            }+            const std::optional<CAddress> addr_opt = ConsumeDeserializable<CAddress>(fuzzed_data_provider);+            if (!addr_opt) {+                break;+            }+            node.AddAddressKnown(*addr_opt);+            break;+        }+        case 8: {+            if (node.m_addr_known == nullptr) {+                break;+            }+            const std::optional<CAddress> addr_opt = ConsumeDeserializable<CAddress>(fuzzed_data_provider);+            if (!addr_opt) {+                break;+            }+            FastRandomContext fast_random_context{ConsumeUInt256(fuzzed_data_provider)};+            node.PushAddress(*addr_opt, fast_random_context);+            break;+        }+        case 9: {+            const std::optional<CInv> inv_opt = ConsumeDeserializable<CInv>(fuzzed_data_provider);+            if (!inv_opt) {+                break;+            }+            node.AddInventoryKnown(*inv_opt);+            break;+        }+        case 10: {+            const std::optional<CInv> inv_opt = ConsumeDeserializable<CInv>(fuzzed_data_provider);+            if (!inv_opt) {+                break;+            }+            node.PushInventory(*inv_opt);+            break;+        }+        case 11: {+            node.PushBlockHash(ConsumeUInt256(fuzzed_data_provider));+            break;+        }+        case 12: {+            const std::optional<CService> service_opt = ConsumeDeserializable<CService>(fuzzed_data_provider);+            if (!service_opt) {+                break;+            }+            node.SetAddrLocal(*service_opt);+            break;+        }+        case 13: {+            const std::vector<uint8_t> b = ConsumeRandomLengthByteVector(fuzzed_data_provider);+            bool complete;+            node.ReceiveMsgBytes((const char*)b.data(), b.size(), complete);+            break;+        }+        }+    }++    (void)node.GetAddrLocal();+    (void)node.GetAddrName();+    (void)node.GetId();+    (void)node.GetLocalNonce();+    (void)node.GetLocalServices();+    (void)node.GetMyStartingHeight();+    (void)node.GetRecvVersion();+    const int ref_count = node.GetRefCount();+    assert(ref_count >= 0);+    (void)node.GetSendVersion();+    (void)node.IsAddrRelayPeer();++    const NetPermissionFlags net_permission_flags = fuzzed_data_provider.ConsumeBool() ? fuzzed_data_provider.PickValueInArray<NetPermissionFlags>({

Sure! Now fixed: clang-format:ed version replaced with another clang-format:ed version after manual re-arrangement.

When it comes to formatting I really don't have any personal preferences: I'm happy as long as clang-format is happy :)

practicalswift

comment created time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 1e35710ff1b7bc6cb30ebaff419b6244f218d6e1

tests: Add fuzzing harness for CNode

view details

push time in 5 days

push eventpracticalswift/bitcoin

Hennadii Stepanov

commit sha 458992b06d80eb568141f60a33d38e12e894e27a

Prevent UB in DeleteLock() function

view details

Hennadii Stepanov

commit sha 8d8921abd35c3ac1b8ebacb11de8e1bbc7b28d66

refactor: Add LockStackItem type alias

view details

Hennadii Stepanov

commit sha f511f61dda4e860079153d5e51d64658cc265283

refactor: Add LockPair type alias

view details

Hennadii Stepanov

commit sha 58e6881bc5be002e8ddbc9b75422c0deae66a2df

refactor: Refactor duplicated code into LockHeld()

view details

Hennadii Stepanov

commit sha 26c093a9957756f3743c2347fe0abd90f81159c4

Replace thread_local g_lockstack with a mutex-protected map This change prevents UB in case of early g_lockstack destroying. Co-authored-by: Wladimir J. van der Laan <laanwj@protonmail.com>

view details

Hennadii Stepanov

commit sha 90eb027204f5a9d7c00fa97d4112243bd37a9012

doc: Add and fix comments about never destroyed objects

view details

John Newbery

commit sha 3bdc7c2d3977a7864aacea80bffc4df7f37cac51

[doc] Add comment for m_headers_cache

view details

Jim Posen

commit sha f6b58c150686e90bc4952976e488b1605f3ae02a

[net processing] Message handling for getcfheaders. if -peerblockfilters is configured, handle requests for cfheaders.

view details

Jim Posen

commit sha 5308c97ccaf0955e5840956bc1636108a43e6f46

[test] Add test for cfheaders

view details

MarcoFalke

commit sha fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60

rpc: factor out RpcInterruptionPoint from dumptxoutset

view details

MarcoFalke

commit sha fa756928c3f455943086051c5fe1d5bb09962248

rpc: Make gettxoutsetinfo/GetUTXOStats interruptible Also, add interruption points to scantxoutset

view details

fanquake

commit sha 69bfcac27a83440092bc6e61904ded910ed4baf4

gui: update Qt base translations for macOS release These haven't been updated since their addition, so this updates the list that controls which qt base translations are bundled with the macOS binary, to all the languages that are available with qt 5.9.8. This could probably be improved in some way, however qt updates are infrequent, and I didn't want to spend any more time looking at this. Also given that no-one seems to have noticed and/or reported this it wouldn't seem high-priority. Could be backported to 0.20.1.

view details

practicalswift

commit sha f9b22e3bdb54acb2f830b3ebbad47ff17dfb5781

tests: Add fuzzing harness for CCoinsViewCache

view details

fanquake

commit sha 14f8447777465ffc8eb644bad1dbc52362c4362f

Merge #19059: gui: update Qt base translations for macOS release 69bfcac27a83440092bc6e61904ded910ed4baf4 gui: update Qt base translations for macOS release (fanquake) Pull request description: These haven't been updated since their addition, so this updates the list that controls which qt base translations are bundled with the macOS binary, to all the languages that are available with qt 5.9.8. This could probably be improved in some way, however qt updates are infrequent, and I didn't want to spend any more time looking at this. Also given that no-one seems to have noticed and/or reported this it wouldn't seem high-priority. Could be backported to 0.20.1. Master: ![master](https://user-images.githubusercontent.com/863730/82729428-11bce200-9d2a-11ea-8569-ee65d46c7403.png) This PR: ![fixed](https://user-images.githubusercontent.com/863730/82729427-0f5a8800-9d2a-11ea-86dd-1e6a3e211efa.png) ACKs for top commit: hebasto: ACK 69bfcac27a83440092bc6e61904ded910ed4baf4, tested on macOS 10.15. Tree-SHA512: df142fb16097deb514e72e005b73aafc4eb4ff0c17e423ba5040a3ec6874020a733e1c5259a88923580e71ef73c16222aed28f482b8c270a544a85b745a7b327

view details

MarcoFalke

commit sha 7d32cce3e75b99ea7f7ec829b04945f9d2d898ce

Merge #19010: net processing: Add support for getcfheaders 5308c97ccaf0955e5840956bc1636108a43e6f46 [test] Add test for cfheaders (Jim Posen) f6b58c150686e90bc4952976e488b1605f3ae02a [net processing] Message handling for getcfheaders. (Jim Posen) 3bdc7c2d3977a7864aacea80bffc4df7f37cac51 [doc] Add comment for m_headers_cache (John Newbery) Pull request description: Support `getcfheaders` requests when `-peerblockfilters` is set. Does not advertise compact filter support in version messages. ACKs for top commit: jkczyz: ACK 5308c97ccaf0955e5840956bc1636108a43e6f46 MarcoFalke: re-ACK 5308c97cca , only change is doc related 🗂 theStack: ACK 5308c97ccaf0955e5840956bc1636108a43e6f46 :rocket: Tree-SHA512: 240fc654f6f634c191d9f7628b6c4801f87ed514a1dd55c7de5d454d4012d1c09509a2d5a246bc7da445cd920252b4cd56a493c060cdb207b04af4ffe53b95f7

view details

MarcoFalke

commit sha d3b0ef80f6533e58e1ce4a5cbdaa9919872033fa

Merge #18867: tests: Add fuzzing harness for CCoinsViewCache f9b22e3bdb54acb2f830b3ebbad47ff17dfb5781 tests: Add fuzzing harness for CCoinsViewCache (practicalswift) Pull request description: Add fuzzing harness for `CCoinsViewCache`. See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets). Happy fuzzing :) ACKs for top commit: MarcoFalke: ACK f9b22e3bdb 📫 Tree-SHA512: 4fa79aab683875eef128b672cf199909c86e4d2ed7c406f006fa27a546dafc9cb0061c4de5e660e622458072f1dab69dbf6b6b03d5b863f81c5710bf4cee6c0c

view details

MarcoFalke

commit sha 13397dc78fd6a6a57bdc91db66c51788603267bb

Merge #19056: rpc: Make gettxoutsetinfo/GetUTXOStats interruptible fa756928c3f455943086051c5fe1d5bb09962248 rpc: Make gettxoutsetinfo/GetUTXOStats interruptible (MarcoFalke) fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60 rpc: factor out RpcInterruptionPoint from dumptxoutset (MarcoFalke) Pull request description: Make it interruptible, so that shutdown doesn't block for up to one hour. Fixes (partially) #13217 ACKs for top commit: Empact: Code Review ACK https://github.com/bitcoin/bitcoin/pull/19056/commits/fa756928c3f455943086051c5fe1d5bb09962248 laanwj: Code review ACK fa756928c3f455943086051c5fe1d5bb09962248 Tree-SHA512: 298261e0ff7d79fab542b8f6828cc0ac451cbafe396d5f0816c9d36437faba1330f5c4cb2a25c5540e202bfb9783da6ec858bd453056ce488d21e36335d3d42c

view details

MarcoFalke

commit sha fe1357a03af108c41baa6bd31903f2cfb0d75ef5

Merge #18881: Prevent UB in DeleteLock() function 90eb027204f5a9d7c00fa97d4112243bd37a9012 doc: Add and fix comments about never destroyed objects (Hennadii Stepanov) 26c093a9957756f3743c2347fe0abd90f81159c4 Replace thread_local g_lockstack with a mutex-protected map (Hennadii Stepanov) 58e6881bc5be002e8ddbc9b75422c0deae66a2df refactor: Refactor duplicated code into LockHeld() (Hennadii Stepanov) f511f61dda4e860079153d5e51d64658cc265283 refactor: Add LockPair type alias (Hennadii Stepanov) 8d8921abd35c3ac1b8ebacb11de8e1bbc7b28d66 refactor: Add LockStackItem type alias (Hennadii Stepanov) 458992b06d80eb568141f60a33d38e12e894e27a Prevent UB in DeleteLock() function (Hennadii Stepanov) Pull request description: Tracking our instrumented mutexes (`Mutex` and `RecursiveMutex` types) requires that all involved objects should not be destroyed until after their last use. On master (ec79b5f86b22ad8f77c736f9bb76c2e4d7faeaa4) we have two problems related to the object destroying order: - the function-local `static` `lockdata` object that is destroyed at [program exit](https://en.cppreference.com/w/cpp/utility/program/exit) - the `thread_local` `g_lockstack` that is destroyed at [thread exit](https://en.cppreference.com/w/cpp/language/destructor) Both cases could cause UB at program exit in so far as mutexes are used in other static object destructors. Fix #18824 ACKs for top commit: MarcoFalke: re-ACK 90eb027204, only change is new doc commit 👠 ryanofsky: Code review ACK 90eb027204f5a9d7c00fa97d4112243bd37a9012 because all the changes look correct and safe. But I don't know the purpose of commit 26c093a9957756f3743c2347fe0abd90f81159c4 "Replace thread_local g_lockstack with a mutex-protected map (5/6)." It seems like it could have a bad impact on debug performance, and the commit message and PR description don't give a reason for the change. Tree-SHA512: 99f29157fd1278994e3f6eebccedfd9dae540450f5f8b980518345a89d56b635f943a85b20864cef087027fd0fcdb4880b659ef59bfe5626d110452ae22031c6

view details

practicalswift

commit sha 9a2e640555ed13bb39bb76213de52bf83e05ba4b

tests: Add fuzzing harness for CNode

view details

push time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CAddrMan. Fill some fuzzing coverage gaps.

 // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <addrdb.h>+#include <chainparams.h>+#include <net.h>+#include <outputtype.h>+#include <policy/fees.h> #include <rpc/util.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h>+#include <test/util/setup_common.h> #include <util/error.h>  #include <cstdint> #include <vector> +void initialize()+{+    SelectParams(CBaseChainParams::REGTEST);+    StartMutedLogging();

Unfortunately TestingSetup introduces non-determinism which makes coverage vary between runs, see https://github.com/bitcoin/bitcoin/pull/19067#discussion_r429986672 :)

practicalswift

comment created time in 5 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CCoinsViewCache

+// Copyright (c) 2020 The Bitcoin Core developers+// Distributed under the MIT software license, see the accompanying+// file COPYING or http://www.opensource.org/licenses/mit-license.php.++#include <amount.h>+#include <chainparams.h>+#include <chainparamsbase.h>+#include <coins.h>+#include <consensus/tx_verify.h>+#include <consensus/validation.h>+#include <key.h>+#include <node/coinstats.h>+#include <policy/policy.h>+#include <primitives/transaction.h>+#include <pubkey.h>+#include <test/fuzz/FuzzedDataProvider.h>+#include <test/fuzz/fuzz.h>+#include <test/fuzz/util.h>+#include <validation.h>++#include <cstdint>+#include <limits>+#include <optional>+#include <string>+#include <vector>++namespace {+const Coin EMPTY_COIN{};++bool operator==(const Coin& a, const Coin& b)+{+    if (a.IsSpent() && b.IsSpent()) return true;+    return a.fCoinBase == b.fCoinBase && a.nHeight == b.nHeight && a.out == b.out;+}+} // namespace++void initialize()+{+    static const ECCVerifyHandle ecc_verify_handle;+    ECC_Start();+    SelectParams(CBaseChainParams::REGTEST);+}++void test_one_input(const std::vector<uint8_t>& buffer)+{+    FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};+    CCoinsView backend_coins_view;+    CCoinsViewCache coins_view_cache{&backend_coins_view};+    COutPoint random_out_point;+    Coin random_coin;+    CMutableTransaction random_mutable_transaction;+    while (fuzzed_data_provider.ConsumeBool()) {+        switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 9)) {+        case 0: {+            if (random_coin.IsSpent()) {+                break;+            }+            Coin coin = random_coin;+            bool expected_code_path = false;

Exactly :)

practicalswift

comment created time in 5 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 403c5ad9ad3d9ebbcc7c6ceec0ce677760e0f3b6

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 6 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 086991817e25df9d42e249751342cf5b137e348e

tests: Add fuzzing harness for CNode

view details

push time in 6 days

Pull request review commentbitcoin/bitcoin

tests: Add fuzzing harness for CNode

+// Copyright (c) 2020 The Bitcoin Core developers+// Distributed under the MIT software license, see the accompanying+// file COPYING or http://www.opensource.org/licenses/mit-license.php.++#include <chainparams.h>+#include <chainparamsbase.h>+#include <net.h>+#include <net_permissions.h>+#include <netaddress.h>+#include <optional.h>+#include <protocol.h>+#include <random.h>+#include <test/fuzz/FuzzedDataProvider.h>+#include <test/fuzz/fuzz.h>+#include <test/fuzz/util.h>+#include <test/util/setup_common.h>++#include <cstdint>+#include <string>+#include <vector>++void initialize()+{+    static TestingSetup no_log_regtest_setup{CBaseChainParams::REGTEST, {"-nodebuglogfile"}};

Note to self: TestingSetup introduces non-determinism and is way too heavy to use just to disable logging. Switch to something more lightweight which does exactly what we want and nothing more :)

practicalswift

comment created time in 6 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 7960082e506feb6ccaf5d0a8a0b61d471da64481

tests: Add fuzzing harness for CNode

view details

push time in 6 days

PR opened bitcoin/bitcoin

tests: Add fuzzing harness for CNode

Add fuzzing harness for CNode.

See doc/fuzzing.md for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the Bitcoin Core fuzzing corpus repo.

Happy fuzzing :)

+174 -0

0 comment

2 changed files

pr created time in 6 days

push eventpracticalswift/bitcoin

practicalswift

commit sha c50dee8206bad26afa117a4c0f11df80ea19a604

tests: Add fuzzing harness for CNode

view details

push time in 6 days

create barnchpracticalswift/bitcoin

branch : fuzzers-2020-05-25

created branch time in 6 days

pull request commentbitcoin/bitcoin

tests: Add fuzzing harness for CCoinsViewCache

@MarcoFalke Thanks a lot for a very good review! All feedback addressed :)

practicalswift

comment created time in 6 days

push eventpracticalswift/bitcoin

Jon Atack

commit sha 29f2cbdeb7afdde87d108adf80cffad17d112632

cli: extract connection exception handler, -rpcwait logic to ConnectAndCallRPC() to be callable for individual connections. This is needed for RPCs that need to be called and handled sequentially, rather than alone or in a batch. For example, when fetching the balances for each loaded wallet, -getinfo will call RPC listwallets, and then, depending on the result, RPC getbalances. It may be somewhat helpful to review this commit with `git show -w`.

view details

Jon Atack

commit sha 743077544b5420246ef29e0b708c90e3a8dfeeb6

cli: lift -rpcwallet logic up to CommandLineRPC() to allow passing rpcwallet independently from the -rpcwallet user option, and to move the logic to the top-level layer where most of the other option args are handled.

view details

Jon Atack

commit sha 9f01849a498a70616506bdcda8ce6897aa29e664

cli: create GetWalletBalances() to fetch multiwallet balances

view details

Jon Atack

commit sha afce85eb994384246e455b766549c3206cb059e0

cli: use GetWalletBalances() functionality for -getinfo and replace GetBoolArg with IsArgSet as we only want to know if the arg is passed; we do not need the value.

view details

Jon Atack

commit sha 903b6c117f541ea9258d3234ffcf59427344e668

rpc: drop unused JSONRPCProcessBatchReply size arg, refactor

view details

Jon Atack

commit sha 5edad5ce5d3f15b694bf3fad0300c6446674b554

test: add -getinfo multiwallet functional tests and improve the existing -getinfo -rpcwallet tests.

view details

MarcoFalke

commit sha fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4

node: Add chainman alias for g_chainman

view details

MarcoFalke

commit sha fa05fdf0f19fa4b557cc5e9ba436e3215b83c4e6

net: Pass chainman into PeerLogicValidation

view details

MarcoFalke

commit sha fa84b1cd846f6499b741710fd478ec9ad49b5120

validation: Make LoadBlockIndex() a member of ChainstateManager

view details

MarcoFalke

commit sha fa24d4909864096934577abc26cfa9be47f634ba

validation: Make PruneOneBlockFile() a member of ChainstateManager

view details

MarcoFalke

commit sha fa1d97b25686a5caca623599f6d608fd08616fe8

validation: Make ProcessNewBlock*() members of ChainstateManager

view details

MarcoFalke

commit sha fab6b9d18fd48bbbd1939b1173723bc04c5824b5

validation: Mark g_chainman DEPRECATED

view details

practicalswift

commit sha 6a239e72eb403d3ac5c7db203c5b3a24ef49a48b

tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers)

view details

MarcoFalke

commit sha fa3288cda12537b2e99a3cc7e14dfff3e944884f

Merge #19052: tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) 6a239e72eb403d3ac5c7db203c5b3a24ef49a48b tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) (practicalswift) Pull request description: Don't limit fuzzing inputs to 1 MB for `afl-fuzz`. This change provides a level playing field for all fuzzers which allows for fair benchmarking using projects such as the excellent [FuzzBench](https://github.com/google/fuzzbench) project. Prior to this commit we limited `afl-fuzz` to ≤1 MB inputs but allowed unlimited length inputs for all other fuzzers. ACKs for top commit: MarcoFalke: ACK 6a239e72eb403d3ac5c7db203c5b3a24ef49a48b The maximum data size should be a runtime option, not a compile time hardcoded value. Tree-SHA512: dad176ae39aa09fe919e057008ab0670b9da72909bfeb8f0e8b9ae93b65514f2e25a1d51be89a32be9122fc412edf49234dfd9a44beb974b25fda387fd7bf174

view details

Hennadii Stepanov

commit sha ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b

doc: Drop protobuf stuff

view details

fanquake

commit sha 492cdc56e087c7f51f3d1e3f807191da7f9d9a07

Merge #19058: doc: Drop protobuf stuff ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b doc: Drop protobuf stuff (Hennadii Stepanov) Pull request description: This is a follow-up to #17165. ACKs for top commit: fanquake: ACK ea9fcfd1305f92a7c3ca4d3c05951ceba1b6b05b - clicked the links and they seem to work. Tree-SHA512: 0861bbac3a3ff781a413e15f5ed02c624bc15d572a001a53cd2fb9f7683456175f69e9d666b72f260abbb5114b67cefca9fada4d179c62384c90479534ae63d5

view details

MarcoFalke

commit sha 793e0ff22cbace2a0fbe1e4a2e88a7bc6bf44502

Merge #18698: Make g_chainman internal to validation fab6b9d18fd48bbbd1939b1173723bc04c5824b5 validation: Mark g_chainman DEPRECATED (MarcoFalke) fa1d97b25686a5caca623599f6d608fd08616fe8 validation: Make ProcessNewBlock*() members of ChainstateManager (MarcoFalke) fa24d4909864096934577abc26cfa9be47f634ba validation: Make PruneOneBlockFile() a member of ChainstateManager (MarcoFalke) fa84b1cd846f6499b741710fd478ec9ad49b5120 validation: Make LoadBlockIndex() a member of ChainstateManager (MarcoFalke) fa05fdf0f19fa4b557cc5e9ba436e3215b83c4e6 net: Pass chainman into PeerLogicValidation (MarcoFalke) fa7b626d7a150e5cbd4d163d2dab6f8a55fc2cc4 node: Add chainman alias for g_chainman (MarcoFalke) Pull request description: The global `g_chainman` has recently been introduced in #17737. The chainstate manager is primarily needed for the assumeutxo feature, but it can also simplify testing in the future. The goal of this pull is to make the global chainstate manager internal to validation, so that all external code does not depend on globals and that unit or fuzz tests can pass in their (potentially mocked) chainstate manager. I suggest reviewing the pull request commit-by-commit. It should be relatively straightforward refactoring that does not change behavior at all. ACKs for top commit: ryanofsky: Code review ACK fab6b9d18fd48bbbd1939b1173723bc04c5824b5. Had to be rebased but still looks good Tree-SHA512: dcbf114aeef4f8320d466369769f22ce4dd8f46a846870354df176c3de9ff17c64630fbd777e7121d7470d7a8564ed8d37b77168746e8df7489c6877e55d7b4f

view details

Samuel Dobson

commit sha 24f70290642c9c5108d3dc62dbe055f5d1bcff9d

Merge #18594: cli: display multiwallet balances in -getinfo 5edad5ce5d3f15b694bf3fad0300c6446674b554 test: add -getinfo multiwallet functional tests (Jon Atack) 903b6c117f541ea9258d3234ffcf59427344e668 rpc: drop unused JSONRPCProcessBatchReply size arg, refactor (Jon Atack) afce85eb994384246e455b766549c3206cb059e0 cli: use GetWalletBalances() functionality for -getinfo (Jon Atack) 9f01849a498a70616506bdcda8ce6897aa29e664 cli: create GetWalletBalances() to fetch multiwallet balances (Jon Atack) 743077544b5420246ef29e0b708c90e3a8dfeeb6 cli: lift -rpcwallet logic up to CommandLineRPC() (Jon Atack) 29f2cbdeb7afdde87d108adf80cffad17d112632 cli: extract connection exception handler, -rpcwait logic (Jon Atack) Pull request description: This PR is a client-side version of #18453, per review feedback there and [review club discussions](https://bitcoincore.reviews/18453#meeting-log). It updates `bitcoin-cli -getinfo` on the client side to display wallet name and balance for the loaded wallets when more than one is loaded (e.g. you are in "multiwallet mode") and `-rpcwallet=` is not passed; otherwise, behavior is unchanged. before ```json $ bitcoin-cli -getinfo -regtest { "version": 199900, "blocks": 15599, "headers": 15599, "verificationprogress": 1, "timeoffset": 0, "connections": 0, "proxy": "", "difficulty": 4.656542373906925e-10, "chain": "regtest", "balance": 0.00001000, "relayfee": 0.00001000 } ``` after ```json $ bitcoin-cli -getinfo -regtest { "version": 199900, "blocks": 15599, "headers": 15599, "verificationprogress": 1, "timeoffset": 0, "connections": 0, "proxy": "", "difficulty": 4.656542373906925e-10, "chain": "regtest", "balances": { "": 0.00001000, "Encrypted": 0.00003500, "day-to-day": 0.00000120, "side project": 0.00000094 } } ``` ----- `Review club` discussion about this PR is here: https://bitcoincore.reviews/18453 This PR can be manually tested by building, creating/loading/unloading several wallets with `bitcoin-cli createwallet/loadwallet/unloadwallet` and running `bitcoin-cli -getinfo` and `bitcoin-cli -rpcwallet=<wallet-name> -getinfo`. `wallet_multiwallet.py --usecli` provides regression test coverage on this change, along with `interface_bitcoin_cli.py` where this PR adds test coverage. Credit to Wladimir J. van der Laan for the idea in https://github.com/bitcoin/bitcoin/issues/17314 and https://github.com/bitcoin/bitcoin/pull/18453#issuecomment-605431806. ACKs for top commit: promag: Tested ACK 5edad5ce5d3f15b694bf3fad0300c6446674b554. jnewbery: utACK 5edad5ce5d3f15b694bf3fad0300c6446674b554 meshcollider: Code review ACK 5edad5ce5d3f15b694bf3fad0300c6446674b554 Tree-SHA512: 4ca36c5f6c49936b40afb605c44459c1d5b80b5bd84df634007ca276b3f6c102a0cb382f9d528370363ee32c94b0d7ffa15184578eaf8de74179e566c5c5cee5

view details

practicalswift

commit sha f9b22e3bdb54acb2f830b3ebbad47ff17dfb5781

tests: Add fuzzing harness for CCoinsViewCache

view details

push time in 6 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 5579f7ff624bbb555ea26ae77511f175a284b72d

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 7 days

PR opened bitcoin/bitcoin

tests: Add fuzzing harness for CAddrMan. Fill some fuzzing coverage gaps.

Add fuzzing harness for CAddrMan.

Fill some fuzzing coverage gaps for functions in addrdb.h, merkleblock.h and outputtype.h.

+204 -7

0 comment

5 changed files

pr created time in 7 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 3ff7708e3d29446097d937d0414405d95a039d87

tests: Fill some fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 7 days

push eventpracticalswift/bitcoin

practicalswift

commit sha 7cd72d3407928a0b186eda9d6d977655de7cd672

tests: Add fuzzing harness for CAddrMan

view details

practicalswift

commit sha 4cb3ae87523520ff4e6c108dab229ab59b93ba85

tests: Fill some fuzzing coverage gaps for functions in merkleblock.h

view details

practicalswift

commit sha 3f91f0fff3d144cb46cb3cab0ad706dda8726f1c

tests: Fix fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 7 days

push eventpracticalswift/bitcoin

practicalswift

commit sha e2b8373a1a44962619d563ca5a606a68db11cf65

tests: Fill some fuzzing coverage gaps for functions in merkleblock.h

view details

practicalswift

commit sha 7cf8f8741dd087064d5dcced9b359d86975d05b9

tests: Fix fuzzing coverage gaps for functions in addrdb.h and outputtype.h

view details

push time in 7 days

create barnchpracticalswift/bitcoin

branch : fuzzers-2020-05-23

created branch time in 7 days

issue openedbitcoin/bitcoin

Investigate unnecessary uses of raw pointer parameters

The developer note's recommendations on how to pass (non-)fundamental types can be found here.

In #19053 @theStack replaces some unnecessary uses of raw pointer parameters with references.

There are a few similar cases in our code bases where references (or something else) might be more appropriate than raw pointer parameters.

If anyone is interested in investigating such cases the commands below might be helpful to find potential candidates.

Note: It probably goes without saying, but any change of this type needs case-by-case evaluation :) Each suggested individual parameter change must make sense: the commands are only provided to help find potential candidates.

Top list of types passed as raw pointer parameters:

$ git grep -E '^[a-zA-Z].* [a-zA-Z:]+\([^()]*\*[^()]*\)' -- "src/**.cpp" "src/**.h" \
      ":(exclude)src/bench/" ":(exclude)src/compat/" ":(exclude)src/crc32c/" \
      ":(exclude)src/leveldb/" ":(exclude)src/qt/" ":(exclude)src/secp256k1/" \
      ":(exclude)src/test/" ":(exclude)src/tinyformat.h" ":(exclude)src/univalue/" \
      ":(exclude)src/zmq/" ":(exclude)src/wallet/" | grep -vE "char *\*" | \
      cut -f2 -d'(' | cut -f1 -d')' | tr "," "\n" | grep "\*" | sed 's/^ *const  *//g' | \
      sed 's/^ *//g' | sed 's/ \*/* /g' | sed 's/\*.*$/*/g' | grep -E '[a-zA-Z]' | \
      sort | uniq -c | sort -rn
    118 CBlockIndex*
     24 CNode*
     11 ScriptError*
     10 void*
      9 FILE*
      9 bool*
      8 CConnman*
      7 std::string*
      6 RPCTimerInterface*
      6 CNetAddr*
      4 std::vector<int>*
      4 SigningProvider*
      4 LockPoints*
      4 HTTPRequest*
      4 FlatFilePos*
      4 CValidationInterface*
      4 CScriptWitness*
      4 CBlockHeader*
      3 uint32_t*
      3 struct sockaddr*
      3 EstimationResult*
      3 CNodeState*
      3 CCoinsView*
      2 uint8_t*
      2 uint64_t*
      2 struct bufferevent*
      2 std::vector<unsigned char>*
      2 std::vector<CScriptCheck>*
      2 std::vector<const CBlockIndex*
      2 SignatureData*
      2 PrecomputedTransactionData*
      2 int64_t*
      2 int*
      2 FillableSigningProvider*
      2 double*
      2 CRPCCommand*
      2 CCoinsViewCache*
      2 CBlock*
      1 WorkQueue<HTTPClosure>*
      1 struct timeval*
      1 struct in_addr*
      1 struct evhttp*
      1 struct event_base*
      1 std::vector<COutPoint>*
      1 std::list<QueuedBlock>::iterator*
      1 socklen_t*
      1 secp256k1_ecdsa_signature*
      1 leveldb::Options*
      1 FeeCalculation*
      1 DisconnectedBlockTransactions*
      1 CTxMemPoolEntry*
      1 Coin*
      1 CCoinsViewCursor*
      1 CChainState*
      1 CBlockFileInfo*
      1 BaseRequestHandler*
      1 BanMan*

A subset of functions with raw pointer parme:

$ git grep -E '^[a-zA-Z].* [a-zA-Z:]+\([^()]*\*[^()]*\)' -- "src/**.cpp" "src/**.h" \
      ":(exclude)src/bench/" ":(exclude)src/compat/" ":(exclude)src/crc32c/" \
      ":(exclude)src/leveldb/" ":(exclude)src/qt/" ":(exclude)src/secp256k1/" \
      ":(exclude)src/test/" ":(exclude)src/tinyformat.h" ":(exclude)src/univalue/" \
      ":(exclude)src/zmq/" ":(exclude)src/wallet/" | grep -vE "char *\*"
src/addrman.cpp:CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int* pnId)
src/addrman.cpp:CAddrInfo* CAddrMan::Create(const CAddress& addr, const CNetAddr& addrSource, int* pnId)
src/bitcoin-cli.cpp:static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, const std::vector<std::string>& args)
src/blockfilter.cpp:bool GCSFilter::MatchInternal(const uint64_t* element_hashes, size_t size) const
src/chain.cpp:void CChain::SetTip(CBlockIndex *pindex) {
src/chain.cpp:CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
src/chain.cpp:const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb) {
src/chain.h:const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb);
src/coins.cpp:bool CCoinsViewCache::SpendCoin(const COutPoint &outpoint, Coin* moveout) {
src/consensus/merkle.cpp:uint256 ComputeMerkleRoot(std::vector<uint256> hashes, bool* mutated) {
src/consensus/merkle.cpp:uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
src/consensus/merkle.cpp:uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
src/consensus/merkle.h:uint256 ComputeMerkleRoot(std::vector<uint256> hashes, bool* mutated = nullptr);
src/consensus/merkle.h:uint256 BlockMerkleRoot(const CBlock& block, bool* mutated = nullptr);
src/consensus/merkle.h:uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated = nullptr);
src/consensus/tx_verify.cpp:std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block)
src/consensus/tx_verify.cpp:bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block)
src/consensus/tx_verify.h:std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block);
src/consensus/tx_verify.h:bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block);
src/crypto/ripemd160.cpp:void inline Initialize(uint32_t* s)
…

created time in 7 days

pull request commentbitcoin/bitcoin

ci: Add fuzzbuzz integration configuration file

@hebasto

Sounds good! I think it is good to have all interested parties create their own accounts to keep things as decentralised and trustless as possible. AFAICT there is nothing stopping multiple independent accounts from having bitcoin/bitcoin as the upstream fuzzing repo :)

practicalswift

comment created time in 8 days

pull request commentbitcoin/bitcoin

ci: Add fuzzbuzz integration configuration file

Did he mean that I should be invited by @practicalswift to the org on https://app.fuzzbuzz.io?

I don't know what he means but I known I'm fuzzing my own clone of the project: not bitcoin/bitcoin.

practicalswift

comment created time in 8 days

pull request commentbitcoin/bitcoin

refactor: replace CNode pointers by references within net_processing.{h,cpp}

@MarcoFalke Yes, that these needs case-by-case evaluation goes without saying: the lists are showing candidates only -- sorry if that was unclear :)

theStack

comment created time in 8 days

PR opened bitcoin-core/qa-assets

Add seeds

Add seeds.

+2 -0

0 comment

299 changed files

pr created time in 8 days

create barnchpracticalswift/qa-assets

branch : seeds-2020-05-23

created branch time in 8 days

pull request commentbitcoin/bitcoin

refactor: replace CNode pointers by references within net_processing.{h,cpp}

@theStack Thanks for doing this! If you want to investigate other cases where we are currently using raw pointer arguments without any reason doing so these commands might be helpful:

Top list of types passed as raw pointer arguments:

$ git grep -E '^[a-zA-Z].* [a-zA-Z:]+\([^()]*\*[^()]*\)' -- "src/**.cpp" "src/**.h" 
      ":(exclude)src/bench/" ":(exclude)src/compat/" ":(exclude)src/crc32c/" \
      ":(exclude)src/leveldb/" ":(exclude)src/qt/" ":(exclude)src/secp256k1/" \
      ":(exclude)src/test/" ":(exclude)src/tinyformat.h" ":(exclude)src/univalue/" \
      ":(exclude)src/zmq/" ":(exclude)src/wallet/" | grep -vE "char *\*" | \
      cut -f2 -d'(' | cut -f1 -d')' | tr "," "\n" | grep "\*" | sed 's/^ *const  *//g' | \
      sed 's/^ *//g' | sed 's/ \*/* /g' | sed 's/\*.*$/*/g' | grep -E '[a-zA-Z]' | \
      sort | uniq -c | sort -rn
    118 CBlockIndex*
     24 CNode*
     11 ScriptError*
     10 void*
      9 FILE*
      9 bool*
      8 CConnman*
      7 std::string*
      6 RPCTimerInterface*
      6 CNetAddr*
      4 std::vector<int>*
      4 SigningProvider*
      4 LockPoints*
      4 HTTPRequest*
      4 FlatFilePos*
      4 CValidationInterface*
      4 CScriptWitness*
      4 CBlockHeader*
      3 uint32_t*
      3 struct sockaddr*
…

A subset of functions with raw pointer arguments:

$ git grep -E '^[a-zA-Z].* [a-zA-Z:]+\([^()]*\*[^()]*\)' -- "src/**.cpp" "src/**.h" \
      ":(exclude)src/bench/" ":(exclude)src/compat/" ":(exclude)src/crc32c/" \
      ":(exclude)src/leveldb/" ":(exclude)src/qt/" ":(exclude)src/secp256k1/" \
      ":(exclude)src/test/" ":(exclude)src/tinyformat.h" ":(exclude)src/univalue/" \
      ":(exclude)src/zmq/" ":(exclude)src/wallet/" | grep -vE "char *\*"
src/addrman.cpp:CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int* pnId)
src/addrman.cpp:CAddrInfo* CAddrMan::Create(const CAddress& addr, const CNetAddr& addrSource, int* pnId)
src/bitcoin-cli.cpp:static UniValue CallRPC(BaseRequestHandler *rh, const std::string& strMethod, const std::vector<std::string>& args)
src/blockfilter.cpp:bool GCSFilter::MatchInternal(const uint64_t* element_hashes, size_t size) const
src/chain.cpp:void CChain::SetTip(CBlockIndex *pindex) {
src/chain.cpp:CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
src/chain.cpp:const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb) {
src/chain.h:const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb);
src/coins.cpp:bool CCoinsViewCache::SpendCoin(const COutPoint &outpoint, Coin* moveout) {
src/consensus/merkle.cpp:uint256 ComputeMerkleRoot(std::vector<uint256> hashes, bool* mutated) {
src/consensus/merkle.cpp:uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
src/consensus/merkle.cpp:uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
src/consensus/merkle.h:uint256 ComputeMerkleRoot(std::vector<uint256> hashes, bool* mutated = nullptr);
src/consensus/merkle.h:uint256 BlockMerkleRoot(const CBlock& block, bool* mutated = nullptr);
src/consensus/merkle.h:uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated = nullptr);
src/consensus/tx_verify.cpp:std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block)
src/consensus/tx_verify.cpp:bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block)
src/consensus/tx_verify.h:std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block);
src/consensus/tx_verify.h:bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block);
src/crypto/ripemd160.cpp:void inline Initialize(uint32_t* s)
…
theStack

comment created time in 9 days

pull request commentbitcoin/bitcoin

build: Propagate well-known vars into depends

ACK 645e0803d8b5e0a4e101649519ca7588852f9d3d -- patch looks correct and Travis is happy :)

dongcarl

comment created time in 9 days

pull request commentbitcoin/bitcoin

doc: Add CODEOWNERS file to automatically nominate PR reviewers

ACK 92f83731d76c0adc78f815aecac52eb0a7fcde91 :)

adamjonas

comment created time in 9 days

pull request commentbitcoin/bitcoin

refactor: replace CNode pointers by references within net_processing.{h,cpp}

Strong concept ACK

theStack

comment created time in 9 days

pull request commentbitcoin-core/secp256k1

Add a libFuzzer fuzzing harness

@elichai Yes, please split in multiple binaries: see the last point in these recommendations from the libFuzzer documentation :)

Some important things to remember about fuzz targets:

  • The fuzzing engine will execute the fuzz target many times with different inputs in the same process.
  • It must tolerate any kind of input (empty, huge, malformed, etc).
  • It must not exit() on any input.
  • It may use threads but ideally all threads should be joined at the end of the function.
  • It must be as deterministic as possible. Non-determinism (e.g. random decisions not based on the input bytes) will make fuzzing inefficient.
  • It must be fast. Try avoiding cubic or greater complexity, logging, or excessive memory consumption. Ideally, it should not modify any global state (although that’s not strict).
  • Usually, the narrower the target the better. E.g. if your target can parse several data formats, split it into several targets, one per format.
elichai

comment created time in 9 days

Pull request review commentbitcoin/bitcoin

tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers)

 static bool read_stdin(std::vector<uint8_t>& data)     ssize_t length = 0;     while ((length = read(STDIN_FILENO, buffer, 1024)) > 0) {         data.insert(data.end(), buffer, buffer + length);--        if (data.size() > (1 << 20)) return false;     }     return length == 0;

It is the other way around: length != 0 is invalid. length == 0 means that end of file was reached which is what we want :)

practicalswift

comment created time in 9 days

PR opened bitcoin/bitcoin

tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers)

Don't limit fuzzing inputs to 1 MB for afl-fuzz.

This change provides a level playing field for all fuzzers which allows for fair benchmarking using projects such as the excellent FuzzBench project.

Prior to this commit we limited afl-fuzz to ≤1 MB inputs but allowed unlimited length inputs for all other fuzzers.

+0 -2

0 comment

1 changed file

pr created time in 9 days

create barnchpracticalswift/bitcoin

branch : remove-afl-limit

created branch time in 9 days

pull request commentbitcoin/bitcoin

tests: Add fuzzing harness for CCoinsViewCache

Rebased! :)

practicalswift

comment created time in 9 days

push eventpracticalswift/bitcoin

Luke Dashjr

commit sha 2abe8cc3b760219cfa434e4c96e9f8d3611d0037

Bugfix: Include "csv","!segwit" in "rules" They have been missing since buried deployments were merged

view details

Luke Dashjr

commit sha 412d5fe8791c417bf46fc55a5bb8d59be98a33db

QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate

view details

Andrew Chow

commit sha a8334f7ac39532528c5f8bd3b0eea05aa63e8794

Read and write a checksum for encrypted keys

view details

Andrew Chow

commit sha c9a9ddb4142af0af5f7b1a5ccd13f8e585007089

Set fDecryptionThoroughlyChecked based on whether crypted key checksums are valid Change fDecryptionThoroughlyChecked to default to true so that it can latch to false when an invalid checksum is seen. Checksums may be invalid if the wallet does not have checksums or if the wallet became corrupted. It is safe to default fDecryptionThoroughlyChecked to true because any existing wallet without a checksum will set it to false. Any new or blank wallet where encrypted keys are added will then set this to true when the first encrypted key is generated by virtue of CheckDecryptionKey doing that during the initial Unlock prior to keys being added.

view details

Andrew Chow

commit sha d67055e00dd90f504384e5c3f229fc95306d5aac

Upgrade or rewrite encrypted key checksums If fDecryptionThoroughlyChecked is false, after a key has been checked, write (or rewrite) its checksum. This serves to upgrade wallets and correct those which have the checksum corrupted but not the key.

view details

Vasil Dimov

commit sha f85203097f78d9daa1d35c4097a80beab31da2a4

lockedpool: avoid sensitive data in core files (FreeBSD) This is a followup to 23991ee53 / https://github.com/bitcoin/bitcoin/pull/15600 to also use madvise(2) on FreeBSD to avoid sensitive data allocated with secure_allocator ending up in core files in addition to preventing it from going to the swap.

view details

Pieter Wuille

commit sha 769ee5fa0011ae658770586442715452a656559d

Merge BigEndian functionality into CustomUintFormatter

view details

Russell Yanofsky

commit sha 6f9a1e5ad0a270d3b5a715f3e3ea0911193bf244

Extend CustomUintFormatter to support enums Extracted by Pieter Wuille from a comment by Russ Yanofsky, see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398821936.

view details

Russell Yanofsky

commit sha d06fedd1bc26bf5bf2b203d4445aeaebccca780e

Add SER_READ and SER_WRITE for read/write-dependent statements Extracted and extended by Pieter Wuille from a comment by Russ Yanofsky (see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398625457).

view details

Pieter Wuille

commit sha 73747afbbeb013669faf4c4d2c0903cec4526fb0

Convert merkleblock to new serialization

view details

Pieter Wuille

commit sha 2b1f85e8c52c8bc5a17eae4c809eaf61d724af98

Convert blockencodings_tests to new serialization

view details

Pieter Wuille

commit sha 4eb5643e3538863c9d2ff261f49a9a1b248de243

Convert everything except wallet/qt to new serialization

view details

fanquake

commit sha a029805f57fa9a4ab9867c0d1e865675d57537c7

build: remove -Qunused-arguments workaround for clang + ccache This was added in 386efb7695debaf5f0f328a2e4c9abc342161665 to address spammy Clang warnings when building with ccache. The issue was addressed in ccache 3.2 (https://bugzilla.samba.org/show_bug.cgi?id=8118, Nov 2014), and from a look at all major distros, it's only Debian Jessie that has a version of ccache older than that (3.1). Therefore I think it's acceptable to drop this workaround, and re-enable warnings for unused driver arguments (when compiling using Clang).

view details

Pieter Wuille

commit sha 1479007a335ab43af46f527d0543e254fc2a8e86

Introduce Instruction enum in asmap

view details

Pieter Wuille

commit sha 2b3dbfa5a63cb5a6625ec00294ebd933800f0255

Deal with decoding failures explicitly in asmap Interpret

view details

Pieter Wuille

commit sha 5feefbe6e7b6cdd809eba4074d41dc95a7035f7e

Improve asmap Interpret checks and document failures

view details

Pieter Wuille

commit sha fffd8dca2de39ad4a683f0dce57cdca55ed2f600

Add asmap sanity checker

view details

Pieter Wuille

commit sha c81aefc5377888c7ac4f29f570249fd6c2fdb352

Add additional effiency checks to sanity checker

view details

Pieter Wuille

commit sha 7cf97fda154ba837933eb05be5aeecfb69a06641

Make asmap Interpreter errors fatal and fuzz test it

view details

Pieter Wuille

commit sha 748977690e0519110cda9628162a7ccf73a5934b

Add asmap_direct fuzzer that tests Interpreter directly

view details

push time in 9 days

issue commentcplusplus/draft

www.open-std.org not reachable over a secure connection (TLS)

Thanks for clarifying! I incorrectly assumed that the site was somehow related to this repo. Sorry!

practicalswift

comment created time in 10 days

issue openedcplusplus/draft

www.open-std.org not reachable over a secure connection (TLS)

First, thanks a lot for all the excellent standardization work that keeps C++ relevant!

Now to my issue: it seems like www.open-std.org is not reachable over a secure connection (TLS).

Apologies in advance if this is the incorrect repo to report this - if so, please let me know where to report :)

created time in 10 days

push eventpracticalswift/bitcoin

Luke Dashjr

commit sha 2abe8cc3b760219cfa434e4c96e9f8d3611d0037

Bugfix: Include "csv","!segwit" in "rules" They have been missing since buried deployments were merged

view details

Luke Dashjr

commit sha 412d5fe8791c417bf46fc55a5bb8d59be98a33db

QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate

view details

Pieter Wuille

commit sha 769ee5fa0011ae658770586442715452a656559d

Merge BigEndian functionality into CustomUintFormatter

view details

Russell Yanofsky

commit sha 6f9a1e5ad0a270d3b5a715f3e3ea0911193bf244

Extend CustomUintFormatter to support enums Extracted by Pieter Wuille from a comment by Russ Yanofsky, see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398821936.

view details

Russell Yanofsky

commit sha d06fedd1bc26bf5bf2b203d4445aeaebccca780e

Add SER_READ and SER_WRITE for read/write-dependent statements Extracted and extended by Pieter Wuille from a comment by Russ Yanofsky (see https://github.com/bitcoin/bitcoin/pull/18317#discussion_r398625457).

view details

Pieter Wuille

commit sha 73747afbbeb013669faf4c4d2c0903cec4526fb0

Convert merkleblock to new serialization

view details

Pieter Wuille

commit sha 2b1f85e8c52c8bc5a17eae4c809eaf61d724af98

Convert blockencodings_tests to new serialization

view details

Pieter Wuille

commit sha 4eb5643e3538863c9d2ff261f49a9a1b248de243

Convert everything except wallet/qt to new serialization

view details

practicalswift

commit sha 8d306862ef077f2a71931372dd6a2efa05188c84

ci: Add fuzzbuzz integration

view details

Hennadii Stepanov

commit sha 1e06bb68bed84e525c55022f789416ffd4793e8d

Drop unused CLIENT_VERSION_SUFFIX macro

view details

João Barbosa

commit sha a2e6db5c4f1bb52a8814102b628e51652493d06a

rpc: Add mutex to guard deadlineTimers

view details

Amiti Uttarwar

commit sha 047ceac142246b5d51056a51dbf4645b31802be4

[net processing] ignore tx GETDATA from blocks-only peers Co-Authored-By: John Newbery <john@johnnewbery.com>

view details

Amiti Uttarwar

commit sha e257cf71c851e25e1a533bf1d4296f6b55c81332

[net processing] ignore unknown INV types in GETDATA messages Co-Authored-By: John Newbery <john@johnnewbery.com>

view details

Amiti Uttarwar

commit sha 2f032556e08a04807c71eb02104ca9589eaadf1b

[test] test that an invalid GETDATA doesn't prevent processing of future messages Co-Authored-By: John Newbery <john@johnnewbery.com>

view details

John Newbery

commit sha 9847e205bf7edcac4c30ce4b6d62f482aa7bc1b7

[docs] Improve commenting in ProcessGetData()

view details

MarcoFalke

commit sha fa0e5b89cf742df56c6c8f49fe9b3c54d2970a66

Add templated GetRandomDuration<>

view details

MarcoFalke

commit sha 0000ea32656833efa3d2ffd9bab66c88c83334f0

test: Add test for GetRandMillis and GetRandMicros

view details

Russell Yanofsky

commit sha 83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb

Switch transaction table to use wallet height not node height Tweak of #17905 to make gui display of transactions and balances more consistent. This change shouldn't cause visible effects in normal cases, just make GUI wallet code more internally correct and consistent.

view details

Russell Yanofsky

commit sha 2bc9b92ed8b7736ad67876398a0bb8287f57e9b3

Cancel wallet balance timer when shutdown requested This doesn't fix any current problem, but it makes balance checking code less fragile, and prevents use-after free travis error in next commit: https://travis-ci.org/github/bitcoin/bitcoin/jobs/675367629#L4240

view details

Russell Yanofsky

commit sha bf0a510981ddc28c754881ca21c50ab18e5f2b59

gui: Avoid wallet tryGetBalances calls before TransactionChanged or BlockTip notifications interfaces::Wallet::tryGetBalances was recently updated in https://github.com/bitcoin/bitcoin/pull/18160 to avoid computing balances internally, but this not efficient as it could be with #10102 because tryGetBalances is an interprocess call. Implementing the TransactionChanged / BlockTip check outside of tryGetBalances also allows tryGetBalances to be simplified in next commit 'Revert "gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged"'.

view details

push time in 10 days

pull request commentbitcoin/bitcoin

util: Use locale independent ToString(…) instead of locale dependent strprintf(…) for low-level string formatting

@laanwj Friendly ping: can you clarify your review feedback as requested above?

Generally I don't think it is fair to leave NACK style comments if one is unwilling to follow-up when asked for clarification regarding the rationale.

practicalswift

comment created time in 10 days

pull request commentbitcoin/bitcoin

Serialization improvements: final step

Concept ACK

The new serialization code is clearer and thus much easier to reason about.

sipa

comment created time in 10 days

pull request commentbitcoin/bitcoin

Multiprocess build support

ACK e2bab2aa162ae38b2bf8195b577c982402fbee9d

Thanks for doing this excellent architectural work: a dream come true (even if optional)!

With this dream off the table I think I only have Sandboxed API integration, control-flow integrity and killing the UUM bug class for good using -ftrivial-auto-var-init=zero left to dream about :)

Thanks @ryanofsky: you're great, and so is your patience -- this has been a very long road :)

ryanofsky

comment created time in 11 days

issue commentbitcoin/bitcoin

Intermittent (and rare) unit test failure in blockfilter_index_tests/blockfilter_index_initial_sync

I haven't investigated that but here is the output from a failing one:

2020-05-16T05:59:57.550904Z     - Index writing: 1.94ms [0.40s (2.03ms/blk)]                                                                                                                                                                                                                                                    [0/1710]
2020-05-16T05:59:57.551566Z     - Callbacks: 0.67ms [0.12s (0.61ms/blk)]
2020-05-16T05:59:57.552209Z BlockChecked: block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d state=Valid
2020-05-16T05:59:57.552852Z   - Connect total: 7.13ms [1.38s (6.93ms/blk)]
2020-05-16T05:59:57.553500Z   - Flush: 0.65ms [0.14s (0.70ms/blk)]
2020-05-16T05:59:57.554153Z   - Writing chainstate: 0.65ms [0.17s (0.84ms/blk)]
2020-05-16T05:59:57.554895Z Blockpolicy estimates updated by 0 of 0 block txs, since last block 0 of 0 tracked, mempool map size 0, max target 0 from current
2020-05-16T05:59:57.555586Z UpdateTip: new best=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d height=99 version=0x20000000 log2_work=7.6438562 tx=100 date='2020-05-16T06:00:11Z' progress=1.000000 cache=0.0MiB(99txo)
2020-05-16T05:59:57.556231Z   - Connect postprocess: 2.08ms [0.43s (2.14ms/blk)]
2020-05-16T05:59:57.556877Z - Connect block: 10.51ms [2.11s (10.62ms/blk)]
2020-05-16T05:59:57.557687Z Checking mempool with 0 transactions and 0 inputs
2020-05-16T05:59:57.571535Z Enqueuing BlockConnected: block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d block height=99
2020-05-16T05:59:57.572202Z Enqueuing UpdatedBlockTip: new block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d fork block hash=5baaa452c43885d714369586561867ad382e55ed27699fa82676c33495e14125 (in IBD=false)
2020-05-16T05:59:57.572970Z CreateNewBlock(): block weight: 904 txs: 0 fees: 0 sigops 400
2020-05-16T05:59:57.573985Z     - Sanity checks: 0.01ms [0.00s (0.01ms/blk)]
2020-05-16T05:59:57.574644Z     - Fork checks: 0.67ms [0.31s (1.55ms/blk)]
2020-05-16T05:59:57.575301Z       - Connect 1 transactions: 0.65ms (0.648ms/tx, 0.000ms/txin) [0.29s (1.46ms/blk)]
2020-05-16T05:59:57.575962Z     - Verify 0 txins: 1.32ms (0.000ms/txin) [0.53s (2.63ms/blk)]
2020-05-16T05:59:57.576603Z CreateNewBlock() packages: 0.01ms (0 packages, 0 updated descendants), validity: 3.65ms (total 3.66ms)
2020-05-16T05:59:57.577353Z NewPoWValidBlock: block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5
2020-05-16T05:59:57.579751Z   - Load block from disk: 0.00ms [0.00s]
2020-05-16T05:59:57.580721Z     - Sanity checks: 0.01ms [0.00s (0.01ms/blk)]
2020-05-16T05:59:57.581374Z     - Fork checks: 0.66ms [0.31s (1.55ms/blk)]
2020-05-16T05:59:57.582022Z       - Connect 1 transactions: 0.64ms (0.644ms/tx, 0.000ms/txin) [0.29s (1.45ms/blk)]
2020-05-16T05:59:57.582672Z     - Verify 0 txins: 1.30ms (0.000ms/txin) [0.53s (2.62ms/blk)]
2020-05-16T05:59:57.584895Z     - Index writing: 2.21ms [0.41s (2.02ms/blk)]
2020-05-16T05:59:57.585539Z     - Callbacks: 0.66ms [0.12s (0.61ms/blk)]
2020-05-16T05:59:57.586168Z BlockChecked: block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 state=Valid
2020-05-16T05:59:57.587934Z   - Connect total: 8.19ms [1.39s (6.90ms/blk)]
2020-05-16T05:59:57.588569Z   - Flush: 0.64ms [0.14s (0.70ms/blk)]
2020-05-16T05:59:57.604022Z   - Writing chainstate: 15.44ms [0.18s (0.91ms/blk)]
2020-05-16T05:59:57.604763Z Blockpolicy estimates updated by 0 of 0 block txs, since last block 0 of 0 tracked, mempool map size 0, max target 0 from current
2020-05-16T05:59:57.605454Z UpdateTip: new best=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 height=100 version=0x20000000 log2_work=7.6582115 tx=101 date='2020-05-16T06:00:11Z' progress=1.000000 cache=0.0MiB(100txo)
2020-05-16T05:59:57.606099Z   - Connect postprocess: 2.09ms [0.43s (2.13ms/blk)]
2020-05-16T05:59:57.606740Z - Connect block: 26.36ms [2.14s (10.65ms/blk)]
2020-05-16T05:59:57.607554Z Checking mempool with 0 transactions and 0 inputs
2020-05-16T05:59:57.608496Z Enqueuing BlockConnected: block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 block height=100
2020-05-16T05:59:57.609144Z Enqueuing UpdatedBlockTip: new block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 fork block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d (in IBD=false)
2020-05-16T05:59:57.613390Z Opened LevelDB successfully
2020-05-16T05:59:57.614711Z Using obfuscation key for /tmp/test_common_Bitcoin Core/8452f2eaa126750ba2992d9a174f267010c49d1332b33956fb3e0963cd70821e/regtest/indexes/blockfilter/basic/db: 0000000000000000
2020-05-16T05:59:57.616968Z BlockConnected: block hash=5baaa452c43885d714369586561867ad382e55ed27699fa82676c33495e14125 block height=98
2020-05-16T05:59:57.618456Z UpdatedBlockTip: new block hash=5baaa452c43885d714369586561867ad382e55ed27699fa82676c33495e14125 fork block hash=79fd5be16c059ff46e8eb70b8b6a37e1b71f4788059ad054941a1f5445ea90f6 (in IBD=false)
2020-05-16T05:59:57.619685Z BlockConnected: block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d block height=99
2020-05-16T05:59:57.620941Z UpdatedBlockTip: new block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d fork block hash=5baaa452c43885d714369586561867ad382e55ed27699fa82676c33495e14125 (in IBD=false)
2020-05-16T05:59:57.622205Z BlockConnected: block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 block height=100
2020-05-16T05:59:57.623487Z UpdatedBlockTip: new block hash=7eddde99a72607cda3cfac83dfbce8cb254693ca76fe0e28d85b01612c7162a5 fork block hash=21b6fd8c6e7d845a5b4959b0c3e439387f6e8f6b98e052140294871356da1c3d (in IBD=false)
2020-05-16T05:59:57.649646Z basic block filter index thread start
2020-05-16T05:59:57.650334Z Syncing basic block filter index with block chain from height 0
test/blockfilter_index_tests.cpp(140): fatal error: in "blockfilter_index_tests/blockfilter_index_initial_sync": critical check time_start + timeout_ms > GetTimeMillis() has failed
pure virtual method called
terminate called without an active exception
unknown location(0): fatal error: in "blockfilter_index_tests/blockfilter_index_initial_sync": signal: SIGABRT (application abort requested)
practicalswift

comment created time in 11 days

pull request commentbitcoin/bitcoin

net: Use C++11 member initialization in protocol

Concept ACK

AFAICT the suggested change is fully in line with with the recommendations in the C++ Core Guidelines (Stroustrup & Sutter):

MarcoFalke

comment created time in 11 days

PR opened bitcoin-core/qa-assets

Add seeds

Add seeds.

+296 -0

0 comment

906 changed files

pr created time in 11 days

create barnchpracticalswift/qa-assets

branch : seeds-2020-05-20

created branch time in 11 days

issue commentbitcoin-core/secp256k1

Instances of operations on uninitialized values

Wow, great find @elichai!

Did you find these by fuzzing under MSan?

Very exciting to follow your great work!

elichai

comment created time in 11 days

issue commentgoogle/honggfuzz

Error message "LLVMFuzzerTestOneInput is not defined" also when LLVMFuzzerTestOneInput is defined?

FWIW:

$ src/test/fuzz/multiplication_overflow < /dev/null
Accepting input from '[STDIN]'
Usage for fuzzing: honggfuzz -P [flags] -- src/test/fuzz/multiplication_overflow
[2020-05-19T19:05:28+0000][F][17104] LLVMFuzzerTestOneInput():39 Define 'int LLVMFuzzerTestOneInput(uint8_t * buf, size_t len)' in your code to make it work
$ nm src/test/fuzz/multiplication_overflow | grep LLVMFuzzer
00000000000d8740 W LLVMFuzzerInitialize
00000000000d8750 W LLVMFuzzerMutate
00000000000d8780 W LLVMFuzzerTestOneInput
$ cd honggfuzz/
$ git rev-parse HEAD
d083bf81eb1c8a3b2dd702def5281afa5a7f74d2

d083bf81eb1c8a3b2dd702def5281afa5a7f74d2 is current master :)

practicalswift

comment created time in 12 days

pull request commentbitcoin/bitcoin

doc: Document how to fuzz Bitcoin Core using Honggfuzz

@MarcoFalke Seems like something broke since the instructions were added. Reported upstreams in https://github.com/google/honggfuzz/issues/336 :)

practicalswift

comment created time in 12 days

issue openedgoogle/honggfuzz

Error message "LLVMFuzzerTestOneInput is not defined" also when LLVMFuzzerTestOneInput is defined?

Thanks a lot for writing and maintaining a very nice fuzzer!

In Bitcoin Core we encourage our users to fuzz our code using various fuzzers including the excellent Honggfuzz.

These are the quick start instructions we provide at https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md:

$ git clone https://github.com/bitcoin/bitcoin
$ cd bitcoin/
$ ./autogen.sh
$ git clone https://github.com/google/honggfuzz
$ cd honggfuzz/
$ make
$ cd ..
$ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang CXX=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined --enable-c++17
$ make
$ mkdir -p inputs/
$ honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/process_message

These instructions have been working fine up until quite recently when they no longer appear to work when using a fresh honggfuzz compiled from master. (The only thing that has changed on our side is a recent switch to C++17 for the fuzzers, but I assume that is unrelated.)

The error message reported is LLVMFuzzerTestOneInput():38 Define 'int LLVMFuzzerTestOneInput(uint8_t * buf, size_t len)' in your code to make it work, but we do define LLVMFuzzerTestOneInput (and libFuzzer works as expected).

I assume our quick start instructions are incorrect in some way: are we missing something obvious here? :)

created time in 12 days

more