Commit Graph

4109 Commits

Author SHA1 Message Date
Gregory Maxwell
0e81091263 More fixes for blockchain corruption on OSX.
As we'd previously learned, OSX's fsync is a data eating lie.

Since 0.8.4 we're still getting some reports of disk corruption on
 OSX but now all of it looks like the block files have gotten out of
 sync with the database. It turns out that we were still using fsync()
 on the block files, so this isn't surprising.
2013-09-16 10:50:43 -10:00
Warren Togami
36661955ad Silence useless warning in src/json/json_spirit_writer_template.h to make important warnings easier to see.
warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
2013-09-14 15:10:29 -10:00
Charlie Lee
08ed7a26a9 For getnetworkhashps, use min/max to calculate the block times. 2013-09-14 02:06:24 +08:00
Charlie Lee
603a53712d Merge pull request #69 from pooler/master-0.8
Use nChainWork in GetNetworkHashPS()
2013-09-13 02:44:22 -07:00
Warren Togami
329f177677 Litecoin version 0.8.5.1 2013-09-11 17:46:33 -10:00
Pieter Wuille
1a9a2d0880 Fix out-of-bounds check 2013-09-11 17:17:16 -10:00
Gregory Maxwell
2a22054025 Longer term workaround for chainstate corruption from negative versions.
This also makes negative transaction versions non-standard.

This avoids an issue triggered in Bitcoin block 256818 where transactions with
negative version numbers were incorrectly serialized into the UTXO set.

On restart nodes detect the inconsistency and refuse to start so long as
a block with these transactions is inside the self-consistency check
window, logging "coin database inconsistencies found". The software
recommends reindexing, but reindexing does not correct the problem.

This should be fixed by changing the chainstate serialization, but
working around it seems harmless for now because the version is not
used by any network rule currently.

A patch free workaround is to start with -checklevel=2 which skips
the consistency checks, but the IsStandard change is important for
miners in order to protect unpatched nodes.
2013-09-09 00:14:43 -10:00
pooler
bfb4d29fa9 Use nChainWork in GetNetworkHashPS() 2013-08-29 18:21:44 +02:00
Warren Togami
4be9f4d40e Litecoin version 0.8.4.1 2013-08-22 01:49:23 -10:00
Peter Todd
218e2ea912 Don't waste work on slow peers until they catch up 2013-08-22 01:49:23 -10:00
Peter Todd
a42627b5ec Track blocks requested by peers 2013-08-22 01:49:23 -10:00
oeysteinhansen
01a554ea1f Litecoin: Update Norwegian bitcoin_nb.ts
Seems that the translater has problems with words splitt with the '$amp;' key.
Update bitcoin_nb.ts Changed word Bit-coin to litecoin
2013-08-22 00:46:17 -10:00
RobzInadE
ca2c0f1ef5 Litecoin: Update Swedish bitcoin_sv.ts
Fixed a missed Bitcoin reference.
2013-08-22 00:45:33 -10:00
Warren Togami
1c83c4eb52 Litecoin: Checkpoint at block 409004 2013-08-21 23:11:55 -10:00
Gregory Maxwell
d3f27c5b81 Update the bloom state on the real object, not the temporary one.
This resulted in just passing all transactions to filtered wallets
which worked surprisingly well, except where it didn't.
2013-08-21 19:58:42 -10:00
Pieter Wuille
71b27467bd Fix non-standard disconnected transactions causing mempool orphans
Conflicts:
	src/main.cpp
2013-08-21 19:58:35 -10:00
Gregory Maxwell
0a48b680f8 Performance optimization for bloom filters.
This reduces a peer's ability to attack network resources by
 using a full bloom filter, but without reducing the usability
 of bloom filters.  It sets a default match everything filter
 for peers and it generalizes a prior optimization to
 cover more cases.
2013-08-21 19:58:21 -10:00
Warren Togami
36c86137ef Merge commit 'a41a0ad07bdc1f6fd67abcad1d6ce1bc74c1bf76' as 'src/leveldb' 2013-08-21 19:45:48 -10:00
Warren Togami
a41a0ad07b Squashed 'src/leveldb/' content from commit be1b0ff
git-subtree-dir: src/leveldb
git-subtree-split: be1b0ff1fcd6ad820a7fd111ac671fb51cc68001
2013-08-21 19:45:48 -10:00
Pieter Wuille
adf0e05d05 Remove inline LevelDB to prepare for git-subtree version 2013-08-21 19:36:54 -10:00
Gavin Andresen
0d90ac1b56 Simplify storage of orphan transactions
Orphan transactions were stored as a CDataStream pointer;
this changes the mapOrphanTransactions data structures to
store orphans as a CTransaction.

