Skip to content

chore(p2p): drop unused ENR xxhash versioning path#22942

Closed
spypsy wants to merge 1 commit into
nextfrom
chore/p2p-remove-enr-versioning-dead-code
Closed

chore(p2p): drop unused ENR xxhash versioning path#22942
spypsy wants to merge 1 commit into
nextfrom
chore/p2p-remove-enr-versioning-dead-code

Conversation

@spypsy

@spypsy spypsy commented May 5, 2026

Copy link
Copy Markdown
Member

Summary

Removes dead code from p2p/src/versioning.ts:

  • USE_XX_HASH was never true outside tests; production ENRs always used the compressed string from compressComponentVersions.
  • Peer discovery already validates with checkCompressedComponentVersion in discV5_service.ts; checkAztecEnrVersion was only used from tests.
  • Drops xxhash-wasm / toBufferBE from this module (gossip encoding.ts still uses xxhash for message IDs).

Testing

yarn test src/versioning.test.ts in yarn-project/p2p.

USE_XX_HASH was never true in production; discv5 already validates via
checkCompressedComponentVersion. Removes xxhash/toBufferBE from versioning.ts
and tests the string format only.
@spypsy

spypsy commented May 5, 2026

Copy link
Copy Markdown
Member Author

Closed in favor of #22943 after renaming the branch to spy/p2p-remove-enr-versioning-dead-code (GitHub does not support changing PR head branch via API).

@spypsy spypsy closed this May 5, 2026
@spypsy spypsy deleted the chore/p2p-remove-enr-versioning-dead-code branch May 5, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant