-
Notifications
You must be signed in to change notification settings - Fork 311
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
Add ability to remove "Parent" transactions from the mempool #582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trajectory looks good. I'm just wondering how this works in abci++ in general? I mean the Block.Data can be modified arbitrarily there. So there should be a way without modifying tendermint if I am not mistaken.
AFAICT, all transactions are referenced using their hashes, so we will have to have the hash of the parent WirePayForMessage somehow. We have the alternative to manage the hashes another way, which I think is preferable, as we won't include an extra hash in each PayForMessage tx |
This solution is working, but we should use something else after devnet. In theory, this shouldn't be an issue, as the transactions in the mempool are rechecked by default, and therefore should be removed as they have the same nonce as the PayForMessage tx that is getting confirmed. They aren't being removed though, and I'm still unsure as to why. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devnetooooooor
* add the new transaction wrapper * export and move DecodeChildTx * return a more precise type (Tx instead of []byte) for DecodeChildTx * add test and helper function * linter
Description
For problem statement, please see #581. This PR introduces a wrapper around the
types.Tx
type to attach the hash of the "parent" transaction, in this case of theWirePayForMessage
, so that after the "child" transaction is confirmed, the parent can easily be removed from the mempool.There are some meaningful downsides to this approach, mainly that we add an extra hash to each
PayForMessage
transaction that gets included in the block, and that we add a small amount of overhead when checking for wrapper. Unfortunately, the way that the mempool is currently designed requires the hash of the transaction in order to be removed.This PR also requires a PR to be made in the app that modifies the transaction decoder to unwrap these transactions, along with wrapping them during the Preprocess step