Object

org.ergoplatform.validation

ValidationRules

Related Doc: package validation

Permalink

object ValidationRules

All validation rules which are used to check soft-forkable conditions. Each validation rule throws a org.ergoplatform.validation.ValidationException. Each ValidationException can be caught and handled with respect to SigmaValidationSettings, which can be changed by miners via voting. Thus, the behavior of the rules can be overridden without breaking consensus.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValidationRules
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object CheckAndGetMethod extends ValidationRule

    Permalink
  5. object CheckCalcFunc extends ValidationRule

    Permalink
  6. object CheckCostFunc extends ValidationRule

    Permalink
  7. object CheckCostFuncOperation extends ValidationRule with SoftForkWhenCodeAdded

    Permalink

    For CheckCostFuncOperation we use 1-511 range op codes.

    For CheckCostFuncOperation we use 1-511 range op codes. Thus ChangedRule.newValue should be parsed as a sequence of getUShort values and then the exOpCode should be checked against that parsed sequence. Note, we don't need to store a number of items in a sequence, because at the time of parsing we may assume that ChangedRule.newValue has correct length, so we just parse it until end of bytes (of cause checking consistency).

  8. object CheckDeserializedScriptIsSigmaProp extends ValidationRule

    Permalink
  9. object CheckDeserializedScriptType extends ValidationRule

    Permalink
  10. object CheckHeaderSizeBit extends ValidationRule with SoftForkWhenReplaced

    Permalink
  11. object CheckIsSupportedIndexExpression extends ValidationRule

    Permalink
  12. object CheckLoopLevelInCostFunction extends ValidationRule with SoftForkWhenReplaced

    Permalink
  13. object CheckPositionLimit extends ValidationRule with SoftForkWhenReplaced

    Permalink

    This rule doesn't have it's own validation logic, however it is used in creation of ValidationExceptions, which in turn can be checked for soft-fork condition using this.isSoftFork.

  14. object CheckPrimitiveTypeCode extends ValidationRule with SoftForkWhenCodeAdded

    Permalink
  15. object CheckSerializableTypeCode extends ValidationRule with SoftForkWhenReplaced

    Permalink
  16. object CheckTupleType extends ValidationRule with SoftForkWhenReplaced

    Permalink
  17. object CheckTypeCode extends ValidationRule with SoftForkWhenCodeAdded

    Permalink
  18. object CheckTypeWithMethods extends ValidationRule with SoftForkWhenCodeAdded

    Permalink
  19. object CheckValidOpCode extends ValidationRule with SoftForkWhenCodeAdded

    Permalink
  20. val FirstRuleId: Short

    Permalink

    The id of the first validation rule.

    The id of the first validation rule. Can be used as the beginning of the rules id range.

  21. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  22. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  23. val currentSettings: SigmaValidationSettings

    Permalink

    Validation settings that correspond to the current version of the ErgoScript implementation.

    Validation settings that correspond to the current version of the ErgoScript implementation. Different version of the code will have a different set of rules here. This variable is globally available and can be use wherever checking of the rules is necessary. This is immutable data structure, it can be augmented with RuleStates from block extension sections of the blockchain, but that augmentation is only available in stateful context.

  24. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  32. val ruleSpecs: Seq[ValidationRule]

    Permalink
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def trySoftForkable[T](whenSoftFork: ⇒ T)(block: ⇒ T)(implicit vs: SigmaValidationSettings): T

    Permalink

    Executes the given block catching ValidationException and checking possible soft-fork condition in the context of the given SigmaValidationSettings.

    Executes the given block catching ValidationException and checking possible soft-fork condition in the context of the given SigmaValidationSettings. If soft-fork condition is recognized the whenSoftFork is executed and its result is returned.

    whenSoftFork

    executed when soft-fork condition is detected

    block

    block of code, which may throw ValidationException

    vs

    set of SigmaValidationSettings which can be used to recognize soft-fork conditions.

    returns

    result of block if no ValidationException was thrown, or the result of whenSoftFork if soft-fork condition is detected.

    Exceptions thrown

    ValidationException if soft-fork condition is not recognized by the given vs

  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped