cloudwalk / stratus

EVM executor + custom storage
https://doc.stratus.cloudwalk.io/
MIT License
111 stars 0 forks source link

No type field in transaction receipts #1136

Open carneiro-cw opened 2 months ago

carneiro-cw commented 2 months ago

There is no type field in transaction receipts. Go-ethereum processes transactions as type=0 (legacy transactions) by default. If a transaction has been sent with a type type=1, then when requesting a transaction receipt, an invalid transaction v, r, s values error occurs. Transaction receipts must return a type field because Blockscout and various SDKs, such as go-ethereum, require it.

carneiro-cw commented 2 months ago

To fix this we'd need to change TransactionInputRocksdb so that it includes the type when writing to the database. Another option would be creating a new CF that maps the transaction hashes to their type. The former would require running the importer again since we don't have struct versioning yet. The latter is more hacky, but could be implemented with the db as-is.

mayconamaroCW commented 1 month ago

I also had this bug, when running a golang tool for performance check and then a type 2 transaction from compound came in. I have the block numbers in both mainnet and testnet to reproduce it.