Trait/Object

scorex.transaction

History

Related Docs: object History | package transaction

Permalink

trait History extends AnyRef

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
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. History
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def appendBlock(block: Block): Try[BlocksToProcess]

    Permalink

    Use BlockStorage.appendBlock(block: Block) if you want to automatically update state

    Use BlockStorage.appendBlock(block: Block) if you want to automatically update state

    Append block to a chain, based on it's reference

    block

    - block to append

    returns

    Blocks to process in state

  2. abstract def blockAt(height: Int): Option[Block]

    Permalink
  3. abstract def blockById(blockId: BlockId): Option[Block]

    Permalink
  4. abstract def generatedBy(account: Account, from: Int, to: Int): Seq[Block]

    Permalink

    returns

    Get list of blocks generated by specified address in specified interval of blocks

  5. abstract val genesis: Block

    Permalink
  6. abstract def getCheckpoint: Option[Checkpoint]

    Permalink
  7. abstract def height(): Int

    Permalink

    Height of the a chain, or a longest chain in the explicit block-tree

  8. abstract def heightOf(blockId: BlockId): Option[Int]

    Permalink
  9. abstract def lastBlocks(howMany: Int): Seq[Block]

    Permalink
  10. abstract def lookForward(parentSignature: BlockId, howMany: Int): Seq[BlockId]

    Permalink

    Return $howMany blocks starting from $parentSignature

  11. abstract def parent(block: Block, back: Int = 1): Option[Block]

    Permalink
  12. abstract def score(): BlockchainScore

    Permalink

    Quality score of a best chain, e.g.

    Quality score of a best chain, e.g. cumulative difficulty in case of Bitcoin / Nxt

  13. abstract def scoreOf(id: BlockId): BlockchainScore

    Permalink
  14. abstract def setCheckpoint(checkpoint: Option[Checkpoint]): Unit

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def averageDelay(block: Block, blockNum: Int): Try[Long]

    Permalink

    Average delay in milliseconds between last $blockNum blocks starting from $block

  6. def blockById(blockId: String): Option[Block]

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def confirmations(block: Block): Option[Int]

    Permalink
  9. def contains(id: BlockId): Boolean

    Permalink
  10. def contains(block: Block): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def heightOf(block: Block): Option[Int]

    Permalink

    Height of a block if it's in the blocktree

  17. def isEmpty: Boolean

    Permalink

    Is there's no history, even genesis block

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def lastBlock: Block

    Permalink

    Block with maximum blockchain score

  20. def lastBlockIds(howMany: Int): Seq[BlockId]

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

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped