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

Draft: Allow UTXO selection for batch inscribe #3036

Closed
wants to merge 2 commits into from

Conversation

kiwidream
Copy link

Seeking feedback for further revisions! This is an early stage draft, aimed to address #3022

This PR allows a batch.yaml to be specified with a satpoint per inscription:

# example file
mode: separate-outputs

inscriptions:
- file: test1.txt
  destination: bcrt1pgwdddrmhfpwwcfqrphymdzqn5p9rkdlrykmkv66wchad2mpay4rsv60ncu
  satpoint: 4772fe41fb6a8423613bc92ec3383eaa381c5456ec2d72c9ed3939481c9b278f:0:0

- file: test2.txt
  destination: bcrt1pgwdddrmhfpwwcfqrphymdzqn5p9rkdlrykmkv66wchad2mpay4rsv60ncu
  satpoint: 4772fe41fb6a8423613bc92ec3383eaa381c5456ec2d72c9ed3939481c9b278f:1:0

And running this batch file with:
ord wallet inscribe --fee-rate 1 --batch batch.yaml

Results in test1.txt and test2.txt inscribed using the exact sats specified. Postage is matched to those UTXOs and any additional postage setting in batch.yaml is ignored.

There is another branch in my repo which includes the changes from #2925 to aid debugging.

Outstanding issues/considerations:

  • Inscription order is reversed, i.e. test2.txt becomes the first output in the reveal tx. This is somewhat by design - the commit output is placed last in the reveal tx so that it can be used for fees.
  • Needing automated tests. Haven't written any at this stage and there are likely edge cases to be caught.
  • Regression testing - some logic is in close proximity to parent/child inscriptions.
  • Bringing index into create_batch_inscription_transactions doesn't seem right, but works for now
  • Handling conflicting settings in batch.yaml by throwing an error (e.g. do not specify postage)

🥝

@raphjaph raphjaph marked this pull request as draft January 22, 2024 23:16
@casey casey linked an issue Feb 12, 2024 that may be closed by this pull request
@raphjaph
Copy link
Collaborator

raphjaph commented Feb 13, 2024

Sorry this has been sitting so long!

Just tried to rebase this but we don't use the index in the wallet anymore, we talk to the index exclusively through JSON RPC. A lot has changed in the wallet since and files are broken up and in completely different locations.

I'll probably just start a new PR and then we can work on that together. Will def give you recognition for the bounty though.

@raphjaph
Copy link
Collaborator

Closing this in favor of #3115

@raphjaph raphjaph closed this Feb 14, 2024
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.

Specification of UTXOs/sats for batch inscribing
2 participants