Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
allow-mixed-uninlined-format-args = false
# This feature is in Rust nightly, as of v1.62. The line is added in anticipation.
# Once the feature stabilizes, remove the #[allow(clippy::unwrap_used)] lines in front of every `mod test`
allow-unwrap-in-tests = true
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ repository = "https://github.com/ReamLabs/ream"
rust-version = "1.88.0"
version = "0.1.0"

[workspace.lints.clippy]
uninlined_format_args = "warn"

[workspace.dependencies]
actix-web = "4.10.2"
actix-web-lab = "0.24.1"
Expand Down
3 changes: 3 additions & 0 deletions bin/ream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ version.workspace = true
name = "ream"
path = "src/main.rs"

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/account_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
bip39.workspace = true
rand.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/api_types/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/api_types/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
actix-web.workspace = true
alloy-primitives.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/api_types/lean/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
ethereum_serde_utils.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/chain/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/chain/lean/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/checkpoint_sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/consensus/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ version.workspace = true
zkvm = []
test_consensus = []

[lints]
workspace = true

[dependencies]
alloy-consensus.workspace = true
alloy-primitives.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ impl FromStr for KZGCommitment {
Ok(Self(kzg_commitment_bytes))
} else {
Err(format!(
"InvalidByteLength: got {}, expected {}",
"InvalidByteLength: got {}, expected {BYTES_PER_COMMITMENT}",
bytes.len(),
BYTES_PER_COMMITMENT
))
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/common/consensus/lean/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/consensus/misc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
alloy-rlp.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/execution_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
alloy-rlp.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
anyhow.workspace = true
futures.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/fork_choice/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-consensus.workspace = true
alloy-primitives.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/light_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
lazy_static.workspace = true
prometheus_exporter.workspace = true
3 changes: 3 additions & 0 deletions crates/common/network_spec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]

[build-dependencies]
Expand Down
3 changes: 3 additions & 0 deletions crates/common/operation_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
parking_lot.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/polynomial_commitments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-consensus.workspace = true
alloy-primitives.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
tokio.workspace = true
3 changes: 3 additions & 0 deletions crates/common/validator/beacon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
alloy-rpc-types-beacon.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/common/validator/lean/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/crypto/bls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ version.workspace = true
supranational = ["blst"]
zkcrypto = ["bls12_381", "sha2"]

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/crypto/keystore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
aes.workspace = true
alloy-primitives.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/crypto/merkle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/crypto/post_quantum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ default = ["signature-scheme-prod"]
signature-scheme-prod = []
signature-scheme-test = []

[lints]
workspace = true

[dependencies]
anyhow.workspace = true
ethereum_ssz.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/networking/discv5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
alloy-rlp.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions crates/networking/manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ version.workspace = true
default = []
disable_ancestor_validation = []

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ pub async fn validate_blob_sidecar(
Ok(expected_index) => {
if expected_index != header.proposer_index {
return Ok(ValidationResult::Reject(format!(
"Wrong proposer index: slot {}: expected {}, got {}",
header.slot, expected_index, header.proposer_index
"Wrong proposer index: slot {}: expected {expected_index}, got {}",
header.slot, header.proposer_index
)));
}
}
Expand Down
3 changes: 3 additions & 0 deletions crates/networking/p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
Expand Down
27 changes: 5 additions & 22 deletions crates/networking/p2p/src/gossipsub/beacon/topics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ impl std::fmt::Display for GossipTopic {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"/{}/{}/{}/{}",
TOPIC_PREFIX,
"/{TOPIC_PREFIX}/{}/{}/{ENCODING_POSTFIX}",
self.fork.encode_hex(),
self.kind,
ENCODING_POSTFIX
)
}
}
Expand Down Expand Up @@ -126,42 +124,27 @@ impl From<GossipTopic> for TopicHash {
LightClientOptimisticUpdate => LIGHT_CLIENT_OPTIMISTIC_UPDATE_TOPIC,
BeaconAttestation(index) => {
return TopicHash::from_raw(format!(
"/{}/{}/{}{}{}",
TOPIC_PREFIX,
"/{TOPIC_PREFIX}/{}/{BEACON_ATTESTATION_PREFIX}{index}{ENCODING_POSTFIX}",
val.fork.encode_hex(),
BEACON_ATTESTATION_PREFIX,
index,
ENCODING_POSTFIX,
));
}
SyncCommittee(index) => {
return TopicHash::from_raw(format!(
"/{}/{}/{}{}{}",
TOPIC_PREFIX,
"/{TOPIC_PREFIX}/{}/{SYNC_COMMITTEE_PREFIX_TOPIC}{index}{ENCODING_POSTFIX}",
val.fork.encode_hex(),
SYNC_COMMITTEE_PREFIX_TOPIC,
index,
ENCODING_POSTFIX,
));
}
BlobSidecar(index) => {
return TopicHash::from_raw(format!(
"/{}/{}/{}{}{}",
TOPIC_PREFIX,
"/{TOPIC_PREFIX}/{}/{BLOB_SIDECAR_PREFIX_TOPIC}{index}{ENCODING_POSTFIX}",
val.fork.encode_hex(),
BLOB_SIDECAR_PREFIX_TOPIC,
index,
ENCODING_POSTFIX,
));
}
};

TopicHash::from_raw(format!(
"/{}/{}/{}{}",
TOPIC_PREFIX,
"/{TOPIC_PREFIX}/{}/{kind_str}{ENCODING_POSTFIX}",
val.fork.encode_hex(),
kind_str,
ENCODING_POSTFIX
))
}
}
Expand Down
Loading
Loading