Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #95 from anton-rs/refcell/op-builder
Browse files Browse the repository at this point in the history
fix: comments
  • Loading branch information
clabby authored Aug 28, 2023
2 parents 475ccd0 + 7869520 commit 358669b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions crates/primitives/src/proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ mod tests {
assert_eq!(block.transactions_root, tx_root, "Must be the same");
}

/// Tests that the receipt root is computed correctly for the regolith block.
/// This was implemented due to a minor bug in op-geth and op-erigon where in
/// the Regolith hardfork, the receipt root calculation does not include the
/// deposit nonce in the receipt encoding.
/// To fix this an op-reth patch was applied to the receipt root calculation
/// to strip the deposit nonce from each receipt before calculating the root.
#[cfg(feature = "optimism")]
#[test]
fn check_optimism_receipt_root() {
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/transaction/tx_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Compact for TxType {
}
}

// For backwards compatibility purposesm only 2 bits of the type are encoded in the identifier
// For backwards compatibility purposes only 2 bits of the type are encoded in the identifier
// parameter. In the case of a 3, the full transaction type is read from the buffer as a
// single byte.
fn from_compact(mut buf: &[u8], identifier: usize) -> (Self, &[u8]) {
Expand Down
2 changes: 2 additions & 0 deletions crates/revm/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ where
// Fill revm structure.
fill_tx_env(&mut self.evm.env.tx, transaction, sender);

// In order to support contract creation through deposit transactions,
// the tx nonce must be set to the nonce of the account.
#[cfg(feature = "optimism")]
if transaction.is_deposit() &&
self.chain_spec
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc/src/eth/api/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ where
let block_id = block_id.into();

if block_id.is_pending() {
// Pending block can be fetched directly without need for caching;;
// Pending block can be fetched directly without need for caching
return Ok(self.provider().pending_block()?.map(|block| block.body.len()))
}

Expand Down

0 comments on commit 358669b

Please sign in to comment.