com.digitalasset.canton.participant.protocol.validation
RecipientsValidator
Companion object RecipientsValidator
class RecipientsValidator[I] extends NamedLogging
- Alphabetic
- By Inheritance
- RecipientsValidator
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new RecipientsValidator(viewOfInput: (I) => ViewTree, recipientsOfInput: (I) => Recipients, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)
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() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- Definition Classes
- RecipientsValidator → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def retainInputsWithValidRecipients(requestId: RequestId, inputs: Seq[I], snapshot: PartyTopologySnapshotClient)(implicit traceContext: TraceContext): Future[(Seq[WrongRecipients], Seq[I])]
Checks the recipients of all inputs and discards inputs corresponding to views with invalid recipients.
Checks the recipients of all inputs and discards inputs corresponding to views with invalid recipients. Also reports a security alert on invalid recipients.
Effectively, the method tries to establish consensus on whether the recipients of an input are valid, and if consensus cannot be established, then the input is discarded. So an input may even be discarded, if its recipients are valid (but not every recipient knows about this).
A view v will be kept iff there is a path rp through the recipients tree (ordered leaf to root) such that the following conditions hold: 1. Every informee of the view is hosted by an active participant. 2. Every informee participant of the view v is declared as a recipient of v in the first element of rp. 3. For every descendant v2 of v and every informee participant p of v, the participant p is declared as recipient of v2. Thereby, if v2 and v have distance d, then participant p needs to be declared at element d+1 in rp. 4. Every descendant of v also meets Conditions 1-3 with the same path rp.
Why does this give us transparency? If an informee participant p1 keeps a view v, then: - Every informee of the view v is hosted by an active participant. - Every informee participant of v has received v. - Every informee participant of v has received every descendant of v. - Every informee participant of v can evaluate the above conditions 1-4 for v and will conclude that v should be kept.
- returns
inputs with valid recipients
- Exceptions thrown
java.lang.IllegalArgumentException
if the views corresponding to inputs have different root hashes
- 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])