-
Notifications
You must be signed in to change notification settings - Fork 323
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
Implement the PreprocessTxs ABCI method using WirePayForMessage #22
Comments
What kind of errors can occur when preprocessing? If a Tx is causing an error it would be dropped (not included in the proposed block). I don't think we need to return an error code to the consensus engine as there isn't much it can do about them.
Copy & pasting @adlerjohn's reply from discord here for reference:
In the future (with immediate execution), on Preprocess, for a first version (mvp), deliverTx (or even skip the fee burning logic completely and only deduct the fees the sdk deducts for "regular" Tx).
We have not settled on this but the app would make the most sense.
Namespace size is constant and set to 8 bytes: https://github.com/lazyledger/lazyledger-core/blob/585566317e519bbb6d35d149b7e856c4c1e8657c/types/consts.go#L16
It depends where exactly but as a rule of thumb: if that is what the SDK still does (check the latest version/upcoming changes) I would say yes (even if that diverts from the spec), otherwise use unsigned ints where the value shouldn't be negative. TODO (@liamsi ):
|
Yeah, that makes sense, will do. There shouldn't be any errors, now that I think about it more. |
IMO, all tx types not specific to LL (staking/vanilla transfers etc) should follow the existing SDK pattern and go through their (already existing) module's endpoint. Only the LL-specific tx should show up in the lazyledger module (for the first version, only payformessage). |
It would be a small amount of work to change, and might look a little odd to someone if they are familiar with the sdk. Nothing too crazy though. Last I checked with @adlerjohn, he wasn't 100% sure if anything bad would happen, so I'll plan on removing them for now. If we need to add them back in for any reason, it really won't be that much work. |
After defining
WirePayForMessage
and connecting it the rest of the application, the draft implementation for PreprocessTxs needs to:WirePayForMessage
sThere are still some design decisions that need to be made. Notably:
The text was updated successfully, but these errors were encountered: