Skip to content

Add time and block hash to StateHeader#203

Open
ed255 wants to merge 19 commits into
mainfrom
feat/action-state-2
Open

Add time and block hash to StateHeader#203
ed255 wants to merge 19 commits into
mainfrom
feat/action-state-2

Conversation

@ed255

@ed255 ed255 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Resolve #200

Tested end to end with just dev and then FindLog from the gui.

@ed255 ed255 changed the title Feat/action state 2 Add time and block hash to StateHeader Jul 22, 2026
@ed255
ed255 requested a review from dhvanipa July 23, 2026 12:33
Comment thread libs/pod2utils/src/lib.rs
}

/// Lossy conversion of a 256 bit value to a pod2 Hash
pub fn b256_to_hash(v: B256) -> Hash {

@dhvanipa dhvanipa Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm are there any implications of doing a lossy conversion? Would we ever need to recover the original 256-bit hash or verify a StateHeader.block_hash against a real Ethereum block hash?

Comment thread libs/txlib/src/lib.rs
impl StateHeader {
pub fn new(
block_number: i64,
block_time: i64,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: some places use block_time and others block_timestamp

eg podlang field uses block_time also

I would propose we use the same name everywhere, I'm okay with either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add time and block hash to StateHeader

3 participants