Trait/Object

scorex.core.consensus

History

Related Docs: object History | package consensus

Permalink

trait History[P <: Proposition, TX <: Transaction[P], PM <: PersistentNodeViewModifier[P, TX], SI <: SyncInfo, HT <: History[P, TX, PM, SI, HT]] extends NodeViewComponent

History of a blockchain system is some blocktree in fact (like this: http://image.slidesharecdn.com/sfbitcoindev-chepurnoy-2015-150322043044-conversion-gate01/95/proofofstake-its-improvements-san-francisco-bitcoin-devs-hackathon-12-638.jpg), where longest chain is being considered as canonical one, containing right kind of history.

In cryptocurrencies of today blocktree view is usually implicit, means code supports only linear history, but other options are possible.

To say "longest chain" is the canonical one is simplification, usually some kind of "cumulative difficulty" function has been used instead, even in PoW systems.

Linear Supertypes
NodeViewComponent, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. History
  2. NodeViewComponent
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract type NVCT >: History.this.type <: NodeViewComponent

    Permalink
    Definition Classes
    NodeViewComponent

Abstract Value Members

  1. abstract def append(modifier: PM): Try[(HT, RollbackInfo[PM])]

    Permalink
  2. abstract def compare(other: SI): History.HistoryComparisonResult.Value

    Permalink

    Whether another's node syncinfo shows that another node is ahead or behind ours

    Whether another's node syncinfo shows that another node is ahead or behind ours

    other

    other's node sync info

    returns

    Equal if nodes have the same history, Younger if another node is behind, Older if a new node is ahead

  3. abstract def continuationIds(from: ModifierIds, size: Int): Option[ModifierIds]

    Permalink
  4. abstract def isEmpty: Boolean

    Permalink

    Is there's no history, even genesis block

  5. abstract def modifierById(modifierId: ModifierId): Option[PM]

    Permalink
  6. abstract def openSurfaceIds(): Seq[ModifierId]

    Permalink
  7. abstract def syncInfo(answer: Boolean): SI

    Permalink

Concrete 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. def applicable(modifier: PM): Boolean

    Permalink

    Whether a modifier could be applied to the history

    Whether a modifier could be applied to the history

    modifier

    - modifier to apply

  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(id: ModifierId): Boolean

    Permalink

    Whether the history contains a modifier with the given id

    Whether the history contains a modifier with the given id

    id

    - modifier's id

  8. def contains(persistentModifier: PM): Boolean

    Permalink

    Whether the history contains the given modifier

    Whether the history contains the given modifier

    persistentModifier

    - modifier

  9. def continuation(from: ModifierIds, size: Int): Option[Seq[PM]]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def modifierById(modifierId: String): Option[PM]

    Permalink
  17. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

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

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

Inherited from NodeViewComponent

Inherited from AnyRef

Inherited from Any

Ungrouped