Skip to content

feat(net): normalize inbound messages#6797

Open
halibobo1205 wants to merge 1 commit into
tronprotocol:release_v4.8.2from
halibobo1205:fix/sanitize-inbound-protobuf-unknown-fields
Open

feat(net): normalize inbound messages#6797
halibobo1205 wants to merge 1 commit into
tronprotocol:release_v4.8.2from
halibobo1205:fix/sanitize-inbound-protobuf-unknown-fields

Conversation

@halibobo1205
Copy link
Copy Markdown
Collaborator

Summary

Normalize inbound BlockMessage / TransactionMessage / TransactionsMessage.

Sanitize is applied only on the byte[] constructors. Object-form constructors (BlockMessage(BlockCapsule), TransactionMessage(Transaction), TransactionsMessage(List)) keep existing behavior.

Note

A fast path on UnknownFieldSet.asMap().isEmpty() keeps the common
no-unknown-fields case allocation-free.

@github-actions github-actions Bot requested a review from 317787106 May 22, 2026 11:17
@halibobo1205 halibobo1205 requested a review from xxo1shine May 22, 2026 11:18
@halibobo1205 halibobo1205 added the topic:net p2p net work, synchronization label May 22, 2026
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.2 milestone May 22, 2026
@halibobo1205 halibobo1205 changed the title feat(net): strip unknown protobuf fields on inbound messages feat(net):strip unknown protobuf fields on inbound messages May 22, 2026
@halibobo1205 halibobo1205 changed the title feat(net):strip unknown protobuf fields on inbound messages feat(net): strip unknown protobuf fields on inbound messages May 22, 2026
@halibobo1205 halibobo1205 changed the title feat(net): strip unknown protobuf fields on inbound messages feat(net): normalize inbound messages May 22, 2026
@halibobo1205 halibobo1205 changed the title feat(net): normalize inbound messages feat(net): normalize inbound messages May 22, 2026
@halibobo1205 halibobo1205 requested a review from waynercheung May 22, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:net p2p net work, synchronization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant