Zebra/zebrad/tests/common
Arya b0ba920a4f
change(test): Create test harness for calling getblocktemplate in proposal mode, but don't use it yet (#5884)
* 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

* updates gbt acceptance test to make a block proposal

* fixes json parsing mistake

* adds retries

* returns reject reason if there are no retries left

* moves result deserialization to RPCRequestClient method, adds docs, moves jsonrpc_core to dev-dependencies

* moves sleep(EXPECTED_TX_TIME) out of loop

* updates/adds info logs in retry loop

* Revert "moves sleep(EXPECTED_TX_TIME) out of loop"

This reverts commit f7f0926f4050519687a79afc16656c3f345c004b.

* adds `allow(dead_code)`

* tests with curtime, mintime, & maxtime

* Fixes doc comment

* Logs error responses from chain_verifier CheckProposal requests

* Removes retry loop, adds num_txs log

* removes verbose info log

* sorts mempool_txs before generating merkle root

* Make imports conditional on a feature

* Disable new CI tests until bugs are fixed

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-17 04:03:40 +00:00
..
configs change(rpc): Provide and parse a long poll ID, but don't use it yet (#5796) 2022-12-09 01:41:46 +00:00
get_block_template_rpcs change(test): Create test harness for calling getblocktemplate in proposal mode, but don't use it yet (#5884) 2023-01-17 04:03:40 +00:00
lightwalletd Fix typos (#5728) 2022-11-27 22:37:55 +00:00
cached_state.rs change(tests): adds RPC request client for condensing shared code (#5619) 2022-11-16 21:23:29 +00:00
check.rs T0. refactor(test): split zebrad acceptance tests into sub-modules (#3901) 2022-03-18 16:02:22 +00:00
config.rs fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests (#5589) 2022-11-10 03:40:21 +00:00
failure_messages.rs fix(ci): test RPCs with zcash/lightwalletd, to fix post-NU5 failures in adityapk00/lightwalletd (#4553) 2022-06-01 07:36:59 -04:00
get_block_template_rpcs.rs change(ci): add acceptance test for getblocktemplate RPC in CI, and fix RPC bugs (#5761) 2022-12-01 19:39:01 +00:00
launch.rs fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests (#5589) 2022-11-10 03:40:21 +00:00
lightwalletd.rs fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests (#5589) 2022-11-10 03:40:21 +00:00
mod.rs change(tests): adds RPC request client for condensing shared code (#5619) 2022-11-16 21:23:29 +00:00
rpc_client.rs change(test): Create test harness for calling getblocktemplate in proposal mode, but don't use it yet (#5884) 2023-01-17 04:03:40 +00:00
sync.rs fix(clippy): Fix nightly clippy redundant code lints (#5916) 2023-01-05 15:46:04 +00:00
test_type.rs change(ci): add acceptance test for getblocktemplate RPC in CI, and fix RPC bugs (#5761) 2022-12-01 19:39:01 +00:00