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

Update Orchard version #103

Open
wants to merge 5 commits into
base: zsa1
Choose a base branch
from
Open

Update Orchard version #103

wants to merge 5 commits into from

Conversation

alexeykoren
Copy link
Collaborator

  • Use new Orchard version
  • Use new lifecycle of IssueBundle

@alexeykoren alexeykoren requested a review from PaulLaux March 4, 2025 13:22
Copy link

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

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

added questions

- name: Generate coverage report
run: >
cargo tarpaulin
cargo +1.71.0 tarpaulin

Choose a reason for hiding this comment

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

can you explain the changes to this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems that GitHub action runners have been updated and no longer have 1.71.0 toolchain by default. So we need to install it manually. But here specifically we probably don't need it because cargo will pick it up from toolchain.toml

@@ -972,6 +975,7 @@ impl<'a, P: consensus::Parameters, U: sapling::builder::ProverProgress> Builder<
#[cfg(zcash_unstable = "nu6" /* TODO nu7 */ )]
let issue_bundle = unauthed_tx
.issue_bundle
.map(|b| b.update_rho(first_nullifier(&orchard_bundle).unwrap()))

Choose a reason for hiding this comment

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

what's the point of Result<> if we don't check it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not so much indeed, Error scenario is extremely unlikely here, so we can simplify the flow to just panic inside the function in few extremely rare situation

match orchard_bundle {
Some(OrchardBundle::OrchardVanilla(_)) => Err(io::Error::new(
io::ErrorKind::Other,
"Incorrect bundle type",

Choose a reason for hiding this comment

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

the function is named first_nullifier, why block it for Vanilla?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is only relevant for ZSA/Swap, in case of Vanilla you never call this method and if you managed somehow - it will just panic

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.

2 participants