Commit Graph

5451 Commits

Author SHA1 Message Date
Alfredo Garcia 01fa12b959
ignore some directories in codespell checks (#8953) 2024-10-21 19:31:19 +00:00
Arya 9073928bf0
Fixes a couple new clippy lints (#8950) 2024-10-21 12:49:13 +00:00
Gustavo Valverde a182ffe098
fix(actions): run `get-disk-name` on all workflow events (#8942) 2024-10-17 15:22:00 +00:00
Gustavo Valverde cc78b6ae10
ref(actions): allow more flexibility on cached states usage (#8908)
* ref(actions): allow more flexibility on cached states usage

* chore: improve message

* fix(actions): deploy single instances even if no cached state is needed

* rev: apply suggestions from code review

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

* fix: wrong use of `failure()`

* chore: remove extra file

* chore: `echo` the pattern for easier debugging

* chore: add extra details to image naming convention

Addresses https://github.com/ZcashFoundation/zebra/pull/8908#discussion_r1797679586

* ref(actions): use a better logic for disk image selection

This supersedes https://github.com/ZcashFoundation/zebra/pull/8936/ using a different approach with `${VAR:-value}`

---------

Co-authored-by: Marek <mail@marek.onl>
2024-10-17 13:08:05 +00:00
dependabot[bot] 819384053f
build(deps): bump Swatinem/rust-cache in the devops group (#8938)
Bumps the devops group with 1 update: [Swatinem/rust-cache](https://github.com/swatinem/rust-cache).


Updates `Swatinem/rust-cache` from 2.7.3 to 2.7.5
- [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.7.3...v2.7.5)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  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>
2024-10-17 13:05:30 +00:00
Alfredo Garcia b89492168a
Release Zebra (`v2.0.0-rc.0`) (#8927)
* changelog

* add panic fix to changelog

* Apply suggestions from code review

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

* chore: Release

* update release-crates-dry-run workflow script

* fix command in release script

* change end of support

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-10-11 17:21:07 +00:00
Arya fea9f46fbb
Fixes a panic (#8928) 2024-10-10 23:34:42 +00:00
Alfredo Garcia f2e7bc95ce
feat(regtest): Add regtest halving interval and port test (#8888)
* add halving interval to regtest and to custom testnet

* add nuparams.py rpc test

* fix inconsistency in nu6 name in rpc methods

* rename `halving_interval` to `pre_blossom_halving_interval` in the config

* make fixes

* Suggestion for "feat(regtest): Add regtest halving interval and port test" (#8894)

* adds `height_for_halving_index()` and `num_halvings()` fns

* avoid unnecessary panic

* avoid using constant pre/post blossom halving intervals in num_halvings()

* make regtest and testnet constant more private

* move `height_for_halving_index`

* fmt

* add a `funding_stream_address_change_interval` method

* add checked operations to `height_for_halving_index` fn

* add post_blossom interval as paramneters + other refactors

* rename function

* fix docs

* move constant

* Updates `new_regtest()` method to return a Testnet without funding streams, updates funding stream setter methods to set a flag indicating that parameters affecting the funding stream address period should be locked, updates the setter methods for parameters that affect the funding stream address period to panic if those parameters should be locked. (#8921)

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-10-10 18:26:54 +00:00
Alfredo Garcia 8cd4d96085
build(deps): Upgrade ECC crates for Zebra `v2.0.0-rc.0` release candidate (#8918)
* update ECC dependencies for release candidate

* cargo vet

* fix denies

* fix parsing, remove not needed entries

* update `secp256k1`

* remove elasticsearch from denies

* readd elasticsearch from deny.toml

* downgrade to revisions

* add more patches

* typo in comment

* cargo vet changes

* update denies

* add more git sources

* Apply suggestions from code review

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

* update cargo.lock

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-10-10 17:09:04 +00:00
Alfredo Garcia 1600edebef
upgrade checkpoints (#8924) 2024-10-10 13:19:27 +00:00
dependabot[bot] a28210300f
build(deps): bump the devops group with 3 updates (#8919)
Bumps the devops group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action).


Updates `actions/checkout` from 4.2.0 to 4.2.1
- [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.2.0...v4.2.1)

Updates `tj-actions/changed-files` from 45.0.2 to 45.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/v45.0.2...v45.0.3)

Updates `docker/setup-buildx-action` from 3.6.1 to 3.7.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3.6.1...v3.7.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-patch
  dependency-group: devops
- dependency-name: docker/setup-buildx-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-10-10 11:02:09 +00:00
Skylar Saveland 3220520592
Update docker-compose.yml - tiny typo (#8893) 2024-10-07 22:14:03 +00:00
Arya 63b866544f
Updates post-NU6 funding stream address for FPF on Mainnet (#8914) 2024-10-07 21:05:03 +00:00
Arya 7313d5304b
Responds with a maximum of 160 block headers (#8913) 2024-10-07 20:11:22 +00:00
dependabot[bot] 841047aa37
build(deps): bump the prod group across 1 directory with 24 updates (#8899)
* build(deps): bump the prod group across 1 directory with 24 updates

Bumps the prod group with 24 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.13` | `4.5.18` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.3.0` | `2.5.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.204` | `1.0.210` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.39.2` | `1.40.0` |
| [tokio-stream](https://github.com/tokio-rs/tokio) | `0.1.15` | `0.1.16` |
| [tower](https://github.com/tower-rs/tower) | `0.4.13` | `0.5.0` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.63` | `1.0.64` |
| [hyper-util](https://github.com/hyperium/hyper-util) | `0.1.6` | `0.1.9` |
| [bytes](https://github.com/tokio-rs/bytes) | `1.7.1` | `1.7.2` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |
| [insta](https://github.com/mitsuhiko/insta) | `1.39.0` | `1.40.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.122` | `1.0.128` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.11.0` | `3.13.0` |
| [prost](https://github.com/tokio-rs/prost) | `0.13.1` | `0.13.3` |
| [tonic](https://github.com/hyperium/tonic) | `0.12.1` | `0.12.3` |
| [tonic-build](https://github.com/hyperium/tonic) | `0.12.1` | `0.12.3` |
| [primitive-types](https://github.com/paritytech/parity-common) | `0.12.2` | `0.13.1` |
| [uint](https://github.com/paritytech/parity-common) | `0.9.5` | `0.10.0` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.11` | `0.7.12` |
| [rlimit](https://github.com/Nugine/rlimit) | `0.10.1` | `0.10.2` |
| [tonic-reflection](https://github.com/hyperium/tonic) | `0.12.1` | `0.12.3` |
| [owo-colors](https://github.com/jam1garner/owo-colors) | `4.0.0` | `4.1.0` |
| [syn](https://github.com/dtolnay/syn) | `2.0.72` | `2.0.79` |
| [quote](https://github.com/dtolnay/quote) | `1.0.36` | `1.0.37` |



Updates `clap` from 4.5.13 to 4.5.18
- [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/clap_complete-v4.5.13...clap_complete-v4.5.18)

Updates `indexmap` from 2.3.0 to 2.5.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.3.0...2.5.0)

Updates `serde` from 1.0.204 to 1.0.210
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.210)

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

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

Updates `tower` from 0.4.13 to 0.5.0
- [Release notes](https://github.com/tower-rs/tower/releases)
- [Commits](https://github.com/tower-rs/tower/compare/tower-0.4.13...tower-0.5.0)

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

Updates `hyper-util` from 0.1.6 to 0.1.9
- [Release notes](https://github.com/hyperium/hyper-util/releases)
- [Changelog](https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper-util/compare/v0.1.6...v0.1.9)

Updates `bytes` from 1.7.1 to 1.7.2
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.7.1...v1.7.2)

Updates `regex` from 1.10.6 to 1.11.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.10.6...1.11.0)

Updates `insta` from 1.39.0 to 1.40.0
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/compare/1.39.0...1.40.0)

Updates `serde_json` from 1.0.122 to 1.0.128
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.122...1.0.128)

Updates `tempfile` from 3.11.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.11.0...v3.13.0)

Updates `prost` from 0.13.1 to 0.13.3
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.13.1...v0.13.3)

Updates `tonic` from 0.12.1 to 0.12.3
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.12.1...v0.12.3)

Updates `tonic-build` from 0.12.1 to 0.12.3
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.12.1...v0.12.3)

Updates `primitive-types` from 0.12.2 to 0.13.1
- [Commits](https://github.com/paritytech/parity-common/commits/primitive-types-v0.13.1)

Updates `uint` from 0.9.5 to 0.10.0
- [Commits](https://github.com/paritytech/parity-common/compare/uint-v0.9.5...uint-v0.10.0)

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

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

Updates `tonic-reflection` from 0.12.1 to 0.12.3
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.12.1...v0.12.3)

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

Updates `syn` from 2.0.72 to 2.0.79
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.72...2.0.79)

Updates `quote` from 1.0.36 to 1.0.37
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.36...1.0.37)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: serde
  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-minor
  dependency-group: prod
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tower
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: hyper-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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
- dependency-name: prost
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tonic
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tonic-build
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: primitive-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: uint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prod
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: rlimit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: tonic-reflection
  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-minor
  dependency-group: prod
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod
...

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

* downgrade `primitive-types` and `tower`

* fix docs and deprecated stuff

* cargo vet updates

---------

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>
2024-10-07 20:11:13 +00:00
dependabot[bot] abfb9ce29c
build(deps): bump the devops group with 4 updates (#8905)
Bumps the devops group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [google-github-actions/auth](https://github.com/google-github-actions/auth), [codecov/codecov-action](https://github.com/codecov/codecov-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `actions/checkout` from 4.1.7 to 4.2.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.1.7...v4.2.0)

Updates `google-github-actions/auth` from 2.1.5 to 2.1.6
- [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.1.5...v2.1.6)

Updates `codecov/codecov-action` from 4.5.0 to 4.6.0
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.5.0...v4.6.0)

Updates `docker/build-push-action` from 6.7.0 to 6.9.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.7.0...v6.9.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: docker/build-push-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-10-07 15:01:02 +00:00
Gustavo Valverde 3bf4bc82d6
fix(actions): disk regeneration does not required a cached state (#8910) 2024-10-04 13:51:13 +00:00
dependabot[bot] 689a77637b
build(deps): bump docker/scout-action in the devops group (#8890)
Bumps the devops group with 1 update: [docker/scout-action](https://github.com/docker/scout-action).


Updates `docker/scout-action` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/docker/scout-action/releases)
- [Commits](https://github.com/docker/scout-action/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: docker/scout-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-10-01 06:55:29 +00:00
Gustavo Valverde ac1242a189
feat(ci): add Docker Scout vulnerabilities scanning (#8871)
* feat(ci): add Docker Scout vulnerabilities scanning

* fix(scout): add missing `environment` command

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-09-24 11:52:04 +00:00
Arya d6301a6d13
Returns an error instead of panicking when the relevant chain is empty (#8883) 2024-09-23 13:22:14 +00:00
Alfredo Garcia c8280d488f
feat(tests): Move the RPC tests framework from zcashd (#8866)
* move the rpc-tests framework from zcashd

* ignore pycache

* remove all tests from the list except getmininginfo

* iimprove a bit the readme

* change some env variable names

* add cache, add reindex test

* fix the paralell framework

* fix env variables

* change tests order

* update docs with env variable name change

* fix binary location

* reduce base config

* restore env var

* ignore stderr in the output
2024-09-20 16:36:20 +00:00
Gustavo Valverde 6951988456
chore(docker): remove debugging output by default (#8870) 2024-09-19 17:25:40 +00:00
Gustavo Valverde 8870b2c60e
feat(cd): deploy instances with attached cached states (#8868)
* ref(ci): consolidate cached states workflows and scripts

We've been using multiple approaches to locate and retrieve cached states in GCP. However, this has made it difficult to reuse the same methods across new workflows or different scenarios.

To address this, we've streamlined the process to make it more reusable in other contexts. This change will support deploying instances from both the `main` branch and `release`, simplifying future implementations and speeding up the process.

Changes:
- Use a single bash script (`gcp-get-cached-disks.sh`) to get cached states names and availability
- Move script logic from `sub-find-cached-disks.yml` to `gcp-get-cached-disks.sh` and adapt `sub-find-cached-disks.yml` to allow to output available disks and disks names.
- Simplify parameters usage in `sub-deploy-integration-tests-gcp.yml` and convert the `Find ${{ inputs.test_id }} cached state disk` step into an independent job, to be able to use the `sub-find-cached-disks.yml` reusable workflow
- Remove repetition in `sub-ci-integration-tests-gcp.yml`

* ref(tests): Use the `ZEBRA_CACHED_STATE_DIR` env var across tests

We had a technical debt with some tests using a hardcoded value for the cache directory (`/zebrad-cache`), which generated inconsistency across disks and cached states directories.

Changes:
- Allow sync tests to use the `ZEBRA_CACHED_STATE_DIR` as the cache directory, if specified
- Update the `entrypoint.sh` to reflect this change
- Add the `ZEBRA_CACHED_STATE_DIR` variable to the missing tests in `sub-ci-integration-tests-gcp.yml`, and remove extra parameters to call reusable workflows.

* feat(cd): deploy instances with cached states

* fix(cd): allow deploying from branch

* fix(cd): add missing `CACHED_DISK_NAME` env
2024-09-19 13:12:09 +00:00
Gustavo Valverde aec07f24ff
ref(ci): consolidate cached states workflows and scripts (#8865)
* ref(ci): consolidate cached states workflows and scripts

We've been using multiple approaches to locate and retrieve cached states in GCP. However, this has made it difficult to reuse the same methods across new workflows or different scenarios.

To address this, we've streamlined the process to make it more reusable in other contexts. This change will support deploying instances from both the `main` branch and `release`, simplifying future implementations and speeding up the process.

Changes:
- Use a single bash script (`gcp-get-cached-disks.sh`) to get cached states names and availability
- Move script logic from `sub-find-cached-disks.yml` to `gcp-get-cached-disks.sh` and adapt `sub-find-cached-disks.yml` to allow to output available disks and disks names.
- Simplify parameters usage in `sub-deploy-integration-tests-gcp.yml` and convert the `Find ${{ inputs.test_id }} cached state disk` step into an independent job, to be able to use the `sub-find-cached-disks.yml` reusable workflow
- Remove repetition in `sub-ci-integration-tests-gcp.yml`

* ref(tests): Use the `ZEBRA_CACHED_STATE_DIR` env var across tests

We had a technical debt with some tests using a hardcoded value for the cache directory (`/zebrad-cache`), which generated inconsistency across disks and cached states directories.

Changes:
- Allow sync tests to use the `ZEBRA_CACHED_STATE_DIR` as the cache directory, if specified
- Update the `entrypoint.sh` to reflect this change
- Add the `ZEBRA_CACHED_STATE_DIR` variable to the missing tests in `sub-ci-integration-tests-gcp.yml`, and remove extra parameters to call reusable workflows.
2024-09-19 12:31:33 +00:00
Alfredo Garcia c5d8eb5f83
fix(rpc): modify shutdown used in `stop()` (#8863)
* modify shutdown used in `stop()`

* use conditional compilation

* add note

* fix conditional compilation
2024-09-18 20:14:41 +00:00
dependabot[bot] 60d09a4e62
build(deps): bump tj-actions/changed-files in the devops group (#8874)
Bumps the devops group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 45.0.1 to 45.0.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/v45.0.1...v45.0.2)

---
updated-dependencies:
- 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>
2024-09-18 17:39:38 +00:00
Alfredo Garcia 3f94303bb2
feat(rpc): Add more fields to `getmininginfo` call (#8860)
* add additional fields to getmininginfo

* update openapi spec

* fix zebra-state standalone build

* make sure fields are not present when tip is 0
2024-09-18 11:05:25 +00:00
Alfredo Garcia 082cdad1c1
feat(rpc): Add a `generate` rpc method (#8849)
* implement `generate` rpc method

* update openapi

---------

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2024-09-09 21:51:37 +00:00
Alfredo Garcia 554a37d20a
feat(rpc): Add a `stop` rpc method (#8839)
* add a `stop` rpc method

* add todo comment

* add a ticket number to the TODO

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

---------

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2024-09-09 13:02:35 +00:00
Alfredo Garcia 1511997829
fix clippy lints (#8855) 2024-09-06 15:24:15 +00:00
dependabot[bot] 17d7f914a8
build(deps): bump tj-actions/changed-files in the devops group (#8835)
Bumps the devops group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 45.0.0 to 45.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/v45.0.0...v45.0.1)

---
updated-dependencies:
- 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>
2024-09-05 18:28:11 +00:00
Gustavo Valverde d31eea5f64
ref(docker): use cache mounts for build cache (#8796)
* ref(docker): leverage cache mount with bind mounts

This update eliminates the need for external tools like `cargo-chef` to leverage caching layers, resulting in an average build time reduction of 4m30s (~36% improvement).

While this solution doesn't fully resolve the issues mentioned in https://github.com/ZcashFoundation/zebra/issues/6169#issuecomment-1712776391, it represents the best possible approach without resorting to custom solutions, which we'd prefer to avoid.

* chore: remove extra `WORKDIR` and imp comments

* chore: improve comment legibility

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

---------

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
Co-authored-by: Arya <aryasolhi@gmail.com>
2024-09-05 13:29:22 +00:00
dismad e9bbb97473
Update README.md (#8824)
typo
2024-09-03 13:43:57 +00:00
Marek f2427d62e6
add(docs): Add minimal hardware requirements (#8822)
* clean-up: Remove outdated note

* Add minimal hardware requirements

Source & credit: https://x.com/Zerodartz/status/1811460885996798159

* Apply suggestions from code review

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

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2024-09-03 13:43:51 +00:00
Marek 5541b27a12
Remove `shielded-scan` from experimental features (#8827) 2024-09-03 10:04:36 +00:00
Marek 9a616f46a5
fix(deps): Replace `serde_yaml` by `serde_yml` (#8825)
* Use `serde_yml` instead of `serde_yaml`

* Regenerate `openapi.yaml`
2024-09-02 19:00:26 +00:00
Arya 6b95d271d8
fix(rpc): Return verification errors from `sendrawtransaction` RPC method (#8788)
* Adds a mempool request to wait for a transaction verification result and uses it in `sendrawtransaction` RPC method

* removes unnecessary clone

* fix clippy warnings

* returns verification errors for all `mempool::Queue` requests, removes `QueueRpc` request variant

* returns oneshot channel in mempool::Response::Queue

* updates a test vector to check for download or verification error in mempool::response::Queued result receiver

* Always require tokio as a dependency in zebra-node-services

* checks for closed channel errors in sendrawtransaction and updates a prop test to check that verification errors are propagated correctly
2024-08-30 20:09:10 +00:00
Arya 0ef9987e9e
fix(state): Write database format version to disk atomically to avoid a rare panic (#8795)
* Splits `atomic_write_to_tmp_file` out of `zebra_network::Config::update_peer_cache`

* Uses the new `atomic_write_to_tmp_file` fn in `update_peer_cache()`

* Replaces repetitive code for getting the default peer and state cache directories with `default_cache_dir()`

* Converts `atomic_write_to_tmp_file` to a blocking function and adds `spawn_atomic_write_to_tmp_file` for use in async environments.

* Uses `atomic_write_to_tmp_file` to write database versions to disk

* Removes `spawn_atomic_write_to_tmp_file()` and inlines its body at its callsite to avoid adding tokio as a dependency of zebra-chain.

* Apply suggestions from code review

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-08-29 21:09:27 +00:00
Gustavo Valverde cdb9efdb27
fix(docker): allow the `zebra` user access to relevant dirs (#8817)
* fix(docker): allow the `zebra` user access to relevant dirs

When runnning a Zebra node using Docker without a privileged user, you won't be able to modify some files and directories, not even the ones in the current directory, as the `zebra` user has no permission to `/`.

The best way to solve this is making the `/opt/zebrad` the current `WORKDIR`. This also requires moving the `entrypoint.sh` from the root `/` directory to `/etc/zebrad` as this directory is used to save configuration, and other files.

An `APP_HOME` ARG is used as not all platforms where a Docker container is deployed allows writting permissions to the `/opt` directory. This allow some users to re-build the image with a custom `WORKDIR`

* fix(docker): allow starting the container without a `zebrad` command

As `gosu` is just required and available in our `runtime` image, trying to run `docker run -it --rm  --name tests -t zfnd/zebra:<pr> /bin/bash` in other stages will fail, as `gosu` is not available.
2024-08-29 19:57:17 +00:00
Arya bf4d253897
Updates checkpoints (#8811) 2024-08-28 01:41:28 +00:00
Arya 8b1be8846e
chore: Release v1.9.0 (#8734)
* Updates `EOS_PANIC_AFTER` end of support constant from 16 weeks to 14 weeks, so the Mainnet panic height is just before the second halving and end of the current dev fund.

* version bumps

* Updates CHANGELOG.md

* Updates changelog

* updates end of support time to 10 weeks

* Adds a note to the changelog about recovering after finalizing blocks from a fork

* Add new changes on main to CHANGELOG.md

* Updates ESTIMATED_RELEASE_HEIGHT

* Apply suggestions from code review

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

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

---------

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2024-08-28 01:07:37 +00:00
Arya adde5c92f3
change(consensus/network): Updates `CURRENT_NETWORK_PROTOCOL_VERSION` and adds an NU6 activation height on Testnet (#8804)
* Updates CURRENT_NETWORK_PROTOCOL_VERSION and adds an NU6 activation height on Testnet

* Updates post-NU6 funding stream start height on Testnet

* updates snapshots

* updates snapshot
2024-08-27 23:24:33 +00:00
Alfredo Garcia 6922e7126c
build(deps): Upgrade ECC dependencies (#8810)
* upgrade ECC depenencies

* update deny.toml
2024-08-27 23:24:28 +00:00
Gustavo Valverde ec85aa8a48
fix(docker): add `gosu` and remove unsupported flag in `adduser` (#8808)
* fix(docker): typo and uknown option in debian

* fix(docker): use `gosu` for rootless execution

Some of our entrypoint commands requires creating directories and files in places a non-privileged user can't access.

So we use `gosu` to step down from `root` to a non-privileged user during container startup, right at our application execution.
2024-08-27 21:29:50 +00:00
Gustavo Valverde 0d36681d8f
fix(docker): do not run the Zebra nodes with the root user (#8803) 2024-08-27 11:55:24 +00:00
dependabot[bot] cdf73b2c26
build(deps): bump the devops group with 3 updates (#8789)
Bumps the devops group with 3 updates: [google-github-actions/auth](https://github.com/google-github-actions/auth), [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [codespell-project/actions-codespell](https://github.com/codespell-project/actions-codespell).


Updates `google-github-actions/auth` from 2.1.4 to 2.1.5
- [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.1.4...v2.1.5)

Updates `tj-actions/changed-files` from 44.5.2 to 45.0.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/v44.5.2...v45.0.0)

Updates `codespell-project/actions-codespell` from 2.0 to 2.1
- [Release notes](https://github.com/codespell-project/actions-codespell/releases)
- [Commits](https://github.com/codespell-project/actions-codespell/compare/v2.0...v2.1)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  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
- dependency-name: codespell-project/actions-codespell
  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-08-27 11:38:14 +00:00
Gustavo Valverde 6cf34b25ff
feat(docker): Add SBOM and provenance attestations (#8802)
This adds metadata about the contents of our image, what it contains, and how it was built.
2024-08-26 17:56:09 +00:00
Tomek Piotrowski 37de457f2b
build(deps): make librustzcash crates workspace dependencies (#8792)
* build(deps): make librustzcash crates workspace dependencies

Fixes #8791

* add duplicated dependencies to deny.toml
2024-08-24 00:55:57 +00:00
Alfredo Garcia cccf98bbfa
fix sample configurations in the custom testnet book documentation (#8794) 2024-08-21 21:11:54 +00:00
Alfredo Garcia 79f565cd34
fix openapi tool output order (#8785) 2024-08-20 22:13:34 +00:00