instagibbs
3ee361cc16
Don't DoS ban peers for possibly valid pegin blocks
2017-02-02 10:58:50 -05:00
instagibbs
a727d7629b
Actually enforce withdraw consensus rules
2017-02-02 10:58:50 -05:00
Warren Togami
baa3b0c5cc
Disable -peerbloomfilters by default in sidechains
...
Removes Denial of Service risk on a network that will likely never
have light wallets. User can enable it again if they reallly want it.
2017-02-02 10:58:50 -05:00
Matt Corallo
10249053d0
Add comment explaining check
2017-02-02 10:58:50 -05:00
instagibbs
95900548d3
Basic locked utxo testing
2017-02-02 10:58:50 -05:00
instagibbs
d8c5160e62
Various updates to locked-output UTXO selection
2017-02-02 10:58:50 -05:00
Matt Corallo
4254f332cd
Disable fInbound requirement for preferred-sync peers
2017-02-02 10:58:50 -05:00
Matt Corallo
0156202474
Require coinbase outputs be to a specific script
2017-02-02 10:58:49 -05:00
Matt Corallo
455ff66694
Respond to getheaders even in IBD mode
...
This should fix an issue which would crop up if we ever needed to
pause the chain for a period of time - namely that nodes would not
sync again afterwards if they restarted during the pause.
2017-02-02 10:58:49 -05:00
Matt Corallo
dff6b024dd
No DoS for sending a tx/block claiming an unconfirmed btc block
2017-02-02 10:58:49 -05:00
Matt Corallo
4b80cee0f1
Add function to get withdraw outputs which are claim-able
2017-02-02 10:58:49 -05:00
Matt Corallo
3914ec30cf
Add withdraw-locks-creation tracking in txdb
2017-02-02 10:58:49 -05:00
Luke Dashjr
3ad6bbe651
Refactors in anticipation of blinded values
2017-02-02 10:58:48 -05:00
Matt Corallo
49f24bc6e2
Add explicit fee field to transaction
2017-02-02 10:58:48 -05:00
Matt Corallo
0663a9bf9f
No subsidy, 21 million genesis block
2017-02-02 10:58:48 -05:00
Matt Corallo
f381a70619
Make genesis coinbase outputs spendable
2017-02-02 10:58:48 -05:00
Matt Corallo
6939698bc5
Disable replacement of peg-in transactions
2017-02-02 10:58:48 -05:00
Matt Corallo
54f981de1f
Keep mempool consistent after conflicting withdraw-spent
2017-02-02 10:58:47 -05:00
Matt Corallo
79d422acfa
Add withdraw-claimed tracking to mempool and enforce it
2017-02-02 10:58:47 -05:00
Matt Corallo
16063366d9
Enforce single-withdraw by tracking withdraws-spent in CheckInputs
2017-02-02 10:58:47 -05:00
Matt Corallo
c549d96ead
Add sidechain claims to UTXO db
2017-02-02 10:58:47 -05:00
Matt Corallo
6c945bea44
Tweak SignatureChecker to expose a bit more about the transaction
2017-02-02 10:58:47 -05:00
Matt Corallo
b6a9974821
Block with invalid signature is corruption-possible
2017-02-02 10:58:47 -05:00
jtimon
911294c696
Refactors in anticipation of private chain mode
2017-02-02 10:58:43 -05:00
Matt Corallo
183cc2e8f4
Restore MoneyRange checks on total tx fees
...
This re-adds the security-checks that were surreptitiously removed
all the way back in 8d7849b6db .
2016-11-01 11:48:16 -04:00
Johnson Lau
540413d995
Add standard limits for P2WSH with tests
...
Github-Pull: #8499
Rebased-From: 3ade2f64cf
2016-10-17 14:10:58 +02:00
Matt Corallo
4bb9ce8a95
Use cmpctblock type 2 for segwit-enabled transfer
...
Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.
Github-Pull: #8393
Rebased-From: 6aa28abf53
2016-10-13 20:35:33 +02:00
Pieter Wuille
fe1975a974
Use cmpctblock type 2 for segwit-enabled transfer
...
Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.
Github-Pull: #8393
Rebased-From: 6aa28abf53
2016-10-13 20:15:17 +02:00
Cory Fields
7ae6242960
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: 905bc68d05
2016-10-13 20:09:31 +02:00
Johnson Lau
9dfa0c8d90
Implement NULLDUMMY softfork
...
Github-Pull: #8636
Rebased-From: 482f852da6
2016-09-26 16:50:39 +02:00
Pieter Wuille
1672225670
Do not store witness txn in rejection cache
...
Github-Pull: #8525
Rebased-From: 34521e4d7d
2016-09-26 16:42:12 +02:00
Pavel Janík
084cae9ca5
UndoReadFromDisk works on undo files (rev), not on block files.
...
Github-Pull: #8737
Rebased-From: b4fb512719
2016-09-21 02:43:47 +00:00
MarcoFalke
305d8ac90b
Use __func__ to get function name for output printing
...
Github-Pull: #8548
Rebased-From: fa785d1211
2016-09-21 02:43:47 +00:00
leijurv
befe654f0f
various typos
...
Github-Pull: #8505
Rebased-From: 1aacfc2da5
2016-09-21 02:43:47 +00:00
Pieter Wuille
30eac2d79a
Use a signal to continue init after genesis activation
...
Github-Pull: #8392
Rebased-From: 0fd2a33648
2016-09-21 02:43:47 +00:00
Wladimir J. van der Laan
69d1cd202d
net: Ignore notfound P2P messages
...
Github-Pull: #8427
Rebased-From: 5c9e49d12c
2016-09-21 02:43:47 +00:00
rodasmith
41fd852d3f
fix op order to append first alert
...
Github-Pull: #8697
Rebased-From: 1d635ae61b
2016-09-13 11:35:52 +02:00
Gregory Maxwell
ab295bb4be
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.
2016-09-07 16:43:15 +02:00
Pieter Wuille
bbf379b055
Fix some locks
...
This makes sure that cs_filter is never held while taking cs_main
or CNode::cs_vSend.
2016-09-07 16:42:42 +02:00
Pieter Wuille
2215c22a00
Check for compatibility with download in FindNextBlocksToDownload
2016-09-07 16:42:42 +02:00
Pieter Wuille
b8c79a057c
Precompute sighashes
...
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
2016-09-07 16:42:41 +02:00
Jonas Schnelli
f1c0d78b2d
[Qt] show network/chain errors in the GUI
2016-09-07 16:18:12 +02:00
Ethan Heilman
2611ad79a5
Added feeler connections increasing good addrs in the tried table.
...
Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes.
This change was suggested as Countermeasure 4 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.
2016-09-07 16:17:40 +02:00
Pieter Wuille
3f65ba2b3b
Treat high-sigop transactions as larger rather than rejecting them
2016-07-31 21:47:21 +02:00
Suhas Daftuar
b7e201181b
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: 1de2a46632 1d06e49834
2016-07-29 08:27:57 +02:00
Johnson Lau
f84ee3dab6
Make witness v0 outputs non-standard before segwit activation
...
Github-Pull: #8381
Rebased-From: 1ffaff2f74
2016-07-26 14:25:28 +02:00
Suhas Daftuar
fca1a415ce
Rename "block cost" to "block weight"
...
Github-Pull: #8363
Rebased-From: 2c06bae39e
2016-07-19 12:10:28 +02:00
Wladimir J. van der Laan
37303934fe
Merge #8305 : Improve handling of unconnecting headers
...
e91cf4b Add test for handling of unconnecting headers (Suhas Daftuar)
96fa953 Improve handling of unconnecting headers (Suhas Daftuar)
2016-07-18 07:46:12 +02:00
Wladimir J. van der Laan
ca40ef6029
Merge #8312 : Fix mempool DoS vulnerability from malleated transactions
...
46c9620 Test that unnecessary witnesses can't be used for mempool DoS (Suhas Daftuar)
bb66a11 Fix DoS vulnerability in mempool acceptance (Suhas Daftuar)
2016-07-14 08:21:13 +02:00
Wladimir J. van der Laan
1bc9c8085f
Merge #8271 : [bugfix] Do not send witnesses in cmpctblock
...
252675e Do not send witnesses in cmpctblock (Pieter Wuille)
2016-07-14 08:17:22 +02:00