Dash - Reinventing Cryptocurrency
Go to file
fanquake 28daf0d1c4
Merge bitcoin/bitcoin#22496: addrman: Remove addrman hotfixes
65332b1178c75e1f83415bad24918996a1524866 [addrman] Remove RemoveInvalid() (John Newbery)

Pull request description:

  PRs #22179 and #22112 (EDIT: later reverted in #22497) added hotfix code to addrman to remove invalid addresses and mutate the ports of I2P entries after entering into addrman. Those hotfixes included at least two addrman data corruption bugs:

  - #22467 (Assertion `nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()' failed)
  - #22470 (Changing I2P ports in addrman may wronly skip some entries from "new" buckets)

  Hotfixing addrman is inherently dangerous. There are many members that have implicit assumptions on each others' state, and mutating those directly can lead to violating addrman's internal invariants.

  Instead of trying to hotfix addrman, just don't insert any invalid addresses. For now, those are addresses which fail `CNetAddr::IsValid()`.

ACKs for top commit:
  sipa:
    utACK 65332b1178c75e1f83415bad24918996a1524866. I tried to reason through scenarios that could introduce inconsistencies with this code, but can't find any.
  fanquake:
    ACK 65332b1178c75e1f83415bad24918996a1524866 - Skipping the addition of invalid addresses (this code was initially added for Tor addrs) rather than adding all the invalids then removing them all when finishing unserializing seems like an improvement. Especially if it can be achieved with less code.

Tree-SHA512: 023113764cb475572f15da7bf9824b62b79e10a7e359af2eee59017df354348d2aeed88de0fd4ad7a9f89a0dad10827f99d70af6f1cb20abb0eca2714689c8d7
2024-06-03 12:09:47 -05:00
.github chore: narrow score of clang-diff-format for dash specific files only 2024-03-24 00:41:24 +07:00
.tx
build-aux/m4 Merge #19522: build: fix building libconsensus with reduced exports for Darwin targets 2024-04-11 02:25:06 +07:00
ci Merge #6020: backport: bitcoin#21053, #22082, #22118, #22292, #22308, #22334, #22358, #22388, bitcoin-core/gui#271, #311 2024-05-18 21:08:06 -05:00
contrib Merge bitcoin/bitcoin#21740: test: add new python linter to check file names and permissions 2024-05-16 02:09:37 +07:00
depends fix: bump version of libbacktrace library 2024-05-29 12:26:11 +07:00
doc Merge #6033: backport: bitcoin#18202, #19202, #19501, #19725, #19770, #19877, #20043, partial #18878 2024-05-29 12:04:08 -05:00
share fix: wrong permission for various files accordingly new linter 2024-05-16 02:09:48 +07:00
src Merge bitcoin/bitcoin#22496: addrman: Remove addrman hotfixes 2024-06-03 12:09:47 -05:00
test Merge #6033: backport: bitcoin#18202, #19202, #19501, #19725, #19770, #19877, #20043, partial #18878 2024-05-29 12:04:08 -05:00
.cirrus.yml Merge #5976: backport: bitcoin#17934, #21338, #21390, #21445, #21602, #21606, #21609, #21676, bitcoin-core/gui#260, 2024-04-12 10:30:27 -05:00
.dockerignore
.editorconfig
.gitattributes
.gitignore
.gitlab-ci.yml chore: increase amount of build jobs from 4 to 8 for depends 2024-03-17 01:09:41 +07:00
.python-version
.style.yapf
autogen.sh
CMakeLists.txt
configure.ac Merge bitcoin/bitcoin#21884: fuzz: Remove unused --enable-danger-fuzz-link-all option 2024-04-23 22:41:09 +07:00
CONTRIBUTING.md doc: replace gfd() function to recommendation to use git diff-range 2024-04-23 11:26:00 -05:00
COPYING docs: update license year range to 2024 (#5890) 2024-02-22 20:56:43 -06:00
INSTALL.md
libdashconsensus.pc.in
Makefile.am
README.md Merge #20691: ci, doc: Travis CI features and mentions cleanup 2024-03-27 00:48:26 +07:00
SECURITY.md

Dash Core staging tree

CI master develop
Gitlab Build Status Build Status

https://www.dash.org

For an immediately usable, binary version of the Dash Core software, see https://www.dash.org/downloads/.

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

What is Dash?

Dash is an experimental digital currency that enables instant, private payments to anyone, anywhere in the world. Dash uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money are carried out collectively by the network. Dash Core is the name of the open source software which enables the use of this currency.

For more information read the original Dash whitepaper.

License

Dash 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 meant to be stable. Development is normally done in separate branches. Tags are created to indicate new official, stable release versions of Dash Core.

The develop branch is regularly built (see doc/build-*.md for instructions) and tested, but is not guaranteed to be completely stable.

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. These tests can be run (if the test dependencies are installed) with: test/functional/test_runner.py

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.

Translations

Changes to translations as well as new translations can be submitted to Dash 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.