mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 14:58:31 +00:00
Compare commits
1 Commits
slasher-fi
...
fulu-build
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2d5ee6689 |
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2722,6 +2722,7 @@ dependencies = [
|
|||||||
"ssz_types",
|
"ssz_types",
|
||||||
"test_random_derive",
|
"test_random_derive",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tracing",
|
||||||
"types",
|
"types",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ impl<E: EthSpec> TryFrom<BuilderBid<E>> for ProvenancedPayload<BlockProposalCont
|
|||||||
kzg_commitments: builder_bid.blob_kzg_commitments,
|
kzg_commitments: builder_bid.blob_kzg_commitments,
|
||||||
blobs_and_proofs: None,
|
blobs_and_proofs: None,
|
||||||
// TODO(fulu): update this with builder api returning the requests
|
// TODO(fulu): update this with builder api returning the requests
|
||||||
requests: None,
|
requests: Some(builder_bid.execution_requests),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
Ok(ProvenancedPayload::Builder(
|
Ok(ProvenancedPayload::Builder(
|
||||||
|
|||||||
@@ -468,11 +468,16 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
.ok_or_else(|| "missing payload for tx root".to_string())?;
|
.ok_or_else(|| "missing payload for tx root".to_string())?;
|
||||||
|
|
||||||
let (payload, blobs) = payload.deconstruct();
|
let (payload, blobs) = payload.deconstruct();
|
||||||
|
debug!(
|
||||||
|
payload_type=%payload.fork_name(),
|
||||||
|
"Fork name for received payload"
|
||||||
|
);
|
||||||
let full_block = block
|
let full_block = block
|
||||||
.try_into_full_block(Some(payload.clone()))
|
.try_into_full_block(Some(payload.clone()))
|
||||||
.ok_or("Internal error, just provided a payload")?;
|
.ok_or("Internal error, just provided a payload")?;
|
||||||
debug!(
|
debug!(
|
||||||
txs_count = payload.transactions().len(),
|
txs_count = payload.transactions().len(),
|
||||||
|
fork = %full_block.fork_name_unchecked(),
|
||||||
blob_count = blobs.as_ref().map(|b| b.commitments.len()),
|
blob_count = blobs.as_ref().map(|b| b.commitments.len()),
|
||||||
"Got full payload, sending to local beacon node for propagation"
|
"Got full payload, sending to local beacon node for propagation"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlock<T>>(
|
|||||||
};
|
};
|
||||||
let block = unverified_block.inner_block();
|
let block = unverified_block.inner_block();
|
||||||
|
|
||||||
debug!(slot = %block.slot(), "Signed block received in HTTP API");
|
debug!(slot = %block.slot(), fork=%block.fork_name_unchecked(), provenance, "Signed block received in HTTP API");
|
||||||
|
|
||||||
/* actually publish a block */
|
/* actually publish a block */
|
||||||
let publish_block_p2p = move |block: Arc<SignedBeaconBlock<T::EthSpec>>,
|
let publish_block_p2p = move |block: Arc<SignedBeaconBlock<T::EthSpec>>,
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ ssz_types = { workspace = true }
|
|||||||
test_random_derive = { path = "../../common/test_random_derive" }
|
test_random_derive = { path = "../../common/test_random_derive" }
|
||||||
types = { workspace = true }
|
types = { workspace = true }
|
||||||
zeroize = { workspace = true }
|
zeroize = { workspace = true }
|
||||||
|
tracing = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ use reqwest::{
|
|||||||
header::{HeaderMap, HeaderValue},
|
header::{HeaderMap, HeaderValue},
|
||||||
Body, IntoUrl, RequestBuilder, Response,
|
Body, IntoUrl, RequestBuilder, Response,
|
||||||
};
|
};
|
||||||
|
use tracing::debug;
|
||||||
pub use reqwest::{StatusCode, Url};
|
pub use reqwest::{StatusCode, Url};
|
||||||
use reqwest_eventsource::{Event, EventSource};
|
use reqwest_eventsource::{Event, EventSource};
|
||||||
pub use sensitive_url::{SensitiveError, SensitiveUrl};
|
pub use sensitive_url::{SensitiveError, SensitiveUrl};
|
||||||
@@ -1099,11 +1100,13 @@ impl BeaconNodeHttpClient {
|
|||||||
block_contents: &PublishBlockRequest<E>,
|
block_contents: &PublishBlockRequest<E>,
|
||||||
validation_level: Option<BroadcastValidation>,
|
validation_level: Option<BroadcastValidation>,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
|
let fork_name = block_contents.signed_block().message().body().fork_name();
|
||||||
|
debug!(%fork_name, "Posting beacon block");
|
||||||
self.post_generic_with_consensus_version(
|
self.post_generic_with_consensus_version(
|
||||||
self.post_beacon_blocks_v2_path(validation_level)?,
|
self.post_beacon_blocks_v2_path(validation_level)?,
|
||||||
block_contents,
|
block_contents,
|
||||||
Some(self.timeouts.proposal),
|
Some(self.timeouts.proposal),
|
||||||
block_contents.signed_block().message().body().fork_name(),
|
fork_name,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user