Commit graph

5003 commits

Author SHA1 Message Date
Wladimir J. van der Laan ac0b2393a4
Merge pull request #5351
3d0a1ce Process help and version arguments before datadir. (Pavel Janík)
2014-11-25 14:44:30 +01:00
Wladimir J. van der Laan 397b9011c9
Merge pull request #5241
a206950 Introduce separate flushing modes (Pieter Wuille)
51ce901 Improve chainstate/blockindex disk writing policy (Pieter Wuille)
2014-11-25 12:18:00 +01:00
Wladimir J. van der Laan 6f9e67aca7
Merge pull request #5358
3c77714 Make -proxy set all network types, avoiding a connect leak. (Gregory Maxwell)
2014-11-24 15:30:31 +01:00
Wladimir J. van der Laan 1ee685f984
Merge pull request #5154
730b1ed Check pindexBestForkBase for null (21E14)
2014-11-24 15:29:52 +01:00
Jonas Schnelli c5a2282855
[Qt, OSX] fix Qt4.8 compatibility with QProgressBar issue
Rebased-From: 7f33d2cebfde99ded12c711ef6bd77c91725cfb8
Github-Issue: #5344
2014-11-24 15:26:58 +01:00
Pieter Wuille a206950016 Introduce separate flushing modes 2014-11-24 15:15:41 +01:00
Pieter Wuille 51ce901aa3 Improve chainstate/blockindex disk writing policy
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.
2014-11-24 15:15:40 +01:00
Wladimir J. van der Laan f24bcce2ac
Merge pull request #1816
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)
2014-11-24 14:43:10 +01:00
Wladimir J. van der Laan 6582f323f0
Merge pull request #5224
f321d6b Add key generation/verification to ECC sanity check (Pieter Wuille)
d0c41a7 Add sanity check after key generation (Pieter Wuille)
2014-11-24 14:39:25 +01:00
Wladimir J. van der Laan dfc8e1432a
Merge pull request #5309
4574248 [Qt] minor ordering cleanup after new fee selection (Philip Kaufmann)
a01fa30 minor style cleanup after HTTP rest interface merge (Philip Kaufmann)
2014-11-24 14:35:50 +01:00
Gregory Maxwell 3c77714134 Make -proxy set all network types, avoiding a connect leak.
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.
2014-11-23 15:17:11 -08:00
dexX7 7357893396
Prioritize and display -testsafemode status in UI
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.
2014-11-23 13:10:31 +01:00
Pieter Wuille f321d6bfff Add key generation/verification to ECC sanity check 2014-11-23 10:47:39 +01:00
Pieter Wuille d0c41a7350 Add sanity check after key generation
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.
2014-11-23 10:47:39 +01:00
Pavel Janík e0535e15ab Remove misleading comment about testnet's message string. 2014-11-22 22:22:12 +01:00
Pavel Janík 3d0a1ce193 Process help and version arguments before datadir. 2014-11-22 20:46:11 +01:00
21E14 730b1ed1a0 Check pindexBestForkBase for null 2014-11-22 00:12:41 -05:00
Philip Kaufmann 1b2600a13a
Change MIT/X11 to MIT in license displayed in the program 2014-11-21 17:03:59 +01:00
Michael Ford fa94b9d562
Convert remaining comments in /src to doxygen format
- 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
2014-11-21 14:44:21 +01:00
Wladimir J. van der Laan f2ada138c2
Merge pull request #5170
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)
2014-11-21 14:33:22 +01:00
Wladimir J. van der Laan ca6fb4e885
Merge pull request #5247
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)
2014-11-21 14:21:56 +01:00
Wladimir J. van der Laan cb83af9937
Merge pull request #5318
77c38bb Truthier error message when rpcpassword is missing (Glenn Willen)
2014-11-21 13:53:57 +01:00
Wladimir J. van der Laan 4a106eeb33
qt: English translation update 2014-11-21 10:24:30 +01:00
Wladimir J. van der Laan db5308f447
Merge pull request #5322
aabe61c [Qt] explicitly call proxy in GUI settings SOCKS5 proxy (Philip Kaufmann)
2014-11-21 10:21:56 +01:00
Cory Fields f618577029 build: fix link error on some platforms. Fixes #5235
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).
2014-11-20 13:45:14 -05:00
Luke Dashjr b867e409e5 CreateNewBlock: Stick height in coinbase so we pass template sanity check 2014-11-20 15:32:49 +00:00
Wladimir J. van der Laan 5c4dffd188
Merge pull request #5270
57425a2 Check block header before accepting it. (Daniel Kraft)
2014-11-20 15:41:58 +01:00
Peter Todd ca8158719b Test the exact order of CHECKMULTISIG sig/pubkey evaluation
Possible with STRICTENC
2014-11-20 15:29:28 +01:00
Pieter Wuille 98b135f97f Make STRICTENC invalid pubkeys fail the script rather than the opcode.
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.
2014-11-20 15:29:26 +01:00
Pieter Wuille 3ba5ebc065
Merge pull request #5000
0391423 Discourage NOPs reserved for soft-fork upgrades (Peter Todd)
2014-11-20 15:27:39 +01:00
Wladimir J. van der Laan cf9c4887f1
Merge pull request #5324
72fb3d2 Update comments in src/rpc* to be doxygen compatible (Michael Ford)
2014-11-20 14:40:42 +01:00
Wladimir J. van der Laan 5c6b384502
Merge pull request #5320
e0a25c5 qt: Make askpassphrase dialog behave more sanely (Wladimir J. van der Laan)
2014-11-20 13:48:38 +01:00
Philip Kaufmann aabe61cb37 [Qt] explicitly call proxy in GUI settings SOCKS5 proxy
- to ensure a consistent wording between core and GUI
2014-11-20 12:45:38 +01:00
Philip Kaufmann 4574248f9f [Qt] minor ordering cleanup after new fee selection 2014-11-20 12:29:52 +01:00
Philip Kaufmann a01fa3035f minor style cleanup after HTTP rest interface merge
- no code changes
2014-11-20 12:29:19 +01:00
Wladimir J. van der Laan e0a25c54eb qt: Make askpassphrase dialog behave more sanely
Set minimum sizes appropriately, and make sure that they
are enforced. Replaces #5226.
2014-11-20 12:28:34 +01:00
Daniel Kraft 57425a2425 Check block header before accepting it.
Previously, AcceptBlockHeader did not check the header (in particular
PoW).  This made the client accept invalid-PoW-headers from peers in
headers-first sync.
2014-11-20 08:28:19 +01:00
Cory Fields 269efa30ed build: add quick consensus lib tests
They should be hooked up in other places as well, but this is a start.
2014-11-19 22:31:10 -05:00
Cory Fields cdd36c6c5c build: add --with-libs so that libs are optional 2014-11-19 22:31:10 -05:00
Cory Fields 2cf5f16c25 build: add libbitcoinconsensus files and hook up the lib build
Credit BlueMatt for libbitcoinsonsensus.h/cpp
2014-11-19 22:31:10 -05:00
Cory Fields e0077de5de build: make a distinction between static app ldflags and static lib ldflags
For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
2014-11-19 22:08:27 -05:00
Michael Ford 72fb3d295a Update comments in src/rpc* to be doxygen compatible 2014-11-20 10:19:39 +08:00
Luke Dashjr 60755dbf76 submitblock: Check for duplicate submissions explicitly 2014-11-20 00:15:17 +00:00
Luke Dashjr 9765a50cbd Implement BIP 23 Block Proposal 2014-11-20 00:15:16 +00:00
Glenn Willen 77c38bb5cc Truthier error message when rpcpassword is missing 2014-11-19 15:34:36 -08:00
Cozz Lovan c1c9d5b415 [Qt] Add Smartfee to GUI 2014-11-19 16:04:53 +01:00
Cozz Lovan e7876b2979 [Wallet] Prevent user from paying a non-sense fee 2014-11-19 16:04:53 +01:00
Cozz Lovan ed3e5e468c [Wallet] Add global boolean whether to pay at least the custom fee (default=true) 2014-11-19 16:04:53 +01:00
Cozz Lovan 0ed9675be4 [Wallet] Add global boolean whether to send free transactions (default=true) 2014-11-19 16:04:53 +01:00
Wladimir J. van der Laan 18832ff8e1
Merge pull request #5313
230f7a8 Remove unused ecwrapper code (Pieter Wuille)
2014-11-19 15:24:01 +01:00