This also fixes CVE-2013-4627 by always re-serializing
transactions before relaying them.
2013-08-21 18:00:02 -10:00
Gavin Andresen
b1f636b161 Revert "Truncate oversize 'tx' messages before relaying/storing."
This reverts commit 7cc960f8f5.
2013-08-21 17:59:53 -10:00
Gavin Andresen
5ee73ff86c Make RPC password resistant to timing attacks
Fixes issue#2838; this is a tweaked version of pull#2845 that
should not leak the length of the password and is more generic,
in case we run into other situations where we need
timing-attack-resistant comparisons.
2013-08-21 17:59:45 -10:00
Charlie Lee
4fa62daaf9 Merge pull request #64 from pooler/master-0.8
Add a height parameter to getnetworkhashps
2013-08-06 03:11:48 -07:00
pooler
7446c4adc9 Update description of GetNetworkHashPS() 2013-08-06 11:34:14 +02:00
Michael Ford
8cbd4c7132 Update HomeBrew osx makefile patch to account for recent changes to makefile 2013-08-05 11:31:32 -10:00
coblee
dbc5f6d7f4 Litecoin: Fix alert test
Protocol version is now 70002. So 70001 alerts no longer apply to us. But the test is still testing the alert notify behavior correctly because there is still one alert that applies.
2013-08-05 00:58:47 -07:00
pooler
de5250f938 Add a height parameter to getnetworkhashps 2013-08-04 23:09:05 +02:00
Warren Togami
1b5cb0866e Litecoin version 0.8.3.7 2013-07-30 15:17:52 -10:00
Peter Todd
176e54c5f7 Add NODE_BLOOM service bit and option to disable bloom filters 2013-07-30 15:16:45 -10:00
Warren Togami
1877fb9aae Litecoin: Unit test for scrypt_1024_1_1_256() hash
Uncomment the block.print(); in main.cpp below printf("received block ..."
if you want to capture raw input bytes and PoW hashes for testing.
2013-07-29 01:59:48 -10:00
Baruch Rutman
edb1e32bc1 Litecoin: Fix Hebrew translations, replace all bitcoin references with litecoin. 2013-07-29 01:59:45 -10:00
Warren Togami
6c984620fa Litecoin version 0.8.3.6 2013-07-17 18:19:44 -10:00
Warren Togami
07b32c2cb2 Merge branch 'exp-btc09backports' into exp-mark11b
Conflicts:
	src/base58.h
2013-07-17 18:16:01 -10:00
Warren Togami
c96cc64399 Litecoin: Add aspect, coblee, face, thrasher, wtogami to gitian download scripts. 2013-07-17 18:13:33 -10:00
Anton Yemelyanov
4fdc6ba448 Litecoin: Force splash text to look correct with Win32 font scaling 2013-07-17 18:13:33 -10:00
Anton Yemelyanov
ba332eed0e Litecoin: All-resolution pixmap, to make win32 builds determisitic again 2013-07-17 18:13:33 -10:00
Rama McIntosh
ea1c057b67 Litecoin: MacOS X icon and deploy script 2013-07-17 18:13:33 -10:00
Warren Togami
378ff026d0 Litecoin: Reduce MinTxFee to 0.02 LTC 2013-07-17 18:13:33 -10:00
Warren Togami
14c302d283 Litecoin: We don't use this script to verify GPG signatures. 2013-07-17 18:13:33 -10:00
Anton Yemelyanov
ed20c26ef7 Litecoin: Splash layout and leather wallet artwork 2013-07-17 18:13:33 -10:00
Anton Yemelyanov
bd7c864288 Litecoin: Icons and Artwork 2013-07-17 18:13:33 -10:00
Warren Togami
ed725643ca Litecoin: Documentation s/bitcoin/litecoin/ 2013-07-17 18:13:26 -10:00
Warren Togami
0331f6e029 Litecoin: Localization tweaks for 0.8.3.x in src/qt/locale/*.ts 2013-07-13 02:13:35 -10:00
Warren Togami
25cf33b01d Litecoin: User-visible strings s/bitcoin/litecoin/
Source filenames, comments and other aspects hidden to end-users are not renamed in an effort to minimize the diff.
2013-07-13 02:13:35 -10:00
coblee
5fd2fde9e4 Litecoin: Fix alert tests to use Litecoin alert key. 2013-07-13 02:13:35 -10:00
Warren Togami
56af6c44a5 Litecoin: Tests 2013-07-13 02:13:35 -10:00
Warren Togami
4014afe2e6 Litecoin: Build and Makefile changes 2013-07-13 02:13:28 -10:00
Pieter Wuille
3a619b01b3 Fix minor backward incompatibility
The key refactor changed the way unencrypted private keys with compressed
public key are stored in the wallet. Apparently older versions relied on
this to verify the correctness of stored keys.

Note that earlier pre-release versions do risk creating wallets that can
not be opened by 0.8.3 and earlier.
2013-07-13 01:14:23 -10:00
Warren Togami
4f21807de8 Litecoin: Runtime paths s/bitcoin/litecoin/ 2013-07-06 21:05:08 -10:00