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

Fix inverted expiry logic for DAS S3 backends #2600

Merged
merged 1 commit into from
Aug 21, 2024
Merged
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 das/s3_storage_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s3s *S3StorageService) Put(ctx context.Context, value []byte, timeout uint
Bucket: aws.String(s3s.bucket),
Key: aws.String(s3s.objectPrefix + EncodeStorageServiceKey(dastree.Hash(value))),
Body: bytes.NewReader(value)}
if !s3s.discardAfterTimeout {
if s3s.discardAfterTimeout {
expires := time.Unix(int64(timeout), 0)
putObjectInput.Expires = &expires
}
Expand Down
6 changes: 3 additions & 3 deletions das/syncing_fallback_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ type l1SyncService struct {
lastBatchAcc common.Hash
}

// The original syncing process had a bug, so the file was renamed to cause any mirrors
// in the wild to re-sync from their configured starting block number.
const nextBlockNoFilename = "nextBlockNumberV2"
// The filename has been updated when we have discovered bugs that may have impacted
// syncing, to cause mirrors to re-sync.
const nextBlockNoFilename = "nextBlockNumberV3"

func readSyncStateOrDefault(syncDir string, dflt uint64) uint64 {
if syncDir == "" {
Expand Down
Loading