Skip to content

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Mar 2, 2021

Overview

Removal of BIP70. Removes protobuf dependency, no further need to compile Qt with OpenSSL support. Advances the larger goal of dropping OpenSSL as a dependency (source)

Resources

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

Looks good overall, few tiny issues: see below + should probably drop libprotobuf-dev, protobuf-compiler, line in contrib/debian/control

@UdjinM6 UdjinM6 added this to the 17 milestone Mar 8, 2021
@UdjinM6
Copy link

UdjinM6 commented Mar 8, 2021

Another missing part:

--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -451,10 +451,6 @@ void BitcoinApplication::addWallet(WalletModel* walletModel)
     if (m_wallet_models.empty()) {
         window->setCurrentWallet(walletModel->getWalletName());
     }
-
-    connect(walletModel, SIGNAL(coinsSent(WalletModel*, SendCoinsRecipient, QByteArray)),
-        paymentServer, SLOT(fetchPaymentACK(WalletModel*, const SendCoinsRecipient&, QByteArray)));
-
     m_wallet_models.push_back(walletModel);
 #endif
 }

same as https://github.com/bitcoin/bitcoin/pull/17165/files#diff-2e949323a5be6fd47f7af05ba778bbd8f0c11d9530b95de9e21690004d9ee40cL342

@QuantumExplorer
Copy link
Member

Nack. Dash uses BIP70 quite a lot in mobile, especially with Anypay. We need to carefully think if we really want to remove this. BIP70 will also be expanded to support DashPay features.

@kwvg
Copy link
Collaborator Author

kwvg commented Mar 9, 2021

Nack. Dash uses BIP70 quite a lot in mobile, especially with Anypay. We need to carefully think if we really want to remove this. BIP70 will also be expanded to support DashPay features.

Fair enough, but that also means that a) we're completely on our own because Bitcoin will no longer be supporting it, b) Core would remain to some extent permanently tethered to OpenSSL and Protobuf and c) The argument in favor of removing BIP70 is that existing solutions already exist that do not justify carrying the debt associated with maintaining BIP70.

That being said, there is speculation that BIP70's removal was not due to strictly technical reasons alone and I can see why maybe having it disabled but still available in one release before axing it may be a better solution.

@kwvg kwvg requested a review from UdjinM6 March 9, 2021 04:39
@UdjinM6
Copy link

UdjinM6 commented Mar 9, 2021

@QuantumExplorer

Dash uses BIP70 quite a lot in mobile, especially with Anypay.

This PR doesn't affect mobile/SPV wallets in any way.

BIP70 will also be expanded to support DashPay features.

Core (L1) is not supposed to know anything about DashPay (L2) or its features. I don't think such expansions would be merged here in the future.

@QuantumExplorer
Copy link
Member

QuantumExplorer commented Mar 9, 2021

This PR doesn't affect mobile/SPV wallets in any way

I meant that Dash users in mobile are known to use BIP70, for payments with Anypay. I am not sure if people might also want to use the Core client for such payments.

Core (L1) is not supposed to know anything about DashPay (L2) or its features.

This one is a little tricky. I am not sold that Layers should be defined as products. In my mind Layer 1 is the blockchain layer. Layer 2 is the state layer, and Layer 3 is the application data layer (state can be encrypted for instance). While L1 should not know anything about L2, Core can certainly have updates that would bring it Layer 3 capabilities and maybe even some state knowledge. This would not be for Masternodes, but for wallets. This would be especially useful for exchanges that use our core wallet, but want an Identity they can use for their customers to send funds to over DashPay.

In the end, the Bitcoin Core wallet is moving away from all user-facing features and is becoming a node implementation. We need to decide if we want to follow that path.

@UdjinM6
Copy link

UdjinM6 commented Mar 9, 2021

... Core can certainly have updates that would bring it Layer 3 capabilities and maybe even some state knowledge. This would be especially useful for exchanges that use our core wallet, but want an Identity they can use for their customers to send funds to over DashPay.

Hmm.. my understanding is that to talk to/over DashPay you need a Platform-based app (built with a Platform SDK) and that's exactly what various services (exchanges etc.) would have to build/use.

Anyway, these changes are GUI only and exchanges (and other services) do not use GUI (at least I reeeally hope the don't lol), so this PR should not affect them in any way. Moreover, you can't simply run Core to provide BIP70-compatible payments as a service (no such functionality ever existed in Core), you need some another piece of software to do this, so again, no harm is done to BIP70-compatible services which use Core as a backend.

In the end, the Bitcoin Core wallet is moving away from all user-facing features and is becoming a node implementation. We need to decide if we want to follow that path.

In the long run, yes, imo. I don't think there are any other options for mass adoption scenario besides masternodes and other full nodes run by various services being a backbone of the network and the vast majority of regular users transacting via light wallets. Core should become just an interface to the network to which you could connect any app (which talks the same language ofc) with whatever capabilities you need, be it a wallet, an explorer or any custom logic software of your choice.

@kwvg kwvg changed the title merge bitcoin#17165: Remove BIP70 support merge #17165: Remove BIP70 support Mar 10, 2021
@PastaPastaPasta
Copy link
Member

I'm not sure I'm a fan of removing BIP70 support from Dash Core GUI. Lots of users currently use Dash Core as their primary user application. Once we have split qt from dash core fully like bitcoin has done, then I would fully support removing BIP70 and from that OpenSSL from core itself as long as qt can retain BIP70 functionality.

@PastaPastaPasta PastaPastaPasta modified the milestones: 17, 17.1 Mar 23, 2021
@kwvg kwvg marked this pull request as draft May 18, 2021 17:03
@PastaPastaPasta PastaPastaPasta removed the request for review from UdjinM6 July 1, 2021 17:26
@kwvg
Copy link
Collaborator Author

kwvg commented Jul 15, 2021

Won't be merged in the immediate future, let's close this for now

@kwvg kwvg closed this Jul 15, 2021
@UdjinM6 UdjinM6 removed this from the 18 milestone Jul 19, 2021
@kwvg kwvg reopened this Apr 20, 2022
kwvg added 2 commits April 20, 2022 21:45
This was originally added in bitcoin#9366 to fix the gui build, as
Protobuf would also define these macros. Now that we're no-longer
using Protobuf, remove the additional check.
@github-actions
Copy link

This pull request has conflicts, please rebase.

@kwvg kwvg added this to the 19 milestone Apr 21, 2022
@kwvg kwvg marked this pull request as ready for review April 21, 2022 05:06
@kwvg kwvg requested a review from PastaPastaPasta April 21, 2022 05:06
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK for squash merge

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 43152b2 into dashpay:develop Apr 25, 2022
@PastaPastaPasta PastaPastaPasta added the Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged. label Apr 28, 2022
PastaPastaPasta pushed a commit to knst/dash that referenced this pull request Apr 26, 2023
BIP70 is removed in "merge bitcoin#17165: Remove BIP70 support  (dashpay#4023)".
So, this commit contains only some follow-ups to unify codebase

e09913f doc: specify protobuf as optional in build docs (fanquake)
376f492 build: disable BIP70 support by default (fanquake)

Pull request description:

  Disable BIP70 support in the GUI by default for `0.19.0` (for eventual removal in `0.20.0`?).

  Users who want to compile with BIP70 support enabled can pass `--enable-bip70` to `./configure`.

  I've inverted the current `--disable-bip70` test to instead pass `--enable-bip70`.

  Tested configurations on `macOS` (`protobuf` installed with `brew`).
  Protobuf available and `./configure`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = no
  ```

  Protobuf available and `./configure --enable-bip70`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = yes
  ```

  Protobuf not available (i.e `brew unlink protobuf`) and `./configure`:
  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = no
  ```

  Protobuf not available and `./configure --enable-bip70`:
  ```
  checking whether to build test_bitcoin-qt... yes
  checking whether to build BIP70 support... configure: error: protobuf missing
  ```

  TODO:
  - [x] Remove `protobuf` from other Travis builds
  - [ ] Documentation updates (mention that `protobuf` is now optional)?
  - [ ] Could split release notes into GUI and build

ACKs for top commit:
  laanwj:
    ACK e09913f
  elichai:
    ACK e09913f Read the autotools changes. awesome that this removes the protobuf requirement.
  practicalswift:
    ACK e09913f -- diff looks correct

Tree-SHA512: 7bf87ae8555e24db2da2e89cc4d4e90d09be27499ad386ad65879d05df8f96d9a1384379891ac8963d17728c90e55961560813df97e849e631e2de8c08e210c8
@kwvg kwvg deleted the bye_bye_bip70 branch July 18, 2023 11:41
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Nov 20, 2023
* compat: remove bswap_* check on macOS

This was originally added in bitcoin#9366 to fix the gui build, as
Protobuf would also define these macros. Now that we're no-longer
using Protobuf, remove the additional check.

* build: skip building OpenSSL lib_ssl

* build: remove OpenSSL from Qt build

More info available from:
https://doc.qt.io/qt-5/ssl.html#enabling-and-disabling-ssl-support

* build: remove EVP_MD_CTX_new detection

This was added in bitcoin#9475 to fix LibreSSL compatibility for
BIP70, so is no longer required.

* build: remove SSL lib detection

* gui: update BIP70 support message

* build: remove BIP70 entries from macOS Info.plist

* gui: remove payment request file handling from OpenURI dialog

* gui: remove BIP70 Support

* build: remove protobuf from depends and contrib
gades pushed a commit to piratecash/pirate that referenced this pull request Dec 9, 2023
* compat: remove bswap_* check on macOS

This was originally added in bitcoin#9366 to fix the gui build, as
Protobuf would also define these macros. Now that we're no-longer
using Protobuf, remove the additional check.

* build: skip building OpenSSL lib_ssl

* build: remove OpenSSL from Qt build

More info available from:
https://doc.qt.io/qt-5/ssl.html#enabling-and-disabling-ssl-support

* build: remove EVP_MD_CTX_new detection

This was added in bitcoin#9475 to fix LibreSSL compatibility for
BIP70, so is no longer required.

* build: remove SSL lib detection

* gui: update BIP70 support message

* build: remove BIP70 entries from macOS Info.plist

* gui: remove payment request file handling from OpenURI dialog

* gui: remove BIP70 Support

* build: remove protobuf from depends and contrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Release Notes This PR includes breaking changes for which release notes have not yet been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants