c

io.horizen.fork

SidechainFork1

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

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 32
  • stakePercentageForkApplied - 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.
Linear Supertypes
Serializable, Serializable, Product, Equals, MandatorySidechainFork, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SidechainFork1
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. MandatorySidechainFork
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SidechainFork1(backwardTransferLimitEnabled: Boolean = true, openStakeTransactionEnabled: Boolean = true, nonceLength: Int = Constants.FIELD_ELEMENT_LENGTH(), stakePercentageForkApplied: Boolean = true, ftMinAmount: Long = ..., coinBoxMinAmount: Long = ...)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val backwardTransferLimitEnabled: Boolean
    Definition Classes
    SidechainFork1MandatorySidechainFork
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  7. val coinBoxMinAmount: Long
    Definition Classes
    SidechainFork1MandatorySidechainFork
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. val ftMinAmount: Long
    Definition Classes
    SidechainFork1MandatorySidechainFork
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. val nonceLength: Int
    Definition Classes
    SidechainFork1MandatorySidechainFork
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. val openStakeTransactionEnabled: Boolean
    Definition Classes
    SidechainFork1MandatorySidechainFork
  17. val stakePercentageForkApplied: Boolean
    Definition Classes
    SidechainFork1MandatorySidechainFork
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from MandatorySidechainFork

Inherited from AnyRef

Inherited from Any

Ungrouped