Skip to content

Commit

Permalink
Backport 6248: Fix response data slice too small (#6249)
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Aug 13, 2024
1 parent 334d6cc commit da10d43
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

See [RELEASE](./RELEASE.md) for workflow instructions.

## Release v1.6.6-hotfix1

### Improvements

* [#6248](https://github.com/spacemeshos/go-spacemesh/pull/6248) Fixed node not being able to handle more than 6.55M
ATXs per epoch.

## Release v1.6.6

### Improvements
Expand Down
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 @@ -138,7 +138,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.

0 comments on commit da10d43

Please sign in to comment.