[Feature] Remove unused discovery message definitions

Aberta
#7,013 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
java
Domínio
backend, networking

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

As clarified in #6921, these four generated message types are unsupported legacy types and do not require a deprecation cycle. Their removal intentionally changes the generated API and file descriptor, while preserving node interoperability and the wire encoding of the retained messages.

Linguagem predominante
Java
Estrelas
4.2k
Forks
1.8k
Merge médio
3d 7h
PRs com merge (30d)
48

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de tronprotocol/java-tron

Todas as issues de tronprotocol/java-tron

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.