@Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    checkState(
        validatorProvider.getVoteProviderAtHead().isPresent(), "Ibft requires a vote provider");
    final Address validatorAddress;
    try {
      validatorAddress = requestContext.getRequiredParameter(0, Address.class);
    } catch (JsonRpcParameterException e) {
      throw new InvalidJsonRpcParameters(
          "Invalid address parameter (index 0)", RpcErrorType.INVALID_ADDRESS_PARAMS, e);
    }
    final Boolean add;
    try {
      add = requestContext.getRequiredParameter(1, Boolean.class);
    } catch (JsonRpcParameterException e) {
      throw new InvalidJsonRpcParameters(
          "Invalid vote type parameter (index 1)", RpcErrorType.INVALID_VOTE_TYPE_PARAMS, e);
    }
    LOG.trace(
        "Received RPC rpcName={} voteType={} address={}",
        getName(),
        add ? VoteType.ADD : VoteType.DROP,
        validatorAddress);

    if (add) {
      validatorProvider.getVoteProviderAtHead().get().authVote(validatorAddress);
    } else {
      validatorProvider.getVoteProviderAtHead().get().dropVote(validatorAddress);
    }

    return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), true);
  }
Instantiates a new Ibft propose validator vote.

@param validatorProvider the validator provider
consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/jsonrpc/methods/IbftProposeValidatorVote.java