2702 Commits

Author SHA1 Message Date
chromatic
db03c7e077
Merge pull request #3376 from patricklodder/1.21-fwd-boost-compat
Fix boost compatibility until 1.82
2023-12-04 17:42:21 -08:00
chromatic
20d6a88eab Fail CI scripts if pip installation fails 2023-11-24 10:25:32 -08:00
Patrick Lodder
a469ba73a3
qa: allow for variable fs::create_directory prefix to duplicate dir
In boost 1.76 boost::filesystem::create_directories was reworked to
properly return errors. Boost < 1.75 will not throw errors, boost
1.75 will throw errors depending on the OS used, and boost 1.76+
will always throw the error correctly.

Because the function that throws the error is different between the
currently pinned boost 1.70 and later versions that are included
with system packages, this commit changes the error text in the
test for duplicate wallet file creation to detect both, by checking
for "*boost::filesystem::create_director*".

See: https://www.boost.org/users/history/version_1_76_0.html
2023-11-24 07:43:13 -05:00
Dakoda Greaves
91dd3f03e4
qa: update ltc_scrypt installation script and documentation
-our test framework requires ltc_scrypt as found on L26 of test/functional/test_framework/messages.py, therefore i've updated the install-deps script to use v1.0.1 and added script invocation instructions on the test dirs README.md.
2022-10-19 13:08:36 -07:00
Pieter Wuille
a317407d17
Swap out hashlib.ripemd160 for own implementation
Cherry-picked from: 5b559dc
2022-10-12 09:33:01 +02:00
Pieter Wuille
697f2a7f6b
Add pure Python RIPEMD-160
Cherry-picked from: ad3e9e1f2
2022-10-12 09:33:00 +02:00
Victor Skovorodnikov
7ad5ca1af3 wallet: update key derivation paths
* Modified wallet's key derivation paths to use m/0'/3' as default for mainnet (while taking into account legacy mainnet format m/0'/0') and use m/0'/1' for testnet.
2022-10-03 21:35:50 -07:00
Ross Nicoll
24be0ef4fe
consensus: Add chain ID to block version 2021-11-14 18:39:20 +00:00
Ross Nicoll
bad91d661e
Merge pull request #2522 from rnicoll/1.21-merge-1.21.2-rc2
Merge Bitcoin Core 0.21.2-rc2
2021-09-24 22:13:35 +01:00
Ross Nicoll
88a9713030 Convert invalid addresses to Doge 2021-09-21 23:15:24 +01:00
Ross Nicoll
4f00278f29
Fix up functional tests
* Update rpc_signrawtransaction.py with Doge-compatible fee values.
* Replace addresses in rpc_invalid_address_message.py with Dogecoin prefixes.
2021-09-19 20:45:31 +01:00
Ross Nicoll
320d27a456 Use set_base_version in tests
Use set_base_version in tests in preparation for adding chain IDs to block versions.
2021-09-09 22:25:08 +01:00
deepsource-autofix[bot]
c90163c832
Remove unnecessary comprehension 2021-09-05 03:26:46 +00:00
Ross Nicoll
b2554af0df Bitcoin Core 0.21.2 release candidate 2
Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz7FuIclQ9n+pXlWPLuufXMCVJsEFAmEp9EoACgkQLuufXMCV
 JsGvcQ//ZSQOCEFH3e+gBuXHthXG2UZsHagC715ruQquhRt4aOKiFLu/eJGwiKBt
 Frc1wLF21dgtl/2JUtVBpVb54whni1PKgDowtkk4Ge7gWM0awW2OnvdgA21E+syD
 501duaW6ORvo5icmf7uPQ7u/g9Ks1s1chBr1bLnYqqqg2e3/aqC4+drTjd8wziy3
 J+8Bzc+KLAklgv8cIpH1EDuFGrumlMYxW0KHqJeN7Vk8wGX8PINrkEGCyrBDQ7DY
 BEd6txwcivPxqMfj61OP60DU0oG6IVECGMPrANtyK+ba0FHl+GkNQuTaX8zv4Ik9
 dKscJ1OiRX2ER/pEJTwg8PJfOET5D/WRc1xSmrYBOK7cFLtYVqH2yvnHiLlWvH1P
 7TQOAjfzQwa+yUnGRf2dWW+Rngv876JjBUX5vbm4UC5Geo8Bdl3z9U9glaq03fVd
 3Q8uAgljLnXWFiylK9oDYhsFfWSUYgjyhM11LCb5K3y3t7ageclu6RTl574jy5sb
 8qBwQxpJt5UtwIK2SNqq1iDmMW3J65sb3CmTND9ppDA79GfZzwlvGVwO1bN2TC6m
 0dGTPvOPWS9x/PSq8+8o1uCHDzHrW9B5lUikf8kx+zNI7Rd3QLJ0pbdqwrJ3CcOk
 ttV5QXAYD2trfkCKEi69eiIpH21rasqjyI11ZoH4u+0BCpw8hQg=
 =GXjC
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.2rc2' into 1.21-dev

Bitcoin Core 0.21.2 release candidate 2

Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
2021-09-03 13:40:49 +01:00
Pieter Wuille
aaa4833fc9 Functional tests for addr rate limiting
Github-Pull: #22387
Rebased-From: b4ece8a1cda69cc268d39d21bba59c51fa2fb9ed
2021-08-05 09:40:04 -07:00
Pieter Wuille
83dfe6c65e Rate limit the processing of incoming addr messages
While limitations on the influence of attackers on addrman already
exist (affected buckets are restricted to a subset based on incoming
IP / network group), there is no reason to permit them to let them
feed us addresses at more than a multiple of the normal network
rate.

This commit introduces a "token bucket" rate limiter for the
processing of addresses in incoming ADDR and ADDRV2 messages.
Every connection gets an associated token bucket. Processing an
address in an ADDR or ADDRV2 message from non-whitelisted peers
consumes a token from the bucket. If the bucket is empty, the
address is ignored (it is not forwarded or processed). The token
counter increases at a rate of 0.1 tokens per second, and will
accrue up to a maximum of 1000 tokens (the maximum we accept in a
single ADDR or ADDRV2). When a GETADDR is sent to a peer, it
immediately gets 1000 additional tokens, as we actively desire many
addresses from such peers (this may temporarily cause the token
count to exceed 1000).

The rate limit of 0.1 addr/s was chosen based on observation of
honest nodes on the network. Activity in general from most nodes
is either 0, or up to a maximum around 0.025 addr/s for recent
Bitcoin Core nodes. A few (self-identified, through subver) crawler
nodes occasionally exceed 0.1 addr/s.

Github-Pull: #22387
Rebased-From: 0d64b8f709b4655d8702f810d4876cd8d96ded82
2021-08-05 09:40:00 -07:00
MarcoFalke
55e941f5df
test: Fix intermittent feature_taproot issue
Github-Pull: #20535
Rebased-From: fa275e1539941b49fe206ff0bf110e3362bec6bb
2021-07-29 20:25:28 +08:00
MarcoFalke
513613d8a8
Cleanup -includeconf error message
Remove the erroneous trailing newline '\n'. Also, print only the first
value to remove needless redundancy in the error message.

Github-Pull: #22002
Rebased-From: fad0867d6ab9430070aa7d60bf7617a6508e0586
2021-06-30 10:23:54 +08:00
MarcoFalke
70eac6fcd0
Fix crash when parsing command line with -noincludeconf=0
Github-Pull: #22002
Rebased-From: fa9f711c3746ca3962f15224285a453744cd45b3
2021-06-30 10:23:51 +08:00
Ross Nicoll
261d38e0fe
Generate legacy addresses by default
Generate legacy addresses instead of SegWit by default.
2021-06-12 16:58:46 +01:00
Ross Nicoll
d069588c1f
Merge pull request #2224 from mmicael1/1.21-reduce-tests-latency
fix: reduce tests latency
2021-06-02 23:22:44 +01:00
Ross Nicoll
66d40c059a Remove default Signet 2021-06-02 10:37:16 +01:00
Ross Nicoll
3afaf906f1 Replace consensus values with Dogecoin equivalents
* Replace chain parameters with Dogecoin values
* Update maximum coins to match Dogecoin
* Disable version 2 block requirement
* Update coinbase maturity to match Dogecoin
2021-06-02 10:37:16 +01:00
Malta Micael
0aa4d723e5
fix: reduce tests latency
Non-necessary long time sleep for sync_blocks and sync_mempools.
2021-05-30 22:54:55 -04:00
Ross Nicoll
4fea2ce468
Add Dogecoin block subsidies 2021-05-30 22:12:51 +01:00
Ross Nicoll
100bd6e551 Sync nodes before maturing blocks in bumpfee 2021-05-25 17:17:14 +01:00
Ross Nicoll
af03439668 Update max money to 10 billion
Update maximum money to 10 billion coins (most you can have in a single transaction).
2021-05-20 18:01:37 +01:00
Ross Nicoll
878c07a847 Change regtest block interval to match Dogecoin
Change regtest block interval to match Dogecoin mainnet. Note this differs from 1.14, which used special regtest values, however regtest should by default match mainnet and the server time is adjusted to make it feasible to mine blocks quickly.
2021-05-20 12:02:35 +01:00
Ross Nicoll
3f8289a113 Dogecoin: Update coinbase maturity
* Change coinbase maturity to 240 blocks in most cases, with main/test early chains allowing 30 blocks. I've kept the 240 consistent in regtest to avoid having to redesign a lot of the test cases.
* Disabled mining unit test which require COINBASE_MATURITY worth of pre-calculated blocks, as we'd otherwise be constantly refactoring them.
* Moved functional test which uses the Bitcoin testnet block data as its reference, as it completely breaks as we introduce Dogecoin data.
* Updated standard blockchains for tests from 100/200 to 240/480 as appropriate.
2021-05-20 12:02:35 +01:00
Anthony Towns
4cab84cfdf
versionbits: Add support for delayed activation
Github-Pull: #21377
Rebased-From: 73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8
2021-04-15 12:03:27 -04: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
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
Pieter Wuille
593e206627 Use Bech32m encoding for v1+ segwit addresses
This also includes updates to the Python test framework implementation,
test vectors, and release notes.

Github-Pull: #20861
Rebased-From: fe5e495c31de47b0ec732b943db11fe345d874af
2021-03-27 12:09:44 -07:00
Andrew Chow
36ecf5eb87 tests: Test that a fully signed tx given to signrawtx is unchanged
Tests that a fully signed transaction given to
signrawtransactionwithwallet is both unchanged and marked as complete.
This tests for a regression in 0.20 where the transaction would not be
marked as complete.

Github-Pull: #20562
Rebased-From: 773c42b265fb2212b5cb8785b7226a206d063543
2021-03-06 08:18:16 +01:00
Ross Nicoll
8b0dcb523d
1.21 key prefix (#1710)
Squash-merged on request.

* Dogecoin address prefixes
* Use "doge" for BECH32 addresses
* Switch Bitcoin references to Dogecoin in Travis
* Update addresses in dogecoin-tx tests
* Use "doge" for BECH32 addresses
* Remove functional tests which do not apply to Dogecoin (backwards compatibility tests do not have suitable clients to test against)
2021-03-04 11:25:29 +01:00
Ross Nicoll
1bafd57331
Disable compatibility tests (#1754)
* Switch Bitcoin references to Dogecoin in Travis
* Move backwards compatibility tests to their own suite (backwards compatibility tests do not have suitable clients to test against)
2021-02-22 10:30:54 +00:00
barrystyle
8f77f8870d
1.21 codebase rebrand (#1711)
* build: Brand codebase as Dogecoin via automake/autoconf files.
* build: Update internal resource files for windows builds.
* build: Update internal application names and data directories.
* build: Update immediately visible remaining bitcoin name references from cli binaries and qt.
* build: Update immediately visible bitcoin references in the main gui itself.
* Update functional tests to match Dogecoin
* wallet: Add missing check for -descriptors wallet tool option
* correct output for functional tests (errorlevels?)

Co-authored-by: Ross Nicoll <ross.nicoll@r3.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-02-20 12:13:43 +00:00
Jon Atack
4ef1e4bd40 test: disallow sendtoaddress/sendmany when private keys disabled
Github-Pull: #21201
Rebased-From: 6bfbc97d716faad38c87603ac6049d222236d623
2021-02-19 12:47:43 +01:00
MarcoFalke
08dada8456 util: Disallow negative mocktime
Signed-off-by: practicalswift <practicalswift@users.noreply.github.com>

Github-Pull: #21043
Rebased-From: 3ddbf22ed179a2db733af4b521bec5d2b13ebf4b
2021-02-11 12:42:40 +01:00
Bruno Garcia
4607019798 fix the unreachable code at feature_taproot
Github-Pull: #21081
Rebased-From: 5e0cd25e29541e6c19559fb5c2555e008ed896fa
2021-02-08 08:51:02 +01:00
Vasil Dimov
bdce029191 test: add test for banning of non-IP addresses
Co-authored-by: Jon Atack <jon@atack.com>

Github-Pull: #20852
Rebased-From: 39b43298d9c54f9c18bef36f3d5934f57aefd088
2021-01-11 11:57:21 +01:00
Pieter Wuille
ce13b99020 Add regression test for incorrect decoding
Github-Pull: #20595
Rebased-From: 0f949cde3dff15170db7930b0f7345ff995c267d
2020-12-10 11:37:57 +01:00
Jon Atack
0d3c140c4d test: add coverage for passing fee rate as a string
Github-Pull: #20573
Rebased-From: 6fa72ceb8021c3b5aea62f6cfe92665c29212923
2020-12-10 11:37:41 +01:00
Jon Atack
06c84232b3 wallet, bugfix: allow send to take string fee rate values
Github-Pull: #20573
Rebased-From: ce207d6b93d35bc02fcd2dd28f1fd95869261d43
2020-12-10 11:37:36 +01:00
Pieter Wuille
bead935470 Send and require SENDADDRV2 before VERACK
See the corresponding BIP change: https://github.com/bitcoin/bips/pull/1043

Github-Pull: #20564
Rebased-From: 1583498fb6781c01ca2f33c09319ed793964c574
2020-12-10 11:37:22 +01:00
Jon Atack
6e4969f76f
Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee
as the feeRate argument should soon be deprecated.

Also loosen one test (and a similar one) that caused a one-off CI failure with:
expected message
'Insufficient total fee 0.00000141, must be at least 0.00001704 (oldFee 0.00000999 + incrementalFee 0.00000705)'
actual message
'Insufficient total fee 0.00000141, must be at least 0.00001712 (oldFee 0.00001007 + incrementalFee 0.00000705)'

Github-Pull: #20426
Rebased-From: 3f1e10b2b1cd11f7112fbad6355464bd4adbbc5c
2020-11-26 19:32:06 +01:00
Jon Atack
54e1edcc2b
Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls
A check to raise an error on zero-fee txns was mistakenly extended in commit
a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include
fundrawtransaction and walletcreatefundedpsbt.

This commit overrides zero fee rate checking for these two RPCs, not only for
the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new
fee_rate (sat/vB) arg.

Github-Pull: #20426
Rebased-From: 1b3d7009280595108eb22ac1188bc43678
2020-11-26 19:31:26 +01:00
MarcoFalke
9facca3ce0
Merge #20490: [backport] wallet: upgradewallet fixes, improvements, test coverage
ca8cd893bb56bf5d455154b0498b1f58f77d20ed wallet: fix and improve upgradewallet error responses (Jon Atack)
99d56e357159c7154f69f28cb5587c5ca20d6594 wallet: fix and improve upgradewallet result responses (Jon Atack)
2498b04ce88696a3216fc38b7d393906b733e8b1 Don't upgrade to HD split if it is already supported (Andrew Chow)
c46c18b788cb0862aafbb116fd37936cbed6a431 wallet: refactor GetClosestWalletFeature() (Jon Atack)

Pull request description:

  Github-Pull: #20403
  Rebased-From: c46c18b788cb0862aafbb116fd37936cbed6a431

  Github-Pull: #20403
  Rebased-From: 2498b04ce88696a3216fc38b7d393906b733e8b1

  Github-Pull: #20403
  Rebased-From: 99d56e357159c7154f69f28cb5587c5ca20d6594

  Github-Pull: #20403
  Rebased-From: ca8cd893bb56bf5d455154b0498b1f58f77d20ed

Top commit has no ACKs.

Tree-SHA512: b18a1d015c963298740c585385eaa056988464112c88a519fe619be22dc78a8f6a102365cf799c50b781a77a09bec82b58ce411ab007b48f8b5de876e9c75060
2020-11-25 18:03:53 +01:00
MarcoFalke
d47d16025e
Merge #20485: [backport] wallet: Do not treat default constructed types as None-type
fa69c2c78455fd0dc436018fece9ff7fc83a180d wallet: Do not treat default constructed types as None-type (MarcoFalke)
fac4e136fa3d0fab7fde900a6be921313e16e7a6 refactor: Change pointer to reference because it can not be null (MarcoFalke)

Pull request description:

  Github-Pull: #20410
  Rebased-From: fac4e136fa3d0fab7fde900a6be921313e16e7a6

  Github-Pull: #20410
  Rebased-From: fa69c2c78455fd0dc436018fece9ff7fc83a180d

Top commit has no ACKs.

Tree-SHA512: 05c3fe29677710b57dcc482fd529b0ab79475519f60f9cfde19f956c4e2212d09b042af458ec4f1272c581360ce841b735dca4df144e0798b3ccf16547de9cd0
2020-11-25 11:27:42 +01:00
MarcoFalke
4e964094db
Merge #20486: [backport] test: Fix intermittent issue in mempool_compatibility
fa05d19bd6ba619bb3f9aabc05c439cd18d34544 test: Fix intermittent issue in mempool_compatibility (MarcoFalke)

Pull request description:

  Github-Pull: #20456
  Rebased-From: fa05d19bd6ba619bb3f9aabc05c439cd18d34544

Top commit has no ACKs.

Tree-SHA512: c07ed3ffab315da2bf70427882e2da8216964fef97dd538d7c46c5d5b3563b0732626ffbe4b0e19537ad49a8542eedb3c08850cccacdef466f24582defe99d22
2020-11-25 11:25:33 +01:00