223588b1bbAdd a --descriptors option to various tests (Andrew Chow)869f7ab30atests: Add RPCOverloadWrapper which overloads some disabled RPCs (Andrew Chow)cf06062859Correctly check for default wallet (Andrew Chow)886e0d75f5Implement CWallet::IsSpentKey for non-LegacySPKMans (Andrew Chow)3c19fdd2a2Return error when no ScriptPubKeyMan is available for specified type (Andrew Chow)388ba94231Change wallet_encryption.py to use signmessage instead of dumpprivkey (Andrew Chow)1346e14831Functional tests for descriptor wallets (Andrew Chow)f193ea889dadd importdescriptors RPC and tests for native descriptor wallets (Hugo Nguyen)ce24a94494Add IsLegacy to CWallet so that the GUI knows whether to show watchonly (Andrew Chow)1cb42b22b1Generate new descriptors when encrypting (Andrew Chow)82ae02b165Be able to create new wallets with DescriptorScriptPubKeyMans as backing (Andrew Chow)b713baa75aImplement GetMetadata in DescriptorScriptPubKeyMan (Andrew Chow)8b9603bd0bChange GetMetadata to use unique_ptr<CKeyMetadata> (Andrew Chow)72a9540df9Implement FillPSBT in DescriptorScriptPubKeyMan (Andrew Chow)84b4978c02Implement SignMessage for descriptor wallets (Andrew Chow)bde7c9fa38Implement SignTransaction in DescriptorScriptPubKeyMan (Andrew Chow)d50c8ddd41Implement GetSolvingProvider for DescriptorScriptPubKeyMan (Andrew Chow)f1ca5feb4aImplement GetKeypoolOldestTime and only display it if greater than 0 (Andrew Chow)586b57a9a6Implement ReturnDestination in DescriptorScriptPubKeyMan (Andrew Chow)f866957979Implement GetReservedDestination in DescriptorScriptPubKeyMan (Andrew Chow)a775f7c7fdImplement Unlock and Encrypt in DescriptorScriptPubKeyMan (Andrew Chow)bfdd073486Implement GetNewDestination for DescriptorScriptPubKeyMan (Andrew Chow)58c7651821Implement TopUp in DescriptorScriptPubKeyMan (Andrew Chow)e014886a34Implement SetupGeneration for DescriptorScriptPubKeyMan (Andrew Chow)46dfb99768Implement writing descriptorkeys, descriptorckeys, and descriptors to wallet file (Andrew Chow)4cb9b69be0Implement several simple functions in DescriptorScriptPubKeyMan (Andrew Chow)d1ec3e4f19Add IsSingleType to Descriptors (Andrew Chow)953feb3d27Implement loading of keys for DescriptorScriptPubKeyMan (Andrew Chow)2363e9fcaaLoad the descriptor cache from the wallet file (Andrew Chow)46c46aebb7Implement GetID for DescriptorScriptPubKeyMan (Andrew Chow)ec2f9e1178Implement IsHDEnabled in DescriptorScriptPubKeyMan (Andrew Chow)741122d4c1Implement MarkUnusedAddresses in DescriptorScriptPubKeyMan (Andrew Chow)2db7ca765cImplement IsMine for DescriptorScriptPubKeyMan (Andrew Chow)db7177af8cAdd LoadDescriptorScriptPubKeyMan and SetActiveScriptPubKeyMan to CWallet (Andrew Chow)78f8a92910Implement SetType in DescriptorScriptPubKeyMan (Andrew Chow)834de0300cStore WalletDescriptor in DescriptorScriptPubKeyMan (Andrew Chow)d8132669e1Add a lock cs_desc_man for DescriptorScriptPubKeyMan (Andrew Chow)3194a7f88aIntroduce WalletDescriptor class (Andrew Chow)6b13cd3fa8Create LegacyScriptPubKeyMan when not a descriptor wallet (Andrew Chow)aeac157c9dReturn nullptr from GetLegacyScriptPubKeyMan if descriptor wallet (Andrew Chow)96accc73f0Add WALLET_FLAG_DESCRIPTORS (Andrew Chow)6b8119af53Introduce DescriptorScriptPubKeyMan as a dummy class (Andrew Chow)06620302c7Introduce SetType function to tell ScriptPubKeyMans the type and internal-ness of it (Andrew Chow) Pull request description: Introducing the wallet of the glorious future (again): native descriptor wallets. With native descriptor wallets, addresses are generated from descriptors. Instead of generating keys and deriving addresses from keys, addresses come from the scriptPubKeys produced by a descriptor. Native descriptor wallets will be optional for now and can only be created by using `createwallet`. Descriptor wallets will store descriptors, master keys from the descriptor, and descriptor cache entries. Keys are derived from descriptors on the fly. In order to allow choosing different address types, 6 descriptors are needed for normal use. There is a pair of primary and change descriptors for each of the 3 address types. With the default keypool size of 1000, each descriptor has 1000 scriptPubKeys and descriptor cache entries pregenerated. This has a side effect of making wallets large since 6000 pubkeys are written to the wallet by default, instead of the current 2000. scriptPubKeys are kept only in memory and are generated every time a descriptor is loaded. By default, we use the standard BIP 44, 49, 84 derivation paths with an external and internal derivation chain for each. Descriptors can also be imported with a new `importdescriptors` RPC. Native descriptor wallets use the `ScriptPubKeyMan` interface introduced in #16341 to add a `DescriptorScriptPubKeyMan`. This defines a different IsMine which uses the simpler model of "does this scriptPubKey exist in this wallet". Furthermore, `DescriptorScriptPubKeyMan` does not have watchonly, so with native descriptor wallets, it is not possible to have a wallet with both watchonly and non-watchonly things. Rather a wallet with `disable_private_keys` needs to be used for watchonly things. A `--descriptor` option was added to some tests (`wallet_basic.py`, `wallet_encryption.py`, `wallet_keypool.py`, `wallet_keypool_topup.py`, and `wallet_labels.py`) to allow for these tests to use descriptor wallets. Additionally, several RPCs are disabled for descriptor wallets (`importprivkey`, `importpubkey`, `importaddress`, `importmulti`, `addmultisigaddress`, `dumpprivkey`, `dumpwallet`, `importwallet`, and `sethdseed`). ACKs for top commit: Sjors: utACK223588b1bb(rebased, nits addressed) jonatack: Code review re-ACK223588b1bb. fjahr: re-ACK223588b1bbinstagibbs: light re-ACK223588bmeshcollider: Code review ACK223588b1bbTree-SHA512: 59bc52aeddbb769ed5f420d5d240d8137847ac821b588eb616b34461253510c1717d6a70bab8765631738747336ae06f45ba39603ccd17f483843e5ed9a90986
Bitcoin Core integration/staging tree
What is Bitcoin?
Bitcoin is an experimental digital currency that enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money are carried out collectively by the network. Bitcoin Core is the name of open source software which enables the use of this currency.
For more information, as well as an immediately usable, binary version of the Bitcoin Core software, see https://bitcoincore.org/en/download/, or read the original whitepaper.
License
Bitcoin Core is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.
Development Process
The master branch is regularly built and tested, but is not guaranteed to be
completely stable. Tags are created
regularly to indicate new official, stable release versions of Bitcoin Core.
The contribution workflow is described in CONTRIBUTING.md and useful hints for developers can be found in doc/developer-notes.md.
Testing
Testing and code review is the bottleneck for development; we get more pull requests than we can review and test on short notice. Please be patient and help out by testing other people's pull requests, and remember this is a security-critical project where any mistake might cost people lots of money.
Automated Testing
Developers are strongly encouraged to write unit tests for new code, and to
submit new unit tests for old code. Unit tests can be compiled and run
(assuming they weren't disabled in configure) with: make check. Further details on running
and extending unit tests can be found in /src/test/README.md.
There are also regression and integration tests, written
in Python, that are run automatically on the build server.
These tests can be run (if the test dependencies are installed) with: test/functional/test_runner.py
The Travis CI system makes sure that every pull request is built for Windows, Linux, and macOS, and that unit/sanity tests are run automatically.
Manual Quality Assurance (QA) Testing
Changes should be tested by somebody other than the developer who wrote the code. This is especially important for large or high-risk changes. It is useful to add a test plan to the pull request description if testing the changes is not straightforward.
Translations
Changes to translations as well as new translations can be submitted to Bitcoin Core's Transifex page.
Translations are periodically pulled from Transifex and merged into the git repository. See the translation process for details on how this works.
Important: We do not accept translation changes as GitHub pull requests because the next pull from Transifex would automatically overwrite them again.
Translators should also subscribe to the mailing list.