Skip to content

ZSA burn functionality#35

Merged
alexeykoren merged 33 commits intozsa1from
zsa1-burn
Dec 7, 2022
Merged

ZSA burn functionality#35
alexeykoren merged 33 commits intozsa1from
zsa1-burn

Conversation

@alexeykoren
Copy link

@alexeykoren alexeykoren commented Dec 7, 2022

  • For Builder, Added a method to add assets to burn

  • bvk computation now includes the burnt assets

  • Added Tests for bsk/bvk consistency for burning

  • Added E2E tests for assets burning

PaulLaux and others added 28 commits July 18, 2022 12:03
* Added .circleci/config.yml
Implements the issuer keys as

    IssuerAuthorizingKey -> isk
    IssuerVerifyingKey -> ik

Test vectors generated with zcash_test_vectors repo
* Added NoteType to Notes
* Added NoteType to value commitment derivation
* Circleci project setup (#1)

* Added .circleci/config.yml

* Added NoteType to Notes

* reformated file

* updated `derive` for NoteType

* added note_type to value commit derivation

* rustfmt

* updated ci config

* updated ci config

* updated ci config

* updated derive for note_type

* added test for arb note_type

* added test for `native` note type

* zsa-note-encryption: introduce AssetType and encode and decode it in note plaintexts

* zsa-note-encryption: extend the size of compact notes to include asset_type

* fixed clippy warrnings

* rustfmt

* zsa-note-encryption: document parsing requirement

* zsa-note-encryption: revert support of ZSA compact action

* zsa_value: add NoteType method is_native

* zsa-note-encryption: remove dependency on changes in the other crate

* zsa-note-encryption: extract memo of ZSA notes

* zsa-note-encryption: tests (zcash_test_vectors 77c73492)

* zsa-note-encryption: simplify roundtrip test

* zsa-note-encryption: more test vectors (zcash_test_vectors c10da464)

* Circleci project setup (#1)

* Added .circleci/config.yml

* issuer keys implementation (#5)

Implements the issuer keys as

    IssuerAuthorizingKey -> isk
    IssuerVerifyingKey -> ik

Test vectors generated with zcash_test_vectors repo

* Added NoteType to Notes (#2)

* Added NoteType to Notes
* Added NoteType to value commitment derivation

* zsa-note-encryption: use both native and ZSA in proptests

* zsa-note-encryption: test vector commit 51398c93

* zsa-note-encryption: fix after merge

Co-authored-by: Paul <3682187+PaulLaux@users.noreply.github.com>
Co-authored-by: Paul <lauxpaul@protonmail.com>
Co-authored-by: Aurélien Nicolas <info@nau.re>
Co-authored-by: Daniel Benarroch <danielbenarroch92@gmail.com>
+ Updated test bsk_consistent_with_bvk to verify mixed note types.
+ Added NoteType support to the builder and the bundle.
+ added split_flag to SpentInfo and as input to the Circuit (currently commented out)
+ added conditional cv_sum calculation (currently commented out)
+ added padding to actions
- added IssueBundle and IssueAction
- added a builder for IssueBundle
- added verify_issue_bundle() for consensus verification.
- unit tests.
added tests in `tests/zsa.rs`
* disabled split notes and proof check for zsa transfer
* fixes and suggestions

* changed "issuer" to "issuance" as per zcash#356 (comment)

* terminology fixes

* updated naming
* rename 2 note_type -> asset as per  zcash#356 (comment)

* added a dedicated type for "IssuanceAuth"

* disabled codecov github action due to bad behavior. 

* extracted "is_asset_desc_of_valid_size()" into asset_id.rs
* improved `verify_issue_bundle()`
# Conflicts:
#	.circleci/config.yml
#	.github/workflows/bench.yml
#	.github/workflows/ci.yml
#	.github/workflows/lints-stable.yml
#	Cargo.toml
#	README.md
#	benches/note_decryption.rs
#	rust-toolchain
#	src/builder.rs
#	src/bundle.rs
#	src/note_encryption.rs
#	src/value.rs
#	tests/zsa.rs
Copy link
Collaborator

@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.

Great work, approved pending two fixes.

# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
- image: cimg/rust:1.59.0
- image: cimg/rust:1.61
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably need to be 1.61.0, in the spirit of unification.

Copy link
Author

Choose a reason for hiding this comment

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

That's what I got from your rebased branch, so I've changed all 1.61.0 that I've introduced to this :) I can change it back

)
}

pub(crate) fn into<V: TryFrom<i64>>(self) -> Result<V, Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change to try_from as discussed in builder.rs:442

@alexeykoren alexeykoren merged commit d8f3563 into zsa1 Dec 7, 2022
@PaulLaux PaulLaux changed the title ZSA burn functionality 2 ZSA burn functionality Dec 8, 2022
This was referenced Dec 8, 2022
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.

4 participants