-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat(sidecar): integrate local builder with builder api #97
feat(sidecar): integrate local builder with builder api #97
Conversation
9116295
to
5ac37bd
Compare
/// Poll the deadline until it is reached. | ||
pub async fn wait(&mut self) -> Option<u64> { | ||
let slot = poll_fn(|cx| self.poll_unpin(cx)).await; | ||
self.sleep = None; | ||
slot | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to reviewers: we haven't measured the efficiency of this future, in the context of being polled inside a tokio::select
branch. Any suggestion is welcome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just await self.sleep
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because self.sleep is an Option
/// Poll the deadline until it is reached. | ||
/// | ||
/// - If already reached, the future will return `None` immediately. | ||
/// - If not reached, the future will return `Some(slot)` when the deadline is reached. | ||
impl Future for CommitmentDeadline { | ||
type Output = Option<u64>; | ||
|
||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { | ||
let Some(ref mut sleep) = self.sleep else { | ||
return Poll::Ready(None); | ||
}; | ||
|
||
match sleep.as_mut().poll(cx) { | ||
Poll::Ready(_) => Poll::Ready(Some(self.slot)), | ||
Poll::Pending => Poll::Pending, | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that we select on the Some(slot)
result, meaning that it won't match if the future returns None
immediately, which is the case if the sleep future is already over, until Self::new() is called again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some questions and notes, but overall great job. What a shit show local block building turned out to be lmao
/// Poll the deadline until it is reached. | ||
pub async fn wait(&mut self) -> Option<u64> { | ||
let slot = poll_fn(|cx| self.poll_unpin(cx)).await; | ||
self.sleep = None; | ||
slot | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just await self.sleep
directly?
Co-authored-by: merklefruit <[email protected]>
Co-authored-by merklefruit <[email protected]>
Co-authored-by merklefruit <[email protected]>
Co-authored-by merklefruit <[email protected]>
…lidation Co-authored-by: nicolas <[email protected]>
Co-authored-by merklefruit <[email protected]>
Co-authored-by: thedevbirb <[email protected]>
Co-authored-by: thedevbirb <[email protected]>
f2020f0
to
bf76777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great work!
@coderabbitai review |
Actions performedReview triggered.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent changes to the Changes
Sequence Diagram(s)N/A Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range comments (7)
bolt-sidecar/src/client/commit_boost.rs (2)
Line range hint
35-49
: Improve error handling in the spawned task.The function
CommitBoostClient::new
correctly initializes a newCommitBoostClient
instance. However, the error handling in the spawned task could be improved by adding proper error handling instead of usingexpect
.- tokio::spawn(async move { - this.load_pubkeys().await.expect("failed to load pubkeys"); - }); + tokio::spawn(async move { + if let Err(e) = this.load_pubkeys().await { + tracing::error!(error = ?e, "failed to load pubkeys"); + } + });
Line range hint
51-74
: Add a retry limit to the loop.The function
load_pubkeys
correctly loads public keys from a remote client and stores them locally. However, it could benefit from a retry limit to avoid potential infinite loops.- loop { + let mut attempts = 0; + while attempts < 10 { + attempts += 1;bolt-sidecar/src/api/builder.rs (3)
Line range hint
87-94
: LGTM!The
register_validators
function is well-structured.Reminder: Intercept this request to register Bolt validators on-chain as well.
The TODO comment indicates future work.
Do you want me to generate the code to intercept this request or open a GitHub issue to track this task?
Line range hint
106-150
: LGTM!The
get_header
function is well-structured and handles errors appropriately.Reminder: Handle failure when no local payload is produced.
The TODO comment indicates a need to handle this case.
Do you want me to generate the code to handle this failure or open a GitHub issue to track this task?
Line range hint
188-230
: LGTM!The
get_payload
function is well-structured and handles errors appropriately.Reminder: Handle failures when submitting the signed blinded block.
The TODO comment indicates a need to handle this case.
Do you want me to generate the code to handle these failures or open a GitHub issue to track this task?
bolt-sidecar/src/state/execution.rs (1)
Line range hint
117-171
: LGTM!The
try_commit
function is well-structured and handles validation appropriately.Reminder: Check
max_fee_per_blob_gas
against theblob_base_fee
.The TODO comment indicates a need to handle this case.
Do you want me to generate the code to handle this check or open a GitHub issue to track this task?
bolt-sidecar/src/builder/payload_builder.rs (1)
Line range hint
103-237
: LGTM!The
build_fallback_payload
function is well-structured and handles the payload building process appropriately.Reminder: Handle potential reorgs and refactor once
ConsensusState
is ready.The TODO comments indicate a need to handle these cases.
Do you want me to generate the code to handle potential reorgs and refactor or open a GitHub issue to track these tasks?
Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Files ignored due to path filters (1)
bolt-sidecar/Cargo.lock
is excluded by!**/*.lock
Files selected for processing (29)
- Justfile (2 hunks)
- bolt-sidecar/Cargo.toml (1 hunks)
- bolt-sidecar/bin/sidecar.rs (1 hunks)
- bolt-sidecar/src/api/builder.rs (10 hunks)
- bolt-sidecar/src/api/spec.rs (3 hunks)
- bolt-sidecar/src/builder/compat.rs (5 hunks)
- bolt-sidecar/src/builder/mod.rs (2 hunks)
- bolt-sidecar/src/builder/payload_builder.rs (9 hunks)
- bolt-sidecar/src/builder/signature.rs (1 hunks)
- bolt-sidecar/src/builder/template.rs (6 hunks)
- bolt-sidecar/src/client/commit_boost.rs (2 hunks)
- bolt-sidecar/src/client/mevboost.rs (1 hunks)
- bolt-sidecar/src/client/pubsub.rs (1 hunks)
- bolt-sidecar/src/common.rs (4 hunks)
- bolt-sidecar/src/config.rs (5 hunks)
- bolt-sidecar/src/crypto/bls.rs (2 hunks)
- bolt-sidecar/src/crypto/mod.rs (1 hunks)
- bolt-sidecar/src/json_rpc/api.rs (5 hunks)
- bolt-sidecar/src/json_rpc/mod.rs (1 hunks)
- bolt-sidecar/src/lib.rs (2 hunks)
- bolt-sidecar/src/primitives/commitment.rs (4 hunks)
- bolt-sidecar/src/primitives/constraint.rs (2 hunks)
- bolt-sidecar/src/primitives/mod.rs (7 hunks)
- bolt-sidecar/src/state/consensus.rs (6 hunks)
- bolt-sidecar/src/state/execution.rs (8 hunks)
- bolt-sidecar/src/state/fetcher.rs (7 hunks)
- bolt-sidecar/src/state/head_tracker.rs (1 hunks)
- bolt-sidecar/src/state/mod.rs (7 hunks)
- bolt-sidecar/src/test_util.rs (4 hunks)
Additional comments not posted (102)
bolt-sidecar/src/crypto/mod.rs (1)
3-3
: Exported items look good.The added exports for
SignerBLS
andSignerBLSAsync
are correctly implemented and consistent with the rest of the code.bolt-sidecar/src/client/pubsub.rs (1)
17-17
: Implementation ofPubsubClient
looks good.The
PubsubClient
implementation is correctly implemented and consistent with the rest of the code.bolt-sidecar/src/lib.rs (4)
9-10
: Exported items look good.The added exports for
start_builder_proxy_server
andBuilderProxyConfig
are correctly implemented and consistent with the rest of the code.
24-24
: Exported item looks good.The added export for
LocalBuilder
is correctly implemented and consistent with the rest of the code.
28-28
: Exported items look good.The added exports for
Chain
,Config
, andOpts
are correctly implemented and consistent with the rest of the code.
35-35
: Exported item looks good.The added export for
start_rpc_server
is correctly implemented and consistent with the rest of the code.bolt-sidecar/Cargo.toml (1)
17-18
: Added dependencies look good.The added dependencies for
tree_hash
andtree_hash_derive
are correctly implemented and consistent with the rest of the code.bolt-sidecar/src/common.rs (3)
2-2
: Added import looks good.The added import for
TransactionSigned
is correctly implemented and consistent with the rest of the code.
29-32
: Implementation ofmax_transaction_cost
looks good.The
max_transaction_cost
function is correctly implemented and consistent with the rest of the code.
Line range hint
43-47
: Implementation ofvalidate_transaction
looks good.The
validate_transaction
function is correctly implemented and consistent with the rest of the code.bolt-sidecar/src/json_rpc/mod.rs (3)
22-22
: LGTM!The
start_rpc_server
function is well-structured and follows good practices for setting up a server.
Line range hint
41-41
: LGTM!The
handle_rpc_request
function handles parsing and method dispatching appropriately. Error handling is in place.
Line range hint
66-66
: LGTM!The
handle_rejection
function handles different types of rejections and provides meaningful error messages.bolt-sidecar/src/primitives/constraint.rs (2)
92-92
: LGTM!The change to use
encode_enveloped
instead ofencode_2718
is consistent with the new encoding method.
Line range hint
102-102
: LGTM!The
as_bytes
function is well-implemented.bolt-sidecar/src/state/head_tracker.rs (3)
36-37
: LGTM!The change to use
beacon_api_url
instead ofbeacon_url
improves clarity and is consistent with naming conventions.
Line range hint
72-72
: LGTM!The
stop
function is well-implemented.
Line range hint
78-78
: LGTM!The
next_head
function is well-implemented.bolt-sidecar/src/crypto/bls.rs (3)
39-42
: LGTM!The
SignerBLS
trait is well-defined and provides a clear interface for synchronous BLS signature generation.
46-49
: LGTM!The
SignerBLSAsync
trait is well-defined and provides a clear interface for asynchronous BLS signature generation.
Line range hint
54-54
: LGTM!The
Signer
struct implements theSignerBLS
andSignerBLSAsync
traits and provides methods for BLS signature generation and verification.Justfile (1)
81-83
: LGTM!The
kill-builder
task is well-implemented and follows good practices for stopping a Docker container.bolt-sidecar/src/test_util.rs (5)
38-44
: LGTM!The function
try_get_engine_api_url
correctly checks the reachability of the test engine client.
63-79
: LGTM!The function
get_test_config
correctly constructs the test configuration and handles potential errors.
87-95
: LGTM!The function
default_test_transaction
correctly creates a default transaction template for tests and allows an optional nonce parameter.
Line range hint
97-99
: LGTM!The function
test_bls_secret_key
correctly creates a default BLS secret key.
Line range hint
102-132
: LGTM!The struct
TestSignableData
and its implementations forSignableBLS
andSignableECDSA
are correctly defined and implemented.bolt-sidecar/src/client/commit_boost.rs (1)
Line range hint
67-82
: LGTM!The function
sign
correctly signs data asynchronously using BLS signatures.bolt-sidecar/src/builder/template.rs (7)
38-49
: LGTM!The function
add_transaction
correctly adds a transaction to the block template and updates the state diff.
61-65
: LGTM!The function
blob_count
correctly returns the blob count of the block template.
Line range hint
73-79
: LGTM!The function
remove_transaction_at_index
correctly removes a transaction at a specified index and updates the state diff.
Line range hint
83-109
: LGTM!The function
retain
correctly retains transactions that do not conflict with the given account state.
Line range hint
133-137
: LGTM!The function
get_diff
correctly returns the nonce and balance diff for a given address.
Line range hint
127-131
: LGTM!The struct
StateDiff
correctly tracks intermediate changes to the state according to the block template.
Line range hint
19-28
: LGTM!The struct
BlockTemplate
correctly serves as a fallback block template and keeps intermediary state for new commitment requests.bolt-sidecar/src/primitives/commitment.rs (6)
47-53
: LGTM!The function
deserialize_tx_signed
correctly deserializes a signed transaction.
56-63
: LGTM!The function
serialize_tx_signed
correctly serializes a signed transaction.
Line range hint
66-71
: LGTM!The function
deserialize_from_str
correctly deserializes a value from a string.
Line range hint
74-82
: LGTM!The function
signature_as_str
correctly serializes a signature as a string.
88-91
: LGTM!The function
digest
correctly returns the digest of an inclusion request.
Line range hint
106-144
: LGTM!The tests correctly cover deserialization of inclusion and commitment requests.
bolt-sidecar/src/builder/signature.rs (6)
17-31
: LGTM!The function
sign_builder_message
correctly signs a builder message using a BLS secret key.
35-48
: LGTM!The function
verify_signed_builder_message
correctly verifies a signed builder message using a BLS public key.
51-63
: LGTM!The function
verify_signature
correctly verifies a BLS signature for a given message and public key.
69-72
: LGTM!The function
sign_message
correctly signs arbitrary bytes with a BLS secret key.
83-89
: LGTM!The function
compute_signing_root
correctly computes the signing root for a given object root and signing domain.
96-114
: LGTM!The function
compute_builder_domain
correctly computes the Application Builder domain for signing arbitrary builder-api messages.bolt-sidecar/src/client/mevboost.rs (2)
126-126
: LGTM!The code changes are approved.
126-126
: LGTM!The code changes are approved.
bolt-sidecar/src/state/fetcher.rs (5)
28-28
: LGTM!The code changes are approved.
51-51
: LGTM!The code changes are approved.
78-83
: LGTM!The code changes are approved.
105-111
: LGTM!The code changes are approved.
146-146
: LGTM!The code changes are approved.
bolt-sidecar/src/api/spec.rs (2)
67-68
: LGTM!The code changes are approved.
110-112
: LGTM!The code changes are approved.
bolt-sidecar/src/builder/mod.rs (3)
73-81
: LGTM!The code changes are approved.
86-91
: LGTM!The code changes are approved.
96-148
: LGTM!The code changes are approved.
bolt-sidecar/bin/sidecar.rs (8)
3-3
: LGTM!The code changes are approved.
25-25
: LGTM!The code changes are approved.
31-58
: LGTM!The code changes are approved.
68-120
: LGTM!The code changes are approved.
121-132
: LGTM!The code changes are approved.
133-144
: LGTM!The code changes are approved.
145-159
: LGTM!The code changes are approved.
160-164
: LGTM!The code changes are approved.
bolt-sidecar/src/primitives/mod.rs (3)
Line range hint
10-17
: Update import paths fordeneb
module.The import paths have been updated to reflect the new module structure. Ensure that all references to the
deneb
module are correctly updated across the codebase.Verification successful
The search results show multiple references to the
deneb
module across various files. Here are the locations:
bolt-sidecar/src/builder/compat.rs
bolt-sidecar/src/builder/signature.rs
bolt-sidecar/src/builder/mod.rs
bolt-sidecar/src/state/consensus.rs
bolt-sidecar/src/crypto/bls.rs
bolt-sidecar/src/primitives/mod.rs
bolt-sidecar/src/api/spec.rs
bolt-sidecar/src/api/builder.rs
bolt-sidecar/src/client/mevboost.rs
We need to ensure that all these references are correctly updated and consistent with the new module structure.
All references to the
deneb
module are correctly updated.The references to the
deneb
module across the codebase are consistent and correctly reflect the new module structure. No issues were found.
bolt-sidecar/src/crypto/bls.rs
bolt-sidecar/src/state/consensus.rs
bolt-sidecar/src/builder/signature.rs
bolt-sidecar/src/builder/mod.rs
bolt-sidecar/src/builder/compat.rs
bolt-sidecar/src/api/spec.rs
bolt-sidecar/src/api/builder.rs
bolt-sidecar/src/primitives/mod.rs
bolt-sidecar/src/client/mevboost.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the `deneb` module are correctly updated. # Test: Search for references to `deneb`. Expect: Only updated references. rg --type rust 'deneb'Length of output: 1027
Script:
#!/bin/bash # Description: Check the context around each reference to the `deneb` module in the listed files to ensure correctness. # Extract 5 lines before and after each reference to `deneb` for context. for file in $(rg --files-with-matches 'deneb' --type rust); do echo "File: $file" rg -C 5 'deneb' $file echo "----------------------------------------" doneLength of output: 6279
90-90
: Update field name inFetchPayloadRequest
.The field name
response
has been updated toresponse_tx
for clarity and consistency.Verification successful
Update field name in
FetchPayloadRequest
.The field name
response
has been correctly updated toresponse_tx
for clarity and consistency.
bolt-sidecar/src/primitives/mod.rs
: Line 90Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `response_tx` are correctly updated. # Test: Search for references to `response_tx`. Expect: Only updated references. rg --type rust 'response_tx'Length of output: 1278
Script:
#!/bin/bash # Description: Verify the definition of `response_tx` in `json_rpc/api.rs`. # Test: Search for the definition of `response_tx` to confirm its context. rg --type rust 'response_tx' --context 5 json_rpc/api.rsLength of output: 112
Script:
#!/bin/bash # Description: Verify the definition of `response_tx` in existing files. # Test: Search for the definition of `response_tx` to confirm its context. rg --type rust 'response_tx' --context 5Length of output: 7457
148-148
: Update field inPayloadAndBlobs
.The
blobs_bundle
field is no longer optional, ensuring it is always present.bolt-sidecar/src/state/consensus.rs (5)
11-11
: IntroduceCommitmentDeadline
struct.The
CommitmentDeadline
struct is introduced to handle commitment deadlines in theConsensusState
struct.
87-90
: Updatevalidate_request
method to check commitment deadline.The
validate_request
method now includes logic to check the commitment deadline, ensuring that requests are validated against the deadline.
101-104
: Updateupdate_head
method to reset commitment deadline.The
update_head
method now includes logic to reset the commitment deadline when the head is updated.
38-49
: UpdateConsensusState
struct to include new fields.The
ConsensusState
struct now includeslatest_slot_timestamp
,latest_slot
,commitment_deadline
, andcommitment_deadline_duration
to enhance slot and deadline tracking.
26-26
: UpdateEpoch
struct to includeproposer_duties
.The
Epoch
struct now includesproposer_duties
to track proposer duties.Verification successful
Update
Epoch
struct to includeproposer_duties
.The
Epoch
struct now includesproposer_duties
to track proposer duties. All references toproposer_duties
are correctly updated within thebolt-sidecar/src/state/consensus.rs
file, and there are no references outside this file that need updating.
bolt-sidecar/src/state/consensus.rs
: All references toproposer_duties
are correctly updated.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `proposer_duties` are correctly updated. # Test: Search for references to `proposer_duties`. Expect: Only updated references. rg --type rust 'proposer_duties'Length of output: 732
Script:
#!/bin/bash # Description: Verify all references to `proposer_duties` outside `bolt-sidecar/src/state/consensus.rs`. # Test: Search for references to `proposer_duties` in the entire codebase except `bolt-sidecar/src/state/consensus.rs`. rg --type rust 'proposer_duties' --glob '!bolt-sidecar/src/state/consensus.rs'Length of output: 78
bolt-sidecar/src/json_rpc/api.rs (2)
10-10
: IntroduceCommitmentRequest
struct.The
CommitmentRequest
struct is introduced to handle commitment requests in theApiEvent
struct.
55-58
: Update field name inApiEvent
.The field name
response
has been updated toresponse_tx
for clarity and consistency.Verification successful
Update field name in
ApiEvent
.The field name
response
has been successfully updated toresponse_tx
for clarity and consistency. No remaining references to the oldresponse
field were found.
bolt-sidecar/bin/sidecar.rs
bolt-sidecar/src/json_rpc/api.rs
bolt-sidecar/src/primitives/mod.rs
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `response_tx` are correctly updated. # Test: Search for references to `response_tx`. Expect: Only updated references. rg --type rust 'response_tx'Length of output: 1278
Script:
#!/bin/bash # Description: Verify no remaining references to the old `response` field. # Test: Search for references to `response`. Expect: No references to the old field. rg --type rust '\bresponse\b'Length of output: 4730
bolt-sidecar/src/builder/compat.rs (3)
8-8
: IntroduceTransactionSigned
type.The
TransactionSigned
type is introduced to ensure compatibility with the new transaction structure.
Line range hint
146-163
: Updateto_consensus_execution_payload
function to useTransactionSigned
.The
to_consensus_execution_payload
function now uses theTransactionSigned
type to ensure compatibility with the new transaction structure.
180-188
: Updateto_consensus_withdrawal
function to useExecutionAddress
.The
to_consensus_withdrawal
function now uses theExecutionAddress
type to ensure compatibility with the new address structure.bolt-sidecar/src/state/mod.rs (3)
4-8
: IntroduceCommitmentDeadline
struct.The
CommitmentDeadline
struct is introduced to handle commitment deadlines.
27-32
: UpdateCommitmentDeadline
struct to includesleep
field.The
CommitmentDeadline
struct now includes asleep
field to handle sleep durations.
41-46
: Updatewait
method to handlesleep
field.The
wait
method now includes logic to handle thesleep
field, ensuring that the method correctly handles sleep durations.bolt-sidecar/src/api/builder.rs (3)
Line range hint
35-43
: LGTM!The
BuilderProxyServer
struct is well-defined and the new fields are appropriately added.
Line range hint
249-266
: LGTM!The
start_builder_proxy_server
function is well-structured and the changes are appropriate.
274-276
: LGTM!The
index
function is straightforward and appropriate.bolt-sidecar/src/state/execution.rs (7)
Line range hint
14-42
: LGTM!The
ValidationError
enum is well-defined and appropriately documents each error.
Line range hint
63-80
: LGTM!The
ExecutionState
struct is well-defined and the fields are appropriately documented.
84-91
: LGTM!The
new
function is well-structured and the changes are appropriate.
Line range hint
176-185
: LGTM!The
commit_transaction
function is well-structured and the changes are appropriate.
187-197
: LGTM!The
update_head
function is well-structured and the changes are appropriate.
Line range hint
200-207
: LGTM!The
apply_state_update
function is well-structured and the changes are appropriate.
Line range hint
209-237
: LGTM!The
refresh_templates
function is well-structured and the changes are appropriate.bolt-sidecar/src/config.rs (2)
Line range hint
1-70
: LGTM!The constants and command-line options are well-defined and documented.
Line range hint
71-306
: LGTM!The
Config
struct and related implementations are well-defined and appropriately handle the configuration options.bolt-sidecar/src/builder/payload_builder.rs (7)
41-47
: LGTM!The
FallbackPayloadBuilder
struct is well-defined and appropriately documents its purpose and fields.
52-65
: LGTM!The
new
function is well-structured and the changes are appropriate.
Line range hint
263-313
: LGTM!The
fetch_next_payload_hint
function is well-structured and the changes are appropriate.
Line range hint
316-324
: LGTM!The
parse_geth_response
function is well-structured and the changes are appropriate.
Line range hint
327-377
: LGTM!The
build_header_with_hints_and_context
function is well-structured and the changes are appropriate.
396-424
: LGTM!The
test_build_fallback_payload
function is well-structured and the changes are appropriate.
427-433
: LGTM!The
test_empty_el_withdrawals_root
function is well-structured and the changes are appropriate.
feat: refactor config and add ChainConfig
TxEnvelope
in favour ofreth_primitives::TransactionSigned
With this PR, we will be able to build blocks locally including the preconfirmed transactions.
Summary by CodeRabbit
New Features
CommitmentDeadline
struct for managing commitment deadlines.LocalBuilder
for local builder management.Bug Fixes
CommitmentsRpc
andExecutionState
methods.ConsensusState
to manage commitments based on timing.Refactor
Tests