Packages

package protocol

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.

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

Package Members

  1. package hash
  2. package messages

    This package contains data structures used in the transaction protocol.

    This package contains data structures used in the transaction protocol. However, generic data structures, e.g. com.digitalasset.canton.data.MerkleTree etc. are kept in com.digitalasset.canton.data package.

  3. package v30

Type Members

  1. final case class AcsCommitmentsCatchUpParameters(catchUpIntervalSkip: PositiveInt, nrIntervalsToTriggerCatchUp: PositiveInt) extends PrettyPrinting with Product with Serializable

    The class specifies the catch-up parameters governing the catch-up mode of a participant lagging behind with its ACS commitments computation.

    The class specifies the catch-up parameters governing the catch-up mode of a participant lagging behind with its ACS commitments computation. ***** Parameter recommendations A high catchUpIntervalSkip outputs more commitments and is slower to catch-up. For equal catchUpIntervalSkip, a high nrIntervalsToTriggerCatchUp is less aggressive to trigger the catch-up mode.

    ***** Examples (5,2) and (2,5) both trigger the catch-up mode when the processor lags behind by at least 10 reconciliation intervals. The former catches up quicker, but computes fewer commitments, whereas the latter computes more commitments but is slower to catch-up.

    catchUpIntervalSkip

    The number of reconciliation intervals that the participant skips in catch-up mode. A catch-up interval thus has a length of reconciliation interval * catchUpIntervalSkip. All participants must catch up to the same timestamp. To ensure this, the interval count starts at EPOCH and gets incremented in catch-up intervals. For example, a reconciliation interval of 5 seconds, and a catchUpIntervalSkip of 2 (intervals), when a participant receiving a valid commitment at 15 seconds with timestamp 20 seconds, will perform catch-up from 10 seconds to 20 seconds (skipping 15 seconds commitment).

    nrIntervalsToTriggerCatchUp

    The number of intervals a participant should lag behind in order to trigger catch-up mode. If a participant's current timestamp is behind the timestamp of valid received commitments by reconciliationInterval * catchUpIntervalSkip * nrIntervalsToTriggerCatchUp, then the participant triggers catch-up mode.

    Exceptions thrown

    java.lang.IllegalArgumentException when catchUpIntervalSkip * nrIntervalsToTriggerCatchUp overflows.

  2. sealed abstract class CantonContractIdVersion extends Ordered[CantonContractIdVersion] with Serializable with Product
  3. final case class ContractMetadata extends HasVersionedWrapper[ContractMetadata] with PrettyPrinting with Product with Serializable

    Metadata for a contract.

    Metadata for a contract.

    Exceptions thrown

    ContractMetadata.InvalidContractMetadata if some maintainers are not signatories or some signatories are not stakeholders.

  4. final case class ContractSalt(unwrap: Salt) extends AnyVal with Product with Serializable

    A blinded cryptographic hash of the information that ensures uniqueness of Unicums in Canton.

    A blinded cryptographic hash of the information that ensures uniqueness of Unicums in Canton. The hash can be used to unblind the Unicum's cryptographic commitment to the contract data.

    See also

    UnicumGenerator for the construction details

  5. final case class CreatedContract extends PrettyPrinting with Product with Serializable

  6. final case class CreatedContractInView(contract: SerializableContract, consumedInView: Boolean, rolledBack: Boolean) extends Product with Serializable

    consumedInView

    Whether the contract is consumed in the view. com.digitalasset.canton.protocol.WellFormedTransaction checks that a created contract can only be used in the same or deeper rollback scopes as the create, so if rolledBack is true then consumedInView is false.

    rolledBack

    Whether the contract creation has a different rollback scope than the view.

  7. final case class DriverContractMetadata(salt: Salt) extends HasVersionedWrapper[DriverContractMetadata] with PrettyPrinting with Product with Serializable
  8. final case class DynamicSequencingParameters(payload: Option[ByteString])(representativeProtocolVersion: RepresentativeProtocolVersion[DynamicSequencingParameters.type]) extends HasProtocolVersionedWrapper[DynamicSequencingParameters] with PrettyPrinting with Product with Serializable

    Synchronizer-wide dynamic sequencing parameters.

    Synchronizer-wide dynamic sequencing parameters.

    payload

    The opaque payload of the synchronizer-wide dynamic sequencing parameters; its content is sequencer-dependent and synchronizer owners are responsible for ensuring that it can be correctly interpreted by the sequencers in use. If no payload is provided, sequencer-specific default values are used. If the payload cannot be correctly interpreted or the parameters cannot be set due to dynamic conditions, their value will not change.

  9. final case class DynamicSequencingParametersWithValidity(parameters: DynamicSequencingParameters, validFrom: CantonTimestamp, validUntil: Option[CantonTimestamp], synchronizerId: SynchronizerId) extends Product with Serializable

    Dynamic sequencing parameters and their validity interval.

    Dynamic sequencing parameters and their validity interval.

    validFrom

    Start point of the validity interval (exclusive)

    validUntil

    End point of the validity interval (inclusive)

  10. final case class DynamicSynchronizerParameters extends HasProtocolVersionedWrapper[DynamicSynchronizerParameters] with PrettyPrinting with Product with Serializable

    Exceptions thrown

    DynamicSynchronizerParameters$.InvalidDynamicSynchronizerParameters if mediatorDeduplicationTimeout is less than twice of preparationTimeRecordTimeTolerance.

  11. class DynamicSynchronizerParametersLookup[P] extends NamedLogging

    This class allows to query synchronizer parameters easily.

    This class allows to query synchronizer parameters easily. Type parameter P is the type of the returned value.

  12. final case class DynamicSynchronizerParametersWithValidity(parameters: DynamicSynchronizerParameters, validFrom: CantonTimestamp, validUntil: Option[CantonTimestamp], synchronizerId: SynchronizerId) extends Product with Serializable

    Dynamic synchronizer parameters and their validity interval.

    Dynamic synchronizer parameters and their validity interval. Mostly so that we can perform additional checks.

    validFrom

    Start point of the validity interval (exclusive)

    validUntil

    End point of the validity interval (inclusive)

  13. final case class ExternalAuthorization(signatures: Map[PartyId, Seq[Signature]], hashingSchemeVersion: HashingSchemeVersion)(representativeProtocolVersion: RepresentativeProtocolVersion[ExternalAuthorization.type]) extends HasProtocolVersionedWrapper[ExternalAuthorization] with PrettyPrinting with Product with Serializable
  14. trait HasSerializableContract extends AnyRef
  15. final case class InputContract(contract: SerializableContract, consumed: Boolean) extends PrettyPrinting with Product with Serializable

    consumed

    Whether this contract is consumed in the core of the view this InputContract belongs to.

    See also

    com.digitalasset.canton.data.ViewParticipantData.coreInputs

  16. type LedgerTransactionNodeStatistics = TransactionNodeStatistics
  17. type LfActionNode = Action

    Shorthand for Daml-LF "action" nodes (all node types besides "rollback" nodes)

  18. type LfChoiceName = Name
  19. type LfCommittedTransaction = T
  20. type LfContractId = ContractId

    Shorthand for Daml-LF contract ids

  21. type LfContractInst = Versioned[ContractInstance]

    Shorthand for contract instances.

  22. type LfGlobalKey = GlobalKey

    Shorthand for global contract keys (with template_id).

  23. type LfGlobalKeyWithMaintainers = GlobalKeyWithMaintainers
  24. type LfHash = Hash
  25. type LfLanguageVersion = LanguageVersion
  26. type LfLeafOnlyActionNode = LeafOnlyAction

    Shorthand for leaf only action nodes.

  27. type LfNode = Node

    Shorthand for Daml-LF nodes.

    Shorthand for Daml-LF nodes. Nodes include NodeIds of their children. Children need to be looked up in the underlying transaction.

  28. type LfNodeCreate = Create

    Shorthand for create nodes.

  29. type LfNodeExercises = Exercise

    Shorthand for exercise nodes.

    Shorthand for exercise nodes. Nodes include NodeIds of their children. Children need to be looked up in the underlying transaction.

  30. type LfNodeFetch = Fetch

    Shorthand for fetch nodes.

  31. type LfNodeId = NodeId
  32. type LfNodeLookupByKey = LookupByKey

    Shorthand for lookup by key nodes.

  33. type LfNodeRollback = Rollback

    Shorthand for rollback nodes.

  34. type LfSubmittedTransaction = T
  35. type LfTemplateId = Identifier
  36. type LfTransaction = Transaction

    Shorthand for Daml-LF transaction wrapped in versioned transaction in turn wrapped in committed or submitted transaction

  37. type LfVersionedTransaction = VersionedTransaction
  38. sealed trait LocalRejectError extends TransactionError with TransactionRejection with PrettyPrinting with Product with Serializable
  39. abstract class LocalRejectErrorCode extends ErrorCode

    Base type for ErrorCodes related to LocalReject, if the rejection does not (necessarily) occur due to malicious behavior.

  40. sealed abstract class LocalRejectErrorImpl extends LocalRejectError

    Base class for LocalReject errors, if the rejection does not (necessarily) occur due to malicious behavior.

  41. sealed abstract class Malformed extends BaseAlarm with LocalRejectError

    Base class for LocalReject errors, if the rejection occurs due to malicious behavior.

  42. final case class MalformedContractId(id: String, message: String) extends Product with Serializable
  43. abstract class MalformedErrorCode extends AlarmErrorCode

    Base type for ErrorCodes related to LocalRejectError, if the rejection is due to malicious behavior.

  44. sealed trait OnboardingRestriction extends Product with Serializable with PrettyPrinting

    Onboarding restrictions for new participants joining a synchronizer

    Onboarding restrictions for new participants joining a synchronizer

    The synchronizer administrators can set onboarding restrictions to control which participant can join the synchronizer.

  45. trait Phase37Processor[RequestBatch] extends AnyRef
  46. final case class ProtocolSymmetricKey(key: SymmetricKey)(representativeProtocolVersion: RepresentativeProtocolVersion[ProtocolSymmetricKey.type]) extends HasProtocolVersionedWrapper[ProtocolSymmetricKey] with Product with Serializable

    Wrapper for a symmetric key when tied to a particular protocol version

  47. final case class ReassignmentId(sourceSynchronizer: Source[SynchronizerId], unassignmentTs: CantonTimestamp) extends PrettyPrinting with Product with Serializable

    A reassignment is identified by the source synchronizer and the sequencer timestamp on the unassignment request.

  48. final case class RequestAndRootHashMessage[RequestEnvelope](requestEnvelopes: NonEmpty[Seq[RequestEnvelope]], rootHashMessage: RootHashMessage[SerializedRootHashMessagePayload], mediator: MediatorGroupRecipient, isReceipt: Boolean) extends Product with Serializable

    Request messages, along with the root hash message, the mediator ID that received the root hash message, and whether the delivery was a receipt or not (i.e.

    Request messages, along with the root hash message, the mediator ID that received the root hash message, and whether the delivery was a receipt or not (i.e. contained a message ID).

  49. final case class RequestId(ts: CantonTimestamp) extends PrettyPrinting with Product with Serializable

    A confirmation request is identified by the sequencer timestamp.

  50. type RequestProcessor[VT <: ViewType] = Phase37Processor[RequestAndRootHashMessage[OpenEnvelope[EncryptedViewMessage[VT]]]]
  51. final case class ResolvedKey(key: LfVersioned[LfGlobalKey], resolution: SerializableKeyResolution) extends Product with Serializable
  52. final case class RollbackContext extends PrettyPrinting with Ordered[RollbackContext] with Product with Serializable

    RollbackContext tracks the location of lf transaction nodes or canton participant views within a hierarchy of LfNodeRollback suitable for maintaining the local position within the hierarchy of rollback nodes when iterating over a transaction.

  53. case class RootHash(hash: Hash) extends PrettyPrinting with HasCryptographicEvidence with Product with Serializable

    The root hash of a Merkle tree used as an identifier for requests.

    The root hash of a Merkle tree used as an identifier for requests.

    Extends com.digitalasset.canton.serialization.HasCryptographicEvidence so that RootHash's serialization can be used to compute the hash of an inner Merkle node from its children using RootHash.getCryptographicEvidence. Serialization to Protobuf fields can be done with RootHash.toProtoPrimitive

    Here is how we use it:

    1. Every participant gets a “partially blinded” Merkle tree, defining the locations of the views they are privy to.
    2. That Merkle tree has a root. That root has a hash. That’s the root hash.
    3. The mediator receives a fully blinded Merkle tree, with the same hash.
    4. The submitting participant will send for each receiving participant an additional “root hash message” in the same batch. That message will contain the same hash, with recipients (participant, mediator).
    5. The mediator will check that all participants mentioned in the tree received a root hash message and that all hashes are equal.
    6. Once the mediator sends out the verdict, the verdict will include the tree structure and thus the root hash. Hence, the participant will now have certainty about the mediator having checked all root hash messages and having observed the same tree structure.
    Annotations
    @SuppressWarnings()
  54. case class SerializableContract(contractId: LfContractId, rawContractInstance: SerializableRawContractInstance, metadata: ContractMetadata, ledgerCreateTime: LedgerCreateTime, contractSalt: Salt) extends HasVersionedWrapper[SerializableContract] with PrettyPrinting with Product with Serializable

    Represents a serializable contract.

    Represents a serializable contract.

    contractId

    The ID of the contract.

    rawContractInstance

    The raw instance of the contract.

    metadata

    The metadata with stakeholders and signatories; can be computed from contract instance

    ledgerCreateTime

    The ledger time of the transaction creating the contract

    Annotations
    @SuppressWarnings()
  55. final case class SerializableDeduplicationPeriod(deduplicationPeriod: DeduplicationPeriod) extends Product with Serializable
  56. final case class SerializableRawContractInstance extends MemoizedEvidenceWithFailure[EncodeError] with Product with Serializable

    Represents a serializable contract instance and memoizes the serialization.

  57. final case class Stakeholders extends HasVersionedWrapper[Stakeholders] with PrettyPrinting with Product with Serializable
  58. final case class StaticSynchronizerParameters(requiredSigningSpecs: RequiredSigningSpecs, requiredEncryptionSpecs: RequiredEncryptionSpecs, requiredSymmetricKeySchemes: NonEmpty[Set[SymmetricKeyScheme]], requiredHashAlgorithms: NonEmpty[Set[HashAlgorithm]], requiredCryptoKeyFormats: NonEmpty[Set[CryptoKeyFormat]], requiredSignatureFormats: NonEmpty[Set[SignatureFormat]], protocolVersion: ProtocolVersion) extends HasProtocolVersionedWrapper[StaticSynchronizerParameters] with PrettyPrinting with Product with Serializable
  59. final case class StoredParties(parties: SortedSet[LfPartyId]) extends HasVersionedWrapper[StoredParties] with Product with Serializable
  60. final case class TransactionId(hash: Hash) extends HasCryptographicEvidence with Product with Serializable

    A hash-based transaction id.

  61. final case class TransactionMetadata(ledgerTime: CantonTimestamp, preparationTime: CantonTimestamp, seeds: Map[LfNodeId, LfHash]) extends Product with Serializable

    Collects the metadata of a LF transaction to the extent that is needed in Canton

    Collects the metadata of a LF transaction to the extent that is needed in Canton

    ledgerTime

    The ledger time of the transaction

    preparationTime

    The preparation time of the transaction

    seeds

    The node seeds by node ID

  62. final case class Unicum(unwrap: Hash) extends AnyVal with Product with Serializable

    A hash-based identifier for contracts.

    A hash-based identifier for contracts. Must be paired with a discriminator to obtain a complete contract ID.

  63. class UnicumGenerator extends AnyRef

    Generates ContractSalts and Unicums for contract IDs such that the Unicum is a cryptographic commitment to the following:

    Generates ContractSalts and Unicums for contract IDs such that the Unicum is a cryptographic commitment to the following:

    The commitment is implemented as a blinded hash with the view action salt as the blinding factor.

    The above data is split into two groups:

    The Unicum is then the cryptographic hash of the ContractSalt and the second group.

    The ContractSalt contains all the information that ensures uniqueness of contract IDs in Canton. The second group contains the information that is relevant for using the contract in transactions. The commitment to the information in the second group can be opened by revealing the ContractSalt. Since the ContractSalt is a blinded hash, such an opening does not reveal information about the data in the first group.

    Properties

    Global Uniqueness

    If a transaction is added to the virtual synchronizer ledger for a given synchronizer, then the Unicum is globally unique unless a hash collision occurs.

    Contracts with the same Unicum must run over the same synchronizer, have the same transaction UUID, and are handled by the same mediator. The definition of the virtual synchronizer ledger ensures that transaction UUIDs are unique within the ledger effective time tolerance and within the mediator handling the request, and that the sequencing time deviates from the ledger time by at most this tolerance. So two contracts with the same Unicum must be generated by the same transaction. However, the com.digitalasset.canton.data.ViewPosition and the create index uniquely identify the node in the transaction that creates the contract.

    We include both the com.digitalasset.canton.topology.SynchronizerId and the com.digitalasset.canton.topology.MediatorId in the ContractSalt because we cannot exclude that mediators on different synchronizers happen to have the same identifier and there may be mupltiple mediators on a synchronizer.

    No Information Leak of Template Arguments

    If the submitter is honest and chooses a random transaction seed, the Unicum does not leak information about template arguments.

    The transaction seed's randomness propagates to the action seed through the seed derivation scheme. Since the honest submitter does not leak the transaction seed and shows the action seed only to the witnesses of the view, the ContractSalt looks random to non-witnesses of the view. Accordingly, the ContractSalt blinds the template arguments.

    Authentication of Contract Details

    The Unicum authenticates the contract details (ledger time and template arguments) if the hash function is preimage resistant.

    By checking the hash of the ContractSalt and the contract details against the Unicum, everyone can verify that they fit together. As the hash function is preimage resistant, it is therefore computationally infeasible for a participant to find a different ContractSalt such that different contract details lead to the same hash.

    No Information Leak of Contract Creation

    Participants learning about the contract only through divulgence or disclosure do not learn in which transaction the contract was created unless the submitter or witnesses of the creation leak this information.

    By the honesty assumption, the action seed is a random value to those participants. Accordingly, since the ContractSalt contains all the information that ties the contract to a particular transaction, the participants cannot say which transaction with the same ledger time created the contract.

    No Information Leak of Contract Details

    The Unicum does not leak the contract details when a contract ID is shown to a third party if the submitter and all witnesses and divulgees are honest.

    By the honesty assumption, the action seed is a random value to the third party, and so is the ContractSalt. This entropy hides the contract details to the third party.

  64. case class ViewHash(hash: Hash) extends PrettyPrinting with Product with Serializable

    A hash-based transaction view id

    A hash-based transaction view id

    Views from different requests may have the same view hash.

    Annotations
    @SuppressWarnings()
  65. final case class WellFormedTransaction[+S <: State] extends Product with Serializable

    Used to mark a transaction to be well-formed.

    Used to mark a transaction to be well-formed. That means:

    • tx is well-formed according to the Daml-LF definition, i.e., a root node is not child of another node and every non-root node has exactly one parent and is reachable from a root node. (No cycles, no sharing, no orphaned node).
    • All node Ids are non-negative.
    • The type parameter S determines whether all create nodes have suffixed IDs or none.
    • Create nodes have unique contract ids of shape com.digitalasset.daml.lf.value.Value.ContractId.V1.
    • The contract id of a create node is not referenced before the node.
    • The contract id of a rolled back create node is not referenced outside its rollback scope.
    • The discriminators of create nodes without suffixed contract ids are unique among all discriminators that appear in the transaction.
    • Every action node has at least one signatory.
    • Every signatory is also a stakeholder.
    • Fetch actors are defined.
    • All created contract instances and choice arguments in the transaction can be serialized.
    • All nodes in the transaction have the optLocation field set to None.
    • metadata contains seeds exactly for those node IDs from tx that should have a seed (creates and exercises).
    • Keys of transaction nodes don't contain contract IDs.
    • The maintainers of keys are non-empty.
    • ByKey nodes have a key.
    • All parties referenced by the transaction can be converted to com.digitalasset.canton.topology.PartyId
    • The transaction has the optUsedPackages set to scala.None$
    • Every rollback node has at least one child and no rollback node appears at the root unless the transaction has been merged by Canton.
  66. final case class WithContractMetadata[+A](x: A, metadata: ContractMetadata) extends Product with Serializable
  67. final case class WithRollbackScope[T](rbScope: RollbackScope, unwrap: T) extends Product with Serializable

Value Members

  1. val DummyTransactionVersion: LfLanguageVersion
  2. val LedgerTransactionNodeStatistics: TransactionNodeStatistics.type
  3. val LfChoiceName: ChoiceName.type
  4. val LfCommittedTransaction: CommittedTransaction.type
  5. val LfContractId: ContractId.type
  6. val LfContractInst: VersionedContractInstance.type
  7. val LfGlobalKey: GlobalKey.type
  8. val LfGlobalKeyWithMaintainers: GlobalKeyWithMaintainers.type
  9. val LfHash: Hash.type
  10. val LfLanguageVersion: LanguageVersion.type
  11. val LfNodeCreate: Create.type
  12. val LfNodeExercises: Exercise.type
  13. val LfNodeFetch: Fetch.type
  14. val LfNodeId: NodeId.type
  15. val LfNodeLookupByKey: LookupByKey.type
  16. val LfNodeRollback: Rollback.type
  17. val LfSubmittedTransaction: SubmittedTransaction.type
  18. val LfTemplateId: TypeConName.type
  19. val LfTransaction: Transaction.type
  20. val LfTransactionVersion: TransactionVersion.type
  21. val LfVersionedTransaction: VersionedTransaction.type
  22. def maxTransactionVersion(versions: NonEmpty[Seq[LfLanguageVersion]]): LfLanguageVersion
  23. object AcsCommitmentsCatchUpParameters extends Serializable
  24. case object AuthenticatedContractIdVersionV10 extends CantonContractIdVersion with Product with Serializable
  25. case object AuthenticatedContractIdVersionV11 extends CantonContractIdVersion with Product with Serializable
  26. object CantonContractIdVersion extends Serializable
  27. object ContractIdSyntax
  28. object ContractMetadata extends HasVersionedMessageCompanion[ContractMetadata] with HasVersionedMessageCompanionDbHelpers[ContractMetadata] with Serializable
  29. object ContractSalt extends Serializable
  30. object CreatedContract extends Serializable
  31. object CreatedContractInView extends Serializable
  32. object DriverContractMetadata extends HasVersionedMessageCompanion[DriverContractMetadata] with Serializable
  33. object DynamicSequencingParameters extends VersioningCompanion[DynamicSequencingParameters] with Serializable
  34. object DynamicSynchronizerParameters extends VersioningCompanion[DynamicSynchronizerParameters] with Serializable
  35. object ExternalAuthorization extends VersioningCompanion[ExternalAuthorization] with ProtocolVersionedCompanionDbHelpers[ExternalAuthorization] with Serializable
  36. object GlobalKeySerialization
  37. object InputContract extends Serializable
  38. object LfHashSyntax
  39. object LocalRejectError extends LocalRejectionGroup with Serializable
  40. object OnboardingRestriction extends Serializable
  41. object ProtocolSymmetricKey extends VersioningCompanion[ProtocolSymmetricKey] with Serializable
  42. object ReassignmentId extends Serializable
  43. object RefIdentifierSyntax
  44. object RequestId extends Serializable
  45. object ResolvedKey extends Serializable
  46. object RollbackContext extends Serializable
  47. object RootHash extends Serializable
  48. object SerializableContract extends HasVersionedMessageCompanion[SerializableContract] with HasVersionedMessageCompanionDbHelpers[SerializableContract] with Serializable
  49. object SerializableDeduplicationPeriod extends Serializable
  50. object SerializableRawContractInstance extends Serializable
  51. object Stakeholders extends HasVersionedMessageCompanion[Stakeholders] with Serializable
  52. object StaticSynchronizerParameters extends VersioningCompanion[StaticSynchronizerParameters] with ProtocolVersionedCompanionDbHelpers[StaticSynchronizerParameters] with Serializable
  53. object StoredParties extends HasVersionedMessageCompanion[StoredParties] with HasVersionedMessageCompanionDbHelpers[StoredParties] with Serializable
  54. object SynchronizerParameters
  55. object SynchronizerParametersLookup
  56. object TransactionId extends Serializable
  57. object TransactionMetadata extends Serializable
  58. object ViewHash extends Serializable
  59. object WellFormedTransaction extends Serializable
  60. object WithContractMetadata extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped