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

Eth JSON RPC: Support cancelation #4225

Closed
safareli opened this issue May 8, 2018 · 5 comments
Closed

Eth JSON RPC: Support cancelation #4225

safareli opened this issue May 8, 2018 · 5 comments
Labels
Sev3-low Low severity; minimal to no impact upon users type-enhancement

Comments

@safareli
Copy link

safareli commented May 8, 2018

Would be nice if sencAsync returned something like XMLHttpRequest object so once can abort the request (like XMLHttpRequest.abort()).

I guess this would be blocked until https://github.com/kumavis/json-rpc-engine/issues/4 is fixed

@kumavis
Copy link
Member

kumavis commented Jul 16, 2018

this would be a change to the standard ethereum JSON-RPC spec, goes a bit beyond a feature request in metamask

what is your primary usecase and what sort of calls are you interested in canceling?

@kumavis kumavis changed the title Support cancelation Eth JSON RPC: Support cancelation Jul 16, 2018
@safareli
Copy link
Author

If you are referring to ethereum/wiki/JSON-RPC by "standard ethereum JSON-RPC spec" then I don't see how this request would result in change of that spec, can you clarify?

sencAsync at this moment is not returning any value. and I was proposing to to return underling XMLHttpRequest so one can .abort() that, if client is not interested in result of the call and free up enquired resources.

Exposing XMLHttpRequest might not be the best as transport layer might change or something, so some object with a cancel or abort method might be much better.

@safareli
Copy link
Author

safareli commented Aug 8, 2018

For reference this is was just merged in web3.js
web3/web3.js#1618

@danfinlay danfinlay added type-enhancement Sev3-low Low severity; minimal to no impact upon users labels Jan 5, 2021
@danfinlay
Copy link
Contributor

This would be something to add to the provider API, so now part of EIP-1193.

@danfinlay
Copy link
Contributor

The simpler path to this is probably to add an RPC method for requesting the cancellation of a pending transaction, rather than modifying the provider interface.

Since a provider change is huge in scope and either path would require a standard (EIP or ethereum-magicians post) I'm closing this until a suitable proposal is drafted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sev3-low Low severity; minimal to no impact upon users type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants