tronprotocol / tips

TRON Improvement Proposals
229 stars 203 forks source link

TIP-553: Remove Lite Fullnode splitting tool from framework module #553

Closed forfreeday closed 1 year ago

forfreeday commented 1 year ago
Tip: 553
Title: Remove Lite Fullnode splitting tool from framework module
Author: kayle.liu@tron.network
Status: Draft
Type: Standards Track
Category: core
Date: 2023-06-01

Simple Summary

Moving the Lite Fullnode splitting function from the framework module directory to the plugins module directory.

Abstract

The generated tool allows users to generate leveldb database snapshot files based on java-tron. This function is an operation on the database files and does not affect the java-tron service itself.

The code of the tool class can be migrated to the plugins module.

Motivation

The Lite FullNode is a helper type of function. It should not be classified under the package of the framework module, but under the plugins module.

Archive the code to keep the framework module light and its responsibilities clear.

Rationale

Lite FullNode is a file-splitting tool that reads and writes a new .sst file for leveldb database files.

Lite FullNode splits the Lite Fullnode and must replicate the static database when the java-tron service is stopped.

This functionality is not a tool required for java-tron to run, nor is it code required for the service to run.

Implementation

  1. Migrate all code under the package path: org/tron/tool/litefullnode in the framework module to plugins.
  2. Migrate LiteFullNodeToolTest test cases to the test package in plugins.