matter-labs / zksync-era

zkSync era
Apache License 2.0
3.1k stars 2.07k forks source link

Signed transactions fail signature check in go-ethereum #22

Open ajb opened 1 year ago

ajb commented 1 year ago

copied from Discord:

Hi ! Currently testing some basic ETH methods through the Zk Sync mainnet endpoint "wss://mainnet.era.zksync.io/ws" : while some of them behave without noticeable issues ( e.g SubscribeNewHead or BlockNumber) i noticed errors being returned constantly when using GetBlockByHash and GetBlockByNumber (returning respectively "transaction type not supported" and / or "invalid transaction v, r, s values") both on latest processed blocks and more ancient blocks. Those issues seems to be related to incompatibilities between the way Geth handle "classic" requests through its rpc server, and some of the specificities of your network (probably the v,r,s values being considered as invalid and thus not serverd / provoking the error throwing through your API for those methods). Would love to have some feedback on those issues, as the features they seems to impact are usually heavily used on other networks

image

To reproduce:

rpc,_ := rpc.DialHTTP("https://mainnet.era.zksync.io")
eth := ethclient.NewClient(rpc)
eth.TransactionByHash("[hash]")

where [hash] is the tx hash of any legacy (type 0) transaction on zksync era.

popzxc commented 1 year ago

Hello! Could you please provide more details on the expected behavior and the purpose?