Skip to content

Latest commit

 

History

History
93 lines (73 loc) · 4.98 KB

definition.md

File metadata and controls

93 lines (73 loc) · 4.98 KB

View Definition

  • RFC: 03-002
  • Authors: Allison Irvin, Antony Targett, Christian Vecchiola, Dileban Karunamoorthy, Ermyas Abebe, Nick Waywood, Venkatraman Ramakrishna, Sandeep Nishad
  • Status: Proposed
  • Since: 02-Jan-2023

Summary

This document specifies the data structure formats for distributed ledger views.

Definition

  • View data must be encoded or serialized (see data field in view definition below).
  • The default encoding will be just a serialization of DLT-specific view data using standard mechanisms (e.g., for protobuf or JSON).
  • Encodings can be specified by the creator (driver) and specified in the meta field in a View message.
message View {
  Meta meta = 1;

  // Represents the data playload of this view.
  // The representation of Fabric, Corda etc will be captured elsewhere.
  // For some protocols, like Bitcoin, the structure of an SPV proof is well known.
  bytes data = 2;
}

The attributes are defined below:

  • meta contains metadata of the view.
  • data contains the requested data, including ledger data and associated proof.
message Meta {
  enum Protocol {
      BITCOIN = 0;
      ETHEREUM = 1;
      FABRIC = 3;
      CORDA = 4;
  }

  // Underlying distributed ledger protocol.
  Protocol protocol = 1;

  // What notion of time?
  // If the observer and network are synchronizing on a global clock
  // there won't be a need to distinguish between static and dynamic views.
  string timestamp = 2;

  // Notorization, SPV, ZKP, etc. Possibly enum
  string proof_type = 3;

  // The data field's serialization format (e.g. JSON, XML, Protobuf)
  string serialization_format = 4;
}

The attributes are defined below:

  • protocol specifies the network protocol of the source (responding) network.
  • timestamp the timestamp of the response.
  • proof_type describes the type of proof, e.g. Notarization, SPV, ZKP, etc. (This field may be changed to an enum in the future). See proof representation for more details.
  • serialization_format specifies the data field's serialization format (e.g. JSON, XML, Protobuf).

Examples

View returned from a Corda network:

meta {
  protocol: CORDA
  timestamp: "Thu Aug 06 03:58:54 GMT 2020"
  proof_type: "Notarization"
  serialization_format: "JSON"
}
data: "eyJub3Rhcml6YXRpb25zIjpbeyJzaWduYXR1cmUiOiJRYkt4UXFLbHNMSkg4TUM2ZU9GaFEvRUxmdWw3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a1BUUXlaRE0yTnpNMkxUazNNVFF0TkRVNE55MWlNR05sTFdGa1pUSTRNekJoTlRjNVpTbGQifQ=="

Commitment (Future Work)

message Commitment {
    // How is the commitment exchanged/located?
    string address = 3;
    // Cryptographic commitment scheme
    string scheme = 1;
}

We intend to add a commitment field to the Meta structure in the future as a mechanism to make public commitments of state with freshness guarantees.