Commit Graph

10375 Commits

Author SHA1 Message Date
Suhas Daftuar
4366ce4fa0 VerifyDB: don't check blocks that have been pruned 2018-01-13 02:08:32 +03:00
Pieter Wuille
458cfffcd0 Use SipHash-2-4 for address relay selection 2018-01-13 02:07:58 +03:00
Pieter Wuille
cae6dbb6ab Switch CTxMempool::mapTx to use a hash index for txids 2018-01-13 02:07:51 +03:00
Pieter Wuille
c4641ab588 Use SipHash-2-4 for CCoinsCache index 2018-01-13 02:07:43 +03:00
Pieter Wuille
3806509c82 Add SipHash-2-4 primitives to hash 2018-01-13 02:04:12 +03:00
Pieter Wuille
0108167866 Add tests for CCoins deserialization 2018-01-13 02:03:37 +03:00
Patrick Strateman
7132135a12 CDataStream::ignore Throw exception instead of assert on negative nSize.
Previously disk corruption would cause an assert instead of an exception.
2018-01-13 02:03:30 +03:00
Pieter Wuille
12751d523a Fix OOM bug: UTXO entries with invalid script length 2018-01-13 02:03:22 +03:00
Pieter Wuille
622fa5bb19 Treat overly long scriptPubKeys as unspendable 2018-01-13 02:03:15 +03:00
Pieter Wuille
96a9621534 Introduce constant for maximum CScript length 2018-01-13 02:01:56 +03:00
Wladimir J. van der Laan
584c3d088e dbwrapper: Move HandleError to dbwrapper_private 2018-01-13 02:01:27 +03:00
Wladimir J. van der Laan
b2c1789e61 dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator
Pass parent wrapper directly instead of obfuscation key. This
makes it possible for other databases which re-use this code
to use other properties from the database.

Add a namespace dbwrapper_private for private functions to be used
only in dbwrapper.h/cpp and dbwrapper_tests.
2018-01-13 01:58:42 +03:00
Wladimir J. van der Laan
dacaf6a61c dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex
It is an unnecessary method as it is used only two times
and only internally, and the whole implementation is
HexStr(obfuscate_key).
2018-01-13 01:58:35 +03:00
Wladimir J. van der Laan
ca67fc2407 dbwrapper: Remove throw keywords in function signatures
Using throw() specifications in function signatures is not only
not required in C++, it is considered deprecated for
[various reasons](https://stackoverflow.com/questions/1055387/throw-keyword-in-functions-signature).
It is not implemented by any of the common C++ compilers. The usage is
also inconsistent with the rest of the source code.
2018-01-13 01:58:26 +03:00
Wladimir J. van der Laan
17d8ea7041 txdb: Fix assert crash in new UTXO set cursor
Remove the mistaken assumption that GetKey returning false signifies
an internal database issue. It will return false when the key cannot
be deserialized into the (char,uint256) stanza, which indicates
that the cursor has reached a different kind of key.

Fixes bug #7890 introduced in #7756.
2018-01-13 01:57:56 +03:00
Suhas Daftuar
26475e2de4 Check all ancestor state in CTxMemPool::check() 2018-01-13 01:57:25 +03:00
Suhas Daftuar
b02423bdb5 Add ancestor feerate index to mempool 2018-01-13 01:57:17 +03:00
Suhas Daftuar
dcb9441105 Add ancestor tracking to mempool
This implements caching of ancestor state to each mempool entry, similar to
descendant tracking, but also including caching sigops-with-ancestors (as that
metric will be helpful to future code that implements better transaction
selection in CreatenewBlock).
2018-01-13 01:57:09 +03:00
Suhas Daftuar
83568275f1 Remove work limit in UpdateForDescendants()
The work limit served to prevent the descendant walking algorithm from doing
too much work by marking the parent transaction as dirty.  However to implement
ancestor tracking, it's not possible to similarly mark those descendant
transactions as dirty without having to calculate them to begin with.

This commit removes the work limit altogether.  With appropriate
chain limits (-limitdescendantcount) the concern about doing too much
work inside this function should be mitigated.
2018-01-13 01:56:59 +03:00
Suhas Daftuar
e001fd3ea4 Rename CTxMemPool::remove -> removeRecursive 2018-01-13 01:56:51 +03:00
Suhas Daftuar
ff1f0ead66 CTxMemPool::removeForBlock now uses RemoveStaged 2018-01-13 01:53:12 +03:00
Wladimir J. van der Laan
fefec9de84 mempool: Re-remove ERROR logging for mempool rejects 2018-01-13 01:33:19 +03:00
Suhas Daftuar
1e0ba49e26 Add tags to mempool's mapTx indices 2018-01-13 01:31:09 +03:00
lateminer
3d26f43eb0 mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee
fa331db68b
2018-01-13 01:30:21 +03:00
Alex Morcos
a4dc487b0e Save the last unnecessary database read
It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent.  This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.
2018-01-13 01:01:21 +03:00
janko33bd
a5329e8c90 Merge pull request #23 from lateminer/build-fixes-0.13
Build fixes from Bitcoin Core 0.13.x
2018-01-12 21:25:50 +01:00
lateminer
ef33662381 Merge remote-tracking branch 'janko33bd/Blackcoin-Lore' into build-fixes-0.13 2018-01-12 22:22:52 +03:00
Cory Fields
2ac25f14ea gitian: use a wrapped gcc/g++ to avoid the need for a system change 2018-01-12 22:19:10 +03:00
Cory Fields
f41be6dbfb gitian: create debug packages for linux/windows 2018-01-12 22:12:47 +03:00
Cory Fields
ed3c825a9a gitian: use CONFIG_SITE rather than hijacking the prefix 2018-01-12 22:02:43 +03:00
janko33bd
982ea00de5 Merge pull request #22 from lateminer/testnet
Make Lore work on testnet, first attempt
2018-01-12 19:50:52 +01:00
Wladimir J. van der Laan
f6d63b9123 depends: mac deploy Py3 compatibility
This fixes the gitian MacOSX build, it was broken in #7723.

The patch to `native_mac_alias` should probably make it upstream.
2018-01-12 21:32:44 +03:00
Wladimir J. van der Laan
b1d5409eb8 build: python 3 compatibility 2018-01-12 21:31:33 +03:00
janko33bd
7b995aa9f0 Merge pull request #21 from lateminer/shared_ptr-fix
Use std::shared_ptr instead of boost::shared_ptr
2018-01-12 08:41:32 +01:00
lateminer
c4c9d81823 Use std::shared_ptr instead of boost::shared_ptr 2018-01-12 07:34:45 +03:00
janko33bd
714d2650b5 added SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS 2018-01-10 23:13:59 +01:00
janko33bd
602f3d2aad removing confusing tooltip 2018-01-10 23:06:58 +01:00
Ivo van der Sangen
33137dbc6d Include select.h when WIN32 is not defined 2018-01-10 23:09:20 +03:00
Gregory Maxwell
43f8575bc3 Fix qt/paymentrequestplus.cpp for OpenSSL 1.1 API.
This avoids a compile failure on newly installed debian stretch systems.
2018-01-10 23:09:03 +03:00
Gregory Maxwell
ae3b2575d9 Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API.
This avoids a compile failure on newly installed debian stretch systems.
2018-01-10 23:08:55 +03:00
Cory Fields
2f3208b448 build: fix qt5.7 build under macOS
OBJCXX's std flags don't get defined by our cxx macro. Rather than hard-coding
to c++11, just force OBJCXX to be the same as CXX unless the user specified
otherwise.
2018-01-10 23:08:31 +03:00
Wladimir J. van der Laan
209a5f1a04 build: Remove check for openssl/ec.h
We don't use any elliptic curves from OpenSSL anymore, nor include this
header anywhere but optionally in the tests of secp256k1 (which has
its own autoconf setup).

Reported by sinetek on IRC.
2018-01-10 23:07:58 +03:00
Luke Dashjr
afc5e2c51d configure: Allow building bench_bitcoin by itself 2018-01-10 23:06:37 +03:00
Luke Dashjr
6112e5877c Bugfix: Allow building libbitcoinconsensus without any univalue 2018-01-10 23:06:14 +03:00
janko33bd
6ed383e932 Merge pull request #20 from lateminer/relay-doublespends
Relay double-spends
2018-01-10 21:05:33 +01:00
Cory Fields
4cdc0c43cc build: fix Windows builds without pkg-config
- guard PKG_PROG_PKG_CONFIG with an m4_ifdef. If not building for windows,
  require it
- add nops as necessary in case the ifdef reduces the if/then to nothing
- AC_SUBST some missing _LIBS. These were split out over time, but not all were
  properly substituted. They continued to work if pkg-config is installed
  because it does the AC_SUBST itself
2018-01-10 23:04:54 +03:00
Cory Fields
24fd04e93f build: require boost for bench 2018-01-10 23:03:29 +03:00
Wladimir J. van der Laan
8b6c238f0d windows: Add testnet icon for testnet link
Overhauled testnet icon by Jonas Schnelli
2018-01-10 23:02:57 +03:00
Wladimir J. van der Laan
d730d69efd windows: Add testnet link to installer 2018-01-10 23:02:49 +03:00
fanquake
dc7486e015 [trivial] Sync ax_pthread with upstream draft 2018-01-10 23:01:56 +03:00