Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Update IntermediateStateRoot after substrate upgrade #1327

Closed
boundless-forest opened this issue Jul 5, 2022 · 1 comment
Closed

Update IntermediateStateRoot after substrate upgrade #1327

boundless-forest opened this issue Jul 5, 2022 · 1 comment
Assignees
Labels
C-EVM [Component] Something about EVM

Comments

@boundless-forest
Copy link
Member

Relate Prs:

  1. Substrate side: Inner hashing of value in state trie (runtime versioning). paritytech/substrate#9732
  2. Frontier side: https://github.com/paritytech/frontier/pull/583/files#diff-4a4404da981c8fc7fd4a5f9245136407d480ae2568de69e207c12066cb9473f5
pub struct IntermediateStateRoot<T>(PhantomData<T>);
impl<T: Config> Get<H256> for IntermediateStateRoot<T> {
	fn get() -> H256 {
		let version = T::Version::get().state_version();  // this line
		H256::decode(&mut &sp_io::storage::root(version)[..])
			.expect("Node is configured to use the same hash; qed")
	}
}
@boundless-forest boundless-forest self-assigned this Jul 5, 2022
@boundless-forest boundless-forest added the C-EVM [Component] Something about EVM label Jul 5, 2022
@boundless-forest
Copy link
Member Author

Related commit: darwinia-network/substrate@6ee7b44

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-EVM [Component] Something about EVM
Projects
None yet
Development

No branches or pull requests

1 participant