Commit Graph

1117 Commits

Author SHA1 Message Date
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
Simon b7d072069e Update comment per review 2016-09-30 14:42:47 -07:00
Simon 3b30d8361a Founders reward: changed index computation, added new test and some refactoring. 2016-09-30 14:42:47 -07:00
Simon db0f931570 Add founders reward to ChainParams.
Fix bug where subsidy slow shift was ignored.
2016-09-30 14:42:47 -07:00
Jack Grigg a40034f7d6 Enable high-priority alerts to put the RPC into safe mode
This reverts the changes in 986b5e257e and adds a
priority check.

Closes #1106
2016-09-23 17:26:43 +12:00
zkbot 976479f824 Auto merge of #1411 - bitcartel:master_bitcoin_7106, r=daira
Upstream patch: Fix and improve relay from whitelisted peers

https://github.com/bitcoin/bitcoin/pull/7106
a9f3d3db5c0c8d1697998ed9b3e192ddbf9a31f4

An extra commit modifies the log message string, otherwise there are are a number of commits that need be to backported to add methods e.g. GetDebugMessage.  These commits modify the interface in consensus/validation.h so there are conflicts to be resolved. e.g.
9003c7c
a9ac95c
5f12263
fbf44e6
2016-09-20 19:41:00 -04:00
zkbot 5ef7fecf14 Auto merge of #1407 - bitcartel:master_bitcoin_7079, r=daira
Upstream patch: Prevent peer flooding inv request queue

https://github.com/bitcoin/bitcoin/pull/7079
5029698186445bf3cd69d0e720f019c472661bff
ebb25f4c23adbcb55796c402bafd6064a136f16f
2016-09-20 19:11:28 -04:00
Simon e63d14fd4d Replace %i format specifier with more commonly used %d. 2016-09-19 09:36:26 -07:00
de3dd8a015 Modify message string so we don't need to backport commits which implement FormatStateMessage and GetDebugMessage and involve changes to consensus/validation.h 2016-09-16 17:51:46 -07:00
Pieter Wuille 60aed95400 Fix and improve relay from whitelisted peers
This makes sure that retransmits by a whitelisted peer also actually
result in a retransmit.

Further, this changes the logic to never relay in case we would assign
a DoS score, as we expect to get DoS banned ourselves as a result.
2016-09-16 09:28:12 -07:00
Gregory Maxwell e2190f8017 Limit setAskFor and retire requested entries only when a getdata returns.
The setAskFor duplicate elimination was too eager and removed entries
 when we still had no getdata response, allowing the peer to keep
 INVing and not responding.
2016-09-15 23:41:29 -07:00
kazcw 56f165bdc1 prevent peer flooding request queue for an inv
mapAlreadyAskedFor does not keep track of which peer has a request queued for a
particular tx. As a result, a peer can blind a node to a tx indefinitely by
sending many invs for the same tx, and then never replying to getdatas for it.
Each inv received will be placed 2 minutes farther back in mapAlreadyAskedFor,
so a short message containing 10 invs would render that tx unavailable for 20
minutes.

This is fixed by disallowing a peer from having more than one entry for a
particular inv in mapAlreadyAskedFor at a time.
2016-09-15 23:17:34 -07:00
0163f8faa2 Closes #1371 by updating signed message 2016-09-12 11:01:28 -07:00
Simon 805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Sean Bowe d7eeb7455b Fix CheckTransaction bugs. 2016-09-05 12:18:43 -06:00
Jack Grigg de42390f90 Pass ZCIncrementalMerkleTree to wallet to prevent race conditions 2016-08-31 02:00:11 +12:00
Jack Grigg 769e031c1a Update cached incremental witnesses when the active block chain tip changes 2016-08-30 00:29:49 +12:00
zkbot 365845216b Auto merge of #1268 - ThisIsNotOfficialCodeItsJustForks:t1130-upgrade-libsodium, r=ebfull
Upgrade libsodium for AVX2-detection bugfix.

Upgrades libsodium to bring in an AVX2-detection bugfix (to help with #1130).
2016-08-22 02:34:30 +00:00
Taylor Hornby 2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06:00
Patrick Strateman e279e5f90a Record nMinPingUsecTime 2016-08-15 19:31:14 -06:00
Simon 10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Taylor Hornby 67f0243533 Remove in-band error signalling from SignatureHash, fixing the SIGHASH_SINGLE bug. 2016-07-19 16:36:35 -06:00
Daira Hopwood 4bc00dc141 Bucket -> note.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-18 10:06:18 -06:00
Sean Bowe cc01120a17 Rename more usage of `serial`. 2016-07-18 10:06:18 -06:00
Sean Bowe b7e4abd6f7 Rename some usage of 'pour'. 2016-07-18 10:06:18 -06:00
Sean Bowe bb64be52fe Rename mapSerials to mapNullifiers. 2016-07-18 10:06:18 -06:00
Sean Bowe d90e46ba8d Renaming SetSerial to SetNullifier. 2016-07-18 10:06:18 -06:00
Sean Bowe ee964faf3d Rename HavePourRequirements to HaveJoinSplitRequirements. 2016-07-18 10:06:18 -06:00
Sean Bowe 942bc46756 Rename GetPourValueIn to GetJoinSplitValueIn 2016-07-18 10:06:18 -06:00
Sean Bowe bfeaf0049a Rename JSDescription's `serials` to `nullifiers`. 2016-07-18 10:06:18 -06:00
Sean Bowe 8675d94b63 Rename vpour to vjoinsplit. 2016-07-18 10:06:18 -06:00
Sean Bowe a8c68ffe99 Rename CPourTx to JSDescription. 2016-07-18 10:06:18 -06:00
Taylor Hornby 948d4e6c10 Split JoinSplit proof verification out of CheckTransaction. 2016-06-23 16:35:31 -06:00
zkbot 6793168a2e Auto merge of #1017 - ebfull:coinbase-must-be-protected, r=ebfull
Enforce that coinbases must be protected

This PR forces miners to place their funds in the private value transfer system, making "transparent coins" opt-in for users, and increasing privacy for all participants on a systemic level.

Closes #101.
2016-06-15 03:06:23 +00:00
Sean Bowe d212ba320b Disable enforced coinbase protection in miner_tests. 2016-06-14 15:18:52 -06:00
Sean Bowe a180d0a6c6 Rename to `fCoinbaseMustBeProtected`. 2016-06-14 15:16:34 -06:00
Sean Bowe 89f3cd11c7 Ensure NonContextualCheckInputs runs before routines in ContextualCheckInputs. 2016-06-14 12:41:32 -06:00
Sean Bowe 542da618df Enforce remaining softfork activation rules unconditionally. 2016-06-14 12:34:38 -06:00
Sean Bowe b3be1ef529 Enforce BIP16 and BIP30 unconditionally to all blocks. 2016-06-14 09:49:48 -06:00
Sean Bowe c0dde76d8a Disable coinbase-must-be-protected rule on regtest. 2016-06-13 12:23:55 -06:00
Sean Bowe 1d38795f50 Prevent coinbases from being spent to transparent outputs. 2016-06-13 11:58:10 -06:00
Sean Bowe 2c901fd87d Refactor contextual and noncontextual input checks. 2016-06-13 11:52:46 -06:00
Sean Bowe 10df6fb3df Rename `CheckInputs` to `ContextualCheckInputs` since it relies on a global variable
and assumes calling conditions.
2016-06-13 11:45:41 -06:00
zkbot 47e6645005 Auto merge of #1009 - ThisIsNotOfficialCodeItsJustForks:t171-hard-fork-alerts-and-tests, r=ebfull
Enable -alertnotify for hard fork detection. Test it.

Closes #171. Closes #131.
2016-06-12 18:04:53 +00:00
Jack Grigg d4388ed52b Updated a hard-coded number of blocks to account for decreased block interval 2016-06-10 12:02:49 +12:00
Jack Grigg 45e3deea8a Decrease block interval to 2.5 minutes 2016-06-10 11:45:04 +12:00
Taylor Hornby 57c074e1e4 Enable -alertnotify for hard fork detection. Test it. 2016-06-09 13:48:04 -06:00