Zebra/zebra-rpc/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
..
methods change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
queue fix(rpc): Shut down the RPC server properly when Zebra shuts down (#5591) 2022-11-10 14:51:53 +00:00
server change(rpc): Return an error from getblocktemplate RPC if Zebra is still syncing lots of blocks (#5769) 2022-12-02 11:21:23 +00:00
tests fix(rpc): Isolate RPC queries from the rest of Zebra, to improve performance (#4806) 2022-09-01 16:20:22 +00:00
config.rs change(rpc): Provide and parse a long poll ID, but don't use it yet (#5796) 2022-12-09 01:41:46 +00:00
lib.rs feat(rpc): Implement an RPC transaction queue (#4015) 2022-04-12 15:06:29 +10:00
methods.rs fix(rpc): Accept HashOrHeight as first parameter of getblock and update README.md to note differences between lightwalletd forks (#5861) 2022-12-14 05:29:33 +00:00
queue.rs fix(rpc): Shut down the RPC server properly when Zebra shuts down (#5591) 2022-11-10 14:51:53 +00:00
server.rs change(rpc): Add proposal capability to getblocktemplate (#5870) 2023-01-11 23:39:51 +00:00
tests.rs feat(rpc): add getrawtransaction (#3908) 2022-03-24 09:45:37 +00:00