FuelLabs/fuel-core · error
gas-price database height({gas_price_chain_height}) is less
Error message
gas-price database height({gas_price_chain_height}) is less than target height({target_block_height}) What it means
rollback_to also aligns the gas-price database. Its height is Optional (a fresh gas-price DB with None is acceptable), but if Some(height) and that height is below target_block_height, rollback cannot proceed — the gas-price DB would need to move forward, which rollback never does.
Source
Thrown at crates/fuel-core/src/combined_database.rs:540
if on_chain_height < target_block_height {
return Err(anyhow::anyhow!(
"on-chain database height({on_chain_height}) \
is less than target height({target_block_height})"
));
}
if off_chain_height < target_block_height {
return Err(anyhow::anyhow!(
"off-chain database height({off_chain_height}) \
is less than target height({target_block_height})"
));
}
if let Some(gas_price_chain_height) = gas_price_chain_height
&& gas_price_chain_height < target_block_height
{
return Err(anyhow::anyhow!(
"gas-price database height({gas_price_chain_height}) \
is less than target height({target_block_height})"
));
}
if let Some(compression_db_height) = compression_db_height
&& compression_db_height < target_block_height
{
return Err(anyhow::anyhow!(
"compression database height({compression_db_height}) \
is less than target height({target_block_height})"
));
}
if on_chain_height > target_block_height {
self.on_chain().rollback_last_block()?;
}
View on GitHub (pinned to b9d4d170da)
Solutions
- Allow the gas-price service to catch up (run the node until the gas-price DB reaches chain height), then retry the rollback.
- If the gas-price history is disposable, remove the gas-price database so its height is None (allowed) and let it rebuild.
- Use a target no greater than the gas-price DB height when that history must be preserved.
Defensive patterns
Strategy: validation
Validate before calling
if let Some(gas_height) = combined_db.gas_price().latest_height_from_metadata()? {
if target_block_height > gas_height {
anyhow::bail!("target {} above gas-price height {}", target_block_height, gas_height);
}
}
// None is acceptable: a fresh gas-price DB may have no height Try / catch
match combined_db.rollback_to(target, &mut shutdown) {
Ok(()) => Ok(()),
Err(e) if e.to_string().contains("gas-price database height") => {
// either wait for the gas-price service to catch up, or drop its (optional) history
if gas_history_disposable() { drop_gas_price_db_and_retry() } else { wait_and_retry() }
}
Err(e) => Err(e),
} Prevention
- Keep the gas-price service enabled and healthy so its DB tracks chain height.
- Remember gas-price height is Optional: a None DB is fine, a stale Some(height) is not.
- Include the gas-price DB in consistent snapshot restores.
When it happens
Trigger: rollback_to where the gas-price database has recorded a height lower than the target — e.g., gas-price service started later/stopped earlier than the chain, or a gas-price DB restored from an older snapshot.
Common situations: Gas-price updater disabled or crashed for a period leaving its DB behind; partial snapshot restores; version upgrades that reset gas-price history.
Related errors
- on-chain database height({on_chain_height}) is less than tar
- off-chain database height({off_chain_height}) is less than t
- compression database height({compression_db_height}) is less
- on-chain database doesn't have height
- off-chain database doesn't have height
AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16).
Data as JSON: /api/errors/b8c1d45205357e49.
Report an issue: GitHub.