Bitcoin Core integration/staging tree
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Andrew Chow abe4fedab7
Merge bitcoin/bitcoin#28125: wallet: bugfix, disallow migration of invalid scripts
8e7e3e6149 test: wallet, verify migration doesn't crash for an invalid script (furszy)
1de8a2372a wallet: disallow migration of invalid or not-watched scripts (furszy)

Pull request description:

  Fixing #28057.

  The legacy wallet allows to import any raw script (#28126), without
  checking if it was valid or not. Appending it to the watch-only set.

  This causes a crash in the migration process because we are only
  expecting to find valid scripts inside the legacy spkm.

  These stored scripts internally map to `ISMINE_NO` (same as if they
  weren't stored at all..).

  So we need to check for these special case, and take into account that
  the legacy spkm could be storing invalid not watched scripts.

  Which, in code words, means `IsMineInner()` returning
  `IsMineResult::INVALID` for them.

  To verify this, can run the test commit on top of master.
  `` will crash without the bugfix commit.

ACKs for top commit:
    ACK 8e7e3e6149

Tree-SHA512: c2070e8ba78037a8f573b05bf6caa672803188f05429adf5b93f9fc1493faedadecdf018dee9ead27c656710558c849c5da8ca5f6f3bc9c23b3c4275d2fb50c7
5 days ago
.github ci: Reintroduce fixed "test-each-commit" job 5 days ago
.tx qt: Bump Transifex slug for 26.x 3 weeks ago
build-aux/m4 build: Bump minimum supported GCC to g++-9 4 months ago
build_msvc Remove unused raw-pointer read helper from univalue 2 months ago
ci Merge bitcoin/bitcoin#28476: ci: LLVM 17 for MSAN jobs 1 week ago
contrib doc: s/--no-substitute/--no-substitutes in guix/INSTALL 2 weeks ago
depends build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS 1 week ago
doc Merge bitcoin/bitcoin#28414: wallet rpc: return final tx hex from walletprocesspsbt if complete 2 weeks ago
share depends: Bump MacOS minimum runtime requirement to 11.0 3 months ago
src Merge bitcoin/bitcoin#28125: wallet: bugfix, disallow migration of invalid scripts 5 days ago
test Merge bitcoin/bitcoin#28125: wallet: bugfix, disallow migration of invalid scripts 5 days ago
.cirrus.yml Squashed 'src/secp256k1/' changes from c545fdc374..199d27cea3 3 weeks ago
.editorconfig ci: Drop AppVeyor CI integration 2 years ago
.gitattributes Separate protocol versioning from clientversion 9 years ago
.gitignore refactor: cleanups post unsubtree'ing univalue 1 year ago
.python-version ci: Use DOCKER_BUILDKIT for lint image 2 months ago
.style.yapf Update .style.yapf 4 months ago doc: Explain squashing with merge commits 1 year ago
COPYING doc: Update license year range to 2023 9 months ago doc: Added hyperlink for doc/build 2 years ago build: package test_bitcoin in Windows installer 1 year ago doc: Explain Bitcoin Core in 1 year ago doc: Add my key to 1 year ago build: make sure we can overwrite config.{guess,sub} 3 months ago doc: Clarify that -fstack-reuse=all bugs exist on all versions of GCC 2 weeks ago build: remove libcrypto as internal dependency in libbitcoinconsensus.pc 4 years ago

Bitcoin Core integration/staging tree

For an immediately usable, binary version of the Bitcoin Core software, see

What is Bitcoin Core?

Bitcoin Core connects to the Bitcoin peer-to-peer network to download and fully validate blocks and transactions. It also includes a wallet and graphical user interface, which can be optionally built.

Further information about Bitcoin Core is available in the doc folder.


Bitcoin Core is released under the terms of the MIT license. See COPYING for more information or see

Development Process

The master branch is regularly built (see doc/build-*.md for instructions) and tested, but it is not guaranteed to be completely stable. Tags are created regularly from release branches to indicate new official, stable release versions of Bitcoin Core.

The repository is used exclusively for the development of the GUI. Its master branch is identical in all monotree repositories. Release branches and tags do not exist, so please do not fork that repository unless it is for development reasons.

The contribution workflow is described in and useful hints for developers can be found in doc/


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/

There are also regression and integration tests, written in Python. These tests can be run (if the test dependencies are installed) with: test/functional/

The CI (Continuous Integration) systems make 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.


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.