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

Clarity-Bitcoin V5 #21

Merged
merged 18 commits into from
Dec 3, 2023
Merged

Clarity-Bitcoin V5 #21

merged 18 commits into from
Dec 3, 2023

Conversation

MarvinJanssen
Copy link
Collaborator

@MarvinJanssen MarvinJanssen commented Sep 28, 2023

Current additions:

  • Segwit TXID calculation. It was missing in v4. Since the TXID calculation requires some work, it needs to be requested by the caller via the new boolean parameter.
  • parse-wtx now returns ERR-NOT-SEGWIT-TRANSACTION ((err u12)) if provided with a non-segwit transaction. In v4 it returns an empty transaction tuple.
  • parse-tx and parse-wtx no longer allow leftover data. In v4 one could append arbitrary data at the end of the Bitcoin transaction and the library would parse the transaction normally but it would use the leftover data for TXID calculation, leading to the wrong TXID and potential security risks. The functions are now more strict and will return ERR-LEFTOVER-DATA ((err u13)) if there is any leftover data.
  • Non-compact version was-tx-mined is removed, does not appear to be used and is inefficient. It also had no wtx counterpart. See feat: remove non-compact version #26.

We can do optimisations once we the feature set of V5 is fully scoped.

@MarvinJanssen MarvinJanssen changed the title Feat/v5 Clarity-Bitcoin V5 Sep 28, 2023
@friedger
Copy link
Owner

friedger commented Oct 3, 2023

LGTM

@friedger friedger marked this pull request as ready for review November 21, 2023 13:47
@friedger
Copy link
Owner

@MarvinJanssen The PR description is good as changelog, we have a change log for deployed version in README.md that will be updated once deployed.

Any more ideas for improvements?

@MarvinJanssen
Copy link
Collaborator Author

Are we going to scope v5 to just the changes made in this PR? I was told by @setzeus that people are waiting for v5 of the library and need to start using it. In that case, are there any feature requests we should still bring into it now?

@setzeus
Copy link

setzeus commented Nov 22, 2023

@MarvinJanssen just the changes in PR for now works* we can push a 5.x version later if any feature is requested.

Copy link
Owner

@friedger friedger left a comment

Choose a reason for hiding this comment

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

LGTM

;; @version 4

;; version 4 adds support for segwit transactions
;; @version 5
Copy link
Owner

Choose a reason for hiding this comment

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

A one liner about the changes in v5 should go here as well.

@friedger friedger merged commit d111e9e into main Dec 3, 2023
1 check passed
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.

3 participants