26573 Commits

Author SHA1 Message Date
Adrian Gallagher
a66fc11fc4
Litecoin: Protocol and default settings
0) Adjust 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) Zeitgeist2 bool fshift bnNew.bits(). Thanks to romanornr for this path.

5) SegWit ContextualCheckBlockHeader adjustment and extra coverage.

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

7) Send final alert message to nodes warning about removal of the alert system. Thanks to coblee for this patch.

8) Adjust default settings for Litecoin.

9) Adjust STALE_CHECK_INTERVAL value
2021-05-17 22:14:35 -07:00
Adrian Gallagher
073d829346
Litecoin: Fix copyright year value 2021-05-17 22:14:34 -07:00
shaolinfry
d6e910a089
Litecoin: Update gitian descriptors 2021-05-17 22:14:34 -07:00
Adrian Gallagher
92e21c8cf1
Litecoin: Scrypt 2021-05-17 22:14:34 -07:00
Adrian Gallagher
f3e8486f00
Litecoin: Fix various tests 2021-05-17 22:14:32 -07:00
shaolinfry
bbb02f393f
Litecoin: Developer gpg keys 2021-05-17 22:13:34 -07:00
Martin Smith
2ef51cf82a
Litecoin: Add Litecoin logos and icons 2021-05-17 22:13:33 -07:00
Adrian Gallagher
a6b51ef1ab
Litecoin: scrypt changes 2021-05-17 22:13:33 -07:00
Adrian Gallagher
71f1963e7e
Litecoin: Signet param phase 1 2021-05-17 22:13:33 -07:00
Adrian Gallagher
b087429944
Makefile changes 2021-05-17 22:13:32 -07:00
Adrian Gallagher
550f8ee924
Litecoin: Add crypto libs 2021-05-17 22:13:32 -07:00
shaolinfry
35809f2ee5
Litecoin: Add scrypt N=1024 PoW 2021-05-17 22:13:32 -07:00
Adrian Gallagher
0f7e6ef703
Litecoin: Adjust signet params 2021-05-17 22:13:30 -07:00
shaolinfry
981c448c28
Litecoin: Adjust chain parameters 2021-05-17 22:12:44 -07:00
shaolinfry
77c41391f7
Litecoin: Add historical release notes 2021-05-17 22:11:22 -07:00
Adrian Gallagher
f188dbcee1
Litecoin: Update README.md 2021-05-17 22:11:22 -07:00
W. J. van der Laan
194b9b8792
build: Bump RC to 0 (-final)
Tree-SHA512: b63d8c2514fa34d4503da8a37fb42948e03610e06dae6aaef7ba3d2568efd3bb138e7510da569a49d83c2618fa697ba949d55880fc2884a75a87028259d7c544
2021-04-29 21:31:20 +02:00
W. J. van der Laan
d97d0d31a6
doc: Merge release notes fragment, merge taproot description from wiki
Co-authored-by: David A. Harding <dave@dtrt.org>
Co-authored-by: Jon Atack <jon@atack.com>
Co-authored-by: Pieter Wuille <pieter@wuille.net>

