MCPcopy Create free account
hub / github.com/SeismicSystems/summit / execution_payload_envelope_to_block

Function execution_payload_envelope_to_block

node/src/bin/execute_blocks.rs:154–181  ·  view source on GitHub ↗
(
    payload: ExecutionPayloadEnvelopeV4,
    parent: Digest,
    view: u64,
)

Source from the content-addressed store, hash-verified

152
153 if let Err(e) = client.commit_hash(forkchoice).await {
154 eprintln!("commit_hash failed: {e}");
155 break;
156 }
157 println!(" Committed block {} to Reth", block_number);
158 }
159 Ok(None) => {
160 // this also happens when there are no more blocks
161 eprintln!("failed to load block");
162 break;
163 }
164 Err(e) => {
165 eprintln!("start_building_block failed: {e}");
166 break;
167 }
168 }
169 }
170
171 Ok(())
172}
173
174fn execution_payload_envelope_to_block(
175 payload: ExecutionPayloadEnvelopeV4,
176 parent: Digest,
177 view: u64,
178) -> Block {
179 let execution_payload = payload.envelope_inner.execution_payload;
180 let height = execution_payload.payload_inner.payload_inner.block_number;
181 let timestamp = execution_payload.payload_inner.payload_inner.timestamp;
182
183 // Convert execution requests from the envelope
184 let execution_requests = payload.execution_requests.into_iter().collect::<Vec<_>>();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected