Zebra/zebra-consensus/src
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
..
block change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
chain change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
checkpoint Release Zebra 1.0.0-rc.3 (#5928) 2023-01-10 03:48:03 +00:00
parameters change(rpc): Match `zcashd`'s block template exactly (#5867) 2022-12-19 18:52:43 +00:00
primitives build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
transaction change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
block.rs change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
chain.rs change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
checkpoint.rs fix(lint): Box large error types to resolve the clippy large result err variant lint (#5759) 2022-12-08 06:11:33 +00:00
config.rs Enable `checkpoint_sync` by default (#3777) 2022-03-09 01:21:54 +00:00
error.rs fix(lint): Box large error types to resolve the clippy large result err variant lint (#5759) 2022-12-08 06:11:33 +00:00
lib.rs change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
parameters.rs Remove duplicate and redundant consensus parameter code (#4760) 2022-07-22 16:33:26 +00:00
primitives.rs fix(batch): Improve batch verifier async, correctness, and performance (#4750) 2022-07-18 08:41:18 +10:00
script.rs refactor: address comments from #3415: Prepare for changes in ZIP-244 (#3446) 2022-02-01 06:24:08 +00:00
transaction.rs fix(clippy): Fix nightly clippy redundant code lints (#5916) 2023-01-05 15:46:04 +00:00