RocksDb
RocksDb enables the preservation of the blockchain's state locally, facilitating its future utilization.
To create or use a local database, follow these instructions:
let provider_config = Config {
database_path: PathBuf::from("/tmp/.spider/db"),
database_type: DbType::RocksDb,
..Config::local_node()
};
Note 1: If the specified database does not exist, a new database will be created at that path.
Note 2: To utilize the code snippets above, either:
- the
fuel-corebinary must be present or- both the
fuel-core-libandrocksdbfeatures need to be enabled.