Interface ValidatorsConsensusConfigBuilder<C extends ValidatorsConsensusConfig<C,B>,B extends ValidatorsConsensusConfigBuilder<C,B>>

Type Parameters:
C - the concrete type of the configuration
B - the concrete type of the builder
All Superinterfaces:
ConsensusConfigBuilder<C,B>

public interface ValidatorsConsensusConfigBuilder<C extends ValidatorsConsensusConfig<C,B>,B extends ValidatorsConsensusConfigBuilder<C,B>> extends ConsensusConfigBuilder<C,B>
The builder of a configuration object of a Hotmoka node that uses validators.
  • Method Details

    • setPercentStaked

      B setPercentStaked(int percentStaked)
      Sets the amount of validators' rewards that gets staked. The rest is sent to the validators immediately. 1000000 = 1%. It defaults to 75%.
      Parameters:
      percentStaked - the buyer surcharge to set
      Returns:
      this builder
    • setBuyerSurcharge

      B setBuyerSurcharge(int buyerSurcharge)
      Sets the extra tax paid when a validator acquires the shares of another validator (in percent of the offer cost). 1000000 = 1%. It defaults to 50%.
      Parameters:
      buyerSurcharge - the buyer surcharge to set
      Returns:
      this builder
    • setSlashingForMisbehaving

      B setSlashingForMisbehaving(int slashingForMisbehaving)
      Sets the percent of stake that gets slashed for each misbehaving validator. 1000000 means 1%. It defaults to 1%.
      Parameters:
      slashingForMisbehaving - the slashing for misbehaving validators
      Returns:
      this builder
    • setSlashingForNotBehaving

      B setSlashingForNotBehaving(int slashingForNotBehaving)
      Sets the percent of stake that gets slashed for each not behaving (not voting) validator. 1000000 means 1%. It defaults to 1%.
      Parameters:
      slashingForNotBehaving - the slashing for not behaving validators
      Returns:
      this builder