profile
viewpoint

opdenkamp/xbmc-pvr-addons 129

Old XBMC PVR add-ons for Kodi up till Helix. Anything newer than Helix is built from the new location: https://github.com/kodi-pvr

Memphiz/xbmc 53

XBMC Main Repository

jmarshallnz/xbmc 8

XBMC Main Repository

theuni/libdmg-hfsplus 4

Portable libraries and utilities that manipulate HFS+ volumes and Apple's DMG images

theuni/bitcoin 3

Bitcoin integration/staging tree

theuni/Addon-Frontend 2

XBMC Addon Frontend

huceke/texture-atlas 1

Texture Atlas Generator

pull request commentbitcoin/bitcoin

lint, refactor: Update cppcheck linter to c++17 and improve explicit usage

@fjahr Looks like the fuzzing harnesses needs some massage to compile properly after your fix :)

Thanks, forgot to do that before pushing. Should be ok now.

fjahr

comment created time in 4 hours

pull request commentbitcoin/bitcoin

refactor: replace manual Satoshis-to-BTC conversions with FormatMoney()

Not sure about this. I've been working in #20391 to move the use of COIN (or 1e8) and 1000 from CFeeRate callers all into policy/feerate. This partially does the opposite without removing the other ones, seems less clear next to the btc/kvb line, and brings a dependency.

theStack

comment created time in 4 hours

PR opened bitcoin/bitcoin

refactor: replace manual Satoshis-to-BTC conversions with FormatMoney()

This tiny PR replaces all remaining occurences of manual conversion of Satoshi amounts (CAmount) to a currency unit string via division and modulo operation on COIN (100000000) by the utility function FormatMoney(...). The instances were found with the command

git grep "\%[ ]*COIN"

Only ToString()-functions are affected, but still I'd argue that the constants COIN should only be used:

  • for money constants (like in benchmark/tests, chainparams, GetBlockSubsidy(...) etc.) and
  • for utility functions that need it (like {Parse,Format}Money, ValueFromAmount etc.)

Note that strictly speaking, this is not a pure refactor, as the function FormatMoney(...) drops excess zero after two decimal places.

+4 -2

0 comment

2 changed files

pr created time in 5 hours

pull request commentbitcoin/bitcoin

[tests] Allow outbound & block-relay-only connections in functional tests.

forgot to update- CI is green. this PR is ready for review!

amitiuttarwar

comment created time in 5 hours

pull request commentbitcoin/bitcoin

wallet: introduce setfeerate (an improved settxfee, in sat/vB)

Thanks for the review @MarcoFalke. Dropped the policy/feerate refactoring commit and the FeeModeToBytes commit, changed the new CFeeRate delegating constructor to named constructors, dropped SatsToString in favor of making the existing ToString more flexible, and made ValueFromFeeRate able to work with both sat/b and btc/kb.

jonatack

comment created time in 6 hours

Pull request review commentbitcoin/bitcoin

wallet: introduce setfeerate (an improved settxfee, in sat/vB)

 int ParseSighashString(const UniValue& sighash);  // core_write.cpp UniValue ValueFromAmount(const CAmount& amount);+UniValue ValueFromFeeRate(const CFeeRate& fee_rate);

Updated to allow passing in the fee mode to work with both sat/vB and BTC/kvB

jonatack

comment created time in 6 hours

Pull request review commentbitcoin/bitcoin

wallet: introduce setfeerate (an improved settxfee, in sat/vB)

 BOOST_AUTO_TEST_CASE(GetFeeTest)     CFeeRate(MAX_MONEY, std::numeric_limits<size_t>::max() >> 1).GetFeePerK(); } +BOOST_AUTO_TEST_CASE(CFeeRateConstructorWithUnitsTest)+{+    // Test CFeerate(CAmount fee_rate, FeeEstimatemode mode) constructor+    // ...with BTC/kvB, returns same values as CFeeRate(CAmount fee_rate) ctor+    BOOST_CHECK(CFeeRate(CAmount(-1), FeeEstimateMode::BTC_KVB) == CFeeRate(-1));+    BOOST_CHECK(CFeeRate(CAmount(0), FeeEstimateMode::BTC_KVB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(1), FeeEstimateMode::BTC_KVB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(26), FeeEstimateMode::BTC_KVB) == CFeeRate(26));+    BOOST_CHECK(CFeeRate(CAmount(123), FeeEstimateMode::BTC_KVB) == CFeeRate(123));+    // ...with sat/vB, returns values that are 1e5 smaller+    BOOST_CHECK(CFeeRate(CAmount(-100000), FeeEstimateMode::SAT_VB) == CFeeRate(-1));+    BOOST_CHECK(CFeeRate(CAmount(-99999), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(0), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(99999), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(100000), FeeEstimateMode::SAT_VB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(100001), FeeEstimateMode::SAT_VB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(2690000), FeeEstimateMode::SAT_VB) == CFeeRate(26));+    BOOST_CHECK(CFeeRate(CAmount(123456789), FeeEstimateMode::SAT_VB) == CFeeRate(1234));+    // ...with invalid unit values returns CFeeRate(0)+    BOOST_CHECK(CFeeRate(CAmount{123}, FeeEstimateMode::UNSET) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, std::numeric_limits<size_t>::max()) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, 0) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, -1) == CFeeRate{0});

done, and a leaner implementation, thanks

jonatack

comment created time in 6 hours

Pull request review commentbitcoin/bitcoin

wallet: introduce setfeerate (an improved settxfee, in sat/vB)

 std::string CFeeRate::ToString(const FeeEstimateMode& fee_estimate_mode) const     default:                      return strprintf("%d.%08d %s/kvB", nSatoshisPerK / COIN, nSatoshisPerK % COIN, CURRENCY_UNIT);     } }++std::string CFeeRate::SatsToString() const {

no longer adding this SatsToString() function in favor of making the existing ToString() more flexible

jonatack

comment created time in 6 hours

pull request commentbitcoin/bitcoin

wallet: Error with "Transaction too large" if the funded tx will end up being too large after signing

<!--e57a25ab6845829454e8d69fc972939a-->

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

<!--174a7506f384e20aa4161008e828411d-->

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #17526 (Use Single Random Draw In addition to knapsack as coin selection fallback by achow101)
  • #17331 (Use effective values throughout coin selection by achow101)
  • #17211 (Allow fundrawtransaction and walletcreatefundedpsbt to take external inputs by achow101)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

achow101

comment created time in 6 hours

Pull request review commentbitcoin/bitcoin

wallet: introduce setfeerate (an improved settxfee, in sat/vB)

 BOOST_AUTO_TEST_CASE(GetFeeTest)     CFeeRate(MAX_MONEY, std::numeric_limits<size_t>::max() >> 1).GetFeePerK(); } +BOOST_AUTO_TEST_CASE(CFeeRateConstructorWithUnitsTest)+{+    // Test CFeerate(CAmount fee_rate, FeeEstimatemode mode) constructor+    // ...with BTC/kvB, returns same values as CFeeRate(CAmount fee_rate) ctor+    BOOST_CHECK(CFeeRate(CAmount(-1), FeeEstimateMode::BTC_KVB) == CFeeRate(-1));+    BOOST_CHECK(CFeeRate(CAmount(0), FeeEstimateMode::BTC_KVB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(1), FeeEstimateMode::BTC_KVB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(26), FeeEstimateMode::BTC_KVB) == CFeeRate(26));+    BOOST_CHECK(CFeeRate(CAmount(123), FeeEstimateMode::BTC_KVB) == CFeeRate(123));+    // ...with sat/vB, returns values that are 1e5 smaller+    BOOST_CHECK(CFeeRate(CAmount(-100000), FeeEstimateMode::SAT_VB) == CFeeRate(-1));+    BOOST_CHECK(CFeeRate(CAmount(-99999), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(0), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(99999), FeeEstimateMode::SAT_VB) == CFeeRate(0));+    BOOST_CHECK(CFeeRate(CAmount(100000), FeeEstimateMode::SAT_VB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(100001), FeeEstimateMode::SAT_VB) == CFeeRate(1));+    BOOST_CHECK(CFeeRate(CAmount(2690000), FeeEstimateMode::SAT_VB) == CFeeRate(26));+    BOOST_CHECK(CFeeRate(CAmount(123456789), FeeEstimateMode::SAT_VB) == CFeeRate(1234));+    // ...with invalid unit values returns CFeeRate(0)+    BOOST_CHECK(CFeeRate(CAmount{123}, FeeEstimateMode::UNSET) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, std::numeric_limits<size_t>::max()) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, 0) == CFeeRate{0});+    BOOST_CHECK(CFeeRate(CAmount{123}, -1) == CFeeRate{0});

Good idea, much better...switching to named constructors.

jonatack

comment created time in 7 hours

pull request commentbitcoin/bitcoin

fuzz: Avoid time-based "non-determinism" in fuzzing harnesses by using mocked GetTime()

@MarcoFalke Oh, I should have clarified that the current patch was written to avoid time-based "non-determinism" without invalidating any seed corpora. Hence the constant.

I agree that if we are okay with invalidating seeds then SetMockTime(ConsumeTime(fuzzed_data_provider)); is obviously the superior choice. (FWIW I'm okay with invalidating seeds for these harnesses.)

I think we still need a constant for the -mocktime parameter passed to BasicTestingSetup though (for InitializeFuzzingContext). Did you have any number in mind that is better than 1? :)

I'll fix SetMockTime(ConsumeTime(fuzzed_data_provider)); and -mocktime=N when we've chosen the most appropriate default :)

