Commit Graph

10868 Commits

Author SHA1 Message Date
mrbandrews
2f077dc049 Tests: Rework blockstore to avoid re-serialization. 2018-10-24 21:44:26 +03:00
Jonas Schnelli
c8ab3c44ef Log/report in 10% steps during VerifyDB 2018-10-24 21:39:41 +03:00
Kaz Wesley
ed20890e82 drop vAddrToSend after sending big addr message
We send a newly-accepted peer a 1000-entry addr message, and then only use
vAddrToSend for small messages. Deallocate vAddrToSend after it's been used for
the big message to save about 40 kB per connected inbound peer.
2018-10-24 21:39:30 +03:00
Kaz Wesley
1ed6d18a3c IsInitialBlockDownload: usually avoid locking
Optimistically test the latch bool before taking the lock.
For all IsInitialBlockDownload calls after the first to return false,
this avoids the need to lock cs_main.
2018-10-24 21:38:43 +03:00
instagibbs
099dbe4bb9 comment nit: miners don't vote 2018-10-24 21:37:28 +03:00
mrbandrews
ee5df5c99f Catch exceptions from non-canonical encoding and print only to log 2018-10-24 21:37:03 +03:00
Pavel Janík
a5a7b5ce44 Remove useless argument to AlertNotify. 2018-10-24 21:35:20 +03:00
Kaz Wesley
cf16a6e0d1 lock cs_main for chainActive 2018-10-24 21:31:26 +03:00
Kaz Wesley
7d7c806637 lock cs_main for State/Misbehaving
ProcessMessage calls State(...) and Misbehaving(...) without holding the
required lock; add LOCK(cs_main) blocks.
2018-10-24 21:27:36 +03:00
Alex Morcos
ee9e86ad0c Avoid unnecessary database access for unknown transactions 2018-10-24 21:22:44 +03:00
lateminer
e8fe530012 Update ZeroMQ to 4.2.5 2018-10-24 21:09:21 +03:00
lateminer
039f574d86 Add missing nBytesPerSigOp declaration
policy/policy.cpp
2018-10-23 23:44:05 +03:00
lateminer
7e41e6974f Remove redundant chainparams declaration
main.cpp
2018-10-23 23:30:04 +03:00
Pieter Wuille
1b70520ceb Align constant names for maximum compact block / blocktxn depth 2018-10-23 23:24:58 +03:00
lateminer
1534febd08 Move DEFAULT_BYTES_PER_SIGOP to policy/policy.h 2018-10-23 23:11:23 +03:00
lateminer
9b55796d56 Reduce default number of blocks to check at startup
https://github.com/bitcoin/bitcoin/pull/8611
2018-10-23 23:01:33 +03:00
Gregory Maxwell
8a98c894d4 Increase maximum orphan size to 100,000 bytes.
Although this increases node memory usage in the worst case by perhaps
 30MB, the current behavior causes severe issues with dependent tx relay.
2018-10-23 22:53:13 +03:00
Gregory Maxwell
e0505fced9 Treat orphans as implicit inv for parents, discard when parents rejected.
An orphan whos parents were rejected is never going to connect, so there
 is little utility in keeping it.

Orphans also helpfully tell us what we're missing, so go ahead and treat
 it as INVed.
2018-10-23 22:53:04 +03:00
Gregory Maxwell
654a62c131 Adds an expiration time for orphan tx.
This prevents higher order orphans and other junk from
 holding positions in the orphan map.  Parents delayed
 twenty minutes are more are unlikely to ever arrive.

The freed space will improve the orphan matching success rate for
 other transactions.
2018-10-23 22:52:51 +03:00
Pieter Wuille
10ae5af2c5 Track orphan by prev COutPoint rather than prev hash 2018-10-23 22:39:39 +03:00
instagibbs
61b8aea708 Rename ReconsiderBlock func to reflect real behavior 2018-10-23 22:24:41 +03:00
instagibbs
46038d59ea Remove state arg from ReconsiderBlock 2018-10-23 22:24:01 +03:00
Jorge Timón
4a2d793f2a Globals: Explicitly pass const CChainParams& to UpdateTip() 2018-10-23 22:22:50 +03:00
face
7e7f211dea Pass CChainParams to DisconnectTip() 2018-10-23 22:22:19 +03:00
Patrick Strateman
c934f568b7 Always disconnect old nodes which request filtered connections. 2018-10-23 22:17:56 +03:00
Luke Dashjr
7828e48b69 Remove -enforcenodebloom 2018-10-23 22:15:45 +03:00
lateminer
afa46b1aef Use nAbsurdFee instead of maxTxFee in AcceptToMemoryPoolWorker()
main.cpp
2018-10-23 22:09:14 +03:00
MarcoFalke
159b4c71e3 [doxygen] Actually display comment 2018-10-23 22:05:23 +03:00
lateminer
af95ba010d Improve block validity/ConnectBlock() comments
https://github.com/bitcoin/bitcoin/pull/7444
2018-10-23 22:03:49 +03:00
lateminer
d7b72d14d8 Do not throw an error for proof-of-stake blocks in CreateNewBlock()
miner.cpp
2018-10-23 21:28:04 +03:00
lateminer
f085b9e0d7 Update .gitignore 2018-10-23 19:59:14 +03:00
lateminer
e7fe6aa451 Add ZeroMQ patches 2018-10-23 19:58:57 +03:00
Suhas Daftuar
a4361e1863 Add warning if -blockminsize is used. 2018-10-23 01:25:24 +03:00
Gregory Maxwell
87e790f776 Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. 2018-10-23 01:23:56 +03:00
MarcoFalke
1dc2c96818 [travis] Run contrib/devtools/check-doc.py early 2018-10-23 01:22:51 +03:00
MarcoFalke
32e5de8277 [travis] Fail when documentation is outdated 2018-10-23 01:20:12 +03:00
Suhas Daftuar
671c4b68cc Remove -blockminsize option 2018-10-23 01:18:38 +03:00
lateminer
74cf4b83e5 Refactor CreateNewBlock to be a method of the BlockAssembler class 2018-10-23 01:15:28 +03:00
lateminer
635495ba38 Use CNetAddr() instead of "0.0.0.0"
net.cpp
2018-10-22 22:47:28 +03:00
lateminer
79085ea232 Add missing fMayBanPeerIfInvalid parameter in ProcessNewBlock() call
main.cpp
2018-10-22 22:37:05 +03:00
Alex Morcos
16047baaf6 Populate services in GetLocalAddress 2018-10-22 22:12:31 +03:00
Jonas Schnelli
c4881c72b5 Remove maxuploadtargets recommended minimum 2018-10-22 22:09:35 +03:00
lateminer
b1dc200c9d net: No longer send local address in addrMe 2018-10-22 22:07:57 +03:00
Matt Corallo
53e9126940 Revert "Use async name resolving to improve net thread responsiveness"
This reverts commit caf6150e97.

getaddrinfo_a has a nasty tendency to segfault internally in its
background thread, on every version of glibc I tested, especially
under helgrind.

See https://sourceware.org/bugzilla/show_bug.cgi?id=20874

Github-Pull: #9229
Rebased-From: 10ae7a7b2316f8052ec58ef237ce6dd987300900
2018-10-22 21:30:10 +03:00
Jorge Timón
37ec55836a Consensus: Decouple pow.cpp from util.h 2018-10-22 00:59:11 +03:00
Kaz Wesley
2a758e6810 test prevector::swap
- add a swap operation to prevector tests (fails due to broken prevector::swap)
- fix 2 prevector test operation conditions that were impossible
2018-10-22 00:55:39 +03:00
Kaz Wesley
0e23170ec0 prevector::swap: fix (unreached) data corruption
swap was using an incorrect condition to determine when to apply an optimization
(not swapping the full direct[] when swapping two indirect prevectors).

Rather than correct the optimization I'm removing it for simplicity. Removing
this optimization minutely improves performance in the typical (currently only)
usage of member swap(), which is swapping with a freshly value-initialized
object.
2018-10-22 00:55:30 +03:00
Kaz Wesley
d06798a38b prevector: destroy elements only via erase()
Fixes a bug in which pop_back did not call the deleted item's destructor.

Using the most general erase() implementation to implement all the others
prevents similar bugs because the coupling between deallocation and destructor
invocation only needs to be maintained in one place.
Also reduces duplication of complex memmove logic.
2018-10-22 00:55:22 +03:00
MarcoFalke
c1665d245e Add missing copyright headers 2018-10-22 00:54:59 +03:00
Wladimir J. van der Laan
9a9a172210 test: Fix use-after-free in scheduler tests
Make a copy of the boost time-point to wait for, otherwise the head of
the queue may be deleted by another thread while this one is waiting,
while the boost function still has a reference to it.

Although this problem is in non-test code, this is not an actual problem
outside of the tests because we use the thread scheduler with only one
service thread, so there will never be threads fighting at the head of
the queue.

The old boost fallback escapes this problem because it passes a scalar
value to wait_until instead of a const object reference.

Found by running the tests in LLVM-4.0-master asan.

Github-Pull: #9186
Rebased-From: 12519bf62b8c49b1c1744eca6ea5b3162a61f962
2018-10-22 00:50:16 +03:00