Commit Graph

668 Commits

Author SHA1 Message Date
teor 98c634bbee
fix(deps): Remove unused dependencies, and check for them in CI (#6216)
* Remove unused dependencies

* Check for newly unused dependencies in CI

* Use the correct grep command

* Always show cargo machete output

* Ignore cargo machete exit status, use grep instead

* Use if instead of && and subshells

* Invert if logic
2023-02-26 23:42:36 +00:00
Marek 9d2b912840
Release v1.0.0-rc.5 (#6213)
* Bump updated crates

* Bump crates that depend on updated crates

* Bump the user agent

* Bump `README.md`

* Bump `docker.md`

* Remove closed known issues from "README.md"

* Update `CHANGELOG.md`

* Apply suggestions from code review

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

* Remove the bump of `once_cell` from `CHANGELOG.md`

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-24 23:08:16 +00:00
Alfredo Garcia 668c42f366
add checkpoints 2023-02-22 (#6208) 2023-02-23 04:57:33 +00:00
teor 4daedbc789
fix(consensus): Check that Zebra's state contains the social consensus chain on startup (#6163)
* Allow missing docs directly on derived error types

* Make Request::BestChainBlockHash redirect to the ReadStateService

* Re-write the checkpoint_sync documentation based on the latest consensus rules

* Expose the underlying iterator for CheckpointList

* Validate existing state block hashes at startup, but ignore the result

* Monitor state block hash checkpoint task in the start command

* Fix indentation

* Make logging consistent

* Explain the config needed for full security

* Tidy required checkpoints docs, expand other docs

* Add security and deprecation changelog entries

* Replace task handle vector with a struct

* Add a test that this consensus-critical code actually runs and finishes

* Make some state methods and types available in tests

* Add missing docs

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-21 05:30:29 +00:00
dependabot[bot] e78c5c5d58
build(deps): bump once_cell from 1.17.0 to 1.17.1 (#6161)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.17.0 to 1.17.1.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.17.0...v1.17.1)

---
updated-dependencies:
- dependency-name: once_cell
  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-02-16 03:04:22 +00:00
dependabot[bot] 4eb27dda06
build(deps): bump blake2b_simd from 1.0.0 to 1.0.1 (#6143)
Bumps [blake2b_simd](https://github.com/oconnor663/blake2_simd) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases)
- [Commits](https://github.com/oconnor663/blake2_simd/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: blake2b_simd
  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-02-13 02:30:07 +00:00
teor 8c0176fca5
change(deps): Upgrade to the zcash_primitives 0.10 API (#6087)
* bump zcash_primitives and proofs to 0.10.0

* Update to latest Sapling API

* Update Cargo.lock
2023-02-06 15:23:13 +00:00
Conrado Gouvea 26c86cc088
use `reddsa` crate and remove duplicated RedPallas code (#6013)
* use `reddsa` crate and remove duplicated RedPallas code

* update old references to 'redpallas' crate

* Use reddsa 0.4.0

* update Cargo.lock

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Deirdre Connolly <durumcrustulum@gmail.com>
2023-02-01 23:27:28 +00:00
dependabot[bot] 3f66b82590
build(deps): bump futures from 0.3.25 to 0.3.26 (#6058)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.25...0.3.26)

---
updated-dependencies:
- dependency-name: futures
  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-02-01 08:55:37 +00:00
dependabot[bot] 7572d5b4e1
build(deps): bump futures-util from 0.3.25 to 0.3.26 (#6061)
Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.25...0.3.26)

---
updated-dependencies:
- dependency-name: futures-util
  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-02-01 01:01:50 +00:00
dependabot[bot] 9b61643df2
build(deps): bump tokio from 1.24.2 to 1.25.0 (#6050)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.2 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits/tokio-1.25.0)

---
updated-dependencies:
- dependency-name: tokio
  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-02-01 01:00:21 +00:00
teor 8390e4e0cd
refactor(state): Simplify difficulty and median-time-past state and mempool requests (#6031)
* Clarify function docs, rename variables, and fix log typos

* Add a ReadState best chain clone method, but don't use it yet

* Use the new calculate_median_time_past() function in existing code

* Skip a state request if the lock time is a height

* Remove dummy arguments and extra blocks from median-time-past calculation

* Update tests to remove requests that are no longer sent

* Simplify getting the best chain

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

* Clarify some function docs

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

* assigns `next_median_time_past` value from if statement

---------

Co-authored-by: Arya <aryasolhi@gmail.com>
2023-01-31 20:42:11 +00:00
teor 4dd9426e48
feat(rpc): Implement the `getblocksubsidy` RPC (#6032)
* Make it clearer that Zebra only supports transparent funding streams

* Initial getblocksubsidy RPC types and method, without ZEC conversion

* Add a ZEC fixed-point format wrapper to Amount

* Format getblocksubsidy fields in Zec

* Add snapshot tests for getblocksubsidy RPC

* Re-order RPC output to match zcashd

* Switch to formatting Zec with f64, because the getblocksubsidy RPC requires JSON numbers

* Sort RPC responses in zcashd funding stream order

* Add getblocksubsidy snapshots

* Fix a doc link

* Move Zec JSON formatter from zebra-chain to zebra-rpc

* Remove Ord impl for Zec, it's just for formatting

* Use fully-qualified path for serde derives

* Fix a clippy warning for the doc link fix

* Fix RPC comments and an error message

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

---------

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
2023-01-31 20:41:34 +00:00
Alfredo Garcia 9b1d26538a
Release v1.0.0-rc.4 (#6045)
* bump v1.0.0-rc.4

* Add new mainnet and testnet checkpoints generated using zcashd

* make changes to changelog from review

* move item to new section

* change section name

---------

Co-authored-by: teor <teor@riseup.net>
2023-01-31 04:53:27 +00:00
teor e20cf957e3
fix(consensus): Verify the lock times of mempool transactions (#6027)
* Implement the BestChainNextMedianTimePast state request

* Verify the lock times of mempool transactions

* Document that the mempool already handles lock time rejections correctly

* Fix existing tests

* Add new mempool lock time success and failure tests
2023-01-27 21:46:51 +00:00
Alfredo Garcia d72211fbbe
feat(zebra-checkpoints): make `zebra-checkpoints` work for zebrad backend (#5894)
* make `zebra-checkpoint` util work with zebra as the backend

* update snapshots

* update documentation

* applies suggestions from code review

* irefactor zebra-checkpoints to work with zebra using deserialization of the raw block

* fix imports and derives

* rename mode to backend

* remove old stuff

* fix docs

Co-authored-by: arya2 <aryasolhi@gmail.com>
2023-01-23 04:50:45 +00:00
Alfredo Garcia de2ed812f6
docs(command): zebra download (#5901)
* document zebra download command

* Apply suggestions from code review

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>

* iremove log

Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2023-01-19 05:21:19 +00:00
dependabot[bot] 2018d49907
build(deps): bump tokio from 1.24.1 to 1.24.2 (#5995)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-18 21:16:37 +00:00
teor 8c451968ee
fix(diagnostics): Hex-encode debug format of commitments, nonces, and nullifiers (#5960)
* Format commitments and nonces as hex

* Format Sprout and Sapling nullifiers as hex when debugging

* Format Sprout commitments as hex when debugging

* Format redpallas keys as hex when debugging

* Update code that we're going to delete in the next PR anyway
2023-01-17 13:57:22 +00:00
teor c2896cce4b
change(deps): Remove unused zebra-utils dependencies (#5961)
* Remove unused zebra-utils dependencies

* Cleanup zebra-checkpoints
2023-01-16 21:39:47 +00:00
Arya 3cbee9465a
change(rpc): Add proposal capability to getblocktemplate (#5870)
* adds ValidateBlock request to state

* adds `Request` enum in block verifier

skips solution check for BlockProposal requests

calls CheckBlockValidity instead of Commit block for BlockProposal requests

* uses new Request in references to chain verifier

* adds getblocktemplate proposal mode response type

* makes getblocktemplate-rpcs feature in zebra-consensus select getblocktemplate-rpcs in zebra-state

* Adds PR review revisions

* adds info log in CheckBlockProposalValidity

* Reverts replacement of match statement

* adds `GetBlockTemplate::capabilities` fn

* conditions calling checkpoint verifier on !request.is_proposal

* updates references to validate_and_commit_non_finalized

* adds snapshot test, updates test vectors

* adds `should_count_metrics` to NonFinalizedState

* Returns an error from chain verifier for block proposal requests below checkpoint height

adds feature flags

* adds "proposal" to GET_BLOCK_TEMPLATE_CAPABILITIES_FIELD

* adds back block::Request to zebra-consensus lib

* updates snapshots

* Removes unnecessary network arg

* skips req in tracing intstrument for read state

* Moves out block proposal validation to its own fn

* corrects `difficulty_threshold_is_valid` docs

adds/fixes some comments, adds TODOs

general cleanup from a self-review.

* Update zebra-state/src/service.rs

* Apply suggestions from code review

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

* Update zebra-rpc/src/methods/get_block_template_rpcs.rs

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

* check best chain tip

* Update zebra-state/src/service.rs

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

* Applies cleanup suggestions from code review

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-11 23:39:51 +00:00
teor 11baba56cb
Release Zebra 1.0.0-rc.3 (#5928)
* Changelog with trivial entries

* Delete trivial entries

* Summarise known issues in README, but don't change the list yet

* Add block timeouts to known issues

* Update the release template to add missing version files

* Bump crate versions

* Add the required Rust version to the release checklist

* Update the Rust version requirement to 1.65, Zebra now uses `let ... else ...`

* Update checkpoints

* Add checkpoints to the CHANGELOG

* Breaking Rust compiler version change

* Clarify the latest stable supported rust version
2023-01-10 03:48:03 +00:00
dependabot[bot] dbc3a070b1
build(deps): bump tokio from 1.23.1 to 1.24.1 (#5927)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.1 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.1...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 23:16:02 +00:00
dependabot[bot] 842365b5c8
build(deps): bump tokio from 1.23.0 to 1.23.1 (#5920)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.23.0...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 04:13:57 +00:00
teor 2f23de80f1
fix(clippy): Fix nightly clippy redundant code lints (#5916)
* Remove needless borrows

* Remove redundant into_iter()

* Remove unnecessary clone()
2023-01-05 15:46:04 +00:00
dependabot[bot] 53e836efdc
build(deps): bump once_cell from 1.16.0 to 1.17.0 (#5903)
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 04:23:09 +00:00
dependabot[bot] d9300a6c1b
build(deps): bump serde from 1.0.151 to 1.0.152 (#5898)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-27 19:46:22 +00:00
dependabot[bot] 5b8133bd02
build(deps): bump serde from 1.0.150 to 1.0.151 (#5877)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.150...v1.0.151)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 23:22:41 +00:00
dependabot[bot] 0eb944eec3
build(deps): bump thiserror from 1.0.37 to 1.0.38 (#5880)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.37 to 1.0.38.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.37...1.0.38)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 20:42:02 +00:00
teor b08a0b6f08
change(rpc): Match `zcashd`'s block template exactly (#5867)
* Make Zebra's getblocktemplate like zcashd's

* Update snapshots

* Add missing docs

* Fix typo

* Sort coinbase outputs by serialized script for zcashd

* Sort excluding the length byte, make transaction order always stable

* Update snapshots

* Explain that `zcashd` doesn't seem to have a fixed transaction order
2022-12-19 18:52:43 +00:00
dependabot[bot] 68d0c55894
build(deps): bump serde from 1.0.149 to 1.0.150 (#5846)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.149 to 1.0.150.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.149...v1.0.150)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 02:54:21 +00:00
teor ea64585c62
Refactor block subsidy to handle Height::MAX without panicking (#5787) 2022-12-13 00:59:52 +00:00
dependabot[bot] 75f2f02ef7
build(deps): bump rayon from 1.6.0 to 1.6.1 (#5845)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.0...rayon-core-v1.6.1)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 21:27:53 +00:00
Alfredo Garcia 12ff32f445
change(rpc): support transparent p2pkh miner addresses (#5827)
* support p2pkh miner address

* Tweak comments and log messages

* removes duplicate/unused method

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Arya <aryasolhi@gmail.com>
2022-12-09 05:17:55 +00:00
teor 2041fda7bb
fix(test): Reduce verbose test logs (#5825)
* Remove verbose continuous_blockchain test logs

* Downgrade verbose zebra-network logs to debug

* Downgrade some state logs to debug during tests

* Mark were we would add always-on log filters, if we needed to

* Reduce the number of mempool property tests, to reduce logging
2022-12-08 23:56:01 +00:00
teor 4078e244d3
fix(lint): Box large error types to resolve the clippy large result err variant lint (#5759)
* Box errors to deal with large error warnings, add accessor methods for error properties

* Remove or explain some large enum variant lints

* Turn some tickets into TODOs

* Allow missing docs on single-field error enum variants

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-08 06:11:33 +00:00
dependabot[bot] cefc98baac
build(deps): bump serde from 1.0.148 to 1.0.149 (#5788)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.149.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.148...v1.0.149)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 04:19:28 +00:00
teor 09836d2800
fix(clippy): Put Rust format variables inline (#5783)
* cargo clippy --fix --all-features --all-targets

With rustc 1.67.0-nightly (234151769 2022-12-03)

* cargo fmt --all
2022-12-08 01:05:57 +00:00
dependabot[bot] a5d04746a1
build(deps): bump tokio from 1.22.0 to 1.23.0 (#5802)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.22.0...tokio-1.23.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 22:38:28 +00:00
Deirdre Connolly cc6ff0f422
release(1.0.0-rc.2): updated versions and CHANGELOG.md (#5784)
* release(1.0.0-rc.2): updated versions and CHANGELOG.md

I haven't touched zebra-dependencies-for-audit.md.

* Update CHANGELOG.md

* Update CHANGELOG.md

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

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* update 1.0.0-rc.2 date

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

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

Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-06 21:35:44 +00:00
teor d778caebb8
change(rpc): Select getblocktemplate RPC transactions according to ZIP-317 (#5724)
* Split the conventional fee check into its own method

This will be used for block production and relaying

* Move getblocktemplate transaction selection into a new zip317 module

* Add a block_production_fee_weight field to VerifiedUnminedTx

* Add a custom Zebra minimum transaction weight for block production

* Implement ZIP-317 transaction selection for block production

* Split weighted index setup into its own function

* Split picking a transaction into its own function
2022-12-01 21:57:22 +00:00
teor b3faa750b9
Update checkpoints on 2022-12-01 (#5754) 2022-12-01 05:48:41 +00:00
Arya eb0a2ef581
change(mempool): Contextually validates mempool transactions in best chain (#5716)
* updates comments

* adds check nullifier no dup fns for transactions

* Adds:
- check::anchors fn for tx iter
- TODO comments for unifying nullifiers and anchors checks
- new state request

Updates unknown anchor errors to accomodate tx-only check

Calls new state fn from transaction verifier

* updates check::anchors fns to use transactions

updates TransactionContextualValidity request to check sprout anchors

adds comment mentioning TransactionContextualValidity ignores UTXOs

* conditions new state req call on is_mempool

updates tests

* fix doc link / lint error

* checks for duplicate nullifiers with closures

* Update zebra-state/src/service/check/nullifier.rs

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

* documents find_duplicate_nullifier params

moves if let statement into for loop

* renames new state req/res

* asserts correct response variant in tx verifier

* adds CheckBestChainTipShieldedSpends call in tx verifier to async checks

* re-adds tracing instrumentation to check::anchors fn

renames transaction_in_state to transaction_in_chain

* adds block/tx wrapper fns for anchors checks

* uses UnminedTx instead of transaction.hash()

deletes broken test

* updates new state req/res name

* updates tests and uses par_iter for anchors checks

* Updates check::anchors pub fn docs.

* Adds:
- comments / docs
- a TransactionError variant for ValidateContextError

* Apply suggestions from code review

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

* moves downcast to From impl

rustfmt

* moves the ValidateContextError into an Arc

updates comments and naming

* leaves par_iter for another PR

* puts io::Error in an Arc

* updates anchors tests to call tx_anchors check

* updates tests to call tx_no_duplicates_in_chain

slightly improves formatting

* Update zebra-consensus/src/error.rs

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

* moves Arc from HistoryError to ValidateContextError

Co-authored-by: teor <teor@riseup.net>
2022-11-30 04:40:15 +00:00
dependabot[bot] 9e0ee2d02c
build(deps): bump serde from 1.0.147 to 1.0.148 (#5730)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 23:11:19 +00:00
dependabot[bot] 92ae381207
build(deps): bump rayon from 1.5.3 to 1.6.0 (#5677)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.6.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 18:22:13 +00:00
dependabot[bot] a14ce26be4
build(deps): bump tokio from 1.21.2 to 1.22.0 (#5679)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.2 to 1.22.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.2...tokio-1.22.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-22 05:06:12 +00:00
Arya b722e223e3
build(deps): bump zcash_proofs from 0.8.0 to 0.9.0 and zcash_primitives from 0.8.1 to 0.9.0 (#5631)
* bump zcash_proofs from 0.8.0 to 0.9.0
bump zcash_primitives from 0.8.0 to 0.9.0

* update deny.toml to skip zcash_primitives 0.8.1

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-18 19:18:57 +00:00
dependabot[bot] 2680e3c6b2
build(deps): bump chrono from 0.4.22 to 0.4.23 (#5629)
* build(deps): bump chrono from 0.4.22 to 0.4.23

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.22 to 0.4.23.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.22...v0.4.23)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* uses Utx::timestamp_opt instead of timestamp

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: arya2 <aryasolhi@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-16 16:47:45 +00:00
Arya 862600a41e
change(consensus) verify that mempool transaction UTXOs are in the best chain (#5616)
* Uses BestChainUtxo to find utxos for mempool

* adds missing input test

* Apply suggestions from code review

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

* update other instances of the renamed InputNotFound error

* adds read::unspent_utxo fn

* adds test for success case

Co-authored-by: teor <teor@riseup.net>
2022-11-11 06:40:35 +00:00
teor 67b7325582
fix(consensus): Check network and P2SH addresses for mining config and funding streams (#5620)
* Check network and P2SH addresses for mining config and funding streams

* Inline format string variables
2022-11-11 03:42:05 +00:00