Skip to content

Commit

Permalink
update some old comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshy Orndorff committed Oct 10, 2023
1 parent 7c04760 commit d1afb63
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tuxedo-core/src/executive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ impl<

// Extract the beginning-of-block inherents from the previous block.
// The parent is already imported, so we know it is valid and we know its inherents came first
// TODO where should we actually enforce that the inherents come first.
// I guess each time we apply an extrinsic, we should make sure that we never see another inherent after the first bunch.
// TODO Enforce that inherents are first in the execution path by making sure there are no more inherents after the first non-inherent.
let previous_blocks_inherents: Vec<<B as BlockT>::Extrinsic> = parent
.extrinsics()
.iter()
Expand All @@ -443,14 +442,6 @@ impl<
}

pub fn check_inherents(block: B, data: InherentData) -> sp_inherents::CheckInherentsResult {
//TODO We haven't actually made sure that all the inehrents that are expected to be in the block are indeed present.
// We could require each inherent to check this on its own. That's what FRAME does, but FRAME also allows multiple inherents per block
// Or we could do something like an accumulator. Actually, using an accumulator still requires the piece author to use the right accumulator and enforce it.
// For timestamp (and probably others) we can do this by storing not only the time, but also the block in which it is set.
// Then when we try to update it, we just make sure that the block in which it was last set is not the current block.
// Okay, but actually, maybe we can solve this a better way. The problem was taking the shortcut to a check_inherent (singular) method.
// We should stick with `check_inherents` and pass all the relevant inherents down the stack all the way to the bottom using the same wrapping and unwrapping trick.

log::info!(
target: LOG_TARGET,
"🕰️🖴 In `check_inherents`"
Expand Down

0 comments on commit d1afb63

Please sign in to comment.