Zebra/zebra-consensus/src
Arya 2f3b05f8e1
change(rpc): add submitblock RPC method (#5526)
* adds submitblock rpc method

* re-orders imports

* replaces thread::yield_now with async yield_now

* Fix doc warnings and unused variable warnings, add missing docs

* Mark work_id as optional

* Use the same ChainVerifier for downloaded and submitted blocks

* Revert unused changes & minor cleanups

* Document currently-unreachable code

* updates tests and submit_block response for AlreadyVerified error

* Update zebra-rpc/src/methods/get_block_template_rpcs.rs

Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>

* changes names from BlockVerifier to ChainVerifier and block_verifier to chain_verifier to keep it consistent with naming in zebra-consensus

* move how to run the submit_block test example to acceptance.rs

* updates snapshot tests

* moved acceptance test to a separate file

* removes extra tower::ServiceBuilder::new(), updates docs

* updates vectors and snapshot tests, changes hex decoding error in submit_block method from server error to parse error

* hides errors module in zebra-rpc behind a feature flag and adds docs.

* Updates snapshot test, adds mod docs, moves HexData to its own mod, and removes the unrelated make_server_error refactor for now

* update submit block acceptance test mod doc

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-04 03:57:08 +00:00
..
block build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
chain build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
checkpoint update checkpoints (#5512) 2022-11-01 05:48:11 +00:00
parameters Remove duplicate and redundant consensus parameter code (#4760) 2022-07-22 16:33:26 +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 build(deps): Bump `zcash_proofs` to 0.8.0 (#5481) 2022-10-28 06:58:02 +00:00
block.rs change(rpc): add submitblock RPC method (#5526) 2022-11-04 03:57:08 +00:00
chain.rs change(state): Write non-finalized blocks to the state in a separate thread, to avoid network and RPC hangs (#5257) 2022-10-11 19:25:45 +00:00
checkpoint.rs lint(clippy): add `unwrap_in_result` lint (#4667) 2022-06-28 06:22:07 +00:00
config.rs Enable `checkpoint_sync` by default (#3777) 2022-03-09 01:21:54 +00:00
error.rs refactor: document coinbase rules, refactor to ease understanding (#4056) 2022-04-20 09:31:12 +00:00
lib.rs change(rpc): add submitblock RPC method (#5526) 2022-11-04 03:57:08 +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 3. change(rpc): Add fee and sigops fields to getblocktemplate transactions (#5508) 2022-11-03 17:03:41 +00:00