profile
viewpoint

paveljanik/bips 1

Bitcoin Improvement Proposals

paveljanik/bitcoin 1

Bitcoin Core integration/staging tree

paveljanik/bitcoincore.org 0

Bitcoin Core main website

paveljanik/CCSS 0

The CryptoCurrency Security Standard

paveljanik/ctaes 0

Simple constant-time AES implementation

paveljanik/leveldb 0

Bitcoin's LevelDB branch

paveljanik/leveldb-1 0

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

paveljanik/minigolf 0

Minigolfové poznámky

paveljanik/progit2 0

Pro Git 2nd Edition

issue commentbitcoin/bitcoin

Question: How to debug using docker & CI shell script?

Or you could write a Dockerfile with the desired environment and mount the source there.

kiminuo

comment created time in 15 minutes

PR merged bitcoin/bitcoin

[backport] wallet: Do not treat default constructed types as None-type Backport

Github-Pull: #20410 Rebased-From: fac4e136fa3d0fab7fde900a6be921313e16e7a6

Github-Pull: #20410 Rebased-From: fa69c2c78455fd0dc436018fece9ff7fc83a180d

+21 -26

0 comment

3 changed files

MarcoFalke

pr closed time in 15 minutes

push eventbitcoin/bitcoin

MarcoFalke

commit sha fac4e136fa3d0fab7fde900a6be921313e16e7a6

refactor: Change pointer to reference because it can not be null

view details

MarcoFalke

commit sha fa69c2c78455fd0dc436018fece9ff7fc83a180d

wallet: Do not treat default constructed types as None-type

view details

MarcoFalke

commit sha d47d16025e21d6e59da102f8ee965965fd9bbb34

Merge #20485: [backport] wallet: Do not treat default constructed types as None-type fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type (MarcoFalke) fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null (MarcoFalke) Pull request description: Github-Pull: #20410 Rebased-From: fac4e136fa3d0fab7fde900a6be921313e16e7a6 Github-Pull: #20410 Rebased-From: fa69c2c78455fd0dc436018fece9ff7fc83a180d Top commit has no ACKs. Tree-SHA512: 05c3fe29677710b57dcc482fd529b0ab79475519f60f9cfde19f956c4e2212d09b042af458ec4f1272c581360ce841b735dca4df144e0798b3ccf16547de9cd0

view details

push time in 15 minutes

PR merged bitcoin/bitcoin

[backport] test: Fix intermittent issue in mempool_compatibility Backport

Github-Pull: #20456 Rebased-From: fa05d19bd6ba619bb3f9aabc05c439cd18d34544

+2 -1

0 comment

1 changed file

MarcoFalke

pr closed time in 18 minutes

push eventbitcoin/bitcoin

MarcoFalke

commit sha fa05d19bd6ba619bb3f9aabc05c439cd18d34544

test: Fix intermittent issue in mempool_compatibility

view details

MarcoFalke

commit sha 4e964094dbcbbbf8e587663a3ef3a85c075f4599

Merge #20486: [backport] test: Fix intermittent issue in mempool_compatibility fa05d19bd6ba619bb3f9aabc05c439cd18d34544 test: Fix intermittent issue in mempool_compatibility (MarcoFalke) Pull request description: Github-Pull: #20456 Rebased-From: fa05d19bd6ba619bb3f9aabc05c439cd18d34544 Top commit has no ACKs. Tree-SHA512: c07ed3ffab315da2bf70427882e2da8216964fef97dd538d7c46c5d5b3563b0732626ffbe4b0e19537ad49a8542eedb3c08850cccacdef466f24582defe99d22

view details

push time in 18 minutes

issue commentbitcoin/bitcoin

Question: How to debug using docker & CI shell script?

The CIs compile from a make dist tarball, so if you want to modify the code, you'll need to modify the one in ./ci/scratch/... inside the docker

kiminuo

comment created time in 20 minutes

issue openedbitcoin/bitcoin

Question: How to debug using CI shell script?

Hi,

