Skip to content

Conversation

@dhyaniarun1993
Copy link

@dhyaniarun1993 dhyaniarun1993 commented Dec 12, 2025

Based on includes changes from #19355

@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Dec 12, 2025
@dhyaniarun1993 dhyaniarun1993 changed the title feat: added bincode serialization for hashed_state [WIP] feat: added bincode serialization for hashed_state [WIP] Dec 12, 2025
@dhyaniarun1993 dhyaniarun1993 changed the title feat: added bincode serialization for hashed_state [WIP] feat: added bincode serialization for hashed_state Dec 15, 2025
@emhane
Copy link
Collaborator

emhane commented Dec 15, 2025

seems like needs rebase. probably easier if you simply cherry-pick the commits that are new to this pr (the ones that don't have a pr link in brackets at end), onto the base branch, and then force push @dhyaniarun1993

@dhyaniarun1993 dhyaniarun1993 changed the base branch from mediocregopher/ex-ex-trie-updates to main December 15, 2025 14:00
@dhyaniarun1993 dhyaniarun1993 changed the base branch from main to mediocregopher/ex-ex-trie-updates December 15, 2025 14:01
@dhyaniarun1993
Copy link
Author

seems like needs rebase. probably easier if you simply cherry-pick the commits that are new to this pr (the ones that don't have a pr link in brackets at end), onto the base branch, and then force push @dhyaniarun1993

I think it's upto date with main. The base branch is not updated.

@emhane emhane changed the base branch from mediocregopher/ex-ex-trie-updates to main December 15, 2025 15:17
@emhane
Copy link
Collaborator

emhane commented Dec 15, 2025

if you can apply this as patch onto main, and exclude changes from #19355, then it could be merged individually. doesn't use any changes from #19355 afaik
blocked by #19355. combines changes from that branch and latest main.

@emhane emhane added the S-blocked This cannot more forward until something else changes label Dec 15, 2025
let block_number = block.header().number();

// Create some non-empty trie updates and hashed state to ensure the 4-field format is used
let trie_updates = TrieUpdatesSorted::default();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include some nominal trie updates/state changes to make this fully end-to-end? If someone accidentally breaks either of those serialization formats we would want this new .wal file test to break.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I add some cases here.

@mediocregopher
Copy link
Collaborator

Just a minor nit about the test case, and then the feature propagation CI error, other than that this looks good, thanks! 👍

cc @mattsse @shekhirin

@dhyaniarun1993 dhyaniarun1993 changed the title feat: added bincode serialization for hashed_state feat: Add TrieUpdatesSorted and HashedPostStateSorted in all ExEx notifications Dec 15, 2025
Copy link
Collaborator

@emhane emhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want to

Comment on lines +1100 to +1119
/// Bincode-compatible [`super::TrieUpdatesSorted`] serde implementation.
///
/// Intended to use with the [`serde_with::serde_as`] macro in the following way:
/// ```rust
/// use reth_trie_common::{serde_bincode_compat, updates::TrieUpdatesSorted};
/// use serde::{Deserialize, Serialize};
/// use serde_with::serde_as;
///
/// #[serde_as]
/// #[derive(Serialize, Deserialize)]
/// struct Data {
/// #[serde_as(as = "serde_bincode_compat::updates::TrieUpdatesSorted")]
/// trie_updates: TrieUpdatesSorted,
/// }
/// ```
#[derive(Debug, Serialize, Deserialize)]
pub struct TrieUpdatesSorted<'a> {
account_nodes: Cow<'a, [(Nibbles, Option<BranchNodeCompact>)]>,
storage_tries: B256Map<StorageTrieUpdatesSorted<'a>>,
}
Copy link
Collaborator

@emhane emhane Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to create a new module (can be part of this file) called serde_bincode_compat, and feature gate this code behind the existing feature for this crate serde-bincode-compat. same for the hashed post state .

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Dec 15, 2025
@emhane emhane removed the S-blocked This cannot more forward until something else changes label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants