-
Notifications
You must be signed in to change notification settings - Fork 256
Add Farmerless Dev Node with Manual Block Production RPCs #3725
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
Conversation
…SEC-2025-0118 in the ignore list
🛡️ Immunefi PR ReviewsWe noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below: Once submitted, we'll take care of assigning a reviewer and follow up here. |
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.
Comment @cursor review or bugbot run to trigger another review on this PR
…ock production should wait for bundles
… buffer capacity in both service and test implementations.
…bundle availability more gracefully
Summary
Introduces a new developer utility binary (
subspace-farmerless-dev-node) that enables running consensus and domain nodes without a farmer, with optional manual block production via JSON-RPC endpoints. Refactors RPC configuration in test services to support optional RPC endpoints while maintaining backwards compatibility.Other Changes
.gitignoreupdated to exclude.vscodedirectoryMotivation and Context
Developers need a lightweight way to:
Previously, developers had to use complex test harnesses or run full nodes. This PR provides a simple, standalone binary that wraps existing test service helpers.
Implementation Details
New Binary:
subspace-farmerless-dev-nodeA CLI tool that:
Key Features:
--block-interval-ms: Set automatic block production interval (0 disables)--domain: Enable EVM domain node--rpc-host/--rpc-port: Configure consensus RPC endpoint--domain-rpc-host/--domain-rpc-port: Configure domain RPC endpointManual Block Production RPCs
When RPC is enabled (via
--rpc-host/--rpc-port), exposes two JSON-RPC methods for manual block production:dev_produceBlock: Produce a single consensus blockwait_for_bundleparameter to wait for domain bundle submissiondev_produceBlocks: Produce multiple consensus blockscountparameterwait_for_bundleparameterRPC Configuration Refactoring
subspace-test-service:MockConsensusNodeRpcConfigstruct to consolidate RPC configuration parametersrun_with_rpc_builder()andrun_with_rpc_options()methodsrpc_addris provideddomain-test-service:rpc_addr()andrpc_port()builder methods toDomainNodeBuildernode_config()rpc_addris providedBenefits:
Testing
Manual testing performed:
--domainflag is usedExisting tests remain unaffected (backwards compatibility maintained)
Code contributor checklist: