0xPolygonZero / zk_evm

Apache License 2.0
80 stars 36 forks source link

Purge `new_txn_trie_node_byte` in `TxnMeta` from trace protocol #248

Closed frisitano closed 1 month ago

frisitano commented 4 months ago

From my inspection the new_txn_trie_node_byte field in TxnMeta (seen below) is unused and therefore it can be purged from the trace protocl.

/// Structure holding metadata for one transaction.
#[serde_as]
#[derive(Debug, Deserialize, Serialize)]
pub struct TxnMeta {
    /// Txn byte code.
    #[serde_as(as = "FromInto<ByteString>")]
    pub byte_code: Vec<u8>,

    /// Rlped bytes of the new txn value inserted into the txn trie by
    /// this txn. Note that the key is not included and this is only the rlped
    /// value of the node!
    #[serde_as(as = "FromInto<ByteString>")]
    pub new_txn_trie_node_byte: Vec<u8>,

    /// Rlped bytes of the new receipt value inserted into the receipt trie by
    /// this txn. Note that the key is not included and this is only the rlped
    /// value of the node!
    #[serde_as(as = "TryFromInto<ByteString>")]
    pub new_receipt_trie_node_byte: Vec<u8>,

    /// Gas used by this txn (Note: not cumulative gas used).
    pub gas_used: u64,
}
Nashtare commented 4 months ago

cc @cffls

cffls commented 4 months ago

Agreed, this field could be removed.

BGluth commented 4 months ago

Yeah, I probably should have created an issue for this a while back.