From 52b57e7854eca091705bf7d74787945bf2cd2bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowak?= Date: Wed, 22 May 2024 15:01:38 +0200 Subject: [PATCH] Increase ResponseMessage to 183500800 (#5969) * Actually raise limits on server side too * Actually raise limits on server side too --- CHANGELOG.md | 6 ++++++ p2p/server/server.go | 2 +- p2p/server/server_scale.go | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7055cc5bb2..6f4facdf6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ See [RELEASE](./RELEASE.md) for workflow instructions. +## Release v1.5.5 + +### Improvements + +* [#5969](https://github.com/spacemeshos/go-spacemesh/pull/5969) Increase ResponseMessage to 183500800 + ## Release v1.5.4 ### Improvements diff --git a/p2p/server/server.go b/p2p/server/server.go index 16410c59fb..9ea44a506d 100644 --- a/p2p/server/server.go +++ b/p2p/server/server.go @@ -141,7 +141,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=125829120"` // 120 MiB > 3.5 mio ATX * 32 bytes per ID + Data []byte `scale:"max=183500800"` // 120 MiB > 3.5 mio ATX * 32 bytes per ID Error string `scale:"max=1024"` // TODO(mafa): make error code instead of string } diff --git a/p2p/server/server_scale.go b/p2p/server/server_scale.go index bcd27ba97d..ded1d1033e 100644 --- a/p2p/server/server_scale.go +++ b/p2p/server/server_scale.go @@ -9,7 +9,7 @@ import ( func (t *Response) EncodeScale(enc *scale.Encoder) (total int, err error) { { - n, err := scale.EncodeByteSliceWithLimit(enc, t.Data, 125829120) + n, err := scale.EncodeByteSliceWithLimit(enc, t.Data, 183500800) if err != nil { return total, err } @@ -27,7 +27,7 @@ func (t *Response) EncodeScale(enc *scale.Encoder) (total int, err error) { func (t *Response) DecodeScale(dec *scale.Decoder) (total int, err error) { { - field, n, err := scale.DecodeByteSliceWithLimit(dec, 125829120) + field, n, err := scale.DecodeByteSliceWithLimit(dec, 183500800) if err != nil { return total, err }