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

Would like to execute only sendSignedTransaction without getTransactionReceipt #3204

Closed
usd-yamazaki opened this issue Nov 14, 2019 · 4 comments
Labels
1.x 1.0 related issues Feature Request Stale Has not received enough activity

Comments

@usd-yamazaki
Copy link

I am running a lot of sendSignedTransaction to measure the performance of private ethereum.
However, because sendSignedTransaction automatically calls getTransactionReceipt, it puts extra load on the node.
For the tests I want to do, getTransactionReceipt need only be executed once at the end.
So, could you give sendSignedTransaction an option not to execute getTransactionReceipt?

Thank you.

@nivida nivida added 1.x 1.0 related issues Feature Request labels Nov 14, 2019
@lautarodragan
Copy link
Contributor

Another (small & very low priority) case in favour of this feature:

The application I'm working tries to avoid storing state in RAM as much as possible, relying on an external DB instead. The way it's built allows it to be restarted anytime, it just picks up where it left off, without any complicated code and without risk of being left in a "weird state", so to speak.

Method._confirmTransaction (or the SocketTransactionObserver and HttpTransactionObserver observe method in 2.x) seems to subscribe to newHeads and calculate the confirmations whenever a new head arrives.

In my case the issue with this is that if the application is restarted, this subscription is closed and it'll no longer receive confirmations.

To achieve this restart-just-works I'll probably write a similar system to the one web3 uses internally, periodically requesting transaction receipts for every transaction in the database that still doesn't have one, and just ignore the PromiEvent returned by sendSignedTransaction. So there's a tiny bit of wasted resources in those unused subscriptions.

Just thinking out loud, but maybe AbstractObservedTransactionMethod could be renamed to Observable (instead of Observed) and have execute only condicionally call const transactionConfirmationSubscription = this.transactionObserver.observe(transactionHash).subscribe(...)? No idea how to wire that everywhere else though.

@github-actions
Copy link

github-actions bot commented Jul 3, 2020

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment, otherwise this issue will be closed in 7 days

@github-actions github-actions bot added the Stale Has not received enough activity label Jul 3, 2020
@lautarodragan
Copy link
Contributor

Not stale

@github-actions github-actions bot removed the Stale Has not received enough activity label Jul 5, 2020
@github-actions
Copy link

github-actions bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Feature Request Stale Has not received enough activity
Projects
None yet
Development

No branches or pull requests

3 participants