FuelLabs/fuel-core · error · anyhow::Error
Blob should not exist
Error message
Blob should not exist
What it means
Duplicate guard for BlobData during on-chain genesis import: replace(&blob_id, payload) returned Some. The blob_id is derived from the blob content, so this fires when the same payload appears twice in the genesis state (identical content hashes to the same blob id) or when the blob id already exists in the database.
Source
Thrown at crates/fuel-core/src/service/genesis/importer/on_chain.rs:286
}
Ok(())
}
fn init_blob_payload(
transaction: &mut StorageTransaction<&mut GenesisDatabase>,
entry: &TableEntry<BlobData>,
) -> anyhow::Result<()> {
let payload = entry.value.as_ref();
let blob_id = entry.key;
// insert blob payload
if transaction
.storage::<BlobData>()
.replace(&blob_id, payload)?
.is_some()
{
return Err(anyhow!("Blob should not exist"));
}
Ok(())
}
fn init_contract_raw_code(
transaction: &mut StorageTransaction<&mut GenesisDatabase>,
entry: &TableEntry<ContractsRawCode>,
) -> anyhow::Result<()> {
let contract = entry.value.as_ref();
let contract_id = entry.key;
// insert contract code
if transaction
.storage::<ContractsRawCode>()
.replace(&contract_id, contract)?
.is_some()
{View on GitHub (pinned to b9d4d170da)
Solutions
- Dedupe blob payloads by content hash before import: identical payloads are by definition the same blob id and only need one entry.
- Wipe the db directory and re-run the import.
- Regenerate the snapshot with deduplicating tooling.
Example fix
// before: the same payload twice
"blobs": [ { "id": "0xbbbb...", "payload": "0x1234" }, { "id": "0xbbbb...", "payload": "0x1234" } ]
// after: one entry per unique payload
"blobs": [ { "id": "0xbbbb...", "payload": "0x1234" } ] Defensive patterns
Strategy: validation
Validate before calling
fn validate_blob_uniqueness(blobs: &[TableEntry<BlobData>]) -> Result<(), String> {
let mut seen = std::collections::HashSet::new();
for b in blobs {
if !seen.insert(b.key) {
return Err(format!("duplicate blob id {} (identical payload listed twice)", b.key));
}
}
Ok(())
} Try / catch
match importer.run().await {
Err(e) if e.to_string().contains("Blob should not exist") => {
// dedupe blobs by content hash and re-import
}
rest => rest,
} Prevention
- Remember blob ids are content hashes: identical payloads are duplicates by definition.
- Dedupe blob lists by id in snapshot generation tooling.
- Verify db emptiness before genesis import.
When it happens
Trigger: Two identical blob payloads in the genesis blob list, or importing genesis into a database that already stored those blobs.
Common situations: Concatenating snapshot files that both include a shared blob; snapshot tooling that appends instead of deduplicating by content hash; re-running import without clearing the db directory.
Related errors
- Coin should not exist
- Contract utxo should not exist
- Contract code should not exist
- contract tx_pointer cannot be greater than genesis block
- Message should not exist
AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16).
Data as JSON: /api/errors/a02d906b9adce268.
Report an issue: GitHub.