Commit Graph

1140 Commits

Author SHA1 Message Date
PastaPastaPasta
84ade683c1
Merge pull request #4535 from vijaydasmp/bp_19_3
Backport 15826, 15530, 16243, 15824, 16587, 16555, 16629, 16847, 16857, 14877
2021-11-17 15:48:33 -05:00
Kittywhiskers Van Gogh
d978259654
merge bitcoin#15638: Pull wallet code out of libbitcoin_server (#4560)
* merge 15638: Move CheckTransaction from lib_server to lib_consensus

* merge 15638: Move policy settings to new src/policy/settings unit

* merge 15638: Move rpc utility methods to rpc/util

* merge 15638: Move rpc rawtransaction util functions to rpc/rawtransaction_util.cpp

* merge 15638: Move several units into common libraries

* merge 15638: Move wallet load functions to wallet/load unit

* merge 15638: Document src subdirectories and different libraries

* [build] Add several util units (cleanup)

* build: resolve missing declarations by re-specifying headers
2021-11-16 10:19:47 -05:00
MarcoFalke
b9d4dbb12f
Merge #16243: doc: Remove travis badge from readme
e91f0a7af2 doc: Remove travis badge from readme (MarcoFalke)

Pull request description:

  The readme(s) are shipped in the released source-code archive, in which case the travis badge is useless since it doesn't link to the travis result of the correct commit/tag/branch. GitHub embeds the correct links for each tag or commit that ci ran on, so we don't need this link in the readme.

ACKs for commit e91f0a:
  hebasto:
    ACK e91f0a7af2aec7d924f00da25c69d8f46e0dd33d

Tree-SHA512: 860435a58b38a9bd0bc62a1e74b3a63c138c9a2f09008a090d5ecc7fd86fa908d2e5eda41d16606507a238d9488fa5323405364a9556b670684a2e4838aead2d
2021-11-16 07:13:47 +05:30
UdjinM6
a3a8bfee08
Merge pull request #4558 from kittywhiskers/wnsep
merge bitcoin#10973, #15039, #15288: separate wallet from node
2021-11-16 00:28:59 +03:00
MarcoFalke
790c9e784b
Merge #15826: Pure python EC
b67978529a Add comments to Python ECDSA implementation (John Newbery)
8c7b9324ca Pure python EC (Pieter Wuille)

Pull request description:

  This removes the dependency on OpenSSL for the interaction tests, by providing a pure-Python
  toy implementation of secp256k1.

ACKs for commit b67978:
  jnewbery:
    utACK b67978529ad02fc2665f2362418dc53db2e25e17

Tree-SHA512: 181445eb08b316c46937b80dc10aa50d103ab1fdddaf834896c0ea22204889f7b13fd33cbcbd00ddba15f7e4686fe0d9f8e8bb4c0ad0e9587490c90be83966dc
2021-11-14 20:57:40 +05:30
Kittywhiskers Van Gogh
a97eebd068 merge bitcoin#15039: Avoid leaking nLockTime fingerprint when anti-fee-sniping 2021-11-14 15:24:24 +05:30
Kittywhiskers Van Gogh
365e5c4205 merge bitcoin#15039: Avoid leaking nLockTime fingerprint when anti-fee-sniping 2021-11-14 13:56:31 +05:30
MarcoFalke
3856ce485e Merge #15896: QA: feature_filelock, interface_bitcoin_cli: Use PACKAGE_NAME in messages rather than hardcoding Bitcoin Core
fcc443b636 QA: feature_filelock, interface_bitcoin_cli: Use PACKAGE_NAME in messages rather than hardcoding Bitcoin Core (Luke Dashjr)

Pull request description:

ACKs for commit fcc443:
  practicalswift:
    utACK fcc443b6367b44d5fdc04db36ec4a286d5b59162

Tree-SHA512: f87cfea3cb2ac716a5c9a507141dcba18cb0e3cbe17a4114ed11fa283c3d38551cc245ef68f8816c51538d492991e71019d20a9ca4acd22af4f99e631c04d33e
2021-11-13 11:04:56 -05:00
MarcoFalke
cc1f8db725 Merge #13926: [Tools] bitcoin-wallet - a tool for creating and managing wallets offline
3c3e31c3a4 [tests] Add wallet-tool test (João Barbosa)
49d2374acf [tools] Add wallet inspection and modification tool (Jonas Schnelli)

Pull request description:

  Adds an offline tool `bitcoin-wallet-tool` for wallet creation and maintenance.

  Currently this tool can create a new wallet file, display information on an existing wallet, and run the salvage and zapwallettxes maintenance tasks on an existing wallet. It can later be extended to support other common wallet maintenance tasks.

  Doing wallet maintenance tasks in an offline tool makes much more sense (and is potentially safer) than having to spin up a full node.

Tree-SHA512: 75a28b8a58858d9d76c7532db40eacdefc5714ea5aab536fb1dc9756e2f7d750d69d68d59c50a68e633ce38fb5b8c3e3d4880db30fe01561e07ce58d42bceb2b
2021-11-13 11:04:56 -05:00
Kittywhiskers Van Gogh
305b96e008
merge bitcoin#16097: Add Flags enum to ArgsManager class (#4569)
* merge bitcoin#16097: Check IsArgKnown() early

* merge bitcoin#16097: Refactor InterpretNegatedOption() function

* merge bitcoin#16097: Add Flags enum to ArgsManager

* scripted-diff: Use Flags enum in AddArg()

-BEGIN VERIFY SCRIPT-
sed -i 's/const bool debug_only,/unsigned int flags, &/' src/util/system.h src/util/system.cpp
sed -i -E 's/(true|false), OptionsCategory::/ArgsManager::ALLOW_ANY, &/' $(git grep --files-with-matches 'AddArg(' src)
-END VERIFY SCRIPT-

* scripted-diff: Use ArgsManager::DEBUG_ONLY flag

-BEGIN VERIFY SCRIPT-
sed -i 's/unsigned int flags, const bool debug_only,/unsigned int flags,/' src/util/system.h src/util/system.cpp
sed -i 's/ArgsManager::NONE, debug_only/flags, false/' src/util/system.cpp
sed -i 's/arg.second.m_debug_only/(arg.second.m_flags \& ArgsManager::DEBUG_ONLY)/' src/util/system.cpp
sed -i 's/ArgsManager::ALLOW_ANY, true, OptionsCategory::/ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::/' $(git grep --files-with-matches 'AddArg(' src)
sed -i 's/ArgsManager::ALLOW_ANY, false, OptionsCategory::/ArgsManager::ALLOW_ANY, OptionsCategory::/' $(git grep --files-with-matches 'AddArg(' src)
-END VERIFY SCRIPT-

* merge bitcoin#16097: Remove unused m_debug_only member from Arg struct

* merge bitcoin#16097: Use ArgsManager::NETWORK_ONLY flag

* merge bitcoin#16097: Replace IsArgKnown() with FlagsOfKnownArg()

* merge bitcoin#16097: Revamp option negating policy

