object ScenarioLedger extends Serializable
An in-memory representation of a ledger for scenarios
- Alphabetic
- By Inheritance
- ScenarioLedger
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class AssertMustFail(actAs: Set[Party], readAs: Set[Party], optLocation: Option[Location], time: Timestamp, txid: TransactionId) extends ScenarioStep with Product with Serializable
- final case class Commit(txId: TransactionId, richTransaction: RichTransaction, optLocation: Option[Location]) extends ScenarioStep with Product with Serializable
- sealed abstract class CommitError extends Product with Serializable
- final case class CommitResult(newLedger: ScenarioLedger, transactionId: TransactionId, richTransaction: RichTransaction) extends Product with Serializable
Result of committing a transaction is the new ledger, and the enriched transaction.
- final case class Disclosure(since: TransactionId, explicit: Boolean) extends Product with Serializable
- sealed abstract class Error extends Product with Serializable
- final case class ErrorLedgerCrash(reason: String) extends Error with Product with Serializable
- final case class LedgerData(activeContracts: Set[ContractId], nodeInfos: LedgerNodeInfos, activeKeys: Map[GlobalKey, ContractId], coidToNodeId: Map[ContractId, EventId]) extends Product with Serializable
- activeContracts
The contracts that are active in the current state of the ledger.
- nodeInfos
Node information used to efficiently navigate the transaction graph
- final case class LedgerException(err: Error) extends RuntimeException with Product with Serializable
Errors
- final case class LedgerNodeInfo(node: Node, optLocation: Option[Location], transaction: TransactionId, effectiveAt: Timestamp, disclosures: Map[Party, Disclosure], referencedBy: Set[EventId], consumedBy: Option[EventId]) extends Product with Serializable
Node information that we cache to support the efficient consumption of the data stored in the ledger.
Node information that we cache to support the efficient consumption of the data stored in the ledger.
- node
The node itself. Repeated here to avoid having to look it up
- transaction
The transaction that inserted this node.
- effectiveAt
The time at which this node is effective. NOTE (SM): we denormalize this for speed, as otherwise we'd have to lookup that information on the transaction every time we need to check for whether a contract is active.
- referencedBy
All nodes referencing this node, which are either 'NodeExercises' or 'NodeEnsureActive' nodes.
- consumedBy
The node consuming this node, provided such a node exists. Consumption under a rollback is not included here even for contracts created under a rollback node.
- type LedgerNodeInfos = Map[EventId, LedgerNodeInfo]
- final case class LookupContractNotActive(coid: ContractId, templateId: Identifier, consumedBy: Option[EventId]) extends LookupResult with Product with Serializable
- final case class LookupContractNotEffective(coid: ContractId, templateId: Identifier, effectiveAt: Timestamp) extends LookupResult with Product with Serializable
- final case class LookupContractNotFound(coid: ContractId) extends LookupResult with Product with Serializable
- final case class LookupContractNotVisible(coid: ContractId, templateId: Identifier, observers: Set[Party], stakeholders: Set[Party]) extends LookupResult with Product with Serializable
- final case class LookupOk(coinst: FatContractInstance) extends LookupResult with Product with Serializable
- sealed abstract class LookupResult extends Product with Serializable
- final case class ParticipantView(actAs: Set[Party], readAs: Set[Party]) extends View with Product with Serializable
The view of the ledger at the given party.
- final case class PassTime(dtMicros: Long) extends ScenarioStep with Product with Serializable
- final case class RichTransaction(actAs: Set[Party], readAs: Set[Party], effectiveAt: Timestamp, transactionId: LedgerString, transaction: CommittedTransaction, blindingInfo: BlindingInfo) extends Product with Serializable
A transaction as it is committed to the ledger.
A transaction as it is committed to the ledger.
NOTE (SM): This should correspond quite closely to a core transaction. I'm purposely calling it differently to facilitate the discussion when comparing this code to legacy-code for building core transactions.
- effectiveAt
The time at which this transaction is effective.
- sealed abstract class ScenarioStep extends Product with Serializable
Scenario step representing the actions executed in a scenario.
- final case class SubmissionFailed(actAs: Set[Party], readAs: Set[Party], optLocation: Option[Location], time: Timestamp, txid: TransactionId) extends ScenarioStep with Product with Serializable
- final case class TransactionId(index: Int) extends Ordered[TransactionId] with Product with Serializable
- class TransactionProcessor extends AnyRef
Functions for updating the ledger with new transactional information.
- final case class UniqueKeyViolation(gk: GlobalKey) extends Product with Serializable
- sealed abstract class View extends Product with Serializable
Views onto the ledger
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()
- def collectCoids(value: Value): Set[ContractId]
Collect all contract ids appearing in a value
- def collectCoids(value: VersionedValue): Set[ContractId]
- def commitTransaction(actAs: Set[Party], readAs: Set[Party], effectiveAt: Timestamp, optLocation: Option[Location], tx: SubmittedTransaction, locationInfo: Map[NodeId, Location], l: ScenarioLedger): Either[CommitError, CommitResult]
Updates the ledger to reflect that
committer
committed the transactiontr
resulting from running the update-expression at timeeffectiveAt
. - def crash(reason: String): Nothing
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def initialLedger(t0: Timestamp): ScenarioLedger
The initial ledger
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def throwLedgerError(err: Error): Nothing
- 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])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object CommitError extends Serializable
- object LedgerData extends Serializable
- case object OperatorView extends View with Product with Serializable
The view of the ledger at the operator, i.e., the view containing all transaction nodes.
- object RichTransaction extends Serializable
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated