Relevant updates (see the commit message in the subtree squash commit for all changes).
- Switch to inline assembly (no need for YASM).
- Faster field multiplication code.
- Small performance tweaks.
- Many more unit tests (mostly by @gmaxwell).
fixes #5295
1837987 Optimize -regtest setgenerate block generation (Gavin Andresen)
Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
7329fdd Update comments in txmempool to be doxygen compatible (Michael Ford)
5617267 Fix typo in listreceivedbyaddress and listaccounts help text (Michael Ford)
c63a73d Update comments in util to be doxygen compatible (Michael Ford)
2db4c8a Fix node ranges in the test framework. (Daniel Kraft)
Use setmocktime to create the initial block chain with
10-minute-apart-blocks starting 1 Jan 2014.
219a147 script: check ScriptError values in script tests (Cory Fields)
ab9edbd script: create sane error return codes for script validation and remove logging (Cory Fields)
NOP1 to NOP10 are reserved for future soft-fork upgrades. In the event
of an upgrade such NOPs have *VERIFY behavior, meaning that if their
arguments are not correct the script fails. Discouraging these NOPs by
rejecting transactions containing them from the mempool ensures that
we'll never accept transactions, nor mine blocks, with scripts that are
now invalid according to the majority of hashing power even if we're not
yet upgraded. Previously this wasn't an issue as the IsStandard() rules
didn't allow upgradable NOPs anyway, but 7f3b4e95 relaxed the
IsStandard() rules for P2SH redemptions allowing any redeemScript to be
spent.
We *do* allow upgradable NOPs in scripts so long as they are not
executed. This is harmless as there is no opportunity for the script to
be invalid post-upgrade.
Currently Bitcoin-Qts support for OSX User Notification Center is broken. This pull will fix a known issue of non-official-apple-built apps having problems sending user notifications.
096efc5 travis: install less packages from apt-get (Cory Fields)
5d60b69 Coin Control: Make list mode default (Luke Dashjr)
4ff81d6 Bugfix: Clarify coin control dialog labels (Luke Dashjr)
1) const-ify internal helper ParseHashStr()
2) use HTTPError() helper when returning HTTP_NOT_FOUND
This probably would've broken native OSX builds
3c30f27 travis: disable rpc tests for windows until they're not so flaky (Cory Fields)
daf03e7 RPC tests: create initial chain with specific timestamps (Gavin Andresen)
a8b2ce5 regression test only setmocktime RPC call (Gavin Andresen)
7ab4358 Update bash-completion for v0.10 (Christian von Roques)
a7f2941 [Qt, OSX] fix usage of osx 10.8+ user notification center (Jonas Schnelli)
6c8c704 [docs] Add mini-"howto" using Qt Creator (osx) (Jonas Schnelli)
f9e40fb revert part of 9eda1620b (Cory Fields)
4300876 build: secp256k1 as a subdir, since it's required (Cory Fields)
0dc8613 build: fixup configure to not export anything (Cory Fields)
54566de depends: quit exporting in config.site (Cory Fields)
ff1e5ba depends: add gmp package (Cory Fields)
cf61b54 Don't use bashisms in configure (Pieter Wuille)
dffb8f8 Use libsecp256k1 in key.cpp (Pieter Wuille)
4c97c64 Do not use EC code in global constructors (Pieter Wuille)
07a9901 Always build and link libsecp256k1 (Pieter Wuille)
d48555b Squashed 'src/secp256k1/' content from commit ad2028f (Pieter Wuille)
7a7e109 Delete src/secp256k1 before subtree import (Pieter Wuille)
0ceab00 [Qt, OSX] move QProgressBarMac to guiutil.h (Jonas Schnelli)
6093aa1 [Qt, OSX] QProgressBar CPU-Issue workaround (Jonas Schnelli)
230f7a8 Remove unused ecwrapper code (Pieter Wuille)
c1c9d5b [Qt] Add Smartfee to GUI (Cozz Lovan)
e7876b2 [Wallet] Prevent user from paying a non-sense fee (Cozz Lovan)
ed3e5e4 [Wallet] Add global boolean whether to pay at least the custom fee (default=true) (Cozz Lovan)
0ed9675 [Wallet] Add global boolean whether to send free transactions (default=true) (Cozz Lovan)
Also reorganize the document a bit.
Ported txnmall.sh to Python, and updated to match
recent transaction malleability changes.
I also modified it so it tests both double-spending
confirmed and unconfirmed (only-in-mempool) transactions.
Renamed to txn_doublespend, since that is really what is
being tested. And told the pull-tester to run both
variations on this test.
For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
They're not necessary, and not always supported. We only need to know about
hidden and default.
Credit BlueMatt for libbitcoinsonsensus.h/cpp
They should be hooked up in other places as well, but this is a start.
dll's are no longer dynamically linked to libgcc/libstdc++/libssp
This ensures that users of the lib will be able to mangle the paths to work
in their bundles.
This avoids textrels, and matches previous gitian behavior.
We're not ready to switch to a static qt5 for Linux yet due to missing plugin
support. This adds a recipe for building a shared qt4 that we build and link
against, but don't distribute.
make USE_LINUX_STATIC_QT5=1 can be used to build static qt5 as before.
Descriptors now make use of the dependencies builder, so results are cached.
A very new version (>= e9741525c) of Gitian should be used in order to take
advantage of caching.
Previously, AcceptBlockHeader did not check the header (in particular
PoW). This made the client accept invalid-PoW-headers from peers in
headers-first sync.
Set minimum sizes appropriately, and make sure that they
are enforced. Replaces #5226.
- no code changes
- to ensure a consistent wording between core and GUI
9eb5a5f build: pad header for osx libs (Cory Fields)
9ed8979 build: fix static dll link for mingw (Cory Fields)
19df238 build: shared lib build should work reasonably well now (Cory Fields)
269efa3 build: add quick consensus lib tests (Cory Fields)
cdd36c6 build: add --with-libs so that libs are optional (Cory Fields)
2cf5f16 build: add libbitcoinconsensus files and hook up the lib build (Cory Fields)
ee64c53 build: remove internal/protected build attribute checks (Cory Fields)
f36a40f build: check visibility attributes (Cory Fields)
811a765 build: mingw needs libssp for hardening with dlls (Cory Fields)
e0077de build: make a distinction between static app ldflags and static lib ldflags (Cory Fields)
e0a25c5 qt: Make askpassphrase dialog behave more sanely (Wladimir J. van der Laan)
72fb3d2 Update comments in src/rpc* to be doxygen compatible (Michael Ford)
0391423 Discourage NOPs reserved for soft-fork upgrades (Peter Todd)
This turns STRICTENC turn into a softforking-safe change (even though it
is not intended as a consensus rule), and as a result guarantee that using
it for mempool validation only results in consensus-valid transactions in
the mempool.
Possible with STRICTENC
57425a2 Check block header before accepting it. (Daniel Kraft)
Some users may have libtool libs (.la) installed in their linker search paths.
In this case, using -static-libtool-libs would try to link in .a's instead of
shared libs. That would be harmless unless the .a was built in a way that
would break linking, like non-fpic.
What we really want is "-static" here. Despite its name, it's actually less
aggressive than -static-libtool-libs. It causes only internal libs to be linked
statically (libbitcoinconsensus is the one were'a after).
Also included are minor edits to util.py to create a clean blockchain and add a parameter to gather_inputs to specify number of confirmations.
f618577 build: fix link error on some platforms. Fixes #5235 (Cory Fields)
aabe61c [Qt] explicitly call proxy in GUI settings SOCKS5 proxy (Philip Kaufmann)
8656dbb Port/fix txnmall.sh regression test (Gavin Andresen)
e4ef724 Edited rpc-tests to run python script not shell script. (mrbandrews)
189fb52 Port of wallet.sh to python (wallet.py). (mrbandrews)
77c38bb Truthier error message when rpcpassword is missing (Glenn Willen)
ca81587 Test the exact order of CHECKMULTISIG sig/pubkey evaluation (Peter Todd)
98b135f Make STRICTENC invalid pubkeys fail the script rather than the opcode. (Pieter Wuille)
092b58d CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex) (jtimon)
22c4272 MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h) (jtimon)
- Update comments in checkpoints to be doxygen compatible
- Update comments in checkqueue to be doxygen compatible
- Update coins to be doxygen compatible
- Fix comment typo in crypter.h
- Update licenses/copyright dates
Closes #5325 #5184 #5183 #5182
246659a gitian: make tarballs deterministic and nuke .la files from build output (Cory Fields)
c54d647 travis: let travis use shared libs for tests (Cory Fields)
4bbbdf3 gitian: quick docs update (Cory Fields)
1aead42 gitian: descriptors overhaul (Cory Fields)
5f93ec2 depends: Add a package for qt4.6. Linux uses it by default. (Cory Fields)
4302fa6 depends: Use pic for all linux dependencies (Cory Fields)
It was removed in https://github.com/bitcoin/bitcoin/pull/5161
be4ac91 docs: ThreadGetMyExternalIP has been removed (Pavel Vasin)
e0535e1 Remove misleading comment about testnet's message string. (Pavel Janík)
Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
Like in a real world situation, a safe mode test should also be visible in the
UI. A test of safe mode is furthermore mostly relevant for developers, so it
should not be overwritten by a warning about a pre-release test build.
Previously -proxy was not setting the proxy for IsLimited networks, so
if you set your configuration to be onlynet=tor you wouldn't get an
IPv4 proxy set.
The payment protocol gets its proxy configuration from the IPv4 proxy,
and so it would experience a connection leak.
This addresses issue #5355 and also clears up a cosmetic bug where
getinfo proxy output shows nothing when onlynet=tor is set.
7357893 Prioritize and display -testsafemode status in UI (dexX7)
4574248 [Qt] minor ordering cleanup after new fee selection (Philip Kaufmann)
a01fa30 minor style cleanup after HTTP rest interface merge (Philip Kaufmann)
f321d6b Add key generation/verification to ECC sanity check (Pieter Wuille)
d0c41a7 Add sanity check after key generation (Pieter Wuille)
b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr)
60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr)
bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr)
9765a50 Implement BIP 23 Block Proposal (Luke Dashjr)
3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr)
132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr)
df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr)
4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr)
a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
There are 3 pieces of data that are maintained on disk. The actual block
and undo data, the block index (which can refer to positions on disk),
and the chainstate (which refers to the best block hash).
Earlier, there was no guarantee that blocks were written to disk before
block index entries referring to them were written. This commit introduces
dirty flags for block index data, and delays writing entries until the actual
block data is flushed.
With this stricter ordering in writes, it is now safe to not always flush
after every block, so there is no need for the IsInitialBlockDownload()
check there - instead we just write whenever enough time has passed or
the cache size grows too large. Also updating the wallet's best known block
is delayed until this is done, otherwise the wallet may end up referring to an
unknown block.
In addition, only do a write inside the block processing loop if necessary
(because of cache size exceeded). Otherwise, move the writing to a point
after processing is done, after relaying.
Rebased-From: 7f33d2cebfde99ded12c711ef6bd77c91725cfb8
Github-Issue: #5344
730b1ed Check pindexBestForkBase for null (21E14)
3c77714 Make -proxy set all network types, avoiding a connect leak. (Gregory Maxwell)
7e615f5 Fixed mempool sync after sending a transaction (Suhas Daftuar)
These static objects are only used in once place, so declare them there instead.
Fixes default hidden symbol visibility for our linux->osx cross build. Without
this change, the check for working -fvisibility=hidden fails, and all symbols
are visible by default.
Ugly as this is, it's just a simple find/replace to fix a bug in Qt's configure.
They assume in an "XPLATFORM_MAC" block that the builder is capable of running
osx programs. This should be "BUILD_ON_MAC" instead.
d61dc25 qt: osx: fix hidden symbol visibility (Cory Fields)
a206950 Introduce separate flushing modes (Pieter Wuille)
51ce901 Improve chainstate/blockindex disk writing policy (Pieter Wuille)
These can be used for testing reorganizations or for manual intervention in case of
chain forks.
3d0a1ce Process help and version arguments before datadir. (Pavel Janík)
- add newly added variables to the constructor init
- move an already existing bool also to constructor init
- move a connect call to setClientModel and add a NULL pointer check
This is a helper target that stops just before the creation of the dmg.
- Split linux32/linux64 releases
- Split win32/win64 zips
- Post-processing should no longer be required. The deterministic outputs are
ready for consumption.
c8ed613 Include missing config/bitcoin-config.h. (Pavel Janík)
494f6e7 Check for strnlen and provide it if it is not found. (Pavel Janík)
3223179 libbitcoinconsensus: don't require any global constructors (Cory Fields)
9b1627d [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis (Cozz Lovan)
b7f2cdc build: disable static lib stripping during osx make install-strip (Cory Fields)
dfef929 release: update docs to reflect new layout (Cory Fields)
52bb7a7 gitian: update descriptors to use a sane uniform output (Cory Fields)
7a9cf80 docs: add/update docs for osx dmg signing (Cory Fields)
914868a build: add a deterministic dmg signer (Cory Fields)
d69ed2b build: Clean up the dmg layout (Cory Fields)
2f327a3 build: add the deploydir target for gitian (Cory Fields)
a328dd6 [Qt] small changes to sendcoinsdialog (Philip Kaufmann)
34559c7 Make PruneBlockIndexCandidates safer (Pieter Wuille)
cca48f6 Reset setBlockIndexCandidates once block index db loaded (21E14)
5dc713b [REST] set REST API behind "-rest" option (Jonas Schnelli)
78bdc81 [REST] give an appropriate response in warmup phase (Jonas Schnelli)
210eba9 [REST] fix headersonly flag for BINARY responses (Jonas Schnelli)
cd4d3f1 Win32: change buffer size for gethotsname in Discover() (Philip Kaufmann)
8fa0494 Win32: log addresses found in Discover() calls (Philip Kaufmann)
9ec75c5 Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true. (Ruben Dario Ponticelli)
a2d0fc6 Fix IsInitialBlockDownload which was broken by headers first. (Ruben Dario Ponticelli)
These can be used for testing reorganizations or for manual intervention in case of
chain forks.
e3f315a Fix python usage for arch's broken maintainers (Matt Corallo)
57be955 Remove -printblock, -printblocktree, and -printblockindex (Pieter Wuille)
1. Remove the default format (binary) because `rest/block/<hash>/Hex` would end up delivering binary data.
2. List available formats when chosen format was not found (reduces need for documentation)
3. Change url syntax to dot extension like format chosing (like `rest/tx/<hash>.json`
a53d16a Use complete path to include bitcoin-config.h. (Pavel Janík)
Another testing-only potential footgun command.
f86a24b Move `setmocktime` to hidden category (Wladimir J. van der Laan)
bd9aebf Introduce a hidden category (Pieter Wuille)
0dd06b2 Delay writing block indexes in invalidate/reconsider (Pieter Wuille)
9b0a8d3 Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
3a05ba1 Fix typo in doxygen comment. (Pavel Janík)
1cf23f6 Update the intent on SI-style separators. (21E14)
1b91be4 Report status of chain tips (Pieter Wuille)
43422a0 [Qt] Fix wallet-lock in CWallet::GetAccountAddresses(..) (Cozz Lovan)
4cdaa95 Resize after succesful result (Pieter Wuille)
9d8604f Header define style cleanups (Pieter Wuille)
a53fd41 Deterministic signing (Pieter Wuille)
3060e36 Add the RFC6979 PRNG (Pieter Wuille)
a8f5087 Add HMAC-SHA256 (Pieter Wuille)
36fa4a7 Split up crypto/sha2 (Pieter Wuille)
01dc2d8 [REST] add REST interface tests in rpc-test section (Jonas Schnelli)
Now that signing is deterministic, we can require exact correspondence between the
automatically generated tests and the ones read from JSON. Do this, and update
the tests to those deterministic versions. Note that some flag changes weren't
correctly applied before.
Fix typos where appropriate
Update license/copyright
8a5c951 [REST] make selection of output-format mandatory, support dot url syntax (Jonas Schnelli)
Builds on #5316.
This avoids connecting to them again too soon in ThreadOpenConnections.
Make an exception for connection failures to the proxy as these
shouldn't affect the status of specific nodes.
b2d0162 Test resurrecting memory pool transactions during chain re-org (Gavin Andresen)
3dd8ed7 Delay writing block indexes in invalidate/reconsider (Pieter Wuille)
798faec Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
I dropped mention of libgmp that I had in my first draft because
it looks like we'll be able to get that out prior to release.
362001c Move CHECKMULTISIG order tests out of automatically generated block (Pieter Wuille)
f67a9ce Use deterministically generated script tests (Pieter Wuille)
Although script_valid.json and script_invalid.json are loaded correctly by the
JSON interpreter used by bitcoin core, these same files are often used by other
libraries and do not necessarily load correctly due to the fact that newlines
contained inside strings are not valid and must instead use the escape
character \n. The files tx_valid.json and tx_invalid.json handle this
correctly, so I've changed the formatting in script_valid.json and
script_invalid.json to mirror those files.
Immature coinbase spends are allowed in the memory pool if they can be mined in the next block.
They are not allowed in the memory pool if they cannot be mined in the next block.
This regression test tests those edge cases.
5fdbe67 Add 0.10 release notes on improvement to signing security. (Gregory Maxwell)
32b93a1 Extra explanation for getchaintips (Pieter Wuille)
c5b390b Make comments in main an init doxygen compatible (Michael Ford)
9e56532 Coinbases-in-mempool regression test (Gavin Andresen)
d227011 MOVEONLY: core/ -> primitives/ (Luke Dashjr)
libqt5core5 installs failed.
Package libqt5core5 has replaced with libqt5core5a in ubuntu and debian.
The website is:
http://packages.ubuntu.com/trusty/libqt5core5a
https://packages.debian.org/sid/libqt5core5a
be7b0bf Package libqt5core5 replaced with libqt5core5a (LongShao007)
307f7d4 Report script evaluation failures in log and reject messages (Pieter Wuille)
12a49ca Limit the number of new addressses to accumulate (Pieter Wuille)
199627c [REST] adding basic documentation (Jonas Schnelli)
60d1ecd change nSubsidy's type from int64_t to CAmount (HarryWu)
8487790 bitcoin-tx: Add the "-txid" option. Also add the hex-encoded transaction to the JSON output as the "hex" property. (mruddy)
87bddb7 Squashed 'src/secp256k1/' changes from ad2028f..b0210a9 (Pieter Wuille)
ffe3291 Remove gmp dependency and doc mentions (Pieter Wuille)
35e408f Regard connection failures as attempt for addrman (Wladimir J. van der Laan)
8a20cd3 prioritisetransaction RPC: Restore compatibility with existing implementations by using satoshis for fee offset rather than BTC (Luke Dashjr)
afd4b94 Move CMerkleBlock and CPartialMerkleTree to their own file (Matt Corallo)
No return at the end of void function.
db0916b Fix missing python2 in rpc-tests (Matt Corallo)
Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
TLS is subject to downgrade attacks when SSLv3 is available, and
SSLv3 has vulnerabilities.
The popular solution is to disable SSLv3. On the web this breaks
some tiny number of very old clients. While Bitcoin RPC shouldn't
be exposed to the open Internet, it also shouldn't be exposed to
really old SSL implementations, so it shouldn't be a major issue
for us to disable SSLv3.
There is more information on the downgrade attacks and disabling
SSLv3 at https://disablessl3.com/ .
a26bf47 Add a new test for FormatParagraph (string longer than the default width). (Pavel Janík)
83b81f6 Format paragraphs properly - count the space between words. (Pavel Janík)
11d7a7d [RPC] add rpc-test for http keep-alive (persistent connections) (Jonas Schnelli)
683dc40 Disable SSLv3 (in favor of TLS) for the RPC client and server. (Gregory Maxwell)
- the function only returned true, so make it void
- add a comment about payment request network detection
- also rename current ones to match the new ones
- remove constant from guiconstant.h and add it to paymentserver.cpp
- current code only does this for payment request files, which are
used on Mac
- also rename readPaymentRequest to readPaymentRequestFromFile, so it's
obvious that function only handles payment request files and not URIs
- small logging changes in readPaymentRequestFromFile
- this test required to make readPaymentRequestFromFile() public in order
to be able to is it in paymentservertests.cpp
65b0328 newlines in strings are invalid JSON (Ryan X. Charles)
5ec654b [Qt] update paymentserver license and cleanup ordering (Philip Kaufmann)
4333e26 [Qt] add BIP70 DoS protection test (Philip Kaufmann)
31f8494 [Qt] add BIP70 payment request size DoS protection for URIs (Philip Kaufmann)
2284ccb [Qt] remove dup lock that is done in SetAddressBook() (Philip Kaufmann)
1ec753f [Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLine (Philip Kaufmann)
814429d [Qt] add BIP70/BIP71 constants for all messages and mime types (Philip Kaufmann)
b82695b [Qt] make PaymentServer::ipcParseCommandLine void (Philip Kaufmann)
1577df9 Port of walletbackup.sh to Python. (mrbandrews)
6e6a36c contrib: show pull # in prompt for github-merge script (Wladimir J. van der Laan)
4c69ebe Add /opt/local/include/db48 only if it exists. (Pavel Janík)
4be639e Use RPC_INVALID_PARAMETER instead of RPC_WALLET_ERROR for invalid amount. No return at the end of void function. (Pavel Janík)
b93173d Move SendMoney() to rpcwallet.cpp. (Pavel Janík)
ACK.
Would be nice to get https://github.com/bitcoin/secp256k1/pull/156 / https://github.com/bitcoin/secp256k1/pull/157 / https://github.com/bitcoin/secp256k1/pull/158 in as well before bumping here as they affect bitcoin's build, but no big deal if they come later.
lightly tested (built and ran tests for several platforms but no substantial code review) ACK either way.