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

Segwit support implementation #42

Closed
oscarguindzberg opened this issue Aug 26, 2020 · 3 comments
Closed

Segwit support implementation #42

oscarguindzberg opened this issue Aug 26, 2020 · 3 comments
Assignees
Labels
has:approval bisq.wiki/Project_management#Approval has:budget bisq.wiki/Project_management#Budgeting was:delivered bisq.wiki/Project_management#Closing_as_delivered

Comments

@oscarguindzberg
Copy link

oscarguindzberg commented Aug 26, 2020

This is a Bisq Network project. Please familiarize yourself with the project management process.

Description

Implement segwit in bisq according the plan drafted in bisq-network/proposals#226

Rationale

Bisq users keep asking for this feature. Segwit has been out for several years. A bitcoinj version with segwit support was released in March 2019.

As described in bisq-network/proposals#226, the goals are :

  • Reduce btc miner fees both for btc deposit/withdrawal txs and trade protocol txs.
  • Allow users to extract btc to native segwit addresses.
  • Migrate out from bitcoinj 0.14 because it is not being maintained.
  • Get access to the non-segwit-related features in bitcoinj 0.15 in case a dev wants to use them in the future.
  • Avoid potential malleability attacks (there is no documented feasible malleability attack to bisq, but it is good to be on the safe side)

Why now?

  • Btc miner fees increased a lot recently.
  • Oscar Guindzberg is available to implement it.

Criteria for delivery

  • bisq using a customized bitcoinj based on bitcoinj 0.15.8
  • Users allowed to receive/extract btc using both native segwit addresses ("bc1xxxxxx") and legacy addresses ("bc1xxxxxx")
  • Trade protocol updated to use segwit.
  • Bisq version with all those changes released.
  • Support provided after segwit support is released and activated: support users, implement hot fixes ASAP if needed.

Measures of success

Any combination of:

  • Reduced btc miner fees.
  • Users want to upgrade to the latest bisq version to be able to use segwit.
  • Bitcoiners stop seeing Bisq as an unmaintained project for lack of support of segwit.
  • A bitcoinj 0.15 feature is used by a bisq developer.
  • Feasible malleability attack documented for bisq pre-segwit trade protocol.

Risks

The biggest risk is migration. Bisq had problems in the past because of migrations that turned out to be a headache. e.g. the new trade protocol. The plan this time is to let already created offers and unfinished trades finish in peace after migration. Oscar Guindzberg committed to plan migration thoroughly and be available to provide after-migration support if needed. @chimp1984 is going to review Oscar's work.

Tasks

  • Migrate to bitcoinj 0.15.8.
  • Allow users to extract to native segwit addresses.
  • Implement segwit for bisq btc wallet.
  • Implement segwit for the Trade protocol.
  • post deployment support.

Oscar Guindzberg is going to do all these tasks

Estimates

The total estimate is USD 45000.
There are a couple of milestones:

  • Migrate to bitcoinj 0.15.8 - USD 5000.
  • Allow users to extract to native segwit addresses - USD 5000.
  • Segwit for bisq btc wallet - USD 10000.
  • Segwit for the Trade protocol - USD 20000.
  • Post deployment support - USD 5000.

The entire project will be implemented by Oscar Guindzberg.

See bisq-network/proposals#247

Notes

Some challenging parts of the project are:

  • Add missing parts to bitcoinj.
  • Several parts of the bisq code should be reviewed in detail to make sure everything is adapted to segwit (See Segwit support plan proposals#226 phase 3).
  • The code being updated might change while Oscar is still coding, so some merging and rework is expected.
  • Define and implement a smooth migration strategy where existing offers and unfinished trades are kept alive (This requires more work than the original proposal in Segwit support plan proposals#226 where Oscar suggested to kill existing offers and unfinished trades)
  • Do integration testing, specially for migration.
@oscarguindzberg oscarguindzberg added a:proposal bisq.wiki/Project_management#Proposal needs:triage bisq.wiki/Project_management#Triage labels Aug 26, 2020
@oscarguindzberg oscarguindzberg changed the title [WIP] Segwit support implementation Segwit support implementation Aug 27, 2020
@wiz wiz added has:approval bisq.wiki/Project_management#Approval has:budget bisq.wiki/Project_management#Budgeting and removed a:proposal bisq.wiki/Project_management#Proposal needs:triage bisq.wiki/Project_management#Triage labels Sep 1, 2020
@wiz
Copy link
Member

wiz commented Sep 1, 2020

@oscarguindzberg this project has been approved and assigned to you, with $45K budget allocated from the dev team approved by @ripcurlx

@chimp1984
Copy link

@cbeams @oscarguindzberg Can we close that issue as it is delivered?

@cbeams
Copy link
Member

cbeams commented Jan 25, 2021

Closing as delivered. I've reviewed the criteria for delivery and measures of success above, and all appear to have been satisfied. It's so great to have this support in place!

@cbeams cbeams closed this as completed Jan 25, 2021
@cbeams cbeams added the was:delivered bisq.wiki/Project_management#Closing_as_delivered label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has:approval bisq.wiki/Project_management#Approval has:budget bisq.wiki/Project_management#Budgeting was:delivered bisq.wiki/Project_management#Closing_as_delivered
Projects
None yet
Development

No branches or pull requests

4 participants