class ChainHandler extends ChainApi with ChainVerificationLogger

Chain Handler is meant to be the reference implementation of ChainApi, this is the entry point in to the chain project.

This implementation of ChainApi reads all values directly from the database. If you want an optimized version that caches headers locally please see ChainHandlerCached

Linear Supertypes
ChainVerificationLogger, Logging, ChainApi, ChainQueryApi, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ChainHandler
  2. ChainVerificationLogger
  3. Logging
  4. ChainApi
  5. ChainQueryApi
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ChainHandler(blockHeaderDAO: BlockHeaderDAO, filterHeaderDAO: CompactFilterHeaderDAO, filterDAO: CompactFilterDAO, stateDAO: ChainStateDescriptorDAO, blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE])(implicit chainConfig: ChainAppConfig, executionContext: ExecutionContext)

    blockHeaderDAO

    block header DB

    filterHeaderDAO

    filter header DB

    filterDAO

    filter DB

    blockFilterCheckpoints

    compact filter checkpoints for filter header verification in form of a map (block header hash -> filter header hash)

    chainConfig

    config file

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 blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE]
  6. val blockHeaderDAO: BlockHeaderDAO
  7. implicit val chainConfig: ChainAppConfig
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def copyWith(blockHeaderDAO: BlockHeaderDAO = blockHeaderDAO, filterHeaderDAO: CompactFilterHeaderDAO = filterHeaderDAO, filterDAO: CompactFilterDAO = filterDAO, stateDAO: ChainStateDescriptorDAO = stateDAO, blockFilterCheckpoints: Map[DoubleSha256DigestBE, DoubleSha256DigestBE] = blockFilterCheckpoints): ChainHandler
  10. def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  11. def debug(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  12. def debug(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  13. def epochSecondToBlockHeight(time: Long): Future[Int]
    Definition Classes
    ChainHandler → ChainQueryApi
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  17. def error(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. def error(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  19. val filterDAO: CompactFilterDAO
  20. val filterHeaderDAO: CompactFilterHeaderDAO
  21. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  22. def getBestBlockHash(): Future[DoubleSha256DigestBE]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainQueryApi
  23. def getBestBlockHeader(): Future[BlockHeaderDb]
    Definition Classes
    ChainHandler → ChainApi
  24. def getBestBlockHeaderHelper(chains: Vector[Blockchain]): BlockHeaderDb

    Given a set of blockchains, determines which one has the best header

    Given a set of blockchains, determines which one has the best header

    Attributes
    protected
  25. def getBestFilter(): Future[Option[CompactFilterDb]]
    Definition Classes
    ChainHandler → ChainApi
  26. def getBestFilterHeader(): Future[Option[CompactFilterHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  27. def getBestFilterHeaderWithChains(blockchains: Vector[Blockchain]): Future[Option[CompactFilterHeaderDb]]
    Attributes
    protected
  28. def getBestHashBlockHeight()(implicit ec: ExecutionContext): Future[Int]
    Definition Classes
    ChainQueryApi
  29. def getBlockCount(): Future[Int]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  30. def getBlockHeight(blockHash: DoubleSha256DigestBE): Future[Option[Int]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainQueryApi
  31. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. def getFilter(blockHash: DoubleSha256DigestBE): Future[Option[CompactFilterDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  33. def getFilterCount(): Future[Int]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi → ChainQueryApi
  34. def getFilterHeader(blockHash: DoubleSha256DigestBE): Future[Option[CompactFilterHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  35. def getFilterHeaderCount(): Future[Int]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  36. def getFilterHeadersAtHeight(height: Int): Future[Vector[CompactFilterHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  37. def getFiltersAtHeight(height: Int): Future[Vector[CompactFilterDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  38. def getFiltersBetweenHeights(startHeight: Int, endHeight: Int): Future[Vector[FilterResponse]]
    Definition Classes
    ChainHandler → ChainQueryApi
  39. def getHeader(hash: DoubleSha256DigestBE): Future[Option[BlockHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  40. def getHeaders(hashes: Vector[DoubleSha256DigestBE]): Future[Vector[Option[BlockHeaderDb]]]
    Definition Classes
    ChainHandler → ChainApi
  41. def getHeadersAtHeight(height: Int): Future[Vector[BlockHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  42. def getHeadersBetween(from: BlockHeaderDb, to: BlockHeaderDb): Future[Vector[BlockHeaderDb]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  43. def getHeightByBlockStamp(blockStamp: BlockStamp): Future[Int]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi → ChainQueryApi
  44. def getMedianTimePast(): Future[Long]

    calculates the median time passed

    calculates the median time passed

    Definition Classes
    ChainHandler → ChainQueryApi
  45. def getNumberOfConfirmations(blockHash: DoubleSha256DigestBE): Future[Option[Int]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainQueryApi
  46. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  47. def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def info(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  49. def info(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  50. def isDebugEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  51. def isErrorEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  52. def isIBD(): Future[Boolean]
    Definition Classes
    ChainHandler → ChainApi
  53. def isInfoEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  54. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  55. def isMissingChainWork: Future[Boolean]
  56. def isSyncing(): Future[Boolean]
    Definition Classes
    ChainHandler → ChainApi
  57. def isTraceEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  58. def isWarnEnabled: Boolean
    Attributes
    protected
    Definition Classes
    Logging
  59. def logger: Logger
    Attributes
    protected
    Definition Classes
    Logging
  60. def loggerName: String
    Attributes
    protected
    Definition Classes
    Logging
  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. def nextBlockHeaderBatchRange(prevStopHash: DoubleSha256DigestBE, batchSize: Int): Future[Option[FilterSyncMarker]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  63. def nextBlockHeaderBatchRangeWithChains(prevStopHash: DoubleSha256DigestBE, batchSize: Int, blockchains: Vector[Blockchain]): Future[Option[FilterSyncMarker]]
    Attributes
    protected
  64. def nextFilterHeaderBatchRange(filterHeight: Int, batchSize: Int): Future[Option[FilterSyncMarker]]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  65. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  66. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  67. def processCheckpoint(filterHeaderHash: DoubleSha256DigestBE, blockHash: DoubleSha256DigestBE): Future[ChainApi]
    Definition Classes
    ChainApi
  68. def processCheckpoints(checkpoints: Vector[DoubleSha256DigestBE], blockHash: DoubleSha256DigestBE): Future[ChainApi]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  69. def processFilter(message: CompactFilterMessage): Future[ChainApi]
    Definition Classes
    ChainApi
  70. def processFilterHeader(filterHeader: FilterHeader, blockHash: DoubleSha256DigestBE): Future[ChainApi]
    Definition Classes
    ChainApi
  71. def processFilterHeaders(filterHeaders: Vector[FilterHeader], stopHash: DoubleSha256DigestBE): Future[ChainApi]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  72. def processFilters(messages: Vector[CompactFilterMessage]): Future[ChainApi]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  73. def processHeader(header: BlockHeader): Future[ChainApi]
    Definition Classes
    ChainApi
  74. def processHeaders(headers: Vector[BlockHeader]): Future[ChainApi]

    <invalid inheritdoc annotation>

    <invalid inheritdoc annotation>

    Definition Classes
    ChainHandler → ChainApi
  75. def processHeadersWithChains(headers: Vector[BlockHeader], blockchains: Vector[Blockchain]): Future[ChainApi]
    Attributes
    protected
  76. def recalculateChainWork: Future[ChainHandler]
  77. def setIBD(value: Boolean): Future[ChainApi]
    Definition Classes
    ChainHandler → ChainApi
  78. def setSyncing(value: Boolean): Future[ChainApi]
    Definition Classes
    ChainHandler → ChainApi
  79. val stateDAO: ChainStateDescriptorDAO
  80. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  81. def toChainHandlerCached: Future[ChainHandlerCached]
  82. def toString(): String
    Definition Classes
    AnyRef → Any
  83. def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def trace(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def trace(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def verifyFilterHeaders(filterHeaders: Vector[CompactFilterHeaderDb]): Future[Unit]

    Verifies if the previous headers exist either in the batch filterHeaders or in the database, throws if it doesn't

  87. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  88. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  89. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  90. def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  91. def warn(msg: => Any, t: => Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  92. def warn(msg: => Any): Unit
    Attributes
    protected
    Definition Classes
    Logging

Inherited from ChainVerificationLogger

Inherited from Logging

Inherited from ChainApi

Inherited from ChainQueryApi

Inherited from AnyRef

Inherited from Any

Ungrouped