Open gzliudan opened 4 days ago
Now the receipt RLP format in our chain database is:
type receiptStorageRLP struct { PostStateOrStatus []byte CumulativeGasUsed uint64 Bloom Bloom TxHash common.Hash ContractAddress common.Address Logs []*LogForStorage GasUsed uint64 }
In fact the below fields are unnecessary in database:
because they can be derive from the transaction. Then format can be simplified to:
type storedReceiptRLP struct { PostStateOrStatus []byte CumulativeGasUsed uint64 Logs []*Log }
So we can encode the new receipt RLP with the new format. Then convert the old receipt RLP to the new format later.
I will refer ethereum#19345 and handle it
Now the receipt RLP format in our chain database is:
In fact the below fields are unnecessary in database:
because they can be derive from the transaction. Then format can be simplified to:
So we can encode the new receipt RLP with the new format. Then convert the old receipt RLP to the new format later.