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

Upstream Confirmation Fixes. #104

Open
nlordell opened this issue Jan 6, 2020 · 0 comments
Open

Upstream Confirmation Fixes. #104

nlordell opened this issue Jan 6, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@nlordell
Copy link
Contributor

nlordell commented Jan 6, 2020

There are currently some issues with transaction confirmation in web3 crate. Current issues that are addressed are:

  • Waiting for confirmations with 0 confirmations (i.e. just wait for the transaction to mine with no extra blocks) panics.
  • Does not work with development nodes like Ganache that auto-mine transaction as soon as they are sent since the block filter is set up after the transaction is already mined.
  • Might have some issues with ommer blocks where the actual block where the transaction was mined can change during reorgs (to be confirmed).
  • Does not work with nodes that do not support filters (like Infura over HTTP/HTTPS). This can be addressed by falling back to polling the node.

Hopefully some of these fixes can be upstreamed.

nlordell added a commit that referenced this issue Jan 8, 2020
This PR unifies the confirmation API between all transaction (deployment and method calls) and eliminates the `send_and_confirm` method as now confirmation parameters are part of the transaction builder.

Note that this also addresses some issues with confirmation. A new case was created to upstream some of these issues to `web3` crate here: #104. Details of the issues with the current confirmation implementation are in the aforementioned issue.

This closes #95 

### Test Plan

New unit tests for the confirmation implementation and add waiting for confirmation with Ganache example. (Note that Rinkeby example currently waits for confirmation already). 

### Commit History

* started implemented confirmation

* implemented confirmations

* transaction confirmation options

* confirmation support from transactions

* adjust examples for new confirmations

* added support for polling

* Added a bunch of unit tests

* added polling unit test

* initial confirmation implementation

* todo

* update comment

* check transaction result when it is confirmed

* added unit tests for transactions with new confirmation API

* fix comment typo

* fix copy pasta

* ability to never timeout
@nlordell nlordell added the good first issue Good for newcomers label Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant