Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the request packet parameter to better match bsc-geth p2p #90

Merged
merged 1 commit into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/sentry/sentry/sentry_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (cs *MultiClient) SendHeaderRequest(ctx context.Context, req *headerdownloa
Id: proto_sentry.MessageId_GET_BLOCK_HEADERS_66,
Data: bytes,
},
MaxPeers: 5,
MaxPeers: 50,
}
sentPeers, err1 := cs.sentries[i].SendMessageByMinBlock(ctx, &outreq, &grpc.EmptyCallOption{})
if err1 != nil {
Expand Down
8 changes: 4 additions & 4 deletions turbo/stages/headerdownload/header_algos.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,9 @@ func (hd *HeaderDownload) RequestMoreHeaders(currentTime time.Time) (*HeaderRequ
Anchor: anchor,
Hash: anchor.parentHash,
Number: anchor.blockHeight - 1,
Length: 192,
Length: 50,
Skip: 0,
Reverse: true,
Reverse: false,
}
return false
})
Expand Down Expand Up @@ -484,9 +484,9 @@ func (hd *HeaderDownload) RequestSkeleton() *HeaderRequest {
log.Debug("[downloader] Request skeleton", "anchors", len(hd.anchors), "highestInDb", hd.highestInDb)
var stride uint64
if hd.initialCycle {
stride = 1
stride = 0
}
var length uint64 = 192
var length uint64 = 50
// Include one header that we have already, to make sure the responses are not empty and do not get penalised when we are at the tip of the chain
from := hd.highestInDb
if from <= 1 {
Expand Down