Commit graph

8112 commits

Author SHA1 Message Date
Cory Fields d58c5d6f21 tests: run sanity checks in tests too
If these are going to fail in bitcoind, they should fail in the tests as well.
2015-01-05 22:34:47 -05:00
Pieter Wuille 7268f7b120 Move arith_uint256 out of consensus and util 2015-01-06 00:42:27 +01:00
Pieter Wuille 602ebf5279 Update libsecp256k1 2015-01-06 00:28:47 +01:00
Pieter Wuille 7873633b57 Squashed 'src/secp256k1/' changes from bccaf86..50cc6ab
50cc6ab Merge pull request #178
941e221 Add tests for handling of the nonce function in signing.
10c81ff Merge pull request #177
7688e34 Add magnitude limits to secp256k1_fe_verify to ensure that it's own tests function correctly.
4ee4f7a Merge pull request #176
70ae0d2 Use secp256k1_fe_equal_var in secp256k1_fe_sqrt_var.
7767b4d Merge pull request #175
9ab9335 Add a reference consistency test to ge_tests.
60571c6 Rework group tests
d26e26f Avoid constructing an invalid signature with probability 1:2^256.
b450c34 Merge pull request #163
d57cae9 Merge pull request #154
49ee0db Add _normalizes_to_zero_var variant
eed599d Add _fe_normalizes_to_zero method
d7174ed Weak normalization for secp256k1_fe_equal
0295f0a weak normalization
bbd5ba7 Use rfc6979 as default nonce generation function
b37fbc2 Implement SHA256 / HMAC-SHA256 / RFC6979.
c6e7f4e [API BREAK] Use a nonce-generation function instead of a nonce
cf0c48b Merge pull request #169
603c33b Make signing fail if a too small buffer is passed.
6d16606 Merge pull request #168
7277fd7 Remove GMP field implementation
e99c4c4 Merge pull request #123
13278f6 Add explanation about how inversion can be avoided
ce7eb6f Optimize verification: avoid field inverse
a098f78 Merge pull request #160
38acd01 Merge pull request #165
6a59012 Make git ignore bench_recover when configured with benchmark enabled
1ba4a60 Configure options reorganization
3c0f246 Merge pull request #157
808dd9b Merge pull request #156
8dc75e9 Merge pull request #158
28ade27 build: nuke bashisms
5190079 build: use subdir-objects for automake
8336040 build: disable benchmark by default

git-subtree-dir: src/secp256k1
git-subtree-split: 50cc6ab0625efda6dddf1dc86c1e2671f069b0d8
2015-01-06 00:28:47 +01:00
Pieter Wuille 1a9576de9d Use libsecp256k1's RFC6979 implementation 2015-01-06 00:28:44 +01:00
Thomas Zander e179eb3d9b Make the command-line-args dialog better
Instead of using a fixed-width font in a label, which virtually
guarentees a horizontal scrollbar, use a proper text-document
that can re-layout based on user input.
2015-01-05 21:17:45 +01:00
Pieter Wuille be22b3da1d Update seed IPs, based on bitcoin.sipa.be crawler data 2015-01-05 17:23:23 +01:00
Wladimir J. van der Laan ec20fd74b8
Merge pull request #5490
6bd0dc2 arith_uint256: remove initialization from byte vector (Wladimir J. van der Laan)
30007fd Remove now-unused methods from arith_uint256 and base_uint (Wladimir J. van der Laan)
edc7204 Remove arith_uint160 (Wladimir J. van der Laan)
dba2e91 Add tests for new uint256 (Wladimir J. van der Laan)
92cdb1a Add conversion functions arith_uint256<->uint_256 (Wladimir J. van der Laan)
bfc6070 uint256->arith_uint256 blob256->uint256 (Wladimir J. van der Laan)
734f85c Use arith_uint256 where necessary (Wladimir J. van der Laan)
34cdc41 String conversions uint256 -> uint256S (Wladimir J. van der Laan)
2eae315 Replace uint256(1) with static constant (Wladimir J. van der Laan)
8076585 Replace GetLow64 with GetCheapHash (Wladimir J. van der Laan)
4f15249 Replace direct use of 0 with SetNull and IsNull (Wladimir J. van der Laan)
5d3064b Temporarily add SetNull/IsNull/GetCheapHash to base_uint (Wladimir J. van der Laan)
2015-01-05 16:51:50 +01:00
Wladimir J. van der Laan 6bd0dc2a84 arith_uint256: remove initialization from byte vector
Remove initialization from vector (as this is only used in the tests).

Also implement SetHex and GetHex in terms of uint256, to avoid
duplicate code as well as avoid endianness issues (as they
work in term of bytes).
2015-01-05 15:45:36 +01:00
Wladimir J. van der Laan 30007fda76 Remove now-unused methods from arith_uint256 and base_uint
- Methods that access the guts of arith_uint256 are removed,
as these are incompatible between endians. Use uint256 instead

- Serialization is no longer needed as arith_uint256's are never
read or written

- GetHash is never used on arith_uint256
2015-01-05 15:45:36 +01:00
Wladimir J. van der Laan edc720479d Remove arith_uint160
We never do 160-bit arithmetic.
2015-01-05 15:45:36 +01:00
Wladimir J. van der Laan dba2e9141a Add tests for new uint256 2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan 92cdb1aace Add conversion functions arith_uint256<->uint_256 2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan bfc6070342 uint256->arith_uint256 blob256->uint256
Introduce new opaque implementation of `uint256`, move old
"arithmetic" implementation to `arith_uint256.
2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan 734f85c4f0 Use arith_uint256 where necessary
Also add conversion from/to uint256 where needed.
2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan 34cdc41128 String conversions uint256 -> uint256S
If uint256() constructor takes a string, uint256(0) will become
dangerous when uint256 does not take integers anymore (it will go
through std::string(const char*) making a NULL string, and the explicit
keyword is no help).
2015-01-05 15:45:35 +01:00
Wladimir J. van der Laan 2eae3157f6 Replace uint256(1) with static constant
SignatureHash and its test function SignatureHashOld
return uint256(1) as a special error signaling value.
Return a local static constant with the same value instead.
2015-01-05 15:45:34 +01:00
Wladimir J. van der Laan 807658549c Replace GetLow64 with GetCheapHash 2015-01-05 15:45:34 +01:00
Wladimir J. van der Laan 4f1524966a Replace direct use of 0 with SetNull and IsNull
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
2015-01-05 15:45:34 +01:00
Wladimir J. van der Laan 5d3064bc44 Temporarily add SetNull/IsNull/GetCheapHash to base_uint
Also add a stub for arith_uint256 and its conversion functions,
for now completely based on uint256.

Eases step-by-step migration to blob.
2015-01-05 15:14:47 +01:00
Wladimir J. van der Laan a043facf5a
Merge pull request #5594
7eeeac0 Remove dead BitcoinUnits::id code and update assets-attribution for non-image unit selector (Luke Dashjr)
2015-01-05 08:57:04 +01:00
jtimon 0cc0d8d60b Get rid of the internal miner's hashmeter 2015-01-04 21:04:55 +01:00
Peter Todd 0ea28baeb8
Reject non-final txs even in testnet/regtest
Previous behavior with IsFinalTx() being an IsStandard() rule was rather
confusing and interferred with testing of protocols that depended on
nLockTime.
2015-01-04 14:17:39 -05:00
Pieter Wuille e41345790f Catch LevelDB errors during flush 2015-01-04 19:12:00 +01:00
Pieter Wuille 02bced1661 Bugfix: only track UTXO modification after lookup
Otherwise, if CCoinsViewCache::ModifyCoins throws an exception in between
setting hasModifier and constructing the CCoinsModifier, the cache ends up
in an inconsistent state, resulting in an assert failure in the next
modification.

Bug discovered by Wladimir J. van der Laan.
2015-01-04 17:16:43 +01:00
Pieter Wuille 84eba479a1
Merge pull request #5540
12d927a RPC test for immature balance (Jonas Schnelli)
8024d67 Add immature balances to getwalletinfo. (Gregory Maxwell)
d44c545 Add unconfirmedbalance field to getwalletinfo (azeteki)
2015-01-04 17:06:17 +01:00
Pieter Wuille 9a5cabf3da
Merge pull request #5508
146c0a7 Add RandAddSeedPerfmon to MakeNewKey (21E14)
2015-01-04 16:37:24 +01:00
Luke Dashjr 7eeeac0ff5 Remove dead BitcoinUnits::id code and update assets-attribution for non-image unit selector 2015-01-03 15:43:04 +00:00
Wladimir J. van der Laan e8a6639176
Merge pull request #5582
4caad26 depends: bump cctools to a custom version with less deps (Cory Fields)
46f54bf build: osx builders no longer need 32bit compiler support (Cory Fields)
4fe6c3c depends: major upgrade to darwin toolchain (Cory Fields)
ec90c97 depends: osx: fix qt5 build against 10.10 sdk (Cory Fields)
2015-01-03 10:34:48 +01:00
Thomas Zander 70477a0bdf
On close of splashscreen interrupt verifyDB
With the splashscreen being able to be closed it is possible to
shutdown during the lengthy verifyDB method. (Takes about a minute
on my machine). This change allows us to shutdown much sooner.

Github-Pull: #5557
2015-01-03 10:22:02 +01:00
Cory Fields 4caad26ba1 depends: bump cctools to a custom version with less deps
This one no longer requires native libuuid or libcrypto
2015-01-02 19:31:07 -05:00
Cory Fields 856e862f4a namespace: drop most boost namespaces and a few header cleanups
A few boost::asio were left around because they're very wordy otherwise.
2015-01-02 15:12:03 -05:00
Cory Fields 9b1ab860ff namespace: drop boost::assign altogether here
Standard functions are even simpler
2015-01-02 15:12:03 -05:00
Cory Fields a3241998e1 namespace: remove boost namespace pollution 2015-01-02 15:12:03 -05:00
Cory Fields 46f54bf796 build: osx builders no longer need 32bit compiler support 2015-01-02 15:09:43 -05:00
Cory Fields 4fe6c3c24f depends: major upgrade to darwin toolchain
tl;dr: Update to the newer stable toolchain and SDK for OSX without giving up
any backwards compatibility. We can move to clang 3.5 as a next step which
allows use to use libc++ and the 10.10 sdk, but we'll need to find a build that
works in gitian/travis first.

Switch to a new, better maintained fork of cctools:
https://github.com/tpoechtrager/cctools-port

I've forked this and will be working on it some as well:
https://github.com/theuni/cctools-port

This brings in:
cctools v862
ld64: v241.9

It also fixes 64bit builds, so there's no longer any need to use a 32bit clang.
Since clang is no longer tied to an old/crusty 32bit build, clang has been
upgraded to 3.3. Unfortunately, there's a bug in 3.4 that breaks builds. 3.5
works fine, but there are no binary builds compatible with precise, which is
currently used for gitian and travis. We could always build our own if
necessary.

After updating to stable clang/linker/cctools, it's possible to use a more
recent SDK. The current SDK (10.7) through the most recent 10.10 have all been
built/tested successfully, both with and without 10.6 compatibility. However,
10.10 requires clang 3.5.

SDKs >= 10.9 use libc++ rather than libstdc++. This is verified working as well.
2015-01-02 15:09:43 -05:00
Cory Fields ec90c97d13 depends: osx: fix qt5 build against 10.10 sdk 2015-01-02 15:09:43 -05:00
Wladimir J. van der Laan f55c5e9749
Merge pull request #5349
0125988 Implement test for merkle tree malleability in CPartialMerkleTree (Pieter Wuille)
2015-01-02 18:06:52 +01:00
Wladimir J. van der Laan c986972ad7
Merge pull request #5476
73caf47 Display time offset in the debug window's Peers tab (Pavel Janík)
26a6bae Add time offset to getpeerinfo output (Pavel Janík)
2015-01-02 17:54:21 +01:00
Wladimir J. van der Laan 40d65eb66d
Merge pull request #5580
1b178a7 Bugfix: ConnectBlock: In case the genesis block gets in with fJustCheck, behave correctly (Luke Dashjr)
228d238 Make CCoinsViewCache's copy constructor private (Luke Dashjr)
2015-01-02 17:35:45 +01:00
Wladimir J. van der Laan 269d8ba0d2
Remove declaration of no longer existent CheckWork
Also make ProcessBlockFound static as it is not used outside
miner.cpp.

Alternative implementation of #5549.
2015-01-02 17:30:00 +01:00
Wladimir J. van der Laan 7c2dea4e92
Merge pull request #5569
0d50c2f dmg: fix deterministic dmg creation and docs (Cory Fields)
2015-01-02 17:12:58 +01:00
Wladimir J. van der Laan fe39ce6b23
Merge pull request #5583
643415a [Qt] update a translation string and argument counts (Philip Kaufmann)
2015-01-02 11:18:28 +01:00
Wladimir J. van der Laan 48ea5e0ea0
Merge pull request #5586
d57b303 depends: fix major regression after d546191dc. (Cory Fields)
2015-01-02 11:13:45 +01:00
Wladimir J. van der Laan edbc9045cb
Bump project-wide COPYRIGHT_YEAR to 2015
There is still a redundancy here between configure.ac and
clientversion.h.
2015-01-02 10:53:13 +01:00
Wladimir J. van der Laan e6df2bb48f Remove redundant copyright notices from README files
The normative place for these for the entire project is COPYING,
and the main README already has a MIT license section.
2015-01-02 10:46:23 +01:00
Wladimir J. van der Laan 9adfacdb8b
Merge pull request #5551
dd3f697 Use real text rather than image-rendered text for unit selector (Luke Dashjr)
2015-01-02 10:04:48 +01:00
Luke Dashjr 23f3435962 Rename MAX_TX_SIGOPS to MAX_STANDARD_TX_SIGOPS to match similar policy constant MAX_STANDARD_TX_SIZE 2015-01-01 11:35:51 +00:00
Cory Fields d57b303e1e depends: fix major regression after d546191dc.
Broken hash logic caused all depends on some platforms (osx at least) to end up
with the same build-id. Without this fix, nothing will be rebuilt when recipes
or dependencies change.
2014-12-31 13:20:24 -05:00
Jeff Garzik 39d6b5fd42
Merge #5528 from
branch 'bitcoin-tx-copy-paste' of git://github.com/ers35/bitcoin into merge-5528
2014-12-31 08:57:55 -05:00