Closed
Verify block relaying with newHeads is already implemented#3
Conversation
Co-authored-by: TLGINO <59311729+TLGINO@users.noreply.github.com>
Co-authored-by: TLGINO <59311729+TLGINO@users.noreply.github.com>
Co-authored-by: TLGINO <59311729+TLGINO@users.noreply.github.com>
Add block relaying functionality to improve node reputation and peer connectivity
Co-authored-by: TLGINO <59311729+TLGINO@users.noreply.github.com>
Co-authored-by: TLGINO <59311729+TLGINO@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for relaying new blocks using newHeads
Verify block relaying with newHeads is already implemented
Dec 14, 2025
Owner
|
@copilot add it to the pr |
Contributor
Author
I found that the
Could you clarify what you'd like me to add? Are you asking me to:
|
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.
The requested
newHeadssubscription for block relaying was already fully implemented in PR #1. This PR verifies the implementation and adds missing.gitignoreentries.Existing Implementation
Block relaying follows the same pattern as pending transaction relay:
Architecture:
global/global.go: WebSocket subscription tonewHeads, fetches full blocks viaeth_getBlockByHashtransport.go:RelayBlockToPeers()sends NewBlock messages (0x17) to bonded peersmain.go: Registers callback connecting listener to relay functionKey features:
RegisterBlockCallback()Changes
.gitignoreto exclude build artifacts (eth_discover,testing/testing,testing_rpc/testing_rpc)Implementation Comparison
alchemy_pendingTransactionsnewHeadstransport.goglobal/global.go+ callbackOriginal prompt
Created from VS Code via the GitHub Pull Request extension.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.