You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tendermint's tx indexer allows querying using tx.height=..., tx.height>=... and tx.height<=.... For the latter 2, the SDK added a REST helper tx.minHeight=... and tx.maxHeight=... in #5648. However, we didn't add them to the gRPC query handlers.
Proposal
Proposal 1
In the gRPC handler for querying txs (probably in the QueryTxsByEvents function), parse all events, and replace:
tx.minHeight=x by tx.height>=x
tx.maxHeight=x by tx.height<=x
before sending the query to Tendermint.
Proposal 2
Stick to what Tendermint proposes and use >=, <= operators. Add docs in the REST API migration guide for minHeight, maxHeight.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
As I said in #10448 I'm not working specifically on Ledger cosmos integration as of now, but I think that proposal 2 is better if < and > are okay in the URL: it clearly shows that the values are inclusive limits for transaction height, and it's probably less technical debt as well :)
Summary
When migrating from the legacy REST API to the new proto endpoints, we forgot to migrate the
/tx?tx.{min,max}Height=...
query param.Should we add them to the proto endpoints?
ref: #10448
Problem Definition
Tendermint's tx indexer allows querying using
tx.height=...
,tx.height>=...
andtx.height<=...
. For the latter 2, the SDK added a REST helpertx.minHeight=...
andtx.maxHeight=...
in #5648. However, we didn't add them to the gRPC query handlers.Proposal
Proposal 1
In the gRPC handler for querying txs (probably in the
QueryTxsByEvents
function), parse all events, and replace:tx.minHeight=x
bytx.height>=x
tx.maxHeight=x
bytx.height<=x
before sending the query to Tendermint.
Proposal 2
Stick to what Tendermint proposes and use
>=, <=
operators. Add docs in the REST API migration guide for minHeight, maxHeight.For Admin Use
The text was updated successfully, but these errors were encountered: