Kris Nuttycombe
c4da498cf4
Shield funds to the internal Sapling key for a specified account.
...
This updates `shield_transparent_funds` to look up the internal
(change) address for the account specified, and use that as the
destination for shielding transparent funds.
Fixed #614
2022-08-26 16:03:25 -06:00
Kris Nuttycombe
6156215d4c
Add parallelized batched trial decryption to wallet scanning.
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-08-18 16:48:22 -06:00
Kris Nuttycombe
cdfaa57496
Add migrations to support using UFVKs instead of Sapling extfvks.
...
Fixes #594
2022-08-18 10:15:58 -06:00
Kris Nuttycombe
f1c2da7b1d
Add sapling::NullifierDerivingKey newtype.
...
Nullifier computation only requires the nullifier deriving key,
not the entire Sapling viewing key. This separation of concerns
will be needed for batch decryption when wallet-internal keys
will need to be considered.
2022-07-28 15:23:21 -06:00
Kris Nuttycombe
5873950648
Restructure batch decryption to avoid cartesian product of results.
...
While it is necessary in the worst case to perform `m * n` decryptions,
where `m` is the number of outputs being decrypted and `n` is the number
of IVKs, it is possible to stop performing trial decryptions when the
first successful decryption is performed. Also, it's inconvenient and
unnecessary to return the full cartesian product of these results, as
only one IVK will decrypt a given output. This commit modifies batch
trial decryption to stop on the first successful decryption, and instead
of returning the cartesian product of results we return the index of the
input IVK along with the output it decrypted. Note that this means that
trial decryption is not constant-time with respect to the number and/or
order of IVKs.
2022-07-28 15:23:21 -06:00
Kris Nuttycombe
94c8d8e7ef
Return the network type for encoding addresses as part of the network parameters.
2022-06-30 12:09:32 -06:00
Jack Grigg
76d015ed11
zcash_client_backend: Fix `UnifiedFullViewingKey` Sapling item type
...
Per ZIP 316, the Sapling FVK Encoding only includes `(ak, nk, ovk, dk)`
which is a subset of the Sapling `ExtendedFullViewingKey`. We therefore
need to use `DiversifiableFullViewingKey` inside `UnifiedFullViewingKey`
in order to make it parseable from the UFVK string encoding.
`zcash_client_sqlite::wallet::get_extended_full_viewing_keys` has been
removed as a consequence of this change: we can no longer reconstruct
the correct `ExtendedFullViewingKey` from the `UnifiedFullViewingKey`.
2022-06-17 10:03:17 +00:00
Jack Grigg
df1105b996
zcash_primitives: Add `DiversifiableFullViewingKey`
2022-06-14 02:18:25 +00:00
Kris Nuttycombe
7bce52f235
Update NU5 mainnet activation height.
2022-05-11 12:22:20 -06:00
Kris Nuttycombe
a63a37aab2
Allow CommitmentTree completeness & auth paths to be computed at arbitrary depths.
...
Fixes #546
2022-05-06 11:45:06 -06:00
Kris Nuttycombe
4969d81ad3
Add a test for merkle_tree::CommitmentTree::is_complete
2022-05-06 11:44:04 -06:00
Kris Nuttycombe
8bb1962153
Update incrementalmerkletree version and add SER_V2 serialization constant.
2022-05-04 09:25:07 -06:00
Kris Nuttycombe
d14e7a707c
Set NU5 testnet reactivation height.
2022-04-13 16:47:33 -06:00
Kris Nuttycombe
4d5b3831d1
Add conversion from incrementalmerkletree::bridgetree::Frontier -> CommitmentTree
...
Also, add roundtrip property tests to ensure the correctness of the
conversion.
2022-04-08 13:08:48 -06:00
Kris Nuttycombe
9416ab3a3e
Update to secp256k1 v0.21
2022-04-06 16:09:45 -06:00
Jack Grigg
6e8c457e30
zcash_primitives: Show hex encoding of `BlockHash` in its `Debug` impl
...
The (byte-flipped) hex string is more useful than the raw bytes, because
we can look that up in RPC methods and block explorers.
2022-04-05 17:55:56 +00:00
Jack Grigg
7447a599f7
zcash_primitives: Show hex encoding of `TxId` in its `Debug` impl
...
The (byte-flipped) hex string is more useful than the raw bytes, because
we can look that up in RPC methods and block explorers.
2022-04-05 17:52:48 +00:00
Jack Grigg
9c1ed86c5a
Update NU5 consensus branch ID and remove testnet activation height
...
Part of zcash/librustzcash#456 .
2022-03-23 00:35:20 +00:00
Jack Grigg
494092223b
Merge branch 'master' into non-consensus-changes-on-branchid-37519621
2022-03-23 00:00:21 +00:00
Kris Nuttycombe
71657b4f18
Generalize vector and array writes & reads.
...
In a number of places, we transform other kinds of collections with
known length information into vectors simply to be able to use them with
`Vector::write` or `Vector::read`. We can avoid these extra allocations
by writing from iterators directly, and similarly by reading directly
into our desired collection types.
2022-03-11 16:48:28 -07:00
Kris Nuttycombe
d602c01ef6
Standardize how we write and read usize values for incrementalmerkletree.
...
Also, make consistent use of helper functions for reading
and writing `Position` values.
2022-03-11 16:48:28 -07:00
Jack Grigg
91d9a42a08
Merge branch 'non-consensus-changes-on-branchid-37519621' into merge-non-consensus-changes-3
2022-02-28 23:22:40 +00:00
Jack Grigg
22ebe95de6
zcash_primitives: Replace custom `Debug` impl on `TransactionData`
2022-02-28 22:39:43 +00:00
Kris Nuttycombe
b97d777361
Update the versions of incrementalmerkletree & orchard.
...
This removes unreleased incrementalmerkletree::BridgeTree serialization
that was zcashd-specific.
2022-02-24 13:54:31 -07:00
Jack Grigg
12700b4c17
Migrate to `orchard` revision with the Orchard circuit changes
2022-02-15 23:37:52 +00:00
Jack Grigg
dbfa673500
Merge branch 'non-consensus-changes-on-branchid-37519621' into merge-non-consensus-changes-again
2022-02-14 18:11:09 +00:00
Kris Nuttycombe
a15f426ff3
Merge pull request #506 from rex4539/typos
...
Fix typos
2022-02-13 20:29:50 -07:00
Jack Grigg
54e3dded92
Add `TransactionData::map_bundles`
...
This is needed for FFI-crossing in `zcashd`.
2022-02-12 02:59:18 +00:00
Kris Nuttycombe
f590134ee8
Add transaction::Transaction::into_data
2022-02-11 15:29:44 -07:00
Kris Nuttycombe
af9edcea25
Define transaction::TransactionData::map_authorization
2022-02-11 15:29:44 -07:00
Kris Nuttycombe
e20de50b84
Make AccountId internal representation private.
2022-02-10 11:30:02 -07:00
Kris Nuttycombe
970b6d6750
Add missing trait impls for AccountId
2022-02-10 09:12:18 -07:00
Kris Nuttycombe
2425a08690
Merge pull request #493 from zcash/485-zip244-coinbase-fix
...
zcash_primitives: Update ZIP 244 with coinbase fix
2022-02-08 08:16:19 -07:00
Dimitris Apostolou
e600d7b917
Fix typos
2022-02-03 20:15:32 +02:00
str4d
9319dd4c3e
Implement XNOR using `assert_eq!`
...
Because of course that is simpler than building it from XOR.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-03 00:12:55 +00:00
Kris Nuttycombe
a304c3953b
Fix Clippy beta linting complaints.
2022-02-02 16:02:45 -07:00
Kris Nuttycombe
60d9124453
Merge branch 'non-consensus-changes-on-branchid-37519621' into 'master'
2022-02-02 14:38:09 -07:00
Kris Nuttycombe
1507d1de0a
Fix incorrect construction of transparent OVKs.
2022-02-02 10:33:44 -07:00
Kris Nuttycombe
b4ff3f368e
Add test vectors for transparent OVKs.
2022-02-02 10:33:44 -07:00
therealyingtong
0c80399fe1
zcash_primitives::zip32::tests: Use internal test vectors.
2022-02-02 10:33:44 -07:00
therealyingtong
cf4c982483
zcash_primitives::zip32: Include test vectors for internal key components.
2022-02-02 10:33:44 -07:00
Kris Nuttycombe
9c2d485c80
Address comments from code review.
...
Co-authored-by: str4d <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-02 10:33:41 -07:00
Kris Nuttycombe
3d51c53d68
Address comments from code review.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-02 10:32:33 -07:00
Kris Nuttycombe
8916a16f38
Replace ripemd160 dependency with ripemd
2022-02-02 10:30:43 -07:00
Jack Grigg
d7fe28ac3f
zcash_primitives: Update ZIP 244 with coinbase fix
...
This corresponds to the ZIP 244 changes in zcash/zips#587 .
Closes zcash/librustzcash#485 .
2022-02-01 15:57:39 +00:00
Jack Grigg
f28f0b7476
Merge branch 'non-consensus-changes-on-branchid-37519621'
2022-02-01 15:57:13 +00:00
Kris Nuttycombe
b3fbf2410d
Allow use of internal deprecated pubkey_to_address method.
2022-01-27 21:21:18 -07:00
Kris Nuttycombe
4057b066bd
ExtendedFullViewingKey::chain_code should not be public.
2022-01-27 16:18:26 -07:00
Kris Nuttycombe
6e11f2d11a
Validate ZIP 321 request by roundtrip through the URI format.
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 16:08:04 -07:00
Kris Nuttycombe
a1e693d15f
Remove the Wif type; it should not be used.
...
We should attempt to avoid passing spending keys back and forth
across the FFI entirely, but in any case this is no longer the
correct type to use at this boundary; we should use the encoding
of the transparent component of a unified spending key instead.
2022-01-27 16:08:04 -07:00
Kris Nuttycombe
3a20176092
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-27 15:00:37 -07:00
Kris Nuttycombe
132df78a31
Add serialization and deserialization for AccountPubKey
2022-01-27 08:52:12 -07:00
Kris Nuttycombe
6fcdfda69e
Derive OVKs from transparent account-level key, not child keys.
...
This also renames a number of legacy key types to better reflect
their intended use.
2022-01-26 13:36:27 -07:00
Kris Nuttycombe
0b43535203
Move OutgoingViewingKey to zcash_primitives::keys
2022-01-25 08:53:51 -07:00
Kris Nuttycombe
f58d191439
Move transparent account keys to zcash_primitives.
2022-01-25 08:53:51 -07:00
Kris Nuttycombe
72c2e54a7b
Add explicit serialize and deserialize methods to ExternalPubKey
...
The serialization defined by HDWallet for the fields of ExtendedPubKey
is in the opposite field order from what is defined in ZIP 316.
2022-01-24 16:25:06 -07:00
therealyingtong
8b0c1c4ab2
transparent::ExternalPubKey: impl TryFrom for &[u8; 65].
2022-01-24 14:41:40 +08:00
Kris Nuttycombe
4068075ffd
Merge remote-tracking branch 'upstream/non-consensus-changes-on-branchid-37519621' into autoshield-poc-daa
2022-01-22 23:10:47 -07:00
Kris Nuttycombe
4dac37ffde
Ensure that transparent input functionality is correctly feature-flagged.
2022-01-22 22:33:22 -07:00
therealyingtong
a7ea5f0bc1
Implement TryFrom<&[u8] for ExternalPubKey.
2022-01-22 22:29:45 -07:00
therealyingtong
c9fe8402e2
Use transparent internal ovk in shield_transparent_funds().
2022-01-22 22:29:45 -07:00
therealyingtong
5033d29d2f
zip316::transparent: Implement ZIP 316 transparent internal ovk.
2022-01-22 22:29:45 -07:00
therealyingtong
a4c9f53a3a
Move ExternalPrivKey, ExternalPubKey to zcash_primitives.
2022-01-22 22:29:45 -07:00
Kris Nuttycombe
7c03dbdc95
Add convenience method for amount sums.
2022-01-21 16:48:53 -07:00
therealyingtong
eb80138cf9
Document new APIs for deriving internal keys.
2022-01-21 10:49:17 +08:00
Kris Nuttycombe
82c1d87dcd
Fix incorrect length of blake2b hashes for internal key derivation.
...
Co-authored-by: str4d <jack@electriccoin.co>
2022-01-20 18:08:01 -07:00
Kris Nuttycombe
37e6d3a2bc
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: ying tong <yingtong@z.cash>
2022-01-20 16:43:57 -07:00
Kris Nuttycombe
3dd1f310d9
Merge remote-tracking branch 'upstream/non-consensus-changes-on-branchid-37519621' into autoshield-poc-daa
2022-01-20 13:54:38 -07:00
Kris Nuttycombe
da3833f906
Fix missing use of `dk` in derivation of sapling internal FVK.
...
Also, factor out sapling internal fvk derivation so that it only
requires (fvk, dk) since we may not have the full extfvk.
2022-01-20 13:50:12 -07:00
therealyingtong
f6f5096ae4
Derive Sapling internal full viewing key.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-20 13:50:12 -07:00
therealyingtong
a98010a684
Derive Sapling internal spending key.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-20 13:50:12 -07:00
Kris Nuttycombe
eaa3ec56d0
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
7b2f9e27ae
Rename script_code to script_pubkey in zip244 test vectors.
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
fc82801d3d
Update v5 transparent signature hashes to always commit to scriptPubKey
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
3c6e19f4e4
Update test vectors.
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
37fdf88462
Make hash_type a property of the SignableInput::Transparent
2022-01-19 08:32:59 -07:00
Kris Nuttycombe
145d1a57f7
Make transparent signatures commit to all input amounts & scripts.
...
Transparent UTXOs are referred as pair of previous txid and index. In
order to verify UTXO's amount in HWW (hardware wallet), whole previous
transaction containing this UTXO must be streamed into the device. This
increases complexity of signing process significantly.
zcash/zips#574 identifies this problem and suggests a modification
to ZIP-244 to resolve this issue, by adding three new fields to
section S.2 of the signature hash.
2022-01-19 08:32:59 -07:00
Jack Grigg
07a95d70c9
incrementalmerkletree 0.2
2021-12-17 23:46:00 +00:00
Jack Grigg
e148ca84ba
Migrate to latest `zcash_note_encryption` API
2021-12-17 05:34:45 +00:00
Kris Nuttycombe
c72ddb1251
Improve documentation of DiversifierKey#diversifier_index
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-13 13:37:11 -07:00
Kris Nuttycombe
8e934682bb
Add decryption of Sapling diversifiers.
...
Given a diversifier key, decrypts a diversifier to obtain
the diversifier index from which the diversifier was originally
produced.
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-13 13:08:58 -07:00
Kris Nuttycombe
06bea7f936
Factors out sapling address generation from SaplingExtendedFullViewingKey.
...
Sapling address generation depends only on an FVK and
a diversifier key. For the purpose of unified full viewing
keys, we need to break the dependence upon Sapling extended
full viewing keys, so this makes the address generation
methods of SaplingExtendedFullViewingKey usable without
coupling them to the ability to derive child full viewing keys.
2021-11-30 20:00:36 -07:00
Kris Nuttycombe
0b9d7e4303
Merge remote-tracking branch 'upstream/master' into autoshield-poc-daa
2021-11-24 15:48:02 -07:00
Jack Grigg
5055033c31
zcash_primitives: Migrate to `zcash_note_encryption::BatchDomain`
2021-11-17 12:17:10 +00:00
Kris Nuttycombe
fc0dd8e3eb
Merge remote-tracking branch 'upstream/master' into autoshield-poc-daa
2021-10-25 13:24:03 -06:00
Kris Nuttycombe
48340a4846
Fix doc comment for default address generation.
2021-10-15 13:19:25 -06:00
Kris Nuttycombe
86d4affe73
Add tests for `ExtendedFullViewingKey::address`
2021-10-11 16:34:37 -06:00
Kris Nuttycombe
70e65081c5
Add a test for DiversifierKey::diversifier
2021-10-11 16:34:37 -06:00
Kris Nuttycombe
120cc70a6d
Fix type of default_address
2021-10-11 16:34:37 -06:00
Daira Hopwood
bec497f6bf
Apply suggestions from code review
...
Co-authored-by: ying tong <yingtong@z.cash>
2021-10-11 16:34:37 -06:00
Kris Nuttycombe
1373221439
Renames the `ExtendedFullViewingKey::address` method to `find_address`.
...
This also adds a new semantically different `address` method which
attempts to produce an address given the specified diversifier index,
and returns `None` if that index does not produce a valid diversifier.
It is then up to the caller to search the diversifier index space if
the diversifier index that they are attempting to use does not result in
a valid diversifier.
2021-10-11 16:34:37 -06:00
Kris Nuttycombe
28112de234
Make it possible for callers to search for valid Sapling diversifiers.
2021-10-11 16:34:37 -06:00
Kris Nuttycombe
6cf0749ac9
Merge remote-tracking branch 'upstream/master' into autoshield-poc-reorder
2021-10-01 11:03:41 -06:00
Jack Grigg
b29803ae34
Update ZIP 244 test vectors with new consensus branch ID
2021-09-28 22:31:11 +01:00
Jack Grigg
a90af6cb2d
Update NU5 consensus branch ID and set testnet activation height
2021-09-28 22:12:31 +01:00
Jack Grigg
4770675542
Bump Orchard patch to include Merkle path cleanups
2021-09-16 22:55:22 +01:00
Jack Grigg
eae4ac4110
`impl memuse::DynamicUsage for Amount`
...
Required to use `DynamicUsage` with `orchard::Bundle<_, Amount>`.
2021-09-14 20:48:58 +01:00
Jack Grigg
65e1d32774
ff 0.11, group 0.11, etc.
2021-09-09 18:20:37 +01:00
Kris Nuttycombe
427e6acbd4
Allow CompactSize deserialization to target any type that can be TryFrom<u64>
2021-09-01 13:57:51 -06:00
str4d
edcde252de
Merge pull request #428 from nuttycom/public_compact_size
...
Move the CompactSize, Vector, Array and Option encodings to a new zcash_encoding crate.
2021-09-01 20:45:28 +01:00
Kris Nuttycombe
c1bad64fbd
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-09-01 11:08:52 -06:00
Kris Nuttycombe
fa092da456
Fix stray clippy complaints.
2021-08-31 13:19:24 -06:00
Kris Nuttycombe
ef98c7e48c
Add zcash_encoding crate.
...
The CompactSize type, and the standardized encodings for the Vector,
Array and Option types are moved to the newly created crate.
2021-08-31 13:19:24 -06:00
Jack Grigg
f03f05f251
zcash_note_encryption: Switch to chacha20poly1305 crate
2021-08-30 15:03:39 +01:00
Kris Nuttycombe
edd7471d90
Merge remote-tracking branch 'upstream/master' into autoshield-poc-daa
2021-08-27 11:08:50 -06:00
Kris Nuttycombe
ac139c6e9b
Make CompactSize serialization functions public.
2021-08-25 09:55:08 -06:00
str4d
9be36f3e54
Merge pull request #417 from nuttycom/incremental_merkle_tree_ser
...
Add manual serialization for bridgetree::Frontier
2021-08-17 14:57:59 +01:00
Kris Nuttycombe
77bb78d960
Apply suggestions from code review.
2021-08-17 07:31:15 -06:00
Kris Nuttycombe
1ed538b655
Fix clippy complaints.
2021-08-16 17:36:07 -06:00
Kris Nuttycombe
7b953283ce
Add blanket implementation of Hashable for incrementalmerkletree::Hashable + HashSer
2021-08-16 13:48:37 -06:00
Kris Nuttycombe
837ad19262
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-08-16 10:20:14 -06:00
Kris Nuttycombe
5ba7bbc53b
Serialize `Option` values by value, not by reference.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-08-16 10:06:38 -06:00
Kris Nuttycombe
b783c4d0e7
Merge remote-tracking branch 'upstream/master' into autoshield-poc-daa
2021-08-12 11:21:30 -06:00
Kris Nuttycombe
98dc330cdb
Merge pull request #424 from daira/zip339-primitives
...
ZIP 339 support
2021-08-12 07:23:15 -06:00
Jack Grigg
d8410063ab
zcash_primitives: Implement `Domain::batch_epk` for `jubjub`
2021-08-11 00:21:00 +01:00
Jack Grigg
45521c7849
zcash_primitives: Test that batched trial decryption matches unbatched
2021-08-11 00:18:39 +01:00
Jack Grigg
d0026b460b
zcash_primitives: Implement batched trial decryption optimisation
2021-08-10 02:17:10 +01:00
Jack Grigg
279a8b6bb6
Use `EphemeralKeyBytes` type in place of `[u8; 32]`
2021-08-09 21:28:42 +01:00
Daira Hopwood
d1443e5049
ZIP 339 support.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-07 01:07:54 +01:00
Jack Grigg
83c6a2d1ca
Store OutputDescription `ephemeral_key` as bytes
...
This removes an unnecessary `to_bytes` during trial decryption of notes,
and more closely matches the protocol spec. We retain the consensus rule
canonicity check on epk due to `SaplingVerificationContext::check_output`
taking a `jubjub::ExtendedPoint`, forcing `zcashd` to parse the bytes.
2021-08-06 16:54:48 +01:00
Kris Nuttycombe
2945905d52
Implement manual serialization for incremental Merkle tree components.
...
This also adds parsing of the legacy CommitmentTree format,
to permit easy migration of persisted data.
2021-08-05 09:32:44 -06:00
Kris Nuttycombe
232feb71be
Use orchard::Flags::to_byte/from_byte
2021-07-29 10:38:43 -06:00
Kris Nuttycombe
3b8f0214eb
Move Orchard bundle commitments to the `orchard` crate.
2021-07-29 10:38:43 -06:00
Kris Nuttycombe
105f8da91f
Update `nonempty` and `orchard` dependencies.
2021-06-30 12:57:56 -06:00
Kris Nuttycombe
1ae2bd727c
Fix clippy complaints
2021-06-23 16:37:48 -06:00
Jack Grigg
69ee9f8ca5
Bump orchard deps
...
Includes additional patched dependencies, now that the orchard crate is
not pinning specific revisions of the in-development crates.
2021-06-15 20:20:53 +01:00
Jack Grigg
00b3e427e6
impl From<Amount> for orchard::ValueSum
...
This is necessary in order to be able to calculate bvk for Orchard
bundles.
2021-06-14 11:41:02 +01:00
Jack Grigg
c7c79d266e
zcash_note_encryption: Add `ShieldedOutput::ephemeral_key() -> EphemeralKeyBytes`
...
This replaces the `ShieldedOutput::epk() -> &Domain::EphemeralPublicKey`
which could not be satisfied by output types that did not parse epk.
2021-06-10 18:35:19 +01:00
str4d
3915abd0a1
Merge pull request #399 from str4d/zip-244-auth-digest-test-vectors
...
Bring in ZIP 244 auth digest test vectors.
2021-06-08 19:47:55 +01:00
Jack Grigg
684fd504a8
ZIP 244: Write transparent scripts in their consensus encoding
2021-06-08 18:47:34 +01:00
str4d
fe07fb3c51
Merge pull request #396 from str4d/394-zip-216
...
Impl ZIP 216 on SaplingVerificationContext and redjubjub::PublicKey
2021-06-08 18:34:47 +01:00
Kris Nuttycombe
31ea91ced8
Ensure tze digest is only included if TZEs are in the consensus rules.
2021-06-08 11:33:52 -06:00
Jack Grigg
acc19a76e2
Bring in ZIP 244 auth digest test vectors.
...
From https://github.com/zcash-hackworks/zcash-test-vectors/pull/34 .
2021-06-08 18:17:30 +01:00
Jack Grigg
7e23b96a03
Extract ZIP 225 Orchard bundle parsing and serialization into helpers
...
These will be used by `zcashd` for handling the Orchard component of v5
transactions.
2021-06-08 17:29:04 +01:00
str4d
0bfd1f7544
Merge pull request #375 from nuttycom/feature/zip-225
...
ZIP 225 & ZIP 244
2021-06-08 17:28:25 +01:00
Kris Nuttycombe
eb3d01aa6b
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-06-08 07:02:52 -06:00
Kris Nuttycombe
f70285d243
Fix error in transaction auth digest.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-07 09:27:05 -06:00
Kris Nuttycombe
371f84dc9b
Minor error message improvement.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-07 09:27:05 -06:00
Kris Nuttycombe
0253442af0
Be more explicit about empty sapling & orchard hashes.
2021-06-07 09:27:05 -06:00
str4d
2f3e4989ba
Merge pull request #352 from str4d/zcash_address
...
New component: zcash_address crate
2021-06-07 00:36:48 +01:00
Jack Grigg
e2fb5e6402
Impl ZIP 216 on SaplingVerificationContext and redjubjub::PublicKey
...
`PublicKey::verify` now always uses post-ZIP 216 validation rules, which
is fine in non-consensus contexts.
`SaplingVerificationContext` is used by `zcashd`'s consensus rules.
2021-06-06 23:45:15 +01:00
Kris Nuttycombe
b93c503263
Deserialize signatures directly into actions.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-05 10:19:36 -06:00
Kris Nuttycombe
4f764c3c80
Use Vector read/write operations where possible instead of Array
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-05 10:12:39 -06:00
Kris Nuttycombe
97bef30582
Remove consensus branch id from roundtrip serialization check.
...
Possible now that it's part of the transaction.
2021-06-05 09:48:52 -06:00
Kris Nuttycombe
47ce97c3d2
Keep builder spend data in spend_auth_sig fields.
2021-06-05 09:45:55 -06:00
Kris Nuttycombe
69e5a491ff
Fix generation of arbitrary jubjub points.
2021-06-04 17:28:44 -06:00
Kris Nuttycombe
d0a911cb87
Fix rustdocs
2021-06-04 16:38:01 -06:00
Kris Nuttycombe
28d3f481cd
Apply suggestions from code review.
2021-06-04 16:38:01 -06:00
Kris Nuttycombe
e71a1ce345
Rename Vector::write_items -> Array::write and Vector::read_count -> Array::read
2021-06-04 16:38:01 -06:00
Kris Nuttycombe
4623f98d9a
Fix bugs in construction of Sapling txid hashes.
2021-06-04 16:38:01 -06:00
Kris Nuttycombe
df0095ebba
Add ZIP-244 test vectors.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
6348400cf4
Store patial authorizing data for sapling components in bundle authorization.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
6635895e55
Clean up TZE signature generation.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
ab1b31ebf6
Store partial authorizing data for transparent txs in transparent authorization.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
dac68ce2aa
Drop proptest space size to reduce test runtime.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
38b864c100
Implement V5 transaction serialization & roundtrip property tests.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
e828dbf5d0
Add v5 parsing and serialization for Sapling components.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
1a5aad723b
Use generalized signature_hash for transaction builder.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
55d1090f70
Add v5 txid & signature hashing.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
1138343c89
Add data structures for transaction digests.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
fd1790fec2
Move sighash.rs -> sighash_v4.rs
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
4bcad97ba1
Add amount conversion for Orchard values.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
2ae55b4145
Add more flexibility to vector serialization.
2021-06-04 15:45:39 -06:00
Kris Nuttycombe
9149d48afc
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-03 20:25:10 -06:00
Kris Nuttycombe
231aa5d01a
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-03 18:47:49 -06:00
Kris Nuttycombe
cc9dbf8bde
Fix clippy complaint.
2021-06-03 18:46:38 -06:00
Kris Nuttycombe
a305760bb1
Move TZE components to a bundle within TransactionData
2021-06-03 18:46:38 -06:00
Kris Nuttycombe
523424e50b
Move Transparent components to a bundle within TransactionData
2021-06-03 18:46:38 -06:00
Kris Nuttycombe
670d03e74f
Move Sprout components to a bundle within TransactionData
2021-06-03 18:46:38 -06:00
Kris Nuttycombe
84e8952ec3
Move Sapling components to a bundle within TransactionData
2021-06-03 18:46:38 -06:00
Kris Nuttycombe
488d02aad3
Add Orchard bundle to TransactionData
...
This also adds parsing and serialization for Orchard bundle parts.
This requires changes to the TZE builder components, because they
refer to the TransactionData type in the context for witness creation.
2021-06-03 13:03:29 -06:00
Kris Nuttycombe
12d2dfd1bd
Merge pull request #386 from nuttycom/feature/zip-225-builder_modularization
...
ZIP-225/244 #2 : Refactor transaction builder to create separate builders for each section.
2021-06-02 21:29:19 -06:00
Kris Nuttycombe
2098196440
Fix errors caused by use of zero heights.
2021-06-02 21:07:29 -06:00
Kris Nuttycombe
2b96e2eb0c
Fix TZE demo test errors.
2021-06-02 18:23:25 -06:00
Kris Nuttycombe
e32e2d6e7f
Fix ordering of Sapling build errors.
2021-06-02 17:15:35 -06:00
Kris Nuttycombe
0743f9e815
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-02 17:11:04 -06:00
Kris Nuttycombe
2c891a8000
Fix incorrect progress notifier.
2021-06-02 17:09:17 -06:00
Kris Nuttycombe
14d07cd826
Fix intra-doc links & rustfmt.
2021-06-02 17:09:17 -06:00
Kris Nuttycombe
b487a7f820
Sapling builder can store network params.
2021-06-02 16:57:27 -06:00
Kris Nuttycombe
4878b5b19b
Address comments from review.
2021-06-02 16:48:55 -06:00
Kris Nuttycombe
72ac97a35f
Derive transaction version & branch id from target height.
2021-06-02 13:45:29 -06:00
Kris Nuttycombe
7466ef42d8
Move change_address back to the main builder
...
Also, store the target height in the sapling builder.
2021-06-02 12:35:18 -06:00
Kris Nuttycombe
c872f39547
Restore progresscounter.
2021-06-02 11:48:46 -06:00
Kris Nuttycombe
3770e5de8b
Move TZE transaction builder to an independent module.
2021-06-02 11:48:46 -06:00
Kris Nuttycombe
c1a8de27f3
Move Sapling transaction builder to an independent module.
2021-06-02 11:48:46 -06:00
Kris Nuttycombe
ba6fc053b5
Move transparent transaction builder to an independent module.
2021-06-02 11:48:46 -06:00
Kris Nuttycombe
8267d06846
Refactor transaction builder to create separate builders for each section.
2021-06-02 11:48:46 -06:00
str4d
f7f5cd472b
Merge branch 'master' into note-decryption-fixes
2021-06-02 18:45:01 +01:00
Kris Nuttycombe
168314cec6
Update changelog.
2021-06-01 07:05:01 -06:00
Kris Nuttycombe
62bd06f14e
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-06-01 07:03:31 -06:00
Kris Nuttycombe
76999eb5c7
Make txid contents private & use txid for TzeOutPoint
2021-06-01 07:03:31 -06:00
Kris Nuttycombe
936b552de2
Add NoteValue newtype, Nullifier::as_ref and proptest generation.
2021-06-01 07:03:31 -06:00
Kris Nuttycombe
3dc05a69eb
Add Nu5 NetworkUpgrade variant.
2021-06-01 07:03:31 -06:00
Kris Nuttycombe
4efb21d1c7
Make amount addition and subtraction traits use checked operations.
2021-06-01 07:03:31 -06:00
Jack Grigg
362838c3fa
zcash_note_encryption: Fix array size in Domain::extract_{esk, pk_d}
...
Decrypted output size is `OUT_PLAINTEXT_BYTES`, which the decryptor
can always provide (either by decrypting into the correct size array
as now, or truncating the buffer before passing it to the domain).
2021-05-28 23:48:03 +01:00
Jack Grigg
f6705f23c3
zcash_note_encryption: Add ovk recovery API
2021-05-28 23:45:23 +01:00
Jack Grigg
ae43e6c074
zcash_note_encryption: Pass cmstar_bytes to Domain::derive_ock
...
PRF^ock in the spec takes cm* as a byte array.
2021-05-28 23:41:13 +01:00
Jack Grigg
d031dabcfc
Builder: Move progress notifier configuration to a builder method
...
This is what builder methods are for :) and it helps to limit the growth
of alternate `build` methods.
2021-05-26 21:58:08 +01:00
str4d
d9a3b98120
Merge pull request #377 from adityapk00/builder_progress
...
Report Sapling Tx Builder Progress
2021-05-26 21:52:38 +01:00
Jack Grigg
6717cd821c
Move F4Jumble implementation into zcash_address
2021-05-20 22:50:59 +01:00
str4d
35dadc7f6c
f4jumble: Test both directions against test vectors
2021-05-20 14:16:39 +01:00
Kris Nuttycombe
1dcba34167
Add checks against f4jumble test vectors.
2021-05-19 08:50:50 -06:00
Kris Nuttycombe
774d166fff
Use VALID_LENGTH constant for f4jumble proptest generation.
2021-05-19 08:29:10 -06:00
Kris Nuttycombe
4346ca9e50
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-05-19 08:29:10 -06:00
Kris Nuttycombe
69ce777dd1
Use macros for personalization & iterator for g function.
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-05-19 08:29:01 -06:00
Kris Nuttycombe
08a3fb9639
Implement F4Jumble
2021-05-19 08:28:58 -06:00
str4d
1b0f2060dd
Improve documentation of builder::Progress
2021-05-18 13:45:48 +01:00
Aditya Kulkarni
f3aded9c84
Send builder progress
2021-05-17 09:44:42 -07:00
Daira Hopwood
da431a0eb2
rustfmt fix
2021-05-03 14:08:06 +01:00
narodnik
618a6165c7
Replace redundant code with call to Field::random() which does the same as the code.
2021-05-03 13:34:13 +02:00
Kris Nuttycombe
8828276361
Query for unspent utxos checks to ensure that spending tx is mined.
...
Also make it an error to try to send a memo to a transparent address.
2021-04-16 14:26:51 -06:00
Jack Grigg
28a45028ab
cargo fmt
2021-04-16 14:03:55 +12:00
Kris Nuttycombe
3434cc8b6a
Add a note about canonicity of ephemeral public keys.
2021-04-15 15:32:45 -06:00
Kris Nuttycombe
b2b3efd4c2
Fix naming cmstar -> cmstar_bytes and cm -> cmstar
2021-04-15 15:24:45 -06:00
Kris Nuttycombe
00d04de547
Make cmstar check follow the spec more closely.
2021-04-14 15:38:58 -06:00
Kris Nuttycombe
12cb8265d8
Fix formatting.
2021-04-12 18:47:45 -06:00
Kris Nuttycombe
fae1a1517a
Simplify try_sapling_output_recovery.
2021-04-12 18:40:17 -06:00
Kris Nuttycombe
6fc1d1d1c0
Use ephemeral_key bytes instead of the epk abstract point where specified.
2021-04-12 16:19:50 -06:00
Kris Nuttycombe
324fc36521
Use ShieldedOutput trait for note encryption/decryption.
...
This change modifies note encryption and decryption functions
to treat a shielded output as a single value instead of handling
the parts of an output as independent arguments.
2021-04-12 12:59:06 -06:00
Kris Nuttycombe
a560101bb2
Remove spurious mut references.
2021-04-08 10:08:00 -06:00
Kris Nuttycombe
879eea863a
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
213cd6cce9
Fix Clippy complaints.
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
5b13bb3a1e
Add try_output_recovery_with_ovk to shared note encryption code.
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
266285b536
Move generalized note encryption functionality to zcash_note_encryption crate.
2021-04-08 08:20:21 -06:00
Kris Nuttycombe
e77839232d
Generalize note encryption and decryption.
...
This commit introduces a `Domain` trait which defines the types
and operations that are shared between Sapling and Orchard note
encryption and decryption processes.
2021-04-08 08:19:10 -06:00
Kris Nuttycombe
5baccdf052
Move note_encryption into the sapling module.
2021-04-08 08:19:10 -06:00
Jack Grigg
2f3847638d
zcash_primitives: Revert to SproutProof::PHGR
...
Unlike regular acronyms or abbreviations, this is author initials, which
we've decided to keep capitalised.
2021-04-02 10:39:25 +13:00
Jack Grigg
63db2729e9
Temporarily allow clippy::result_unit_err lint
...
Fixing these lints is deferred to zcash/librustzcash#367 .
2021-03-27 19:01:03 +13:00
Jack Grigg
56b577b31e
clippy: Fix small lints
2021-03-27 19:01:03 +13:00
Jack Grigg
564c2714fe
clippy: Use Iterator::try_for_each
2021-03-27 19:01:03 +13:00
Jack Grigg
636845d0f9
Renames to use lower-case abbreviations (matching Rust convention)
...
As of our MSRV bump to 1.51.0, we get lints for this.
2021-03-27 19:01:03 +13:00
Jack Grigg
8ac663f116
Fix some doctests and intra-doc links after moving Sapling primitives
2021-03-27 17:10:18 +13:00
Kris Nuttycombe
33effb7d67
Move sapling keys into sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
4086df772c
Move sapling-specific primitives into the sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
abbf5dfd83
Move pedersen hash test vectors into Sapling
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
bc087a5ff7
Move pedersen hashes to sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
88d58aac0a
Move relevant utils into sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
16948d9d78
Move zcash_primitives::prover to sapling module
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
bf97b21632
Move redjubjub to sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
de1345a1c2
Move group_hash to sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
c839193b20
Move TZE components to a separate module & add TzeOutPoint
2021-03-27 15:52:20 +13:00
Kris Nuttycombe
97f2502a5e
Factor transparent transaction components into a separate module.
2021-03-27 15:49:17 +13:00
Kris Nuttycombe
96709c6423
Move Sapling transaction components to a separate module.
2021-03-27 15:49:17 +13:00
Kris Nuttycombe
7fcb7bbe99
Factor Sprout transaction elements into a separate module.
2021-03-27 15:49:17 +13:00
Kris Nuttycombe
6e371a8c13
Make Sprout elements crate-public.
2021-03-27 15:49:17 +13:00
Jack Grigg
9d9c0579f8
Use new name for broken_intra_doc_links lint
...
We also add the lint to crates in the workspace that didn't have it.
Closes zcash/librustzcash#279 .
2021-03-27 08:27:17 +13:00
Jack Grigg
675048e52b
Fix broken intra-doc links and lints
2021-03-26 10:07:20 +13:00
Jack Grigg
55e73d7910
Fix clippy lints
2021-03-26 10:07:20 +13:00
Jack Grigg
8a84203685
Remove Default impl from MemoBytes
...
Memo fields have two ways to encode an empty memo:
- 0xF6 followed by all-zeroes, encoding "there is no memo".
- All-zeroes, encoding the empty UTF-8 string.
In almost all cases you want the former, but users thinking about byte
slices may expect MemoBytes::default() to result in the latter. To
ensure clarity, we now require calling either MemoBytes::default() or
MemoBytes::from_bytes(&[]) to be explicit.
No such confusion exists for the Memo enum, because the two types are
visibly separated as different enum cases, and Memo::Empty makes sense
as the default.
2021-03-17 21:16:01 +13:00
Jack Grigg
c7a3ef0e88
Split memo-handling into MemoBytes struct and Memo enum
...
The MemoBytes struct is a minimal wrapper around the memo bytes, and only
imposes the existence of null-padding for shorter memos. The only error
case is attempting to construct a memo that is too long. MemoBytes is
guaranteed to be round-trip encodable (modulo null padding).
The Memo enum implements the additional memo rules defined in ZIP 302,
interpreting the contents of a memo (for example, parsing it as text).
2021-03-17 21:05:50 +13:00
Jack Grigg
48f7ef84a4
Move Memo into zcash_primitives::memo
2021-03-17 19:58:40 +13:00
Kris Nuttycombe
b5bbbb6f5a
Factor out nullifier update from database actions in scan_cached_blocks
2021-03-09 20:59:57 -07:00
Jack Grigg
463e252af4
Fix more intra-doc links
2021-03-04 23:01:42 +00:00
Jack Grigg
d221b230c6
Fix intra-doc links
2021-03-04 17:41:08 +00:00
str4d
36e4b0d51a
Merge pull request #329 from nuttycom/ivk_payment_addresses
...
Introduce SaplingIvk newtype & use IVKs where possible.
2021-03-04 07:04:05 +13:00
Kris Nuttycombe
b37b5876f2
Merge pull request #318 from nuttycom/tx_version_enum
...
Add TxVersion enum to make interacting with transaction version values safer.
2021-02-04 12:47:12 -07:00
Kris Nuttycombe
974669a50b
Fix clippy lints.
2021-02-04 11:41:29 -07:00
Kris Nuttycombe
796161e9b4
Add suggested comment clarifying future additions to the TxVersion enum
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-02-04 11:22:13 -07:00
Kris Nuttycombe
1cc7949518
Rename CommitmentTree::new -> CommitmentTree::empty
2021-02-04 07:49:48 -07:00
Kris Nuttycombe
3423b03c6d
Fix a couple more lints.
2021-02-04 07:31:00 -07:00
Kris Nuttycombe
98530184c0
Fix clippy complaints.
2021-02-03 14:27:31 -07:00
Kris Nuttycombe
7a57aee530
Introduce SaplingIvk newtype & use IVKs where possible.
...
This includes making it possible to obtain a payment address from just the IVK + diversifier.
2021-02-02 15:27:13 -07:00
François Garillot
45f3f5a945
Simplify a few pattern matches
...
A few pattern-matches correspond directly to standard combinators on
`Result`, `Option`. This uses them for concision / clarity.
Refactorings reviewed by the author after suggestion from [comby-rust](https://github.com/huitseeker/comby-rust ).
2021-02-01 13:37:54 -05:00
Kris Nuttycombe
937fa06136
Fix randomized tests of zfuture transaction roundtrip.
2021-01-25 16:32:57 -07:00
Kris Nuttycombe
6373e7d053
Raise an error in the case that sprout version < 1.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-01-25 16:32:57 -07:00
Kris Nuttycombe
1dd5a6dbcb
Check all transaction versions in has_sprout and uses_groth_proof checks.
2021-01-25 16:32:57 -07:00
Kris Nuttycombe
06cd91059f
Enable transaction serialization roundtrip tests outsize zfuture.
2021-01-25 16:32:57 -07:00
Kris Nuttycombe
da4cf23668
Add TxVersion enum to make interacting with transaction version values safer.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-25 16:32:57 -07:00
Sean Bowe
6315f7dc28
Use wNAF multiplication for Sapling key agreement.
2021-01-22 15:16:06 -07:00
Kris Nuttycombe
8e8ed2bb4f
Rename get_verified_balance -> get_balance_at
2021-01-15 12:00:14 -07:00
Kris Nuttycombe
c70a9ed81f
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-15 11:57:58 -07:00
Kris Nuttycombe
ce06db197a
Rustfmt.
2021-01-12 21:10:34 -07:00
Kris Nuttycombe
db9eb29eba
Merge remote-tracking branch 'upstream/master' into data_access_api
2021-01-12 21:09:40 -07:00
Kris Nuttycombe
7acc75249b
Fix documentation of human-readable prefixes.
2021-01-12 20:45:28 -07:00
Kris Nuttycombe
7d92150965
Fix test compilation with WalletWrite changes.
2021-01-11 18:13:40 -07:00
Kris Nuttycombe
aad2e174c1
Consistently use nullifier and AccountId newtypes.
2021-01-08 21:49:38 -07:00
Kris Nuttycombe
27d7b6c569
A few doc updates.
2021-01-08 18:08:02 -07:00
Kris Nuttycombe
472dac7a22
Revert intra_doc_link_resolution_failure flag change.
2020-12-17 07:36:18 -07:00
Kris Nuttycombe
cf0c3ea90f
Relax RngCore type constraints.
...
The intent of this change is to permit tests to use deterministic
random sources, rather than cryptographically strong ones.
2020-12-14 13:44:05 -07:00
Kris Nuttycombe
c24f663e40
Use methods on sigversion to gate ZIP-243 and TZE signature parts.
2020-12-14 14:54:29 +00:00
Kris Nuttycombe
790071953c
Use rust feature flagging to allow conditionally enabling TZE-related code.
...
This also uses the test-dependencies feature flag for conditional
inclusion of proptest-related modules which may be used by
dependent crates for generation of samples in testing.
2020-12-14 14:54:12 +00:00
Daira Hopwood
62675f4b4f
Use the SHA-256d HashReader and HashWriter for transaction hashing.
...
This hashes the transaction as it is read, rather than hashing a re-serialization.
Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-03 21:22:58 +00:00
Daira Hopwood
1f18da239f
Add HashReader and HashWriter for SHA-256d.
...
Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-03 21:22:58 +00:00
Kris Nuttycombe
cf2dae8af0
Add hrp_sapling_extended_spending_key to Parameters trait.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
ee0e059eb3
Add coin_type to consensus parameters.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
a437df191e
Initial skeleton of low-level database access API.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
1285ab0af2
Fix tests to account for modified default fees.
2020-11-24 01:24:19 +00:00
Kevin Gorham
53ebc378cc
ZIP-313 change default fee amount.
2020-11-24 01:22:14 +00:00
Kris Nuttycombe
f40174464a
Use slices as parameters rather than &Vec references.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-11-19 14:49:24 -07:00
Kris Nuttycombe
726f02513d
Make the functions which produce the components of the sighash reusable.
...
When implementing transaction nonmalleability, it will be useful
to have this already done.
2020-11-19 11:25:24 -07:00
Jack Grigg
be8bae71be
Suppress clippy lints where we want the given behaviour
2020-10-30 14:10:35 +00:00
Jack Grigg
91796adcda
Remove wrapping closures around mapping functions
2020-10-30 14:10:35 +00:00
Jack Grigg
025deda712
impl Default for T on types with T::new()
2020-10-30 14:10:35 +00:00
Jack Grigg
44cbc6cc6d
Remove unnecessary references
2020-10-30 14:10:35 +00:00
Jack Grigg
88474c71c7
Simplify expressions
2020-10-30 13:51:40 +00:00
Jack Grigg
0cb51f963c
Remove unnecessary clones
2020-10-30 13:51:40 +00:00
Jack Grigg
bc9ca20d56
Make use of assignment operators
2020-10-30 13:26:36 +00:00
Jack Grigg
890648df4d
Use !x.is_empty() instead of x.len() > 0
2020-10-30 13:25:08 +00:00
Jack Grigg
0bbcd8c408
Remove unnecessary imports
2020-10-30 13:22:46 +00:00
Aditya Kulkarni
70ecd6b2d8
Export notesize constants
2020-10-26 11:31:22 -07:00