mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: do not rlp encode extradata (#7256)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6114,7 +6114,6 @@ dependencies = [
|
||||
name = "reth-node-core"
|
||||
version = "0.2.0-beta.3"
|
||||
dependencies = [
|
||||
"alloy-rlp",
|
||||
"assert_matches",
|
||||
"clap",
|
||||
"const-str",
|
||||
|
||||
@ -75,7 +75,6 @@ hyper.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
# crypto
|
||||
alloy-rlp.workspace = true
|
||||
secp256k1 = { workspace = true, features = ["global-context", "rand-std", "recovery"] }
|
||||
|
||||
# async
|
||||
|
||||
@ -89,7 +89,7 @@ impl TypedValueParser for ExtradataValueParser {
|
||||
return Err(clap::Error::raw(
|
||||
clap::error::ErrorKind::InvalidValue,
|
||||
format!(
|
||||
"Payload builder extradata size exceeds {MAXIMUM_EXTRA_DATA_SIZE}bytes limit"
|
||||
"Payload builder extradata size exceeds {MAXIMUM_EXTRA_DATA_SIZE}-byte limit"
|
||||
),
|
||||
))
|
||||
}
|
||||
|
||||
@ -86,9 +86,9 @@ pub trait PayloadBuilderConfig {
|
||||
/// Block extra data set by the payload builder.
|
||||
fn extradata(&self) -> Cow<'_, str>;
|
||||
|
||||
/// Returns the rlp-encoded extradata bytes.
|
||||
fn extradata_rlp_bytes(&self) -> Bytes {
|
||||
alloy_rlp::encode(self.extradata().as_bytes()).into()
|
||||
/// Returns the extradata as bytes.
|
||||
fn extradata_bytes(&self) -> Bytes {
|
||||
self.extradata().as_bytes().to_vec().into()
|
||||
}
|
||||
|
||||
/// The interval at which the job should build a new payload after the last.
|
||||
|
||||
@ -158,7 +158,7 @@ where
|
||||
.interval(conf.interval())
|
||||
.deadline(conf.deadline())
|
||||
.max_payload_tasks(conf.max_payload_tasks())
|
||||
.extradata(conf.extradata_rlp_bytes())
|
||||
.extradata(conf.extradata_bytes())
|
||||
.max_gas_limit(conf.max_gas_limit());
|
||||
|
||||
let payload_generator = BasicPayloadJobGenerator::with_builder(
|
||||
|
||||
@ -241,7 +241,7 @@ where
|
||||
.interval(conf.interval())
|
||||
.deadline(conf.deadline())
|
||||
.max_payload_tasks(conf.max_payload_tasks())
|
||||
.extradata(conf.extradata_rlp_bytes())
|
||||
.extradata(conf.extradata_bytes())
|
||||
.max_gas_limit(conf.max_gas_limit());
|
||||
|
||||
let payload_generator = BasicPayloadJobGenerator::with_builder(
|
||||
|
||||
@ -47,7 +47,7 @@ where
|
||||
.interval(conf.interval())
|
||||
.deadline(conf.deadline())
|
||||
.max_payload_tasks(conf.max_payload_tasks())
|
||||
.extradata(conf.extradata_rlp_bytes())
|
||||
.extradata(conf.extradata_bytes())
|
||||
.max_gas_limit(conf.max_gas_limit());
|
||||
|
||||
let payload_generator = EmptyBlockPayloadJobGenerator::with_builder(
|
||||
|
||||
Reference in New Issue
Block a user