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] - Increase ATX limits again #5424

Closed
wants to merge 3 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
2 changes: 1 addition & 1 deletion datastore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Config struct {

func DefaultConfig() Config {
return Config{
ATXSize: 600_000,
ATXSize: 1_000_000, // to be in line with fetch.EpochData size (see fetch/wire_types.go)
MalfeasanceSize: 1_000,
}
}
Expand Down
2 changes: 1 addition & 1 deletion fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func DefaultConfig() Config {
return Config{
BatchTimeout: 50 * time.Millisecond,
QueueSize: 20,
BatchSize: 20,
BatchSize: 10,
RequestTimeout: 25 * time.Second,
MaxRetriesForRequest: 100,
ServersConfig: map[string]ServerConfig{
Expand Down
3 changes: 2 additions & 1 deletion fetch/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ func (h *handler) handleEpochInfoReq(ctx context.Context, msg []byte) ([]byte, e
}
h.logger.WithContext(ctx).With().Debug("serve: responded to epoch info request",
epoch,
log.Int("atx_count", len(ed.AtxIDs)))
log.Int("atx_count", len(ed.AtxIDs)),
)
bts, err := codec.Encode(&ed)
if err != nil {
h.logger.WithContext(ctx).With().Fatal("serve: failed to serialize epoch atx", epoch, log.Err(err))
Expand Down
10 changes: 5 additions & 5 deletions fetch/wire_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ type ResponseMessage struct {
// RequestBatch is a batch of requests and a hash of all requests as ID.
type RequestBatch struct {
ID types.Hash32
// depends on fetch config `BatchSize` which defaults to 20, more than 1000 seems unlikely
Requests []RequestMessage `scale:"max=1000"`
// depends on fetch config `BatchSize` which defaults to 10, more than 100 seems unlikely
Requests []RequestMessage `scale:"max=100"`
}

// ResponseBatch is the response struct send for a RequestBatch. the ResponseBatch ID must be the same
// as stated in RequestBatch even if not all Data is present.
type ResponseBatch struct {
ID types.Hash32
// depends on fetch config `BatchSize` which defaults to 20, more than 1000 seems unlikely
Responses []ResponseMessage `scale:"max=1000"`
// depends on fetch config `BatchSize` which defaults to 10, more than 100 seems unlikely
Responses []ResponseMessage `scale:"max=100"`
}

// MeshHashRequest is used by ForkFinder to request the hashes of layers from
Expand Down Expand Up @@ -105,7 +105,7 @@ type MaliciousIDs struct {
}

type EpochData struct {
AtxIDs []types.ATXID `scale:"max=500000"` // for epoch 12 > 300k ATXs are expected, added some safety margin
AtxIDs []types.ATXID `scale:"max=1000000"` // for epoch 13 > 800k ATXs are expected, added some safety margin
}

// LayerData is the data response for a given layer ID.
Expand Down
12 changes: 6 additions & 6 deletions fetch/wire_types_scale.go

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