Add orchard bundle creation to zcash_primitives::transaction::builder::Builder#583
Add orchard bundle creation to zcash_primitives::transaction::builder::Builder#583AloeareV wants to merge 10 commits intozcash:mainfrom
zcash_primitives::transaction::builder::Builder#583Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #583 +/- ##
===========================================
- Coverage 71.60% 51.12% -20.48%
===========================================
Files 125 94 -31
Lines 11843 8858 -2985
===========================================
- Hits 8480 4529 -3951
- Misses 3363 4329 +966
☔ View full report in Codecov by Sentry. |
|
I had started working on this change (which is #406) a month and a half ago, but had to put it aside while doing other NU5 work, and forgot to open a draft PR (which I've now done: #584). The complexity was indeed in figuring out the areas you have run into 😄
This is the direction I was taking, specifically to add a |
|
Great! If I were to do some work atop that, would you prefer I open a PR into your feature, or push it to here? Pushing here for now. |
6dfda0f to
e5484c9
Compare
|
I've marked this as ready for review. It needs tests added, but I'm finding myself at a bit of a loss on how to test this in a meaningful way, as adding an orchard spend needs a note, and currently (I've opened this PR which might also help here) there seems to be no way to get a note aside from decrypting one, and that requires creating one. All the tests are currently using mock tx provers, which can't actually bind signatures. So do I need to either access sapling parameters, or feature-gate behind transparent inputs, in order to create a transparent-to-orchard or sapling-to-orchard transaction, in order to have a spendable orchard note? |
|
Zingo is currently relying on a cargo patch in order to use this builder (it's also patching librustzcash to use zcash/orchard#344). This means all downstream libraries need to copy our patch into their Edit: I don't think this is ready to merge. Right now it doesn't account for the orchard value balance, and so can give false negative-change errors, for example. Once zcash/orchard#352 lands, I can add that and revisit. |
e5484c9 to
8a33341
Compare
|
Re-marked as draft, as this is blocked on zcash/orchard#352 |
8a33341 to
5de9e7b
Compare
|
Some of my code is squashed into str4d's initial commit, as doing so made rebasing a lot easier. |
…asier Some work is by Str4d
8eedab9 to
975a317
Compare
|
Alright! Librustzcash has moved far enough since I opened this that a rebase proved really difficult, so I reimplemented instead. Ideally, we should get the number of orchard actions from the orchard builder, instead of the builder keeping its own count of inputs and outputs. This (and the later work of adding orchard to change handling in zcash_client_backend) will require adding access to |
|
There is also a change to |
7e76a99 to
48bf54f
Compare
|
Testing this locally with zingolib (branch zingolabs/zingolib#185), I'm getting I plan to test that, but I won't get a change until monday. Edit: I don't seem to get that error with librustzcash main. I haven't touched the sapling code at all, so I'm not sure why it's happening. |
nuttycom
left a comment
There was a problem hiding this comment.
@str4d, @daira, @sellout and I had a look at this in PR gardening and determined that the Orchard integration process would be more straightforward if we first changed the Sapling builder to match the builder pattern that we introduced for the orchard crate, and then updated the existing transaction builder to make use of this without introducing the Orchard builder, at which point it should be easier for you to handle the Orchard builder integration.
Sounds good! I'll see if I can contrib towards this in the next few days. |
e20a4f3 to
42928cb
Compare
|
@nuttycom Alright, I've gotten this rebased and working, and addressed the review comments! |
|
@AloeareV just to give you a heads-up, we likely won't get to a full review of this for a few days because the team is trying to get zcashd 5.5.0 out the door. |
7b0495e to
52e4d0c
Compare
|
WOOOT! On the 5.5.0 release!!! |
|
@nuttycom Pinging you now that 5.5.0 is out, it'd be great to get zingo depending on upstream librustzcash |
52e4d0c to
550d2c5
Compare
…asier Some work is by Str4d
…asier Some work is by Str4d
550d2c5 to
6369cfc
Compare
|
Hi! Thanks in advance!! I notice we're approaching our 1 year anniversary on this PR. |
|
Do we need to do more work to update this? I am concerned that it may have been superseded, again. |
|
It was pushed back by the necessary 5.6.0 timeline. Now that's out, this is near the top of my review list. |
|
@AloeareV The first comment in a PR goes into the merge commit, so it should reflect the current state of the PR. Can you update it please? |
|
Closing in favor of #863 |
This adds a
with_orchard_anchorconstructor to the transaction builder, that allows for adding orchard components to transactions.