Page MenuHomePhabricator
Feed Advanced Search

Dec 31 2019

markblundeberg created D4811: finish backporting PR9602 - test_bitcoin clean up unused param.
Dec 31 2019, 02:54
markblundeberg created D4810: finish backporting PR9602 - remove unused and untested miner code.
Dec 31 2019, 02:48
markblundeberg created D4809: finish backporting PR9602 - remove unused functional test framework code.
Dec 31 2019, 02:45
markblundeberg created D4808: finish backporting PR9602 - remove unused modified-size computations.
Dec 31 2019, 02:40

Dec 30 2019

markblundeberg added a comment to D4758: Call InvalidateBlock without cs_main held.

I think I don't get your point.
I am trying to make the same changes that the PR makes, but creating a Diff for each commit.
The final code (the code of the last Diff) should be the equal (or very similar) to PR code.

Dec 30 2019, 02:11

Dec 23 2019

markblundeberg added a comment to D4801: [CMAKE] Make check-upgrade-activated run the extended functional tests.

Oh great, I was going to ask about this.

Dec 23 2019, 23:47
markblundeberg updated the diff for D4678: add nSigChecks counting to EvalScript.

rebase for D4766 landing; split out the scripterror helper into separate diff; address comments

Dec 23 2019, 02:21
markblundeberg created D4798: [tests] allow BOOST_CHECK_EQUAL for ScriptErrors.
Dec 23 2019, 02:19

Dec 22 2019

markblundeberg added a comment to D4280: Minor cleanups for AcceptToMemoryPool.

OK just did a new one, D4796

Dec 22 2019, 03:50
markblundeberg updated the diff for D4796: Backport PR11309: Minor cleanups for AcceptToMemoryPool.

args defaultness, also missed one place

Dec 22 2019, 03:46
markblundeberg planned changes to D4796: Backport PR11309: Minor cleanups for AcceptToMemoryPool.
Dec 22 2019, 03:30
markblundeberg created D4796: Backport PR11309: Minor cleanups for AcceptToMemoryPool.
Dec 22 2019, 03:28

Dec 21 2019

markblundeberg accepted D4794: Remove GetPriority from CCoinsViewCache.
Dec 21 2019, 04:57

Dec 20 2019

markblundeberg accepted D4757: Call RewindBlockIndex without cs_main held.

Good, though please change the description to point to the github.com/bitcoin repo, not to jasonbcox repo.

Dec 20 2019, 23:53
markblundeberg accepted D4790: Remove priority from CTxMemPoolEntry.
Dec 20 2019, 23:17
markblundeberg accepted D4787: Do not log priority when using -printpriority.
Dec 20 2019, 22:33
markblundeberg accepted D4786: Remove TxCoinAgePriorityCompare.
Dec 20 2019, 22:33
markblundeberg accepted D4789: kill CTxMemPoolEntry::GetPriority.
Dec 20 2019, 22:32
markblundeberg accepted D4785: CompareIteratorByHash => CompareIteratorById.
Dec 20 2019, 22:29
markblundeberg added a comment to D4787: Do not log priority when using -printpriority.

Apparently core still calls this option -printpriority even after PR9602, how odd...

Dec 20 2019, 22:24
markblundeberg accepted D4788: Remove deprecated startingpriority and currentpriority from RPC.

oh sweet, I didn't realize these were already deprecated and I was wondering if we could remove them suddenly.

Dec 20 2019, 22:20
markblundeberg added a comment to D4758: Call InvalidateBlock without cs_main held.

Something seems a bit off here -- note that ABC has renamed the 'inner' InvalidateBlock to UnwindBlock in D1952 (not sure why). I think you might be putting the lock in the wrong place, and it should rather go on UnwindBlock.

I didn't want to change the semantics of UnwindBlock because this function is used by ParkBlock.
In any case, I will create another Diff to change ParkBlock.

Dec 20 2019, 22:02
markblundeberg added a comment to D4778: Remove blockprioritypercentage config parameter..

Ah I was going to do this but thanks :-) . I think there are still some priority leftovers after D4745 and this, but not much.

Dec 20 2019, 02:25

Dec 19 2019

markblundeberg updated subscribers of D4759: [backport] net: Allow connections from misbehavior banned peers.

Just FYI, @Fabien and I talked a bit about this -- initially we both wondered whether we really want this (what's the point of banning, if they can just come back), but we both eventually figured it's probably good to do. As Greg says, fresh IP addrs are by no means in short supply...

Dec 19 2019, 23:15
markblundeberg created D4766: refactor null-signature checks in OP_CHECKSIG, OP_CHECKDATASIG.
Dec 19 2019, 11:49
markblundeberg added inline comments to D4678: add nSigChecks counting to EvalScript.
Dec 19 2019, 06:41

Dec 18 2019

markblundeberg requested changes to D4758: Call InvalidateBlock without cs_main held.
Dec 18 2019, 23:23
markblundeberg added a comment to D4758: Call InvalidateBlock without cs_main held.

Something seems a bit off here -- note that ABC has renamed the 'inner' InvalidateBlock to UnwindBlock in D1952 (not sure why). I think you might be putting the lock in the wrong place, and it should rather go on UnwindBlock.

Dec 18 2019, 23:23
markblundeberg added a comment to D4757: Call RewindBlockIndex without cs_main held.

Heh, unfortunate title for this diff now that RewindBlockIndex is gone :-D

Dec 18 2019, 22:20
markblundeberg added a comment to D4728: stop rewinding post-segwit blocks on startup.

It seems that removal of the RewindBlockIndex declaration is missing (src/validation.h).

Dec 18 2019, 15:56
markblundeberg updated the diff for D4728: stop rewinding post-segwit blocks on startup.

missed removing from header

Dec 18 2019, 15:56
markblundeberg added inline comments to D4755: [LINTER] Enable new autopep8 rules.
Dec 18 2019, 15:50
markblundeberg planned changes to D4617: add a flag that restricts sigChecks per-input.
Dec 18 2019, 11:03
markblundeberg added a comment to D4617: add a flag that restricts sigChecks per-input.

There is still more to do on this, but just updating for now.

Dec 18 2019, 11:01
markblundeberg updated the diff for D4617: add a flag that restricts sigChecks per-input.

redo for building on D4678

Dec 18 2019, 10:49
markblundeberg added a comment to D4754: [LINTER] Remove empty lines at the beginning of a block.

Thank you Captain Linter!

Dec 18 2019, 10:10
markblundeberg accepted D4680: Fix -Wcast-align in crypto_hash.cpp.
Dec 18 2019, 08:37
markblundeberg accepted D4753: Static assert with no message is a C++17 feature and warns on C++14.
Dec 18 2019, 08:32
markblundeberg added a comment to D4743: Add a generic flag to activate the next upgrade.

It's worth pointing out there is a slight behavioural difference, in that using activatenextupgrade will activate for all blocks after genesis, whereas the MTP activation would only trigger sometimes:

  • on the third block (second block after genesis) if only genesis block is old
  • activate never if all blocks are old (some tests use old blocks, such as the cached chain which is all old blocks that are relatively empty)

I think that's fine... and maybe even better, since some of our functional tests fail to leave IBD on the ancient chain.

Actually I should mention there is a side effect of this that can happen:

Suppose new flag B requires old flag A that has already activated -- in VerifyScript it might have if (flags & B) assert(flags & A); like we see with CLEANSTACK and P2SH. If you do this -activatenextupgrade then it moves the activation of B back to genesis, before flag A activated. Then the assert will fail.

This Diff passes fine since BIP16Height=0 and magneticAnomalyHeight=0 on regtest, i.e., p2sh always on since genesis (which doesn't really count) and cleanstack turns on at height=1. Well before any script could be executed.

I am not aware of any planned future flags that would incur this problem -- at most you might have restrict flags that require P2SH in order to be strict soft forks (like cleanstack), but I cant imagine any other dependencies.

Dec 18 2019, 02:23
markblundeberg updated the diff for D4678: add nSigChecks counting to EvalScript.

rebase & update per comments

Dec 18 2019, 01:58
markblundeberg abandoned D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

obsoleted by D4745

Dec 18 2019, 01:22
markblundeberg added a comment to D4745: remove priority free transactions mechanism (currently off by default).

Future note: if it is desired to revert this, see the fixes in D4730 and consider some of my comments there, regarding subjectivity of free transactions. Also, try to preserve the behaviour of seen here of putting back *all* free transactions into mempool after a reorg.

Dec 18 2019, 01:22
markblundeberg updated the diff for D4745: remove priority free transactions mechanism (currently off by default).

(oops, missed removing a comment that is no longer valid)

Dec 18 2019, 01:04
markblundeberg added a comment to D4280: Minor cleanups for AcceptToMemoryPool.

I am going to be reviving this soon, it makes more sense after having D4745.

Dec 18 2019, 00:42
markblundeberg added a revision to T704: sigChecks implementation: D4677: checkmultisig: refactor nullfail check.
Dec 18 2019, 00:40
markblundeberg added a task to D4677: checkmultisig: refactor nullfail check: T704: sigChecks implementation.
Dec 18 2019, 00:40
markblundeberg updated the diff for D4745: remove priority free transactions mechanism (currently off by default).

(rebase for landed parent)

Dec 18 2019, 00:40
markblundeberg added inline comments to D4678: add nSigChecks counting to EvalScript.
Dec 18 2019, 00:37
markblundeberg updated the diff for D4744: fix some tests that rely on free transactions being submittable via RPC.

(rebased for landing D4746 which also touched abc-transaction-ordering)

Dec 18 2019, 00:07

Dec 17 2019

markblundeberg added a revision to T653: Clean up past upgrades: D4746: clean up some tests that needlessly use -replayprotectionactivationtime.
Dec 17 2019, 23:57
markblundeberg added a task to D4746: clean up some tests that needlessly use -replayprotectionactivationtime: T653: Clean up past upgrades.
Dec 17 2019, 23:57
markblundeberg added a comment to D4680: Fix -Wcast-align in crypto_hash.cpp.

Memcpy to overlapping memory is also UB right?

Dec 17 2019, 21:58
markblundeberg added inline comments to D4642: Cleanup graviton activation.
Dec 17 2019, 20:41
markblundeberg accepted D4747: Rename activation tests which are now feature tests.
Dec 17 2019, 13:07
markblundeberg accepted D4642: Cleanup graviton activation.
Dec 17 2019, 13:07
markblundeberg requested changes to D4642: Cleanup graviton activation.

Please rename the file that is confusing phab, just for easier review for now. Everything other than that one looks good.

Dec 17 2019, 11:24
markblundeberg added a comment to D4743: Add a generic flag to activate the next upgrade.

It's worth pointing out there is a slight behavioural difference, in that using activatenextupgrade will activate for all blocks after genesis, whereas the MTP activation would only trigger sometimes:

  • on the third block (second block after genesis) if only genesis block is old
  • activate never if all blocks are old (some tests use old blocks, such as the cached chain which is all old blocks that are relatively empty)

I think that's fine... and maybe even better, since some of our functional tests fail to leave IBD on the ancient chain.

Dec 17 2019, 11:09
markblundeberg accepted D4742: Add phonon activation logic.
Dec 17 2019, 11:02
markblundeberg added a comment to D4731: We assume uint8_t is an alias of unsigned char..

@markblundeberg see https://reviews.bitcoinabc.org/D4680 for a case that uses this assumption (not entirely true since there is a memcpy). I found some other places as well by grepping for (uint8_t *) to find the suspicious casts.

With your rational it makes sense to assert CHAR_BIT==8 as well, or we might want to switch to int32_t everywhere it's needed.

Dec 17 2019, 10:56
markblundeberg accepted D4733: Merge #11866: Do not un-mark fInMempool on wallet txn if ATMP fails..
Dec 17 2019, 10:49
markblundeberg updated the diff for D4677: checkmultisig: refactor nullfail check.

rebase & tweak name

Dec 17 2019, 10:05
markblundeberg updated the test plan for D4746: clean up some tests that needlessly use -replayprotectionactivationtime.
Dec 17 2019, 09:46
markblundeberg created D4746: clean up some tests that needlessly use -replayprotectionactivationtime.
Dec 17 2019, 09:41
markblundeberg added a comment to D4743: Add a generic flag to activate the next upgrade.

It's worth pointing out there is a slight behavioural difference, in that using activatenextupgrade will activate for all blocks after genesis, whereas the MTP activation would only trigger sometimes:

Dec 17 2019, 09:08
markblundeberg added inline comments to D4642: Cleanup graviton activation.
Dec 17 2019, 08:53
markblundeberg added a comment to D4745: remove priority free transactions mechanism (currently off by default).

(as suggested in the rejected D4730)

Dec 17 2019, 07:57
markblundeberg created D4745: remove priority free transactions mechanism (currently off by default).
Dec 17 2019, 07:54
markblundeberg created D4744: fix some tests that rely on free transactions being submittable via RPC.
Dec 17 2019, 07:51
markblundeberg added a comment to D4677: checkmultisig: refactor nullfail check.

ok, i'll go with areAllSignaturesNull

Dec 17 2019, 00:12
markblundeberg planned changes to D4677: checkmultisig: refactor nullfail check.
Dec 17 2019, 00:11

Dec 16 2019

markblundeberg added a comment to D4731: We assume uint8_t is an alias of unsigned char..

(BTW another assumption I don't see documented here is that CHAR_BIT == 8. Just because sizeof(int) == 4, doesn't necessarily mean that it's 32 bits long.)

Dec 16 2019, 23:54
markblundeberg added a comment to D4731: We assume uint8_t is an alias of unsigned char..

Thanks for this! I was wondering about it. I have seen some discussions that people want compilers to not count uint8_t as an alias for char. This has the advantage of giving optimization, but, apparently it breaks ABI on existing defined architectures: https://stackoverflow.com/questions/26297571/how-to-create-an-uint8-t-array-that-does-not-undermine-strict-aliasing

Dec 16 2019, 23:49
markblundeberg added a comment to D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

IMO, we should just cleanup this whole thing. If someone wants to keep it alive, they can step up and maintain it. Let's not burden ourselves any more than required.

Dec 16 2019, 22:11

Dec 15 2019

markblundeberg added a comment to D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

By the way, this free transaction system does not seem very robust, and it's not suitable for zero conf since it's easy to disturb in malicious ways. For example you can spam someone with a bunch of lowfee high priority transactions that are nonstandard, causing their free limit to fill up (because they add to the free limit regardless of acceptance!). So our default limit of -limitfreerelay=0, which disables this mechanism altogether, is actually a good choice in terms of keeping objective uniform relay policy.

Dec 15 2019, 10:24
markblundeberg updated the diff for D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

Bump limitfree in the test from 5 to 6, and add explanation for why
these numbers are chosen. Also test that the mempool reloads fully
on restart.

Dec 15 2019, 10:15
markblundeberg added a comment to D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

OK looking at debug.log, indeed upon restarting the node, dFreeCount got incremented up to 24705 on startup (while loading the saved mempool). Then 150 more lowfee txns got inserted and the 149th bumped dFreeCount up to 49856.8... and the 150th put it just over the top.

Dec 15 2019, 10:00
markblundeberg planned changes to D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.

While re-testing locally I got a free-transaction error on line 82 of abc-high_priority_transaction... Probably because I increased the -limitfreerelay just barely enough for it to pass, so it's unreliable.

Dec 15 2019, 09:29
markblundeberg added a comment to D4729: fix fee estimation bug in functional tests.

(see D4730 which exposed this discrepancy)

Dec 15 2019, 09:11
markblundeberg created D4730: ensure RPC calls AcceptToMemoryPool using same fee policy as net.
Dec 15 2019, 08:16
markblundeberg created D4729: fix fee estimation bug in functional tests.
Dec 15 2019, 08:14

Dec 14 2019

markblundeberg accepted D4727: Merge #13656: Remove the boost/algorithm/string/predicate.hpp dependency.
Dec 14 2019, 04:07
markblundeberg added a comment to D4727: Merge #13656: Remove the boost/algorithm/string/predicate.hpp dependency.

Always a fan of the deboosting. Too bad about the code ownership but it looks right.

Dec 14 2019, 04:07
markblundeberg added a comment to D4669: Move erasure of non-active blocks to a separate loop in RewindBlockIndex.

I think we should just remove RewindBlockIndex entirely from here and from init.cpp.

Dec 14 2019, 03:56
markblundeberg created D4728: stop rewinding post-segwit blocks on startup.
Dec 14 2019, 03:55
markblundeberg added a comment to D4716: do not accept anything into mempool before UAHF has activated.

@Fabien suggested we could alternatively use IBD as the marker (though unfortunately this would again impact those tests which fail to leave IBD).

Dec 14 2019, 02:08
markblundeberg requested review of D4677: checkmultisig: refactor nullfail check.
Dec 14 2019, 01:48

Dec 13 2019

markblundeberg added a comment to D4669: Move erasure of non-active blocks to a separate loop in RewindBlockIndex.

(if you don't believe me, try putting assert(0) as the first line in the while-loop and observe that all tests pass).

Dec 13 2019, 07:20
markblundeberg added a comment to D4669: Move erasure of non-active blocks to a separate loop in RewindBlockIndex.

I don't think this loop should be removed. If you disconnect a block you absolutely want it to be back in setBlockIndexCandidates. The loop comment is of course completely wrong, since that loop does not modify flags.

Dec 13 2019, 06:53
markblundeberg added a comment to D4703: Make more script validation flags backward compatible.

One thing I really like about this test: when we add new script flags and script tests, it will hopefully warn the implementor when they are making an additive flag, and make them decide whether they want to make their flag strictly soft forking. Perhaps this requires an assert(other_flags), like the cleanstack thing.

Dec 13 2019, 05:27
markblundeberg added inline comments to D4678: add nSigChecks counting to EvalScript.
Dec 13 2019, 05:20
markblundeberg updated the diff for D4703: Make more script validation flags backward compatible.

tweak enable_flags freezing slightly; also changed my mind about removing
the stale comment, it can be removed in a later (non-backport) diff.

Dec 13 2019, 04:35
markblundeberg added inline comments to D4677: checkmultisig: refactor nullfail check.
Dec 13 2019, 04:23
markblundeberg planned changes to D4703: Make more script validation flags backward compatible.
Dec 13 2019, 04:11
markblundeberg added a comment to D4716: do not accept anything into mempool before UAHF has activated.

Add a test.

Dec 13 2019, 04:06

Dec 12 2019

markblundeberg added a comment to D4642: Cleanup graviton activation.

It would be preferable to remove the tests along side the code that they do test. Doing this as this simply reduce test coverage.

Dec 12 2019, 23:17
markblundeberg added a comment to D4642: Cleanup graviton activation.

Presumably the next step after this is to set graviton activation to height=0 in regtest? It could be combined with this diff, since setting height=0 necessarily will force activation to be untestable. But I think separate diffs is good.

Dec 12 2019, 23:12
markblundeberg added a comment to D4716: do not accept anything into mempool before UAHF has activated.

Yeah to be clear, I'm not 100% sure that this is something we want or that this is the right way to do it, and I'm curious what you guys think.

Dec 12 2019, 23:04
markblundeberg added a comment to D4716: do not accept anything into mempool before UAHF has activated.

This is the future backport that will make all tests start out of IBD: https://github.com/bitcoin/bitcoin/pull/15419

Dec 12 2019, 22:01
markblundeberg added a comment to D4673: add SCHNORR_MULTISIG to mandatory flags.

Oh actually you know what? FORKID flag is the same -- if you are doing IBD and are pre BCH activation and someone unsolicitedly sends you a BCH sighash transaction, it will create that "BUG! PLEASE REPORT THIS" log.

So if this is fine behaviour for FORKID, then it's fine for multisig flag too.

Dec 12 2019, 21:57
markblundeberg added a comment to D4716: do not accept anything into mempool before UAHF has activated.

Inspired by discussion on D4673.

Dec 12 2019, 21:56