FuelLabs/fuel-core · error · Error::DB

While writing to S3 Bucket: {}, key: {}: {client_error}

Error message

While writing to S3 Bucket: {}, key: {}: {client_error}

What it means

Wrapper around an S3 SDK failure in remote_cache.rs store_block: after the gzip-compressed block body was streamed via put_object to the given bucket/key, the AWS client returned an error (network, throttling, auth, or 5xx from S3). The bucket name and the height-derived object key are embedded for correlation. The height-continuity precondition earlier in store_block already passed; this is purely the object-store write failing.

Source

Thrown at crates/services/block_aggregator_api/src/db/remote_cache.rs:268

        {
            return Err(Error::db_error(anyhow!(
                "Cannot store block at height {}: current height is {}, expected next height is {}",
                height,
                current_height,
                next_height
            )));
        }

        let key = block_height_to_key(&height);
        if self.publishes_blocks {
            let zipped = gzip_bytes(block)?;
            let body = ByteStream::from(zipped);
            self.client
                .put_object(&self.s3_bucket, &key, body)
                .await
                .map_err(|e| {
                    let client_error = format!("{e:?}");
                    Error::DB(anyhow!(e).context(format!(
                        "While writing to S3 Bucket: {}, key: {}: {client_error}",
                        self.s3_bucket, key
                    )))
                })?;
        }

        let mut tx = self.local_persisted.write_transaction();
        tx.storage_as_mut::<LatestBlock>()
            .insert(&(), &Mode::new_s3(height))
            .map_err(|e| {
                Error::DB(
                    anyhow!(e).context(format!(
                        "while storing latest block height: {height:?}"
                    )),
                )
            })?;
        tx.commit().map_err(|e| Error::DB(anyhow!(e)))?;

View on GitHub (pinned to add100d30d)

Solutions

  1. Retry the put_object with exponential backoff — S3 throttling (503 SlowDown) and transient network errors are the most common causes and writes are idempotent per key
  2. Verify bucket permissions/credentials and region if the error persists across retries
  3. Check the error's client_error detail for SDK-classified retryability
  4. Since the key is deterministic (block_height_to_key), a retried write overwrites safely; ensure downstream readers tolerate re-written objects
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/services/block_aggregator_api/src/db/remote_cache.rs:268 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of FuelLabs/fuel-core@add100d30d (2026-09-05). Data as JSON: /api/errors/56bf4f3379fbd173. Report an issue: GitHub.