10129 Commits

Author SHA1 Message Date
cryptogera
3cbc348ca8 Automated commit 2024-06-19 06:04:09 +00:00
Adrian Gallagher
0b47699b90
Minor changes for 0.15 (#445)
* Litecoin: Branding

* Litecoin: Update man files

* Litecoin: Update Qt translations
2018-02-27 11:37:55 +11:00
Adrian Gallagher
23c519fe2e
Litecoin: Disable RBF UI 2018-02-08 03:11:54 -08:00
Nirmit Patel
f496412ed8 Fix incorrect comment relating to STALE_CHECK_INTERVAL (#434) 2018-02-04 09:48:05 +11:00
Adrian Gallagher
8246d7876e
Litecoin: Disable mempool replacement by default and update tests 2018-01-28 21:47:06 -08:00
Adrian Gallagher
98d3c15325
Litecoin: Update seeds 2018-01-19 17:55:27 -08:00
Adrian Gallagher
42dddc2f9e
Litecoin: Adjust chainparams and blockchain size 2018-01-19 16:18:35 -08:00
Adrian Gallagher
11fd90dea3
Litecoin: Adjust STALE_CHECK_INTERVAL value for DoS_tests 2018-01-18 17:02:50 -08:00
Adrian Gallagher
d4a9d24930
Litecoin: Fix tests 2018-01-18 17:02:44 -08:00
Adrian Gallagher
98d755d140
Litecoin: Relax minrelayfee to prepare for fee drop in next release 2018-01-18 16:28:34 -08:00
ppm0
3fd09de6f0
change DEFAULT_MAX_MEMPOOL_SIZE to 300(MB) (#411)
issue #410
2018-01-18 16:28:28 -08:00
spl0i7
c20788a13e
freebsd compilation fix (#416) 2018-01-18 16:28:24 -08:00
Valtteri Koskivuori
dfefdeab8f
cherry-pick 1ec0c0a01c316146434642ab2f14a7367306dbec from BTC repo to fix build on macOS (#419) 2018-01-18 16:28:22 -08:00
Charlie Lee
a9275c8d10
Litecoin: Rename mLTC/μLTC to lites/photons. (#375) 2018-01-18 16:28:13 -08:00
Adrian Gallagher
83d36e7e24
Litecoin: Update Qt translations 2018-01-18 16:28:06 -08:00
Adrian Gallagher
b6a8a1b28d
Litecoin: Update chainparams and blockchain size 2018-01-18 16:28:03 -08:00
Adrian Gallagher
98dcbd7856
Litecoin: Update hardcoded seeds 2018-01-18 16:28:00 -08:00
Romano
d8b8d96d23
Litecoin: enable support for SSE2 instructions in scrypt via configure --enable-sse2 (#362) 2018-01-18 16:27:56 -08:00
Adrian Gallagher
da8306292d
Litecoin: Adjust splashscreen for testnet/regtest 2018-01-18 16:27:55 -08:00
Adrian Gallagher
231fb558a9
Litecoin: Fix build system 2018-01-18 16:27:51 -08:00
Adrian Gallagher
53aa681e0d
Litecoin: Fix various tests 2018-01-18 16:27:47 -08:00
Charlie Lee
e1ec1a548a
Set final alert message for Litecoin 2018-01-18 16:27:43 -08:00
romanornr
e9801c248d
Litecoin: Zeitgeist2 bool fshift bnNew.bits() 2018-01-18 16:27:41 -08:00
Adrian Gallagher
293d7cac1d
Litecoin: Adjust fee system
# Conflicts:
#	src/policy/policy.h
#	src/test/transaction_tests.cpp
#	src/wallet/wallet.h
#	test/functional/abandonconflict.py
#	test/functional/bumpfee.py
2018-01-18 16:27:39 -08:00
Adrian Gallagher
ec665bae20
Litecoin: Branding
# Conflicts:
#	.gitignore
#	contrib/seeds/README.md
#	doc/README.md
#	doc/README_windows.txt
#	doc/release-process.md
#	qa/rpc-tests/README.md
#	src/Makefile.qt.include
#	src/Makefile.qttest.include
#	src/Makefile.test.include
#	src/bitcoind.cpp
#	src/qt/forms/intro.ui
#	src/qt/test/test_main.cpp
#	src/rpc/mining.cpp
#	src/rpc/rawtransaction.cpp
#	src/validation.cpp
#	src/wallet/rpcdump.cpp
#	src/wallet/rpcwallet.cpp
2018-01-18 16:27:37 -08:00
Adrian Gallagher
a5d4ed049f
Litecoin: Fix copyright year value 2018-01-18 16:27:35 -08:00
Adrian Gallagher
b41ecc6feb
Litecoin: Protocol and default settings
0) Adjust BIP16 & BIP30 enforcement values

1) Reduce amount that peers can adjust our time to eliminate an attack vector. Thanks to
coblee for this fix.

2) Zeitgeist2 patch - 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.

3) Avoid overflow in CalculateNextWorkRequired(). Thanks to pooler for the overflow fix.

4) SegWit ContextualCheckBlockHeader adjustment and extra coverage

5) Reject peer proto version below 70002. Thanks to wtogami for this patch.

6) Adjust default settings for Litecoin
2018-01-18 16:27:33 -08:00
Xinxi Wang
837ee5b597
Litecoin: M prefix added for script addresses 2018-01-18 16:27:29 -08:00
ultragtx
ddbdcd482a
Litecoin: Fix various tests
# Conflicts:
#	.travis.yml
#	qa/README.md
#	qa/pull-tester/rpc-tests.py
#	qa/rpc-tests/test_framework/test_framework.py
#	src/test/README.md
#	src/test/blockencodings_tests.cpp
#	src/test/main_tests.cpp
#	src/test/pow_tests.cpp
#	src/test/test_bitcoin.cpp
#	test/functional/fundrawtransaction.py
#	test/functional/multi_rpc.py
#	test/functional/p2p-compactblocks.py
#	test/functional/test_framework/mininode.py
#	test/functional/test_framework/util.py
2018-01-18 16:27:25 -08:00
Martin Smith
dd764bb478
Litecoin: Add Litecoin logos and icons
# Conflicts:
#	share/pixmaps/nsis-header.bmp
#	share/pixmaps/nsis-wizard.bmp
2018-01-18 16:27:22 -08:00
shaolinfry
166fcb2aec
Litecoin: Add scrypt N=1024 PoW
# Conflicts:
#	src/txdb.cpp
2018-01-18 16:27:20 -08:00
shaolinfry
5c06f19e31
Litecoin: Adjust chain parameters 2018-01-18 16:27:13 -08:00
Cory Fields
8195cb0d7f rpc: further constrain the libevent workaround
The bug was introduced in 2.1.6-beta, versions before that don't need the
workaround.

Github-Pull: #11593
Rebased-From: 97932cd2689659addfbb58dc6148928b73af3bd0
2017-11-02 15:31:39 -04:00
Cory Fields
34153a7e4a rpc: work-around an upstream libevent bug
A rare race condition may trigger while awaiting the body of a message, see
upsteam commit 5ff8eb26371c4dc56f384b2de35bea2d87814779 for details.

This may fix some reported rpc hangs/crashes.

Github-Pull: #11593
Rebased-From: 6b58360f9b64eb0b680a662fdfd590e47f115f44
2017-11-02 15:31:18 -04:00
Suhas Daftuar
fc308a6cdb Add unit test for stale tip checking
Github-Pull: #11560
Rebased-From: 626291508c433488439b662f2e88882048fb59fb
2017-11-02 15:18:56 -04:00
João Barbosa
2ed0647ac1 Add CConnmanTest to mutate g_connman in tests
Github-Pull: #11560
Rebased-From: 83df25736ebaa23777e965d265ed677a8d79f23f
2017-11-02 15:18:56 -04:00
Suhas Daftuar
a607a95d81 Connect to an extra outbound peer if our tip is stale
If our tip hasn't updated in a while, that may be because our peers are
not relaying blocks to us that we would consider valid. Allow connection
to an additional outbound peer in that circumstance.

Also, periodically check to see if we are exceeding our target number of
outbound peers, and disconnect the one which has least recently
announced a new block to us (choosing the newest such peer in the case
of tie).

Github-Pull: #11560
Rebased-From: ac7b37cd2bd612a64a4009ba82f1cd1d57f37434
2017-11-02 15:18:56 -04:00
Suhas Daftuar
459f2db425 Track tip update time and last new block announcement from each peer
Github-Pull: #11560
Rebased-From: db32a6589720e5b15931cef82e477118dfd92669
2017-11-02 15:18:56 -04:00
Suhas Daftuar
49bf090185 net: Allow connecting to extra outbound peers
Github-Pull: #11560
Rebased-From: 2d4327db1973a354e9e4153de6958d49120fcde8
2017-11-02 15:18:56 -04:00
Matt Corallo
4c82cea99b Use a sensible default for blockmaxweight
No sensible user will ever keep the default settings here, so not
having sensible defaults only serves to screw users who are
paying less attention, which makes for terrible defaults.

Github-Pull: #11100
Rebased-From: 3dc263c9b9068ee9793b6c7a0023eff16d70fb8f
2017-11-02 15:18:56 -04:00
Matt Corallo
7871a7d3be Deprecate confusing blockmaxsize, fix getmininginfo output
* This removes block-size-limiting code in favor of GBT clients
  doing the limiting themselves (if at all).
* -blockmaxsize is deprecated and only used to calculate an implied
  blockmaxweight, addressing confusion from multiple users.
* getmininginfo's currentblocksize return value was returning
  garbage values, and has been removed, also removing a
  GetSerializeSize call in some block generation inner loops and
  potentially addressing some performance edge cases.

Github-Pull: #11100
Rebased-From: ba206d2c63a8d3cbd4a8dd47e9ef126af1bb3bb9
2017-11-02 15:18:56 -04:00
Matt Corallo
92d6105c4e Reject headers building on invalid chains by tracking invalidity
This tracks the set of all known invalid-themselves blocks (ie
blocks which we attempted to connect but which were found to be
invalid). This is used to cheaply check if new headers build on an
invalid chain.

While we're at it we also resolve an edge-case in invalidateblock
on pruned nodes which results in them needing a reindex if they
fail to reorg.

Github-Pull: #11531
Rebased-From: 015a5258adffb0cf394f387a95ac9c8afc34cfc3
2017-11-02 13:21:07 -04:00
Matt Corallo
51001d684b Accept unrequested blocks with work equal to our tip
This is a simple change that makes our accept requirements the
same as our request requirements, (ever so slightly) further
decoupling our consensus logic from our FindNextBlocksToDownload
logic in net_processing.

Github-Pull: #11531
Rebased-From: 932f118e6a3779bb3d6c3cc83963cf34ac150e42
2017-11-02 13:20:53 -04:00
Matt Corallo
c6e4d0ce82 Stop always storing blocks from whitelisted peers
There is no reason to wish to store blocks on disk always just
because a peer is whitelisted. This appears to be a historical
quirk to avoid breaking things when the accept limits were added.

Github-Pull: #11531
Rebased-From: 3d9c70ca0fd5d42f31114b689714af1825f0ed30
2017-11-02 13:20:45 -04:00
practicalswift
ec8dedff46 net: Add missing lock in ProcessHeadersMessage(...)
Reading the variable mapBlockIndex requires holding the mutex cs_main.

The new "Disconnect outbound peers relaying invalid headers" code
added in commit 37886d5e2f9992678dea4b1bd893f4f10d61d3ad and merged
as part of #11568 two days ago did not lock cs_main prior to accessing
mapBlockIndex.

Github-Pull: #11578
Rebased-From: 2530bf27b72e53cc6ffec27de35f3b487984833d
2017-11-02 13:20:18 -04:00
Suhas Daftuar
59b210d9a7 Disconnect outbound peers relaying invalid headers
Github-Pull: #11568
Rebased-From: 37886d5e2f9992678dea4b1bd893f4f10d61d3ad
2017-11-02 13:19:57 -04:00
Suhas Daftuar
fc966bbd2b moveonly: factor out headers processing into separate function
ProcessMessages will now return earlier when processing headers
messages, rather than continuing on (and do nothing).

Github-Pull: #11568
Rebased-From: 4637f18522429473e68f6f512a03040e121a446d
2017-11-02 13:19:47 -04:00
Suhas Daftuar
e3272242e2 Add unit test for outbound peer eviction
Github-Pull: #11490
Rebased-From: e065249c014a070a8799b2ff947af5b8f012c5c1
2017-11-02 13:18:44 -04:00
Suhas Daftuar
9961abf9e4 Permit disconnection of outbound peers on bad/slow chains
Currently we have no rotation of outbound peers.  If an outbound peer
stops serving us blocks, or is on a consensus-incompatible chain with
less work than our tip (but otherwise valid headers), then we will never
disconnect that peer, even though that peer is using one of our 8
outbound connection slots.  Because we rely on our outbound peers to
find an honest node in order to reach consensus, allowing an
incompatible peer to occupy one of those slots is undesirable,
particularly if it is possible for all such slots to be occupied by such
peers.

Protect against this by always checking to see if a peer's best known
block has less work than our tip, and if so, set a 20 minute timeout --
if the peer is still not known to have caught up to a chain with as much
work as ours after 20 minutes, then send a single getheaders message,
wait 2 more minutes, and if a better header hasn't been received by then,
disconnect that peer.

Note:

- we do not require that our peer sync to the same tip as ours, just an
equal or greater work tip.  (Doing otherwise would risk partitioning the
network in the event of a chain split, and is also unnecessary.)

- we pick 4 of our outbound peers and do not subject them to this logic,
to be more conservative. We don't wish to permit temporary network
issues (or an attacker) to excessively disrupt network topology.

Github-Pull: #11490
Rebased-From: 5a6d00c6defc587e22c93e63029fdd538ce8858d
2017-11-02 13:18:34 -04:00
Suhas Daftuar
bf191a7183 Disconnecting from bad outbound peers in IBD
When in IBD, we'd like to use all our outbound peers to help us
sync the chain.  Disconnect any outbound peers whose headers have
insufficient work.

Github-Pull: #11490
Rebased-From: c60fd71a65e841efe187992f46c583a704cc37f5
2017-11-02 13:18:23 -04:00