Commit Graph

4137 Commits

Author SHA1 Message Date
Jeff Garzik
e2bc2dff95 Pass check level, check depth to VerifyDB() 2013-11-14 00:44:48 -10:00
Jeff Garzik
8687a0ebbc RPC: add getbestblockhash, to return tip of best chain 2013-11-14 00:44:48 -10:00
Warren Togami
892b16f07a Litecoin: s/BitcoinMiner/LitecoinMiner/ and detect scrypt implementation 2013-11-14 00:44:48 -10:00
Warren Togami
d4c56161ae Revert "Litecoin: Remove native coin generation."
This reverts commit 94bf538131.

Conflicts:
	src/init.cpp
2013-11-14 00:44:48 -10:00
Warren Togami
ea24796726 Merge pull request #86 from wtogami/clangfix
Remove redundant insert method in serialize.
2013-11-12 10:46:48 -08:00
Warren Togami
0801244768 Upgrade to Bitcoin LevelDB 1.13
Merge commit '2a6cdcf6e57922fec0219b5966df85c8417d6ba3' into master-0.8
2013-11-10 21:13:38 -10:00
Warren Togami
2a6cdcf6e5 Squashed 'src/leveldb/' changes from be1b0ff..be91006
936b461 Merge upstream LevelDB 1.13.
748539c LevelDB 1.13

git-subtree-dir: src/leveldb
git-subtree-split: be9100673b05cec1662a54d0b7a59e4317fdda86
2013-11-10 21:13:38 -10:00
Pieter Wuille
3efed50982 Remove redundant insert method in serialize.
This seems to cause problems on recent clang, and looks totally
redundant and unused.

The const_iterator version is identical to the vector::const_iterator
one (which is a typedef thereof). Marking it private (instead of
removing) compiles fine, so this version is effectively unused even.
2013-11-08 15:45:58 -10:00
Warren Togami
d05e36e2ef Merge pull request #84 from pooler/logtimestamp_def
make -logtimestamps default on and rework help-message
2013-11-08 17:31:11 -08:00
Warren Togami
b64e8648be Merge pull request #85 from pooler/processgetdata
Reduce latency in network processing
2013-11-08 17:30:45 -08:00
Patrick Strateman
9229434811 process received messages one at a time without sleeping between messages 2013-11-06 21:52:14 +01:00
Philip Kaufmann
e56355b980 make -logtimestamps default on and rework help-message 2013-11-05 21:49:43 +01:00
Warren Togami
1d63195f3f Litecoin: mingw32 -mstackrealign to prevent SSE2 misalignment crashes 2013-11-02 10:11:16 -10:00
Luke Dashjr
2b22cea3a1 RPC: getblock(): Accept 2nd "verbose" parameter, similar to getrawtransaction, but defaulting to 1 for backward compatibility 2013-11-01 03:53:27 -10:00
Warren Togami
40805d0918
Disconnect nodes older than protocol version 70002 (Litecoin 0.8.3.7)
Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
2013-10-30 17:16:30 -10:00
Warren Togami
4423dcabd2 Litecoin: Restore USE_BUILD_INFO=1 in gitian-win32.yml 2013-10-30 15:16:27 -10:00
Warren Togami
803ed8f5e0
Litecoin: SSE2 scrypt unit test coverage 2013-10-26 15:27:35 -10:00
Warren Togami
0fef3d3fdd Litecoin: Upgrade gitian win32 to Precise 12.04 and boost-1.54
mingw upgrade allows more hardening, compiler bug fixes and possibily win64 later.
Rename deps .zip files to be more consistent in revision format.

Litecoin: Reuse bitcoin-0.9 win32 deps.
2013-10-26 15:26:25 -10:00
Warren Togami
cd8eeccc2d Litecoin: Runtime detection of SSE2 32bit x86 for Scrypt
* x86_64 and Intel MacOS X always uses scrypt-sse2, non-x86 uses scrypt-generic.
* x86 (not Mac) detects cpuid features and chooses sse2 or generic during runtime.

How to Build with SSE2 Support
==============================
* make litecoind with USE_SSE2=1
* qmake with USE_SSE2=1
2013-10-26 15:26:25 -10:00
pooler
4b82dceb7b Litecoin: Add a simplified SSE2 version of scrypt
pooler: Ported from tarsnap upstream, fixed aliasing issue
cfields: break apart sse2/non-sse2 into separate objects
2013-10-26 15:26:25 -10:00
Peter Todd
3689088c6d
Enable NODE_BLOOM by default
Also change behavior to simply disconnect peers, rather than DoS-ban
them.
2013-10-26 02:41:03 -04:00
Ashley Holman
4e0f31f9a0 Don't store or send blocks forked before last checkpoint. 2013-10-24 15:18:28 -10:00
Philip Kaufmann
3cb290066e special case DoS value == 0 in ProcessMessage()
- prevents unneeded log messages, which could make users think something
  bad was happening

Squashed: style-police code cleanup
2013-10-22 12:28:12 -10:00
phelixbtc
25c4b8732c Porting MinGW multithreading bugfix to makefile.mingw
Original fix:
https://github.com/bitcoin/bitcoin/commit
/8864019f6d88b13d3442843d9e6ebeb8dd938831
2013-10-22 12:04:22 -10:00
David Hill
7f1782105f Hurricane Electric uses block 2001:470::, not 2011:470:: 2013-10-14 17:45:44 -10:00
Philip Kaufmann
ffd7439799 exclude CreatePidFile() function on WIN32 as it is unused 2013-10-09 20:26:09 -10:00
Philip Kaufmann
513ec560d4 log start and end of Shutdown()
- could be helpful when debugging shutdown related problems

Rebased-by:   Warren Togami <wtogami@gmail.com>
Rebased-from: ced3c24816
2013-10-04 00:26:19 -10:00
Charlie Lee
3100416cb1 Fix compiler warning for getnetworkhashps. 2013-09-17 11:13:07 +08:00
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
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
Warren Togami
36c86137ef Merge commit 'a41a0ad07bdc1f6fd67abcad1d6ce1bc74c1bf76' as 'src/leveldb' 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