Commit Graph

10907 Commits

Author SHA1 Message Date
lateminer
bb407424fa Remove relaying of double-spends 2018-10-25 20:37:40 +03:00
lateminer
91698d9fd4 Remove -respendnotify option 2018-10-25 20:04:44 +03:00
lateminer
9558397bb7 Add more checks for coinstake transactions 2018-10-25 19:58:07 +03:00
lateminer
ea42219781 Prettify coinstake rejecting error message in AcceptToMemoryPoolWorker()
main.cpp
2018-10-25 19:58:05 +03:00
lateminer
15e2eddfd7 Merge pull request #6 from michelvankessel/patch-1
Update for ARM QT5 Build
2018-10-25 00:08:44 +03:00
Michel van Kessel
672cd1f7e6 revert commit 2018-10-24 23:06:05 +02:00
Michel van Kessel
f17aa11972 depends: fix fontconfig with newer glibc #10851 2018-10-24 22:44:59 +02:00
Michel van Kessel
c0dee24764 update for ARMv7l build support 2018-10-24 22:40:57 +02:00
Michel van Kessel
47f5cf4a19 update for ARMv7l build support 2018-10-24 22:38:56 +02:00
Michel van Kessel
89e711dc50 Update for ARMv7l build support 2018-10-24 22:37:39 +02:00
Michel van Kessel
ea380e14b2 Update ARM QT5 build additions 2018-10-24 22:32:51 +02:00
Michel van Kessel
0ede3a466d Update for ARM QT5 Build 2018-10-24 22:19:31 +02:00
Pieter Wuille
18a2ae2b01 Benchmark SipHash 2018-10-24 23:17:02 +03:00
Wladimir J. van der Laan
3cbcdbd9a1 bench: Fix subtle counting issue when rescaling iteration count
Make sure that the count is a zero modulo the new mask before
scaling, otherwise the next time until a measure triggers
will take only 1/2 as long as accounted for. This caused
the 'min time' to be potentially off by as much as 100%.

Github-Pull: #9200
Rebased-From: e0a9cb25b0af87723d50cb8d8cffa10f1ebf7dcc
2018-10-24 23:15:27 +03:00
Gregory Maxwell
9e09ec5d6b Avoid integer division in the benchmark inner-most loop.
Previously the benchmark code used an integer division (%) with
 a non-constant in the inner-loop.  This is quite slow on many
 processors, especially ones like ARM that lack a hardware divide.

Even on fairly recent x86_64 like haswell an integer division can
 take something like 100 cycles-- making it comparable to the
 runtime of siphash.

This change avoids the division by using bitmasking instead. This
 was especially easy since the count was only increased by doubling.

This change also restarts the timing when the execution time was
 very low this avoids mintimes of zero in cases where one execution
 ends up below the timer resolution. It also reduces the impact of
 the overhead on the final result.

