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.
- Alphabetic
- By Inheritance
- SubmissionTracker
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- 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
Futurereturned byregister()will be completed withfalse. - abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def provideSubmissionData(rootHash: RootHash, requestId: RequestId, submissionData: SubmissionData)(implicit traceContext: TraceContext): Unit
Provide the submission data necessary to decide on transaction validity.
- 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
Futurethat 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])