* Addresses clippy lints
* checks network magic and returns early from `is_regtest()`
* Moves `subsidy.rs` to `zebra-chain`, refactors funding streams into structs, splits them into pre/post NU6 funding streams, and adds them as a field on `testnet::Parameters`
* Replaces Vec with HashMap, adds `ConfiguredFundingStreams` type and conversion logic with constraints.
Minor refactors
* Empties recipients list
* Adds a comment on num_addresses calculation being invalid for configured Testnets, but that being okay since configured testnet parameters are checked when they're being built
* Documentation fixes, minor cleanup, renames a test, adds TODOs, and fixes test logic
* Removes unnecessary `ParameterSubsidy` impl for &Network, adds docs and TODOs
* Adds a "deferred" FundingStreamReceiver, adds a post-NU6 funding streams, updates the `miner_fees_are_valid()` and `subsidy_is_valid()` functions to check that the deferred pool contribution is valid and that there are no unclaimed block subsidies after NU6 activation, and adds some TODOs
* adds `lockbox_input_value()` fn
* Adds TODOs for linking to relevant ZIPs and updating height ranges
* Adds `nu6_lockbox_funding_stream` acceptance test
* updates funding stream values test to check post-NU6 funding streams too, adds Mainnet/Testnet NU6 activation heights, fixes lints/compilation issue
* Reverts Mainnet/Testnet NU6 activation height definitions, updates `test_funding_stream_values()` to use a configured testnet with the post-NU6 Mainnet funding streams height range
* reverts unnecessary refactor
* appease clippy
* Adds a test for `lockbox_input_value()`
* Applies suggestions from code review
* Fixes potential panic
* Fixes bad merge
* Update zebra-chain/src/parameters/network_upgrade.rs
* Updates acceptance test to check that invalid blocks are rejected
* Checks that the original valid block template at height 2 is accepted as a block submission
* Reverts changes for coinbase should balance exactly ZIP
* Add `Deferred` to `ValueBalance`
* Update snapshots
* Unrelated: Revise docs
* Add TODOs
* Stop recalculating the block subsidy
* Track deferred balances
* Support heights below slow start shift in halvings
* Fix `CheckpointVerifiedBlock` conversion in tests
* Allow deserialization of legacy `ValueBalance`s
* Simplify docs
* Fix warnings raised by Clippy
* Fix warnings raised by `cargo fmt`
* Update zebra-chain/src/block.rs
Co-authored-by: Arya <aryasolhi@gmail.com>
* Refactor docs around chain value pool changes
* updates test name
* Updates deferred pool funding stream name to "Lockbox", moves post-NU6 height ranges to constants, updates TODO
* Updates `get_block_subsidy()` RPC method to exclude lockbox funding stream from `fundingstreams` field
* Adds a TODO for updating `FundingStreamReceiver::name()` method docs
* Updates `FundingStreamRecipient::new()` to accept an iterator of items instead of an option of an iterator, updates a comment quoting the coinbase transaction balance consensus rule to note that the current code is inconsistent with the protocol spec, adds a TODO for updating the quote there once the protocol spec has been updated.
* Update zebra-consensus/src/checkpoint.rs
Co-authored-by: Arya <aryasolhi@gmail.com>
* Update docs for value balances
* Cleanup: Simplify getting info for FS receivers
* Avoid a panic when deserializing value balances
* Uses FPF Testnet address for post-NU6 testnet funding streams
* Updates the NU6 consensus branch id
* Update zebra-consensus/src/checkpoint.rs
* Bump the major database format version
* Add a database upgrade mark
* Fix tests after merge
* Improve docs
* Consolidate error handling for block subsidies
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
* Addresses clippy lints
* checks network magic and returns early from `is_regtest()`
* Moves `subsidy.rs` to `zebra-chain`, refactors funding streams into structs, splits them into pre/post NU6 funding streams, and adds them as a field on `testnet::Parameters`
* Replaces Vec with HashMap, adds `ConfiguredFundingStreams` type and conversion logic with constraints.
Minor refactors
* Empties recipients list
* Adds a comment on num_addresses calculation being invalid for configured Testnets, but that being okay since configured testnet parameters are checked when they're being built
* Documentation fixes, minor cleanup, renames a test, adds TODOs, and fixes test logic
* Removes unnecessary `ParameterSubsidy` impl for &Network, adds docs and TODOs
* Adds a "deferred" FundingStreamReceiver, adds a post-NU6 funding streams, updates the `miner_fees_are_valid()` and `subsidy_is_valid()` functions to check that the deferred pool contribution is valid and that there are no unclaimed block subsidies after NU6 activation, and adds some TODOs
* adds `lockbox_input_value()` fn
* Adds TODOs for linking to relevant ZIPs and updating height ranges
* Adds `nu6_lockbox_funding_stream` acceptance test
* updates funding stream values test to check post-NU6 funding streams too, adds Mainnet/Testnet NU6 activation heights, fixes lints/compilation issue
* Reverts Mainnet/Testnet NU6 activation height definitions, updates `test_funding_stream_values()` to use a configured testnet with the post-NU6 Mainnet funding streams height range
* reverts unnecessary refactor
* appease clippy
* Adds a test for `lockbox_input_value()`
* Applies suggestions from code review
* Fixes potential panic
* Fixes bad merge
* Update zebra-chain/src/parameters/network_upgrade.rs
* Updates acceptance test to check that invalid blocks are rejected
* Checks that the original valid block template at height 2 is accepted as a block submission
* Reverts changes for coinbase should balance exactly ZIP
* Add `Deferred` to `ValueBalance`
* Update snapshots
* Unrelated: Revise docs
* Add TODOs
* Stop recalculating the block subsidy
* Track deferred balances
* Support heights below slow start shift in halvings
* Fix `CheckpointVerifiedBlock` conversion in tests
* Allow deserialization of legacy `ValueBalance`s
* Simplify docs
* Fix warnings raised by Clippy
* Fix warnings raised by `cargo fmt`
* Update zebra-chain/src/block.rs
Co-authored-by: Arya <aryasolhi@gmail.com>
* Refactor docs around chain value pool changes
* updates test name
* Updates deferred pool funding stream name to "Lockbox", moves post-NU6 height ranges to constants, updates TODO
* Updates `get_block_subsidy()` RPC method to exclude lockbox funding stream from `fundingstreams` field
* Adds a TODO for updating `FundingStreamReceiver::name()` method docs
* Updates `FundingStreamRecipient::new()` to accept an iterator of items instead of an option of an iterator, updates a comment quoting the coinbase transaction balance consensus rule to note that the current code is inconsistent with the protocol spec, adds a TODO for updating the quote there once the protocol spec has been updated.
* Update zebra-consensus/src/checkpoint.rs
Co-authored-by: Arya <aryasolhi@gmail.com>
* Update docs for value balances
* Cleanup: Simplify getting info for FS receivers
* Avoid a panic when deserializing value balances
* Uses FPF Testnet address for post-NU6 testnet funding streams
* Updates the NU6 consensus branch id
* Update zebra-consensus/src/checkpoint.rs
* Bump the major database format version
* Add a database upgrade mark
* Fix tests after merge
* trigger GitHub actions
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
* Addresses clippy lints
* checks network magic and returns early from `is_regtest()`
* Moves `subsidy.rs` to `zebra-chain`, refactors funding streams into structs, splits them into pre/post NU6 funding streams, and adds them as a field on `testnet::Parameters`
* Replaces Vec with HashMap, adds `ConfiguredFundingStreams` type and conversion logic with constraints.
Minor refactors
* Empties recipients list
* Adds a comment on num_addresses calculation being invalid for configured Testnets, but that being okay since configured testnet parameters are checked when they're being built
* Documentation fixes, minor cleanup, renames a test, adds TODOs, and fixes test logic
* Removes unnecessary `ParameterSubsidy` impl for &Network, adds docs and TODOs
* Adds a "deferred" FundingStreamReceiver, adds a post-NU6 funding streams, updates the `miner_fees_are_valid()` and `subsidy_is_valid()` functions to check that the deferred pool contribution is valid and that there are no unclaimed block subsidies after NU6 activation, and adds some TODOs
* adds `lockbox_input_value()` fn
* Adds TODOs for linking to relevant ZIPs and updating height ranges
* Adds `nu6_lockbox_funding_stream` acceptance test
* updates funding stream values test to check post-NU6 funding streams too, adds Mainnet/Testnet NU6 activation heights, fixes lints/compilation issue
* Reverts Mainnet/Testnet NU6 activation height definitions, updates `test_funding_stream_values()` to use a configured testnet with the post-NU6 Mainnet funding streams height range
* reverts unnecessary refactor
* appease clippy
* Adds a test for `lockbox_input_value()`
* Applies suggestions from code review
* Fixes potential panic
* Fixes bad merge
* Update zebra-chain/src/parameters/network_upgrade.rs
* Updates acceptance test to check that invalid blocks are rejected
* Checks that the original valid block template at height 2 is accepted as a block submission
* Reverts changes for coinbase should balance exactly ZIP
* updates test name
* Updates deferred pool funding stream name to "Lockbox", moves post-NU6 height ranges to constants, updates TODO
* Updates `get_block_subsidy()` RPC method to exclude lockbox funding stream from `fundingstreams` field
* Adds a TODO for updating `FundingStreamReceiver::name()` method docs
* Updates `FundingStreamRecipient::new()` to accept an iterator of items instead of an option of an iterator, updates a comment quoting the coinbase transaction balance consensus rule to note that the current code is inconsistent with the protocol spec, adds a TODO for updating the quote there once the protocol spec has been updated.
* Uses FPF Testnet address for post-NU6 testnet funding streams
* Updates the NU6 consensus branch id
---------
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
* Addresses clippy lints
* checks network magic and returns early from `is_regtest()`
* Moves `subsidy.rs` to `zebra-chain`, refactors funding streams into structs, splits them into pre/post NU6 funding streams, and adds them as a field on `testnet::Parameters`
* Replaces Vec with HashMap, adds `ConfiguredFundingStreams` type and conversion logic with constraints.
Minor refactors
* Empties recipients list
* Adds a comment on num_addresses calculation being invalid for configured Testnets, but that being okay since configured testnet parameters are checked when they're being built
* Documentation fixes, minor cleanup, renames a test, adds TODOs, and fixes test logic
* Removes unnecessary `ParameterSubsidy` impl for &Network, adds docs and TODOs
---------
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
* validate zebrad cache dir
* update scanner documentation
* clippy
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
* add info level by default to scanner application
* remove `RUST_LOG=info` from some of the test examples on how to run
* remove `RUST_LOG=info` from the book sample
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* adds a tonic server
* Adds a test stub, moves method impls to their own modules, minor fixes.
* Moves indexer rpc mod behind a feature, adds a config field for its listen address, and initializes the indexer RPC when zebrad starts
* Skips tonic_build() in zebra-rpc build script unless indexer-rpcs feature is selected, simplifies indexer.proto file, makes tonic deps optional
* formats zebra-rpc Cargo.toml
* Adds tokio_stream dependency, adds chain_tip_change field to IndexerRPC, and implements a simple version of the chain_tip_change RPC method
* passes latest chain tip to indexer::server::init from start cmd and updates vectors test
* Update zebra-rpc/src/config.rs
* fixes a race condition in trusted_chain_sync_handles_forks_correctly
* readd the scanner tests in the new binary context
* remove commented out tests from zebrad
* add Cargo.lock
* add local copy of `ZECPAGES_SAPLING_VIEWING_KEY` to binary scanning tests
* moves scanner-results-reader to zebra-scan, adds zebrad bin to zebra-scan, adds a short sleep before trying to connect to gRPC server in test
* always include zebrad dependency in zebra-scan
* renames zebrad bin in zebra-scan to zebrad-for-scanner
* skip test when a cached state is missing
* remove scanning config from zebrad
* move `scan_task_commands` out of zebrad acceptance tests
* remove scanner config from zebrad
* do not panic if env var is not there
* re enable start_scan_where left, remove shielded-scan feature foir scanning tests in CI
* change app names
* uncomment test
* fix the scanner tests in CI by changing the test command
* add log needed by CI?
* move test
* rename trait, docs fix
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* Adds an init_read_only() fn in zebra-state
* moves elasticsearch initialization to `FinalizedState::new_with_debug()`
* Updates callers of `FinalizedState::{new, new_with_debug}` to pass a bool to try enabling elasticsearch
* Adds a non-finalized read state syncer to zebra-rpc
* moves, removes, updates, or addresses TODOs
* reduces disk IO while waiting for the a new chain tip & updates the chain tip sender when the finalized tip has changed.
* Returns boxed errors from RpcRequestClient methods instead of color_eyre type
* Avoids resetting the non-finalized state when there's an error getting a block unless it has the missing block error code.
* Adds stub for acceptance test(s) and removes outdated TODO
* adds TODOs for testing
* Tests that `ChainTipChange` is updated when the non-finalized best chain grows
* adds a last_chain_tip_hash and uses a FuturesOrdered for getblock requests
* Fixes a pre-flush sync issue by using a secondary db instead of a read-only db
* Moves disk IO to blocking tasks
* Updates acceptance test to how forks are handled
* Checks synced read state for all of the expected blocks
* checks that there isn't a tip change until the best chain changes
* checks for chain tip changes in test
* run test without feature
* fixes lint
* Fixes compilation/test issues
* Adds docs / comments, moves HexData out from behind the getblocktemplate-rpcs feature flag, moves test behind the mining feature flag.
* Fixes lints
* removes syncer and rpc-syncer features
* Fixes test on Windows, applies suggestions from code review
* Updates `POLL_DELAY` documentation
* Updates method docs
* Fixes a test bug
* use rpc-client feature in zebrad production code
* use rpc-client feature in zebra-node-services for building zebra-rpc crate
---------
Co-authored-by: Pili Guerra <mpguerra@users.noreply.github.com>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* Update `CHANGELOG.md`
* chore: Release
* Update versions in the release dry-run workflow
* Update EOS
* Estimate release height to ~ upcoming Tuesday
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
* Add a "Summary" title to the changelog
* Remove the summary title
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* Move "Known Issues" from README to the book
* Remove an old note from the book
* Move optional configs & features to the book
* Fix TOC in `README.md`
* Refactor the section on installing Zebra
* Fix badges in `README.md`
* Mention optional features and troubleshooting
* Adds documention to the Zebra book about custom Testnets, allows for configuring custom Testnet genesis hashes, refactors check for compatible custom Testnets, adds a TODO, and uses the default testnet when there's an empty or default `testnet_parameters` field in Zebra's network config.
* Adds example configs to custom Testnet docs, moves note about inbound connections on Regtest to a footnote.
* Adds a changelog entry
* Apply suggestions from code review
Co-authored-by: Marek <mail@marek.onl>
* Addresses suggestions from code review.
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
* Update book/src/user/custom-testnets.md
---------
Co-authored-by: Marek <mail@marek.onl>
* Lowers the mandatory checkpoint height to the block before Canopy activation
* Apply suggestions from code review
Co-authored-by: Marek <mail@marek.onl>
---------
Co-authored-by: Marek <mail@marek.onl>
* Uses an OS-assigned port when testing rpc_server_spawn
* reads port from logs and enables 2 acceptance tests on Windows
* generalizes read listen addr from logs fn and re-enables another test
* updates zebra-grpc snapshot tests to use OS-assigned port
* Re-enable grpc vectors tests on Windows while avoiding port conflicts
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* add defaults for `getpeerinfo` and `getblocksubsidy`
* add default for `getmininginfo`
* add default to `getblockcount`
* add defaults to `getaddressbalance`, `getaddressutxos` and `getaddresstxids`
* add defaults to `validateaddress` and `z_validateaddress`
* add defaults to `getrawmempool` and `getdifficulty`
* add defaults to `sendrawtransaction` and `getrawtransaction`
* add defaults for `getnetworksolps` and `getnetworkhashps`
* add defaults for `submitblock` and `z_listunifiedreceivers`
* refactor and cleanup
* update spec
* add random request id
* add min transaction size to `GetRawTransaction` default
* improve `GetSubtrees` default
* change type to request id
* get new spec
* add a TODO
* add changelog entry
* zebra_script: change to use new zcash_script callback API
* add precomputation
* cleanups
* use released zcash_script
* fix clippy error
* Apply suggestions from code review
Co-authored-by: Marek <mail@marek.onl>
* improve docs
* use tuple instead of two Option params
---------
Co-authored-by: Marek <mail@marek.onl>
* Stop using `displaydoc`
* Fix comment alignment
This commit is unrelated to the solution in this branch. There's a new
lint that produces a warning when lists in comments are not aligned well.