Skip to content
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

Introduce an rpc to query only confirmed transactions #3962

Closed
zhangsoledad opened this issue Apr 27, 2023 · 1 comment · Fixed by #3963
Closed

Introduce an rpc to query only confirmed transactions #3962

zhangsoledad opened this issue Apr 27, 2023 · 1 comment · Fixed by #3963
Labels
t:enhancement Type: Feature, refactoring.

Comments

@zhangsoledad
Copy link
Member

zhangsoledad commented Apr 27, 2023

Feature Request

The current implementation of the get_transaction rpc retrieves the status of a transaction by querying both the store and the tx-pool. However, in scenarios where there is high-pressure on the network, the tx-pool may become highly contested, causing a significant drop in performance for this rpc.

To address this issue, a new get_confirmed_transaction rpc could be introduced to retrieve information only about confirmed transactions. This would reduce contention and avoid the performance problems associated with querying the tx-pool. This solution would be useful for users who only need to know whether a transaction has been confirmed or not.

@zhangsoledad zhangsoledad added t:enhancement Type: Feature, refactoring. b:rpc Break RPC interface and removed b:rpc Break RPC interface labels Apr 27, 2023
@eval-exec
Copy link
Collaborator

eval-exec commented Apr 27, 2023

How about adding a query param only_committed: Bool to get_transaction, return confirmed_transaction only when only_committed is true.

@zhangsoledad zhangsoledad changed the title Introduce a rpc to query only confirmed transactions Introduce an rpc to query only confirmed transactions Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:enhancement Type: Feature, refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants