Commit Graph

5265 Commits

Author SHA1 Message Date
teor ce22be37dc
change(docs): Add macOS M1 as a tier 3 supported platform (#7851)
* Add macOS M1 as a tier 3 supported platform

* Add apple machine brand name that users will know
2023-10-26 22:08:22 +00:00
Pili Guerra 64bf38c17c
Make macOS a tier 2 supported platform in the docs. closes #7824 (#7843) 2023-10-26 19:17:47 +00:00
Alfredo Garcia 879fd5f37e
Revert #6825 (#7834)
* revert #6825

* remove todo comment from CI
2023-10-26 12:48:09 +00:00
Marek 06ab529877
docs: Refactor the installation instructions for `s-nomp` (#7835)
* Remove references to `getblocktemplate-rpcs`

* Refactor the sync description

* Refactor the instructions for installing `s-nomp`

* Mention Node 10 instead of 8.11

* Refactor the description of Zebra's sync

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

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-26 00:06:40 +00:00
teor 71a9865b6c
remove(cmd): Remove `zebrad download` command, because it no longer does anything (#7819)
* Remove the `zebrad download` command

* Reorder command.rs imports

* Remove zcash-params/Dockerfile and the main Dockerfile commands that use it

* Stop building zcash-params Docker images in CI

* Update CHANGELOG for `zebrad download` removal

* Clarify why the image is smaller

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

---------

Co-authored-by: Marek <mail@marek.onl>
2023-10-25 23:42:27 +00:00
teor a126acb160
change(doc): Document state format upgrade implementation and testing (#7799)
* Explain verification modes

* Explain block write modes

* Expand upgrade goals

* Document testing requirements

* Update current format docs

* Move the detailed checklist to the ticket template

* Move an example back

* Reword confusing paragraphs

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

* Explain the difference between major and minor/patch versions

* Simplify upgrade wording

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

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2023-10-25 22:18:41 +00:00
dependabot[bot] b244d5628c
build(deps): bump tj-actions/changed-files from 39.2.3 to 39.2.4 (#7826)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.3 to 39.2.4.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v39.2.3...v39.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 22:00:04 +00:00
dependabot[bot] 06f381230a
build(deps): bump Swatinem/rust-cache from 2.7.0 to 2.7.1 (#7825)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.7.0...v2.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 21:59:53 +00:00
teor 0e00ef4f4f
Increase Docker unit test timeout (#7814) 2023-10-25 09:37:52 +00:00
Alfredo Garcia c173198d4f
docs(build): Add ECC dependencies documentation (#7794)
* add ecc dependencies documentation

* add `cargo deny` suggestion to deny.toml section

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

* change sententence syntax

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

* Apply suggestions from code review

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

* move consistency check

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: teor <teor@riseup.net>
2023-10-25 03:27:16 +00:00
teor ae10eafb57
Update Dockerfile features comment (#7815) 2023-10-25 02:38:34 +00:00
teor aad883b68a
change(consensus): Build Sprout and Sapling parameters into the zebrad binary, so a download server isn't needed (#7800)
* Build sapling parameters into zebrad

* Load the sapling parameters from wagyu-zcash-parameters

* Reword logs

* wget https://github.com/zcash/zcash/raw/master/src/rust/src/sprout-groth16.vk

* Load sprout from binary and remove download code

* Remove download examples binaries

* Remove unused features and dependencies

* Remove docs and comments about downloading parameters

* Add CHANGELOG entry

* Remove parameter cache steps in workflows

* Update comment about downloading

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

* Fix outdated timeout comments and short timeouts

---------

Co-authored-by: Marek <mail@marek.onl>
2023-10-24 23:27:24 +00:00
teor bb7eeb6f76
Document how to fix deny.toml warnings (#7806) 2023-10-24 13:12:57 +00:00
dependabot[bot] 37a3c2a511
build(deps): bump the formats group with 1 update (#7803)
Bumps the formats group with 1 update: [serde_with](https://github.com/jonasbb/serde_with).

- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.3.0...v3.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 19:19:08 +00:00
dependabot[bot] e56b66d182
build(deps): bump the app group with 1 update (#7802)
Bumps the app group with 1 update: [toml](https://github.com/toml-rs/toml).

- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.2...toml-v0.8.3)

---
updated-dependencies:
- 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-23 19:18:56 +00:00
teor b04cca9ec5
change(dev doc): Document how to change branch protection rules (#7773)
* Document branch protection rules

* Document automatic jobs for new crates

* Link to patch workflow docs

* Update book/src/dev/continuous-integration.md

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

---------

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: Marek <mail@marek.onl>
2023-10-22 15:40:19 +00:00
teor 60b447bef2
change(ci): Remove duplicate CI jobs for getblocktemplate-rpcs (#7753)
* Remove duplicate CI docker job and make features consistent

* Remove duplicate OS job

* Rename experimental release build

* Make Rust features into GitHub repository variables

* Remove redundant features in entrypoint.sh

* Remove a dependency on a deleted job

* Fix syntax of array

* Another fix attempt

* Undo some accidental merge overwrites

* Add missing space

* Explain how default is implemented

* Fix missing --features and quoting

* We can fix this later

* Use vars directly in with: blocks

* Use correct features for fake activation heights test
2023-10-22 15:40:10 +00:00
teor 92f473240b
change(docs): Add changelog entry for stable mining feature (#7788)
* Add changelog entry for stable mining feature

* Fix typos and clarify

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

* Update mining section in README.md

* Add missing word

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

---------

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Arya <aryasolhi@gmail.com>
2023-10-20 17:31:04 +00:00
Arya 06a29831e2
cleanup(state): Refactor subtree read functions to accept ranges and check memory first (#7739)
* refactors sapling_subtrees to use ranges

* refactor orchard_subtrees() to use ranges

* Restores check for inconsistent subtree roots

* updates vectors tests

* Applies some suggestions from code review and adds `read::tree::subtrees` function

* updates correctness comment & db read method names

* adds test_subtrees

* tests in-memory reads

* test that subtree read fns work right with excluded start bound

* applies suggestions from code review

* Applies suggestions from code review.

* Updates docs applying suggestion from code review

* adds new arg to zs_range_iter calls
2023-10-20 05:06:05 +00:00
Alfredo Garcia 9c993f82e2
build(deps): bump ECC dependencies (#7784)
* bump the versions

* replace `is_odd()` with `is_right_child()`

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-20 02:12:02 +00:00
Arya 56e6305f04
change(state): Set iterator read bounds where possible in DiskDb (#7731)
* Adds zs_iter_opts method

* uses checked_add

* uses zs_range_iter for other read methods

* fixes bug

* Fixes bug in zs_iter_opts

* Adds test & updates method docs

* updates docs

* Update zebra-state/src/service/finalized_state/disk_db/tests.rs

* Corrects code comment

* adds support for variable-sized keys

* adds test case

* Updates docs

* Applies suggestions from code review

* Add extra checks

* Fix test code and rustfmt

* fixes test

* fixes test

* adds reverse arg to new zs_range_iter calls

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-20 00:44:48 +00:00
teor ab3ce9a277
Fix an incorrect consensus-critical comment (#7774)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-10-19 22:18:22 +00:00
dependabot[bot] 126b5ad93e
build(deps): bump shimataro/ssh-key-action from 2.5.1 to 2.6.1 (#7767)
Bumps [shimataro/ssh-key-action](https://github.com/shimataro/ssh-key-action) from 2.5.1 to 2.6.1.
- [Release notes](https://github.com/shimataro/ssh-key-action/releases)
- [Changelog](https://github.com/shimataro/ssh-key-action/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/shimataro/ssh-key-action/compare/v2.5.1...v2.6.1)

---
updated-dependencies:
- dependency-name: shimataro/ssh-key-action
  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-19 19:31:35 +00:00
dependabot[bot] 56e48eea2f
build(deps): bump actions/checkout from 4.1.0 to 4.1.1 (#7766)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.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.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  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-19 17:05:38 +00:00
teor 64f777274c
fix(security): fix concurrency issues in tree key formats, and CPU usage in genesis tree roots (#7392)
* Add tree key format and cached root upgrades

* Document the changes in the upgrades

* Remove unnecessary clippy::unwrap_in_result

* Fix database type

* Bump state version

* Skip some checks if the database is empty

* Fix tests for a short state upgrade

* Disable format checks in some tests

* Document state performance issues

* Clarify upgrade behaviour

* Clarify panic messages

* Delete incorrect genesis trees write code

* Fix metrics handling for genesis

* Remove an unused import

* Explain why genesis anchors are ok

* Update snapshots

* Debug a failing test

* Fix some tests

* Fix missing imports

* Move the state check in a test

* Fix comment and doc typos

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Arya <aryasolhi@gmail.com>

* Clarify what a long upgrade is

* Rename unused function arguments

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

* Add all_unordered log regex matching methods

* Fix timing issues with version upgrades and other logs

* Fix argument name in docs

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

* Explain match until first for all regexes behaviour better

---------

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Arya <aryasolhi@gmail.com>
2023-10-19 14:50:46 +00:00
teor 8c01fecc91
Limit jobs launched by the crates workflow (#7754) 2023-10-19 13:41:23 +00:00
dependabot[bot] 92a074abdf
build(deps): bump tj-actions/changed-files from 39.2.1 to 39.2.3 (#7768)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39.2.1 to 39.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/v39.2.1...v39.2.3)

---
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-19 13:41:10 +00:00
teor 2f14efac24
fix(ci): Add missing timeouts to CI and CD tests (#7730)
* Add missing timeouts to CI and CD tests

* Remove timeout keys that are not allowed by the syntax
2023-10-19 12:30:53 +00:00
Gustavo Valverde d6f4d31706
ref(workflows): use a single job to run GCP tests (#7682)
* ref(workflows): consolidate workflows based on their purpose

This also renames the workflows to make their naming more consistent and adding a naming convention

Fixes: #6166
Fixes: #6167

* fix(workflows): use correct name for patch

* fix(workflow): docker unit tests

* fix(release): validation error

Error:
```
Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}
```

Fixes: https://github.com/release-drafter/release-drafter/issues/1125

* fix(workflows): reference correct name

* fix: remove extra workflow

* fix(workflows): use larger runners

* fix(workflow): remove code already in docker unit-test

* fix(unit-tests): start zebra the right way

* fix: typo in patch name

* chore: move job to logical order

* imp(workflows): use better name for gcp tests

* ref(workflow): use a single job to run GCP tests

* fix(ci): do not format existing cached states if required

* test: wait for the instance to be fully ready

* fix(ci): use correct logic before formating

* fix: use correct condition

* fix: get more information

* fix(ci): use better shell handling and upgrade OS

* fix(ci): use better approach

* fix: `$DISK_OPTION` is not being correctly passed

* fix typo

* fix: more typos

* fix: use busybox

* fix: mount Docker volume at run and not before

* fix: use correct condition and simpler while

* add: missing merge changes

* chore: use better name for find-disks

* fix(ci): use the `entrypoint.sh` to change the Network

* fix(ci): add missing `ZEBRA_CONF_PATH` variable

* fix(ci): considerate new updates to jobs

* fix(ci): allow to build the entrypoint file with testnet

* fix(entrypoint): allow to create a dir and file with a single variable

* fix(ci): add missing jobs to `failure-issue`

* Apply suggestions from code review

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

* fix(ci): use better comment

* refactor: test config file in CI and CD with a reusable workflow

* fix(ci): wrong name used

* fix(ci): use checkout

* fix(ci): improve docker config tests

* fix(ci): use better name for protection rules

* chore: missing merge conflicts

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-19 11:52:14 +00:00
teor 290ccf2d94
Update README.md for known progress bar issue (#7761) 2023-10-18 15:20:54 +00:00
Arya 01168c8571
change(state): Set upper bound when reading from deleting column family tx_loc_by_transparent_addr_loc (#7732)
* Uses range_iter in address_transaction_locations

* Uses range_iter in address_transaction_locations

* uses u16::MAX instead of usize::MAX

* Moves limit code into method

* adds allow(dead_code)

* Simplifies address_iterator_range

* Moves test state init out of loop

* Updates docs
2023-10-18 06:16:29 +00:00
Gustavo Valverde fc0133e886
ref(workflows): consolidate workflows based on their purpose (#7616)
* ref(workflows): consolidate workflows based on their purpose

This also renames the workflows to make their naming more consistent and adding a naming convention

Fixes: #6166
Fixes: #6167

* fix(workflows): use correct name for patch

* fix(workflow): docker unit tests

* fix(release): validation error

Error:
```
Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}
```

Fixes: https://github.com/release-drafter/release-drafter/issues/1125

* fix(workflows): reference correct name

* fix: remove extra workflow

* fix(workflows): use larger runners

* fix(workflow): remove code already in docker unit-test

* fix(unit-tests): start zebra the right way

* fix: typo in patch name

* chore: move job to logical order

* imp(workflows): use better name for gcp tests

* add: missing merge changes

* chore: use better name for find-disks

* fix(ci): use the `entrypoint.sh` to change the Network

* fix(ci): add missing `ZEBRA_CONF_PATH` variable

* fix(ci): allow to build the entrypoint file with testnet

* fix(entrypoint): allow to create a dir and file with a single variable

* refactor: test config file in CI and CD with a reusable workflow

* fix(ci): wrong name used

* fix(ci): use checkout

* fix(ci): improve docker config tests

* fix(ci): use better name for protection rules

* Fix changed workflow file name in docs patch file

* Apply suggestions from code review

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

* fix(cd): depend on file tests

* fix(docs): adapt to new workflow name

* fix: revert test coverage on CD

* chore: reduce diff

* fix(ci): allow using variable images for reusable workflows

* fix(dockerfile): use variables or default for config path and file

* fix(entrypoint): if `$ZEBRA_CONF_PATH` is set, do not override it

* Fix patch job names and remove failure job testnet dependencies

---------

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Arya <aryasolhi@gmail.com>
2023-10-18 06:16:02 +00:00
teor 08ce2ad500
feature(mining): Enable mining RPCs by default in production builds (#7740)
* Enable getblocktemplate-rpcs in production builds

* Update mining instructions

* Consistently use ZF funding stream addresses in examples

* Simplify skip_getblocktemplate()

* Set the test miner address based on the network

* Correctly skip checks in lightwalletd send transactions test

* Wait longer for transaction query

* Wait longer before re-checking the mempool

* Skip mempool checks if it wasn't queried by lightwalletd

* rustfmt

* clippy and rustfmt

* Fix attribute issue

* Fix typo

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

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2023-10-18 04:15:17 +00:00
teor bea90dfd62
change(doc): Add instructions for new placeholder crates (#7751)
* Add instructions for new placeholder crates

* minor changes

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-10-17 21:54:01 +00:00
dependabot[bot] 51bb15c339
build(deps): bump the data-structures group with 1 update (#7747)
Bumps the data-structures group with 1 update: [bitflags](https://github.com/bitflags/bitflags).

- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.0...2.4.1)

---
updated-dependencies:
- dependency-name: bitflags
  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: Alfredo Garcia <oxarbitrage@gmail.com>
2023-10-17 04:01:19 +00:00
teor 2a077f21c7
fix(ci): Skip mempool checks if it wasn't queried by lightwalletd (#7744)
* Correctly skip checks in lightwalletd send transactions test

* Wait longer for transaction query

* Wait longer before re-checking the mempool

* Skip mempool checks if it wasn't queried by lightwalletd

* rustfmt

* clippy and rustfmt

* Fix attribute issue
2023-10-17 02:56:00 +00:00
dependabot[bot] 5b9877a520
build(deps): bump the formats group with 1 update (#7746)
Bumps the formats group with 1 update: [regex](https://github.com/rust-lang/regex).

- [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.0...1.10.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 00:25:55 +00:00
Marek 13230d09fe
chore: Release v1.3.0 (#7610)
* Update `CHANGELOG.md`

* Apply suggestions from code review

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

* Group together test PRs for `z_getsubtreesbyindex`

* chore: Release

* Update the end of support height

* Add progress bars changelog entry

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

* Update `CHANGELOG.md`

* Update `CHANGELOG.md`

* Update `README.md`

* Update `ESTIMATED_RELEASE_HEIGHT`

Set the release height to start on ~ Monday, 2023-10-16.

* Update CHANGELOG.md

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

* Remove changelog entries invisible to users

---------

Co-authored-by: teor <teor@riseup.net>
2023-10-16 23:04:33 +00:00
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