* merge bitcoin#16097: Make tests arg type specific
2021-11-12 19:25:46 -05:00
PastaPastaPasta
ee34678d94
Merge pull request #4565 from kittywhiskers/auxports19
merge bitcoin#15474...#16774: miscellaneous backports
2021-11-12 15:45:13 -05:00
UdjinM6
35f8ed4d80
instantsend: various fixes (#4553)
* Handle attempts to read non-existent records from isdb properly

* Do not reject blocks that conflict with islocks while still syncing

Otherwise you can stuck with no new blocks/headers which means you won't be able to verify new chainlocks that might override stored islocks

* Handle duplicates/conflicting islocks better

* More constness
2021-11-11 16:15:18 +03:00
Kittywhiskers Van Gogh
f9d5542daa merge bitcoin#15927: log thread names by default in functional tests 2021-11-11 18:36:09 +05:30
Wladimir J. van der Laan
a92ddf2784 Merge #16124: tests: Limit Python linting to files in the repo
3c5254a820c892b448dfb42991f6109a032a3730 Limit Python linting to files in the repo (practicalswift)

Pull request description:

  Limit Python linting to files in the repo.

  Before:

  ```
  $ test/lint/lint-python.sh
  not_under_version_control.py:195:9: F841 local variable 'e' is assigned to but never used
  $
  ```

  After:

  ```
  $ test/lint/lint-python.sh
  $
  ```

ACKs for commit 3c5254:
  fanquake:
    tACK 3c5254a820
  Empact:
    utACK 3c5254a820

Tree-SHA512: 68733494a5f2a7764eba938af227145f5ef9ddc9ff94840134e4d2684ca7b9a819fac491ec43102f93e5e9867373bfd46b46efc9d11528329b5ecb2282fffb16
2021-11-09 14:08:49 -05:00
MarcoFalke
a9d4ca1f2a Merge #16078: test: replace tx hash with txid in rawtransaction test
0784af16ef remove parameters -addresstype=legacy in rpc_rawtransaction test (LongShao007)
a65dafa8f1 replace tx hash with txid in test rawtransaction (LongShao007)

Pull request description:

  The transaction hash is different from txid for witness transactions, so we should use txid instead of hash.

ACKs for commit 0784af:

Tree-SHA512: 98b699eb5f25c3a603b11eb7072efe9bc69c0c0ecc7f996405de31bc45d92105970e09fd8e4f75b42a46498817f596d36d9b28eae7d24e63a4f2f2abfcee0eab
2021-11-09 14:08:49 -05:00
PastaPastaPasta
d4910cab3b
Merge pull request #4323 from kittywhiskers/net
merge bitcoin 15246, 15330, 15697, 16445, 16202, 16562, 18260, 22331, 23271, 16493, 17931: Refactor network message deserialization
2021-11-03 15:40:14 -04:00
MarcoFalke
7dca136101
Merge #16538: test: Add missing sync_blocks to feature_pruning
fa566b2601ee5a40bf814e529d7db253dacd28e7 test: Add missing sync_blocks to feature_pruning (MarcoFalke)

Pull request description:

  Fixes #16537
  Fixes #16520

ACKs for top commit:
  promag:
    ACK fa566b2601ee5a40bf814e529d7db253dacd28e7.
  jonatack:
    ACK fa566b2601ee5a40bf814e529d7db253dacd28e7. These past few months I have been seeing intermittent failures with this test on master. Ran `(for i in {1..40}; do test/functional/feature_pruning.py -l=debug; done)` overnight with this change; no failures.

Tree-SHA512: 5181d5ea525f43ad09e1c8b9ae72e32219f483948854c6dc07dda24b790cbdf4012e586253a0e158a71a980d1ca9f5fdf06aafbe95b8ea3d9154ef2c8687395b
2021-11-03 12:23:59 -04:00
Kittywhiskers Van Gogh
b0ee2a40a4 merge bitcoin#17931: Fix p2p_invalid_messages failing in Python 3.8 because of warning 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
4caa6d394c merge bitcoin#16493: Fix test failures 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
c0d4df0a06 merge bitcoin#16202: Refactor network message deserialization
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
907101098d merge bitcoin#16445: Skip flaky p2p_invalid_messages test on macOS 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
a5445a4584 merge bitcoin#15697: Make swap_magic_bytes in p2p_invalid_messages atomic 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
2ecf042619 merge bitcoin#15330: Fix race in p2p_invalid_messages 2021-11-03 10:45:00 +05:30
Kittywhiskers Van Gogh
e96ed3b6ac merge bitcoin#15246: Add tests for invalid message headers
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-11-03 10:44:59 +05:30
UdjinM6
bbe9b3d1e0
Merge pull request #4494 from kittywhiskers/descaddr
merge bitcoin#14150, #14477, #14646, #14667, #14886, #14565, #14491, #15368: descriptors
2021-11-01 18:25:32 +03:00
Kittywhiskers Van Gogh
3c63ffa68c merge bitcoin#15368: Descriptor checksums 2021-10-28 14:01:02 +05:30
Kittywhiskers Van Gogh
b866be5f04 merge bitcoin#14491: Allow descriptor imports with importmulti 2021-10-28 13:22:04 +05:30
Kittywhiskers Van Gogh
06037f6ba7 merge bitcoin#14565: Overhaul importmulti logic 2021-10-28 11:00:15 +05:30
Kittywhiskers Van Gogh
741598baca merge bitcoin#14886: Refactor importmulti tests 2021-10-28 10:58:23 +05:30
Kittywhiskers Van Gogh
083bc078a9 merge bitcoin#14667: Add deriveaddresses RPC util method 2021-10-28 10:56:07 +05:30
Kittywhiskers Van Gogh
49522bddb4 merge bitcoin#14477: Add ability to convert solvability info to descriptor 2021-10-28 10:56:06 +05:30
Kittywhiskers Van Gogh
95c3d05ca2 merge bitcoin#14150: Add key origin support to descriptors 2021-10-28 10:56:04 +05:30
MarcoFalke
02c6ecb02f
Merge #15655: Resolve the checkpoints <-> validation circular dependency
418d3230f8 Resolve the checkpoints <-> validation CD. (251)

Pull request description:

  This pull request attempts to resolve the `checkpoints -> validation -> checkpoints` circular dependency.

  The circular dependency is resolved by moving the `CheckPoints::GetLastCheckpoint(const CCheckpointData& data)` function to `validation.cpp` where it used exclusively by the private function `ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, const CChainParams& params, const CBlockIndex* pindexPrev, int64_t nAdjustedTime)`.

ACKs for commit 418d32:
  promag:
    utACK 418d323, only `GetLastCheckpoint` usage is in `validation.cpp` and so makes sense to move it there.
  practicalswift:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa
  MarcoFalke:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa
  sipa:
    utACK 418d3230f86f77dde6e817f502baff8a54b707fa

Tree-SHA512: 03c3556bc192e65f5e3fa76fd545d4ee7d63d3fb06b132f7a1fa6131aa21ddd2e5b2d19e2222dfe524f422daaca30efde219bed188db8c74ff4b088876b5bc16
2021-10-25 12:22:06 -04:00
MarcoFalke
5aebc257cc
Merge #15771: qa: Prevent concurrency issues reading .cookie file
90bce24576 qa: Prevent concurrency issues reading .cookie file (João Barbosa)

Pull request description:

  Hopefully fixes #15733.

ACKs for commit 90bce2:

Tree-SHA512: 4db06a63bb57e8ae56a4eab9d352a9a8d66dd7425cf491ca5f9e1ec5e60e61cb5af9eedbd32a0a9f9bdd770d767adf499eed05dd03221686eb357f6417441b61
2021-10-25 12:20:18 -04:00
PastaPastaPasta
7b78390015
refactor: Include adjustments (#4526)
* include adjustments

* fix macOs build failure

Signed-off-by: pasta <pasta@dashboost.org>

* expcitly include array in spork.h

* sort includes in most files
2021-10-25 16:55:34 +03:00
PastaPastaPasta
a8769a3cda
Merge bitcoin#16205: Refactor: Replace fprintf with tfm::format (#4531)
* tinyformat: Add doc to Bitcoin Core specific strprintf

* scripted-diff: Replace fprintf with tfm::format

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/fprintf\(std(err|out), /tfm::format(std::c\1, /g' $(git grep -l 'fprintf(' -- ':(exclude)src/crypto' ':(exclude)src/leveldb' ':(exclude)src/univalue' ':(exclude)src/secp256k1')
-END VERIFY SCRIPT-

* Replace remaining fprintf with tfm::format manually

* fixes

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-10-24 13:51:47 +03:00
Kittywhiskers Van Gogh
84339a4b84 merge bitcoin#16443: have CCoins* data managed under CChainState 2021-10-22 08:15:38 +05:30
PastaPastaPasta
dc93063857
Merge pull request #4499 from vijaydasmp/backport_v18_vijay_batch4_3
merge bitcoin#13258, #14951
2021-10-21 17:27:51 -04:00
PastaPastaPasta
6e32a464f5
Merge pull request #4484 from vijaydasmp/backport_v19_vijay_batch_1
merge bitcoin#15685,#15335,#15642,#15686,#15629
2021-10-21 16:59:32 -04:00
MarcoFalke
b5bc27805b
Merge #14951: Revert "tests: Support calling add_nodes more than once"
fa4b8c90d3 test: add_nodes can only be called once after set_test_params (MarcoFalke)
faa831102a Revert "tests: Support calling add_nodes more than once" (MarcoFalke)

Pull request description:

  Writing tests should be straightforward and with little side-effects as possible.

  I don't see how this is needed and can not be achieved with `self.num_nodes` (and `self.extra_args` et al.)

Tree-SHA512: 83a67f2cba9d97e21d80847ff405a4633fcb0d5674486efa57ee1813e46efe8709ae0fb462b8339a01ebeca5c4f2d29ecb1807d648b8fd9ee8ce336b08d580a8
2021-10-21 17:43:06 +05:30
UdjinM6
3564afd3fe
tests: Fix/improve feature_llmq_is_cl_conflicts.py (#4523)
* tests: Fix/improve feature_llmq_is_cl_conflicts.py

* tidy up a bit more
2021-10-21 14:11:00 +03:00
Vijay Das Manikpuri
68de6f2973
Merge #15629: init: Throw error when network specific config is ignored 2021-10-20 05:05:10 +05:30
MarcoFalke
fce74ffd0c
Merge #15686: [tests] make pruning test faster
03d6d23810 [tests] make pruning test faster (John Newbery)
1c29ac40fb [tests] style fixes in feature_pruning.py (John Newbery)

Pull request description:

  This commit makes the pruning.py much faster.

  Key insights to do this:

  - pruning.py doesn't care what kind of transactions make up the big
  blocks that are pruned in the test. Instead of making blocks with
  several large, expensive to construct and validate transactions,
  instead make the large blocks contain a single coinbase transaction with
  a huge OP_RETURN txout.
  - avoid stop-starting nodes where possible.

ACKs for commit 03d6d2:
  MarcoFalke:
    utACK 03d6d238104d228acfae9f3e122879bddef8d27d

Tree-SHA512: 511642ce0fa294319dce3486fe06d75970d8ab66deda7f692be081d3056b4ce5b4cf91a7b5762eefbba224ba6c848750016454ff1e5d564acc507b1c41213628
2021-10-20 05:05:09 +05:30
Wladimir J. van der Laan
617941fd8b
Merge #15642: [rpc] Remove deprecated rpc warnings
947f73ceba7d74153fe83b538e42be1dfe77aea4 [docs] remove reference to signrawtransaction in the developer docs. (John Newbery)
7b6616b78bd9f76502002db1a209a0363979e506 [rpc] Remove deprecated functionality message from validateaddress help (John Newbery)
839c3f7c4937eb8a3e1e5ab2dafff26688af1078 [rpc] Remove signrawtransaction warning (John Newbery)

Pull request description:

  Removes some deprecated code from the RPCs:

  - signrawtransaction was deprecated in 0.17 and removed in 0.18. A warning message was left in place to advise users to use signrawtransactionwithwallet and signrawtransactionwithkey. That warning can now be removed.
  - validateaddress had some functionality deprecated in 0.17 and removed in 0.18. The help text for that functionality was not removed in 0.18 and can be removed now.

Tree-SHA512: 981678a697954ff2c392752e5a183b4b12c4eb94f55766ee1aa97a70d300668237db8fc5748c2772869d0155ba4a93e38817887b98160ee972a6f6ee94e3f7d9
2021-10-16 06:23:15 +05:30
MarcoFalke
36c36aaee1
Merge #15335: Fix lack of warning of unrecognized section names
1a7ba84e11 Fix lack of warning of unrecognized section names (Akio Nakamura)

Pull request description:

  In #14708, It was introduced that to warn when unrecognized section names are exist in the config file.
  But ```m_config_sections.clear()```  in ```ArgsManager::ReadConfigStream()``` is called every time when reading each configuration file, so it can warn about only last reading file if ```includeconf``` exists.

  This PR fix lack of warning by collecting all section names by moving ```m_config_sections.clear()```  to ```ArgsManager::ReadConfigFiles()``` .
  Also add a test code to confirm this situation.

Tree-SHA512: 26aa0cbe3e4ae2e58cbe73d4492ee5cf465fd4c3e5df2c8ca7e282b627df9e637267af1e3816386b1dc6db2398b31936925ce0e432219fec3a9b3398f01e3e65
2021-10-16 06:23:15 +05:30
MarcoFalke
652a36b0f2 Merge #15943: tests: Fail if RPC has been added without tests
fad0ce59e9 tests: Fail if RPC has been added without tests (MarcoFalke)

Pull request description:

  Need to be run with --coverage

ACKs for commit fad0ce:
  ryanofsky:
    utACK fad0ce59e9154f9b7e61907a71c740a942c60282. New comment in travis.yml is the only change since last review.

Tree-SHA512: b53632dfe9865ec06991bfcba2fd67238bebbb866b355f09624eaf233257b2bca902caac6c24abb358b2f4c1c43f28ca75e30982765911e1a117102df65276d9
2021-10-12 15:56:33 -07:00
MarcoFalke
0d58cdabb7 Merge #15841: [test] combine_logs: append node stderr and stdout if it exists
fa90a89eee [test] combine_logs: append node stderr and stdout if it exists (MarcoFalke)

Pull request description:

  See issue:

  * tests: bitcoind stdout and error should be passed to the logger #13519

ACKs for commit fa90a8:
  laanwj:
    utACK fa90a89eeefcc362970216d95973ad01a21366ed

Tree-SHA512: 39c4596e2e133c9011ab01bc4dc24e884d0a8cce7a67d3765f17c288d3ffbd438e1ff6016d0f817a981b27fce17fa77a1ff56787ddb1ea55123ce9ecffb44c08
2021-10-12 15:56:33 -07:00
MarcoFalke
772dad995c Merge #14683: tests: better combine_logs.py behavior
4aabadbf44 tests: have combine_logs default to most recent test dir (James O'Beirne)

Pull request description:

  Have `combine_logs.py` default to the most recent test directory if no argument is provided. This allows you to avoid an annoying copy-paste when iterating on a failing test, since you can do something like
  ```sh
  alias testlogs='./test/functional/combine_logs.py -c | less'

  ./test/functional/some_test.py  # fails
  testlogs
  ```

Tree-SHA512: 919642ab09c314888a23c9491963b35b9da87e60deb740d1d5e816444aa9bdda5e519dc8ca131669f2d563167ef5f5abb14e22f20f47bf8362915ed578181846
2021-10-12 15:56:33 -07:00
Dzutte
0f2e8aa504
Merge bitcoin#14726: Use RPCHelpMan for all RPCs (#4492)
* Merge #14726: Use RPCHelpMan for all RPCs

fa5e0452e875a7ca6bf6fe61fdd652d341eece40 rpc: Documentation fixups (MarcoFalke)
fa91e8eda541acdb78ca481b74605639f319c108 Use RPCHelpMan for all RPCs (MarcoFalke)
fa520e72f7b5964cea1ade666e71212914556cf3 lint: Must use RPCHelpMan to generate the RPC docs (MarcoFalke)

Pull request description:

  The resulting documentation should not change unless the type in the oneline-summary was previously incorrect. (E.g. string vs bool)

Tree-SHA512: 4ff355b6a53178f02781e97a7aca7ee1d0d97ff348b6bf5a01caa1c96904ee33c704465fae54c2cd7445097427fd04c71ad3779bb7a7ed886055ef36c1b5a1d0

* Dash-specific changes to support RPCHelpMan with RPC commands

Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
2021-10-12 00:55:23 +03:00
UdjinM6
77b2cfc374
ci/lint: Fix lint-shell.sh in CI (#4489)
* lint: Skip shell linting if gawk is not installed

* lint: Skip Gitian descriptor scripts checking if jq is not installed

* ci: Install gawk and jq

`yq` requires `jq`

* Fix shellcheck warnings
2021-10-11 00:41:20 +03:00