Zebra/zebra-state/src
teor 2ac6921d60
feat(mine): Add an internal Zcash miner to Zebra (#8136)
* Patch equihash to use the solver branch

* Add an internal-miner feature and set up its dependencies

* Remove 'Experimental' from mining RPC docs

* Fix a nightly clippy::question_mark lint

* Move a byte array utility function to zebra-chain

* fixup! Add an internal-miner feature and set up its dependencies

* Add an equihash::Solution::solve() method with difficulty checks

* Check solution is valid before returning it

* Add a TODO to check for peers before mining

* Move config validation into GetBlockTemplateRpcImpl::new()

* fixup! fixup! Add an internal-miner feature and set up its dependencies

* Use the same generic constraints for GetBlockTemplateRpcImpl struct and impls

* Start adding an internal miner component

* Add the miner task to the start command

* Add basic miner code

* Split out a method to mine one block

* Spawn to a blocking thread

* Wait until a valid template is available

* Handle shutdown

* Run mining on low priority threads

* Ignore some invalid solutions

* Use a difference nonce for each solver thread

* Update TODOs

* Change the patch into a renamed dependency to simplify crate releases

* Clean up instrumentation and TODOs

* Make RPC instances cloneable and clean up generics

* Make LongPollId Copy so it's easier to use

* Add API to restart mining if there's a new block template

* Actually restart mining if there's a new block template

* Tidy instrumentation

* fixup! Move config validation into GetBlockTemplateRpcImpl::new()

* fixup! Make RPC instances cloneable and clean up generics

* Run the template generator and one miner concurrently

* Reduce logging

* Fix a bug in getblocktemplate RPC tip change detection

* Work around some watch channel change bugs

* Rate-limit template changes in the receiver

* Run one mining solver per available core

* Use updated C code with double-free protection

* Update to the latest solver branch

* Return and submit all valid solutions

* Document what INPUT_LENGTH means

* Fix watch channel change detection

* Don't return early when a mining task fails

* Spawn async miner tasks to avoid cooperative blocking, deadlocks, and improve shutdown responsiveness

* Make existing parallelism docs and configs consistent

* Add a mining parallelism config

* Use the minimum of the configured or available threads for mining

* Ignore optional feature fields in tests

* Downgrade some frequent logs to debug

* Document new zebrad features and tasks

* Describe the internal-miner feature in the CHANGELOG

* Update dependency to de-duplicate equihash solutions

* Use futures::StreamExt instead of TryStreamExt

* Fix a panic message typo
2024-01-11 14:41:01 +00:00
..
service feat(mine): Add an internal Zcash miner to Zebra (#8136) 2024-01-11 14:41:01 +00:00
tests change(state): Allow opening the database in a read-only mode (#8079) 2023-12-13 21:54:00 +00:00
arbitrary.rs change(state): Refactor the structure of verified blocks (#7025) 2023-06-21 16:58:11 +00:00
config.rs change(scan): Create a scanner storage database, but don't use it yet (#8031) 2023-11-30 12:59:15 +00:00
constants.rs change(state): Expose ZebraDb methods that can create different kinds of databases (#8002) 2023-11-28 13:49:11 +00:00
error.rs Replace a chain length assertion with a NotReadyToBeCommitted error (#7072) 2023-06-27 06:50:35 +00:00
lib.rs Move history tree and value balance to typed column families (#8115) 2023-12-20 23:20:57 +00:00
request.rs build(deps): bump the prod group with 6 updates (#8125) 2024-01-02 01:26:54 +00:00
response.rs change(state): Add state requests and support code for the `z_getsubtreesbyindex` RPC (#7408) 2023-09-03 22:18:41 +00:00
service.rs build(deps): bump the prod group with 6 updates (#8125) 2024-01-02 01:26:54 +00:00
tests.rs Fix the position of coinbase tx (#7217) 2023-07-15 16:24:51 +00:00