* Adds a `Nu6_1` variant to `NetworkUpgrade`
* updates CONSENSUS_BRANCH_IDS to include NU6.1 and NU7 when compiled with the `zebra-test` feature
* Update zebra-chain/src/parameters/network/testnet.rs
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Regroup imports in `.../tests/common/regtest.rs`
* Regroup imports in `.../methods/tests/prop.rs`
* Regroup imports in `.../get_block_template.rs`
* Regroup imports in `.../zip317.rs`
* Regroup imports in `.../get_blockchain_info.rs`
* Regroup imports in `.../types/get_raw_mempool.rs`
* Regroup imports in `.../types/transaction.rs`
* Regroup imports in `.../server/tests/vectors.rs`
* Regroup imports in `.../args.rs`
* Regroup imports in `.../main.rs`
* Regroup imports in `.../openapi-generator/main.rs`
* Regroup imports in `zebrad/src/commands/start.rs`
* Regroup imports in `.../tests/fake_peer_set.rs`
* Regroup imports in `.../components/miner.rs`
* Regroup imports in `.../tests/acceptance.rs`
* Regroup imports in `.../get_block_template.rs`
* Update changelog
* Update end of support
* Add release date
* Add breaking change description
* Add new PRs to changelog
* Add breaking change description to changelog
* Update list of PRs in changelog
* chore: Release
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* add size and time to getrawtransaction object
* fix annoying clippy lint about large enum variant
* add todo
* add TODO, remove TODO
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
---------
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
* Introduce Nu7
* Introduce Nu7 fo other crates of Zebra
* Fix of new_regtest call (as it additionally needs Nu7 arg now)
* Fix of new_regtest call (as it additionally needs Nu7 arg now) (2)
* Set Nu7 as a network update for testnet in zebra-chain network tests
* Fix serde names for NU7
* Update test snapshot in zebra-rpc to use NU7
* Copy Nu7-related changes from zsa-integration-state
* Uncomment zcash_unstable = nu7
* Fix Nu7 constants and add cfg(zcash_unstable ...) attribute according to PR #15 review comments
* Update network constant values according to PR #15 review comments
* Add zcash_unstable=nu6 Rust flag to .cargo/config.toml to use nu6 by default
* Add zcash_unstable = nu6 cfg in zebra-network/.../types.rs
* Fix nu7 activation heights in network_upgrade.rs (nu6 value + 1 does not work - causes a test failure)
* Add cfg for CURRENT_NETWORK_PROTOCOL_VERSION constant definition, add FIXMEs for a couple of Nu6 processing cases, add processing of Nu7
* Update get_blockchain_info@testnet_10.snap
* Update get_blockchain_info@mainnet_10.snap
* updated cfg flag
* remove `zcash_unstable` flag
* Remove testnet and mainnet NU7 activation heights, comment out consensus branch id and conversion to zcash primitives nu type
* Yep, it'll work after NU7
* Yep, the test should work fine after NU7
* Yep, it only needs to be a post-nu6 height.
* other fixes and cleanups
* Updates snapshots, removes unnecessary FIXMEs, fixes issues with bad merge conflict resolution
* fixes test hang when there are NUs defined without activation heights
* fixes test, applies suggestion from code review.
* Enable consensus branch ID for Nu7
---------
Co-authored-by: Dmitry Demin <dmitry@qed-it.com>
Co-authored-by: Arya <aryasolhi@gmail.com>
Co-authored-by: Marek <mail@marek.onl>
The `HistoryTree` type is intended for internal use within the node; it
should not be exposed via the ReadStateService response. Instead, this
response should simply include the hash needed for block template
construction.
* make start and end fields optional and apply new rules to match zcashd
* update docs to mark range fields as optionals
* Apply suggestions from code review
Co-authored-by: Arya <aryasolhi@gmail.com>
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* extend `getrawtransaction` verbose output
* replace strings where possible, fix tests
* fix orchard
* add todos for script assembly code
* fix an import
* fmt
* fmt
* suggestion for #9329: change coinbase field and add valueSat field to match zcashd (#9407)
* change coinbase field and add valueSat field to match zcashd
* remove valueSat; update vectors
---------
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
* introduce new fields to `GetInfo`
* add address book to methods for getinfo connections field
* add the version field to getinfo
* track last node error or warning and display it in getinfo rpc method
* add the rest of the fields, minor cleanup
* fix the tests
* clippy
* feat(network): Add misbehavior tracking for peers in the address book
* - Add a `misbehavior_score` field to `MetaAddr`
- Add a `bans_by_ip` field to `AddressBook`
- Update the `AddressBook::update()` method to:
- increment misbehavior scores in its entries,
- add addr ips to bans_by_ip if the score is excessive,
- remove any addrs at the banned ip
- Avoid responding to `GetAddr` requests with addresses of misbehaving peers (return None from `sanitized()`),
- Avoid new inbound or outbound connections to banned ips
* Drops banned peer connections in peer set's `poll_ready()` method
* Adds rudimentary misbehavior score tracking
* fixes some proptests, moves and removes some TODOs
* fixes lint
* Removes outdated TODO
* Adds stub for acceptance test
* updates call to updated fn
* Stores likely inbound peer connection addresses in address book and return their IPs with the default port instead of the transient port when responding to GetAddr requests
* Avoids gossiping peer addrs from inbound connections
* updates test to check that sanitize won't return inbound peer addrs or addrs with non-zero misbehaviour scores.
updated misbehaviour score for potentially unavoidable errors.
* Updates `generate` RPC to support any network where PoW is disabled.
Updates acceptance test to check that zebrad instances disconnect once one of them advertises a block with an invalid PoW
* minor tangential cleanup
* Finishes acceptance test, sends misbehavior updates from syncer, and always updates address book entries if the update is to their misbehaviour score
* skip test on windows (to minimize risk of port conflict)
* Applies suggestions from code review
* zebra-rpc: Correctly map JSON-RPC to/from 2.0
The existing code was only handling the `lightwalletd` client format
which includes a `"jsonrpc": "1.0"` entry, and it was returning
responses as JSON-RPC 2.0 regardless of what the client expected.
* Update zebra-rpc/src/server/http_request_compatibility.rs
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* Adds some of the required fields on `getblockchaininfo` output.
* Adds state request/response variants for querying disk usage
* Adds `size_on_disk`, `chain_supply`, and `monitored` fields.
* Updates snapshots
* fixes prop tests
* fixes doc lints
* Adds missing `size()` method
* Fixes lwd integration test issue by updating get_blockchain_info to fallback on default values instead of returning an error if the state is empty.
Related: Runs state queries in parallel from getblockchaininfo RPC and removes the BlockHeader query by getting the tip block time from the latest chain tip channel.
* Updates failing proptests
* fixes lint
* add a channel for submit_block notifications to gossip task
* fix tests and gossip logic
* remove the network discriminant and add a test
* clippy suggestions
* fix unused variable
* attempt to fix the conditional compilation issues
* fix default
* Suggestions for "fix(mining): Advertise mined blocks" (#9183)
* refactor error conversions in GetBlockTemplateRpcImpl and rewords documentation
* Replaces polling mined block receiver with a select
* Skip checking that Zebra is likely synced to the network tip before returning block templates on Testnet.
* fixes a clippy lint and a concurrency bug
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* Remove unnecessary clone
* Fix test in zebra-script
* Document that RPC server addr must be set
* Change the log level of missing port msg to info
Having the RPC port not specified is part of Zebra's normal operation,
and is the default config.
* Fix links in docs for tracing
* Update zebrad/src/commands/start.rs
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* Adds new column family for [spent_out_loc] -> [spending_tx_loc] with a read method and an update to `prepare_spending_transparent_tx_ids_batch()` for maintaining it when committing blocks to the finalized state.
Adds TODOs for remaining production changes needed for issue #8837.
* add spending tx ids for spent outpoints to non-finalized chains
* adds a `spending_transaction_hash()` read fn for the new column family
* Adds a `TransactionIdForSpentOutPoint` ReadRequest and a `TransactionId` ReadResponse
* Updates snapshots, removes outdated TODOs, moves a TODO.
* Clarifies `spent_utxos` field docs, fixes an assertion
* import TypedColumnFamily from `finalized_state` instead of from the crate.
* adds db format upgrade for spent outpoints -> tx hash
* adds revealing tx ids for nullifiers in finalized and non-finalized states
* updates nullifiers column families to include revaling transaction locations in db format upgrade
* Renames new read state request to `SpendingTransactionId` and updates its type to a `Spend` enum
* refactor db format upgrade and prepare_nullifiers_batch() to use ZebraDb instead of DiskDb, checks cancel_receiver before every db operation
* Adds acceptance test for checking that the finalized state has spending transaction ids
* Adds variant docs to zebra_state::request::Spend enum
* Updates Zebra book with the latest changes to the rocks db column families
* Updates acceptance test to check non-finalized state
* adds a few log messages to the acceptance test, reduces frequency of logs for progress updates
* fixes docs lint and skips test when there is no cached state
* Avoids returning genesis coinbase tx hash when indexes are missing
* Adds `indexer` compilation feature in zebra-state and build metadata in db format version file
* stops tracking new indexes in finalized state when feature is unselected
* stops tracking new indexes in non-finalized state when indexer feature is unselected
* condenses imports
* - adds build metadata when writing db version file, if any.
- adds the build metadata to the db version file before adding indexes.
- deletes indexes when running without the `indexer` feature
* Replaces dropping cf with deleting range of all items to avoid a panic when trying to open the db with that column family.
* Fixes lint, avoids reading coinbase transactions from disk
* updates db column families table
* Document need for having an indexed cached state and use a multi-threaded tokio runtime in has_spending_transaction_ids test
* fixes call to renamed `future_blocks` test fn
* improves test logs and fixes a disk format deserialization bug
* Replaces a new expr with a previously existing constant, fixes typo
* Refactors getblockchaininfo to return gensis block if tip pool request fails. Adds test in prop.rs
* clippy, check and fmt
* Removes unused imports. Refactors code for correctness in genesis bytes reference and tokio pause() call
---------
Co-authored-by: Elijah Hampton <elijahhampton@pop-os.lan>
* replace jsonrpc-core with jsonrpsee-types in zebra-node-services
* remove non needed feature from dependency
* remove jsonrpc-core as a dev dependency in zebra-node-services
* add jsonrpsee-types as a dev dependency
* repeat words
* Update zebra-chain/src/block/serialize.rs
Co-authored-by: Pili Guerra <1311133+mpguerra@users.noreply.github.com>
---------
Co-authored-by: Pili Guerra <1311133+mpguerra@users.noreply.github.com>