Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.6.8"
version = "0.6.9"
edition = "2024"
rust-version = "1.92"
authors = ["init4"]
Expand Down Expand Up @@ -35,13 +35,13 @@ incremental = false

[workspace.dependencies]
# internal
signet-hot = { version = "0.6.8", path = "./crates/hot" }
signet-hot-mdbx = { version = "0.6.8", path = "./crates/hot-mdbx" }
signet-cold = { version = "0.6.8", path = "./crates/cold" }
signet-cold-mdbx = { version = "0.6.8", path = "./crates/cold-mdbx" }
signet-cold-sql = { version = "0.6.8", path = "./crates/cold-sql" }
signet-storage = { version = "0.6.8", path = "./crates/storage" }
signet-storage-types = { version = "0.6.8", path = "./crates/types" }
signet-hot = { version = "0.6.9", path = "./crates/hot" }
signet-hot-mdbx = { version = "0.6.9", path = "./crates/hot-mdbx" }
signet-cold = { version = "0.6.9", path = "./crates/cold" }
signet-cold-mdbx = { version = "0.6.9", path = "./crates/cold-mdbx" }
signet-cold-sql = { version = "0.6.9", path = "./crates/cold-sql" }
signet-storage = { version = "0.6.9", path = "./crates/storage" }
signet-storage-types = { version = "0.6.9", path = "./crates/types" }

# External, in-house
signet-libmdbx = { version = "0.8.0" }
Expand Down
12 changes: 8 additions & 4 deletions crates/hot/src/db/inconsistent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,11 @@ pub trait UnsafeHistoryWrite: UnsafeDbWrite + HistoryRead {
for (address, info) in accounts {
let account = info.as_ref().map(Account::from).unwrap_or_default();

if let Some(bytecode) = info.as_ref().and_then(|info| info.code.clone()) {
let code_hash = account.bytecode_hash.expect("info has bytecode; hash must exist");
// bytecode_hash is None when code_hash == KECCAK256_EMPTY,
// which doesn't need to be stored.
if let Some((bytecode, code_hash)) =
info.as_ref().and_then(|info| info.code.clone()).zip(account.bytecode_hash)
{
self.put_bytecode(&code_hash, &bytecode)?;
}

Expand Down Expand Up @@ -322,8 +325,9 @@ pub trait UnsafeHistoryWrite: UnsafeDbWrite + HistoryRead {
};

let account = Account::from(info.clone());
if let Some(bytecode) = info.code.clone() {
let code_hash = account.bytecode_hash.expect("info has bytecode; hash must exist");
// bytecode_hash is None when code_hash == KECCAK256_EMPTY,
// which doesn't need to be stored.
if let Some((bytecode, code_hash)) = info.code.clone().zip(account.bytecode_hash) {
self.put_bytecode(&code_hash, &bytecode)?;
}
self.put_account(address, &account)
Expand Down