Module io.hotmoka.node.api
Package io.hotmoka.node.api.nodes
Interface ValidatorsConsensusConfigBuilder<C extends ValidatorsConsensusConfig<C,B>,B extends ValidatorsConsensusConfigBuilder<C,B>>
- Type Parameters:
C- the concrete type of the configurationB- 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 Summary
Modifier and TypeMethodDescriptionsetBuyerSurcharge(int buyerSurcharge) Sets the extra tax paid when a validator acquires the shares of another validator (in percent of the offer cost).setPercentStaked(int percentStaked) Sets the amount of validators' rewards that gets staked.setSlashingForMisbehaving(int slashingForMisbehaving) Sets the percent of stake that gets slashed for each misbehaving validator.setSlashingForNotBehaving(int slashingForNotBehaving) Sets the percent of stake that gets slashed for each not behaving (not voting) validator.Methods inherited from interface io.hotmoka.node.api.nodes.ConsensusConfigBuilder
allowUnsignedFaucet, build, ignoreGasPrice, setChainId, setFinalSupply, setGenesisTime, setHeightAtFinalSupply, setInitialGasPrice, setInitialSupply, setMaxCumulativeSizeOfDependencies, setMaxDependencies, setMaxGasPerTransaction, setMaxRequestSize, setOblivion, setPublicKeyOfGamete, setSignatureForRequests, setTargetGasAtReward, setTicketForNewPoll, setVerificationVersion, skipVerification
-
Method Details
-
setPercentStaked
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
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
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
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
-