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

Bitcoin bridge update #17

Merged
merged 10 commits into from
Oct 9, 2024
Merged

Bitcoin bridge update #17

merged 10 commits into from
Oct 9, 2024

Conversation

sudikshyapant
Copy link
Contributor

Description

  1. Changed the recovery time period to ~8.5 hrs based on the current ~30s block time (was 1-week based on 10 min block time)
  2. Fixed the sub-points nesting in deposit process

Type of Change

  • New Document
  • Update to Existing Document
  • Bug Fix
  • Question/clarification
  • Other (please describe):

Related Issues

Link any related issues or pull requests here.
Use the format Fixes #issue-number to automatically close the related issue
when this pull request is merged.


Checklist

  • I have reviewed the existing documentation to avoid duplication.
  • The new or updated document includes clear and concise information.
  • All relevant sections (e.g., introduction, usage examples, references)
    are included.
  • The document follows the project's style guide and formatting rules.
  • I have included any necessary references or external resources.
  • Spellcheck and grammar check have been performed.
  • (For updates) I have verified that the changes reflect the current state
    of the project.

Reviewer Checklist

  • The purpose and scope of the document are clear.
  • The document is easy to understand and follow.
  • There are no typos or grammatical errors.
  • All necessary sections are included and well-structured.
  • The document is consistent with the project's style guide.
  • Any referenced links or resources are valid and appropriate.

sudikshyapant added 5 commits October 7, 2024 22:33
# Documentation Pull Request Template

## Description

This pull request updates the Bitcoin bridge documentation to improve clarity, accuracy, and completeness. The main changes are:

1. Update time-lock to 1 week based on current DRT implementation
2. Add information on current operator fee and mining fees
3. Ensure proper nesting in points of deposit process
4. Minor improvements to the withdrawal process description for better clarity.

These updates aim to provide more accurate and up-to-date information about the Bitcoin bridge operations, enhancing user understanding and reducing potential misinterpretations.

---

## Type of Change

- [ ] New Document
- [x] Update to Existing Document
- [ ] Bug Fix
- [ ] Question/clarification
- [ ] Other (please describe):

---

## Related Issues

Fixes #[issue number related to documentation update, if any]

---

## Checklist

- [x] I have reviewed the existing documentation to avoid duplication.
- [x] The new or updated document includes clear and concise information.
- [ ] All relevant sections (e.g., introduction, usage examples, references)
      are included.
- [x] The document follows the project's style guide and formatting rules.
- [ ] I have included any necessary references or external resources.
- [x] Spellcheck and grammar check have been performed.
- [x] (For updates) I have verified that the changes reflect the current state
      of the project.

---

## Additional Information

The updates to the time-lock period and fee information reflect the current implementation of the Bitcoin bridge. The restructuring of certain sections aims to improve readability and reduce potential misunderstandings.

---

## Reviewer Checklist

- [ ] The purpose and scope of the document are clear.
- [ ] The document is easy to understand and follow.
- [ ] There are no typos or grammatical errors.
- [ ] All necessary sections are included and well-structured.
- [ ] The document is consistent with the project's style guide.
- [ ] Any referenced links or resources are valid and appropriate.
Comment on lines 66 to 70
1. "Deposit path", an $N$-of-$N$ multisig path,
where $N$ is the number of operators in the bridge.
1. "Take back" path,
which allows the user to take back their funds if the bridge fails to
move funds from the Deposit Request Transaction (DRT)
into the bridge address within a two-week period,
i.e. it is time-locked and the user provides a signature to spend it.
- "Deposit path", an $N$-of-$N$ multisig path,
where $N$ is the number of operators in the bridge.
- "Take back" path,
Copy link
Member

Choose a reason for hiding this comment

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

why change this to unordered?
I think that order here matters.
From my understanding, in the inherent merkle tree, we have the deposit path first then the take back path second right? Cc @Rajil1213

Choose a reason for hiding this comment

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

Yeah this should only fix the indentation and not the type of list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried some variations but in mk docs markdown the sub-points seems to automatically use a different list type (1. vs a.). so the subpoints can only be a. , b. at the moment.

Copy link
Member

Choose a reason for hiding this comment

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

We can do fine with the a. and b..
I don't know if this is easily configurable: https://squidfunk.github.io/mkdocs-material/reference/lists/#using-ordered-lists

The point is that order matters, this cannot be an unordered list.

docs/technical/bitcoin-bridge.md Outdated Show resolved Hide resolved
docs/technical/bitcoin-bridge.md Outdated Show resolved Hide resolved
docs/technical/bitcoin-bridge.md Outdated Show resolved Hide resolved

This transaction has some metadata attached to it, in the form of an `OP_RETURN`
output, that can be up to 80 bytes long (according to bitcoin standardness policy),
and is composed of the following data:

1. Magic bytes.
These take $11$ bytes and are used to identify the bridge.
1. "Take back" TapLeaf hash.
2. "Take back" TapLeaf hash.
Copy link
Member

Choose a reason for hiding this comment

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

mind the diff

Suggested change
2. "Take back" TapLeaf hash.
1. "Take back" TapLeaf hash.

These take $32$ bytes and are used to validate the
Deposit Request Transaction (DRT),
while also necessary for the control block required
to spend the P2TR output via the $N$-of-$N$ Tapscript.
1. Execution Layer (EL) address.
3. Execution Layer (EL) address.
Copy link
Member

Choose a reason for hiding this comment

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

mind the diff

Suggested change
3. Execution Layer (EL) address.
1. Execution Layer (EL) address.

@storopoli storopoli merged commit 2244de5 into main Oct 9, 2024
3 checks passed
@storopoli storopoli deleted the bitcoin-bridge-update branch October 9, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants