Skip to content

Conversation

i1i1
Copy link
Contributor

@i1i1 i1i1 commented Apr 3, 2025

Closes #15286

This pr firstly makes Node::add_ons async (as it is required for making WS connection) and adds flags for sequencer WS (both --rollup.sequencer-ws and --rollup.sequencer which supports both).

Unfortunately now SequencerClient can panic during initialization, as I didn't want to add Result for add-ons construction.

I can remove --rollup.sequencer and add specific constructors for SequencerClient for http and ws

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see,

the question here is do we want the AddOns setup to be async or not.

I'd prefer if we could avoid this and instead try moving the client setup in here:

async fn launch_add_ons(
self,
ctx: reth_node_api::AddOnsContext<'_, N>,
) -> eyre::Result<Self::Handle> {

but need to take a closer look first, but I feel like this should be doable, because we can get access to the

OpEthApiBuilder,

which also needs an instance

@i1i1
Copy link
Contributor Author

i1i1 commented Apr 3, 2025

Thanks for quick feedback @mattsse, let me try to fix it then!

@i1i1 i1i1 requested a review from mattsse April 3, 2025 12:24
Comment on lines +200 to +203
#[tokio::test]
#[ignore = "Start if WS is reachable at ws://localhost:8546"]
async fn test_ws_body_str() {
let client = SequencerClient::new("ws://localhost:8546").await.unwrap();
Copy link
Contributor Author

@i1i1 i1i1 Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a node though. Can remove this test, but just in case, it works for me locally

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, way less invasive now.

still have a few nits

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Reth Tracker Apr 3, 2025
@i1i1 i1i1 requested a review from mattsse April 3, 2025 13:58
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see,

let me make the last remaining changes so that we can get rid of the block_on call

Comment on lines 346 to 350
ctx.components
.task_executor()
.handle()
.block_on(SequencerClient::new(url))
.expect("Failed to init sequencer client")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't quite work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with ur changes. Thanks!

@i1i1 i1i1 requested a review from mattsse April 10, 2025 12:01
@i1i1 i1i1 changed the title Add --rollup.sequencer-ws to support WebSocket feat: Add --rollup.sequencer-ws to support WebSocket Apr 10, 2025
@mattsse mattsse enabled auto-merge April 17, 2025 10:00
@mattsse mattsse added this pull request to the merge queue Apr 17, 2025
@mattsse mattsse removed this pull request from the merge queue due to a manual request Apr 17, 2025
@mattsse mattsse added this pull request to the merge queue Apr 17, 2025
Merged via the queue into paradigmxyz:main with commit 58a20dc Apr 17, 2025
43 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Apr 17, 2025
07Vaishnavi-Singh pushed a commit to 07Vaishnavi-Singh/reth that referenced this pull request May 3, 2025
…5499)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

OP: Add --rollup.sequencer-ws to support WebSocket
2 participants