RSS3-Network / Node

In the vast RSS3 Network, the RSS3 Node delivers Open Information with efficiency, it is a steadfast cruiser in the byte-filled sea.
MIT License
20 stars 3 forks source link

Retrieve network configuration parameters from VSL instead of hardcoding them #402

Open pseudoyu opened 2 weeks ago

pseudoyu commented 2 weeks ago

What feature is it?

  1. set config to vsl using scripts
  2. retrieve network configuration parameters from VSL
  3. reload workers at each epoch if any change

What problem does this feature solve?

Hard-coded configurations complicate the process of updating nodes.

Additional description

No response

This is not a duplicated feature request or new worker proposal

brucexc commented 4 hours ago

Hi, I noticed that you are already working on this issue. I would like to know what the process is for retrieving network configuration parameters from the VSL?

pseudoyu commented 4 hours ago

For now the designed process is:

  1. Raise a REP to initiate or modify the configurations, such as the start block, network tolerance, etc.
  2. Set the parameters in the NetworkParams contract on the VSL mainnet (ensure it is a valid JSON file).
  3. When a node runs, restarts, or an epoch changes, the node will pull the latest configurations by invoking the NetworkParams contract on VSL. If there are changes, the related services will apply the new configurations.

Any problems or suggestions?

brucexc commented 4 hours ago

For now the designed process is:

  1. Raise a REP to initiate or modify the configurations, such as the start block, network tolerance, etc.
  2. Set the parameters in the NetworkParams contract on the VSL mainnet (ensure it is a valid JSON file).
  3. When a node runs, restarts, or an epoch changes, the node will pull the latest configurations by invoking the NetworkParams contract on VSL. If there are changes, the related services will apply the new configurations.

Any problems or suggestions?

Thank you for your prompt reply. I have a couple of questions:

  1. After the REP is approved, at what point will the network configuration be updated?
  2. After the network configuration is updated, will the nodes in the network immediately start using the new settings?
pseudoyu commented 4 hours ago
  1. The REP will specify the epoch when the parameter modification will take effect, and will set the parameters at the target time (through service or scripts).
  2. The node will consistently pull the latest configuration from the VSL contract. If any changes are detected, it will apply the new settings immediately.

I'm also considering incorporating parameter version control (maybe an epoch -> config map strcuct) in the contract, allowing us to decide more flexibly when changes take effect.

any ideas?