You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling eth_call with a 3rd parameter / stateDiff, Erigon errors out with a format that geth accepts, and geth errors when you give it a format that Erigon accepts. I've only reproduced this as a consumer of Erigon over various 3rd party APIs, however I've reproduced it on mainnet and gnosis chain, across several providers which offer Erigon as an option.
Geth expects padded hex, but Erigon wants unpadded hex.
The following stateDiff format will work for Geth, but if you change the URL to an Erigon endpoint, you'll get invalid argument 2: hex number with leading zero digits
But if you fire this request at Geth, you get invalid argument 2: hex string has length 8, want 64 for common.Hash
Root cause of this seems to be Account.State and Account.StateDiff in api.go being implemented as map of Hash -> uint64, rather than in geth's implementation where it's a map of Hash -> Hash.
I'm guessing this could be fixed with either more permissive marshalling/unmarshalling, or changing the underlying type, but I don't want to submit a PR until I've had some guidance from someone more experienced with the codebase.
The text was updated successfully, but these errors were encountered:
When calling eth_call with a 3rd parameter / stateDiff, Erigon errors out with a format that geth accepts, and geth errors when you give it a format that Erigon accepts. I've only reproduced this as a consumer of Erigon over various 3rd party APIs, however I've reproduced it on mainnet and gnosis chain, across several providers which offer Erigon as an option.
Geth expects padded hex, but Erigon wants unpadded hex.
The following stateDiff format will work for Geth, but if you change the URL to an Erigon endpoint, you'll get
invalid argument 2: hex number with leading zero digits
Conversely, if you hit Erigon with the following (identical but with statediff value zero pading removed), you'll get a correct response:
But if you fire this request at Geth, you get
invalid argument 2: hex string has length 8, want 64 for common.Hash
Root cause of this seems to be
Account.State
andAccount.StateDiff
in api.go being implemented as map of Hash -> uint64, rather than in geth's implementation where it's a map of Hash -> Hash.I'm guessing this could be fixed with either more permissive marshalling/unmarshalling, or changing the underlying type, but I don't want to submit a PR until I've had some guidance from someone more experienced with the codebase.
The text was updated successfully, but these errors were encountered: