Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace RPC ABCI types with ABCI domain types (#1204)
* Remove local ABCI module import Signed-off-by: Thane Thomson <connect@thanethomson.com> * Refactor abci_info endpoint to use domain type Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace RPC ABCI Path with a String Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace all uses of tendermint_rpc::abci::transaction::Hash with tendermint::Hash Signed-off-by: Thane Thomson <connect@thanethomson.com> * rpc: Remove abci::Responses Does not seem to be used for anything. * rpc: Replace DeliverTx and Event with domain types First attempt, with a serialization snag in tendermint-proto. * Serialize some ABCI domain types directly Instead of deriving serde on raw proto types to de/serialize abci::response::DeliverTx, abci::Event, and abci::EventAttribute, derive on the domain types directly. This disentangles the serialization, now primarily used by JSON-RPC, from protobuf struct definitions which are subject to change for Tendermint Core 0.37 (in case of EventAttribute). * Serialize gas as strings in response::DeliverTx * rpc: Eliminate abci::Gas In tendermint-rpc, the only place where Gas newtype is still used is in the response to /broadcast_tx_commit, which is a development-only endpoint. Leave the response struct defined through tx_commit::TxResult for the time being. Define serialization of abci::response::CheckTx (currently not used) to match that of DeliverTx. * Nullable serializer for data fields of ABCI responses * rpc: Remove abci::Data * rpc: Remove abci::Log * rpc: Remove abci::Info * rpc: Replace BeginBlock/EndBlock with domain types Also in tendermint, remove validator::Update which duplicates abci::types::ValidatorUpdate. * rpc: remove abci::Codespace With it goes mod abci::responses. * Post-merge fixup * Fix integration tests * Fix clippy lints * Convert abci::ValidatorUpdate to validator::Update * rpc: Move abci::Code to crate tendermint Promote this to a proper domain type. * Replace u32 code fields with Code * rpc: Eliminate abci::Transaction This was the last of the ABCI helper types defined in tendermint-rpc, and with it goes the abci module. * Fix tools build * Changelog entry for #1204 * Use domain types in /broadcast_tx_commit response * Fix serialization of priority field in CheckTx response * Default the field values of CheckTx/DeliverTx Signed-off-by: Thane Thomson <connect@thanethomson.com> Co-authored-by: Thane Thomson <connect@thanethomson.com>
- Loading branch information