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

fix: dont skip gas used ratio if empty #40

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

onbjerg
Copy link
Member

@onbjerg onbjerg commented Nov 21, 2023

Ethers expects base_fee_per_gas always, but it can be omitted:

https://github.com/ethereum/go-ethereum/blob/0004c6b229b787281760b14fb9460ffd9c2496f1/internal/ethapi/api.go#L86

To make Anvil tests pass I opened up this temporary workaround.

We do however seem to have a bug wrt gas_used_ratio, it should always be in the response:

https://github.com/ethereum/go-ethereum/blob/0004c6b229b787281760b14fb9460ffd9c2496f1/internal/ethapi/api.go#L88

This PR brings the types in line with the patch in paradigmxyz/reth#5512

Edit: Workaround removed as this was patched in ethers gakonst/ethers-rs#2683

@onbjerg onbjerg marked this pull request as draft November 21, 2023 03:54
@onbjerg onbjerg changed the title DO NOT MERGE: workaround for ethers bug fix: dont skip gas used ratio if empty Nov 21, 2023
@onbjerg onbjerg marked this pull request as ready for review November 21, 2023 04:37
@onbjerg onbjerg merged commit ce78420 into onbjerg/alloy-temp-provider-trait Nov 21, 2023
5 of 16 checks passed
onbjerg added a commit that referenced this pull request Nov 25, 2023
* workaround

* fix: actual fix

* fix: actual fix part 2
gakonst pushed a commit that referenced this pull request Dec 18, 2023
* wip

* chore: docs

* feat: add `get_block`

* fmt

* fix rebase

* more fix

* fmt

* more rebase fix

* more fix

* fmt

* rm unused crates

* more fix

* async trait wasm awesome hack

* ?

* ??

* ??????????

* hokus pokus

* feat: add tracing methods and a couple other ones (#32)

* chore: TransactionRequest -> CallRequest (#33)

* fix: return U256 for estimate_gas (#35)

* fix: serialize block num w/o leading zeros (#37)

* fix: use u64 for block numbers (#38)

* fix: serialize block num w/o leading zeros

* fix: use `u64` for block numbers

* fix: deserialize block num as U64 (#39)

* fix: typo

* fix: dont skip gas used ratio if empty (#40)

* workaround

* fix: actual fix

* fix: actual fix part 2

* fix(rpc-types): access list keys (#42)

* workaround

* fix: actual fix

* fix: actual fix part 2

* fix access list keys

---------

Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>

* chore: remove Cow from `TempProvider` (#43)

* chore: start removing cows

* chore: uncow tempProvider

* Apply suggestions from code review

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* switch to single element tuple

---------

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

* feat(`rpc-types`): RLP encoding/decoding for transaction types (#36)

* feat: add rlp encoding/decoding to tx types

* feat: add encodable/decodable traits to tx

* chore: remove out-of-scope func

* chore: remove bad links on comments

* chore: fix docs

* clippy

* feat(`TempProvider`): `raw_request` (#45)

* feat(): raw_request

* chore: remove unneeded async block

* chore: bump alloy-primitives

* chore: set uncle as default when missing transactions field

* fmt

* chore: remove pub

* feat: support for additional fields on TransactionReceipt and Block (#66)

* chore: add support for OtherFields in Transaction (#68)

* chore: turn off reqwest default features

* chore: address provider review comments (#87)

* chore: remove self: sync from defs

* chore: remove most generics

* chore: default for BlockId

* chore: remove unnecesary reassignment

* chore: auto impl on mut/rc

* chore: unnecesary assignment

---------

Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

1 participant