Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature] Remove unused discovery message definitions

未关闭
#7,013 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
java

调研方向

Start with protocol/src/main/protos/core/Discover.proto and identify the four legacy message definitions; keep Endpoint and BackupMessage unchanged. Read the Chinese and English protocol documents and the compatibility discussion in issue #6921 before deciding whether removal can proceed. If approved, regenerate protobuf sources from a clean state, compile, run the handshake and backup keepalive regression tests, and compare retained-message serialization against pre-change fixtures.

由索引模型根据 Issue 内容生成。

描述

type:feature

Background

protocol/src/main/protos/core/Discover.proto still contains four legacy message definitions that are no longer referenced by java-tron’s runtime code: PingMessage, PongMessage, FindNeighbours, and Neighbours. These proto definitions are redundant leftovers from the libp2p split.

UDP discovery now uses the separate proto definitions in p2p/src/main/proto/Discover.proto (introduced in PR #6992).

Rationale

Remove unused definitions to reduce maintenance overhead and avoid confusion with the UDP discovery.

Specification

  • Remove the four legacy messages from protocol/src/main/protos/core/Discover.proto.
  • Preserve Endpoint, referenced by HelloMessage.from, and BackupMessage, used by backup keepalive messages, with their existing fields and options.
  • Update the Chinese and English protocol documents to point to the real p2p discovery definitions.

Test Specification

  • Regenerate protobuf sources from a clean state and compile the project.
  • Run the related handshake and backup keepalive regression tests.
  • Compare serialization against pre-change fixtures for Endpoint, HelloMessage, and BackupMessage.

Scope of Impact

The cleanup is intended to preserve node network behavior and the wire encoding of retained messages. It removes generated types and changes the file descriptor, so downstream code referencing the removed types must migrate or retain a compatible protocol version. Projects using their own copies are unaffected unless they adopt the removal.

Before removal, resolve whether these generated types fall under the public API compatibility policy in #6921. If they do, deprecate them for at least one release cycle and schedule removal for a future major release.

主要语言
Java
星标
4.2k
派生
1.8k
平均合并
3 天 21 小时
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tronprotocol/java-tron 的其他 Issue

查看 tronprotocol/java-tron 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。