Tree-SHA512: dd9ac416ff22276833111198445d76cf8417012a6faad0c3560276f1dcf24586ff41c65ac3430fbf1e840aaa563d3dd101671cff306b0fd92aa2ee03bb7f926b
2021-04-22 22:13:28 +02:00
W. J. van der Laan
5577e0a486
doc: Add PR and author list to release notes for 0.21.1
Tree-SHA512: c74b12dee645bd8d3dcff8d572a82369ea0895339d0d12e5360182421fa8cef4d3eba309ff7668e97dc24cd6afc800ab9ceb4eca5458085acf12c368f6c2f859
2021-04-19 06:01:38 +02:00
W. J. van der Laan
329eafa7f4
doc: Regenerate manual pages for 0.21.1rc1
Tree-SHA512: cc9cd502dc40d89f34b1b043e96df180f0e16ba7c6e039866b349d19aff582d1c4b4ab8e8960b4f427d72ad5f97c7c1e8fec3f2e008a0107dea33a2c8f13febc
2021-04-16 13:41:41 +02:00
W. J. van der Laan
e85dfdbf31 build: Bump version to 0.21.1rc1 2021-04-16 13:23:58 +02:00
W. J. van der Laan
ab20518191
gui: Pre-rc1 translations update
Tree-SHA512: 6978293bda56b0cb1370f3ddf201477a2f12e0b8c9462d3f4703b837d9be4be65142a5e97c4a473fb9fa90edd83dba8a98ea3b0ecc335062868d1e6c550241b2
2021-04-16 13:21:07 +02:00
fanquake
f8bbee425e
Merge #21614: [0.21] test: Backports
b8af67eeefc9fc9622f839ec8919b7391d91bf6f fuzz: cleanups for versionbits fuzzer (Anthony Towns)
79cdb4a1984c90a4d9377fbb0dda7bdd61d57031 test: make sure non-IP peers get discouraged and disconnected (Vasil Dimov)
b765f41164663c93d63e5a401d3b23c586a4e4fe test: also check disconnect in denialofservice_tests/peer_discouragement (Vasil Dimov)
dfeb6c10bba80dc91245318feb0ad1d879015a99 test: use pointers in denialofservice_tests/peer_discouragement (Vasil Dimov)

Pull request description:

  Backport tests

ACKs for top commit:
  vasild:
    ACK b8af67eeefc9fc9622f839ec8919b7391d91bf6f
  jnewbery:
    ACK b8af67eeefc9fc9622f839ec8919b7391d91bf6f
  ajtowns:
    ACK b8af67eeefc9fc9622f839ec8919b7391d91bf6f ; visually compared individual commits to originals, checked original commits are in master

Tree-SHA512: 22f665560f9d452993b12508d93d93ff54e3e91dcf39f731e27aedfb891570168066c185413d455bee4fa082c011b65ea1b0eee51e3633392b07a0db008d51c8
2021-04-16 17:57:18 +08:00
Anthony Towns
b8af67eeef fuzz: cleanups for versionbits fuzzer
Github-Pull: #21489
Rebased-From: aa7f418fe32b3ec53285693a7731decd99be4528
2021-04-16 11:21:02 +02:00
Vasil Dimov
79cdb4a198 test: make sure non-IP peers get discouraged and disconnected
Github-Pull: #21571
Rebased-From: 81747b21719b3fa6b0fdfc3b084c0104d64903f9
2021-04-16 11:20:04 +02:00
Vasil Dimov
b765f41164 test: also check disconnect in denialofservice_tests/peer_discouragement
Use `CConnmanTest` instead of `CConnman` and add the nodes to it
so that their `fDisconnect` flag is set during disconnection.

Github-Pull: #21571
Rebased-From: 637bb6da368b87711005b909f451f94909400092
2021-04-16 11:20:04 +02:00
Vasil Dimov
dfeb6c10bb test: use pointers in denialofservice_tests/peer_discouragement
This is a non-functional change that replaces the `CNode` on-stack
variables with `CNode` pointers.

The reason for this is that it would allow us to add those `CNode`s
to `CConnman::vNodes[]` which in turn would allow us to check that they
are disconnected properly - a `CNode` object must be in
`CConnman::vNodes[]` in order for its `fDisconnect` flag to be set.

If we store pointers to the on-stack variables in `CConnman` then it
would crash at the end, trying to `delete` them.

Github-Pull: #21571
Rebased-From: 4d6e246fa46f2309e2998b542e4c104d73d29071
2021-04-16 11:20:04 +02:00
MarcoFalke
e3b76b6c13
Merge #21701: [0.21] Speedy trial activation for Taproot
cbd64c3a28a7466f421477daadc6e6e6b69b898a Add mainnet and testnet taproot activation params (Andrew Chow)
ec7824396bdd2e93b429ddce9fea6bb29695454a chainparams: drop versionbits threshold to 90% for mainnnet and signet (Anthony Towns)
600357306e2e182a457174862ea2e41c7ba39c64 versionbits: simplify state transitions (Anthony Towns)
3acf0379e0979ea4bdd03976f4987aa6711eb92f versionbits: Add explicit NEVER_ACTIVE deployments (Anthony Towns)
b529222ad18f7facbaff394455875b4aa65d653e fuzz: test versionbits delayed activation (Anthony Towns)
71917e01ebf48790b9df48421d8e97986f92e2e4 tests: test versionbits delayed activation (Anthony Towns)
4cab84cfdfc98cd10462681b5eb0fbbc08afd2a7 versionbits: Add support for delayed activation (Anthony Towns)
f9517e6014ccfe91d5a77e2bacca928bdce7c285 tests: clean up versionbits test (Anthony Towns)
1c0164544c66b691f93b3b1114eee97cbabd99b2 tests: test ComputeBlockVersion for all deployments (Anthony Towns)
2e9e7f4329fc313adf9ba2394edbaf2a69b59bc1 tests: pull ComputeBlockVersion test into its own function (Anthony Towns)

Pull request description:

  Backport of #21377 and #21686

ACKs for top commit:
  instagibbs:
    cherry-pick ACK cbd64c3a28
  jnewbery:
    ACK cbd64c3a28a7466f421477daadc6e6e6b69b898a
  Sjors:
    tACK cbd64c3
  MarcoFalke:
    cherry-pick-only ACK cbd64c3a28a7466f421477daadc6e6e6b69b898a 🌾

Tree-SHA512: e9efb0ca9986d685161bcba5ed43efdc5f1dca88322cf65faccf17009b567c2d930c2aba4d1541539fc65347574ed4faa3d4558b907c779d1c128b3d2c681f31
2021-04-16 11:12:35 +02:00
fanquake
0fe5b6130c
Merge #21520: [0.21] wallet: Avoid requesting fee rates multiple times during coin selection
d61fb07da7c12e4a1f68cf645f32d563a657a506 Rename CoinSelectionParams::effective_fee to m_effective_feerate (Andrew Chow)
5fc381e443d6d967e6f7f8bc88a4fd66e18379eb wallet: Move discard feerate fetching to CreateTransaction (Andrew Chow)
bcd716670ba8a189a2e9b8b035318abceb9ce631 wallet: Move long term feerate setting to CreateTransaction (Andrew Chow)
34c89f92f34b5ca12da95d5f0b0240682c5a1c1f wallet: Replace nFeeRateNeeded with effective_fee (Andrew Chow)
48fc675163a657e615fd4b2680fc3accba12f95d wallet: Use existing feerate instead of getting a new one (Andrew Chow)

Pull request description:

  Backport of #21083

ACKs for top commit:
  MarcoFalke:
    cherry-pick-only re-ACK d61fb07da7c12e4a1f68cf645f32d563a657a506 🔙
  instagibbs:
    utACK d61fb07da7

Tree-SHA512: 23b212301bb467153dd9723903918ae01dd520525c81d541c411e7a4381e46594fe032e2a7c06ddcff7dc56dcb546991d50187c33fcff08ec45bd835cc01bd19
2021-04-16 10:10:50 +08:00
Andrew Chow
cbd64c3a28
Add mainnet and testnet taproot activation params
Github-Pull: #21686
Rebased-From: f979b3237f1cfc28f9c4ccb07beab558d5357a55
2021-04-15 20:59:21 -04:00
Anthony Towns
ec7824396b
chainparams: drop versionbits threshold to 90% for mainnnet and signet
Github-Pull: #21377
Rebased-From: ffe33dfbd4c3b11e3475b022b6c1dd077613de79
2021-04-15 20:59:19 -04:00
Anthony Towns
600357306e
versionbits: simplify state transitions
This removes the DEFINED->FAILED transition and changes the
STARTED->FAILED transition to only occur if signalling didn't pass the
threshold. This ensures that it is always possible for activation to
occur, no matter what settings are chosen, or the speed at which blocks
are found.

Github-Pull: #21377
Rebased-From: f054f6bcd2c2ce5fea84cf8681013f85a444e7ea
2021-04-15 20:59:17 -04:00
Anthony Towns
3acf0379e0
versionbits: Add explicit NEVER_ACTIVE deployments
Previously we used deployments that would timeout prior to Bitcoin's
invention, which allowed the deployment to still be activated in unit
tests. This switches those deployments to be truly never active.

Github-Pull: #21377
Rebased-From: 55ac5f568a3b73d6f1ef4654617fb76e8bcbccdf
2021-04-15 20:59:13 -04:00
Anthony Towns
b529222ad1
fuzz: test versionbits delayed activation
Github-Pull: #21377
Rebased-From: dd07e6da48040dc7eae46bc7941db48d98a669fd
2021-04-15 20:58:49 -04:00
Anthony Towns
71917e01eb tests: test versionbits delayed activation
Github-Pull: #21377
Rebased-From: dd85d5411c1702c8ae259610fe55050ba212e21e
2021-04-15 20:58:42 -04:00
Anthony Towns
4cab84cfdf
versionbits: Add support for delayed activation
Github-Pull: #21377
Rebased-From: 73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8
2021-04-15 12:03:27 -04:00
Anthony Towns
f9517e6014
tests: clean up versionbits test
Simplify the versionbits unit test slightly to make the next set of
changes a little easier to follow.

Github-Pull: #21377
Rebased-From: 9e6b65f6fa205eee5c3b99343988adcb8d320460
2021-04-15 12:03:25 -04:00
Anthony Towns
1c0164544c
tests: test ComputeBlockVersion for all deployments
This generalises the ComputeBlockVersion test so that it can apply to
any activation parameters we might set, and checks all the parameters
set for each deployment on each chain, to simultaneously ensure that the
deployments we have configured work sensibly, and that the test code
does not suffer bitrot in the event that all interesting deployments
are buried.

Github-Pull: #21377
Rebased-From: 593274445004506c921d5d851361aefb3434d744
2021-04-15 12:03:24 -04:00
Anthony Towns
2e9e7f4329
tests: pull ComputeBlockVersion test into its own function
The intent here is to allow checking ComputeBlockVersion behaviour with
each deployment, rather than only testdummy on mainnet. This commit does
the trivial refactoring component of that change.

Github-Pull: #21377
Rebased-From: 63879f0a4760c0c0f784029849cb5d21ee088abb
2021-04-15 12:03:22 -04:00
fanquake
e358b43f7d
Merge #21640: [0.21] Introduce DeferredSignatureChecker and have SignatureExtractorClass subclass it
f79189ca54524881d52b91679eb9035d6718ce01 Test that signrawtx works when a signed CSV and CLTV inputs are present (Andrew Chow)
7de019bc619b0b2433bfb553feba5f6dc58c8db8 Introduce DeferringSignatureChecker and inherit with SignatureExtractor (Andrew Chow)

Pull request description:

  Backport of #21166

ACKs for top commit:
  MarcoFalke:
    checked this is a clean cherry-pick did not review ACK f79189ca54524881d52b91679eb9035d6718ce01 🐖
  instagibbs:
    ACK f79189ca54

Tree-SHA512: 51e945c9b353713423d3886c557066c66a6517d2300523832e5a5471ab91a8943385096d9bf5b46910477cb4c47470431690cf3da09b9f6956fe030f13ddff51
2021-04-12 09:28:18 +08:00
Andrew Chow
f79189ca54
Test that signrawtx works when a signed CSV and CLTV inputs are present
Github-Pull: #21166
Rebased-From: a97a9298cea085858e1a65a5e9b20d7a9e0f7303
2021-04-08 18:19:02 -04:00
Andrew Chow
7de019bc61
Introduce DeferringSignatureChecker and inherit with SignatureExtractor
Introduces a DeferringSignatureChecker which simply takes a
BaseSignatureChecker and passes through everything.
SignatureExtractorChecker now subclasses DeferringSignatureChecker. This
allows for all BaseSignatureChecker functions to be implemented for
SignatureExtractorChecker, while allowing for future signature checkers
which opreate similarly to SignatureExtractorChecker.

Github-Pull: #21166
Rebased-From: 6965456c10c9c4025c71c5e24fa5b27b15e5933a
2021-04-08 18:18:55 -04:00
MarcoFalke
0b9a046c1a
Merge #21616: [0.21] build: link against -lsocket if required for *ifaddrs
1a9a2cb7dcc60781a3cbca3a7846ff153143260c net: add ifaddrs.h include (fanquake)
f6896dfde73bb37f4f0f0f9bfe9855d4fe9e9fe5 build: check if -lsocket is required with *ifaddrs (fanquake)
e99d6d0c7cbdbb23f966e50c045bbd525ba8daf0 rand: only try and use freeifaddrs if available (fanquake)

Pull request description:

  Backports #21486 to the 0.21 branch. Related to #21485.

ACKs for top commit:
  MarcoFalke:
    cherry-pick-only ACK 1a9a2cb7dcc60781a3cbca3a7846ff153143260c did not test or review 🚶

Tree-SHA512: 400dcf0f0bffa9b2c820403936b894969113a2bd82a32ae29d3fb73c4ef9ffafb55f5325fcc4929f6e685f8932be6f566f5dd2163ecf8a64b154b0c401109311
2021-04-07 07:32:44 +02:00
fanquake
1a9a2cb7dc
net: add ifaddrs.h include
Github-Pull: #21486
Rebased-From: 4783115fd4cccb46a7f8c592b34fa7c094c29410
2021-04-06 17:36:11 +08:00
fanquake
f6896dfde7
build: check if -lsocket is required with *ifaddrs
Github-Pull: #21486
Rebased-From: 879215e665a9f348c8d3fa92701c34065bc86a69
2021-04-06 17:35:41 +08:00
fanquake
e99d6d0c7c
rand: only try and use freeifaddrs if available
Github-Pull: #21486
Rebased-From: 87deac66aa747481e6f34fc80599e1e490de3ea0
2021-04-06 17:34:57 +08:00
Andrew Chow
d61fb07da7
Rename CoinSelectionParams::effective_fee to m_effective_feerate
It's a feerate, not a fee. Also follow the style guide for member names.

Github-Pull: #21083
Rebased-From: f9cd2bfbccb7a2b8ff07cec5f6d2adbeca5f07c3
2021-04-01 12:44:00 -04:00
MarcoFalke
65fa43bda1
Merge #21469: BIP 350: Implement Bech32m and use it for v1+ segwit addresses (0.21 backport)
f2195d7c4aa45f5168ec55b14406aeaf970adcb1 Backport invalid address tests (Pieter Wuille)
1e9671116fc5805baa0442bd8fd1c88f2307fef0 naming nits (Fabian Jahr)
7dfe406e2023c9db7d9cc2e98484423adfbc8963 Add signet support to gen_key_io_test_vectors.py (Pieter Wuille)
593e206627f4fb789de70f55017f71b85d10754d Use Bech32m encoding for v1+ segwit addresses (Pieter Wuille)
8944aaa6d6ce55faa6224e288fe0a14dbbf5ca4f Add Bech32m test vectors (Pieter Wuille)
1485533092a0732bae55313659a3e3f9669fd77a Implement Bech32m encoding/decoding (Pieter Wuille)

Pull request description:

  Backport of #20861. Also includes #21471.

ACKs for top commit:
  jnewbery:
    utACK f2195d7c4aa45f5168ec55b14406aeaf970adcb1
  MarcoFalke:
    cherry-pick re-ACK f2195d7c4aa45f5168ec55b14406aeaf970adcb1 , only change is version number in doc/bips and new test commit 🍝
  fanquake:
    ACK f2195d7c4aa45f5168ec55b14406aeaf970adcb1 - performed the backport, changes look sane. Have not tested extensively.

Tree-SHA512: 7dc043e44d7cda07d73331a7b49666b9db98c99f2635dab0cfeb45422dbfbe75a7b44d0aff85ef6369d412d8a5041ed0826c86ffdfc13c5fbff74adfe4d91c1a
2021-04-01 12:34:08 +02:00
Pieter Wuille
f2195d7c4a Backport invalid address tests
Reduced version of the test from master/#20861 by John Newbery.

Github-Pull: #20861
Rebased-From: fe5e495c31de47b0ec732b943db11fe345d874af
2021-03-27 12:09:48 -07:00
Fabian Jahr
1e9671116f naming nits
Github-Pull: #20861
Rebased-From: 03346022d611871f2cc185440b19d928b9264d9d
2021-03-27 12:09:48 -07:00