Commit Graph

228 Commits

Author SHA1 Message Date
teor 21b1a622e6
fix(deny.toml): Change an exception to the earlier pin-project version (#5070)
* Use the earlier pin-project version in deny.toml

* Change deny.toml instructions to check for updated versions

* Remove trailing whitespace
2022-09-05 20:12:52 +00:00
Alfredo Garcia 5dd3a6ca1a
fix doc render (#5038) 2022-09-02 08:55:37 +00:00
teor edd32a7320
doc(ci): Explain how to resolve duplicate dependency warnings (#5017)
* Explain how to resolve duplicate dependency warnings

* Explain why the errors happen and add the CI job name

* Add extra steps

* Add some examples, tools, and extra steps
2022-09-01 19:13:23 +00:00
Marek c322533125
v1.0.0-beta.14-release (#5006)
* Bump crate versions

* Bump `USER_AGENT`

* Update `README.md`

* Update `install.md`

* Update `CHANGELOG.md`

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Apply a suggestion from code review

Co-authored-by: teor <teor@riseup.net>

* Move the "Networking" section above "Tests"

* Merge PRs that update checkpoints

* Refactor `CHANGELOG.md`

* Add missing PRs to `CHANGELOG.md`

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2022-08-31 22:00:46 +00:00
teor 09420d57be
fix(ci): Update mainnet and testnet checkpoints (#4972)
* Update mainnet and testnet checkpoints

* Add instructions for resolving CI sync timeouts

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-29 02:45:13 +00:00
Gustavo Valverde 8227dabe56
ci(build): deploy long running node instances on release (#4939)
* feat(build): deploy long running instances on release

Previous behavior:
Each time we merged to main new nodes would be deployed, this is an
expected behavior as we need to ensure nodes get deployed and run
without issues, but this could also replace nodes very hastily.

Expected behavior:
We want instances which would run for a longer time, to allow us to
troubleshoot issues or inspect the behavior of this instances for longer
periods of time (2+ weeks)

Applied solution:
Deploy a versioned manage instance group (MiG) using the major version
of the release semver. We just use the first part of the version to
replace old instances, and change it when a major version is released
to keep a segregation between new and old versions.

* ci(build): allow v0 as a major version tag

* fix(build): use rust conventions for versioning

* fix(deploy): improve documentation and trigger on release

* Update .github/workflows/continous-delivery.yml

Co-authored-by: teor <teor@riseup.net>

* fix(versioning): typo

* fix(deploy): use `zebrad-v1` as the instance name, with no SHA

* fix(deploy): create and update MiG must use the same name

* docs(deployments): add Continuous Delivery process

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-08-28 12:46:21 +00:00
teor 0a39011b88
fix(ci): Write cached state images after update syncs, and use the latest image from any commit (#4949)
* Save cached state on full syncs and updates

* Add an -update suffix to CI images created by updating cached state

* Make disk image names unique by adding a time suffix

* Use the latest image from any branch, but prefer the current commit if available

* Document Zebra's continuous integration tests

* Fix typos in environmental variable names

* Expand documentation

* Fix variable name typo

* Fix shell syntax
2022-08-25 13:09:20 +00:00
Alfredo Garcia 61f363947e
Release Zebra to 1.0.0-beta.13 (#4765)
* update zebra to 1.0.0-beta.13

* add changelog

* update the release date

* Update changelog for cryptographic batch PRs

* Add `bitvec` to the changelog

* Update CHANGELOG.md

* Add zebra-network fix and tokio version bump

* Recommend that users update their rust compiler

* Update disk and network usage for recent large blocks

* Fix spacing

* Add disk and network usage update to README

* apply size suggestions

Co-authored-by: teor <teor@riseup.net>

* add known performance issues

* update changelog

* change release date

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-07-30 20:20:43 +00:00
teor f9d7451fa2
Fix up links in some tracing docs (#4748)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-07-22 16:32:56 +00:00
Gustavo Valverde 4257f60265
docs(release): add support Tiers and supported platforms per Tier (#4773)
* docs: include target tier policies

This documentation is based on Rust supported platforms and tiers, and adapted to Zebra

* docs: add supported platforms by Tier

* docs(release): remove references to use RFCs

* docs(release): adapt teams to ZFND reality

* docs(release): remove text that might generate confusion

* docs(release): refactor general wording to our needs

* docs(release): update wording in supported platforms

* docs: clarify we're not having build artifacts for Tier 2

* docs: remove stub requirements

* docs: tidy up

* docs: last fixes

* docs(platforms): improve overall documentation

* docs: remove legal language

* docs: rewording tier 3 summary

* Update book/src/user/supported-platforms.md

Co-authored-by: teor <teor@riseup.net>

* docs: remove reference to core engineering team

* fix(docs): make rust version a separate column

* tiny fix

* If a supported platform isn't pinned to a specific release, link to the latest release

* Add space for readability

* Clarify some phrasing

* Remove Rust-compiler specific language, replace with consensus rules and features

* Update book/src/user/supported-platforms.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/user/target-tier-policies.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/user/target-tier-policies.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/user/target-tier-policies.md

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2022-07-22 12:23:10 -04:00
Andrew Arnott 766dd9357b
Fix walled -> walletd types (#4746) 2022-07-04 22:17:44 +00:00
Marek 32faa94fb4
fix(state): Update column family names to match Zebra's database design (#4639)
* Rename `block_by_height` to `block_header_by_height` in fin state

* Rename `tx_by_hash` to `tx_loc_by_hash` in both (non & fin) states

* Rename `utxo_by_outpoint` to `utxo_by_out_loc` in finalized state

* Reorder the column families so that they match the docs

* Update `struct Chain` in the RFCs

* Increment `DATABASE_FORMAT_VERSION` to 25

* Remove obsolete docs from `0004-asynchronous-script-verification.md`

* Remove an obsolete `TODO` from `disk_db.rs`

* Delete unused snapshots

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-30 23:00:23 +00:00
teor 9e277ed91a
Release Zebra 1.0.0-beta.12 (#4714)
* Update Zebra to 1.0.0-beta.12

* Simplify tower-* versioning by updating both to 0.2.27

* Simplify version search and replace by removing an old version from the docs

* Update Cargo.lock

* Add draft changelog as of PR #4693

* Update CHANGELOG to PR #4680
2022-06-29 17:14:16 +00:00
Deirdre Connolly 21af125bfa
doc: add tokio-console page in book dev section (#4641)
* doc: add tokio-console page in dev section

* Add screenshot

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-21 03:38:12 +00:00
teor 29e73b3f3e
breaking(diagnostics): make zebrad diagnostics into optional compile-time features (#4539)
* Disable the flamegraph feature by default at compile time

* Disable the journald feature by default at compile time

* Also disable inferno dependency, and rearrange features

* Disable the prometheus feature by default at compile time

* Disable the tracing filter reload feature by default at compile time

* Disable tests when corresponding features are disabled

* Add compile-time tracing features to user docs

* Add compile-time features to the metrics user docs

* Document diagnostics as part of the start command tasks and services

* breaking(diagnostics): rename "enable-sentry" feature to "sentry" (#4623)

* Also skip conflict tests when those ports are disabled

* breaking(diagnostics): rename "enable-sentry" feature to "sentry"

This is mostly:
```sh
fastmod enable-sentry sentry
```

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-16 19:56:40 +00:00
Alfredo Garcia 5ed56b551b
docs(lightwalletd): tutorial fixes (#4566)
* fix flag

Co-authored-by: Andrew Arnott <Andrew.arnott@Microsoft.com>

* remove zebra from zcash.conf path

Co-authored-by: Andrew Arnott <Andrew.arnott@Microsoft.com>

* update the implementation of lightwalletd

Co-authored-by: Andrew Arnott <Andrew.arnott@Microsoft.com>
2022-06-04 00:59:54 +00:00
Marek 0e4c51c431
V1.0.0 beta.11 release (#4567)
* Bump crate versions

* Increment the protocol user agent

* Increment the version in `README.md`

* Increment the version in `install.md`

* Update `README.md`

* Update the changelog

* Increment the versions of crates that depend on other crates

* Update `Cargo.lock`
2022-06-03 22:55:05 +00:00
teor 1230fd41f1
doc(user): Explain what Zebra does when it starts up (#4502)
* Explain what Zebra does when it starts up

* Put some tasks into sub-sections

* Add non-zero progress log line

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Explain DNS seeder

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2022-06-02 00:02:55 +00:00
Alfredo Garcia 2486925e88
docs(lightwalletd): add a lightwalletd tutorial (#4526)
* add a lightwalletd tutorial

* apply simplifications

Co-authored-by: teor <teor@riseup.net>

* change `zebra.toml` location

* update go installation

* remove optional config sections

* remove nginx section

* use another location for `lightwalletd` binary

* change `lightwalletd` start command

* typo

* change sentence

* improve run the wallet command

* remove space

Co-authored-by: teor <teor@riseup.net>
2022-06-01 23:13:18 +00:00
Alfredo Garcia 8150a720ca
release: bump versions and create changelog entry for `v1.0.0-beta.10` (#4430)
* bump versions

* add the changelog for beta 10

* Update CHANGELOG.md

Co-authored-by: Marek <mail@marek.onl>

* Distinguish CI and Rust dependency updates

* Include all the dep bumps in PR #4405

* join 2 dependencies

* Include incrementalmerkletree dep bump in changelog

Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2022-05-19 19:23:30 +00:00
teor f7a3a0f6bc
fix(build): put gRPC tests behind an optional feature flag to fix production build issues (#4369)
* fix(ci): sentry is not longer being activated in test builds

This removes sentry from all the test execution, as some tests might fail as sentry wasn't initially built, or it might take more time to build as it will have to build with sentry.

* fix(build): workaround the failed to fetch oauth token error

* Drop sentry dependencies when enable-sentry feature is disabled

* Make lightwalletd gRPC tests depend on a new lightwalletd-grpc-tests feature

* fix(ci): remove enable-sentry feature from tests

* Add lightwalletd-grpc-tests feature for functionality or efficiency

And document where it is just used to stop re-compilations.

* Remove redundant `cmake` and `protobuf-compiler` dependencies

* Document Zebra's optional production and test feature flags

* Minimise dependencies in zcash-params/Dockerfile

* Minimise dependencies in docker/Dockerfile

* Add a workflow TODO

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
2022-05-11 14:06:58 +00:00
Conrado Gouvea a3eed2daad
fix(doc): add support for Mermaid to render graphs (#4359) 2022-05-09 20:29:49 +00:00
Conrado Gouvea c190e3027c
v1.0.0-beta.9 release (#4349) 2022-05-09 13:32:53 -03:00
teor 12426fe078
Fix incorrect AddressBalance name in diagram (#4342)
* Fix incorrect AddressLocation size in diagram

* Actually the name is wrong
2022-05-06 11:10:21 -03:00
Conrado Gouvea ff0122044f
change(doc): add transaction index diagram to RFC-0005 (#4330)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-06 03:32:55 +00:00
teor 05440763ac
change(verifier): Update Zebra's block hash checkpoints (#4183)
* Update zebra-checkpoints docs for new default checkpoint config

Also:
- update commands
- link to the spec definition of settled network upgrades

* Update mainnet checkpoints

* Update testnet checkpoints
2022-04-25 14:43:06 +00:00
ebfull 59098b355a
fix(doc): Fix link to run page in installation docs (#4144) 2022-04-20 00:26:34 +00:00
teor 75671c53a2
1.0.0-beta.8 Release (#4135)
* Update changelog for 1.0.0-beta.8

* Bump Zebra crate versions

The tower crates and their dependencies haven't changed,
so their versions don't need to be bumped.

Some Zebra crates haven't changed,
but I bumped all the versions to keep them consistent.

* Explicitly say that we support NU5 testnet 2

* Expand PR #3799 into changelog entries

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-19 13:02:17 +10:00
teor 13c216cd3c
1.0.0-beta.7 Release (#4039)
* Update changelog for v1.0.0-beta.7

* Increment all crate versions

* Remove redundant release test that is now covered by CI

* Remove completed NU5 README check task from the release template

* Add Merge Freeze tool to the release checklist

* Simplify release checklist by removing unused steps
2022-04-05 18:06:46 +00:00
teor b895b8973a
change(rfc): Cleanup transparent address index database design (#4019)
* Rename location-based column families

* Use more consistent terminology for database changes

* Remove AddressLocation from utxo_by_out_loc
2022-04-01 20:40:43 +00:00
teor 98ec995d56
fix(design): update state RFC to put ordered list values in RocksDB keys (#3997)
* Update RFC to use BTreeSets for ordered lists

* Update to put value sets in the rocksdb key

* Clarify some workding

* Update type name
2022-03-30 23:42:09 +00:00
Alfredo Garcia 53bf4c6ba5
1.0.0-beta.6 Release (#3966)
* 1.0.0-beta.6 release version bump

* 1.0.0-beta.6 release update the changelog

* change date of the release

* change description

Co-authored-by: teor <teor@riseup.net>

* remove phrase from description

Co-authored-by: teor <teor@riseup.net>
2022-03-28 22:36:42 +00:00
teor 7d4c92f7d6
fix(doc): Fix bugs in the lightwalletd database design (#3964)
* Re-order column families in design in dependency order

* Minor RFC design tweaks and fixes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-27 22:59:43 +00:00
teor 2b51f9098d
change(doc): Simplify the database design using prefix iterators (#3916)
* Simplify the database design using prefix iterators

* Fix typos and missed changes

Co-authored-by: Marek <mail@marek.onl>

Co-authored-by: Marek <mail@marek.onl>
2022-03-21 22:38:23 +00:00
teor 419770409a
doc(db): update database design for read-only state service (#3843)
* Add a TODO for a history tree concurrent write issue

* Update database design for read-only state service
2022-03-12 00:37:01 +00:00
Conrado Gouvea bbef390944
change(ci): remove Windows support (#3819)
* ci: remove Windows support

* address comments
2022-03-10 10:50:12 +10:00
teor 081cda7990
3. refactor(db): add disk serialization types for transactions (#3741)
* refactor(db): simplify block height serialization

* refactor(db): make height serialization length generic

* refactor(db): create a TransactionIndex type

This changes the names of some snapshot types,
but doesn't change any data.

* refactor(db): create transparent OutputIndex and OutputLocation types

This keeps the same serialization, to avoid changing the database version.

* doc(rfc/db): make transparent database type names consistent

* doc(rfc/db): fix a bug in the Utxo.is_coinbase derivation

* fix(db): use the correct serialized size for OutputLocation
2022-03-09 01:22:00 +00:00
teor 818cb2cdeb
doc(network): explain optional zebra-network/tor dependencies (#3765)
* doc(network): explain optional zebra-network/tor dependencies

* cleanup(doc): remove an extra newline
2022-03-08 09:14:03 +00:00
Marek 2253f0121b
v1.0.0 beta.5 release (#3586)
* Increment the version numbers

* Use the new tag in `README.md` and `install.md`

* Update README.md

* Update CHANGELOG

* Add new PRs to the CHANGELOG
2022-02-21 14:29:34 +00:00
teor ea7253ee5b
fix(rfc): rename some lightwalletd database types (#3567)
* fix(rfc): rename some lightwalletd database types

```
fastmod BlockTransactionCount HeightTransactionCount
fastmod FirstOutLocation TransparentAddrLoc
```

* fix(rfc): make lightwalletd column family names consistent

* feat(rfc): add sub-headings to the RocksDB column family list

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-17 22:41:15 +00:00
teor 763475e9bb
doc(README): update README goals and performance troubleshooting (#3525)
* doc(README): remove completed Zebra goals

* doc(README): docker now uses bullseye

* doc(README): clarify and expand disk requirements

* doc(README): add network latency requirement

Also note extra network usage after database format changes.

* doc(run): de-duplicate README info

* doc(run): speed up Zebra's performance
2022-02-17 00:09:12 +00:00
Janito Vaqueiro Ferreira Filho f6de7faae1
Release v1.0.0 beta.4 (#3403)
* Updating zebra-test to v1.0.0-beta.4

* Updating tower-fallback to v0.2.16

* Updating tower-batch to v0.2.20

* Updating zebra-chain to v1.0.0-beta.4

* Updating zebra-script to v1.0.0-beta.4

* Updating zebra-network to v1.0.0-beta.4

* Updating zebra-state to v1.0.0-beta.4

* Updating zebra-consensus to v1.0.0-beta.4

* Updating zebra-utils to v1.0.0-beta.4

* Updating zebrad to v1.0.0-beta.4

* Update Cargo.lock with updated crate versions

* Add section for 1.0.0-beta.4 in the CHANGELOG

* Update CHANGELOG.md

Co-authored-by: teor <teor@riseup.net>

* Update README.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/user/install.md

Co-authored-by: teor <teor@riseup.net>

* Update release description to mention Rust 2021

Update the changelog to mention that all crates now use Rust 2021
Edition.

* Elaborate on Section 3.6 documentation entry

Add the title of the section and mention that it's a section of the
Zcash protocol specification.

* Make changelog entries consistent

Use the same format for entries related to consensus rule documentation.

Co-authored-by: Marek <mail@marek.onl>

* Update README about validated consensus rules

Zebra now validates all documented consensus rules.

* Add changelog entry for newly merged PR

Describe the security fix in the changelog.

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Marek <mail@marek.onl>
2022-01-26 21:39:41 +00:00
teor 9101e9a815
Revert "Updated utxo_by_outpoint column value type in documentation (#3376)" (#3385)
This reverts commit a007a49489.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-24 19:48:04 +00:00
Janito Vaqueiro Ferreira Filho ebd94b2e60
Fix deadlock in chain tip watch channel (#3378)
* Avoid sequential borrows in `LatestChainTip`

Calling `watch::Receiver::borrow` more than once in the same scope can
cause a deadlock. The instrumented methods were calling `borrow` twice
to record instrumented fields.

This refactors things to ensure `borrow` is only called once to record
the fields and perform any actions with the chain tip block.

* Remove `borrow()` calls in `ChainTipChange`

Refactor to use a `LatestChainTip` instance instead, which safely
protects the internal `watch::Receiver` so that it is not borrowed more
than once in the same scope.

* Add a paragraph to the Asynchronous guide

Warn against using two borrow guards in the same scope, and describe why
that can lead to a deadlock.
2022-01-24 00:36:40 +00:00
Conrado Gouvea a007a49489
Updated utxo_by_outpoint column value type in documentation (#3376) 2022-01-20 19:24:57 +00:00
Conrado Gouvea 4aeabd0b52
Fix interstitial sprout anchors check (#3283)
* Fix interstitial Sprout anchors check

* Update state docs; add sprout_trees_by_anchor to comparisons

* Update book/src/dev/rfcs/0005-state-updates.md

Co-authored-by: Marek <mail@marek.onl>

* Rename `interstitial_roots` to `interstitial_trees`

* Document consensus rules

* Refactor the docs

* Improve the docs for consensus rules

* Update reference to cached state

* Update zebra-state/src/service/check/anchors.rs

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

* Fix formatting

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-18 20:18:49 +00:00
teor 361125079e
Draft design for lightwalletd database support (#3137)
* Draft design for lightwalletd database support

* Explain how to create blocks from headers and transactions

* Make keys smaller to improve database performance

* Support transparent address balances and UTXOs

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-12-22 06:09:53 +00:00
Conrado Gouvea a5713da0af
Release Zebra v1.0.0-beta.3 (#3256)
* Release Zebra v1.0.0-beta.3

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Bump date

* Add recently merged entry to changelog

* Bump date, add recent merged PR to changelog

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2021-12-21 19:42:39 -03:00
teor 6814525a7a
Update async correctness docs and the async in Zebra RFC (#3243)
* Justify that the ErrorSlot Mutex is deadlock-safe

* Document cancellation safety in the async RFC

* Document task starvation in the async RFC

Co-authored-by: Marek <mail@marek.onl>
2021-12-21 07:10:15 +00:00
teor 62c78ad939
Update the State RFC to match the current database format (#3139)
* Update the State RFC to match the current database format

* Formatting and name fixes

* Remove redundant generic parameter

* Remove redundant generics

* Fix history tree types

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Fix spacing

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2021-12-10 13:35:35 +00:00
Pili Guerra 26b3a50e01
Updates for zebra v1.0.0-beta.1 release (#3073)
* Update versions for zebra v1.0.0-beta.1 release

* Adding original PR list for comparison and tracking as PRs merge

* First pass at categorising changes

* Merge and clarify description of related changes

* Remove or merge trivial changes

* Improve change descriptions

* Add new PRs merged

* CHANGELOG: Improve release summary

* CHANGELOG: categorise changes further

* README: Remove resolved issues and items

* Update CHANGELOG.md

Co-authored-by: teor <teor@riseup.net>

* CHANGELOG: Add new PRs merged

* CHANGELOG: Move change category

* CHANGELOG: Update release date ready for tagging

Co-authored-by: teor <teor@riseup.net>
2021-11-19 13:05:11 +01:00
Dimitris Apostolou afb8b3d477
Fix typos (#3055)
Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-11-12 19:30:22 +00:00
teor 01e63da3fe
Create CompactSize64 for non-message-length fields (#3008)
* Add CompactSize64 and CompactSizeMessage types

But don't remove read_compactsize and write_compactsize yet.

* Fix CompactSize capitalisation

```sh
fastmod compactSize CompactSize zebra* book
fastmod compactsize CompactSize zebra* book
```

* Make CompactSize patterns consistent with integer lengths

* Replace unwrap_err with asserting is_err

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

* Replace a panic with an assertion

* Make generic serialization use CompactSizeMessage

* Fix type inference and borrow-checker errors

* Doctest fixes

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-11-04 15:57:30 +00:00
Conrado Gouvea e54917ae7c
V1.0.0-beta.0 (#2973)
* V1.0.0-beta.0

* Bump version in install.md
2021-10-29 20:21:26 +00:00
Conrado Gouvea 4367b232fc
Improve documentation for Beta release (#2894)
* Improve documentation

* Incorporate text about Zebra from the last newsletter

* Organize README and user docs

* Add table of contents, organize heading levels

* Fix link

* capitalize list items

* fix table of contents

* format spacing issue

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-10-29 19:25:30 +00:00
Marek 86d05c5e90
Update the documentation for value pools (#2919)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-10-21 20:30:11 +00:00
Deirdre Connolly 5afefd55bf
Specify Zebra Client will only support Unifed Addresses (#2706) 2021-08-30 22:40:07 +00:00
Marek 985747861e
Refactor Zebra metrics docs (#2687)
* Refactor Zebra metrics docs

* Refactor Zebra metrics docs

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-08-27 20:11:36 +00:00
Conrado Gouvea a4b0b46d21
Describe how to import a Grafana dashboard (#2678) 2021-08-26 18:34:17 +02:00
Marek bacc0f3bbf
Fix a typo in metrics.md (#2658) 2021-08-23 13:56:58 +01:00
teor a1cec27871
Update the signs in the value pools design to match the spec (#2576)
* Update the signs in the value pools design to match the spec

Also split the definitions and guide sections into transaction value balances
and chain value pools. And explain the sign differences between them in terms of
inputs and outputs.

* fix typo

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-08-06 22:00:02 +00:00
teor 7218aec19f
Design: Fix Transparent Value Sign and Definition (#2555)
* Design: Fix Transparent Value Sign and Definition

* make the transparent value pool the sum of unspent output values, like other pools
* swap the sign of the transparent value balance
* make the remaining transaction value balance the sum of unspent input values
* update the consensus rules based on recent spec changes
* explain why the transparent chain value pool balance can't be negative
* clarify the guide and consensus rules sections

* Use consistent notation for sprout value balances

* Fix typos

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2021-08-02 23:52:21 +00:00
Alfredo Garcia fba8a63912
Add value pools design to book summary (#2520)
* add value pools design to book summary
2021-07-23 14:49:47 +01:00
teor ccf93cf5c6
Update state RFC for incremental trees, value pools, and RocksDB (#2456)
* Update state RFC for double-spends and other recent designs

* Update the value pool column family name

* Mark incremental note commitment trees as tentative

* Change history tree type

* Apply suggestions from code review
2021-07-12 10:33:02 -03:00
Alfredo Garcia d1ab8a8946
Value pools design (#2430)
* add a draft for value pools design

* add some `ValueBalance` operators

* add `value_balance` methods to modules

* fix some minors

* finalize the last part of the implementation design

* replace wrong AllowNegative with correct NegativeAllowed

* add design PR to header

* update scope

* remove details from transaction `value_balance()`

* update definitions

* change method name

* return Result in operators

* fix the TODOs

* implement `UpdateWith<PreparedBlock>` for `ValueBalance`

* add details to `ValueBalance` serialization

* add a panic to block value balance

* fix `remaining_transaction_value()`

* add the block value balance into `FinalizedState`

* populate the `Chain` with the finalized tip value balance

* remove redundant text from definition

* add docs to `Chain` field

* trigger the `remaining_transaction_value()` check

* fix mistake

* add some tests, remove some not needed sections

* add a summary of the implementation

* do some minor fixes to consensus rules text

* clarify some names

* fix `UpdateWith`

* move the remaining transaction value consensus rule

* fix serialization bug

* fix typo

* Add a missing test

* typo

Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
2021-07-09 09:53:14 +10:00
teor 0be7470601
Modify UTXO and state designs for transparent coinbase output checks (#2413)
* Modify UTXO and state designs for transparent coinbase output checks

* Add missing word

* Clarify unspent transparent transaction outputs

And add a definition for OutPoint

* Fix coinbase flag derivation

* Rename SpendPools to SpendRestriction

* Replace coinbase_height with Coinbase.height

And clarify a height to spend_height

* Make block height italic to match spec formatting

* Provide a value for MIN_TRANSPARENT_COINBASE_MATURITY

* Add new v1-4 transaction ID consensus rule

* Make the design match the existing Utxo code

This minimises the changes we'll need to make.

* Add a justification for parallel coinbase verification

* Change to Response::SpendableUtxo

To avoid confusion.

* Update the state RFC to match the current design

* Move a change to another PR to avoid conflicts

* Fix spacing

* Clarify the future returned by `PendingUtxos::queue(u)`

* Add missing PendingUtxos::queue arguments
2021-07-09 07:11:43 +10:00
Deirdre Connolly 06eddf7fb3
Add notes about note commitment trees storage (#2259)
* Add notes about note commitment trees storage

* Updates

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

* Update book/src/dev/rfcs/drafts/0005-treestate.md

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2021-07-02 02:52:19 -04:00
Deirdre Connolly e7b4abcbad
Add a note about maybe using the tui crate for zebra-cli (#2367) 2021-06-23 08:12:07 +10:00
teor 30b3212261 Reference Zebra ticket 2021-06-18 14:45:18 -04:00
teor f15aa52751 Client RFC: add BlazeSync and cap-std 2021-06-18 14:45:18 -04:00
Alfredo Garcia 3dcd407d66
Security: Stop panicking on invalid reserved orchard::Flags bits (#2284)
* stop panicking in deserialize orchard flags

* make the test simpler

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-06-15 10:04:18 +10:00
teor 71c10af7d9
RFC: Add portability risk for atomics (#2269) 2021-06-11 12:22:59 +10:00
teor b07b825286
RFC: add more background to atomics (#2260)
* RFC: add more background to atomics

- Provide explicit tested alternatives to atomics
- Explain the differences between x86 and other processors

* Add nomicon link and further explanation
2021-06-08 18:08:41 -03:00
teor 3d2fb1c13e
Update GitHub and RFC templates based on retrospectives (#2242)
Updates:
- GitHub Issue templates
- GitHub PR templates
- RFC template

Focusing on:
- consensus rule / network reference sections
- design sections
- review/test checklist

Process changes:
- add new team members to RFC approval
- change RFC approval to "most of the team"

And general cleanup:
- delete docs from the checklist, because we now `warn(missing_docs)`
- shorter explanations
- consistent headings
- consistent order
- consistent formatting
2021-06-04 14:40:53 +10:00
teor 2f0f379a9e
Standardise clippy lints and require docs (#2238)
* Standardise lints across Zebra crates, and add missing docs

The only remaining module with missing docs is `zebra_test::command`

* Todo -> TODO

* Clarify what a transcript ErrorChecker does

Also change `Error` -> `BoxError`

* TransError -> ExpectedTranscriptError

* Output Descriptions -> Output descriptions
2021-06-04 08:48:40 +10:00
Alfredo Garcia a9fe0d9d3e
Make sure the mandatory checkpoint includes Canopy activation (#2235)
* Make sure the Canopy activation block is a finalized checkpoint block

This enables ZIP-221 chain history from Canopy activation onwards.

* Clarify that the mandatory checkpoint test includes Canopy activation

The test was correct, but the docs and assertion message did not include activation.

* Document that the mandatory checkpoint includes Canopy activation

Co-authored-by: teor <teor@riseup.net>
2021-06-03 10:24:08 +10:00
Alfredo Garcia 1685611592
Store orchard nullifiers into the state (#2185)
* add nullifier methods to orchard
* store orchard nullifiers
* bump database version
* update `IntoDisk`
* support V5 in `UpdateWith`
* add a test for finalized state
* Use the latest network upgrade in state proptests
2021-06-01 17:53:13 +10:00
Conrado Gouvea f222bf94ea
Update Zebra Book TOC (#2124) 2021-05-07 10:50:51 -03:00
teor 328f343515
RFC: add tokio-console/TurboWish prototype (#2111) 2021-05-06 09:59:29 +10:00
teor 74fd2a65fe
Rename feature to match RFC filename 2021-05-04 10:20:52 +10:00
teor 6f2dbd9de8
Async in Zebra RFC (#1965)
* Initial async RFC version

* Add a table of contents

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Add a toc anchor

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Add some words that need definitions

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Write guide intro based on feedback
* Add a code example for each reference section
* Link to code examples using commit hashes
* Link to PR and commit for each code example

* Fix typos

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

* Remove redundant version in docs.rs link

* Link the guide to the reference

And expand the guide descriptions

* Mention TurboWish as a future diagnostic tool
* Add an example of a compiler error that prevents deadlock

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-05-03 21:00:49 -03:00
teor 0793c903b4
Clarify that orchard::ShieldedData has an orchard::tree::Root 2021-05-04 05:51:26 +10:00
Alfredo Garcia a63c2e8c40 Update book/src/dev/proptests.md
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2021-04-29 18:29:53 -04:00
teor 661a8d57dc Explain how to derive arbitrary impls 2021-04-29 18:29:53 -04:00
teor 4b948e67a7
Add extra crate dependencies to the proptest docs (#2071) 2021-04-27 09:42:22 -03:00
teor 3377a486c6 Document how Zebra does cross-crate proptests 2021-04-26 14:07:04 -04:00
Kirill Fomichev 5b2f1cdfd5
Add journald support through tracing-journald (#2034)
* Add journald support through tracing-journald

* change journald to use_journald

* more fixes
2021-04-22 09:31:06 +10:00
teor 53779d2a3c
Redesign Sapling data model for V5 shared anchor and spends (#2021)
* Redesign Sapling data model for V5 shared anchor and spends

The shared anchor is only present if there are any spends.

As part of this change, delete the manual PartialEq impl and its tests,
because we can derive PartialEq now.

* Stop creating a temporary Vec for the spend and output iterators

* Rename TransferData variants

Interactive rename using the following commands:
```sh
fastmod Spends SpendsAndMaybeOutputs
fastmod NoSpends JustOutputs
```

* Refactor out common sprout nullifier code

* Implement the AtLeastOne constrained vector type

This vector wrapper ensures that it always contains at least one element.

* Simplify Sapling TransferData using AtLeastOne

Also update the RFC to use AtLeastOne for Orchard.
2021-04-20 16:22:25 +10:00
Alfredo Garcia e42442d48b
Redesign Transaction V5 serialization, impl trusted vector security, nullifier utility functions (#1996)
* add sapling shielded data to transaction V5

* implement nullifiers

* test v5 in shielded_data_roundtrip

* Explicitly design serialization for Transaction V5

Implement serialization for V4 and V5 spends and outputs, to make sure
that the design works.

* Test serialization for v5 spends and outputs

Also add a few missing v4 tests.

* Delete a disabled proptest

* Make v5 transactions a top-level heading

And add a missing serialized type.

* Fix a comment typo

* v5 transaction RFC: split array serialization

Based on #2017

* RFC: explicitly describe serialized field order

And link to the spec

* RFC: add the shared anchor serialization rule test

Co-authored-by: teor <teor@riseup.net>
2021-04-16 08:19:28 +10:00
Deirdre Connolly 370d0480b4
Merge pull request #983 from ZcashFoundation/treestate-design
Draft RFC: Treestate management
2021-04-15 13:39:34 -04:00
teor 418575458e
Rename the () placeholder to FieldNotPresent (#1987)
* Rename the () placeholder to FieldNotPresent

* Use a unit struct

* Update the RFC
2021-04-07 09:34:58 -03:00
teor 109ca4db86 Zebra Client RFC: add mandatory sweep fast startup option
A mandatory sweep would help `zebra-client` match `zebrad`'s
blazingly fast speeds.
2021-04-01 07:41:10 -04:00
Alfredo Garcia 1302ffe0a1
Draft RFC: Block subsidy (#1129)
* create block subsidy rfc
* add reference in miner subsidy

* remove `or 0` from function descriptions.

It is clear from the signature that the function will return `Error` on any failure(including input errors, for example a wrong height). Describing this will force us to write it for all functions that returns an error so better remove it.

* add links to subsidy categories
* fix design in Funding streams parameter constants
* fix order in FUNDING_STREAM_RECEIVER_NUMERATORS
* return `PayToScriptHash` in `funding_stream_address`
* add shielded coinbase

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>

* improve  transparent value pool section
* add a test plan section
* rename `subsidy_is_correct` to `subsidy_is_valid`
* add funding streams address constants
* fix funding stream addresses
* add errors
* remove ending dot for  error descriptions

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

* modify founders reward
* change ECC to BP
* add note about state needed for transparent pool
* split constants
* Tweak block subsidy RFC wording

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

* Clarify transaction fees definition
* Use consistent fee terminology
* Clarify transparent value pool
* Revise implementation plan based on latest priorities
* Change tests based on new priorities
* Fix markdown

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* Fix value pool description
* change block and miner subsidy definitions
* fee pool definitions, fix all links to protocol
* add reference to zip209
* add note for MG stream number of addresses

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2021-03-30 16:25:41 +10:00
Henry de Valence 0e5a6d7efd
RFC: Release process (#1063)
* rfc: initial draft of release process proposal

This is a version of the notes I posted in slack for preliminary
discussion, slightly reformatted to fit the Zebra RFC template.

@yaahc suggested I post them as an RFC, to have a concrete proposal for
discussion.

* Add draft note and link to ticket and PR

Co-authored-by: teor <teor@riseup.net>
2021-03-30 15:55:23 +10:00
teor 258bd881aa
Draft RFC: Initial draft for basic network integration testing (#1007)
* Initial draft for basic integration testing
* Update draft, comment out template
2021-03-30 15:44:57 +10:00
Henry de Valence 73708eebff
RFC: Transaction diffusion with isolated, minimally-distinguishable Tor connections (Stolon) (#1006)
* stolon: Initial RFC draft.
* rfc: add spec of minimally-distinguished handshake
* Add ticket references and a draft note

Co-authored-by: teor <teor@riseup.net>
2021-03-30 15:33:08 +10:00
teor 0562fa7e23
Clarify anchor names (#1955)
When we're naming the anchors without the corresponding type or struct,
it's not clear if they are shared or per spend.

Rename the fields as `shared_anchor` or `per_spend_anchor`.
2021-03-30 09:22:07 +10: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
teor 9da220517b Update docs for Sapling to Canopy checkpoint change 2021-03-18 10:13:47 +10:00
Alfredo Garcia a292cbe611 change the mandatory checkpoint to Canopy 2021-03-18 10:13:47 +10:00