From 6c034f6e180cc92e99766f14c8840c90efa56cec Mon Sep 17 00:00:00 2001 From: Daniyar Itegulov Date: Tue, 29 Oct 2024 20:33:57 +1100 Subject: [PATCH] feat(api): get rid of tx receipt root (#3187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Transaction receipt `root` was replaced by `status` in [EIP658](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-658.md). Since we already return `status` there is no need in having `root` too. Fixes #3188 ## Why ❔ It is actively harmful as it confuses some ETH tooling that considers having both `status` and `root` at the same time an invalid receipt. ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. --- core/lib/dal/src/models/storage_transaction.rs | 1 - core/lib/types/src/api/mod.rs | 2 -- 2 files changed, 3 deletions(-) diff --git a/core/lib/dal/src/models/storage_transaction.rs b/core/lib/dal/src/models/storage_transaction.rs index 78daaebb335e..dbd4fa947520 100644 --- a/core/lib/dal/src/models/storage_transaction.rs +++ b/core/lib/dal/src/models/storage_transaction.rs @@ -392,7 +392,6 @@ impl From for TransactionReceipt { logs: vec![], l2_to_l1_logs: vec![], status, - root: block_hash, logs_bloom: Default::default(), // Even though the Rust SDK recommends us to supply "None" for legacy transactions // we always supply some number anyway to have the same behavior as most popular RPCs diff --git a/core/lib/types/src/api/mod.rs b/core/lib/types/src/api/mod.rs index a4eb64605534..409dc3727570 100644 --- a/core/lib/types/src/api/mod.rs +++ b/core/lib/types/src/api/mod.rs @@ -257,8 +257,6 @@ pub struct TransactionReceipt { pub l2_to_l1_logs: Vec, /// Status: either 1 (success) or 0 (failure). pub status: U64, - /// State root. - pub root: H256, /// Logs bloom #[serde(rename = "logsBloom")] pub logs_bloom: Bloom,