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 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.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- SidechainFork1
- Serializable
- Serializable
- Product
- Equals
- MandatorySidechainFork
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new SidechainFork1(backwardTransferLimitEnabled: Boolean = true, openStakeTransactionEnabled: Boolean = true, nonceLength: Int = Constants.FIELD_ELEMENT_LENGTH(), stakePercentageForkApplied: Boolean = true, ftMinAmount: Long = ..., coinBoxMinAmount: Long = ...)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
backwardTransferLimitEnabled: Boolean
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
val
coinBoxMinAmount: Long
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
ftMinAmount: Long
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
nonceLength: Int
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
openStakeTransactionEnabled: Boolean
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
val
stakePercentageForkApplied: Boolean
- Definition Classes
- SidechainFork1 → MandatorySidechainFork
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated