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

[Merged by Bors] - Fix response data slice too small #6248

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fetch/wire_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ type MaliciousIDs struct {

type EpochData struct {
// When changing this value also check
// - the size of `ResponseMessage` above
// - the size of `ResponseMessage.Data` above
// - the size of `Response.Data` in `p2p/server/server.go`
// - the size of `NodeIDs` in `MaliciousIDs` above
// - the size of `Set` in `EpochActiveSet` in common/types/activation.go
// - the size of `EligibilityProofs` in the type `Ballot` in common/types/ballot.go
Expand Down
2 changes: 1 addition & 1 deletion p2p/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (err *ServerError) Error() string {
// Response is a server response.
type Response struct {
// keep in line with limit of ResponseMessage.Data in `fetch/wire_types.go`
Data []byte `scale:"max=209715200"` // 200 MiB > 6.0 mio ATX * 32 bytes per ID
Data []byte `scale:"max=272629760"` // 260 MiB > 8.0 mio ATX * 32 bytes per ID
Error string `scale:"max=1024"` // TODO(mafa): make error code instead of string
}

Expand Down
4 changes: 2 additions & 2 deletions p2p/server/server_scale.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading