Skip to content

refactor(eth/downloader): drop eth/63 - #2499

Open
gzliudan wants to merge 1 commit into
XinFinOrg:dev-upgradefrom
gzliudan:drop-eth63
Open

refactor(eth/downloader): drop eth/63#2499
gzliudan wants to merge 1 commit into
XinFinOrg:dev-upgradefrom
gzliudan:drop-eth63

Conversation

@gzliudan

@gzliudan gzliudan commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Proposed changes

drop protocol version eth/63

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Changes that don't change source code or tests
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: Revert something
  • style: Changes that do not affect the meaning of the code
  • test: Adding missing tests or correcting existing tests

Impacted Components

Which parts of the codebase does this PR touch?
Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Tested on a private network from the genesis block and monitored the chain operating correctly for multiple epochs.
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bab43ffc-6ffc-49ae-bc5c-002b7358972a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Drops legacy eth/63 protocol support across the eth protocol stack and downloader, updating version gating, handshake/status structures, and the test suite to only exercise supported protocol versions.

Changes:

  • Removes eth/63 as a supported protocol version and updates version checks to require >= xdc100.
  • Renames/updates legacy status packet handling to statusData100 and adjusts handshake/read paths accordingly.
  • Updates downloader and eth protocol tests to stop using eth/63 and to align peer/version expectations with the new minimum protocol version.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
eth/sync_test.go Updates fast-sync disabling tests to use xdc100/xdc165 and runs helper in parallel.
eth/protocol.go Removes eth/63 constant and updates protocol version/length declarations; renames legacy status packet type.
eth/protocol_test.go Removes eth/63 status tests and updates status-message error coverage for xdc100.
eth/peer.go Removes eth/63 handshake paths and switches legacy status handling to xdc100 only.
eth/metrics.go Updates metrics gating from >= eth63 to >= xdc100.
eth/helper_test.go Updates test peer handshake to send xdc100 status packet.
eth/handler.go Updates handler message gating from >= eth63 to >= xdc100.
eth/handler_test.go Updates handler tests away from eth/63; refactors malformed-block propagation test.
eth/downloader/queue.go Adjusts peer-id logging and log callsites in header delivery path.
eth/downloader/peer.go Bumps downloader minimum protocol version to xdc100.
eth/downloader/peer_test.go Updates peer-set version eligibility tests to exclude eth/63.
eth/downloader/downloader.go Updates “too old” checks/messages to require >= 100; trims peer IDs in logs.
eth/downloader/downloader_test.go Updates downloader test matrix from 63/64 to 100/164.

Comment thread eth/downloader/queue.go Outdated
Comment thread eth/protocol.go Outdated
Comment thread eth/handler_test.go Outdated
Comment thread eth/handler_test.go
@gzliudan
gzliudan force-pushed the drop-eth63 branch 6 times, most recently from d39f943 to 83d6819 Compare August 6, 2026 15:05
@gzliudan
gzliudan requested a review from Copilot August 6, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

Suppressed comments (1)

eth/downloader/peer_test.go:29

  • TestIdlePeersProtocolVersions is described as covering "every supported" protocol version, but it currently only registers peers for 100 and 164. Since the downloader peer-set supports up to maxProtocolVer=165, this test should include a 165 peer as well (and update the expected totals), otherwise regressions affecting xdc165 eligibility won't be caught.
// TestIdlePeersProtocolVersions verifies that peers running every supported
// protocol version (xdc100, xdc164) are eligible for concurrent
// downloads. A regression here silently disables skeleton filling and body,

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.

3 participants