ledger: Damlification of Scala files (#9667)

* Damlification of Scala files (primarily comments and strings).

* Corrected a typo.
CHANGELOG_BEGIN
CHANGELOG_END

* Fixed build.

* Fixed test case for acronyms.

* Reformatted.
This commit is contained in:
Miklos 2021-05-20 12:21:04 +02:00 committed by GitHub
parent 40cf26fb8c
commit b1ca310866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
46 changed files with 107 additions and 105 deletions

View File

@ -10,7 +10,7 @@ import scalaz.syntax.tag._
package object sql {
private[sql] val Name = LedgerName("DAML-on-SQL")
private[sql] val Name = LedgerName("Daml-on-SQL")
private[sql] val DefaultConfig = SandboxConfig.defaultConfig.copy(
participantId = v1.ParticipantId.assertFromString(Name.unwrap.toLowerCase()),

View File

@ -185,7 +185,7 @@ object Main {
)
cmd("generate-token")
.text("Generate a signed access token for the DAML ledger API")
.text("Generate a signed access token for the Daml ledger API")
.action((_, c) => c.copy(command = Some(GenerateToken())))
.children(
opt[File]("output")

View File

@ -21,7 +21,7 @@ sealed abstract class Claim
case object ClaimAdmin extends Claim
/** Authorized to use all "public" services, i.e.,
* those that do not require admin rights and do not depend on any DAML party.
* those that do not require admin rights and do not depend on any Daml party.
* Examples include the LedgerIdentityService or the PackageService.
*/
case object ClaimPublic extends Claim

View File

@ -55,7 +55,7 @@ final class CommandsValidator(ledgerId: LedgerId) {
.left
.map(_ =>
invalidArgument(
s"Can not represent command ledger time $ledgerEffectiveTime as a DAML timestamp"
s"Can not represent command ledger time $ledgerEffectiveTime as a Daml timestamp"
)
)
deduplicationTime <- validateDeduplicationTime(

View File

@ -24,9 +24,9 @@ import com.google.protobuf.timestamp.Timestamp
*
* Most conversion functions have a verbose flag:
* - If verbose mode is disabled, then all resulting Api values have missing type identifiers and record field names.
* - If verbose mode is enabled, then type identifiers and record field names are copied from the input DAML-LF values.
* - If verbose mode is enabled, then type identifiers and record field names are copied from the input Daml-LF values.
* The caller is responsible for filling in missing type information using [[com.daml.lf.engine.ValueEnricher]],
* which may involve loading DAML-LF packages.
* which may involve loading Daml-LF packages.
*/
object LfEngineToApi {

View File

@ -16,12 +16,12 @@ import com.daml.lf.value.Value.ContractId
trait KeyHasher {
/** @deprecated in favor of [[GlobalKey.hash]]
* Returns the hash of the given DAML-LF value
* Returns the hash of the given Daml-LF value
*/
def hashKey(key: GlobalKey): Array[Byte]
/** @deprecated in favor of [[GlobalKey.hash]]
* Returns a string representation of the hash of the given DAML-LF value
* Returns a string representation of the hash of the given Daml-LF value
*/
def hashKeyString(key: GlobalKey): String = hashKey(key).map("%02x" format _).mkString
}
@ -31,7 +31,7 @@ trait KeyHasher {
object KeyHasher extends KeyHasher {
/** ADT for data elements that appear in the input stream of the hash function
* used to hash DAML-LF values.
* used to hash Daml-LF values.
*/
private sealed abstract class HashToken extends Product with Serializable
private final case class HashTokenText(value: String) extends HashToken
@ -44,7 +44,7 @@ object KeyHasher extends KeyHasher {
/** Traverses the given value in a stable way, producing "hash tokens" for any encountered primitive values.
* These tokens can be used as the input to a hash function.
*
* @param value the DAML-LF value to hash
* @param value the Daml-LF value to hash
* @param z initial hash value
* @param op operation to append a hash token
* @return the final hash value

View File

@ -274,7 +274,7 @@ object domain {
commands: LfCommands,
)
/** @param party The stable unique identifier of a DAML party.
/** @param party The stable unique identifier of a Daml party.
* @param displayName Human readable name associated with the party. Might not be unique.
* @param isLocal True if party is hosted by the backing participant.
*/

View File

@ -73,7 +73,7 @@ object Cli {
failure(s"$name is not a valid performance test name. Use `--list` to see valid names.")
head("""The Ledger API Test Tool is a command line tool for testing the correctness of
|ledger implementations based on DAML and Ledger API.""".stripMargin)
|ledger implementations based on Daml and Ledger API.""".stripMargin)
arg[(String, Int)]("[endpoints...]")(endpointRead)
.action((address, config) => config.copy(participants = config.participants :+ address))
@ -139,8 +139,8 @@ object Cli {
opt[Unit]('x', "extract")
.action((_, c) => c.copy(extract = true))
.text(
"""Extract a DAR necessary to test a DAML ledger and exit without running tests.
|The DAR needs to be manually loaded into a DAML ledger for the tool to work.""".stripMargin
"""Extract a DAR necessary to test a Daml ledger and exit without running tests.
|The DAR needs to be manually loaded into a Daml ledger for the tool to work.""".stripMargin
)
opt[Seq[String]]("exclude")

View File

@ -68,7 +68,7 @@ object LedgerApiTestTool {
private def extractResources(resources: Seq[String]): Unit = {
val pwd = Paths.get(".").toAbsolutePath
println(s"Extracting all DAML resources necessary to run the tests into $pwd.")
println(s"Extracting all Daml resources necessary to run the tests into $pwd.")
for (resource <- resources) {
val is = getClass.getClassLoader.getResourceAsStream(resource)
if (is == null) sys.error(s"Could not find $resource in classpath")

View File

@ -39,7 +39,7 @@ final class SemanticTests extends LedgerTestSuite {
* `c` if the following hold for all its subactions `act`
* on the contract `c`:
*
* 1. `act` does not happen before any Create c action (correct by construction in DAML)
* 1. `act` does not happen before any Create c action (correct by construction in Daml)
* 2. `act` does not happen after the contract has been consumend (i.e. no double spending)
*/

View File

@ -730,7 +730,7 @@ class TransactionServiceIT extends LedgerTestSuite {
test(
"TXUnitAsArgumentToNothing",
"DAML engine returns Unit as argument to Nothing",
"Daml engine returns Unit as argument to Nothing",
allocate(SingleParty),
)(implicit ec => { case Participants(Participant(ledger, party)) =>
val template = NothingArgument(party, Primitive.Optional.empty)

View File

@ -275,8 +275,8 @@ private[migration] class V2_1__Rebuild_Acs extends BaseJavaMigration {
|on conflict on constraint contract_divulgences_idx
|do nothing""".stripMargin
/** Updates the active contract set from the given DAML transaction.
* Note: This involves checking the validity of the given DAML transaction.
/** Updates the active contract set from the given Daml transaction.
* Note: This involves checking the validity of the given Daml transaction.
* Invalid transactions trigger a rollback of the current SQL transaction.
*/
private def updateActiveContractSet(

View File

@ -53,8 +53,8 @@ private[apiserver] final class StoreBackedCommandExecutor(
// The actAs and readAs parties are used for two kinds of checks by the ledger API server:
// When looking up contracts during command interpretation, the engine should only see contracts
// that are visible to at least one of the actAs or readAs parties. This visibility check is not part of the
// DAML ledger model.
// When checking DAML authorization rules, the engine verifies that the actAs parties are sufficient to
// Daml ledger model.
// When checking Daml authorization rules, the engine verifies that the actAs parties are sufficient to
// authorize the resulting transaction.
val commitAuthorizers = commands.actAs
val submissionResult = Timed.trackedValue(

View File

@ -36,7 +36,7 @@ object IndexerConfig {
val DefaultUpdatePreparationParallelism = 2
val DefaultRestartDelay: FiniteDuration = 10.seconds
// Should be greater than or equal to the number of pipline stages
// Should be greater than or equal to the number of pipeline stages.
val DefaultDatabaseConnectionPoolSize: Int = 3
val DefaultAsyncCommitMode: DbType.AsyncCommitMode = DbType.AsynchronousCommit

View File

@ -237,7 +237,7 @@ final class LfValueTranslation(
loggingContext: LoggingContext,
): Future[CreatedEvent] = {
// Load the deserialized contract argument and contract key from the cache
// This returns the values in DAML-LF format.
// This returns the values in Daml-LF format.
val create =
cache.events
.getIfPresent(eventKey(raw.partial.eventId))
@ -251,8 +251,8 @@ final class LfValueTranslation(
lazy val templateId: LfIdentifier = apiIdentifierToDamlLfIdentifier(raw.partial.templateId.get)
// Convert DAML-LF values to ledger API values.
// In verbose mode, this involves loading DAML-LF packages and filling in missing type information.
// Convert Daml-LF values to ledger API values.
// In verbose mode, this involves loading Daml-LF packages and filling in missing type information.
for {
createArguments <- toApiRecord(
value = create.argument,
@ -286,7 +286,7 @@ final class LfValueTranslation(
loggingContext: LoggingContext,
): Future[ExercisedEvent] = {
// Load the deserialized choice argument and choice result from the cache
// This returns the values in DAML-LF format.
// This returns the values in Daml-LF format.
val exercise =
cache.events
.getIfPresent(eventKey(raw.partial.eventId))
@ -303,8 +303,8 @@ final class LfValueTranslation(
lazy val templateId: LfIdentifier = apiIdentifierToDamlLfIdentifier(raw.partial.templateId.get)
lazy val choiceName: LfChoiceName = LfChoiceName.assertFromString(raw.partial.choice)
// Convert DAML-LF values to ledger API values.
// In verbose mode, this involves loading DAML-LF packages and filling in missing type information.
// Convert Daml-LF values to ledger API values.
// In verbose mode, this involves loading Daml-LF packages and filling in missing type information.
for {
choiceArgument <- toApiValue(
value = exercise.argument,

View File

@ -12,7 +12,7 @@ import com.daml.ledger.participant.state.v1.{CommittedTransaction, RejectionReas
* This is intended exclusively as a temporary replacement for
* [[com.daml.platform.store.ActiveLedgerState]] and [[com.daml.platform.store.ActiveLedgerStateManager]]
* so that the old post-commit validation backed by the old participant schema can be
* dropped and the DAML-on-X-backed implementation of the Sandbox can skip it entirely.
* dropped and the Daml-on-X-backed implementation of the Sandbox can skip it entirely.
*
* Post-commit validation is relevant for three reasons:
* - keys can be referenced by two concurrent interpretations, potentially leading to

View File

@ -35,9 +35,9 @@ import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success}
/** @param dispatcher Executes the queries prepared by this object
* @param executionContext Runs transformations on data fetched from the database, including DAML-LF value deserialization
* @param executionContext Runs transformations on data fetched from the database, including Daml-LF value deserialization
* @param pageSize The number of events to fetch at a time the database when serving streaming calls
* @param lfValueTranslation The delegate in charge of translating serialized DAML-LF values
* @param lfValueTranslation The delegate in charge of translating serialized Daml-LF values
* @see [[PaginatingAsyncStream]]
*/
private[appendonlydao] final class TransactionsReader(

View File

@ -146,12 +146,12 @@ private[platform] trait LedgerReadDao extends ReportsHealth {
endInclusive: Offset,
)(implicit loggingContext: LoggingContext): Source[(Offset, PartyLedgerEntry), NotUsed]
/** Returns a list of all known DAML-LF packages */
/** Returns a list of all known Daml-LF packages */
def listLfPackages()(implicit
loggingContext: LoggingContext
): Future[Map[PackageId, PackageDetails]]
/** Returns the given DAML-LF archive */
/** Returns the given Daml-LF archive */
def getLfArchive(packageId: PackageId)(implicit
loggingContext: LoggingContext
): Future[Option[Archive]]
@ -311,7 +311,7 @@ private[platform] trait LedgerWriteDao extends ReportsHealth {
rejectionReason: Option[String],
)(implicit loggingContext: LoggingContext): Future[PersistenceResponse]
/** Store a DAML-LF package upload result.
/** Store a Daml-LF package upload result.
*/
def storePackageEntry(
offsetStep: OffsetStep,

View File

@ -227,7 +227,7 @@ final class LfValueTranslation(
loggingContext: LoggingContext,
): Future[CreatedEvent] = {
// Load the deserialized contract argument and contract key from the cache
// This returns the values in DAML-LF format.
// This returns the values in Daml-LF format.
val create =
cache.events
.getIfPresent(eventKey(raw.partial.eventId))
@ -241,8 +241,8 @@ final class LfValueTranslation(
lazy val templateId: LfIdentifier = apiIdentifierToDamlLfIdentifier(raw.partial.templateId.get)
// Convert DAML-LF values to ledger API values.
// In verbose mode, this involves loading DAML-LF packages and filling in missing type information.
// Convert Daml-LF values to ledger API values.
// In verbose mode, this involves loading Daml-LF packages and filling in missing type information.
for {
createArguments <- toApiRecord(
value = create.argument,
@ -276,7 +276,7 @@ final class LfValueTranslation(
loggingContext: LoggingContext,
): Future[ExercisedEvent] = {
// Load the deserialized choice argument and choice result from the cache
// This returns the values in DAML-LF format.
// This returns the values in Daml-LF format.
val exercise =
cache.events
.getIfPresent(eventKey(raw.partial.eventId))
@ -293,8 +293,8 @@ final class LfValueTranslation(
lazy val templateId: LfIdentifier = apiIdentifierToDamlLfIdentifier(raw.partial.templateId.get)
lazy val choiceName: LfChoiceName = LfChoiceName.assertFromString(raw.partial.choice)
// Convert DAML-LF values to ledger API values.
// In verbose mode, this involves loading DAML-LF packages and filling in missing type information.
// Convert Daml-LF values to ledger API values.
// In verbose mode, this involves loading Daml-LF packages and filling in missing type information.
for {
choiceArgument <- toApiValue(
value = exercise.argument,

View File

@ -12,7 +12,7 @@ import com.daml.ledger.participant.state.v1.{CommittedTransaction, RejectionReas
* This is intended exclusively as a temporary replacement for
* [[com.daml.platform.store.ActiveLedgerState]] and [[com.daml.platform.store.ActiveLedgerStateManager]]
* so that the old post-commit validation backed by the old participant schema can be
* dropped and the DAML-on-X-backed implementation of the Sandbox can skip it entirely.
* dropped and the Daml-on-X-backed implementation of the Sandbox can skip it entirely.
*
* Post-commit validation is relevant for three reasons:
* - keys can be referenced by two concurrent interpretations, potentially leading to

View File

@ -37,9 +37,9 @@ import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success}
/** @param dispatcher Executes the queries prepared by this object
* @param executionContext Runs transformations on data fetched from the database, including DAML-LF value deserialization
* @param executionContext Runs transformations on data fetched from the database, including Daml-LF value deserialization
* @param pageSize The number of events to fetch at a time the database when serving streaming calls
* @param lfValueTranslation The delegate in charge of translating serialized DAML-LF values
* @param lfValueTranslation The delegate in charge of translating serialized Daml-LF values
* @see [[PaginatingAsyncStream]]
*/
private[dao] final class TransactionsReader(

View File

@ -77,11 +77,11 @@ private[dao] trait JdbcLedgerDaoSuite extends JdbcLedgerDaoBackend {
// Note: *identifiers* and *values* defined below MUST correspond to //ledger/test-common/src/main/daml/model/Test.daml
// This is because some tests request values in verbose mode, which requires filling in missing type information,
// which in turn requires loading DAML-LF packages with valid DAML-LF types that correspond to the DAML-LF values.
// which in turn requires loading Daml-LF packages with valid Daml-LF types that correspond to the Daml-LF values.
//
// On the other hand, *transactions* do not need to correspond to valid transactions that could be produced by the
// above mentioned DAML code, e.g., signatories/stakeholders may not correspond to the contract/choice arguments.
// This is because JdbcLedgerDao is only concerned with serialization, and does not verify the DAML ledger model.
// above mentioned Daml code, e.g., signatories/stakeholders may not correspond to the contract/choice arguments.
// This is because JdbcLedgerDao is only concerned with serialization, and does not verify the Daml ledger model.
private def testIdentifier(name: String) = Identifier(
testPackageId,
Ref.QualifiedName(

View File

@ -33,11 +33,13 @@ final class MetricsNamingSpec extends AnyFlatSpec with Matchers {
}
it should "keep acronyms together and change their capitalization as a single unit" in {
camelCaseToSnakeCase("DAML") shouldBe "daml"
camelCaseToSnakeCase("DAMLFactory") shouldBe "daml_factory"
camelCaseToSnakeCase("AbstractDAML") shouldBe "abstract_daml"
camelCaseToSnakeCase("AbstractDAMLFactory") shouldBe "abstract_daml_factory"
camelCaseToSnakeCase("AbstractDAMLProxyJVMFactory") shouldBe "abstract_daml_proxy_jvm_factory"
camelCaseToSnakeCase("ACRONYM") shouldBe "acronym"
camelCaseToSnakeCase("ACRONYMFactory") shouldBe "acronym_factory"
camelCaseToSnakeCase("AbstractACRONYM") shouldBe "abstract_acronym"
camelCaseToSnakeCase("AbstractACRONYMFactory") shouldBe "abstract_acronym_factory"
camelCaseToSnakeCase(
"AbstractACRONYMProxyJVMFactory"
) shouldBe "abstract_acronym_proxy_jvm_factory"
}
it should "treat single letter words intelligently" in {

View File

@ -42,8 +42,8 @@ package v2 {
*
* @param submitter: the party that submitted the change.
*
* @param applicationId: an identifier for the DAML application that
* submitted the command. This is used for monitoring and to allow DAML
* @param applicationId: an identifier for the Daml application that
* submitted the command. This is used for monitoring and to allow Daml
* applications subscribe to their own submissions only.
*
* @param commandId: a submitter provided identifier that he can use to
@ -60,7 +60,7 @@ package v2 {
* the transaction.
*
* @param transactionId: identifier of the transaction for looking it up
* over the DAML Ledger API.
* over the Daml Ledger API.
*
* Implementors are free to make it equal to the 'offset' of this event.
*
@ -68,7 +68,7 @@ package v2 {
*
* @param ledgerEffectiveTime: the submitter-provided time at which the
* transaction should be interpreted. This is the time returned by the
* DAML interpreter on a `getTime :: Update Time` call.
* Daml interpreter on a `getTime :: Update Time` call.
*
* @param recordTime:
* The time at which this event was recorded. Depending on the
@ -76,7 +76,7 @@ package v2 {
* to the whole ledger.
*
* @param workflowId: a submitter-provided identifier used for monitoring
* and to traffic-shape the work handled by DAML applications
* and to traffic-shape the work handled by Daml applications
* communicating over the ledger. Meant to used in a coordinated
* fashion by all parties participating in the workflow.
*/
@ -90,7 +90,7 @@ package v2 {
final case class LedgerConfiguration(maxDeduplicationTime: Duration)
/** Meta-data of a DAML-LF package
/** Meta-data of a Daml-LF package
*
* @param size : The size of the archive payload, in bytes.
*

View File

@ -359,7 +359,7 @@ object Config {
opt[Long]("max-lf-value-translation-cache-entries")
.optional()
.text(
s"The maximum size of the cache used to deserialize DAML-LF values, in number of allowed entries. By default, nothing is cached."
s"The maximum size of the cache used to deserialize Daml-LF values, in number of allowed entries. By default, nothing is cached."
)
.action((maximumLfValueTranslationCacheEntries, config) =>
config.copy(

View File

@ -25,7 +25,7 @@ object Err {
}
final case class ArchiveDecodingFailed(packageId: PackageId, reason: String) extends Err {
override def getMessage: String = s"Decoding of DAML-LF archive $packageId failed: $reason"
override def getMessage: String = s"Decoding of Daml-LF archive $packageId failed: $reason"
}
final case class DecodeError(kind: String, message: String) extends Err {

View File

@ -41,15 +41,15 @@ class KeyValueCommitting private[daml] (
def this(engine: Engine, metrics: Metrics) = this(engine, metrics, false)
/** Processes a DAML submission, given the allocated log entry id, the submission and its resolved inputs.
* Produces the log entry to be committed, and DAML state updates.
/** Processes a Daml submission, given the allocated log entry id, the submission and its resolved inputs.
* Produces the log entry to be committed, and Daml state updates.
*
* The caller is expected to resolve the inputs declared in [[DamlSubmission]] prior
* to calling this method, e.g. by reading [[DamlSubmission!.getInputEntriesList]] and
* [[DamlSubmission!.getInputStateList]]
*
* The caller is expected to store the produced [[DamlLogEntry]] in key-value store at a location
* that can be accessed through `entryId`. The DAML state updates may create new entries or update
* that can be accessed through `entryId`. The Daml state updates may create new entries or update
* existing entries in the key-value store.
*
* @param entryId: Log entry id to which this submission is committed.
@ -65,7 +65,7 @@ class KeyValueCommitting private[daml] (
* to verify that an input actually does not exist and was not just included in inputs.
* For example when committing a configuration we need the current configuration to authorize
* the submission.
* @return Log entry to be committed and the DAML state updates to be applied.
* @return Log entry to be committed and the Daml state updates to be applied.
*/
@throws(classOf[Err])
def processSubmission(
@ -166,7 +166,7 @@ object KeyValueCommitting {
maximumRecordTime: Option[Timestamp],
)
/** Compute the submission outputs, that is the DAML State Keys created or updated by
/** Compute the submission outputs, that is the Daml State Keys created or updated by
* the processing of the submission.
*/
def submissionOutputs(submission: DamlSubmission): Set[DamlStateKey] = {

View File

@ -27,12 +27,12 @@ import com.daml.metrics.Metrics
* It is parametrized by the committer's partial result `PartialResult`.
*
* A committer implementation defines an initial partial result with init and `steps` to process the submission
* into a set of DAML state outputs and a log entry. The main rationale behind this abstraction is to provide uniform
* approach to implementing a kvutils committer that shares the handling of input and output DAML state, rejecting
* into a set of Daml state outputs and a log entry. The main rationale behind this abstraction is to provide uniform
* approach to implementing a kvutils committer that shares the handling of input and output Daml state, rejecting
* a submission, logging and metrics.
*
* Each step is invoked with [[CommitContext]], that allows it to [[CommitContext.get]] and [[CommitContext.set]]
* DAML state, and the partial result from previous step.
* Daml state, and the partial result from previous step.
* When processing a submission for pre-execution, a committer produces the following set of results:
* - a set of output states and a log entry to be applied in case of no conflicts and/or time-out,
* - a record time window within which the submission is considered valid and a deduplication

View File

@ -29,7 +29,7 @@ object PackageValidationMode {
/** Specifies that the committer should not perform any validation of
* packages before committing them to the ledger.
* This should be used only by non distributed ledgers, like
* DAML-on-SQL, where the validation done in the API server
* Daml-on-SQL, where the validation done in the API server
* can be trusted.
*/
case object No extends PackageValidationMode

View File

@ -251,7 +251,7 @@ private[kvutils] class TransactionCommitter(
}
}
/** Validate the submission's conformance to the DAML model */
/** Validate the submission's conformance to the Daml model */
private def validateModelConformance: Step = new Step {
def apply(
commitContext: CommitContext,
@ -360,7 +360,7 @@ private[kvutils] class TransactionCommitter(
}
}
/** Validate the submission's conformance to the DAML model */
/** Validate the submission's conformance to the Daml model */
private[transaction] def blind: Step = new Step {
def apply(
commitContext: CommitContext,
@ -635,7 +635,7 @@ private[kvutils] class TransactionCommitter(
// Helper to lookup package from the state. The package contents
// are stored in the [[DamlLogEntry]], which we find by looking up
// the DAML state entry at `DamlStateKey(packageId = pkgId)`.
// the Daml state entry at `DamlStateKey(packageId = pkgId)`.
private def lookupPackage(
commitContext: CommitContext
)(pkgId: PackageId)(implicit loggingContext: LoggingContext): Option[Ast.Package] =
@ -661,7 +661,7 @@ private[kvutils] class TransactionCommitter(
}
case _ =>
val msg = "value is not a DAML-LF archive"
val msg = "value is not a Daml-LF archive"
logger.warn(s"Package lookup failed, $msg.")
throw Err.DecodeError("Archive", msg)
}

View File

@ -17,14 +17,14 @@ import com.daml.metrics.MetricName
* `logEntryIds` describes the ordering of log entries. The `logEntryMap` contains the data for the log entries.
* This map is expected to be append-only and existing entries are never modified or removed.
* `kvState` describes auxiliary mutable state which may be created as part of one log entry and mutated by a later one.
* (e.g. a log entry might describe a DAML transaction containing contracts and the auxiliary mutable data may
* (e.g. a log entry might describe a Daml transaction containing contracts and the auxiliary mutable data may
* describe their activeness).
*
* While these can be represented in a key-value store directly, some implementations may
* provide the ordering of log entries from outside the state (e.g. via a transaction chain).
* The distinction between DAML log entries and DAML state values is that log entries are immutable,
* The distinction between Daml log entries and Daml state values is that log entries are immutable,
* and that their keys are not necessarily known beforehand, which is why the implementation deals
* with them separately, even though both log entries and DAML state values may live in the same storage.
* with them separately, even though both log entries and Daml state values may live in the same storage.
*/
package object kvutils {

View File

@ -14,7 +14,7 @@ import com.daml.ledger.participant.state.v1.ParticipantId
import scala.concurrent.Future
/** Determines how we commit the results of processing a DAML submission.
/** Determines how we commit the results of processing a Daml submission.
*
* This must write deterministically. The output and order of writes should not vary with the same
* input, even across process runs. This also means that the implementing type must not depend on

View File

@ -74,7 +74,7 @@ object BatchedSubmissionValidator {
withCorrelationIdLogged(correlatedSubmission.correlationId)(f)
}
/** Batch validator validates and commits DAML submission batches to a DAML ledger. */
/** Batch validator validates and commits Daml submission batches to a Daml ledger. */
class BatchedSubmissionValidator[CommitResult] private[validator] (
params: BatchedSubmissionValidatorParameters,
committer: KeyValueCommitting,
@ -234,7 +234,7 @@ class BatchedSubmissionValidator[CommitResult] private[validator] (
// The last stage commits the results.
private type Outputs6 = Unit
/** Validate and commit a batch of indexed DAML submissions.
/** Validate and commit a batch of indexed Daml submissions.
* See the type definitions above to understand the different stages in the
* processing pipeline.
*/

View File

@ -5,7 +5,7 @@ package com.daml.ledger.validator
import com.daml.ledger.participant.state.kvutils.DamlKvutils.DamlStateValue
/** This typeclass signifies that implementor contains an optional DAML state value.
/** This typeclass signifies that implementor contains an optional Daml state value.
*
* Used by the [[com.daml.ledger.validator.preexecution.PreExecutingSubmissionValidator]].
*/

View File

@ -77,7 +77,7 @@ class KVUtilsTransactionSpec extends AnyWordSpec with Matchers with Inside {
).toImmArray,
)
),
// Types not yet supported in DAML:
// Types not yet supported in Daml:
//
// "<party: Party>": "Value.ValueStruct(FrontStack(Ref.Name.assertFromString("party") -> bobValue).toImmArray),
// "GenMap Party Unit": Value.ValueGenMap(FrontStack(bobValue -> ValueUnit).toImmArray),

View File

@ -44,13 +44,13 @@ package object benchmark {
/** This is the output of a successful call to
* [[com.daml.lf.transaction.TransactionCoder.decodeTransaction]].
* It's the DAML-LF representation of a transaction.
* It's the Daml-LF representation of a transaction.
*/
private[lf] type DecodedTransaction = VersionedTransaction[NodeId, ContractId]
/** This is the output of a successful call to
* [[com.daml.lf.value.ValueCoder.decodeValue]].
* It's the DAML-LF representation of a value.
* It's the Daml-LF representation of a value.
*/
private[lf] type DecodedValue = Versioned[value.Value[ContractId]]

View File

@ -12,8 +12,8 @@ import java.time.Instant
*
* @param actAs: the non-empty set of parties that submitted the change.
*
* @param applicationId: an identifier for the DAML application that
* submitted the command. This is used for monitoring and to allow DAML
* @param applicationId: an identifier for the Daml application that
* submitted the command. This is used for monitoring and to allow Daml
* applications subscribe to their own submissions only.
*
* @param commandId: a submitter provided identifier that he can use to

View File

@ -11,12 +11,12 @@ import com.daml.lf.data.{ImmArray, Ref, Time}
*
* @param ledgerEffectiveTime: the submitter-provided time at which the
* transaction should be interpreted. This is the time returned by the
* DAML interpreter on a `getTime :: Update Time` call. See the docs on
* Daml interpreter on a `getTime :: Update Time` call. See the docs on
* [[WriteService.submitTransaction]] for how it relates to the notion of
* `recordTime`.
*
* @param workflowId: a submitter-provided identifier used for monitoring
* and to traffic-shape the work handled by DAML applications
* and to traffic-shape the work handled by Daml applications
* communicating over the ledger.
*
* @param submissionTime: the transaction submission time

View File

@ -11,7 +11,7 @@ import com.daml.telemetry.TelemetryContext
/** An interface for uploading packages via a participant. */
trait WritePackagesService {
/** Upload a collection of DAML-LF packages to the ledger.
/** Upload a collection of Daml-LF packages to the ledger.
*
* This method must be thread-safe, not throw, and not block on IO. It is
* though allowed to perform significant computation.
@ -33,7 +33,7 @@ trait WritePackagesService {
* @param sourceDescription Description provided by the backing participant
* describing where it got the package from, e.g., when, where, or by whom
* the packages were uploaded.
* @param archives DAML-LF archives to be uploaded to the ledger.
* @param archives Daml-LF archives to be uploaded to the ledger.
* @param telemetryContext An implicit context for tracing.
*
* @return an async result of a [[SubmissionResult]]

View File

@ -22,7 +22,7 @@ import com.daml.telemetry.TelemetryContext
* plans to make this functionality uniformly available: see the roadmap for
* progress information https://github.com/digital-asset/daml/issues/121.
*
* As of now there are four methods for changing the state of a DAML ledger:
* As of now there are four methods for changing the state of a Daml ledger:
* - submitting a transaction using [[WriteService!.submitTransaction]]
* - allocating a new party using [[WritePartyService!.allocateParty]]
* - uploading a new package using [[WritePackagesService!.uploadPackages]]
@ -57,7 +57,7 @@ trait WriteService
* A note on ledger effective time and record time: transactions are
* submitted together with a `ledgerEffectiveTime` provided as part of the
* `transactionMeta` information. The ledger-effective time is used by the
* DAML Engine to resolve calls to the `getTime :: Update Time`
* Daml Engine to resolve calls to the `getTime :: Update Time`
* function. Letting the submitter freely choose the ledger-effective time
* is though a problem for the other stakeholders in the contracts affected
* by the submitted transaction. The submitter can in principle choose to

View File

@ -9,23 +9,23 @@ import com.daml.lf.value.Value
/** Interfaces to read from and write to an (abstract) participant state.
*
* A DAML ledger participant is code that allows to actively participate in
* the evolution of a shared DAML ledger. Each such participant maintains a
* particular view onto the state of the DAML ledger. We call this view the
* A Daml ledger participant is code that allows to actively participate in
* the evolution of a shared Daml ledger. Each such participant maintains a
* particular view onto the state of the Daml ledger. We call this view the
* participant state.
*
* Actual implementations of a DAML ledger participant will likely maintain
* Actual implementations of a Daml ledger participant will likely maintain
* more state than what is exposed through the interfaces in this package,
* which is why we talk about an abstract participant state. It abstracts
* over the different implementations of DAML ledger participants.
* over the different implementations of Daml ledger participants.
*
* The interfaces are optimized for easy implementation. The
* [[v1.WriteService]] interface contains the methods for changing the
* participant state (and potentially the state of the DAML ledger), which
* participant state (and potentially the state of the Daml ledger), which
* all ledger participants must support. These methods are for example
* exposed via the DAML Ledger API. Actual ledger participant implementations
* exposed via the Daml Ledger API. Actual ledger participant implementations
* likely support more implementation-specific methods. They are however not
* exposed via the DAML Ledger API. The [[v1.ReadService]] interface contains
* exposed via the Daml Ledger API. The [[v1.ReadService]] interface contains
* the one method [[v1.ReadService.stateUpdates]] to read the state of a ledger
* participant. It represents the participant state as a stream of
* [[v1.Update]]s to an initial participant state. The typical consumer of this

View File

@ -423,8 +423,8 @@ final class SandboxServer(
)
if (config.scenario.nonEmpty) {
logger.withoutContext.warn(
"""|Initializing a ledger with scenarios is deprecated and will be removed in the future. You are advised to use DAML Script instead. Using scenarios in DAML Studio will continue to work as expected.
|A migration guide for converting your scenarios to DAML Script is available at https://docs.daml.com/daml-script/#using-daml-script-for-ledger-initialization""".stripMargin
"""|Initializing a ledger with scenarios is deprecated and will be removed in the future. You are advised to use Daml Script instead. Using scenarios in Daml Studio will continue to work as expected.
|A migration guide for converting your scenarios to Daml Script is available at https://docs.daml.com/daml-script/#using-daml-script-for-ledger-initialization""".stripMargin
)
}
if (config.engineMode == SandboxConfig.EngineMode.EarlyAccess) {

View File

@ -215,7 +215,7 @@ final class SqlLedgerSpec
/** Workaround test for asserting that PostgreSQL asynchronous commits are disabled in
* [[com.daml.platform.store.dao.JdbcLedgerDao]] transactions when used from [[SqlLedger]].
*
* NOTE: This is needed for ensuring durability guarantees of DAML-on-SQL.
* NOTE: This is needed for ensuring durability guarantees of Daml-on-SQL.
*/
"does not use async commit when building JdbcLedgerDao" in {
for {

View File

@ -69,8 +69,8 @@ trait TestCommands {
actAs: Seq[String],
readAs: Seq[String],
): SubmitRequest = {
// This method returns a multi-party submission, however the DAML contract uses a single party.
// Pick a random party for the DAML contract (it needs to be one of the submitters).
// This method returns a multi-party submission, however the Daml contract uses a single party.
// Pick a random party for the Daml contract (it needs to be one of the submitters).
val operator = actAs.headOption.getOrElse(party)
dummyCommands(ledgerId, commandId, operator)
.update(

View File

@ -54,7 +54,7 @@ final class CompletionServiceWithEmptyLedgerIT
with TestCommands
with SuiteResourceManagementAroundEach {
// Start with no DAML packages and a large configuration delay, such that we can test the API's
// Start with no Daml packages and a large configuration delay, such that we can test the API's
// behavior on an empty index.
override protected def config: SandboxConfig =
super.config.copy(

View File

@ -30,7 +30,7 @@ final class ConfigurationServiceWithEmptyLedgerIT
with TestCommands
with SuiteResourceManagementAroundEach {
// Start with no DAML packages and a large configuration delay, such that we can test the API's
// Start with no Daml packages and a large configuration delay, such that we can test the API's
// behavior on an empty index.
override protected def config: SandboxConfig =
super.config.copy(