Skip to content

docs: design module system & RPC namespace architecture #121

@mfw78

Description

@mfw78

Context

Nexum's RPC server must support a modular architecture where RPC namespaces (eth, wallet, net, web3, etc.) can be implemented as independent modules, dynamically loaded, and composed together. The system must support namespace merging to handle additive EIPs/ERCs that extend existing namespaces.

Considerations

This specification should address the following considerations:

Module Architecture:

  • Module definition and interface
  • Module registration and discovery mechanism
  • Module lifecycle (initialization, shutdown)
  • Module dependencies and ordering
  • Module configuration and parameters

RPC Namespace System:

  • Namespace definition and structure
  • How modules declare their RPC methods
  • Method routing within namespaces
  • Namespace versioning

Namespace Merging:

  • How multiple modules can extend the same namespace
  • Conflict resolution when methods overlap
  • Priority/precedence rules for merged namespaces
  • Handling additive EIPs (e.g., EIP adds methods to eth_ namespace)
  • Dynamic enabling/disabling of namespace extensions

Module Composition:

  • How modules interact with each other
  • Shared services and dependency injection
  • State sharing between modules
  • Inter-module communication patterns

Dynamic Loading:

  • Runtime module loading and unloading
  • Hot-reloading capabilities
  • Module isolation and sandboxing
  • WASM module support for extensibility

Dependencies

Depends on (Phase 3):

Blocks:

Out of Scope

  • Specific RPC method implementations
  • Security policy enforcement (covered in security architecture)
  • UI for module management

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation is wrong or missing.featureNew capability that doesn't exist yet.p1-brokenActually broken. Fix this week.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions