Skip to content

Commit

Permalink
Cleanup comment around not yet checking inherents.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshy Orndorff committed Nov 22, 2023
1 parent 7cc9e58 commit fa1778e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tuxedo-parachain-core/src/validate_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,30 @@ where
sp_io::offchain_index::host_clear.replace_implementation(host_offchain_index_clear),
);

//TODO Consider whether and how to check inherents.
// https://github.com/Off-Narrative-Labs/Tuxedo/issues/144
// https://substrate.stackexchange.com/questions/10436
// The code below is commented from Cumulus, and is one option. I prefer to re-use the
// existing check-inehrent logic if possible.

// Step 5: Check inherents.
// TODO For now I'm skipping this entirely to try to make something "work"
// run_with_externalities::<B, _, _>(&backend, || {
// let relay_chain_proof = super::RelayChainStateProof::new(
// PID::get(),
// inherent_data.validation_data.relay_parent_storage_root,
// inherent_data.relay_chain_state.clone(),
// )
// .expect("Invalid relay chain state proof");

//
// let res = CI::check_inherents(&block, &relay_chain_proof);

//
// if !res.ok() {
// if log::log_enabled!(log::Level::Error) {
// res.into_errors().for_each(|e| {
// log::error!("Checking inherent with identifier `{:?}` failed", e.0)
// });
// }

//
// panic!("Checking inherents failed");
// }
// });
Expand Down

0 comments on commit fa1778e

Please sign in to comment.