Skip to content

Commit 043172d

Browse files
Modify max blob size slightly
1 parent 4193599 commit 043172d

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

da/cmd/local-da/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
)
1818

1919
// DefaultMaxBlobSize is the default max blob size
20-
const DefaultMaxBlobSize = 64 * 64 * 482
20+
const DefaultMaxBlobSize uint64 = 64 * 64 * 481 // 1970176
2121

2222
// LocalDA is a simple implementation of in-memory DA. Not production ready! Intended only for testing!
2323
//

da/jsonrpc/internal/consts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const (
1414
DefaultGovMaxSquareSize = 64
1515

1616
// DefaultMaxBytes is the default value for the governance modifiable
17-
// maximum number of bytes allowed in a valid block.
18-
DefaultMaxBytes = DefaultGovMaxSquareSize * DefaultGovMaxSquareSize * share.ContinuationSparseShareContentSize
17+
// maximum number of bytes allowed in a valid block. We subtract 1 to have some extra buffer.
18+
DefaultMaxBytes = DefaultGovMaxSquareSize * DefaultGovMaxSquareSize * (share.ContinuationSparseShareContentSize - 1)
1919

2020
// DefaultMinGasPrice is the default min gas price that gets set in the app.toml file.
2121
// The min gas price acts as a filter. Transactions below that limit will not pass

types/da.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ func SubmitWithHelpers(
5151
case errors.Is(err, coreda.ErrContextDeadline):
5252
status = coreda.StatusContextDeadline
5353
}
54-
logger.Error().Err(err).Uint64("status", uint64(status)).Msg("DA submission failed via helper")
54+
55+
// Use debug level for StatusTooBig as it gets handled later in submitToDA through recursive splitting
56+
if status == coreda.StatusTooBig {
57+
logger.Debug().Err(err).Uint64("status", uint64(status)).Msg("DA submission failed via helper")
58+
} else {
59+
logger.Error().Err(err).Uint64("status", uint64(status)).Msg("DA submission failed via helper")
60+
}
5561
return coreda.ResultSubmit{
5662
BaseResult: coreda.BaseResult{
5763
Code: status,

0 commit comments

Comments
 (0)