Skip to content

Commit

Permalink
Merge pull request #2522 from OffchainLabs/fix-das-sync-default-reten…
Browse files Browse the repository at this point in the history
…tion-period

Fix DAS sync default retention period
  • Loading branch information
joshuacolvin0 authored Jul 25, 2024
2 parents 6223915 + 5789f19 commit 13c988d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ var DefaultBatchPosterConfig = BatchPosterConfig{
MaxDelay: time.Hour,
WaitForMaxDelay: false,
CompressionLevel: brotli.BestCompression,
DASRetentionPeriod: time.Hour * 24 * 15,
DASRetentionPeriod: daprovider.DefaultDASRetentionPeriod,
GasRefunderAddress: "",
ExtraBatchGas: 50_000,
Post4844Blobs: false,
Expand Down Expand Up @@ -270,7 +270,7 @@ var TestBatchPosterConfig = BatchPosterConfig{
MaxDelay: 0,
WaitForMaxDelay: false,
CompressionLevel: 2,
DASRetentionPeriod: time.Hour * 24 * 15,
DASRetentionPeriod: daprovider.DefaultDASRetentionPeriod,
GasRefunderAddress: "",
ExtraBatchGas: 10_000,
Post4844Blobs: true,
Expand Down
3 changes: 3 additions & 0 deletions arbstate/daprovider/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"io"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
Expand All @@ -34,6 +35,8 @@ type DASWriter interface {
fmt.Stringer
}

var DefaultDASRetentionPeriod time.Duration = time.Hour * 24 * 15

type DASKeysetFetcher interface {
GetKeysetByHash(context.Context, common.Hash) ([]byte, error)
}
Expand Down
2 changes: 1 addition & 1 deletion das/syncing_fallback_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type SyncToStorageConfig struct {
var DefaultSyncToStorageConfig = SyncToStorageConfig{
Eager: false,
EagerLowerBoundBlock: 0,
RetentionPeriod: defaultStorageRetention,
RetentionPeriod: daprovider.DefaultDASRetentionPeriod,
DelayOnError: time.Second,
IgnoreWriteErrors: true,
ParentChainBlocksPerRead: 100,
Expand Down

0 comments on commit 13c988d

Please sign in to comment.