Packages

package canton

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

Package Members

  1. package admin
  2. package buildinfo
  3. package caching
  4. package cli
  5. package common
  6. package concurrent
  7. package config
  8. package console

    General console utilities

  9. package crypto
  10. package data
  11. package demo
  12. package domain
  13. package environment
  14. package error
  15. package examples
  16. package external
  17. package health
  18. package ledger
  19. package lifecycle
  20. package logging
  21. package metrics
  22. package microbench
  23. package networking
  24. package participant
  25. package platform

    Type aliases used throughout the package

  26. package protobuf
  27. package protocol

    Provides shorthands for general purpose types.

    Provides shorthands for general purpose types.

    Most notably, it provides a facade for Daml-LF transactions and nodes. By default, code should access Daml-LF transaction and nodes types through this facade.

  28. package pruning
  29. package replica
  30. package resource
  31. package scheduler
  32. package sequencing
  33. package serialization
  34. package store
  35. package telemetry
  36. package time
  37. package topology
  38. package tracing
  39. package traffic
  40. package util
  41. package v0
  42. package version

Type Members

  1. final case class ApplicationId(id: LedgerApplicationId) extends PrettyPrinting with Product with Serializable

    Application identifier for identifying customer applications in the ledger api

    Application identifier for identifying customer applications in the ledger api

    id

    ledger string representing application

  2. abstract class CantonAppDriver[E <: Environment] extends App with NamedLogging with NoTracing

    The Canton main application.

    The Canton main application.

    Starts a set of domains and participant nodes.

  3. sealed trait CantonScript extends AnyRef
  4. final case class CantonScriptFromFile(scriptPath: File) extends CantonScript with Product with Serializable
  5. final case class CommandId(id: LfLedgerString) extends PrettyPrinting with Product with Serializable

    Command identifier for tracking ledger commands

    Command identifier for tracking ledger commands

    id

    ledger string representing command

  6. class ConsoleInteractiveRunner[E <: Environment] extends Runner[E]
  7. class ConsoleScriptRunner[E <: Environment] extends Runner[E]
  8. implicit final class DiscardOps[A] extends AnyVal

    Evaluate the expression and discard the result.

  9. final class DoNotDiscardLikeFuture extends Annotation with StaticAnnotation

    Annotated type constructors will be treated like a scala.concurrent.Future when looking for discarded futures.

  10. final class DoNotTraverseLikeFuture extends Annotation with StaticAnnotation

    Annotated type constructors will be treated like a scala.concurrent.Future when looking for traverse-like calls with such an applicative instance.

  11. final case class DomainAlias(str: String255) extends LengthLimitedStringWrapper with PrettyPrinting with Product with Serializable

    Participant local identifier used to refer to a Domain without the need to fetch identifying information from a domain.

    Participant local identifier used to refer to a Domain without the need to fetch identifying information from a domain. This does not need to be globally unique. Only unique for the participant using it.

    str

    String with given alias

  12. final case class FutureTransformer(transformedTypeArgumentPosition: Int) extends Annotation with StaticAnnotation with Product with Serializable

    Annotation for computation transformer type constructors (e.g., a monad transformer) so that if it will be treated future-like when applied to a future-like computation type.

    Annotation for computation transformer type constructors (e.g., a monad transformer) so that if it will be treated future-like when applied to a future-like computation type.

    transformedTypeArgumentPosition

    The type argument position for the computation type that is transformed

  13. type LedgerApplicationId = daml.lf.data.IdString.ApplicationId
  14. type LedgerCommandId = LedgerString
  15. type LedgerConfiguration = Configuration
  16. type LedgerParticipantId = ParticipantId
  17. type LedgerSubmissionId = LedgerString
  18. type LedgerTransactionId = LedgerString
  19. type LfChoiceName = Name
  20. type LfCommand = ReplayCommand
  21. type LfCreateCommand = Create
  22. type LfExerciseByKeyCommand = ExerciseByKey
  23. type LfExerciseCommand = Exercise
  24. type LfFetchByKeyCommand = FetchByKey
  25. type LfFetchCommand = Fetch
  26. type LfInterfaceId = Identifier
  27. type LfKeyResolver = Map[GlobalKey, KeyMapping]
  28. type LfLedgerString = LedgerString
  29. type LfLookupByKeyCommand = LookupByKey
  30. type LfPackageId = PackageId
  31. type LfPartyId = Party
  32. type LfTimestamp = Timestamp
  33. type LfValue = Value
  34. type LfVersioned[T] = Versioned[T]
  35. type LfWorkflowId = LedgerString
  36. sealed trait ProtoDeserializationError extends Product with Serializable
  37. type RequestCounter = Counter[RequestCounterDiscriminator]
  38. abstract type RequestCounterDiscriminator

    The counter assigned by the transaction processor to confirmation and transfer requests.

  39. implicit final class RichRequestCounter extends AnyVal
  40. trait Runner[E <: Environment] extends NamedLogging

    Result for exposing the process exit code.

    Result for exposing the process exit code. All logging is expected to take place inside of the runner.

  41. final case class SequencerAlias extends LengthLimitedStringWrapper with PrettyPrinting with Product with Serializable

    Class representing a SequencerAlias.

    Class representing a SequencerAlias.

    A SequencerAlias serves as a shorthand, or 'nickname', for a particular sequencer or group of Highly Available (HA) replicas of a sequencer within a specific node.

    Note: - SequencerAlias is a node-local concept. This means that two different participants may assign different aliases to the same sequencer or group of HA sequencer replicas.

    - The uniqueness of a SequencerAlias is only enforced within a given domain ID. This means a node can use the same sequencer alias for different sequencers as long as these sequencers belong to different domains.

  42. type SequencerCounter = Counter[SequencerCounterDiscriminator]
  43. abstract type SequencerCounterDiscriminator

    The counter assigned by the sequencer to messages sent to the participant.

    The counter assigned by the sequencer to messages sent to the participant. The counter is specific to every participant.

  44. class ServerRunner[E <: Environment] extends Runner[E] with NoTracing
  45. type TransferCounter = Counter[TransferCounterDiscriminator]
  46. abstract type TransferCounterDiscriminator

    The counter assigned to a contract to count the number of its transfers

  47. type TransferCounterO = Option[TransferCounter]

    A transfer counter if available.

    A transfer counter if available. Transfer counters are defined from protocol version com.digitalasset.canton.version.ProtocolVersion.dev on

  48. final case class WorkflowId(id: LfWorkflowId) extends PrettyPrinting with Product with Serializable

    Workflow identifier for identifying customer workflows, i.e.

    Workflow identifier for identifying customer workflows, i.e. individual requests, in the ledger api

    id

    ledger string representing workflow

