Skip to content

Improve Nodeos Plugin Shutdown Patterns #1099

@bhazzard

Description

@bhazzard

Story

Short Description
As an Antelope core developer, I want nodeos to follow a consistent and safe approach to shutdown across all plugins.

What
This will involve analyzing the current shutdown patterns, choosing a set of patterns that should be consistently applied, documenting the chosen patterns in a README.md in the plugin directory, implementing some enforcement to ensure pattern adherence, and fixing any non-adherence to the chosen patterns.

Why
The current shutdown patterns in Nodeos plugins are causing lingering issues, as evidenced by the #646 issue. In order to prevent similar issues from occurring in the future, it is important to have a consistent and safe approach to plugin shutdown that can be followed by all plugins. This will ensure that callbacks are not being run anywhere during shutdown, and that objects are destroyed in the correct order, which will make it easier to reason about the safety of the shutdown process.

How

  • Analyze the current shutdown patterns in Nodeos plugins to identify any issues and inconsistencies.
  • Choose a set of shutdown patterns that should be consistently applied to all plugins.
  • Document chosen patterns in a README.md file in the plugin directory.
  • Implement enforcement mechanisms to ensure that plugins adhere to the chosen shutdown patterns.
  • Fix any non-adherence to the chosen shutdown patterns in existing plugins.

Acceptance Criteria

  • All plugins adhere to the chosen shutdown patterns.
  • The testing suite verifies that the chosen shutdown patterns are being followed correctly.
  • An enforcement mechanism ensures that chosen shutdown patterns are consistently applied.
  • Desired patterns are documented in a README.md file in the plugin directory
    • Clear and comprehensive explanation of chosen shutdown patterns
    • Examples of how to implement them

Background

Originally part of AntelopeIO/spring#842

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions