-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
DiscussionInitial issue state - proposed but not yet acceptedInitial issue state - proposed but not yet acceptedEnhancementType - Changes that may affect performance, usability or add new features to existing modules.Type - Changes that may affect performance, usability or add new features to existing modules.
Milestone
Description
Summary or problem description
For cases like #4161 (comment) we need to provide an ability to disable RPC Server plugin dependency if needed.
For example, dBFT plugin requires StateService for stateroot calculation, but definitely doesn't need RPC Server plugin as a dependency (because RPC should likely be disabled on consensus nodes due to security reasons). However, right now StateService plugin requires RPC Server plugin as a dependency because StateService exposes a couple of RPC methods.
Do you have any solution you want to propose?
For now, there are two possible solutions suggested:
- One solution is described in Introduce
StateRootInHeader
#4161 (comment): split StateService plugin into two plugins: pluginA
should calculate stateroots, pluginB
should expose state-related RPC methods. Then dBFT will be dependent from pluginA
only, it won't introduce RPC Service plugin dependency to dBFT. - Another solution is suggested by @shargon: decouple
RpcMethod
attribute implementation from RPC Server plugin and make RPC Server plugin dependency kind of an "optional". So that if RPC Server plugin is installed, then state-related RPC methods of StateService plugin are available, but if RPC Service plugin is not installed, then state-related RPC methods won't be exposed.
Where in the software does this update applies to?
- Plugins
Metadata
Metadata
Assignees
Labels
DiscussionInitial issue state - proposed but not yet acceptedInitial issue state - proposed but not yet acceptedEnhancementType - Changes that may affect performance, usability or add new features to existing modules.Type - Changes that may affect performance, usability or add new features to existing modules.