Packages

trait SequencerRateLimitManager extends AutoCloseable

Holds the traffic control state and control rate limiting logic of members of a sequencer

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

Abstract Value Members

  1. abstract def balanceKnownUntil: Option[CantonTimestamp]

    Timestamp of the latest known state of traffic purchased entries.

  2. abstract def balanceUpdateSubscriber: SequencerTrafficControlSubscriber

    Optional subscriber to the traffic control processor, only used for the new top up implementation

  3. abstract def close(): Unit
    Definition Classes
    AutoCloseable
    Annotations
    @throws(classOf[java.lang.Exception])
  4. abstract def getStates(requestedMembers: Set[Member], minTimestamp: Option[CantonTimestamp], lastSequencerEventTimestamp: Option[CantonTimestamp], warnIfApproximate: Boolean = true)(implicit executionContext: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[Map[Member, Either[String, TrafficState]]]

    Return the latest known traffic states for the requested members, or all currently cached members if requestedMembers is empty.

    Return the latest known traffic states for the requested members, or all currently cached members if requestedMembers is empty.

    minTimestamp

    The minimum timestamp at which to get the traffic states. If the current known state is more recent than minTimestamp, it will be returned. If minTimestamp is more recent than the current known state, an APPROXIMATION of the state at minTimestamp will be used. Specifically, the base traffic remainder will be extrapolated to minTimestamp. There is no guarantee that the state returned will be the same as the correct one, when the synchronizer time actually reaches minTimestamp.

    lastSequencerEventTimestamp

    timestamp of the last event addressed to the sequencer.

    returns

    A Map of member and their traffic state.

  5. abstract def getTrafficStateForMemberAt(member: Member, timestamp: CantonTimestamp, lastSequencerEventTimestamp: Option[CantonTimestamp])(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, TrafficNotFound, Option[TrafficState]]
  6. abstract def lastKnownBalanceFor(member: Member)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[TrafficPurchased]]

    Returns the latest known balance for the given member.

  7. abstract def prune(upToExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[String]

    Prunes traffic control data such as it can still be queried up to 'upToExclusive'.

  8. abstract def registerNewMemberAt(member: Member, timestamp: CantonTimestamp, trafficControlConfig: TrafficControlParameters)(implicit tc: TraceContext): FutureUnlessShutdown[Unit]

    Create a traffic state for a new member at the given timestamp.

    Create a traffic state for a new member at the given timestamp. Its base traffic remainder will be equal to the max burst window configured at that point in time.

  9. abstract def resetStateTo(timestampExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    This method must be called during the crash recovery and must reset the state of rate limit manager to the state at the given timestamp (stores + internal state if there is i.e.

    This method must be called during the crash recovery and must reset the state of rate limit manager to the state at the given timestamp (stores + internal state if there is i.e. a cache).

  10. abstract def trafficConsumedStore: TrafficConsumedStore
  11. abstract def validateRequestAndConsumeTraffic(request: SubmissionRequest, sequencingTime: CantonTimestamp, submissionTimestamp: Option[CantonTimestamp], latestSequencerEventTimestamp: Option[CantonTimestamp], warnIfApproximate: Boolean, sequencerSignature: Signature)(implicit tc: TraceContext, closeContext: CloseContext): EitherT[FutureUnlessShutdown, SequencerRateLimitError, Option[TrafficReceipt]]

    Validate submission requests after they've been sequenced.

    Validate submission requests after they've been sequenced. The same validation as performed at submission is run again, to ensure that the submitting sequencer was not malicious. If the request is valid, the cost is consumed. This method MUST be called sequentially for a given sender, meaning concurrent updates are not supported. This method MUST be called in order of sequencing times, meaning 2 events sequenced at T1 and T2 such that T2 > T1 must be processed by this method in the order T1 -> T2. However, if T1 and T2 have been processed in the correct order, it is then ok to call the method with T1 again, which will result in the same output as when it was first called.

  12. abstract def validateRequestAtSubmissionTime(request: SubmissionRequest, submissionTimestamp: Option[CantonTimestamp], lastSequencedTimestamp: CantonTimestamp, lastSequencerEventTimestamp: Option[CantonTimestamp])(implicit tc: TraceContext, closeContext: CloseContext): EitherT[FutureUnlessShutdown, SequencerRateLimitError, Unit]

    Validate signed submission requests received by the sequencer.

    Validate signed submission requests received by the sequencer. Requests with a an invalid cost or a cost that exceeds the traffic credit will be rejected.

    submissionTimestamp

    The timestamp the sender of the submission request claims to have used to compute the submission cost.

    lastSequencerEventTimestamp

    timestamp of the last event addressed to the sequencer.

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]) @IntrinsicCandidate() @native()
  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
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  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
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  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

    (Since version 9)

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped