class CliqueExtraDataValidationRule implements AttachedBlockHeaderValidationRule {

  @Override
  public boolean validate(
      final BlockHeader header, final BlockHeader parent, final ProtocolContext protocolContext) {
    try {
      final VoteTally validatorProvider =
          protocolContext
              .getConsensusState(CliqueContext.class)
              .getVoteTallyCache()
              .getVoteTallyAfterBlock(parent);

      final Collection<Address> storedValidators = validatorProvider.getValidators();
      return extraDataIsValid(storedValidators, header);

    } catch (final RLPException ex) {
      LOG.trace("ExtraData field was unable to be deserialised into an Clique Struct.", ex);
      return false;
    } catch (final IllegalArgumentException ex) {
      LOG.trace("Failed to verify extra data", ex);
      return false;
    }
  }

  public  CliqueExtraDataValidationRule(final EpochManager epochManager);

}