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

Selectively use median for FallbackProvider #635

Closed
ricmoo opened this issue Oct 24, 2019 · 2 comments
Closed

Selectively use median for FallbackProvider #635

ricmoo opened this issue Oct 24, 2019 · 2 comments
Assignees

Comments

@ricmoo
Copy link
Member

ricmoo commented Oct 24, 2019

Certain calls in the FallbackProvider (which now checks for a quorum) need some fuzzing, since they are not guaranteed to be equal.

For example, provider.getGasPrice and a transaction receipt's confirmations can slightly differ across multiple back-ends. In these cases the median value should be used, as this minimizes the influence a single backend can have, while also providing data that is most likely to be correct.

Tagging @yuetloo for finding this.

@ricmoo ricmoo added on-deck This Enhancement or Bug is currently being worked on. next version labels Oct 24, 2019
@ricmoo ricmoo self-assigned this Oct 24, 2019
@ricmoo
Copy link
Member Author

ricmoo commented Jan 17, 2020

Also, add a priority in addition to the weight; this will allow an order to be set to be loosely followed, which also gets #588 what they want. :)

By default all the priorities will be 1, which will behave identically as it does today.

ricmoo added a commit that referenced this issue Jan 19, 2020
… are only approximate and supports per-provider priorities (#635, #588).
@ricmoo
Copy link
Member Author

ricmoo commented Jan 19, 2020

This has been added to v5. Please try it out and let me know how it works for you.

Thanks! :)

@ricmoo ricmoo closed this as completed Jan 19, 2020
@ricmoo ricmoo removed the on-deck This Enhancement or Bug is currently being worked on. label Jan 19, 2020
michaeltout pushed a commit to michaeltout/ethers.js that referenced this issue Aug 23, 2020
… are only approximate and supports per-provider priorities (ethers-io#635, ethers-io#588).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant