Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIP 70 updates #213

Merged
merged 2 commits into from
May 31, 2022
Merged

BIP 70 updates #213

merged 2 commits into from
May 31, 2022

Conversation

PiRK
Copy link
Collaborator

@PiRK PiRK commented May 31, 2022

The BIP70 code has not been updated since the fork with Electron Cash.
This fixes some request headers to use "ecash-" instead of "bitcoincash-", to match what is done in https://github.com/badger-cash/cashtab and RaiPay.

Also:

There are backwards incompatible changes in the latest release of protobuf. See Electron-Cash#214 and https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

This is a temporary fix by setting an upper limit to protobuf library.

The proper fix would be to regenerate the _pb2.py files, however it is unclear at the moment if this would keep working on systems with `protobuf<4.21`. For reference, ubuntu 22.04 currently has protobuf version 3.12.4.
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request May 31, 2022
Summary:
Badger Cash and RaiPay use "ecash-" instead of "bitcoincash-" in the headers.
I'm also going to apply the same change to Electrum ABC Bitcoin-ABC/ElectrumABC#213

Test Plan:
- Generate a payment URI: `curl -L -H 'Content-Type: application/json' -d '{"outputs":[{"address":"1NLcNpAaBBMekgBZk7NxwdxwtSUTfTV8Aq","amount":560}],"currency":"ecash"}' https://pay.badger.cash/create_invoice`
- Run `src/qt/bitcoin-qt`
- Menu `File` > `Open URI`
- Paste the "ecash:?r=<url>" (replace <url> with the url in the reply to the curl command, e.g. https://pay.badger.cash/i/DTKP4)
- Send

Repeat with the be.cash API:
`curl -L -H 'Content-Type: application/json' -d '{"values":{"network":"XEC","outputs":[{"value":3000,"scriptHex":"76a914154205358162a6f59457d83dea828a15261aaba388ac"}]}}' https://p.be.cash/create-invoice`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11543
@PiRK
Copy link
Collaborator Author

PiRK commented May 31, 2022

Note that Bitcoin ABC now also uses these headers:
Bitcoin-ABC/bitcoin-abc@f90daf7

@PiRK PiRK merged commit f4995c7 into Bitcoin-ABC:master May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant