Skip to content

support more possible inputs for relay key config #665

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ flate2.workspace = true
# Version required by ethereum-consensus beacon-api-client
mev-share-sse = { git = "https://github.com/paradigmxyz/mev-share-rs", rev = "9eb2b0138ab3202b9eb3af4b19c7b3bf40b0faa8", default-features = false }
jsonrpsee = { version = "0.20.3", features = ["full"] }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "ade5ce6c4a19107c1059e5338d8f18855bd2d931" }
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "ade5ce6c4a19107c1059e5338d8f18855bd2d931" }
beacon-api-client = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "5031d31e318dd861cf3373702c5d92f085d926e4" }
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus/", rev = "5031d31e318dd861cf3373702c5d92f085d926e4" }
uuid = { version = "1.6.1", features = ["serde", "v5", "v4"] }
prometheus.workspace = true
warp.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions crates/rbuilder/src/live_builder/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use crate::{
};
use alloy_chains::ChainKind;
use alloy_primitives::{
hex,
utils::{format_ether, parse_ether},
FixedBytes, B256, U256,
};
Expand All @@ -63,8 +64,8 @@ use reth_primitives::StaticFileSegment;
use reth_provider::StaticFileProviderFactory;
use serde::Deserialize;
use serde_with::{serde_as, OneOrMany};
use std::collections::HashMap;
use std::{
collections::HashMap,
fmt::Debug,
path::{Path, PathBuf},
str::FromStr,
Expand Down Expand Up @@ -286,7 +287,8 @@ impl L1Config {

let relay_secret_key = if let Some(secret_key) = &self.relay_secret_key {
let resolved_key = secret_key.value()?;
SecretKey::try_from(resolved_key)?
let input = hex::decode(resolved_key)?;
SecretKey::from_bytes(&input)?
} else {
warn!("No relay secret key provided. A random key will be generated.");
SecretKey::random(&mut rand::thread_rng())?
Expand Down