package fork
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
- case class ActiveSlotCoefficientFork(activeSlotCoefficient: Double = -1) extends OptionalSidechainFork with Product with Serializable
- case class ConsensusParamsFork(consensusSlotsInEpoch: Int = 720, consensusSecondsInSlot: Int = 12) extends OptionalSidechainFork with Product with Serializable
- case class ConsensusParamsForkInfo(activationEpoch: Int, consensusParamsFork: ConsensusParamsFork) extends Product with Serializable
- case class DefaultSidechainFork(backwardTransferLimitEnabled: Boolean = false, openStakeTransactionEnabled: Boolean = false, nonceLength: Int = 8, stakePercentageForkApplied: Boolean = false, ftMinAmount: Long = 0, coinBoxMinAmount: Long = 0) extends MandatorySidechainFork with Product with Serializable
- trait ForkActivation extends AnyRef
- abstract class ForkConfigurator extends AnyRef
-
sealed
trait
MainchainFork extends AnyRef
Mainchain fork variables.
Mainchain fork variables. Defines variables that can be changed at forks in the mainchain.
-
case class
MainchainForkHeight(regtest: Int, testnet: Int, mainnet: Int) extends ForkActivation with Product with Serializable
Defines the mainchain block height per network at which a fork becomes active.
-
sealed
trait
MandatorySidechainFork extends AnyRef
Sidechain Fork variables.
Sidechain Fork variables. Defines variables that can be modified at forks.
- trait OptionalSidechainFork extends AnyRef
- case class Sc2scFork(sc2scCanSend: Boolean = false, sc2scCanReceive: Boolean = false) extends OptionalSidechainFork with Product with Serializable
-
case class
SidechainFork1(backwardTransferLimitEnabled: Boolean = true, openStakeTransactionEnabled: Boolean = true, nonceLength: Int = Constants.FIELD_ELEMENT_LENGTH(), stakePercentageForkApplied: Boolean = true, ftMinAmount: Long = ..., coinBoxMinAmount: Long = ...) extends MandatorySidechainFork with Product with Serializable
Sidechain Fork # 1
Sidechain Fork # 1
Fork details:
- In the mainchain we have a limitation on the amount of BTs that we can have inside a certificate. This limitation is not handled inside the Sidechain SDK and this may lead in the creation of an invalid certificate. For this reason in the SidechainFork1 we add some restrictions on the amount of BT that can mined inside a withdrawal epoch. The maximum amount of BT allowed in a certificate is 3999, the idea is that for every MC block reference that we sync we open up the possibility to mine some WithdrawalBoxes until we reach the limit of 3999 in the last block of the withdrawal epoch.
- We have the possibility to restrict the forging operation to a predefined set of forgers "closed forging state" and there is no way to change from this state to an "open forging state" where everyone are allowed to forge. Inside this SidechainFork1 we give this opportunity by adding a new kind of transaction "OpenStakeTransaction" that let the current allowed forgers to vote for the forge opening. If the majority of the allowed forgers send this transactions, the forging operation is then opened to everyone.
nonceLength- changes nonce length used for building VrfMessages from 8 to 32stakePercentageForkApplied- security improvement for calculating minimum required stake percentage- ftMinAmount - Sidechain sends minimum FT amount as a parameter in a Certificate sent to Mainchain. Before the fork, minimum amount for Forward Transfer was 0, so it was possible to create a coin box which value is below the dust threshold (< 54 satoshi ATM), so the cost of verification is greater than the value itself. After the fork, ftMinAmount is set to min Dust threshold, and thus it will be impossible to create a FT with value below the dust threshold (< 54 satoshi ATM)
- coinBoxMinAmount - we should prevent creation of any kind of coin boxes on SC which value is too low, so the cost of verification is greater than the value itself. We already have such check for WithdrawalRequestBox, but it was missing for all CoinBoxes. After the fork is applied, all CoinBoxes value will be checked against the dust threshold limit - 54 satoshis ATM.
-
case class
SidechainForkConsensusEpoch(regtest: Int, testnet: Int, mainnet: Int) extends ForkActivation with Product with Serializable
Defines the consensus epoch number per network at which a fork becomes active.
-
case class
SidechainSupportMainchainFork(getSidechainTxVersion: Int = 0xfffffffb, getCertificateVersion: Int = 0xfffffffc, getNewBlockVersion: Int = 0x3) extends MainchainFork with Product with Serializable
Introduced when sidechain support was added to the mainchain.
Value Members
- object ActiveSlotCoefficientFork extends Serializable
- object ConsensusParamsFork extends Serializable
- object ForkManager
- object ForkUtil
- object MainchainFork
- object MandatorySidechainFork
- object Sc2scFork extends Serializable