Skip to content

Conversation

@fanquake
Copy link
Member

@fanquake fanquake commented Jan 16, 2023

This PR removes the --enable-upnp-default and --enable-natpmp-default options from configure.

It's odd to me that we maintain configure-time options for setting the default port-forwarding runtime state (but no other similar options), and I'm not sure what use-case it satisfies, that can't be achieved by multiple other means. I also doubt that we'll ever restart using these in release builds, or turning on any of this by default.

I think the only scenario these options would be used is when you want to compile your own binaries (we don't use them in Guix), with port-forwarding on by default, but otherwise can't or don't want to use a .conf file, can't or don't want to pass command line options at runtime, and also don't want to modify the source code?

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 16, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto, TheCharlatan

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@fanquake fanquake force-pushed the remove_network_compile_time_default_setting branch from 1489586 to e9db104 Compare January 16, 2023 14:10
@fanquake fanquake force-pushed the remove_network_compile_time_default_setting branch 2 times, most recently from 099b893 to 387b86a Compare January 16, 2023 14:40
@fanquake fanquake marked this pull request as draft January 16, 2023 14:45
@fanquake fanquake force-pushed the remove_network_compile_time_default_setting branch from 387b86a to fb8f847 Compare January 16, 2023 14:59
@fanquake fanquake marked this pull request as ready for review January 16, 2023 15:04
@DrahtBot
Copy link
Contributor

Guix builds

File commit 04e54fd
(master)
commit ad58437cd9d0c75672fda816b20c98d5c473d41d
(master and this pull)
SHA256SUMS.part 4e1d0230577de4b6... 1510f7f67a92de28...
*-aarch64-linux-gnu-debug.tar.gz 37b3dd585a67552b... d44baf9514c2a408...
*-aarch64-linux-gnu.tar.gz f8a39a712a54b903... 1ba4d5982b4809a8...
*-arm-linux-gnueabihf-debug.tar.gz 90ea67ece79851fd... 65bd548f2d4fe116...
*-arm-linux-gnueabihf.tar.gz 40e33f85df7d9302... 8dbb4451a4587cc8...
*-arm64-apple-darwin-unsigned.dmg a4023e327f78e7a6... 151d71042e972435...
*-arm64-apple-darwin-unsigned.tar.gz 13b2eb996655bef7... 7d659e40083fff1c...
*-arm64-apple-darwin.tar.gz 8b9155333f54be43... afef25289fcfb088...
*-powerpc64-linux-gnu-debug.tar.gz 75781b21d583604a... d0d9eacb278e8e25...
*-powerpc64-linux-gnu.tar.gz 7ea8b7d8c56b892a... caed1d1c0c6af274...
*-powerpc64le-linux-gnu-debug.tar.gz d5ed38dd3278db24... 378cf3499cef1e74...
*-powerpc64le-linux-gnu.tar.gz e78071c841a39641... a4a124357540e700...
*-riscv64-linux-gnu-debug.tar.gz c39095ce79144fdb... d0a571de48b80aaf...
*-riscv64-linux-gnu.tar.gz 1f5ffb6ac44c0e65... 95c01f5f9be67263...
*-win64-debug.zip 2693ef1f1e45a6d8... 84778fa05565046f...
*-win64-setup-unsigned.exe 62c1bf0fe0d4544c... 86d3c24f5e224108...
*-win64-unsigned.tar.gz 7b591622ff2b9320... 94f8a5f5b4fd4a80...
*-win64.zip 84f6b8f44f16ecc7... 7f5e1fe52439567f...
*-x86_64-apple-darwin-unsigned.dmg dc7b045515b73030... 44da22a79a1c6c8b...
*-x86_64-apple-darwin-unsigned.tar.gz d49d68f4cc848714... 1dfc51de8c3b44e8...
*-x86_64-apple-darwin.tar.gz 838793c521fec733... e992e2147c762799...
*-x86_64-linux-gnu-debug.tar.gz dcdee05e7963e4be... 0d811372445b09d0...
*-x86_64-linux-gnu.tar.gz 994d6a153465aa8d... fbde669fa4502e74...
*.tar.gz cc701c23fc62efbf... 9a0120f431b28405...
guix_build.log 3da50f15ac7713d2... 6fe4d7d6cfe8d61d...
guix_build.log.diff 32304bf0d3dc6c42...

@sedited
Copy link
Contributor

sedited commented Jan 20, 2023

Concept ACK

Looking at the history, the --enable-upnp-default has been around since the switch to autotools. Before that, when the project was still using qmake, it was possible to pass qmake "USE_UPNP=1 to achieve the same behavior. Similar options were available with qmake "USE_DBUS=1 and qmake "USE_QRCODE" (though for one reason or another these were just translated into a single with-* configure option) and qmake "USE_IPV6", which was translated to --enable-ipv6. The npmp behavior seems to have just copied the existing upnp checks.

Dbus and qrencode are now handled in "special" qt configure checks, while the ipv6 option was removed in #4115. Control of ipv6 usage was still somewhat retained through the onlynet argument. Similar arguments apply to this case as well.

@hebasto
Copy link
Member

hebasto commented Jan 25, 2023

Concept ACK on:

It's odd to me that we maintain configure-time options for setting the default port-forwarding runtime state


The npmp behavior seems to have just copied the existing upnp checks.

That's true.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fb8f847

The content of src/config/bitcoin-config.h:

$ grep -B 2 -E USE_UPNP\|USE_NATPMP src/config/bitcoin-config.h
/* NAT-PMP support not compiled if undefined, otherwise value (0 or 1)
   determines default state */
#define USE_NATPMP 0
--
/* UPnP support not compiled if undefined, otherwise value (0 or 1) determines
   default state */
#define USE_UPNP 0
  • this PR:
$ grep -B 2 -E USE_UPNP\|USE_NATPMP src/config/bitcoin-config.h

/* NAT-PMP support */
#define USE_NATPMP 1
--

/* UPnP support */
#define USE_UPNP 1

Two suggestions only:

  1. No need to use AC_DEFINE_UNQUOTED macros. The AC_DEFINE works just fine as no arguments require expansion.
  2. Maybe document the value, which a macro is defined to, explicitly?

@fanquake fanquake force-pushed the remove_network_compile_time_default_setting branch from fb8f847 to d51f0fa Compare January 28, 2023 15:31
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d51f0fa, rebased and comments have been addressed since my recent review.

Copy link
Contributor

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d51f0fa

@fanquake fanquake merged commit 79e18eb into bitcoin:master Jan 30, 2023
@fanquake fanquake deleted the remove_network_compile_time_default_setting branch January 30, 2023 11:43
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 30, 2023
…tions from configure

d51f0fa doc: add release notes for 26896 (fanquake)
2b24879 build: remove --enable-upnp-default from configure (fanquake)
02f5a5e build: remove --enable-natpmp-default from configure (fanquake)
25a0e8b Remove configure-time setting of DEFAULT_UPNP (fanquake)
06562e5 Remove configure-time setting of DEFAULT_NATPMP (fanquake)

Pull request description:

  This PR removes the `--enable-upnp-default` and `--enable-natpmp-default` options from configure.

  It's odd to me that we maintain configure-time options for setting the default port-forwarding runtime state (but no other similar options), and I'm not sure what use-case it satisfies, that can't be achieved by multiple other means. I also doubt that we'll ever restart using these in release builds, or turning on any of this by default.

  I think the only scenario these options would be used is when you want to compile your own binaries (we don't use them in Guix), with port-forwarding on by default, but otherwise can't or don't want to use a `.conf` file, can't or don't want to pass command line options at runtime, and also don't want to modify the source code?

ACKs for top commit:
  hebasto:
    ACK d51f0fa, rebased and comments have been addressed since my recent [review](bitcoin#26896 (review)).
  TheCharlatan:
    ACK d51f0fa

Tree-SHA512: 481decd8bddd8b03b7319591e3acf189f7b6b96c9a9a8c5bc1a3f8ec00d0b8f9b52d2f5c28a298a2ec947cfe9611cfd184e393ccb2e4e21bfce86ca7d4de60d3
PastaPastaPasta pushed a commit to knst/dash that referenced this pull request Dec 4, 2023
…tions from configure

d51f0fa doc: add release notes for 26896 (fanquake)
2b24879 build: remove --enable-upnp-default from configure (fanquake)
02f5a5e build: remove --enable-natpmp-default from configure (fanquake)
25a0e8b Remove configure-time setting of DEFAULT_UPNP (fanquake)
06562e5 Remove configure-time setting of DEFAULT_NATPMP (fanquake)

Pull request description:

  This PR removes the `--enable-upnp-default` and `--enable-natpmp-default` options from configure.

  It's odd to me that we maintain configure-time options for setting the default port-forwarding runtime state (but no other similar options), and I'm not sure what use-case it satisfies, that can't be achieved by multiple other means. I also doubt that we'll ever restart using these in release builds, or turning on any of this by default.

  I think the only scenario these options would be used is when you want to compile your own binaries (we don't use them in Guix), with port-forwarding on by default, but otherwise can't or don't want to use a `.conf` file, can't or don't want to pass command line options at runtime, and also don't want to modify the source code?

ACKs for top commit:
  hebasto:
    ACK d51f0fa, rebased and comments have been addressed since my recent [review](bitcoin#26896 (review)).
  TheCharlatan:
    ACK d51f0fa

Tree-SHA512: 481decd8bddd8b03b7319591e3acf189f7b6b96c9a9a8c5bc1a3f8ec00d0b8f9b52d2f5c28a298a2ec947cfe9611cfd184e393ccb2e4e21bfce86ca7d4de60d3
@bitcoin bitcoin locked and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants