This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
Inverted ABCI interface #279
tac0turtle
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
So, unless we will do more complex setup around the App, the extra round trip won't matter match because we in production 99.9999% of users will use Tendermint RPC rather than app. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Inverted ABCI is a secondary interface made for applications to submit transactions and query Tendermint state through.
The current design of the ABCI treats Tendermint as a client and the application as the server. This allows Tendermint to send data to the application and the app to respond with the requested data. The way an application would get data into Tendermint is through the RPC. This allows apps to submit transactions to Tendermint and query Tendermint state.
Current Transaction Submission Flow
When an application submits a transaction to Tendermint it goes through the below flow.
A user can submit the tx directly to Tendermint RPC as well, this will skip the first bullet point of the above list.
I have run into many questions about why it is this way. I myself, when starting to work in the cosmos ecosystem, failed to understand this and many people still lack the understanding of this. While the understanding is not the problem, I would say the problem is that we are making unnecessary trips to the application in the above flow. We are also aware that the RPC is a DOS vector, but still ask applications to use it for submission of transactions.
Proposed Transaction Submission Flow
If we were to expose a new protobuf service, which is optional, for applications to submit transactions directly to the Tendermint mempool we allow apps to avoid calling the RPC unnecessarily. This will avoid calling
CheckTx
on transaction submission.New Service
Current Query Flow
The current query flow is similar to the transaction submission flow with a few differences. The query for Tendermint data also goes through the RPC layer, except the application may wrap the returned data.
Proposed Query Flow
The new flow would go through the above-mentioned service. This part has some overlap with https://github.com/tendermint/spec/issues/203, but this section will be left empty as it requires more thought.
Overlap with tendermint/tendermint#5977
short presentation used to explain this to the tendermint team: https://docs.google.com/presentation/d/1kzGhIm6YtN5OFocekwv2kXHGRo0s_7yMfx22PVtJJv4/edit?usp=sharing
Beta Was this translation helpful? Give feedback.
All reactions