-
Notifications
You must be signed in to change notification settings - Fork 288
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
Index malleated transactions properly #612
Conversation
@evan-forbes Should we build a new node depending on this change and test the query ? |
yeah, we can. I should also look for a more integrated way to test before merging |
After writing an integration test in the app, I found out that without further modification, the method of unwrapping the tx to get the original tx won't work. still working on a different solution atm, so I'm marking this as a draft as it should not yet be merged |
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.
alrighty, got it working faster than I thought I would. There's an integration test in the app that submits a WirePayForMessage
and then attempts to query for the transaction using the original tx hash.
PS: the proto linter is breaking for the typical reasons of our version of tendermint not using v1.0 of buf
proto/tendermint/abci/types.proto
Outdated
@@ -338,6 +338,7 @@ message TxResult { | |||
uint32 index = 2; | |||
bytes tx = 3; | |||
ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; | |||
bytes original_hash = 5; |
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.
I modified abci.TxResult to include the original hash if the tx is malleated. This saves us from having to attempt to unwrap the malleated tx more than once. Alternatively, we could not cache the original hash, and unwrap the malleated transaction more than once.
…cs style generation and formatting
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.
Is this test app CI supposed to fail?
looking into this |
return ResponsePreprocessTxs{} | ||
return ResponsePreprocessTxs{Txs: req.Txs} |
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.
this took entirely too long to debug... not that it matters too much cause upstream removed these tests in #6685 😆 🙃
app tests should be fixed
* index malleated transactions properly * linter * fix malleated transaction indexing and event tracking * fix malleated event test * fix test * fix other test * update proto building and formatting to use the latest tendermint specs style generation and formatting * fix app tests
* index malleated transactions properly * linter * fix malleated transaction indexing and event tracking * fix malleated event test * fix test * fix other test * update proto building and formatting to use the latest tendermint specs style generation and formatting * fix app tests linter fix max size tests
* index malleated transactions properly * linter * fix malleated transaction indexing and event tracking * fix malleated event test * fix test * fix other test * update proto building and formatting to use the latest tendermint specs style generation and formatting * fix app tests linter fix max size tests
* index malleated transactions properly * linter * fix malleated transaction indexing and event tracking * fix malleated event test * fix test * fix other test * update proto building and formatting to use the latest tendermint specs style generation and formatting * fix app tests linter fix max size tests
* index malleated transactions properly * linter * fix malleated transaction indexing and event tracking * fix malleated event test * fix test * fix other test * update proto building and formatting to use the latest tendermint specs style generation and formatting * fix app tests linter fix max size tests
Description
Simple PR to utilize the malleated/original transaction scheme used in #582 and #607 to index malleated transaction by the hash of the original transaction. This allows for querying the transaction using the original hash, instead of the hash of the transaction that actually ends up on chain