-
Notifications
You must be signed in to change notification settings - Fork 56
Can we merge CheckTx and DeliverTx response types #342
Comments
merging responses to reduce the interface makes sense. In 0.35 ResponseCheckTx gets a few new fields, but it shouldn't block the merging of the two. I could see app integrators being slightly confused with the response having extra fields but needing to ignore them in deliverTx. I wonder if we can change things with how FinalizeBlock treats this type tho. With ABCI++ upcoming, we should try to integrate this proposal. |
Whether it makes sense to merge two types depends not only on whether they're "currently similar", but whether they're likely to remain similar. If the contents of the two messages are (approximately) the same, and any change to one would need to be reflected in the other, merging probably makes sense. But if they're only superficially similar, I wouldn't advise merging them. If we're talking about adding some fields to one of these types but not the other, I'd advise not merging unless there's a better reason than reducing the number of types in the interface. That's a good goal, but if the result is a hybrid type with disjoint usage patterns, I think the result would be net-negative for the API. I don't know the right answer for this specific case, but that's the question I think we should index on. Another point to consider is usage pattern: If the messages are used in very different contexts, then it may be worth keeping them separate even if they're identical. This goes to the footprint of ongoing maintenance. |
I don't think these should be treated the same at the ABCI response level, I view the following separation of concerns making a lot of sense.
(Note, if (2) isn't intended to ever cause events for merkelization, than I see no usecase of it, other than just that Tendermint needs something to know when to send the next tx) I think app-side having txs get a unified execution flow to get data for both response types makes sense. But then, these should be split apart right before going into ABCI. It will be very confusing for an execution of a tx to return a |
I tend to agree that these responses are different in the way they are used and should remain distinct. It's worth pointing out that with the new ABCI++ method |
Protocol Change Proposal
Summary
In Cosmos SDK are re working the Ante Handlers concept. We rethink the middleware process and interfaces and thinking about merging return types of
DeliverTx
andCheckTx
into single response type.Ref: cosmos/cosmos-sdk#9920, cosmos/cosmos-sdk#9920 (comment)
The type definition for ABCI
ResponseDeliverTx
andProposal
We would like to have more opinions:
For Admin Use
The text was updated successfully, but these errors were encountered: