Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0d7ecad
Circleci project setup (#1)
PaulLaux Mar 30, 2022
58158f5
Added NoteType to Notes
PaulLaux Apr 28, 2022
48779d5
reformated file
PaulLaux May 12, 2022
430e047
updated `derive` for NoteType
PaulLaux May 19, 2022
f8cb133
added note_type to value commit derivation
PaulLaux May 20, 2022
d337f82
rustfmt
PaulLaux May 22, 2022
0d656aa
updated ci config
PaulLaux May 22, 2022
bae15b7
updated ci config
PaulLaux May 22, 2022
100b644
updated ci config
PaulLaux May 22, 2022
91466fe
updated derive for note_type
PaulLaux May 22, 2022
7d1a606
added test for arb note_type
PaulLaux May 23, 2022
6a10f45
added test for `native` note type
PaulLaux May 23, 2022
9644241
zsa-note-encryption: introduce AssetType and encode and decode it in …
May 23, 2022
8bdbf3f
zsa-note-encryption: extend the size of compact notes to include asse…
May 23, 2022
69f0ea4
fixed clippy warrnings
PaulLaux May 24, 2022
c4d9eea
rustfmt
PaulLaux May 24, 2022
9b83fa5
zsa-note-encryption: document parsing requirement
May 29, 2022
826378a
zsa-note-encryption: revert support of ZSA compact action
May 29, 2022
50ce4e2
zsa_value: add NoteType method is_native
May 29, 2022
b04468c
Merge branch 'zsa-note-encryption' into zsa-value-and-encryption
May 29, 2022
9a7d76c
zsa-note-encryption: remove dependency on changes in the other crate
May 29, 2022
94626af
zsa-note-encryption: extract memo of ZSA notes
May 29, 2022
1f11f1d
zsa-note-encryption: tests (zcash_test_vectors 77c73492)
Jun 12, 2022
1a6658d
zsa-note-encryption: simplify roundtrip test
Jun 12, 2022
66f040f
zsa-note-encryption: more test vectors (zcash_test_vectors c10da464)
Jun 12, 2022
ce91df1
Circleci project setup (#1)
PaulLaux Mar 30, 2022
769f2f7
issuer keys implementation (#5)
daniben31 Jun 14, 2022
8a6f599
Added NoteType to Notes (#2)
PaulLaux Jun 14, 2022
3a6ed1e
Merge branch 'zsa1' into zsa-note-encryption
PaulLaux Jun 15, 2022
48d65ee
added note_type to builder
PaulLaux Jun 8, 2022
60a17a2
Merge branch 'zsa1' into zsa-builder
PaulLaux Jul 18, 2022
c8d3557
minor update
PaulLaux Jul 27, 2022
45bf2d6
Merge branch 'zsa1' into zsa-builder
PaulLaux Jul 27, 2022
93f0244
rustfmt
PaulLaux Jul 27, 2022
b86a5e0
removed comment
PaulLaux Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
Cargo.lock
.vscode
.idea
action-circuit-layout.png
proptest-regressions/*.txt
9 changes: 8 additions & 1 deletion benches/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use criterion::{BenchmarkId, Criterion};
#[cfg(unix)]
use pprof::criterion::{Output, PProfProfiler};

use orchard::note::NoteType;
use orchard::{
builder::Builder,
bundle::Flags,
Expand All @@ -32,7 +33,13 @@ fn criterion_benchmark(c: &mut Criterion) {
);
for _ in 0..num_recipients {
builder
.add_recipient(None, recipient, NoteValue::from_raw(10), None)
.add_recipient(
None,
recipient,
NoteValue::from_raw(10),
NoteType::native(),
None,
)
.unwrap();
}
let bundle: Bundle<_, i64> = builder.build(rng).unwrap();
Expand Down
17 changes: 15 additions & 2 deletions benches/note_decryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use orchard::{
bundle::Flags,
circuit::ProvingKey,
keys::{FullViewingKey, Scope, SpendingKey},
note::NoteType,
note_encryption::{CompactAction, OrchardDomain},
value::NoteValue,
Anchor, Bundle,
Expand Down Expand Up @@ -51,10 +52,22 @@ fn bench_note_decryption(c: &mut Criterion) {
// The builder pads to two actions, and shuffles their order. Add two recipients
// so the first action is always decryptable.
builder
.add_recipient(None, recipient, NoteValue::from_raw(10), None)
.add_recipient(
None,
recipient,
NoteValue::from_raw(10),
NoteType::native(),
None,
)
.unwrap();
builder
.add_recipient(None, recipient, NoteValue::from_raw(10), None)
.add_recipient(
None,
recipient,
NoteValue::from_raw(10),
NoteType::native(),
None,
)
.unwrap();
let bundle: Bundle<_, i64> = builder.build(rng).unwrap();
bundle
Expand Down
8 changes: 5 additions & 3 deletions src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub(crate) mod testing {

use proptest::prelude::*;

use crate::note::NoteType;
use crate::note::note_type::testing::arb_note_type;
use crate::{
note::{
commitment::ExtractedNoteCommitment, nullifier::testing::arb_nullifier,
Expand All @@ -147,12 +147,13 @@ pub(crate) mod testing {
nf in arb_nullifier(),
rk in arb_spendauth_verification_key(),
note in arb_note(output_value),
note_type in arb_note_type()
) -> Action<()> {
let cmx = ExtractedNoteCommitment::from(note.commitment());
let cv_net = ValueCommitment::derive(
spend_value - output_value,
ValueCommitTrapdoor::zero(),
NoteType::native()
note_type
);
// FIXME: make a real one from the note.
let encrypted_note = TransmittedNoteCiphertext {
Expand All @@ -179,12 +180,13 @@ pub(crate) mod testing {
note in arb_note(output_value),
rng_seed in prop::array::uniform32(prop::num::u8::ANY),
fake_sighash in prop::array::uniform32(prop::num::u8::ANY),
note_type in arb_note_type()
) -> Action<redpallas::Signature<SpendAuth>> {
let cmx = ExtractedNoteCommitment::from(note.commitment());
let cv_net = ValueCommitment::derive(
spend_value - output_value,
ValueCommitTrapdoor::zero(),
NoteType::native()
note_type
);

// FIXME: make a real one from the note.
Expand Down
Loading