Commit Graph

4747 Commits

Author SHA1 Message Date
dependabot[bot] c1695c35e2
build(deps): bump serde_json from 1.0.99 to 1.0.100 (#7149)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.99...v1.0.100)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 23:23:24 +00:00
dependabot[bot] d73941c91f
build(deps): bump vergen from 8.2.3 to 8.2.4 (#7163)
Bumps [vergen](https://github.com/rustyhorde/vergen) from 8.2.3 to 8.2.4.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/8.2.3...8.2.4)

---
updated-dependencies:
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 21:00:00 +00:00
dependabot[bot] 2492648b5f
build(deps): bump toml from 0.7.5 to 0.7.6 (#7164)
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.5 to 0.7.6.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.5...toml-v0.7.6)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 18:01:29 +00:00
Arya 77ad91ced4
fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029)
* Adds most_recent_by_ip field to address book

* adds test

* Apply suggestions from code review

* fixes lint

* Updates most_recent_by_ip in .take()

Updates should_update_most_recent_by_ip() and has_active_peer_with_ip to check last_attempt and last_failure times

Renames has_active_peer_with_ip

* Documents that Zebra will not initiate more than 1 outbound connections per IP

* Fixes is_ready_for_connection_attempt_with_ip

Adds test coverage for AttemptPending and Failed

Fixes new_outbound_peer_connections_are_rate_limited proptest

* Applies suggestions from code review.

* Applies suggestions from code review

* Always return true from `is_ready_for_connection_attempt_with_ip` if max_connections_per_ip != 0

* Update max_connections_per_ip config docs

* Warn about invalid config fields and use default values

* Ignores last_attempt and last_failure in is_ready_for_connection_attempt_with_ip

updates test

* Only update most_recent_by_ip if update.last_conn_state is responded.

* Apply suggestions from code review

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

* fixes lint

* Update zebra-network/src/address_book.rs

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

* Apply suggestions from code review

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

* Fix Rust syntax

* Fix whitespace

---------

Co-authored-by: teor <teor@riseup.net>
2023-07-06 05:54:10 +00:00
teor 83c459d8ab
Add extra patch job to continous-integration-os.patch.yml (#7086) 2023-07-06 01:04:45 +00:00
teor 9df78ffdba
change(tests): Do round-trip tests for note commitment tree data structure and RPC serialisation (#7147)
* Add an assert_frontier_eq() method to note commitment trees for tests

* Check round-trip serialization for note commitment trees

* fix typos

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-07-06 01:04:28 +00:00
Marek 00dd110265
Use standard syntax for Dockerfile ENV instruction (#7155) 2023-07-05 23:01:22 +00:00
dependabot[bot] ea41dcbbac
build(deps): bump clap from 4.3.10 to 4.3.11 (#7150)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.10 to 4.3.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.10...v4.3.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 20:53:41 +00:00
dependabot[bot] 730b10a278
build(deps): bump thiserror from 1.0.40 to 1.0.41 (#7153)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.40...1.0.41)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 20:53:05 +00:00
dependabot[bot] 9cff85d1a4
build(deps): bump tj-actions/changed-files from 37.0.4 to 37.0.5 (#7117)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 37.0.4 to 37.0.5.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v37.0.4...v37.0.5)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 20:52:34 +00:00
dependabot[bot] c8d411017d
build(deps): bump console-subscriber from 0.1.9 to 0.1.10 (#7140)
Bumps [console-subscriber](https://github.com/tokio-rs/console) from 0.1.9 to 0.1.10.
- [Release notes](https://github.com/tokio-rs/console/releases)
- [Commits](https://github.com/tokio-rs/console/compare/console-subscriber-v0.1.9...console-subscriber-v0.1.10)

---
updated-dependencies:
- dependency-name: console-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 20:51:56 +00:00
Arya 7e7ce2ba71
fix(commands): Require an argument name before the list of tracing filters when used without a subcommand (#7056)
* require flag for tracing filters when subcmd is omitted.

* Fixes test, updates Changelog

* Adds code comment

* Apply suggestions from code review

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

---------

Co-authored-by: teor <teor@riseup.net>
2023-07-05 09:28:05 +00:00
teor 147b8fa3a8
cleanup(rust): Fix new nightly clippy warnings (#7135)
* Fix "comparison is always true" warning

* Add missing Send bound

* cargo clippy --fix --all-features --all-targets

* incorrect implementation of clone on a Copy type

* cargo fmt --all
2023-07-05 07:11:27 +00:00
teor f2a2a403a8
fix(log): Remove redundant startup logs, fix progress bar number, order, and wording (#7087)
* Remove duplicate "running" message, send log file opening logs to stderr

* Add missing block progress bar desc, make them consistent

* Put progress bars in a specific order in each section

* Actually make block progress bar desc consistent

* Make progress bar order even more consistent

* Fix fork blocks plural for 1 block

* Use the correct number of chain fork bars

* Disable confusing partial work display

* Add struct field category comments

* Silence a verbose inventory log
2023-07-05 07:08:59 +00:00
dependabot[bot] 5598d1a72b
build(deps): bump pin-project from 1.1.0 to 1.1.2 (#7127)
Bumps [pin-project](https://github.com/taiki-e/pin-project) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/taiki-e/pin-project/releases)
- [Changelog](https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: pin-project
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 07:08:31 +00:00
dependabot[bot] 522390bcc2
build(deps): bump clap from 4.3.8 to 4.3.10 (#7115)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.8 to 4.3.10.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.8...v4.3.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 05:00:48 +00:00
dependabot[bot] 8fed1823af
build(deps): bump rlimit from 0.9.1 to 0.10.0 (#7139)
Bumps [rlimit](https://github.com/Nugine/rlimit) from 0.9.1 to 0.10.0.
- [Changelog](https://github.com/Nugine/rlimit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Nugine/rlimit/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: rlimit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 02:09:57 +00:00
dependabot[bot] b50252d70c
build(deps): bump Swatinem/rust-cache from 2.5.0 to 2.5.1 (#7138)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.5.0...v2.5.1)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 02:09:45 +00:00
Alfredo Garcia 5859fac5b1
docs(state): Use different terms for block verification and state queues (#7061)
* claridy some checkpoint verifier docs

* update documentation of `Request::CommitSemanticallyVerifiedBlock` and `Request::CommitCheckpointVerifiedBlock`

* replace `prepared` with `semantically_verified` in state service checks code

* replace `non-finalized` where needed in docs of the state service

* fix double space in doc

* replace `finalized` where needed in docs of the state service

* change some docs in state queued_blocks.rs

* Rewrite pending UTXO checkpoint block comment

* Fix trailing space in docs

* Apply suggestions from code review

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

---------

Co-authored-by: teor <teor@riseup.net>
2023-07-04 21:29:41 +00:00
teor 9b32ab7878
change(release): Update release script and check it in CI (#7128)
* Activate production features on docs.rs

* Make version requirements more flexible to work around unpublished versions

* Remove a redundant feature requirement that causes publishing issues

* fix release auto-replacement format

* cargo release replace --verbose --execute --package zebrad

* Add a missing 1.0.1 changelog entry

* Fix incorrect commands in the release checklist

* Check the crates.io release script in CI, to avoid release failures

* Fix release date in changelog

* Fix workflow typo

* Add --no-confirm to the workflow

* Fix outdated version in release check command

* After the release, add a "remove do-not-merge" step

* Set git identity before committing

* Don't overwrite tweaked versions on upgrade

* cargo release version doesn't support --dependent-version

* Update the same commands in the release checklist

* Commit to git after each change

* And in the checklist

* Add cargo release config

* In CI, allow any branch and provide a fake previous tag name

* Remove redundant `cargo release commit`

* Use a simpler release version process

* Start simplifying the release dry run in CI

* Fix a cargo dependency lint

* just skip the failing crates for now

* Fix the release checklist to match CI

* Use the latest versions of all Zebra dependencies
2023-07-04 19:01:11 +00:00
dependabot[bot] 6ec0c66aa6
build(deps): bump serde from 1.0.164 to 1.0.166 (#7134)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.164 to 1.0.166.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.166)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 16:53:54 +00:00
dependabot[bot] 3d32cbd718
build(deps): bump vergen from 8.2.1 to 8.2.3 (#7130)
Bumps [vergen](https://github.com/rustyhorde/vergen) from 8.2.1 to 8.2.3.
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/8.2.1...8.2.3)

---
updated-dependencies:
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 16:53:33 +00:00
dependabot[bot] 4713994e64
build(deps): bump metrics from 0.21.0 to 0.21.1 (#7131)
Bumps [metrics](https://github.com/metrics-rs/metrics) from 0.21.0 to 0.21.1.
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-v0.21.0...metrics-v0.21.1)

---
updated-dependencies:
- dependency-name: metrics
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 23:23:33 +00:00
dependabot[bot] a8e71b3429
build(deps): bump tokio from 1.29.0 to 1.29.1 (#7114)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.29.0 to 1.29.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.29.0...tokio-1.29.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 05:39:10 +00:00
Alfredo Garcia 55d58edb8f
fix(docs): Add a few more details to metrics book page (#7096)
* Add some more info to metrics.md

* add image
2023-07-03 05:38:56 +00:00
teor 2add0e50a9
Release Zebra v1.0.1 (#7090)
* Update license description in README for MIT-only crates

* Draft changelog with trivial issues

* Remove trivial issues

* Update changelog entries as of commit 2a31972 and PR #7103

* Update mainnet and testnet checkpoints as of 2023-06-30

* chore: Release

* Estimate release height for Zebra v1.0.1

Block height 2139118 at 2023-06-30 01:55:38 UTC
Release is likely to be 2023-07-01
2139118 + 1152 * 3 = 2142574

Then round up to the nearest 1000.
2023-07-02 23:08:40 +00:00
teor e6c3b87872
Stop panicking on shutdown in the syncer and network init (#7104) 2023-07-02 20:08:11 +00:00
teor 322cbec817
fix(hang): Stop blocking some Zebra futures for up to a minute using a CPU busy-loop, Credit: Ziggurat Team (#6763), james_katz (#7000) (#7103)
* Stop busy-waiting in a Future for 45 seconds every minute

* Use the correct elapsed time calculation

* Add some TODOs for making the structure of the loop and wait times clearer
2023-06-30 16:58:05 +00:00
dependabot[bot] 5eea111922
build(deps): bump tokio from 1.28.2 to 1.29.0 (#7094)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.28.2 to 1.29.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.2...tokio-1.29.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-30 02:58:00 +00:00
dependabot[bot] 2a3197221e
build(deps): bump num_cpus from 1.15.0 to 1.16.0 (#7106)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 23:19:25 +00:00
teor aa8489373e
Use release images for zcash-params downloads (#7097) 2023-06-29 20:19:15 +00:00
Alfredo Garcia 455779c833
build(deps): Bump indexmap, toml and serde_json (#7100)
* bump toml, indexmap and serde_json all together

* add duplicated indexmap dep to deny.toml
2023-06-29 20:18:52 +00:00
teor 256e4cd2ce
Use a heart image with a compatible licence (#7102) 2023-06-29 16:01:51 +00:00
dependabot[bot] a6731d16f6
build(deps): bump bitflags from 2.3.2 to 2.3.3 (#7083)
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.3.2...2.3.3)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 01:28:00 +00:00
dependabot[bot] 560d5f7de9
build(deps): bump tj-actions/changed-files from 37.0.3 to 37.0.4 (#7092)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 37.0.3 to 37.0.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v37.0.3...v37.0.4)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 20:46:27 +00:00
Conrado Gouvea 6ab451c660
make logo fit 80 columns (#7095) 2023-06-28 20:07:30 +00:00
teor 9112aa43d0
change(release): Split release checklist into a ticket and PR template (#7088)
* Split release checklist into a ticket and PR template

* Fix quoting
2023-06-28 09:46:59 +00:00
Gustavo Valverde 8c90f65391
refactor(docker): allow more flexible zebra configuration (#7045)
* fix(docker): use `entrypoint.sh` as default for users

* ref(entrypoint): allow more flexible configurations

This changes allow users to:
- Mount their own configuration file
- Allow for Zebra to be exposed outside the container or not
- Allow the user to turn off sync
- Allow to enable `metrics` and `tracing`, exposing them or not

Having the `-x` option prints variable expasions, so we don't have to echo each value.

* chore(docker): remove unused ARGs from the Dockerfile

ARGs are not available at build time, so we don't require this ARGs as their ENV variables counterparts are being set in the `entrypoint`, at runtime.

* revert: keep old naming

* fix: renaming mistake :)

* Apply suggestions from code review

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

* fix(docker): revert some breaking changes

* imp(docker): allow more flexibility with FEATURES config

* chore(docker): remove confusing port on `EXPOSE`

* chore(docker): remove unused command

* fix(docker): handle quotes while building the conf file

---------

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-28 02:36:07 +00:00
teor c2bc799dd9
Use correct name for CD build patch job (#7073) 2023-06-28 02:35:50 +00:00
teor fc9baf92dd
Make CD docker tests more flexible (#7077) 2023-06-28 02:35:20 +00:00
teor 62b4fa21a2
change(docker): Replace the zcash-params Dockerfile build with a zebrad binary copy (#7054)
* Replace the zcash-params Dockerfile build with a zebrad binary copy

* Update zcash-params workflow conditions
2023-06-28 02:34:46 +00:00
dependabot[bot] caf9a0925f
build(deps): bump hyper from 0.14.26 to 0.14.27 (#7082)
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.26 to 0.14.27.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/v0.14.27/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.26...v0.14.27)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 00:29:07 +00:00
teor f8e26347a0
Log a zebra-network task cancel on shutdown, rather than panicking (#7078) 2023-06-27 19:42:04 +00:00
teor 6311cfbfb3
fix(log): Only show the Zebra logo & intro for the `start` command (#7075)
* Only show the intro for the `start` command

* Also disable the log file intro text
2023-06-27 17:38:57 +00:00
teor 5324e5afd2
add(tests): Add snapshot tests for sprout database formats (#7057)
* Add methods for loading entire column families from the database

* Add a method that loads all the sprout trees from the database

* Add snapshot tests for sprout note commitment trees

* Add round-trip proptests for tree root database serialization

* Add a manual sprout note commitment tree database serialization snapshot test

* Add tests for 1,2,4,8 note commitments in a tree

* Remove redundant "rand" package rename in dependencies

* Randomly cache roots rather than only caching even roots

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-27 15:32:30 +00:00
Marek 1f1d04b547
change(state): Refactor the structure of finalizable blocks (#7035)
* Add and use `FinalizableBlock`

This commit adds `FinalizableBlock`, and uses it instead of
`ContextuallyVerifiedBlockWithTrees` in `commit_finalized_direct()`

* Use `ContextuallyVerifiedBlockWithTrees`

This commit passes `ContextuallyVerifiedBlockWithTrees` instead of
passing separate `finalized`, `history_tree` and `note_commitment_trees`
when storing blocks in the finalized state.

* Apply suggestions from code review

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

* add docs to new methods

* fix existing doc

* rename `ContextuallyVerifiedBlockWithTrees` to `SemanticallyVerifiedBlockWithTrees`

* Refactor docs

* Refactor comments

* Add missing docs, fix typo

* Fix rustfmt

---------

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-06-27 08:58:14 +00:00
teor 941be2965c
Replace a chain length assertion with a NotReadyToBeCommitted error (#7072) 2023-06-27 06:50:35 +00:00
Conrado Gouvea 3af03c3971
print a Zebra logo and some text if stderr is terminal (#6945)
* print a Zebra logo and some text in progress bar mode

* add network to printed line, add heart to logo

* print logo and message regardless of progress-bar; document how logo was generated
2023-06-27 03:35:07 +00:00
dependabot[bot] 015a970e16
build(deps): bump tj-actions/changed-files from 36.4.1 to 37.0.3 (#7065)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 36.4.1 to 37.0.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v36.4.1...v37.0.3)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 21:30:10 +00:00
dependabot[bot] a6f35afe37
build(deps): bump clap from 4.3.6 to 4.3.8 (#7066)
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.6 to 4.3.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.6...v4.3.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 19:43:29 +00:00