Skip to content

Conversation

@lukaszrzasik
Copy link
Contributor

Closes #<ISSUE_NUMBER>

This PR:

This PR does not:

Key places to review:

Copy link
Contributor

@imabdulbasit imabdulbasit left a comment

Choose a reason for hiding this comment

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

I think we should just move these checks



// Check internal consistency.
    let parent_header = parent_leaf.block_header();
    ensure!(
        state.chain_config.commit() == parent_header.chain_config().commit(),
        "internal error! in-memory chain config {:?} does not match parent header {:?}",
        state.chain_config,
        parent_header.chain_config(),
    );
    ensure!(
        state.block_merkle_tree.commitment() == parent_header.block_merkle_tree_root(),
        "internal error! in-memory block tree {} does not match parent header {}",
        state.block_merkle_tree.commitment(),
        parent_header.block_merkle_tree_root()
    );
    ensure!(
        state.fee_merkle_tree.commitment() == parent_header.fee_merkle_tree_root(),
        "internal error! in-memory fee tree {} does not match parent header {}",
        state.fee_merkle_tree.commitment(),
        parent_header.fee_merkle_tree_root()
    );

from before to after apply_header(), and we can change them for proposals instead of parent WDYT?

@lukaszrzasik
Copy link
Contributor Author

I wanted to split the code into separate logical parts: apply, verify, store. I can just move the code if that's what you prefer.

@lukaszrzasik lukaszrzasik merged commit e574cda into main Nov 17, 2025
115 checks passed
@lukaszrzasik lukaszrzasik deleted the lr/verify-store-state branch November 17, 2025 13:37
@github-actions
Copy link
Contributor

Backport failed for release-20251106, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-20251106
git worktree add -d .worktree/backport-3756-to-release-20251106 origin/release-20251106
cd .worktree/backport-3756-to-release-20251106
git switch --create backport-3756-to-release-20251106
git cherry-pick -x e574cda8d540aa44842f821d3618ba556b31ad10

lukaszrzasik added a commit that referenced this pull request Nov 17, 2025
* Update state: apply header, verify, store

* Remove `compute_state_update`

* Fix errors

* First apply, then verify and store

(cherry picked from commit e574cda)
lukaszrzasik added a commit that referenced this pull request Nov 18, 2025
* Update state: apply header, verify, store (#3756)

* Update state: apply header, verify, store

* Remove `compute_state_update`

* Fix errors

* First apply, then verify and store

(cherry picked from commit e574cda)

* Fix error after cherry pick

* Fix `test_vote_dependency_handle`

* clippy: fix type complexity error  (#3718)

* clippy: fix type complexity error
lukaszrzasik added a commit that referenced this pull request Nov 20, 2025
* relay log & logic

* fmt

* revert bad relay logic change

* Update staging genesis file

* Upgrade genesis file

* Upgrade proposal genesis file

* Add genesis files for upgrade proposer and new node

* Add the initial stake table for upgrade test

* Copy data dir into orchestrator's container

* Add modified DA to genesis file

* Increase DA genesis files

* 0.4 to 0.5 upgrade genesis files

* Adapt genesis file to new upgrade version

* Add stake table contract addr in genesis file

* Revert "Add stake table contract addr in genesis file"

This reverts commit 5827101.

* Set genesis_version to 0.4

* fix hotshotconfig deserialization

* clippy

* fix tests

* fix

* fix

* remove redundant attribute

* Adjust upgrade views

* Adjust upgrade view again

* CDN -> TCP (#3709)

* cdn upgrade + b compat

* lints

* CDN backwards compatibility - use cleaner build (#3717)

fix CDN backwards compatibility tag

* logging

* cancel dep handles correctly (#3733)

* cancel dep handles correctly

* log

* Typos

---------

Co-authored-by: Lukasz Rzasik <[email protected]>

* better startup logging

* Add more verbose logs to compute_state_update

* Add DRB logs (#3753)

* Add DRB logs

* Adjust log

* add version to block header trait and use it for the DRB calculation

* discard value from storage if incorrect

* fix

* Backport 3756 to release 20251106 (#3759)

* Update state: apply header, verify, store (#3756)

* Update state: apply header, verify, store

* Remove `compute_state_update`

* Fix errors

* First apply, then verify and store

(cherry picked from commit e574cda)

* Fix error after cherry pick

* Fix `test_vote_dependency_handle`

* clippy: fix type complexity error  (#3718)

* clippy: fix type complexity error

---------

Co-authored-by: MRain <[email protected]>
Co-authored-by: ss-es <[email protected]>
Co-authored-by: pls148 <[email protected]>
Co-authored-by: rob-maron <[email protected]>
Co-authored-by: Rob <[email protected]>
Co-authored-by: Brendon Fish <[email protected]>
Co-authored-by: Mathis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants