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

Add add_data enables op_return for bdk-cli #105

Merged

Conversation

waterst0ne
Copy link
Contributor

@waterst0ne waterst0ne commented Jun 28, 2022

Description

This enables users to send an arbitrary string message through a txn-output. The maximum size of this string-literal can be length of 80-bytes.

Notes to the reviewers

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • I've updated CHANGELOG.md

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@notmandatory
Copy link
Member

Overall looks good! I made a few comments above. Also you need to run cargo clippy and fix what ever clippy tells you to.

@waterst0ne
Copy link
Contributor Author

Overall looks good! I made a few comments above. Also you need to run cargo clippy and fix what ever clippy tells you to.

All changes have been updated, everything looks good to go! Thank you for testing @notmandatory . 🚀

@waterst0ne waterst0ne marked this pull request as ready for review June 29, 2022 03:03
@waterst0ne waterst0ne marked this pull request as draft June 29, 2022 03:12
@waterst0ne waterst0ne force-pushed the Add_adddata_opreturn branch 5 times, most recently from 1e547cd to 29c0686 Compare July 7, 2022 23:47
@waterst0ne waterst0ne marked this pull request as ready for review July 7, 2022 23:52
Copy link
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

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

utACK 29c0686

Nice one.. This will be really useful.. Below are just few nits..

Will you be willing to write a demo test for this after #102 lands?? We are going to have integration testing after 102, and that can be good place to document demonstrations of bdk-cli for this kinda stuffs too..

CHANGELOG.md Outdated Show resolved Hide resolved
src/commands.rs Outdated Show resolved Hide resolved
src/commands.rs Outdated Show resolved Hide resolved
src/commands.rs Outdated Show resolved Hide resolved
@waterst0ne waterst0ne force-pushed the Add_adddata_opreturn branch 3 times, most recently from be6fb98 to b06b141 Compare July 8, 2022 16:52
Copy link
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

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

Thanks for the quick update.. Unfortunately the test fails because you can't pass both options in the same command.. I have few more conceptual update requests regarding that in code comments..

Also I would like to ask for a bit more work here, because we are currently going through a lot of refactoring in the crate. And many of those are scattered around other open PRs. So adding this in master right now will create a lot of conflicts with other open PRs and have to be manually resolved again..

So instead, can you rebase this on top of #104?? You might have to resolve few conflicts, but you will be able to work on the final version of the crate after all refatorings..

Rebasing on #104 will also allow you to add the functional test for opreturn output creation with bdk-cli and we can then fix the full behavior there. look in the folder tests/intergation.rs after you rebase, to see a example of basic test sample..

src/commands.rs Outdated Show resolved Hide resolved
src/commands.rs Outdated Show resolved Hide resolved
src/commands.rs Show resolved Hide resolved
src/handlers.rs Show resolved Hide resolved
@notmandatory notmandatory added this to the Release 0.7.0 milestone Jul 14, 2022
@notmandatory notmandatory added the enhancement New feature or request label Jul 14, 2022
@waterst0ne
Copy link
Contributor Author

Rebased on the latest master ready for final review please.

Copy link
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

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

ACK 86b5579

Looks good!

Copy link
Contributor

@rajarshimaitra rajarshimaitra left a comment

Choose a reason for hiding this comment

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

tACK 86b5579

LGTM.. Merging it..

@rajarshimaitra rajarshimaitra merged commit f8a10e9 into bitcoindevkit:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants