Skip to content

Conversation

@jfrank-summit
Copy link
Member

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

  • Add RUSTSEC-2025-0118 (wasmtime unsound API vulnerability) to rustsec audit ignore list until polkadot-sdk dependency upgrades wasmtime from 8.0.1.
  • .gitignore updated to exclude .vscode directory

Motivation and Context

Developers need a lightweight way to:

  • Test consensus and domain flows without spinning up a full farmer
  • Manually control block production for debugging and integration testing
  • Run consensus and domain nodes with RPC access for inspection

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-node

A CLI tool that:

  • Starts a consensus node (mocked farmerless setup)
  • Optionally starts an EVM domain node
  • Supports automatic block production (configurable interval) or manual production via RPC
  • Exposes JSON-RPC endpoints for manual block control

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 endpoint

Manual 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 block
    • Optional wait_for_bundle parameter to wait for domain bundle submission
  • dev_produceBlocks: Produce multiple consensus blocks
    • Required count parameter
    • Optional wait_for_bundle parameter

RPC Configuration Refactoring

subspace-test-service:

  • Introduced MockConsensusNodeRpcConfig struct to consolidate RPC configuration parameters
  • Added run_with_rpc_builder() and run_with_rpc_options() methods
  • RPC is disabled by default (backwards compatible)
  • Only enables RPC when rpc_addr is provided

domain-test-service:

  • Added rpc_addr() and rpc_port() builder methods to DomainNodeBuilder
  • RPC configuration passed through to node_config()
  • RPC is disabled by default (backwards compatible)
  • Only enables RPC when rpc_addr is provided

Benefits:

  • Reduces argument count (addresses clippy warnings)
  • Cleaner API with configuration struct
  • Maintains backwards compatibility for existing test code

Testing

  • Manual testing performed:

    • Binary starts successfully with various flag combinations
    • Manual RPC endpoints work correctly
    • Auto block production works correctly
    • Shutdown handles Ctrl+C gracefully
    • Domain node integration works when --domain flag is used
    • Auto SDK integration tests pass targeting the new binary
  • Existing tests remain unaffected (backwards compatibility maintained)

Code contributor checklist:

@immunefi-magnus
Copy link

🛡️ Immunefi PR Reviews

We 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:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

Copy link

@cursor cursor bot left a 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

@jfrank-summit jfrank-summit added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit 8a6ed61 Nov 18, 2025
23 of 27 checks passed
@jfrank-summit jfrank-summit deleted the farmerless-node branch November 18, 2025 12:55
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