Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kona-derive): Remove SignedRecoverable Shim #400

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kona-common-proc = { path = "../../crates/common-proc", version = "0.0.2" }
kona-preimage = { path = "../../crates/preimage", version = "0.0.2" }
kona-primitives = { path = "../../crates/primitives", version = "0.0.1" }
kona-mpt = { path = "../../crates/mpt", version = "0.0.2" }
kona-derive = { path = "../../crates/derive", default-features = false, version = "0.0.2" }
kona-derive = { path = "../../crates/derive", default-features = false, features = ["k256"], version = "0.0.2" }
refcell marked this conversation as resolved.
Show resolved Hide resolved
kona-executor = { path = "../../crates/executor", version = "0.0.1" }

# external
Expand Down
5 changes: 3 additions & 2 deletions crates/derive/src/sources/blobs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Blob Data Source

use crate::{
traits::{AsyncIterator, BlobProvider, ChainProvider, SignedRecoverable},
traits::{AsyncIterator, BlobProvider, ChainProvider},
types::{BlobData, BlockInfo, IndexedBlobHash, StageError, StageResult},
};
use alloc::{boxed::Box, vec::Vec};
Expand All @@ -27,6 +27,7 @@ where
/// Block Ref
block_ref: BlockInfo,
/// The L1 Signer.
#[allow(dead_code)] // Allow dead code for non-k256 builds.
clabby marked this conversation as resolved.
Show resolved Hide resolved
signer: Address,
/// Data.
data: Vec<BlobData>,
Expand Down Expand Up @@ -84,7 +85,7 @@ where
index += blob_hashes.map_or(0, |h| h.len());
continue;
}
if tx.recover_public_key().unwrap_or_default() != self.signer {
if tx.recover_signer().unwrap_or_default() != self.signer {
index += blob_hashes.map_or(0, |h| h.len());
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions crates/derive/src/sources/calldata.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! CallData Source

use crate::{
traits::{AsyncIterator, ChainProvider, SignedRecoverable},
traits::{AsyncIterator, ChainProvider},
types::{BlockInfo, StageError, StageResult},
};
use alloc::{boxed::Box, collections::VecDeque};
Expand All @@ -23,6 +23,7 @@ where
/// Block Ref
block_ref: BlockInfo,
/// The L1 Signer.
#[allow(dead_code)] // Allow dead code for non-k256 builds.
clabby marked this conversation as resolved.
Show resolved Hide resolved
signer: Address,
/// Current calldata.
calldata: VecDeque<Bytes>,
Expand Down Expand Up @@ -71,7 +72,7 @@ impl<CP: ChainProvider + Send> CalldataSource<CP> {
if to != self.batch_inbox_address {
return None;
}
if tx.recover_public_key().ok()? != self.signer {
if tx.recover_signer().ok()? != self.signer {
return None;
}
Some(data.to_vec().into())
Expand Down
49 changes: 0 additions & 49 deletions crates/derive/src/traits/ecrecover.rs

This file was deleted.

3 changes: 0 additions & 3 deletions crates/derive/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@ pub use providers::{ChainProvider, L2ChainProvider};
mod stages;
pub use stages::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage};

mod ecrecover;
pub use ecrecover::SignedRecoverable;

#[cfg(any(test, feature = "test-utils"))]
pub mod test_utils;
Loading