Closed srene closed 3 weeks ago
The NewLightNode
function in node/node.go
has been introduced, allowing the initialization of a Node
with a focus on light node mode. This mode excludes components like pubsub, p2p, and indexers, making it suitable for tasks like state rollback.
Files | Change Summary |
---|---|
node/node.go |
Added the NewLightNode function to initialize a Node with specific parameters for light node mode. |
sequenceDiagram
participant User
participant Node
participant Config
participant Crypto
participant Proxy
participant Genesis
participant Logger
participant Metrics
User->>Node: Call NewLightNode(ctx, conf, signingKey, clientCreator, genesis, logger, metrics)
Node->>Config: Load configuration
Node->>Crypto: Initialize signing key
Node->>Proxy: Create client
Node->>Genesis: Load genesis document
Node->>Logger: Initialize logger
Node->>Metrics: Set up metrics
Node->>User: Return initialized Node or error
Objective | Addressed | Explanation |
---|---|---|
Add light node mode (#900) | ✅ | |
Exclude pubsub, p2p, indexers in light mode (#900) | ✅ |
In the realm of code so bright, A light node springs to life, so light! No pubsub, p2p in sight, Just state rollback, pure delight. With keys and logs, it takes its flight, A coder's dream, a node's new height.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
closing this pr, since i decided to add the option of running a light blockmanager to enable rollback in the same rdk
PR Standards
Opening a pull request should be able to meet the following requirements
--
PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A
Close #900
<-- Briefly describe the content of this pull request -->
For Author:
godoc
commentsFor Reviewer:
After reviewer approval:
Summary by CodeRabbit
NewLightNode
function for enhanced node initialization with additional configuration and error handling.