Commit Graph

2280 Commits

Author SHA1 Message Date
dependabot[bot] 4e754089a6 build(deps): bump owo-colors from 1.4.2 to 2.0.0
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.4.2 to 2.0.0.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/compare/v1.4.2...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 08:01:44 -04:00
teor 306fa88214 Document the correctness of Poll::Pending wakeups 2021-03-27 08:55:49 -04:00
teor 829a6f11c5 Document the behaviour of the `select!` macro 2021-03-27 08:55:49 -04:00
dependabot[bot] 1c87372b03 build(deps): bump owo-colors from 1.3.0 to 1.4.2
Bumps [owo-colors](https://github.com/jam1garner/owo-colors) from 1.3.0 to 1.4.2.
- [Release notes](https://github.com/jam1garner/owo-colors/releases)
- [Commits](https://github.com/jam1garner/owo-colors/commits/v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 14:47:11 -04:00
teor b329892665 Add a comment about a zcashd inv message bug 2021-03-26 11:26:59 -04:00
Deirdre Connolly a5ff0e983b Pin coverage.yml nightly to 2021-03-24 for now 2021-03-26 11:24:16 -04:00
dependabot[bot] a8b3ced7e9 build(deps): bump rand_core from 0.6.1 to 0.6.2
Bumps [rand_core](https://github.com/rust-random/rand) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.6.1...rand_core-0.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 09:33:39 -04:00
teor ee0fc35380
Increase coverage CI timeout (#1947)
Since coverage uses nightly, it can be slightly slower than other CI.
2021-03-26 09:47:14 +10:00
Deirdre Connolly 354396f525 Add some comments and tracing for groth16::Verifier tests 2021-03-25 18:34:47 -04:00
teor 1a159dfcb6 Add more methods for creating MetaAddrs
This refactor lets us remove `MetaAddr::update_last_seen()`.
2021-03-26 07:23:49 +10:00
teor 6fe81d8992 Make MetaAddr.last_seen into a private field 2021-03-26 07:23:49 +10:00
teor eae59de1e8 use PeerAddrState::* 2021-03-26 07:23:49 +10:00
teor e9cdc224a2 Rewrite MetaAddr::sanitize so it's harder to misuse
`sanitize` could be misused in two ways:
* accidentally modifying the addresses in the address book itself
* forgetting to sanitize new fields added to `MetaAddr`

This change prevents accidental modification by taking `&self`, and
explicitly creates a new sanitized `MetaAddr` with all fields listed.
2021-03-26 07:23:49 +10:00
Deirdre Connolly c5bad9fac2
Rename NU5 to Nu5 to appease newly stable clippy::upper-case-acronyms (#1945) 2021-03-26 07:22:50 +10:00
Deirdre Connolly c95716e246 Add link to Ed25519 async batch verification ticket 2021-03-25 16:34:16 -04:00
teor 16c073c4e0 Comment: transparent sighash in script verifier 2021-03-25 16:34:16 -04:00
teor 32b754d517 Add an error grafana dashboard 2021-03-25 16:34:16 -04:00
teor 83bdc1a9f3 Add a metric for binding sig errors
But keep ignoring those errors until we fix binding sigs in #1939
2021-03-25 16:34:16 -04:00
teor 0bad6bc615 Add a TODO for ed25519 batch verification 2021-03-25 16:34:16 -04:00
teor e4f58f018a Re-enable joinsplit and sapling spend auth verification 2021-03-25 16:34:16 -04:00
teor f8dc989e99 Move a quick check earlier in transaction validation 2021-03-25 16:34:16 -04:00
Deirdre Connolly b77f41419e
CODE_OF_CONDUCT.md (#1097)
* Create CODE_OF_CONDUCT.md

Starting with the zcashd CoC and the Rust CoC

* Update CODE_OF_CONDUCT.md

* Update contact email

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

* Remove redundant contact line

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

* cleanup code of conduct

* move the email link to be consistent with rustlangs

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* Update CODE_OF_CONDUCT.md

remove forums from the list of official Zcash Foundation venues as the forums already have their own CoC

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: Jane Lusby <jane@zfnd.org>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2021-03-25 10:54:08 +01:00
Alfredo Garcia 32beef233e
V5 transaction rfc (#1886)
* propose a v5 transaction rfc
* define orchard flags
* Update test sections
* Add security section
* move some code into sapling and orchard crates, do renames
* Move sapling value balance into shielded data
* Add AuthorizedAction type
* Order fields based on last serialized data
* Add the proofsOrchard field
* Delete visibility modifiers for readability

All those `pub`s make the design harder to read.

* Model anchor variants as generic trait types
* Be specific about the network upgrade
* Specify a file for each new type
* Document how the Orchard flags are used

Co-authored-by: teor <teor@riseup.net>
2021-03-25 10:30:30 +10:00
Deirdre Connolly 7efc700aca
Merge pull request #1713 from ZcashFoundation/use-groth16-batch-math
Use batch optimizations, load params in groth16::Verifier, verify Spend & Output descriptions in transaction verifier
2021-03-24 12:28:25 -04:00
dependabot[bot] e0643f3664 build(deps): bump serde from 1.0.124 to 1.0.125
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.124 to 1.0.125.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.124...v1.0.125)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-23 15:25:12 -04:00
Deirdre Connolly 33e9efe2dd
Mention git diff --stat in release PR template (#1934) 2021-03-23 14:39:12 +10:00
teor b396bb9be5 Document that the mandatory checkpoint can change
We don't want users relying on the exact height of Zebra's
mandatory checkpoint.
2021-03-22 22:17:44 -04:00
Deirdre Connolly ca1d2de87d
Bump versions for v1.0.0-alpha.5 (#1932)
Zebra's latest alpha checkpoints on Canopy activation, continues our work on NU5, and fixes a security issue.

Some notable changes include:

## Added
- Log address book metrics when PeerSet or CandidateSet don't have many peers (#1906)
- Document test coverage workflow (#1919)
- Add a final job to CI, so we can easily require all the CI jobs to pass (#1927)

## Changed
- Zebra has moved its mandatory checkpoint from Sapling to Canopy (#1898, #1926)
  - This is a breaking change for users that depend on the exact height of the mandatory checkpoint.

## Fixed
- tower-batch: wake waiting workers on close to avoid hangs (#1908)
- Assert that pre-Canopy blocks use checkpointing (#1909)
- Fix CI disk space usage by disabling incremental compilation in coverage builds (#1923)

## Security
- Stop relying on unchecked length fields when preallocating vectors (#1925)
2021-03-22 22:05:01 -04:00
Alfredo Garcia c5b1d0deee move consts to start of the function 2021-03-22 11:54:31 -04:00
teor 0eeb77a44c Remove unused import
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-03-22 11:54:31 -04:00
teor b623acc945 Add memory DoS prevention comments 2021-03-22 11:54:31 -04:00
Alfredo Garcia 35fc683868 fix import 2021-03-22 11:54:31 -04:00
Alfredo Garcia d7b83b7b2a remove unused import 2021-03-22 11:54:31 -04:00
teor 8e18c99cdc Avoid risky use of Read::take with untrusted lengths
Zebra already uses `Read::take` to enforce message, body, and block
maximum sizes.

So using `Read::take` on untrusted sizes can result in short reads,
without a corresponding `UnexpectedEof` error. (The old code was
correct, but copying it elsewhere would have been risky.)
2021-03-22 11:54:31 -04:00
teor 5c55f7210c Stop untrusted preallocation during script deserialization
This is an easy memory denial of service attack.
2021-03-22 11:54:31 -04:00
teor 609d70ae53 Stop untrusted preallocation during string deserialization
This is an easy memory denial of service attack.
2021-03-22 11:54:31 -04:00
teor db2f920d96 Stop untrusted preallocation during JoinSplit deserialization
Zebra believes the untrusted `JoinSplit` list size field when
deserializing `JoinSplit`s, and preallocates a `Vec` based on that size.

This is trivial a memory exhaustion attack.

Instead, use the current auto-growing implementation, which is limited
by the size of the message data.
2021-03-22 11:54:31 -04:00
teor f19f0d0949 clippy: fix inconsistent struct ordering 2021-03-22 11:51:54 -04:00
teor 38585b6116
Fix whitespace for rustfmt 2021-03-22 11:18:37 +10:00
teor a6f916671a
Add a TODO comment for a missing no-coinbase check 2021-03-22 08:59:51 +10:00
Deirdre Connolly 4aedf08a95
Merge pull request #1927 from ZcashFoundation/ci
Add final job to ci.yml that passes when all other ci.yml jobs pass
2021-03-20 23:57:13 -04:00
Deirdre Connolly 5791ee3339 Sync _from_ canopy, not _to_, now that we have state 2021-03-20 19:34:33 -04:00
Deirdre Connolly bbdecbe9ad Update mainnet stateful sync tests to use new disk image
Leave testnet commented out until testnet disk image is ready.
2021-03-20 19:34:33 -04:00
Deirdre Connolly 9b2090b4a1 Update test.yml 2021-03-20 19:34:33 -04:00
Deirdre Connolly a091f63c79 Generate Canopy activation disks 2021-03-20 19:34:33 -04:00
Jane Lusby b835a04a5e document coverage workflow 2021-03-20 14:59:02 -04:00
teor c57baad7e8
Merge pull request #1923 from ZcashFoundation/coverage-no-incremental
Disable incremental compilation in coverage builds to avoid disk space errors.
2021-03-19 11:33:25 +10:00
teor c8b8a428c6 Revise release checklist to be more explicit 2021-03-17 22:23:41 -04:00
Alfredo Garcia b8742f03a9 add a note to save changelog locally 2021-03-17 22:23:41 -04:00
teor d19585cfca Fix some missed Sapling to Canopy checkpoint code changes 2021-03-18 10:13:47 +10:00