Dash - Reinventing Cryptocurrency
Go to file
Jonas Schnelli 516cfb54c5
Merge #14687: zmq: enable tcp keepalive
c276df775914e4e42993c76e172ef159e3b830d4 zmq: enable tcp keepalive (mruddy)

Pull request description:

  This addresses https://github.com/bitcoin/bitcoin/issues/12754.

  These changes enable node operators to address the silent dropping (by network middle boxes) of long-lived low-activity ZMQ TCP connections via further operating system level TCP keepalive configuration. For example, ZMQ sockets that publish block hashes can be affected in this way due to the length of time it sometimes takes between finding blocks (e.g.- sometimes more than an hour).

  Prior to this patch, operating system level TCP keepalive configurations would not take effect since the SO_KEEPALIVE option was not enabled on the underlying socket.

  There are additional ZMQ socket options related to TCP keepalive that can be set. However, I decided not to implement those options in this changeset because doing so would require adding additional bitcoin node configuration options, and would not yield a better outcome. I preferred a small, easily reviewable patch that doesn't add a bunch of new config options, with the tradeoff that the fine tuning would have to be done via well-documented operating system specific configurations.

  I tested this patch by running a node with:
  `./src/qt/bitcoin-qt -regtest -txindex -datadir=/tmp/node -zmqpubhashblock=tcp://127.0.0.1:28332 &`
  and connecting to it with:
  `python3 ./contrib/zmq/zmq_sub.py`

  Without these changes, `ss -panto | grep 28332 | grep ESTAB | grep bitcoin` will report no keepalive timer information. With these changes, the output from the prior command will show keepalive timer information consistent with the configuration at the time of connection establishment, e.g.-: `timer:(keepalive,119min,0)`.

  I also tested with a non-TCP transport and did not witness any adverse effects:
  `./src/qt/bitcoin-qt -regtest -txindex -datadir=/tmp/node -zmqpubhashblock=ipc:///tmp/bitcoin.block &`

ACKs for top commit:
  adamjonas:
    Just to summarize for those looking to review - as of c276df775914e4e42993c76e172ef159e3b830d4 there are 3 tACKs (n-thumann, Haaroon, and dlogemann), 1 "looks good to me" (laanwj) with no NACKs or any show-stopping concerns raised.
  jonasschnelli:
    utACK c276df775914e4e42993c76e172ef159e3b830d4

Tree-SHA512: b884c2c9814e97e666546a7188c48f9de9541499a11a934bd48dd16169a900c900fa519feb3b1cb7e9915fc7539aac2829c7806b5937b4e1409b4805f3ef6cd1
2021-09-24 13:26:37 -04:00
.github ci: Add github-action that automatically runs clang-format. Will not fail CI (#4387) 2021-09-02 23:00:07 +03:00
.travis Merge #16438: travis: Print memory and number of cpus 2021-09-12 14:15:12 -04:00
.tx
build-aux/m4
ci merge #17361: Lint Gitian descriptors with ShellCheck 2021-09-03 21:35:53 +05:30
contrib Merge #16802: scripts: In linearize, search for next position of magic bytes rather than fail 2021-09-15 13:54:38 -04:00
depends Fix outdated config.(guess|sub) of libbacktrace (#4417) 2021-09-13 12:57:24 -04:00
doc Merge #14687: zmq: enable tcp keepalive 2021-09-24 13:26:37 -04:00
docker Partial Merge #14831: Scripts and tools: Use #!/usr/bin/env bash instead of #!/bin/bash. 2021-08-15 11:08:08 -04:00
share Merge #15388: [build] Makefile.am: add rule for src/bitcoin-wallet 2021-09-10 20:54:52 -04:00
src Merge #14687: zmq: enable tcp keepalive 2021-09-24 13:26:37 -04:00
test Merge #19631: test: Wait for 'cmpctblock' in p2p_compactblocks when it is expected 2021-09-17 16:00:50 -04:00
.cirrus.yml
.editorconfig
.fuzzbuzz.yml
.gitattributes
.gitignore
.gitlab-ci.yml merge #20419: set minimum supported macOS to 10.14 2021-09-03 21:35:53 +05:30
.python-version merge #14954: Require python 3.5 2021-08-31 11:16:12 +05:30
.style.yapf
.travis.yml Merge pull request #4396 from Munkybooty/backports-0.18-pr16 2021-09-14 12:05:37 -04:00
autogen.sh
CMakeLists.txt merge #20419: set minimum supported macOS to 10.14 2021-09-03 21:35:53 +05:30
configure.ac Merge #17738: build: remove linking librt for backwards compatibility 2021-09-07 03:25:10 +03:00
CONTRIBUTING.md
COPYING
INSTALL.md
libdashconsensus.pc.in
Makefile.am Merge #15388: [build] Makefile.am: add rule for src/bitcoin-wallet 2021-09-10 20:54:52 -04:00
README.md
SECURITY.md

Dash Core staging tree 0.17

CI master develop
Gitlab Build Status Build Status

https://www.dash.org

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, as well as an immediately useable, binary version of the Dash Core software, see https://www.dash.org/get-dash/.

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 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 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.

Translators should also follow the forum.