java.lang.Object
io.hotmoka.nodes.ConsensusParams
A specification of the consensus parameters of a node. This information
is typically contained in the manifest of a node.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanTrue if and only if the gamete of the node can call, for free, the add method of the accounts ledger and the mint/burn methods of the accounts, without paying gas and without paying for the minted coins.final booleanTrue if and only if the use of the@@SelfChargedannotation is allowed.final booleanTrue if and only if the use of the faucet of the gamete is allowed without a valid signature.final intExtra tax paid when a validator acquires the shares of another validator (in percent of the offer cost).final StringThe chain identifier of the node.final BigIntegerThe final supply of coins in the node.final StringThe genesis time, UTC, in ISO8601 pattern.final booleanTrue if and only if the node ignores the minimum gas price.final BigIntegerThe initial gas price.final longThe initial inflation applied to the gas consumed by transactions before it gets sent as reward to the validators.final BigIntegerThe initial supply of red coins in the node.final BigIntegerThe initial supply of coins in the node.final longThe maximal cumulative size (in bytes) of the instrumented jars of the dependencies of a transaction.final intThe maximal number of dependencies in the classpath of a transaction.final intThe maximal length of the error message kept in the store of the node.final BigIntegerThe maximal amount of gas that a non-view transaction can consume.final longHow quick the gas consumed at previous rewards is forgotten: 0 means never, 1_000_000 means immediately.final intThe amount of validators' rewards that gets staked.final StringThe Base64-encoded public key of the gamete account.final StringThe name of the signature algorithm for signing requests.final booleanTrue if and only if the static verification of the classes of the jars installed in the node must be skipped.final intThe percent of stake that gets slashed for each misbehaving validator.final intThe percent of stake that gets slashed for validators that do not behave (or do not vote).final BigIntegerThe units of gas that are aimed to be rewarded at each reward.final BigIntegerThe amount of coin to pay to start a new poll amount the validators, for instance in order to change a consensus parameter.final intThe version of the verification module to use. -
Method Summary
Modifier and TypeMethodDescriptionChain a builder initialized with the information in this object.
-
Field Details
-
genesisTime
The genesis time, UTC, in ISO8601 pattern. It defaults to the time of construction of the builder of this object. -
chainId
The chain identifier of the node. It defaults to the empty string. -
maxErrorLength
public final int maxErrorLengthThe maximal length of the error message kept in the store of the node. Beyond this threshold, the message gets truncated. It defaults to 300 characters. -
maxDependencies
public final int maxDependenciesThe maximal number of dependencies in the classpath of a transaction. It defaults to 20. -
maxCumulativeSizeOfDependencies
public final long maxCumulativeSizeOfDependenciesThe maximal cumulative size (in bytes) of the instrumented jars of the dependencies of a transaction. It defaults to 10,000,000. -
allowsSelfCharged
public final boolean allowsSelfChargedTrue if and only if the use of the@@SelfChargedannotation is allowed. It defaults to false. -
allowsUnsignedFaucet
public final boolean allowsUnsignedFaucetTrue if and only if the use of the faucet of the gamete is allowed without a valid signature. It defaults to false. -
allowsMintBurnFromGamete
public final boolean allowsMintBurnFromGameteTrue if and only if the gamete of the node can call, for free, the add method of the accounts ledger and the mint/burn methods of the accounts, without paying gas and without paying for the minted coins. -
skipsVerification
public final boolean skipsVerificationTrue if and only if the static verification of the classes of the jars installed in the node must be skipped. It defaults to false. -
publicKeyOfGamete
The Base64-encoded public key of the gamete account. -
initialGasPrice
The initial gas price. It defaults to 100. -
maxGasPerTransaction
The maximal amount of gas that a non-view transaction can consume. It defaults to 1_000_000_000. -
ignoresGasPrice
public final boolean ignoresGasPriceTrue if and only if the node ignores the minimum gas price. Hence requests that specify a lower gas price than the current gas price of the node are executed anyway. This is mainly useful for testing. It defaults to false. -
targetGasAtReward
The units of gas that are aimed to be rewarded at each reward. If the actual reward is smaller, the price of gas must decrease. If it is larger, the price of gas must increase. This defaults to 1_000_000. -
oblivion
public final long oblivionHow quick the gas consumed at previous rewards is forgotten: 0 means never, 1_000_000 means immediately. Hence a smaller level means that the latest rewards are heavier in the determination of the gas price. A value of 0 means that the gas price is constant. It defaults to 250_000L. -
initialInflation
public final long initialInflationThe initial inflation applied to the gas consumed by transactions before it gets sent as reward to the validators. 1,000,000 means 1%. Inflation can be negative. For instance, -300,000 means -0.3%. This defaults to 10,000 (that is, inflation is 0.1% by default). -
verificationVersion
public final int verificationVersionThe version of the verification module to use. It defaults to 0. -
initialSupply
The initial supply of coins in the node. -
finalSupply
The final supply of coins in the node. Once the current supply reaches this final amount, it remains constant. -
initialRedSupply
The initial supply of red coins in the node. -
ticketForNewPoll
The amount of coin to pay to start a new poll amount the validators, for instance in order to change a consensus parameter. -
signature
The name of the signature algorithm for signing requests. It defaults to "ed25519". -
percentStaked
public final int percentStakedThe amount of validators' rewards that gets staked. The rest is sent to the validators immediately. 1000000 = 1%. It defaults to 75%. -
buyerSurcharge
public final int buyerSurchargeExtra tax paid when a validator acquires the shares of another validator (in percent of the offer cost). 1000000 = 1%. It defaults to 50%. -
slashingForMisbehaving
public final int slashingForMisbehavingThe percent of stake that gets slashed for each misbehaving validator. 1000000 means 1%. It defaults to 1%. -
slashingForNotBehaving
public final int slashingForNotBehavingThe percent of stake that gets slashed for validators that do not behave (or do not vote). 1000000 means 1%. It defaults to 0.5%.
-
-
Method Details
-
toBuilder
Chain a builder initialized with the information in this object.- Returns:
- the builder
-