my PR #19245 fails on several platforms so I have attempted to run on my Ubuntu 20.04:

FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" ./ci/test_run_all.sh

as per instructions in https://github.com/bitcoin/bitcoin/tree/master/ci.

I can reproduce issue on CI which is great news. However, I would love to modify source code and re-run the FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" ./ci/test_run_all.sh script or attach to docker to run a failing functional test again so that I can debug it easier.

Does anybody have a workflow for this?

Notes:

  • I've tried docker attach <container ID> but it's not possible to simply execute test/functional/wallet_hd.py as it fails in that docker instance because it is supposed to be run somehow differently (that's as much as I gather from studying ci/test_run_all.sh).

created time in 31 minutes

pull request commentbitcoin/bitcoin

rpc: Validate -rpcauth arguments

Additional fields is not necessarily an error.

@luke-jr what do you suggest? Ignore the whole argument? Just use the the first 3 fields? Not sure about the debug log since it's a sensitive value.

promag

comment created time in 44 minutes

Pull request review commentbitcoin/bitcoin

[WIP DONOTMERGE] Replace boost with C++17

 class DescribeWalletAddressVisitor : public boost::static_visitor<UniValue>             UniValue subobj(UniValue::VOBJ);             UniValue detail = DescribeAddress(embedded);             subobj.pushKVs(detail);-            UniValue wallet_detail = boost::apply_visitor(*this, embedded);+            UniValue wallet_detail = std::visit(*this, embedded);

resolved, now that a52ecc9 is merged

MarcoFalke

comment created time in an hour

Pull request review commentbitcoin/bitcoin

[WIP DONOTMERGE] Replace boost with C++17

 static UniValue listunspent(const JSONRPCRequest& request)             std::unique_ptr<SigningProvider> provider = pwallet->GetSolvingProvider(scriptPubKey);             if (provider) {                 if (scriptPubKey.IsPayToScriptHash()) {-                    const CScriptID& hash = CScriptID(boost::get<ScriptHash>(address));+                    const CScriptID& hash = CScriptID(std::get<ScriptHash>(address));

resolved, now that a52ecc9 is merged

MarcoFalke

comment created time in an hour

pull request commentbitcoin-core/secp256k1

add `secp256k1_ec_pubkey_cmp` method

sigh, ok, I guess we cannot support comparisons in this library

I'm not sure that sortedmulti stops us from exporting a comparison function that is compatible with compressed keys. This can be helpful for new applications which won't use the uncompressed serialization anyway, e.g., sorting keys in multisig. Moreover, orderings are in general helpful for some data structures, e.g., if you want to binary searches in a large set of keys.

A sad thing is that this ordering won't be compatible with the lexicographical ordering on x-only keys...

apoelstra

comment created time in an hour

pull request commentbitcoin/bitcoin

draft: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode)

Concept ACK, nice work!

practicalswift

comment created time in an hour

PR opened bitcoin/bitcoin

draft: Add syscall sandboxing using seccomp-bpf (Linux secure computing mode)

Add experimental syscall sandboxing using seccomp-bpf (Linux secure computing mode).

Enable filtering of system calls using seccomp-bpf: allow only explicitly allowlisted (expected) syscalls to be called.

The syscall sandboxing implemented in this PR is an experimental feature currently available only under Linux x86-64. It is disabled by default.

The feature is enabled via the configure-flag --enable-syscall-sandbox.

In this implementation the allowed syscalls are defined on a per thread basis.

This feature has two modes of operation:

  • Debug mode (default): If a non-allowlisted syscall is called a debug handler will be invoked. Debug info will be printed (ERROR: The syscall "execve" (syscall number 59) is not allowed by the syscall sandbox in thread "msghand". Please report. Exiting.) and std::terminate is called.
  • Kill mode: If a non-allowlisted syscall is called the kernel will immediately kill the offending thread. This is an experimental mode and is currently enabled via setting the environment variable EXPERIMENTAL_SYSCALL_SANDBOX_MODE_KILL_THREAD.

I've used this feature for roughly six months now (in the debug mode) and I find it to be a helpful testing/debugging addition which makes it much easier to do reason about the actual capabilities required of each thread in Bitcoin Core.

About seccomp and seccomp-bpf:

In computer security, seccomp (short for secure computing mode) is a facility in the Linux kernel. seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit(), sigreturn(), and read() and write() to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system's resources but isolates the process from them entirely.

[…]

seccomp-bpf is an extension to seccomp that allows filtering of system calls using a configurable policy implemented using Berkeley Packet Filter rules. It is used by OpenSSH and vsftpd as well as the Google Chrome/Chromium web browsers on Chrome OS and Linux. (In this regard seccomp-bpf achieves similar functionality, but with more flexibility and higher performance, to the older systrace—which seems to be no longer supported for Linux.)

+683 -7

0 comment

30 changed files

pr created time in an hour

Pull request review commentbitcoin-core/secp256k1

make test count iteration configurable by environment variable

 int main(int argc, char **argv) {     /* find iteration count */     if (argc > 1) {         count = strtol(argv[1], NULL, 0);+    } else {+        const char* env = getenv("SECP256K1_TEST_ITERS");+        if (env) {+            count = strtol(env, NULL, 0);+        }+    }+    if (count == 0) {

Maybe just

    if (count <= 0) {
apoelstra

comment created time in an hour

issue commentbitcoin/bitcoin

build error with secp256k1 on OSX

Fixed in #20469.

Yihen

comment created time in an hour

pull request commentbitcoin/bitcoin

refactor: Treat CDataStream bytes as uint8_t

Concept ACK

MarcoFalke

comment created time in an hour

pull request commentbitcoin/bitcoin

Erlay: bandwidth-efficient transaction relay protocol

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and needs rebase.

<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

naumenkogs

comment created time in 2 hours

pull request commentbitcoin/bitcoin

util: use stronger-guarantee rename method

@luke-jr that's right, but #20460 is just an issue/idea, without a patch (yet)...

vasild

comment created time in 2 hours

pull request commentbitcoin/bitcoin

test: Implicitly sync after generate* to preempt races and intermittent test failures

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and needs rebase.

<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

MarcoFalke

comment created time in 2 hours

pull request commentbitcoin/bitcoin

build: use C++17 in depends

I suppose for that version we can also just use c++17 in not need the 1z temporary name.

Yep, we will be able to. 5.15.x understands -c++std c++17.

fanquake

comment created time in 2 hours

pull request commentbitcoin/bitcoin

refactor: Treat CDataStream bytes as uint8_t

There are some more unnecessary MakeUCharSpan that can be removed here, especially related to Base64 handling:

src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
src/rpc/rawtransaction.cpp:    return EncodeBase64(MakeUCharSpan(ssTx));
MarcoFalke

comment created time in 2 hours

pull request commentbitcoin/bitcoin

refactor: Treat CDataStream bytes as uint8_t

Concept ACK!

MarcoFalke

comment created time in 2 hours

pull request commentbitcoin/bitcoin

build: use C++17 in depends

It doesn't look like it. #19716 (Qt 5.15.2) still behaves in the same way when built in c++1z mode.

OK, good to know. That should be in for 0.22 anyway. I suppose for that version we can also just use c++17 in not need the 1z temporary name.

Code review ACK https://github.com/bitcoin/bitcoin/pull/20471/commits/2f5dfe4a7ff12b6b57427374142cdf7e266b73bc

fanquake

comment created time in 2 hours

PR merged bitcoin/bitcoin

build: Avoid secp256k1.h include from system Build system Needs backport (0.21)

While building i ran into an error because i had a version of secp256k1.h under /usr/local/include that was incompatible with the secp256k1 code in the repository. This caused a problem because $(BOOST_CPPFLAGS) contained -I/usr/local/include and the include paths are searched by the compiler in order from left to right, so in the end $(BITCOIN_INCLUDES) contained -I/usr/local/include before -I$(srcdir)/secp256k1/include which caused the compiler to find secp256k1.h under /usr/local/include.

Looking at git blame i am wondering how this has not happened to anyone else in several years: https://github.com/bitcoin/bitcoin/blame/cb89e18845852c005ba8ab94acc6544d7c876a42/src/Makefile.am#L25

I am on macOS 10.15.

+1 -2

3 comments

1 changed file

dergoegge

pr closed time in 2 hours

push eventbitcoin/bitcoin

Niklas Gögge

commit sha e95aaefe2540cb76969818fcc2ff77d33448ed5a

build: Avoid secp256k1.h include from system

view details

Wladimir J. van der Laan

commit sha 1e9e4b68f3cbd1af3de5806aeff952e9bf0ab8fc

Merge #20469: build: Avoid secp256k1.h include from system e95aaefe2540cb76969818fcc2ff77d33448ed5a build: Avoid secp256k1.h include from system (Niklas Gögge) Pull request description: While building i ran into an error because i had a version of `secp256k1.h` under `/usr/local/include` that was incompatible with the secp256k1 code in the repository. This caused a problem because `$(BOOST_CPPFLAGS)` contained `-I/usr/local/include` and the include paths are searched by the compiler in order from left to right, so in the end `$(BITCOIN_INCLUDES)` contained `-I/usr/local/include` before `-I$(srcdir)/secp256k1/include` which caused the compiler to find `secp256k1.h` under `/usr/local/include`. Looking at git blame i am wondering how this has not happened to anyone else in several years: https://github.com/bitcoin/bitcoin/blame/cb89e18845852c005ba8ab94acc6544d7c876a42/src/Makefile.am#L25 I am on macOS 10.15. ACKs for top commit: laanwj: Code review ACK e95aaefe2540cb76969818fcc2ff77d33448ed5a hebasto: ACK e95aaefe2540cb76969818fcc2ff77d33448ed5a, tested on macOS 11 Big Sur by adding `#error` into `/usr/local/include/secp256k1.h`. Tree-SHA512: 1f0b395725936c179ab60dee3582ec7b21e2f9c0f1895e160d84a487cf0db16d0c7aa47d05800e0aded31685b4362056cac9b9ecca1bb8c308a4c5a810e8dc1d

view details

push time in 2 hours

issue commentbitcoin/bitcoin

Add unit tests for eviction logic

This issue is addressed in #20477 ("test/net: Add unit testing of node eviction logic").

practicalswift

comment created time in 2 hours

pull request commentbitcoin/bitcoin

util: Avoid invalid integer negation in FormatMoney and ValueFromAmount

@luke-jr Do you mean in FormatMoney? Leaving the sign in quotient would change the output compared to how it works today, no? This PR is meant as a pure refactoring (aside from the avoidance of the invalid integer negation): I don't want to introduce any change to the output format in this PR.

practicalswift

comment created time in 2 hours

pull request commentbitcoin/bitcoin

build: Replace genisoimage with xorriso

Concept ACK.

dongcarl

comment created time in 2 hours

created tagbitcoin/bitcoin

tagv0.21.0rc2

Bitcoin Core integration/staging tree

created time in 2 hours

push eventbitcoin/bitcoin

Wladimir J. van der Laan

commit sha ba19f9b4903b42325f5f66e486a52a14893460e2

build: Bump RC to rc2 Tree-SHA512: 122ccac91708dda65a30aab6313c770008ccc0571402d92bc24fbefed578002626899c1754676118f5a456a63dbea84d1fe2fef46af57b77837f438c6e637b26

view details

Wladimir J. van der Laan

commit sha 7264bcd20f700ecc88734cb77f2d18f849dcd856

qt: Pre-rc2 translations update Tree-SHA512: 465a7b586f3eff476bd9648ff70e37e11f51e67f048dc1265ffcc1132c4e063515495ec6cbdf6ebb4abd5f5b08615595ce12273ce9abebc8ffef9c7b8375ac20

view details

push time in 2 hours

more