Value Members

  1. val LedgerApplicationId: daml.lf.data.Ref.ApplicationId.type
  2. val LedgerCommandId: daml.lf.data.Ref.CommandId.type
  3. val LedgerConfiguration: Configuration.type
  4. val LedgerParticipantId: ParticipantId.type
  5. val LedgerSubmissionId: SubmissionId.type
  6. val LedgerTransactionId: TransactionId.type
  7. val LfChoiceName: ChoiceName.type
  8. val LfCommand: ReplayCommand.type
  9. val LfCreateCommand: Create.type
  10. val LfExerciseByKeyCommand: ExerciseByKey.type
  11. val LfExerciseCommand: Exercise.type
  12. val LfFetchByKeyCommand: FetchByKey.type
  13. val LfFetchCommand: Fetch.type
  14. val LfInterfaceId: TypeConName.type
  15. val LfLedgerString: LedgerString.type
  16. val LfLookupByKeyCommand: LookupByKey.type
  17. val LfPackageId: PackageId.type
  18. val LfPartyId: Party.type
  19. val LfTimestamp: Timestamp.type
  20. val LfValue: Value.type
  21. val LfVersioned: Versioned.type
  22. val LfWorkflowId: daml.lf.data.Ref.WorkflowId.type
  23. val SequencerCounter: CounterCompanion[SequencerCounterDiscriminator]
  24. def checked[A](x: => A): A

    Wrap a method call with this method to document that the caller is sure that the callee's preconditions are met.

  25. implicit val lfPartyOrdering: Ordering[LfPartyId]
  26. object ApplicationId extends Serializable
  27. object CantonCommunityApp extends CantonAppDriver[CommunityEnvironment]
  28. object CantonEnterpriseApp extends CantonAppDriver[EnterpriseEnvironment]
  29. object CantonResearchApp extends CantonAppDriver[ResearchEnvironment]
  30. object CommandId extends Serializable
  31. object ConsoleScriptRunner extends NoTracing
  32. object DiscardedFuture extends WartTraverser

    Flags statements that return a scala.concurrent.Future.

    Flags statements that return a scala.concurrent.Future. Typically, we should not discard scala.concurrent.Future because exceptions inside the future may not get logged. Use FutureUtil.doNotAwait to log exceptions and discard the future where necessary.

    Also detects discarded cats.data.EitherT[scala.concurrent.Future, ..., ...] and cats.data.OptionT[scala.concurrent.Future, ...] and arbitrary nestings of those. Custom type constructors can be registered to take the same role as scala.concurrent.Future by annotating the type definition with DoNotDiscardLikeFuture.

    Also flags usages of scala.collection.IterableOnceOps.foreach and scala.collection.IterableOnceOps.tapEach where the function returns a future-like type.

    This wart is a special case of the warts NonUnitStatements and NonUnitForEach and scalac's -Wnonunit-statement flag, in that it warns only if the return type is future-like. Additionally, this wart uses a different set of exceptions when no warning is issued. We keep this specialized wart for two reasons: 1. It is not practically feasible to use -Wnonunit-statement and NonUnitForEach in scalatest because it would flag many of the assertions of the form x should be >= y in statement positions. Yet, it is important to check for discarded futures in tests because a discarded future may hide an exception. 2. In some production code, it is convenient to suppress the warnings coming from -Wnonunit-statement and NonUnitForEach, just due to how the code is written. In such places, we still want to benefit from the explicit checks against discarded futures.

    This wart does not look at futures that are discarded at the end of a unit-type expression. These cases are caught by -Ywarn-value-discard. We do not implement a specialized version for future-like values because we do not expect to suppress the warnings coming from -Ywarn-value-discard.

  33. object DomainAlias extends LengthLimitedStringWrapperCompanion[String255, DomainAlias] with Serializable
  34. object FutureLikeTester
  35. object FutureTraverse extends WartTraverser

    Cats' traverse and sequence methods do not specify the evaluation behaviour and this behaviour has changed between minor versions (e.g., 2.6 and 2.7).

    Cats' traverse and sequence methods do not specify the evaluation behaviour and this behaviour has changed between minor versions (e.g., 2.6 and 2.7). When we traverse over containers, we should therefore be explicit whether the traversal is parallel or sequential. This wart flags all usages of Cats' syntax extensions for future-like applicatives, except when used with the singleton containers scala.Option and scala.Either.

    Limitations: - It does not flag traverse calls whose applicative instance is more general and can be instantiated with a future-like instance.

  36. object GlobalExecutionContext extends WartTraverser

    The global execution context scala.concurrent.ExecutionContext.global should be avoided because it is integrated with neither of the following: - Canton's error reporting - execution context supervision - thread count configuration - the workarounds for the bugs in the ForkJoinPool Moreover, if it is used in tests, the tests may interfere in unexpected ways.

    The global execution context scala.concurrent.ExecutionContext.global should be avoided because it is integrated with neither of the following: - Canton's error reporting - execution context supervision - thread count configuration - the workarounds for the bugs in the ForkJoinPool Moreover, if it is used in tests, the tests may interfere in unexpected ways.

    For unit tests, mix in the traits com.daml.resources.HasExecutionContext or com.digitalasset.canton.HasExecutorService, which provide a suitably configured scala.concurrent.ExecutionContext. For integration tests, an execution context should already be in scope. In production code, properly pass the right scala.concurrent.ExecutionContext into where it is needed. Create a new one using com.digitalasset.canton.concurrent.Threading if absolutely necessary.

    For similar reasons, the scala.concurrent.ExecutionContext.parasitic should not be used. Use com.digitalasset.canton.concurrent.DirectExecutionContext instead.

    scala.concurrent.ExecutionContext.opportunistic should be avoided as well, but given that scala.concurrent.ExecutionContext.opportunistic is private to the scala package, this wart does not check for it.

  37. object NonUnitForEach extends WartTraverser

    This wart warns when methods scala.collection.IterableOnceOps.foreach and scala.collection.IterableOnceOps.tapEach are used with non-unit valued functions.

    This wart warns when methods scala.collection.IterableOnceOps.foreach and scala.collection.IterableOnceOps.tapEach are used with non-unit valued functions. This is needed because these methods' signature accepts any-valued functions. So -Ywarn-value-discard does not warn about such discarded values.

    scala.collection.IterableOnceOps.foreach is also used in for loops without yield and therefore also covers cases such as for { x <- 1 to 10 } { x + 5 }.

    Builder operations such as b += ... are identified by their return type this.type and ignored when checking for non-unit return values. This allows common usages such as for { x <- 1 to 10 } { b += x } and for { x <- 1 to 10 } { if (x % 2 == 0) b += x }. This does not work for all usages though; you can force a Unit type by specifying the type argument of scala.collection.IterableOnceOps.foreach and scala.collection.IterableOnceOps.tapEach as in (1 to 10).foreach[Unit] { ... }, or by ascribing Unit as in (1 to 10).foreach { x => f(x): Unit }, or by explicitly discarding the result: (1 to 10).foreach { x => f(x).discard }.

  38. object ProtoDeserializationError extends ProtoDeserializationErrorGroup with Serializable
  39. object RequestCounter extends CounterCompanion[RequestCounterDiscriminator]
  40. object RequireBlocking extends WartTraverser

    All blocking method calls should be wrapped in scala.concurrent.blocking so that the execution context knows that it may have to spawn a new process.

    All blocking method calls should be wrapped in scala.concurrent.blocking so that the execution context knows that it may have to spawn a new process.

    This wart checks that all @{code synchronized} calls are surrounded immediately by a scala.concurrent.blocking call. It also complains about calls to java.lang.Thread.sleep as Threading.sleep should be used instead.

    The logic can currently be fooled by renaming synchronized and sleep.

  41. object SequencerAlias extends LengthLimitedStringWrapperCompanion[String255, SequencerAlias] with Serializable
  42. object SlickString extends WartTraverser

    The DB may truncate strings of unbounded length.

    The DB may truncate strings of unbounded length. Therefore, this wart flags the following:

    This includes references generated by the string interpolators sql and sqlu

  43. object TransferCounter extends CounterCompanion[TransferCounterDiscriminator]
  44. object WorkflowId extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped