Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Allow Integer filtering by block height #625

Open
orisdorch opened this issue May 19, 2021 · 2 comments
Open

Allow Integer filtering by block height #625

orisdorch opened this issue May 19, 2021 · 2 comments

Comments

@orisdorch
Copy link

Height is presently only filterable as a string. The ability to filter height as an integer would be more functional.

Sample use cases:

  • Querying the blockchain in ranged batches (i.e. for random audit data samples or batching large queries)
  • Queries limited to blocks greater or less than the prior query's block height (i.e. monitoring for new transactions or harvested blocks since last check, or checking for preceding transactions)
  • Excluding a subset of blocks from query results (i.e. first 1000 blocks from an implementation's stabilization or pilot period)

This would be particularly useful for blockchain monitoring when CLI installation isn't an option or adds unnecessary complexity - i.e. when attempting to integrate with SAAS or cloud based workflow automation platforms (like Microsoft Power Automate).

@rg911
Copy link
Contributor

rg911 commented May 19, 2021

Height on-chain is uint64, (long in java), the consideration is when the height reaches the max int32 we then have the problem. In rest, it is using nodejs's native Long type, basic arithmetic can be done, but agree that there are limitations for the current rest gateway.

@orisdorch
Copy link
Author

orisdorch commented May 19, 2021

Looks like this issue was worked around by adding fromHeight and toHeight to some calls (i.e. http://localhost:3000/statements/transaction - https://docs.symbolplatform.com/symbol-openapi/v1.0.0/#operation/searchReceipts), but not others (i.e. http://localhost:3000/statements/resolutions/address- https://docs.symbolplatform.com/symbol-openapi/v1.0.0/#operation/searchAddressResolutionStatements).

If this is the chosen solution, perhaps we can extend it to all requests that permit the height parameter?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants