Commit Graph

5127 Commits

Author SHA1 Message Date
dependabot[bot] 0507670259
build(deps): bump the log-time group with 1 update (#7748)
Bumps the log-time group with 1 update: [tracing](https://github.com/tokio-rs/tracing).

- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.39)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: log-time
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 20:13:38 +00:00
Marek c43142332a
chore: Update checkpoints (#7741)
* Update Testnet checkpoints

* Update Mainnet checkpoints
2023-10-15 23:10:08 +00:00
Marek a3b3c6faaf
Run `cargo update` (#7742) 2023-10-15 23:09:58 +00:00
Marek 1dfebd791f
fix(state): Limit the retrieval of note commitment subtrees (#7734)
* Fix the combining of Sapling subtrees

This commit fixes a bug due to which the function `sapling_subtrees`
used to always include all subtrees from the non-finalized state without
respecting the given limit.

* Fix the combining of Orchard subtrees

This commit fixes a bug due to which the function `orchard_subtrees`
used to always include all subtrees from the non-finalized state without
respecting the given limit.

* Add additional checks when retrieving subtrees

* Allow raw subtree insertions into `Chain` in tests

* Derive `Default` for `Chain`

* Derive `Default` for note commitment tree nodes

* Use `pub(super)` for `DiskWriteBatch`

Set the visibility of `DiskWriteBatch` to `pub(super)`.

* Add tests for retrieving subtrees

* Use `default()` for subtree roots in tests

This change is unrelated to the PR.

* Refactor docs for inserting subtrees

This change is unrelated to the PR.
2023-10-12 20:00:43 +00:00
teor ae52e3d23d
change(ui): Enable the progress bar feature by default, but only show progress bars when the config is enabled (#7615)
* Add a progress bar config that is disabled unless the feature is on

* Simplify the default config

* Enable the progress bar feature by default, but require the config

* Rename progress bars config to avoid merge conflicts

* Use a log file when the progress bar is activated

* Document how to configure progress bars

* Handle log files in config_tests and check config path

* Fix doc link

* Fix path check

* Fix config log matching

* Fix clippy warning

* Add tracing to config tests

* It's zebrad not zebra

* cargo fmt --all

* Update release for config file changes

* Fix config test failures

* Allow printing to stdout in a method
2023-10-12 00:25:37 +00:00
teor 0cffae5dd0
Remove unused dependency exceptions (#7726) 2023-10-11 21:18:02 +00:00
Arya b70556e4b9
fix(devops): Long branch names fail CI because GCP resource name is too long (#7643)
* shorten generate-checkpoints test ids

* shorten full-sync-to-tip test ids

* Applies suggestions from code review

* Fix missed search and replace

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-11 20:17:37 +01:00
Gustavo Valverde fbd6b0f8b3
ref(docker): combine test and prod entrypoints into one (#7660)
* ref(docker): combine test and prod entrypoints into one

This makes the following changes
- Uses `-x` instead of echoing the variables values
- Sets default values where required
- Create a function to list directories
- Create a function to run cargo tests
- Use a better approach to handle different options in the `case` manegement for tests and production
- Replaces all instances of `runtime-entrypoint.sh` with `entrypoint.sh`

* chore: use 2 spaces insted of 4 for indentation

* fix: add missing `test-threads` to `fully_synced_rpc_`

* fix: allow 3 arguments instead of 2 to handle `fully_synced_rpc_` correctly

* chore: remove extra file

* chore: add comments to main parts of the file

* fix(ci): just create the `$ZEBRA_CONF_PATH` if `$ENTRYPOINT_FEATURES` is not set

* fix(entrypoint): just print ${ZEBRA_CONF_PATH} if exists

* fix: missing condition

* ref: handle tests better if `$ENTRYPOINT_FEATURES` is set

* fix(ci): We just want `ZEBRA_CONF_PATH` to be set in the `release` image

* fix(entrypoint): fix the overall `case` logic

* fix(ci): allos to run with custom config in CI image

* fix(ci): more edgecases

* fix: we don't need to find files, but subdirectories

* fix(ci): handle Signal Forwarding and exit codes for `cargo`

* fix(ci): parse `fully_synced_rpc_` test correctly

* chore: add missing cache dir variable for LWD

* fix(entrypoint): handle an arbitrary number of arguments

* fix(entrypoint): handle features list

* fix(entrypoint): typo

* chore: typo
2023-10-11 19:04:45 +00:00
teor 758eb6e0ea
fix(rpc): Fix bugs and performance of `getnetworksolps` & `getnetworkhashps` RPCs (#7647)
* Handle negative and zero getnetworksolsps arguments correctly

* Simplify the solsps loop structure

* Simplify loop by avoiding manual iteration and peeking

* Avoid division by zero

* Use min and max times rather than first and last times

* Refactor block iterators so they are more efficient

* Make finding chains easier

* Simplify block iteration code

* Remove implemented TODO comments

* Simplify internal iterator state

* Implement iteration by any chain item

* Iterate block headers rather than full blocks

* Ignore code that is (sometimes) dead

* Fix a dead code warning

* Add a no blocks in state error constant

* Check result values in the RPC test

* Fix invalid calculation handling
2023-10-11 02:02:51 +00:00
teor 1fb2fd2a50
fix(ci): Handle new cargo machete output format for unused dependencies (#7724) 2023-10-11 10:33:01 +10:00
Gustavo Valverde 59ea5f1693
fix: add `$DISK_NAME` to `launch-without-cached-state` (#7709)
* fix: use `$DISK_NAME` instead of hardcoded value

* fix(ci): tests without cached state were not using $DISK_NAME
2023-10-10 11:04:21 +01:00
dependabot[bot] 00d2b45cb6
build(deps): bump the app group with 3 updates (#7715)
Bumps the app group with 3 updates: [clap](https://github.com/clap-rs/clap), [semver](https://github.com/dtolnay/semver) and [toml](https://github.com/toml-rs/toml).


Updates `clap` from 4.4.4 to 4.4.6
- [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.4.4...v4.4.6)

Updates `semver` from 1.0.19 to 1.0.20
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.19...1.0.20)

Updates `toml` from 0.8.0 to 0.8.2
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 05:31:50 +00:00
dependabot[bot] b2f69bbb3b
build(deps): bump the formats group with 2 updates (#7714)
* build(deps): bump the formats group with 2 updates

Bumps the formats group with 2 updates: [regex](https://github.com/rust-lang/regex) and [byteorder](https://github.com/BurntSushi/byteorder).


Updates `regex` from 1.9.5 to 1.10.0
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.5...1.10.0)

Updates `byteorder` from 1.4.3 to 1.5.0
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.4.3...1.5.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: formats
- dependency-name: byteorder
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: formats
...

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

* Add a test-related exception to deny.toml

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2023-10-10 03:31:25 +00:00
Arya 931e0a7587
fix(tests): Checking if transactions get into the mempool fails in lightwalletd tests (#7644)
* copy zcash/lightwalletd service.proto

* uses correct assert & minor cleanup

* adds comment about checking service.proto file when

* adds workaround in send_transaction_test

* Update docs

Co-authored-by: Arya <aryasolhi@gmail.com>

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-10 02:00:51 +00:00
dependabot[bot] 57964cefeb
build(deps): bump the test group with 1 update (#7712)
Bumps the test group with 1 update: [console-subscriber](https://github.com/tokio-rs/console).

- [Release notes](https://github.com/tokio-rs/console/releases)
- [Commits](https://github.com/tokio-rs/console/compare/console-subscriber-v0.1.10...console-subscriber-v0.2.0)

---
updated-dependencies:
- dependency-name: console-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: test
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-10 00:49:20 +00:00
Gustavo Valverde 9c12f7b20e
fix(ci): `grep` the Zcash network correctly (#7713) 2023-10-10 00:49:06 +00:00
dependabot[bot] 004e4366c4
build(deps): bump the data-structures group with 1 update (#7656)
Bumps the data-structures group with 1 update: [indexmap](https://github.com/bluss/indexmap).

- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/2.0.0...2.0.1)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: data-structures
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2023-10-09 23:06:26 +00:00
dependabot[bot] 085929c8f3
build(deps): bump webpki from 0.22.1 to 0.22.4 (#7707)
Bumps [webpki](https://github.com/briansmith/webpki) from 0.22.1 to 0.22.4.
- [Commits](https://github.com/briansmith/webpki/commits)

---
updated-dependencies:
- dependency-name: webpki
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 23:06:15 +00:00
dependabot[bot] 6584d3ceb1
build(deps): bump docker/build-push-action from 4.1.1 to 5.0.0 (#7667)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  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-10-09 21:27:42 +00:00
dependabot[bot] 87d1e6667a
build(deps): bump the test group with 4 updates (#7706)
Bumps the test group with 4 updates: [proptest](https://github.com/proptest-rs/proptest), [insta](https://github.com/mitsuhiko/insta), [tonic](https://github.com/hyperium/tonic) and [tonic-build](https://github.com/hyperium/tonic).


Updates `proptest` from 1.2.0 to 1.3.1
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.2.0...v1.3.1)

Updates `insta` from 1.32.0 to 1.33.0
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.32.0...1.33.0)

Updates `tonic` from 0.10.1 to 0.10.2
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.1...v0.10.2)

Updates `tonic-build` from 0.10.1 to 0.10.2
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.10.1...v0.10.2)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: test
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: test
- dependency-name: tonic
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
- dependency-name: tonic-build
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: test
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 21:27:12 +00:00
dependabot[bot] f1c891bdcc
build(deps): bump the async group with 2 updates (#7705)
Bumps the async group with 2 updates: [tokio](https://github.com/tokio-rs/tokio) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `tokio` from 1.32.0 to 1.33.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.32.0...tokio-1.33.0)

Updates `reqwest` from 0.11.20 to 0.11.22
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.20...v0.11.22)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: async
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: async
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 21:26:41 +00:00
dependabot[bot] 48c489d8f1
build(deps): bump actions/checkout from 4.0.0 to 4.1.0 (#7633)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-10-09 21:26:08 +00:00
Marek c8e1cef9b7
change(state): Put chain data into an inner struct (#7608)
* Add `ChainInner`

* Impl `Deref` & `DerefMut` for `Chain`

* Remove an obsolete note

* Derive `Eq` for `ChainInner`

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

* Fix docs

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-09 21:25:38 +00:00
Gustavo Valverde 8d0a17ee1c
fix(ci): handle disk mounting and logs reading edge-cases (#7690)
* fix: use `exit-nopipe` with consistent `shell` usage

Temporarily disabled the `set -e` option around the docker logs command to handle the broken pipe error gracefully.

Handle more complex scenarios in our `Result of ${{ inputs.test_id }} test` job

* fix: Use single quotes for the outer command

* fix: use same approach for CD

* test: check launch failure logs

* fix: revert CD changes

* fix: do not try to increase the disk size and wait mounting

* fix: increase GB a bit more

* fix: do not fail on pipe failure

* fix: use plain `tee /dev/stderr`

If this does not work try `(tee … || true)`

* fix: `tee` not stoping on cd config tests

* fix: match logic with GCP tests

* fix(cd): handle pipe and other errors correctly

* try `tee --output-error=exit-nopipe`

* fix: TRAP without pipefail

* test: pipefail with exit and trap

* fix: use a subshell

* fix(ci): wait for mounting and show system logs if fail

* fix(ci): GCP is not always mounting disks in the same order

* fix: use `grep` instead of `awk`

* fix: typo

* fix: use simpler `grep` command

* fix: do not sleep if not require

* chore: reduce diff
2023-10-09 17:59:59 +00:00
teor a2b7859e8e
Try larger cached state disk sizes (#7684) 2023-10-09 03:10:08 +00:00
Alfredo Garcia 1d45938e0f
fix(note-commitment-trees): Populate subtrees (#7636)
* add `sapling_subtree_for_tip` and `orchard_subtree_for_tip` methods to `ZebraDb`

* add methods for non finalized state, move functions

* call `zs_last_key_value` the right way

* fix and simplify `*_subtree_for_tip` methods

Co-authored-by: Arya <aryasolhi@gmail.com>

* apply filter

* rename all tree and subtree methods that use tip

* rename tip tree and subtree methods in non finalized chain

* apply simplify suggestions

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

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: teor <teor@riseup.net>
2023-10-09 02:02:04 +00:00
Alfredo Garcia c498eee67f
change(ci): Create automatic tickets on CI failure for more workflows (#7620)
* add buld failures ticket generation to most important workflows

* add missing newline at the end of the file

* doc fixes

* add missing testnet build check

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

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-09 02:01:51 +00:00
dependabot[bot] f6bba8c88e
build(deps): bump reviewdog/action-actionlint from 1.39.0 to 1.39.1 (#7669)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.39.0 to 1.39.1.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.39.0...v1.39.1)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  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-10-08 23:26:10 +00:00
dependabot[bot] f6346eb889
build(deps): bump tj-actions/changed-files from 39.2.0 to 39.2.1 (#7668)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.0 to 39.2.1.
- [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/v39.2.0...v39.2.1)

---
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-10-08 23:10:18 +00:00
Gustavo Valverde 5c3a02a1d0
fix(ci): disk validation for docker volume mount (#7665)
* fix(ci): disk validation for docker volume mount

* Use a symlink for lightwalletd cached state rather than mounting the same volume twice

* Avoid "sdb seems to be busy" errors from docker by adding extra sleeps

* Add a missing backslash

* Remove symlink from workflow

* Symlink lightwalletd path in entrypoint.sh

* Retry on failure and check Docker logs

* End ssh shell lines with explicit terminators

* Delete Docker containers if Docker mount fails

* Revert symlink changes in entrypoint.sh

* Debug using lsof

* Use correct lsof commands

* Use correct syntax for lsof +D

* fix(ci): make multiple validations before mounting

Loop and checks for three conditions:
The device `/dev/sdb` exists.
No process is using the device `/dev/sdb`.
No process is using the Docker volume directory.

* fix: do not pre-mount docker volume

The Docker version available with the newer `cos-stable` OS (https://cloud.google.com/release-notes#cos-109-17800-0-45) allows to mount the image when running it.

Mounting it before makes the disk unavailable.

* fix: remove extra `;`

* fix: just confirm with `lsof` and show it's output

* chore: reduce diff

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-06 14:00:57 +01:00
teor f3238fca1b
fix(ci): Replace busybox with ubuntu to avoid "device or resource busy" failures (#7686) 2023-10-06 15:11:15 +10:00
teor fcc7bf4e33
change(state): Stop using iterators on column families with many deletions (#7663)
Co-authored-by: Arya <aryasolhi@gmail.com>
2023-10-05 07:36:06 +10:00
dependabot[bot] a9bd127121
build(deps): bump jontze/action-mdbook from 2.2.1 to 2.2.2 (#7632)
Bumps [jontze/action-mdbook](https://github.com/jontze/action-mdbook) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/jontze/action-mdbook/releases)
- [Changelog](https://github.com/jontze/action-mdbook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jontze/action-mdbook/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: jontze/action-mdbook
  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-10-04 09:56:11 +00:00
Gustavo Valverde 3248c4c38b
fix(ci): wait for disk to be mounted in VM (#7662) 2023-10-04 09:25:02 +01:00
teor 04568d2527
change(release): Add "wait for a full sync" to the release checklist and ticket template (#7612)
* Add a state full sync to the release-checklist.md

* Add state test and freeze to release.md

* Make testing requirement clearer

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

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-09-28 22:53:30 +00:00
dependabot[bot] cdddbcc7fe
build(deps): bump reviewdog/action-actionlint from 1.38.0 to 1.39.0 (#7631)
Bumps [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) from 1.38.0 to 1.39.0.
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.38.0...v1.39.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  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-09-28 13:55:37 +00:00
dependabot[bot] 739f3bbc3b
build(deps): bump tj-actions/changed-files from 39.0.2 to 39.2.0 (#7630)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.0.2 to 39.2.0.
- [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/v39.0.2...v39.2.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  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-09-28 10:31:13 +00:00
teor 0faa0697d5
change(state): Only do continuous format checks in CI (#7627)
* Only do continuous format checks if enabled by a config

* Run continuous format checks in CI
2023-09-27 21:42:43 +00:00
Alfredo Garcia 90df59af55
fix `roundtrip_sapling_tree_root` and `roundtrip_orchard_tree_root` proptests (#7628) 2023-09-26 23:45:47 +00:00
Gustavo Valverde 0309afc0b9
imp(workflows): use larger runners on time consuming jobs (#7626)
Fixes: #7180
Closes: #6457
Fixes: #7625
2023-09-25 23:33:49 +00:00
Marek 44658967ec
chore: Update checkpoints (#7611)
* Update Testnet checkpoints

* Update Mainnet checkpoints
2023-09-25 18:40:42 +00:00
Marek a9980e97cd
Run `cargo update` (#7609) 2023-09-25 00:46:04 +00:00
teor 7348d080d6
change(state): Check database format is valid on shutdown, to catch format errors in new block code (#7606)
* Provide a user hint when the database format is invalid

* Split a path-based database version method

* Check the database format before Zebra shuts down

* Fix a typo in zebra-state/src/service/finalized_state/zebra_db.rs

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

* Fix a typo in upgrade.rs

---------

Co-authored-by: Marek <mail@marek.onl>
2023-09-22 13:58:41 +00:00
teor b737ccf570
change(state): Check database format is valid every 5 minutes, to catch format errors in new block code (#7602)
* Refactor format checks, stop running quick check before upgrade

* Speed up startup by always running the format checks in parallel

* Make detailed format checks cancellable on shutdown

* Prepare for periodic format checks

* Time upgrades and validity checks

* Run a database format check every 5 minutes

* Wait for a cancel signal rather than unconditionally sleeping

* Move check_max_on_disk_height() into the format checks

* Move spawn_format_change() into its own method
2023-09-22 01:33:52 +00:00
dependabot[bot] 5b3ecfb913
build(deps): bump docker/metadata-action from 4.6.0 to 5.0.0 (#7593)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4.6.0...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  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-09-21 08:27:01 +00:00
Marek daee5e5fcd
fix(chain): Return errors instead of panicking in methods for `Height`s (#7591)
* Return errors instead of panicking

* Apply suggestions from code review

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

* Turn `unwrap`s into `expect`s

* Refactor the error messages

---------

Co-authored-by: teor <teor@riseup.net>
2023-09-21 05:58:04 +00:00
Alfredo Garcia 09c1f994f0
remove intermittent asserts in test (#7600) 2023-09-21 03:20:55 +00:00
teor d651ee3c16
change(db): Upgrade subtrees from the tip backwards, for compatibility with wallet syncing (#7531)
* Avoid manual handling of previous sapling trees by using iterator windows instead

* Avoid manual sapling subtree index handling by comparing prev and current subtree indexes instead

* Simplify adding notes by using the exact number of remaining notes

* Simplify by skipping the first block, because it can't complete a subtree

* Re-use existing tree update code

* Apply the sapling changes to orchard subtree updates

* add a reverse database column family iterator function

* Make skipping the lowest tree independent of iteration order

* Move new subtree checks into the iterator, rename to end_height

* Split subtree calculation into a new method

* Split the calculate and write methods

* Quickly check the first subtree before running the full upgrade

* Do the quick checks every time Zebra runs, and refactor slow check error handling

* Do quick checks for orchard as well

* Make orchard tree upgrade match sapling upgrade code

* Upgrade subtrees in reverse height order

* Bump the database patch version so the upgrade runs again

* Reset previous subtree upgrade data before doing this one

* Add extra checks to subtree calculation to diagnose errors

* Use correct heights for subtrees completed at the end of a block

* Add even more checks to diagnose issues

* Instrument upgrade methods to improve diagnostics

* Prevent modification of re-used trees

* Debug with subtree positions as well

* Fix an off-by-one error with completed subtrees

* Fix typos and confusing comments

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

* Fix mistaken previous tree handling and end tree comments

* Remove unnecessary subtraction in remaining leaves calc

* Log heights when assertions fail

* Fix new subtree detection filter

* Move new subtree check into a method, cleanup unused code

* Remove redundant assertions

* Wait for subtree upgrade before testing RPCs

* Fix subtree search in quick check

* Temporarily upgrade subtrees in forward height order

* Clarify some comments

* Fix missing test imports

* Fix subtree logging

* Add a comment about a potential hang with future upgrades

* Fix zebrad var ownership

* Log more info when add_subtrees.rs fails

* cargo fmt --all

* Fix unrelated clippy::unnecessary_unwrap

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

* Stop the quick check depending on tree de-duplication

* Refactor waiting for the upgrade into functions

* Wait for state upgrades whenever the cached state is updated

* Wait for the testnet upgrade in the right place

* Fix unused variable

* Fix a subtree detection bug and comments

* Remove an early reference to reverse direction

* Stop skipping subtrees completed at the end of blocks

* Actually fix new subtree code

* Upgrade subtrees in reverse height order

Reverts "Temporarily upgrade subtrees in forward height order"
This reverts commit a9558be214.

* Bump the database patch version to re-run the upgrade (for testing)

* Revert "Remove an early reference to reverse direction"

This reverts commit c206404377.

---------

Co-authored-by: Marek <mail@marek.onl>
2023-09-20 23:41:28 +00:00
dependabot[bot] b6a18e9bab
build(deps): bump the log-time group with 2 updates (#7579)
* build(deps): bump the log-time group with 2 updates

Bumps the log-time group with 2 updates: [chrono](https://github.com/chronotope/chrono) and [sentry](https://github.com/getsentry/sentry-rust).


Updates `chrono` from 0.4.30 to 0.4.31
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.30...v0.4.31)

Updates `sentry` from 0.31.6 to 0.31.7
- [Release notes](https://github.com/getsentry/sentry-rust/releases)
- [Changelog](https://github.com/getsentry/sentry-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-rust/compare/0.31.6...0.31.7)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: log-time
- dependency-name: sentry
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: log-time
...

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

* reduce nanoseconds range in arbitrary tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-09-20 23:41:05 +00:00
dependabot[bot] 81710c1b55
build(deps): bump baptiste0928/cargo-install from 2.1.0 to 2.2.0 (#7594)
Bumps [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: baptiste0928/cargo-install
  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-09-20 23:40:46 +00:00