Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88"
toolchain: "1.90"
components: clippy
- name: cargo cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88"
toolchain: "1.90"
- name: cargo cache
uses: Swatinem/rust-cache@v2
- name: cargo test scroll
Expand Down
24 changes: 19 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,30 @@ resolver = "2"
[workspace.package]
version = "2.0.0"
edition = "2021"
rust-version = "1.88"
rust-version = "1.90"
authors = ["Scroll developers"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/scroll-tech/stateless-block-verifier"
repository = "https://github.com/scroll-tech/stateless-block-verifier"

[workspace.lints.rust]
missing-docs = "warn"
missing-debug-implementations = "warn"
unused-qualifications = "warn"

[workspace.lints.clippy]
# some useful lints from pedantic group
assigning-clones = "warn"
cast-lossless = "warn"
redundant-else = "warn"
single-match-else = "warn"
elidable-lifetime-names = "warn"
uninlined-format-args = "warn"
unnecessary-box-returns = "warn"
unnecessary-debug-formatting = "warn"
# this is useful if we forget to align versions of alloy/revm when upgrading reth
multiple-crate-versions = "warn"

[workspace.dependencies]
# https://github.com/alloy-rs/alloy
alloy = { version = "1.0.41", default-features = false }
Expand Down Expand Up @@ -123,10 +141,6 @@ tag = "scroll-v91"
default-features = false
features = ["std"]

[workspace.lints.rust]
missing-docs = "deny"
missing-debug-implementations = "deny"

[patch.crates-io]
revm = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
revm-bytecode = { git = "https://github.com/scroll-tech/revm", tag = "scroll-v91" }
Expand Down
39 changes: 39 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Please re-check this list when updating dependencies, keep it minimal.
allowed-duplicate-crates = [
"ark-ff",
"ark-ff-asm",
"ark-ff-macros",
"ark-serialize",
"ark-std",
"nybbles",
"digest",
"fastrlp",
"getrandom",
"itertools",
"rand",
"rand_chacha",
"rand_core",
"schemars",
"secp256k1",
"secp256k1-sys",
"syn",
"tracing-subscriber",
"windows-sys",
"windows-targets",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",

# revisit these when fully remove rkyv
"foldhash",
"hashbrown",
"indexmap",

# FIXME: remove after upgrade risc0-ethereum-trie
"alloy-trie",
]
2 changes: 1 addition & 1 deletion crates/core/src/executor/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct EvmExecutor<'a> {
block: &'a RecoveredBlock<Block>,
}

impl<'a> crate::EvmExecutor<'a> {
impl<'a> EvmExecutor<'a> {
/// Create a new EVM executor
pub fn new(
chain_spec: Arc<ChainSpec>,
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/verifier/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ mod tests {
) {
let witness: BlockWitness = serde_json::from_str(witness_json).unwrap();
let chain_spec = get_chain_spec(Chain::from_id(witness.chain_id)).unwrap();
crate::verifier::run(&[witness], chain_spec).unwrap();
run(&[witness], chain_spec).unwrap();
}
}
1 change: 1 addition & 0 deletions crates/primitives/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pub mod rpc {
};

/// Transaction object used in RPC.
#[allow(unused_qualifications)]
pub type RpcTransaction<T = super::consensus::TxEnvelope> = alloy_rpc_types_eth::Transaction<T>;

/// Block representation for RPC.
Expand Down
8 changes: 4 additions & 4 deletions crates/utils/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ pub trait ProviderExt: Provider<Network> {
#[cfg(not(feature = "scroll"))]
async fn dump_block_ancestors(
&self,
number: sbv_primitives::BlockNumber,
number: BlockNumber,
ancestors: Option<usize>,
) -> TransportResult<Option<Vec<sbv_primitives::types::rpc::Block>>> {
) -> TransportResult<Option<Vec<Block>>> {
use std::future::IntoFuture;

let ancestors = ancestors
.unwrap_or_default()
.clamp(1, (number as usize).min(256));

let ancestors = futures::future::try_join_all((1..=ancestors).map(|offset| {
let block_number = number - offset as sbv_primitives::BlockNumber;
let block_number = number - offset as BlockNumber;
self.get_block_by_number(block_number.into()).into_future()
}))
.await?;
Expand Down Expand Up @@ -188,7 +188,7 @@ impl<'a, P: ProviderExt> DumpBlockWitness<'a, P> {
#[cfg(not(feature = "scroll"))]
pub fn with_cached_ancestor_blocks<I>(mut self, iter: I) -> Self
where
I: IntoIterator<Item = sbv_primitives::types::rpc::Block>,
I: IntoIterator<Item = Block>,
{
self.builder = self.builder.ancestor_blocks(iter);
self
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.88"
channel = "1.90"
Loading