Commit Graph

57 Commits

Author SHA1 Message Date
dependabot[bot] f7fe7b9053 build(deps): bump secp256k1 from 0.17.2 to 0.19.0
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from 0.17.2 to 0.19.0.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases)
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.17.2...secp256k1-0.19.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-28 17:09:39 -04:00
dependabot[bot] 8e9019a847 build(deps): bump jubjub from 0.3.0 to 0.4.0
Bumps [jubjub](https://github.com/zkcrypto/jubjub) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/zkcrypto/jubjub/releases)
- [Changelog](https://github.com/zkcrypto/jubjub/blob/master/RELEASES.md)
- [Commits](https://github.com/zkcrypto/jubjub/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-25 17:35:54 -04:00
Ramana Venkata e90137e79b
Update sha2@0.9.1 (#938)
* Update sha2@0.9.1

Fixes #915

* Update zebra-chain/src/sprout/keys.rs

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

* Update zebra-chain/src/sprout/note/nullifiers.rs

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-21 16:26:14 -07:00
Henry de Valence d63562994d deps: Update x25519-dalek, ed25519-zebra 2020-08-17 20:47:48 -07:00
Deirdre Connolly 9d87f30d18 Start of, but currently unfinished, Sapling note commitment / Windowed Pedersen Commitment 2020-08-14 02:04:12 -04:00
dependabot[bot] 5cb61136c9
build(deps): bump tracing from 0.1.18 to 0.1.19 (#872)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.18 to 0.1.19.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.18...tracing-0.1.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-11 10:18:54 -07:00
teor b7fac7b3bc feature: Make ExpandedDifficulty use U256 internally
Adds a dependency on the primitive-types crate.

Also adds custom hex debug formatting for compact and expanded
difficulties.
2020-08-04 12:29:07 +10:00
dependabot[bot] f3b65f9609 build(deps): bump tracing from 0.1.17 to 0.1.18
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.17 to 0.1.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.17...tracing-0.1.18)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-03 15:49:30 -04:00
teor 195948e5b1 feature: Add an ExpandedDifficulty type and conversion
Also add tests.
2020-08-03 10:28:31 +10:00
Henry de Valence 7d0a3debb6 chain: ensure impl Deserialize for Amount validates data.
This uses serde's try_from attribute to run deserialized values through the
TryFrom impl.  Also adds a test to make sure that validation actually does
happen.
2020-07-28 12:20:40 -07:00
Henry de Valence 4aa00ad216 Align crate versions and user-agent with NU numbers.
We had a brief discussion on discord and it seemed like we had consensus on the
following versioning policy:

* zebrad: match major version to NU version, so we will start by releasing
  zebrad 3.0.0;

* zebra-* libraries: start by matching zebrad's version, then increment major
  versions of each library as we need to make breaking changes (potentially
  faster than the zebrad version, always respecting semver but making no
  guarantees about the longevity of major releases).

This commit sets all of the crate versions to 3.0.0-alpha.0 -- the -alpha.0
marks it as a prerelease not subject to perfect adherence to compatibility
guarantees.
2020-07-24 11:46:37 -07:00
dependabot[bot] 474de52e5c
build(deps): bump displaydoc from 0.1.6 to 0.1.7 (#689)
Bumps [displaydoc](https://github.com/yaahc/displaydoc) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/yaahc/displaydoc/releases)
- [Commits](https://github.com/yaahc/displaydoc/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 11:00:15 -07:00
Jane Lusby 06fff62561 remove git dependency on equihash crate 2020-07-10 07:52:52 -04:00
Henry de Valence 8b72781fe1 deps: Update redjubjub to 0.2
Closes #606.
2020-07-09 15:20:23 -04:00
Henry de Valence 68f57b2577 Update ed25519-zebra to 1.0. 2020-07-07 11:49:21 -07:00
Jane Lusby 8281b9040c
Start work on new Amount type (#554) 2020-07-01 16:31:30 -07:00
Jane Lusby afd0e90a74
Implement equihash verification (#549)
This change brings in the `equihash` crate from librustzcash and uses it to add a basic `is_valid` test for `EquihashSolutions`.

Co-authored-by: Jane Lusby <jane@zfnd.org>
2020-06-26 11:21:02 -07:00
Henry de Valence e8561d8f9e rename zebra-test-vectors to zebra-test 2020-06-22 20:23:02 -07:00
Henry de Valence a0e0e2302b Update ed25519-zebra to 0.4 2020-06-16 14:35:42 -07:00
Henry de Valence 9ddcccdcb4 Update ed25519-zebra to 0.3 2020-06-16 00:42:25 -04:00
Henry de Valence a023ba9b16
Add serde bounds to zebra-chain structures. (#231) 2020-06-15 15:08:14 -07:00
Jane Lusby e9af80b875
Add initial version of zebra-state (#414)
* rename zebra-storage to zebra-state

* Setup initial skeleton for zebra-state

* add test

* Apply suggestions from code review

Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>

* move shared test vectors to a common crate

Co-authored-by: Jane Lusby <jane@zfnd.org>
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-06-02 16:16:17 -07:00
dependabot-preview[bot] 145d9a1835 Bump proptest from 0.9.6 to 0.10.0
Bumps [proptest](https://github.com/altsysrq/proptest) from 0.9.6 to 0.10.0.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-29 15:06:40 -04:00
dependabot-preview[bot] e317b68b1d Bump proptest-derive from 0.1.2 to 0.2.0
Bumps [proptest-derive](https://github.com/AltSysrq/proptest) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/AltSysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/AltSysrq/proptest/compare/proptest-derive-0.1.2...proptest-derive-0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-28 23:00:29 -04:00
Deirdre Connolly 8d29d05761 Upgrade sha2 to 0.8.2 release
Resolves #326
2020-05-23 21:32:37 -04:00
Deirdre Connolly 7402a54379 Add bech32 2020-04-18 04:40:31 -04:00
Deirdre Connolly 145afb7bda 2 Blakes, 2 Serious 2020-04-18 04:40:31 -04:00
Deirdre Connolly 8add92445c Add jubjub, replace blake2 with blake2b_simd 2020-04-18 04:40:31 -04:00
Deirdre Connolly 62d30c0a33 Add blake2 dependency 2020-04-18 04:40:31 -04:00
Deirdre Connolly 6e4c80c6f3 Make a note to update to the crates.io version of sha2 when available 2020-03-28 02:42:13 -04:00
Deirdre Connolly a7e5d37296 Use updated RustCrypto/hashes source of sha2 2020-03-28 02:42:13 -04:00
Deirdre Connolly 720a507ba3 Use compress feature flag with hashes crate and re-exported compress256 2020-03-28 02:42:13 -04:00
Deirdre Connolly ee32de2b86 Derive Sprout ReceivingKey's from SpendingKey's via SHA256Compress
Test is incomplete, also the type aliases block us from impl'ing Debug or Display.
2020-03-28 02:42:13 -04:00
Deirdre Connolly bba58807bb Pull in fork of sha2 that exposes compress256 round function 2020-03-28 02:42:13 -04:00
Deirdre Connolly b4832ab7cb Add x25519-dalek as dependency 2020-03-28 02:42:13 -04:00
Deirdre Connolly 7ea39fbdce Use secp256k1 serde flag to make keys serializable 2020-03-28 02:42:13 -04:00
Deirdre Connolly b68e1e2d55 Move Network, Magic, and magics to zebra-chain 2020-03-12 22:02:17 -04:00
Deirdre Connolly 5602ed66a9 Add tests, use Base58Check, not Base58 2020-03-12 22:02:17 -04:00
Deirdre Connolly 9887b7c8b7 Fix up TransparentAddresses 2020-03-12 22:02:17 -04:00
Deirdre Connolly 72ddc7d7a1 Add AddressPayloadHash type
Includes From impls for Script, secp256k1::PublicKey
2020-03-12 22:02:17 -04:00
Deirdre Connolly db86ef6e8b Pull in secp256k1 wrapper crate as a dep 2020-02-28 13:19:47 -05:00
Deirdre Connolly 866acde6e8 Add BLOCK_MAINNET_415000_BYTES test vector and a test to deserialize it
And println! it, for human eyeballs checking.

Resolves #218

Also changes the header constant to use _BYTES.
2020-02-07 13:42:21 -08:00
dependabot-preview[bot] 73463c33f4 Bump ed25519-zebra from 0.1.0 to 0.2.0
Bumps [ed25519-zebra](https://github.com/ZcashFoundation/ed25519-zebra) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/ZcashFoundation/ed25519-zebra/releases)
- [Changelog](https://github.com/ZcashFoundation/ed25519-zebra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ZcashFoundation/ed25519-zebra/compare/0.1.0...0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 20:51:20 -08:00
Deirdre Connolly 71d5571e39 Add roundtrip proptest for LockTime serialization/deserialization
Relates to #150
2020-01-28 03:48:23 -05:00
Henry de Valence 60f3f35d89 Refine Ed25519 byte arrays to ed25519-zebra types. 2020-01-24 16:43:31 -05:00
Henry de Valence 53cae4647e Make invalid ShieldedData unrepresentable.
ShieldedData objects must have at least one spend or output; using Either
ensures that at least one must be present.  This is similar to the
JoinSplitData case, but slightly more complicated: rather than enforcing that
one list has at least one element (which can be done as `(first, rest)`), here
we need to use Either.   This has the downside that it is possible to construct
multiple equivalent internal representations (choosing whether a spend or
output goes in the `first` slot), but this easily fixed with a custom PartialEq
implementation.
2019-12-31 02:46:39 -05:00
Henry de Valence 4315235d52 Use RedJubjub types in zebra-chain. (#142) 2019-12-12 14:23:19 -05:00
Henry de Valence 2b9991e4e7 Add a basic proptest for compactsize encodings.
There's a compiler warning about overlapping ranges so this test should catch the bug.
2019-11-20 11:59:54 -05:00
Henry de Valence 5b801400c1 Update zebra-chain/Cargo.toml 2019-10-17 09:33:10 -07:00
Deirdre Connolly 539a16979b Implement custom Debug impl for BlockHeaderHash
Includes a testcase and write_all implementation for Sha256dWriter.

Related to #63
2019-10-17 09:33:10 -07:00