Skip to content

Commit

Permalink
Merge pull request #2600 from OffchainLabs/fix-s3-das-expiry
Browse files Browse the repository at this point in the history
Fix inverted expiry logic for DAS S3 backends
  • Loading branch information
PlasmaPower committed Aug 22, 2024
1 parent 75f3aaf commit 16a17e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 16a17e6

Please sign in to comment.