Commit Graph

5248 Commits

Author SHA1 Message Date
Alfredo Garcia d45864fa46
feat(remove): Temporally remove the internal miner functionality (#8184)
* remove functionality of internal miner

* fix configs

* fix typo in comment

* typo

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

* remove internal config for tests to pass

* typo

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-23 18:02:52 +00:00
Alfredo Garcia 5824f85bb4
Release v1.5.1 (#8165)
* add 1.5.1 changelog

* extend eos

* chore: Release

* add suggestions from review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-01-19 21:14:32 +00:00
Alfredo Garcia 6ef178ba72
Prepare zebra release 1.5.1 (#8159)
* update checkpoints

* cargo update
2024-01-17 22:50:38 +00:00
Marek 3ce539805f
Fix docs links (#8160)
PR #7886 introduced this link to docs.rs for the docs of the public
APIs: https://docs.rs/releases/search?query=zebra. However, the query in
the link returns crates that are not part of the Zebra's public API,
and doesn't return the two tower-* crates that are part of Zebra.

This commit refers to a manually created list of links pointing to the
docs of the public APIs of all current Zebra crates.
2024-01-17 11:43:43 +00:00
dependabot[bot] e7e3970bfd
build(deps): bump the prod group with 3 updates (#8158)
Bumps the prod group with 3 updates: [clap](https://github.com/clap-rs/clap), [vergen](https://github.com/rustyhorde/vergen) and [zcash_address](https://github.com/zcash/librustzcash).


Updates `clap` from 4.4.14 to 4.4.16
- [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.14...v4.4.16)

Updates `vergen` from 8.2.6 to 8.2.10
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/8.2.6...8.2.10)

Updates `zcash_address` from 0.3.0 to 0.3.1
- [Release notes](https://github.com/zcash/librustzcash/releases)
- [Commits](https://github.com/zcash/librustzcash/compare/zcash_address-0.3.0...zcash_address-0.3.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: zcash_address
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marek <mail@marek.onl>
2024-01-15 23:27:00 +00:00
Marek cbc2f81507
Fix fetching the RPC tx fetching (#8157)
We recently updated the `jsonrpc` dependency from 0.16 to 0.17. The
former version used to implicitly send an array of params, even if a
single param was passed to the request builder. The new version doesn't
do that anymore, but Zebra expects an array, so this commit explicitly
passes an array consisting of a single param to the request builder.
2024-01-15 18:27:21 +00:00
Marek 01fa50cba3
change(doc): Refactor user & dev docs (#8145)
* Fix the rendering of expandable content

* Refactor the docs refs in the readme

* Change the search query for docs.rs

* Refactor the landing docs for the `zebrad` crate

* List Zebra crates in the landing docs for `zebrad`

* Remove `## Future Work` from the main readme

This section doesn't say anything useful.

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-01-12 22:36:04 +00:00
teor 54c702e73c
fix(miner): Avoid some duplicate block errors (#8150)
* Update to the latest equihash solver code

* Wait for a new template after mining a block

* Remove an unused import

* Another solver update
2024-01-12 06:19:05 +00:00
teor b2e71f41fe
change(doc): Document how to add a column family (#8149)
* Document how to add a column family

* Add the column family to the list in the DB

* Fix rust formatting
2024-01-12 02:11:06 +00:00
teor 9a7dc4b405
rustc lint: Remove or ignore some dead code (#8148) 2024-01-12 00:46:46 +00:00
dependabot[bot] 5878b325d5
build(deps): bump the prod group with 5 updates (#8138)
Bumps the prod group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.11` | `4.4.14` |
| [semver](https://github.com/dtolnay/semver) | `1.0.20` | `1.0.21` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.51` | `1.0.56` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.108` | `1.0.111` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.8.1` | `3.9.0` |


Updates `clap` from 4.4.11 to 4.4.14
- [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.11...v4.4.14)

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

Updates `thiserror` from 1.0.51 to 1.0.56
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.56)

Updates `serde_json` from 1.0.108 to 1.0.111
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.108...v1.0.111)

Updates `tempfile` from 3.8.1 to 3.9.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.8.1...v3.9.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-11 16:38:44 +00:00
teor 2ac6921d60
feat(mine): Add an internal Zcash miner to Zebra (#8136)
* Patch equihash to use the solver branch

* Add an internal-miner feature and set up its dependencies

* Remove 'Experimental' from mining RPC docs

* Fix a nightly clippy::question_mark lint

* Move a byte array utility function to zebra-chain

* fixup! Add an internal-miner feature and set up its dependencies

* Add an equihash::Solution::solve() method with difficulty checks

* Check solution is valid before returning it

* Add a TODO to check for peers before mining

* Move config validation into GetBlockTemplateRpcImpl::new()

* fixup! fixup! Add an internal-miner feature and set up its dependencies

* Use the same generic constraints for GetBlockTemplateRpcImpl struct and impls

* Start adding an internal miner component

* Add the miner task to the start command

* Add basic miner code

* Split out a method to mine one block

* Spawn to a blocking thread

* Wait until a valid template is available

* Handle shutdown

* Run mining on low priority threads

* Ignore some invalid solutions

* Use a difference nonce for each solver thread

* Update TODOs

* Change the patch into a renamed dependency to simplify crate releases

* Clean up instrumentation and TODOs

* Make RPC instances cloneable and clean up generics

* Make LongPollId Copy so it's easier to use

* Add API to restart mining if there's a new block template

* Actually restart mining if there's a new block template

* Tidy instrumentation

* fixup! Move config validation into GetBlockTemplateRpcImpl::new()

* fixup! Make RPC instances cloneable and clean up generics

* Run the template generator and one miner concurrently

* Reduce logging

* Fix a bug in getblocktemplate RPC tip change detection

* Work around some watch channel change bugs

* Rate-limit template changes in the receiver

* Run one mining solver per available core

* Use updated C code with double-free protection

* Update to the latest solver branch

* Return and submit all valid solutions

* Document what INPUT_LENGTH means

* Fix watch channel change detection

* Don't return early when a mining task fails

* Spawn async miner tasks to avoid cooperative blocking, deadlocks, and improve shutdown responsiveness

* Make existing parallelism docs and configs consistent

* Add a mining parallelism config

* Use the minimum of the configured or available threads for mining

* Ignore optional feature fields in tests

* Downgrade some frequent logs to debug

* Document new zebrad features and tasks

* Describe the internal-miner feature in the CHANGELOG

* Update dependency to de-duplicate equihash solutions

* Use futures::StreamExt instead of TryStreamExt

* Fix a panic message typo
2024-01-11 14:41:01 +00:00
dependabot[bot] 2b6d39dca8
build(deps): bump the devops group with 2 updates (#8147)
Bumps the devops group with 2 updates: [google-github-actions/auth](https://github.com/google-github-actions/auth) and [docker/metadata-action](https://github.com/docker/metadata-action).


Updates `google-github-actions/auth` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.0.0...v2.0.1)

Updates `docker/metadata-action` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 20:48:55 +00:00
Arya 81a3a2aacf
add(docs): Note default path to config in docs (#8143)
* Note default path to config file in README and docs

* Applies suggestions from review & adds new test config file

* removes default path for 'Other' OSes from ZebradConfig docs

* fixes config_tests
2024-01-10 06:53:32 +00:00
bishopcheckmate 07693a1596
refactor: remove obsolete clippy allows in non_finalized_state (#8140) 2024-01-09 01:06:26 +00:00
Arya 704f88eb41
build(deps): bump `jsonrpc` from 0.16.0 to 0.17.0 (#8139)
* bump jsonrpc minor version

* update use of jsonrpc
2024-01-08 21:01:16 +00:00
Gustavo Valverde 01ddd87cb4
fix(ci): revert script changes causing workflow failures (#8133)
* fix(ci): revert script changes causing workflow failures

* fix(ci): typo

* fix(ci): use correct `DISK_OPTION` approach

* fix(ci): revert find cached state disks

* fix(ci): revert to previous `gcp-get-cached-disks.sh` script

* chore: reduce diff and add TODO
2024-01-07 23:26:17 +00:00
Marius Kjærstad 45e3f5e354
Update copyright year to 2024 (#8134) 2024-01-05 07:59:14 +00:00
dependabot[bot] f21d7c6934
build(deps): bump the prod group with 6 updates (#8125)
* build(deps): bump the prod group with 6 updates

Bumps the prod group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [futures](https://github.com/rust-lang/futures-rs) | `0.3.29` | `0.3.30` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.35.0` | `1.35.1` |
| [metrics](https://github.com/metrics-rs/metrics) | `0.21.1` | `0.22.0` |
| [metrics-exporter-prometheus](https://github.com/metrics-rs/metrics) | `0.12.2` | `0.13.0` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.22` | `0.11.23` |
| [owo-colors](https://github.com/jam1garner/owo-colors) | `3.5.0` | `4.0.0` |


Updates `futures` from 0.3.29 to 0.3.30
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.29...0.3.30)

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

Updates `metrics` from 0.21.1 to 0.22.0
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-v0.21.1...metrics-v0.22.0)

Updates `metrics-exporter-prometheus` from 0.12.2 to 0.13.0
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/compare/metrics-exporter-prometheus-v0.12.2...metrics-exporter-prometheus-v0.13.0)

Updates `reqwest` from 0.11.22 to 0.11.23
- [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.22...v0.11.23)

Updates `owo-colors` from 3.5.0 to 4.0.0
- [Commits](https://github.com/jam1garner/owo-colors/compare/v3.5.0...v4.0.0)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: metrics
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: metrics-exporter-prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: owo-colors
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: prod
...

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

* update all metric macros

* fix deprecated function

* fix duplicated deps

* Fix an incorrect gauge method call

* Expand documentation and error messages for best chain length

---------

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>
Co-authored-by: teor <teor@riseup.net>
2024-01-02 01:26:54 +00:00
Alfredo Garcia c0f88ede8e
make bulk size the same for testnet and mainnet (#8127) 2024-01-01 23:21:22 +00:00
Alfredo Garcia 5abbefddaf
tests(sinsemilla): Minor changes to sinsemilla tests (#8128)
* add `sinsemilla_` prefix to sinsemilla tests

* replace non working link
2024-01-01 23:21:13 +00:00
dependabot[bot] 164dfdcd1b
build(deps): bump the devops group with 2 updates (#8126)
Bumps the devops group with 2 updates: [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `google-github-actions/setup-gcloud` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v2.0.0...v2.0.1)

Updates `tj-actions/changed-files` from 40.2.3 to 41.0.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/v40.2.3...v41.0.1)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-30 13:02:56 +00:00
Marek f82c23b62e
change(scan): Refactor the user documentation for scanning (#8124)
* Refactor the scanning docs

* Refactor the docs for the scanning reader
2023-12-29 13:48:32 +00:00
Alfredo Garcia d1e72c114f
docs(shielded-scan) Improve feature docs (#8114)
* improve shielded-scan feature docs

* apply suggestions from review

* Fix links and typos

* Use the right birthday height for ZECpages vk

---------

Co-authored-by: Marek <mail@marek.onl>
2023-12-21 17:05:56 +00:00
Alfredo Garcia 085bfdc067
feat(scanner): Don't scan and log if we are below sapling height (#8121)
* do not scan and notify if we are below sapling height

* separate tip logic check into its own loop
2023-12-21 13:44:27 +00:00
dependabot[bot] 141ea89aad
build(deps): bump the devops group with 3 updates (#8120)
Bumps the devops group with 3 updates: [tj-actions/changed-files](https://github.com/tj-actions/changed-files), [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) and [docker/metadata-action](https://github.com/docker/metadata-action).


Updates `tj-actions/changed-files` from 40.2.2 to 40.2.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/v40.2.2...v40.2.3)

Updates `reviewdog/action-actionlint` from 1.39.1 to 1.40.0
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.39.1...v1.40.0)

Updates `docker/metadata-action` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.3.0...v5.4.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 13:44:17 +00:00
teor ad015e04d9
Move history tree and value balance to typed column families (#8115)
* impl TryFrom<zcash_primitives::BlockHeight> for Height

* Add type-safe read and write database methods

* Only allow typed access to the scanner DB

* Update docs

* Implement a common method as a trait

* Fix imports

* Tidy state imports

* Activate tracing logging macros in the whole scanner crate

* Fix dead code warnings

* Use a more sensible export order

* Remove a 1.72 lint exception now 1.74 is stable

* Switch history trees over to TypedColumnFamily, and remove redundant code

* Add typed batch creation methods, and switch history trees to them

* Convert ValueBalance to typed column families

* Make the APIs compatible after a merge

* Use `ZebraDb` instead of `DiskDb` where needed

---------

Co-authored-by: Marek <mail@marek.onl>
2023-12-20 23:20:57 +00:00
dependabot[bot] 3c8b93d986
build(deps): bump the prod group with 4 updates (#8117)
Bumps the prod group with 4 updates: [thiserror](https://github.com/dtolnay/thiserror), [sentry](https://github.com/getsentry/sentry-rust), [hyper](https://github.com/hyperium/hyper) and [metrics-exporter-prometheus](https://github.com/metrics-rs/metrics).


Updates `thiserror` from 1.0.50 to 1.0.51
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.50...1.0.51)

Updates `sentry` from 0.32.0 to 0.32.1
- [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.32.0...0.32.1)

Updates `hyper` from 0.14.27 to 0.14.28
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/v0.14.28/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.27...v0.14.28)

Updates `metrics-exporter-prometheus` from 0.12.1 to 0.12.2
- [Changelog](https://github.com/metrics-rs/metrics/blob/main/release.toml)
- [Commits](https://github.com/metrics-rs/metrics/commits)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: sentry
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: metrics-exporter-prometheus
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 22:03:41 +00:00
Alfredo Garcia 2d217e29e7
rename worflows to fix readme badges (#8116) 2023-12-18 21:07:40 +00:00
teor 4b5838c500
Make sure scanner database is accessed using the correct types (#8112)
* impl TryFrom<zcash_primitives::BlockHeight> for Height

* Add type-safe read and write database methods

* Only allow typed access to the scanner DB

* Update docs

* Implement a common method as a trait

* Fix imports

* Tidy state imports

* Activate tracing logging macros in the whole scanner crate

* Fix dead code warnings
2023-12-18 16:33:49 +00:00
dependabot[bot] 39830b0b55
build(deps): bump the devops group with 2 updates (#8100)
Bumps the devops group with 2 updates: [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `google-github-actions/setup-gcloud` from 1.1.1 to 2.0.0
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v1.1.1...v2.0.0)

Updates `tj-actions/changed-files` from 40.2.1 to 40.2.2
- [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/v40.2.1...v40.2.2)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 10:54:25 +00:00
dependabot[bot] 2dcc873337
build(deps): bump zerocopy from 0.7.30 to 0.7.31 (#8111)
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.30 to 0.7.31.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.7.30...v0.7.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 07:03:57 +00:00
Marek 8f090e605d
Add a scanning results reader (#8104)
* Add a scanning results reader

* Simplify intro & titles in `zebra-utils/README.md`

* Add a tutorial for the scanning results reader

* Reformat `zebra-utils/Cargo.toml`

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

* Update `zebra-utils/README.md`

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

* standard grouping

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

* Add a comment on a first empty memo

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

* Use `exactly_one()` instead of `next()`

* Simplify various type conversions

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-14 23:19:35 +00:00
teor a14cb40c1f
test: Add progress markers to the snapshot tests (#8106)
* Add progress tracking markers to snapshot tests

* Simplify sapling_keys_and_last_scanned_heights()
2023-12-14 21:32:09 +00:00
teor 8734fd98f3
Ignore segmentation fault errors when shutting down Docker in tests (#8107) 2023-12-13 23:47:42 +00:00
Marek 22852bc81d
change(state): Allow opening the database in a read-only mode (#8079)
* Allow opening the database read-only mode

* Update zebra-scan/src/storage/db.rs

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

* Refactor skipping database upgrades

* Fix errors caused by the merge

* Add new argument in new_test_storage()

* Simplify test storage code

* Fix importing the `new_test_storate` fn

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-13 21:54:00 +00:00
Alfredo Garcia 92758a0d9f
feat(scanner): Restart scanning where left (#8080)
* start scanner where it was left

* fix tests

* add a `scan_start_where_left` test

* refactor a log msg

* fix some comments

* remove function

* fix doc comment

* clippy

* fix `sapling_keys_and_last_scanned_heights()`

* simplify start height

* i went too far, revert some changes back

* change log info to every 10k blocks

* fix build

* Update height snapshot code and check last height is consistent

* Add strictly before and strictly after database key gets

* Move to the previous key using strictly before ops

* Assert that keys are only inserted once

* Update the index in each loop

* Update snapshots

* Remove debugging code

* start scanning at min available height

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-13 20:16:26 +00:00
teor ac72c2b1de
Add shielded-scan.md to the index (#8095) 2023-12-12 23:51:52 +00:00
Gustavo Valverde d85b010cf9
ref(workflow): move most scripts to their own executables (#8005)
* ref(workflow): move most scripts to their own executable

* debug: JSON value

* fix(scripts): move remaining script to its own file

* fix(script): revert to the correct disk search logic

* fix(scripts)

* fix(scripts): use correct NETWORK with lowercase

* fix: typo

* fix(script): wrong variable assignment

* fix(script): use correct return values inside a function

* fix(script): fix value assigment

* test: debug

* fix(script): make disk conditions simpler

* fix(script): export variables to the `shell` executing the script

* fix(script): do not fail on expected unbound variables

* test: output

* fix(scripts): do not `echo` a variable more than once

* fix(scripts): typo

* docs(workflow): adds a description at the top of each file (#8009)

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

---------

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2023-12-12 23:51:28 +00:00
teor 9ace6f8a4e
test(scan): Add typed database format snapshots to the scanner (#8083)
* Refactor test data into functions

* Add a typed snapshot test for scanner storage

* Use standard hex serialization with SaplingScannedResult

* Simplify transaction::Hash hex serialization

* Sort HashMaps before snapshotting

* Add typed snapshot data
2023-12-12 22:34:59 +00:00
teor fa4c80f35a
Send all zebrad logs to the journal under systemd (#7965) 2023-12-12 13:15:55 +00:00
teor 3318eaaa22
test(scan): Add raw database format snapshots to the scanner (#8075)
* Make some scanner storage methods more flexible

* Move tests to a submodule and expose test functions and constants

* Make scanner functions clearer and easier to use

* Simplify state snapshot test code

* Add raw data snapshot tests for the scanner

* Add snapshots

* Fix import path

* Fix import conditional compilation

* fix imports

* fix imports 2

* Put read and write db exports together

* Remove confusing IntoDisk/FromDisk impl

* Fix an incorrect unused method that could panic

* Delete a test that is no longer valid

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-12-12 07:45:12 +00:00
Arya 5bdad1bcaa
Release Zebra 1.5.0 (#8027)
* adds a summary to changelog

* chore: Release

* Apply suggestions from code review

* updates Changelog.md

* updates changelog.md

* mentions/updates MSRV

* updates checkpoints

* updates ESTIMATE_RELEASE_HEIGHT

* Apply suggestions from code review

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

* updates estimated release height

* combines changelog entries about scanner db

* zebra-scan is still in alpha

* Update CHANGELOG.md

* update release checklist for zebra-scan

* use fastmod to update zebra-scan version

* corrects zebra-scan version requirement in zebrad

* Applies suggestions from review

* updates changelog

* Update zebrad/src/components/sync/end_of_support.rs

---------

Co-authored-by: teor <teor@riseup.net>
2023-12-12 00:44:15 +00:00
Arya b0b8b1a028
cargo update (#8086) 2023-12-11 23:39:01 +00:00
Gustavo Valverde e5b810a52a
imp(ci): fix `codespell` words and ignore others (#8089)
This cleans the annotations on every PR, so it doesn't show up from now on.
2023-12-11 22:33:03 +00:00
Gustavo Valverde fc478ebb32
fix(ci): use a bigger machine for config file tests (#8088)
* fix(ci): use a bigger machine for config file tests

* chore: run `Docker Unit Tests` if `sub-test-zebra-config.yml` changes
2023-12-11 22:32:53 +00:00
Gustavo Valverde 9ae55853ad
fix(ci): use official `codespell` action (#8087) 2023-12-11 21:08:59 +00:00
Marek 9acdf0e512
Make the `verbose` argument optional (#8076)
The `verbose` argument of the `getrawtransaction` RPC is specified as
optional in the documentation:
https://zcash.github.io/rpc/getrawtransaction.html.
2023-12-10 21:44:43 +00:00
teor 5dd33d7265
Add `ldb` RocksDB query tool to the Dockerfile (#8074)
* Add `ldb` RocksDB query tool to the Dockerfile

* Add shielded scanning link to run.md

* Add `ldb` tool instructions to install.md

* Add a rough framework for shielded-scan.md

* Add security warning and feature limitations to shielded-scan.md
2023-12-08 00:14:54 +00:00
teor 1ccf5fba46
scan(test): Implement scanner format round-trip tests (#8071)
* Implement scanner format round-trip tests

* Limit random heights to database range

* Increase coverage of state height serialization proptests #7443
2023-12-07 19:43:49 +00:00