practicalswift

comment created time in 7 hours

pull request commentbitcoin/bitcoin

doc: Add instructions on how to fuzz the P2P layer using Honggfuzz NetDriver

@MarcoFalke

Theoretically both types of issues are certainly possible: reproducible (single input enough to trigger condition) and "non-reproducible" (in this context: single input + previous inputs needed to trigger condition).

Practically:

If this fuzzer hits any issues my guess is that such issues will be reproducible with high probability. That has been the case historically with issues uncovered by src/test/fuzz/process_message or src/test/fuzz/process_messages. They have typically not been dependent on a specific state change being cause by previously proceed input.

Does that answer your question? :)

practicalswift

comment created time in 7 hours

PR opened bitcoin/bitcoin

wallet: Error with "Transaction too large" if the funded tx will end up being too large after signing

Currently the Transaction too large is calculated on the transaction that is returned from CreateTransaction. This does not make sense for when CreateTransaction is being used for fundrawtransaction as no signing occurs so the final returned transaction is missing signatures. Thus users may successfully fund a transaction but fail to broadcast it after it has been fully signed.

So instead we should figure out whether the transaction we are funding will be too large after it is signed. We can do this by having CalculateMaximumSignedTxSize also return the transaction weight and then comparing that weight against the maximum weight.

+38 -10

0 comment

4 changed files

pr created time in 7 hours

pull request commentbitcoin/bitcoin

Well-defined CAddress disk serialization, and addrv2 anchors.dat

Addressed comments.

sipa

comment created time in 8 hours

pull request commentbitcoin/bitcoin

wallet: Refactor OutputGroups to handle fees and spending eligibility on grouping

Disclaimer: @achow101 has walked me throw the PR, I have reviewed it at least twice. I think that the concept makes sense, but I'm not familiar with the wallet code globally and my C++ is somewhat rusty.

achow101

comment created time in 8 hours

pull request commentbitcoin/bitcoin

wallet: Refactor OutputGroups to handle fees and spending eligibility on grouping

Code Review ACK https://github.com/bitcoin/bitcoin/pull/20040/commits/f6b305273910db0e46798d361413a7e878cb45f7

achow101

comment created time in 8 hours

pull request commentbitcoin/bitcoin

build: Bump clang version to fix non-determinism

<!--a722867cd34abeea1fadc8d60700f111-->

Gitian builds

