eth, cmd/devp2p: enable eth/70 with TD status and single-phase handshake#27
Merged
Merged
Conversation
zlacfzy
reviewed
Jul 14, 2026
| return err | ||
| } | ||
| if protoOffset(proto)+code == got { | ||
| if c.protoOffset(proto)+code == got { |
zlacfzy
reviewed
Jul 14, 2026
| // peer performs both the protocol handshake and the status message | ||
| // exchange with the node in order to peer with it. | ||
| func (c *Conn) peer(chain *Chain, status *eth.StatusPacket68) error { | ||
| func (c *Conn) peer(chain *Chain, status any) error { |
Owner
There was a problem hiding this comment.
Can we keep conn.go in sync with upstream? Upstream's ethtest only speaks the latest version even though the node supports older ones (its statusExchange only handles the newest StatusPacket) — so here we could keep only the eth/70 path and drop the 68/UpgradeStatus branches; eth/68 fallback is already covered by the eth/protocols/eth unit tests.
zlacfzy
reviewed
Jul 14, 2026
|
|
||
| func TestCanonicalSynchronisationFull(t *testing.T) { testCanonSync(t, eth.ETH69, FullSync) } | ||
| func TestCanonicalSynchronisationSnap(t *testing.T) { testCanonSync(t, eth.ETH69, SnapSync) } | ||
| func TestCanonicalSynchronisationFull(t *testing.T) { testCanonSync(t, eth.ETH68, FullSync) } |
Owner
There was a problem hiding this comment.
Suggested change
| func TestCanonicalSynchronisationFull(t *testing.T) { testCanonSync(t, eth.ETH68, FullSync) } | |
| func TestCanonicalSynchronisationFull(t *testing.T) { testCanonSync(t, eth.ETH70, FullSync) } |
zlacfzy
reviewed
Jul 14, 2026
| } | ||
| } | ||
|
|
||
| func TestInvalidBodyPeerDrop69(t *testing.T) { |
Owner
There was a problem hiding this comment.
TestInvalidBodyPeerDrop69 -> TestInvalidBodyPeerDrop
zlacfzy
reviewed
Jul 14, 2026
| defer tester.terminate() | ||
|
|
||
| chain := testChainBase.shorten(blockCacheMaxItems - 15) | ||
| peer := tester.newPeer("corrupt", eth.ETH69, chain.blocks[1:]) |
zlacfzy
approved these changes
Jul 14, 2026
will-2012
approved these changes
Jul 14, 2026
zlacfzy
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
the message loop — no
UpgradeStatusMsg(that remains eth/68-only).StatusPacket(after NetworkID): Parlia relies on TD-basedsync (
peerToSyncOp/LegacySync), so the peer's initial TD must arrive withthe handshake. BSC's eth/70 status therefore intentionally diverges from
upstream's wire format (precedent: eth/68's UpgradeStatus extension; ForkID
isolates networks). Documented on the struct to survive future merges.
DisablePeerTxBroadcastis deprecated: the extension is not carriedover to eth/70. It stays effective on eth/68 fallback connections only and
will be removed together with eth/68.
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: