Commit Graph

5267 Commits

Author SHA1 Message Date
Arya 0b835f1f05
Adds Sapling HRPs as fields on testnet params. (#8398) 2024-04-18 00:39:16 +02:00
Arya 868535b54c Merge branch 'main' into activ-heights-param-impl 2024-04-17 11:13:54 -04: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 1dfad530b1 Simplifies the `ParametersBuilder::activation_heights()` method and removes an unnecessary test. 2024-04-12 18:15:52 -04:00
Arya 0abe87312b panics if any network upgrades are configured to activate at Height(0) because it's reserved for Genesis 2024-04-12 17:36:07 -04:00
Arya a37510a67b 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 2024-04-12 17:19:34 -04:00
Arya f724c0188f Adds a DNetworkUpgradeActivationHeights struct for better control over how activation heights can be configured 2024-04-12 16:18:41 -04: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
Arya 325a6c6154 checks that the miner address is of TestnetKind on Regtest and update assertion message 2024-04-12 15:04:51 -04:00
Arya e697d36dee Updates `NetworkUpgrade::activation_height()` to return the height of the next NetworkUpgrade if it doesn't find the activation height of `&self` 2024-04-11 23:38:51 -04:00
Arya 3952caa022 check that activation heights are in the right order 2024-04-11 23:06:53 -04:00
Arya 0fd4158dad small refactor of activation_heights() method 2024-04-11 22:29:52 -04:00
Arya 93c7a58330 - 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
2024-04-11 22:07:20 -04: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
Arya 997e265636 fixes doc links 2024-04-11 16:47:19 -04:00
Arya 2493e7ec76 Adds a test for the Parameters impl for zebra_chain::Network 2024-04-11 16:37:13 -04:00
Arya 080affd6d7 fixes a bad merge (removes a network conversion in zcash_note_encryption) 2024-04-11 15:52:20 -04:00
Arya 4347a80c24 Passes &Network directly instead of converting to zp_consensus::Network where there were conversions 2024-04-11 15:47:19 -04:00
Arya ad4e7dcf8a implement Parameters for Network 2024-04-11 15:47:19 -04:00
Arya b9bdf0527c updates stored test config, adds a quicker test for checking that stored configs can be parsed, adds an intermediate representation of activation heights 2024-04-11 15:47:19 -04:00
Arya 60248e3f1f adds activation heights field 2024-04-11 15:45:17 -04:00
Arya eca7f6b677
Merge branch 'main' into network-params 2024-04-11 14:07:02 -04:00
Arya 365b58ea3f Rename `NetworkParameters` to `Parameters` and move it a new `testnet` module 2024-04-11 13:56:43 -04:00
Arya 86cd919135 Applies more suggestions from code review. 2024-04-11 13:39:04 -04:00
Arya ea2d001fdc use only test block heights for the network associated with them 2024-04-11 13:38:53 -04:00
Arya f04b94b13a rename `network` variables and method names typed as NetworkKind to `network_kind` 2024-04-11 12:43:11 -04:00
Arya fd3d50572c
Apply suggestions from code review
Co-authored-by: Marek <mail@marek.onl>
2024-04-11 12:36:30 -04:00
Alfredo Garcia 339a42f86d
change database logs to human readable forms (#8389) 2024-04-11 10:41:52 +00:00
Arya 05e41a2803 moves conversions to zcash_primitives::consensus::Network to where they're used. 2024-04-01 21:45:03 -04:00
Arya 574b1f9487 Applies more suggestions from code review. 2024-04-01 21:45:03 -04:00
Arya d108ec6355 returns b58 prefix constants directly to remove From<NetworkKind> impl for zcash_primitives::consensus::Network 2024-04-01 21:45:03 -04:00
Arya d5a807a508 Applies suggestions from code review 2024-04-01 21:45:03 -04:00
Arya cb8726b38a Applies some suggestions from code review 2024-04-01 21:45:03 -04:00
Arya 4900a20cad 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 2024-04-01 21:45:03 -04:00
Arya 06cf9474ce Adds `NetworkKind` and uses it instead of `Network` in `HistoryTreeParts` and `transparent::Address` 2024-04-01 21:45:03 -04:00
Arya 7533e2fbc0 Updates tests 2024-04-01 21:45:03 -04:00
Arya 4b86bd6952 Adds an empty NetworkParameters struct to Network::Testnet variant, updates production code. 2024-04-01 21:45:03 -04:00
Arya 9db4762751 minor cleanup and rename 2024-04-01 21:45:03 -04: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