trait SubmissionTracker extends AutoCloseable

Tracker for submission, backed by a SubmissionTrackerStore.

The purpose of this tracker is to detect replayed requests, and allow the participant to emit a command completion only for genuine requests that it has submitted. A request R2 is considered a replay of a request R1 if they both contain the same transaction (root hash), and R2 has been sequenced after R1 (its requestId is later).

The protocol to use this tracker is:

- At the beginning of Phase 3, the participant must first call the tracker's register() method for every incoming confirmation request, in sequencing order. This returns a Future, which must be kept until the completion of the request.

- Further during processing of Phase 3, when further information about the request is obtained, the participant must either:

  • call cancelRegistration() when a request is deemed invalid or does not contain root views (and therefore was not submitted by this participant), or
  • call provideSubmissionData() with information about the submission.

- During phase 7, when finalizing the request, the participant must use the result of the Future returned during registration to determine whether the request requires a command completion.

Calling the methods in a different order than described above will result in undefined behavior. Failure to call either cancelRegistration() or provideSubmissionData() after calling register() for a request may result in a deadlock.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SubmissionTracker
  2. AutoCloseable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def cancelRegistration(rootHash: RootHash, requestId: RequestId)(implicit traceContext: TraceContext): Unit

    Cancel a previously registered submission and perform the necessary cleanup.

    Cancel a previously registered submission and perform the necessary cleanup. In particular, the associated Future returned by register() will be completed with false.

  2. abstract def close(): Unit
    Definition Classes
    AutoCloseable
    Annotations
    @throws(classOf[java.lang.Exception])
  3. abstract def provideSubmissionData(rootHash: RootHash, requestId: RequestId, submissionData: SubmissionData)(implicit traceContext: TraceContext): Unit

    Provide the submission data necessary to decide on transaction validity.

  4. abstract def register(rootHash: RootHash, requestId: RequestId)(implicit traceContext: TraceContext): FutureUnlessShutdown[Boolean]

    Register an ongoing transaction in the tracker.

    Register an ongoing transaction in the tracker.

    returns

    a Future that represents the conditions: * the transaction is fresh, i.e. it is not a replay; * the transaction was submitted by this participant; * the transaction is timely, i.e. it was sequenced within its max sequencing time.

Concrete 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. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped