diff --git a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/Err.scala b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/Err.scala index dd019e0760d5..4d6987462cf0 100644 --- a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/Err.scala +++ b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/Err.scala @@ -18,21 +18,25 @@ object Err { final case class InvalidSubmission(message: String) extends Err { override def getMessage: String = s"Invalid submission: $message" } + final case class MissingInputState(key: DamlStateKey) extends Err { override def getMessage: String = s"Missing input state for key $key. Hint: the referenced contract might have been archived." } + final case class ArchiveDecodingFailed(packageId: PackageId, reason: String) extends Err { override def getMessage: String = s"Decoding of DAML-LF archive $packageId failed: $reason" } + final case class DecodeError(kind: String, message: String) extends Err { override def getMessage: String = s"Decoding $kind failed: $message" } + final case class EncodeError(kind: String, message: String) extends Err { override def getMessage: String = s"Encoding $kind failed: $message" } + final case class InternalError(message: String) extends Err { override def getMessage: String = s"Internal error: $message" } - } diff --git a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/committer/transaction/TransactionCommitter.scala b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/committer/transaction/TransactionCommitter.scala index 374df05fcaec..fe994db1d9dd 100644 --- a/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/committer/transaction/TransactionCommitter.scala +++ b/ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/committer/transaction/TransactionCommitter.scala @@ -276,7 +276,9 @@ private[kvutils] class TransactionCommitter( ) } catch { case err: Err.MissingInputState => - logger.warn("Exception during model conformance validation.", err) + logger.warn( + s"Model conformance validation failed due to a missing input state (most likely due to invalid state on the partcipant), correlationId=${transactionEntry.commandId}" + ) reject( commitContext.recordTime, buildRejectionLogEntry(transactionEntry, RejectionReason.Disputed(err.getMessage)),