5332 Commits

Author SHA1 Message Date
Adrian Gallagher
9d11a2dc6c
Litecoin: Add Testnet DNS seeder 2017-04-26 21:02:11 -07:00
Adrian Gallagher
2e0f83d0a2 Litecoin: Reset testnet (now testnet4) 2017-03-02 08:31:13 +11:00
thrasher
e7fc99a0c7 Merge pull request #283 from shaolinfry/fnd
Optimize and Cleanup CScript::FindAndDelete
2017-02-13 16:44:15 +11:00
Pieter Wuille
9d28bdf6e1 Make SCRIPT_VERIFY_CLEANSTACK a standardness requirement 2017-02-11 18:54:13 +00:00
Pieter Wuille
466c8d5be2 Add SCRIPT_VERIFY_CLEANSTACK (BIP62 rule 6)
Based on an earlier patch by Peter Todd, though the rules here are different
(P2SH scripts should not have a CLEANSTACK check before the P2SH evaluation).
2017-02-11 18:36:58 +00:00
Pieter Wuille
29699ccd09 No semantic change: reuse stack variable in P2SH evaluation 2017-02-11 18:26:24 +00:00
Patrick Strateman
b30a81f3ad Improve worst-case behavior of CScript::FindAndDelete
Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
2017-01-09 11:26:42 +00:00
shaolinfry
b0487957ad Unit test for CScript::FindAndDelete
Cherry-picked from bitcoin/e2a30bc9a9f7d2969e52632f8e8942a4e72f4ba6
credit gavin andresen
2017-01-09 11:25:26 +00:00
Patrick Strateman
2bcf063b1d Replace c-style cast with c++ style static_cast. 2017-01-09 11:23:23 +00:00
Patrick Strateman
8c95901609 Replace memcmp with std::equal in CScript::FindAndDelete
Function is stl; std::equal just makes more sense.
2017-01-09 11:23:17 +00:00
maiiz
0efb2730ee Fix relaypriority calculation error
Author: maiiz <maiiz@users.noreply.github.com>
Github-Issue: https://github.com/litecoin-project/litecoin/issues/247
Rebased-From: 94a34a5d951cee59ef9c9274c5ad49ac2a91ab8a

Conflicts:
	src/coins.cpp
2016-10-25 18:20:23 -07:00
Adrian Gallagher
40ce41c006 Litecoin: Fix build boost compilation error with C++11 2016-10-25 17:48:19 -07:00
Adrian Gallagher
e59c294d02 Revert "build: fix newer boost build with c++11"
This reverts commit b513bc41337c9c983acdc199ce9b42382c23b658.
2016-10-25 17:28:16 -07:00
ijcoe6ru
b513bc4133
build: fix newer boost build with c++11
This commit does the same as
bitcoin/bitcoin@a2b04ddfe6.
2016-06-27 09:18:09 +00:00
Gitju
bee2743c37 s/Litcoin/Litecoin/ 2016-06-22 09:37:29 +02:00
Loshan T
590630a817 Added IPv6 compatible DNSseed. 2016-02-17 19:26:34 +00:00
Adrian Gallagher
d1691e5991 Litecoin: Bump Gitian date and copyright year. 2016-01-02 09:55:24 +11:00
Adrian Gallagher
ba77fd9f9b Litecoin: Update Qt translations. 2015-12-03 12:58:23 +11:00
Flavien Charlon
508b43955c Update the 'test_IsStandard' unit test
The maximum length for the payload of an OP_RETURN output is now
80 bytes, and unit tests must be modified to account for the change.
2015-12-02 21:40:59 +11:00
Wladimir J. van der Laan
47db8118d7 Bump version to 0.10.4, add release notes 2015-12-02 21:40:33 +11:00
Daniel Cousens
4f51b7ddd8 *: alias -h for --help 2015-12-02 21:40:09 +11:00
Eric Lombrozo
9fc33c2abb Clarification of unit test build instructions. 2015-12-02 21:35:38 +11:00
Luke Dashjr
3979267180 Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) 2015-12-02 21:33:14 +11:00
MarcoFalke
89727808a3 [Qt] Raise debug window when requested
* Raise the debug window when hidden behind other windows
* Switch to the debug window when on another virtual desktop
* Show the debug window when minimized

This change is a conceptual copy of 5ffaaba and 382e9e2
2015-12-02 18:39:43 +11:00
Alex Morcos
f7e19810d2 Fix locking in GetTransaction.
GetTransaction needs to lock cs_main until ReadBlockFromDisk completes, the data inside CBlockIndex's can change since pruning.  This lock was held by all calls to GetTransaction except rest_tx.
2015-12-02 18:39:33 +11:00
Diego Viola
1ad4b0cf32 Fix spelling of Qt 2015-12-02 18:39:23 +11:00
Pieter Wuille
3e79703025 Squashed 'src/leveldb/' changes from 7d41e6f..20ca81f
20ca81f Merge pull request #9
7aa105e leveldb: Win32WritableFile without memory mapping

git-subtree-dir: src/leveldb
git-subtree-split: 20ca81f08fb7fa108923a091668e447dcf5c6b9d
2015-12-02 18:38:44 +11:00
Wladimir J. van der Laan
163fe03b87 qt: Final translations update on 0.10 branch
Translations for 0.12 have been opened, translations for 0.10 have been
closed.
2015-12-02 18:38:23 +11:00
Adrian Gallagher
c77a6f7bcc Merge pull request #226 from btcdrak/op_return80
Increase OP_ RETURN relay to 80 bytes
2015-11-30 00:09:12 +11:00
BtcDrak
658c70b693 Increase OP_ RETURN relay to 80 bytes 2015-11-29 00:13:22 +00:00
Esteban Ordano
b85dcd03f3 CLTV: Add more tests to improve coverage
Four cases included:

* The CLTV operand type mismatches the tx locktime. In the script it is
  1 (interpreted as block height), but in the tx is 500000000
  (interpreted as date)
* The stack is empty when executing OP_CLTV
* The tx is final by having only one input with MAX_INT sequence number
* The operand for CLTV is negative (after OP_0 OP_1 OP_SUB)

Rebased-From: cb54d17355864fa08826d6511a0d7692b21ef2c9
2015-11-28 23:50:54 +00:00
Peter Todd
3d468adb7c Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
Based on the earlier BIP66 soft-fork logic implemented by Pieter
Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b

Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917
2015-11-28 23:50:46 +00:00
Peter Todd
07b6e9428c Enable CHECKLOCKTIMEVERIFY as a standard script verify flag
Transactions that fail CLTV verification will be rejected from the
mempool, making it easy to test the feature. However blocks containing
"invalid" CLTV-using transactions will still be accepted; this is *not*
the soft-fork required to actually enable CLTV for production use.

Rebased-From: ffd75adce01a78b3461b3ff05bcc2b530a9ce994
2015-11-28 23:50:38 +00:00
Peter Todd
bbcf66536f Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)
<nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime>

Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be
locked until some block height or block time in the future is reached.

Only the logic and unittests are implemented; this commit does not have
any actual soft-fork logic in it.

Thanks to Pieter Wuille for rebase.

Credit goes to Gregory Maxwell for the suggestion of comparing the
argument against the transaction nLockTime rather than the current
time/blockheight directly.

Rebased-From: bc60b2b4b401f0adff5b8b9678903ff8feb5867b
2015-11-28 23:50:33 +00:00
Peter Todd
f1bba85b5b Move LOCKTIME_THRESHOLD to src/script/script.h
Will now be needed by CHECKLOCKTIMEVERIFY code.

Rebased-From: 48e9c57cf06352f890eac4285ae022d8746cf3fd
2015-11-28 23:50:29 +00:00
Peter Todd
46a66cf870 Make CScriptNum() take nMaxNumSize as an argument
While the existing numeric opcodes are all limited to 4-byte bignum
arguments, new opcodes will need different limits.

Rebased-From: 99088d60d8a7747c6d1a7fd5d8cd388be1b3e138
2015-11-28 23:50:22 +00:00
Adrian Gallagher
d02d31c478 Litecoin Core v0.10.3.0 2015-10-24 14:06:16 +11:00
Gregory Maxwell
71e70ffd83 Set TCP_NODELAY on P2P sockets.
Nagle appears to be a significant contributor to latency now that the static
 sleeps are gone.  Most of our messages are relatively large compared to
 IP + TCP so I do not expect this to create enormous overhead.

This may also reduce traffic burstyness somewhat.

Conflicts:
	src/net.cpp

Rebased-From: a4e28b3d1e5c95eb0c87f144851cd65048c3e0bc
Github-Pull: #6867
2015-10-24 12:40:20 +11:00
Adrian Gallagher
4edf63fbe9 Litecoin: Update NSBundle identifier for OSX notifications 2015-10-21 20:43:06 +11:00
Pavel Janík
d48da05049 Do not store more than 200 timedata samples.
Github-Pull: #6797
Rebased-From: 8be371db340b03dc03142c1bb3390fdfc84f56b4
2015-10-21 20:43:01 +11:00
Adrian Gallagher
09da4b1cd6 Litecoin: Cosmetic translation string changes. 2015-10-21 20:42:55 +11:00
Adrian Gallagher
a20b2ea6a0 Merge remote-tracking branch 'bitcoin/0.10' into master-0.10
Conflicts:
	README.md
	configure.ac
	src/clientversion.h
	src/qt/locale/bitcoin_be_BY.ts
	src/qt/locale/bitcoin_ca@valencia.ts
	src/qt/locale/bitcoin_cs.ts
	src/qt/locale/bitcoin_el_GR.ts
	src/qt/locale/bitcoin_eo.ts
	src/qt/locale/bitcoin_fa.ts
	src/qt/locale/bitcoin_fi.ts
	src/qt/locale/bitcoin_hr.ts
	src/qt/locale/bitcoin_hu.ts
	src/qt/locale/bitcoin_lt.ts
	src/qt/locale/bitcoin_pl.ts
	src/qt/locale/bitcoin_pt_BR.ts
	src/qt/locale/bitcoin_pt_PT.ts
	src/qt/locale/bitcoin_ru.ts
	src/qt/locale/bitcoin_sk.ts
	src/qt/locale/bitcoin_sl_SI.ts
	src/qt/locale/bitcoin_uk.ts
	src/test/alert_tests.cpp
2015-10-10 13:37:46 +11:00
Wladimir J. van der Laan
cf5bf5542a
Bump version to 0.10.3 2015-10-09 18:13:18 +02:00
Wladimir J. van der Laan
44d6bc8528
qt: Translations update before 0.10.3 2015-10-09 15:29:02 +02:00
Gregory Maxwell
1cea6b0dee
Test LowS in standardness, removes nuisance malleability vector.
This adds SCRIPT_VERIFY_LOW_S to STANDARD_SCRIPT_VERIFY_FLAGS which
 will make the node require the canonical 'low-s' encoding for
 ECDSA signatures when relaying or mining.

Consensus behavior is unchanged.

The rational is explained in a81cd96805ce6b65cca3a40ebbd3b2eb428abb7b:
 Absent this kind of test ECDSA is not a strong signature as given
 a valid signature {r, s} both that value and {r, -s mod n} are valid.
 These two encodings have different hashes allowing third parties a
 vector to change users txids.  These attacks are avoided by picking
 a particular form as canonical and rejecting the other form(s); in
 the of the LOW_S rule, the smaller of the two possible S values is
 used.

If widely deployed this change would eliminate the last remaining
 known vector for nuisance malleability on boring SIGHASH_ALL
 p2pkh transactions.  On the down-side it will block most
 transactions made by sufficiently out of date software.

Unlike the other avenues to change txids on boring transactions this
 one was randomly violated by all deployed bitcoin software prior to
 its discovery.  So, while other malleability vectors where made
 non-standard as soon as they were discovered, this one has remained
 permitted.  Even BIP62 did not propose applying this rule to
 old version transactions, but conforming implementations have become
 much more common since BIP62 was initially written.

Bitcoin Core has produced compatible signatures since a28fb70e in
 September 2013, but this didn't make it into a release until 0.9
 in March 2014; Bitcoinj has done so for a similar span of time.
 Bitcoinjs and electrum have been more recently updated.

This does not replace the need for BIP62 or similar, as miners can
 still cooperate to break transactions.  Nor does it replace the
 need for wallet software to handle malleability sanely[1]. This
 only eliminates the cheap and irritating DOS attack.

[1] On the Malleability of Bitcoin Transactions
Marcin Andrychowicz, Stefan Dziembowski, Daniel Malinowski, Łukasz Mazurek
http://fc15.ifca.ai/preproceedings/bitcoin/paper_9.pdf

Conflicts:
	src/policy/policy.h

Rebased-From: b196b685c9089b74fd4ff3d9a28ea847ab36179b
Github-Pull: #6769
2015-10-07 11:17:08 +02:00
Wladimir J. van der Laan
9bd0b4a633
qt: periodic translations update 2015-09-29 12:35:34 +02:00
Wladimir J. van der Laan
743cc9e08b
Merge pull request #6704
5e6d893 travis: for travis generating an extra build (Cory Fields)
ceba0f8 PARTIAL: typofixes (found by misspell_fixer) (Veres Lajos)
2ede6b7 add support for miniupnpc api version 14 (Pavel Vasin)
0dfcdd4 rpc-tests: re-enable rpc-tests for Windows (Cory Fields)
c9ad65e net: Set SO_REUSEADDR for Windows too (Cory Fields)
0194bdd add unit test for CNetAddr::GetGroup. (Alex Morcos)
bdf2542 Fix masking of irrelevant bits in address groups. (Alex Morcos)
65426ac Add missing files to files.md (fanquake)
28d76d2 Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss)
843469e Use unique name for AlertNotify tempfile (Casey Rodarmor)
4e5ea71 Make sure LogPrint strings are line-terminated (J Ross Nicoll)
3861f0f build: fix libressl detection (Cory Fields)
04507de Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor)
8b59079 Add autogen.sh to source tarball. (randy-waterhouse)
2015-09-22 18:06:57 +02:00
Jonas Schnelli
f696ea12e1
[QT] fix thin space word wrap line brake issue
The thin space QT html hack results in cut-off chars/nums after a line break.

Avoid word wrap line breaks by using a smaller font and a line break before each alternative value)

Rebased-From: 24cb7c7bbba224dcb73fcf69296f5ef4734f745f
Github-Pull: #6694
2015-09-22 10:49:45 +02:00
Veres Lajos
ceba0f8c7e PARTIAL: typofixes (found by misspell_fixer)
Upstream: 9f68ed6b6d1a9c6436ce37913666165f2b180ee3 (PR #6539)
2015-09-21 05:21:32 +00:00
Pavel Vasin
2ede6b7142 add support for miniupnpc api version 14
The value of new arg ttl is set to 2 as it's recommended default.
2015-09-21 05:21:32 +00:00