Vasil Dimov

Results 51 issues of Vasil Dimov

Introduce a generic container that provides a thread-safe access to any object by using a mutex which is acquired every time the object accessed. For example: ```cpp Synced m{{3, 9},...

RPC/REST/ZMQ
P2P
Needs Conceptual Review

`CWallet::GetEncryptionKey()` would return a reference to the internal `CWallet::vMasterKey`, guarded by `CWallet::cs_wallet`, which is unsafe. Returning a copy would be a shorter solution, but could have security implications of the...

Wallet

Add unit tests that write data to a mocked socket and inspect what CConnman/PeerManager have written back to the socket, or check the internal state to verify that the behavior...

Tests

Extend `CConnman` fuzz tests to also exercise the methods `OpenNetworkConnection()`, `CreateNodeFromAcceptedSocket()`, `InitBinds()` and `SocketHandler()`. Previously fuzzing those methods would have resulted in real socket functions being called in the operating...

Tests

Sub-netting does not exist in Tor/I2P/CJDNS. Obtaining such addresses is easier compared to obtaining IP addresses. Also, obtaining Tor/I2P/CJDNS addresses that do not have a common prefix is not harder...

P2P
CI failed

Run the unit tests with `DEBUG_LOG_OUT` in the case of `RUN_UNIT_TESTS_SEQUENTIAL`. Because the output would be too big (about 80MB), redirect it to a file and only show relevant bits...

Tests

Make it possible to disable the Tor binding on `127.0.0.1:8334` and stop startup if any P2P bind fails instead of "if all P2P binds fail". Fixes https://github.com/bitcoin/bitcoin/issues/22726 Fixes https://github.com/bitcoin/bitcoin/issues/22727

P2P

`fclose(3)` may fail to flush the previously written data to disk, thus a failing `fclose(3)` is as serious as a failing `fwrite(3)`. Previously the code ignored `fclose(3)` failures. This PR...

Utils/log/libs

Introduce a new RPC, `getnetmsgstats` to retrieve traffic bytes and count of messages possibly broken down by: * direction (sent or received) * network (ipv4, tor, etc) * connection type...

RPC/REST/ZMQ
Needs rebase

Turn the `std::vector` to `std::array` because it is cheaper and allows us to have the number of the messages as a compile time constant: `ALL_NET_MESSAGE_TYPES.size()` which can be used in...

P2P