-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
A-dependenciesArea: Dependency file updatesArea: Dependency file updatesA-rustArea: Updates to Rust codeArea: Updates to Rust code
Milestone
Description
Following from #105 (comment):
- Many of the types in the structures that make up a
Transaction
need to be refined to assign them semantic meaning. The complete list can be found by runningrg 'XXX refine' -A 2
inzebra/zebra-chain/src
. Fleshing out many of these types will require further work – for instance, theZcash-flavored Ed25519 pubkey
in the JoinSplit data requires Zcash-flavored Ed25519 #109.
This issue should be closed when there are no more refinements left to do. Once #105 is merged, I will replace this description with a checklist of types to refine.
- an
Amount
type (Add an Amount type. #126)
zebra-chain/src/transaction.rs
81: // XXX refine this to an Amount type.
82- value_balance: i64,
zebra-chain/src/transaction/joinsplit.rs
54: /// XXX refine to an Amount
55- vpub_old: u64,
--
59: /// XXX refine to an Amount
60- vpub_new: u64,
zebra-chain/src/transaction/transparent.rs
51: // XXX refine to Amount ?
52- pub value: u64,
53-
- a (Sprout?) (Sapling?) nullifier type (Sprout Nullifier #287, Sapling Nullifier #288)
zebra-chain/src/transaction/joinsplit.rs
16: /// XXX refine type
17- pub nullifier: [u8; 32],
zebra-chain/src/transaction/shielded_data.rs
17: /// XXX refine to a specific type.
18- pub nullifier: [u8; 32],
One of these is a nullifier for Sprout, while the other is for Sapling – should these be the same type or different types?
- a MAC type
zebra-chain/src/transaction/joinsplit.rs
20: /// XXX refine type
21- pub vmac: [u8; 32],
- note commitment type (sprout) (Design Sprout note commitment trees. #36)
zebra-chain/src/transaction/joinsplit.rs
37: /// XXX refine type
38- pub commitment: [u8; 32],
- types related to note encryption (sprout):
zebra-chain/src/transaction/joinsplit.rs
41: /// XXX refine type
42- /// XXX this should be a [u8; 601] but we need trait impls.
43- pub enc_ciphertext: Vec<u8>,
- a sprout commitment tree root (Design Sprout note commitment trees. #36)
zebra-chain/src/transaction/joinsplit.rs
65: /// XXX refine type
66- anchor: [u8; 32],
- an X25519 key (Refine JoinSplit ephemeral keys to be x25519_dalek::PublicKeys #313):
zebra-chain/src/transaction/joinsplit.rs
69: /// XXX refine to an x25519-dalek type?
70- ephemeral_key: [u8; 32],
- an Ed25519 key (Zcash-flavored Ed25519 #109)
zebra-chain/src/transaction/joinsplit.rs
88: // XXX refine to a Zcash-flavored Ed25519 pubkey.
89- pub pub_key: [u8; 32],
90- /// The JoinSplit signature.
91: // XXX refine to a Zcash-flavored Ed25519 signature.
92- // for now it's [u64; 8] rather than [u8; 64] to get trait impls
93- pub sig: [u64; 8],
- a sapling value commitment type:
zebra-chain/src/transaction/shielded_data.rs
11: /// XXX refine to a specific type.
12- pub cv: [u8; 32],
- RedJubjub types (RedJubJub signatures #125)
--
21: /// XXX refine to a specific type.
22- pub rk: [u8; 32],
23- /// The ZK spend proof.
--
30: /// XXX refine to a specific type: redjubjub signature?
31- /// XXX for now it's [u64; 8] instead of [u8; 64] to get trait impls
32- pub spend_auth_sig: [u64; 8],
--
77: // XXX refine this type to a RedJubjub signature.
78- // for now it's [u64; 8] rather than [u8; 64] to get trait impls
79- pub binding_sig: [u64; 8],
- Jubjub key agreement types: Refine Output description ephemeral_key to jubjub::AffinePoint #361
zebra-chain/src/transaction/shielded_data.rs
50: /// XXX refine to a specific type.
51- pub ephemeral_key: [u8; 32],
- note commitment type (sapling) (Design Sprout note commitment trees. #36)
zebra-chain/src/transaction/shielded_data.rs
46: /// XXX refine to a specific type.
47- pub cmu: [u8; 32],
- note encryption (sapling):
zebra-chain/src/transaction/shielded_data.rs
54: /// XXX refine to a specific type.
55- /// XXX this is a Vec<u8> rather than a [u8; 580] to get trait impls
56- pub enc_ciphertext: Vec<u8>,
--
59: /// XXX refine to a specific type.
60- /// XXX this is a [u64; 10] rather than a [u8; 80] to get trait impls
61- pub out_ciphertext: [u64; 10],
--
Metadata
Metadata
Labels
A-dependenciesArea: Dependency file updatesArea: Dependency file updatesA-rustArea: Updates to Rust codeArea: Updates to Rust code