The formatting of the prints is changed to not use scientific
 notation make it more machine readable (in particular, gnuplot
 croaks on the non-fixedpoint, and it doesn't sort correctly).

This also hoists out all the floating point divisions out of the
 semi-hot path because it was easy to do so.

It might be prudent to break out the critical test into a macro
 just to guarantee that it gets inlined.  It might also make sense
 to just save out the intermediate counts and times and get the
 floating point completely out of the timing loop (because e.g.
 on hardware without a fast hardware FPU like some ARM it will
 still be slow enough to distort the results). I haven't done
 either of these in this commit.
2018-10-24 23:15:14 +03:00
MarcoFalke
a99d1b2425 [doc] Fix typos in comments, doxygen: Fix comment syntax 2018-10-24 23:08:08 +03:00
Jeremy Rubin
146eff7075 Fix a type error that would not compile on Apple LLVM version 6.1.0... 2018-10-24 23:01:48 +03:00
wodry
5c5f1f9b01 Improvement of documentation of command line parameter 'whitelist'
Github-Pull: #9251
Rebased-From: 8a70a9da3da0df5c376042b18b87f0a63e88d2e3
2018-10-24 22:58:26 +03:00
Matt Corallo
39e1d793ce Fix calculation of number of bound sockets to use
Github-Pull: #9253
Rebased-From: 9e1f46821d5bb69e2cbf25738eefa7c6cb99c838
2018-10-24 22:58:15 +03:00
Wladimir J. van der Laan
62de6f69d5 init: Fix typo in help message for -whitelistforcerelay
Reported by pryds on Transifex in the Danish translation.

Github-Pull: #8607
Rebased-From: 67a55025a1ea5d0461139cd6764686a77524feed
2018-10-24 22:57:05 +03:00
Pieter Wuille
6fe2142990 Do diskspace check before import thread is started
Github-Pull: #8392
Rebased-From: 9d4eb9ad99f7c3abf7abaeaf7ea51f98f9445e75
2018-10-24 22:56:55 +03:00
MarcoFalke
7b21a947fe [init] Make feefilter option debug option 2018-10-24 22:55:42 +03:00
Suhas Daftuar
7ee9a4218a Allow compactblock reconstruction when block is in flight 2018-10-24 22:40:07 +03:00
Gregory Maxwell
6689f09a0a Always drop the least preferred HB peer when adding a new one.
When a BIP152 HB-mode peer is in the least preferred position and
 disconnects, they will not be by ForNode on the next loop. They
 will continue to sit in that position and prevent deactivating
 HB mode for peers that are still connected.

There is no reason for them to stay in the list if already gone,
 so drop the first element unconditionally if there are too many.

Fixes issue #9163.

Github-Pull: #9199
Rebased-From: ca8549d2bd32f17f8b69d1edbe3f2976fba504b4
2018-10-24 22:37:48 +03:00
Russell Yanofsky
dc8f0bd8de Modify getblocktxn handler not to drop requests for old blocks 2018-10-24 22:35:37 +03:00
Matt Corallo
e13c064eec More agressively filter compact block requests 2018-10-24 22:22:07 +03:00
Matt Corallo
7796e0a7d9 Dont remove a "preferred" cmpctblock peer if they provide a block
Github-Pull: #8637
Rebased-From: 02a337defdd854efc78ecba6d1fb19cb1c075f16
2018-10-24 22:15:40 +03:00
Matt Corallo
bbc07a86bb Add missing cs_main lock to ::GETBLOCKTXN processing
Note that this is not a major issue as, in order for the missing
lock to cause issues, you have to receive a GETBLOCKTXN message
while reindexing, adding a block header via RPC, etc, which results
in either a table rehash or an insert into the bucket which you are
currently looking at.

Github-Pull: #8995
Rebased-From: dfe79060a62c8de098e75d527d97b99c3b10de50
2018-10-24 22:14:46 +03:00
Cory Fields
771b74ab4e net: fix a few cases where messages were sent rather than dropped upon disconnection
75ead758 turned these into crashes in the event of a handshake failure, most
notably when a peer does not offer the expected services.

There are likely other cases that these assertions will find as well.

Github-Pull: #8862
Rebased-From: 905bc68d05595f41cca36b3df83accd10c00cc48
2018-10-24 22:14:06 +03:00
Pavel Janík
0d1bc50056 UndoReadFromDisk works on undo files (rev), not on block files.
Github-Pull: #8737
Rebased-From: b4fb51271905f9ef39e5c2bc7e8c15e7489394a1
2018-10-24 22:09:40 +03:00
MarcoFalke
26d768db6f Use __func__ to get function name for output printing 2018-10-24 22:09:28 +03:00
Pieter Wuille
152011e50d Use a signal to continue init after genesis activation 2018-10-24 22:06:59 +03:00
Wladimir J. van der Laan
81d9a0d657 net: Ignore notfound P2P messages
Github-Pull: #8427
Rebased-From: 5c9e49d12c931f9c7ddaac0144739dcd7263e554
2018-10-24 22:01:40 +03:00
rodasmith
a02e75a50f fix op order to append first alert
Github-Pull: #8697
Rebased-From: 1d635ae61b26d1dd613c1cc1cac796627af2a31e
2018-10-24 22:01:09 +03:00
Gregory Maxwell
58d52ee75a Do not add random inbound peers to addrman.
We should learn about new peers via address messages.

An inbound peer connecting to us tells us nothing about
 its ability to accept incoming connections from us, so
 we shouldn't assume that we can connect to it based on
 this.

The vast majority of nodes on the network do not accept
 incoming connections, adding them will only slow down
 the process of making a successful connection in the
 future.

Nodes which have configured themselves to not announce would prefer we
 not violate their privacy by announcing them in GETADDR responses.
2018-10-24 22:00:45 +03:00
Pieter Wuille
fb9f18a268 Fix some locks
This makes sure that cs_filter is never held while taking cs_main
or CNode::cs_vSend.
2018-10-24 22:00:27 +03:00
Pieter Wuille
da944d430d Check for compatibility with download in FindNextBlocksToDownload 2018-10-24 21:58:31 +03:00
Suhas Daftuar
a1cc8adc8d Prevent fingerprinting, disk-DoS with compact blocks
- Ignore GETBLOCKTXN requests for unknown blocks

Don't disconnect peers, or else we leak information that could be
used for fingerprinting.

- Ignore CMPCTBLOCK messages for pruned blocks

Also ignores CMPCTBLOCK announcements that have too little work.  This is to
prevent disk-exhaustion DoS.

Github-Pull: #8408
Rebased-From: 1de2a46632946990a7863020b61172232f8c5796 1d06e49834814eed45e07393dcffd7b6683311b2
2018-10-24 21:51:43 +03:00
lateminer
bddddba7f3 Fix DoS vulnerability in mempool acceptance 2018-10-24 21:50:53 +03:00
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