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 94bf538131a5eb5c837044b14789a29981b7e0e6.
Conflicts:
src/init.cpp
2013-11-14 00:44:48 -10:00
Patrick Strateman
9229434811
process received messages one at a time without sleeping between messages
2013-11-06 21:52:14 +01: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
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
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
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
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
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 7cc960f8f57e7fe90ee7aa0ccd3e3c6c89ec5a25.
2013-08-21 17:59:53 -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
07b32c2cb2
Merge branch 'exp-btc09backports' into exp-mark11b
...
Conflicts:
src/base58.h
2013-07-17 18:16:01 -10:00
Warren Togami
378ff026d0
Litecoin: Reduce MinTxFee to 0.02 LTC
2013-07-17 18:13:33 -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
Warren Togami
3ce5732926
Litecoin: DUST_SOFT_LIMIT=0.01, DUST_HARD_LIMIT=0.0001, 250KB block soft limit, 100KB tx size limit
2013-07-06 21:05:07 -10:00
Adrian Gallagher
94bf538131
Litecoin: Remove native coin generation.
2013-07-06 21:05:07 -10:00
Warren Togami
de45a48874
Litecoin: temporarily disable v2 block lockin until future 95% miner vote to coincide with planned spam tx removal
2013-07-06 21:05:07 -10:00
Warren Togami
d8b855df41
Litecoin: Litecoin does not need special compat rule before Aug 15th BDB hardfork deadline because our standard block size is already comfortably 250KB.
2013-07-06 21:05:07 -10:00
Warren Togami
8bc9dbd316
Litecoin: BIP50 short-term limits to avoid 10,000 BDB lock until 15 August 2013
2013-07-06 21:05:07 -10:00
Warren Togami
0d1d058451
Litecoin: IsDust() detection disabled, allows any valid dust to be relayed. The fees imposed on each dust txo is considered sufficient spam deterrant.
2013-07-06 21:05:07 -10:00
Warren Togami
3a9b5c718c
Litecoin: BIP16 began October 1st, 2012. BIP30 was never violated, make permanent.
2013-07-06 21:05:07 -10:00
coblee
164ae00f46
Litecoin: Fix zeitgeist2 attack thanks to Lolcust and ArtForz. This fixes an issue where a 51% attack can change difficulty at will. Go back the full period unless it's the first retarget after genesis.
2013-07-06 21:05:07 -10:00
coblee
db4d8e21d9
Litecoin: improve dust spamming prevention algorithm to add base fee for each output that's less than a CENT
2013-07-06 21:05:07 -10:00
coblee
2db43142bc
Litecoin: Add mininput to deal with dust spam. By default, mininput is set to 0.0001. This means that create transaction will ignore any transactions with an output value less than 0.0001. You can override the default by passing in -mininput on startup or by calling setmininput.
...
Historically this patch allowed wallets to perform without delay after the dust spam attack during November 2011.
2013-07-06 21:05:06 -10:00
coblee
0b646aed42
Litecoin: Protocol, genesis and parameters * 2.5 minute average between blocks * 3.5 days between diff changes * 84 million coin limit * Addresses begin with L
2013-07-06 21:05:06 -10:00
Warren Togami
2acab1baf1
Litecoin: Scrypt n=1024 Pow hash based upon Colin Percival's Tarnsnap (2009)
...
Modified by Artforz, coblee, and pooler
2013-07-06 21:05:06 -10:00
Jeff Garzik
cb3076a3da
Log reason for non-standard transaction rejection
2013-07-05 23:53:06 -10:00
Peter Todd
7cc960f8f5
Truncate oversize 'tx' messages before relaying/storing.
...
Fixes a memory exhaustion attack on low-memory peers.
2013-06-25 09:59:31 -04:00
Pieter Wuille
95c7db3dbf
More bestblock records in wallets
...
Write bestblock records in wallets:
* Every 20160 blocks synced, no matter what (before: none during IBD)
* Every 144 blocks after IBD (before: for every block, slow)
* When creating a new wallet
* At shutdown
This should result in far fewer spurious rescans.
2013-05-22 20:59:36 +02:00
Pieter Wuille
2ec349bc42
CreateNewBlock performance improvements
2013-05-21 03:53:32 +02:00
Gavin Andresen
33edd0a477
Merge pull request #2577 from gavinandresen/fee_bandaid
...
Treat dust outputs as non-standard, un-hardcode TX_FEE constants
2013-05-04 10:15:39 -07:00
Gavin Andresen
000dc55181
Un-hardcode TX_FEE constants
...
Allow setting of MIN_TX_FEE / MIN_RELAY_TX_FEE with
-mintxfee / -mintxrelayfee
Default values are the same (0.0001 BTC).
2013-05-03 10:54:31 -04:00
Gavin Andresen
8de9bb53af
Define dust transaction outputs, and make them non-standard
2013-05-03 10:52:09 -04:00
Pieter Wuille
360cfe142c
Allow the default key to be unavailable
...
This solves the issue where no default key can be added after -salvagewallet.
2013-04-25 19:36:10 +02:00
Pieter Wuille
97e7901a3a
Do not invoke DoS for non-canonical sigs
2013-04-18 22:49:23 +02:00
Pieter Wuille
20d0810f30
Require strictly-standard encodings in mempool
2013-04-14 00:17:49 +02:00
Pieter Wuille
1657c4bc49
Use a uint256 for bnChainWork
...
Every block index entry currently requires a separately-allocated
CBigNum. By replacing them with uint256, it's just 32 bytes extra
in CBlockIndex itself.
This should save us a few megabytes in RAM, and less allocation
overhead.
2013-04-12 12:17:28 +02:00
Gavin Andresen
f158e363a4
Merge pull request #2478 from sipa/fullhash
...
Always print full hashes (tx, block, inv)
2013-04-09 10:57:16 -07:00
Pieter Wuille
6ed71b5e4f
Make sure we always have a node to do IBD from
...
This introduces the concept of the 'sync node', which is the one we
asked for missing blocks. In case the sync node goes away, a new one
will be selected.
For now, the heuristic is very simple, but it can easily be extended
later to add better policies.
2013-04-07 19:19:13 +02:00
Pieter Wuille
1c06aa98c6
Always print full hashes (tx, block, inv)
2013-04-07 03:43:55 +02:00
Philip Kaufmann
b001c87126
small indentation, space, formatting fixes (no code changes)
2013-04-06 02:29:33 +02:00
Gavin Andresen
aaf47eac3a
Merge pull request #2423 from TheBlueMatt/limitedmapalreadyaskedfor
...
Limited mapAlreadyAskedFor
2013-04-03 18:31:35 -07:00
Gavin Andresen
a0a437c86a
Merge pull request #2357 from gavinandresen/shutdowncleanup
...
Thread / shutdown cleanup
2013-04-03 18:25:00 -07:00
Gavin Andresen
1c4f02139c
Merge pull request #2453 from sipa/txstats
...
Update transaction statistics
2013-04-03 18:23:50 -07:00