-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
…ty checks for parse-tx and parse-wtx
LGTM |
@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? |
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? |
@MarvinJanssen just the changes in PR for now works* we can push a 5.x version later if any feature is requested. |
feat: remove non-compact version
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
Current additions:
parse-wtx
now returnsERR-NOT-SEGWIT-TRANSACTION
((err u12)
) if provided with a non-segwit transaction. In v4 it returns an empty transaction tuple.parse-tx
andparse-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 returnERR-LEFTOVER-DATA
((err u13)
) if there is any leftover data.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.