Function forest_filecoin::fil_cns::validation::validate_block
source ยท pub(super) async fn validate_block<DB: Blockstore + Sync + Send + 'static>(
state_manager: Arc<StateManager<DB>>,
beacon_schedule: Arc<BeaconSchedule>,
block: Arc<Block>,
) -> Result<(), NonEmpty<FilecoinConsensusError>>
Expand description
Validates block semantically according to https://github.com/filecoin-project/specs/blob/6ab401c0b92efb6420c6e198ec387cf56dc86057/validation.md Returns all encountered errors, so they can be merged with the common validations performed by the synchronizer.
Validation includes:
- Sanity checks
- Timestamps
- Elections and Proof-of-SpaceTime, Beacon values