-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Number of digest items must match that calculated #388
Comments
@hackfisher relate to #358, darwinia-network/substrate#1 |
In executor: fn final_checks(header: &System::Header) {
// remove temporaries
let new_header = <frame_system::Module<System>>::finalize();
// check digest
assert_eq!(
header.digest().logs().len(),
new_header.digest().logs().len(),
"Number of digest items must match that calculated."
);
let items_zip = eader.digest().logs().iter().zip(new_header.digest().logs().iter());
for (header_item, computed_item) in items_zip {
header_item.check_equal(&computed_item);
assert!(header_item == computed_item, "Digest item must match that alculated.");
}
// check storage root.
let storage_root = new_header.state_root();
header.state_root().check_equal(&storage_root);
assert!(header.state_root() == storage_root, "Storage root must match that calculated.");
} |
Reproducible in multi nodes model:
It goes normal after re-generating the genesis or running in native model:
Need to find the root cause why it need to regenerate genesis after changing Digest or Runtime? |
This is for ethereum, not substrate. |
It seems that block producer node are generating block using old genesis wasm version, and applying blocks using native version(or local wasm version). Substrate didn't compare the local wasm with on-chain wasm on genesis? |
The root cause is following:
|
The text was updated successfully, but these errors were encountered: