Commit Graph

5238 Commits

Author SHA1 Message Date
Marek 2ba837470e
Bump `chrono` from 0.4.34 to 0.4.38 (#8400)
* Bump `chrono` from 0.4.34 to 0.4.38

* Stop using the deprecated `from_timestamp_opt`

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-04-19 23:23:57 +00:00
dependabot[bot] f1334a8378
build(deps): bump the devops group with 2 updates (#8408)
Bumps the devops group with 2 updates: [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) and [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install).


Updates `reviewdog/action-actionlint` from 1.43.0 to 1.44.0
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.43.0...v1.44.0)

Updates `baptiste0928/cargo-install` from 3.0.1 to 3.1.0
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v3.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: baptiste0928/cargo-install
  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-04-19 09:25:56 +00:00
Arya f8c153991b
add(consensus): Add `activation_heights` field to `NetworkParameters` and implement `Parameters` for `Network` (#8383)
* minor cleanup and rename

* Adds an empty NetworkParameters struct to Network::Testnet variant, updates production code.

* Updates tests

* Adds `NetworkKind` and uses it instead of `Network` in `HistoryTreeParts` and `transparent::Address`

* Adds a [network.testnet_parameters] section to the config, uses `NetworkKind` as zebra_network::Config::network field type, and converts 'Network' to `NetworkKind` before serializing

* Applies some suggestions from code review

* Applies suggestions from code review

* returns b58 prefix constants directly to remove From<NetworkKind> impl for zcash_primitives::consensus::Network

* Applies more suggestions from code review.

* moves conversions to zcash_primitives::consensus::Network to where they're used.

* Apply suggestions from code review

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

* rename `network` variables and method names typed as NetworkKind to `network_kind`

* use only test block heights for the network associated with them

* Applies more suggestions from code review.

* Rename `NetworkParameters` to `Parameters` and move it a new `testnet` module

* adds activation heights field

* updates stored test config, adds a quicker test for checking that stored configs can be parsed, adds an intermediate representation of activation heights

* implement Parameters for Network

* Passes &Network directly instead of converting to zp_consensus::Network where there were conversions

* fixes a bad merge (removes a network conversion in zcash_note_encryption)

* Adds a test for the Parameters impl for zebra_chain::Network

* fixes doc links

* - Makes the `activation_heights` config field optional by adding a #[serde(default)]
- Panics if a non-zero activation height is provided for the `Genesis` network upgrade
- Always sets the `Genesis` and `BeforeOverwinter` network upgrade activation heights to 0 and 1, `BeforeOverwinter` could be overwritten by a later network upgrade
- Makes the `activation_heights` field on `Parameters` private, adds/uses an accessor method instead, and adds a builder struct and `build()` method

* small refactor of activation_heights() method

* check that activation heights are in the right order

* Updates `NetworkUpgrade::activation_height()` to return the height of the next NetworkUpgrade if it doesn't find the activation height of `&self`

* checks that the miner address is of TestnetKind on Regtest and update assertion message

* Adds a DNetworkUpgradeActivationHeights struct for better control over how activation heights can be configured

* moves all ordered network upgrades to a constant, adds a no_duplicates test, moves struct with activation heights outside deserialization impl and accepts it in `ParametersBuilder::activation_heights()` instead of a Vec

* panics if any network upgrades are configured to activate at Height(0) because it's reserved for Genesis

* Simplifies the `ParametersBuilder::activation_heights()` method and removes an unnecessary test.

* Adds Sapling HRPs as fields on testnet params. (#8398)

* Applies suggestions from code review.

* Update zebra-chain/src/parameters/network_upgrade.rs

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-04-19 01:20:34 +00:00
Alfredo Garcia 887d4a2457
fix(beta-toolchain): Warnings (#8404)
* fix beta imports and other warnings

* clippy lints beta

* move attributes to after docs

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

* move some code to test module

* implement display instead of direct tostring for LongPollId

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

* fix typo

---------

Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Arya <aryasolhi@gmail.com>
2024-04-18 01:45:22 +00:00
Alfredo Garcia 2995ea087b
send ping to ES server before inserting data (#8409) 2024-04-17 19:09:16 +00:00
Arya 16a39f89d0
add(consensus/network): Add an empty `Parameters` struct in `Network::Testnet` (#8368)
* minor cleanup and rename

* Adds an empty NetworkParameters struct to Network::Testnet variant, updates production code.

* Updates tests

* Adds `NetworkKind` and uses it instead of `Network` in `HistoryTreeParts` and `transparent::Address`

* Adds a [network.testnet_parameters] section to the config, uses `NetworkKind` as zebra_network::Config::network field type, and converts 'Network' to `NetworkKind` before serializing

* Applies some suggestions from code review

* Applies suggestions from code review

* returns b58 prefix constants directly to remove From<NetworkKind> impl for zcash_primitives::consensus::Network

* Applies more suggestions from code review.

* moves conversions to zcash_primitives::consensus::Network to where they're used.

* Apply suggestions from code review

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

* rename `network` variables and method names typed as NetworkKind to `network_kind`

* use only test block heights for the network associated with them

* Applies more suggestions from code review.

* Rename `NetworkParameters` to `Parameters` and move it a new `testnet` module

---------

Co-authored-by: Marek <mail@marek.onl>
2024-04-17 02:20:34 +00:00
Marek 5fd15a022c
build(deps): bump the prod group with 21 updates (#8402)
* Bump `clap` from 4.5.3 to 4.5.4

* Bump `indexmap` from 2.2.5 to 2.2.6

* Bump `rayon` from 1.9.0 to 1.10.0

* Bump `tokio` from 1.36.0 to 1.37.0

* Bump `tokio-stream` from 0.1.14 to 0.1.15

* Bump `regex` from 1.10.3 to 1.10.4

* Bump `insta` from 1.36.1 to 1.38.0

* Bump `serde_json` from 1.0.113 to 1.0.115

* Bump `prost` from 0.12.2 and 0.12.3 to 0.12.4

* Bump `bitflags` from 2.4.2 to 2.5.0

* Bump `bs58` from 0.5.0 to 0.5.1

* Bump `incrementalmerkletree` from 0.5.0 to 0.5.1

* Bump `zcash_address` from 0.3.1 to 0.3.2

* Bump `bytes` from 1.5.0 to 1.6.0

* Bump `syn` from 2.0.53 to 2.0.58

* Bump `quote` from 1.0.35 to 1.0.36

* Bump `serde_yaml` from 0.9.33 to 0.9.34+deprecated

* Bump `primitive-types` + `zcash_history`

* Bump `jsonrpc` from 0.17.0 to 0.18.0
2024-04-17 02:20:28 +00:00
Arya 1498f8e24e
Release v1.6.1 (#8396)
* Updates crates versions

* Updates end of support height

* Updates README

* Updates CHANGELOG

* Updates Known Issues in README

* Updates Changelog

* updates release-crates-dry-run.sh

* updates install.md and docker.md

* Update CHANGELOG.md

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-04-15 23:24:40 +00:00
dependabot[bot] 153444234b
build(deps): bump the devops group with 2 updates (#8391)
Bumps the devops group with 2 updates: [codecov/codecov-action](https://github.com/codecov/codecov-action) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `codecov/codecov-action` from 4.1.1 to 4.3.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.1.1...v4.3.0)

Updates `tj-actions/changed-files` from 44.0.0 to 44.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/v44.0.0...v44.0.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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>
2024-04-15 06:51:56 +00:00
Arya ad34585590
add(rpc): Add block times to verbose output of `getblock` RPC method (#8384)
* Returns block times from the getblock RPC when used with verbosity = 1 (it's already included with verbosity = 0 but this makes it easier to use).

* cleanup/refactor, adds MapServerError and OkOrServerError traits

* moves rpc error conversion traits to their own module

* Only returns block time for verbosity = 2, updates snapshots
2024-04-12 20:07:44 +00:00
dependabot[bot] 4241e320b8
build(deps): bump h2 from 0.3.24 to 0.3.26 (#8386)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 00:52:33 +00:00
Arya e9979b6403
Updates checkpoints (#8394) 2024-04-11 22:52:27 +00:00
Alfredo Garcia 339a42f86d
change database logs to human readable forms (#8389) 2024-04-11 10:41:52 +00:00
Elijah Hampton 49fca309cf
Adds logging of column family size and database size on startup and s… (#8336)
* Adds logging of column family size and database size on startup and shutdown

* Changes log level of column families size strings to debug. Adds TODO comment to use human_bytes crate for human-readable format of metrics. Adds print_db_metrics function to ZebraDb struct.

* Calls enumerate() on column_families to access index var

* Resolves cargo fmt checker results

* Resolves clippy lint

* Runs and fixes changes from fmt, clippy, check and test

* Removes prop.txt

* minor doc changes

---------

Co-authored-by: Elijah Hampton <elijahhampton@MBP-de-Elijah-2.lan>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-03-29 00:00:28 +00:00
dependabot[bot] 7723736736
build(deps): bump the devops group with 2 updates (#8381)
Bumps the devops group with 2 updates: [codecov/codecov-action](https://github.com/codecov/codecov-action) and [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `codecov/codecov-action` from 4.1.0 to 4.1.1
- [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.1.0...v4.1.1)

Updates `tj-actions/changed-files` from 43.0.0 to 44.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/v43.0.0...v44.0.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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>
2024-03-27 15:59:30 +00:00
Arya c54fb84c97
makes some service requests in `getblock` method in parallel (#8376)
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-03-26 11:04:13 +00:00
dependabot[bot] 24914edda9
build(deps): bump the devops group with 2 updates (#8369)
Bumps the devops group with 2 updates: [tj-actions/changed-files](https://github.com/tj-actions/changed-files) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `tj-actions/changed-files` from 42.1.0 to 43.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/v42.1.0...v43.0.0)

Updates `docker/build-push-action` from 5.2.0 to 5.3.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
  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>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-03-25 14:54:09 +00:00
Arya 949594c25a
fixes a new clippy warnings (#8373) 2024-03-25 12:57:08 +00:00
Marek f79fc6aa8e
Bump prod group (#8370) 2024-03-21 18:23:41 +00:00
idky137 4579722833
change(chain): Remove `Copy` trait impl from `Network` (#8354)
* removed derive copy from network, address and ledgerstate

* changed is_max_block_time_enforced to accept ref

* changed NetworkUpgrade::Current to accept ref

* changed NetworkUpgrade::Next to accept ref

* changed NetworkUpgrade::IsActivationHeight to accept ref

* changed NetworkUpgrade::TargetSpacingForHeight to accept ref

* changed NetworkUpgrade::TargetSpacings to accept ref

* changed NetworkUpgrade::MinimumDifficultySpacing_forHeight to accept ref

* changed NetworkUpgrade::IsTestnetMinDifficultyBlock to accept ref

* changed NetworkUpgrade::AveragingWindowTimespanForHeight to accept ref

* changed NetworkUpgrade::ActivationHeight to accept ref

* changed sapling_activation_height to accept ref

* fixed lifetime for target_spacings

* fixed sapling_activation_height

* changed transaction_to_fake_v5 and fake_v5_transactions_for_network to accept ref to network

* changed Input::vec_strategy to accept ref to network

* changed functions in zebra-chain/src/primitives/zcash_history.rs to accept ref to network

* changed functions in zebra-chain/src/history_tree.rs to accept ref to network

* changed functions in zebra-chain/src/history_tree.rs to accept ref to network

* changed functions in zebra-chain/src/primitives/address.rs to accept ref to network

* changed functions in zebra-chain/src/primitives/viewing_key* to accept ref to network

* changed functions in zebra-chain/src/transparent/address.rs to accept ref to network

* changed functions in zebra-chain/src/primitives/zcash_primitives.rs to accept ref to network

* changed functions in zebra-chain/src/primitives/zcash_note_encryption.rs to accept ref to network

* changed functions in zebra-chain/src/primitives/history_tree* to accept ref to network

* changed functions in zebra-chain/src/block* to accept ref to network

* fixed errors in zebra-chain::parameters::network

* fixed errors in zebra-chain::parameters::network

* fixed errors in zebra-chain

* changed NonEmptyHistoryTree and InnerHistoryTree to hold value instead of ref

* changed NonEmptyHistoryTree and InnerHistoryTree to hold value instead of ref

* fixed errors in zebra-chain/src/block/arbitrary.rs

* finished fixing errors in zebra-chain - all crate tests pass

* changed functions in zebra-state::service::finalized_state to accept &Network

* changed functions in zebra-state::service::non_finalized_state to accept &Network

* zebra-state tests run but fail with overflow error

* zebra-state tests all pass

* converted zebra-network -- all crate tests pass

* applied all requested changes from review

* converted zebra-consensus -- all crate tests pass

* converted zebra-scan -- all crate tests pass

* converted zebra-rpc -- all crate tests pass

* converted zebra-grpc -- all crate tests pass

* converted zebrad -- all crate tests pass

* applied all requested changes from review

* fixed all clippy errors

* fixed build error in zebrad/src/components/mempool/crawler.rs
2024-03-19 20:45:27 +00:00
dependabot[bot] 0c77b40ccc
build(deps): bump the devops group with 6 updates (#8347)
Bumps the devops group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.1` | `4.1.2` |
| [docker/login-action](https://github.com/docker/login-action) | `3.0.0` | `3.1.0` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `42.0.5` | `42.1.0` |
| [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) | `1.42.0` | `1.43.0` |
| [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install) | `3.0.0` | `3.0.1` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `5.1.0` | `5.2.0` |


Updates `actions/checkout` from 4.1.1 to 4.1.2
- [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.1...v4.1.2)

Updates `docker/login-action` from 3.0.0 to 3.1.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.0.0...v3.1.0)

Updates `tj-actions/changed-files` from 42.0.5 to 42.1.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/v42.0.5...v42.1.0)

Updates `reviewdog/action-actionlint` from 1.42.0 to 1.43.0
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.42.0...v1.43.0)

Updates `baptiste0928/cargo-install` from 3.0.0 to 3.0.1
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v3.0.0...v3.0.1)

Updates `docker/build-push-action` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: reviewdog/action-actionlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-patch
  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>
Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2024-03-19 15:34:01 +00:00
Alfredo Garcia c22404f639
fix openapi now showing up in book summary (#8357) 2024-03-18 22:05:22 +00:00
Pili Guerra 5b9e88f547
Project management action is no longer necessary (#8353) 2024-03-15 10:55:27 +00:00
Arya 5e86ebb699
fix(scan): Improve gRPC method errors and add timeout to scan service to avoid hanging (#8318)
* updates ScanTask.subscribe() to return rsp_tx instead of awaiting it, returns service errors from grpc methods

* Adds a timeout to scan service and improves error message when subscribe responders are dropped

* Returns an error from `RegisterKeys` svc request when no keys are registered

* tests register keys error message

* Adds test for timeouts

* adds TODOs for fixing bugs

* Orders scan service requests in scan method

* removes CheckKeyHashes request

* fixes bad merge conflict resolution

* update test to check downcast to Elapsed error

* update errors in scan method

* update error msg in register_keys method

* fixes compiler error
2024-03-14 20:27:33 +00:00
Alfredo Garcia 652b4c3263
add openapiu.md to the book summary (#8351) 2024-03-14 16:32:53 +00:00
Alfredo Garcia f2be73eebb
feat(rpc): OpenAPI spec (#8342)
* add an openapi generator

* fix run command

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

---------

Co-authored-by: Marek <mail@marek.onl>
2024-03-14 15:04:19 +00:00
dependabot[bot] 5d6fe9134f
build(deps): bump mio from 0.8.10 to 0.8.11 (#8339)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

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

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-03-14 13:19:17 +00:00
Arya 00a3120c7b
minor/trivial cleanup (#8348) 2024-03-14 11:54:01 +00:00
Za Wilcox 3bef54b764
change(consensus): Refactor production code for network consensus rules to `Network` methods (#8340)
* begin refactor suggested as "step 2": https://github.com/ZcashFoundation/zebra/issues/7968#issue-2003245309
Squashed from multiple commits to enable partial rebase

* break out more little traits

* add activation implementation leveraging From<Network> for lrz::cons::

* for transfer of ownership I cannot return a type that's owned by the method

* hrp_sapling_extended_full_viewing_key

* complete implementation of interface of Parameters on Network reuse Parameters on zcash Network where possible

* move doc-comments to trait declarations (from impls)

* Simplify/complete Parameters impl for Network

* Add checkpoint_list method, move documentation, etc

* move last match network to inside network method

* add back comment

* use zcash_address for parameter types in zebra-chain

* use inherent methods instead of big parameters passthrough

* revert to implementation of From on zcash_primitives::..::Network vs &zcash_prim...

* move match

* add test to block maximum time rule

* update changelog

* finish porting target_difficutly_limit

* remove obscelete code comment

* revert non-functional change

* finish migrating target_difficulty_limit, checkpoint_list

* update changelog

---------

Co-authored-by: Hazel OHearn <gygaxis@zingolabs.org>
2024-03-12 21:41:44 +00:00
idky137 9b91d4bc0e
change(tests): Remove Matches on Network From Tests (#8295)
* added functions for fetching block vectors

* inserted new network methods for vector fetching into zebra-chain

* changed tag back to test/feature=branch

* changed tag back to test/feature=branch

* changed tag back to test/feature=branch

* changed feature tag to proptest-impl, started implementing in zebra-consensus tests

* adding methods to zebra-consensus, lifetime error in src/transaction/tests.rs, needs refactoring

* finished adding methods to zebra-consensus

* finished adding new methods to zebrad

* added new methods to zebra-rpc and zebra-scan

* finished removing statements matching on Network from tests

* updated new error message

* changed get_block_bytes() and get_block_sapling_roots_bytes to return option and removed serialization error types as per requested changes in PR review

* removed match statements from zebra_chain::transaction::arbitrary::test_transactions() and new zebra-grpc tests

* moved zebra-chain::test_utils to zebra-chain::test

* removed get_ prefix from getter methods

* renamed zebra-chain::test to zebra-chain::tests

* renamed zebra-chain::test to zebra-chain::tests

* fixed clippy warnings

* changed block_map to return clone
2024-03-05 09:12:25 -05:00
Arya e64f3dcddd
add(test): Check that scan task removes keys, unify scan task acceptance tests, and add test to CI (#8308)
* merges scan task tests and checks that the scan task removes keys

* Adds test to CI

* Skip to expected block height and assert that the result is from that height

* Updates test docs and uses zebrad state path for scan cache

* Log "Zcash network: {network}" from scan task commands test
2024-03-04 21:25:50 +00:00
dependabot[bot] 6b4d61feb5
build(deps): bump the devops group with 5 updates (#8334)
Bumps the devops group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [google-github-actions/auth](https://github.com/google-github-actions/auth) | `2.1.1` | `2.1.2` |
| [actions/add-to-project](https://github.com/actions/add-to-project) | `0.5.0` | `0.6.0` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4.0.1` | `4.1.0` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `42.0.4` | `42.0.5` |
| [reviewdog/action-actionlint](https://github.com/reviewdog/action-actionlint) | `1.41.0` | `1.42.0` |


Updates `google-github-actions/auth` from 2.1.1 to 2.1.2
- [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.1...v2.1.2)

Updates `actions/add-to-project` from 0.5.0 to 0.6.0
- [Release notes](https://github.com/actions/add-to-project/releases)
- [Commits](https://github.com/actions/add-to-project/compare/v0.5.0...v0.6.0)

Updates `codecov/codecov-action` from 4.0.1 to 4.1.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.0.1...v4.1.0)

Updates `tj-actions/changed-files` from 42.0.4 to 42.0.5
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42.0.4...v42.0.5)

Updates `reviewdog/action-actionlint` from 1.41.0 to 1.42.0
- [Release notes](https://github.com/reviewdog/action-actionlint/releases)
- [Commits](https://github.com/reviewdog/action-actionlint/compare/v1.41.0...v1.42.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: devops
- dependency-name: actions/add-to-project
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: devops
- 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
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 00:49:43 +00:00
Gustavo Valverde 56fca2c9ee
ref(build)!: use official lightwallted image for CI (#8323) 2024-02-29 15:50:50 +00:00
Marek 6a6f2865d3
Refactor creating GCP disks (#8330) 2024-02-29 14:46:29 +00:00
Marek 58bfe974e1
chore: Release v1.6.0 (#8319)
* Prepare the CHANGELOG for v1.6.0

* chore: Release

* Set `ESTIMATED_RELEASE_HEIGHT` to 2_413_000

* Revert "chore: Release"

This reverts commit 5261e85c37.

* chore: Release

* Fix release-crates-dry-run

* Temporarily turn off bumps for `zebra-{scan,grpc}`

* Apply suggestions from code review

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

* Re-enable test bump for `zebra-scan`

* Re-enable test bumps for `zebra-{scan, grpc}`

* Turn off dry-run bumps for `zebra-{scan, grpc}`

* Re-enable bumps and disable dry-run publishing

* Re-enable dry-run publishing

* Exclude `zebra-scan` from publishing

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-23 23:28:44 +00:00
Marek c2cfde0749
chore: Update docs for building Zebra (#8315)
* Update build instructions with scanning enabled

* Remove `pkg-config` from build deps in README

I tried compiling Zebra with `--all-features` on a Linux machine without
`pkg-config` or `pkfgconf` (which is an alternative to `pkg-config`),
and it worked.

* Add `protoc` to build deps in README
2024-02-23 16:49:53 +00:00
bishopcheckmate d1d128ac15
chore: allow crater runs (#8171)
* chore(dev-deps): always specify the version for dev-dependencies

* test(tower-batch-control): remove zebra-consensus dev dependency

Copies the Ed25519Verifier code directly to tower-batch-control tests

* test(zebra-consensus): update ed25519 verifier tests with ones from batch-control

* test(zebra-consensus): restore previous timeout values

The timeouts copied from tower-batch-control seems too low
and there must have been a reasoning why were they introduced

* chore: update dev-deps versions to beta.33

* chore(tower-batch-control): remove dev-dependency on metrics

* chore(tower-batch-control): remove zebra-chain dev-dependency

* Update zebra-scan/Cargo.toml

* bump all versions to match current release

* fix missed commas in version bumps

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
2024-02-23 12:47:10 +00:00
Arya 4ebd7a80d0
add(scan): Adds gRPC reflection and documents how to use the zebra-scan gRPC server (#8288)
* adds tonic-reflection

* adds listen_addr to log

* Adds user guide for scan server to zebra book

* fixes typo

* Applies suggestions from code review

* update link

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

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
2024-02-22 18:51:14 +00:00
Alfredo Garcia 790e4bd1b1
update dry-run release commands (#8298) 2024-02-22 12:41:28 +00:00
Marek 6b2768c021
chore: Update Checkpoints (#8309)
* Update Testnet checkpoints

* Update Mainnet checkpoints
2024-02-22 12:19:32 +00:00
Pili Guerra 9167093320
Update CONTRIBUTING.md (#8304)
We have deprecated the RFC process
2024-02-22 10:52:35 +00:00
Marek a6f8a9b192
Update `Cargo.lock` (#8310) 2024-02-22 01:20:05 +00:00
Gustavo Valverde d6314471b9
ref(docker): publish less tags in Docker Hub (#8300)
* ref(docker): publish less tags in Docker Hub

* fix: remove extra versions
2024-02-22 00:16:06 +00:00
Arya 5a9281a7a8
fix(scan): Fix minor concurrency bug in the `scan` gRPC method (#8303)
* update scan task to notify subscribe caller once the new subscribed_keys are sent on the watch channel

* Fixes timing bug in scan gRPC method:

Joins register/subscribe scan service calls, sends SubscribeResults request first, and filters out duplicate results from channel

* Removes outdated TODO

* wraps subscribed_keys in an Arc before sending to watch channel, fixes typo

* Remove result senders for keys that have been removed
2024-02-21 23:29:13 +00:00
dependabot[bot] c6b56b492a
build(deps): bump the devops group with 1 update (#8306)
Bumps the devops group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 42.0.2 to 42.0.4
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42.0.2...v42.0.4)

---
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-02-21 20:40:55 +00:00
Gustavo Valverde 1a0d5ffec7
fix(ci): keep `gcloud` arguments consistency (#8305)
* fix(ci): keep `gcloud` arguments consistency

* Fix the syntax for setting `DISK_OPTION`

---------

Co-authored-by: Marek <mail@marek.onl>
2024-02-21 13:53:51 +00:00
Alfredo Garcia 2f0b284997
tests(grpc): Unit tests (#8293)
* add grpc method unit tests

* add test module description

* runs tests in sequence, adds some messages to assertions, and minor cleanups (#8296)

* fix field name change

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2024-02-20 22:45:55 +00:00
Arya a7de137a7a
add(scan): Implement `scan` gRPC method (#8268)
* Adds scan method

* fix clippy warning

* Skip empty results and don't panic if the gRPC client disconnects

* moves `Results` request above `SubscribeResults` request to avoid duplicate results.

* returns early if there's a send error when sending initial results and updates response type

* move responder buffer size to const

* Adds a snapshot test for the `scan` method

* updates snapshots
2024-02-20 19:16:20 +00:00
dependabot[bot] 3a67e81300
build(deps): bump the devops group with 1 update (#8270)
Bumps the devops group with 1 update: [shimataro/ssh-key-action](https://github.com/shimataro/ssh-key-action).


Updates `shimataro/ssh-key-action` from 2.6.1 to 2.7.0
- [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.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: shimataro/ssh-key-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-02-20 10:40:46 +00:00
kai 6c0aa042ad
fix(docker): set log rotation to avoid docker bugs (#8269)
Containers can generate a significant amount of logs,
consuming disk space over time. Here I added configuration
for maximum log file size (max-size) and the number of retained
log files (max-file) in the logging driver options
to control disk usage and prevent log files from
growing indefinitely.
2024-02-20 10:40:38 +00:00