Skip to content

Conversation

@yiweichi
Copy link
Member

@yiweichi yiweichi commented Dec 4, 2025

This PR separate rollupNode rpc methods. the basic rpc methods rollupNode_status, rollupNode_getL1MessageByIndex and rollupNode_getL1MessageByKey are put in namespace rollup_node, enabled by default. The admin methods rollupNode_enableAutomaticSequencing and rollupNode_disableAutomaticSequencing are moved to namespace rollup_node_admin, and requires manual enablement.

corresponding issue: #445

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 4, 2025

CodSpeed Performance Report

Merging #454 will not alter performance

Comparing feat-improve-rpc-namespace (c36636c) with main (562f46d)

Summary

✅ 2 untouched

@yiweichi yiweichi requested a review from frisitano December 4, 2025 16:09
Copy link
Collaborator

@frisitano frisitano left a comment

Choose a reason for hiding this comment

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

Looks good. Can you search the repository for places where we have hard-coded use of rollupNode_ namespace for rpc and replace with the correct namespace? I know that there will be some cases in the sequencer-migration directory, but there may be other places as well.

@yiweichi yiweichi requested a review from frisitano December 4, 2025 18:18
@yiweichi
Copy link
Member Author

yiweichi commented Dec 4, 2025

Looks good. Can you search the repository for places where we have hard-coded use of rollupNode_ namespace for rpc and replace with the correct namespace? I know that there will be some cases in the sequencer-migration directory, but there may be other places as well.

All of the name of rpc methods remain unchanged. they still use rollupNode_ prefix.
Let's not forget to add --rpc.rollup-node-admin for sepolia and mainnet sequencers.

@frisitano
Copy link
Collaborator

frisitano commented Dec 4, 2025

Looks good. Can you search the repository for places where we have hard-coded use of rollupNode_ namespace for rpc and replace with the correct namespace? I know that there will be some cases in the sequencer-migration directory, but there may be other places as well.

All of the name of rpc methods remain unchanged. they still use rollupNode_ prefix. Let's not forget to add --rpc.rollup-node-admin for sepolia and mainnet sequencers.

#[rpc(server, client, namespace = "rollupNodeAdmin")]
pub trait RollupNodeAdminApi {
    /// Enables automatic sequencing in the rollup node.
    #[method(name = "enableAutomaticSequencing")]
    async fn enable_automatic_sequencing(&self) -> RpcResult<bool>;

    /// Disables automatic sequencing in the rollup node.
    #[method(name = "disableAutomaticSequencing")]
    async fn disable_automatic_sequencing(&self) -> RpcResult<bool>;
}

But didn't you put these methods in the admin namespace?

@yiweichi
Copy link
Member Author

yiweichi commented Dec 4, 2025

Looks good. Can you search the repository for places where we have hard-coded use of rollupNode_ namespace for rpc and replace with the correct namespace? I know that there will be some cases in the sequencer-migration directory, but there may be other places as well.

All of the name of rpc methods remain unchanged. they still use rollupNode_ prefix. Let's not forget to add --rpc.rollup-node-admin for sepolia and mainnet sequencers.

#[rpc(server, client, namespace = "rollupNodeAdmin")]
pub trait RollupNodeAdminApi {
    /// Enables automatic sequencing in the rollup node.
    #[method(name = "enableAutomaticSequencing")]
    async fn enable_automatic_sequencing(&self) -> RpcResult<bool>;

    /// Disables automatic sequencing in the rollup node.
    #[method(name = "disableAutomaticSequencing")]
    async fn disable_automatic_sequencing(&self) -> RpcResult<bool>;
}

But didn't you put these methods in the admin namespace?

Oh, sorry, my mistake. yeah, will update all rollupNode_

@yiweichi yiweichi requested a review from frisitano December 4, 2025 18:48
@yiweichi yiweichi merged commit 8c1f7d1 into main Dec 5, 2025
15 checks passed
@yiweichi yiweichi deleted the feat-improve-rpc-namespace branch December 5, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants