Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tx interface #670

Closed
ebuchman opened this issue Mar 20, 2018 · 2 comments
Closed

Tx interface #670

ebuchman opened this issue Mar 20, 2018 · 2 comments

Comments

@ebuchman
Copy link
Member

Wrote about recent Tx structure discussion here: #669

I think this is all great, but in looking at the interplay with baseapp, I'm not sure we want to thread a struct through that. It's really just the AnteHandler that sees the transactions, and I can forsee many forms of ante handler (we have one, ethermint has another, surely there's more).

So instead, I propose we have type Tx interface{} (an empty interface), since baseapp doesn't really need anything from a Tx. Then in ante handlers, we'd do the type assertions. I suspect this pattern might emerge anyways, so maybe it's best to make it explicit up front. The AnteHandler can also include the TxDecoder and SignBytes functions, since those are tightly coupled to the relationship between bytes and Tx Structure.

In sum, AnteHandler is responsible for the map between an empty Tx interface and the underlying Tx and Serialization structures. StdTx is our primary (sdk default) way of making a Tx, and its AnteHandler is auth.

I think the baseapp is a really useful abstraction over ABCI that can exist more independently of the Tx specifics (possibly MultiStore too ...).

@cwgoes
Copy link
Contributor

cwgoes commented Apr 16, 2018

Per SDK design meeting, punted for now.

@cwgoes cwgoes removed their assignment Apr 17, 2018
@martindale martindale mentioned this issue Apr 17, 2018
7 tasks
@ebuchman
Copy link
Member Author

ebuchman commented Jul 7, 2018

This can be closed. Still need to reduce baseapp dependency on auth - noted in #1579

@ebuchman ebuchman closed this as completed Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants