Commit Graph

1163 Commits

Author SHA1 Message Date
Simon
06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
Sean Bowe
15a9937654 Revert "Delete old protocol version constants and simplify code that used them."
This reverts commit 5a49c929dd.
2017-06-23 18:19:25 -06:00
Sean Bowe
9ad9a25eff Revert "Remove an unneeded version workaround as per @str4d's review comment."
This reverts commit 1e9db0b38a.
2017-06-23 18:19:17 -06:00
Homu
59de56eeca Auto merge of #2342 - bitcartel:1081__mempoolpatch, r=str4d
Add ability for node to reject tx from mempool by number of tx inputs

Implement short-term solution described in #2343 so that users can respond promptly to critical short-term problems caused by quadratic validation scaling, such as the getblocktemplate latency, block propagation latency, and mempool size inflation issues described in #2333.
2017-06-21 14:42:13 -07:00
Daira Hopwood
c2a722d3c4 Fix a comment that was made stale before launch by #1016 (commit 542da61).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:33:18 +01:00
Daira Hopwood
de609b8c54 Strict DER signatures are always enforced; remove the flag and code that used it.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-17 17:19:08 +01:00
Simon
da6d93916d Add option 'mempooltxinputlimit' so the mempool can reject a transaction
based on the number of transparent inputs.
2017-06-16 19:31:33 -07:00
Homu
3440de74ee Auto merge of #2386 - str4d:2385-consensus-correction, r=str4d
Correct consensus logic in ContextualCheckInputs

Closes #2385.
2017-06-15 18:50:03 -07:00
Jack Grigg
30006a2e79 Correct consensus logic in ContextualCheckInputs
Closes #2385.
2017-06-16 13:45:19 +12:00
Homu
a23fdf862d Auto merge of #2245 - daira:2244.remove-old-peer-workarounds, r=str4d
Delete old protocol version constants and simplify code that used them.

fixes #2244

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-13 23:10:19 -07:00
Jack Grigg
5b3bc9716e Implement automatic shutdown of deprecated Zcash versions
Closes #2274.
2017-05-12 14:41:46 +12:00
Daira Hopwood
1e9db0b38a Remove an unneeded version workaround as per @str4d's review comment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-05-11 07:27:43 +01:00
Daira Hopwood
5a49c929dd Delete old protocol version constants and simplify code that used them.
fixes #2244

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-09 13:19:48 +01:00
Wladimir J. van der Laan
eb5f63fe58 net: Automatically create hidden service, listen on Tor
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
API, to create and destroy 'ephemeral' hidden services programmatically.
https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service

This means that if Tor is running (and proper authorization is available),
bitcoin automatically creates a hidden service to listen on, without user
manual configuration. This will positively affect the number of available
.onion nodes.

- When the node is started, connect to Tor through control socket
- Send `ADD_ONION` command
- First time:
    - Make it create a hidden service key
    - Save the key in the data directory for later usage
- Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on).
- Keep control socket connection open for as long node is running. The hidden service will
  (by default) automatically go away when the connection is closed.
2017-03-25 20:22:09 +13:00
zkbot
7d9bf65501 Auto merge of #2168 - str4d:2164-getblock-anchor, r=daira
Add anchor to output of getblock

Closes #2164.
2017-03-23 18:21:10 +00:00
Jack Grigg
0bc1e2c431 Add anchor to output of getblock
Closes #2164.
2017-03-10 20:09:40 +13:00
Simon
07cf426404 Remove stale Qt comments and dead code 2017-03-09 17:04:59 -08:00
zkbot
dadb1ab74c Auto merge of #2101 - str4d:2074-tests, r=arcalinea
Bitcoin 0.12 test PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6337
- bitcoin/bitcoin#6390
- bitcoin/bitcoin#5515
- bitcoin/bitcoin#6287 (partial, remainder included in bitcoin/bitcoin#6703)
- bitcoin/bitcoin#6465

Part of #2074.
2017-03-03 21:25:03 +00:00
Cory Fields
72b25b0ffd locking: add a quick example of GUARDED_BY
This was chosen not because it's necessarily helpful, but because its locking
assumptions were already correct.
2017-03-03 11:47:10 -08:00
Pavel Vasin
2af5a65066 remove unused inv from ConnectTip() 2017-03-03 10:57:22 -08:00
Jorge Timón
e079f010bf Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs
Zcash:
- Replaces some of the refactoring performed in #1017
- Exposed Consensus::CheckTxInputs for testing
2017-03-03 10:57:09 -08:00
Pieter Wuille
bfa832c7ed Reduce checkpoints' effect on consensus.
Instead of only checking height to decide whether to disable script checks,
actually check whether a block is an ancestor of a checkpoint, up to which
headers have been validated. This means that we don't have to prevent
accepting a side branch anymore - it will be safe, just less fast to
do.

We still need to prevent being fed a multitude of low-difficulty headers
filling up our memory. The mechanism for that is unchanged for now: once
a checkpoint is reached with headers, no headers chain branching off before
that point are allowed anymore.
2017-03-03 10:57:07 -08:00
Philip Kaufmann
db954a65ac use const references where appropriate 2017-03-03 10:57:05 -08:00
Jack Grigg
1f015f6afa Add a flag for enabling experimental features 2017-02-09 22:10:58 +00:00
Jonas Schnelli
6a793d9c27 use CBlockIndex* insted of uint256 for UpdatedBlockTip signal
- removes mapBlockIndex find operation
- theoretically allows removing the cs_main lock during zqm notification while introducing a new file position lock
2017-02-08 22:10:42 +00:00
João Barbosa
7e6ec078fa Add UpdatedBlockTip signal to CMainSignals and CValidationInterface 2017-02-08 22:10:42 +00:00
Jack Grigg
207924a1d5 Remove OpenSSL PRNG reseeding
Per https://download.libsodium.org/doc/generating_random_data/ reseeding the
default libsodium PRNG is not required.
2017-01-23 17:06:54 +01:00
Jack Grigg
6fb8d0c2d6 Skip JoinSplit verification before the last checkpoint
Part of #1749
2016-12-09 21:06:45 +13:00
Sean Bowe
bc59f53722 Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller. 2016-12-05 12:40:06 -07:00
Simon
4e3ac9b015 Fix stale comment referencing upstream block interval 2016-11-18 10:26:20 -08:00
Simon
9ddb6ad028 Mempool will accept tx with joinsplits and the default z_sendmany fee.
Issue #1851 shows that a zaddr->taddr can be rejected from mempools
due to not meeting fee requirements given the size of the transaction.
Fee calculation for joinsplit txs has not yet been agreed upon, so
during this interim period, this patch ensures  joinsplit txs using
the default fee are not rejected due to an insufficient fee.
2016-11-15 11:32:59 -08:00
Simon
ba0625f25d Set default minrelaytxfee to 1000 zatoshis to match upstream.
A txout will be considered dust when it has a value <546 zatoshis.
Helps to address #1719.
2016-11-15 10:48:51 -08:00
Jack Grigg
548bbd95f0 Adjust consensus rule to accept genesis block without height in coinbase
Closes #1753
2016-11-01 19:58:56 -05:00
Sean Bowe
7662d72bf4 Make more string changes. 2016-10-26 13:57:22 -06:00
Jack Grigg
a6df7ab567 Add a persistent screen showing basic node metrics
The screen is implemented using ANSI Escape sequences.

Closes #1331
2016-10-22 15:50:06 -05:00
zkbot
30d3d2dfd4 Auto merge of #1603 - str4d:1556-reject-old-block-versions, r=daira
Reject block versions lower than 4

Includes parts of #1554
Closes #1556
2016-10-22 14:32:40 -04:00
zkbot
f82273829a Auto merge of #1600 - str4d:1557-consensus-rule-disallow-v0-txns, r=daira
Disallow v0 transactions as a consensus rule

Closes #1557
2016-10-22 13:50:52 -04:00
zkbot
e3c8e88e9b Auto merge of #1588 - bitcartel:upstream_8427_dos_logging, r=daira
Upstream: Prevent possible DoS in logging

bitcoin/bitcoin#8427
2016-10-22 13:08:26 -04:00
Simon
432bc22ade Patch backport of upstream 1588 as we don't (yet) use the NetMsgType namespace 2016-10-22 09:49:35 -07:00
Daira Hopwood
cb1246194e Update the error message string for tx version too low. ref #1600
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-22 13:26:44 +01:00
Jack Grigg
80f4cdcf8f Reject block versions lower than 4
Closes #1556
2016-10-22 00:43:26 -05:00
Jack Grigg
7ac924cdb7 Disallow v0 transactions as a consensus rule
Closes #1557
2016-10-22 00:40:50 -05:00
zkbot
f808be7546 Auto merge of #1589 - bitcartel:upstream_7856_one_getaddr_per_connection, r=daira
Upstream: Only send one GetAddr response per connection.

bitcoin/bitcoin#8427
2016-10-21 22:53:19 -04:00
Gregory Maxwell
a514cb2968 Only send one GetAddr response per connection.
This conserves resources from abusive peers that just send
 getaddr in a loop. Also makes correlating addr messages
 against INVs less effective.
2016-10-20 20:30:53 -07:00
Wladimir J. van der Laan
e496b2e391 net: Ignore notfound P2P messages 2016-10-20 20:22:34 -07:00
Daira Hopwood
e923e3ae0f Make v2 transactions standard.
This also corrects a rule about admitting large orphan transactions into the mempool, to account for v2-specific fields.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-18 19:37:55 +01:00
Jack Grigg
6a7acc29a1 Set CBlockIndex.hashAnchor correctly in ConnectBlock 2016-10-17 11:09:24 -05:00
Jack Grigg
b6961fc112 Increment witnesses for new transactions on rescan
Closes #1400
2016-10-17 09:55:02 -05:00
Sean Bowe
74f15a73a1 Make 100KB transaction size limit a consensus rule, rather than a standard rule. 2016-10-08 00:00:23 -06:00
zkbot
efe18f2e9b Auto merge of #1374 - str4d:1106-alert-safe-mode, r=str4d
Enable high-priority alerts to put the RPC into safe mode

This reverts the changes in 986b5e257e and adds a priority check.

Continuation of #1337
Closes #1106
2016-10-03 17:36:59 -04:00