Disable the checkTtl validation in kvutils (#2714)

The time model is being reworked and the current stack is not prepared
to handle this additional check well.

We will reimplement time model related checks once the redesign has been
completed.
This commit is contained in:
Jussi Mäki 2019-09-02 04:57:40 +02:00 committed by mergify[bot]
parent fca502ac9e
commit a96f3fb736
3 changed files with 11 additions and 4 deletions

View File

@ -11,6 +11,9 @@ package com.daml.ledger.participant.state.kvutils
* - Added 'Envelope' for compressing and versioning kvutils messages that are transmitted * - Added 'Envelope' for compressing and versioning kvutils messages that are transmitted
* or stored on disk. [[Envelope.enclose]] and [[Envelope.open]] should be now used for * or stored on disk. [[Envelope.enclose]] and [[Envelope.open]] should be now used for
* submissions and for results from processing them. * submissions and for results from processing them.
* - Disabled the time-to-live checks for ledger effective time and record time. The
* time model is being redesigned and the checks will be reimplemented once we have
* the new design.
* *
* [since 100.13.16]: *BACKWARDS INCOMPATIBLE* * [since 100.13.16]: *BACKWARDS INCOMPATIBLE*
* - Log entries are no longer used as inputs to submission processing. The * - Log entries are no longer used as inputs to submission processing. The

View File

@ -130,8 +130,12 @@ private[kvutils] case class ProcessTransactionSubmission(
currentTime = recordTime.toInstant, currentTime = recordTime.toInstant,
givenLedgerEffectiveTime = givenLET, givenLedgerEffectiveTime = givenLET,
givenMaximumRecordTime = givenMRT) givenMaximumRecordTime = givenMRT)
&& /* NOTE(JM): This check has been disabled to be more lenient while
timeModelChecker.checkTtl(givenLET, givenMRT)) * we're still in beta phase. Time model is being redesigned and
* appropriate checks will be put back in place along with the new
* implementation.
*
* && timeModelChecker.checkTtl(givenLET, givenMRT) */ )
pass pass
else else
reject(RejectionReason.MaximumRecordTimeExceeded) reject(RejectionReason.MaximumRecordTimeExceeded)

View File

@ -3,8 +3,6 @@
package com.daml.ledger.participant.state.kvutils package com.daml.ledger.participant.state.kvutils
import java.time.Duration
import com.daml.ledger.participant.state.kvutils.DamlKvutils.{ import com.daml.ledger.participant.state.kvutils.DamlKvutils.{
DamlLogEntry, DamlLogEntry,
DamlTransactionRejectionEntry DamlTransactionRejectionEntry
@ -45,6 +43,7 @@ class KVUtilsTransactionSpec extends WordSpec with Matchers {
} }
) )
/* Disabled while we rework the time model.
"reject transaction with elapsed max record time" in KVTest.runTest( "reject transaction with elapsed max record time" in KVTest.runTest(
for { for {
tx <- runCommand(alice, simpleCreateCmd) tx <- runCommand(alice, simpleCreateCmd)
@ -55,6 +54,7 @@ class KVUtilsTransactionSpec extends WordSpec with Matchers {
logEntry.getTransactionRejectionEntry.getReasonCase shouldEqual DamlTransactionRejectionEntry.ReasonCase.MAXIMUM_RECORD_TIME_EXCEEDED logEntry.getTransactionRejectionEntry.getReasonCase shouldEqual DamlTransactionRejectionEntry.ReasonCase.MAXIMUM_RECORD_TIME_EXCEEDED
} }
) )
*/
"reject transaction with out of bounds LET" in KVTest.runTest( "reject transaction with out of bounds LET" in KVTest.runTest(
for { for {