File commit e2ff5e7b35d71195278d2a2ed9485f141de33d7a<br>(master) commit 72cd0fd63573270fda9c57d18a73f3247bef9aff<br>(master and this pull)
bitcoin-core-linux-22-res.yml 44e52af36236879f... e6f1f5a7fe41ba8d...
bitcoin-core-osx-22-res.yml 71d5fb0e6642d6b0...
bitcoin-core-win-22-res.yml 0148a2f5e7295184... 3340ff5a2aec0d24...
*-aarch64-linux-gnu-debug.tar.gz 383e84aaa96f342a... 52bcb378b6890421...
*-aarch64-linux-gnu.tar.gz 3558211891c0484a... 24feb6fcd5fec528...
*-arm-linux-gnueabihf-debug.tar.gz 5ebbb475a590480a... c6e292a5de13eb2f...
*-arm-linux-gnueabihf.tar.gz 60951d893e2688b6... ec001a10f7c1e4d2...
*-osx-unsigned.dmg 7cba6edda598c96c...
*-osx64.tar.gz ea2ab5c893780a2e...
*-riscv64-linux-gnu-debug.tar.gz 0c20a43923efcd5f... 8b0b1c13f71486a0...
*-riscv64-linux-gnu.tar.gz 8d3632d81c77eff1... d23728c8b8b5753c...
*-win64-debug.zip 72c35e133cf9a0db... bf49340f5c31adb2...
*-win64-setup-unsigned.exe 55c17bfff54273e5... 9c8400fef741e6c7...
*-win64.zip f7bf6737c7f741c3... 44697bcfbc2022a1...
*-x86_64-linux-gnu-debug.tar.gz abf91baef5c44686... d2fc2e60636ccf85...
*-x86_64-linux-gnu.tar.gz 75fda490174df335... 6718602375729848...
*.tar.gz 793a2c7af39452d5... 60d0cbf41cfb8fd7...
linux-build.log 9c5461a914e1f4c0... f56f80f61689e4d2...
osx-build.log 5adaf67afbaf00fc... 8f39692c1d4201d0...
win-build.log 756101ecccffabf0... a4819c903f7fe850...
bitcoin-core-linux-22-res.yml.diff 0a171834beadc049...
bitcoin-core-win-22-res.yml.diff 2a6a69da2eae3e32...
linux-build.log.diff 6f0312d91bf6dbb1...
osx-build.log.diff e23831b0cde25e8a...
win-build.log.diff eed6a25578c3fcee...
hebasto

comment created time in 8 hours

PR opened bitcoin/bitcoin

test: Fix intermittent feature_taproot issue

The nodes might disconnect (e.g. due to "Timeout downloading block" https://cirrus-ci.com/task/5313800947630080?command=ci#L1763) and the test fails to continue.

Fix that by reconnecting the nodes.

+5 -0

0 comment

1 changed file

pr created time in 10 hours

pull request commentbitcoin/bitcoin

build: Do not ignore Homebrew's SQLite on macOS

<!--4a62be1de6b64f3ed646cdc7932c8cf5--> 🕵️ @harding @fanquake have been requested to review this pull request as specified in the CODEOWNERS file.

hebasto

comment created time in 10 hours

Pull request review commentbitcoin/bitcoin

doc: rename CODEOWNERS to REVIEWERS

 # ==============================================================================-#                          Bitcoin Core CODEOWNERS+#                          Bitcoin Core REVIEWERS # ============================================================================== -# Configuration of code ownership and review approvals for the bitcoin/bitcoin-# repo.+# Configuration of automated review requests for the bitcoin/bitcoin repo+# via DrahtBot. -# Order is important; the last matching pattern takes the most precedence.-# More info on how this file works can be found at:-# https://help.github.com/articles/about-codeowners/+# Order is not important; if a modified file or directory matches a regex,

updated

adamjonas

comment created time in 10 hours

pull request commentbitcoin/bitcoin

Init script for debian/ubuntu

Yes indeed there is already a script for systemd but this script is intended to be used on RedHat operating systems and is not compatible with Debian/Ubuntu that's why I created this new one.

echo083

comment created time in 10 hours

Pull request review commentbitcoin/bitcoin

wallet: Refactor OutputGroups to handle fees and spending eligibility on grouping

 bool KnapsackSolver(const CAmount& nTargetValue, std::vector<OutputGroup>& group  void OutputGroup::Insert(const CInputCoin& output, int depth, bool from_me, size_t ancestors, size_t descendants) {     m_outputs.push_back(output);+    CInputCoin& coin = m_outputs.back();+    coin.m_fee = coin.m_input_bytes < 0 ? 0 : m_effective_feerate.GetFee(coin.m_input_bytes);

Since the intention is to not change behavior in this PR, I think I will leave this as is for now.

Additionally I don't think it is guaranteed that when we add a CInputCoin to an OutputGroup that we do know the size. It could be for a preset input or an input not in the wallet (there is a PR for that) where we add those coins to an OutputGroup and just don't use the effective value calculation. In those instances, the m_input_bytes may not be set.

achow101

comment created time in 11 hours

Pull request review commentbitcoin/bitcoin

doc: rename CODEOWNERS to REVIEWERS

 # ==============================================================================-#                          Bitcoin Core CODEOWNERS+#                          Bitcoin Core REVIEWERS # ============================================================================== -# Configuration of code ownership and review approvals for the bitcoin/bitcoin-# repo.+# Configuration of automated review requests for the bitcoin/bitcoin repo+# via DrahtBot. -# Order is important; the last matching pattern takes the most precedence.-# More info on how this file works can be found at:-# https://help.github.com/articles/about-codeowners/+# Order is not important; if a modified file or directory matches a regex,

fnmatch is not regex

adamjonas

comment created time in 11 hours

pull request commentbitcoin/bitcoin

Init script for debian/ubuntu

Last I checked, Debian/Ubuntu use systemd, for which we already have a service file...?

echo083

comment created time in 11 hours

pull request commentbitcoin/bitcoin

net: CAddress deser: use stream's version, not what's coming from disk

This looks wrong? If the disk has a non-addrv2 format, we shouldn't try to deserialise it as such...

vasild

comment created time in 11 hours

pull request commentbitcoin/bitcoin

ci, depends: Do not force Precompiled Headers (PCH) when building Qt

can you post the log of the qt build failure when using -pch?

$ make -C depends qt
...
Running configuration tests...
...
Checking for precompiled header support... 
+ cd /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/config.tests/common/pch && PKG_CONFIG_SYSROOT_DIR=/ PKG_CONFIG_LIBDIR=/home/hebasto/bitcoin/depends/x86_64-pc-linux-gnu/lib/pkgconfig /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" -early "CONFIG += cross_compile" /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/config.tests/common/pch
+ cd /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/config.tests/common/pch && MAKEFLAGS= /usr/bin/gmake
> gmake[1]: Entering directory '/home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/config.tests/common/pch'
> g++ -m64 -pipe -pipe -O2 -I/home/hebasto/bitcoin/depends/x86_64-pc-linux-gnu/include -O2 -w -fPIC  -I. -I/home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/mkspecs/linux-g++-64 -x c++-header -c header.h -o .pch/pch.gch/c++
> g++ -c -include .pch/pch -m64 -pipe -pipe -O2 -I/home/hebasto/bitcoin/depends/x86_64-pc-linux-gnu/include -O2 -w -fPIC  -I. -I/home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/mkspecs/linux-g++-64 -o source.o source.cpp
> cc1plus: error: one or more PCH files were found, but they were invalid
> cc1plus: error: use -Winvalid-pch for more information
> cc1plus: fatal error: .pch/pch: No such file or directory
> compilation terminated.
> gmake[1]: *** [Makefile:183: source.o] Error 1
> gmake[1]: Leaving directory '/home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/config.tests/common/pch'
test config.qtbase.tests.precompile_header FAILED
...
ERROR: Feature 'precompile_header' was enabled, but the pre-condition 'config.msvc || tests.precompile_header' failed.
make: *** [funcs.mk:268: /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.9.8-991caec5731/qtbase/.stamp_configured] Error 3
make: Leaving directory '/home/hebasto/bitcoin/depends'
hebasto

comment created time in 12 hours

Pull request review commentbitcoin/bitcoin

util: Avoid invalid integer negation in FormatMoney and ValueFromAmount

 std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strN int ParseSighashString(const UniValue& sighash);  // core_write.cpp-UniValue ValueFromAmount(const CAmount& amount);+UniValue ValueFromAmount(const CAmount amount);

IMO const should be used for the definition, but not declaration, when appropriate. In the definition, it instructs the compiler to error if you attempt to change it (eg, a bug). In the declaration, it has no effect at all.

practicalswift

comment created time in 12 hours

issue commentbitcoin/bitcoin

PSBT is not handling PSBT_GLOBAL_XPUB

See #16463

benma

comment created time in 12 hours

issue commentbitcoin/bitcoin

Remove wallet access to node arguments

Do I understand correctly that after this change Bitcoind will create all files with 77x permissions?

jnewbery

comment created time in 12 hours

Pull request review commentbitcoin/bitcoin

util: Avoid invalid integer negation in FormatMoney and ValueFromAmount

 std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strN int ParseSighashString(const UniValue& sighash);  // core_write.cpp-UniValue ValueFromAmount(const CAmount& amount);+UniValue ValueFromAmount(const CAmount amount);

void f(const int i) vs void f(int i) is a matter of taste :) Leaving as-is.

practicalswift

comment created time in 13 hours

more